Use ISL to compute the loop trip count when scalar evolution is
unable to do so.
Patch originally by Johannes Doerfert!
Paths
| Differential D9444
Use ISL to Determine Loop Trip Count ClosedPublic Authored by mssimpso on May 1 2015, 2:05 PM.
Details Summary Use ISL to compute the loop trip count when scalar evolution is Patch originally by Johannes Doerfert!
Diff Detail Event Timelinemssimpso updated this object. Comment Actions Some comments are inlined. Except those and the test coverage we could improve the patch LGTM. We should probably add a test case for the nsw problem, e.g., that we do not check for nsw and therefore can assume an unconstrainted loop. The example should probably look similar to the one below, however we would need to force ScalarEvolution to not recognize the loop trip count. // Infinite loop for N < 0 in a non-wrapping world. for (int i = 0; i < N; i++) A[i] = i;
Comment Actions Is this patch waiting for some kind of feedback from my side? Johannes already gave a good review so feel free to follow up with him. One comment:
mssimpso edited edge metadata. Comment ActionsRebased and addressed comments. Thanks for the reviews! Flag is now enabled by default. My apologies for waiting so long to update this patch. I've addressed your mssimpso added inline comments.
mssimpso retitled this revision from [Polly] Use ISL to Determine Loop Trip Count to Use ISL to Determine Loop Trip Count.Aug 24 2015, 12:55 PM jdoerfert edited edge metadata. Comment ActionsLGTM, if it passes LNT (and maybe even your internal test). I will work on the domain modeling again soon but this is a really good starting point.
This revision is now accepted and ready to land.Aug 24 2015, 8:52 PM mssimpso added inline comments.
mssimpso edited edge metadata. Comment ActionsRemoved some refactoring to restore correct behavior. Please feel free to commit this change when you're satisfied with it, as I do Closed by commit rL246142: Use ISL to Determine Loop Trip Count (authored by jdoerfert). · Explain WhyAug 26 2015, 11:55 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 32987 include/polly/ScopDetection.h
include/polly/ScopInfo.h
include/polly/Support/SCEVAffinator.h
lib/Analysis/ScopDetection.cpp
lib/Analysis/ScopInfo.cpp
lib/Support/SCEVAffinator.cpp
test/ScopInfo/isl_trip_count_01.ll
test/ScopInfo/isl_trip_count_02.ll
|
For now we can be restrictive but could you explain to me why do we need this part? I want to refactor the Domain creation soon and any information you have would be usefull.