aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOutliner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/MachineOutliner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineOutliner.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp
index 56c3d27..c7ba66b 100644
--- a/llvm/lib/CodeGen/MachineOutliner.cpp
+++ b/llvm/lib/CodeGen/MachineOutliner.cpp
@@ -880,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.