Skip to content

Reducible move instructions on PROGN PIC macro #2

@takagi

Description

@takagi

Situation

A predefined PIC macro progn is expanded into a series of let bindings. The return values of its containing expressions are bound to temporal variables, which are never referenced.

For example, the following expression:

(progn
  (foo-routine)
  (bar-routine))

is expanded into:

(let ((tmp (foo-routine)))
  (bar-routine))

then, is compiled into:

CALL     _FOO_ROUTINE
MOVWF    L0
CALL     _BAR_ROUTINE

Problem
The MOVWF instruction is reducible.

Solution
Reducing the useless MOVWF instruction.

CALL     _FOO_ROUTINE
CALL     _BAR_ROUTINE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions