[PATCH] D70651: [Power8] Add the MacroFusion support for Power8
qshanz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 24 21:52:30 PST 2019
steven.zhang created this revision.
steven.zhang added reviewers: nemanjai, jsji, hfinkel, kbarton, PowerPC.
Herald added subscribers: wuzish, hiraditya, mgorny.
Herald added a project: LLVM.
Power8 User's Manual Section 10.1.12 Instruction Fusion
There are two fuse types:
{addi} followed by one of these {lxvd2x, lxvw4x, lxvdsx, lvebx, lvehx, lvewx, lvx, lxsdx}
Requirements:
addi(rt) = lxvd2x(rb)
lxvd2x(ra) cannot be ‘0’
Result:
addi - no changelxvd2x gets the immed field from addi., rb is not used.This effectively provides a d-form version for the vector loads.The dependency between the two operations is removed.
{addis) followed by one of these {ld, lbz, lhz, lwz}
Requirements:
addis(rt) = ld(ra) = ld(rt) - (cannot be ‘0’)
addis(SI) first 12 bits must be all 0’s or all 1’sTA = 0 for this fusion to occur and if SI = 111111111110000 and the msb of the d/ds field of the load equals ‘1’, then fusion does not occur.
Result:addis gets changed to a NOP. (It still takes up a dispatch slot, but is sent directly to completion.)The last 5 bits of addis(SI) are sent with the ld (information from the addis is passed to the ld).The addis is removed from execution.
This patch is intend to implement the missing P8 <https://reviews.llvm.org/P8> MacroFusion for LLVM.
https://reviews.llvm.org/D70651
Files:
llvm/lib/Target/PowerPC/CMakeLists.txt
llvm/lib/Target/PowerPC/PPC.td
llvm/lib/Target/PowerPC/PPCMacroFusion.cpp
llvm/lib/Target/PowerPC/PPCMacroFusion.def
llvm/lib/Target/PowerPC/PPCMacroFusion.h
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: D70651.230832.patch
Type: text/x-patch
Size: 15779 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191125/2fa3a39b/attachment.bin>
More information about the llvm-commits
mailing list