(Split of off D67120)
SizeOpts/MachineSizeOpts changes for profile guided size optimization.
Paths
| Differential D69070
[PGO][PGSO] SizeOpts changes. AbandonedPublic Authored by hjyamauchi on Oct 16 2019, 2:12 PM.
Details
Diff Detail
Event Timelinehjyamauchi added inline comments.
This revision is now accepted and ready to land.Oct 17 2019, 9:26 AM Closed by commit rG7e1637451d20: [PGO][PGSO] SizeOpts changes. (authored by hjyamauchi). · Explain WhyOct 18 2019, 9:52 AM This revision was automatically updated to reflect the committed changes. hjyamauchi marked 2 inline comments as done. This revision is now accepted and ready to land.Oct 19 2019, 10:36 AM This revision now requires changes to proceed.Oct 19 2019, 10:37 AM Comment Actions This patch was apparently reverted by https://reviews.llvm.org/rL375375. It looks like https://reviews.llvm.org/rL375261 fixed the build issue, as in but there was a different problem in the test execution, as in Comment Actions Reproduced. The cause was a missing dependency on the X86 target when the targets to build wasn't (didn't include) X86. [----------] 1 test from MachineSizeOptsTest [ RUN ] MachineSizeOptsTest.Test Program received signal SIGSEGV, Segmentation fault. 0x00005555556ee854 in llvm::Target::createTargetMachine (this=0x0, TT=..., CPU=..., Features=..., Options=..., RM=..., CM=..., OL=llvm::CodeGenOpt::Default, JIT=false) at ../include/llvm/Support/TargetRegistry.h:400 400 if (!TargetMachineCtorFn) (gdb) bt #0 0x00005555556ee854 in llvm::Target::createTargetMachine (this=0x0, TT=..., CPU=..., Features=..., Options=..., RM=..., CM=..., OL=llvm::CodeGenOpt::Default, JIT=false) at ../include/llvm/Support/TargetRegistry.h:400 #1 0x00005555557253fe in (anonymous namespace)::createTargetMachine () at ../unittests/CodeGen/MachineSizeOptsTest.cpp:34 #2 0x00005555557255ec in (anonymous namespace)::MachineSizeOptsTest::SetUp (this=0x5555588e21a0) at ../unittests/CodeGen/MachineSizeOptsTest.cpp:66 #3 0x0000555556a5354b in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void> (object=0x5555588e21a0, method=&virtual testing::Test::SetUp(), location=0x555557c0f41b "SetUp()") at ../utils/unittest/googletest/src/gtest.cc:2402 #4 0x0000555556a4e52b in testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> (object=0x5555588e21a0, method=&virtual testing::Test::SetUp(), location=0x555557c0f41b "SetUp()") at ../utils/unittest/googletest/src/gtest.cc:2455 #5 0x0000555556a380d9 in testing::Test::Run (this=0x5555588e21a0) at ../utils/unittest/googletest/src/gtest.cc:2470 #6 0x0000555556a3883a in testing::TestInfo::Run (this=0x5555588bbf80) at ../utils/unittest/googletest/src/gtest.cc:2656 #7 0x0000555556a38de4 in testing::TestCase::Run (this=0x5555588bc110) at ../utils/unittest/googletest/src/gtest.cc:2774 #8 0x0000555556a3e90b in testing::internal::UnitTestImpl::RunAllTests (this=0x5555588b5160) at ../utils/unittest/googletest/src/gtest.cc:4649 #9 0x0000555556a5443a in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (object=0x5555588b5160, method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x555556a3e648 <testing::internal::UnitTestImpl::RunAllTests()>, location=0x555557c0fc60 "auxiliary test code (environments or event listeners)") at ../utils/unittest/googletest/src/gtest.cc:2402 #10 0x0000555556a4ee03 in testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (object=0x5555588b5160, method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x555556a3e648 <testing::internal::UnitTestImpl::RunAllTests()>, location=0x555557c0fc60 "auxiliary test code (environments or event listeners)") at ../utils/unittest/googletest/src/gtest.cc:2455 #11 0x0000555556a3d8d8 in testing::UnitTest::Run (this=0x555558891dc0 <testing::UnitTest::GetInstance()::instance>) at ../utils/unittest/googletest/src/gtest.cc:4257 #12 0x000055555572fd08 in RUN_ALL_TESTS () at ../utils/unittest/googletest/include/gtest/gtest.h:2233 #13 0x000055555572fab9 in main (argc=1, argv=0x7fffffffdb28) at ../unittests/CodeGen/TargetOptionsTest.cpp:75
Revision Contents
Diff 225654 llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
llvm/include/llvm/CodeGen/MachineDominators.h
llvm/include/llvm/CodeGen/MachineLoopInfo.h
llvm/include/llvm/CodeGen/MachineSizeOpts.h
llvm/include/llvm/Transforms/Utils/SizeOpts.h
llvm/lib/CodeGen/CMakeLists.txt
llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
llvm/lib/CodeGen/MachineDominators.cpp
llvm/lib/CodeGen/MachineLoopInfo.cpp
llvm/lib/CodeGen/MachineSizeOpts.cpp
llvm/lib/Transforms/Utils/SizeOpts.cpp
llvm/unittests/CodeGen/CMakeLists.txt
llvm/unittests/CodeGen/MachineSizeOptsTest.cpp
llvm/unittests/Transforms/Utils/CMakeLists.txt
llvm/unittests/Transforms/Utils/SizeOptsTest.cpp
|
Is it possible to expose these APIs publicly in the future ? if yes, maybe put it in llvm:: namespace.