[PATCH] D34255: [PowerPC] define target hook isReallyTriviallyReMaterializable
Lei Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 15 16:01:33 PDT 2017
lei created this revision.
Trivially rematerializable instructions are instructions that has no side effects and requires no operands that are not always available. The PPC instructions ADDIStocHA and ADDItocL are trivially rematerializable because it does a ADDIS/ADDI on the TOC register and an immediate. On PowerPC the ABI reserves the TOC register (X2) in any functions that have calls or access global variables.
Define target hook isReallyTriviallyReMaterializable() to explicitly specify PowerPC instructions that are trivially rematerializable. This will allow MachineLICM pass to accurately identify PPC instructions that should always be hoisted.
Performance ran with SPEC 2006 showed a 4.8% in performance gain for h264ref and negligible differences for all others.
https://reviews.llvm.org/D34255
Files:
lib/Target/PowerPC/PPCInstr64Bit.td
lib/Target/PowerPC/PPCInstrInfo.cpp
lib/Target/PowerPC/PPCInstrInfo.h
test/CodeGen/PowerPC/licm-remat.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34255.102737.patch
Type: text/x-patch
Size: 29031 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170615/97f94a79/attachment.bin>
More information about the llvm-commits
mailing list