summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJessica Paquette <jpaquette@apple.com>2020-01-07 11:12:32 -0800
committerJessica Paquette <jpaquette@apple.com>2020-01-07 11:27:25 -0800
commitacd258082477b8a4edf3037127efb5fed4494da3 (patch)
treea2bc78944f00807886d035b193d664e141724e76 /llvm/lib/CodeGen
parentafa8211e979c25100c2ed41d8da1e18b45d0ef2b (diff)
downloadbcm5719-llvm-acd258082477b8a4edf3037127efb5fed4494da3.tar.gz
bcm5719-llvm-acd258082477b8a4edf3037127efb5fed4494da3.zip
[MachineOutliner][AArch64] Save + restore LR in noreturn functions
Conservatively always save + restore LR in noreturn functions. These functions do not end in a RET, and so they aren't guaranteed to have an instruction which uses LR in any way. So, as a result, you can end up in unfortunate situations where you can't backtrace out of these functions in a debugger. Remove the old noreturn test, and add a new one which is more descriptive. Remove the restriction that we can't outline from noreturn functions as well since we now do the right thing.
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/MachineOutliner.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp
index f742ac6b55c..d6ce08a0097 100644
--- a/llvm/lib/CodeGen/MachineOutliner.cpp
+++ b/llvm/lib/CodeGen/MachineOutliner.cpp
@@ -1306,12 +1306,6 @@ void MachineOutliner::populateMapper(InstructionMapper &Mapper, Module &M,
if (F.empty())
continue;
- // Disable outlining from noreturn functions right now. Noreturn requires
- // special handling for the case where what we are outlining could be a
- // tail call.
- if (F.hasFnAttribute(Attribute::NoReturn))
- continue;
-
// There's something in F. Check if it has a MachineFunction associated with
// it.
MachineFunction *MF = MMI.getMachineFunction(F);
OpenPOWER on IntegriCloud