[llvm-commits] [llvm] r56549 - /llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp

Evan Cheng evan.cheng at apple.com
Tue Sep 23 23:48:55 PDT 2008


Author: evancheng
Date: Wed Sep 24 01:48:55 2008
New Revision: 56549

URL: http://llvm.org/viewvc/llvm-project?rev=56549&view=rev
Log:
Commit CodeGenPrepare.cpp changes which was accidentially left out of 56526.

Modified:
    llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=56549&r1=56548&r2=56549&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Wed Sep 24 01:48:55 2008
@@ -927,23 +927,6 @@
   return true;
 }
 
-/// hasInlineAsmMemConstraint - Return true if the inline asm instruction being
-/// processed uses a memory 'm' constraint.
-static bool
-hasInlineAsmMemConstraint(std::vector<InlineAsm::ConstraintInfo> &CInfos,
-                          const TargetLowering *TLI) {
-  for (unsigned i = 0, e = CInfos.size(); i != e; ++i) {
-    InlineAsm::ConstraintInfo &CI = CInfos[i];
-    for (unsigned j = 0, ee = CI.Codes.size(); j != ee; ++j) {
-      TargetLowering::ConstraintType CType = TLI->getConstraintType(CI.Codes[j]);
-      if (CType == TargetLowering::C_Memory)
-        return true;
-    }
-  }
-
-  return false;
-}
-
 /// OptimizeInlineAsmInst - If there are any memory operands, use
 /// OptimizeLoadStoreInt to sink their address computing into the block when
 /// possible / profitable.
@@ -980,8 +963,8 @@
     }
 
     // Compute the constraint code and ConstraintType to use.
-    bool hasMemory = hasInlineAsmMemConstraint(ConstraintInfos, TLI);
-    TLI->ComputeConstraintToUse(OpInfo, SDValue(), hasMemory);
+    TLI->ComputeConstraintToUse(OpInfo, SDValue(),
+                             OpInfo.ConstraintType == TargetLowering::C_Memory);
 
     if (OpInfo.ConstraintType == TargetLowering::C_Memory &&
         OpInfo.isIndirect) {





More information about the llvm-commits mailing list