[llvm] ba22c40 - [Inliner][NPM] Properly pass callee AAResults
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 23 15:53:55 PDT 2020
Author: Arthur Eubanks
Date: 2020-10-23T15:37:18-07:00
New Revision: ba22c403b2b316d59902ba55e8774a7a34d2d056
URL: https://github.com/llvm/llvm-project/commit/ba22c403b2b316d59902ba55e8774a7a34d2d056
DIFF: https://github.com/llvm/llvm-project/commit/ba22c403b2b316d59902ba55e8774a7a34d2d056.diff
LOG: [Inliner][NPM] Properly pass callee AAResults
Fixes noalias-calls.ll under NPM.
Differential Revision: https://reviews.llvm.org/D89592
Added:
Modified:
llvm/lib/Transforms/IPO/Inliner.cpp
llvm/test/Transforms/Inline/noalias-calls.ll
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index 540042e5f069..890be9aa9a04 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/lib/Transforms/IPO/Inliner.cpp
@@ -854,7 +854,8 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC,
&FAM.getResult<BlockFrequencyAnalysis>(*(CB->getCaller())),
&FAM.getResult<BlockFrequencyAnalysis>(Callee));
- InlineResult IR = InlineFunction(*CB, IFI);
+ InlineResult IR =
+ InlineFunction(*CB, IFI, &FAM.getResult<AAManager>(*CB->getCaller()));
if (!IR.isSuccess()) {
Advice->recordUnsuccessfulInlining(IR);
continue;
diff --git a/llvm/test/Transforms/Inline/noalias-calls.ll b/llvm/test/Transforms/Inline/noalias-calls.ll
index 2800c4a8aabc..8faed4dc58ac 100644
--- a/llvm/test/Transforms/Inline/noalias-calls.ll
+++ b/llvm/test/Transforms/Inline/noalias-calls.ll
@@ -1,5 +1,6 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
; RUN: opt -basic-aa -inline -enable-noalias-to-md-conversion -S < %s | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes=inline -enable-noalias-to-md-conversion -S < %s | FileCheck %s
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
More information about the llvm-commits
mailing list