[llvm-bugs] [Bug 37342] New: New Pass Manager loop passes can't get cached OptimizationRemarkEmitter when invalidated by earlier loop pass

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 4 11:42:34 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37342

            Bug ID: 37342
           Summary: New Pass Manager loop passes can't get cached
                    OptimizationRemarkEmitter when invalidated by earlier
                    loop pass
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: tejohnson at google.com
                CC: llvm-bugs at lists.llvm.org

I hit the following error when trying to use pass remarks with hotness:

LLVM ERROR: LICM: OptimizationRemarkEmitterAnalysis not cached at a higher
level

from LICMPass, which is trying to get it as cached analysis.

There was a fix done in r292058 to try to keep this analysis valid, however,
that doesn't work if a prior loop pass invalidated it. In my case, it was being
invalidated by LoopSimplifyPass.

I reproduced this by running a loop simplification test with new options:

opt test/Transforms/LoopSimplify/basictest.ll -disable-output
-aa-pipeline=basic-aa 2>&1     
-passes='require<opt-remark-emit>,invalidate<block-freq>,require<opt-remark-emit>,loop(licm)'
-debug-pass-manager      -pass-remarks=licm -pass-remarks-with-hotness

(i.e. the same options being run in the test added for r292058). The tail end
of the output is:

...
Invalidating analysis: OptimizationRemarkEmitterAnalysis on test
Running pass: RequireAnalysisPass<llvm::OptimizationRemarkEmitterAnalysis,
llvm::Function, llvm::AnalysisManager<llvm::Function>> on test
Running analysis: OptimizationRemarkEmitterAnalysis on test
Running analysis: BlockFrequencyAnalysis on test
Running pass: FunctionToLoopPassAdaptor<llvm::PassManager<llvm::Loop,
LoopAnalysisManager, llvm::LoopStandardAnalysisResults &, llvm::LPMUpdater &> >
on test
Starting llvm::Function pass manager run.
Running pass: LoopSimplifyPass on test
Running analysis: AssumptionAnalysis on test
Invalidating all non-preserved analyses for: test
Invalidating analysis: BranchProbabilityAnalysis on test
Invalidating analysis: BlockFrequencyAnalysis on test
Invalidating analysis: OptimizationRemarkEmitterAnalysis on test
Running pass: LCSSAPass on test
Finished llvm::Function pass manager run.
Running analysis: AAManager on test
Running analysis: BasicAA on test
Running analysis: ScalarEvolutionAnalysis on test
Running analysis: TargetIRAnalysis on test
Running analysis: InnerAnalysisManagerProxy<LoopAnalysisManager,
llvm::Function> on test
Starting Loop pass manager run.
Running pass: LICMPass on Loop at depth 1 containing: %bb3<header><latch>
Running analysis: OuterAnalysisManagerProxy<FunctionAnalysisManager,
llvm::Loop, llvm::LoopStandardAnalysisResults &> on bb3
LLVM ERROR: LICM: OptimizationRemarkEmitterAnalysis not cached at a higher
level


Not sure how this is supposed to work or should be fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180504/32087106/attachment-0001.html>


More information about the llvm-bugs mailing list