-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incorrect IR generation for built-in arrays
- Loading branch information
1 parent
e00c6f7
commit a150a50
Showing
1 changed file
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -303,16 +303,16 @@ createGEPInsteadOfAlloc: [ | |
]; | ||
|
||
createStoreFromRegisterToRegister: [ | ||
regName: destRegName: regType: processor: block: ;;;;; | ||
(" store " regType @processor getNameById " " @regName @processor getNameById ", " regType @processor getNameById "* " destRegName @processor getNameById) @block appendInstruction | ||
regNameId: destRegNameId: regType: processor: block: ;;;;; | ||
(" store " regType @processor getNameById " " @regNameId @processor getNameById ", " regType @processor getNameById "* " destRegNameId @processor getNameById) @block appendInstruction | ||
|
||
regName @[email protected].@irName1 set | ||
destRegName @[email protected].@irName2 set | ||
regNameId @[email protected].@irName1 set | ||
destRegNameId @[email protected].@irName2 set | ||
]; | ||
|
||
createStoreFromRegister: [ | ||
regName: destRefToVar: processor: block: ;;;; | ||
regName destRefToVar getVar.irNameId destRefToVar @processor getMplSchema.irTypeId @processor @block createStoreFromRegisterToRegister | ||
regNameId: destRefToVar: processor: block: ;;;; | ||
regNameId destRefToVar getVar.irNameId destRefToVar @processor getMplSchema.irTypeId @processor @block createStoreFromRegisterToRegister | ||
]; | ||
|
||
getValueOrDeref: [ | ||
|
@@ -427,8 +427,15 @@ createCheckedCopyToNewWith: [ | |
] if | ||
doDie [dstRef @[email protected]] when | ||
] [ | ||
loadReg: srcRef @processor @block createDerefToRegister; | ||
loadReg dstRef @processor @block createStoreFromRegister | ||
srcRef isPlain [srcRef staticityOfVar Dynamic >] && [ | ||
srcRef dstRef @processor @block createStoreConstant | ||
] [ | ||
@srcRef @processor @block makeVarRealCaptured | ||
loadReg: srcRef @processor @block createDerefToRegister; | ||
loadReg dstRef @processor @block createStoreFromRegister | ||
] if | ||
|
||
@dstRef makeVarPtrCaptured | ||
] if | ||
]; | ||
|
||
|