We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the new --explorer output, I found a bad code pattern. I gave the compiler the following code to compile:
--explorer
fun add_all x = case x of A a => (a,a,a) | B a b => (a,b,b) | C a b c => (a,b,c);
Now looking at the code for loading a, b, c in the last line, I see:
(move 0 ((417 := 389))) (inst (Arith (Shift Lsr 421 417 9))) (425 := CurrHeap Add 421) (inst (Mem Load 429 (Addr 425 0x8))) (move 0 ((433 := 389))) (inst (Arith (Shift Lsr 437 433 9))) (441 := CurrHeap Add 437) (inst (Mem Load 445 (Addr 441 0x10))) (move 0 ((449 := 389))) (inst (Arith (Shift Lsr 453 449 9))) (457 := CurrHeap Add 453) (inst (Mem Load 461 (Addr 457 0x18)))
And this is after common subexpression elimination in WordLang. It ought to be:
(move 0 ((417 := 389))) (inst (Arith (Shift Lsr 421 389 9))) (425 := CurrHeap Add 421) (inst (Mem Load 429 (Addr 425 0x8))) (move 0 ((433 := 389))) (move 0 ((433 := 421))) (move 0 ((441 := 425))) (inst (Mem Load 445 (Addr 425 0x10))) (move 0 ((449 := 389))) (move 0 ((453 := 421))) (move 0 ((457 := 425))) (inst (Mem Load 461 (Addr 425 0x18)))
which after dead code elimination ought to be:
(move 0 ((417 := 389))) (inst (Arith (Shift Lsr 421 389 9))) (425 := CurrHeap Add 421) (inst (Mem Load 429 (Addr 425 0x8))) (inst (Mem Load 445 (Addr 425 0x10))) (inst (Mem Load 461 (Addr 425 0x18)))
i.e. loads generated by straightforward pattern matching should be just a list of loads at this point.
The text was updated successfully, but these errors were encountered:
myreen
No branches or pull requests
Using the new
--explorer
output, I found a bad code pattern. I gave the compiler the following code to compile:Now looking at the code for loading a, b, c in the last line, I see:
And this is after common subexpression elimination in WordLang. It ought to be:
which after dead code elimination ought to be:
i.e. loads generated by straightforward pattern matching should be just a list of loads at this point.
The text was updated successfully, but these errors were encountered: