An instruction can be expanded if all its parts are viable for tier 2
(inst: Instruction)
| 301 | |
| 302 | |
| 303 | def is_viable_expansion(inst: Instruction) -> bool: |
| 304 | "An instruction can be expanded if all its parts are viable for tier 2" |
| 305 | for part in inst.parts: |
| 306 | if isinstance(part, Uop): |
| 307 | # Skip specializing and replaced uops |
| 308 | if "specializing" in part.annotations: |
| 309 | continue |
| 310 | if "replaced" in part.annotations: |
| 311 | continue |
| 312 | if part.properties.tier == 1 or not part.is_viable(): |
| 313 | return False |
| 314 | return True |
| 315 | |
| 316 | |
| 317 | def generate_extra_cases(analysis: Analysis, out: CWriter) -> None: |
no test coverage detected
searching dependent graphs…