search for: retval386

Displaying 20 results from an estimated 38 matches for "retval386".

2011 Oct 14
2
[LLVMdev] pass utilizing MemoryDependenceAnalysis?
...i = F.begin(); i != F.end(); ++i) { for(BasicBlock::iterator j = i->begin(); j != i->end(); ++j) { ;; } } return false; } }; char Hello::ID = 0; static RegisterPass<Hello> X("hello", "Hello World Pass"); On Thu, Oct 13, 2011 at 7:14 PM, ret val <retval386 at gmail.com> wrote: > My pass(that I want to use MemoryDependenceAnalysis) is a ModulePass. > When I changed my assignment to: >        MD = &getAnalysis<MemoryDependenceAnalysis>(F); > > It fixed my initial problem but left me with: >        Assertion failed: (Resul...
2011 Sep 28
0
[LLVMdev] ICmpInst example?
On Tue, Sep 27, 2011 at 7:28 PM, ret val <retval386 at gmail.com> wrote: > I'm trying to come up with a simple example of using ICmpInst in a > Pass. On each of the branches(true, false) I'd like to call a separate > function and then resume(to the code that was already there). > > In this example i is a inst_iterator to In...
2011 Oct 14
0
[LLVMdev] pass utilizing MemoryDependenceAnalysis?
...or j = i->begin(); j != i->end(); ++j) { > ;; > } > } > > return false; > } > }; > > char Hello::ID = 0; > static RegisterPass<Hello> X("hello", "Hello World Pass"); > > > On Thu, Oct 13, 2011 at 7:14 PM, ret val<retval386 at gmail.com> wrote: >> My pass(that I want to use MemoryDependenceAnalysis) is a ModulePass. >> When I changed my assignment to: >> MD =&getAnalysis<MemoryDependenceAnalysis>(F); >> >> It fixed my initial problem but left me with: >>...
2011 Oct 13
0
[LLVMdev] pass utilizing MemoryDependenceAnalysis?
...assignment to: MD = &getAnalysis<MemoryDependenceAnalysis>(F); It fixed my initial problem but left me with: Assertion failed: (ResultPass && "Unable to find requested analysis info"), function getAnalysisID On Thu, Oct 13, 2011 at 1:43 PM, ret val <retval386 at gmail.com> wrote: > I wrote a pass(that is to be loaded by opt) that I would like to use > in conjunction with MemoryDependenceAnalysis. I have tried using by > including its header and adding this to my pass: >        virtual void getAnalysisUsage(AnalysisUsage &AU) const { &...
2011 Sep 28
3
[LLVMdev] ICmpInst example?
I'm trying to come up with a simple example of using ICmpInst in a Pass. On each of the branches(true, false) I'd like to call a separate function and then resume(to the code that was already there). In this example i is a inst_iterator to Instruction the Pass is currently on. Now it segfaults opt before I can even get a dump() on it. Does anyone see what I am doing wrong? BasicBlock
2011 Oct 13
2
[LLVMdev] pass utilizing MemoryDependenceAnalysis?
I wrote a pass(that is to be loaded by opt) that I would like to use in conjunction with MemoryDependenceAnalysis. I have tried using by including its header and adding this to my pass:        virtual void getAnalysisUsage(AnalysisUsage &AU) const {         errs() << "addRequired called\n";         AU.addRequired<MemoryDependenceAnalysis>();        } And in my
2011 Oct 15
1
[LLVMdev] pass utilizing MemoryDependenceAnalysis?
...;                } >> >>                return false; >>        } >> }; >> >> char Hello::ID = 0; >> static RegisterPass<Hello>  X("hello", "Hello World Pass"); >> >> >> On Thu, Oct 13, 2011 at 7:14 PM, ret val<retval386 at gmail.com>  wrote: >>> >>> My pass(that I want to use MemoryDependenceAnalysis) is a ModulePass. >>> When I changed my assignment to: >>>        MD =&getAnalysis<MemoryDependenceAnalysis>(F); >>> >>> It fixed my initial problem b...
2011 Nov 09
1
[LLVMdev] loadable passes with dependencies?
...ddRequired" was correct to have in getAnalysisUsage, and the >>> "getAnalysis" goes e.g. in the top of runOnFunction/Module/Whatever. >>> Sorry >>> if I misunderstood what's going on. >>> >>> On Tue, Nov 8, 2011 at 12:50 PM, ret val<retval386 at gmail.com>  wrote: >>>> >>>> Just shows me what I expect >>>>        void getAnalysisUsage(AnalysisUsage&AU) const { >>>>                DominatorTree *dt =&getAnalysis<DominatorTree>(); >>>> >>>> So I'm...
2011 Oct 12
0
[LLVMdev] insert ICmpInst/BranchIns in Pass?
On Tue, Oct 11, 2011 at 7:22 PM, ret val <retval386 at gmail.com> wrote: > In a pass I would like to insert a ICmpInst/BranchInst pair to check > if 2 GlobalVariables are equal or not. If they are not I would like to > call a function. I've tried splitting the current block and then > inserting before the existing instructions, bu...
2011 Oct 12
2
[LLVMdev] insert ICmpInst/BranchIns in Pass?
In a pass I would like to insert a ICmpInst/BranchInst pair to check if 2 GlobalVariables are equal or not. If they are not I would like to call a function. I've tried splitting the current block and then inserting before the existing instructions, but for some reason this seems to ruin the iterator(i). What is the correct way todo something like this? void checkShadowPtr(Module &M,
2011 Nov 08
2
[LLVMdev] loadable passes with dependencies?
...s change happen? I think the > "AU.addRequired" was correct to have in getAnalysisUsage, and the > "getAnalysis" goes e.g. in the top of runOnFunction/Module/Whatever. Sorry > if I misunderstood what's going on. > > On Tue, Nov 8, 2011 at 12:50 PM, ret val <retval386 at gmail.com> wrote: >> >> 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 P...
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
...of confused, why did this change happen? I think the "AU.addRequired" was correct to have in getAnalysisUsage, and the "getAnalysis" goes e.g. in the top of runOnFunction/Module/Whatever. Sorry if I misunderstood what's going on. On Tue, Nov 8, 2011 at 12:50 PM, ret val <retval386 at gmail.com> wrote: > 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). > > T...
2011 Aug 29
0
[LLVMdev] insertions with inst_iterators?
On Mon, Aug 29, 2011 at 12:38 PM, ret val <retval386 at gmail.com> wrote: > I am looping through all instructions in a Function and depending on > what I found I may or may not insert code. Despite the fact that I'm > only actually inserting *before* instruction I have a infinite loop > when I do something like below. For awhile i...
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
...think the >> "AU.addRequired" was correct to have in getAnalysisUsage, and the >> "getAnalysis" goes e.g. in the top of runOnFunction/Module/Whatever. Sorry >> if I misunderstood what's going on. >> >> On Tue, Nov 8, 2011 at 12:50 PM, ret val<retval386 at gmail.com> wrote: >>> Just shows me what I expect >>> void getAnalysisUsage(AnalysisUsage&AU) const { >>> DominatorTree *dt =&getAnalysis<DominatorTree>(); >>> >>> So I'm only using it for DominatorTree(so...
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 Aug 29
4
[LLVMdev] insertions with inst_iterators?
I am looping through all instructions in a Function and depending on what I found I may or may not insert code. Despite the fact that I'm only actually inserting *before* instruction I have a infinite loop when I do something like below. For awhile it was simple enough to just increment i enough times but now I need something better. for(inst_iterator i = inst_begin(F); i != inst_end(F); ++i)
2011 Sep 04
1
[LLVMdev] correct types for ArgumentList?
I'm trying to create and insert a anonymous function that will make a assignment on a GlobalVariable, based on a existing StoreInst. Once I find this StoreInst(which provides me with 2 Value* objects for me to use) I need to pass it to my anonymous function so it can carry out the assignment. I can not get the correct types, at runtime I get a bad signature error. So basically the function is
2011 Sep 15
1
[LLVMdev] problems naming a function
I created a new Function in code(for a pass), and now I want to name it to make the IR more readable. Function inherits GlobalValue, which eventually inherits Value. Value has the setName() method. When I do this on my new function(newFunc->setName(string("testing"))) I get back "error: ‘setName’ was not declared in this scope". What is the correct way todo this? Thanks
2011 Sep 22
1
[LLVMdev] lli fine, compiled segfault?
I have a simple C test file I run a fairly simple Pass on. When I try to run the generated bitcode(after running the pass) with lli all is fine. When I try to compile this down to a actual elf executable I get a segfault. clang -emit-llvm -S test1.c -o test1.bc opt -load ~/llvm/Release+Asserts/lib/LLVMHello.so -hello < test1.bc > test1_pass.bc lli test1_pass.bc # All is fine llc
2011 Aug 29
2
[LLVMdev] insertions with inst_iterators?
...lsewhere). Unfortunately it doesnt look like theres is a good way to convert between the the iterator I and a CallInst *. Am I missing something? Thanks On Mon, Aug 29, 2011 at 3:59 PM, David Blaikie <dblaikie at gmail.com> wrote: > > > On Mon, Aug 29, 2011 at 12:38 PM, ret val <retval386 at gmail.com> wrote: >> >> I am looping through all instructions in a Function and depending on >> what I found I may or may not insert code. Despite the fact that I'm >> only actually inserting *before* instruction I have a infinite loop >> when I do something...