Skip to content

Commit

Permalink
Mark load from DataType as constant (JuliaLang#37044)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao committed Aug 18, 2020
1 parent 327b2e3 commit 1d950f4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,9 @@ static void add_return_attr(T *f, Attribute::AttrKind Kind)

static MDNode *best_tbaa(jl_value_t *jt) {
jt = jl_unwrap_unionall(jt);
if (jt == (jl_value_t*)jl_datatype_type ||
(jl_is_type_type(jt) && jl_is_datatype(jl_tparam0(jt))))
return tbaa_const;
if (!jl_is_datatype(jt))
return tbaa_value;
if (jl_is_abstracttype(jt))
Expand Down

0 comments on commit 1d950f4

Please sign in to comment.