[PATCH] D151945: Introduce G_CONSTANT_FOLD_BARRIER and use it to prevent constant folding hoisted constants.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 9 11:11:56 PDT 2023
arsenm accepted this revision.
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp:85
+ getActionDefinitionsBuilder(
+ {G_IMPLICIT_DEF, G_FREEZE, G_CONSTANT_FOLD_BARRIER})
.legalFor({p0, s8, s16, s32, s64})
----------------
aemerson wrote:
> Pierre-vh wrote:
> > Will other targets (e.g. AMDGPU) need this?
> Maybe, but I'd like to leave that to AMDGPU maintainers to decide how to legalize this. I'm not even sure of constant hoisting is used for AMDGPU.
It's a bit obnoxious to have to add this to every target's legalize rules. Should probably have a default lower action that just deletes it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151945/new/
https://reviews.llvm.org/D151945
More information about the llvm-commits
mailing list