[arch-commits] Commit in lib32-clang/trunk (2 files)

Evangelos Foutras foutrelis at archlinux.org
Fri Jul 9 19:33:52 UTC 2021


    Date: Friday, July 9, 2021 @ 19:33:52
  Author: foutrelis
Revision: 976310

upgpkg: lib32-clang 12.0.1-1: new upstream release

Modified:
  lib32-clang/trunk/PKGBUILD
Deleted:
  lib32-clang/trunk/opencl-respect-calling-convention-for-builtin.patch

-----------------------------------------------------+
 PKGBUILD                                            |   11 -
 opencl-respect-calling-convention-for-builtin.patch |  107 ------------------
 2 files changed, 3 insertions(+), 115 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-07-09 19:28:21 UTC (rev 976309)
+++ PKGBUILD	2021-07-09 19:33:52 UTC (rev 976310)
@@ -2,7 +2,7 @@
 # Contributor: Jan "heftig" Steffens <jan.steffens at gmail.com>
 
 pkgname=lib32-clang
-pkgver=12.0.0
+pkgver=12.0.1
 pkgrel=1
 pkgdesc="C language family frontend for LLVM (32-bit)"
 arch=('x86_64')
@@ -13,14 +13,12 @@
 _source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
 source=($_source_base/clang-$pkgver.src.tar.xz{,.sig}
         $_source_base/llvm-$pkgver.src.tar.xz{,.sig}
-        opencl-respect-calling-convention-for-builtin.patch
         clang-link-with-Bsymbolic-functions.patch
         enable-SSP-and-PIE-by-default.patch)
-sha256sums=('e26e452e91d4542da3ebbf404f024d3e1cbf103f4cd110c26bf0a19621cca9ed'
+sha256sums=('6e912133bcf56e9cfe6a346fa7e5c52c2cde3e4e48b7a6cc6fcc7c75047da45f'
             'SKIP'
-            '49dc47c8697a1a0abd4ee51629a696d7bfe803662f2a7252a3b16fc75f3a8b50'
+            '7d9a8405f557cefc5a21bf5672af73903b64749d9bc3a50322239f56f34ffddf'
             'SKIP'
-            '859d34dac43999edfc4c33e1cbb6e7458921fa9f16a93514701c1a9706665d24'
             '5bc0b47c70990bb8dd0cf4138a8ab9e15cf6b008b7c0cf2c7aac3736b559e0e6'
             'a877fa5cf1c1cca3bd55f9a36cf8c1bdd061ff398aeace90fe3cbd9e82550da3')
 validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans at chromium.org>
@@ -53,9 +51,6 @@
   mkdir build
   patch -Np2 -i ../enable-SSP-and-PIE-by-default.patch
 
-  # Some fixes from the release/12.x branch
-  patch -Np2 -i ../opencl-respect-calling-convention-for-builtin.patch
-
   # https://bugs.archlinux.org/task/70697
   patch -Np2 -i ../clang-link-with-Bsymbolic-functions.patch
 }

Deleted: opencl-respect-calling-convention-for-builtin.patch
===================================================================
--- opencl-respect-calling-convention-for-builtin.patch	2021-07-09 19:28:21 UTC (rev 976309)
+++ opencl-respect-calling-convention-for-builtin.patch	2021-07-09 19:33:52 UTC (rev 976310)
@@ -1,107 +0,0 @@
-From e0fe1c58acfa0bde36afde8354cb31fc1e0b75e2 Mon Sep 17 00:00:00 2001
-From: Luke Drummond <luke.drummond at codeplay.com>
-Date: Wed, 10 Mar 2021 18:14:42 +0000
-Subject: [PATCH] [OpenCL] Respect calling convention for builtin
-
-`__translate_sampler_initializer` has a calling convention of
-`spir_func`, but clang generated calls to it using the default CC.
-
-Instruction Combining was lowering these mismatching calling conventions
-to `store i1* undef` which itself was subsequently lowered to a trap
-instruction by simplifyCFG resulting in runtime `SIGILL`
-
-There are arguably two bugs here: but whether there's any wisdom in
-converting an obviously invalid call into a runtime crash over aborting
-with a sensible error message will require further discussion. So for
-now it's enough to set the right calling convention on the runtime
-helper.
-
-Reviewed By: svenh, bader
-
-Differential Revision: https://reviews.llvm.org/D98411
-
-(cherry picked from commit fcfd3fda71905d7c48f75a531c2265ad3b9876ea)
----
- clang/lib/CodeGen/CodeGenModule.cpp | 12 +++++++-----
- clang/test/CodeGenOpenCL/sampler.cl | 12 ++++++------
- 2 files changed, 13 insertions(+), 11 deletions(-)
-
-diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
-index 31afbc6b4262..9c9bd4e374af 100644
---- a/clang/lib/CodeGen/CodeGenModule.cpp
-+++ b/clang/lib/CodeGen/CodeGenModule.cpp
-@@ -6215,15 +6215,17 @@ llvm::SanitizerStatReport &CodeGenModule::getSanStats() {
- 
-   return *SanStats;
- }
-+
- llvm::Value *
- CodeGenModule::createOpenCLIntToSamplerConversion(const Expr *E,
-                                                   CodeGenFunction &CGF) {
-   llvm::Constant *C = ConstantEmitter(CGF).emitAbstract(E, E->getType());
--  auto SamplerT = getOpenCLRuntime().getSamplerType(E->getType().getTypePtr());
--  auto FTy = llvm::FunctionType::get(SamplerT, {C->getType()}, false);
--  return CGF.Builder.CreateCall(CreateRuntimeFunction(FTy,
--                                "__translate_sampler_initializer"),
--                                {C});
-+  auto *SamplerT = getOpenCLRuntime().getSamplerType(E->getType().getTypePtr());
-+  auto *FTy = llvm::FunctionType::get(SamplerT, {C->getType()}, false);
-+  auto *Call = CGF.Builder.CreateCall(
-+      CreateRuntimeFunction(FTy, "__translate_sampler_initializer"), {C});
-+  Call->setCallingConv(Call->getCalledFunction()->getCallingConv());
-+  return Call;
- }
- 
- CharUnits CodeGenModule::getNaturalPointeeTypeAlignment(
-diff --git a/clang/test/CodeGenOpenCL/sampler.cl b/clang/test/CodeGenOpenCL/sampler.cl
-index e6bda49f51c8..5ad8d0dbbf37 100644
---- a/clang/test/CodeGenOpenCL/sampler.cl
-+++ b/clang/test/CodeGenOpenCL/sampler.cl
-@@ -39,7 +39,7 @@ kernel void foo(sampler_t smp_par) {
-   // Case 2b
-   sampler_t smp = CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_COORDS_TRUE | CLK_FILTER_NEAREST;
-   // CHECK: [[smp_ptr:%[A-Za-z0-9_\.]+]] = alloca %opencl.sampler_t addrspace(2)*
--  // CHECK: [[SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 19)
-+  // CHECK: [[SAMP:%[0-9]+]] = call spir_func %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 19)
-   // CHECK: store %opencl.sampler_t addrspace(2)* [[SAMP]], %opencl.sampler_t addrspace(2)** [[smp_ptr]]
- 
-   // Case 1b
-@@ -56,12 +56,12 @@ kernel void foo(sampler_t smp_par) {
- 
-   // Case 1a/2a
-   fnc4smp(glb_smp);
--  // CHECK: [[SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 35)
-+  // CHECK: [[SAMP:%[0-9]+]] = call spir_func %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 35)
-   // CHECK: call spir_func void [[FUNCNAME]](%opencl.sampler_t addrspace(2)* [[SAMP]])
- 
-   // Case 1a/2c
-   fnc4smp(glb_smp_const);
--  // CHECK: [[SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 35)
-+  // CHECK: [[SAMP:%[0-9]+]] = call spir_func %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 35)
-   // CHECK: call spir_func void [[FUNCNAME]](%opencl.sampler_t addrspace(2)* [[SAMP]])
- 
-   // Case 1c
-@@ -70,12 +70,12 @@ kernel void foo(sampler_t smp_par) {
-   // CHECK: call spir_func void [[FUNCNAME]](%opencl.sampler_t addrspace(2)* [[SAMP]])
- 
-   fnc4smp(5);
--  // CHECK: [[SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 5)
-+  // CHECK: [[SAMP:%[0-9]+]] = call spir_func %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 5)
-   // CHECK: call spir_func void [[FUNCNAME]](%opencl.sampler_t addrspace(2)* [[SAMP]])
- 
-   const sampler_t const_smp = CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_COORDS_TRUE | CLK_FILTER_LINEAR;
-   fnc4smp(const_smp);
--   // CHECK: [[CONST_SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 35)
-+   // CHECK: [[CONST_SAMP:%[0-9]+]] = call spir_func %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 35)
-   // CHECK: store %opencl.sampler_t addrspace(2)* [[CONST_SAMP]], %opencl.sampler_t addrspace(2)** [[CONST_SMP_PTR:%[a-zA-Z0-9]+]]
-   fnc4smp(const_smp);
-   // CHECK: [[SAMP:%[0-9]+]] = load %opencl.sampler_t addrspace(2)*, %opencl.sampler_t addrspace(2)** [[CONST_SMP_PTR]]
-@@ -83,7 +83,7 @@ kernel void foo(sampler_t smp_par) {
- 
-   constant sampler_t constant_smp = CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_COORDS_TRUE | CLK_FILTER_LINEAR;
-   fnc4smp(constant_smp);
--  // CHECK: [[SAMP:%[0-9]+]] = call %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 35)
-+  // CHECK: [[SAMP:%[0-9]+]] = call spir_func %opencl.sampler_t addrspace(2)* @__translate_sampler_initializer(i32 35)
-   // CHECK: call spir_func void [[FUNCNAME]](%opencl.sampler_t addrspace(2)* [[SAMP]])
- 
-   // TODO: enable sampler initialization with non-constant integer.




More information about the arch-commits mailing list