search for: createnodeforphi

Displaying 15 results from an estimated 15 matches for "createnodeforphi".

2013 Oct 02
1
[LLVMdev] ScalarEvolution::createNodeForPHI
...he range of values that a > variable can hold before the loop hits undefined behavior. I don’t > know how to implement something like this yet. Ideas are welcome. > > Reading this code again, even the addition case looks too aggressive > to me. > See: > llvm.org/PR17452 - SCEV createNodeForPHI is too optimistic about NSW. > > -Andy > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > -- Hal Finkel Assistant Computational Scien...
2013 Oct 03
0
[LLVMdev] ScalarEvolution::createNodeForPHI
...he range of values that a variable can hold before the loop hits undefined behavior. I don’t know how to implement something like this yet. Ideas are welcome. >> >> Reading this code again, even the addition case looks too aggressive to me. >> See: >> llvm.org/PR17452 - SCEV createNodeForPHI is too optimistic about NSW. >> > > If the behavior is different between 'add nsw' and 'sub nsw' then the SCEV > canonicalization of 'sub' leads to incorrect results. > > In your example both result should be the same but the 'add' produces a p...
2013 Oct 02
0
[LLVMdev] ScalarEvolution::createNodeForPHI
...r. For example, I’d like to query the range of values that a variable can hold before the loop hits undefined behavior. I don’t know how to implement something like this yet. Ideas are welcome. Reading this code again, even the addition case looks too aggressive to me. See: llvm.org/PR17452 - SCEV createNodeForPHI is too optimistic about NSW. -Andy
2013 Oct 03
0
[LLVMdev] ScalarEvolution::createNodeForPHI
...e range of values that a variable can hold before the loop hits undefined behavior. I don’t know how to implement something like this yet. Ideas are welcome. >> >> Reading this code again, even the addition case looks too aggressive to me. >> See: >> llvm.org/PR17452 - SCEV createNodeForPHI is too optimistic about NSW. >> > > If the behavior is different between 'add nsw' and 'sub nsw' then the SCEV > canonicalization of 'sub' leads to incorrect results. Creating a SCEV expression for a sub instruction drops the flags. It’s safe, but the flags...
2013 Oct 03
0
[LLVMdev] ScalarEvolution::createNodeForPHI
On Oct 3, 2013, at 11:06 AM, Michele Scandale <michele.scandale at gmail.com> wrote: >> My very abstract suggestion for future improvements are: >> - At the SCEV level, logic to deduce that some recurrences cannot wrap given a set of loop facts derived from the IR and represented independent from the SCEV expressions themselves. > > I agree with this. I noticed that value
2013 Oct 01
3
[LLVMdev] ScalarEvolution::createNodeForPHI
Hello to everybody, I'm working on some improvements on trip count computation with ScalarEvolution analysis. Considering the following test ;----------------------------------------------------------------------------; define void @foo(i32 %a, i32 %b, i32 %s) #0 { entry: %cmp = icmp sgt i32 %s, 0 %cmp15 = icmp sgt i32 %a, %b %or.cond = and i1 %cmp, %cmp15 br i1 %or.cond, label
2013 Oct 03
1
[LLVMdev] ScalarEvolution::createNodeForPHI
----- Original Message ----- > > > > > On Oct 3, 2013, at 11:06 AM, Michele Scandale < > michele.scandale at gmail.com > wrote: > > > > > My very abstract suggestion for future improvements are: > - At the SCEV level, logic to deduce that some recurrences cannot > wrap given a set of loop facts derived from the IR and represented >
2013 Oct 03
4
[LLVMdev] ScalarEvolution::createNodeForPHI
...like to query the range of values that a variable can hold before the loop hits undefined behavior. I don’t know how to implement something like this yet. Ideas are welcome. > > Reading this code again, even the addition case looks too aggressive to me. > See: > llvm.org/PR17452 - SCEV createNodeForPHI is too optimistic about NSW. > If the behavior is different between 'add nsw' and 'sub nsw' then the SCEV canonicalization of 'sub' leads to incorrect results. In your example both result should be the same but the 'add' produces a poison value. Is this what we...
2013 Oct 03
2
[LLVMdev] ScalarEvolution::createNodeForPHI
...es that a variable can hold before the loop hits undefined behavior. I don’t know how to implement something like this yet. Ideas are welcome. >>> >>> Reading this code again, even the addition case looks too aggressive to me. >>> See: >>> llvm.org/PR17452 - SCEV createNodeForPHI is too optimistic about NSW. >>> >> >> If the behavior is different between 'add nsw' and 'sub nsw' then the SCEV >> canonicalization of 'sub' leads to incorrect results. > > Creating a SCEV expression for a sub instruction drops the flags....
2012 Dec 10
3
[LLVMdev] [PATCH] Teaching ScalarEvolution to handle IV=add(zext(trunc(IV)), Step)
...; preds = %for.body 15: %conv1 = trunc i32 %add to i8 16: ret i8 %conv1 17: } Unfortunately, the 'and' on line 8 prevents Scalar Evolution from being able to create an expression for '%add' that it knows how to evaluate. The patch detects this pattern in createNodeForPHI and creates an equivalent expression that can be evaluated. Note that SCEV translates the 'and' into ZeroExtend(Truncate(%result.03, i8), i32) So in terms of SCEV expressions, we essentially have %add[n] = Add(ZeroExtend(Truncate(%add[n-1], i8), i32), 3) (BTW, I'm no scholar he...
2012 Dec 17
0
[LLVMdev] [PATCH] Teaching ScalarEvolution to handle IV=add(zext(trunc(IV)), Step)
...got this IR from that C testcase. What is result_t? Did you do anything special? > Unfortunately, the 'and' on line 8 prevents Scalar Evolution from > being able to create an expression for '%add' that it knows how to > evaluate. > > The patch detects this pattern in createNodeForPHI and creates an > equivalent expression that can be evaluated. > > Note that SCEV translates the 'and' into > ZeroExtend(Truncate(%result.03, i8), i32) > > So in terms of SCEV expressions, we essentially have > %add[n] = Add(ZeroExtend(Truncate(%add[n-1], i8), i32),...
2012 Dec 18
2
[LLVMdev] [PATCH] Teaching ScalarEvolution to handle IV=add(zext(trunc(IV)), Step)
...R produced by the current clang trunk is not quite the same. >> Unfortunately, the 'and' on line 8 prevents Scalar Evolution from >> being able to create an expression for '%add' that it knows how to >> evaluate. >> >> The patch detects this pattern in createNodeForPHI and creates an >> equivalent expression that can be evaluated. >> >> Note that SCEV translates the 'and' into >> ZeroExtend(Truncate(%result.03, i8), i32) >> >> So in terms of SCEV expressions, we essentially have >> %add[n] = Add(ZeroExtend(T...
2010 Jun 12
0
[LLVMdev] experimenting with partial evaluation
Good evening, Pierre. Here is an example to you. attached. run with -disable-lazy-comilation. It is *as-is* for Win32 but might be applicable to *-linux-elf more smartly. It does get llvm::Function* by function ptr(not name!), and clone a specialized function, and execute specialized one in the same context as parent lli. > - In a running program, can I get pointers to the llvm Module that
2010 Jun 11
2
[LLVMdev] experimenting with partial evaluation
Hello ! I wanted to experiment with partial evaluation and llvm seems to be the right tool for this, but since I'm new to it of course I'm a bit lost ! I'll try to explain what I want to do in the simplest possible way : I have a C program. In this program, there is a function f( a,b ). I have a value A for a. I want to specialise f() so I get a function fA( b ) which is the same as
2015 Jan 15
4
[LLVMdev] confusion w.r.t. scalar evolution and nuw
I've been doing some digging in this area (scev, wrapping arithmetic), learning as much as I can, and have reached a point where I'm fairly confused about the semantics of nuw in scalar evolution expressions. Consider the following program: define void @foo(i32 %begin) { entry: br label %loop loop: %idx = phi i32 [ %begin, %entry ], [ %idx.dec, %loop ] %idx.dec = sub nuw i32