[PATCH] D71787: [Attributor] UB Attribute now handles all instructions that access memory through a pointer

Stefan Stipanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 20 15:18:52 PST 2019


sstefan1 added a comment.

Quick initial comment



================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:2033
 
-    A.checkForAllInstructions(InspectLoadForUB, *this, {Instruction::Load});
-    if (PrevSize != NoUBLoads.size())
+    A.checkForAllInstructions(InspectMemAccessInstForUB, *this,
+                              {Instruction::Load, Instruction::Store,
----------------
I think you should be able to use `CheckForAllReadWriteInstructions` here. Then you don't need to add 2 additional cases in `initializeInformationCache`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71787/new/

https://reviews.llvm.org/D71787





More information about the llvm-commits mailing list