similar to: [LLVMdev] PHI node operads

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] PHI node operads"

2011 Oct 10
0
[LLVMdev] PHI node operads
Hi Carlos, > I have a pass that duplicates all instructions and keeps a "reference > map" of duplicated values, which is later used to update all the > references, thus creating a whole copy of a previous function. ... why don't you just call something like CloneFunction? Ciao, Duncan.
2012 Mar 08
2
[LLVMdev] Updating value from PHI
Here is the code snippet that I am using to create the PHIs in the loop according to the PHIs in the new preheader. At this point I have already redirected the loop backedge and removed the preheader from the loop. for (BasicBlock::iterator II = loopHeaderBB->begin(); (PN=dyn_cast<PHINode>(II)); ++II) { // remove loop back PHI and add it to split BB
2012 Mar 08
0
[LLVMdev] Updating value from PHI
I guess I thought that once I redirected the branches and created new PHIs that LLVM would correct the variable usage when I return true (changed CFG) from the pass. Is this not the case? On Wed, Mar 7, 2012 at 4:08 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > Here is the code snippet that I am using to create the PHIs in the loop > according to the PHIs in the new preheader. At
2014 Aug 09
0
[LLVMdev] difference between replaceAllUsesWith and replaceUsesOfWith?
Ahh ha! I believe that `User::replaceUsesOfWith` modifies 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 =
2016 Sep 06
2
igraph V a partir de E y subgrafos
Estimado Javier, Me alegra que hayas avanzado con tu error. Te respondo a esto último. La función induced.subgraph() espera como segundo parámetro una lista de los IDs de los vértices, mientras que tú le estás pasando una lista de 'edges'. Prueba lo siguiente: c <- induced.subgraph(datos.network, which(V(datos.network)$name == 'Casa')) Si entendí bien todo, debería
2016 Jul 14
2
clone function
Hi, I am trying to use the CloneFunction from llvm/Transforms/Utils/Cloning.h and I don't understand how the ValueToValueMapTy argument should be initialized. For instance, let say I want to clone this function (to add an argument): define void @function(i32 %i) #0 { entry: %i.addr = alloca i32, align 4 store i32 %i, i32* %i.addr, align 4 ret void } to another function which should,
2016 Jul 15
2
clone function
On 14 July 2016 at 20:07, Mehdi Amini <mehdi.amini at apple.com> wrote: > > On Jul 14, 2016, at 7:58 AM, Pierre Gagelin via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > Hi, > > I am trying to use the CloneFunction from llvm/Transforms/Utils/Cloning.h > and I don't understand how the ValueToValueMapTy argument should be > initialized. For instance,
2013 Nov 05
0
[LLVMdev] Identifying the instructions that uses a pointer used as a function argument
I think I understood the problem you're trying to solve. I didn't, however, understand the problems you are having (maybe you're not running mem2reg?). I do have a little piece of code that I think does (more or less) what you want. Take a look at it, try understanding it, and see if it helps you out. You might have to change it a bit since you're replacing uses after an
2011 Oct 14
1
[LLVMdev] CloneFunction
Hi, I want to duplicate a function and transfer it from one module to another. I found "CloneFunction()" but it needs an "vMap". I found that "vMap" is used to map the original values to the new values. So, hypothetically, if the original function uses a global variable from the previous module and I want that use in the new function to be mapped to a global variable
2016 Feb 12
3
CloneFunction during LTO leads to seg fault?
In general I use DebugInfoFinder and clear out Metadata if GV in null or GV->isDeclaration(). If there is any interest, I can post that patch... Sergei --- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation > -----Original Message----- > From: Tobias Edler von Koch [mailto:tobias at codeaurora.org] > Sent: Friday, February 12, 2016
2013 Mar 02
2
[LLVMdev] Question about method CodeExtractor::severSplitPHINodes
Hi folks, Hope this is not a silly question. But it bothers me when I am thinking about it. My question is: 1. In the implementation of serverSplitPHINodes(), why it only checks the first PHI node for possible multiple inputs from outside the region to extract. There could be more than one PHI nodes in the header block, and the code only checks the first one. I don't quite get it.
2016 Feb 09
2
CloneFunction during LTO leads to seg fault?
Hi Medhi, Thanks for you reply. Here is the full output of -print-after-all [1] and just the module itself after my pass[2]. I've looked over the IR, but I can't see anything obviously wrong. I'm not sure what you meant by: > You may want to try to add it at the end of the pipeline My pass is the last one added inside populateLTOPassManager. Should I add it to the
2007 Mar 16
1
Fast lookup in ragged array
Hello, I'm running an algorithm for graph structural cohesion that requires a depth-first search of subgraphs of a rather large network. The algorithm will necessarily be redundant in the subgraphs it recurses to, so to speed up the process I implemented a check at each subgraph to see if it's been searched already. This algorithm is very slow, and takes days to complete on a
2013 Nov 05
1
[LLVMdev] Identifying the instructions that uses a pointer used as a function argument
Thanks for the reply. For the source code: int main() { int a = 0; int *p; p = &a; call_arnamoy(p); int *p1; p1 = p; return 1; } The bit code: %retval = alloca i32, align 4 %a = alloca i32, align 4 %p = alloca i32*, align 8 %p1 = alloca i32*, align 8 store i32 0, i32* %retval store i32 0, i32* %a, align 4 store i32* %a, i32** %p, align 8 %0 = load i32** %p, align 8 %call = call i32
2014 Aug 09
1
[LLVMdev] difference between replaceAllUsesWith and replaceUsesOfWith?
> I think this is incorrect since the use_iterator is defined as: > > `typedef value_use_iterator<User> use_iterator;` > > and indeed `ui->getUser();` is not a callable function on a User. What am I > missing? Ah, looks like this has changed this year. What I said applies to trunk; you may be right there about 3.4 or earlier (looks plausible from the key commit).
2017 Oct 14
2
Bug in replaceUsesOfWith: does not keep addrspace consistent in GEP
Hello, Calling `replaceUsesOfWith` with a value in a different addrspace does not keep the addrspace of a GEP consistent. Is this known? Is this a bug or expected behaviour? Minimal counterexample link <https://gist.github.com/bollu/152ba5e1c20c03c7fc6d8c7b23ba828f> Reproduced here: #include <iostream> #include "llvm/ADT/APFloat.h" #include
2011 Aug 26
0
[LLVMdev] Dead node removal in DAGCombiner
Hi Akira, > Is this piece of code in DAGCombiner::visitLOAD removing a dead node? > > 06155 if (N->use_empty()) { > 06156 removeFromWorkList(N); > 06157 DAG.DeleteNode(N); > 06158 } yes. > If it is, is there a reason it doesn't push its operands to the work > list as done in line 974-975? > > 00970 // If N has no uses,
2016 Feb 09
2
CloneFunction during LTO leads to seg fault?
Hello, I'm writing an LTO pass and I'd like to be able to duplicate a function (with debugging info). I'm trying to accomplish this with CloneFunction but it's leading to a seg fault in ld. I've whittled down my problem so that it occurs in this small pass [1]. If I run this pass with opt, I get the expected result (i.e. a valid program that calls main twice). If I run
2011 Nov 06
1
Request for Help: y-axis label overlapped by x-axis in subplots in big plot
Dear All, I would like to seek for help on this issue: 1. I set par(mfrow=c(2,2)), hoping to plot 4 subgraphs in a whole graph 2. Each subgraph has its own x,y axes and each has x-axis label and y-axis label 3. moreover, subgraphs in the left column of the whole graph are all 3D, and have z axes and labels for z axes 4. subgraphs in the right column of the whole graph are all 2D 5. In each
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;