[PATCH] D20143: New pass: guard widening

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Thu May 12 15:18:22 PDT 2016


sanjoy added a comment.

Realized I had an unsubmitted comment


================
Comment at: lib/Transforms/Scalar/GuardWidening.cpp:81-95
@@ +80,17 @@
+  /// Used to keep track of which widening potential is more effective.
+  enum WideningScore {
+    /// Don't widen.
+    WS_IllegalOrNegative,
+
+    /// Widening is performance neutral as far as the cycles spent in check
+    /// conditions goes (but can still help, e.g., code layout, having less
+    /// deopt state).
+    WS_Neutral,
+
+    /// Widening is profitable.
+    WS_Positive,
+
+    /// Widening is very profitable.  Not significantly different from \c
+    /// WS_Positive, except by the order.
+    WS_VeryPositive
+  };
----------------
majnemer wrote:
> Your enum is defined in a class, I think you can forgo the WS prefix if you'd like.
I think I'll keep it for now, it reads a little better when I use it without qualification.


http://reviews.llvm.org/D20143





More information about the llvm-commits mailing list