search for: dointial

Displaying 4 results from an estimated 4 matches for "dointial".

Did you mean: intial
2011 Aug 09
2
[LLVMdev] Adding a module in a pass
...n implement thatcan operate on > the whole module. They are designed for exactly the situation you > describe: your pass does some sort of local transform, but there's some > global modifications it needs to do (add global constructors, add > function prototypes, etc). Doesn't doIntialization() run once for each translation unit (module)? I only want to generate my global constructors once for the whole program. They are generated from a scripting language, which is parsed in the optimization pass.
2011 Aug 09
0
[LLVMdev] Adding a module in a pass
On 8/9/11 6:49 AM, Bjorn Reese wrote: > I have an optimization pass (FunctionPass) where I need to add global > constructors. > > For cleaness sake I decided to add these in my own module. My module > is created in my FunctionPass constructor: This is not how I would do it. A FunctionPass has doInitialization() and doFinalization() methods that you can implement thatcan operate
2011 Aug 09
3
[LLVMdev] Adding a module in a pass
I have an optimization pass (FunctionPass) where I need to add global constructors. For cleaness sake I decided to add these in my own module. My module is created in my FunctionPass constructor: MyPass() : FunctionPass(ID), myModule("my_module", getGlobalContext()) {} I generate an llvm.global_ctor global variable in my module, and I add my global constructors
2011 Aug 09
0
[LLVMdev] Adding a module in a pass
...operate on >> the whole module. They are designed for exactly the situation you >> describe: your pass does some sort of local transform, but there's some >> global modifications it needs to do (add global constructors, add >> function prototypes, etc). > Doesn't doIntialization() run once for each translation unit (module)? It is run once per LLVM module. An LLVM module can either be a single translation unit or multiple translation units linked together (i.e., LLVM can link multiple LLVM modules together into one large module). > > I only want to genera...