[llvm-dev] RFC: speedups with instruction side-data (ADCE, perhaps others?)

escha via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 15 23:56:49 PDT 2015


> On Sep 15, 2015, at 8:47 PM, Daniel Berlin <dberlin at dberlin.org> wrote:
> 
> On Tue, Sep 15, 2015 at 7:16 PM, escha <escha at apple.com> wrote:
>> You mean the input test data? I was testing performance using our offline perf suite (which is a ton of out of tree code), so it’s not something I can share, but I imagine any similar test suite put through a typical compiler pipeline will exercise ADCE in similar ways. ADCE’s cost is pretty much the sum of (cost of managing the set) + (cost of eraseinstruction), which in our case turns out to be 1/3 the former and 2/3 the latter (roughly).
> 
> I asked because I can't really reproduce the results of your massive
> speedups on even the larger testcases i have around, certainly not on
> the order you reported.
> 
> I can get a speedup of about 10%  by changing the smallptrsetsize to
> be 16 from 128.
> I can get a reduction of about 15% by using a visited bit (IE half the
> speedup you report).
> I can get roughly the same speedup by using denseset, etc.

Hmm, interesting! I guess it could be a variation in either:

a) the number of instructions per function on average
or
b) the amount of stuff that needs to be DCE’d on average (less stuff -> more time spent in set maintenance, comparatively)

If it turns out we can get most of the gain in practice without this sort of extra bit, that sounds good too.

—escha


More information about the llvm-dev mailing list