Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Inneffiecient code produced by reg2mem?"
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
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 searched all passes under
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
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 the original program?
After a brief diffing of .ll files, I'd
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;
}
-------------------------------------------------------------
I could get the
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
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.
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)
to label %.noexc unwind label %88
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
2015 Apr 22
2
[LLVMdev] Use clang to generate LLVM IR with -O3, how to visit these load operations after -reg2mem
Best Regards!
Eric Lew
On 周三, 4月 22, 2015 at 12:11 下午, David Blaikie < dblaikie at gmail.com [dblaikie at gmail.com] > wrote:
On Tue, Apr 21, 2015 at 8:34 PM, Eric Lu <eirc.lew at gmail.com> 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
>
2012 May 04
0
[LLVMdev] Extending GetElementPointer, or Premature Linearization Considered Harmful
Hi Preston,
On Fri, May 4, 2012 at 9:12 AM, Preston Briggs <preston.briggs at gmail.com> wrote:
>
> which produces
>
> %arrayidx24 = getelementptr inbounds [100 x [100 x i64]]* %A, i64
> %arrayidx21.sum, i64 %add1411, i64 %add
> store i64 0, i64* %arrayidx24, align 8
> {{{(5 + ((3 + %n) * %n)),+,(2 * %n * %n)}<%for.cond1.preheader>,+,(4 *
2012 May 04
3
[LLVMdev] Extending GetElementPointer, or Premature Linearization Considered Harmful
Is there any chance of replacing/extending the GEP instruction?
As noted in the GEP FAQ, GEPs don't support variable-length arrays; when
the front ends have to support VLAs, they linearize the subscript
expressions, throwing away information. The FAQ suggests that folks
interested in writing an analysis that understands array indices (I'm
thinking of dependence analysis) should be
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
2002 Mar 04
2
Plotting a x axis from a vector with rownames
Hi all,
suppose there is a vector y with rownames:
> y
cond1 cond2 cond3 cond4
78.952 87.308 86.490 74.040
how can I easily plot this vector using the rownames? plot(y) gives me a
plot with a x-axis from 1 to 4 in 0.5 steps, also plot(rownames(y), y)
and plot(y ~ rownames(y) don't work. I know I can build a x-axis with
axis(1, ...), but in this case I need a character string like
2013 Sep 22
0
[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 considering that use of -reg2mem pass is mandatory.
eg.
clang -emit-llvm bzip.c -c -o bzip1.bc
2017 Jul 24
5
Ifelse statements and combining columns
Hi everyone,
I'm having some trouble with my ifelse statements.
I'm trying to put 12 conditions within 3 groups. Here is the code I have so
far:
dat$cond <- ifelse(test = dat$cond == "cond1" | dat$cond == "cond2" |
dat$cond == "cond3" dat$cond == "cond4"
yes = "Uniform"
no = ifelse(test =
2017 Jul 24
0
Ifelse statements and combining columns
Not a reproducible example, so a bit of guessing here, but
a) don't try to assign results to variables inside the ifelse. That is, remove all the single-equals signs and "test" variables. If you really need to conditionally assign variables then use "if"... but chances are good you don't need that.
b) "closure" is effectively another word
2008 May 23
0
[LLVMdev] mem2reg & reg2mem
I have a register allocation bug I'm trying to track down. It's caused by a
convoluted series of events that results in a massive amount of code,
so looking at asm diffs is rather unhelpful.
I came up with the bright idea of adding a MaxPromotes flag to limit
the number of candidates that mem2reg promotes. But I couldn't
figure out how to safely promote some candidates but not
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 ] ;
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 ; <i32>