Skip to content

Commit 48f8d45

Browse files
authored
Don't separately optimize byval-lowered code. (#276)
It is now done before optimization.
1 parent 09f8b5a commit 48f8d45

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/irgen.jl

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -520,22 +520,6 @@ function lower_byval(@nospecialize(job::CompilerJob), mod::LLVM.Module, f::LLVM.
520520
unsafe_delete!(mod, f)
521521
LLVM.name!(new_f, fn)
522522

523-
# clean-up
524-
# NOTE: byval lowering happens very late, after optimization
525-
ModulePassManager() do pm
526-
# fold the entry bb into the rest of the function
527-
instruction_simplify!(pm)
528-
cfgsimplification!(pm)
529-
530-
# avoid alloca's
531-
scalar_repl_aggregates!(pm)
532-
instruction_combining!(pm)
533-
534-
cfgsimplification!(pm)
535-
536-
run!(pm, mod)
537-
end
538-
539523
return new_f
540524
end
541525

0 commit comments

Comments
 (0)