Factor out LiveIntervalAnalysis' code to determine whether an instruction
authorDan Gohman <gohman@apple.com>
Fri, 9 Oct 2009 23:27:56 +0000 (23:27 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 9 Oct 2009 23:27:56 +0000 (23:27 +0000)
commita70dca156fa76d452f54829b5c5f962ddfd94ef2
tree31322fbef91a904807aea13e1bc2ab409c0042c6
parentac1ceb3dd33cb79ecb0dbd64b6abafa7ce067c5f
Factor out LiveIntervalAnalysis' code to determine whether an instruction
is trivially rematerializable and integrate it into
TargetInstrInfo::isTriviallyReMaterializable. This way, all places that
need to know whether an instruction is rematerializable will get the
same answer.

This enables the useful parts of the aggressive-remat option by
default -- using AliasAnalysis to determine whether a memory location
is invariant, and removes the questionable parts -- rematting operations
with virtual register inputs that may not be live everywhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83687 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
include/llvm/CodeGen/MachineInstr.h
include/llvm/Target/TargetInstrInfo.h
lib/CodeGen/DeadMachineInstructionElim.cpp
lib/CodeGen/LiveIntervalAnalysis.cpp
lib/CodeGen/MachineInstr.cpp
lib/CodeGen/MachineLICM.cpp
lib/CodeGen/MachineSink.cpp
lib/CodeGen/PostRASchedulerList.cpp
lib/CodeGen/ScheduleDAGInstrs.cpp
lib/CodeGen/ScheduleDAGInstrs.h
lib/CodeGen/SimpleRegisterCoalescing.cpp
lib/CodeGen/SimpleRegisterCoalescing.h
lib/CodeGen/TargetInstrInfoImpl.cpp
lib/CodeGen/TwoAddressInstructionPass.cpp