This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Implement non-call exceptions


On Thu, Dec 04, 2003 at 11:30:11AM +0000, Andrew Haley wrote:
> Hmm.  Why do we need to treat instructions that can fault, but cannot
> throw, in a special way?

You can't move an instruction that may trap to a place that isn't
protected by a previous conditional.  Hmm, that's awkward.

	if (test)
	  g = a+b+c;

=>

	t1 = a + b;
	if (test)
	  {
	    t2 = t1 + c;
	    g = t2;
	  }

might be a win if test is expected to be true, since the latency
for the addition is partially shared with the test and branch.
But if that's FP, and we're not using whichever -ffast-math subset
supressed concern about traps, then the transformed code may trap
when the original won't.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]