[PATCH] D62656: Make SwitchInstProfUpdateWrapper safer
Yevgeny Rouban via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 20:26:59 PDT 2019
yrouban added a comment.
In D62656#1523764 <https://reviews.llvm.org/D62656#1523764>, @davidxl wrote:
> What I meant is that we should never see inconsistent state and instead of setting invalid state, we assert there.
Yes. But in LLVM there are many places to fix. So we have to fix all of them at once and set the assertion here. The other option is to fix them one by one and tolerate such inconsistencies.
For example, SimplifyCFG is safe: it checks that the prof data is ok and only then makes its prof changes.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the llvm-commits