diff options
author | Cameron Zwarich <zwarich@apple.com> | 2011-01-06 02:56:42 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2011-01-06 02:56:42 +0000 |
commit | 6cf34abe1c99e79565c75cd3e62755239463e574 (patch) | |
tree | 13a7415c920ad36abca30d6b9f077abc5fccb800 /lib/Transforms/Scalar/CodeGenPrepare.cpp | |
parent | 865ae1a9e77920e07c4a6a992736109c2cd4fe02 (diff) |
Add the CallInst optimizations that don't involve expanding inline assembly to
OptimizeInst() so that they can be used on a worklist instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122945 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/CodeGenPrepare.cpp')
-rw-r--r-- | lib/Transforms/Scalar/CodeGenPrepare.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index 166d9d6ee3..e3e634339e 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -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; |