diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2017-05-26 23:21:40 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2017-05-26 23:21:40 +0000 |
commit | 2c26a1850142b1f50e761058e9befb645850ee55 (patch) | |
tree | 5f68319e1700867439dfec6e4495b8bb1202883f /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | f8f8f49a24b89f0be4dfb75072ad608ee7f47e91 (diff) | |
download | llvm-2c26a1850142b1f50e761058e9befb645850ee55.zip llvm-2c26a1850142b1f50e761058e9befb645850ee55.tar.gz llvm-2c26a1850142b1f50e761058e9befb645850ee55.tar.bz2 |
Bitcode: Remove some dead code. Spotted by Teresa.
Differential Revision: https://reviews.llvm.org/D33609
llvm-svn: 304046
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index e29b225..c1d81ac 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -3415,30 +3415,8 @@ void IndexBitcodeWriter::writeCombinedGlobalValueSummary() { // Create value IDs for undefined references. forEachSummary([&](GVInfo I) { - if (auto *VS = dyn_cast<GlobalVarSummary>(I.second)) { - for (auto &RI : VS->refs()) - assignValueId(RI.getGUID()); - return; - } - - auto *FS = dyn_cast<FunctionSummary>(I.second); - if (!FS) - return; - for (auto &RI : FS->refs()) + for (auto &RI : I.second->refs()) assignValueId(RI.getGUID()); - - for (auto &EI : FS->calls()) { - GlobalValue::GUID GUID = EI.first.getGUID(); - if (!hasValueId(GUID)) { - // For SamplePGO, the indirect call targets for local functions will - // have its original name annotated in profile. We try to find the - // corresponding PGOFuncName as the GUID. - GUID = Index.getGUIDFromOriginalID(GUID); - if (GUID == 0 || !hasValueId(GUID)) - continue; - } - assignValueId(GUID); - } }); for (const auto &GVI : valueIds()) { |