[LLVMdev] the PartialSpecialization pass (was Re: Is there a "callback optimization"?)
geek4civic at gmail.com
Tue Jun 8 04:53:12 PDT 2010
Good evening, Kenneth.
Thank you to apply (and rewrite my naive code better)
and to file the issue to http://llvm.org/bugs/show_bug.cgi?id=7304
I have checked r105528 at this morning.
I think the pass must be still cleaned up and rewritten.
There are my two proposals for enhancement.
1) To separate Specialization(and rewriting callsites) to other module.
It would be better if new module were available from other passes.
2) To separate methods discovering interests.
Various (optional) heuristics would be helpful.
Also I will help to contribute above someday.
I had been afraid to read the discussion
I was doubtful then whether the patch might be valueless and useless :p
arigato gozaimasu, Takumi
2010/6/5 Kenneth Uildriks <kennethuil at gmail.com>:
> Applied, with minor changes:
> 1. deleted[std:distance(as, ai)] creates a map entry (with a null
> value if the operator is not the left-hand-side of an assignment
> statement) if one doesn't already exist. deleted->find returns
> deleted.end() if the entry doesn't exist and doesn't change the map.
> 2. Included a comment to make it easy to find the spot where the
> callsite is checked against the specialization.
> 3. Included a unit test for multiple specializations that checks each
> callsite to make sure it calls the right function.
> On Fri, Jun 4, 2010 at 2:39 PM, NAKAMURA Takumi <geek4civic at gmail.com> wrote:
>> Good morning, Kenneth
>> Here is my patch for lib/Transforms/IPO/PartialSpecialization.cpp.
>> It works with my several applications but it is not widely tested.
>> The pass had a critical bug, ... when a specialized function is created,
>> all callers are modified. Even if a caller is not needed, to be malformed.
>> My fix includes to examine each of callers to be modified.
>> See also the discussion; http://llvm.org/bugs/show_bug.cgi?id=3757
More information about the llvm-dev