diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2019-04-19 05:59:42 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2019-04-19 05:59:42 +0000 |
commit | ce3f75df1fffdb8bcef66ff82e83fa895e00260e (patch) | |
tree | c18d789929358501b909110e07e9a0df414b6717 /llvm/lib/Transforms/IPO/ArgumentPromotion.cpp | |
parent | 82216048e6bcdf2e37b356e45954ac8cdceaab50 (diff) | |
download | bcm5719-llvm-ce3f75df1fffdb8bcef66ff82e83fa895e00260e.tar.gz bcm5719-llvm-ce3f75df1fffdb8bcef66ff82e83fa895e00260e.zip |
[CallSite removal] Move the legacy PM, call graph, and some inliner
code to `CallBase`.
This patch focuses on the legacy PM, call graph, and some of inliner and legacy
passes interacting with those APIs from `CallSite` to the new `CallBase` class.
No interesting changes.
Differential Revision: https://reviews.llvm.org/D60412
llvm-svn: 358739
Diffstat (limited to 'llvm/lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/ArgumentPromotion.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp index dbbe03d1dac..5f994625f19 100644 --- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -1104,7 +1104,9 @@ bool ArgPromotion::runOnSCC(CallGraphSCC &SCC) { CallGraphNode *NewCalleeNode = CG.getOrInsertFunction(NewCS.getCalledFunction()); CallGraphNode *CallerNode = CG[Caller]; - CallerNode->replaceCallEdge(OldCS, NewCS, NewCalleeNode); + CallerNode->replaceCallEdge(*cast<CallBase>(OldCS.getInstruction()), + *cast<CallBase>(NewCS.getInstruction()), + NewCalleeNode); }; const TargetTransformInfo &TTI = |