================
@@ -207,28 +636,83 @@ static bool processCallBrInst(Function &F, CallBrInst 
*CBR, DominatorTree *DT) {
   return Changed;
 }
 
-static SmallVector<CallBrInst *, 2> findCallBrs(Function &F) {
-  SmallVector<CallBrInst *, 2> CBRs;
-  for (BasicBlock &BB : F)
-    if (auto *CBR = dyn_cast<CallBrInst>(BB.getTerminator()))
-      if (!CBR->getType()->isVoidTy() && !CBR->use_empty())
-        CBRs.push_back(CBR);
-  return CBRs;
-}
-
-static bool runImpl(Function &F, ArrayRef<CallBrInst *> CBRs,
-                    DominatorTree *DT) {
+static bool runImpl(Function &F, ArrayRef<CallBase *> IAs, DominatorTree *DT,
+                    const TargetMachine *TM) {
   bool Changed = false;
+  bool isOptLevelNone = TM->getOptLevel() == CodeGenOptLevel::None;
----------------
bwendling wrote:

> Yes, this is the scale of incision I had in mind. I love it (and I'm not 
> being sarcastic).

Egg-salad! I'm going to clean things up, port / update testcases, and I'll send 
out another PR.

> > Pros: This should "Just Work(tm)" (h/t Todd Howard)!
> 
> You play _too_ much fallout. Daily reminder that New Vegas is God's chosen 
> fallout.

Your heresy has been noted!

https://github.com/llvm/llvm-project/pull/181973
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to