Skip to content

Commit

Permalink
PassTimingInfo: test TheTimeInfo first. NFC
Browse files Browse the repository at this point in the history
TheTimeInfo is a member variable and is often non-null, allowing the
caller `getPassTimer` to skip one check.
  • Loading branch information
MaskRay committed Jan 11, 2025
1 parent cfe2635 commit 7c886d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/IR/PassTimingInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ PassTimingInfo::~PassTimingInfo() {
}

void PassTimingInfo::init() {
if (!TimePassesIsEnabled || TheTimeInfo)
if (TheTimeInfo || !TimePassesIsEnabled)
return;

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

0 comments on commit 7c886d5

Please sign in to comment.