SuccessChanges

Summary

  1. [LiveDebugValues][NFC] Move LiveDebugValues source for refactor (details)
  2. [gn build] Port fba06e3c85a (details)
  3. [clang-tidy] readability-simplify-boolean-expr detects negated literals (details)
  4. [docs] Replace "constexpr expressions" with "constant expressions". (details)
  5. [DAGCombiner] clean up merge of truncated stores; NFC (details)
  6. [InstCombine] canonicalize 'not' ops before logical shifts (details)
  7. Enable constexpr on ROTATELEFT/ROTATERIGHT builtin intrinsics (PR47249) (details)
  8. Enable constexpr on BITREVERSE builtin intrinsics (PR47249) (details)
  9. [LiveDebugValues] Install an implementation-picking LiveDebugValues pass (details)
  10. [gn build] Port 20bb9fe565a (details)
Commit fba06e3c85aa2a5b720379ca74fb796eb4126790 by jeremy.morse
[LiveDebugValues][NFC] Move LiveDebugValues source for refactor

This is a pure file move of LiveDebugValues.cpp ahead of the pass being
refactored, with an experimental new implementation to follow.

The motivation for these changes can be found here:

  http://lists.llvm.org/pipermail/llvm-dev/2020-June/142368.html

And the other related changes can be found in the phabricator stack for
this revision:

Differential Revision: https://reviews.llvm.org/D83304
The file was addedllvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
The file was removedllvm/lib/CodeGen/LiveDebugValues.cpp
The file was modifiedllvm/lib/CodeGen/CMakeLists.txt
Commit cfc76d2bce436dc82cedf7d8719d7493923d5762 by llvmgnsyncbot
[gn build] Port fba06e3c85a
The file was modifiedllvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn
Commit df5335a36d3d70927d1834f31c705e31b4b3701f by n.james93
[clang-tidy] readability-simplify-boolean-expr detects negated literals

Adds support for detecting cases like `if (!true) ...`.
Addresses [[ https://bugs.llvm.org/show_bug.cgi?id=47166 | readability-simplify-boolean-expr not detected for negated boolean literals. ]]

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D86176
The file was modifiedclang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.h
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/readability-simplify-bool-expr.cpp
Commit 436a35a77313598eedad867a0f086aeb1b5b6eb2 by llvm-dev
[docs] Replace "constexpr expressions" with "constant expressions".

Based off comment from @rsmith on D86339
The file was modifiedclang/docs/ReleaseNotes.rst
Commit 2fc7c852018ab0d59101f98a29bab7050596a0f0 by spatel
[DAGCombiner] clean up merge of truncated stores; NFC

This code handles the special-case of i8 stores,
but it could be generalized to deal with other types.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit ec06b381304140b2553cfdfae5a063f39c5c59ff by spatel
[InstCombine] canonicalize 'not' ops before logical shifts

This reverses the existing transform that would uniformly canonicalize any 'xor' after any shift. In the case of logical shifts, that turns a 'not' into an arbitrary 'xor' with constant, and that's probably not as good for analysis, SCEV, or codegen.

The SCEV motivating case is discussed in:
http://bugs.llvm.org/PR47136

There's an analysis motivating case at:
http://bugs.llvm.org/PR38781

I did draft a patch that would do the same for 'ashr' but that's questionable because it's just swapping the position of a 'not' and uncovers at least 2 missing folds that we would probably need to deal with as preliminary steps.

Alive proofs:
https://rise4fun.com/Alive/BBV

  Name: shift right of 'not'
  Pre: C2 == (-1 u>> C1)
  %a = lshr i8 %x, C1
  %r = xor i8 %a, C2
  =>
  %n = xor i8 %x, -1
  %r = lshr i8 %n, C1

  Name: shift left of 'not'
  Pre: C2 == (-1 << C1)
  %a = shl i8 %x, C1
  %r = xor i8 %a, C2
  =>
  %n = xor i8 %x, -1
  %r = shl i8 %n, C1

  Name: ashr of 'not'
  %a = ashr i8 %x, C1
  %r = xor i8 %a, -1
  =>
  %n = xor i8 %x, -1
  %r = ashr i8 %n, C1

Differential Revision: https://reviews.llvm.org/D86243
The file was modifiedllvm/test/Transforms/InstCombine/compare-signs.ll
The file was modifiedllvm/test/Transforms/InstCombine/and-xor-merge.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
The file was modifiedllvm/test/Transforms/InstCombine/xor.ll
The file was modifiedllvm/test/Transforms/InstCombine/2010-11-01-lshr-mask.ll
The file was modifiedllvm/test/Transforms/InstCombine/icmp.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
Commit 2ceac91ec0fc186ff503402e7b88e4576a69008d by llvm-dev
Enable constexpr on ROTATELEFT/ROTATERIGHT builtin intrinsics (PR47249)

This enables us to use the __builtin_rotateleft / __builtin_rotateright 8/16/32/64 intrinsics inside constexpr code.

Differential Revision: https://reviews.llvm.org/D86342
The file was modifiedclang/lib/AST/ExprConstant.cpp
The file was modifiedclang/test/Sema/constant-builtins-2.c
The file was modifiedclang/docs/LanguageExtensions.rst
The file was modifiedclang/docs/ReleaseNotes.rst
Commit e7d9182a666a2a8f903bd330c82d7c623b783371 by llvm-dev
Enable constexpr on BITREVERSE builtin intrinsics (PR47249)

This enables us to use the __builtin_bitreverse 8/16/32/64 intrinsics inside constexpr code.

Differential Revision: https://reviews.llvm.org/D86339
The file was modifiedclang/lib/AST/ExprConstant.cpp
The file was modifiedclang/docs/LanguageExtensions.rst
The file was modifiedclang/test/Sema/constant-builtins-2.c
The file was modifiedclang/docs/ReleaseNotes.rst
Commit 20bb9fe565ab2c70b768d829d42bbbaea2be85cc by jeremy.morse
[LiveDebugValues] Install an implementation-picking LiveDebugValues pass

This patch renames the current LiveDebugValues class to "VarLocBasedLDV"
and removes the pass-registration code from it. It creates a separate
LiveDebugValues class that deals with pass registration and management,
that calls through to VarLocBasedLDV::ExtendRanges when
runOnMachineFunction is called. This is done through the "LDVImpl"
abstract class, so that a future patch can install the new
instruction-referencing LiveDebugValues implementation and have it
picked at runtime.

No functional change is intended, just shuffling responsibilities.

Differential Revision: https://reviews.llvm.org/D83046
The file was modifiedllvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
The file was modifiedllvm/lib/CodeGen/CMakeLists.txt
The file was addedllvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.cpp
The file was addedllvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.h
Commit eeb46367720a56f06ac64fda6f60727ae8a5b5ea by llvmgnsyncbot
[gn build] Port 20bb9fe565a
The file was modifiedllvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn