diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-10 22:35:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-10 22:35:15 +0000 |
commit | f3bd2cd37c306d501a7e79fcfbb309a5d10feba8 (patch) | |
tree | fb92ae40e1915c9f560f92c2c7a23bec07a9060b /llvm/lib/CodeGen/MachineSink.cpp | |
parent | 98f7203680c472e786681f2a4b2573f27ee5ceaa (diff) | |
download | bcm5719-llvm-f3bd2cd37c306d501a7e79fcfbb309a5d10feba8.tar.gz bcm5719-llvm-f3bd2cd37c306d501a7e79fcfbb309a5d10feba8.zip |
Clamp down on sinking of lots of instructions.
llvm-svn: 45841
Diffstat (limited to 'llvm/lib/CodeGen/MachineSink.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineSink.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp index c832f0a65c8..b83d844a162 100644 --- a/llvm/lib/CodeGen/MachineSink.cpp +++ b/llvm/lib/CodeGen/MachineSink.cpp @@ -130,6 +130,15 @@ bool MachineSinking::ProcessBlock(MachineBasicBlock &MBB) { /// SinkInstruction - Determine whether it is safe to sink the specified machine /// instruction out of its current block into a successor. bool MachineSinking::SinkInstruction(MachineInstr *MI) { + const TargetInstrDesc &TID = MI->getDesc(); + + // Ignore stuff that we obviously can't sink. + if (TID.mayStore() || TID.isCall() || TID.isReturn() || TID.isBranch()) + return false; + + if (TID.mayLoad()) + return false; + // Don't sink things with side-effects we don't understand. if (TII->hasUnmodelledSideEffects(MI)) return false; |