[llvm-commits] [llvm] r55074 - /llvm/trunk/lib/CodeGen/MachineLICM.cpp
Bill Wendling
isanbard at gmail.com
Wed Aug 20 13:32:06 PDT 2008
Author: void
Date: Wed Aug 20 15:32:05 2008
New Revision: 55074
URL: http://llvm.org/viewvc/llvm-project?rev=55074&view=rev
Log:
Don't hoist instructions that define a physical register.
Modified:
llvm/trunk/lib/CodeGen/MachineLICM.cpp
Modified: llvm/trunk/lib/CodeGen/MachineLICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineLICM.cpp?rev=55074&r1=55073&r2=55074&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineLICM.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineLICM.cpp Wed Aug 20 15:32:05 2008
@@ -273,7 +273,14 @@
for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) {
const MachineOperand &MO = I.getOperand(i);
- if (!MO.isRegister() || !MO.isUse())
+ if (!MO.isRegister())
+ continue;
+
+ if (MO.isDef() && TargetRegisterInfo::isPhysicalRegister(MO.getReg()))
+ // Don't hoist an instruction that defines a physical register.
+ return false;
+
+ if (!MO.isUse())
continue;
unsigned Reg = MO.getReg();
More information about the llvm-commits
mailing list