[PATCH] D54588: [llvm][IRBuilder] Introspection for CreateAlignmentAssumption*() functions

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 16 09:15:04 PST 2018


hfinkel added inline comments.


================
Comment at: include/llvm/IR/IRBuilder.h:2127
+  /// Used to propagate some additional information from the
+  /// `CreateAlignmentAssumptionHelper` to clang `CreateAlignmentAssumption()`,
+  /// in addition to the normally returned `CallInst *` that was built.
----------------
Don't mention Clang specifics in IRBuilder's documentation. That's not relevant here.


================
Comment at: include/llvm/IR/IRBuilder.h:2131
+    /// On which value (after ptr2int conversion, and potentially subtraction
+    /// of the offset value) is the alignment check performed?
+    Value *PtrIntValue = nullptr;
----------------
This is a question?


================
Comment at: include/llvm/IR/IRBuilder.h:2132
+    /// of the offset value) is the alignment check performed?
+    Value *PtrIntValue = nullptr;
+    /// The alignment check itself (`i1`), which is then used in the assumption.
----------------
Also, it's not clear to me why you need this. A sanitizer should get the both the original pointer and the offset to give maximum information to the user. No?


Repository:
  rL LLVM

https://reviews.llvm.org/D54588





More information about the llvm-commits mailing list