- User Since
- Apr 15 2020, 5:28 PM (5 w, 5 d)
Sat, May 16
Thank you. I appreciate the help.
Fri, May 15
Address comments. Added a test for multiple eliminations.
Fri, May 8
Tue, May 5
Name and email would be great. Thank you.
Whoops, deleted one to many static keywords.
Nevermind, I'm an idiot.
Ah, I misunderstood, fixed now.
Mon, May 4
In general I agree that keeping mutable state in the class like this is not optimal. In this case though, I do believe it is better than needing to trace the variable up though several functions to find were it is declared, when in is only used in the bottom few functions. I added a comment stating that these variables are populated in createTailRecurseLoopHeader to hopefully make them a little easier to understand. As for moving the functions out of the class, I was trying to avoid cluttering the code with a bunch of "TRE->" everywhere, but if we think it is cleaner to have this be a struct that is passes around instead of a class with member functions, I am okay with that.
Added anonymous namespace. Renamed two variables to be more clear. Added some comments.
Sat, May 2
Wed, Apr 29
I have gotten a version of this that does the accumulation at the end mostly working. I will finish cleaning it up and try to split it into a few different patches as I reworked a fair bit, and found a few addition improvements I think we can make. I went ahead and updated this diff in case we want to consider it a first step of incremental improvement.
Mon, Apr 27
I'm trying this approach now, but I'm having a hard time seeing a good way to transform this case:
Apr 24 2020
Suppose, instead, the accumulator always starts at zero.
This now fixes both repos of the crash. I removed a test that relied on the bug and actually didn't produce valid output. Added the case with a single branch as a test case. However, all this switch handling really does is propagate a constant. Maybe we should remove it entirely and expect that the constant propagation passes do this for us.
Apr 23 2020
Apr 15 2020
noticed minor typo in the regression test