This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ] Isel cleanup pass: Reuse known zeros/ones after zero-extension of i1.
AbandonedPublic

Authored by jonpa on Apr 7 2021, 8:20 AM.

Details

Reviewers
uweigand
Summary

This patch is related to https://reviews.llvm.org/D98905 in the sense that it handles the same optimization. The difference is that this version adds a pass after isel in order to have a global scope available (instead of working on the DAG). The idea is to only reuse the known immediate when there is no other user.

Experiments show so far that this is a less aggressive overall change: less (~5000 instead of ~9000) immediate loads eliminated, but also less register moves introduced.

I suppose adding a new separate "isel cleanup" pass is a bigger change per se, but on the other hand it might be acceptable as an intermediate step towards the "global isel" change that has been under development for years now. Of course, benchmarks would have to prove the worth also, and I will post the benchmark results shortly.

Diff Detail

Event Timeline

jonpa created this revision.Apr 7 2021, 8:20 AM
jonpa requested review of this revision.Apr 7 2021, 8:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2021, 8:20 AM
jonpa abandoned this revision.Apr 13 2021, 2:51 AM

Seems better to do this with PeeholeOptimizer instead (https://reviews.llvm.org/D100242).