Skip to content

Commit

Permalink
apply Jeff's changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Dec 21, 2022
1 parent 49932df commit 7a42638
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/codegen_shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<Value*>(offset), "gc_state");
Value *gc_state = builder.CreateInBoundsGEP(T_int8, ptls_i8, ArrayRef<Value*>(offset), "gc_state");
if (old_state == nullptr) {
old_state = builder.CreateLoad(T_int8, gc_state);
cast<LoadInst>(old_state)->setOrdering(AtomicOrdering::Monotonic);
Expand Down
2 changes: 1 addition & 1 deletion src/llvm-pass-helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7a42638

Please sign in to comment.