Open okuraofvegetable opened 4 years ago
アセンブリのジャンプの連鎖を削除したい
ライブラリ関数の改善
kNormalのfvをメモ化したらコンパイルがめっちゃ早くなった。
Asm.tの定数畳み込みを実装した。constFoldAsmとelimAsmで変化がなくなるまで最適化。
sakakuraがelim_asmの副作用判定のAnsをtrueにしたまま戻し忘れてたのを見つけてくれたので直したが消える個数は変わらなかった。IfEqで再帰的に副作用判定するときはかならずtrueになっているっぽい(?)
image_sizeなどのグローバル配列は一度しか書き込みがおこらない。なんとか解析して書き込み後に定数扱いして定数畳みこみに反映させたい(div10とかもこれで消える)
ライブラリのfisposなどが
let rec fispos =
if x > 0.0 then true else false
in
になっていたが、これを
let rec fispos x = ( x > 0.0) in
に直すとかなり命令数が減った
再帰関数のインライン化のthresholdを別にして無限に展開されないようにした、これで-inline 800
でもコンパイルにそんなに時間がかからないようになった。
浮動小数の0.0レジスタを作る
分岐が貧弱だったのでレジスタを比較して直接ジャンプする命令をシミュレータ上で導入してもらった 今はメモリアクセスのアドレシングモードが足りてないと感じている
Sw r1 r2 r3でmem[r2+r3]にr1をStoreみたいな感じにしたい
型を揃えるためだけのdummyはアホくさいので無視したい
ジャンプのchainの除去(j+j,j+branch等)
無駄なLoad