Displaying 20 results from an estimated 206 matches for "reg2mem".
2012 Jul 25
1
[LLVMdev] Inneffiecient code produced by reg2mem?
Is there a pass I can use after reg2mem to get rid of occurances like this?:
store i32 %cond, i32* %cond.reg2mem
%cond.reload = load i32* %cond.reg2mem
store i32 %cond.reload, i32* %cond4.reg2mem
Essentially, in this case, reg2mem creates an extra memory space to store
and load a value from just here, and never uses the value aga...
2011 Aug 03
2
[LLVMdev] scalar evolution to determine access functions in arays
Hello Tobi,
You are right, we need to run some other passes before running the scalar evolution pass. The sequence that I run for this example is -O3 -loop-simplify -reg2mem. This is why I did not obtain the expressions depending on the loop indices. So I removed the reg2mem pass and scalar evolution computes the correct functions.
However, I need to run the reg2mem pass (or any other that would eliminate the phi nodes) before calling my own passes. So probably we...
2011 May 17
1
[LLVMdev] eliminate phi nodes, reduce unnecessary loads / stores , reg2mem, mem2reg
Hi,
I work on a pass that requires as input LLVM code without any phi nodes. For
this, I use the reg2mem pass which produces suitable code, the pass runs
correctly, but I obtain a significant performance decrease. I expect that this
is because there are more reads / writes to memory after running the reg2mem
pass.
How can I optimize the code, without inserting any phi nodes? Or is there a
better s...
2011 Jun 20
2
[LLVMdev] run -mem2reg and -reg2mem programmably from within a Pass
I am currently building a BasicBlock pass which requires to run -reg2mem
before it, and need to run -mem2reg after it to clean up.
So, I want to specify -reg2mem as one of the pre-requisite passes to it, as:
class MyPass: public BasicBlockPass{
virtual void getAnalysisUsage(AnalysisUsage &AU){
...
AU.addRequired<RegToMem>();
...
}
};
I...
2008 Jul 12
3
[LLVMdev] Little bug in LoopInfo after Rotate?
Hello, I have two for loops (one inside the other), that after indvars,
looprotate, etc. (the important here is the loop rotate), is similar to this
(I've stripped the real operations):
define i32 @f() nounwind {
entry:
br label %bb1
bb1: ; preds = %bb3, %bb1, %entry
%i.0.reg2mem.0.ph = phi i32 [ 0, %entry ], [ %i.0.reg2mem.0.ph, %bb1 ],
[ %indvar.next9, %bb3 ] ; <i32> [#uses=4]
%j.0.reg2mem.0 = phi i32 [ 0, %entry ], [ %indvar.next, %bb1 ], [ 0,
%bb3 ] ; <i32> [#uses=3]
%indvar.next = add i32 %j.0.reg2mem.0, 1 ; <i32> [#uses=2...
2010 Apr 20
2
[LLVMdev] How to delete a instruction?
Hi,
when I delete some instruction, I got some error prompt message.
- %i.0.reg2mem.0 = phi i32 [ 0, %bb5 ], [ %indvar.next, %bb12 ] ; <i32>
[#uses=2]
- %s.0.reg2mem.0 = phi i32 [ 0, %bb5 ], [ %tmp16, %bb12 ] ; <i32> [#uses=1]
- %tmp14 = tail call i32 @foobar(i32 %i.0.reg2mem.0) nounwind ; <i32>
[#uses=1]
- %tmp16 = add i32 %tmp14, %s.0.reg2mem.0 ; <...
2011 Aug 03
0
[LLVMdev] scalar evolution to determine access functions in arays
On 08/03/2011 08:35 AM, Jimborean Alexandra wrote:
> Hello Tobi,
>
> You are right, we need to run some other passes before running the
> scalar evolution pass. The sequence that I run for this example is -O3
> -loop-simplify -reg2mem. This is why I did not obtain the expressions
> depending on the loop indices. So I removed the reg2mem pass and scalar
> evolution computes the correct functions.
>
> However, I need to run the reg2mem pass (or any other that would
> eliminate the phi nodes) before calling my own pa...
2011 Jun 20
0
[LLVMdev] run -mem2reg and -reg2mem programmably from within a Pass
I guess AU.addRequiredID(DemoteRegisterToMemoryID) would do the trick.
- xi
On Jun 19, 2011, at 11:03 PM, Chuck Zhao wrote:
> I am currently building a BasicBlock pass which requires to run -reg2mem before it, and need to run -mem2reg after it to clean up.
>
> So, I want to specify -reg2mem as one of the pre-requisite passes to it, as:
>
>
> class MyPass: public BasicBlockPass{
>
> virtual void getAnalysisUsage(AnalysisUsage &AU){
> ...
> AU.addRequ...
2013 Sep 22
0
[LLVMdev] Why total number of store instructions increased in case of gvn with reg2mem?
Might have to do with GVN's PRE (partial redundancy elimination), which tends to increase code size.
H.
----- Original Message -----
From: Abhinash Jain
Sent: 09/22/13 01:17 AM
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] Why total number of store instructions increased in case of gvn with reg2mem?
Below are the 4 cases out of which for the first 3 cases am able to understand the variation on total number of store inst. But when -gvn parameters is passed (in case 4) , why does the total number of strore Instruction present on the attached file increases (instead of decrease). Please explain...
2011 May 30
1
[LLVMdev] Reg2mem: Identifying introduced memory locations (also, what happens to the phi nodes)
Hi.
Im exploring `opt -reg2mem` output for a simple C program (actually,
that is this snippet:
http://rosettacode.org/wiki/Dining_philosophers#C - compiled with
clang -O1) and got two questions regarding this pass.
1. How would I tell which memory locations were introduced by the
pass, and which memory locations were present in...
2013 Sep 22
0
[LLVMdev] Why total number of store instructions increased in case of gvn with reg2mem?
...of which for the first 3 cases am able to
understand the variation on total number of store inst.
But
when -gvn parameters is passed (in case 4) , why does the total number of
strore Instruction present on the attached file increases (instead of
decrease).
Please explain considering that use of -reg2mem pass is mandatory.
eg.
clang -emit-llvm bzip.c -c -o bzip1.bc
1. opt -load /home/honey/llvm/build/Debug+Asserts/lib/loadInstruction.so
-storeInstruction < bzip1.bc
output :- Total Store Instruction 3115
2. opt -reg2mem -load
/home/honey/llvm/build/Debug+Asserts/lib/loadInstruction.s...
2007 Aug 10
2
[LLVMdev] Reg2Mem pass
Hi, guys.
I'm interested in using reg2mem pass but not sure about the concept of it.
Can you let me know a reference about it, if any?
Forgive my ignorance. -_-;
Thanks,
Seung J. Lee
2007 Sep 05
2
[LLVMdev] reg2mem pass
Hello, guys.
I just tested -reg2mem pass to see how it changes my bitcode.
E.g., for the following simple C code:
-------------------------------------------------------------
int foo() {
int i,j;
int sum = 0;
for (i=0; i<10; i++)
{
sum += i;
for (j=0; j<3; j++)
sum += 2;
}
return sum;
}
------------...
2015 Apr 22
2
[LLVMdev] Use clang to generate LLVM IR with -O3, how to visit these load operations after -reg2mem
Hi, all
I want to instrument load/store operations in LLVM IR. And I find the LLVM
IR generated with flag -o3 is much more efficient than -o0, so I try to
instrument on these optimized LLVM IR, but, some load operations are
changed to Phi loads. Then, I try the -reg2mem flag to remove these phi
nodes.
The problems are:
1) I use visitLoadInst to collect these load operations, and it seems I
cannot reach these loads that are generated by reg2mem? What is the reason?
2) Is there any way to compile with -O3 but not generate phi nodes ?
--
Best Regards!
Eric Lew
--...
2012 Dec 31
1
[LLVMdev] reg2mem breaks module
Hello,
I'm trying to apply the reg2mem pass on my bc file, but it somehow adds an instruction before a landingpad instruction and so I get a broken module error:
The unwind destination does not have a landingpad instruction!
%41 = invoke %class.x* @_ZN10xC2Ev(%class.x* %.reload19)...
2007 Aug 10
0
[LLVMdev] Reg2Mem pass
On Fri, 2007-08-10 at 00:51 -0500, Seung Jae Lee wrote:
> Hi, guys.
>
> I'm interested in using reg2mem pass but not sure about the concept of it.
> Can you let me know a reference about it, if any?
> Forgive my ignorance. -_-;
The reg2mem pass undoes SSA form. That is, it turns SSA registers into
alloca instructions with loads and stores.
>
> Thanks,
> Seung J. Lee
> __________...
2013 Aug 16
2
[LLVMdev] [Polly] Analysis of extra compile-time overhead for simple nested loops
...ely, when we
>> run "opt -load LLVMPolly.so" for this basic LLVM IR code, the polly-prepare
>> pass would introduce a large number of store instructions like this:
>>
>> define i32 @main(i32 %argc, i8** nocapture readonly %argv) {
>> entry:
>> %cond22.reg2mem = alloca i32
>> %x.019.reg2mem = alloca i32
>> %x.1.lcssa.reg2mem = alloca i32
>> %x.1.lcssa.lcssa.reg2mem = alloca i32
>> %x.0.lcssa.reg2mem = alloca i32
>> br label %entry.split
>> entry.split:
>> %cmp = icmp eq i32 %argc, 2
>> store i...
2015 Apr 22
2
[LLVMdev] Use clang to generate LLVM IR with -O3, how to visit these load operations after -reg2mem
...wrote:
> Hi, all
>
> I want to instrument load/store operations in LLVM IR. And I find the LLVM
> IR generated with flag -o3 is much more efficient than -o0, so I try to
> instrument on these optimized LLVM IR, but, some load operations are changed
> to Phi loads. Then, I try the -reg2mem flag to remove these phi nodes.
> The problems are:
> 1) I use visitLoadInst to collect these load operations, and it seems I
> cannot reach these loads that are generated by reg2mem? What is the reason?
Clang doesn't generate optimized IR - so if your instrumentation is in
Clang'...
2011 Aug 31
2
[LLVMdev] Getting rid of phi instructions?
On 31.8.2011, at 11.41, Eli Friedman wrote:
> Mmm... reg2mem will transform IR with PHI's into IR without them, but
> it generates a bunch of alloca's, which I would assume are not cheap
> to lower to VHDL. You might have to write your own pass to get the
> precise transformation you're looking for.
Right. Thanks. I need to see the reg...
2013 Aug 15
0
[LLVMdev] [Polly] Analysis of extra compile-time overhead for simple nested loops
...on this code. Unfortunately, when we
> run "opt -load LLVMPolly.so" for this basic LLVM IR code, the polly-prepare
> pass would introduce a large number of store instructions like this:
>
> define i32 @main(i32 %argc, i8** nocapture readonly %argv) {
> entry:
> %cond22.reg2mem = alloca i32
> %x.019.reg2mem = alloca i32
> %x.1.lcssa.reg2mem = alloca i32
> %x.1.lcssa.lcssa.reg2mem = alloca i32
> %x.0.lcssa.reg2mem = alloca i32
> br label %entry.split
> entry.split:
> %cmp = icmp eq i32 %argc, 2
> store i32 46, i32* %cond22.reg2mem
>...