SuccessChanges

Summary

  1. [Sema] Suppress -Wformat diagnostics for bool types when printed using %hhd Also, add a diagnostic under -Wformat for printing a boolean value as a character. rdar://54579473 Differential revision: https://reviews.llvm.org/D66856
  2. [clang-format][PR41964] Fix crash with SIGFPE when TabWidth is set to 0 and line starts with tab Summary: clang-format 8.0 crashes with SIGFPE (floating point exception) when formatting following file: app.cpp: void a() { //line starts with '\t' } $ clang-format -style='{TabWidth: 0}' app.cpp Reviewers: owenpan, klimek, russellmcc, timwoj Reviewed By: klimek Subscribers: cfe-commits Tags: #clang-tools-extra, #clang Differential Revision: https://reviews.llvm.org/D67670
  3. [InstCombine] dropRedundantMaskingOfLeftShiftInput(): some cleanup before upcoming patch
  4. [NFC][InstCombine] More tests for PR42563 "Dropping pointless masking before left shift" For patterns c/d/e we too can deal with the pattern even if we can't just drop the mask, we can just apply it afterwars: https://rise4fun.com/Alive/gslRa
  5. Fix compile-time regression caused by rL371928 Summary: Also fixup rL371928 for cases that occur on our out-of-tree backend There were still quite a few intermediate APInts and this caused the compile time of MCCodeEmitter for our target to jump from 16s up to ~5m40s. This patch, brings it back down to ~17s by eliminating pretty much all of them using two new APInt functions (extractBitsAsZExtValue(), insertBits() but with a uint64_t). The exact conditions for eliminating them is that the field extracted/inserted must be <=64-bit which is almost always true. Note: The two new APInt API's assume that APInt::WordSize is at least 64-bit because that means they touch at most 2 APInt words. They statically assert that's true. It seems very unlikely that someone is patching it to be smaller so this should be fine. Reviewers: jmolloy Reviewed By: jmolloy Subscribers: hiraditya, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67686
  6. Revert "Revert "Implement std::condition_variable via pthread_cond_clockwait() where available"" With the fix for non-Linux. This reverts commit c1c519d2f1a66dd2eeaa4c321d8d7b50f623eb71.
  7. [DDG] Break a cyclic dependency from Analysis to ScalarOpts
Revision 372247 by epilk:
[Sema] Suppress -Wformat diagnostics for bool types when printed using %hhd

Also, add a diagnostic under -Wformat for printing a boolean value as a
character.

rdar://54579473

Differential revision: https://reviews.llvm.org/D66856
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (diff)clang.src/include/clang/Basic/DiagnosticSemaKinds.td
The file was modified/cfe/trunk/lib/AST/FormatString.cpp (diff)clang.src/lib/AST/FormatString.cpp
The file was modified/cfe/trunk/lib/Sema/SemaChecking.cpp (diff)clang.src/lib/Sema/SemaChecking.cpp
The file was added/cfe/trunk/test/Sema/format-bool.cclang.src/test/Sema/format-bool.c
Revision 372246 by paulhoad:
[clang-format][PR41964] Fix crash with SIGFPE when TabWidth is set to 0 and line starts with tab

Summary:
clang-format 8.0 crashes with SIGFPE (floating point exception) when formatting following file:
app.cpp:
void a() {
//line starts with '\t'
}

$ clang-format -style='{TabWidth: 0}' app.cpp

Reviewers: owenpan, klimek, russellmcc, timwoj

Reviewed By: klimek

Subscribers: cfe-commits

Tags: #clang-tools-extra, #clang

Differential Revision: https://reviews.llvm.org/D67670
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Format/Encoding.h (diff)clang.src/lib/Format/Encoding.h
The file was modified/cfe/trunk/lib/Format/FormatTokenLexer.cpp (diff)clang.src/lib/Format/FormatTokenLexer.cpp
The file was modified/cfe/trunk/lib/Format/WhitespaceManager.cpp (diff)clang.src/lib/Format/WhitespaceManager.cpp
The file was modified/cfe/trunk/unittests/Format/FormatTest.cpp (diff)clang.src/unittests/Format/FormatTest.cpp
Revision 372245 by lebedevri:
[InstCombine] dropRedundantMaskingOfLeftShiftInput(): some cleanup before upcoming patch
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/InstCombine/InstCombineShifts.cpp (diff)llvm.src/lib/Transforms/InstCombine/InstCombineShifts.cpp
Revision 372244 by lebedevri:
[NFC][InstCombine] More tests for PR42563 "Dropping pointless masking before left shift"

For patterns c/d/e we too can deal with the pattern even if we can't
just drop the mask, we can just apply it afterwars:
   https://rise4fun.com/Alive/gslRa
Change TypePath in RepositoryPath in Workspace
The file was added/llvm/trunk/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-variant-c.llllvm.src/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-variant-c.ll
The file was added/llvm/trunk/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-variant-d.llllvm.src/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-variant-d.ll
The file was added/llvm/trunk/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-variant-e.llllvm.src/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-variant-e.ll
The file was modified/llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-c.ll (diff)llvm.src/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-c.ll
The file was modified/llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-d.ll (diff)llvm.src/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-d.ll
The file was modified/llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-e.ll (diff)llvm.src/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-e.ll
The file was modified/llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-f.ll (diff)llvm.src/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-f.ll
Revision 372243 by dsanders:
Fix compile-time regression caused by rL371928

Summary:
Also fixup rL371928 for cases that occur on our out-of-tree backend

There were still quite a few intermediate APInts and this caused the
compile time of MCCodeEmitter for our target to jump from 16s up to
~5m40s. This patch, brings it back down to ~17s by eliminating pretty
much all of them using two new APInt functions (extractBitsAsZExtValue(),
insertBits() but with a uint64_t). The exact conditions for eliminating
them is that the field extracted/inserted must be <=64-bit which is
almost always true.

Note: The two new APInt API's assume that APInt::WordSize is at least
64-bit because that means they touch at most 2 APInt words. They
statically assert that's true. It seems very unlikely that someone
is patching it to be smaller so this should be fine.

Reviewers: jmolloy

Reviewed By: jmolloy

Subscribers: hiraditya, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67686
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/ADT/APInt.h (diff)llvm.src/include/llvm/ADT/APInt.h
The file was modified/llvm/trunk/lib/Support/APInt.cpp (diff)llvm.src/lib/Support/APInt.cpp
The file was modified/llvm/trunk/test/TableGen/BigEncoder.td (diff)llvm.src/test/TableGen/BigEncoder.td
The file was modified/llvm/trunk/unittests/ADT/APIntTest.cpp (diff)llvm.src/unittests/ADT/APIntTest.cpp
The file was modified/llvm/trunk/utils/TableGen/CodeEmitterGen.cpp (diff)llvm.src/utils/TableGen/CodeEmitterGen.cpp
Revision 372242 by danalbert:
Revert "Revert "Implement std::condition_variable via pthread_cond_clockwait() where available""

With the fix for non-Linux.

This reverts commit c1c519d2f1a66dd2eeaa4c321d8d7b50f623eb71.
Change TypePath in RepositoryPath in Workspace
The file was modified/libcxx/trunk/include/__config (diff)libcxx.src/include/__config
The file was modified/libcxx/trunk/include/__mutex_base (diff)libcxx.src/include/__mutex_base
The file was modified/libcxx/trunk/test/std/thread/thread.condition/thread.condition.condvar/wait_until.pass.cpp (diff)libcxx.src/test/std/thread/thread.condition/thread.condition.condvar/wait_until.pass.cpp
Revision 372240 by d0k:
[DDG] Break a cyclic dependency from Analysis to ScalarOpts
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Analysis/DDG.h (diff)llvm.src/include/llvm/Analysis/DDG.h