This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Combine location with block using block_locations
- From: Mike Stump <mikestump at comcast dot net>
- To: Robert Dewar <dewar at adacore dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, Richard Guenther <richard dot guenther at gmail dot com>, Dehao Chen <dehao at google dot com>, Xinliang David Li <davidxl at google dot com>, Michael Matz <matz at suse dot de>, Diego Novillo <dnovillo at google dot com>, Dodji Seketeli <dodji at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>, Jan Hubicka <hubicka at ucw dot cz>, Jason Merrill <jason at redhat dot com>, Richard Henderson <rth at redhat dot com>
- Date: Thu, 13 Sep 2012 10:44:42 -0700
- Subject: Re: [PATCH] Combine location with block using block_locations
- References: <CAO2gOZXFkCpuFqXpPw6ju14BB=RBdt-kDhKsJgk4N41=Q19VHw@mail.gmail.com> <CAO2gOZVNK5uS7NJt1uV6S7nCMtoj+g23BJiH_=P6TLgkh4d1Sw@mail.gmail.com> <CAFiYyc1pA9+=_OE50rCSmKG4ftasrNYE8jRMt3gf_F+6ee9OVw@mail.gmail.com> <alpine.LNX.2.00.1209111500200.9940@wotan.suse.de> <CAFiYyc0vM+LZJ_6MRFud9c1LhyFsu2jf-E38FuDryoMo5G7iYw@mail.gmail.com> <CAO2gOZV8SP-sOVEJBEsvF+M3yiKwtw7yWarfhZ1xeCVYjE_7KA@mail.gmail.com> <CAO2gOZU0v3TeuLDLN02OCVPOht7JYg+tGU=UEJEdN_42fGFsTw@mail.gmail.com> <CAO2gOZWkn99pRrdp=0YjujpJvdtWXXq7LTRghU1+Ujq7E1ZoXg@mail.gmail.com> <CAFiYyc1Jb0ya49ny17c83sok_t3J4M9oN-K0G5-yTP=a+EVkwA@mail.gmail.com> <CAAkRFZ+CX3475JCSzqTspfqhkH363VJLUE1OVq5gsDrFpudu4w@mail.gmail.com> <CAO2gOZWMwDGLXXZ1oyd5Hiqvb9uJmUs+ZLAzhEanyvaF8Lvj=w@mail.gmail.com> <CAO2gOZWKDceuDo_pdxvn4-9o0SdEvaNSVHjJ-sJwp56GqnD=oA@mail.gmail.com> <CAFiYyc2te+pKYOzYV1aGusQB=R_onBAa+LeQ=muZUxgmOA0CSA@mail.gmail.com> <5051E0A0.4050702@adacore.com> <87txv13m7l.fsf@fleche.redhat.com> <50520F18.8020407@adacore.com>
On Sep 13, 2012, at 9:51 AM, Robert Dewar <dewar@adacore.com> wrote:
> I routinely debugged code at -O1, but then the
> compiler got better at optimization, and things deteriorated so much
> at -O1 that now I don't even attempt it.
An example of a non-feature for me would be the reordering of instructions by scheduling when there is no benefit, only reorder, if there is a non-zero benefit. This causes the jumpy debug experience, and needlessly so in some cases. This is also an example that gdb can't fix. The fix would be to compute costs as tuple and have the second part of the cost be the original instruction ordering. Then, the scheduler actively works to preserve order, unless the upper case of the cost indicates there is a win to be had.