Skip to content
Snippets Groups Projects
Commit 25dd4a2d authored by Evan Cheng's avatar Evan Cheng
Browse files

Commit CodeGenPrepare.cpp changes which was accidentially left out of 56526.

llvm-svn: 56549
parent 1f58ec64
No related branches found
No related tags found
No related merge requests found
...@@ -927,23 +927,6 @@ bool CodeGenPrepare::OptimizeLoadStoreInst(Instruction *LdStInst, Value *Addr, ...@@ -927,23 +927,6 @@ bool CodeGenPrepare::OptimizeLoadStoreInst(Instruction *LdStInst, Value *Addr,
return true; 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 /// OptimizeInlineAsmInst - If there are any memory operands, use
/// OptimizeLoadStoreInt to sink their address computing into the block when /// OptimizeLoadStoreInt to sink their address computing into the block when
/// possible / profitable. /// possible / profitable.
...@@ -980,8 +963,8 @@ bool CodeGenPrepare::OptimizeInlineAsmInst(Instruction *I, CallSite CS, ...@@ -980,8 +963,8 @@ bool CodeGenPrepare::OptimizeInlineAsmInst(Instruction *I, CallSite CS,
} }
// Compute the constraint code and ConstraintType to use. // Compute the constraint code and ConstraintType to use.
bool hasMemory = hasInlineAsmMemConstraint(ConstraintInfos, TLI); TLI->ComputeConstraintToUse(OpInfo, SDValue(),
TLI->ComputeConstraintToUse(OpInfo, SDValue(), hasMemory); OpInfo.ConstraintType == TargetLowering::C_Memory);
if (OpInfo.ConstraintType == TargetLowering::C_Memory && if (OpInfo.ConstraintType == TargetLowering::C_Memory &&
OpInfo.isIndirect) { OpInfo.isIndirect) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment