[Runtimes] Fix Unix Makefiles race between runtimes-build and EXTRA_TARGETS (#187634)
In our downstream we have a non-runtime target depending on libclc
EXTRA_TARGET and then observe a race condition in parallel build: both
runtimes-build (full build, no lock) and libclc EXTRA_TARGET (triggered
by non-runtime target, FileLock) build concurrently, leading to corrupt
libclc library.
This exposes an limitation in ExternalProject EXTRA_TARGET design:
EXTRA_TARGETS in llvm_ExternalProject_Add only depend on
${name}-configure, not ${name}-build. This makes EXTRA_TARGETS unsafe as
dependencies of a non-runtime target..
Fix: Add a locked BUILD_COMMAND to ExternalProject_Add for Unix
Makefiles generator, using the same cmake.lock as EXTRA_TARGETS. This
serializes runtimes-build with all EXTRA_TARGETS under one lock.
With this PR, a non-runtime target can depend on a specific
EXTRA_TARGET, rather than needing to depend on the umbrella runtimes
[9 lines not shown]
[AMDGPU][SIInsertWaitcnts][NFC] SGPRInfo: Move score selection logic closer (#186518)
Selecting the score in SGPRInfo used to require an index which you would
get by calling a getSgprScoresIdx(), which is defined in a different
class.
This patch moves the score selection logic into the SGPRinfo. This makes
the interface simpler and more intuitive.
Also given that SGPRInfo contains only two scores, this patch also
replaces the score array with individual score variables.
Should be NFC.
[libc] Fix function prototypes for <threads.h> C11 header. (#187808)
Fix return types and/or function arguments of several functions:
* mtx_destroy
* tss_delete
* thrd_exit
[clang-doc] Fix incorrectly rendered specialization args in HTML (#187761)
Function template specialization arguments were incorrectly rendered
without a comma. This was due to the "End" JSON property also being
used in the levels above. Mustache looks for missing properties in
parent contexts, see #174359.
amd64: remove assertion about sizeof(struct pcb)
We no longer put pcb on stack, it is part of the struct thread.
Similarly, we do not put user fpu save area on stack. There is no
constraints on the pcb size due to the XSAVE area required alignment.
Reviewed by: jhb, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55931
[SandboxVec][DAG] Fix DAG update when user is scheduled (#187148)
This patch fixes the update of the DAGNode UnscheduledSucc counter when
a use edge is modified. This is the result of a setOperand() or a RAUW
(and friends) operation.
Before this patch we would not check if the User (i.e., the consumer of
the use-def edge) is scheduled and we would update the definition's
UnscheduledSucc counter, resulting in counting errors.
For example, consider the following IR:
```
%A = ...
%B = ...
%U = %A ; scheduled
```
Note that %U's DAGNode is marked as "scheduled" while %A and %B are not.
If we change %U's operand from %A to %B then we should not attempt to
update %A's or %B's UnscheduledSuccs because %U is scheduled so it
should not get counted as an "unscheduled" successor.
[mlir][tosa] Fix crash in slice op folder when input values are not iterable (#187339)
A crash was encountered in the slice op folder when the input was a
constant with dense resource values. The folder was trying to iterate
over the input values, which is not possible for resource values. This
change fixes the crash and adds a test.
HBSD: Append to SHARED_CFLAGS
PICFLAG should not be modified by individual components in base.
Instead, use SHARED_CFLAGS to set the -DOPENSSL_PIC flag.
FreeBSD reverted the bad commit, whereas HardenedBSD fixed the problem
they introduced.
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
Fixes: 14b9955e57cc28b61e785165b9effcbe620edb46