CodeGenPrep: add separate hook say when GEPs should be used for sinking. NFCI.
authorTim Northover <tnorthover@apple.com>
Thu, 12 Sep 2019 10:21:00 +0000 (10:21 +0000)
committerTim Northover <tnorthover@apple.com>
Thu, 12 Sep 2019 10:21:00 +0000 (10:21 +0000)
commit98534843fb4c14ebe8022143cdcfc2a4ea8d2d02
tree4455ba6bca082b7a5ff0301b8adb389683202bf1
parent719087bbb775d49f6f4c3f923bb3282b66e588ce
CodeGenPrep: add separate hook say when GEPs should be used for sinking. NFCI.

Up to now, we've decided whether to sink address calculations using GEPs or
normal arithmetic based on the useAA hook, but there are other reasons GEPs
might be preferred. So this patch splits the two questions, with a default
implementation falling back to useAA.

llvm-svn: 371721
llvm/include/llvm/CodeGen/TargetSubtargetInfo.h
llvm/lib/CodeGen/CodeGenPrepare.cpp