This is the mail archive of the 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: birthpoints in rtl.

Kenneth Zadeck wrote:

Birthpoints are not nearly as useful as phi-functions because the
algorithms that use birthpoints do not generally leave the birthpoints
in the right places when they are finished. There is a lot of value
added by the operand of phi-functions. But they do solve the n**2
case for DU and UD chains (and because of the better SSA building
algorithms than were available when Reif and Lewis first proposed
their technique, will be much faster).
I wonder if we could use these factored copies with a threshold value instead, such that we only use them when they will replace X uses or defs, something that is tunable and start with high values for X. This means the copies won't get in the way normally, and will make a big difference when large/pathological cases come along. Experiments could then determine a good value for X.

The copies will then only interfere with optimizations when the situation is already horrible. In fact, it wouldn't surprise me if this could actually *help* a number of passes, including RA, for larger values of X :-)

Does RTL have an efficient copy prop? That could then naturally remove these copies when desired, and then they could be added back in as needed the next time DU/UD chains are built. If they weren't removed, the next DU/UD build wouldn't trigger the threshold machinery since the copy is already there, and we still end up with the same results.

There is the complication of how to add the noop move in the presence
of SUBREGs, and given the amount of pain that I suffered in adding the

If we used thresholding, you could try simply punting on these initially and see what happens, and only deal with it when it becomes an issue.

Anyway, just a thought on how to make it less intrusive.


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