Use the MachineFunctionProperty mechanism to indicate whether a MachineFunction
is in SSA form instead of a custom method on MachineRegisterInfo. NFC.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
The syntax for MachineFunctionProperties is fairly verbose. I'm wondering if we want to do one or more of the following:
- Shorten the name of MachineFunctionProperties and/or MachineFunctionProperties::Property
- Rename MachineFunctionProperties::hasProperty (maybe test to match BitVector, or perhaps operator[])
- Rename MachineFunction::getProperties or perhaps replace it with a hasProperty or testProperty method on MachineFunction directly
- Make MachineFunctionProperties::Property a C-style enum rather than a scoped enum
I would say maybe 1 and 2, but I don't have a great idea for what names I'd use for 1.
include/llvm/CodeGen/MachineRegisterInfo.h | ||
---|---|---|
163 ↗ | (On Diff #51976) | Can we keep the getter and setter, just update what they do? |
Comment Actions
Put the MRI accessor back, and kept all of its uses.
(But kept the new MachineFunction::print() behavior)
include/llvm/CodeGen/MachineRegisterInfo.h | ||
---|---|---|
163 ↗ | (On Diff #51976) | We can; that would obviously make this change smaller, and be easier on out-of-tree targets. Longer term if/when we get more properties we might still want to make them nicer to use. But I'm fine with keeping this accessor; the compiled code would pretty much be identical anyway. |
include/llvm/CodeGen/MachineRegisterInfo.h | ||
---|---|---|
163 ↗ | (On Diff #52580) | Agree. |