Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIR's -run-pass together with -verify-machineinstrs has strange behavior with function properties #37787

Open
francisvm opened this issue Aug 3, 2018 · 0 comments
Labels
bugzilla Issues migrated from bugzilla llvm:codegen

Comments

@francisvm
Copy link
Collaborator

Bugzilla Link 38439
Version trunk
OS All
CC @francisvm,@MatzeB,@qcolombet

Extended Description

Assuming you have this test case:

body:
$rax = TARGET_PSEUDO

then the MIR parser will add NoPHIs, IsSSA and NoVRegs function properties.

If you run llc -run-pass expand-isel-pseudos -verify-machineinstrs, where expand-isel-pseudos will expand TARGET_PSEUDO by adding either PHIs or vregs, the machine verifier will complain about the function not respecting the NoPHIs and NoVRegs properties.

I am not sure what the correct behavior should be here, but we should be able to somehow force it in the MIR file so that we don't have to add actual PHI MIs to the test.

A few possibilities:

  • Properly implement getClearedProperties/getSetProperties/getRequiredProperties for all the passes. One issue here is that in the case of passes that call into backends, we don't know the hooks will insert, so we'll end up clearing most of the properties in many cases.
  • Set/reset the properties from every pass including all the backend hooks.
  • Add MIR keys that force the properties for the whole file.
@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla llvm:codegen
Projects
None yet
Development

No branches or pull requests

1 participant