Hi,
So I created two tiny patches (see attached) for LLVM and clang that
allow target triples of the form e.g. x86_64-unknown-smack to be used,
which in turn disables various type coercions. Basically, SMACK
software verifier that I've been working on is not happy when it
encounters type coercions, which are not easy to handle in their full
generality.
Please take a look at the following discussions for background
information on why I created these patches:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-May/072986.html
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-May/037120.html
I tested the patches on both LLVM and clang regressions suites, and
they seem to be working fine.
Please let me know how to proceed with this.
Thanks!
Best,
-- Zvonimir
--
http://zvonimir.info
http://soarlab.org/
Index: lib/CodeGen/TargetInfo.cpp
===================================================================
--- lib/CodeGen/TargetInfo.cpp (revision 210033)
+++ lib/CodeGen/TargetInfo.cpp (working copy)
@@ -6539,6 +6539,8 @@
IsDarwinVectorABI, IsSmallStructInRegABI,
IsWin32FloatStructABI,
CodeGenOpts.NumRegisterParameters));
+ } else if (Triple.getOS() == llvm::Triple::SMACK) {
+ return *(TheTargetCodeGenInfo = new DefaultTargetCodeGenInfo(Types));
} else {
return *(TheTargetCodeGenInfo =
new X86_32TargetCodeGenInfo(Types,
@@ -6557,6 +6559,8 @@
case llvm::Triple::NaCl:
return *(TheTargetCodeGenInfo = new NaClX86_64TargetCodeGenInfo(Types,
HasAVX));
+ case llvm::Triple::SMACK:
+ return *(TheTargetCodeGenInfo = new DefaultTargetCodeGenInfo(Types));
default:
return *(TheTargetCodeGenInfo = new X86_64TargetCodeGenInfo(Types,
HasAVX));
Index: include/llvm/ADT/Triple.h
===================================================================
--- include/llvm/ADT/Triple.h (revision 210033)
+++ include/llvm/ADT/Triple.h (working copy)
@@ -112,6 +112,7 @@
Minix,
RTEMS,
NaCl, // Native Client
+ SMACK, // SMACK Software Verifier
CNK, // BG/P Compute-Node Kernel
Bitrig,
AIX,
Index: lib/Support/Triple.cpp
===================================================================
--- lib/Support/Triple.cpp (revision 210033)
+++ lib/Support/Triple.cpp (working copy)
@@ -144,6 +144,7 @@
case Minix: return "minix";
case RTEMS: return "rtems";
case NaCl: return "nacl";
+ case SMACK: return "smack";
case CNK: return "cnk";
case Bitrig: return "bitrig";
case AIX: return "aix";
@@ -318,6 +319,7 @@
.StartsWith("minix", Triple::Minix)
.StartsWith("rtems", Triple::RTEMS)
.StartsWith("nacl", Triple::NaCl)
+ .StartsWith("smack", Triple::SMACK)
.StartsWith("cnk", Triple::CNK)
.StartsWith("bitrig", Triple::Bitrig)
.StartsWith("aix", Triple::AIX)
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits