SuccessChanges

Summary

  1. [mips] Do not include offset into `%got` expression for global symbols (details)
  2. [mips] Reduce number of instructions used for loading a global symbol's (details)
  3. libcxx: Make gen_link_script.py print contents only in --dryrun mode (details)
  4. clang-format: Disable across-block include reordering. (details)
  5. [analyzer] Avoid unnecessary enum range check on LValueToRValue casts (details)
  6. [llvm-objcopy] Strip debug sections when running with --strip-unneeded. (details)
  7. [ELF] Mention contents of reproduce archive and add help description. (details)
  8. [clang-tidy] Possibility of displaying duplicate warnings (details)
  9. [libc++] Improve Python 3 compatibility for merge_archives.py (details)
  10. [MustExec] Add a generic "must-be-executed-context" explorer (details)
  11. [ThinLTO] Fix handling of weak interposable symbols (details)
  12. [Attributor][NFCI] Try to avoid potential non-deterministic behavior (details)
  13. [Attributor] FIX: Treat new attributes as changed ones (details)
  14. [SLP] fix formatting; NFC (details)
  15. [Attributor][NFCI] Avoid lookups when resolving returned values (details)
  16. [Attributor][Fix] Deal with "growing" dereferenceability (details)
  17. [Reassoc] Small fix to support unary FNeg in NegateValue(...) (details)
  18. [NFC] Move some variable declarations into their 'if' conditions. (details)
  19. Fix target for new X86 test (details)
  20. [OPENMP5.0]Add support for device_type clause in declare target (details)
  21. [SLP] use range-for loops, fix formatting; NFC (details)
  22. Fixed a typo. (details)
  23. [DebugInfo] Remove invalidated locations during LiveDebugValues (details)
  24. [OpenCL] Renamed value of std flag in C++ mode. (details)
  25. [SelectionDAG][X86] Enable iX SimplifyDemandedBits to vXi1 (details)
  26. Debug Info: Support for DW_AT_export_symbols for anonymous structs (details)
  27. Allow Compiler.h to be included in C files and fix fallthrough warnings (details)
  28. Fix clang-tidy warning in clang-tidy (details)
  29. [Attributor] Deal with shrinking dereferenceability in a loop (details)
  30. [Attributor] Manifest constant return values (details)
  31. [BasicAA] Use dereferenceability to reason about aliasing (details)
  32. [AMDGPU] Automatically generate various tests. NFC (details)
  33. Windows: explicitly cast constants to `DWORD` (details)
  34. [InstCombine] icmp eq/ne (gep inbounds P, Idx..), null -> icmp eq/ne P, (details)
  35. Revert r369233. (details)
  36. [Sema] Don't warn on printf('%hd', [char]) (PR41467) (details)
  37. [X86] Mark VPDPWSSD and VPDPWSSDS as commutable. Add stack folding (details)
  38. [X86] Automatically generate load-local-v3i1.ll . NFC (details)
  39. RegScavenger: Use Register (details)
  40. Fix a bug in just submitted rL369789 (details)
  41. [OPENMP][NVPTX]Use __syncwarp() to reconverge the threads. (details)
  42. [PowerPC] Expand v1i128 smin (details)
  43. [SampleFDO] Add ExtBinary format to support extension of binary profile. (details)
  44. Fix some warnings introduced by r369798. (details)
  45. [libc++] Fix typo in documentation for LIBCXX_HERMETIC_STATIC_LIBRARY (details)
  46. [OPENMP5]Use nonmonotonic modifier by default for non-static and (details)
  47. [X86] Move a transform out of combineConcatVectorOps so we don't (details)
  48. Do a sweep of symbol internalization. NFC. (details)
  49. [Attributor] Manifest alignment in load and store instructions (details)
  50. [GlobalISel] Legalizer: Retry combining illegal artifacts as long as (details)
  51. [AArch64][GlobalISel] Import XRO load/store patterns instead of custom (details)
  52. [ORC] Fix an incorrect comment. (details)
  53. [ORC] Fix a FIXME: Propagate errors to dependencies. (details)
  54. [ORC] Remove query dependencies when symbols are resolved. (details)
  55. [LLVM][NFC] remove unused fields (details)
  56. [clang-doc] Bump BitcodeWriter max line number to 32U (details)
  57. [x86] add tests for bt/test; NFC (details)
  58. Move a break into the correct place. NFCI. (details)
  59. Upstream support for macCatalyst Mach-O binaries. (details)
  60. hwasan: Fix use of uninitialized memory. (details)
  61. [AMDGPU] w/a for gfx908 mfma SrcC literal HW bug (details)
  62. [LifetimeAnalysis] Make it possible to disable the new warnings (details)
  63. [AMDGPU] w/a for gfx908 mfma SrcC literal HW bug (details)
  64. [AMDGPU] Check for immediate SrcC in mfma in AsmParser (details)
  65. Fix a test to test what the name suggest. (details)
  66. Skip tail call frame tests when dwarf_version < 4 (details)
  67. [libclang][index][NFC] Fix test for skipping already parsed function (details)
  68. Fix stack_trace_compressor builds for Clang < 6.0 (details)
  69. [LLVM][NFC] Removing unused functions (details)
  70. [GWP-ASan] Split options_parser and backtrace_sanitizer_common. (details)
  71. hwasan: Align n_namesz and n_descsz to 4 when reading notes. (details)
  72. [NFC] Fix comments and formatting. (details)
  73. [ELF] Align the first section of a PT_LOAD even if its type is (details)
  74. PR40674: fix assertion failure if a structured binding declaration has a (details)
  75. NFC: Rename some sanitizer related lifetime checks (details)
  76. NFC: Rename lifetime-asan.ll -> lifetime-sanitizer.ll (details)
  77. Re-enable DependencyScannerTest on windows with the right fixes (details)
  78. [GlobalISel] Introduce a G_DYN_STACKALLOC opcode to represent dynamic (details)
  79. PR42513: Enter the proper DeclContext before substituting into an (details)
  80. Remove unnecessary REQUIRES from a test. (details)
  81. [LoopFusion] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off build (details)
  82. [X86] Add an assert to mark more code that needs to be removed when the (details)
  83. [ELF] Make member function Writer<ELFT>::removeEmptyPTLoad non-member. (details)
  84. [InstCombine][NFC] reuse-constant-from-select-in-icmp.ll - revisit tests (details)
  85. [InstCombine] Try to reuse constant from select in leading comparison (details)
  86. [InstCombine] matchThreeWayIntCompare(): commutativity awareness (details)
  87. [Constant] Add 'isElementWiseEqual()' method (details)
  88. [Testing] Unbreak r369830 (details)
  89. [ELF] Simplify with less_second. NFC (details)
Commit 58492b1895e23869253592544ae87f58742013e3 by simon
[mips] Do not include offset into `%got` expression for global symbols
Now pseudo instruction `la $6, symbol+8($6)` is expanding into the
following chain of commands:
``` lw    $1, %got(symbol+8)($gp) addiu $1, $1, 8 addu  $6, $1, $6
```
This is incorrect. When a linker handles the `R_MIPS_GOT16` relocation,
it does not expect to get any addend and breaks on assertion. Otherwise
it has to create new GOT entry for each unique "sym + offset" pair.
Offset for a global symbol should be added to result of loading GOT
entry by a separate `add` command.
The patch fixes the problem by stripping off an offset from the
expression passed to the `%got`. That's interesting that even current
code inserts a separate `add` command.
Differential Revision: https://reviews.llvm.org/D66552
llvm-svn: 369755
The file was modifiedllvm/test/MC/Mips/mips-expansions.s
The file was modifiedllvm/test/MC/Mips/macro-la-pic.s
The file was modifiedllvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
Commit 5f7d6ac7bf3b7a954d9826b93872063f8eb08810 by simon
[mips] Reduce number of instructions used for loading a global symbol's
value
Now `lw/sw $reg, sym+offset` pseudo instructions for global symbol `sym`
are lowering into the following three instructions.
``` lw     $reg, %got(symbol)($gp) addiu  $reg, $reg, offset lw/sw
$reg, 0($reg)
```
It's possible to reduce the number of instructions by taking the offset
in account in the final `lw/sw` command. This patch implements that
optimization.
``` lw     $reg, %got(symbol)($gp) lw/sw  $reg, offset($reg)
```
Differential Revision: https://reviews.llvm.org/D66553
llvm-svn: 369756
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 01d7fe760581e7a1a9b77a8f944caff7bb21f456 by nicolasweber
libcxx: Make gen_link_script.py print contents only in --dryrun mode
The build should generally be quiet if there are no errors, and this
script has been around long enough that we can remove the log output. If
we ever need to debug something with this script, we can put back the
logging then.
Differential Revision: https://reviews.llvm.org/D66594
llvm-svn: 369757
The file was modifiedlibcxx/utils/gen_link_script.py
Commit b55dea4e8a1e5502ed1ce4adbae2a50563d63f71 by nicolasweber
clang-format: Disable across-block include reordering.
Differential Revision: https://reviews.llvm.org/D66650
llvm-svn: 369759
The file was modifiedclang/lib/Format/Format.cpp
Commit 09ce8ec78a958e24a7e22009d6bce1a4c17b6cad by kristof.umann
[analyzer] Avoid unnecessary enum range check on LValueToRValue casts
Summary: EnumCastOutOfRangeChecker should not perform enum range checks
on LValueToRValue casts, since this type of cast does not actually
change the underlying type.   Performing the unnecessary check actually
triggered an assertion failure deeper in EnumCastOutOfRange for certain
input (which is captured in the accompanying test code).
Reviewers: #clang, Szelethus, gamesh411, NoQ
Reviewed By: Szelethus, gamesh411, NoQ
Subscribers: NoQ, gamesh411, xazax.hun, baloghadamsoftware, szepet,
a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, Charusso, bjope,
cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D66014
llvm-svn: 369760
The file was modifiedclang/lib/StaticAnalyzer/Checkers/EnumCastOutOfRangeChecker.cpp
The file was modifiedclang/test/Analysis/enum-cast-out-of-range.cpp
The file was addedclang/test/Analysis/enum-cast-out-of-range.c
Commit 0f323439d897565e78b261109ed77e32230e9cc5 by rupprecht
[llvm-objcopy] Strip debug sections when running with --strip-unneeded.
Summary: GNU --strip-unneeded strips debugging sections as well. Do that
for llvm-objcopy as well.
Additionally, add a test that verifies we keep the .gnu_debuglink
section. This apparently was not always the case, and I'm not sure which
commit fixed it, but there doesn't appear to be any test coverage to
make sure we continue to do so.
This fixes PR41043.
Reviewers: jhenderson, jakehehrlich, espindola, alexshap
Subscribers: emaste, arichardson, MaskRay, abrachet, seiya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66623
llvm-svn: 369761
The file was addedllvm/test/tools/llvm-objcopy/ELF/strip-unneeded-remove-debug-keep-link.test
The file was modifiedllvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
Commit 7d6aa7eb7f58d5df1349ca39700a745a94fec99d by peter.smith
[ELF] Mention contents of reproduce archive and add help description.
Building on D60557 mention the name of the linker generated contents of
the reproduce archive, response.txt and version.txt.
Also write a shorter description in the ld.lld --help that is closer to
the documentation.
Differential Revision: https://reviews.llvm.org/D66641
llvm-svn: 369762
The file was modifiedlld/docs/ld.lld.1
The file was modifiedlld/ELF/Options.td
Commit dabfea85fcca49e8bb4a2690621c1fcea30bd4f3 by kristof.umann
[clang-tidy] Possibility of displaying duplicate warnings
Summary: In case a checker is registered multiple times as an alias, the
emitted warnings are uniqued by the report message. However, it is
random which checker name is included in the warning. When processing
the output of clang-tidy this behavior caused some problems. In this
commit the uniquing key contains the checker name too.
Reviewers: alexfh, xazax.hun, Szelethus, aaron.ballman, lebedev.ri,
JonasToth, gribozavr
Reviewed By: alexfh
Subscribers: dkrupp, whisperity, rnkovacs, mgrang, cfe-commits
Patch by Tibor Brunner!
Tags: #clang
Differential Revision: https://reviews.llvm.org/D65065
llvm-svn: 369763
The file was addedclang-tools-extra/test/clang-tidy/duplicate-reports.cpp
The file was modifiedclang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
Commit 344eee9227daa69b3ad919790da5a0edcf02c9cb by Louis Dionne
[libc++] Improve Python 3 compatibility for merge_archives.py
Popen.communicate() method in Python 2 returns a pair of strings, and in
Python 3 it returns a pair of byte-like objects unless
universal_newlines is set to True. This led to an error when using
Python 3. With this patch, merge_archives.py works fine with Python 3.
Thanks to Sergej Jaskiewicz for the patch. Differential Revision:
https://reviews.llvm.org/D66649
llvm-svn: 369764
The file was modifiedlibcxx/utils/merge_archives.py
Commit a5b10b464e5e45cbc156119ba48f24677576d022 by jdoerfert
[MustExec] Add a generic "must-be-executed-context" explorer
Given an instruction I, the MustBeExecutedContextExplorer allows to
easily traverse instructions that are guaranteed to be executed whenever
I is. For now, these instruction have to be statically "after" I, in the
same or different basic blocks.
This patch also adds a pass which prints the must-be-executed-context
for each instruction in a module. It is used to test the
MustBeExecutedContextExplorer, for now on the examples given in the
class comment of the MustBeExecutedIterator.
Differential Revision: https://reviews.llvm.org/D65186
llvm-svn: 369765
The file was modifiedllvm/include/llvm/LinkAllPasses.h
The file was modifiedllvm/include/llvm/Analysis/MustExecute.h
The file was modifiedllvm/lib/Analysis/MustExecute.cpp
The file was modifiedllvm/include/llvm/Analysis/Passes.h
The file was modifiedllvm/include/llvm/InitializePasses.h
The file was modifiedllvm/lib/Analysis/Analysis.cpp
The file was addedllvm/test/Analysis/MustExecute/must_be_executed_context.ll
Commit ea314fd476166405905103a29dd8578ff6589160 by tejohnson
[ThinLTO] Fix handling of weak interposable symbols
Summary: Keep aliasees alive if their alias is live, otherwise we end up
with an alias to a declaration, which is invalid. This can happen when
the aliasee is weak and non-prevailing.
This fix exposed the fact that we were then attempting to internalize
the weak symbol, which was not exported as it was not prevailing. We
should not internalize interposable symbols in general, unless this is
the prevailing copy, since it can lead to incorrect inlining and other
optimizations. Most of the changes in this patch are due to the
restructuring required to pass down the prevailing callback.
Finally, while implementing the test cases, I found that in the case of
a weak aliasee that is still marked not live because its alias isn't
live, after dropping the definition we incorrectly marked the
declaration with weak linkage when resolving prevailing symbols in the
module. This was due to some special case handling for symbols marked
WeakLinkage in the summary located before instead of after a subsequent
check for the symbol being a declaration. It turns out that we don't
actually need this special case handling any more (looking back at the
history, when that was added the code was structured quite differently)
- we will correctly mark with weak linkage further below when the
definition hasn't been dropped.
Fixes PR42542.
Reviewers: pcc
Subscribers: mehdi_amini, inglorion, steven_wu, dexonsmith, dang,
llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66264
llvm-svn: 369766
The file was modifiedllvm/lib/Transforms/IPO/FunctionImport.cpp
The file was modifiedllvm/test/ThinLTO/X86/internalize.ll
The file was addedllvm/test/ThinLTO/X86/Inputs/internalize.ll
The file was modifiedllvm/include/llvm/LTO/LTO.h
The file was modifiedllvm/lib/LTO/ThinLTOCodeGenerator.cpp
The file was addedllvm/test/LTO/Resolution/X86/not-prevailing-weak-aliasee.ll
The file was modifiedllvm/lib/LTO/LTO.cpp
Commit 695089ecfb2b851143cd801e01f479b4f1b8e05f by jdoerfert
[Attributor][NFCI] Try to avoid potential non-deterministic behavior
This commit replaces sets with set vectors in an effort to make the
behavior of the Attributor deterministic.
llvm-svn: 369767
The file was modifiedllvm/include/llvm/Transforms/IPO/Attributor.h
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
Commit 9543f1498c30bad385474d9886c373a91724d28f by jdoerfert
[Attributor] FIX: Treat new attributes as changed ones
Summary: When we have new attributes and we end the fixpoint iteration
because the iteration limit is reached, we need to treat the new ones as
if they changed in the last iteration, as they might have.
This adds a test for which we should not derive anything regardless of
the iteration limit, e.g., if we abort there should not be any
attributes manifested in the IR.
Reviewers: uenoku, sstefan1
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66549
llvm-svn: 369768
The file was addedllvm/test/Transforms/FunctionAttrs/new_attributes.ll
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
Commit 91824678868d920a2fe7dc10fcac0a21966e6fc3 by spatel
[SLP] fix formatting; NFC
These are part of D57059, but that patch doesn't apply cleanly to trunk
at this point, so we might as well remove some of the noise.
llvm-svn: 369769
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit deb9ea3a8c842f279cf9d7db695760acd55be660 by jdoerfert
[Attributor][NFCI] Avoid lookups when resolving returned values
If the number of potentially returned values not change since the last
traversal we do not need to visit the returned values again. This works
as we only add values to the returned values set now.
Differential Revision: https://reviews.llvm.org/D66484
llvm-svn: 369770
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
Commit 2f2d7c3addff2e03e0b051a663743bb751ddb5bd by jdoerfert
[Attributor][Fix] Deal with "growing" dereferenceability
Summary: If we have a negative inbounds offset dereferenceabily "grows".
However, until we do not handle the overflow that can occur in the
dereferenceable bytes and the problem with loops, we simply do not grow
the state.
Reviewers: sstefan1, uenoku
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66557
llvm-svn: 369771
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
The file was modifiedllvm/test/Transforms/FunctionAttrs/dereferenceable.ll
Commit 688f3bc240d0886933e9bbe51167aabf05febe63 by cameron.mcinally
[Reassoc] Small fix to support unary FNeg in NegateValue(...)
Differential Revision: https://reviews.llvm.org/D66612
llvm-svn: 369772
The file was modifiedllvm/lib/Transforms/Scalar/Reassociate.cpp
The file was addedllvm/test/Transforms/Reassociate/2019-08-22-FNegAssert.ll
Commit 23384a1c8dc8851dfd4399cf4f6bb6aff4e205e0 by erich.keane
[NFC] Move some variable declarations into their 'if' conditions.
A couple of variables are being declared outside of the 'if' condition
that is their only actual use.  Additionally, switch a few 'const TYPE
*' to 'const auto *' for consistency.
llvm-svn: 369773
The file was modifiedclang/lib/Sema/SemaTemplateInstantiateDecl.cpp
Commit f692963600cc2a2748a2963bb3553bbdb4732ac8 by tejohnson
Fix target for new X86 test
Test added in r369766 had the wrong target arch for the X86 directory,
leading to some bot failures. Fix it to have the appropriate target.
llvm-svn: 369774
The file was modifiedllvm/test/LTO/Resolution/X86/not-prevailing-weak-aliasee.ll
Commit 729e242a7972f4802f982a4b4dabb964aa299675 by a.bataev
[OPENMP5.0]Add support for device_type clause in declare target
construct.
OpenMP 5.0 introduced new clause for declare target directive,
device_type clause, which may accept values host, nohost, and any. Host
means that the function must be emitted only for the host, nohost - only
for the device, and any - for both, device and the host.
llvm-svn: 369775
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/Serialization/ASTReaderDecl.cpp
The file was modifiedclang/test/OpenMP/target_vla_messages.cpp
The file was modifiedclang/include/clang/AST/RecursiveASTVisitor.h
The file was modifiedclang/include/clang/Basic/OpenMPKinds.def
The file was modifiedclang/lib/AST/ASTTypeTraits.cpp
The file was modifiedclang/lib/Sema/Sema.cpp
The file was modifiedclang/test/OpenMP/nvptx_asm_delayed_diags.c
The file was modifiedclang/lib/Basic/OpenMPKinds.cpp
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/lib/CodeGen/CGStmtOpenMP.cpp
The file was modifiedclang/test/OpenMP/nvptx_allocate_messages.cpp
The file was modifiedclang/include/clang/Basic/Attr.td
The file was modifiedclang/include/clang/Basic/OpenMPKinds.h
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was modifiedclang/lib/Parse/ParseOpenMP.cpp
The file was modifiedclang/test/OpenMP/declare_target_codegen.cpp
The file was modifiedclang/include/clang/Basic/AttrDocs.td
The file was modifiedclang/include/clang/Basic/DiagnosticParseKinds.td
The file was modifiedclang/lib/AST/OpenMPClause.cpp
The file was modifiedclang/test/OpenMP/declare_target_messages.cpp
The file was modifiedclang/test/OpenMP/declare_target_ast_print.cpp
Commit 5a5d44e801aa895f7dbcb59922c899385193fce3 by spatel
[SLP] use range-for loops, fix formatting; NFC
These are part of D57059, but that patch doesn't apply cleanly to trunk
at this point, so we might as well remove some of the noise.
llvm-svn: 369776
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit 4c9d2ab145ad5c662f27da5844ab3a7da9303080 by tra
Fixed a typo.
llvm-svn: 369777
The file was modifiedclang/lib/Sema/SemaDecl.cpp
Commit 0ae549814693eb201d7e7a0a77856e55a98e19ee by jeremy.morse.llvm
[DebugInfo] Remove invalidated locations during LiveDebugValues
LiveDebugValues gives variable locations to blocks, but it should also
take away. There are various circumstances where a variable location is
known until a loop backedge with a different location is detected. In
those circumstances, where there's no agreement on the variable
location, it should be undef / removed, otherwise we end up picking a
location that's valid on some loop iterations but not others.
However, LiveDebugValues doesn't currently do this, see the new testcase
attached. Without this patch, the location of !3 is assumed to be %bar
through the loop. Once it's added to the In-Locations list, it's never
removed, even though the later dbg.value(0... of !3 makes the location
un-knowable.
This patch checks during block-location-joining to see whether any
previously-present locations have been removed in a predecessor. If they
have, the live-ins have changed, and the block needs reprocessing.
Similarly, in transferTerminator, assign rather than |= the
Out-Locations after processing a block, as we may have deleted some
previously valid locations. This will mean that LiveDebugValues performs
more propagation
-- but that's necessary for it being correct.
Differential Revision: https://reviews.llvm.org/D66599
llvm-svn: 369778
The file was modifiedllvm/test/DebugInfo/COFF/pieces.ll
The file was addedllvm/test/DebugInfo/X86/live-debug-values-remove-range.ll
The file was modifiedllvm/test/DebugInfo/X86/fission-ranges.ll
The file was modifiedllvm/lib/CodeGen/LiveDebugValues.cpp
Commit ad5047d23dda864b61527ea95154152b93bd8448 by anastasia.stulova
[OpenCL] Renamed value of std flag in C++ mode.
Clang should accept -std=clc++ (not -std=c++!) for OpenCL.
This was forgotten in r367008.
llvm-svn: 369779
The file was modifiedclang/test/Driver/unknown-std.cl
The file was modifiedclang/include/clang/Basic/LangStandards.def
Commit e7211bb56724b66ba1011084a2293d9d658a4afe by craig.topper
[SelectionDAG][X86] Enable iX SimplifyDemandedBits to vXi1
SimplifyDemandedVectorElts simplification. Add a hack to X86 to avoid a
regression
Patch showing the effect of enabling bool vector oversimplification.
Non-VLX builds can simplify a kshift shuffle, but VLX builds simplify:
insert_subvector v8i zeroinitializer, v2i --> insert_subvector v8i
undef, v2i
Preventing the removal of the AND to clear the upper bits of result
Differential Revision: https://reviews.llvm.org/D53022
llvm-svn: 369780
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 5dca5efc0b14c1512cbd8a2902322e1b5b6617cb by syaghmour
Debug Info: Support for DW_AT_export_symbols for anonymous structs
This implements the DWARF 5 feature described in:
http://dwarfstd.org/ShowIssue.php?issue=141212.1
To support recognizing anonymous structs:
  struct A {
   struct { // Anonymous struct
       int y;
   };
}   a;
This patch adds a new (DI)flag to LLVM metadata:
ExportSymbols
Differential Revision: https://reviews.llvm.org/D66352
llvm-svn: 369781
The file was modifiedllvm/docs/LangRef.rst
The file was modifiedllvm/include/llvm/IR/DebugInfoMetadata.h
The file was modifiedllvm/include/llvm/IR/DebugInfoFlags.def
The file was addedllvm/test/Assembler/export-symbol-anonymous-class.ll
Commit 5808077bc68b26be32d620e71776e2e9bfbe9caf by nhuck
Allow Compiler.h to be included in C files and fix fallthrough warnings
Summary: Since clang does not support comment style fallthrough
annotations these should be switched to macros defined in Compiler.h.
This requires some fixing to Compiler.h.
Original patch: https://reviews.llvm.org/D66487
Reviewers: nickdesaulniers, aaron.ballman, xbolva00, rsmith
Reviewed By: nickdesaulniers, aaron.ballman, rsmith
Subscribers: rsmith, sfertile, ormris, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66609
llvm-svn: 369782
The file was modifiedllvm/lib/Support/regcomp.c
The file was modifiedllvm/include/llvm/Support/Compiler.h
Commit ccc272cd32c9872842cf0e65e3af71ce96e6793a by benny.kra
Fix clang-tidy warning in clang-tidy
argument name 'FixDescription' in comment does not match parameter name
'Description'
Patch by Nils Barth!
llvm-svn: 369783
The file was modifiedclang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp
Commit 785fad32025ac29b3169a3c9e25b01b2835869d4 by jdoerfert
[Attributor] Deal with shrinking dereferenceability in a loop
Summary: If we have a loop in which the dereferenceability of a pointer
decreases we did slowly decrease it iteration by iteration, leading to a
timeout. With this patch we detect such circular reasoning and indicate
a fixpoint early.
Reviewers: uenoku, sstefan1
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66558
llvm-svn: 369784
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
The file was modifiedllvm/test/Transforms/FunctionAttrs/dereferenceable.ll
Commit 23400e618b986da3f1ad9549c3b2b9ea8cc76893 by jdoerfert
[Attributor] Manifest constant return values
Summary: If the unique return value is a constant we now replace call
uses with that constant.
Reviewers: sstefan1, uenoku
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66551
llvm-svn: 369785
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
The file was modifiedllvm/test/Transforms/FunctionAttrs/nounwind.ll
Commit 22e6e108e108f09f8ecd18e1b307ddfc68bfb2b7 by jdoerfert
[BasicAA] Use dereferenceability to reason about aliasing
Summary: We already use the fact that an object with known size X does
not alias another objection of size Y > X before. With this commit, we
use dereferenceability information to determine a lower bound for Y and
not only rely on the user provided query size.
The result for @global_and_deref_arg_2() and @local_and_deref_ret_2() in
test/Analysis/BasicAA/dereferenceable.ll improved with this patch.
Reviewers: asbirlea, chandlerc, hfinkel, sanjoy
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66157
llvm-svn: 369786
The file was addedllvm/test/Analysis/BasicAA/dereferenceable.ll
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
Commit 05f56a1ddd67c65e4554d4c7a38a9d511c0ecf20 by deadalnix
[AMDGPU] Automatically generate various tests. NFC
llvm-svn: 369787
The file was modifiedllvm/test/CodeGen/AMDGPU/dagcombine-setcc-select.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/load-lo16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/copy-illegal-type.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/memory_clause.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/r600-export-fix.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/chain-hi-to-lo.ll
Commit e7823a53164b0526c9463fc9515f42d5c53651db by Saleem Abdulrasool
Windows: explicitly cast constants to `DWORD`
STATUS_SINGLE_STEP and STATUS_BREAKPOINT are defined as 0x8------ which
is negative and thus can't be implicitly narrowed to a DWORD which is
unsigned.  The value is defined differently across winnt.h and
ntstatus.h.
Patch by Gwen Mittertreiner!
llvm-svn: 369788
The file was modifiedlldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
Commit 5b02cfa0b3c2c34943108b02ff2ff45ec46a2af3 by listmail
[InstCombine] icmp eq/ne (gep inbounds P, Idx..), null -> icmp eq/ne P,
null
This generalizes the isGEPKnownNonNull rule from ValueTracking to apply
when we do not know if the base is non-null, and thus need to replace
one condition with another.
The core notion is that since an inbounds GEP can only form null if the
base pointer is null and the offset is zero. However, if the offset is
non-zero, the the "inbounds" marker makes the result poison. Thus, we're
free to ignore the case where the offset is non-zero. Similarly, there's
no case under which a non-null base can result in a null result without
generating poison.
Differential Revision: https://reviews.llvm.org/D66608
llvm-svn: 369789
The file was addedllvm/test/Transforms/InstCombine/gep-inbounds-null.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
Commit 30232770fbe5f5df7d5d01bd418c5ef9cc76b75e by manojgupta
Revert r369233.
This breaks building of some projects like libfuse and alsa-lib that now
fail when linking. Error details in PR43092.
llvm-svn: 369790
The file was modifiedllvm/lib/MC/ELFObjectWriter.cpp
The file was modifiedllvm/test/MC/ELF/symver.s
The file was modifiedllvm/test/MC/PowerPC/ppc64-localentry-symbols.s
The file was modifiedllvm/test/LTO/X86/symver-asm.ll
The file was modifiedllvm/test/MC/ARM/arm-elf-symver.s
The file was addedllvm/test/MC/ELF/multiple-different-symver.s
The file was removedllvm/test/MC/ELF/symver-multiple-version.s
The file was modifiedllvm/test/LTO/X86/symver-asm2.ll
Commit cc01d6421f4a896820c02da2ea92b82d973b431e by nhuck
[Sema] Don't warn on printf('%hd', [char]) (PR41467)
Summary: Link: https://bugs.llvm.org/show_bug.cgi?id=41467
Reviewers: rsmith, nickdesaulniers, aaron.ballman, lebedev.ri
Reviewed By: nickdesaulniers, aaron.ballman, lebedev.ri
Subscribers: lebedev.ri, nickdesaulniers, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D66186
llvm-svn: 369791
The file was modifiedclang/lib/Sema/SemaChecking.cpp
The file was modifiedclang/test/Sema/format-strings.c
The file was modifiedclang/lib/AST/FormatString.cpp
The file was modifiedclang/test/FixIt/format.m
The file was addedclang/test/Sema/format-strings-pedantic.c
The file was modifiedclang/test/Sema/format-strings-enum-fixed-type.cpp
Commit bccd183217d677316df9fb89ba7ca6e3c217ed11 by craig.topper
[X86] Mark VPDPWSSD and VPDPWSSDS as commutable. Add stack folding
tests.
llvm-svn: 369792
The file was addedllvm/test/CodeGen/X86/stack-folding-int-avx512vnni.ll
The file was modifiedllvm/lib/Target/X86/X86InstrInfo.cpp
The file was modifiedllvm/lib/Target/X86/X86InstrAVX512.td
The file was modifiedllvm/test/CodeGen/X86/stack-folding-int-avx512.ll
Commit 1fd2e69e28f45b2699eda7975628255eddd8204c by deadalnix
[X86] Automatically generate load-local-v3i1.ll . NFC
llvm-svn: 369793
The file was modifiedllvm/test/CodeGen/X86/load-local-v3i1.ll
Commit 2fd1afe8ef0726d8040d453bd15e07da831d7e51 by Matthew.Arsenault
RegScavenger: Use Register
llvm-svn: 369794
The file was modifiedllvm/include/llvm/CodeGen/RegisterScavenging.h
The file was modifiedllvm/lib/CodeGen/RegisterScavenging.cpp
Commit 9cb059fdcc03e2144fa9aac0bfbb49c0d5d7efe2 by listmail
Fix a bug in just submitted rL369789
Started implementing the vector case and realized the scalar case hadn't
handled the GEP producing a different type than the base correctly.
It's entertaining seeing what slips through review when we're focused on
the 'hard' parts.  :(
Also adding an extra vector test as it happened to be in workspace and
wasn't worth separating.
llvm-svn: 369795
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
The file was modifiedllvm/test/Transforms/InstCombine/gep-inbounds-null.ll
Commit 0366168f3ac6c838fa41cddc02db84d48403f21e by a.bataev
[OPENMP][NVPTX]Use __syncwarp() to reconverge the threads.
Summary: In Cuda 9.0 it is not guaranteed that threads in the warps are
convergent. We need to use __syncwarp() function to reconverge the
threads and to guarantee the memory ordering among threads in the warps.
This is the first patch to fix the problem with the test
libomptarget/deviceRTLs/nvptx/src/sync.cu on Cuda9+. This patch just
replaces calls to __shfl_sync() function with the call of __syncwarp()
function where we need to reconverge the threads when we try to modify
the value of the parallel level counter.
Reviewers: grokos
Subscribers: guansong, jfb, jdoerfert, caomhin, kkwli0, openmp-commits
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D65013
llvm-svn: 369796
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/supporti.h
Commit b4051e57b104d17ed4f5be21e3c54f80d170b97f by froese
[PowerPC] Expand v1i128 smin
The smin opcode and friends for v1i128 are incorrectly marked as legal
for PPC. Change them to expand.
Differential Revision: https://reviews.llvm.org/D64960
llvm-svn: 369797
The file was modifiedllvm/test/CodeGen/PowerPC/vec-min-max.ll
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
Commit be9073249e346759f39ca90cb1df80c3b02ca41c by wmi
[SampleFDO] Add ExtBinary format to support extension of binary profile.
This is a patch split from https://reviews.llvm.org/D66374. It tries to
add a new format of profile called ExtBinary. The format adds a section
header table to the profile and organize the profile in sections, so the
future extension like adding a new section or extending an existing
section will be easier while keeping backward compatiblity feasible.
Differential Revision: https://reviews.llvm.org/D66513
llvm-svn: 369798
The file was modifiedllvm/include/llvm/ProfileData/SampleProfReader.h
The file was modifiedllvm/unittests/ProfileData/SampleProfTest.cpp
The file was removedllvm/test/Transforms/SampleProfile/compact-binary-profile.ll
The file was modifiedllvm/test/tools/llvm-profdata/roundtrip.test
The file was modifiedllvm/lib/ProfileData/SampleProfWriter.cpp
The file was modifiedllvm/include/llvm/ProfileData/SampleProfWriter.h
The file was addedllvm/test/Transforms/SampleProfile/profile-format.ll
The file was modifiedllvm/lib/ProfileData/SampleProfReader.cpp
The file was addedllvm/test/Transforms/SampleProfile/Inputs/inline.extbinary.afdo
The file was modifiedllvm/include/llvm/ProfileData/SampleProf.h
The file was modifiedllvm/tools/llvm-profdata/llvm-profdata.cpp
Commit f491d8639387249ea9d322dcac1767e8cc084e17 by wmi
Fix some warnings introduced by r369798.
llvm-svn: 369799
The file was modifiedllvm/include/llvm/ProfileData/SampleProfReader.h
The file was modifiedllvm/include/llvm/ProfileData/SampleProfWriter.h
Commit 236f8012c942bbf49bd4ff0eb5ea287b0f47f9f2 by Louis Dionne
[libc++] Fix typo in documentation for LIBCXX_HERMETIC_STATIC_LIBRARY
Thanks to Yichen Yan for the patch. Differential Revision:
https://reviews.llvm.org/D66675
llvm-svn: 369800
The file was modifiedlibcxx/docs/BuildingLibcxx.rst
Commit 07a3b59279c4f67188b428fb315e1761a04e8116 by a.bataev
[OPENMP5]Use nonmonotonic modifier by default for non-static and
non-ordered loops.
According to OpenMP 5.0, 2.9.2 Worksharing-Loop Construct, Desription,
If the static schedule kind is specified or if the ordered clause is
specified, and if the nonmonotonic modifier is not specified, the effect
is as if the monotonic modifier is specified. Otherwise, unless the
monotonic modifier is specified, the effect is as if the nonmonotonic
modifier is specified. The first part of this requirement is implemented
in runtime. Patch adds support for the second, nonmonotonic, part of
this requirement.
llvm-svn: 369801
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp
The file was modifiedclang/test/OpenMP/for_codegen.cpp
Commit bc173d4c515a461d2177121da8ef7657b6c5b8a7 by craig.topper
[X86] Move a transform out of combineConcatVectorOps so we don't
prematurely turn CONCAT_VECTORS into INSERT_SUBVECTORS.
CONCAT_VECTORS and INSERT_SUBVECTORS can both call
combineConcatVectorOps, but we shouldn't produce INSERT_SUBVECTORS from
there. We should keep CONCAT_VECTORS until vector legalization.
Noticed while looking at the madd_quad_reduction test from madd.ll
llvm-svn: 369802
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit dc5f805d31f62e094bd3eb105b47620633f65e5b by benny.kra
Do a sweep of symbol internalization. NFC.
llvm-svn: 369803
The file was modifiedllvm/lib/Remarks/RemarkParser.cpp
The file was modifiedllvm/lib/MC/MCDwarf.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was modifiedclang/lib/Parse/ParseDecl.cpp
The file was modifiedllvm/lib/Target/X86/X86IndirectBranchTracking.cpp
The file was modifiedllvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
The file was modifiedclang/lib/CodeGen/CGNonTrivialStruct.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporter.cpp
The file was modifiedllvm/lib/LTO/SummaryBasedOptimizations.cpp
The file was modifiedllvm/lib/Support/FileCheck.cpp
The file was modifiedllvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
The file was modifiedllvm/lib/IR/DIBuilder.cpp
The file was modifiedllvm/lib/Bitcode/Writer/BitcodeWriter.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64SpeculationHardening.cpp
The file was modifiedllvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
The file was modifiedclang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
The file was modifiedllvm/lib/CodeGen/TargetPassConfig.cpp
The file was modifiedllvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
The file was modifiedllvm/lib/Transforms/Scalar/LoopFuse.cpp
Commit 5a5a139917593409f1dc6af0b0e10caedf091fcb by jdoerfert
[Attributor] Manifest alignment in load and store instructions
Summary: We can now manifest alignment information in load/store
instructions if the pointer is known to have a better alignment.
Reviewers: uenoku, sstefan1, lebedev.ri
Subscribers: hiraditya, bollu, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66567
llvm-svn: 369804
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
The file was modifiedllvm/test/Transforms/FunctionAttrs/align.ll
Commit 277631e3b8dda9afaa5ddc16e69116455e68ae87 by vkeles
[GlobalISel] Legalizer: Retry combining illegal artifacts as long as
there new artifacts
Summary: Currently, Legalizer aborts if it’s unable to legalize
artifacts. However, it’s possible to combine them after processing the
rest of the instruction because the legalization is likely to generate
more artifacts that allow ArtifactCombiner to combine away them.
Instead, move illegal artifacts to another list called RetryList and
wait until all of the instruction in InstList are legalized. After that,
check if there is any new artifacts and try to combine them again if
that’s the case. If not, abort. The idea is similar to D59339, but the
approach is a bit different.
This patch fixes the issue described above, but the legalizer still may
be unable to handle some cases depending on when to legalize artifacts.
So, in the long run, we probably need a different legalization strategy
that handles this dependency in a better way.
Reviewers: dsanders, aditya_nandakumar, qcolombet, arsenm, aemerson,
paquette
Reviewed By: dsanders
Subscribers: jvesely, wdng, nhaehnle, rovka, javed.absar, hiraditya,
Petar.Avramovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65894
llvm-svn: 369805
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fcanonicalize.mir
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/retry-artifact-combine.mir
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-unmerge-values.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fadd.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fsqrt.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-umin.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-umax.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-and.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-smax.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fneg.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-select.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fminnum.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fma.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-lshr.mir
The file was modifiedllvm/lib/CodeGen/GlobalISel/Legalizer.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-phi.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fsub.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-or.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fabs.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/artifact-combiner-zext.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ashr.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fmul.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-shl.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fmaxnum.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-xor.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/artifact-combiner-sext.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-extract.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-smin.mir
Commit 83fe56b3b95672be8f64f32f4f472bedca402369 by Jessica Paquette
[AArch64][GlobalISel] Import XRO load/store patterns instead of custom
selection
Instead of using custom C++ in `earlySelect` for loads and stores, just
import the patterns.
Remove `earlySelectLoad`, since we can just import the work it's doing.
Some minor changes to how `ComplexRendererFns` are returned for the XRO
addressing modes. If you add immediates in two steps, sometimes they are
not imported properly and you only end up with one immediate. I'm not
sure if this is intentional.
- Update load-addressing-modes.mir to include the instructions we can
now
import.
- Add a similar test, store-addressing-modes.mir to show which store
opcodes we
currently import, and show that we can pull in shifts etc.
- Update arm64-fastisel-gep-promote-before-add.ll to use FastISel
instead of
GISel. This test failed with GISel because GISel folds the gep into the
load.
The test checks that FastISel doesn't fold non-pointer-width adds into
loads.
GISel on the other hand, produces a G_CONSTANT of -128 for the add, and
then
a G_GEP, which must be pointer-width.
Note that we don't get STRBRoX right now. It seems like the importer
can't handle `FPR8Op:{ *:[Untyped] }:$Rt` source operands. So, those are
not currently supported.
Differential Revision: https://reviews.llvm.org/D66679
llvm-svn: 369806
The file was modifiedllvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/store-addressing-modes.mir
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrFormats.td
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/load-addressing-modes.mir
The file was modifiedllvm/test/CodeGen/AArch64/arm64-fastisel-gep-promote-before-add.ll
Commit a47d622240b199d6ab8736d83e1e3de44556f4a1 by Lang Hames
[ORC] Fix an incorrect comment.
llvm-svn: 369807
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/Core.h
Commit e00585c77ca63928794e730ac38194c659819db4 by Lang Hames
[ORC] Fix a FIXME: Propagate errors to dependencies.
When symbols are failed (via
MaterializationResponsibility::failMaterialization) any symbols
depending on them will now be moved to an error state. Attempting to
resolve or emit a symbol in the error state (via the notifyResolved or
notifyEmitted methods on MaterializationResponsibility) will result in
an error. If notifyResolved or notifyEmitted return an error due to
failure of a dependence then the caller should log or discard the error
and call failMaterialization to propagate the failure to any queries
waiting on the symbols being resolved/emitted (plus their dependencies).
llvm-svn: 369808
The file was modifiedllvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
The file was modifiedllvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/Core.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/Core.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/LazyReexports.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp
The file was modifiedllvm/unittests/ExecutionEngine/Orc/LazyCallThroughAndReexportsTest.cpp
Commit 7371fb422900fc5abf9671f9954b460ac94bc80e by Lang Hames
[ORC] Remove query dependencies when symbols are resolved.
If the dependencies are not removed then a late failure (one symbol
covered by the query failing after others have already been resolved)
can result in an attempt to detach the query from already finalized
symbol, resulting in an assert/crash. This patch fixes the issue by
removing query dependencies in JITDylib::resolve for symbols that meet
the required state.
llvm-svn: 369809
The file was modifiedllvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/Core.cpp
Commit b7be5b90955eac64622e07b11e6b4fbbdbcea0a2 by gchatelet
[LLVM][NFC] remove unused fields
Summary: Here is the commit introducing the fields
https://github.com/llvm/llvm-project/commit/cf6749e4c091
It dates back from 2006 and was used by AArch64 backend. There is no
more reference to these fields in the whole codebase so I think it's
fine.
Reviewers: courbet
Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66683
llvm-svn: 369810
The file was modifiedllvm/include/llvm/CodeGen/BasicTTIImpl.h
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
The file was modifiedllvm/lib/CodeGen/TargetLoweringBase.cpp
Commit 245154de50021041710b32e9a062bc075b321422 by juliehockett
[clang-doc] Bump BitcodeWriter max line number to 32U
PR43039 reports hitting the assert on a very large file, so bumping this
to allow for larger files.
Differential Revision: https://reviews.llvm.org/D66681
llvm-svn: 369811
The file was modifiedclang-tools-extra/clang-doc/BitcodeWriter.h
Commit a3b831aec32cd0f1deb03cfe23aef2ad66a3aabe by spatel
[x86] add tests for bt/test; NFC
llvm-svn: 369812
The file was modifiedllvm/test/CodeGen/X86/test-vs-bittest.ll
Commit f7ca57468a6bbdc55e4183e492404aee0d000a8c by peter
Move a break into the correct place. NFCI.
Should silence new C fallthrough warning.
llvm-svn: 369813
The file was modifiedcompiler-rt/lib/builtins/cpu_model.c
Commit f869ec8d4981afb18356d98a6b27c85d4e2affe3 by Adrian Prantl
Upstream support for macCatalyst Mach-O binaries.
On macOS one Mach-O slice can contain multiple load commands: One load
command for being loaded into a macOS process and one load command for
being loaded into a macCatalyst process. This patch adds support for the
new load command and makes sure ObjectFileMachO returns the Architecture
that matches the Module.
Differential Revision: https://reviews.llvm.org/D66626
llvm-svn: 369814
The file was modifiedlldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
The file was modifiedlldb/lit/Modules/MachO/lc_build_version.yaml
The file was modifiedlldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
Commit 5b31ac509687bdcef5a29b69e930f834e26ac2f9 by peter
hwasan: Fix use of uninitialized memory.
Reported by e.g.
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/23071/steps/build%20with%20ninja/logs/stdio
llvm-svn: 369815
The file was modifiedllvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
Commit 8fe1245a0f75ebd9e3eb887d870e948801ea62e6 by Stanislav.Mekhanoshin
[AMDGPU] w/a for gfx908 mfma SrcC literal HW bug
gfx908 ignores an mfma if SrcC is a literal.
Differential Revision: https://reviews.llvm.org/D66670
llvm-svn: 369816
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPU.td
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
The file was modifiedllvm/lib/Target/AMDGPU/SIFoldOperands.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/agpr-register-count.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.mfma.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.h
Commit 6379e5c8a44118771a091d4f3c8d8f2c09356a45 by xazax.hun
[LifetimeAnalysis] Make it possible to disable the new warnings
llvm-svn: 369817
The file was addedclang/test/Sema/warn-lifetime-analysis-nocfg-disabled.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Sema/SemaInit.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticGroups.td
Commit e6e1c4eac0425a6057353e03ebc741173a4e49b5 by Stanislav.Mekhanoshin
[AMDGPU] w/a for gfx908 mfma SrcC literal HW bug
gfx908 ignores an mfma if SrcC is a literal.
Differential Revision: https://reviews.llvm.org/D66670
llvm-svn: 369818
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.cpp
Commit b37d6a750a0f75781420d90ecbc067a95a2155da by Stanislav.Mekhanoshin
[AMDGPU] Check for immediate SrcC in mfma in AsmParser
Differential Revision: https://reviews.llvm.org/D66674
llvm-svn: 369819
The file was modifiedllvm/test/MC/AMDGPU/mai-err.s
The file was modifiedllvm/test/MC/AMDGPU/mai.s
The file was modifiedllvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
Commit 665a64265e7eec886fd37e65f2e821d08443d634 by xazax.hun
Fix a test to test what the name suggest.
llvm-svn: 369820
The file was modifiedclang/test/Sema/warn-lifetime-analysis-nocfg-disabled.cpp
Commit 77017ad306f7c5ecbda6a9ce68356fecff0e66fc by Vedant Kumar
Skip tail call frame tests when dwarf_version < 4
rdar://problem/54656572
llvm-svn: 369821
The file was modifiedlldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/TestDisambiguateCallSite.py
The file was modifiedlldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/TestDisambiguateTailCallSeq.py
The file was modifiedlldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py
The file was modifiedlldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/TestArtificialFrameStepOutMessage.py
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbtest.py
The file was modifiedlldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/TestAmbiguousTailCallSeq2.py
The file was modifiedlldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/TestDisambiguatePathsToCommonSink.py
The file was modifiedlldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/TestAmbiguousTailCallSeq1.py
The file was modifiedlldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/TestInliningAndTailCalls.py
Commit eb8ea5e2f133a8c2986d9533b37f0c68e70dea3e by Jan Korous
[libclang][index][NFC] Fix test for skipping already parsed function
bodies
llvm-svn: 369822
The file was modifiedclang/test/Index/skip-parsed-bodies/compile_commands.json
Commit 05bc1468c2f4f7cbe707aba722e651e4a414e829 by mitchphillips
Fix stack_trace_compressor builds for Clang < 6.0
Summary: Clang 4.* doesn't supply -fsanitize=fuzzer, and Clang 5.*
doesn't supply
-fsanitize=fuzzer-no-link. Generally, in LLVM, fuzz targets are added
through the add_llvm_fuzzer build rule, which can't be used in
compiler-rt (as it has to be able to be standalone built).
Instead of adding tooling to add a dummy main (which kind of defeats the
purpose of these fuzz targets), we instead build the fuzz target only
when the Clang version is >= 6.*.
Reviewers: tejohnson
Subscribers: mgorny, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D66682
llvm-svn: 369823
The file was modifiedcompiler-rt/lib/gwp_asan/CMakeLists.txt
Commit 0b6563e8a22a12fb624be4b8c698f189d3935534 by gchatelet
[LLVM][NFC] Removing unused functions
Summary: Removes a not so useful function from DataLayout and cleans up
Support/MathExtras.h
Reviewers: courbet
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66691
llvm-svn: 369824
The file was modifiedllvm/include/llvm/Support/MathExtras.h
The file was modifiedllvm/lib/Target/XCore/XCoreAsmPrinter.cpp
The file was modifiedllvm/include/llvm/IR/DataLayout.h
The file was modifiedllvm/lib/IR/DataLayout.cpp
Commit 27d69b2f4f6bf9b09755ae2428a4703eb4a4663b by mitchphillips
[GWP-ASan] Split options_parser and backtrace_sanitizer_common.
Summary: optional/options_parser and optional/backtrace_sanitizer_common
are logically separate components. They both use sanitizer-common to
power their functionality, but there was an unstated implicit dependency
that in order for backtrace_sanitizer_common to function correctly, one
had to also use options_parser.
This was because options_parser called
__sanitizer::InitialiseCommonFlags. This is a requirement for
backtrace_sanitizer_common to work, as the sanitizer unwinder uses the
sanitizer_common flags and will SEGV on a null page if they're not
initialised correctly.
This patch removes this hidden dependency. You can now use
backtrace_sanitizer_common without the requirements of options_parser.
This patch also makes the GWP-ASan unit tests only have a soft
dependency on sanitizer-common. The unit tests previously explicitly
used
__sanitizer::Printf, which is now provided under
tests/optional/printf_sanitizer_common. This allows Android to build the
unit tests using their own signal-safe printf().
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: srhines, mgorny, #sanitizers, llvm-commits,
vlad.tsyrklevich, morehouse
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D66684
llvm-svn: 369825
The file was modifiedcompiler-rt/lib/gwp_asan/tests/harness.h
The file was modifiedcompiler-rt/lib/gwp_asan/optional/backtrace.h
The file was modifiedcompiler-rt/lib/gwp_asan/options.h
The file was modifiedcompiler-rt/lib/gwp_asan/optional/backtrace_sanitizer_common.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/tests/CMakeLists.txt
The file was addedcompiler-rt/lib/gwp_asan/tests/optional/printf_sanitizer_common.cpp
Commit b2e7b8546825f8518cff440a2217a2d7ec59b97e by peter
hwasan: Align n_namesz and n_descsz to 4 when reading notes.
There is no requirement for the producer of a note to include the note
alignment in these fields. As a result we can end up missing the HWASAN
note if one of the other notes in the binary has the alignment missing.
Differential Revision: https://reviews.llvm.org/D66692
llvm-svn: 369826
The file was modifiedcompiler-rt/lib/hwasan/hwasan.cpp
Commit 0a8a225f8e6c9c9d253f06b19018528830defa7d by Jonas Devlieghere
[NFC] Fix comments and formatting.
llvm-svn: 369827
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
Commit af47d0021c7ab022b7bf7df4cfa6f98a3667e6c2 by maskray
[ELF] Align the first section of a PT_LOAD even if its type is
SHT_NOBITS
Reported at https://reviews.llvm.org/D64930#1642223
If the only section of a PT_LOAD is a SHT_NOBITS section (e.g. .bss), we
may not align its sh_offset. p_offset of the PT_LOAD will be set to
sh_offset, and we will get p_offset!=p_vaddr (mod p_align).  If such
executable is mapped by the Linux kernel, it will segfault.
After D64906, this may happen the non-linker script case.
The linker script case has had this issue for a long time. This was
fixed by rL321657 (but the test linkerscript/nobits-offset.s failed to
test a SHT_NOBITS section), but broken by rL345154.
Reviewed By: peter.smith
Differential Revision: https://reviews.llvm.org/D66658
llvm-svn: 369828
The file was addedlld/test/ELF/nobits-offset.s
The file was modifiedlld/test/ELF/linkerscript/nobits-offset.s
The file was modifiedlld/test/ELF/relocatable.s
The file was modifiedlld/test/ELF/relocation-copy-align-common.s
The file was modifiedlld/ELF/Writer.cpp
Commit 7a6182d48d63df5f2c8fbb112e0dc9c03c7e878a by richard-llvm
PR40674: fix assertion failure if a structured binding declaration has a
tuple-like decomposition that produces value-dependent reference
bindings.
llvm-svn: 369829
The file was modifiedclang/lib/Sema/SemaDeclCXX.cpp
The file was modifiedclang/test/CXX/dcl.decl/dcl.decomp/p3.cpp
Commit c34b7aaefc29e7d3d27edc1a05ec146f5006150c by Vitaly Buka
NFC: Rename some sanitizer related lifetime checks
llvm-svn: 369830
The file was addedclang/test/CodeGenCXX/lifetime-sanitizer.cpp
The file was removedclang/test/CodeGen/lifetime-asan.c
The file was removedclang/test/CodeGenCXX/lifetime-asan.cpp
The file was addedclang/test/CodeGen/lifetime-sanitizer.c
Commit d60271a1adfde38a16accb29a5e72e07d142c12a by Vitaly Buka
NFC: Rename lifetime-asan.ll -> lifetime-sanitizer.ll
llvm-svn: 369831
The file was removedllvm/test/Transforms/InstCombine/lifetime-asan.ll
The file was addedllvm/test/Transforms/InstCombine/lifetime-sanitizer.ll
Commit a39e6490af0f768996b1c462afeeec0346541fde by Alex Lorenz
Re-enable DependencyScannerTest on windows with the right fixes
It should now pass.
llvm-svn: 369832
The file was modifiedclang/unittests/Tooling/DependencyScannerTest.cpp
Commit 3f6dd0c588726b2303986c4a669451ae61b34c1e by aemerson
[GlobalISel] Introduce a G_DYN_STACKALLOC opcode to represent dynamic
allocas.
This just adds the opcode and verifier, it will be used to replace
existing dynamic alloca handling in a subsequent patch.
Differential Revision: https://reviews.llvm.org/D66677
llvm-svn: 369833
The file was modifiedllvm/include/llvm/Support/TargetOpcodes.def
The file was modifiedllvm/include/llvm/Target/GenericOpcodes.td
The file was modifiedllvm/lib/CodeGen/MachineVerifier.cpp
The file was addedllvm/test/MachineVerifier/test_g_dyn_stackalloc.mir
Commit cb167c85b468b1f3876d1b3545713703fd61faa0 by richard-llvm
PR42513: Enter the proper DeclContext before substituting into an
default template argument expression.
We already did this for type template parameters and template template
parameters, but apparently forgot to do so for non-type template
parameters. This causes the substituted default argument expression to
be substituted in the proper context, and in particular to properly mark
its subexpressions as odr-used.
llvm-svn: 369834
The file was modifiedclang/test/SemaTemplate/temp_arg_nontype_cxx11.cpp
The file was modifiedclang/lib/Sema/SemaTemplate.cpp
The file was modifiedclang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp
Commit cc25dabe23859826fdd73beda7b8d5b2ea265a34 by aemerson
Remove unnecessary REQUIRES from a test.
llvm-svn: 369835
The file was modifiedllvm/test/MachineVerifier/test_g_dyn_stackalloc.mir
Commit eb70ac024931ab66e6f2185af9ef3a39e62b683c by maskray
[LoopFusion] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off build
llvm-svn: 369836
The file was modifiedllvm/lib/Transforms/Scalar/LoopFuse.cpp
Commit dd2cf7838114c90b1513ba8591f4e615b2b0ce2a by craig.topper
[X86] Add an assert to mark more code that needs to be removed when the
vector widening legalization switch is removed again.
llvm-svn: 369837
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 62083ec15741030c5fcbc33bbd196595ffc904d9 by maskray
[ELF] Make member function Writer<ELFT>::removeEmptyPTLoad non-member.
NFC
llvm-svn: 369838
The file was modifiedlld/ELF/Writer.cpp
Commit b3eccc7f0b7f1ae6db50ab84c69b16ecd6f1a7ac by lebedev.ri
[InstCombine][NFC] reuse-constant-from-select-in-icmp.ll - revisit tests
llvm-svn: 369839
The file was modifiedllvm/test/Transforms/InstCombine/reuse-constant-from-select-in-icmp.ll
Commit 2c75fe7f2a8b2f50573e144f3ccb9b1de43a8f8f by lebedev.ri
[InstCombine] Try to reuse constant from select in leading comparison
Summary: If we have e.g.:
```
%t = icmp ult i32 %x, 65536
%r = select i1 %t, i32 %y, i32 65535
``` the constants `65535` and `65536` are suspiciously close. We could
perform a transformation to deduplicate them:
``` Name: ult
%t = icmp ult i32 %x, 65536
%r = select i1 %t, i32 %y, i32 65535
=>
%t.inv = icmp ugt i32 %x, 65535
%r = select i1 %t.inv, i32 65535, i32 %y
``` https://rise4fun.com/Alive/avb
While this may seem esoteric, this should certainly be good for vectors
(less constant pool usage) and for opt-for-size - need to have only one
constant.
But the real fun part here is that it allows further transformation, in
particular it finishes cleaning up the `clamp` folding, see e.g.
`canonicalize-clamp-with-select-of-constant-threshold-pattern.ll`. We
start with e.g.
```
%dont_need_to_clamp_positive = icmp sle i32 %X, 32767
%dont_need_to_clamp_negative = icmp sge i32 %X, -32768
%clamp_limit = select i1 %dont_need_to_clamp_positive, i32 -32768, i32
32767
%dont_need_to_clamp = and i1 %dont_need_to_clamp_positive,
%dont_need_to_clamp_negative
%R = select i1 %dont_need_to_clamp, i32 %X, i32 %clamp_limit
``` without this patch we currently produce
```
%1 = icmp slt i32 %X, 32768
%2 = icmp sgt i32 %X, -32768
%3 = select i1 %2, i32 %X, i32 -32768
%R = select i1 %1, i32 %3, i32 32767
``` which isn't really a `clamp` - both comparisons are performed on the
original value, this patch changes it into
```
%1.inv = icmp sgt i32 %X, 32767
%2 = icmp sgt i32 %X, -32768
%3 = select i1 %2, i32 %X, i32 -32768
%R = select i1 %1.inv, i32 32767, i32 %3
``` and then the magic happens! Some further transform finishes
polishing it and we finally get:
```
%t1 = icmp sgt i32 %X, -32768
%t2 = select i1 %t1, i32 %X, i32 -32768
%t3 = icmp slt i32 %t2, 32767
%R = select i1 %t3, i32 %t2, i32 32767
``` which is beautiful and just what we want.
Proofs for `getFlippedStrictnessPredicateAndConstant()` for
de-canonicalization: https://rise4fun.com/Alive/THl Proofs for the fold
itself: https://rise4fun.com/Alive/THl
Reviewers: spatel, dmgreen, nikic, xbolva00
Reviewed By: spatel
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66232
llvm-svn: 369840
The file was modifiedllvm/test/Transforms/InstCombine/unrecognized_three-way-comparison.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
The file was modifiedllvm/test/Transforms/InstCombine/xor-of-icmps-with-extra-uses.ll
The file was modifiedllvm/test/Transforms/InstCombine/reuse-constant-from-select-in-icmp.ll
The file was modifiedllvm/test/Transforms/InstCombine/canonicalize-clamp-with-select-of-constant-threshold-pattern.ll
Commit de19f749e0e6108de7eff4d77e8e6afa8c9f64cb by lebedev.ri
[InstCombine] matchThreeWayIntCompare(): commutativity awareness
Summary:
`matchThreeWayIntCompare()` looks for
```
  select i1 (a == b),
         i32 Equal,
         i32 (select i1 (a < b), i32 Less, i32 Greater)
``` but both of these selects/compares can be in it's commuted form, so
out of 8 variants, only the two most basic ones is handled. This fixes
regression being introduced in D66232.
Reviewers: spatel, nikic, efriedma, xbolva00
Reviewed By: spatel
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66607
llvm-svn: 369841
The file was modifiedllvm/test/Transforms/InstCombine/unrecognized_three-way-comparison.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
Commit 9cf08c6de1da1174986a8b198134121450832941 by lebedev.ri
[Constant] Add 'isElementWiseEqual()' method
Promoting it from InstCombine's
tryToReuseConstantFromSelectInComparison().
Return true if this constant and a constant 'Y' are element-wise equal.
This is identical to just comparing the pointers, with the exception
that for vectors, if only one of the constants has an `undef` element in
some lane, the constants still match.
llvm-svn: 369842
The file was modifiedllvm/include/llvm/IR/Constant.h
The file was modifiedllvm/lib/IR/Constants.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
Commit 98bcf690ae03db85608b2ea22eac7a91c84df4dc by dave
[Testing] Unbreak r369830
llvm-svn: 369843
The file was modifiedclang/test/CodeGenCXX/lifetime-sanitizer.cpp
Commit 6d5a8c92bfd4edcd4d43db8b613bc6712e4f6e4c by maskray
[ELF] Simplify with less_second. NFC
llvm-svn: 369844
The file was modifiedlld/ELF/Writer.cpp