search for: demotephitostack

Displaying 7 results from an estimated 7 matches for "demotephitostack".

2011 Apr 17
0
[LLVMdev] Regarding BasicBlock Cloning
...lace. Is this a good approach or there are some other function available > for it. CloneBasicBlock isn't going to do anything magical... I pointed towards BasicBlock::splitBasicBlock because I figured you could split the PHIs out of the block you want to clone, or something like that. Using DemotePHIToStack on PHI nodes to eliminate them is another possibility. Trying to do optimizations without running mem2reg is a really bad idea for practical use: most optimization opportunities will be hidden behind loads and stores to allocas. -Eli
2012 Aug 20
3
[LLVMdev] Problem with "Does not dominate all uses"
Hi! I'm having some trouble with a pass I'm writing. I'm using DemotePHIToStack to remove all phi node in my code with this code (this is the first thing I do in my pass): // Erase phi node vector<PHINode*> phis; for (Function::iterator i=f->begin();i!=f->end();++i) { for(BasicBlock::iterator b=i->begin();b!=i->end();++b) { if...
2012 Aug 20
0
[LLVMdev] Problem with "Does not dominate all uses"
...is possible to take the path from entry to loopEntry to cond.end without going through end.11. Cameron On Aug 20, 2012, at 6:24 AM, Rinaldini Julien <julien.rinaldini at heig-vd.ch> wrote: > Hi! > > I'm having some trouble with a pass I'm writing. > > I'm using DemotePHIToStack to remove all phi node in my code with this code (this is the first thing I do in my pass): > > // Erase phi node > vector<PHINode*> phis; > for (Function::iterator i=f->begin();i!=f->end();++i) { > for(BasicBlock::iterator b=i->begin();b!=i->end();...
2011 Apr 17
4
[LLVMdev] Regarding BasicBlock Cloning
The clone llvm:CloneBasicBlock copies the phi function in the replicated basic block from the original basic block. I don't want the copy of phi in relplicated block. For now I am creating .bc file with -O0 option so that it doesn't generate phi function in first place. Is this a good approach or there are some other function available for it. Tarun On Sun, Apr 17, 2011 at 5:22 AM, Eli
2018 Jan 05
0
Question about reg2mem
...* noalias nocapture nonnull sret %.reload33, %swift.refcounted* swiftself %1, %swift.error** nocapture nonnull swifterror %.reload25) LLVM ERROR: Broken function found, compilation aborted! I understand the cause of the error and disabled the demoteToStack() function(invokes DemoteRegToStack() and DemotePHIToStack()) at the very end of the bcf function pass. Doing so resolved the issuse, but I'm not certain of the functinality of thoses two demote functions and the consequence of not using them. I tried to search for information regarding reg2mem, but couldn't find any detailed explaination. It would...
2012 Aug 20
1
[LLVMdev] How to eliminate PHI nodes on pointer types?
On 08/20/2012 03:46 PM, Duncan Sands wrote: > Hi Andrew, > >> Somewhere during optimization PHI nodes on pointer types (including >> alloca instructions) are being introduced, and they persist through the >> scalar replacement of aggregates pass and others. I can't seem to find >> a combination of passes or transformations to get rid of them. Has >> anyone
2012 Jul 18
2
[LLVMdev] Phi translation
I just accidently sent a partially complete email, so this contains the rest (sorry!) I'm working on translating llvm's optimized intermediate code to another compiler's intermediate code, and I'm working on the PHI instruction. Here's an example phi instruction to help explain what I'm trying to do: %inc25 = phi i32 [ 1, %entry ], [ %inc, %for.body ] What I would want to