[llvm-branch-commits] [llvm-branch] r259801 - Merging r259695:

2016-02-04 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Feb  4 10:59:45 2016
New Revision: 259801

URL: http://llvm.org/viewvc/llvm-project?rev=259801&view=rev
Log:
Merging r259695:

r259695 | tfiala | 2016-02-03 13:13:23 -0800 (Wed, 03 Feb 2016) | 11 lines

Address NDEBUG-related linkage issues for Value::assertModuleIsMaterialized()

The IR/Value class had a linkage issue present when LLVM was built
as a library, and the LLVM library build time had different settings
for NDEBUG than the client of the LLVM library.  Clients could get
into a state where the LLVM lib expected
Value::assertModuleIsMaterialized() to be inline-defined in the header
but clients expected that method to be defined in the LLVM library.

See this llvm-commits thread for more details:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160201/329667.html


Modified:
llvm/branches/release_38/   (props changed)
llvm/branches/release_38/include/llvm/IR/Value.h
llvm/branches/release_38/lib/IR/Value.cpp

Propchange: llvm/branches/release_38/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb  4 10:59:45 2016
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,257645,257648,257730,257775,257791,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177,259228,259236,259342,259346,259375,259645,259649,259740
+/llvm/trunk:155241,257645,257648,257730,257775,257791,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177,259228,259236,259342,259346,259375,259645,259649,259695,259740

Modified: llvm/branches/release_38/include/llvm/IR/Value.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/include/llvm/IR/Value.h?rev=259801&r1=259800&r2=259801&view=diff
==
--- llvm/branches/release_38/include/llvm/IR/Value.h (original)
+++ llvm/branches/release_38/include/llvm/IR/Value.h Thu Feb  4 10:59:45 2016
@@ -280,11 +280,7 @@ public:
   // when using them since you might not get all uses.
   // The methods that don't start with materialized_ assert that modules is
   // fully materialized.
-#ifdef NDEBUG
-  void assertModuleIsMaterialized() const {}
-#else
   void assertModuleIsMaterialized() const;
-#endif
 
   bool use_empty() const {
 assertModuleIsMaterialized();

Modified: llvm/branches/release_38/lib/IR/Value.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/IR/Value.cpp?rev=259801&r1=259800&r2=259801&view=diff
==
--- llvm/branches/release_38/lib/IR/Value.cpp (original)
+++ llvm/branches/release_38/lib/IR/Value.cpp Thu Feb  4 10:59:45 2016
@@ -313,8 +313,8 @@ void Value::takeName(Value *V) {
 ST->reinsertValue(this);
 }
 
-#ifndef NDEBUG
 void Value::assertModuleIsMaterialized() const {
+#ifndef NDEBUG
   const GlobalValue *GV = dyn_cast(this);
   if (!GV)
 return;
@@ -322,8 +322,10 @@ void Value::assertModuleIsMaterialized()
   if (!M)
 return;
   assert(M->isMaterialized());
+#endif
 }
 
+#ifndef NDEBUG
 static bool contains(SmallPtrSetImpl &Cache, ConstantExpr 
*Expr,
  Constant *C) {
   if (!Cache.insert(Expr).second)


___
llvm-branch-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [compiler-rt-branch] r259803 - Merging r259755:

2016-02-04 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Feb  4 11:02:20 2016
New Revision: 259803

URL: http://llvm.org/viewvc/llvm-project?rev=259803&view=rev
Log:
Merging r259755:

r259755 | mohit.bhakkad | 2016-02-03 21:28:48 -0800 (Wed, 03 Feb 2016) | 5 lines

[TSan] Fix PrintMatchedSuppressions: Read hit count for suppression atomically

Reviewers: dvyukov.
Subscribers: jaydeep, sagar, dsanders, llvm-commits.
Differential Revision: http://reviews.llvm.org/D16845


Modified:
compiler-rt/branches/release_38/   (props changed)
compiler-rt/branches/release_38/lib/tsan/rtl/tsan_suppressions.cc

Propchange: compiler-rt/branches/release_38/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb  4 11:02:20 2016
@@ -1 +1 @@
-/compiler-rt/trunk:258916
+/compiler-rt/trunk:258916,259755

Modified: compiler-rt/branches/release_38/lib/tsan/rtl/tsan_suppressions.cc
URL: 
http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_38/lib/tsan/rtl/tsan_suppressions.cc?rev=259803&r1=259802&r2=259803&view=diff
==
--- compiler-rt/branches/release_38/lib/tsan/rtl/tsan_suppressions.cc (original)
+++ compiler-rt/branches/release_38/lib/tsan/rtl/tsan_suppressions.cc Thu Feb  
4 11:02:20 2016
@@ -159,8 +159,8 @@ void PrintMatchedSuppressions() {
   Printf("ThreadSanitizer: Matched %d suppressions (pid=%d):\n", hit_count,
  (int)internal_getpid());
   for (uptr i = 0; i < matched.size(); i++) {
-Printf("%d %s:%s\n", matched[i]->hit_count, matched[i]->type,
-   matched[i]->templ);
+Printf("%d %s:%s\n", atomic_load_relaxed(&matched[i]->hit_count),
+   matched[i]->type, matched[i]->templ);
   }
 }
 }  // namespace __tsan


___
llvm-branch-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [cfe-branch] r259808 - Merging r259183:

2016-02-04 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Feb  4 12:20:19 2016
New Revision: 259808

URL: http://llvm.org/viewvc/llvm-project?rev=259808&view=rev
Log:
Merging r259183:

r259183 | uweigand | 2016-01-29 02:45:23 -0800 (Fri, 29 Jan 2016) | 8 lines

Add target triple to CodeGenOpenCL/pipe_types.cl test case

The test is failing on SystemZ since different IR is being
generated due to platform ABI differences.  Add a target triple.

Fix suggested by Anastasia Stulova.




Modified:
cfe/branches/release_38/   (props changed)
cfe/branches/release_38/test/CodeGenOpenCL/pipe_types.cl

Propchange: cfe/branches/release_38/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb  4 12:20:19 2016
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:257652,257695,257710,257831,257838,257853,257861,257869-257871,257947,258110,258396,259260,259598
+/cfe/trunk:257652,257695,257710,257831,257838,257853,257861,257869-257871,257947,258110,258396,259183,259260,259598
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_38/test/CodeGenOpenCL/pipe_types.cl
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_38/test/CodeGenOpenCL/pipe_types.cl?rev=259808&r1=259807&r2=259808&view=diff
==
--- cfe/branches/release_38/test/CodeGenOpenCL/pipe_types.cl (original)
+++ cfe/branches/release_38/test/CodeGenOpenCL/pipe_types.cl Thu Feb  4 
12:20:19 2016
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -O0 -cl-std=CL2.0 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -O0 
-cl-std=CL2.0 -o - %s | FileCheck %s
 
 // CHECK: %opencl.pipe_t = type opaque
 typedef unsigned char __attribute__((ext_vector_type(3))) uchar3;


___
llvm-branch-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm-branch] r259856 - Merging r259798, r259835:

2016-02-04 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Feb  4 18:46:12 2016
New Revision: 259856

URL: http://llvm.org/viewvc/llvm-project?rev=259856&view=rev
Log:
Merging r259798, r259835:


r259798 | nemanjai | 2016-02-04 08:18:08 -0800 (Thu, 04 Feb 2016) | 9 lines

Enable the %s modifier in inline asm template string

This patch corresponds to review:
http://reviews.llvm.org/D16847

There are some files in glibc that use the output operand modifier even though
it was deprecated in GCC. This patch just adds support for it to prevent issues
with such files.



r259835 | nemanjai | 2016-02-04 14:36:10 -0800 (Thu, 04 Feb 2016) | 3 lines

Provide a test case for rl259798


Added:
llvm/branches/release_38/test/CodeGen/PowerPC/inline-asm-s-modifier.ll
  - copied unchanged from r259835, 
llvm/trunk/test/CodeGen/PowerPC/inline-asm-s-modifier.ll
Modified:
llvm/branches/release_38/   (props changed)
llvm/branches/release_38/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp

Propchange: llvm/branches/release_38/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb  4 18:46:12 2016
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,257645,257648,257730,257775,257791,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177,259228,259236,259342,259346,259375,259645,259649,259695,259740
+/llvm/trunk:155241,257645,257648,257730,257775,257791,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177,259228,259236,259342,259346,259375,259645,259649,259695,259740,259798,259835

Modified: 
llvm/branches/release_38/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp?rev=259856&r1=259855&r2=259856&view=diff
==
--- llvm/branches/release_38/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp 
(original)
+++ llvm/branches/release_38/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp Thu 
Feb  4 18:46:12 2016
@@ -555,6 +555,11 @@ bool AsmPrinter::PrintAsmOperand(const M
 return true;
   O << -MO.getImm();
   return false;
+case 's':  // The GCC deprecated s modifier
+  if (MO.getType() != MachineOperand::MO_Immediate)
+return true;
+  O << ((32 - MO.getImm()) & 31);
+  return false;
 }
   }
   return true;


___
llvm-branch-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm-branch] r259858 - Merging r259840 on top of r259178:

2016-02-04 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Feb  4 18:55:39 2016
New Revision: 259858

URL: http://llvm.org/viewvc/llvm-project?rev=259858&view=rev
Log:
Merging r259840 on top of r259178:


r259178 | echristo | 2016-01-28 23:20:30 -0800 (Thu, 28 Jan 2016) | 1 line

Refactor common code for PPC fast isel load immediate selection.



r259840 | nemanjai | 2016-02-04 15:14:42 -0800 (Thu, 04 Feb 2016) | 7 lines

Fix for PR 26356

Using the load immediate only when the immediate (whether signed or unsigned)
can fit in a 16-bit signed field. Namely, from -32768 to 32767 for signed and
0 to 65535 for unsigned. This patch also ensures that we sign-extend under the
right conditions.


Added:
llvm/branches/release_38/test/CodeGen/PowerPC/pr26356.ll
  - copied unchanged from r259840, 
llvm/trunk/test/CodeGen/PowerPC/pr26356.ll
Modified:
llvm/branches/release_38/   (props changed)
llvm/branches/release_38/lib/Target/PowerPC/PPCFastISel.cpp

Propchange: llvm/branches/release_38/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb  4 18:55:39 2016
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,257645,257648,257730,257775,257791,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177,259228,259236,259342,259346,259375,259645,259649,259695,259740,259798,259835
+/llvm/trunk:155241,257645,257648,257730,257775,257791,257875,257886,257902,257905,257925,257929-257930,257940,257942,257977,257979,257997,258168,258184,258207,258221,258273,258325,258406,258416,258428,258436,258471,258690,258729,258891,258971,259177-259178,259228,259236,259342,259346,259375,259645,259649,259695,259740,259798,259835,259840

Modified: llvm/branches/release_38/lib/Target/PowerPC/PPCFastISel.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/Target/PowerPC/PPCFastISel.cpp?rev=259858&r1=259857&r2=259858&view=diff
==
--- llvm/branches/release_38/lib/Target/PowerPC/PPCFastISel.cpp (original)
+++ llvm/branches/release_38/lib/Target/PowerPC/PPCFastISel.cpp Thu Feb  4 
18:55:39 2016
@@ -1615,7 +1615,7 @@ bool PPCFastISel::SelectRet(const Instru
   // extension rather than sign extension. Make sure we pass the return
   // value extension property to integer materialization.
   unsigned SrcReg =
-  PPCMaterializeInt(CI, MVT::i64, VA.getLocInfo() == 
CCValAssign::SExt);
+  PPCMaterializeInt(CI, MVT::i64, VA.getLocInfo() != 
CCValAssign::ZExt);
 
   BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc,
 TII.get(TargetOpcode::COPY), RetReg).addReg(SrcReg);
@@ -2091,26 +2091,21 @@ unsigned PPCFastISel::PPCMaterializeInt(
 
   const TargetRegisterClass *RC = ((VT == MVT::i64) ? &PPC::G8RCRegClass :
&PPC::GPRCRegClass);
+  int64_t Imm = UseSExt ? CI->getSExtValue() : CI->getZExtValue();
 
   // If the constant is in range, use a load-immediate.
-  if (UseSExt && isInt<16>(CI->getSExtValue())) {
-unsigned Opc = (VT == MVT::i64) ? PPC::LI8 : PPC::LI;
-unsigned ImmReg = createResultReg(RC);
-BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, TII.get(Opc), ImmReg)
-.addImm(CI->getSExtValue());
-return ImmReg;
-  } else if (!UseSExt && isUInt<16>(CI->getSExtValue())) {
-// Since LI will sign extend the constant we need to make sure that for
-// our zeroext constants that the sign extended constant fits into 16-bits.
+  // Since LI will sign extend the constant we need to make sure that for
+  // our zeroext constants that the sign extended constant fits into 16-bits -
+  // a range of 0..0x7fff.
+  if (isInt<16>(Imm)) {
 unsigned Opc = (VT == MVT::i64) ? PPC::LI8 : PPC::LI;
 unsigned ImmReg = createResultReg(RC);
 BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, TII.get(Opc), ImmReg)
-.addImm(CI->getZExtValue());
+.addImm(Imm);
 return ImmReg;
   }
 
   // Construct the constant piecewise.
-  int64_t Imm = UseSExt ? CI->getSExtValue() : CI->getZExtValue();
   if (VT == MVT::i64)
 return PPCMaterialize64BitInt(Imm, RC);
   else if (VT == MVT::i32)


___
llvm-branch-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits