llvm.org GIT mirror llvm / c7fcfa0
- Doh. Pass vector by value is bad. - Add a AnalyzeCallResult specialized for calls which produce a single value. This is used by fastisel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55879 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 11 years ago
2 changed file(s) with 15 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
146146
147147 /// AnalyzeCallOperands - Same as above except it takes vectors of types
148148 /// and argument flags.
149 void AnalyzeCallOperands(SmallVectorImpl ArgVTs,
149 void AnalyzeCallOperands(SmallVectorImpl &ArgVTs,
150150 SmallVectorImpl &Flags,
151151 CCAssignFn Fn);
152152
154154 /// incorporating info about the passed values into this state.
155155 void AnalyzeCallResult(SDNode *TheCall, CCAssignFn Fn);
156156
157 /// AnalyzeCallResult - Same as above except it's specialized for calls which
158 /// produce a single value.
159 void AnalyzeCallResult(MVT VT, CCAssignFn Fn);
157160
158161 /// getFirstUnallocated - Return the first unallocated register in the set, or
159162 /// NumRegs if they are all allocated.
106106
107107 /// AnalyzeCallOperands - Same as above except it takes vectors of types
108108 /// and argument flags.
109 void CCState::AnalyzeCallOperands(SmallVectorImpl ArgVTs,
109 void CCState::AnalyzeCallOperands(SmallVectorImpl &ArgVTs,
110110 SmallVectorImpl &Flags,
111111 CCAssignFn Fn) {
112112 unsigned NumOps = ArgVTs.size();
133133 }
134134 }
135135 }
136
137 /// AnalyzeCallResult - Same as above except it's specialized for calls which
138 /// produce a single value.
139 void CCState::AnalyzeCallResult(MVT VT, CCAssignFn Fn) {
140 if (Fn(0, VT, VT, CCValAssign::Full, ISD::ArgFlagsTy(), *this)) {
141 cerr << "Call result has unhandled type "
142 << VT.getMVTString() << "\n";
143 abort();
144 }
145 }