diff options
| author | Dan Gohman <gohman@apple.com> | 2009-10-09 23:27:56 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-10-09 23:27:56 +0000 |
| commit | 87b02d5bbca0824fd590377fd3fba7c71e945186 (patch) | |
| tree | 1dbde5dfae498f0f03ebc3f5d842b821f2f2d04c /llvm/lib/CodeGen/DeadMachineInstructionElim.cpp | |
| parent | b385b7c62ea31004832c74ee0da92a71af774fd2 (diff) | |
| download | bcm5719-llvm-87b02d5bbca0824fd590377fd3fba7c71e945186.tar.gz bcm5719-llvm-87b02d5bbca0824fd590377fd3fba7c71e945186.zip | |
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.
llvm-svn: 83687
Diffstat (limited to 'llvm/lib/CodeGen/DeadMachineInstructionElim.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/DeadMachineInstructionElim.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp index e104d8cec0e..078ed3d31b1 100644 --- a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp +++ b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp @@ -53,7 +53,7 @@ FunctionPass *llvm::createDeadMachineInstructionElimPass() { bool DeadMachineInstructionElim::isDead(const MachineInstr *MI) const { // Don't delete instructions with side effects. bool SawStore = false; - if (!MI->isSafeToMove(TII, SawStore)) + if (!MI->isSafeToMove(TII, SawStore, 0)) return false; // Examine each operand. |

