From 7a4263887fed50c60a67f227faaadd9570d70a3a Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Wed, 21 Dec 2022 10:42:29 -0500 Subject: [PATCH] apply Jeff's changes --- src/codegen_shared.h | 4 ++-- src/llvm-pass-helpers.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/codegen_shared.h b/src/codegen_shared.h index 0c8e92ca88ee9..fc9cb2273575c 100644 --- a/src/codegen_shared.h +++ b/src/codegen_shared.h @@ -257,9 +257,9 @@ static inline llvm::Value *emit_gc_state_set(llvm::IRBuilder<> &builder, llvm::V { using namespace llvm; Type *T_int8 = state->getType(); - ptls = emit_bitcast_with_builder(builder, ptls, builder.getInt8PtrTy()); + llvm::Value *ptls_i8 = emit_bitcast_with_builder(builder, ptls, builder.getInt8PtrTy()); Constant *offset = ConstantInt::getSigned(builder.getInt32Ty(), offsetof(jl_tls_states_t, gc_state)); - Value *gc_state = builder.CreateInBoundsGEP(T_int8, ptls, ArrayRef(offset), "gc_state"); + Value *gc_state = builder.CreateInBoundsGEP(T_int8, ptls_i8, ArrayRef(offset), "gc_state"); if (old_state == nullptr) { old_state = builder.CreateLoad(T_int8, gc_state); cast(old_state)->setOrdering(AtomicOrdering::Monotonic); diff --git a/src/llvm-pass-helpers.cpp b/src/llvm-pass-helpers.cpp index 50ba3652e1a4a..71512df7413a0 100644 --- a/src/llvm-pass-helpers.cpp +++ b/src/llvm-pass-helpers.cpp @@ -232,7 +232,7 @@ namespace jl_intrinsics { auto intrinsic = Function::Create( FunctionType::get( Type::getVoidTy(context.getLLVMContext()), - {}, + {JuliaType::get_ppjlvalue_ty(context.getLLVMContext())}, false), Function::ExternalLinkage, SAFEPOINT_NAME);