diff options
Diffstat (limited to 'llvm/lib/Transforms/IPO')
-rw-r--r-- | llvm/lib/Transforms/IPO/FunctionAttrs.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Transforms/IPO/HotColdSplitting.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Transforms/IPO/Inliner.cpp | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp index d396882cc7e..28982d66d7d 100644 --- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp @@ -1366,7 +1366,7 @@ PreservedAnalyses PostOrderFunctionAttrsPass::run(LazyCallGraph::SCC &C, bool HasUnknownCall = false; for (LazyCallGraph::Node &N : C) { Function &F = N.getFunction(); - if (F.optForNone() || F.hasFnAttribute(Attribute::Naked)) { + if (F.hasOptNone() || F.hasFnAttribute(Attribute::Naked)) { // Treat any function we're trying not to optimize as if it were an // indirect call and omit it from the node set used below. HasUnknownCall = true; @@ -1439,7 +1439,7 @@ static bool runImpl(CallGraphSCC &SCC, AARGetterT AARGetter) { bool ExternalNode = false; for (CallGraphNode *I : SCC) { Function *F = I->getFunction(); - if (!F || F->optForNone() || F->hasFnAttribute(Attribute::Naked)) { + if (!F || F->hasOptNone() || F->hasFnAttribute(Attribute::Naked)) { // External node or function we're trying not to optimize - we both avoid // transform them and avoid leveraging information they provide. ExternalNode = true; diff --git a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp index c4348c3685e..ab1a9a79cad 100644 --- a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp +++ b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp @@ -149,7 +149,7 @@ static bool mayExtractBlock(const BasicBlock &BB) { /// module has profile data), set entry count to 0 to ensure treated as cold. /// Return true if the function is changed. static bool markFunctionCold(Function &F, bool UpdateEntryCount = false) { - assert(!F.optForNone() && "Can't mark this cold"); + assert(!F.hasOptNone() && "Can't mark this cold"); bool Changed = false; if (!F.hasFnAttribute(Attribute::Cold)) { F.addFnAttr(Attribute::Cold); @@ -673,7 +673,7 @@ bool HotColdSplitting::run(Module &M) { continue; // Do not modify `optnone` functions. - if (F.optForNone()) + if (F.hasOptNone()) continue; // Detect inherently cold functions and mark them as such. diff --git a/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp b/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp index dfe375de65d..7f5511e008e 100644 --- a/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp +++ b/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp @@ -25,7 +25,7 @@ static bool inferAllPrototypeAttributes(Module &M, for (Function &F : M.functions()) // We only infer things using the prototype and the name; we don't need // definitions. - if (F.isDeclaration() && !F.optForNone()) + if (F.isDeclaration() && !F.hasOptNone()) Changed |= inferLibFuncAttributes(F, TLI); return Changed; diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp index b647b27642c..4047c0acd19 100644 --- a/llvm/lib/Transforms/IPO/Inliner.cpp +++ b/llvm/lib/Transforms/IPO/Inliner.cpp @@ -973,7 +973,7 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC, LazyCallGraph::Node &N = *CG.lookup(F); if (CG.lookupSCC(N) != C) continue; - if (F.optForNone()) { + if (F.hasOptNone()) { setInlineRemark(Calls[i].first, "optnone attribute"); continue; } |