diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-17 20:22:39 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-17 20:22:39 +0000 |
commit | 7af96fb3afd6725a2824a0a5ca5dad34e5e0b056 (patch) | |
tree | 6661ffbabf869009597684462f5a3df3beccc952 /unittests/Analysis | |
parent | 6b3f41ed88e8e440e11a4fbf20b6600529f80049 (diff) | |
download | src-7af96fb3afd6725a2824a0a5ca5dad34e5e0b056.tar.gz src-7af96fb3afd6725a2824a0a5ca5dad34e5e0b056.zip |
Vendor import of llvm trunk r303291:vendor/llvm/llvm-trunk-r303291
Notes
Notes:
svn path=/vendor/llvm/dist/; revision=318414
svn path=/vendor/llvm/llvm-trunk-r303291/; revision=318415; tag=vendor/llvm/llvm-trunk-r303291
Diffstat (limited to 'unittests/Analysis')
-rw-r--r-- | unittests/Analysis/ProfileSummaryInfoTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/Analysis/ProfileSummaryInfoTest.cpp b/unittests/Analysis/ProfileSummaryInfoTest.cpp index 3454474f0376..c9e4fc029dc0 100644 --- a/unittests/Analysis/ProfileSummaryInfoTest.cpp +++ b/unittests/Analysis/ProfileSummaryInfoTest.cpp @@ -102,6 +102,9 @@ TEST_F(ProfileSummaryInfoTest, TestNoProfile) { Function *F = M->getFunction("f"); ProfileSummaryInfo PSI = buildPSI(M.get()); + EXPECT_FALSE(PSI.hasProfileSummary()); + EXPECT_FALSE(PSI.hasSampleProfile()); + EXPECT_FALSE(PSI.hasInstrumentationProfile()); // In the absence of profiles, is{Hot|Cold}X methods should always return // false. EXPECT_FALSE(PSI.isHotCount(1000)); @@ -130,6 +133,7 @@ TEST_F(ProfileSummaryInfoTest, TestCommon) { Function *H = M->getFunction("h"); ProfileSummaryInfo PSI = buildPSI(M.get()); + EXPECT_TRUE(PSI.hasProfileSummary()); EXPECT_TRUE(PSI.isHotCount(400)); EXPECT_TRUE(PSI.isColdCount(2)); EXPECT_FALSE(PSI.isColdCount(100)); @@ -144,6 +148,8 @@ TEST_F(ProfileSummaryInfoTest, InstrProf) { auto M = makeLLVMModule("InstrProf"); Function *F = M->getFunction("f"); ProfileSummaryInfo PSI = buildPSI(M.get()); + EXPECT_TRUE(PSI.hasProfileSummary()); + EXPECT_TRUE(PSI.hasInstrumentationProfile()); BasicBlock &BB0 = F->getEntryBlock(); BasicBlock *BB1 = BB0.getTerminator()->getSuccessor(0); @@ -174,6 +180,8 @@ TEST_F(ProfileSummaryInfoTest, SampleProf) { auto M = makeLLVMModule("SampleProfile"); Function *F = M->getFunction("f"); ProfileSummaryInfo PSI = buildPSI(M.get()); + EXPECT_TRUE(PSI.hasProfileSummary()); + EXPECT_TRUE(PSI.hasSampleProfile()); BasicBlock &BB0 = F->getEntryBlock(); BasicBlock *BB1 = BB0.getTerminator()->getSuccessor(0); |