[PATCH] D133902: X86: Stop assigning register costs for longer encodings
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 30 13:42:03 PDT 2022
MatzeB marked 2 inline comments as done.
MatzeB added a comment.
> Early x86-64 CPUs (often with weak frontend/decoders) might benefit from avoiding REX encodings (I know when I was doing exegesis testing for the atom/silvermont sched models avoiding REX registers gave much more consistent backend numbers), although I'm not certain how much work adding CPU Feature specific costs would be (or how much benefit they'd give for most people).
My gut feeling would be that we are better off without the added complexity, as the size differences are somewhat happening by accident anyway. And in fact looking into my data the size differences seem to mostly stem from small functions and there is not really a trend for bigger functions.
================
Comment at: llvm/lib/Target/X86/X86RegisterInfo.td:128
-// X86-64 only, requires REX.
-let SubRegIndices = [sub_8bit, sub_8bit_hi_phony], CostPerUse = [1],
----------------
RKSimon wrote:
> Keep the comments?
To me it seemed that this comment was meant to justify the `CostPerUse = [1]` which I am removing, but no problem to keep them anyway.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133902/new/
https://reviews.llvm.org/D133902
More information about the llvm-commits
mailing list