similar to: Get Num of Uses in only dominated blocks?

Displaying 20 results from an estimated 800 matches similar to: "Get Num of Uses in only dominated blocks?"

2012 Jan 27
3
[LLVMdev] How to get the string value?
Thanks Duncan, Yes, it is a ConstantExpr! Thank you! Now trying to find a clue in ConstantExpr's functions to get that string :-) Regards, Welson On Thu, Jan 26, 2012 at 9:04 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi Welson Sun, > > > Hi, if I have some LLVM code like this: > > > > @.str = private unnamed_addr constant [7 x i8]
2016 Dec 28
1
Help for DeadStoreElimination cross-block dependence
Hi all, I am working on a project that requires LLVM DeadStoreElimination However, when I look through the code in Transforms/Scalar/DeadStoreElimination.cpp, I see the following: // Ignore any store where we can't find a local dependence. // FIXME: cross-block DSE would be fun. :) if (!InstDep.isDef() && !InstDep.isClobber()) continue; I have two questions on this
2004 Jul 13
2
memory problem?
Hi everyone, I'm running R1.9.1 on RedHat Linux. I'm trying to read in a matrix file with 13956 by 858 dimensions. I realize this is pretty huge, though I think the amount of memory I have should be able to handle it. R reads the entire file and tells me "Read in 11974247 values". This is exactly one less value than what it should have read in (11974248 = 13956*856).
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
2017 Aug 07
2
vrp
I am primarily interested in phi nodes and their induction variables, in ValueTracking file there is an analysis of them, but if the upper bound is inf, it is not working? 2017-08-07 11:41 GMT+02:00 Anastasiya Ruzhanskaya < anastasiya.ruzhanskaya at frtk.ru>: > So, it is not supported to determine by this instruction : %cmp = icmp slt > i32 %i.03, 99, > that %i.03 = phi i32 [ 0,
2013 Jan 10
2
[LLVMdev] LLVM Instruction*->getOperand() not working properly for ICMP
Hello everyone ! In my pass I inspect the penultimate instruction from every basic block in runOnFunction(). I am interested in ICMP instructions only. if(BB->size()>1) if(last->getPrevNode()) { previous = last->getPrevNode(); ok=1; } I want to get the operands of previous, which is of type Instruction*. Due tests based on getNumOperands, ICMP has 2 (as
2015 Nov 26
4
Creating/Deleting a new instruction from LLVM IR
Hi, I was trying to create a new *Store* instruction and inserting it to LLVM IR (.ll) file. I found the following constructor in LLVM Manual: StoreInst::StoreInst <http://llvm.org/docs/doxygen/html/classllvm_1_1StoreInst.html#aa2a72f9a51b317f5b4ab8695adf59025> (Value <http://llvm.org/docs/doxygen/html/classllvm_1_1Value.html> * Val, Value
2016 Feb 04
3
result of load Instruction
Hi all, How can i find the instruction that uses the result of a load instruction. For example: %16 = load i32, i32* %ptr %add = add i32 4, %16 In this case, i would like to get the add instruction. Best, Mo -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160204/bdef6f63/attachment.html>
2009 Dec 04
2
[LLVMdev] "SrcValue is not a pointer?" assertion in SelectionDAG::getSrcValue
hi, i am building selectionDAG by my own code, but got a assertion fail said "SrcValue is not a pointer?". but since the comment above the SrcValueSDNode said: "SrcValueSDNode - An SDNode that holds an arbitrary LLVM IR Value." why the llvm value of SrcValueSDNode must be with PointerType? is that assertion necessary? thanks a lots. regards --ether
2017 Jun 05
2
Question about llvm::Value::print performance
Hi, I want to use llvm::Value::print to output the assembly strings for llvm::Instructions inside a rather large llvm::Module (linked module with lots of types/...). I started with plain ::print and switched over to http://llvm.org/docs/doxygen/html/classllvm_1_1Value.html#a04e6fc765eeb0c4c90ac5d55113db116 with a ModuleSlotTracker I pass in myself to avoid some complexity. Still now I have
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-04-20 19:19
2009 Jan 22
3
[LLVMdev] replacing instructions
Hello everyone, is there any way to replace an instruction inside LLVM that is more elegant than creating a new one, replacing uses and deleting the old one if I only want to modify the type? It is generally not a big deal, but the issue gets really messy if I am in the middle of iterating over uses and start deleting some of them... I hope I could describe my problem well enough ;) Regards,
2017 Jul 20
3
Value
Thank you! I wanted to use the right part of the instruction , %a = alloca i32, align 4 - %a here , but I don't quite understand the difference between Instruction object and Value object of a, which is used further , and in this case : %1 = alloca i32, align 4 - I also wanted to use %1 and in this case the only possibility is Instruction object. 2017-07-20 15:32 GMT+02:00 Evgeny Astigeevich
2009 Dec 04
0
[LLVMdev] "SrcValue is not a pointer?" assertion in SelectionDAG::getSrcValue
Hello Ether, I think it is referring to the Value class (captial V) whose documentation is found at http://llvm.org/doxygen/classllvm_1_1Value.html . It has to be a pointer because the Value class is a parent class to many many child classes. --Sam ----- Original Message ---- > From: ether zhhb <etherzhhb at gmail.com> > To: LLVM Developers Mailing List <llvmdev at
2017 Jun 05
2
Question about llvm::Value::print performance
Dear Thomas, > Hi Christoph, > > maybe there is a way of caching the print outputs and output them at the > end of the program execution? > So, your real application do not have this kind of bottle neck. this is a valid idea, thought the problem is: I output all things only "once" and I even output it like: 1) load module 2) go over functions 3) output all blocks with
2013 Jan 10
0
[LLVMdev] LLVM Instruction*->getOperand() not working properly for ICMP
Hi, On 10/01/13 10:56, Alexandru Ionut Diaconescu wrote: > Hello everyone ! > > In my pass I inspect the penultimate instruction from every basic block in > runOnFunction(). I am interested in ICMP instructions only. > > |if(BB->size()>1) > if(last->getPrevNode()) > { > previous = last->getPrevNode(); > ok=1; > } > |
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
2006 Mar 03
1
[LLVMdev] printing constants
Sir, I am using the op_begin and op_end iterator for iterating over the operands as mentioned below. for (User::op_iterator operand=j->op_begin(),operand_end=j->op_end();operand!=operand_end;++operand){ Value *v=operand->get(); const Type *t=v->getType(); cerr<<endl<<" operand: "<<"[ "<<v->hasName()<<"
2010 Apr 27
1
[LLVMdev] The nearest basic block being dominated by all used values.
Hello, Presumably I have two value v1 and v2 from two different basic block A and B. Now I need to insert to a printf to print those two values at the same time. This means I need to find a basic block to insert such a calling isntruction and at the same time, the basic block should be dominated by v1 and v2. Is there any easy way to find such a basic block? Cheers, Zheng
2011 Apr 26
0
The distance dominated
Wine into ChouChang sorrow more sorrow I don't know my pain and no end, I only know that I the road ahead is dark, cannot have found a ray of light! I don't know how long I can hang on, I just want to hold to period of time, even if I beloved daughter graduated, if insisted she cases better, hold to my old father, h persist until I retire. Then I probably wouldn't have such pain...