diff options
author | Jyotsna Verma <jverma@codeaurora.org> | 2012-11-28 20:58:14 +0000 |
---|---|---|
committer | Jyotsna Verma <jverma@codeaurora.org> | 2012-11-28 20:58:14 +0000 |
commit | 61c654ce5c86a7a9f8d81057979aa5b0eaab07b9 (patch) | |
tree | 570127351d01af4120cd1957dda1370d17f03bf4 /lib/Target/Hexagon/HexagonISelDAGToDAG.cpp | |
parent | 350c00843bad22c5391e33e9e39a78d5d0983c8c (diff) |
Define signed const-ext immediate operands and their predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168810 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Hexagon/HexagonISelDAGToDAG.cpp')
-rw-r--r-- | lib/Target/Hexagon/HexagonISelDAGToDAG.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp b/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp index 5499134eb9..4ff31353a9 100644 --- a/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp +++ b/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp @@ -94,6 +94,7 @@ public: SDNode *SelectConstant(SDNode *N); SDNode *SelectConstantFP(SDNode *N); SDNode *SelectAdd(SDNode *N); + bool isConstExtProfitable(SDNode *N) const; // Include the pieces autogenerated from the target description. #include "HexagonGenDAGISel.inc" @@ -1507,3 +1508,13 @@ SelectInlineAsmMemoryOperand(const SDValue &Op, char ConstraintCode, OutOps.push_back(Op1); return false; } + +bool HexagonDAGToDAGISel::isConstExtProfitable(SDNode *N) const { + unsigned UseCount = 0; + for (SDNode::use_iterator I = N->use_begin(), E = N->use_end(); I != E; ++I) { + UseCount++; + } + + return (UseCount <= 1); + +} |