HomePhabricator

[ConstHoist] Do not rebase single (or few) dependent constant

Authored by Zhaoshi Zheng <zhaoshiz@coduaurora.org> on Sep 25 2018, 10:45 AM.

Description

[ConstHoist] Do not rebase single (or few) dependent constant

If an instance (InsertionPoint or IP) of Base constant A has only one or few
rebased constants depending on it, do NOT rebase. One extra ADD instruction is
required to materialize each rebased constant, assuming A and the rebased have
the same materialization cost.

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

llvm-svn: 342994

Event Timeline

Zhaoshi Zheng <zhaoshiz@coduaurora.org> committed rG2c1a09188f12: [ConstHoist] Do not rebase single (or few) dependent constant (authored by Zhaoshi Zheng <zhaoshiz@coduaurora.org>).Sep 25 2018, 10:45 AM