Optimize DAGCombiner's worklist processing. Previously it started
authorDan Gohman <gohman@apple.com>
Thu, 28 Aug 2008 21:01:56 +0000 (21:01 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 28 Aug 2008 21:01:56 +0000 (21:01 +0000)
commita3f8b7a4ce8ab5c46d52077162851105a390a6ac
treee10271cedc3995711c44fdc451ae44ce0783b701
parent9ffd8b5720d606eb7da702c97ed6491697867949
Optimize DAGCombiner's worklist processing. Previously it started
its work by putting all nodes in the worklist, requiring a big
dynamic allocation. Now, DAGCombiner just iterates over the AllNodes
list and maintains a worklist for nodes that are newly created or
need to be revisited. This allows the worklist to stay small in most
cases, so it can be a SmallVector.

This has the side effect of making DAGCombine not miss a folding
opportunity in alloca-align-rounding.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55498 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/alloca-align-rounding.ll