summaryrefslogtreecommitdiffstats
path: root/llvm/unittests
diff options
context:
space:
mode:
authorMircea Trofin <mtrofin@google.com>2018-03-21 19:06:06 +0000
committerMircea Trofin <mtrofin@google.com>2018-03-21 19:06:06 +0000
commit71349ff07df41ba1c0decb99d05f85bbaa2d256a (patch)
treec1240f806e6bbb445e4cf599bfd2905bf16d47b1 /llvm/unittests
parent6f22226d6c7c013d522ce5f2c192c691a09d64e1 (diff)
downloadbcm5719-llvm-71349ff07df41ba1c0decb99d05f85bbaa2d256a.tar.gz
bcm5719-llvm-71349ff07df41ba1c0decb99d05f85bbaa2d256a.zip
[InstrProf] Support for external functions in text format.
Summary: External functions appearing as indirect call targets could not be found in the SymTab, and the value:counter record was represented, in the text format, using an empty string for the name. This would then cause a silent parsing error when reading. This CL: - adds explicit support for such functions - fixes the places where we would not propagate errors when reading - addresses a performance issue due to eager resorting of the SymTab. Reviewers: xur, eraman, davidxl Reviewed By: davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44717 llvm-svn: 328132
Diffstat (limited to 'llvm/unittests')
-rw-r--r--llvm/unittests/ProfileData/InstrProfTest.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/llvm/unittests/ProfileData/InstrProfTest.cpp b/llvm/unittests/ProfileData/InstrProfTest.cpp
index 79f880e475c..309241dfe6b 100644
--- a/llvm/unittests/ProfileData/InstrProfTest.cpp
+++ b/llvm/unittests/ProfileData/InstrProfTest.cpp
@@ -769,7 +769,6 @@ TEST_P(MaybeSparseInstrProfTest, value_prof_data_read_write_mapping) {
Symtab.mapAddress(uint64_t(callee3), 0x3000ULL);
Symtab.mapAddress(uint64_t(callee4), 0x4000ULL);
// Missing mapping for callee5
- Symtab.finalizeSymtab();
VPData->deserializeTo(Record, &Symtab.getAddrHashMap());
@@ -858,8 +857,6 @@ TEST_P(MaybeSparseInstrProfTest, instr_prof_symtab_test) {
EXPECT_THAT_ERROR(Symtab.addFuncName("blah_1"), Succeeded());
EXPECT_THAT_ERROR(Symtab.addFuncName("blah_2"), Succeeded());
EXPECT_THAT_ERROR(Symtab.addFuncName("blah_3"), Succeeded());
- // Finalize it
- Symtab.finalizeSymtab();
// Check again
R = Symtab.getFuncName(IndexedInstrProf::ComputeHash("blah_1"));
OpenPOWER on IntegriCloud