This is the mail archive of the gcc@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]

Store motion broken



In store_ops_ok, we have:

	/* If a reg has changed after us in this
	   block, the operand has been killed.  */
	return TEST_BIT (reg_set_in_block[bb->index], REGNO (x));

This is, um, wrong.

It will say "No, the store op isn't okay" iff the reg *hasn't* changed
in that block.

In other words, this is why we never say stores are okay, even with
tons of them. Because most of the regs in them *are* okay, so, by this test, they aren't.

I noticed it because it claimed we killed every mem everywhere (literally), they
were available nowhere, gen'd nowhere,  etc.
:)

We really need to actually use the same tracking mechanism GCSE does
to determine when a reg was last set
I've got a patch to do this, and fix up other memory handling problems
in GCSE.

--Dan



-- 
"I used to own an ant farm but had to give it up.  I couldn't
find tractors small enough to fit it.
"-Steven Wright


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