Displaying 20 results from an estimated 5000 matches similar to: "[LLVMdev] question on constant folding"
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 again; since this
isn't efficient code, I'm wondering if
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>
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
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
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
2013 Aug 15
0
[LLVMdev] [Polly] Analysis of extra compile-time overhead for simple nested loops
Codeprepare and independent blocks are introducing these loads and stores.
These are prepasses that polly runs prior to building the dependence graph
to transform scalar dependences into data dependences.
Ether was working on eliminating the rewrite of scalar dependences.
On Thu, Aug 15, 2013 at 5:32 AM, Star Tan <tanmx_star at yeah.net> wrote:
> Hi all,
>
> I have investigated the
2012 Aug 20
2
[LLVMdev] How to eliminate PHI nodes on pointer types?
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 had this problem before, and know a transformation to eliminate
it? My optimization passes rely on
2013 Aug 16
2
[LLVMdev] [Polly] Analysis of extra compile-time overhead for simple nested loops
Hi Sebpop,
Thanks for your explanation.
I noticed that Polly would finally run the SROA pass to transform these load/store instructions into scalar operations. Is it possible to run such a pass before polly-dependence analysis?
Star Tan
At 2013-08-15 21:12:53,"Sebastian Pop" <sebpop at gmail.com> wrote:
>Codeprepare and independent blocks are introducing these loads and
2013 Aug 16
0
[LLVMdev] [Polly] Analysis of extra compile-time overhead for simple nested loops
I do not think that running SROA before polly is a good idea:
it would defeat the purpose of the code preparation passes that
polly intentionally schedules for the data dependence analysis.
If you remove the data references before polly runs, you would
miss them in the dependence graph: that could lead to incorrect
transforms.
On Thu, Aug 15, 2013 at 7:28 PM, Star Tan <tanmx_star at
2015 Apr 21
2
[LLVMdev] RFC: Missing canonicalization in LLVM
So this change did indeed have an effect! :)
I’m seeing regressions in a number of benchmarks mainly due to a host of extra bitcasts that get introduced. Here’s the problem I’m seeing in a nutshell:
1) There is a Phi with input type double
2) Polly demotes the phi into a load/store of type double
3) InstCombine canonicalizes the load/store to use i64 instead of double
4)
2008 Dec 09
1
[LLVMdev] scalar-evolution + indvars fail to get the loop trip count?
Hi,
Seems pass scalar-evolution+indvars fail to get the loop trip count of the
following case:
int foo(int x, int y, int lam[256], int alp[256]) {
int i;
int z = y;
for (i = 255; i >= 0; i--) {
z += x;
lam[i] = alp[i];
}
return z;
}
The final optimized ll code is :
define i32 @foo(i32 %x, i32 %y, i32* %lam, i32* %alp) nounwind {
entry:
br label %bb
bb:
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 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 reg2mem source code.
Teemu
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
2011 Aug 31
0
[LLVMdev] Getting rid of phi instructions?
On Wed, Aug 31, 2011 at 2:35 AM, Teemu Rinta-aho
<teemu.rinta-aho at nomadiclab.com> wrote:
> 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
2010 Oct 20
0
[LLVMdev] Pass Incompatibility
On 10/20/10 6:05 AM, Luke Dalessandro wrote:
> I have a transformation where I'd like to use both DominatorTree (for ExtractCodeRegion), and DemoteRegisterToMemory (i.e., reg2mem). The transformation is phased, so all occurrences of getAnalysis<DominatorTree>(Function) happen before any occurrence of getAnalysisID<FunctionPass>(&DemoteRegisterToMemoryID, Function).
I
2015 Apr 23
2
[LLVMdev] RFC: Missing canonicalization in LLVM
Thanks for the reply Pete. Unfortunately, I don’t think it is going to be as simple as ignoring those loads which only store. In findCommonType(), only one alloca is passed in at a time. So, while you could find those cases where that alloca was loaded from and stored elsewhere, you can’t find those places that store to that alloca from somewhere else (at least not easily that I can see).
So
2007 May 04
2
[LLVMdev] makefile commands
When using the makefiles in LLVM, the commands that Make executes are
hidden from the user. Instead something like:
llvm[3]: Compiling Reg2Mem.cpp for Debug build
is printed to the terminal, rather than the commands that are used to
build Reg2Mem.cpp. Is there a way to get the makefiles to print the
commands that they are executing?
Regards,
Ryan