diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-03 07:31:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-03 07:31:15 +0000 |
commit | f1b7c7d476a2f30f035c527cfe8e14c6c6255f07 (patch) | |
tree | 53d8e4e8b8477c0b3a435ad13d26e87b96934a17 /include/llvm/CodeGen/SelectionDAGISel.h | |
parent | cfe2eab7446dedc471592fe702fefef783383171 (diff) | |
download | llvm-f1b7c7d476a2f30f035c527cfe8e14c6c6255f07.tar.gz llvm-f1b7c7d476a2f30f035c527cfe8e14c6c6255f07.tar.bz2 llvm-f1b7c7d476a2f30f035c527cfe8e14c6c6255f07.tar.xz |
speed up scope node processing: if the first element of a scope
entry we're about to process is obviously going to fail, don't
bother pushing a scope only to have it immediately be popped.
This avoids a lot of scope stack traffic in common cases.
Unfortunately, this requires duplicating some of the predicate
dispatch. To avoid duplicating the actual logic I pulled each
predicate out to its own static function which gets used in
both places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97651 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGISel.h')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGISel.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGISel.h b/include/llvm/CodeGen/SelectionDAGISel.h index b4a0805696..23ff001b8d 100644 --- a/include/llvm/CodeGen/SelectionDAGISel.h +++ b/include/llvm/CodeGen/SelectionDAGISel.h @@ -227,6 +227,8 @@ protected: /// by tblgen. Others should not call it. void SelectInlineAsmMemoryOperands(std::vector<SDValue> &Ops); + +public: // Calls to these predicates are generated by tblgen. bool CheckAndMask(SDValue LHS, ConstantSDNode *RHS, int64_t DesiredMaskS) const; @@ -263,15 +265,16 @@ protected: return SDValue(); } + SDNode *SelectCodeCommon(SDNode *NodeToMatch, + const unsigned char *MatcherTable, + unsigned TableSize); + +private: // Calls to these functions are generated by tblgen. SDNode *Select_INLINEASM(SDNode *N); SDNode *Select_UNDEF(SDNode *N); SDNode *Select_EH_LABEL(SDNode *N); - - SDNode *SelectCodeCommon(SDNode *NodeToMatch, - const unsigned char *MatcherTable, - unsigned TableSize); void CannotYetSelect(SDNode *N); void CannotYetSelectIntrinsic(SDNode *N); |