aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOutliner.cpp
diff options
context:
space:
mode:
authorwangpc <pc.wang@linux.alibaba.com>2023-04-10 10:57:00 +0800
committerwangpc <pc.wang@linux.alibaba.com>2023-04-10 10:57:29 +0800
commit267708f9d5150c5153e92e913c021918b790ac4f (patch)
treee88c910b3af89375d611a5d19ff512a487e273dd /llvm/lib/CodeGen/MachineOutliner.cpp
parent6e57f68e41c92936b9ef3a4e6fb286e8805a9fbc (diff)
downloadllvm-267708f9d5150c5153e92e913c021918b790ac4f.zip
llvm-267708f9d5150c5153e92e913c021918b790ac4f.tar.gz
llvm-267708f9d5150c5153e92e913c021918b790ac4f.tar.bz2
[MachineOutliner] Add IsOutlined to MachineFunction
We add a field `IsOutlined` to indicate whether a MachineFunction is outlined and set it true for outlined functions in MachineOutliner. Reviewed By: paquette Differential Revision: https://reviews.llvm.org/D146191
Diffstat (limited to 'llvm/lib/CodeGen/MachineOutliner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineOutliner.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp
index d116c54..74f4165 100644
--- a/llvm/lib/CodeGen/MachineOutliner.cpp
+++ b/llvm/lib/CodeGen/MachineOutliner.cpp
@@ -725,6 +725,7 @@ MachineFunction *MachineOutliner::createOutlinedFunction(
MachineModuleInfo &MMI = getAnalysis<MachineModuleInfoWrapperPass>().getMMI();
MachineFunction &MF = MMI.getOrCreateMachineFunction(*F);
+ MF.setIsOutlined(true);
MachineBasicBlock &MBB = *MF.CreateMachineBasicBlock();
// Insert the new function into the module.