r280806 - [EfficiencySanitizer] [MIPS64] Enables esan clang driver options for MIPS64

2016-09-07 Thread Sagar Thakur via cfe-commits
Author: slthakur
Date: Wed Sep  7 07:23:15 2016
New Revision: 280806

URL: http://llvm.org/viewvc/llvm-project?rev=280806&view=rev
Log:
[EfficiencySanitizer] [MIPS64] Enables esan clang driver options for MIPS64

Reviewed by bruening
Differential: D23800

Modified:
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/test/Driver/esan.c

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=280806&r1=280805&r2=280806&view=diff
==
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Wed Sep  7 07:23:15 2016
@@ -4736,7 +4736,7 @@ SanitizerMask Linux::getSupportedSanitiz
 Res |= SanitizerKind::Thread;
   if (IsX86_64 || IsMIPS64 || IsPowerPC64 || IsAArch64)
 Res |= SanitizerKind::Memory;
-  if (IsX86_64)
+  if (IsX86_64 || IsMIPS64)
 Res |= SanitizerKind::Efficiency;
   if (IsX86 || IsX86_64) {
 Res |= SanitizerKind::Function;

Modified: cfe/trunk/test/Driver/esan.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/esan.c?rev=280806&r1=280805&r2=280806&view=diff
==
--- cfe/trunk/test/Driver/esan.c (original)
+++ cfe/trunk/test/Driver/esan.c Wed Sep  7 07:23:15 2016
@@ -6,6 +6,10 @@
 // RUN: %clang -O1 -target x86_64-unknown-linux 
-fsanitize=efficiency-working-set %s -S -emit-llvm -o - | FileCheck %s
 // RUN: %clang -O2 -target x86_64-unknown-linux 
-fsanitize=efficiency-working-set %s -S -emit-llvm -o - | FileCheck %s
 // RUN: %clang -O3 -target x86_64-unknown-linux 
-fsanitize=efficiency-working-set %s -S -emit-llvm -o - | FileCheck %s
+// RUN: %clang -target mips64-unknown-linux -fsanitize=efficiency-cache-frag 
%s -S -emit-llvm -o - | FileCheck %s
+// RUN: %clang -target mips64-unknown-linux -fsanitize=efficiency-working-set 
%s -S -emit-llvm -o - | FileCheck %s
+// RUN: %clang -target mips64el-unknown-linux -fsanitize=efficiency-cache-frag 
%s -S -emit-llvm -o - | FileCheck %s
+// RUN: %clang -target mips64el-unknown-linux 
-fsanitize=efficiency-working-set %s -S -emit-llvm -o - | FileCheck %s
 // Verify that -fsanitize=efficiency-* invokes esan instrumentation.
 
 int foo(int *a) { return *a; }


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


r295163 - [XRAY][MIPS] Add -fxray-instrument for mips/mipsel/mips64/mips64el

2017-02-15 Thread Sagar Thakur via cfe-commits
Author: slthakur
Date: Wed Feb 15 04:41:38 2017
New Revision: 295163

URL: http://llvm.org/viewvc/llvm-project?rev=295163&view=rev
Log:
[XRAY][MIPS] Add -fxray-instrument for mips/mipsel/mips64/mips64el

Summary: Adds xray instrument option for mips/mipsel/mips64/mips64el.

Reviewed by sdardis, dberris
Differential: D27698

Added:
cfe/trunk/test/CodeGen/xray-attributes-supported-mips.cpp
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/XRay/xray-instrument-cpu.c

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=295163&r1=295162&r2=295163&view=diff
==
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Feb 15 04:41:38 2017
@@ -5065,6 +5065,10 @@ void Clang::ConstructJob(Compilation &C,
   case llvm::Triple::arm:
   case llvm::Triple::aarch64:
   case llvm::Triple::ppc64le:
+  case llvm::Triple::mips:
+  case llvm::Triple::mipsel:
+  case llvm::Triple::mips64:
+  case llvm::Triple::mips64el:
 // Supported.
 break;
   default:

Added: cfe/trunk/test/CodeGen/xray-attributes-supported-mips.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/xray-attributes-supported-mips.cpp?rev=295163&view=auto
==
--- cfe/trunk/test/CodeGen/xray-attributes-supported-mips.cpp (added)
+++ cfe/trunk/test/CodeGen/xray-attributes-supported-mips.cpp Wed Feb 15 
04:41:38 2017
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - 
-triple mips-unknown-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - 
-triple mipsel-unknown-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - 
-triple mips64-unknown-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - 
-triple mips64el-unknown-linux-gnu | FileCheck %s
+
+// Make sure that the LLVM attribute for XRay-annotated functions do show up.
+[[clang::xray_always_instrument]] void foo() {
+// CHECK: define void @_Z3foov() #0
+};
+
+[[clang::xray_never_instrument]] void bar() {
+// CHECK: define void @_Z3barv() #1
+};
+
+// CHECK: #0 = {{.*}}"function-instrument"="xray-always"
+// CHECK: #1 = {{.*}}"function-instrument"="xray-never"

Modified: cfe/trunk/test/Driver/XRay/xray-instrument-cpu.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/XRay/xray-instrument-cpu.c?rev=295163&r1=295162&r2=295163&view=diff
==
--- cfe/trunk/test/Driver/XRay/xray-instrument-cpu.c (original)
+++ cfe/trunk/test/Driver/XRay/xray-instrument-cpu.c Wed Feb 15 04:41:38 2017
@@ -1,4 +1,4 @@
 // RUN: not %clang -o /dev/null -v -fxray-instrument -c %s
-// XFAIL: amd64-, x86_64-, x86_64h-, arm, aarch64, arm64, powerpc64le-
+// XFAIL: amd64-, x86_64-, x86_64h-, arm, aarch64, arm64, powerpc64le-, mips, 
mipsel, mips64, mips64el
 // REQUIRES: linux
 typedef int a;


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits