Run GVN during the cleanup

Currently, GVN can be necessary to eliminate redundant instructions in case
of, for instance, GEMM and float type. This patch makes GVN be run during
the cleanup.

Reviewed-by: Tobias Grosser <tobias@grosser.es>,
             Michael Kruse <llvm@meinersbur.de>

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

llvm-svn: 312307
This commit is contained in:
Roman Gareev 2017-09-01 06:52:28 +00:00
parent c6c5af75f2
commit 1cb3491620
1 changed files with 1 additions and 0 deletions

View File

@ -68,6 +68,7 @@ public:
FPM->add(createCFGSimplificationPass()); FPM->add(createCFGSimplificationPass());
FPM->add(createReassociatePass()); FPM->add(createReassociatePass());
FPM->add(createLoopRotatePass()); FPM->add(createLoopRotatePass());
FPM->add(createNewGVNPass());
FPM->add(createLICMPass()); FPM->add(createLICMPass());
FPM->add(createLoopUnswitchPass()); FPM->add(createLoopUnswitchPass());
FPM->add(createCFGSimplificationPass()); FPM->add(createCFGSimplificationPass());