Skip to content

Commit 7c886d5

Browse files
committed
PassTimingInfo: test TheTimeInfo first. NFC
TheTimeInfo is a member variable and is often non-null, allowing the caller `getPassTimer` to skip one check.
1 parent cfe2635 commit 7c886d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/IR/PassTimingInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ PassTimingInfo::~PassTimingInfo() {
103103
}
104104

105105
void PassTimingInfo::init() {
106-
if (!TimePassesIsEnabled || TheTimeInfo)
106+
if (TheTimeInfo || !TimePassesIsEnabled)
107107
return;
108108

109109
// Constructed the first time this is called, iff -time-passes is enabled.

0 commit comments

Comments
 (0)