[Coverage] Sort `MCDCRecord::ExecVectors` order by Bitmap index (#121195)
This makes easier to merge `MCDCRecord`s in later stages.
Depends on: #110966, #121188, #121190
LLVMCoverage: Unify getCoverageForFile and getCoverageForFunction. NFC (#120842)
Since #119952, `getCoverageForFile` and `getCoverageForFunction` have
similar structure each other. Ther merged method `addFunctionRegions`
has two lambda subfunctions.
* `getCoverageForFile`
- `MainFileID` may be `nullopt`.
- `shouldProcess` picks up relevant records along `FileIDs` that is
scanned based on `MainFileID`. They may have expanded source files.
- `shouldExpand` takes the presense of `MainFileID` into account.
* `getCoverageForFunction`
- This assumes the presense of `MainFileID`.
- `shouldProcess` picks up records that belong only to `MainFileID`.
- `shouldExpand` assumes the presense of `MainFileID`.
This change introduces a wrapper class `MergeableCoverageData` for
further merging instances. At the moment, this returns `CoverageData`
including `buildSegments()`.
This change itself is NFC.
[mlir][Bytecode] Fix infinite loop by tracking type/attribute in deferred worklist (#174874)
The bytecode reader could enter an infinite loop when parsing deeply
nested attributes containing type references. The deferred worklist
stored only indices without distinguishing between attributes and types,
causing type indexes to be misinterpreted as attributes.
This patch changes the deferred worklist to store pairs of (index, kind)
to track whether each deferred entry is a type or attribute. The
worklist processing logic is updated to resolve the correct entry type.
[Coverage] Make additional counters available for BranchRegion. NFC. (#120930)
`getBranchCounterPair()` allocates an additional Counter to SkipPath in
`SingleByteCoverage`.
`IsCounterEqual()` calculates the comparison with rewinding counter
replacements.
`NumRegionCounters` is updated to take additional counters in account.
`incrementProfileCounter()` has a few additiona arguments.
- `UseSkipPath=true`, to specify setting counters for SkipPath. It
assumes `UseSkipPath=false` is used together.
- `UseBoth` may be specified for marking another path. It introduces the
same effect as issueing `markStmtAsUsed(!SkipPath, S)`.
`llvm-cov` discovers counters in `FalseCount` to allocate `MaxCounterID`
[6 lines not shown]
[CFIInserter] Improve `CSRSavedLocation` struct. (#168869)
(1) Define `CSRSavedLocation::Kind` and use it in the code. This makes
the code more readable and allows to extend it to new kinds. For
example, soon I want to add "scalable offset from a given register"
kind.
(2) Store the contents in a union. This should reduce memory usage.
Rename wasm32-wasi to wasm32-wasip1. (#165345)
This adds code to recognize "wasm32-wasip1", "wasm32-wasip2", and
"wasm32-wasip3" as explicit targets, and adds a deprecation warning when
the "wasm32-wasi" target is used, pointing users to the "wasm32-wasip1"
target.
Fixes #165344.
I'm filing this as a draft PR for now, as I've only just now proposed to
make this change in #165344.
[clang-doc] Move navbar and sidebar into normal document flow (#175110)
The navbar and sidebar caused spacing and alignment issues since they
were fixed elements with defined height/width. It was difficult to have
all elements below them correctly offset the height. This patch changes
them
to sticky elements within the normal document flow that don't define
their
height/width explicitly. This actually lets us use existing HTML/CSS
properties (like the "content" div) more naturally.
This also changes the navbar behavior to not follow while scrolling.
[CIR][X86] Add support for `cpuid`/`cpuidex` (#173197)
Adds support for the `__builtin_ia32_cpuid` and `__builtin_ia32_cpuidex`
X86 builtins.
Part of [167765](https://github.com/llvm/llvm-project/issues/167765).
[CIR] Upstream handling for data member pointer casts (#171950)
This adds the CIR basic handling for casts of data member pointers. Cast
to bool and null, as well as member function pointer casts will be
handled in followup PRs.