[ARM] Fix not saving FP when required to in frame-pointer=non-leaf.
When the stars align to conspire against stack alignment, when we have
frame-pointer=non-leaf we can incorrectly skip preserving fp/r7 in the prolog.
The fix here first makes sure we're using the right frame pointer register in
the context of preserving the incoming FP, and then make sure that we save
the FP when re-alignment is known to be necessary.
rdar://162462271
[CIR] Cast record size to uint64 to prevent overflow (#167525)
`llvm::TypeSize` uses 64bit integers, so we should cast the `recordSize`
before multiplying by 8 to prevent an overflow.
[CMake][Release] Stop linking against stage1 runtimes (#164017)
This was causing a build failure on Darwin and a test failure on Linux.
This config is not widely used or well tested, so I don't think the
potential and likely small performance gains and the portability from
this are worth the maintenance costs.
(cherry picked from commit 1906c3e1e30759d2eb85b2833e8c5ff64128bfba)
[X86][NewPM] Port DynAllocaExpander to New PM
No tests modified as there are none that explicitly stop at
DynAllocaExpander, and we do not have enough of a pipeline to run those
yet anyways.
Reviewers: phoebewang, RKSimon, paperchalice, arsenm
Reviewed By: arsenm
Pull Request: https://github.com/llvm/llvm-project/pull/167740
[clang][HLSL] Fix crash issue due to Twine usage
- Dangling pointer (from std::string) is created and trigger crash on
some Linux distributions under different build types.
[flang] Fixed regression in copy-in/copy-out (#161259)
Fixed the polymprphic check for copy-in/copy-out, added regression
tests.
Changed MayNeedCopy() to return std::optional<bool> and renamed it to
ActualArgNeedsCopy(). This function now returns true/false when it's
known that actual arguments needs copy in/out, or std::nullopt to
signify that it's now known, whether copy in/out is needed.
Fixes #159149
[libc] Handle the `unknown` default target in CMake (#115122)
When the backend for the host target isn't enabled, Clang would report
the default target as `unknown`. This currently breaks the libc CMake
build, but shouldn't in the case where we're cross-compiling since we're
given an explicit target and the default one isn't being used.
[bazel] Fix LLDB :Host Build (#167711)
On some systems (probably those with a more recent clang), building
:Host errors out with a layering check violation due to the histedit.h
system include. Opt it out of layering checks for now, similar to other
targets that depend on non standard library system includes.
[mlir][memref] Remove invalid `extract_aligned_pointer_as_index` folding in `ExpandStridedMetadata` (#167615)
`RewriteExtractAlignedPointerAsIndexOfViewLikeOp` tries to propagate
`extract_aligned_pointer_as_index` through the view ops.
`ViewLikeOpInterface` by itself doesn't guarantee to preserve the base
pointer and `memref.view` is one such example, so limit pattern to a few
specific ops.
TargetLowering: Avoid hardcoding OpenBSD + __guard_local name
Query RuntimeLibcalls for the support and the name. The check
that the implementation is exactly __guard_local instead of
unsupported feels a bit strange.