From da5e7e11d1072ea13460f0b4ca77b7de35bf2bb8 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Thu, 28 Jun 2018 17:00:45 +0000 Subject: SelectionDAGBuilder, mach-o: Skip trap after noreturn call (for Mach-O) Add NoTrapAfterNoreturn target option which skips emission of traps behind noreturn calls even if TrapUnreachable is enabled. Enable the feature on Mach-O to save code size; Comments suggest it is not possible to enable it for the other users of TrapUnreachable. rdar://41530228 DifferentialRevision: https://reviews.llvm.org/D48674 llvm-svn: 335877 --- llvm/lib/Target/ARM/ARMTargetMachine.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Target/ARM/ARMTargetMachine.cpp') diff --git a/llvm/lib/Target/ARM/ARMTargetMachine.cpp b/llvm/lib/Target/ARM/ARMTargetMachine.cpp index 6a7f4814d1c..bc2525b6b42 100644 --- a/llvm/lib/Target/ARM/ARMTargetMachine.cpp +++ b/llvm/lib/Target/ARM/ARMTargetMachine.cpp @@ -239,8 +239,10 @@ ARMBaseTargetMachine::ARMBaseTargetMachine(const Target &T, const Triple &TT, this->Options.EABIVersion = EABI::EABI5; } - if (TT.isOSBinFormatMachO()) + if (TT.isOSBinFormatMachO()) { this->Options.TrapUnreachable = true; + this->Options.NoTrapAfterNoreturn = true; + } initAsmInfo(); } -- cgit v1.2.3