Home | History | Annotate | Download | only in CodeGen

Lines Matching defs:Case

78   case Stmt::NoStmtClass:
79 case Stmt::CXXCatchStmtClass:
80 case Stmt::SEHExceptStmtClass:
81 case Stmt::SEHFinallyStmtClass:
82 case Stmt::MSDependentExistsStmtClass:
84 case Stmt::NullStmtClass:
85 case Stmt::CompoundStmtClass:
86 case Stmt::DeclStmtClass:
87 case Stmt::LabelStmtClass:
88 case Stmt::AttributedStmtClass:
89 case Stmt::GotoStmtClass:
90 case Stmt::BreakStmtClass:
91 case Stmt::ContinueStmtClass:
92 case Stmt::DefaultStmtClass:
93 case Stmt::CaseStmtClass:
94 case Stmt::SEHLeaveStmtClass:
100 case Stmt::Type##Class:
116 // insertion point unreachable in the common case of a call like
131 case Stmt::IndirectGotoStmtClass:
134 case Stmt::IfStmtClass: EmitIfStmt(cast<IfStmt>(*S)); break;
135 case Stmt::WhileStmtClass: EmitWhileStmt(cast<WhileStmt>(*S)); break;
136 case Stmt::DoStmtClass: EmitDoStmt(cast<DoStmt>(*S)); break;
137 case Stmt::ForStmtClass: EmitForStmt(cast<ForStmt>(*S)); break;
139 case Stmt::ReturnStmtClass: EmitReturnStmt(cast<ReturnStmt>(*S)); break;
141 case Stmt::SwitchStmtClass: EmitSwitchStmt(cast<SwitchStmt>(*S)); break;
142 case Stmt::GCCAsmStmtClass: // Intentional fall-through.
143 case Stmt::MSAsmStmtClass: EmitAsmStmt(cast<AsmStmt>(*S)); break;
144 case Stmt::CoroutineBodyStmtClass:
145 case Stmt::CoreturnStmtClass:
148 case Stmt::CapturedStmtClass: {
153 case Stmt::ObjCAtTryStmtClass:
156 case Stmt::ObjCAtCatchStmtClass:
159 case Stmt::ObjCAtFinallyStmtClass:
162 case Stmt::ObjCAtThrowStmtClass:
165 case Stmt::ObjCAtSynchronizedStmtClass:
168 case Stmt::ObjCForCollectionStmtClass:
171 case Stmt::ObjCAutoreleasePoolStmtClass:
175 case Stmt::CXXTryStmtClass:
178 case Stmt::CXXForRangeStmtClass:
181 case Stmt::SEHTryStmtClass:
184 case Stmt::OMPParallelDirectiveClass:
187 case Stmt::OMPSimdDirectiveClass:
190 case Stmt::OMPForDirectiveClass:
193 case Stmt::OMPForSimdDirectiveClass:
196 case Stmt::OMPSectionsDirectiveClass:
199 case Stmt::OMPSectionDirectiveClass:
202 case Stmt::OMPSingleDirectiveClass:
205 case Stmt::OMPMasterDirectiveClass:
208 case Stmt::OMPCriticalDirectiveClass:
211 case Stmt::OMPParallelForDirectiveClass:
214 case Stmt::OMPParallelForSimdDirectiveClass:
217 case Stmt::OMPParallelSectionsDirectiveClass:
220 case Stmt::OMPTaskDirectiveClass:
223 case Stmt::OMPTaskyieldDirectiveClass:
226 case Stmt::OMPBarrierDirectiveClass:
229 case Stmt::OMPTaskwaitDirectiveClass:
232 case Stmt::OMPTaskgroupDirectiveClass:
235 case Stmt::OMPFlushDirectiveClass:
238 case Stmt::OMPOrderedDirectiveClass:
241 case Stmt::OMPAtomicDirectiveClass:
244 case Stmt::OMPTargetDirectiveClass:
247 case Stmt::OMPTeamsDirectiveClass:
250 case Stmt::OMPCancellationPointDirectiveClass:
253 case Stmt::OMPCancelDirectiveClass:
256 case Stmt::OMPTargetDataDirectiveClass:
259 case Stmt::OMPTaskLoopDirectiveClass:
262 case Stmt::OMPTaskLoopSimdDirectiveClass:
265 case Stmt::OMPDistributeDirectiveClass:
274 case Stmt::NullStmtClass: break;
275 case Stmt::CompoundStmtClass: EmitCompoundStmt(cast<CompoundStmt>(*S)); break;
276 case Stmt::DeclStmtClass: EmitDeclStmt(cast<DeclStmt>(*S)); break;
277 case Stmt::LabelStmtClass: EmitLabelStmt(cast<LabelStmt>(*S)); break;
278 case Stmt::AttributedStmtClass:
280 case Stmt::GotoStmtClass: EmitGotoStmt(cast<GotoStmt>(*S)); break;
281 case Stmt::BreakStmtClass: EmitBreakStmt(cast<BreakStmt>(*S)); break;
282 case Stmt::ContinueStmtClass: EmitContinueStmt(cast<ContinueStmt>(*S)); break;
283 case Stmt::DefaultStmtClass: EmitDefaultStmt(cast<DefaultStmt>(*S)); break;
284 case Stmt::CaseStmtClass: EmitCaseStmt(cast<CaseStmt>(*S)); break;
285 case Stmt::SEHLeaveStmtClass: EmitSEHLeaveStmt(cast<SEHLeaveStmt>(*S)); break;
316 // We have to special case labels here. They are statements, but when put
491 case Stmt::DoStmtClass:
494 case Stmt::ForStmtClass:
497 case Stmt::WhileStmtClass:
500 case Stmt::CXXForRangeStmtClass:
825 // Create a separate cleanup scope for the body, in case it is not
895 // Create a block for the increment. In case of a 'continue', we jump there.
987 case TEK_Scalar:
990 case TEK_Complex:
994 case TEK_Aggregate:
1046 /// EmitCaseStmtRange - If case statement range is not too big then
1055 // Emit the code for this case. We do this first to make sure it is
1113 // Since we're chaining the switch default through each large case range, we
1114 // need to update the weight for the default, ie, the first case, to include
1115 // this case.
1129 // case statement and its block can be elided. This situation only happens
1130 // when we've constant-folded the switch, are emitting the constant case,
1131 // and part of the constant case includes another case statement. For
1132 // instance: switch (4) { case 4: do { case 5: } while (1); }
1138 // Handle case ranges.
1147 // If the body of the case is just a 'break', try to not emit an empty block.
1161 // If there was a fallthrough into this case, make sure to redirect it to
1178 // code where we have many case statements nested together, i.e.:
1179 // case 1:
1180 // case 2:
1181 // case 3: etc.
1182 // Handling this recursively will create a new block for each case statement
1183 // that falls through to the next case which is IR intensive. It also causes
1185 // sequential non-range case statements specially.
1224 /// case 5:
1233 /// the case) then return CSFC_FallThrough. If we handled it and found a break
1236 /// If Case is non-null, then we are looking for the specified case, checking
1237 /// that nothing we jump over contains labels. If Case is null, then we found
1238 /// the case and are looking for the break.
1240 /// If the recursive walk actually finds our Case, then we set FoundCase to
1245 const SwitchCase *Case,
1250 return Case ? CSFC_Success : CSFC_FallThrough;
1252 // If this is the switchcase (case 4: or default) that we're looking for, then
1255 if (S == Case) {
1261 // Otherwise, this is some other case or default statement, just ignore it.
1262 return CollectStatementsForCase(SC->getSubStmt(), Case, FoundCase,
1268 if (!Case && isa<BreakStmt>(S))
1277 if (Case) {
1283 // If we're looking for the case, just see if we can skip each of the
1285 for (; Case && I != E; ++I) {
1288 switch (CollectStatementsForCase(*I, Case, FoundCase, ResultStmts)) {
1289 case CSFC_Failure: return CSFC_Failure;
1290 case CSFC_Success:
1292 // have the case and is skippable, or 2) does contain the case value
1293 // and also contains the break to exit the switch. In the later case,
1296 // If we found the case and skipped declarations, we can't do the
1307 case CSFC_FallThrough:
1309 // case started to include statements. Consider the rest of the
1311 assert(FoundCase && "Didn't find case but returned fallthrough?");
1312 // We recursively found Case, so we're not looking for it anymore.
1313 Case = nullptr;
1315 // If we found the case and skipped declarations, we can't do the
1328 case CSFC_Failure: return CSFC_Failure;
1329 case CSFC_FallThrough:
1333 case CSFC_Success:
1344 return Case ? CSFC_Success : CSFC_FallThrough;
1350 if (Case) {
1366 /// FindCaseStatementsForValue - Find the case statement being jumped to and
1375 // First step, find the switch case that is being branched to. We can do this
1377 const SwitchCase *Case = S.getSwitchCaseList();
1380 for (; Case; Case = Case->getNextSwitchCase()) {
1381 // It's either a default or case. Just remember the default statement in
1382 // case we're not jumping to any numbered cases.
1383 if (const DefaultStmt *DS = dyn_cast<DefaultStmt>(Case)) {
1388 // Check to see if this case is the one we're looking for.
1389 const CaseStmt *CS = cast<CaseStmt>(Case);
1390 // Don't handle case ranges yet.
1393 // If we found our case, remember it as 'case'.
1398 // If we didn't find a matching case, we use a default if it exists, or we
1400 if (!Case) {
1405 Case = DefaultCase;
1408 // Ok, we know which case is being jumped to, try to collect all the
1410 // check to see that the recursive walk actually found our case statement.
1415 // case 4: ...
1417 ResultCase = Case;
1418 return CollectStatementsForCase(S.getBody(), Case, FoundCase,
1430 // emit the live case statement (if any) of the switch.
1434 const SwitchCase *Case = nullptr;
1436 getContext(), Case)) {
1437 if (Case)
1438 incrementProfileCounter(Case);
1442 // used by this special case for constant folded switches.
1447 // we can temporarily enforce this to ensure that any embedded case
1451 // Okay, we can dead code eliminate everything except this case. Emit the
1474 // explicit case ranges tests can have a place to jump to on
1482 for (const SwitchCase *Case = S.getSwitchCaseList();
1483 Case;
1484 Case = Case->getNextSwitchCase()) {
1485 if (isa<DefaultStmt>(Case))
1486 DefaultCount = getProfileCount(Case);
1513 // Update the default block in case explicit case range tests have
1578 case '*':
1579 case '?':
1580 case '!':
1581 case '=': // Will see this and the following in mult-alt constraints.
1582 case '+':
1584 case '#': // Ignore the rest of the constraint alternative.
1588 case '&':
1589 case '%':
1594 case ',':
1597 case 'g':
1600 case '[': {