summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ProfileData/InstrProfTest.cpp
diff options
context:
space:
mode:
authorRong Xu <xur@google.com>2019-02-28 19:55:07 +0000
committerRong Xu <xur@google.com>2019-02-28 19:55:07 +0000
commita6ff69f6ddf9ab3b3ea8f3f57e8b91a24fa9319f (patch)
treeb24b61755548564cc6d124f5f7e0cc8acc150e68 /llvm/unittests/ProfileData/InstrProfTest.cpp
parent7fc6ef7dd7433c1947e1a00db0c32d1c68bf385f (diff)
downloadbcm5719-llvm-a6ff69f6ddf9ab3b3ea8f3f57e8b91a24fa9319f.tar.gz
bcm5719-llvm-a6ff69f6ddf9ab3b3ea8f3f57e8b91a24fa9319f.zip
[PGO] Context sensitive PGO (part 2)
Part 2 of CSPGO changes (mostly related to ProfileSummary). Note that I use a default parameter in setProfileSummary() and getSummary(). This is to break the dependency in clang. I will make the parameter explicit after changing clang in a separated patch. Differential Revision: https://reviews.llvm.org/D54175 llvm-svn: 355131
Diffstat (limited to 'llvm/unittests/ProfileData/InstrProfTest.cpp')
-rw-r--r--llvm/unittests/ProfileData/InstrProfTest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/unittests/ProfileData/InstrProfTest.cpp b/llvm/unittests/ProfileData/InstrProfTest.cpp
index 19daf5cdb5f..174e8deabb5 100644
--- a/llvm/unittests/ProfileData/InstrProfTest.cpp
+++ b/llvm/unittests/ProfileData/InstrProfTest.cpp
@@ -175,7 +175,7 @@ TEST_F(InstrProfTest, get_profile_summary) {
ASSERT_EQ(288230376151711744U, NinetyFivePerc->MinCount);
ASSERT_EQ(72057594037927936U, NinetyNinePerc->MinCount);
};
- ProfileSummary &PS = Reader->getSummary();
+ ProfileSummary &PS = Reader->getSummary(/* IsCS */ false);
VerifySummary(PS);
// Test that conversion of summary to and from Metadata works.
@@ -189,8 +189,8 @@ TEST_F(InstrProfTest, get_profile_summary) {
// Test that summary can be attached to and read back from module.
Module M("my_module", Context);
- M.setProfileSummary(MD);
- MD = M.getProfileSummary();
+ M.setProfileSummary(MD, ProfileSummary::PSK_Instr);
+ MD = M.getProfileSummary(/* IsCS */ false);
ASSERT_TRUE(MD);
PSFromMD = ProfileSummary::getFromMD(MD);
ASSERT_TRUE(PSFromMD);
@@ -801,7 +801,7 @@ TEST_P(MaybeSparseInstrProfTest, get_max_function_count) {
auto Profile = Writer.writeBuffer();
readProfile(std::move(Profile));
- ASSERT_EQ(1ULL << 63, Reader->getMaximumFunctionCount());
+ ASSERT_EQ(1ULL << 63, Reader->getMaximumFunctionCount(/* IsCS */ false));
}
TEST_P(MaybeSparseInstrProfTest, get_weighted_function_counts) {
OpenPOWER on IntegriCloud