[profcheck] Expose likely/unlikely weights as constants in MDBuilder (#183252)
Define `kLikelyBranchWeight` and `kUnlikelyBranchWeight` as static
constexpr members in MDBuilder.h and use them in
createLikelyBranchWeights and createUnlikelyBranchWeights. This makes
the weights used for likely/unlikely branches more discoverable and
reusable.
Co-authored-by: Jin Huang <jingold at google.com>
[bazel][libc] Add some deps for layering_check (#183235)
This adds a whole bunch of deps to get things _mostly_ building w/
`layering_check` enabled. It does not yet enable `layering_check`.
I used some tools to add deps to all these targets that break when
enabling the layering check feature, and a few things were added in
between when I ran the script and where trunk is at now. Since this is a
large change, I plan to do a second (and possibly third) pass later to
catch those new changes, at which point it would be safer to actually
enable `layering_check` for this package.
[clang][ARM] Refactor argument handling in `EmitAArch64BuiltinExpr` (3/N) (NFC)
Remove the outstanding calls to `EmitScalarExpr` in
`EmitAArch64BuiltinExpr` that are no longer required.
This is a follow-up for #181794 and #181974 - please refer to that PR
for more context.
[clang] allow canonicalizing assumed template names
Assumed template names are part of error recovery and encode just a
declaration name, making them always canonical. This patch allows
them to be canonicalized, which is trivial.
Fixes #183075
[clang][TypePrinter][NFC] Extract logic that handles AnonymousTagNameStyle::SourceLocation into helper function (#183304)
In https://github.com/llvm/llvm-project/pull/168533 we're adding a new
`AnonymousTagMode` and will be handled in `printAnonymousTagDecl`.
This patch extracts the logic that handles
`AnonymousTagNameStyle::SourceLocation` into a helper function to make
`printAnonymousTagDecl` easier to follow.
Drive-by changes:
* While copying the code into the helper I changed it to use
early-return style.
[clang] create local instantiation scope for matching template template parameters (#183219)
This fixes a bug where a partial substitution from the enclosing scope
is used to prepopulate an unrelated template argument deduction.
Fixes #181166
[lldb][Process/FreeBSDKernel] Add arm support (#180674)
This is LLDB version of
https://cgit.freebsd.org/ports/tree/devel/gdb/files/kgdb/arm-fbsd-kern.c.
This enables selecting arm and reading registers from PCB structure on
core dump and live kernel debugging while trapframe unwinding support
will be implemented in future. Test files using core dump from arm will
be implemented once other kernel debugging improvements are done.
---------
Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
[NFC][RegisterInfoEmitter] Add target name prefix for a few variables (#183074)
Add target name prefix for a few static global variables in the
generated code. Also rework the TargetRegisterInfo constructor a bit to
use a ArrayRef for array of register classes and rename a few
constructor arguments to match the member names they initialize.
AMDGPU: Implement expansion for f64 exp
I asked AI to port the device libs reference implementation.
It mostly worked, though it got the compares wrong and also
missed a fold that happened in compiler. With that fixed I get
identical DAG output, and almost the same globalisel output (differing
by an inverted compare and select). Also adjusted some stylistic choices.
net/asterisk20: Add MP3 Decoder Code for Format_MP3 support
Format_MP3, used to play MP3 encoded voicemail and music on hold, relies
on decoder library files that are not included in the main Asterisk
distribution.
PR: 292715
Tested by: Marek Zarychta <zarychtam at plan-b.pwste.edu.pl>
Approved by: Oleksandr Kryvulia <o.kryvulia at flex-it.com.ua>
Co-authored-by: Justin T. Gibbs <gibbs at FreeBSD.org>
[clang][ARM] Refactor argument handling in `EmitAArch64BuiltinExpr` (3/N) (NFC)
Remove the outstanding calls to `EmitScalarExpr` in
`EmitAArch64BuiltinExpr` that are no longer required.
This is a follow-up for #181794 and #181974 - please refer to that PR
for more context.
[SPIRV] Enable SPV_EXT_relaxed_printf_string_address_space by default for Intel (#183103)
It's easy to hit the address space limitation when using printf locally,
so just enable the extension by default for Intel.
Signed-off-by: Nick Sarnie <nick.sarnie at intel.com>
Convert app container log timestamps to system timezone
This commit fixes an issue where app container log timestamps were displayed in UTC (Docker's default behavior). They are now converted to the system's configured timezone before being sent to the UI, using the stdlib zoneinfo module.
Rename Thumb1 SetResultRegister to ReturnResult
Also remove the return instructions following it in the main macro,
which aren't needed, since it does the returning itself.
[InstCombine] Replace alloca with undef size with poison instead of null
When an alloca instruction has an undef (or poison) array size, InstCombine
was previously replacing all uses of the alloca with a null pointer. This
caused invalid IR when the alloca was used by @llvm.lifetime intrinsics.
According to the @llvm.lifetime intrinsic specification, the pointer
argument must be either:
- A pointer to an alloca instruction, or
- A poison value
Since null is neither an alloca pointer nor poison, the previous
transformation violated the intrinsic's requirements and produced
invalid IR.
Fix by replacing the alloca with a poison value instead of null, which
satisfies the @llvm.lifetime requirements and produces valid IR.