Change of approach, it looks like it's much better idea to deal with the
vregs that have LLTs and reg classes both properly, than trying to
avoid creating those across all GlobalISel passes and all targets.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/CodeGen/MachineCSE.cpp | ||
---|---|---|
258 | MachineRegisterInfo::isConstantPhysReg expects the reserved registers to be frozen. | |
lib/CodeGen/MachineRegisterInfo.cpp | ||
93 | Apparently, for now this is only used by MachineCSE. |
MachineRegisterInfo::isConstantPhysReg expects the reserved registers to be frozen.
The problem doesn't trigger post-ISel as most (if not all) targets freeze reserved registers
right after ISel. Here I have inlined by hand the MachineRegisterInfo:: isCallerPreservedOrConstPhysReg
and protected half of the condition. There is no test covering this as the only way to insert
a new pass (MachineCSE) from a command line I know of is llcs -run-pass option, which only
works with MIR, but MIRParser freezes reserved registers upon MachineFunctions creation,
making it impossible to reproduce the state that exposes the issue.