From c668f4fc78ff43e5f96e60e3bd20b7c7474129d4 Mon Sep 17 00:00:00 2001 From: John Lorentzson Date: Thu, 3 Jul 2025 19:54:15 +0200 Subject: [PATCH] Some cleanup after deleted code --- .../user-side-compiler/backend/code-generator.lisp | 10 +++++----- .../user-side-compiler/middle/optimizations.lisp | 6 ------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/wip-duuqnd/user-side-compiler/backend/code-generator.lisp b/wip-duuqnd/user-side-compiler/backend/code-generator.lisp index 4f8e54f..2c19660 100644 --- a/wip-duuqnd/user-side-compiler/backend/code-generator.lisp +++ b/wip-duuqnd/user-side-compiler/backend/code-generator.lisp @@ -164,15 +164,15 @@ :constant) (emit-adc :immediate (ir-constant-value (second (inputs inst)))) (emit-adc :address (data-reference (second (inputs inst))))) - (emit-store-result (output inst))) + (emit-store-data (output inst))) (defmethod compile-ir ((inst ir-assign)) (emit-load-data (input inst)) - (emit-store-result (output inst))) + (emit-store-data (output inst))) (defmethod compile-ir ((inst ir-fetchvar)) (emit-load-data (input inst)) - (emit-store-result (output inst))) + (emit-store-data (output inst))) (defmethod compile-ir ((inst ir-call)) (loop :for arg :in (inputs inst) @@ -181,7 +181,7 @@ :unless (eql (strategy (allocation-details arg)) :direct-to-argvec) :do (emit-sta :address (+ arg-index +argvec-offset+))) (emit-asm-instruction :opcode #x20 :operand (callee inst) :byte-length 3) - (emit-store-result (output inst))) + (emit-store-data (output inst))) (defmethod compile-ir ((inst ir-jump)) (unless (eql (next (iblock inst)) @@ -266,7 +266,7 @@ start-instruction) (defun compile-iblock (iblock) - (emit-asm-label (unique-name iblock)) + (emit-asm-label (name iblock)) (do-instructions (inst iblock) (compile-ir inst))) diff --git a/wip-duuqnd/user-side-compiler/middle/optimizations.lisp b/wip-duuqnd/user-side-compiler/middle/optimizations.lisp index 518b58d..3724b03 100644 --- a/wip-duuqnd/user-side-compiler/middle/optimizations.lisp +++ b/wip-duuqnd/user-side-compiler/middle/optimizations.lisp @@ -178,12 +178,6 @@ IR-FETCHVAR instructions that would serve no purpose in compiled code." (let ((candidates-type '(or ir-test-equal ir-plus ir-minus)) (to-remove '())) (do-instructions (inst iblock) - #+(or) - (when (equalp (name iblock) "else") - (break "~A ~A" inst - (if (typep inst 'ir-fetchvar) - (format nil "~A ~A ~A" (input inst) (output inst) (users (output inst))) - ""))) (when (typep inst 'ir-fetchvar) (let ((result (output inst)) (src (input inst)))