diff options
Diffstat (limited to 'llvm/lib/IR/LegacyPassManager.cpp')
-rw-r--r-- | llvm/lib/IR/LegacyPassManager.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp index b04787cb30e..46bfba7f5a0 100644 --- a/llvm/lib/IR/LegacyPassManager.cpp +++ b/llvm/lib/IR/LegacyPassManager.cpp @@ -545,7 +545,11 @@ public: Timer *&T = TimingData[P]; if (!T) { StringRef PassName = P->getPassName(); - T = new Timer(PassName, PassName, TG); + StringRef PassArgument; + if (const PassInfo *PI = Pass::lookupPassInfo(P->getPassID())) + PassArgument = PI->getPassArgument(); + T = new Timer(PassArgument.empty() ? PassName : PassArgument, PassName, + TG); } return T; } |