Home | History | Annotate | Download | only in Utils

Lines Matching refs:selector

58 /// [LIBUNWIND] Look for the 'best' llvm.eh.selector instruction for
69 // Immediately accept an eh.selector in the same block as the
73 // Otherwise, use the first selector we see.
80 /// [LIBUNWIND] Find the (possibly absent) call to @llvm.eh.selector
111 // *anything* to the CFG, including leaving the selector
113 // to (1) prohibit transforms which move the exception or selector
145 // Look for a selector call for the exception we found.
146 EHSelectorInst *selector = findSelectorForException(exn);
147 if (!selector) return 0;
153 selector->moveBefore(lpad->getFirstNonPHI());
154 exn->moveBefore(selector);
155 return selector;
169 // %selector = call @llvm.eh.selector(i8* %exn, ...
174 // %selector0 = call @llvm.eh.selector(i8* %exn0, ...
180 // %selector1 = call i8* @llvm.eh.selector(i8* %exn1, ...
185 // %selector = phi ...
194 EHSelectorInst *lpadSelector = cast<EHSelectorInst>(selector->clone());
208 selector->moveBefore(&nonDominated->back());
209 exn->moveBefore(selector);
228 // Make new phis for the exception and selector.
231 selector->setArgOperand(0, exn); // except for this use
235 PHINode *selectorPhi = PHINode::Create(selector->getType(), 2, "", splitIP);
236 selector->replaceAllUsesWith(selectorPhi);
237 selectorPhi->addIncoming(selector, nonDominated);
308 // Find and hoist the llvm.eh.exception and llvm.eh.selector calls
310 EHSelectorInst *selector = getOuterSelector();
311 if (!selector) return 0;
314 Instruction *exn = cast<Instruction>(selector->getArgOperand(0));
323 assert(splitPoint != selector && "selector-on-exception dominance broken!");
325 selector->removeFromParent();
326 selector->insertAfter(exn);
327 splitPoint = selector->getNextNode();
330 selector->moveBefore(splitPoint);
356 selector->setArgOperand(0, exn); // restore this use
359 // ...and the selector.
360 InnerSelectorPHI = PHINode::Create(selector->getType(), phiCapacity,
361 "selector.lpad-body", insertPoint);
362 selector->replaceAllUsesWith(InnerSelectorPHI);
363 InnerSelectorPHI->addIncoming(selector, OuterUnwindDest);
383 // can't find a selector call for the outer unwind dest.
388 // exception and selector on the floor.
407 /// [LIBUNWIND] Check whether this selector is "only cleanups":
408 /// call i32 @llvm.eh.selector(blah, blah, i32 0)
409 static bool isCleanupOnlySelector(EHSelectorInst *selector) {
410 if (selector->getNumArgOperands() != 3) return false;
411 ConstantInt *val = dyn_cast<ConstantInt>(selector->getArgOperand(2));
432 // LIBUNWIND: merge selector instructions.
445 // Otherwise, we just append the outer selector to the inner selector.