[PATCH] D49337: Skip debuginfo intrinsic in markLiveBlocks.

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 14 06:37:48 PDT 2018


hfinkel added a comment.

There's nothing special about debug intrinsics here except that there are a lot of them. The problem, as far as I can tell, is that we're repeatedly using dyn_cast on each instruction and doing multiple redundant tests. Adding yet another redundant test will help having a lot of debug intrinsics makes things incrementally more expensive for all other kinds of intrinsics. Thus, this doesn't seem like the right way to fix this. Instead of testing for IntrinsicInst, and then CallInst (which is always true whenever the IntrinsicInst is true), and then we always test for StoreInst (but we don't use an 'else' so we always do this test even when the IntrinsicInst/CallInst is true (which will include debug intrinsics)).

First, I'd try adding an 'else' when testing for a store. Also, get rid of the IntrinsicInst test, getIntrinsicID is a member of Function, so you can do dyn_cast Callee to Function, and then check for the intrinsic IDs.


Repository:
  rL LLVM

https://reviews.llvm.org/D49337





More information about the llvm-commits mailing list