SuccessChanges

Summary

  1. [DDG] Break a cyclic dependency from Analysis to ScalarOpts (details)
  2. Revert "Revert "Implement std::condition_variable via (details)
  3. Fix compile-time regression caused by rL371928 (details)
  4. [NFC][InstCombine] More tests for PR42563 "Dropping pointless masking (details)
  5. [InstCombine] dropRedundantMaskingOfLeftShiftInput(): some cleanup (details)
  6. [clang-format][PR41964] Fix crash with SIGFPE when TabWidth is set to 0 (details)
  7. [Sema] Suppress -Wformat diagnostics for bool types when printed using (details)
  8. make -frewrite-includes also rewrite conditions in #if/#elif (details)
  9. [clang-format][PR41899] PointerAlignment: Left leads to useless space in (details)
  10. actually also compile output in tests for -frewrite-includes (details)
  11. [mips] Expand 'lw/sw' instructions for 32-bit GOT (details)
  12. [OPENMP]Fix for PR43349: Crash for privatized loop bound. (details)
  13. [CodeGen][MIPS][NFC] Some standalone tests for D66805 "or vectors, (details)
  14. [MIPS] For vectors, select `add %x, C` as `sub %x, -C` if it results in (details)
Commit 4b661f94e288b56f49579da2dea7a70cdf5b66e3 by benny.kra
[DDG] Break a cyclic dependency from Analysis to ScalarOpts
llvm-svn: 372240
The file was modifiedllvm/include/llvm/Analysis/DDG.h
Commit 85e26f56cbf3e1ae3aed155b817912f02172bbef by danalbert
Revert "Revert "Implement std::condition_variable via
pthread_cond_clockwait() where available""
With the fix for non-Linux.
This reverts commit c1c519d2f1a66dd2eeaa4c321d8d7b50f623eb71.
llvm-svn: 372242
The file was modifiedlibcxx/include/__mutex_base
The file was modifiedlibcxx/include/__config
The file was modifiedlibcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_until.pass.cpp
Commit 1723364a68487c1c070ca58799a0a5c39adca85d by daniel_l_sanders
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
llvm-svn: 372243
The file was modifiedllvm/unittests/ADT/APIntTest.cpp
The file was modifiedllvm/test/TableGen/BigEncoder.td
The file was modifiedllvm/utils/TableGen/CodeEmitterGen.cpp
The file was modifiedllvm/lib/Support/APInt.cpp
The file was modifiedllvm/include/llvm/ADT/APInt.h
Commit 8b719a3b8a4efc8f0b84400fcbb7cdfea6d3b2f3 by lebedev.ri
[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
llvm-svn: 372244
The file was modifiedllvm/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-c.ll
The file was modifiedllvm/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-f.ll
The file was addedllvm/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-variant-e.ll
The file was addedllvm/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-variant-d.ll
The file was modifiedllvm/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-d.ll
The file was addedllvm/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-variant-c.ll
The file was modifiedllvm/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-e.ll
Commit ba4cad9039660d322937f7f44bcb30b4849c3d58 by lebedev.ri
[InstCombine] dropRedundantMaskingOfLeftShiftInput(): some cleanup
before upcoming patch
llvm-svn: 372245
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
Commit 79983be5a027c0ff8a7ef7a8f67481ce61efc523 by mydeveloperday
[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
llvm-svn: 372246
The file was modifiedclang/lib/Format/Encoding.h
The file was modifiedclang/lib/Format/WhitespaceManager.cpp
The file was modifiedclang/lib/Format/FormatTokenLexer.cpp
The file was modifiedclang/unittests/Format/FormatTest.cpp
Commit 5741d19f046f24450ebda3a421a8ce49043ad2b8 by erik.pilkington
[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
llvm-svn: 372247
The file was modifiedclang/lib/AST/FormatString.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Sema/SemaChecking.cpp
The file was addedclang/test/Sema/format-bool.c
Commit 533434fc728ad457533fac2c8c4ef7b8906dd05e by l.lunak
make -frewrite-includes also rewrite conditions in #if/#elif
Those conditions may use __has_include, which needs to be rewritten. The
existing code has already tried to rewrite just __has_include, but it
didn't work with macro expansion, so e.g. Qt's
"#define QT_HAS_INCLUDE(x) __has_include(x)" didn't get handled
properly. Since the preprocessor run knows what each condition evaluates
to, just rewrite the entire condition. This of course requires that the
-frewrite-include pass has the same setup as the following compilation,
but that has always been the requirement.
Differential Revision: https://reviews.llvm.org/D63508
llvm-svn: 372248
The file was modifiedclang/test/Frontend/rewrite-includes.c
The file was modifiedclang/lib/Frontend/Rewrite/InclusionRewriter.cpp
The file was addedclang/test/Frontend/rewrite-includes-conditions.c
The file was modifiedclang/test/Modules/preprocess-module.cpp
Commit a767a0688b096f4c8188a484f08a3f77bab0ce73 by mydeveloperday
[clang-format][PR41899] PointerAlignment: Left leads to useless space in
lambda intializer expression
Summary: https://bugs.llvm.org/show_bug.cgi?id=41899
```auto lambda = [&a = a]() { a = 2; };```
is formatted as
```auto lambda = [& a = a]() { a = 2; };```
With an extra space if PointerAlignment is set to Left
> The space "& a" looks strange when there is no type in the lambda's
intializer expression. This can be worked around with by setting
"PointerAlignment: Right", but ideally "PointerAlignment: Left" would
not add a space in this case.
Reviewers: klimek, owenpan, krasimir, timwoj
Reviewed By: klimek
Subscribers: cfe-commits
Tags: #clang-tools-extra, #clang
Differential Revision: https://reviews.llvm.org/D67718
llvm-svn: 372249
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/lib/Format/TokenAnnotator.cpp
Commit 1e9c1d2b7bfcc27d3d47deac60ce20dc59aee75a by l.lunak
actually also compile output in tests for -frewrite-includes
Checking that the created output matches something is nice, but this
should also check whether the output makes sense.
Differential Revision: https://reviews.llvm.org/D63979
llvm-svn: 372250
The file was modifiedclang/test/Frontend/rewrite-includes-conditions.c
The file was modifiedclang/test/Frontend/Inputs/rewrite-includes3.h
The file was modifiedclang/test/Frontend/rewrite-includes.c
The file was modifiedclang/test/Frontend/Inputs/rewrite-includes4.h
The file was modifiedclang/test/Frontend/Inputs/rewrite-includes6.h
The file was modifiedclang/test/Frontend/Inputs/rewrite-includes5.h
The file was modifiedclang/test/Frontend/Inputs/NextIncludes/rewrite-includes9.h
The file was modifiedclang/test/Frontend/Inputs/rewrite-includes1.h
The file was modifiedclang/test/Frontend/Inputs/rewrite-includes2.h
The file was modifiedclang/test/Frontend/Inputs/rewrite-includes7.h
The file was modifiedclang/test/Frontend/rewrite-includes-cli-include.c
Commit 164dbd386d00fe62991d3ab4e7b25b599f3fb7dc by simon
[mips] Expand 'lw/sw' instructions for 32-bit GOT
In case of using 32-bit GOT access to the table requires two
instructions with attached %got_hi and %got_lo relocations. This patch
implements correct expansion of 'lw/sw' instructions in that case.
Differential Revision: https://reviews.llvm.org/D67705
llvm-svn: 372251
The file was modifiedllvm/test/MC/Mips/mips64-expansions.s
The file was modifiedllvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
The file was modifiedllvm/test/MC/Mips/mips-expansions.s
Commit f71939c0995191bea1adca754e9b7e17f9c1572a by a.bataev
[OPENMP]Fix for PR43349: Crash for privatized loop bound.
If the variable, used in the loop boundaries, is not captured in the
construct, this variable must be considered as undefined if it was
privatized.
llvm-svn: 372252
The file was modifiedclang/test/OpenMP/parallel_for_codegen.cpp
The file was modifiedclang/lib/CodeGen/CGStmtOpenMP.cpp
Commit 260b6949040985b8c315d080b8e197d0ddcc5dec by lebedev.ri
[CodeGen][MIPS][NFC] Some standalone tests for D66805 "or vectors,
select `add %x, C` as `sub %x, -C` if it results in inline immediate"
llvm-svn: 372253
The file was modifiedllvm/test/CodeGen/Mips/msa/arithmetic.ll
Commit ec6b91b6655a92d02c88e942d83366004575a234 by lebedev.ri
[MIPS] For vectors, select `add %x, C` as `sub %x, -C` if it results in
inline immediate
Summary: As discussed in https://reviews.llvm.org/D62341#1515637, for
MIPS `add %x, -1` isn't optimal. Unlike X86 there are no fastpaths to
matearialize such `-1`/`1` vector constants, and `sub %x, 1` results in
better codegen, so undo canonicalization
Reviewers: atanasyan, Petar.Avramovic, RKSimon
Reviewed By: atanasyan
Subscribers: sdardis, arichardson, hiraditya, jrtc27, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66805
llvm-svn: 372254
The file was modifiedllvm/test/CodeGen/Mips/msa/arithmetic.ll
The file was modifiedllvm/lib/Target/Mips/MipsISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/Mips/MipsISelDAGToDAG.h