@@ -143,23 +143,23 @@ class SelectionDAG {
143
143
// /
144
144
void viewGraph (const std::string &Title);
145
145
void viewGraph ();
146
-
146
+
147
147
#ifndef NDEBUG
148
148
std::map<const SDNode *, std::string> NodeGraphAttrs;
149
149
#endif
150
150
151
151
// / clearGraphAttrs - Clear all previously defined node graph attributes.
152
152
// / Intended to be used from a debugging tool (eg. gdb).
153
153
void clearGraphAttrs ();
154
-
154
+
155
155
// / setGraphAttrs - Set graph attributes for a node. (eg. "color=red".)
156
156
// /
157
157
void setGraphAttrs (const SDNode *N, const char *Attrs);
158
-
158
+
159
159
// / getGraphAttrs - Get graph attributes for a node. (eg. "color=red".)
160
160
// / Used from getNodeAttributes.
161
161
const std::string getGraphAttrs (const SDNode *N) const ;
162
-
162
+
163
163
// / setGraphColor - Convenience for setting node color attribute.
164
164
// /
165
165
void setGraphColor (const SDNode *N, const char *Color);
@@ -177,7 +177,7 @@ class SelectionDAG {
177
177
ilist<SDNode>::size_type allnodes_size () const {
178
178
return AllNodes.size ();
179
179
}
180
-
180
+
181
181
// / getRoot - Return the root tag of the SelectionDAG.
182
182
// /
183
183
const SDValue &getRoot () const { return Root; }
@@ -233,7 +233,7 @@ class SelectionDAG {
233
233
SDVTList getVTList (MVT VT1, MVT VT2, MVT VT3);
234
234
SDVTList getVTList (MVT VT1, MVT VT2, MVT VT3, MVT VT4);
235
235
SDVTList getVTList (const MVT *VTs, unsigned NumVTs);
236
-
236
+
237
237
// / getNodeValueTypes - These are obsolete, use getVTList instead.
238
238
const MVT *getNodeValueTypes (MVT VT) {
239
239
return getVTList (VT).VTs ;
@@ -250,8 +250,8 @@ class SelectionDAG {
250
250
const MVT *getNodeValueTypes (const std::vector<MVT> &vtList) {
251
251
return getVTList (&vtList[0 ], (unsigned )vtList.size ()).VTs ;
252
252
}
253
-
254
-
253
+
254
+
255
255
// ===--------------------------------------------------------------------===//
256
256
// Node creation methods.
257
257
//
@@ -320,7 +320,7 @@ class SelectionDAG {
320
320
SDValue getRegister (unsigned Reg, MVT VT);
321
321
SDValue getDbgStopPoint (SDValue Root, unsigned Line, unsigned Col,
322
322
Value *CU);
323
- SDValue getLabel (unsigned Opcode, DebugLoc dl, SDValue Root,
323
+ SDValue getLabel (unsigned Opcode, DebugLoc dl, SDValue Root,
324
324
unsigned LabelID);
325
325
326
326
SDValue getCopyToReg (SDValue Chain, DebugLoc dl, unsigned Reg, SDValue N) {
@@ -345,13 +345,13 @@ class SelectionDAG {
345
345
SDValue Ops[] = { Chain, Reg, N, Flag };
346
346
return getNode (ISD::CopyToReg, dl, VTs, 2 , Ops, Flag.getNode () ? 4 : 3 );
347
347
}
348
-
348
+
349
349
SDValue getCopyFromReg (SDValue Chain, DebugLoc dl, unsigned Reg, MVT VT) {
350
350
const MVT *VTs = getNodeValueTypes (VT, MVT::Other);
351
351
SDValue Ops[] = { Chain, getRegister (Reg, VT) };
352
352
return getNode (ISD::CopyFromReg, dl, VTs, 2 , Ops, 2 );
353
353
}
354
-
354
+
355
355
// This version of the getCopyFromReg method takes an extra operand, which
356
356
// indicates that there is potentially an incoming flag value (if Flag is not
357
357
// null) and that there should be a flag result.
@@ -373,7 +373,7 @@ class SelectionDAG {
373
373
// / getZeroExtendInReg - Return the expression required to zero extend the Op
374
374
// / value assuming it was the smaller SrcTy value.
375
375
SDValue getZeroExtendInReg (SDValue Op, DebugLoc DL, MVT SrcTy);
376
-
376
+
377
377
// / getNOT - Create a bitwise NOT operation as (XOR Val, -1).
378
378
SDValue getNOT (DebugLoc DL, SDValue Val, MVT VT);
379
379
@@ -383,7 +383,7 @@ class SelectionDAG {
383
383
SDValue getCALLSEQ_START (SDValue Chain, SDValue Op) {
384
384
const MVT *VTs = getNodeValueTypes (MVT::Other, MVT::Flag);
385
385
SDValue Ops[] = { Chain, Op };
386
- return getNode (ISD::CALLSEQ_START, DebugLoc::getUnknownLoc (),
386
+ return getNode (ISD::CALLSEQ_START, DebugLoc::getUnknownLoc (),
387
387
VTs, 2 , Ops, 2 );
388
388
}
389
389
@@ -399,7 +399,7 @@ class SelectionDAG {
399
399
Ops.push_back (Op2);
400
400
Ops.push_back (InFlag);
401
401
return getNode (ISD::CALLSEQ_END, DebugLoc::getUnknownLoc (), NodeTys,
402
- &Ops[0 ],
402
+ &Ops[0 ],
403
403
(unsigned )Ops.size () - (InFlag.getNode () == 0 ? 1 : 0 ));
404
404
}
405
405
@@ -487,15 +487,15 @@ class SelectionDAG {
487
487
return getNode (ISD::SELECT_CC, DL, True.getValueType (),
488
488
LHS, RHS, True, False, getCondCode (Cond));
489
489
}
490
-
490
+
491
491
// / getVAArg - VAArg produces a result and token chain, and takes a pointer
492
492
// / and a source value as input.
493
493
SDValue getVAArg (MVT VT, DebugLoc dl, SDValue Chain, SDValue Ptr,
494
494
SDValue SV);
495
495
496
- // / getAtomic - Gets a node for an atomic op, produces result and chain and
496
+ // / getAtomic - Gets a node for an atomic op, produces result and chain and
497
497
// / takes 3 operands
498
- SDValue getAtomic (unsigned Opcode, DebugLoc dl, MVT MemVT, SDValue Chain,
498
+ SDValue getAtomic (unsigned Opcode, DebugLoc dl, MVT MemVT, SDValue Chain,
499
499
SDValue Ptr, SDValue Cmp, SDValue Swp, const Value* PtrVal,
500
500
unsigned Alignment=0 );
501
501
@@ -585,7 +585,7 @@ class SelectionDAG {
585
585
SDValue Op3, SDValue Op4, SDValue Op5);
586
586
SDValue UpdateNodeOperands (SDValue N,
587
587
const SDValue *Ops, unsigned NumOps);
588
-
588
+
589
589
// / SelectNodeTo - These are used for target selectors to *mutate* the
590
590
// / specified node to have the specified return type, Target opcode, and
591
591
// / operands. Note that target opcodes are stored as
@@ -649,14 +649,14 @@ class SelectionDAG {
649
649
// / the current one.
650
650
SDNode *getTargetNode (unsigned Opcode, DebugLoc dl, MVT VT);
651
651
SDNode *getTargetNode (unsigned Opcode, DebugLoc dl, MVT VT, SDValue Op1);
652
- SDNode *getTargetNode (unsigned Opcode, DebugLoc dl, MVT VT, SDValue Op1,
652
+ SDNode *getTargetNode (unsigned Opcode, DebugLoc dl, MVT VT, SDValue Op1,
653
653
SDValue Op2);
654
654
SDNode *getTargetNode (unsigned Opcode, DebugLoc dl, MVT VT,
655
655
SDValue Op1, SDValue Op2, SDValue Op3);
656
656
SDNode *getTargetNode (unsigned Opcode, DebugLoc dl, MVT VT,
657
657
const SDValue *Ops, unsigned NumOps);
658
658
SDNode *getTargetNode (unsigned Opcode, DebugLoc dl, MVT VT1, MVT VT2);
659
- SDNode *getTargetNode (unsigned Opcode, DebugLoc dl, MVT VT1, MVT VT2,
659
+ SDNode *getTargetNode (unsigned Opcode, DebugLoc dl, MVT VT1, MVT VT2,
660
660
SDValue Op1);
661
661
SDNode *getTargetNode (unsigned Opcode, DebugLoc dl, MVT VT1,
662
662
MVT VT2, SDValue Op1, SDValue Op2);
@@ -680,7 +680,7 @@ class SelectionDAG {
680
680
// / else return NULL.
681
681
SDNode *getNodeIfExists (unsigned Opcode, SDVTList VTs,
682
682
const SDValue *Ops, unsigned NumOps);
683
-
683
+
684
684
// / DAGUpdateListener - Clients of various APIs that cause global effects on
685
685
// / the DAG can optionally implement this interface. This allows the clients
686
686
// / to handle the various sorts of updates that happen.
@@ -695,12 +695,12 @@ class SelectionDAG {
695
695
// / NodeUpdated - The node N that was updated.
696
696
virtual void NodeUpdated (SDNode *N) = 0;
697
697
};
698
-
698
+
699
699
// / RemoveDeadNode - Remove the specified node from the system. If any of its
700
700
// / operands then becomes dead, remove them as well. Inform UpdateListener
701
701
// / for each node deleted.
702
702
void RemoveDeadNode (SDNode *N, DAGUpdateListener *UpdateListener = 0 );
703
-
703
+
704
704
// / RemoveDeadNodes - This method deletes the unreachable nodes in the
705
705
// / given list, and any nodes that become unreachable as a result.
706
706
void RemoveDeadNodes (SmallVectorImpl<SDNode *> &DeadNodes,
@@ -711,7 +711,7 @@ class SelectionDAG {
711
711
// / version if 'From' is known to have a single result, use the second
712
712
// / if you have two nodes with identical results, use the third otherwise.
713
713
// /
714
- // / These methods all take an optional UpdateListener, which (if not null) is
714
+ // / These methods all take an optional UpdateListener, which (if not null) is
715
715
// / informed about nodes that are deleted and modified due to recursive
716
716
// / changes in the dag.
717
717
// /
@@ -768,7 +768,7 @@ class SelectionDAG {
768
768
case ISD::AND:
769
769
case ISD::OR:
770
770
case ISD::XOR:
771
- case ISD::ADDC:
771
+ case ISD::ADDC:
772
772
case ISD::ADDE: return true ;
773
773
default : return false ;
774
774
}
@@ -785,7 +785,7 @@ class SelectionDAG {
785
785
// / either of the specified value types.
786
786
SDValue CreateStackTemporary (MVT VT1, MVT VT2);
787
787
788
- // / FoldConstantArithmetic -
788
+ // / FoldConstantArithmetic -
789
789
SDValue FoldConstantArithmetic (unsigned Opcode,
790
790
MVT VT,
791
791
ConstantSDNode *Cst1,
@@ -794,7 +794,7 @@ class SelectionDAG {
794
794
// / FoldSetCC - Constant fold a setcc to true or false.
795
795
SDValue FoldSetCC (MVT VT, SDValue N1,
796
796
SDValue N2, ISD::CondCode Cond, DebugLoc dl);
797
-
797
+
798
798
// / SignBitIsZero - Return true if the sign bit of Op is known to be zero. We
799
799
// / use this predicate to simplify operations downstream.
800
800
bool SignBitIsZero (SDValue Op, unsigned Depth = 0 ) const ;
@@ -804,11 +804,11 @@ class SelectionDAG {
804
804
// / known to be the same type.
805
805
bool MaskedValueIsZero (SDValue Op, const APInt &Mask, unsigned Depth = 0 )
806
806
const ;
807
-
807
+
808
808
// / ComputeMaskedBits - Determine which of the bits specified in Mask are
809
809
// / known to be either zero or one and return them in the KnownZero/KnownOne
810
810
// / bitsets. This code only analyzes bits in Mask, in order to short-circuit
811
- // / processing. Targets can implement the computeMaskedBitsForTargetNode
811
+ // / processing. Targets can implement the computeMaskedBitsForTargetNode
812
812
// / method in the TargetLowering class to allow target nodes to be understood.
813
813
void ComputeMaskedBits (SDValue Op, const APInt &Mask, APInt &KnownZero,
814
814
APInt &KnownOne, unsigned Depth = 0 ) const ;
@@ -829,7 +829,7 @@ class SelectionDAG {
829
829
// / getShuffleScalarElt - Returns the scalar element that will make up the ith
830
830
// / element of the result of the vector shuffle.
831
831
SDValue getShuffleScalarElt (const SDNode *N, unsigned Idx);
832
-
832
+
833
833
private:
834
834
bool RemoveNodeFromCSEMaps (SDNode *N);
835
835
void AddModifiedNodeToCSEMaps (SDNode *N, DAGUpdateListener *UpdateListener);
@@ -845,10 +845,10 @@ class SelectionDAG {
845
845
unsigned getMVTAlignment (MVT MemoryVT) const ;
846
846
847
847
void allnodes_clear ();
848
-
848
+
849
849
// / VTList - List of non-single value types.
850
850
std::vector<SDVTList> VTList;
851
-
851
+
852
852
// / CondCodeNodes - Maps to auto-CSE operations.
853
853
std::vector<CondCodeSDNode*> CondCodeNodes;
854
854
0 commit comments