[PATCH] [Review Request] Numbering SDNode to discard SmallPtrSet in selection DAG

Wan, Xiaofei xiaofei.wan at intel.com
Fri Jul 12 01:29:21 PDT 2013


Hi resistor,

In selection DAG, SmallPtrSet is widely used to indicate the existence of SDNode in a set when traversing the DAG. This consumes 3~5% of total compilation time.
SmallPtrSet is a good data structure, but it is not suitable here; by numbering the SDNode, it can be done in O(1) to indicate whether a SDNode is visited or not.
Each SDNode belongs to a SelectionDAG, in this patch, SDNode is numbered according to its belonged Selection DAG.
This patch could improve llc performance by 2.5-3% for SpecCPU2006

http://llvm-reviews.chandlerc.com/D1129

Files:
  include/llvm/ADT/SmallVector.h
  include/llvm/CodeGen/SelectionDAG.h
  include/llvm/CodeGen/SelectionDAGNodes.h
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
  lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  lib/Target/X86/X86ISelDAGToDAG.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1129.1.patch
Type: text/x-patch
Size: 53845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130712/7ddd9521/attachment.bin>


More information about the llvm-commits mailing list