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

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 16:09:49 PST 2015


eugenis added inline comments.

================
Comment at: lib/Transforms/Instrumentation/SafeStack.cpp:186
@@ +185,3 @@
+  ConstantRange AccessStartRange = SE->getUnsignedRange(Expr);
+  ConstantRange SizeRange =
+      ConstantRange(APInt(BitWidth, 0), APInt(BitWidth, Size));
----------------
Is it because we are comparing it with a non-negative alloca range, and even if the signed range is "smaller", it would still overflow in the negative direction?

Switched to getUnsignedRange.




Repository:
  rL LLVM

http://reviews.llvm.org/D14599





More information about the llvm-commits mailing list