Yakov <exeb...@gmail.com> wrote: > Kyryl you cannot inline everything because you will get code > explosion, often infinite code explosion when functions have a > circular dependency on each other. I am just talking about inlining > certain functions carefully chosen by a programmer.
Yeah, I get that. That's why it is so hard to make such a tool. Because recursion is hard to decompose, so the inliner has to be smart enough to actually rewrite the recursive solution iteratively otherwise it will blow up. But that actually opens up a massive opportunity for optimizations, because lets be real - recursion sucks and there is never ever a situation where it's actually useful for the cpu to do. And yes, the unary() function in tcc which is recursive sucks a lot too, there is just so much state in there that it's very difficult to understand what is going on. Luckly I have been looking at that code for more than a year, so my grasp got better, but if that were iterative, I be loving it even more. -- _______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel