]> granicus.if.org Git - llvm/commit
Unmerge GEPs to reduce register pressure on IndirectBr edges.
authorHiroshi Yamauchi <yamauchi@google.com>
Mon, 11 Sep 2017 17:52:08 +0000 (17:52 +0000)
committerHiroshi Yamauchi <yamauchi@google.com>
Mon, 11 Sep 2017 17:52:08 +0000 (17:52 +0000)
commitb6b25740b763ba8cf7d6eecb59b47e25d6edc1f5
tree22bb933cb8b90b8484cd65ea3dbd0de23e570fe1
parent46582be9742d931368f9455a768df95d9525ccf5
Unmerge GEPs to reduce register pressure on IndirectBr edges.

Summary:
GEP merging can sometimes increase the number of live values and register
pressure across control edges and cause performance problems particularly if the
increased register pressure results in spills.

This change implements GEP unmerging around an IndirectBr in certain cases to
mitigate the issue. This is in the CodeGenPrepare pass (after all the GEP
merging has happened.)

With this patch, the Python interpreter loop runs faster by ~5%.

Reviewers: sanjoy, hfinkel

Reviewed By: hfinkel

Subscribers: eastig, junbuml, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312930 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenPrepare.cpp
test/Transforms/CodeGenPrepare/gep-unmerging.ll [new file with mode: 0644]