[PATCH] D51523: Return "[NFC] Add severe validation of InstructionPrecedenceTracking"

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 2 20:38:47 PDT 2018


mkazantsev added inline comments.


================
Comment at: include/llvm/Analysis/InstructionPrecedenceTracking.h:51
   InstructionPrecedenceTracking(DominatorTree *DT)
       : OI(OrderedInstructions(DT)) {}
 
----------------
reames wrote:
> I really really think there should be a destructor here which checks to make sure the information is still valid.  If the info is no longer used, a client can call clear explicitly.
I don't understand why we want it to be valid on destructor. We definitely are not going to use this after the destructor is executed, it's OK if it contains garbage. We only want the contents to be OK on *queries*.


https://reviews.llvm.org/D51523





More information about the llvm-commits mailing list