Skip to main content
6 events
when toggle format what by license comment
Apr 13, 2017 at 12:32 history edited CommunityBot
replaced http://cstheory.stackexchange.com/ with https://cstheory.stackexchange.com/
Jan 20, 2014 at 22:32 comment added cody Well, in this case, inlining X and performing dead code analysis would result in the answer you are looking for (first inline X into Y, eliminate unreachable code, using e.g. constant propagation, then inline Y into X). In general this only works if there is no "real" recursion though, which you can't find out before removing dead code.
Jan 20, 2014 at 17:16 vote accept n00b101
Jan 20, 2014 at 17:16 comment added n00b101 However, I should point out that I was trying to identify a special case of the concept, where there appears to be mutual recursion between two functions but if you "look inside" the branches of the conditional statements of each function then it is seen that in fact thee is no mutual recursion at all. This particular case is of interest because I would like to be able to generate recursion-free code (not all hardware supports recursion and there are performance concerns related to function call overhead).
Jan 20, 2014 at 17:13 comment added n00b101 This does identify and address the general concept (mutual recursion). Thank you for the C example as well, it was very helpful.
Jan 17, 2014 at 23:32 history answered cody CC BY-SA 3.0