This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/53260] New: cse doesn't record REG_EQUAL notes for function invariants
- From: "rsandifo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 06 May 2012 19:25:40 +0000
- Subject: [Bug rtl-optimization/53260] New: cse doesn't record REG_EQUAL notes for function invariants
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53260
Bug #: 53260
Summary: cse doesn't record REG_EQUAL notes for function
invariants
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rsandifo@gcc.gnu.org
CSE adds REG_EQUAL notes for constant equivalences that it finds:
/* If this is a single SET, we are setting a register, and we have an
equivalent constant, we want to add a REG_NOTE. We don't want
to write a REG_EQUAL note for a constant pseudo since verifying that
that pseudo hasn't been eliminated is a pain. Such a note also
won't help anything.
It might be worth extending this to function_invariant_p,
so that reload has the option of eliminating registers that
are equivalent to known frame addresses. A hacked-up patch
to do this showed a surprising number of differences,
but I haven't had chance to see whether they're good or bad.