Add a bit IsUndef to MachineOperand. This indicates the def / use register operand...
authorEvan Cheng <evan.cheng@apple.com>
Tue, 30 Jun 2009 08:49:04 +0000 (08:49 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 30 Jun 2009 08:49:04 +0000 (08:49 +0000)
commit4784f1fc73abf6005b7b7262d395af71b57b1255
tree6617b9c2d47d8608bdeaaca16bc7432570058c99
parent527b6e62926673eb66e03f1250904a74a77667ae
Add a bit IsUndef to MachineOperand. This indicates the def / use register operand is defined by an implicit_def. That means it can def / use any register and passes (e.g. register scavenger) can feel free to ignore them.

The register allocator, when it allocates a register to a virtual register defined by an implicit_def, can allocate any physical register without worrying about overlapping live ranges. It should mark all of operands of the said virtual register so later passes will do the right thing.

This is not the best solution. But it should be a lot less fragile to having the scavenger try to track what is defined by implicit_def.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74518 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineInstrBuilder.h
include/llvm/CodeGen/MachineOperand.h
include/llvm/CodeGen/RegisterScavenging.h
lib/CodeGen/LiveIntervalAnalysis.cpp
lib/CodeGen/MachineInstr.cpp
lib/CodeGen/RegAllocLinearScan.cpp
lib/CodeGen/RegisterScavenging.cpp
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodesEmit.cpp
lib/CodeGen/VirtRegRewriter.cpp
lib/Target/X86/X86InstrInfo.cpp
test/CodeGen/ARM/2009-06-30-RegScavengerAssert.ll [new file with mode: 0644]