OSDN Git Service

[CGP] Cleanup - remove redundant code in OptimizeMemoryInst. NFC
authorSerguei Katkov <serguei.katkov@azul.com>
Tue, 18 Jul 2017 05:16:38 +0000 (05:16 +0000)
committerSerguei Katkov <serguei.katkov@azul.com>
Tue, 18 Jul 2017 05:16:38 +0000 (05:16 +0000)
commit6733c4dfa16b86f987c337c204fa62f8fae5ccff
treef9d8704a20d2c39db68eaf1d026036dd6d9947c2
parentaf4157c98cb5ab07f41ad78e2996bf02a709e701
[CGP] Cleanup - remove redundant code in OptimizeMemoryInst. NFC

optimizeMemoryInst contains a vector AddrModeInsts.
The only use of this vector is to check that all instructions are in the same
block as memory instruction. This check is guarded by PhiSeen flag,
so if we traversed through phi node then we do not need to keep information
in AddrModeInsts. AddModeInsts is set first time we found some addressing mode
and updated if we found new one later.
We can find next addressing mode only if we traverse phi node so all code
related to update of AddModeInsts can be safely removed.

Reviewers: loladiro, spatel, efriedma
Reviewed By: efriedma
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35291

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308265 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenPrepare.cpp