diff options
author | Quentin Carbonneaux <quentin@c9x.me> | 2022-11-21 11:29:22 +0100 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2022-11-21 11:53:00 +0100 |
commit | 0db06dad63e02b619671bfb3dd25fc92c0856319 (patch) | |
tree | 0a37b3bf581b4918516686a31f0ae2d002d140f2 /fold.c | |
parent | 674901b71834739cccf3f8665833dc125d1172b7 (diff) | |
download | roux-0db06dad63e02b619671bfb3dd25fc92c0856319.tar.gz |
recognize some phis as copies
The copy elimination pass is not complete. This patch improves things a bit, but I think we still have quite a bit of incompleteness. We now consistently mark phis with all arguments identical as copies. Previously, they were inconsistently eliminated by phisimpl(). An example where they were not eliminated is the following: @blk2 %a = phi @blk0 %x, @blk1 %x jnz ?, @blk3, @blk4 @blk3 %b = copy %x @blk4 %c = phi @blk2 %a, @blk3 %b In this example, neither %c nor %a were marked as copies of %x because, when phisimpl() is called, the copy information for %b is not available. The incompleteness is still present and can be observed by modifying the example above so that %a takes a copy of %x through a back-edge. Then, phisimpl()'s lack of copy information about %b will prevent optimization.
Diffstat (limited to 'fold.c')
0 files changed, 0 insertions, 0 deletions