-
Notifications
You must be signed in to change notification settings - Fork 16
[Build] LLVM-18 #274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Build] LLVM-18 #274
Changes from all commits
802423c
cf0f319
8d433b1
4132386
0a4be38
54641b9
e4ca80c
8bda621
521b936
e95c4e1
4d34aa6
f335803
e61c344
84151a9
1e941e6
d55602c
4f6b248
d58e16d
9bdeafd
da7354b
e58bd1d
87f2b7c
c33a29b
521de49
0f0b92f
2504c49
1e62c24
fc04f33
ab0edf7
969b9b5
8459370
32e46a9
1912be1
58287c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -1469,7 +1469,7 @@ llvm::Value *TaskCodeGenLLVM::atomic_op_using_cas( | |||||||
|
|
||||||||
| { | ||||||||
| int bits = data_type_bits(type); | ||||||||
| llvm::PointerType *typeIntPtr = get_integer_ptr_type(bits); | ||||||||
| llvm::PointerType *typeIntPtr = llvm::PointerType::getUnqual(*llvm_context); | ||||||||
| llvm::IntegerType *typeIntTy = get_integer_type(bits); | ||||||||
|
|
||||||||
| old_val = builder->CreateLoad(val->getType(), dest); | ||||||||
|
|
@@ -1677,10 +1677,10 @@ llvm::Value *TaskCodeGenLLVM::call( | |||||||
| auto prefix = get_runtime_snode_name(snode); | ||||||||
| auto s = emit_struct_meta(snode); | ||||||||
| auto s_ptr = | ||||||||
| builder->CreateBitCast(s, llvm::Type::getInt8PtrTy(*llvm_context)); | ||||||||
| builder->CreateBitCast(s, llvm::PointerType::getUnqual(*llvm_context)); | ||||||||
|
|
||||||||
| node_ptr = | ||||||||
| builder->CreateBitCast(node_ptr, llvm::Type::getInt8PtrTy(*llvm_context)); | ||||||||
| node_ptr = builder->CreateBitCast( | ||||||||
| node_ptr, llvm::PointerType::getUnqual(*llvm_context)); | ||||||||
|
|
||||||||
| std::vector<llvm::Value *> func_arguments{s_ptr, node_ptr}; | ||||||||
|
|
||||||||
|
|
@@ -1797,8 +1797,9 @@ void TaskCodeGenLLVM::visit(SNodeLookupStmt *stmt) { | |||||||
| llvm::Type *parent_ty = builder->getInt8Ty(); | ||||||||
| if (auto bit_cast = llvm::dyn_cast<llvm::BitCastInst>(parent)) { | ||||||||
| parent_ty = bit_cast->getDestTy(); | ||||||||
| if (auto ptr_ty = llvm::dyn_cast<llvm::PointerType>(parent_ty)) | ||||||||
| parent_ty = ptr_ty->getPointerElementType(); | ||||||||
| if (auto ptr_ty = llvm::dyn_cast<llvm::PointerType>(parent_ty)) { | ||||||||
| TI_NOT_IMPLEMENTED; | ||||||||
| } | ||||||||
|
Comment on lines
+1800
to
+1802
|
||||||||
| if (auto ptr_ty = llvm::dyn_cast<llvm::PointerType>(parent_ty)) { | |
| TI_NOT_IMPLEMENTED; | |
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -29,7 +29,9 @@ bool is_same_type(llvm::Type *a, llvm::Type *b) { | |||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| if (a->isPointerTy()) { | ||||||||||||||||||||||||||||||||
| return is_same_type(a->getPointerElementType(), b->getPointerElementType()); | ||||||||||||||||||||||||||||||||
| auto ptr_a = llvm::cast<llvm::PointerType>(a); | ||||||||||||||||||||||||||||||||
| auto ptr_b = llvm::cast<llvm::PointerType>(b); | ||||||||||||||||||||||||||||||||
| return ptr_a->getAddressSpace() == ptr_b->getAddressSpace(); | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
| return ptr_a->getAddressSpace() == ptr_b->getAddressSpace(); | |
| if (ptr_a->getAddressSpace() != ptr_b->getAddressSpace()) { | |
| return false; | |
| } | |
| #if LLVM_VERSION_MAJOR >= 18 | |
| // Opaque pointers: cannot compare element types directly | |
| if (ptr_a->isOpaque() || ptr_b->isOpaque()) { | |
| // Fallback to type name comparison for opaque pointers | |
| auto a_name = type_name(a); | |
| auto b_name = type_name(b); | |
| return a_name == b_name; | |
| } | |
| #endif | |
| // Non-opaque pointers: compare element types recursively | |
| return is_same_type(ptr_a->getPointerElementType(), ptr_b->getPointerElementType()); |
Uh oh!
There was an error while loading. Please reload this page.