[all-commits] [llvm/llvm-project] 5d6d9b: [GlobalISel] Propagate extends through G_PHIs into...
AE via All-commits
all-commits at lists.llvm.org
Fri Feb 12 11:53:11 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5d6d9b63a30843457a6139ff07ea9d664bebc988
https://github.com/llvm/llvm-project/commit/5d6d9b63a30843457a6139ff07ea9d664bebc988
Author: Amara Emerson <amara at apple.com>
Date: 2021-02-12 (Fri, 12 Feb 2021)
Changed paths:
M llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
M llvm/include/llvm/CodeGen/TargetInstrInfo.h
M llvm/include/llvm/Target/GlobalISel/Combine.td
M llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
M llvm/lib/Target/AArch64/AArch64InstrInfo.h
A llvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-prop-extends-phi.mir
Log Message:
-----------
[GlobalISel] Propagate extends through G_PHIs into the incoming value blocks.
This combine tries to do inter-block hoisting of extends of G_PHIs, into the
originating blocks of the phi's incoming value. The idea is to expose further
optimization opportunities that are normally obscured by the PHI.
Some basic heuristics, and a target hook for AArch64 is added, to allow tuning.
E.g. if the extend is used by a G_PTR_ADD, it doesn't perform this combine
since it may be folded into the addressing mode during selection.
There are very minor code size improvements on AArch64 -Os, but the real benefit
is that it unlocks optimizations like AArch64 conditional compares on some
benchmarks.
Differential Revision: https://reviews.llvm.org/D95703
More information about the All-commits
mailing list