GVN-hoist: use a DFS numbering of instructions (PR28670)
authorSebastian Pop <sebpop@gmail.com>
Tue, 26 Jul 2016 00:15:10 +0000 (00:15 +0000)
committerSebastian Pop <sebpop@gmail.com>
Tue, 26 Jul 2016 00:15:10 +0000 (00:15 +0000)
commit91d4a3015924bff172b797470b629605c7a8de14
treeaaa3835e2549279f74132c09a835747a5266ec32
parent38422b135678b85d6a02d9a48e4375a9dcc1368c
GVN-hoist: use a DFS numbering of instructions (PR28670)

Instead of DFS numbering basic blocks we now DFS number instructions that avoids
the costly operation of which instruction comes first in a basic block.

Patch mostly written by Daniel Berlin.

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

llvm-svn: 276714
llvm/lib/Transforms/Scalar/GVNHoist.cpp
llvm/test/Transforms/GVN/hoist.ll