Skip to content

Assertion when Module Pass requires Function Pass #2330

@llvmbot

Description

@llvmbot
Bugzilla Link 1958
Resolution WONTFIX
Resolved on Apr 17, 2019 16:52
Version unspecified
OS Linux
Attachments Simple module pass requiring LoopInfo
Reporter LLVM Bugzilla Contributor

Extended Description

The attached pass generates the following assertion:

opt -disable-output -disable-verify -debug-pass=Details -load ./llvm/Debug/lib/TEST.so -TEST test.bc

Pass Arguments: -TEST
Target Data Layout
ModulePass Manager
A TEST PASS
Unnamed pass: implement Pass::getPassName()
-- A TEST PASS
0x86d00e0 Executing Pass 'A TEST PASS' on Module '/home/koy/research/test/testcases/relationships2.bc'...
0x86cd940 Required Analyses: Natural Loop Construction
Pass Arguments: -domtree -loops
FunctionPass Manager
Dominator Tree Construction
Natural Loop Construction

opt: {snip}/llvm/include/llvm/PassAnalysisSupport.h:226: AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*, llvm::Function&) [with AnalysisType = llvm::LoopInfo]: Assertion `ResultPass && "getAnalysis*() called on an analysis that was not " "'required' by pass!"' failed.

The documentation (http://llvm.org/docs/WritingAnLLVMPass.html#ModulePass) says that this should be possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillawontfixIssue is real, but we can't or won't fix it. Not invalid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions