[PATCH] D26806: [IRCE] Avoid loop optimizations on pre and post loops
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 11 19:42:27 PST 2016
sanjoy accepted this revision.
sanjoy added a comment.
This revision is now accepted and ready to land.
lgtm with a test case and an inline comment
================
Comment at: lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp:427
+ MDs.push_back(DisableDistribution);
+ MDNode *NewLoopID = MDNode::get(Context, MDs);
+ // Set operand 0 to refer to the loop id itself.
----------------
I'd structure this a little differently -- I'd avoid the `SmallVector` and instead do:
```
MDNode *NewLoopID = MDNode::get(Context, {DisableUnroll, DisableVectorize, DisableLICMVersioning ...});
```
https://reviews.llvm.org/D26806
More information about the llvm-commits
mailing list