Skip to content

Commit

Permalink
Update LLVM (#1421)
Browse files Browse the repository at this point in the history
- fix new api for createDiagnostics
- remove deprecated getPointerTo
- fix tests/Printf/printf_args.cl
  • Loading branch information
rjodinchr authored Nov 22, 2024
1 parent 425abc5 commit ae64396
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"subrepo" : "llvm/llvm-project",
"branch" : "main",
"subdir" : "third_party/llvm",
"commit" : "4cdfa2a2c80d59db10d1a17e4ff0ec9902952759"
"commit" : "1fd8d3fea53e6e4573cdce55bd38ef0a7813a442"
},
{
"name" : "SPIRV-Headers",
Expand Down
1 change: 1 addition & 0 deletions lib/Compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ int SetCompilerInstanceOptions(

// Set up diagnostics
instance.createDiagnostics(
*llvm::vfs::getRealFileSystem(),
new clang::TextDiagnosticPrinter(*diagnosticsStream,
&instance.getDiagnosticOpts()),
true);
Expand Down
4 changes: 2 additions & 2 deletions lib/SPIRVProducerPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2557,7 +2557,7 @@ void SPIRVProducerPassImpl::GenerateResourceVars() {
case clspv::ArgKind::StorageImage:
case clspv::ArgKind::StorageTexelBuffer:
case clspv::ArgKind::UniformTexelBuffer:
type = info->data_type->getPointerTo(AddressSpace::UniformConstant);
type = PointerType::get(info->data_type, AddressSpace::UniformConstant);
break;
default:
break;
Expand Down Expand Up @@ -3604,7 +3604,7 @@ SPIRVID SPIRVProducerPassImpl::getSPIRVBuiltin(spv::BuiltIn BID,
addCapability(Cap);

auto *data_ty = IntegerType::get(module->getContext(), 32);
auto *ptr_ty = data_ty->getPointerTo(AddressSpace::Input);
auto *ptr_ty = PointerType::get(data_ty, AddressSpace::Input);
auto ptr_id = getSPIRVPointerType(ptr_ty, data_ty);
RID = addSPIRVGlobalVariable(ptr_id, spv::StorageClassInput);

Expand Down
2 changes: 1 addition & 1 deletion test/Printf/printf_args.cl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ kernel void test(char c, short s, int i, float f, long l) {
// CHECK: OpStore %{{[0-9a-zA-Z_]+}} %[[f_i32_0]]
// CHECK: OpStore %{{[0-9a-zA-Z_]+}} %[[f_i32_1]]
// CHECK: %[[arg_l_bitcast:[0-9a-zA-Z_]+]] = OpBitcast %[[v2uint]] %[[arg_l]]
// CHECK: %[[l_i32_0:[0-9a-zA-Z_]+]] = OpUConvert %[[uint]] %[[arg_l]]
// CHECK: %[[l_i32_0:[0-9a-zA-Z_]+]] = OpCompositeExtract %[[uint]] %[[arg_l_bitcast]] 0
// CHECK: %[[l_i32_1:[0-9a-zA-Z_]+]] = OpCompositeExtract %[[uint]] %[[arg_l_bitcast]] 1
// CHECK: OpStore %{{[0-9a-zA-Z_]+}} %[[l_i32_0]]
// CHECK: OpStore %{{[0-9a-zA-Z_]+}} %[[l_i32_1]]
Expand Down

0 comments on commit ae64396

Please sign in to comment.