[all-commits] [llvm/llvm-project] 7d3717: [NFCI][BitcodeReader]Read real GUID from VI as opp...
Mingming Liu via All-commits
all-commits at lists.llvm.org
Mon Sep 9 09:44:08 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7d371725cdf993d16f6debf74cf740c3aea84f9b
https://github.com/llvm/llvm-project/commit/7d371725cdf993d16f6debf74cf740c3aea84f9b
Author: Mingming Liu <mingmingl at google.com>
Date: 2024-09-09 (Mon, 09 Sep 2024)
Changed paths:
M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
Log Message:
-----------
[NFCI][BitcodeReader]Read real GUID from VI as opposed to storing it in map (#107735)
Currently, `ValueIdToValueInfoMap` [1] stores `std::tuple<ValueInfo,
GlobalValue::GUID /* original GUID */, GlobalValue::GUID /* real GUID*/
>`. This change updates the stored value type to `std::pair<ValueInfo,
GlobalValue::GUID /* original GUID */>`, and reads real GUID from
ValueInfo.
When an entry is inserted into `ValueIdToValueInfoMap`, ValueInfo is
created or inserted using real GUID [2]. ValueInfo keeps a pointer to
GlobalValueMap [3], using either `GUID` or `{GUID, Name}` [4] when
reading per-module summaries to create a combined summary.
[1] owned by per module-summary bitcode reader
https://github.com/llvm/llvm-project/blob/caebb4562ce634a22f7b13480b19cffc2a6a6730/llvm/lib/Bitcode/Reader/BitcodeReader.cpp#L947-L950
[2]
[first](https://github.com/llvm/llvm-project/blob/caebb4562ce634a22f7b13480b19cffc2a6a6730/llvm/lib/Bitcode/Reader/BitcodeReader.cpp#L7130-L7133),
[second](https://github.com/llvm/llvm-project/blob/caebb4562ce634a22f7b13480b19cffc2a6a6730/llvm/lib/Bitcode/Reader/BitcodeReader.cpp#L7221-L7222),
[third](https://github.com/llvm/llvm-project/blob/caebb4562ce634a22f7b13480b19cffc2a6a6730/llvm/lib/Bitcode/Reader/BitcodeReader.cpp#L7622-L7623)
[3]
https://github.com/llvm/llvm-project/blob/caebb4562ce634a22f7b13480b19cffc2a6a6730/llvm/include/llvm/IR/ModuleSummaryIndex.h#L1427-L1431
[4]
https://github.com/llvm/llvm-project/blob/caebb4562ce634a22f7b13480b19cffc2a6a6730/llvm/include/llvm/IR/ModuleSummaryIndex.h#L1631
and
https://github.com/llvm/llvm-project/blob/caebb4562ce634a22f7b13480b19cffc2a6a6730/llvm/include/llvm/IR/ModuleSummaryIndex.h#L1621
---------
Co-authored-by: Kazu Hirata <kazu at google.com>
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