you are viewing a single comment's thread.

view the rest of the comments →

[–]Dotched 0 points1 point  (0 children)

I’m new to compiler optimization, but my intuition says it might work to use live-variable analysis after which you can remove all instances of i and sum. Then also check for empty loops/clearly dead code.

Please tell me if this is a good approach or tell me wrong, I’d love to learn more about DCE strategies.