diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/CodeGen/MachineOutliner.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/CodeGen/MachineOutliner.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/MachineOutliner.cpp b/contrib/llvm-project/llvm/lib/CodeGen/MachineOutliner.cpp index 5da68abc8f6a..c7ba66bd3678 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/MachineOutliner.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/MachineOutliner.cpp @@ -727,7 +727,8 @@ MachineFunction *MachineOutliner::createOutlinedFunction( Unit /* Context */, F->getName(), StringRef(MangledNameStream.str()), Unit /* File */, 0 /* Line 0 is reserved for compiler-generated code. */, - DB.createSubroutineType(DB.getOrCreateTypeArray(None)), /* void type */ + DB.createSubroutineType( + DB.getOrCreateTypeArray(std::nullopt)), /* void type */ 0, /* Line 0 is reserved for compiler-generated code. */ DINode::DIFlags::FlagArtificial /* Compiler-generated code. */, /* Outlined code is optimized code by definition. */ @@ -879,10 +880,13 @@ void MachineOutliner::populateMapper(InstructionMapper &Mapper, Module &M, // iterating over each Function in M. for (Function &F : M) { - // If there's nothing in F, then there's no reason to try and outline from - // it. - if (F.empty()) + if (F.hasFnAttribute("nooutline")) { + LLVM_DEBUG({ + dbgs() << "... Skipping function with nooutline attribute: " + << F.getName() << "\n"; + }); continue; + } // There's something in F. Check if it has a MachineFunction associated with // it. |