summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMTargetMachine.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2018-06-28 17:00:45 +0000
committerMatthias Braun <matze@braunis.de>2018-06-28 17:00:45 +0000
commitda5e7e11d1072ea13460f0b4ca77b7de35bf2bb8 (patch)
treea90e5c0b5c4706272c63591e23b064285f5723ed /llvm/lib/Target/ARM/ARMTargetMachine.cpp
parent2d69f5d82e9caac6ae1607693df1e7c37a2adbcf (diff)
downloadbcm5719-llvm-da5e7e11d1072ea13460f0b4ca77b7de35bf2bb8.tar.gz
bcm5719-llvm-da5e7e11d1072ea13460f0b4ca77b7de35bf2bb8.zip
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
Diffstat (limited to 'llvm/lib/Target/ARM/ARMTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMTargetMachine.cpp4
1 files changed, 3 insertions, 1 deletions
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();
}
OpenPOWER on IntegriCloud