SuccessChanges

Summary

  1. [clang][FileManager] Support empty file name in getVirtualFileRef for serialized diagnostics (details)
  2. [flang] Correct the interpretation of BIND(C,NAME='') (details)
  3. [SROA][TBAA] Handle shift of regular TBAA nodes (details)
  4. [gn build] try to make sync_source_lists_from_cmake.py py3-compatible (details)
  5. [gn build] Port e98060fa72cc (details)
  6. [gn build] Port f992cfba7173 (details)
  7. fix typo to cycle bots (details)
  8. [InstCombine] Conditionally emit nowrap flags when combining two adds (details)
  9. fix typo to cycle bots (details)
  10. [lldb] Move QThreadSuffixSupported and QListThreadsInStopReply into llgs (details)
  11. [lldb/test] Remove the "expect_captures" feature of lldb-server tests (details)
  12. [lldb] Only override target arch if it is compatible (details)
  13. Update OpBase.td AttrDef class to define default value for returnType and convertFromStorage (NFC) (details)
  14. Revert "Refactor the architecture of mlir-reduce" (details)
  15. Simplify BitVector code (details)
  16. [mlir] Use default lli JIT in Integration tests (details)
  17. [lldb-vscode] Reduce chattiness of progress events (details)
  18. [AST] Replace asserts with a condition (details)
  19. Make test runnable on read-only file systems. (details)
  20. [AST] Add introspection support for more base nodes (details)
  21. Refactor the architecture of mlir-reduce (details)
  22. [WebAssembly] Codegen for i64x2.extend_{low,high}_i32x4_{s,u} (details)
  23. [lldb] Add addressing_bits to KNOWN_HOST_INFO_KEYS and sort the list (details)
  24. Use PassPipelineCLParser in mlir-reduce (details)
  25. [mlir] Fix passArg of ViewOpGraphPass (details)
  26. [InferAttributes] Materialize all infered attributes for declaration (details)
  27. [NFC] Move a recently added utility into a location to enable reuse (details)
  28. [flang] Fix typo caught by clang build (details)
  29. Fix buildbots after 61a85da (details)
Commit c1554f32e3b3fafab64698fdb5b806b1bda4aa8a by Alex Lorenz
[clang][FileManager] Support empty file name in getVirtualFileRef for serialized diagnostics

After https://reviews.llvm.org/D90484 libclang is unable to read a serialized diagnostic file
which contains a diagnostic which came from a file with an empty filename. The reason being is
that the serialized diagnostic reader is creating a virtual file for the "" filename, which now
fails after the changes in https://reviews.llvm.org/D90484. This patch restores the previous
behavior in getVirtualFileRef by allowing it to construct a file entry ref with an empty name by
pretending its name is "." so that the directory entry can be created.

Differential Revision: https://reviews.llvm.org/D100428
The file was modifiedclang/lib/Basic/FileManager.cpp
The file was addedclang/test/Misc/serialized-diags-empty-filename.c
Commit cfc12a2120fc84fd240a8a8c426e18f695bccde0 by pklausler
[flang] Correct the interpretation of BIND(C,NAME='')

An empty NAME= should mean that there is no C binding, not the
binding that would result from BIND(C) without a NAME=.
See 18.10.2p2.

Differential Revision: https://reviews.llvm.org/D100494
The file was modifiedflang/lib/Semantics/resolve-names.cpp
Commit d3e2b4c0a21f8b3861d8b64a4c2ed051694094d1 by gh
[SROA][TBAA] Handle shift of regular TBAA nodes

SROA shifts TBAA nodes in a way that may present a problem for !tbaa but not !tbaa.struct nodes.

Differential Revision: https://reviews.llvm.org/D99851
The file was modifiedllvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
The file was addedllvm/test/Transforms/SROA/tbaa-subload.ll
Commit e2006903813849eb6e4ae2c78ff89e9277a82845 by thakis
[gn build] try to make sync_source_lists_from_cmake.py py3-compatible
The file was modifiedllvm/utils/gn/build/sync_source_lists_from_cmake.py
Commit 89dc4e3312b9b735b0a6af74a63f137adcbd6bf2 by llvmgnsyncbot
[gn build] Port e98060fa72cc
The file was modifiedllvm/utils/gn/secondary/libcxx/include/BUILD.gn
Commit c0fa3fe4aa7888e92b13fda66db6634961bbb74d by llvmgnsyncbot
[gn build] Port f992cfba7173
The file was modifiedllvm/utils/gn/secondary/libcxx/include/BUILD.gn
Commit 1e89f08f59acf8ffd48ffba32ee83a63934a6314 by thakis
fix typo to cycle bots
The file was modifiedlld/ELF/LinkerScript.cpp
Commit 29f189f90d44a021dafc859b0db4def53b1b46a3 by nikita.ppv
[InstCombine] Conditionally emit nowrap flags when combining two adds

Currently, the InstCombineCompare is combining two add operations
into a single add operation which always has a nsw flag, without
checking the conditions to see if this flag should be present
according to the original two add operations or not.

This patch will change the InstCombineCompare to emit the nsw or
nuw only when these flags are allowed to be generated according to
the original add operations and remove the possibility of applying
wrong optimization with passes that will perform on the IR later
in the pipeline.

To confirm that the current results are buggy and the results after
proposed patch are the correct IR the following examples from Alive2
are attached; the same results can be seen in the case of nuw flag
and nsw is just used as an example. The following link shows that
the generated IR with current LLVM is a buggy IR when none of the
original add operations have nsw flag.
https://alive2.llvm.org/ce/z/WGaDrm
The following link proves that the generated IR after the patch in
the former case is the correct IR.
https://alive2.llvm.org/ce/z/wQ7G_e

Differential Revision: https://reviews.llvm.org/D100095
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
The file was modifiedllvm/test/Transforms/InstCombine/icmp-add.ll
Commit da0ef5ad5b26529d0aedca9f6c7a2526acbfc48e by thakis
fix typo to cycle bots
The file was modifiedlld/ELF/SyntheticSections.cpp
Commit 2494243ed3f2ec2d7aba6e879fff47ff0ed71683 by pavel
[lldb] Move QThreadSuffixSupported and QListThreadsInStopReply into llgs

These were in the shared llgs+platform code, but they only make sense
for llgs (as they deal with how the server reports information about
debugged processes).
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
Commit ded660495f4e6514823db9ebadbbfa7653c061f3 by pavel
[lldb/test] Remove the "expect_captures" feature of lldb-server tests

This functionality is used exactly once, and it is trivial to implement
it differently (capture into two distinct variables, and compare for
equality afterwards).
The file was modifiedlldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py
The file was modifiedlldb/test/API/tools/lldb-server/TestLldbGdbServer.py
Commit 87183b1a7511f1726b0b19a2a217ed249ef3c5b9 by Jonas Devlieghere
[lldb] Only override target arch if it is compatible

It looks like the goal of this code is to provide a more precise
architecture definition for the target when attaching to a process. When
attaching to a foreign debugserver, you might get into a situation where
the active (host) platform will give you bogus information on the target
process.

This change allows the platform to override the target arch only with a
compatible architecture. This fixes TestTargetXMLArch.py on Apple
Silicon. Another alternative would be to just fail in this scenario and
update the test(s).
The file was modifiedlldb/source/Target/Process.cpp
Commit 543cd763a4882285f34a75db930f19fd6a21b14b by joker.eph
Update OpBase.td AttrDef class to define default value for returnType and convertFromStorage (NFC)

Differential Revision: https://reviews.llvm.org/D100356
The file was modifiedmlir/include/mlir/IR/OpBase.td
Commit a33b6471001aa8381a152c9ff49442e79d6198f8 by joker.eph
Revert "Refactor the architecture of mlir-reduce"

This reverts commit a32846b1d0147f30f6dde4bfec453cd681937005.

The build is broken with -DBUILD_SHARED_LIBS=ON:

tools/mlir/lib/Reducer/CMakeFiles/obj.MLIRReduce.dir/Tester.cpp.o: In function `mlir::Tester::isInteresting(mlir::ModuleOp) const':
Tester.cpp:(.text._ZNK4mlir6Tester13isInterestingENS_8ModuleOpE+0xa8): undefined reference to `mlir::OpPrintingFlags::OpPrintingFlags()'
Tester.cpp:(.text._ZNK4mlir6Tester13isInterestingENS_8ModuleOpE+0xc6): undefined reference to `mlir::Operation::print(llvm::raw_ostream&, mlir::OpPrintingFlags)'
The file was addedmlir/include/mlir/Reducer/ReductionTreeUtils.h
The file was modifiedmlir/tools/mlir-reduce/OptReductionPass.cpp
The file was removedmlir/tools/mlir-reduce/ReductionTreePass.cpp
The file was addedmlir/tools/mlir-reduce/Passes/OpReducer.cpp
The file was addedmlir/tools/mlir-reduce/ReductionTreeUtils.cpp
The file was modifiedmlir/tools/mlir-reduce/CMakeLists.txt
The file was modifiedmlir/include/mlir/Reducer/Tester.h
The file was modifiedmlir/lib/Reducer/Tester.cpp
The file was modifiedmlir/tools/mlir-reduce/mlir-reduce.cpp
The file was modifiedmlir/tools/mlir-reduce/ReductionNode.cpp
The file was modifiedmlir/include/mlir/Reducer/Passes/OpReducer.h
The file was modifiedmlir/include/mlir/Reducer/ReductionNode.h
The file was modifiedmlir/include/mlir/Reducer/ReductionTreePass.h
Commit 82f0e3d3ea6bf927e3397b2fb423abbc5821a30f by sguelton
Simplify BitVector code

Instead of managing memory by hand, delegate it to std::vector. This makes the
code much simpler, and also avoids repeatedly computing the storage size.

According to valgrind --tool=callgrind, this also slightly decreases the
instruction count, but by a small margin.

Differential Revision: https://reviews.llvm.org/D100387
The file was modifiedllvm/include/llvm/ADT/BitVector.h
Commit cf20286bcc9b7182a25b3cc64a87a94c383fa37f by ajcbik
[mlir] Use default lli JIT in Integration tests

Now that 9b8e7a9d ("[lli] Honor the --entry-function flag in orc and
orc-lazy modes") fixed https://llvm.org/PR49906.

Reviewed By: mehdi_amini, aartbik

Differential Revision: https://reviews.llvm.org/D100407
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-sparse-dot-product.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/AMX/test-muli-ext.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/AMX/test-mulf.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-rsqrt.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-mask-compress.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-vp2intersect-i32.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/AMX/test-muli.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/AMX/test-tilezero-block.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/AMX/test-tilezero.mlir
Commit cc88d301a0bcd8b93c632af2870503949038c87f by a20012251
[lldb-vscode] Reduce chattiness of progress events

Progress events internally have a completed count and a total count, which can mean that for a job with 20000 total counts, then there will be 20000 events fired. Sending all these events to the IDE can break it. For example, debugging a huge binary resulted in around 50 million messages, which rendered the IDE useless, as it was spending all of its resources simply parsing messages and updating the UI.

A way to fix this is to send unique percentage updates, which are at most 100 per job, which is not much. I was able to debug that big target and confirm that only unique percentage notifications are sent. I can't write a test for this because the current test is flaky. I'll figure out later how to make the test reliable, but fixing this will unblock us from deploy a new version of lldb-vscode.

Differential Revision: https://reviews.llvm.org/D100443
The file was modifiedlldb/tools/lldb-vscode/CMakeLists.txt
The file was addedlldb/tools/lldb-vscode/ProgressEvent.cpp
The file was modifiedlldb/tools/lldb-vscode/VSCode.cpp
The file was addedlldb/tools/lldb-vscode/ProgressEvent.h
The file was modifiedlldb/tools/lldb-vscode/VSCode.h
The file was modifiedlldb/tools/lldb-vscode/lldb-vscode.cpp
Commit 6559ebd91b70f8d2ed82e19539ee09c5220159c2 by steveire
[AST] Replace asserts with a condition

As was done for other locations in commit 54272e5b (NFC:
Replace asserts with if() in SourceLocation accessors, 2019-01-07).

Extracted from  https://reviews.llvm.org/D99231
The file was modifiedclang/include/clang/AST/DeclCXX.h
The file was modifiedclang/include/clang/AST/TemplateBase.h
Commit d2bb3cbbf8bc3a1b3d27c5a89e7cdd56bdca924f by saugustine
Make test runnable on read-only file systems.
The file was modifiedclang/test/Misc/serialized-diags-empty-filename.c
Commit f347f0e0b869be4f9b97f26663cf8e4eac2c4868 by steveire
[AST] Add introspection support for more base nodes

Fix the logic of detecting pseudo-virtual getBeginLoc etc on Stmt and
Decl subclasses.

Adjust the test infrastructure to filter out invalid source locations.
This makes the tests more clear about which nodes have which locations.

Differential Revision: https://reviews.llvm.org/D99231
The file was modifiedclang/unittests/Introspection/IntrospectionTest.cpp
The file was modifiedclang/include/clang/Tooling/NodeIntrospection.h
The file was modifiedclang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp
The file was modifiedclang/lib/Tooling/DumpTool/generate_cxx_src_locs.py
The file was modifiedclang/lib/Tooling/CMakeLists.txt
Commit 6b0cef3e02eef277c60c95e4c1ca71f71091d8ae by jpienaar
Refactor the architecture of mlir-reduce

Add iterator for ReductionNode traversal and use range to indicate the
region we would like to keep. Refactor the interaction between
Pass/Tester/ReductionNode.
Now it'll be easier to add new traversal type and OpReducer

Reviewed By: jpienaar, rriddle

Differential Revision: https://reviews.llvm.org/D99713
The file was modifiedmlir/tools/mlir-reduce/CMakeLists.txt
The file was modifiedmlir/include/mlir/Reducer/ReductionNode.h
The file was modifiedmlir/tools/mlir-reduce/mlir-reduce.cpp
The file was addedmlir/tools/mlir-reduce/ReductionTreePass.cpp
The file was modifiedmlir/include/mlir/Reducer/ReductionTreePass.h
The file was modifiedmlir/tools/mlir-reduce/ReductionNode.cpp
The file was modifiedmlir/lib/Reducer/Tester.cpp
The file was modifiedmlir/lib/Reducer/CMakeLists.txt
The file was removedmlir/tools/mlir-reduce/ReductionTreeUtils.cpp
The file was removedmlir/include/mlir/Reducer/ReductionTreeUtils.h
The file was modifiedmlir/tools/mlir-reduce/OptReductionPass.cpp
The file was modifiedmlir/include/mlir/Reducer/Passes/OpReducer.h
The file was removedmlir/tools/mlir-reduce/Passes/OpReducer.cpp
The file was modifiedmlir/include/mlir/Reducer/Tester.h
Commit 6a18cc23efad410db48a3ccfc233d215de7d4cb9 by tlively
[WebAssembly] Codegen for i64x2.extend_{low,high}_i32x4_{s,u}

Removes the builtins and intrinsics used to opt in to using these instructions
and replaces them with normal ISel patterns now that they are no longer
prototypes.

Differential Revision: https://reviews.llvm.org/D100402
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedllvm/test/CodeGen/WebAssembly/simd-extending.ll
The file was modifiedclang/include/clang/Basic/BuiltinsWebAssembly.def
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
The file was modifiedllvm/include/llvm/IR/IntrinsicsWebAssembly.td
The file was modifiedllvm/test/CodeGen/WebAssembly/simd-intrinsics.ll
The file was modifiedclang/test/CodeGen/builtins-wasm.c
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td
Commit a749bd76394c05b423cd643633188eb09f59fbe8 by Jonas Devlieghere
[lldb] Add addressing_bits to KNOWN_HOST_INFO_KEYS and sort the list

This fixes TestGdbRemoteHostInfo on Apple Silicon.
The file was modifiedlldb/test/API/tools/lldb-server/TestGdbRemoteHostInfo.py
Commit 222d30d32c83a56c19aa4b76649edf6131e2c1a2 by jpienaar
Use PassPipelineCLParser in mlir-reduce

We are able to config the reducer pass pipeline through command-line.

Reviewed By: jpienaar, rriddle

Differential Revision: https://reviews.llvm.org/D100155
The file was modifiedmlir/include/mlir/Reducer/ReductionTreePass.h
The file was modifiedmlir/test/mlir-reduce/dce-test.mlir
The file was modifiedmlir/test/mlir-reduce/multiple-function.mlir
The file was modifiedmlir/include/mlir/Reducer/CMakeLists.txt
The file was modifiedmlir/test/mlir-reduce/simple-test.mlir
The file was modifiedmlir/tools/mlir-reduce/OptReductionPass.cpp
The file was addedmlir/include/mlir/Reducer/Passes.h
The file was modifiedmlir/tools/mlir-reduce/ReductionTreePass.cpp
The file was modifiedmlir/tools/mlir-reduce/mlir-reduce.cpp
The file was modifiedmlir/include/mlir/Reducer/Passes.td
The file was modifiedmlir/include/mlir/Reducer/OptReductionPass.h
Commit 61500016a59616a8f5ba5a389bafec3b33845279 by jpienaar
[mlir] Fix passArg of ViewOpGraphPass

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D100156
The file was modifiedmlir/include/mlir/Transforms/Passes.td
Commit 61a85da88235983da565bda0160367461fa0f382 by listmail
[InferAttributes] Materialize all infered attributes for declaration

We have some cases today where attributes can be inferred from another on access, but the result is not explicitly materialized in IR. This change is a step towards changing that.

Why? Two main reasons:

* Human clarity. It's really confusing trying to figure out why a transform is triggering when the IR doesn't appear to have the required attributes.
* This avoids the need to special case declarations in e.g. functionattrs. Since we can assume the attribute is present, we can work directly from attributes (and only attributes) without also needing to query accessors on Function to avoid missing cases due to unannotated (but infered on use) declarations. (This piece will appear must easier to follow once D100226 also lands.)

Differential Revision: https://reviews.llvm.org/D100400
The file was modifiedllvm/test/Transforms/LICM/strlen.ll
The file was modifiedllvm/test/Other/cgscc-devirt-iteration.ll
The file was modifiedllvm/lib/Transforms/IPO/InferFunctionAttrs.cpp
The file was modifiedllvm/test/Transforms/InferFunctionAttrs/annotate.ll
Commit 3ce61fb6d697d49db471c7077b88b3b9ec9dec66 by listmail
[NFC] Move a recently added utility into a location to enable reuse

About to refresh a patch that uses this in FunctionAtrrs, doing the move seperately to control build times.
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/Local.h
The file was modifiedllvm/lib/Transforms/IPO/InferFunctionAttrs.cpp
Commit e51939eca63c33e4a57c9c1f4b7d3cd8216369d6 by pklausler
[flang] Fix typo caught by clang build

An inadvertent ! operator was (fortunately) flagged as a
warning by clang; remove it.

Differential Review: https://reviews.llvm.org/D100513
The file was modifiedflang/runtime/io-error.cpp
Commit c609d533634416fc701939d39bf1e43f293e84dc by listmail
Fix buildbots after 61a85da
The file was modifiedllvm/test/CodeGen/AMDGPU/simplify-libcalls.ll