Improved code generation
This commit is contained in:
parent
82f040f7d1
commit
6e22febc01
4 changed files with 12 additions and 7 deletions
|
@ -10,6 +10,10 @@ import (
|
|||
|
||||
// SaveRegister attempts to move a variable occupying this register to another register.
|
||||
func (f *Function) SaveRegister(register cpu.Register) {
|
||||
if !f.cpu.IsUsed(register) {
|
||||
return
|
||||
}
|
||||
|
||||
var variable *Variable
|
||||
|
||||
for _, v := range f.variables {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue