[PATCH] D20165: Check overflows in RTCs and bail accordingly

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Wed May 11 12:28:37 PDT 2016


grosser added a comment.

Hi Johannes,

this patch LGTM. Did you check if this results in major performance slowdowns?

It might also be a good idea to add an option that allows to generate RTCs not-at-all, run-time-checks-only, everywhere. Even though the everywhere option is currently probably still too costly, it might be useful in testing.

Best,
Tobias


================
Comment at: include/polly/CodeGen/IslExprBuilder.h:138
@@ +137,3 @@
+  ///
+  /// @param Enable Flag to enable/disable the tacking.
+  ///
----------------
tacking -> tracking

================
Comment at: include/polly/CodeGen/IslExprBuilder.h:140
@@ +139,3 @@
+  ///
+  /// If the tracking was enabled [disabled] and @p Enable is true [false] the
+  /// call to this function is basically a no-op.
----------------
the tracking is enabled ...

================
Comment at: lib/CodeGen/IslExprBuilder.cpp:35
@@ +34,3 @@
+    OverflowState = nullptr;
+  }
+}
----------------
This seems overly complicated. Any reason to not write:

```
  // Ignore calls that do not change the current state.
         ​  if (Enable)
	​    OverflowState = Builder.getFalse();
	​  else
	​    OverflowState = nullptr;
```


http://reviews.llvm.org/D20165





More information about the llvm-commits mailing list