Use the MachineFunctionProperty mechanism to indicate whether a MachineFunction
is in SSA form instead of a custom method on MachineRegisterInfo. NFC.
Details
Diff Detail
Event Timeline
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 | Can we keep the getter and setter, just update what they do? |
Put the MRI accessor back, and kept all of its uses.
(But kept the new MachineFunction::print() behavior)
include/llvm/CodeGen/MachineRegisterInfo.h | ||
---|---|---|
163 | 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 | Agree. |
Can we keep the getter and setter, just update what they do?