[PATCH] D38223: Make sure the basic block has an insertion point before dereferencing it

David Majnemer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 09:22:04 PDT 2017


majnemer accepted this revision.
majnemer added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/Transforms/Instrumentation/GCOVProfiling.cpp:637
         int Successors = isa<ReturnInst>(TI) ? 1 : TI->getNumSuccessors();
         if (Successors) {
----------------
I think I'd skip `BB` if `TI->IsEHPad()`, that would save a bunch of the checks you are doing on `BB`.


Repository:
  rL LLVM

https://reviews.llvm.org/D38223





More information about the llvm-commits mailing list