[llvm-commits] [PATCH 3/5] Change how PHINodes store their operands.

Jay Foad jay.foad at gmail.com
Thu Jun 16 04:09:24 PDT 2011


Change PHINodes to store simple pointers to their incoming basic blocks,
instead of full-blown Uses.

Note that this loses an optimization in SplitCriticalEdge(), because we
can no longer walk the use list of a BasicBlock to find phi nodes. See
the comment I removed starting "However, the foreach loop is slow for
blocks with lots of predecessors".
---
 include/llvm/BasicBlock.h                   |    2 +-
 include/llvm/Instructions.h                 |   81 +++++++++++++++++----------
 include/llvm/Support/CFG.h                  |    2 +-
 include/llvm/Use.h                          |    6 +-
 lib/Target/CppBackend/CPPBackend.cpp        |    2 +-
 lib/Transforms/Utils/BreakCriticalEdges.cpp |   54 +++++-------------
 lib/Transforms/Utils/Local.cpp              |    9 ++-
 lib/Transforms/Utils/LoopUnroll.cpp         |   65 ++++++++++++----------
 lib/Transforms/Utils/ValueMapper.cpp        |   14 +++++
 lib/VMCore/Instructions.cpp                 |   54 ++++++++++--------
 lib/VMCore/User.cpp                         |    6 +-
 lib/VMCore/Verifier.cpp                     |    3 -
 12 files changed, 165 insertions(+), 133 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Change-how-PHINodes-store-their-operands.patch
Type: text/x-patch
Size: 23689 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110616/a25aa6a2/attachment.bin>


More information about the llvm-commits mailing list