[llvm-commits] [llvm] r134226 - /llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Jun 30 18:24:25 PDT 2011


Author: stoklund
Date: Thu Jun 30 20:24:25 2011
New Revision: 134226

URL: http://llvm.org/viewvc/llvm-project?rev=134226&view=rev
Log:
Don't inflate register classes used by inline asm.

The constraints are represented by the register class of the original
virtual register created for the inline asm. If the register class were
included in the operand descriptor, we might be able to do this.

For now, just give up on regclass inflation when inline asm is involved.

No test case, this bug hasn't happened yet.

Modified:
    llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp

Modified: llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp?rev=134226&r1=134225&r2=134226&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp (original)
+++ llvm/trunk/lib/CodeGen/CalcSpillWeights.cpp Thu Jun 30 20:24:25 2011
@@ -203,6 +203,9 @@
     // TRI doesn't have accurate enough information to model this yet.
     if (I.getOperand().getSubReg())
       return;
+    // Inline asm instuctions don't remember their constraints.
+    if (I->isInlineAsm())
+      return;
     const TargetRegisterClass *OpRC =
       TII->getRegClass(I->getDesc(), I.getOperandNo(), TRI);
     if (OpRC)





More information about the llvm-commits mailing list