]> granicus.if.org Git - llvm/commit
[System Model] [TTI] Update cache and prefetch TTI interfaces
authorDavid Greene <greened@obbligato.org>
Wed, 10 Jul 2019 18:07:01 +0000 (18:07 +0000)
committerDavid Greene <greened@obbligato.org>
Wed, 10 Jul 2019 18:07:01 +0000 (18:07 +0000)
commitd3816e80968161406eb1e28dad15515e9e2ae76c
tree7cd8872033a5909e2dca8e3a4c52dc46957117bb
parentf9b7c138eccf70cfc06901343464c62f27568930
[System Model] [TTI] Update cache and prefetch TTI interfaces

Rework the TTI cache and software prefetching APIs to prepare for the
introduction of a general system model.  Changes include:

- Marking existing interfaces const and/or override as appropriate
- Adding comments
- Adding BasicTTIImpl interfaces that delegate to a subtarget
  implementation
- Adding a default "no information" subtarget implementation

Only a handful of targets use these interfaces currently: AArch64,
Hexagon, PPC and SystemZ.  AArch64 already has a custom subtarget
implementation, so its custom TTI implementation is migrated to use
the new facilities in BasicTTIImpl to invoke its custom subtarget
implementation.  The custom TTI implementations continue to exist for
the other targets with this change.  They are not moved over to
subtarget-based implementations.

The end goal is to have the default subtarget implementation defer to
the system model defined by the target.  With this change, the default
subtarget implementation essentially returns "no information" for
these interfaces.  None of the existing users of TTI will hit that
implementation because they define their own custom TTI
implementations and won't use the BasicTTIImpl implementations.

Once system models are in place for the targets that use these
interfaces, their custom TTI implementations can be removed.

Differential Revision: https://reviews.llvm.org/D63614

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365676 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/llvm/Analysis/TargetTransformInfo.h
include/llvm/Analysis/TargetTransformInfoImpl.h
include/llvm/CodeGen/BasicTTIImpl.h
include/llvm/MC/MCSubtargetInfo.h
lib/MC/MCSubtargetInfo.cpp
lib/Target/AArch64/AArch64Subtarget.h
lib/Target/AArch64/AArch64TargetTransformInfo.cpp
lib/Target/AArch64/AArch64TargetTransformInfo.h
lib/Target/Hexagon/HexagonTargetTransformInfo.h
lib/Target/PowerPC/PPCTargetTransformInfo.cpp
lib/Target/PowerPC/PPCTargetTransformInfo.h
lib/Target/SystemZ/SystemZTargetTransformInfo.h