[patch] tailcall elimination
sehr at google.com
Tue Feb 12 09:27:05 PST 2013
Just on the off chance people were curious: when I picked up Nick's change
I had some (mostly aesthetic) issues with using std::sort and
std::binary_search for this CL, but went ahead. When someone asked me
off-line mail why I was using WeakVH when my changes were entirely within
an optimization pass, I hit the tipping point, and decided to take the step
back and try using DenseSet, etc. I didn't want the community wasting any
more time reviewing the patch. So I am making it waste time reading my
missives instead. :-) Thanks for your patience.
On Mon, Feb 11, 2013 at 3:22 PM, David Sehr <sehr at google.com> wrote:
> Please ignore this patch for now. I am revising it according to some
> input provided off-line.
> On Mon, Feb 11, 2013 at 8:59 AM, David Sehr <sehr at google.com> wrote:
>> Hi Duncan,
>> Yes, my comments were a bit terse, to be sure. Nick's patch enables tail
>> call elimination (including tail recursion elimination) subject to two
>> constraints on the function F being transformed:
>> 1) alloca addresses cannot be *captured* by any call site in F.
>> 2) alloca addresses cannot be *used* by the candidate call site S for
>> tail call elimination.
>> There was a small bug in how condition (2) was enforced. It was only
>> being enforced for tail calls to functions other than F (recursive calls).
>> My change checks the use of alloca both for labeling call sites with
>> "tail" and when converting them to iteration.
>> On Mon, Feb 11, 2013 at 6:12 AM, Duncan Sands <baldrick at free.fr> wrote:
>>> Hi David,
>>> On 10/02/13 23:50, David Sehr wrote:
>>>> This patch enables tail call optimization when alloca instructions are
>>>> It is based on
>>>> adding a check that alloca addresses are not used by tail recursion
>>> did you change something wrt Nick's patch?
>>> Ciao, Duncan.
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits