search for: createnodeforgep

Displaying 7 results from an estimated 7 matches for "createnodeforgep".

2013 Nov 13
2
[LLVMdev] SCEV getMulExpr() not propagating Wrap flags
...!tbaa !1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 512 br i1 %exitcond, label %for.end, label %for.body And, when going through the GEP: %0 = shl nsw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds i32* %b, i64 %0 ScalarEvolution::createNodeForGEP() is losing the SCEV::FlagNSW, and I believe it's because of this piece of code in getMulExpr(): // Build the new addrec. Propagate the NUW and NSW flags if both the // outer mul and the inner addrec are guaranteed to have no overflow. // // No self-wrap cannot be guara...
2013 Oct 31
2
[LLVMdev] SCEV and GEP NSW flag
...+ %a),+,4}<%for.body> and the problem is that this expression, even though it comes from a inbounds GEP, with nsw on all contributing instructions, does not have the <nsw> flag. I think that the problem is the (4 * %k) 'Index' expression, which lacks the no-wrap flags, and when createNodeForGEP uses it to construct the overall expression for the address, the result also lacks the nsw flag. The reason that the (4 * %k) 'Index' expression lacks the flags is explained in createSCEV: // Don't apply this instruction's NSW or NUW flags to the new // expression. The ins...
2013 Nov 16
0
[LLVMdev] SCEV getMulExpr() not propagating Wrap flags
...%indvars.iv, 1 > %exitcond = icmp eq i64 %indvars.iv.next, 512 > br i1 %exitcond, label %for.end, label %for.body > > And, when going through the GEP: > > %0 = shl nsw i64 %indvars.iv, 1 > %arrayidx = getelementptr inbounds i32* %b, i64 %0 > > ScalarEvolution::createNodeForGEP() is losing the SCEV::FlagNSW, and I believe it's because of this piece of code in getMulExpr(): > > // Build the new addrec. Propagate the NUW and NSW flags if both the > // outer mul and the inner addrec are guaranteed to have no overflow. > // > // No...
2013 Nov 02
0
[LLVMdev] SCEV and GEP NSW flag
...<%for.body> > > and the problem is that this expression, even though it comes from a inbounds GEP, with nsw on all contributing instructions, does not have the <nsw> flag. I think that the problem is the (4 * %k) 'Index' expression, which lacks the no-wrap flags, and when createNodeForGEP uses it to construct the overall expression for the address, the result also lacks the nsw flag. > > The reason that the (4 * %k) 'Index' expression lacks the flags is explained in createSCEV: > > // Don't apply this instruction's NSW or NUW flags to the new >...
2013 Nov 02
2
[LLVMdev] SCEV and GEP NSW flag
...blem is that this expression, even though it comes from > > a inbounds GEP, with nsw on all contributing instructions, does > > not have the <nsw> flag. I think that the problem is the (4 * %k) > > 'Index' expression, which lacks the no-wrap flags, and when > > createNodeForGEP uses it to construct the overall expression for > > the address, the result also lacks the nsw flag. > > > > The reason that the (4 * %k) 'Index' expression lacks the flags is > > explained in createSCEV: > > > > // Don't apply this instruction...
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