search for: registerpass

Displaying 20 results from an estimated 317 matches for "registerpass".

Did you mean: registerclass
2010 Nov 15
1
[LLVMdev] --enable-optimized breaks pass registration for dynamically loadable passes?
Hello all, Is it well known that building LLVM with --enable-optimized causes RegisterPass calls to be removed from dynamically loadable libraries (i.e., those built with LOADABLE_MODULE=1)? For example, here's what happens to the Hello pass (ToT on Darwin, both with and without --enable-optimized): $ pwd /Users/ransford/llvm/lib/Transforms/Hello $ nm -j Release+Asserts/Hello.o | c...
2010 Mar 01
1
[LLVMdev] RegisterPass isAnalysis parameter
...ot refer to anything in anonymous namespace by name from > another file, however, if you have a pointer, say, then you can > still use the > pointer. Yes, that would make sense, except I don't see any pointers being passed. The relevant line in lib/Transforms/Hello.cpp is: static RegisterPass<Hello> X("hello", "Hello World Pass"); This template declaration is, somehow, sufficient to give the PassManager access to Hello. Trevor
2010 Feb 26
3
[LLVMdev] RegisterPass isAnalysis parameter
Hi, I'm confused about the is_analysis parameter of the RegisterPass constructor (defined in PassSupport.h). The only explanation I can find is that is_analysis should be set to true if the pass is "an analysis pass, for example dominator tree pass". Can someone please clarify what is meant by "analysis pass"? Also -- and this is more of...
2014 Jun 01
3
[LLVMdev] PassRegistry thread safety and ManagedStatic interaction
...s PassRegistry intended to be thread-safe? The header file explicitly says that PassRegistry is not thread-safe, but there are mutexes and locking used in the code. This is actually creating a problem, because of a subtle bug involving static initialization order and shutdown. In particular, the RegisterPass<> static template will get invoked during static initialization and call PassRegistry::getPassRegistry()->registerPass(*this); Note that PassRegistry, however, is a ManagedStatic. So the call to getPassRegistry() creates the backing object of the ManagedStatic here. Then registerPass...
2010 Feb 26
0
[LLVMdev] RegisterPass isAnalysis parameter
On Thursday 25 February 2010 19:24:30 Trevor Harmon wrote: > Hi, > > I'm confused about the is_analysis parameter of the RegisterPass > constructor (defined in PassSupport.h). The only explanation I can > find is that is_analysis should be set to true if the pass is "an > analysis pass, for example dominator tree pass". Can someone please > clarify what is meant by "analysis pass"? I don't hav...
2009 May 23
0
[LLVMdev] why RegisterPass<TargetData> initialize itself twice in my system
HI, Developers: I linked libLTO.so in $LLVMROOT/Debug/lib however, my program crashes in assertion at 149line [Pass.cpp] void RegisterPass(const PassInfo &PI) { bool Inserted = PassInfoMap.insert(std::make_pair(PI.getTypeInfo(),&PI)).second; assert(Inserted && "Pass registered multiple times!"); } i confirm that there is only one static variable suspecting to call this register routine to...
2010 Feb 27
2
[LLVMdev] RegisterPass isAnalysis parameter
On Feb 25, 2010, at 5:45 PM, David A. Greene wrote: > The RegisterPass template takes care of notifying the PassManager > that the pass exists. One of the advantages of PassManager is > that it decouples pass execution from the rest of the infrastructure > so the class need not be visible to anything outside the > implementation > of the pass itself....
2008 Oct 27
3
[LLVMdev] Is it possible to use EE within optimization pass?
...rror. So, > > 1. Is it possible to use the EE within an optimization > pass? > > 2. If it is possible, how do I do it? > > > I have a hunch that I know what your problem is. > > You said that your pass is getting registered twice. Are > you sure that > your RegisterPass declaration is only being called once? A > common error > is to put the RegisterPass<MyPass> Foo variable > inside a header file > that gets included by multiple .cpp files implementing your > pass (I'm > assuming you've written a custom pass here). This will &g...
2010 Jul 21
0
[LLVMdev] API CHANGE: RegisterPass going away
Hey folks, As part of our ongoing quest to eliminate static constructors from the LLVM libraries (in order to improve startup times for applications that link against them), I'm going to be eliminating the RegisterPass class. They will be replaced with an initialization-function based system that I will detail in a future email. But, for now, what you need to know is that these classes are going away, and are being replaced with a new macro INITIALIZE_PASS(). I will be applying this change to LLVM HEAD shortly...
2008 Oct 27
0
[LLVMdev] Is it possible to use EE within optimization pass?
...load the EE. It gives error loading symbol error. So, > 1. Is it possible to use the EE within an optimization pass? > 2. If it is possible, how do I do it? > I have a hunch that I know what your problem is. You said that your pass is getting registered twice. Are you sure that your RegisterPass declaration is only being called once? A common error is to put the RegisterPass<MyPass> Foo variable inside a header file that gets included by multiple .cpp files implementing your pass (I'm assuming you've written a custom pass here). This will cause your pass to get register...
2014 Jun 02
2
[LLVMdev] PassRegistry thread safety and ManagedStatic interaction
I actually had an idea about how to fix this in a relatively painless manner. Although given my experience over the past 4 days, it might not be best to call it painless without first trying :) The idea is to make a StaticPassRegistry. RegisterPass<> only touches the StaticPassRegistry, and nothing else touches the StaticPassRegistry. So once you enter main(), StaticPassRegistry can be considered immutable. In main(), the existing PassRegistry initializes itself from the StaticPassRegistry. This *should* solve all the problems, the o...
2008 Oct 27
2
[LLVMdev] Is it possible to use EE within optimization pass?
Hi all, I am repeating my question from yesterday coz I need to find a solution to this ASAP. How do I link the executionengine to an optimization pass. If I use LINK_COMPONENTS=engine in the Makefile, I get the Pass registered multiple times error. And if i dont use anything, it is not able to load the EE. It gives error loading symbol error. So, 1. Is it possible to use the EE within an
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
2008 Oct 27
0
[LLVMdev] Is it possible to use EE within optimization pass?
...> >> pass? >> >>> 2. If it is possible, how do I do it? >>> >>> >> I have a hunch that I know what your problem is. >> >> You said that your pass is getting registered twice. Are >> you sure that >> your RegisterPass declaration is only being called once? A >> common error >> is to put the RegisterPass<MyPass> Foo variable >> inside a header file >> that gets included by multiple .cpp files implementing your >> pass (I'm >> assuming you've written a custom p...
2010 Feb 27
0
[LLVMdev] RegisterPass isAnalysis parameter
On Fri, Feb 26, 2010 at 05:22:49PM -0800, Trevor Harmon wrote: > On Feb 25, 2010, at 5:45 PM, David A. Greene wrote: > > > The RegisterPass template takes care of notifying the PassManager > > that the pass exists. One of the advantages of PassManager is > > that it decouples pass execution from the rest of the infrastructure > > so the class need not be visible to anything outside the > > implementation >...
2013 Oct 05
0
[LLVMdev] How to supply a non-default constructor to RegisterPass ?
...2013, at 10:11 PM, Dirk Schroetter <dschroetter at googlemail.com> wrote: > 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 ? Sorry for the non-answer, but AFAIK the pass registry can’t understand a non-default ctor. I personally don’t like non-default pass ctors anyway. You h...
2007 Jul 25
2
[LLVMdev] Writing a pass for the opt tool: likely documentation bug
...r is that the section starting 'As a while, the cpp file looks like:' omits the declaration for char Hello::ID = 0 that is given separately above. If you add this, opt still fails with the message: opt: /usr/local/rse/llvm/src/lib/VMCore/Pass.cpp:158: void <unnamed>::PassRegistrar::RegisterPass(llvm::PassInfo&): Assertion `Inserted && "Pass registered multiple times!"' failed. which appears to be triggered by the RegisterPass<Hello> X... line in the source (the error disappears if you comment that line out, though for obvious reasons the pass won't wor...
2014 Jun 02
2
[LLVMdev] PassRegistry thread safety and ManagedStatic interaction
...wrote: > > I actually had an idea about how to fix this in a relatively painless > > manner. Although given my experience over the past 4 days, it might not > be > > best to call it painless without first trying :) > > > > The idea is to make a StaticPassRegistry. RegisterPass<> only touches > the > > StaticPassRegistry, and nothing else touches the StaticPassRegistry. So > > once you enter main(), StaticPassRegistry can be considered immutable. > In > > main(), the existing PassRegistry initializes itself from the > > StaticPassRegi...
2018 Sep 24
3
Porting Pass to New PassManager
Hi all, I'm attempting to move the AddressSanitizer pass from the legacy PassManager to the new one because the new one has various benefits over legacy and wanted to clarify on something. Does creating the static RegisterPass struct register the pass with the new PassManager? It seems that RegisterPass does the same things that the INITIALIZE_PASS_* macros do but it registers the pass with PassRegistry::getPassRegistry(). What I'm not sure of is if this uses the new PassManager infrastructure. Exploring the code do...
2010 Mar 11
1
[LLVMdev] how to access loopInfo
...It's not generating any new information about the program (or if it is, it's > writing it to disk), so other passes wouldn't need it anyway. > So I know that I'm on the right way. I just think it's a bit of overhead implementing an own pass and register it using llvm::RegisterPass can the PassArg of RegisterPass clash with other passes? or can I just do static RegisterPass<MyPass> tmp("foo", "My Pass"); ? -Jochen