summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Transforms/Utils/SizeOptsTest.cpp
diff options
context:
space:
mode:
authorHiroshi Yamauchi <yamauchi@google.com>2019-12-03 15:02:37 -0800
committerHiroshi Yamauchi <yamauchi@google.com>2019-12-04 09:35:50 -0800
commit62d429972e50d1437a3fb43663218a7b443f0fc8 (patch)
tree026585814b25919ab9a7e4ac9f5751984a46c39d /llvm/unittests/Transforms/Utils/SizeOptsTest.cpp
parent61e54fd60c4388602cb029c984353b1f4319c1ac (diff)
downloadbcm5719-llvm-62d429972e50d1437a3fb43663218a7b443f0fc8.tar.gz
bcm5719-llvm-62d429972e50d1437a3fb43663218a7b443f0fc8.zip
[PGO][PGSO] Distinguish queries from unit tests and explicitly enable for the existing IR passes only. NFC.
Summary: This is one more prep step necessary before the code gen pass instrumentation code could go in. Reviewers: davidxl Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70988
Diffstat (limited to 'llvm/unittests/Transforms/Utils/SizeOptsTest.cpp')
-rw-r--r--llvm/unittests/Transforms/Utils/SizeOptsTest.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/unittests/Transforms/Utils/SizeOptsTest.cpp b/llvm/unittests/Transforms/Utils/SizeOptsTest.cpp
index 55ca7863575..7caa5ed319a 100644
--- a/llvm/unittests/Transforms/Utils/SizeOptsTest.cpp
+++ b/llvm/unittests/Transforms/Utils/SizeOptsTest.cpp
@@ -68,13 +68,13 @@ TEST_F(SizeOptsTest, Test) {
BasicBlock *BB3 = BB1->getSingleSuccessor();
EXPECT_TRUE(PSI.hasProfileSummary());
- EXPECT_FALSE(shouldOptimizeForSize(F, &PSI, BFI_F));
- EXPECT_TRUE(shouldOptimizeForSize(G, &PSI, BFI_G));
- EXPECT_FALSE(shouldOptimizeForSize(H, &PSI, BFI_H));
- EXPECT_FALSE(shouldOptimizeForSize(&BB0, &PSI, BFI_F));
- EXPECT_FALSE(shouldOptimizeForSize(BB1, &PSI, BFI_F));
- EXPECT_TRUE(shouldOptimizeForSize(BB2, &PSI, BFI_F));
- EXPECT_FALSE(shouldOptimizeForSize(BB3, &PSI, BFI_F));
+ EXPECT_FALSE(shouldOptimizeForSize(F, &PSI, BFI_F, PGSOQueryType::Test));
+ EXPECT_TRUE(shouldOptimizeForSize(G, &PSI, BFI_G, PGSOQueryType::Test));
+ EXPECT_FALSE(shouldOptimizeForSize(H, &PSI, BFI_H, PGSOQueryType::Test));
+ EXPECT_FALSE(shouldOptimizeForSize(&BB0, &PSI, BFI_F, PGSOQueryType::Test));
+ EXPECT_FALSE(shouldOptimizeForSize(BB1, &PSI, BFI_F, PGSOQueryType::Test));
+ EXPECT_TRUE(shouldOptimizeForSize(BB2, &PSI, BFI_F, PGSOQueryType::Test));
+ EXPECT_FALSE(shouldOptimizeForSize(BB3, &PSI, BFI_F, PGSOQueryType::Test));
}
const char* SizeOptsTest::IRString = R"IR(
OpenPOWER on IntegriCloud