OSDN Git Service

Reorganize the lifetimes of the major objects SelectionDAGISel
authorDan Gohman <gohman@apple.com>
Wed, 27 Aug 2008 23:52:12 +0000 (23:52 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 27 Aug 2008 23:52:12 +0000 (23:52 +0000)
commit7c3234c6be0dc0bdf4b5d6f848cd728a77f349d7
treeaafdf0a2644f38b67f20c21b793e10c096659084
parent8970f00deff00ffce1f35cf00883357e1582daa1
Reorganize the lifetimes of the major objects SelectionDAGISel
works with.

SelectionDAG, FunctionLoweringInfo, and SelectionDAGLowering
objects now get created once per SelectionDAGISel instance, and
can be reused across blocks and across functions. Previously,
they were created and destroyed each time they were needed.

This reorganization simplifies the handling of PHI nodes, and
also SwitchCases, JumpTables, and BitTestBlocks. This
simplification has the side effect of fixing a bug in FastISel
where successor PHI nodes weren't being updated correctly.

This is also a step towards making the transition from FastISel
into and out of SelectionDAG faster, and also making
plain SelectionDAG faster on code with lots of little blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55450 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/SelectionDAG.h
include/llvm/CodeGen/SelectionDAGISel.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp