[PATCH] Emit a trap instruction for IR 'unreachable'
Yaron Keren
yaron.keren at gmail.com
Fri Apr 18 01:50:30 PDT 2014
Ok, not sure why the TargetOptions.h patch didn't go in, but here it is.
Hi martell, vadimcn, Kai, nrieck, rnk, dblaikie, theraven,
http://reviews.llvm.org/D3417
CHANGE SINCE LAST DIFF
http://reviews.llvm.org/D3417?vs=8626&id=8632#toc
Files:
include/llvm/Target/TargetOptions.h
Index: include/llvm/Target/TargetOptions.h
===================================================================
--- include/llvm/Target/TargetOptions.h
+++ include/llvm/Target/TargetOptions.h
@@ -51,6 +51,7 @@
EnableFastISel(false), PositionIndependentExecutable(false),
UseInitArray(false),
DisableIntegratedAS(false), CompressDebugSections(false),
+ TrapUnreachable(false),
TrapFuncName(""), FloatABIType(FloatABI::Default),
AllowFPOpFusion(FPOpFusion::Standard) {}
@@ -162,6 +163,9 @@
/// Compress DWARF debug sections.
unsigned CompressDebugSections : 1;
+ /// Emit target-specific trap instruction for 'unreachable' IR instructions.
+ unsigned TrapUnreachable : 1;
+
/// getTrapFunctionName - If this returns a non-empty string, this means
/// isel should lower Intrinsic::trap to a call to the specified function
/// name instead of an ISD::TRAP node.
@@ -216,6 +220,7 @@
ARE_EQUAL(EnableFastISel) &&
ARE_EQUAL(PositionIndependentExecutable) &&
ARE_EQUAL(UseInitArray) &&
+ ARE_EQUAL(TrapUnreachable) &&
ARE_EQUAL(TrapFuncName) &&
ARE_EQUAL(FloatABIType) &&
ARE_EQUAL(AllowFPOpFusion);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3417.2.patch
Type: text/x-patch
Size: 1223 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140418/778f2d3d/attachment.bin>
More information about the llvm-commits
mailing list