search for: thatcan

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

Did you mean: tharan
2011 Aug 09
0
[LLVMdev] Adding a module in a pass
...s) 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 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). -- John T. > > MyPass() > :...
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
2
[LLVMdev] Adding a module in a pass
...>> 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 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() r...
2011 Aug 09
0
[LLVMdev] Adding a module in a pass
...ructors. >>> >>> 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 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...