similar to: [LLVMdev] global variable uses

Displaying 20 results from an estimated 1100 matches similar to: "[LLVMdev] global variable uses"

2013 Dec 26
2
[LLVMdev] Arguments to IRBuilder CreateCall function
Hi, I need to pass some arguments to CreateCall function (as Value *). For example, I need to pass a 64 bit integer (with a value I calculate). How can I convert the 64 bit integer to a value * in order to pass it? Thanks a lot, Tehila. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2014 Mar 29
2
[LLVMdev] Cast specific pointer type to generic one
Hi, Suppose I have a pointer to "something" (a structure I defined) and I want to pass the pointer to a generic function, that gets a 64-bit address pointer. How do I do that? For instance: The function is: void Foo (void *); I get the specific pointer using getPointerOperand() on a store instruction that store to it: inst->getPointerOperand()->getType() Now I want
2015 Apr 19
3
[LLVMdev] global allocation IR instruction
Hi all, In order to allocate memory on the stack there is AllocaInst instruction. What is the similar instruction/way to allocate memory on the global area? Thanks, Tehila. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150419/54298396/attachment.html>
2014 Dec 31
5
[LLVMdev] outlining in llvm
Hi, I have some questions regarding outlining (extracting piece of code into a function): 1. Is there an outlining pass in llvm (IR)? I've found out CodeExtractor pass, but I'm not sure it's exactly the same idea. 2. How do I set the function name? And another question: Where do I control the execution of my pass? I'm writing a pass that first works on
2015 Dec 29
2
Running DCE after my pass
Hi, I wrote an IR pass and it adds some instructions that are not used. For example: %1 = call i64 @foo() When %1 is not used at all. I thought that running DCE (-dce) or DIE (-die) after my pass will remove such instructions, but it didn't. Why? And is there a way to do that? Thanks, Tehila. -------------- next part -------------- An HTML attachment was scrubbed...
2014 Aug 09
2
[LLVMdev] difference between replaceAllUsesWith and replaceUsesOfWith?
Why is the first for loop not equivalent to the second? Thanks, Rob =========================== for (GlobalVariable **i = Globals.begin(), **e = Globals.end(); i != e; ++i) { GlobalVariable *GV = *i; Constant *GEP = ConstantExpr::getGetElementPtr(...); GV->replaceAllUsesWith(GEP); } =========================== for (GlobalVariable **i = Globals.begin(), **e = Globals.end(); i != e;
2020 Feb 13
3
setOperands(int, Value*)
Hello, I am trying to reset the operands of instructions. What I am doing is, I am finding all Uses of a specific operand in an Instruction and resetting it with a new value using "setOperands(int, Value*)". I am doing as: for (auto vmitr=vm.begin(), vsitr=vs.begin(); vmitr!=vm.end() && vsitr!=vs.end(); vmitr++, vsitr++){ // I have two *Value ( operands) for ( auto myitr
2019 Jul 29
2
Efficient way to identify an instruction
Hi Alberto, I have not used this myself, but I think you should be able to visit your Instruction ‘users()’. I think the name this function was given is a bit confusing, but this returns an iterator range you can iterate through to find instructions that depend on a given one. Similarly, you have the function ‘uses()’ that can be used to traverse down the DAG when instructions are still on SSA
2015 Jan 30
1
[LLVMdev] About user of bitcast/GEP instruction
Hi, If the special handling in the meg2reg pass is to look for lifetime intrinsics, shouldn't it cast to <IntrisicInst> and then use getInstrinsicID to check for lifetime_start and lifetime_end ? The thing that I don't understand is the following piece of code, which finds all the users and cast it to <Instruction> then eraseFromParent(). How can this guarantee that it only
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
2015 Jan 30
0
[LLVMdev] About user of bitcast/GEP instruction
----- Original Message ----- > From: "guoqing zhang" <gqzhang81 at gmail.com> > To: llvmdev at cs.uiuc.edu > Sent: Friday, January 30, 2015 4:29:16 AM > Subject: [LLVMdev] About user of bitcast/GEP instruction > > Hi, > > > In PromoteMemoryToRegister.cpp, it seems to rely on the fact that the > only users of bitcast/GEP instruction are lifetime
2015 Jan 30
3
[LLVMdev] About user of bitcast/GEP instruction
Hi, In PromoteMemoryToRegister.cpp, it seems to rely on the fact that the only users of bitcast/GEP instruction are lifetime intrinsics (llvm.lifetime.start/end). I did some searching in llvm/test folder, it seems to be true. However, by reading LLVM IR manual, I don't see any restriction stated on the possible user of bitcast/GEP instruction. So my question is who impose the restriction ?
2015 Apr 21
2
[LLVMdev] RFC: Missing canonicalization in LLVM
So this change did indeed have an effect! :) I’m seeing regressions in a number of benchmarks mainly due to a host of extra bitcasts that get introduced. Here’s the problem I’m seeing in a nutshell: 1) There is a Phi with input type double 2) Polly demotes the phi into a load/store of type double 3) InstCombine canonicalizes the load/store to use i64 instead of double 4)
2019 Jul 28
2
Efficient way to identify an instruction
Hi Tim, as always thanks for your help. Unfortunately I made a mistake in my email but apart from that I still have problems. Il giorno sab 27 lug 2019 alle ore 11:53 Tim Northover < t.p.northover at gmail.com> ha scritto: > Hi Alberto, > > On Sat, 27 Jul 2019 at 10:09, Alberto Barbaro via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > Having the reference I to
2015 Apr 23
2
[LLVMdev] RFC: Missing canonicalization in LLVM
Thanks for the reply Pete. Unfortunately, I don’t think it is going to be as simple as ignoring those loads which only store. In findCommonType(), only one alloca is passed in at a time. So, while you could find those cases where that alloca was loaded from and stored elsewhere, you can’t find those places that store to that alloca from somewhere else (at least not easily that I can see). So
2008 Apr 16
0
[LLVMdev] PATCH: Use size reduction -- wave2
On Apr 16, 2008, at 2:50 AM, heisenbug wrote: > > And now here is my educated speculation: > There are 2 things that became slower > 1) Use::getUser() > 2) Use::get/set due to tagging. > > The former is seldom called: > > $ find lib -name "*.cpp" | xargs grep "getUser(" | wc -l > 41 The majority of those aren't actually Use::getUser, but
2008 Apr 16
5
[LLVMdev] PATCH: Use size reduction -- wave2
On Apr 16, 2:13 am, Dan Gohman <goh... at apple.com> wrote: > Hi Gabor, > > Can you provide performance data for this? I'd > like to know what affect these changes have on > compile time. Hi Dan, Unfortunately, no. I can feed you with some speculation, though, see below. The reason why I cannot do measurements (at the moment) is that - I have no experience with
2015 Jun 10
2
[LLVMdev] The use iterator not working...
It appears dereferencing the use iterator returned the "user" in older LLVM versions. See the following commit to Use.h. You can see that the intention is to return the "user". So this is not the behavior anymore. https://github.com/llvm-mirror/llvm/commit/d1fe495464e4abc384565813cbf1cb8b130e5a6d - // Retrieve a pointer to the current User.- UserTy *operator*() const {-
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
2015 Jul 27
2
[LLVMdev] a question about pooalloc
Hello, today I download poolalloc from " https://github.com/llvm-mirror/poolalloc". and I compiled it with LLVM3.3. Then when I excute "make",I get the error: AddressTakenAnalysis.cpp:18:30:fatal error:llvm/IR/CallSite.h: No such file or directory. ​I correct the path of callsite.h to "llvm/Support/Callsite.h". there is another error: AddressTakenAnalysis.cpp:In