SuccessChanges

Summary

  1. [NFC][ARM] Comments and lambdas (details)
  2. Recommit "[SCCP] Do not replace deref'able ptr with un-deref'able one." (details)
  3. Revert "Recommit "[SCCP] Do not replace deref'able ptr with un-deref'able one."" (details)
  4. [IsKnownNonZero] Handle the case with non-constant phi nodes (details)
  5. Revert "OpaquePtr: Add type to sret attribute" (details)
  6. [SCEV][NFC] Introduce isBasicBlockEntryGuardedByCond (details)
Commit 4c19b89b2587f321e1014a9855973c08a822b908 by sam.parker
[NFC][ARM] Comments and lambdas

Add some comments in LowOverheadLoops and make some lambda variables
explicit arguments instead of capturing.
The file was modifiedllvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
Commit 86a20d9e34f5a9989da72097f23f3b0a44157e73 by flo
Recommit "[SCCP] Do not replace deref'able ptr with un-deref'able one."

This version includes an small fix allowing function pointers to be
unconditionally replaced for now.

This reverts commit 4c5e4aa89b11ec3253258b8df5125833773d1b1e.
The file was modifiedllvm/lib/Transforms/Scalar/SCCP.cpp
The file was modifiedllvm/test/Transforms/SCCP/apint-bigint2.ll
The file was modifiedllvm/test/Transforms/SCCP/replace-dereferenceable-ptr-with-undereferenceable.ll
The file was modifiedllvm/lib/Analysis/Loads.cpp
The file was modifiedllvm/test/Transforms/SCCP/indirectbr.ll
Commit b76df593eb660d1e4c9f1384a75b404ee5bcd06f by flo
Revert "Recommit "[SCCP] Do not replace deref'able ptr with un-deref'able one.""

Looks like there is still another remaining issue:

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-msan/builds/22273/steps/build%20libcxx%2Fmsan/logs/stdio

This reverts commit 86a20d9e34f5a9989da72097f23f3b0a44157e73.
The file was modifiedllvm/lib/Analysis/Loads.cpp
The file was modifiedllvm/lib/Transforms/Scalar/SCCP.cpp
The file was modifiedllvm/test/Transforms/SCCP/indirectbr.ll
The file was modifiedllvm/test/Transforms/SCCP/replace-dereferenceable-ptr-with-undereferenceable.ll
The file was modifiedllvm/test/Transforms/SCCP/apint-bigint2.ll
Commit 297ec611304663931be52e6118d9f135ceb8a027 by serguei.katkov
[IsKnownNonZero] Handle the case with non-constant phi nodes

Handle the case when all inputs of phi are proven to be non zero.

Constants are checked in beginning of this method before check for depth of recursion,
so it is a partial case of non-constant phi.

Recursion depth is already handled by the function.

Reviewers: aqjune, nikic, efriedma
Reviewed By: nikic
Subscribers: dantrushin, hiraditya, jdoerfert, llvm-commits
Differential Revision: https://reviews.llvm.org/D88276
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
The file was modifiedllvm/test/Transforms/InstCombine/phi.ll
Commit eb9f7c28e5fe6d75fed3587023e17f2997c8024b by tpopp
Revert "OpaquePtr: Add type to sret attribute"

This reverts commit 55c4ff91bd820d72014f63dcf7f3d5a0d3397986.

Issues were introduced as discussed in https://reviews.llvm.org/D88241
where this change made previous bugs in the linker and BitCodeWriter
visible.
The file was modifiedclang/test/CodeGen/riscv64-lp64d-abi.c
The file was modifiedclang/test/CodeGen/systemz-abi-vector.c
The file was modifiedclang/test/CodeGen/arm64_32.c
The file was modifiedclang/test/CodeGenCXX/thunks.cpp
The file was modifiedllvm/docs/ReleaseNotes.rst
The file was modifiedclang/test/CodeGen/aligned-sret.c
The file was modifiedclang/test/CodeGen/blocks.c
The file was modifiedclang/test/CodeGen/c11atomics-ios.c
The file was modifiedclang/test/CodeGen/X86/x86_64-arguments-nacl.c
The file was modifiedclang/test/CodeGenCXX/conditional-gnu-ext.cpp
The file was modifiedllvm/lib/Bitcode/Reader/BitcodeReader.cpp
The file was modifiedclang/test/CodeGenObjC/weak-in-c-struct.m
The file was modifiedllvm/test/Bitcode/attributes-3.3.ll
The file was modifiedclang/test/CodeGen/riscv64-lp64-lp64f-lp64d-abi.c
The file was modifiedclang/test/CodeGenCXX/call-with-static-chain.cpp
The file was modifiedllvm/lib/AsmParser/LLParser.h
The file was modifiedclang/test/CodeGen/X86/x86_32-arguments-darwin.c
The file was modifiedclang/test/CodeGenOpenCLCXX/addrspace-of-this.cl
The file was modifiedclang/test/CodeGen/wasm-varargs.c
The file was modifiedclang/test/CodeGenCXX/matrix-type-builtins.cpp
The file was modifiedllvm/lib/AsmParser/LLParser.cpp
The file was modifiedllvm/test/Bitcode/compatibility-3.6.ll
The file was modifiedclang/test/CodeGen/arm-vector-arguments.c
The file was modifiedllvm/test/Bitcode/compatibility-3.9.ll
The file was modifiedclang/test/CodeGen/aarch64-varargs.c
The file was modifiedclang/test/CodeGenCXX/cxx1z-copy-omission.cpp
The file was modifiedclang/test/CodeGen/aggregate-assign-call.c
The file was modifiedllvm/test/Bitcode/compatibility-6.0.ll
The file was modifiedclang/test/CodeGen/ppc32-and-aix-struct-return.c
The file was modifiedclang/test/CodeGen/windows-swiftcall.c
The file was modifiedclang/test/CodeGen/mips-zero-sized-struct.c
The file was modifiedclang/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl
The file was modifiedclang/test/CodeGen/ppc64le-f128Aggregates.c
The file was modifiedclang/test/CodeGenCXX/x86_32-arguments.cpp
The file was modifiedclang/test/CodeGen/arm-neon-vld.c
The file was modifiedclang/test/CodeGenCXX/cxx1z-lambda-star-this.cpp
The file was modifiedclang/test/CodeGenCXX/microsoft-abi-cdecl-method-sret.cpp
The file was modifiedclang/test/CodeGen/X86/x86_64-arguments-win32.c
The file was modifiedclang/test/CodeGen/riscv32-ilp32-abi.c
The file was modifiedclang/test/CodeGen/riscv64-lp64-lp64f-abi.c
The file was modifiedclang/test/CodeGen/arm-varargs.c
The file was modifiedclang/test/CodeGen/arm-vfp16-arguments.c
The file was modifiedllvm/test/Transforms/Attributor/ArgumentPromotion/sret.ll
The file was modifiedclang/test/CodeGen/ms_abi.c
The file was modifiedclang/test/CodeGen/riscv32-ilp32d-abi.c
The file was modifiedclang/lib/CodeGen/CGCall.cpp
The file was modifiedclang/test/CodeGen/64bit-swiftcall.c
The file was modifiedclang/test/CodeGenCXX/stack-reuse-miscompile.cpp
The file was modifiedclang/test/CodeGen/arm64-arguments.c
The file was modifiedclang/test/CodeGenCXX/regcall.cpp
The file was modifiedclang/test/CodeGen/mips64-padding-arg.c
The file was modifiedclang/test/Modules/templates.mm
The file was modifiedclang/test/CodeGen/riscv32-ilp32f-abi.c
The file was modifiedclang/test/CodeGenOpenCL/addr-space-struct-arg.cl
The file was modifiedclang/test/CodeGen/systemz-inline-asm.c
The file was modifiedclang/test/CodeGenCXX/microsoft-abi-vmemptr-conflicts.cpp
The file was modifiedclang/test/CodeGenCXX/x86_64-arguments.cpp
The file was modifiedclang/test/CodeGen/c11atomics.c
The file was modifiedclang/test/CodeGenCXX/homogeneous-aggregates.cpp
The file was modifiedllvm/test/Bitcode/compatibility-3.7.ll
The file was modifiedclang/test/CodeGen/renderscript.c
The file was modifiedllvm/test/Bitcode/compatibility-5.0.ll
The file was modifiedclang/test/CodeGen/arm-swiftcall.c
The file was modifiedclang/test/CodeGenCXX/unknown-anytype.cpp
The file was modifiedclang/test/CodeGenCXX/lambda-expressions.cpp
The file was modifiedclang/test/CodeGenCXX/temporaries.cpp
The file was modifiedclang/test/CodeGen/ppc64-align-struct.c
The file was modifiedclang/test/CodeGen/systemz-abi.cpp
The file was modifiedclang/test/CodeGen/ppc64-vector.c
The file was modifiedclang/test/CodeGen/systemz-abi.c
The file was modifiedclang/test/CodeGen/powerpc-c99complex.c
The file was modifiedllvm/lib/IR/Attributes.cpp
The file was modifiedllvm/test/Bitcode/compatibility.ll
The file was modifiedclang/test/CodeGen/le32-arguments.c
The file was modifiedclang/test/CodeGen/riscv32-ilp32f-ilp32d-abi.c
The file was modifiedclang/test/CodeGenCXX/builtin-source-location.cpp
The file was modifiedclang/test/CodeGen/ppc64-soft-float.c
The file was modifiedclang/test/CodeGenObjC/stret-1.m
The file was modifiedclang/test/CodeGen/arm-homogenous.c
The file was modifiedllvm/test/Bitcode/highLevelStructure.3.2.ll
The file was modifiedclang/test/CodeGen/windows-struct-abi.c
The file was modifiedclang/test/CodeGen/arc/arguments.c
The file was modifiedllvm/test/Verifier/byref.ll
The file was modifiedclang/test/CodeGenCXX/microsoft-abi-byval-thunks.cpp
The file was modifiedclang/test/CodeGen/arm-aapcs-vfp.c
The file was modifiedclang/test/CodeGen/riscv32-ilp32-ilp32f-ilp32d-abi.c
The file was modifiedllvm/include/llvm/IR/Function.h
The file was modifiedclang/test/CodeGen/arm64-microsoft-arguments.cpp
The file was modifiedclang/test/CodeGen/ppc-aggregate-abi.cpp
The file was modifiedclang/test/CodeGen/ppc64-qpx-vector.c
The file was modifiedclang/test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp
The file was modifiedclang/test/CodeGen/lanai-arguments.c
The file was modifiedclang/test/CodeGen/ppc64le-aggregates.c
The file was modifiedclang/test/CodeGenObjC/direct-method.m
The file was modifiedclang/test/CodeGenObjC/nontrivial-c-struct-exception.m
The file was modifiedclang/test/CodeGenObjC/stret_lookup.m
The file was modifiedclang/test/CodeGen/2006-05-19-SingleEltReturn.c
The file was modifiedllvm/include/llvm/IR/Attributes.td
The file was modifiedclang/test/CodeGen/X86/x86_32-arguments-iamcu.c
The file was modifiedllvm/docs/LangRef.rst
The file was modifiedllvm/lib/IR/AsmWriter.cpp
The file was modifiedclang/test/CodeGen/riscv64-lp64-abi.c
The file was modifiedclang/test/CodeGen/arm-vfp16-arguments2.cpp
The file was modifiedllvm/test/Bitcode/compatibility-3.8.ll
The file was modifiedclang/test/CodeGen/struct-passing.c
The file was modifiedclang/test/CodeGenCXX/exceptions.cpp
The file was modifiedclang/test/CodeGenCXX/stack-reuse.cpp
The file was modifiedllvm/test/Bitcode/compatibility-4.0.ll
The file was modifiedclang/test/CodeGenCoroutines/coro-await.cpp
The file was modifiedclang/test/CodeGenCXX/pass-by-value-noalias.cpp
The file was modifiedclang/test/CodeGenCXX/thiscall-struct-return.cpp
The file was modifiedclang/test/CodeGen/X86/x86_64-arguments.c
The file was modifiedclang/test/CodeGenCXX/microsoft-abi-byval-sret.cpp
The file was modifiedclang/test/CodeGenCXX/microsoft-abi-unknown-arch.cpp
The file was modifiedclang/test/CodeGenCXX/trivial_abi.cpp
The file was modifiedclang/test/CodeGen/mingw-long-double.c
The file was modifiedllvm/test/Bitcode/attributes.ll
The file was modifiedclang/test/CodeGenObjC/arc.m
The file was modifiedclang/test/CodeGen/riscv32-ilp32-ilp32f-abi.c
The file was modifiedclang/test/CodeGen/sparcv9-abi.c
The file was modifiedclang/test/CodeGenObjC/objc-non-trivial-struct-nrvo.m
The file was removedllvm/test/Assembler/sret-type-attr.ll
The file was modifiedclang/test/CodeGen/regparm-struct.c
The file was modifiedclang/test/CodeGen/vectorcall.c
The file was modifiedclang/test/CodeGenCoroutines/coro-gro-nrvo.cpp
The file was modifiedclang/test/CodeGenCXX/thunk-returning-memptr.cpp
The file was modifiedclang/test/CodeGen/arm_neon_intrinsics.c
The file was modifiedclang/test/CodeGenCXX/wasm-args-returns.cpp
The file was modifiedllvm/lib/IR/AttributeImpl.h
The file was modifiedclang/test/CodeGenCXX/arm-cc.cpp
The file was modifiedclang/test/CodeGen/mcu-struct-return.c
The file was modifiedllvm/include/llvm/IR/Attributes.h
The file was modifiedclang/test/CodeGen/wasm-arguments.c
The file was modifiedclang/test/CodeGenCXX/matrix-type.cpp
The file was modifiedclang/test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp
The file was modifiedclang/test/CodeGenObjCXX/objc-struct-cxx-abi.mm
The file was modifiedllvm/test/Transforms/Attributor/value-simplify.ll
The file was modifiedclang/test/CodeGen/ppc64-elf-abi.c
Commit 9100bd772d4ff153fd2d5cb13034f4ed8ea2d477 by mkazantsev
[SCEV][NFC] Introduce isBasicBlockEntryGuardedByCond

Currently, we have `isLoopEntryGuardedByCond` method in SCEV, which
checks that some fact is true if we enter the loop. In fact, this is just a
particular case of more general concept `isBasicBlockEntryGuardedByCond`
applied to given loop's header. In fact, the logic if this code is largely
independent on the given loop and only cares code above it.

This patch makes this generalization. Now we can query it for any block,
and `isBasicBlockEntryGuardedByCond` is just a particular case.

Differential Revision: https://reviews.llvm.org/D87828
Reviewed By: fhahn
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp