[all-commits] [llvm/llvm-project] 9d7ec4: [AArch64][GlobalISel] Infer whether G_PHI is going...
Jessica Paquette via All-commits
all-commits at lists.llvm.org
Mon Sep 28 10:37:31 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 9d7ec46f5740d7626171c2b8198f825176991e0a
https://github.com/llvm/llvm-project/commit/9d7ec46f5740d7626171c2b8198f825176991e0a
Author: Jessica Paquette <jpaquette at apple.com>
Date: 2020-09-28 (Mon, 28 Sep 2020)
Changed paths:
M llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp
M llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.h
M llvm/test/CodeGen/AArch64/GlobalISel/regbank-fp-use-def.mir
Log Message:
-----------
[AArch64][GlobalISel] Infer whether G_PHI is going to be a FPR in regbankselect
Some instructions (G_LOAD, G_SELECT, G_UNMERGE_VALUES) check if their uses
will define/use FPRs (using `onlyUsesFP` and `onlyDefinesFP`).
The register bank of a use isn't necessarily known when an instruction asks for
this.
Teach `hasFPConstraints` to look at the instructions feeding into a G_PHI when
its destination bank is unknown. If any of them are FPR, assume the entire
G_PHI will also be assigned a FPR.
Since a phi can have many inputs, and those inputs can in turn be phis,
restrict the search depth to a very low number.
Also improve the docs for `hasFPConstraints` and friends a little.
This is a 0.3% code size improvement on CTMark/Bullet at -O3, and a 0.2% code
size improvement at CTMark/pairlocalalign at -O3.
Differential Revision: https://reviews.llvm.org/D88177
More information about the All-commits
mailing list