diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-22 23:37:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-22 23:37:35 +0000 |
commit | fe9af3b1f7e5d68ecc330bdf4f047d76838f8cc3 (patch) | |
tree | d106def385fa1eec7fe9778021359c2f1987cf0b /include/llvm/Transforms/Utils/Cloning.h | |
parent | 3a1287b470bde29d10e7c6998fb69b74d2265b6c (diff) | |
download | external_llvm-fe9af3b1f7e5d68ecc330bdf4f047d76838f8cc3.zip external_llvm-fe9af3b1f7e5d68ecc330bdf4f047d76838f8cc3.tar.gz external_llvm-fe9af3b1f7e5d68ecc330bdf4f047d76838f8cc3.tar.bz2 |
The inliner was choosing to not consider call sites
that appear in the SCC as a result of inlining as candidates
for inlining. Change this so that it *does* consider call
sites that change from being indirect to being direct as a
result of inlining. This allows it to completely
"devirtualize" the testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102146 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/Utils/Cloning.h')
-rw-r--r-- | include/llvm/Transforms/Utils/Cloning.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/Transforms/Utils/Cloning.h b/include/llvm/Transforms/Utils/Cloning.h index 4b6025b..a9dc95b 100644 --- a/include/llvm/Transforms/Utils/Cloning.h +++ b/include/llvm/Transforms/Utils/Cloning.h @@ -174,10 +174,15 @@ public: /// StaticAllocas - InlineFunction fills this in with all static allocas that /// get copied into the caller. SmallVector<AllocaInst*, 4> StaticAllocas; - + + /// DevirtualizedCalls - InlineFunction fills this in with callsites that were + /// inlined from the callee that went from being indirect calls to direct + /// calls due to inlining. This is only filled in if CG is non-null. + SmallVector<Instruction*, 2> DevirtualizedCalls; void reset() { StaticAllocas.clear(); + DevirtualizedCalls.clear(); } }; |