Displaying 20 results from an estimated 3000 matches similar to: "Guidelines for pass initialization?"
2015 Aug 21
2
Guidelines for pass initialization?
Let me rephrase to make sure I understand. Once we have this settled,
I'll update the comments in the file to summarize and possibly update
the docs.
On 08/21/2015 10:27 AM, Owen Anderson wrote:
> The macro versions should be preferred, as they reduce static initializaters.
Makes sense. But the tradeoff is that they need to be baked into the
list of known passes so that someone knows
2012 Oct 30
1
[LLVMdev] Error when trying to chain two llvm transform passes
On Oct 30, 2012, at 3:15 PM, Krzysztof Parzyszek <kparzysz at codeaurora.org> wrote:
> On 10/30/2012 4:10 PM, Ashwin kumar wrote:
>>
>> Assertion failed: (PI && "Expected required passes to be initialized"),
>> function schedulePass, file PassManager.cpp, line 597.
>>
>>
>> I register the passes using RegisterPass function call.
2011 Nov 08
2
[LLVMdev] loadable passes with dependencies?
I'm writing a Pass that I would like to remain loadable by opt. The
pass also requires DominatorTree(for PromoteMemToReg).
Looking for examples the only way I found to require a dependecny is
by doing something like this:
char Hello::ID = 0;
namespace llvm { void initializeHelloPass(llvm::PassRegistry&); }
INITIALIZE_PASS_BEGIN(Hello, "hello", "Hello
2011 May 03
4
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
When migrating my project to 2.9, I've encountered a strange segfault
where if a ModulePass's getAnalysisUsage adds LoopInfo and
DominatorTree, then llvm::PMTopLevelManager::findAnalysisUsage will
segfault. What's odd is that if I rearrange this (add required for
DominatorTree before LoopInfo), it does not segfault. I realize that
LoopInfo requires and preserves DominatorTree, but this
2011 Nov 08
4
[LLVMdev] loadable passes with dependencies?
Just shows me what I expect
void getAnalysisUsage(AnalysisUsage &AU) const {
DominatorTree *dt = &getAnalysis<DominatorTree>();
So I'm only using it for DominatorTree(so I can use PromoteMemToReg).
Thanks
On Tue, Nov 8, 2011 at 2:28 PM, Tobias Grosser <tobias at grosser.es> wrote:
> On 11/08/2011 07:33 PM, ret val wrote:
>>
>> Sorry to keep dragging
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
On 11/08/2011 03:20 AM, ret val wrote:
> I'm writing a Pass that I would like to remain loadable by opt. The
> pass also requires DominatorTree(for PromoteMemToReg).
>
> Looking for examples the only way I found to require a dependecny is
> by doing something like this:
> char Hello::ID = 0;
> namespace llvm { void
2011 May 04
1
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
Your constructor is not calling initializeTestMPPass(), and you're
using RegisterPass which I think was deprecated in favor of
INITIALIZE_PASS. You can look at, for example,
lib/Transforms/Scalar/IndVarSimplify.cpp for examples of how to
initialize, e.g. having "INITIALIZE_PASS_DEPENDENCY(LoopInfo)"
sandwiched between BEGIN and END. Note that you'll want a forward
declaration of
2011 May 04
2
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
Thanks for the response. I do have assertions enabled, and none of
them are getting hit. I did do a search of the mailing list for the
past year (approximately) before writing my email, and what I found
was that you should be allowed to use LoopInfo and other analysis
function passes from a module pass, with the only difference being
that getAnalysis is passed the function. The example code I
2015 May 20
3
[LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
So I got very mixed results.
With the CallGraphSCCPass, both `addRequired<DominatorTreeWrapperPass>` and `addRequired<MemoryDependenceAnalysis>` fail at runtime. The LLVM core has just two CallGraphSCCPasses and neither uses neither analyses, so it's hard to find a valid example.
I transformed the pass into a ModulePass, using scc_iterator as shown in CGPassManager to process
2017 Oct 03
2
About LLVM Pass dependency
Hello
I am working on pass which has dependency on multiple passes. Say
D1,D2,D3
I used
INITIALIZE_PASS_BEGIN
INITIALIZE_PASS_DEPENDENCY(D1)
INITIALIZE_PASS_DEPENDENCY(D2)
INITIALIZE_PASS_DEPENDENCY(D3)
INITIALIZE_PASS_END.
While running it through opt tool it, I had to specify this D1,D2,D3 pass
names
to get this pass executed before my pass.
Is there way, to let llvm pass manager to know
2011 May 04
0
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
Hi Michael, hi Duncan,
yesterday I stumbled over something that might be related.
At least I could also just be doing some initialization wrong or
something in this direction...
In my case, I hit a segfault in PassInfo::isAnalysisGroup() after
PassManager.add(myModulePass) is called.
My setup seems fairly simple, the attached code should reproduce the error.
Compile with
g++ test.cpp
2015 Sep 28
2
Registering a MachineFunctionPass
I had INITIALIZE_PASS_BEGIN and INITIALIZE_PASS_END macros. I replaced them with INITIALIZE_PASS but I get the same error. If I understand correctly, I need to modify Passes.h, InitializePasses.h, and Codegen.cpp files to register my pass, right? Another question is: Is it necessary to have the createNoopInserterPass function?
Erdem
-------------- next part --------------
An HTML
2011 Jan 18
1
[LLVMdev] adding a codegen pass into llvm
Thanks for your last reply.
Could I understand the way to adding a pass (built into the llvm rather than
dynamic loadable) includes:
1. Declaring a creator function for this pass
2. Implementing the creator function for this pass
3. Instantiating this pass and get a object of it
3. Register this pass into the PassRegistry
Then, for a built-into bytecode pass,
task 1(declaration of the
2011 Nov 08
2
[LLVMdev] loadable passes with dependencies?
Sorry to keep dragging this out on you. Im now getting: Assertion
failed: (ResultPass && "getAnalysis*() called on an analysis that was
not " "'required' by pass!"), function getAnalysisID
But I already have:
void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<DominatorTree>();
}
And changed the bottom of my pass too:
char Hello::ID =
2011 Aug 22
1
[LLVMdev] Infinite loop when adding a new analysis pass
I am trying to add an analysis pass as a FunctionPass, and let LICM
(LoopPass) depends upon it. So in LICM.cpp, I have the following:
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
AU.addRequired<DominatorTree>();
AU.addRequired<LoopInfo>();
AU.addRequiredID(LoopSimplifyID);
AU.addRequired<AliasAnalysis>();
2013 Oct 01
2
[LLVMdev] How to supply a non-default constructor to RegisterPass ?
Folks,
I did read the documentation but I am at a loss still.
I do have the following:
Pass *createFooPass (char *foo1) {
return new FooPass (foo1);
}
static RegisterPass<FooPass> X("foo-pass", "foo", false, true);
Where exactly do I supply the non-default crore in this example ?
Thanks
/Dirk
2018 Apr 12
2
Error: Verify if there is a pass dependency cycle
Hi everyone,
I write a new FunctionPass which wants to use pass PostDominatorTree, so I
implement the next function:
void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<PostDominatorTree>();
AU.setPreservesAll();
}
Then I get PDT through the next statement:
PostDominatorTree *PDT = &getAnalysis<PostDominatorTree>();
My code can be successfully
2017 Oct 03
1
About LLVM Pass dependency
Hi Hongbin
I am not quite familiar with AnalysisUsage, let me correct question a bit.
I have read Writing Pass
<http://llvm.org/docs/WritingAnLLVMPass.html#specifying-interactions-between-passes>,
All examples that i see here are based on collecting information .i.e
Analysis Passes.
I wonder if this applies to Transformation passes also.
e.g.
void MyInliner::getAnalysisUsage(AnalysisUsage
2011 Nov 08
2
[LLVMdev] loadable passes with dependencies?
I still have the addRequired:
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<DominatorTree>();
}
The other line
DominatorTree *dt = &getAnalysis<DominatorTree>();
Is for later use when I try to use PromoteMemToReg
On Tue, Nov 8, 2011 at 4:22 PM, Michael Ilseman <michael at lunarg.com> wrote:
> Something's
2011 Dec 14
2
[LLVMdev] Adding dependency on MemoryDependenceAnalysis pass to LICM causes opt to get stuck in addPass
I'm attempting to add some support for hoisting/sinking of memory-using
intrinsics in loops, and so I want to use MemoryDependenceAnalysis in
LICM, but when I modify getAnalysisUsge to include this :
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
AU.addRequired<DominatorTree>();
AU.addRequired<LoopInfo>();