[all-commits] [llvm/llvm-project] 6b53ad: [GlobalDCE] [VFE] Avoid dropping vfunc dependencie...

Kuba (Brecka) Mracek via All-commits all-commits at lists.llvm.org
Thu Feb 17 19:43:29 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b53ad298e95a9f1cb5770dcbaa71cb4ea343021
      https://github.com/llvm/llvm-project/commit/6b53ad298e95a9f1cb5770dcbaa71cb4ea343021
  Author: Kuba Mracek <mracek at apple.com>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M llvm/lib/Transforms/IPO/GlobalDCE.cpp
    A llvm/test/Transforms/GlobalDCE/virtual-functions-nonptr.ll
    M llvm/test/Transforms/GlobalDCE/virtual-functions-null.ll

  Log Message:
  -----------
  [GlobalDCE] [VFE] Avoid dropping vfunc dependencies when an invalid vtable entry is present

When we scan vtables for a particular vload in ScanVTableLoad and an entry in
one possible vtable is invalid (null or non-fptr), we bail in a wrong way -- we
completely stop the scanning of vtables and this results in dropped dependencies
and incorrectly removed vfuncs from vtables. Let's fix that by correcting the
bailing logic to keep iterating and only skip the invalid entries.

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




More information about the All-commits mailing list