This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/42461] [4.5 Regression] Missed optimisation for pure functions with __builtin_unreachable
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jan 2010 16:47:43 -0000
- Subject: [Bug rtl-optimization/42461] [4.5 Regression] Missed optimisation for pure functions with __builtin_unreachable
- References: <bug-42461-8951@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from ebotcazou at gcc dot gnu dot org 2010-01-30 16:47 -------
So what's the story here? Is it the case that const/pure function removal must
now be done entirely at the tree level because everything is frozen EH-wise at
the RTL level? Why isn't there the obvious early return for -fno-exceptions?
/* Return true if INSN could throw, assuming no REG_EH_REGION note
to the contrary. */
bool
insn_could_throw_p (const_rtx insn)
{
if (CALL_P (insn))
return true;
if (INSN_P (insn) && flag_non_call_exceptions)
return may_trap_p (PATTERN (insn));
return false;
}
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42461