[PATCH] D138317: [PowerPC] Add support for tune-cpu attribute

Kai Nacke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 18 12:02:33 PST 2022


Kai created this revision.
Kai added reviewers: nemanjai, amyk, qiucf, tschuett, power-llvm-team.
Herald added subscribers: shchenz, hiraditya.
Herald added a project: All.
Kai requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

clang (like gcc) has the -mtune= command line option. This option
adds the "tune-cpu" attribute to a function. The intended functionality
is that the scheduling model of that cpu is used. E.g. -mtune=pwr9 -march=pwr8
generates only instructions supported on pwr8 but uses the scheduling model
of pwr9 for it.
This PR adds the infrastructure to support this feature in LLVM.
clang support was added in D130526 <https://reviews.llvm.org/D130526>.


https://reviews.llvm.org/D138317

Files:
  llvm/lib/Target/PowerPC/PPCSubtarget.cpp
  llvm/lib/Target/PowerPC/PPCSubtarget.h
  llvm/lib/Target/PowerPC/PPCTargetMachine.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138317.476554.patch
Type: text/x-patch
Size: 5544 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221118/4e865051/attachment.bin>


More information about the llvm-commits mailing list