[llvm] r341407 - [NFC] Improve clarity in emitInstrCountChangedRemark
Jessica Paquette via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 4 14:03:43 PDT 2018
Author: paquette
Date: Tue Sep 4 14:03:43 2018
New Revision: 341407
URL: http://llvm.org/viewvc/llvm-project?rev=341407&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/IR/LegacyPassManager.cpp
Modified: llvm/trunk/lib/IR/LegacyPassManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/LegacyPassManager.cpp?rev=341407&r1=341406&r2=341407&view=diff
==============================================================================
--- llvm/trunk/lib/IR/LegacyPassManager.cpp (original)
+++ llvm/trunk/lib/IR/LegacyPassManager.cpp Tue Sep 4 14:03:43 2018
@@ -152,8 +152,11 @@ void PMDataManager::emitInstrCountChange
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
More information about the llvm-commits
mailing list