[LV] Handling MinMax Index Pattern (part 1)
The following patch is to identify MinMax Pattern in Loop Vectorizer, e.g. :
for ( ... ) {
if(x>cur_max) { cur_max = x; cur_max_idx = i; }
}
Currently it support simple induction case with step 1.
Paths
| Differential D22341
MinMax Index Pattern Identification Needs ReviewPublic Authored by magabari on Jul 14 2016, 12:37 AM.
Details
Diff Detail Event Timelinemagabari updated this object. delena added inline comments.
magabari added inline comments.
Comment Actions Two notes, before I start the actual review: First - next time, please don't add llvm-commits after the patch has already been put up for review. Second - is this a complete patch? The "return Maybe; //TODO: FIX" looks fishy. And I didn't see anything actually using the Maybe return value. Comment Actions
Regarding your first point Okay. Comment Actions The problem is that as long as the Yes/No/Maybe interface doesn't get used, it's really hard to understand whether it makes sense. In this case, I suggest you post a more complete patch (for a new review, with llvm-commits subscribed), even if thought it'll be larger.
Revision Contents
Diff 63929 include/llvm/Transforms/Utils/LoopUtils.h
lib/Transforms/Scalar/LoopInterchange.cpp
lib/Transforms/Utils/LoopUtils.cpp
lib/Transforms/Vectorize/LoopVectorize.cpp
|
line alignment