This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, GCC, stage1] Fallback to copy-prop if constant-prop not possible
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: "Thomas Preud'homme" <thomas dot preudhomme at arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Biener <rguenther at suse dot de>
- Date: Mon, 16 Feb 2015 13:05:45 +0100
- Subject: Re: [PATCH, GCC, stage1] Fallback to copy-prop if constant-prop not possible
- Authentication-results: sourceware.org; auth=none
- References: <000501d049d3$079385a0$16ba90e0$ at arm dot com>
On Mon, Feb 16, 2015 at 11:26 AM, Thomas Preud'homme
> The RTL cprop pass in GCC operates by doing a local constant/copy propagation first and then a global one. In the local one, if a constant cannot be propagated (eg. due to constraints of the destination instruction) a copy propagation is done instead. However, at the global level copy propagation is only tried if no constant can be propagated, ie. if a constant can be propagated but the constraints of the destination instruction forbids it, no copy propagation will be tried. This patch fixes this issue. This solves the redundant ldr problem in GCC32RM-439.
This would address https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34503#c4
I'll have a look at the patch tonight.