SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. [clang-tidy] Update lang restrictions on perf module (details)
  2. [InstCombine] Add tests for assume implication (NFC) (details)
  3. [NFC][PowerPC] Add run lines to test DivRemPairsPass. (details)
  4. [x86] add tests for rsqrt opportunities; NFC (details)
  5. [VectorCombine] add test for scalable vectors; NFC (details)
  6. Revert "[VectorCombine] add test for scalable vectors; NFC" (details)
  7. [VectorCombine] add test for scalable vectors; NFC (details)
  8. [Coroutines] Optimize the lifespan of temporary co_await object (details)
  9. [NFC][ScalarEvolution] Add a test showing SCEV failure to recognize 'urem' (details)
  10. [libc] This commit fixes the strcmp fuzzing test. It uses a single input and (details)
  11. [X86] Explicitly add popcnt feature to Intel CPUs with SSE4.2 in the frontend. (details)
  12. [SimplifyCFG] Regenerate test checks (NFC) (details)
  13. [SimplifyCFG] Make test more robust (NFC) (details)
  14. [NFC] CallGraph related cleanup (details)
  15. [Clang][OpenMP][OMPBuilder] Moving OMP allocation and cache creation code to OMPBuilderCBHelpers (details)
  16. Revert "[clang-tidy] Reworked enum options handling(again)" (details)
Commit bfd99be0fc58fe644aff76d180b333e6d840126a by n.james93
[clang-tidy] Update lang restrictions on perf module
The file was modifiedclang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h
The file was modifiedclang-tools-extra/clang-tidy/performance/FasterStringFindCheck.h
The file was modifiedclang-tools-extra/clang-tidy/performance/ForRangeCopyCheck.h
The file was modifiedclang-tools-extra/clang-tidy/performance/ImplicitConversionInLoopCheck.h
The file was modifiedclang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.h
The file was modifiedclang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp
Commit 8758e14c6f12777b6c6beee0680824cdf3b2f9e4 by nikita.ppv
[InstCombine] Add tests for assume implication (NFC)
The file was addedllvm/test/Transforms/InstCombine/assume_icmp.ll
Commit 2b325f69cac9979ec2fba1393e3e10541e144afa by esme.yi
[NFC][PowerPC] Add run lines to test DivRemPairsPass.
The file was modifiedllvm/test/CodeGen/PowerPC/ppc64-P9-mod.ll
Commit af01642424105d1182e8eaf2eeb94e34ffbd5305 by spatel
[x86] add tests for rsqrt opportunities; NFC
The file was modifiedllvm/test/CodeGen/X86/sqrt-fastmath.ll
Commit 700ec6b848c02ca3de9751d63a7a5a26671c3fe9 by spatel
[VectorCombine] add test for scalable vectors; NFC
The file was modifiedllvm/test/Transforms/VectorCombine/X86/extract-cmp-binop.ll
The file was modifiedllvm/test/Transforms/PhaseOrdering/X86/vector-reductions.ll
Commit 2f3549f8136dbeef1bfaeeb113932161eaf1692a by spatel
Revert "[VectorCombine] add test for scalable vectors; NFC"

This reverts commit 700ec6b848c02ca3de9751d63a7a5a26671c3fe9.
An extra test diff snuck here.
The file was modifiedllvm/test/Transforms/VectorCombine/X86/extract-cmp-binop.ll
The file was modifiedllvm/test/Transforms/PhaseOrdering/X86/vector-reductions.ll
Commit 931411136af6061a7a48553344ff750d2a362d68 by spatel
[VectorCombine] add test for scalable vectors; NFC
The file was modifiedllvm/test/Transforms/VectorCombine/X86/extract-cmp-binop.ll
Commit c8755b6378c2a1f32d9a90bad6c56a1cc5a830c3 by xun
[Coroutines] Optimize the lifespan of temporary co_await object

Summary:
If we ever assign co_await to a temporary variable, such as foo(co_await expr),
we generate AST that looks like this: MaterializedTemporaryExpr(CoawaitExpr(...)).
MaterializedTemporaryExpr would emit an intrinsics that marks the lifetime start of the
temporary storage. However such temporary storage will not be used until co_await is ready
to write the result. Marking the lifetime start way too early causes extra storage to be
put in the coroutine frame instead of the stack.
As you can see from https://godbolt.org/z/zVx_eB, the frame generated for get_big_object2 is 12K, which contains a big_object object unnecessarily.
After this patch, the frame size for get_big_object2 is now only 8K. There are still room for improvements, in particular, GCC has a 4K frame for this function. But that's a separate problem and not addressed in this patch.

The basic idea of this patch is during CoroSplit, look for every local variable in the coroutine created through AllocaInst, identify all the lifetime start/end markers and the use of the variables, and sink the lifetime.start maker to the places as close to the first-ever use as possible.

Reviewers: lewissbaker, modocache, junparser

Reviewed By: junparser

Subscribers: hiraditya, llvm-commits, rsmith, ChuanqiXu, cfe-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D82314
The file was modifiedllvm/lib/Transforms/Coroutines/CoroSplit.cpp
The file was modifiedllvm/test/Transforms/Coroutines/coro-split-02.ll
The file was addedllvm/test/Transforms/Coroutines/coro-split-sink-lifetime.ll
Commit 25521150d7b577f6f1b402826f2afbb0ec5fb59b by lebedev.ri
[NFC][ScalarEvolution] Add a test showing SCEV failure to recognize 'urem'

While InstCombine trivially converts that `srem` into a `urem`,
it might happen later than wanted. SCEV should recognize this natively.
The file was addedllvm/test/Analysis/ScalarEvolution/srem.ll
Commit b07feef8736d52e11c41631d3813a57a3b3ce6e5 by gyurgyikcp
[libc] This commit fixes the strcmp fuzzing test. It uses a single input and
splits it into two by using the value of the first byte to determine the
length of the first string. Reviewed-by: PaulkaToast, Differential
Revision: https://reviews.llvm.org/D82427

Summary:
[libc] Since only one input is given, it is necessary to split the string into two containers so that they can be compared for the purposes of this fuzz test. This is done in the following manner:

1. Take the value of the first byte; this is size1. (Credits to @PaulkaToast for this idea).
2. size2 is the value of size - size1.
3. Copy the characters to new containers, data1 and data2 with corresponding sizes.
4. Add a null terminator to the first container, and verify the second container has a null terminator.
5. Verify output of strcmp.

A simpler alternative considered was simply splitting the input data into two, but this means the two strings are always within +- 1 character of each other. This above implementation avoids this.

ninja check-libc was run; no issues.

Reviewers: PaulkaToast, sivachandra

Reviewed By: PaulkaToast

Subscribers: mgorny, tschuett, ecnelises, libc-commits, PaulkaToast

Tags: #libc-project

Differential Revision: https://reviews.llvm.org/D82427
The file was modifiedlibc/fuzzing/string/CMakeLists.txt
The file was modifiedlibc/fuzzing/string/strcmp_fuzz.cpp
Commit 20a60f46f505fc790e126b8b860c689870355f36 by craig.topper
[X86] Explicitly add popcnt feature to Intel CPUs with SSE4.2 in the frontend.

Previously we inferred it if sse4.2 ended up being enabled after
all feature processing. But writing -march=nehalem -mno-sse4.2
should have popcnt enabled.
The file was modifiedclang/lib/Basic/Targets/X86.cpp
The file was modifiedclang/test/Preprocessor/x86_target_features.c
Commit d5a482acf9904ff13e71ab5bad686dc7f93cfbf8 by nikita.ppv
[SimplifyCFG] Regenerate test checks (NFC)
The file was modifiedllvm/test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/wc-widen-block.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/duplicate-landingpad.ll
Commit a28d38a6bca1726d56c9b373f4c7dc5264fc7716 by nikita.ppv
[SimplifyCFG] Make test more robust (NFC)

Avoid changing this test if blocks get merged.
The file was modifiedllvm/test/Transforms/SimplifyCFG/switch-dead-default.ll
Commit 1becd298b82ed2f1a8ba5e61c5ad2ce7fe32d812 by serguei.n.dmitriev
[NFC] CallGraph related cleanup

Summary: Tidy up some CallGraph-related code in preparation for D82572.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82686
The file was modifiedllvm/lib/Transforms/IPO/SyntheticCountsPropagation.cpp
The file was modifiedllvm/lib/Analysis/CallGraphSCCPass.cpp
The file was modifiedllvm/include/llvm/Analysis/CallGraph.h
Commit 80e15b4574f4a11792472249f64bac790145cc56 by fghanim84
[Clang][OpenMP][OMPBuilder] Moving OMP allocation and cache creation code to OMPBuilderCBHelpers

Summary:
Modified the OMPBuilderCBHelpers in the following ways:
- Moved location of class definition and deleted all constructors
- Moved OpenMP-specific address allocation of local variables
- Moved threadprivate variable creation for the current thread

Reviewers: jdoerfert

Subscribers: yaxunl, guansong, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D79676
The file was modifiedclang/lib/CodeGen/CGStmtOpenMP.cpp
The file was modifiedclang/lib/CodeGen/CodeGenFunction.h
The file was modifiedclang/lib/CodeGen/CGExpr.cpp
The file was modifiedclang/lib/CodeGen/CGDecl.cpp
Commit 8f73c4432b5fa8510c99a5053c07dc70a610e1fb by thakis
Revert "[clang-tidy] Reworked enum options handling(again)"

This reverts commit b9306fd042ce1c11d84f05d2124dfdc65b8331fe
and follow-up 42a51587c79a673045aec3586f4070630e5e7af3.

It seems to build check-clang-tools on macOS, see comments on
https://reviews.llvm.org/D82188
The file was modifiedclang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/ClangTidyCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp
The file was modifiedclang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp
The file was modifiedclang-tools-extra/clang-tidy/utils/IncludeSorter.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h
The file was modifiedclang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/ClangTidyCheck.h
The file was modifiedclang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/utils/IncludeSorter.h