diff --git a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp index 4b3f0e23903aa..3d8b7cbb59630 100644 --- a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp +++ b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp @@ -199,7 +199,7 @@ static bool markFunctionCold(Function &F, bool UpdateEntryCount = false) { F.addFnAttr(Attribute::Cold); Changed = true; } - if (!F.hasFnAttribute(Attribute::MinSize)) { + if (!F.hasMinSize()) { F.addFnAttr(Attribute::MinSize); Changed = true; } diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp index a518e02d762f6..ba598d8415b18 100644 --- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp +++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp @@ -303,7 +303,7 @@ bool JumpThreadingPass::runImpl(Function &F_, FunctionAnalysisManager *FAM_, // size. if (BBDuplicateThreshold.getNumOccurrences()) BBDupThreshold = BBDuplicateThreshold; - else if (F->hasFnAttribute(Attribute::MinSize)) + else if (F->hasMinSize()) BBDupThreshold = 3; else BBDupThreshold = DefaultBBDupThreshold;