Skip to content

Commit

Permalink
enable aggressive constant propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
jumerckx committed Jul 13, 2024
1 parent 96bd9ee commit 9fdffa7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions examples/generate/main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ struct Line{T}
p2::Point{T}
end

@inline Base.literal_pow(::typeof(^), x::MLIRInteger, ::Val{2}) = x*x

@noinline sq_distance(l::Line) = (l.p1.x - l.p2.x)^2 + (l.p1.y - l.p2.y)^2

function f2(a::Point{i64}, b::Point{i64})
Expand Down
2 changes: 1 addition & 1 deletion src/Generate/absint.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct MLIRInterpreter <: CC.AbstractInterpreter
return new(
cache_token,
Base.get_world_counter(),
CC.InferenceParams(),
CC.InferenceParams(; aggressive_constant_propagation=true),
CC.OptimizationParams(),
CC.InferenceResult[],
true
Expand Down

0 comments on commit 9fdffa7

Please sign in to comment.