[all-commits] [llvm/llvm-project] cac3f5: [memprof] Add simplify_type (NFC) (#123556)

Kazu Hirata via All-commits all-commits at lists.llvm.org
Mon Jan 20 10:13:00 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cac3f5ecb972194322aeeb8e84e7c7dd60dedef8
      https://github.com/llvm/llvm-project/commit/cac3f5ecb972194322aeeb8e84e7c7dd60dedef8
  Author: Kazu Hirata <kazu at google.com>
  Date:   2025-01-20 (Mon, 20 Jan 2025)

  Changed paths:
    M llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp

  Log Message:
  -----------
  [memprof] Add simplify_type (NFC) (#123556)

IndexCall is a simple wrapper around:

  PointerUnion<CallsiteInfo *, AllocInfo *>

Now, because we don't have CastInfo for IndexCall, we would have to
use getBase like so:

  dyn_cast_if_present<CallsiteInfo *>(Call.getBase())

This patch adds simplify_type<IndexCall>, which in turn enables
CastInfo for IndexCall, so we can drop getBase like so::

  dyn_cast_if_present<CallsiteInfo *>(Call)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list