diff options
| author | Jessica Paquette <jpaquette@apple.com> | 2018-09-04 21:03:43 +0000 |
|---|---|---|
| committer | Jessica Paquette <jpaquette@apple.com> | 2018-09-04 21:03:43 +0000 |
| commit | 31d2e5e546c9b3ad6cbcccbe40d2b6bf582a854b (patch) | |
| tree | e8060b9cee513ff4f50cda2dec908969d8d7187f /llvm/lib/IR | |
| parent | fd458fe2051ddc8d1a0e37b9a44e2bb9900d6383 (diff) | |
| download | bcm5719-llvm-31d2e5e546c9b3ad6cbcccbe40d2b6bf582a854b.tar.gz bcm5719-llvm-31d2e5e546c9b3ad6cbcccbe40d2b6bf582a854b.zip | |
[NFC] Improve clarity in emitInstrCountChangedRemark
Add a "CouldOnlyImpactOneFunction" bool that's true when we pass in a function.
Just cleaning up a little bit, since I'm going to add in the per-function
remarks soon from D51467.
llvm-svn: 341407
Diffstat (limited to 'llvm/lib/IR')
| -rw-r--r-- | llvm/lib/IR/LegacyPassManager.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp index b06d596d1f9..5435e07e688 100644 --- a/llvm/lib/IR/LegacyPassManager.cpp +++ b/llvm/lib/IR/LegacyPassManager.cpp @@ -152,8 +152,11 @@ void PMDataManager::emitInstrCountChangedRemark(Pass *P, Module &M, if (P->getAsPMDataManager()) return; + // Set to true if this isn't a module pass or CGSCC pass. + bool CouldOnlyImpactOneFunction = (F != nullptr); + // Do we have a function we can use to emit a remark? - if (F == nullptr) { + if (!CouldOnlyImpactOneFunction) { // We need a function containing at least one basic block in order to output // remarks. Since it's possible that the first function in the module // doesn't actually contain a basic block, we have to go and find one that's |

