-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Labels
bugSomething isn't workingSomething isn't workingoptimizerRelated to the code optimizerRelated to the code optimizer
Description
Loop hoisting is broken. It doesn't hoist instructions that the loop control variable depends on, but it happily hoists instructions that change a variable which was already read by the loop, which is incorrect:
// To make the loop hoisting change more understandable
#set data-flow-optimization = none;
var a = 0;
do
print(a);
a = 1;
while switch1.enabled;
produces:
set .a 0
set .a 1
print .a
sensor *tmp0 switch1 @enabled
jump 2 notEqual *tmp0 false
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingoptimizerRelated to the code optimizerRelated to the code optimizer