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

[Aggregate_load_box] add lifetime start #53095

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wsmoses
Copy link
Contributor

@wsmoses wsmoses commented Jan 29, 2024

No description provided.

@vchuravy
Copy link
Sponsor Member

Please explain why the change is necessary and if feasible add a test in test/llvmpasses

Copy link
Sponsor Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM. Though I am surprised LLVM couldn't already figure this out simply because it is a simple alloc with minimal uses

@@ -1924,6 +1924,7 @@ static jl_cgval_t typed_load(jl_codectx_t &ctx, Value *ptr, Value *idx_0based, j
elty = Type::getIntNTy(ctx.builder.getContext(), 8 * nb);
}
}
ctx.builder.CreateLifetimeStart(intcast, ConstantInt::get(Type::getInt64Ty(elty->getContext()), nb));
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ctx.builder.CreateLifetimeStart(intcast, ConstantInt::get(Type::getInt64Ty(elty->getContext()), nb));
if (intcast)
ctx.builder.CreateLifetimeStart(intcast, ConstantInt::get(Type::getInt64Ty(elty->getContext()), nb));

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.

None yet

3 participants