[llvm-commits] ideas for 10096
Rafael Ávila de Espíndola
rafael.espindola at gmail.com
Tue Jun 28 11:35:45 PDT 2011
I am trying to fix 10203 and currently I have three ideas of how it
might be fixed:
*) Fix bit rot on the strong phi elimination. IT currently crashes when
building firefox.
*) A simple preprocessioning pass that would try to convert
%vreg40<def> = COPY %vreg45
%vreg42<def> = COPY %vreg45
to
%vreg40<def> = COPY %vreg45
%vreg42<def> = COPY %vreg40
That is, try to use in the RHS values that have been defined in the same bb.
* The third idea (which I like a bit more right now) is to change the
coalescer itself
Right now it works in three stages if I understand it correctly.
1) it collects which value numbers of A are copies of B and B of A.
2) It then optimistically merges the intervals, by first copying the
LHS and then the RHS with exceptions for the A=B and B=A cases.
3) It now walks the ranges of both registers looking for overlapping
ones. If it finds one, it checks if both have the same value number in
the new merged interval.
I think this can be done in one pass. As we walk the ranges, we can
find the value numbers and check if they are compatible. Doing this in
one pass then has the advantage that it is easy to add support for the
case we have in the bug.
In this case, the dominance check can be as simple an "defined earlier
in the same bb".
So, do you agree with the third option being the best or would a
preprocess pass (or fixing the strong phi elimination) be better?
Cheers,
Rafael
More information about the llvm-commits
mailing list