This helps detect some missed BFI updates during CodeGenPrepare.
This is debug build only and disabled behind a flag.
Fix a missed update in CodeGenPrepare::dupRetToEnableTailCallOpts().
Paths
| Differential D77417
[BFI][CGP] Add limited support for detecting missed BFI updates and fix one in CodeGenPrepare. ClosedPublic Authored by hjyamauchi on Apr 3 2020, 10:52 AM.
Details Summary This helps detect some missed BFI updates during CodeGenPrepare. This is debug build only and disabled behind a flag. Fix a missed update in CodeGenPrepare::dupRetToEnableTailCallOpts().
Diff Detail
Event TimelineComment Actions There's already -verify, -verify-dom-info, etc. hjyamauchi marked 4 inline comments as done. Comment ActionsAddress comment.
hjyamauchi marked 2 inline comments as done. Comment ActionsAddress comment.
Comment Actions
Comment Actions
The flag name was renamed from "check" to "verify".
Comment Actions
Hmm, maybe i should be more verbose. Comment Actions Noting that the "updatedness" of BFI *during a pass* is currently only on a best effort basis, what this patch is intended to provide is to have a way to check how well BFI is updated during CGP. It's sort of a middle ground between teaching CGP to preserve BFI (which is hard) and having no way to assess how well it can preserve BFI. Because its updatedness could still have performance consequences. As I see it, this is a bit different from -verify/-verify-dom-info in that unlike -verify, it cannot be a separate pass as it needs to look at the state of BFI right before it gets erased at the end of CGP (as CGP isn't declared to preserve BFI), and unlike -verify-dom-info, Pass:verifyAnalysis isn't a good place to check it in as Pass:verifyAnalysis is called on preserved analyses only. Though we might be able to extend the pass manager interface to have a place for it (maybe checkNotPreservedAnalysis?) if it's really a good idea. I'm not sure if it's mature enough at this point to be generalized. This revision is now accepted and ready to land.Apr 23 2020, 10:22 AM Closed by commit rG1b4e3def0362: [BFI][CGP] Add limited support for detecting missed BFI updates and fix one in… (authored by hjyamauchi). · Explain WhyMay 7 2020, 12:28 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 254856 llvm/include/llvm/Analysis/BlockFrequencyInfo.h
llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h
llvm/lib/Analysis/BlockFrequencyInfo.cpp
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/test/CodeGen/AArch64/aarch64-tbz.ll
|
clang-format-diff not found in user's PATH; not linting file.