diff options
author | Amara Emerson <amara@apple.com> | 2021-01-25 11:43:19 -0800 |
---|---|---|
committer | Amara Emerson <amara@apple.com> | 2021-01-25 17:48:04 -0800 |
commit | 03bce0bf4e3708baa6f2fd7007d79b739f067ddc (patch) | |
tree | c4708cdcff51cbb78f8113ed1556387803716e28 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 6f1d4fb8fc52428ed2388e0e3df5bbb646964ef1 (diff) | |
download | llvm-03bce0bf4e3708baa6f2fd7007d79b739f067ddc.zip llvm-03bce0bf4e3708baa6f2fd7007d79b739f067ddc.tar.gz llvm-03bce0bf4e3708baa6f2fd7007d79b739f067ddc.tar.bz2 |
[GlobalISel][Localizer] Don't localize phi operands which are used more than once in the phi.
The current algorithm just tries to localize defs as far as they can go, and in
the case of G_PHI operands, it clones the def into the predecessor block for
each incoming edge. When multiple edges have the same register value, this can
cause unnecessary code bloat, and inhibit later optimizations.
This change checks if a given phi operand is unique in the phi, if not the
def of that register is not localized to the predecessor.
Differential Revision: https://reviews.llvm.org/D95406
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions