[PATCH] D51523: Return "[NFC] Add severe validation of InstructionPrecedenceTracking"
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 5 20:42:31 PDT 2018
mkazantsev added inline comments.
================
Comment at: lib/Analysis/InstructionPrecedenceTracking.cpp:101
+
+ // Check that all blocks with cached values are marked as known.
+ for (auto &It : FirstSpecialInsts)
----------------
reames wrote:
> You can write this as:
> assert(KnownBlocks.size() == FirstSpecialInsts.size())
>
> since you've already validated each bloc, if there are no other special instructions, no further validation is needed.
It is not true. We can have some block in `KnownBlocks` and nothing in `FirstSpecialInsts`, and it will mean that there is no special instructions in this block. Maybe it makes sense to put `nullptr` for such blocks instead and completely eliminate `KnownBlocks`, I'll do it as a follow-up NFC.
https://reviews.llvm.org/D51523
More information about the llvm-commits
mailing list