search for: getnumus

Displaying 9 results from an estimated 9 matches for "getnumus".

Did you mean: getnums
2017 Jan 20
2
Get Num of Uses in only dominated blocks?
Hi all, I am doing a project that requires counting the number of uses of a value only in all dominated blocks in a function. I checked the manual for llvm::User class, but only get this unsigned <http://llvm.org/test-doxygen/api/classunsigned.html> getNumUses <http://llvm.org/test-doxygen/api/classllvm_1_1Value.html#a380559e99b47632a34f74de7c1d03cc0> () const This gives me all the uses of a value. Is there any simple way, like an API to do this? Or I have to manually write a method to traverse dominated basic blocks and count the number of uses...
2013 Jan 10
2
[LLVMdev] LLVM Instruction*->getOperand() not working properly for ICMP
..."<<previous->getOperand(0)->getName()<<" | " <<previous->getOperand(0)->getValueName()<<" | " <<previous->getOperand(0)->getValueID()<<" | " <<previous->getOperand(0)->getNumUses()<<" TTTTT\n"; The results with getOperand(1) are similar. The output is: *PREVIOUS: store i32 %conv15, i32* %i, align 4 TTTTT conv15 | 0x9b69090 | 59 | 1 TTTTT ... *PREVIOUS: store i32 %inc13, i32* %i, align 4 TTTTT inc13 | 0x9b76478 | 30 | 1 TTTTT ... *PREVIOUS: %cmp11 =...
2018 Apr 20
0
Missed strlen optimizations
Maybe nicer.. auto i = Src->uses().begin(); std::advance(i, Src->getNumUses() - 1); i->getUser()->dump(); 2018-04-20 19:19 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>: > Use *last = nullptr; > for (Use &U : Src->uses()) > last = &U; > last->getUser()->dump(); > > > Or any better solution? > &...
2018 Apr 20
2
Missed strlen optimizations
Use *last = nullptr; for (Use &U : Src->uses()) last = &U; last->getUser()->dump(); Or any better solution? 2018-04-20 19:19 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>: > Is: > > > 2018-04-20 18:07 GMT+02:00 Dávid Bolvanský <david.bolvansky at gmail.com>: > >> Hello, >> >> Code: https://godbolt.org/g/EG4Wi6
2013 Jan 10
0
[LLVMdev] LLVM Instruction*->getOperand() not working properly for ICMP
...vious->getOperand(0)->getName()<<" | " > <<previous->getOperand(0)->getValueName()<<" | " > <<previous->getOperand(0)->getValueID()<<" | " > <<previous->getOperand(0)->getNumUses()<<" TTTTT\n"; > | > > The results with getOperand(1) are similar. The output is: > > |*PREVIOUS: store i32 %conv15, i32* %i, align 4 > TTTTT conv15 | 0x9b69090 | 59 | 1 TTTTT > ... > *PREVIOUS: store i32 %inc13, i32* %i, align 4 > TTTTT inc13 | 0x9b...
2006 Mar 03
1
[LLVMdev] printing constants
...nd_end;++operand){ Value *v=operand->get(); const Type *t=v->getType(); cerr<<endl<<" operand: "<<"[ "<<v->hasName()<<" ]"<<v->getName()<<" Type:"<<*t<< " it has: "<< v->getNumUses()<<"--uses"; } but by using this i am able to print the variables but not the constants .I am also able to print the type of the constant but not the constant value.i am getting a empty space for the constant.What should I do for getting the constant printed out? thanking you,...
2014 Aug 09
0
[LLVMdev] difference between replaceAllUsesWith and replaceUsesOfWith?
...the use list, which probably invalidated the use_iterator and caused my code to miss some of the uses. The following works great! (I'll spare you the details about what I am actually trying to do here, unless you really want to know more.) Thanks, Rob =========================== while(GV->getNumUses() > 0) { User* u = GV->use_back(); u->replaceUsesOfWith(GV, GEP); } assert(GV->use_empty()); =========================== -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140809/facdf50d/attac...
2014 Aug 09
3
[LLVMdev] difference between replaceAllUsesWith and replaceUsesOfWith?
On Sat, Aug 9, 2014 at 6:06 AM, Tim Northover <t.p.northover at gmail.com> wrote: > Hi Rob, > > On 9 August 2014 02:03, Rob Jansen <jansen at cs.umn.edu> wrote: > > Why is the first for loop not equivalent to the second? > > In the second loop, "*ui" is an llvm::Use object. It's owned by a > User, but isn't a subclass of one. To match the
2013 Jan 11
2
[LLVMdev] LLVM Instruction*->getOperand() not working properly for ICMP
...(0)->**getName()<<" | " >> <<previous->getOperand(0)->**getValueName()<<" | " >> <<previous->getOperand(0)->**getValueID()<<" | " >> <<previous->getOperand(0)->**getNumUses()<<" TTTTT\n"; >> | >> >> The results with getOperand(1) are similar. The output is: >> >> |*PREVIOUS: store i32 %conv15, i32* %i, align 4 >> TTTTT conv15 | 0x9b69090 | 59 | 1 TTTTT >> ... >> *PREVIOUS: store i32 %inc13, i32* %i,...