Skip to content

Commit 37a86cb

Browse files
authored
[NFC] Use the hasMinSize() instead of hasFnAttribute(Attribute::MinSize) (#135328)
The other code all use the hasMinSize(), so I change the last two hasFnAttribute(Attribute::MinSize).
1 parent 3e743a5 commit 37a86cb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/lib/Transforms/IPO/HotColdSplitting.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ static bool markFunctionCold(Function &F, bool UpdateEntryCount = false) {
199199
F.addFnAttr(Attribute::Cold);
200200
Changed = true;
201201
}
202-
if (!F.hasFnAttribute(Attribute::MinSize)) {
202+
if (!F.hasMinSize()) {
203203
F.addFnAttr(Attribute::MinSize);
204204
Changed = true;
205205
}

llvm/lib/Transforms/Scalar/JumpThreading.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ bool JumpThreadingPass::runImpl(Function &F_, FunctionAnalysisManager *FAM_,
303303
// size.
304304
if (BBDuplicateThreshold.getNumOccurrences())
305305
BBDupThreshold = BBDuplicateThreshold;
306-
else if (F->hasFnAttribute(Attribute::MinSize))
306+
else if (F->hasMinSize())
307307
BBDupThreshold = 3;
308308
else
309309
BBDupThreshold = DefaultBBDupThreshold;

0 commit comments

Comments
 (0)