[all-commits] [llvm/llvm-project] 8eff57: Add missing dep on MLIRToLLVMIRTranslationRegistra...

Vitaly Buka via All-commits all-commits at lists.llvm.org
Tue Dec 12 17:07:54 PST 2023


  Branch: refs/heads/users/vitalybuka/spr/sanitizer-pre-commit-disabled-test-for-fork
  Home:   https://github.com/llvm/llvm-project
  Commit: 8eff5704829ba5edd28754fd9ec7665b34fde22a
      https://github.com/llvm/llvm-project/commit/8eff5704829ba5edd28754fd9ec7665b34fde22a
  Author: Stella Laurenzo <stellaraccident at gmail.com>
  Date:   2023-12-12 (Tue, 12 Dec 2023)

  Changed paths:
    M mlir/tools/mlir-opt/CMakeLists.txt
    M mlir/tools/mlir-opt/mlir-opt.cpp

  Log Message:
  -----------
  Add missing dep on MLIRToLLVMIRTranslationRegistration to mlir-opt. (#75111)

I was not able to fully triage why this just started failing on one of
our bots as it seems that the use was added 4 months ago. I would assume
that it was accidentally coming in transitively in some way as the dep
was definitely missing.

For context, this started failing in [our
byo_llvm](https://github.com/openxla/iree/blob/main/build_tools/llvm/byo_llvm.sh)
build on a stock build of MLIR on top of an existing LLVM. We were
getting:

```
ld.lld: error: undefined symbol: mlir::registerSPIRVDialectTranslation(mlir::DialectRegistry&)                                                        >>> referenced by mlir-opt.cpp
>>>               tools/mlir-opt/CMakeFiles/mlir-opt.dir/mlir-opt.cpp.o:(main)
```


  Commit: 365777ecbe18777431681fb54d068885044c6ef1
      https://github.com/llvm/llvm-project/commit/365777ecbe18777431681fb54d068885044c6ef1
  Author: Aart Bik <39774503+aartbik at users.noreply.github.com>
  Date:   2023-12-12 (Tue, 12 Dec 2023)

  Changed paths:
    M mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt
    R mlir/lib/Dialect/SparseTensor/Transforms/CodegenEnv.cpp
    R mlir/lib/Dialect/SparseTensor/Transforms/CodegenEnv.h
    R mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp
    R mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.h
    R mlir/lib/Dialect/SparseTensor/Transforms/IterationGraphSorter.cpp
    R mlir/lib/Dialect/SparseTensor/Transforms/IterationGraphSorter.h
    R mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp
    R mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.h
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseBufferRewriting.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseReinterpretMap.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseStorageSpecifierToLLVM.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
    R mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorDescriptor.cpp
    R mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorDescriptor.h
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/CodegenEnv.cpp
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/CodegenEnv.h
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/CodegenUtils.cpp
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/CodegenUtils.h
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/IterationGraphSorter.cpp
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/IterationGraphSorter.h
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/LoopEmitter.cpp
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/LoopEmitter.h
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorDescriptor.cpp
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorDescriptor.h
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  [mlir][sparse] refactor utilities into transform/utils dir (#75250)

Separates actual transformation files from supporting utility files in
the transforms directory. Includes a bazel overlay fix for the build (as
well as a bit of cleanup of that file to be less verbose and more
flexible).


  Commit: 19fff858931bf575b63a0078cc553f8f93cced20
      https://github.com/llvm/llvm-project/commit/19fff858931bf575b63a0078cc553f8f93cced20
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2023-12-12 (Tue, 12 Dec 2023)

  Changed paths:
    M llvm/lib/Target/TargetMachine.cpp
    M llvm/test/CodeGen/X86/code-model-elf-sections.ll

  Log Message:
  -----------
  Revert "[X86] Set SHF_X86_64_LARGE for globals with explicit well-known large section name (#74381)"

This reverts commit 323451ab88866c42c87971cbc670771bd0d48692.

Code with these section names in the wild doesn't compile because
support for large globals in the small code model is not complete yet.


  Commit: 27259f17e9d273147c648331e92000a48677f489
      https://github.com/llvm/llvm-project/commit/27259f17e9d273147c648331e92000a48677f489
  Author: paperchalice <liujunchang97 at outlook.com>
  Date:   2023-12-13 (Wed, 13 Dec 2023)

  Changed paths:
    M llvm/include/llvm/CodeGen/CodeGenPassBuilder.h
    M llvm/include/llvm/CodeGen/MachinePassRegistry.def
    M llvm/include/llvm/Transforms/CFGuard.h
    M llvm/lib/Passes/CMakeLists.txt
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/lib/Passes/PassRegistry.def
    M llvm/lib/Transforms/CFGuard/CFGuard.cpp

  Log Message:
  -----------
  [CodeGen] Port `CFGuard` to new pass manager (#75146)

Port `CFGuard` to new pass manager, add a pass parameter to choose guard
mechanism.


  Commit: dd9587795811ba21e6ca6ad52b4531e17e6babd6
      https://github.com/llvm/llvm-project/commit/dd9587795811ba21e6ca6ad52b4531e17e6babd6
  Author: Greg Clayton <gclayton at fb.com>
  Date:   2023-12-12 (Tue, 12 Dec 2023)

  Changed paths:
    M lldb/include/lldb/Core/Module.h
    M lldb/include/lldb/Core/ModuleList.h
    M lldb/include/lldb/Symbol/CompilerDecl.h
    M lldb/include/lldb/Symbol/CompilerDeclContext.h
    M lldb/include/lldb/Symbol/SymbolFile.h
    M lldb/include/lldb/Symbol/SymbolFileOnDemand.h
    M lldb/include/lldb/Symbol/Type.h
    M lldb/include/lldb/Symbol/TypeMap.h
    M lldb/include/lldb/Symbol/TypeSystem.h
    M lldb/include/lldb/lldb-forward.h
    M lldb/include/lldb/lldb-private-enumerations.h
    M lldb/source/API/SBModule.cpp
    M lldb/source/API/SBTarget.cpp
    M lldb/source/Commands/CommandObjectMemory.cpp
    M lldb/source/Commands/CommandObjectTarget.cpp
    M lldb/source/Core/Module.cpp
    M lldb/source/Core/ModuleList.cpp
    M lldb/source/DataFormatters/TypeFormat.cpp
    M lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
    M lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
    M lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
    M lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
    M lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
    M lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp
    M lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.h
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
    M lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
    M lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
    M lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
    M lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
    M lldb/source/Symbol/CompilerDecl.cpp
    M lldb/source/Symbol/CompilerDeclContext.cpp
    M lldb/source/Symbol/SymbolFile.cpp
    M lldb/source/Symbol/SymbolFileOnDemand.cpp
    M lldb/source/Symbol/Type.cpp
    M lldb/source/Symbol/TypeMap.cpp
    M lldb/source/Symbol/TypeSystem.cpp
    M lldb/source/Target/Language.cpp
    A lldb/test/API/functionalities/type_find_first/Makefile
    A lldb/test/API/functionalities/type_find_first/TestFindFirstType.py
    A lldb/test/API/functionalities/type_find_first/main.cpp
    M lldb/test/API/lang/cpp/unique-types4/TestUniqueTypes4.py
    M lldb/test/API/lang/cpp/unique-types4/main.cpp
    M lldb/tools/lldb-test/lldb-test.cpp

  Log Message:
  -----------
  [lldb] Make only one function that needs to be implemented when searching for types (#74786)

This patch revives the effort to get this Phabricator patch into
upstream:

https://reviews.llvm.org/D137900

This patch was accepted before in Phabricator but I found some
-gsimple-template-names issues that are fixed in this patch.

A fixed up version of the description from the original patch starts
now.

This patch started off trying to fix Module::FindFirstType() as it
sometimes didn't work. The issue was the SymbolFile plug-ins didn't do
any filtering of the matching types they produced, and they only looked
up types using the type basename. This means if you have two types with
the same basename, your type lookup can fail when only looking up a
single type. We would ask the Module::FindFirstType to lookup "Foo::Bar"
and it would ask the symbol file to find only 1 type matching the
basename "Bar", and then we would filter out any matches that didn't
match "Foo::Bar". So if the SymbolFile found "Foo::Bar" first, then it
would work, but if it found "Baz::Bar" first, it would return only that
type and it would be filtered out.

Discovering this issue lead me to think of the patch Alex Langford did a
few months ago that was done for finding functions, where he allowed
SymbolFile objects to make sure something fully matched before parsing
the debug information into an AST type and other LLDB types. So this
patch aimed to allow type lookups to also be much more efficient.

As LLDB has been developed over the years, we added more ways to to type
lookups. These functions have lots of arguments. This patch aims to make
one API that needs to be implemented that serves all previous lookups:

- Find a single type
- Find all types
- Find types in a namespace

This patch introduces a `TypeQuery` class that contains all of the state
needed to perform the lookup which is powerful enough to perform all of
the type searches that used to be in our API. It contain a vector of
CompilerContext objects that can fully or partially specify the lookup
that needs to take place.

If you just want to lookup all types with a matching basename,
regardless of the containing context, you can specify just a single
CompilerContext entry that has a name and a CompilerContextKind mask of
CompilerContextKind::AnyType.

Or you can fully specify the exact context to use when doing lookups
like: CompilerContextKind::Namespace "std"
CompilerContextKind::Class "foo"
CompilerContextKind::Typedef "size_type"

This change expands on the clang modules code that already used a
vector<CompilerContext> items, but it modifies it to work with
expression type lookups which have contexts, or user lookups where users
query for types. The clang modules type lookup is still an option that
can be enabled on the `TypeQuery` objects.

This mirrors the most recent addition of type lookups that took a
vector<CompilerContext> that allowed lookups to happen for the
expression parser in certain places.

Prior to this we had the following APIs in Module:

```
void
Module::FindTypes(ConstString type_name, bool exact_match, size_t max_matches,
                  llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
                  TypeList &types);

void
Module::FindTypes(llvm::ArrayRef<CompilerContext> pattern, LanguageSet languages,
                  llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
                  TypeMap &types);

void Module::FindTypesInNamespace(ConstString type_name,
                                  const CompilerDeclContext &parent_decl_ctx,
                                  size_t max_matches, TypeList &type_list);
```

The new Module API is much simpler. It gets rid of all three above
functions and replaces them with:

```
void FindTypes(const TypeQuery &query, TypeResults &results);
```
The `TypeQuery` class contains all of the needed settings:

- The vector<CompilerContext> that allow efficient lookups in the symbol
file classes since they can look at basename matches only realize fully
matching types. Before this any basename that matched was fully realized
only to be removed later by code outside of the SymbolFile layer which
could cause many types to be realized when they didn't need to.
- If the lookup is exact or not. If not exact, then the compiler context
must match the bottom most items that match the compiler context,
otherwise it must match exactly
- If the compiler context match is for clang modules or not. Clang
modules matches include a Module compiler context kind that allows types
to be matched only from certain modules and these matches are not needed
when d oing user type lookups.
- An optional list of languages to use to limit the search to only
certain languages

The `TypeResults` object contains all state required to do the lookup
and store the results:
- The max number of matches
- The set of SymbolFile objects that have already been searched
- The matching type list for any matches that are found

The benefits of this approach are:
- Simpler API, and only one API to implement in SymbolFile classes
- Replaces the FindTypesInNamespace that used a CompilerDeclContext as a
way to limit the search, but this only worked if the TypeSystem matched
the current symbol file's type system, so you couldn't use it to lookup
a type in another module
- Fixes a serious bug in our FindFirstType functions where if we were
searching for "foo::bar", and we found a "baz::bar" first, the basename
would match and we would only fetch 1 type using the basename, only to
drop it from the matching list and returning no results


  Commit: a1af4dfe38230e3596e120053b968b60cea5035a
      https://github.com/llvm/llvm-project/commit/a1af4dfe38230e3596e120053b968b60cea5035a
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2023-12-12 (Tue, 12 Dec 2023)

  Changed paths:
    M compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.cpp
    M lldb/include/lldb/Core/Module.h
    M lldb/include/lldb/Core/ModuleList.h
    M lldb/include/lldb/Symbol/CompilerDecl.h
    M lldb/include/lldb/Symbol/CompilerDeclContext.h
    M lldb/include/lldb/Symbol/SymbolFile.h
    M lldb/include/lldb/Symbol/SymbolFileOnDemand.h
    M lldb/include/lldb/Symbol/Type.h
    M lldb/include/lldb/Symbol/TypeMap.h
    M lldb/include/lldb/Symbol/TypeSystem.h
    M lldb/include/lldb/lldb-forward.h
    M lldb/include/lldb/lldb-private-enumerations.h
    M lldb/source/API/SBModule.cpp
    M lldb/source/API/SBTarget.cpp
    M lldb/source/Commands/CommandObjectMemory.cpp
    M lldb/source/Commands/CommandObjectTarget.cpp
    M lldb/source/Core/Module.cpp
    M lldb/source/Core/ModuleList.cpp
    M lldb/source/DataFormatters/TypeFormat.cpp
    M lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
    M lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
    M lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
    M lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
    M lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
    M lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp
    M lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.h
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
    M lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
    M lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
    M lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
    M lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
    M lldb/source/Symbol/CompilerDecl.cpp
    M lldb/source/Symbol/CompilerDeclContext.cpp
    M lldb/source/Symbol/SymbolFile.cpp
    M lldb/source/Symbol/SymbolFileOnDemand.cpp
    M lldb/source/Symbol/Type.cpp
    M lldb/source/Symbol/TypeMap.cpp
    M lldb/source/Symbol/TypeSystem.cpp
    M lldb/source/Target/Language.cpp
    A lldb/test/API/functionalities/type_find_first/Makefile
    A lldb/test/API/functionalities/type_find_first/TestFindFirstType.py
    A lldb/test/API/functionalities/type_find_first/main.cpp
    M lldb/test/API/lang/cpp/unique-types4/TestUniqueTypes4.py
    M lldb/test/API/lang/cpp/unique-types4/main.cpp
    M lldb/tools/lldb-test/lldb-test.cpp
    M llvm/include/llvm/CodeGen/CodeGenPassBuilder.h
    M llvm/include/llvm/CodeGen/MachinePassRegistry.def
    M llvm/include/llvm/Transforms/CFGuard.h
    M llvm/lib/Passes/CMakeLists.txt
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/lib/Passes/PassRegistry.def
    M llvm/lib/Target/TargetMachine.cpp
    M llvm/lib/Transforms/CFGuard/CFGuard.cpp
    M llvm/test/CodeGen/X86/code-model-elf-sections.ll
    M mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt
    R mlir/lib/Dialect/SparseTensor/Transforms/CodegenEnv.cpp
    R mlir/lib/Dialect/SparseTensor/Transforms/CodegenEnv.h
    R mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp
    R mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.h
    R mlir/lib/Dialect/SparseTensor/Transforms/IterationGraphSorter.cpp
    R mlir/lib/Dialect/SparseTensor/Transforms/IterationGraphSorter.h
    R mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp
    R mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.h
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseBufferRewriting.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseReinterpretMap.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseStorageSpecifierToLLVM.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
    R mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorDescriptor.cpp
    R mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorDescriptor.h
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/CodegenEnv.cpp
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/CodegenEnv.h
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/CodegenUtils.cpp
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/CodegenUtils.h
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/IterationGraphSorter.cpp
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/IterationGraphSorter.h
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/LoopEmitter.cpp
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/LoopEmitter.h
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorDescriptor.cpp
    A mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorDescriptor.h
    M mlir/tools/mlir-opt/CMakeLists.txt
    M mlir/tools/mlir-opt/mlir-opt.cpp
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  @fmayer comments

Created using spr 1.3.4


Compare: https://github.com/llvm/llvm-project/compare/3ceddfbc5d92...a1af4dfe3823


More information about the All-commits mailing list