User Details
- User Since
- Jan 29 2020, 2:38 PM (163 w, 5 d)
Sep 9 2022
This cause a large amount failures in our testing with errors such as:
error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
Jun 22 2022
Reduced TC that fail with -O3 -flto:
int counter = 0;
Apr 21 2022
When compile the following valid testcase:
void foo() { int x = [x](int y[sizeof x]){return sizeof x;}(0); }
It will complain:
error: captured variable 'x' cannot appear here int x = [x](int y[sizeof x]){return sizeof x;}(0); ^
The issue is also described in: https://cplusplus.github.io/CWG/issues/2569.html
Mar 25 2022
LGTM. Thanks!
Feb 1 2022
Looks like linking the following test caused many(57 for now) LoP-LE build failures (first build failure: https://lab.llvm.org/buildbot/#/builders/57/builds/14559):
186.515 [21/53/841] Linking CXX executable unittests/Target/ARM/ARMTests FAILED: unittests/Target/ARM/ARMTests : && /home/buildbots/clang.11.0.0/bin/clang++ --gcc-toolchain=/opt/rh/devtoolset-7/root/usr -fPIC -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,--gc-sections unittests/Target/ARM/CMakeFiles/ARMTests.dir/MachineInstrTest.cpp.o unittests/Target/ARM/CMakeFiles/ARMTests.dir/InstSizes.cpp.o -o unittests/Target/ARM/ARMTests -Wl,-rpath,/home/buildbots/docker-RHEL-buildbot/SetupBot/worker_env/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib lib/libLLVMARMCodeGen.so.14git lib/libLLVMARMDesc.so.14git lib/libLLVMARMInfo.so.14git lib/libLLVMGlobalISel.so.14git lib/libLLVMMIRParser.so.14git lib/libLLVMSelectionDAG.so.14git -lpthread lib/libgtest_main.so.14git lib/libgtest.so.14git -lpthread lib/libLLVMCodeGen.so.14git lib/libLLVMTarget.so.14git lib/libLLVMMC.so.14git lib/libLLVMSupport.so.14git -Wl,-rpath-link,/home/buildbots/docker-RHEL-buildbot/SetupBot/worker_env/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib && : /opt/rh/devtoolset-7/root/usr/lib/gcc/ppc64le-redhat-linux/7/../../../../bin/ld: unittests/Target/ARM/CMakeFiles/ARMTests.dir/InstSizes.cpp.o: undefined reference to symbol '_ZN4llvm10DataLayout5clearEv' /home/buildbots/docker-RHEL-buildbot/SetupBot/worker_env/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/libLLVMCore.so.14git: error adding symbols: DSO missing from command line clang++: error: linker command failed with exit code 1 (use -v to see invocation) 289.769 [21/2/892] Building CXX object tools/clang/unittests/Tooling/CMakeFiles/ToolingTests.dir/SourceCodeTest.cpp.o ninja: build stopped: subcommand failed. program finished with exit code 1 elapsedTime=424.974897
Sep 1 2020
Rebase to the latest master.
Aug 28 2020
Address review comments.
Aug 26 2020
Aug 21 2020
Aug 20 2020
Address review comments.
Aug 17 2020
Aug 13 2020
Remove SLP comments.
Aug 12 2020
Currently there is no SLP involved, and this patch can still give a significant performance improvement for the benchmark.
Jul 8 2020
Thanks! Will keep eyes on it in the future.
Jul 7 2020
deleted: llvm/test/Transforms/PhaseOrdering/interleave_LV_SLP.ll
deleted: llvm/test/Transforms/PhaseOrdering/interleave_LV_SLP_false.ll
deleted: llvm/test/Transforms/SLPVectorizer/PowerPC/interleave_SLP.ll
In that case, best understand why LV's cost model claims vectorizing the loop is not profitable, which you and SLP know it is; and ideally fix LV's cost model.
A crash due to forced vectorization sounds like a bug, which best be reported and/or fixed.
If cases with concrete "obstacles" are identified preventing LV from vectorizing a loop but allowing SLP to vectorize (part of) it, after LV interleaves the loop, such obstacles could potentially be used to (further) drive LV to interleave the loop.
Agree, ideally LV's cost model and its vectorization functionality should be improved in the future to be able to vectorize a lot more instructions.
We see some applications keep being crashed, due to some changes in LV and probably being fixed later on, or because of its own weakness in some aspects.
But all the above are beyond of this patch.
Currently, LV and SLP complement each other, and there are cases that LV fails to vectorize (functionally not being able to do it) but SLP succeed.
Hence the term "small loop" should be more specific; as in "vectorizer-min-trip-count" / "TinyTripCountVectorThreshold".
The "small or tiny" values are relative, and will keep on changing. In the situations we see, it is even more dynamic, the exact trip count is not known, but we know that it is relatively small.
In the application we try, LV refuse to vectorize due to not profitable, but if we force LV to vectorize and it will crash. Apparently there are some obstacles. There are cases that even if LV fails, SLP could succeed.
Yes, the term small loop is a little bit of confusing. For example a loop which has a small number of instructions but has a huge loop trip count, is the loop small or big? In our example, the loop trip count is small, and also the instruction number is small.
Jun 30 2020
Update testcases.
In this patch we "Interleave to expose ILP". The whole purpose of this patch is to "expose ILP", and the approach is to "Interleave".
- I worry about that if we remove those testcases, no vectorization(parallelism) results due to this patch can be seen, and people will have no idea where do we "expose ILP"?
- We have ever discussed that what @spatel suggested adding two testcases under PhaseOrdering to show the baseline results with the option in this patch on and off "do make sense".
- The purpose of adding lit tests is to catch future regressions, i.e., if someone make the vectorization not working, we will catch it with the testcases we added.
Jun 26 2020
Currently all four testcases serve different purposes, and we can clearly see their differences:
- PhaseOrdering/interleave_LV_SLP_false.ll gives the baseline result, which shows that with the option in this patch off, instructions are not being vectorized.
- PhaseOrdering/interleave_LV_SLP.ll also gives the baseline result, which shows that with the option in this patch on, instructions are being vectorized. But which vectorizer make it work? We cannot tell.
- Vectorize/LoopVectorize.cpp tells us that LV cannot vectorize the code, but interleave the instructions to expose ILP.
- SLPVectorizer/PowerPC/interleave_SLP.ll demonstrates that after interleaving by LV, then SLP captures the opportunities and vectorize the instructions.
Update three testcases, and add one more testcase to this patch.
Jun 24 2020
Jun 23 2020
Jun 22 2020
Ping...
Jun 17 2020
Add llvm/test/Transforms/PhaseOrdering/interleave_LV_SLP.ll
Jun 16 2020
We use PhaseOrdering tests to ensure that the end result of >1 IR pass (usually the entire pipeline of -O* settings) produces the expected result. That may be stretching the meaning of PhaseOrdering, but that would be less fragile than the stand-alone SLP test. This patch isn't changing anything in SLP, so the test you are adding to SLP is independent of this patch, right?
Update comments to address code review.
Add comments to address code review.
Jun 15 2020
Ping...
Jun 10 2020
Jun 9 2020
I test it on PowerPC, I request it to be tested by the community on different platform. Currently it is disabled by default, and will enable it in the next step.
Accidentally removed the message that I posted above. Re-post here: basically what I want say is to request reviewers for this patch to review another patch D81416 that touch the same file. Thanks!
Jun 8 2020
Can you add a hidden option with init false? You can turn it true later on.
So that people can try with your option off and on? Thanks!
A little bit of format change.