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

codegen: avoid bad tbaa paths #33706

Merged
merged 1 commit into from
Oct 30, 2019
Merged

codegen: avoid bad tbaa paths #33706

merged 1 commit into from
Oct 30, 2019

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Oct 28, 2019

This avoids cases where getMostGenericTBAA could return broken answers.

fix #33590

@vtjnash vtjnash added compiler:codegen Generation of LLVM IR and native code bugfix This change fixes an existing bug backport 1.0 labels Oct 28, 2019
Copy link
Member

@Keno Keno left a comment

Choose a reason for hiding this comment

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

LGTM in terms of changes, but looks like one of the llvmpasses tests needs to be updated.

This avoids cases where getMostGenericTBAA could return broken answers.

fix #33590
@vtjnash vtjnash merged commit 1ae9902 into master Oct 30, 2019
@vtjnash vtjnash deleted the jn/33590 branch October 30, 2019 16:17
@vtjnash
Copy link
Member Author

vtjnash commented Oct 30, 2019

Oops, I blamed getMostGenericTBAA, but the bad TBAA node was actually emitted on the next line of code (which tried to handle when getMostGenericTBAA fails)

julia/src/intrinsics.cpp

Lines 814 to 819 in 4e31741

if (ifelse_tbaa == NULL) {
// LLVM won't return a TBAA result for the root, but mark_julia_struct requires it: make it now
auto *OffsetNode = ConstantAsMetadata::get(ConstantInt::get(T_int64, 0));
Metadata *Ops[] = {tbaa_root, tbaa_root, OffsetNode};
ifelse_tbaa = MDNode::get(jl_LLVMContext, Ops);
}

@KristofferC KristofferC mentioned this pull request Nov 7, 2019
19 tasks
@KristofferC KristofferC mentioned this pull request Nov 29, 2019
18 tasks
KristofferC pushed a commit that referenced this pull request Nov 29, 2019
This avoids cases where getMostGenericTBAA could return broken answers.

fix #33590

(cherry picked from commit 1ae9902)
@KristofferC KristofferC mentioned this pull request Dec 3, 2019
56 tasks
KristofferC pushed a commit that referenced this pull request Dec 4, 2019
This avoids cases where getMostGenericTBAA could return broken answers.

fix #33590

(cherry picked from commit 1ae9902)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug compiler:codegen Generation of LLVM IR and native code
Projects
None yet
2 participants