[all-commits] [llvm/llvm-project] 636089: [GVN] hasUsersIn - merge isa<> and cast<> into sin...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Dec 14 11:43:08 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 636089d8dce257b5f261824d907bdb3d26b7a46e
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-12-14 (Wed, 14 Dec 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/GVN.cpp

  Log Message:
  [GVN] hasUsersIn - merge isa<> and cast<> into single dyn_cast<> and convert for-range loop to any_of() test. NFCI.

Avoid running isa<> and cast<> if we can - dyn_cast<> can more efficiently check for a safe cast and give the casted pointer.

More information about the All-commits mailing list