X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=unittests%2FProfileData%2FInstrProfTest.cpp;h=b71712fba7d974f4a29929c168e9ae85ea555e21;hp=a4fadd3d65d93256005720e84c662525401109ca;hb=36838feb749d1a0e874d1acc6f6bef9d05cfdbde;hpb=a94cb08fdaecba77dea3b23dd9932a0c2caffda8 diff --git a/unittests/ProfileData/InstrProfTest.cpp b/unittests/ProfileData/InstrProfTest.cpp index a4fadd3d65d..b71712fba7d 100644 --- a/unittests/ProfileData/InstrProfTest.cpp +++ b/unittests/ProfileData/InstrProfTest.cpp @@ -159,11 +159,6 @@ TEST_F(InstrProfTest, get_icall_data_read_write) { std::unique_ptr VD = R.get().getValueForSite(IPVK_IndirectCallTarget, 0); - // Now sort the target acording to frequency. - std::sort(&VD[0], &VD[3], - [](const InstrProfValueData &VD1, const InstrProfValueData &VD2) { - return VD1.Count > VD2.Count; - }); ASSERT_EQ(3U, VD[0].Count); ASSERT_EQ(2U, VD[1].Count); @@ -211,11 +206,6 @@ TEST_F(InstrProfTest, get_icall_data_read_write_with_weight) { std::unique_ptr VD = R.get().getValueForSite(IPVK_IndirectCallTarget, 0); - // Now sort the target acording to frequency. - std::sort(&VD[0], &VD[3], - [](const InstrProfValueData &VD1, const InstrProfValueData &VD2) { - return VD1.Count > VD2.Count; - }); ASSERT_EQ(30U, VD[0].Count); ASSERT_EQ(20U, VD[1].Count); ASSERT_EQ(10U, VD[2].Count); @@ -269,11 +259,6 @@ TEST_F(InstrProfTest, get_icall_data_read_write_big_endian) { std::unique_ptr VD = R.get().getValueForSite(IPVK_IndirectCallTarget, 0); - // Now sort the target acording to frequency. - std::sort(&VD[0], &VD[3], - [](const InstrProfValueData &VD1, const InstrProfValueData &VD2) { - return VD1.Count > VD2.Count; - }); ASSERT_EQ(StringRef((const char *)VD[0].Value, 7), StringRef("callee3")); ASSERT_EQ(StringRef((const char *)VD[1].Value, 7), StringRef("callee2")); ASSERT_EQ(StringRef((const char *)VD[2].Value, 7), StringRef("callee1")); @@ -365,11 +350,6 @@ TEST_F(InstrProfTest, get_icall_data_merge1) { std::unique_ptr VD = R.get().getValueForSite(IPVK_IndirectCallTarget, 0); - // Now sort the target acording to frequency. - std::sort(&VD[0], &VD[4], - [](const InstrProfValueData &VD1, const InstrProfValueData &VD2) { - return VD1.Count > VD2.Count; - }); ASSERT_EQ(StringRef((const char *)VD[0].Value, 7), StringRef("callee2")); ASSERT_EQ(7U, VD[0].Count); ASSERT_EQ(StringRef((const char *)VD[1].Value, 7), StringRef("callee3")); @@ -381,10 +361,6 @@ TEST_F(InstrProfTest, get_icall_data_merge1) { std::unique_ptr VD_2( R.get().getValueForSite(IPVK_IndirectCallTarget, 2)); - std::sort(&VD_2[0], &VD_2[4], - [](const InstrProfValueData &VD1, const InstrProfValueData &VD2) { - return VD1.Count > VD2.Count; - }); ASSERT_EQ(StringRef((const char *)VD_2[0].Value, 7), StringRef("callee3")); ASSERT_EQ(6U, VD_2[0].Count); ASSERT_EQ(StringRef((const char *)VD_2[1].Value, 7), StringRef("callee4")); @@ -401,10 +377,6 @@ TEST_F(InstrProfTest, get_icall_data_merge1) { std::unique_ptr VD_4( R.get().getValueForSite(IPVK_IndirectCallTarget, 4)); - std::sort(&VD_4[0], &VD_4[3], - [](const InstrProfValueData &VD1, const InstrProfValueData &VD2) { - return VD1.Count > VD2.Count; - }); ASSERT_EQ(StringRef((const char *)VD_4[0].Value, 7), StringRef("callee3")); ASSERT_EQ(6U, VD_4[0].Count); ASSERT_EQ(StringRef((const char *)VD_4[1].Value, 7), StringRef("callee2"));