This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH] Fix bdverN vector cost of cond_[not_]taken_branch_cost
- From: "Gopalasubramanian, Ganesh" <Ganesh dot Gopalasubramanian at amd dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 13 Apr 2015 05:49:16 +0000
- Subject: RE: [PATCH] Fix bdverN vector cost of cond_[not_]taken_branch_cost
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is 165.204.84.222) smtp.mailfrom=amd.com; gcc.gnu.org; dkim=none (message not signed) header.d=none;
- References: <alpine dot LSU dot 2 dot 11 dot 1504071012120 dot 5207 at zhemvz dot fhfr dot qr> <CAFULd4Y-a6B19vq2k1+CfqJEFfQuqWfKN2rKg_sAXO+zP5=1dw at mail dot gmail dot com> <EB4625145972F94C9680D8CADD65161578FD1FE8 at SATLEXDAG02 dot amd dot com> <alpine dot LSU dot 2 dot 11 dot 1504080935320 dot 5207 at zhemvz dot fhfr dot qr>
>Note that before the fixes for PR64909 the epilogue/prologue loops had very large costs associated due to a bug in the cost model implementation. After the fix their cost is reasonable but the cost of the extra jumps is way under-accounted for due to the numbers for >cond_taken_branch_cost and cond_not_taken_branch_cost.
> The proposes match mitigates that somewhat.
Richard! The patch is good. We are done with our benchmarking and found no regressions.
> How did you arrive at the original cost model?
The original cost model as you suspect is not based on architecture alone. Those are the numbers arrived at by analyzing benchmarks and the cost model bugs then. These initial numbers were copied for subsequent architectures too.
Cost assignments saying "scalar_stmt_cost = 6" and "scalar load_cost = 4" doesn't make sense at all. We will have a look into it.
Regards
Ganesh
-----Original Message-----
From: Richard Biener [mailto:rguenther@suse.de]
Sent: Wednesday, April 08, 2015 1:08 PM
To: Gopalasubramanian, Ganesh
Cc: Uros Bizjak; gcc-patches@gcc.gnu.org
Subject: RE: [PATCH] Fix bdverN vector cost of cond_[not_]taken_branch_cost
On Wed, 8 Apr 2015, Gopalasubramanian, Ganesh wrote:
> > I have added a person from AMD to comment on the decision.
> > Otherwise, the patch looks OK, but please wait a couple of days for possible comments.
>
> Thank you Uros!
> I am checking the changes with few tests and benchmarking them.
> Please wait for a couple of days.
Note that before the fixes for PR64909 the epilogue/prologue loops had very large costs associated due to a bug in the cost model implementation. After the fix their cost is reasonable but the cost of the extra jumps is way under-accounted for due to the numbers for cond_taken_branch_cost and cond_not_taken_branch_cost.
The proposes match mitigates that somewhat.
How did you arrive at the original cost model?
Thanks,
Richard.
--
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton HRB 21284 (AG Nuernberg)