[all-commits] [llvm/llvm-project] 22e434: [ValueTracking] Add tracking of the alignment assu...

Alexander Richardson via All-commits all-commits at lists.llvm.org
Tue Oct 27 05:17:53 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 22e4346e054a4474a68fd293324db295fffed34c
      https://github.com/llvm/llvm-project/commit/22e4346e054a4474a68fd293324db295fffed34c
  Author: Shimin Cui <scui at ca.ibm.com>
  Date:   2020-10-27 (Tue, 27 Oct 2020)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/Analysis/BasicAA/featuretest.ll
    M llvm/test/Analysis/ValueTracking/assume-queries-counter.ll
    A llvm/test/Transforms/InstCombine/assume-align.ll

  Log Message:
  -----------
  [ValueTracking] Add tracking of the alignment assume bundle

This patch is to add the support of the value tracking of the alignment assume bundle.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D88669


  Commit: 565f4e72dafa0abd250e0435e2bb62cdd91c908f
      https://github.com/llvm/llvm-project/commit/565f4e72dafa0abd250e0435e2bb62cdd91c908f
  Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
  Date:   2020-10-27 (Tue, 27 Oct 2020)

  Changed paths:
    M llvm/unittests/Analysis/ValueTrackingTest.cpp

  Log Message:
  -----------
  [ValueTracking] Add more tests for alignment assume bundles

I noticed that alignment was no longer inferred as well after I last merged
our CHERI fork from upstream. I opened this review before seeing that D88669
already fixes the same problem, so this commit simply adds the new test that
I added as part of this change.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D89830


  Commit: d323c8f791ac1160813508f1742f845444b6459a
      https://github.com/llvm/llvm-project/commit/d323c8f791ac1160813508f1742f845444b6459a
  Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
  Date:   2020-10-27 (Tue, 27 Oct 2020)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp

  Log Message:
  -----------
  [ValueTracking][NFC] Use Log2(Align) instead of countTrailingZeroes

The latter can probably be optimized to the same final code, but this might
help -O0 builds.


  Commit: 850325348ae82cd5e26ea9edfd04219d0fbe7828
      https://github.com/llvm/llvm-project/commit/850325348ae82cd5e26ea9edfd04219d0fbe7828
  Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
  Date:   2020-10-27 (Tue, 27 Oct 2020)

  Changed paths:
    M clang/lib/Format/TokenAnnotator.cpp
    M clang/unittests/Format/CMakeLists.txt
    M clang/unittests/Format/FormatTest.cpp
    M clang/unittests/Format/TestLexer.h
    A clang/unittests/Format/TokenAnnotatorTest.cpp

  Log Message:
  -----------
  [clang-format] Fix misformatted macro definitions after D86959

After D86959 the code `#define lambda [](const decltype(x) &ptr) {}`
was formatted as `#define lambda [](const decltype(x) & ptr) {}` due to
now parsing the '&' token as a BinaryOperator. The problem was caused by
the condition `Line.InPPDirective && (!Left->Previous || !Left->Previous->is(tok::identifier))) {`
being matched and therefore not performing the checks for "previous token
is one of decltype/_Atomic/etc.". This patch moves those checks after the
existing if/else chain to ensure the left-parent token classification is
always run after checking whether the contents of the parens is an
expression or not.

This change also introduces a new TokenAnnotatorTest that checks the
token kind and Role of Tokens after analyzing them. This is used to check
for TT_PointerOrReference, in addition to indirectly testing this based
on the resulting formatting.

Reviewed By: MyDeveloperDay

Differential Revision: https://reviews.llvm.org/D88956


  Commit: 89031cffd1de0ce70106cda1bf5188f7a11726a2
      https://github.com/llvm/llvm-project/commit/89031cffd1de0ce70106cda1bf5188f7a11726a2
  Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
  Date:   2020-10-27 (Tue, 27 Oct 2020)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/scripts/sancov.py

  Log Message:
  -----------
  Fix sancov.py when objdump is llvm-objdump

The sanitizer-coverage.cpp test case was always failing for me. It turns
out the reason for this is that I was building with
-DLLVM_INSTALL_BINUTILS_SYMLINKS=ON and sancov.py's grep regex does not
handle llvm-objdump's disassembly format (hex immediates have a leading "0x").
While touching those lines also change them to use raw string literals since
invalid escape sequnces will become an error in future python versions.
Also simplify the code by using subprocess.check_output() instead of Popen().
This also works with python2.

Fixes https://bugs.llvm.org/show_bug.cgi?id=44504

Reviewed By: #sanitizers, vitalybuka

Differential Revision: https://reviews.llvm.org/D89648


Compare: https://github.com/llvm/llvm-project/compare/673f2f702b03...89031cffd1de


More information about the All-commits mailing list