LLVM/project 1003a8dlldb/packages/Python/lldbsuite/test/make Makefile.rules

Revert "[lldb/test] Codesign executables built with custom Makefile rules (#1…"

This reverts commit 478a6abc0ceea812c9486d13fda4afbe876c670f.
DeltaFile
+0-7lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+0-71 files

LLVM/project b4302daclang-tools-extra/clang-doc Representation.cpp Representation.h

[clang-doc] Support deep copy between arenas for merging

Upcoming changes to the merge step will necessitate that we clear the
transient arenas and merge new items into the persistent arena. However
there are some challenges with that, as the existing types typically
don't want to be copied. We introduce some new APIs to simplify that
task and ensure we don't accidentally leak memory.

On the performance front, we reclaim about 2% of the overhead, bringing
the cumulative overhead from the series of patches down to about 7% over
the baseline.

| Metric | Baseline | Prev | This | Culm% | Seq% |
| :--- | :--- | :--- | :--- | :--- | :--- |
| Time | 920.5s | 1014.5s | 991.5s | +7.7% | -2.3% |
| Memory | 86.0G | 39.9G | 40.0G | -53.4% | +0.3% |

| Benchmark | Baseline | Prev | This | Culm% | Seq% |
| :--- | :--- | :--- | :--- | :--- | :--- |

    [28 lines not shown]
DeltaFile
+140-21clang-tools-extra/clang-doc/Representation.cpp
+30-0clang-tools-extra/clang-doc/Representation.h
+170-212 files

LLVM/project 0604f66clang-tools-extra/clang-doc Representation.cpp Representation.h, clang-tools-extra/clang-doc/tool ClangDocMain.cpp

[clang-doc] Merge data into persistent memory

We have a need for persistent memory for the final info. Since each
group processes a single USR at a time, every USR is only ever processed by
a single thread from the thread pool. This means that we can keep per
thread persistent storage for all the info. There is significant
duplicated data between all the serialized records, so we can just merge
the final/unique items into the persistent arena, and clear out the
scratch/transient arena as we process each record in the bitcode.

The patch adds some APIs to help with managing the data, merging, and
allocation of data in the correct arena. It also safely merges and deep
copies data from the transient arenas into persistent storage that is
never reset until the program completes.

This patch reduces memory by another % over the previous patches,
bringing the total savings over the baseline to 57%. Runtime performance
and benchmarks stay mostly flat with modest improvements.


    [31 lines not shown]
DeltaFile
+134-10clang-tools-extra/clang-doc/Representation.cpp
+25-25clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
+7-0clang-tools-extra/clang-doc/Representation.h
+166-353 files

LLVM/project 2a88b20clang-tools-extra/clang-doc BitcodeReader.cpp Serialize.cpp, clang-tools-extra/unittests/clang-doc SerializeTest.cpp MergeTest.cpp

[clang-doc] Move Info types into arenas

Info types used to own significant chunks of data. As we move these into
local arenas, these types must be trivially destructible, to avoid
leaking resources when the arena is reset. Unfortunaly, there isn't a
good way to transition all the data types one at a time, since most of
them are tied together in some way. Further, as they're now allocated in
the arenas, they often cannot be treated the same way, and even the
aliases and interfaces put in pLace to simplify the transition cannot
cover the full range of changes required.

We also use some SFINAE tricks to avoid adding boilerplate for helper
APIs, we'd otherwise ahve to support

Though it introduces some additional churn, we also try to keep tests
from using arena allocation as much as possible, since this is not
required to test the implementation of the library. As much of the test
code needed to be rewritten anyway, we take the opportunity to
transition now.

    [41 lines not shown]
DeltaFile
+419-187clang-tools-extra/clang-doc/BitcodeReader.cpp
+246-189clang-tools-extra/unittests/clang-doc/SerializeTest.cpp
+196-129clang-tools-extra/unittests/clang-doc/MergeTest.cpp
+176-80clang-tools-extra/unittests/clang-doc/ClangDocTest.cpp
+137-75clang-tools-extra/clang-doc/Serialize.cpp
+71-41clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp
+1,245-70114 files not shown
+1,649-94320 files

LLVM/project 98ced6cbolt/include/bolt/Rewrite RewriteInstance.h, bolt/lib/Rewrite RewriteInstance.cpp

[BOLT] Template patchELFPHDRTable and rewriteNoteSections for ELF32 (#189715)

Template patchELFPHDRTable, rewriteNoteSections, markGnuRelroSections,
and discoverStorage to support both ELF32LE and ELF64LE binaries.
Previously these functions were hardcoded for ELF64LE, causing crashes
when processing 32-bit ELF binaries.

The RewriteInstance constructor now accepts ELF32LE objects in addition
to ELF64LE. The ELF_FUNCTION macro is reused (and moved earlier in the
header) to dispatch to the correct template instantiation.

These changes are preparation for adding support to hexagon architecture
in Bolt.
DeltaFile
+64-53bolt/lib/Rewrite/RewriteInstance.cpp
+20-18bolt/include/bolt/Rewrite/RewriteInstance.h
+12-0bolt/test/elf32-basic.test
+12-0bolt/test/Inputs/elf32-basic.yaml
+108-714 files

LLVM/project 8a8434fllvm/include/llvm/Frontend/OpenMP OMPKinds.def, llvm/lib/Transforms/IPO AttributorAttributes.cpp

[OpenMP] Move alloc / free shared from TLI to alloc tags (#190365)

Summary:
Allocation kinds were added after these were introduced. We only needed
the TLI to identify these in the attributor so we can now just use
attributes. Update the usage in OpenMP and drop the TLI interface.

Fixes: https://github.com/llvm/llvm-project/issues/190072
DeltaFile
+18-20llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+19-17llvm/test/Transforms/Attributor/heap_to_stack_gpu.ll
+13-15llvm/test/Transforms/OpenMP/replace_globalization.ll
+15-13llvm/test/Transforms/OpenMP/remove_globalization.ll
+12-12llvm/test/Transforms/OpenMP/spmdization.ll
+13-7llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
+90-849 files not shown
+116-13515 files

LLVM/project 3eb289dllvm/test/CodeGen/AMDGPU integer-mad-patterns.ll fcanonicalize.bf16.ll

[AMDGPU] Specialize gfx1250 codegen tests form fake and real t16. NFC.

This is preparation of turning on real true16, so we can easily
apply it or revert.
DeltaFile
+1,318-117llvm/test/CodeGen/AMDGPU/integer-mad-patterns.ll
+835-387llvm/test/CodeGen/AMDGPU/fcanonicalize.bf16.ll
+610-305llvm/test/CodeGen/AMDGPU/atomics-system-scope.ll
+505-259llvm/test/CodeGen/AMDGPU/insert_vector_elt.v2bf16.ll
+460-214llvm/test/CodeGen/AMDGPU/load-constant-i1.ll
+384-170llvm/test/CodeGen/AMDGPU/flat-saddr-load.ll
+4,112-1,45227 files not shown
+6,175-2,28333 files

LLVM/project 4a72138llvm/include/llvm/Analysis MemoryDependenceAnalysis.h, llvm/lib/Analysis MemoryDependenceAnalysis.cpp

[Analysis] No block map in MemoryDependenceAnalysis (#190367)

Avoid expensive hash map of block to value by using a vector. To avoid
allocating and clearing the entire vector per query, cache the
allocation and use an epoch to identify stale values from previous
queries.
DeltaFile
+65-53llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
+8-1llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
+73-542 files

LLVM/project a147ffaclang-tools-extra/clang-doc Representation.cpp

[clang-doc] Consolidate merging logic

As we migrate things in the arena, this logic may get more complex.
Factoring it out now, will give clear extension points to make this
easier to manage.
DeltaFile
+10-9clang-tools-extra/clang-doc/Representation.cpp
+10-91 files

LLVM/project 515a857clang-tools-extra/clang-doc Representation.h

[clang-doc] Enforce arena allocated types are trivially destructible

We can enforce at compile-time that the types we want to place in the
arenas are always safe to allocate there.
DeltaFile
+26-0clang-tools-extra/clang-doc/Representation.h
+26-01 files

LLVM/project 9113c57clang-tools-extra/clang-doc Generators.h ClangDoc.cpp, clang-tools-extra/clang-doc/benchmarks ClangDocBenchmark.cpp

[clang-doc] Move non-arena allocated types off the OwnedPtr alias

Some types should not be using this alias, which was over applied to
APIs that wont participate in arena style allocation. This patch
restores them to their correct spelling.
DeltaFile
+7-7clang-tools-extra/clang-doc/Generators.h
+4-4clang-tools-extra/clang-doc/ClangDoc.cpp
+4-4clang-tools-extra/clang-doc/MDMustacheGenerator.cpp
+3-3clang-tools-extra/clang-doc/HTMLGenerator.cpp
+2-2clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp
+1-1clang-tools-extra/clang-doc/ClangDoc.h
+21-211 files not shown
+22-227 files

LLVM/project b506b1eclang-tools-extra/clang-doc BitcodeReader.cpp Serialize.cpp, clang-tools-extra/unittests/clang-doc MDGeneratorTest.cpp BitcodeTest.cpp

[clang-doc] Make CommentInfo arena allocated

This patch move the CommentInfo type into the arena. It updates block
handling to collect child info types and serialize the array in one
shot.

We also clean up the test code to avoid using the arenas in the tests.
This has the upside of making the test more hermetic, and avoids churn
in the related code as the allocation API interfaces evolve.

Performance and memory usage regress slightly. This is somewhat expected
as we do not yet aggressively release short term memory during merge
operations. Future patches will reclaim this overhead.

| Metric | Baseline | Prev | This | Culm% | Seq% |
| :--- | :--- | :--- | :--- | :--- | :--- |
| Time | 920.5s | 998.5s | 1010.5s | +9.8% | +1.2% |
| Memory | 86.0G | 43.8G | 47.8G | -44.4% | +9.2% |


    [26 lines not shown]
DeltaFile
+124-94clang-tools-extra/unittests/clang-doc/MDGeneratorTest.cpp
+70-111clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
+66-103clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp
+15-30clang-tools-extra/unittests/clang-doc/MergeTest.cpp
+17-9clang-tools-extra/clang-doc/BitcodeReader.cpp
+15-5clang-tools-extra/clang-doc/Serialize.cpp
+307-3526 files not shown
+345-37012 files

LLVM/project 14669d6clang-tools-extra/clang-doc BitcodeReader.cpp BitcodeReader.h

[clang-doc] Simplify parsing and reading bitcode blocks

Much of the logic int he readBlock implementation is boilerplate, and is
repeated for each implementation/specialization. This will become much
worse as we introduce new custom block reading logic as we migrate
towards arena allocation. In preparation for that, we're introducing the
change in logic now, which should make later refactoring much more
straightforward.
DeltaFile
+103-120clang-tools-extra/clang-doc/BitcodeReader.cpp
+5-0clang-tools-extra/clang-doc/BitcodeReader.h
+1-1clang-tools-extra/clang-doc/Representation.h
+109-1213 files

LLVM/project efdbf7bllvm/lib/Target/Hexagon HexagonPatterns.td, llvm/test/CodeGen/Hexagon trap-crash.ll

[Hexagon] Use trap0(#0xDB) for debugtrap instead of brkpt (#189446)

The brkpt instruction is intended for the in-silicon debugger (ISDB).
When ISDB is not enabled, brkpt is treated as a NOP, so
__builtin_debugtrap() would silently do nothing in user-mode Linux
processes.

Use trap0(#0xDB) instead.
DeltaFile
+1-1llvm/test/CodeGen/Hexagon/trap-crash.ll
+1-1llvm/lib/Target/Hexagon/HexagonPatterns.td
+2-22 files

LLVM/project 1a2183eclang-tools-extra/clang-doc Representation.cpp

Just use ilist::sort
DeltaFile
+1-9clang-tools-extra/clang-doc/Representation.cpp
+1-91 files

LLVM/project 6476619clang/lib/CodeGen CodeGenTBAA.cpp, clang/test/CodeGen tbaa-matrix.c

[Matrix] Use matrix element type for TBAA nodes. (#190029)

Matrix loads and stores are accesses of their element types. Emit TBAA
nodes using their element type to allow more precise TBAA alias
analysis.

PR: https://github.com/llvm/llvm-project/pull/190029
DeltaFile
+23-20clang/test/CodeGen/tbaa-matrix.c
+7-0clang/lib/CodeGen/CodeGenTBAA.cpp
+30-202 files

LLVM/project 35994bbllvm/test/CodeGen/AMDGPU integer-mad-patterns.ll fcanonicalize.bf16.ll

[AMDGPU] Specialize gfx1250 codegen tests form fake and real t16. NFC.

This is preparation of turning on real true16, so we can easily
apply it or revert.
DeltaFile
+1,318-117llvm/test/CodeGen/AMDGPU/integer-mad-patterns.ll
+835-387llvm/test/CodeGen/AMDGPU/fcanonicalize.bf16.ll
+610-305llvm/test/CodeGen/AMDGPU/atomics-system-scope.ll
+505-259llvm/test/CodeGen/AMDGPU/insert_vector_elt.v2bf16.ll
+460-214llvm/test/CodeGen/AMDGPU/load-constant-i1.ll
+319-320llvm/test/CodeGen/AMDGPU/flat-saddr-load.ll
+4,047-1,60227 files not shown
+6,110-2,43333 files

LLVM/project 6c82b72llvm/lib/Transforms/Scalar SROA.cpp

[SROA][NFC] Don't materialize name when discarding names (#190368)

SetValuePrefix has to materialize the prefix into a std::string, which
is non-free and pointless when value names are discarded.
DeltaFile
+4-2llvm/lib/Transforms/Scalar/SROA.cpp
+4-21 files

LLVM/project 6f464d1clang/lib/Driver/ToolChains Hexagon.cpp Hexagon.h, clang/test/Driver hexagon-toolchain-elf.c hexagon-toolchain-linux.c

[Hexagon] Clean up library and include paths and fix --sysroot (#188824)

Unify include and library paths by reusing common code to compute path
prefixes. First, determine the effective sysroot by choosing a
user-provided sysroot, "../target/<triple>", or "../target/hexagon",
in the order of precedence. Based on the sysroot, derive the standard
include path, C++ include path, and base library path.

Fix the default -L library paths so they are taken from the external
sysroot, when one specified. Previously, these paths were always
relative to the install directory and sysroot was ignored.

Remove certain locations from considerations, as there are never used
for the corresponding purpose in existing sysroots:
- fallback to install path, typically "../target/bin", as the base path
  when other sysroot cannot be found;
- similarly, fallback to "../target/" for startup files;
- "../target/bin" for program paths as there are no program files in
  current sysroots.

    [3 lines not shown]
DeltaFile
+91-89clang/test/Driver/hexagon-toolchain-elf.c
+91-77clang/lib/Driver/ToolChains/Hexagon.cpp
+7-11clang/test/Driver/hexagon-toolchain-linux.c
+5-1clang/lib/Driver/ToolChains/Hexagon.h
+194-1784 files

LLVM/project 418ae6cclang-tools-extra/include-cleaner/lib Types.cpp TypesInternal.h, clang-tools-extra/include-cleaner/unittests TypesTest.cpp

[include-cleaner][NFC] expose and test `normalizePath` helper (#189364)

Also fix a bug where the root `/` path would become an empty string.
DeltaFile
+17-1clang-tools-extra/include-cleaner/unittests/TypesTest.cpp
+1-3clang-tools-extra/include-cleaner/lib/Types.cpp
+2-0clang-tools-extra/include-cleaner/lib/TypesInternal.h
+20-43 files

LLVM/project 88f6b18llvm/utils/gn/secondary/bolt/unittests/Passes BUILD.gn, llvm/utils/gn/secondary/clang/lib/Driver BUILD.gn

[gn build] Port commits (#190392)

0cecacd971a5
2cff995e91c3
34ec1870ae46
54e5803d0231
64b728128df3
76ed0ad3577e
d95292f67b48
DeltaFile
+4-1llvm/utils/gn/secondary/bolt/unittests/Passes/BUILD.gn
+2-0llvm/utils/gn/secondary/compiler-rt/lib/builtins/sources.gni
+1-0llvm/utils/gn/secondary/llvm/unittests/DebugInfo/PDB/BUILD.gn
+1-0llvm/utils/gn/secondary/clang/lib/Driver/BUILD.gn
+1-0llvm/utils/gn/secondary/lldb/source/Host/BUILD.gn
+1-0llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn
+10-11 files not shown
+11-17 files

LLVM/project 94545a7llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer Legality.h, llvm/lib/Transforms/Vectorize/SandboxVectorizer Legality.cpp

[SandboxVec][Legality][NFC] Outline differentBlock() and areUnique() (#190024)

And reuse them in LoadStoreVec.
DeltaFile
+16-0llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Legality.h
+2-8llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/LoadStoreVec.cpp
+2-5llvm/lib/Transforms/Vectorize/SandboxVectorizer/Legality.cpp
+20-133 files

LLVM/project 9850c1fllvm/test/CodeGen/AMDGPU integer-mad-patterns.ll fcanonicalize.bf16.ll

[AMDGPU] Specialize gfx1250 codegen tests form fake and real t16. NFC.

This is preparation of turning on real true16, so we can easily
apply it or revert.
DeltaFile
+1,318-117llvm/test/CodeGen/AMDGPU/integer-mad-patterns.ll
+835-387llvm/test/CodeGen/AMDGPU/fcanonicalize.bf16.ll
+610-305llvm/test/CodeGen/AMDGPU/atomics-system-scope.ll
+505-259llvm/test/CodeGen/AMDGPU/insert_vector_elt.v2bf16.ll
+460-214llvm/test/CodeGen/AMDGPU/load-constant-i1.ll
+313-136llvm/test/CodeGen/AMDGPU/mad-mix-lo-bf16.ll
+4,041-1,41826 files not shown
+5,791-2,11332 files

LLVM/project a4632f6clang/docs ReleaseNotes.rst, clang/include/clang/Basic DiagnosticSemaKinds.td

[Clang][Sema] Prevent implicit casting Complex type to Vector (#187954)

Emitting an error message in case of implicit casting of a complex type
to a built-in vector type in C

Fixes: #186805
DeltaFile
+21-16clang/lib/Sema/SemaChecking.cpp
+13-0clang/test/Sema/implicit-cast-complex-to-vector.c
+2-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+2-0clang/docs/ReleaseNotes.rst
+38-164 files

LLVM/project 8d34545llvm/lib/IR Verifier.cpp, llvm/test/Verifier dbg-type-line-without-file.ll

Introduce and use Verifier::visitDIType (#189067)

This adds a new method Verifier::visitDIType, and then changes method
for subclasses of DIType to call it. The new method just dispatches to
DIScope and adds a file/line check inspired by
Verifier::visitDISubprogram.
DeltaFile
+19-6llvm/lib/IR/Verifier.cpp
+13-0llvm/test/Verifier/dbg-type-line-without-file.ll
+2-2mlir/test/Target/LLVMIR/Import/debug-info.ll
+34-83 files

LLVM/project f33e9fallvm/include/llvm/Transforms/IPO SampleProfileMatcher.h, llvm/lib/Transforms/IPO SampleProfileMatcher.cpp

[SampleProfile] Fix FuncMappings key mismatch for renamed functions in stale profile matching (#187899)

Fix a bug where `distributeIRToProfileLocationMap` fails to find
location mappings from IR to profile for renamed functions because
`FuncMappings` is indexed by the IR function name while
`distributeIRToProfileLocationMap` looks up by the profile function
name. Fixed by making `FuncMappings` to use profile function name as
key.
DeltaFile
+56-0llvm/test/Transforms/SampleProfile/Inputs/pseudo-probe-stale-profile-renaming-lineshift.prof
+24-0llvm/test/Transforms/SampleProfile/pseudo-probe-stale-profile-renaming.ll
+2-2llvm/include/llvm/Transforms/IPO/SampleProfileMatcher.h
+1-1llvm/lib/Transforms/IPO/SampleProfileMatcher.cpp
+83-34 files

LLVM/project 85fb6balldb/include/lldb/Utility Stream.h, lldb/source/Commands CommandObjectTarget.cpp CommandObjectMemory.cpp

[lldb][Utility] Remove address size from Stream class (NFC) (#190375)

It violates abstraction. Luckily, it was used only in two places, see
DumpDataExtractor.cpp and CommandObjectMemory.cpp.
DeltaFile
+0-30lldb/source/Commands/CommandObjectTarget.cpp
+4-21lldb/include/lldb/Utility/Stream.h
+2-10lldb/source/Utility/Stream.cpp
+4-5lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+3-4lldb/source/Utility/StreamString.cpp
+2-5lldb/source/Commands/CommandObjectMemory.cpp
+15-7518 files not shown
+41-10824 files

LLVM/project 27c04fdclang-tools-extra/clang-doc BitcodeReader.cpp BitcodeReader.h

[clang-doc] Simplify parsing and reading bitcode blocks

Much of the logic int he readBlock implementation is boilerplate, and is
repeated for each implementation/specialization. This will become much
worse as we introduce new custom block reading logic as we migrate
towards arena allocation. In preparation for that, we're introducing the
change in logic now, which should make later refactoring much more
straightforward.
DeltaFile
+103-120clang-tools-extra/clang-doc/BitcodeReader.cpp
+5-0clang-tools-extra/clang-doc/BitcodeReader.h
+1-1clang-tools-extra/clang-doc/Representation.h
+109-1213 files

LLVM/project a66cd92clang-tools-extra/clang-doc Generators.h ClangDoc.cpp, clang-tools-extra/clang-doc/benchmarks ClangDocBenchmark.cpp

[clang-doc] Move non-arena allocated types off the OwnedPtr alias

Some types should not be using this alias, which was over applied to
APIs that wont participate in arena style allocation. This patch
restores them to their correct spelling.
DeltaFile
+7-7clang-tools-extra/clang-doc/Generators.h
+4-4clang-tools-extra/clang-doc/ClangDoc.cpp
+4-4clang-tools-extra/clang-doc/MDMustacheGenerator.cpp
+3-3clang-tools-extra/clang-doc/HTMLGenerator.cpp
+2-2clang-tools-extra/clang-doc/benchmarks/ClangDocBenchmark.cpp
+1-1clang-tools-extra/clang-doc/Generators.cpp
+21-211 files not shown
+22-227 files

LLVM/project dae1e80clang-tools-extra/clang-doc Representation.cpp Representation.h, clang-tools-extra/clang-doc/tool ClangDocMain.cpp

[clang-doc] Merge data into persistent memory

We have a need for persistent memory for the final info. Since each
group processes a single USR at a time, every USR is only ever processed by
a single thread from the thread pool. This means that we can keep per
thread persistent storage for all the info. There is significant
duplicated data between all the serialized records, so we can just merge
the final/unique items into the persistent arena, and clear out the
scratch/transient arena as we process each record in the bitcode.

The patch adds some APIs to help with managing the data, merging, and
allocation of data in the correct arena. It also safely merges and deep
copies data from the transient arenas into persistent storage that is
never reset until the program completes.

This patch reduces memory by another % over the previous patches,
bringing the total savings over the baseline to 57%. Runtime performance
and benchmarks stay mostly flat with modest improvements.


    [31 lines not shown]
DeltaFile
+134-10clang-tools-extra/clang-doc/Representation.cpp
+25-25clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
+7-0clang-tools-extra/clang-doc/Representation.h
+166-353 files