[PATCH] D26806: [IRCE] Avoid loop optimizations on pre and post loops

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 13:16:19 PST 2016


anna marked an inline comment as done.
anna added a comment.

Added a test case as well



================
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.
----------------
sanjoy wrote:
> I'd structure this a little differently -- I'd avoid the `SmallVector` and instead do:
> 
> ```
> MDNode *NewLoopID = MDNode::get(Context, {DisableUnroll, DisableVectorize, DisableLICMVersioning ...});
> ```
> 
Updated.


Repository:
  rL LLVM

https://reviews.llvm.org/D26806





More information about the llvm-commits mailing list