Skip to content
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

[type] [bug] Remove redundant component of bit pointer struct #2393

Merged
merged 1 commit into from
Jun 2, 2021

Conversation

Hanke98
Copy link
Contributor

@Hanke98 Hanke98 commented Jun 2, 2021

Related issue = #1905 #2047

Bit pointer struct only needs two components (one for byte pointer and one for offset). But somehow another component was added in #2047. I removed it now.

// 1. get the bit pointer LLVM struct
// struct bit_pointer {
// i8* byte_ptr;
// i32 offset;
// };
auto struct_type = llvm::StructType::get(
*llvm_context, {llvm::Type::getInt8PtrTy(*llvm_context),
llvm::Type::getInt32Ty(*llvm_context),
llvm::Type::getInt32Ty(*llvm_context)});

As the comment described, it is not necessary to allocate two int32 components.

[Click here for the format server]


@CLAassistant
Copy link

CLAassistant commented Jun 2, 2021

CLA assistant check
All committers have signed the CLA.

@Hanke98 Hanke98 merged commit b0ee1e3 into taichi-dev:master Jun 2, 2021
@Hanke98 Hanke98 deleted the fix-bit-ptr-struct branch June 2, 2021 11:43
@k-ye k-ye mentioned this pull request Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants