summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-09-24 06:48:55 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-09-24 06:48:55 +0000
commita7e6146688f4b1f0f0651af4df4994e78d438377 (patch)
tree6630ddba88d0d3f83fe71cb6dc2350fd985e9c07 /lib/Transforms
parent692bf6b85e0eaed549cd47d67289ab7b28e32651 (diff)
downloadllvm-a7e6146688f4b1f0f0651af4df4994e78d438377.tar.gz
llvm-a7e6146688f4b1f0f0651af4df4994e78d438377.tar.bz2
llvm-a7e6146688f4b1f0f0651af4df4994e78d438377.tar.xz
Commit CodeGenPrepare.cpp changes which was accidentially left out of 56526.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56549 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/CodeGenPrepare.cpp21
1 files changed, 2 insertions, 19 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp
index 3f2faf30fa..a04ccfea36 100644
--- a/lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp
@@ -927,23 +927,6 @@ bool CodeGenPrepare::OptimizeLoadStoreInst(Instruction *LdStInst, Value *Addr,
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 @@ bool CodeGenPrepare::OptimizeInlineAsmInst(Instruction *I, CallSite CS,
}
// 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) {