[llvm-commits] Dead argument elimination rewrite
Dan Gohman
gohman at apple.com
Wed Jun 18 18:39:46 PDT 2008
On Jun 17, 2008, at 1:44 AM, Matthijs Kooijman wrote:
> Hi Dan,
>
>> I don't think it's a high priority, but a "flatten return values"
>> pass
>> would be nice to have.
> I have one lying around that is general enough IIRC, I'll only have
> to pull it
> out of our local namespace into llvm :-)
Cool, thanks!
>
>
>>
>> UseMap is a std::multimap that maps every argument and return value
>> to every argument or return value that it "uses". That caught my
>> eye as a potential scalability suspect. Have you done any testing
>> on large inputs?
> I've done some testing on the basictest.ll testcase, copied about a
> hundred
> times (in the same file). Execution times are very similar to the
> old version
> (around 43ms according to -time-passes). I've also did the same
> thing to a new
> testcase that has a lot of unused return values (parts of struct
> returns).
> Here, the new code needs over twice as much time, but that's mainly
> due to it
> removing stuff that the old code didn't.
>
> I also tried using a hash_multimap instead of a normal multimap, but
> that
> didn't seem to make much of a difference. Perhaps on even larger
> inputs, but
> I'll leave it at multimap for now since the hash version is non-
> standard.
Ok. Would you mind taking a look at timings on
MultiSource/Applications/kimwitu++
also?
>
>
>> The InspectedFunctions member variable looks redundant. Can it be
>> removed?
> I added it, to prevent infinite looping. When removing stuff from a
> function,
> a new function is created with the new function type. This variable
> helps to
> prevent the new function from being stripped as well.
>
> Alternatively, I could make a copy of the function list and iterate
> over that,
> which should have the same effect.
When DAE creates a new function, it inserts the function into the list
in the
position of the old function, so as far as I can tell DAE shouldn't
ever end
up calling RemoveDeadStuffFromFunction on one of the new functions.
Dan
More information about the llvm-commits
mailing list