This is an archive of the discontinued LLVM Phabricator instance.

Tail merge size
AbandonedPublic

Authored by avt77 on Jun 9 2017, 9:01 AM.

Details

Summary

The issue described here: https://bugs.llvm.org/show_bug.cgi?id=32802. I only changed the default value of tail-merge-size option from 2 to 3. As result several tests were changed but the main problem described in https://bugs.llvm.org/show_bug.cgi?id=27136 were successfully resolved.
The compilation time was increased by 3 sec only (from 2840 to 2843). The common size of executables inside bin folder was decreased by 1M.
I'm thinking we should use tail-merge-size=1 in case of size optimization: I'm ready to implement it quickly.

Diff Detail

Event Timeline

avt77 created this revision.Jun 9 2017, 9:01 AM
RKSimon edited edge metadata.

A few minors, but I'd prefer someone more knowledgable in this area to review it.

You may need to bring in some ARM/AMDGPU/PowerPC guys too ?

test/CodeGen/X86/loop-search.ll
1

Remove this line - we should only be generating with update_llc_test_checks.py

32–33

I think this comment can go now?

test/CodeGen/X86/tail-opts.ll
109

Keep these whitespace if you can - minimize diff

415

Keep these whitespace if you can - minimize diff

spatel added inline comments.Jun 12 2017, 11:00 AM
test/CodeGen/X86/loop-search.ll
1

I changed this (and several other test files) with rL305206, and I've specialized update_test_checks.py to only work with 'opt' to avoid this problem in the future (rL305208).

We could rename that script to have 'opt' in its name too, but that might be more trouble than its worth because we now have a ton of IR tests with the existing script name in a comment line as seen here.

avt77 updated this revision to Diff 102352.Jun 13 2017, 9:26 AM

The comments fixed.
New reviewers added.

davide edited edge metadata.Jun 18 2017, 9:39 PM

Do you know why that was 3? The choice could have been arbitrary, but better double check.

Also, the size of the binaries in bin/ decreased by 1M is a little misleading as metric [i.e. you might have an executable which size increased by 5M and another which decreased by 6M and you would have the same number :)]. Can you get a breakdown per-executable?
Last question: what you do you mean with "The compilation time was increased by 3 sec only?" What configuration are you talking about?

davide requested changes to this revision.Jun 18 2017, 9:39 PM
This revision now requires changes to proceed.Jun 18 2017, 9:39 PM
paquette requested changes to this revision.Jun 19 2017, 9:04 AM

I agree with Davide on this. I think we really need to have a good reason to change thresholds like these; the impact of changing thresholds can be rather unpredictable. I'd like to understand why changing this threshold

(1) Fixes the problem
(2) Won't (likely) have a negative impact on other tests

I think per-test measurements + flags used etc. would help here.

mcrosier resigned from this revision.Jul 26 2017, 6:16 AM
davide resigned from this revision.Jul 26 2017, 10:57 AM

I don't think it's worth pursuing this path for the reason I outlined in my previous comment.

avt77 abandoned this revision.Sep 19 2017, 3:45 AM

It seems nobody wants to change the default value of the switch.