search for: mem2reg

Displaying 20 results from an estimated 835 matches for "mem2reg".

2016 Mar 22
2
Passing llvm option -mem2reg to clang
I have used the following command for my pass (without -mem2reg): clang -Xclang -load -Xclang MYPASS.so -c ../../tests/test1.c For mem2reg, I tried the following: clang -mllvm -mem2reg -Xclang -load -Xclang MYPASS.so -c ../../tests/test1.c On Mon, Mar 21, 2016 at 9:26 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: > >> On Mar 21, 2016,...
2004 Jun 23
3
[LLVMdev] weird issue with mem2reg
...ck Meredith wrote: > MetaSplit is an anlysis I just finished writing. It doesn't alter > anything, all it does is build a set of "program instructions". For > some reason even though if I run it with any other combination of > passes I've found, anytime I run it with mem2reg I get a seg fault in > dyn_cast! Here's output: Since the crash is after your code is entered, the problem is probably not in mem2reg, but in your pass. To see if that's the case, you can do this: % opt -mem2reg < orig.bc > m2r.bc % opt -load=... -metasplit < m2r.bc > out...
2013 Oct 29
1
[LLVMdev] Non-deterministic behavior when using LoopInfo pass in LLVM
...ite benchmarks and in three consecutive tests the number of loop headers was different. Does anybody know if this behavior is correct? If so, I would like to know the logic behind this pass. Thanks, Raphael Ernani P.S.: Here is the output (a similar variation occurs when I run my pass without -mem2reg, -instnamer, and -break-crit-edges): raphael at ubuntu:~/llvm-3.3/projects/test-suite/SingleSource/Benchmarks/Stanford/Output$ opt -mem2reg -instnamer -break-crit-edges -load MyModule.so -my-counter -stats Oscar.linked.rbc -f >/dev/null ===-------------------------------------------------------...
2016 Mar 22
1
Passing llvm option -mem2reg to clang
Unless mem2reg does something other than my understanding of it, I can't see why any pass would "require" that... It is not guaranteed to do anything to any particular piece of code, so relying on it seems very unreliable, I would think. -- Mats On 22 March 2016 at 04:32, Kevin Hu via llvm-dev &lt...
2016 Mar 22
2
Passing llvm option -mem2reg to clang
I have my own llvm pass which requires mem2reg. It worked fine with opt. However, I was trying to make it work with clang as I needed it to run some spec cpu benchmarks. Is there any way that I can mention mem2reg (PromotePass) pass as a pre-requisite in my own pass's implementation? On Mon, Mar 21, 2016 at 9:01 PM, Mehdi Amini <mehd...
2020 May 12
4
bug report on mem2reg
Hi, all, I think I found a bug on mem2reg in a particular case. When I ran opt -mem2reg -basicaa -scalar-evolution -loops -da -analyze opts.ll, it collapsed. While without mem2reg option, it runs well. so I guess it has something to do with mem2reg. The relative files have been affixed, please check them for me. Thanks in advance. liuba...
2004 Jun 23
4
[LLVMdev] weird issue with mem2reg, should have guessed
On Wed, 23 Jun 2004, Patrick Meredith wrote: > What's different about code that's been mem2reg'd from straight front end > code, or anything that mem2reg hasn't been run on? PHINODES! Yup, front-ends generally don't produce SSA form. :) > It appears to be crashing when I try to cast a Value* that's really a > BB* (from the PHInode operands) to a User*, insterestin...
2015 Oct 05
2
Adding mem2reg pass to pass manager
Hi, I want to add "mem2reg" pass similar to this: PassManager PM; PM.add(new LoopInfo()); PM.add(new Mem2Reg()); // What's the class name for this pass I couldn't find the name of corresponding class and header file of mem2reg pass except "mem2reg.cpp". So how can I add mem2reg pass into my pass m...
2004 Jun 23
0
[LLVMdev] weird issue with mem2reg, should have guessed
What's different about code that's been mem2reg'd from straight front end code, or anything that mem2reg hasn't been run on? PHINODES! It appears to be crashing when I try to cast a Value* that's really a BB* (from the PHInode operands) to a User*, insteresting since I am dyn_casting. I just caught this on cerr though (printing ou...
2013 Feb 26
1
[LLVMdev] mem2reg for non entry blocks?
...t;> loop iteration. >> I think some of the optimizers that run later try to move allocas >> into the entry >> block if possible, but in general it is simpler to have the >> front-end just put >> them there in the first place. >> >> >> Mem2reg is already changing that semantic, though. If I use an >> "alloca i32" in >> the entry block, then I am saying I want 4 bytes of stack space, but >> mem2reg may >> replace that with registers. > > the problem isn't with mem2reg changing the amount of u...
2013 Feb 26
0
[LLVMdev] mem2reg for non entry blocks?
...e that it would allocate more stack space on every loop iteration. > I think some of the optimizers that run later try to move allocas into the entry > block if possible, but in general it is simpler to have the front-end just put > them there in the first place. > > > Mem2reg is already changing that semantic, though. If I use an "alloca i32" in > the entry block, then I am saying I want 4 bytes of stack space, but mem2reg may > replace that with registers. the problem isn't with mem2reg changing the amount of used stack space, it's that those...
2013 Feb 26
2
[LLVMdev] mem2reg for non entry blocks?
On Tue, Feb 26, 2013 at 5:42 AM, Duncan Sands <baldrick at free.fr> wrote: > Hi Vinod, > > > On 23/02/13 02:20, Vinod Grover wrote: > >> Sorry if this has been discussed before, but I would appreciate any >> pointers. >> I am trying to understand why mem2reg only looks at allocas in entry >> blocks, and >> not for any allocas in a function. One case where allocas could be used >> to build >> local data structures like linked list (and so on make it unsafe), and >> for that >> the existing conditions in IsAllocaPromot...
2016 Feb 11
2
Writing an LLVM Pass that depends on mem2reg
Hello, I am used to specifying dependence on other LLVM passes in the `getAnalysisUsage(AnalysisUsage &)` method of my pass. However, it doesn't seem that there is a header file that exposes the `mem2reg` pass - it is implemented in `Mem2Reg.cpp` as a wrapper. Is there an easy way to reuse this pass, or should I, in essence, duplicate `Mem2Reg.cpp` in my project? Cheers, - Stan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llv...
2004 Jun 23
0
[LLVMdev] weird issue with mem2reg, still
...operand out of bounds when the number of operands is 2 and I am asking for the second operand. ----- Original Message ----- From: "Chris Lattner" <sabre at nondot.org> To: <llvmdev at cs.uiuc.edu> Sent: Wednesday, June 23, 2004 4:24 PM Subject: Re: [LLVMdev] weird issue with mem2reg, should have guessed > On Wed, 23 Jun 2004, Patrick Meredith wrote: > > > What's different about code that's been mem2reg'd from straight front end > > code, or anything that mem2reg hasn't been run on? PHINODES! > > Yup, front-ends generally don't pro...
2017 Oct 15
2
question about mem2reg
Hello, I just upgraded my llvm to 5.0.0. I applied mem2reg pass as follows: opt -mem2reg m2rtttl.bc > m2rtttl.opt But after that, I compared m2rtttl.bc and m2rtttl.opt. I noticed that there are no difference between m2rtttl.bc and m2rtttl.opt. Did I apply llvm in the correct way? Thanks a lot for the help! Best, Linh...
2016 Mar 22
2
Passing llvm option -mem2reg to clang
Hi, I was trying to pass llvm option -mem2reg to clang using -mllvm and I found the following error: clang (LLVM option parsing): Unknown command line argument '-mem2reg'. Try: 'clang (LLVM option parsing) -help' clang (LLVM option parsing): Did you mean '-debug'? I would appreciate if anyone could help me. -- Syed...
2004 Jun 23
2
[LLVMdev] weird issue with mem2reg, still
...; executed right before the getOperand call that is failing? -Chris > ----- Original Message ----- > From: "Chris Lattner" <sabre at nondot.org> > To: <llvmdev at cs.uiuc.edu> > Sent: Wednesday, June 23, 2004 4:24 PM > Subject: Re: [LLVMdev] weird issue with mem2reg, should have guessed > > > > On Wed, 23 Jun 2004, Patrick Meredith wrote: > > > > > What's different about code that's been mem2reg'd from straight front > end > > > code, or anything that mem2reg hasn't been run on? PHINODES! > > > &...
2008 Oct 07
2
[LLVMdev] mem2reg optimization
...No, it's analysis that depend on the orderings of loads and stores > > (or any > > instruction). I ran across this need in another area. > > I believe that there are problems, but I'm not seeing what > the problem is with an instruction ordering pass to be used > by mem2reg. Can you be more specific, or point me to the > thread where this was discussed? Oh, use by mem2reg shouldn't be a problem. But as you say, unless it's used other places, why make it a separate pass? My point was that the other place I've found this useful is in an analysis pass...
2020 Feb 12
2
tool options to generate spill code
...b=getinput(); c=getinput(); d=getinput(); e=getinput(); f=getinput(); g=getinput(); printf("%d %d %d %d %d %d %d\n",a,b,c,d,e,f,g); a=b=c=d=e=f=g=0; return 0; } *1. $clang reg.c -Xclang -disable-O0-optnone -S -emit-llvm -o reg.ll && opt -mem2reg -S reg.ll -o reg.ll && llc --regalloc=greedy reg.ll -o reg.s* *2. $clang reg.c -Xclang -disable-llvm-passes -S -emit-llvm -o reg.ll && opt -mem2reg -S reg.ll -o reg.ll && llc --regalloc=greedy reg.ll -o reg.s* *3. $clang reg.c -S -emit-llvm -o reg.ll && opt -mem2re...
2016 Feb 11
3
Writing an LLVM Pass that depends on mem2reg
...it you can help me with this problem. <quote author='Mehdi Amini via llvm-dev'> Hello, I am used to specifying dependence on other LLVM passes in the `getAnalysisUsage(AnalysisUsage &)` method of my pass. However, it doesn't seem that there is a header file that exposes the `mem2reg` pass - it is implemented in `Mem2Reg.cpp` as a wrapper. Is there an easy way to reuse this pass, or should I, in essence, duplicate `Mem2Reg.cpp` in my project? Cheers, - Stan _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org http://lists.l...