summaryrefslogtreecommitdiffstats
path: root/Tools/cases_generator/generate_cases.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/cases_generator/generate_cases.py')
-rw-r--r--Tools/cases_generator/generate_cases.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/Tools/cases_generator/generate_cases.py b/Tools/cases_generator/generate_cases.py
index 38be980..657dfa9 100644
--- a/Tools/cases_generator/generate_cases.py
+++ b/Tools/cases_generator/generate_cases.py
@@ -308,8 +308,7 @@ class ActiveCacheEffect:
FORBIDDEN_NAMES_IN_UOPS = (
- "resume_with_error", # Proxy for "goto", which isn't an IDENTIFIER
- "unbound_local_error",
+ "resume_with_error",
"kwnames",
"next_instr",
"oparg1", # Proxy for super-instructions like LOAD_FAST_LOAD_FAST
@@ -401,20 +400,25 @@ class Instruction:
def is_viable_uop(self) -> bool:
"""Whether this instruction is viable as a uop."""
if self.always_exits:
+ # print(f"Skipping {self.name} because it always exits")
return False
if self.instr_flags.HAS_ARG_FLAG:
# If the instruction uses oparg, it cannot use any caches
if self.active_caches:
+ # print(f"Skipping {self.name} because it uses oparg and caches")
return False
else:
# If it doesn't use oparg, it can have one cache entry
if len(self.active_caches) > 1:
+ # print(f"Skipping {self.name} because it has >1 cache entries")
return False
+ res = True
for forbidden in FORBIDDEN_NAMES_IN_UOPS:
# TODO: Don't check in '#ifdef ENABLE_SPECIALIZATION' regions
if variable_used(self.inst, forbidden):
- return False
- return True
+ # print(f"Skipping {self.name} because it uses {forbidden}")
+ res = False
+ return res
def write(self, out: Formatter, tier: Tiers = TIER_ONE) -> None:
"""Write one instruction, sans prologue and epilogue."""
@@ -1323,7 +1327,7 @@ class Analyzer:
self.out.emit(make_text(name, counter))
counter += 1
add("EXIT_TRACE")
- add("SET_IP")
+ add("SAVE_IP")
for instr in self.instrs.values():
if instr.kind == "op" and instr.is_viable_uop():
add(instr.name)