[PATCH] D14599: [safestack] Rewrite isAllocaSafe using SCEV.

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 11 18:24:17 PST 2015


sanjoy added inline comments.

================
Comment at: lib/Transforms/Instrumentation/SafeStack.cpp:186
@@ +185,3 @@
+  ConstantRange AccessStartRange =
+      SE->getUnsignedRange(Expr).intersectWith(SE->getSignedRange(Expr));
+  ConstantRange SizeRange =
----------------
I don't think you need to intersect here -- if the intersection returns a "better" (i.e. strictly smaller) range than either `getUnsignedRange` or `getSignedRange`, then it is a bug in ScalarEvolution. :)

Reading the surrounding code, I think you really only need `getUnsignedRange`.


Repository:
  rL LLVM

http://reviews.llvm.org/D14599





More information about the llvm-commits mailing list