[llvm] r363287 - [clang][NewPM] Fix broken -O0 test from missing assumptions
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 14 21:19:35 PDT 2019
This made two regression tests in Polly crash:
Debug\bin\opt.exe -polly-process-unprofitable -polly-remarks-minimal
-polly-use-llvm-names
-polly-import-jscop-dir=C:\Users\meinersbur\src\llvm\tools\polly\test\ScopInliner
-polly-codegen-verify -polly-detect-full-functions
-polly-scop-inliner -polly-scops -analyze
-polly-invariant-load-hoisting
Assertion failed: AnalysisPasses.count(PassT::ID()) && "This analysis
pass was not registered prior to being queried", file
C:\Users\meinersbur\src\llvm\include\llvm/IR/PassManager.h, line 778
with PassT being FunctionAnalysisManagerModuleProxy. Where is this
pass supposed to be registered?
Michael
Am Do., 13. Juni 2019 um 13:15 Uhr schrieb Leonard Chan via
llvm-commits <llvm-commits at lists.llvm.org>:
>
> Author: leonardchan
> Date: Thu Jun 13 11:18:40 2019
> New Revision: 363287
>
> URL: http://llvm.org/viewvc/llvm-project?rev=363287&view=rev
> Log:
> [clang][NewPM] Fix broken -O0 test from missing assumptions
>
> Add an AssumptionCache callback to the InlineFuntionInfo used for the
> AlwaysInlinerPass to match codegen of the AlwaysInlinerLegacyPass to generate
> llvm.assume. This fixes CodeGen/builtin-movdir.c when new PM is enabled by
> default.
>
> Differential Revision: https://reviews.llvm.org/D63170
>
> Modified:
> llvm/trunk/lib/Transforms/IPO/AlwaysInliner.cpp
>
> Modified: llvm/trunk/lib/Transforms/IPO/AlwaysInliner.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/AlwaysInliner.cpp?rev=363287&r1=363286&r2=363287&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/IPO/AlwaysInliner.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/AlwaysInliner.cpp Thu Jun 13 11:18:40 2019
> @@ -31,8 +31,17 @@ using namespace llvm;
>
> #define DEBUG_TYPE "inline"
>
> -PreservedAnalyses AlwaysInlinerPass::run(Module &M, ModuleAnalysisManager &) {
> - InlineFunctionInfo IFI;
> +PreservedAnalyses AlwaysInlinerPass::run(Module &M,
> + ModuleAnalysisManager &MAM) {
> + // Add inline assumptions during code generation.
> + FunctionAnalysisManager &FAM =
> + MAM.getResult<FunctionAnalysisManagerModuleProxy>(M).getManager();
> + std::function<AssumptionCache &(Function &)> GetAssumptionCache =
> + [&](Function &F) -> AssumptionCache & {
> + return FAM.getResult<AssumptionAnalysis>(F);
> + };
> + InlineFunctionInfo IFI(/*cg=*/nullptr, &GetAssumptionCache);
> +
> SmallSetVector<CallSite, 16> Calls;
> bool Changed = false;
> SmallVector<Function *, 16> InlinedFunctions;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list