This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: conflict matrix vs reload
- To: law at cygnus dot com
- Subject: Re: conflict matrix vs reload
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Wed, 17 Nov 1999 19:37:33 +0000 (GMT)
- Cc: gcc at gcc dot gnu dot org
> But those registers would be considered live on both paths. Thus, on path
> A when we initialize reg44, we would create a conflict with reg46 because
> reg46 was live at the point where reg44 was set.
>
> Similarly on the path where we initialized reg46 we would have created a
> conflict with reg44 because reg44 was live.
You have convinced me that your code is right.
But I believe your comment is wrong.
You said:
3. Either X or Y is not evaluted on the path to P
(ie it is used uninitialized) and thus the
conflict can be ignored.
As I have pointed out, the conflict cannot be ignored in all cases where
either X or Y is not evaluated. But your points 1. and 2. are already
general enough so that you can describe the remaining cases with:
3. Neither X or Y are evaluted on the path to P
(ie it is used uninitialized) and thus the
conflict can be ignored.
As a corollary, we can examine when we'd run into problems with hard
reg conflicts if we removed record_conflicts altogether:
only iff both hard reg and pseudo are not set on the path to P, we won't
record a conflict for a pair of live hard / pseudo reg.
If both are indeed uninitialized, we won't mind any conflict.
A hard reg, however, can be initialized at the start of the function
without being set explicitly by rtl - it is live if it contains a function
argument or return value pointer.
We could inadvertantly clobber the hard register when we see the uninitalized
pseudo die.
So we need to call record_conflicts just once - for the entry block.