[llvm-dev] [MC] Target-Independent Small Data Section Handling
Jack Andersen via llvm-dev
llvm-dev at lists.llvm.org
Tue Nov 8 14:33:43 PST 2016
Oh, one thing I forgot to mention:
ReadOnly objects are also counted as small data globals on PPC (on top of BSS, Data, Common). That's what the r2 base is for (.sdata2, defined to be constant data). 32-bit immediate loads take 2 ops minimum on PPC, so even constant loading benefits from small data.
It'd be handy to add a third argument containing what kind would normally be returned:
isGlobalInSmallSectionKind(GO, TM, <nominal-kind-expr>)
If a ReadOnly global is better emitted as instruction immediates, then the target can return `false` right then and there.
> On Nov 8, 2016, at 07:21, Simon Dardis <Simon.Dardis at imgtec.com> wrote:
More information about the llvm-dev