[Clang] treat fixed-underlying enum constants as the enumerated type in C23 to follow the spec (#172211)
Fixes #172118
---
This patch resolves an issue where C23 fixed-underlying enum constants
were incorrectly treated as the underlying integer type instead of the
enumeration type.
According to C23 `6.7.2.2p15`:
> The enumeration member type of an enumerated type with a fixed
underlying type is the same as the type itself.
[clang-doc] Make sidebar sections collapsible (#174531)
Collapsible lists are achieved via `<details>` and their child
`<summary>` tags. `<details>` tags allow for a section to be designated
as collapsible, while the `<summary>` tag is used as the sidebar
section's header. This approach was chosen over making the lists
stateful through various CSS properties.
This patch also refactors the `<li>` tag structure of sidebar sections.
Previously, the section header and list items were in separate `<li>`
tags without sharing a parent. Now, the header and items are under a
single `<li>` tag which makes more sense semantically.
[clang] Reference-count `ModuleCache` non-intrusively (#164889)
The `ModuleCache` class is currently reference-counted intrusively. As
explained in https://github.com/llvm/llvm-project/pull/139584, this is
problematic. This PR uses `std::shared_ptr` to reference-count
`ModuleCache` instead, which clarifies what happens to its lifetime when
constructing `CompilerInstance`, for example. This also makes the
reference in `ModuleManager` non-owning, simplifying the ownership
relationship further. The
`ASTUnit::transferASTDataFromCompilerInstance()` function now accounts
for that by taking care to keep it alive.
[OpenMP] Remove special handling of implicit clauses in decomposition
Applying implicit clauses should not cause any issues. The only exception
is that "simd linear(x)" could imply a "firstprivate", and that clause is
not allowed on the simd construct.
Add a check for that specific case, and apply all implicit clauses as if
they were explicit.
[BOLT] Remove unnecessary dependency. NFC (#174645)
There's no need for a full definition of `BinaryBasicBlock` in
`MCPlusBuilder.h`. Use `InstructionListType::iterator` instead of
`BinaryBasicBlock::iterator` in `findMemcpySizeInBytes()`.
[compiler-rt] Support default-True lit config options (follow up to #174522) (#174642)
The option added in #174522 breaks simulator tests, since `set_default`
overrides `False` values with the default.
Since these options are either string or boolean, this patches
set_default to override only un-set or empty string values (empty string
is not truth-y and therefore would be overwritten by defaults currently,
so this is NFCI)
[UniformityAnalysis] Remove an incorrect assertion in uniformity analysis (#174117)
The join block could be not a header of a cycle, as shown in the newly
added test case.
[LLVM] Successor count added to InstCount (#171670)
Counts the number of Basic Block successors when stats are enabled
We want to track this metric for a project in which we analyze the
effects of having LLVM Intermediate Representation (IR) code with a high
number of branches. We plan to use these capabilities to learn how
enabling memory safety features increases the branchiness in LLVM IR and
further how it affects binary compilation time and the resulting binary
performance.
Reland [VPlan] Simplify pow-of-2 (mul|udiv) -> (shl|lshr) (#174581)
The original patch, landed as a2db31b0 ([VPlan] Simplify pow-of-2
(mul|udiv) -> (shl|lshr), #172477) had a critical commutative matcher
bug, which has now been fixed. An assert has also been strengthened,
following a post-commit review.
InstCombine: Consider not-inf/nan context when simplifying fmul
Consider if the result can be nan, or if the inputs cannot
be infinity from the flag when trying to simplify fmul into
copysign.