AbortedChanges

Summary

  1. [RISCV] Remove unused ComplexPatterns. NFC (details)
  2. [NPM] Do not run function simplification pipeline unnecessarily (details)
  3. [PassManager] add helper function to hold set of vector passes (details)
  4. [mlir] Store the flag for dynamic operand storage in the low bits (details)
  5. [Index] Ignore nullptr decls for indexing (details)
  6. new altera ID dependent backward branch check (details)
  7. [gn build] Port 83af66e18e3d (details)
  8. Thread safety analysis: Eliminate parameter from intersectAndWarn (NFC) (details)
  9. When SendContinuePacketAndWaitForResponse returns eStateInvalid, don't fetch more packets. (details)
  10. [mlir][spirv] NFC: Replace OwningSPIRVModuleRef with OwningOpRef (details)
Commit 191ffda3f70b1a66794cbc8ce4e77b206041a18e by craig.topper
[RISCV] Remove unused ComplexPatterns. NFC
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
Commit 97ab068034161fb35e5c9a7b293bf1e569cf077b by mtrofin
[NPM] Do not run function simplification pipeline unnecessarily

The CGSCC pass manager interplay with the FunctionAnalysisManagerCGSCCProxy is 'special' in the sense that the former will rerun the latter if there are changes to a SCC structure; that being said, some of the functions in the SCC may be unchanged. In that case, the function simplification pipeline will be re-run, which impacts compile time[1].

This patch allows the function simplification pipeline be skipped if it was already run and the function was not modified since.

The behavior is currently disabled by default. This is because, currently, the rerunning of the function simplification pipeline on an unchanged function may still result in changes. The patch simplifies investigating and fixing those cases where repeated function pass runs do actually positively impact code quality, while offering an easy workaround for those impacted negatively by compile time regressions, and not impacting mainline scenarios.

[1] A [[ http://llvm-compile-time-tracker.com/compare.php?from=eb37d3546cd0c6e67798496634c45e501f7806f1&to=ac722d1190dc7bbdd17e977ef7ec95e69eefc91e&stat=instructions | compile time tracker ]] run with the option enabled.

Differential Revision: https://reviews.llvm.org/D98103
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedllvm/include/llvm/Analysis/CGSCCPassManager.h
The file was modifiedllvm/lib/Analysis/CGSCCPassManager.cpp
The file was addedllvm/test/Other/new-pass-manager-cgscc-fct-proxy.ll
The file was modifiedllvm/unittests/Analysis/CGSCCPassManagerTest.cpp
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
Commit fefcb1f878c2dad435af604955661ca02a5302de by spatel
[PassManager] add helper function to hold set of vector passes

This is no-functional-change-intended (NFC) and split off from
D102002 (which proposes to eliminate the LTO-based differences).
The file was modifiedllvm/include/llvm/Passes/PassBuilder.h
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/lib/Transforms/IPO/PassManagerBuilder.cpp
The file was modifiedllvm/include/llvm/Transforms/IPO/PassManagerBuilder.h
Commit 6304c0836a4dd2d77373d45716092b2a088fa948 by riddleriver
[mlir] Store the flag for dynamic operand storage in the low bits

It is currently stored in the high bits, which is disallowed on certain
platforms (e.g. android). This revision switches the representation to use
the low bits instead, fixing crashes/breakages on those platforms.

Differential Revision: https://reviews.llvm.org/D101969
The file was modifiedmlir/lib/IR/OperationSupport.cpp
The file was modifiedmlir/include/mlir/IR/OperationSupport.h
Commit a3a8a1a15b524d91b5308db68e9d293b34cd88dd by kyrtzidis
[Index] Ignore nullptr decls for indexing

We can end up with a call to `indexTopLevelDecl(D)` with `D == nullptr` in non-assert builds e.g. when indexing a module in `indexModule` and
- `ASTReader::GetDecl` returns `nullptr` if `Index >= DeclsLoaded.size()`, thus returning `nullptr`
=> `ModuleDeclIterator::operator*` returns `nullptr`
=> we call `IndexCtx.indexTopLevelDecl` with `nullptr`

Be resilient and just ignore the `nullptr` decls during indexing.

Reviewed By: akyrtzi

Differential Revision: https://reviews.llvm.org/D102001
The file was modifiedclang/lib/Index/IndexDecl.cpp
Commit 83af66e18e3d3760d56ea7e3bdbff3428ae7730d by aaron
new altera ID dependent backward branch check

This lint check is a part of the FLOCL (FPGA Linters for OpenCL) project
out of the Synergy Lab at Virginia Tech.

FLOCL is a set of lint checks aimed at FPGA developers who write code
in OpenCL.

The altera ID dependent backward branch lint check finds ID dependent
variables and fields used within loops, and warns of their usage. Using
these variables in loops can lead to performance degradation.
The file was addedclang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.h
The file was modifiedclang-tools-extra/docs/clang-tidy/checks/list.rst
The file was addedclang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.cpp
The file was addedclang-tools-extra/docs/clang-tidy/checks/altera-id-dependent-backward-branch.rst
The file was modifiedclang-tools-extra/clang-tidy/altera/CMakeLists.txt
The file was addedclang-tools-extra/test/clang-tidy/checkers/altera-id-dependent-backward-branch.cpp
The file was modifiedclang-tools-extra/clang-tidy/altera/AlteraTidyModule.cpp
The file was modifiedclang-tools-extra/docs/ReleaseNotes.rst
Commit fca10c8808ff22f3069359b2f6b2d410612c70c1 by llvmgnsyncbot
[gn build] Port 83af66e18e3d
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clang-tidy/altera/BUILD.gn
Commit d21e1b79ff7d40bca537c30da706e31e48483f21 by aaron.puchert
Thread safety analysis: Eliminate parameter from intersectAndWarn (NFC)

We were modifying precisely when intersecting the lock sets of multiple
predecessors without back edge. That's no coincidence: we can't modify
on back edges, it doesn't make sense to modify at the end of a function,
and otherwise we always want to intersect on forward edges, because we
can build a new lock set for those.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D101755
The file was modifiedclang/lib/Analysis/ThreadSafety.cpp
Commit 72ba78c29e923cb6e5d89eb5ea8180bf723188be by jingham
When SendContinuePacketAndWaitForResponse returns eStateInvalid, don't fetch more packets.

This looks like just an oversight in the AsyncThread function.  It gets a result of
eStateInvalid, and then marks the process as exited, but doesn't set "done" to true,
so we go to fetch another event.  That is not safe, since you don't know when that
extra packet is going to arrive.  If it arrives while you are tearing down the
process, the internal-state-thread might try to handle it when the process in not
in a good state.

Rather than put more effort into checking all the shutdown paths to make sure this
extra packet doesn't cause problems, just don't fetch it.  We weren't going to do
anything useful with it anyway.

The main part of the patch is setting "done = true" when we get the eStateInvalid.
I also added a check at the beginning of the while(done) loop to prevent another error
from getting us to fetch packets for an exited process.

I added a test case to ensure that if an Interrupt fails, we call the process
exited.  I can't test exactly the error I'm fixing, there's no good way to know
that the stop reply for the failed interrupt wasn't fetched.  But at least this
asserts that the overall behavior is correct.

Differential Revision: https://reviews.llvm.org/D101933
The file was modifiedlldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
The file was addedlldb/test/API/functionalities/gdb_remote_client/TestHaltFails.py
Commit 41bc54cc56fd9e9cdaaeb9ca630f0c690e1a28e4 by antiagainst
[mlir][spirv] NFC: Replace OwningSPIRVModuleRef with OwningOpRef

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D102009
The file was modifiedmlir/unittests/Dialect/SPIRV/DeserializationTest.cpp
The file was modifiedmlir/lib/Target/SPIRV/TranslateRegistration.cpp
The file was modifiedmlir/test/lib/Dialect/SPIRV/TestGLSLCanonicalization.cpp
The file was modifiedmlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Linking/ModuleCombiner/ModuleCombiner.cpp
The file was modifiedmlir/lib/Target/SPIRV/Deserialization/Deserialization.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/Linking/ModuleCombiner.h
The file was modifiedmlir/lib/Target/SPIRV/Deserialization/Deserializer.h
The file was modifiedmlir/unittests/Dialect/SPIRV/SerializationTest.cpp
The file was removedmlir/include/mlir/Dialect/SPIRV/IR/SPIRVModule.h
The file was modifiedmlir/test/lib/Dialect/SPIRV/TestModuleCombiner.cpp
The file was modifiedmlir/include/mlir/Target/SPIRV/Deserialization.h