Skip to content

Commit

Permalink
do not thread some jumps in ssa mode
Browse files Browse the repository at this point in the history
this is a hack but works around #22 for now
probably all these optimizations need another look
  • Loading branch information
tromey committed Sep 20, 2017
1 parent 08c48d0 commit 66f329a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion elcomp/jump-thread.el
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ collector."
(setf rewrote-one t)))
;; A GOTO to a block holding just another branch (of any kind)
;; can be replaced by the instruction at the target.
(when (and (elcomp--goto-p insn)
;; FIXME In SSA mode we would have to deal with the phis.
(when (and (not in-ssa-form)
(elcomp--goto-p insn)
;; Exclude a self-goto.
(not (eq block
(elcomp--block insn)))
Expand Down

0 comments on commit 66f329a

Please sign in to comment.