Home | History | Annotate | Download | only in Utils

Lines Matching defs:selector

61 /// [LIBUNWIND] Look for the 'best' llvm.eh.selector instruction for
72 // Immediately accept an eh.selector in the same block as the
76 // Otherwise, use the first selector we see.
83 /// [LIBUNWIND] Find the (possibly absent) call to @llvm.eh.selector
114 // *anything* to the CFG, including leaving the selector
116 // to (1) prohibit transforms which move the exception or selector
148 // Look for a selector call for the exception we found.
149 EHSelectorInst *selector = findSelectorForException(exn);
150 if (!selector) return 0;
156 selector->moveBefore(lpad->getFirstNonPHI());
157 exn->moveBefore(selector);
158 return selector;
172 // %selector = call @llvm.eh.selector(i8* %exn, ...
177 // %selector0 = call @llvm.eh.selector(i8* %exn0, ...
183 // %selector1 = call i8* @llvm.eh.selector(i8* %exn1, ...
188 // %selector = phi ...
197 EHSelectorInst *lpadSelector = cast<EHSelectorInst>(selector->clone());
211 selector->moveBefore(&nonDominated->back());
212 exn->moveBefore(selector);
231 // Make new phis for the exception and selector.
234 selector->setArgOperand(0, exn); // except for this use
238 PHINode *selectorPhi = PHINode::Create(selector->getType(), 2, "", splitIP);
239 selector->replaceAllUsesWith(selectorPhi);
240 selectorPhi->addIncoming(selector, nonDominated);
335 // Find and hoist the llvm.eh.exception and llvm.eh.selector calls
337 EHSelectorInst *selector = getOuterSelector();
338 if (!selector) return 0;
341 Instruction *exn = cast<Instruction>(selector->getArgOperand(0));
350 assert(splitPoint != selector && "selector-on-exception dominance broken!");
352 selector->removeFromParent();
353 selector->insertAfter(exn);
354 splitPoint = selector->getNextNode();
357 selector->moveBefore(splitPoint);
383 selector->setArgOperand(0, exn); // restore this use
386 // ...and the selector.
387 InnerSelectorPHI = PHINode::Create(selector->getType(), phiCapacity,
388 "selector.lpad-body", insertPoint);
389 selector->replaceAllUsesWith(InnerSelectorPHI);
390 InnerSelectorPHI->addIncoming(selector, OuterUnwindDest);
410 // can't find a selector call for the outer unwind dest.
415 // exception and selector on the floor.
488 /// [LIBUNWIND] Check whether this selector is "only cleanups":
489 /// call i32 @llvm.eh.selector(blah, blah, i32 0)
490 static bool isCleanupOnlySelector(EHSelectorInst *selector) {
491 if (selector->getNumArgOperands() != 3) return false;
492 ConstantInt *val = dyn_cast<ConstantInt>(selector->getArgOperand(2));
523 // LIBUNWIND: merge selector instructions.
536 // Otherwise, we just append the outer selector to the inner selector.