Add the CallInst optimizations that don't involve expanding inline assembly to

OptimizeInst() so that they can be used on a worklist instruction.

llvm-svn: 122945
This commit is contained in:
Cameron Zwarich 2011-01-06 02:56:42 +00:00
parent 314d16039a
commit 246056cbb7

View File

@ -1014,6 +1014,13 @@ bool CodeGenPrepare::OptimizeInst(Instruction *I) {
MadeChange = true;
OptimizeInst(NC);
}
} else if (CallInst *CI = dyn_cast<CallInst>(I)) {
if (TLI && isa<InlineAsm>(CI->getCalledValue())) {
// Sink address computing for memory operands into the block.
MadeChange |= OptimizeInlineAsmInst(I, &(*CI), SunkAddrs);
} else {
MadeChange |= OptimizeCallInst(CI);
}
}
return MadeChange;