This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/78332] [ARM] Negative costs of ivopts groups
- From: "amker at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 16 Nov 2016 09:56:09 +0000
- Subject: [Bug tree-optimization/78332] [ARM] Negative costs of ivopts groups
- Auto-submitted: auto-generated
- References: <bug-78332-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78332
amker at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amker at gcc dot gnu.org
--- Comment #1 from amker at gcc dot gnu.org ---
I think there are two issues here.
First is the negative cost. It's because we book saved cost of auto-increment
addressing mode to use-cand cost, rather than the candidate itself. Given it
only makes sense to use auto-increment candidate for the use why it is created,
I think we can change the strategy by booking saved cost to candidate it self.
This issue could be improved, but not a bug I think.
Second is auto-increment candidate is preferred too much. This is again a cost
model issue. A. to how much auto-increment should be preferred; B. should
register cost be tightened because currently the effect is only spill cost in
loop is considered, cost of epilogue/prologue pop/push of more registers is not
handled. Also addressing mode costs returned by backend need to be considered
too. I will further investigate this later.