[PATCH] D13543: [LVI/CVP] Teach LVI about range metadata

Chen Li via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 12:43:52 PDT 2015


chenli added inline comments.

================
Comment at: lib/Analysis/LazyValueInfo.cpp:502
@@ +501,3 @@
+static LVILatticeVal getFromRangeMetadata(Instruction *BBI) {
+  switch (BBI->getOpcode()) {
+  default: break;
----------------
Do we actually need to check the Opcode? For instructions those cannot have range metadata, getMetadata(LLVMContext::MD_range) will just return a nullptr. If range metadata is extended for other instructions in the future, this switch statement has to be updated as well. I think it might be better to just get rid of the switch. 


http://reviews.llvm.org/D13543





More information about the llvm-commits mailing list