Marcello Maggioni
2011-Nov-21 00:36 UTC
[LLVMdev] How to make Polly ignore some non-affine memory accesses
Sorry for the noobish question, but what kind of subscripts generate a SCEVCouldNotCompute from the SCEV engine? I tried for a while but I wasn't able to trigger that. 2011/11/20 Tobias Grosser <tobias at grosser.es>:> On 11/20/2011 03:01 AM, Marcello Maggioni wrote: >> >> 2011/11/19 Tobias Grosser<tobias at grosser.es>: >>> >>> On 11/18/2011 01:34 PM, Marcello Maggioni wrote: >>>> >>>> Ok , this is what I believe is the final patch that adds the >>>> non-affine accept functionality to Polly, this should have no issues. >>>> >>>> I added three tests, two in ScopInfo (two simple tests, one expected >>>> fail and one success based on the same source) and one in CodeGen that >>>> verifies that the code is generated. >>>> >>>> The patch is attached. >>> >>> The patch includes only one test case. I also have some tiny last >>> comments >>> inline. Otherwise the patch looks good. >>> >>>> +++ test/ScopInfo/simple_nonaffine_loop_exfail.ll (revision 0) >>>> @@ -0,0 +1,42 @@ >>>> +; RUN: opt %loadPolly %defaultOpts -polly-scops -analyze %s | >>>> FileCheck %s >>>> +; XFAIL: * >>> >>> Why is this one still XFAIL? >> >> I wanted to add a test case that in case of a "missing the flag" at >> command line confirmed the functionality was actually disabled (and >> this is the reason of the XFAIL test).he > > XFAIL it not the way to test this. You can just add another command line > to the passing test, remove the flag to enable non-affine access functions > and replace '| FileCheck' with '| not FileCheck'. > >> Originally you said I had to add a minimst al test case to the patch, >> should I add some more tests now withore complex scops? > > I do not see that a more complex scope would test more of the feature. You > could add a test case where the access subscript is not a valid > SCEV, but COULD_NOT_COMPUTE. > > Cheers > Tobi >
Tobias Grosser
2011-Nov-21 03:56 UTC
[LLVMdev] How to make Polly ignore some non-affine memory accesses
On 11/20/2011 04:36 PM, Marcello Maggioni wrote:> Sorry for the noobish question, but what kind of subscripts generate a > SCEVCouldNotCompute from the SCEV engine? > I tried for a while but I wasn't able to trigger thatHi Marcello, the SCEV returns SCEVCouldNotCompute in case it cannot analyze an expression or if the analysis would be to complicated. I am currently not sure if this may actually happen when calling getSCEV(), because getSCEV() could just return a SCEVUnknown referencing the Value itself. Maybe SCEVCouldNotCompute is just generated by functions like SE->getBackedgeTakenCount()? In case you cannot generate a test case that yields to this, I don't think there is a need to try more. Even without such a test case the patch should be OK. Cheers Tobi
Marcello Maggioni
2011-Nov-21 11:44 UTC
[LLVMdev] How to make Polly ignore some non-affine memory accesses
2011/11/21 Tobias Grosser <tobias at grosser.es>:> On 11/20/2011 04:36 PM, Marcello Maggioni wrote: >> >> Sorry for the noobish question, but what kind of subscripts generate a >> SCEVCouldNotCompute from the SCEV engine? >> I tried for a while but I wasn't able to trigger that > > Hi Marcello, > > the SCEV returns SCEVCouldNotCompute in case it cannot analyze an expression > or if the analysis would be to complicated. I am currently > not sure if this may actually happen when calling getSCEV(), because > getSCEV() could just return a SCEVUnknown referencing the Value itself. > Maybe SCEVCouldNotCompute is just generated by functions like > SE->getBackedgeTakenCount()? > > In case you cannot generate a test case that yields to this, I don't think > there is a need to try more. Even without such a test case the patch should > be OK. > > Cheers > Tobi >Ok, thanks, I'll try other test cases to check if everything is ok, better being sure. About SCOPs with a "bitcast instruction" inside them I see that ScopDetection discards those. What problems can cause bitcasts to the Scop? Is it related to aliasing? Marcello
Maybe Matching Threads
- [LLVMdev] How to make Polly ignore some non-affine memory accesses
- [LLVMdev] How to make Polly ignore some non-affine memory accesses
- [LLVMdev] How to make Polly ignore some non-affine memory accesses
- [LLVMdev] How to make Polly ignore some non-affine memory accesses
- [LLVMdev] How to make Polly ignore some non-affine memory accesses