This is an archive of the discontinued LLVM Phabricator instance.

[CallSiteInfo][CallGraphSection] Extend CallSiteInfo with TypeId
AcceptedPublic

Authored by Prabhuk on Jul 29 2021, 2:42 PM.

Details

Summary

Add TypeId field to CallSiteInfo for tracking callee type id. Read the type
id in and out by the MIR parser/printer.

With this patch, TypeId is only set from callSites.typeId fields from MIR
inputs. An upcoming patch will pass type ids from the clang front-end,
and they will be read and set while lowering in the LLVM middle-end.

Original RFC: https://lists.llvm.org/pipermail/llvm-dev/2021-June/151044.html
Updated RFC: https://lists.llvm.org/pipermail/llvm-dev/2021-July/151739.html

Diff Detail

Event Timeline

necipfazil created this revision.Jul 29 2021, 2:42 PM
necipfazil requested review of this revision.Jul 29 2021, 2:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 29 2021, 2:42 PM
This revision is now accepted and ready to land.Jul 29 2021, 4:00 PM
vitalybuka added inline comments.Jul 29 2021, 4:39 PM
llvm/include/llvm/CodeGen/MIRYamlMapping.h
460 ↗(On Diff #362890)

Why this is not in the operator==

same for ArgForwardingRegs

Should add some parse failure condition tests

llvm/lib/CodeGen/MIRParser/MIRParser.cpp
406 ↗(On Diff #362890)

Don't need hasValue

408 ↗(On Diff #362890)
  • instead of getValue
llvm/test/CodeGen/MIR/X86/call-site-info-typeid.mir
7 ↗(On Diff #362890)

Should check the actual values are preserved

11–32 ↗(On Diff #362890)

Does this really need the IR section?

Reverse ping

Herald added a project: Restricted Project. · View Herald TranscriptSep 30 2022, 7:12 AM
Prabhuk updated this revision to Diff 558155.Wed, Nov 22, 2:13 PM

Rebased the patchset and addressed the compilation failures

phosek added a subscriber: phosek.Mon, Nov 27, 9:53 AM