1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00

do not override existing basic blocks when branching backwards!

This commit is contained in:
Andrea Corallo 2019-09-08 21:42:51 +02:00
parent 5f1039630d
commit c702e25a7a

View File

@ -500,9 +500,11 @@ If NEGATED non nil negate the tested condition."
(comp-emit (if negated (comp-emit (if negated
(list 'cond-jump a b target bb) (list 'cond-jump a b target bb)
(list 'cond-jump a b bb target))) (list 'cond-jump a b bb target)))
(unless (gethash target blocks)
;; Create the bb target only if does not exixsts already.
(puthash target (puthash target
(make-comp-block :sp (+ target-offset (comp-sp))) (make-comp-block :sp (+ target-offset (comp-sp)))
blocks) blocks))
(comp-mark-block-closed)) (comp-mark-block-closed))
(comp-emit-block bb))) (comp-emit-block bb)))