[all-commits] [llvm/llvm-project] 220e77: [clang][CodeGenPGO] Don't use an invalid index whe...

Nathan Lanza via All-commits all-commits at lists.llvm.org
Wed May 10 20:00:37 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 220e77a83af19b3f6c47472596fdaaef8e305927
      https://github.com/llvm/llvm-project/commit/220e77a83af19b3f6c47472596fdaaef8e305927
  Author: Nathan Lanza <nathanlanza at gmail.com>
  Date:   2023-05-10 (Wed, 10 May 2023)

  Changed paths:
    M clang/lib/CodeGen/CodeGenPGO.h

  Log Message:
  -----------
  [clang][CodeGenPGO] Don't use an invalid index when region counts disagree

If we're using an old instrprof profile and the user passes we can get
Decls with children decl counts not matching the what the profile was
written against. In a particular case I was debugging we have 24 decls
in the AST and 22 decls in the profile. Avoid crashing in this case.

Differential Revision: https://reviews.llvm.org/D149504




More information about the All-commits mailing list