[CIR] Fix missing RegionBranchTerminatorOpInterface declarations (#187112)
After https://github.com/llvm/llvm-project/pull/186832 operations with
RegionBranchTerminatorOpInterface needs to declare
`getMutableSuccessorOperands`.
[AMDGPU] fold a call to implictarg.ptr to a poison with no-implicitarg-ptr (#186925)
When a caller function with `amdgpu-no-implicitarg-ptr` calls
`llvm.amdgcn.implicitarg.ptr`, a poison value is returned.
[clang][Driver][SPIRV] Fix assertion when using -emit-llvm (#186824)
In the failing case we are in the link phase with `-emit-llvm` passed,
which means we are going to call `llvm-link` so all inputs are expected
to be `.bc` files, and linker options aren't supported as we aren't
calling a real linker.
I can't imagine anyone wants to pass arguments to `llvm-link`. Just drop
them and warn instead of asserting.
Closes: https://github.com/llvm/llvm-project/issues/186598
Signed-off-by: Nick Sarnie <nick.sarnie at intel.com>
[mlir][llvmir] Fix crash when a CallSiteLoc has a UnknownLoc callee (#186860)
Avoids reading a null StringAttr when no file name is present by
manufacturing a default instead.
[CIR] Fix missing RegionBranchTerminatorOpInterface declarations
After https://github.com/llvm/llvm-project/pull/186832 operations with RegionBranchTerminatorOpInterface needs to declare `getMutableSuccessorOperands`.
[libc]: implement 'iswpunct' entrypoint (#186968)
Added entrypoints:
- baremetal/arm
- baremetal/aarch64
- baremetal/riscv
- darwin/aarch64
- linux/aarch64
- linux/arm
- linux/riscv
- linux/x86_64
- windows
Also added the unit test for iswpunct.
Part of the issue: #185136
LinuxKPI: Fix simple_read_from_buffer for zero-size and off-the-end reads
I noticed that the buf_size < 0 check can never be true (it's a
size_t) and decided to check for this condition by an alternate
expression, and I also noticed that a read_size of 0 would incorrectly
return -EFAULT. Instead, return success for both of these cases as
reading beyond the EOF of a normal file also returns EOF, not EINVAL.
Reviewed by: bz
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D55845
[flang][OpenMP] Remove unused function declaration, NFC (#187101)
The function `GetNumGeneratedNestsFrom` has been removed, but repeated
local rebases stubbornly inserted the declaration back in.
[clang-format] Fix Macros configuration not working with try/catch expansions (#184891)
This is a superseding followup to my previous PR,
https://github.com/llvm/llvm-project/pull/183352.
In my previous PR, I proposed adding TryMacros and CatchMacros
configuration options, similar in spirit to IfMacros and ForEachMacros.
I did so because I noticed that configuration like
`Macros=["TRY_MACRO=try", "CATCH_MACRO(e)=catch(e)]` did not format
configured macro(s) as try/catch blocks. @owenca confirmed in my
previous PR that this observed behavior is undesired, and we should
prefer to fix it rather than introduce new features.
This PR proposes a fix, described in detail in the commit message below
the break. In general terms, it deletes a heuristic from the lexing
phase, where it interacted poorly with the Macros option, and moves its
functionality to the parsing phase instead.
I describe a possibly cleaner fix in [a comment
[34 lines not shown]
lindebugfs: Pass user buffer pointers to the read/write file operations
The Linux file_operations API expects the read and write operations
to take a single user buffer pointer (along with the length and the
file offset as an in/out parameter).
However, the debugfs_fill function was violating this part of the
contract as it was passing down kernel pointers instead. An earlier
commit (5668c22a13c6befa9b8486387d38457c40ce7af4) hacked around this
by modifying simple_read_from_buffer() to treat its user pointer
argument as a kernel pointer instead. However, other commits keep
tripping over this same API mismatch
(e.g. 78e25e65bf381303c8bdac9a713ab7b26a854b8c passes a kernel pointer
to copy_from_user in fops_str_write).
Instead, change debugfs_fill to use the "raw" pseudofs mode where the
uio is passed down to directly to the fill callback rather than an
sbuf. debufs_fill now iterates over the iovec in the uio similar to
the implementation of uiomove invoking the read or write operation on
[24 lines not shown]
[AMDGPU] Add structural stall heuristic to scheduling strategies
Implements a structural stall heuristic that considers both resource
hazards and latency constraints when selecting instructions. In coexec,
this changes the pending queue from a binary “not ready to issue”
distinction into part of a unified candidate comparison. Pending
instructions still identify structural stalls in the current cycle, but
they are now evaluated directly against available instructions by stall
cost, making the heuristics both more intuitive and more expressive.
- Add getStructuralStallCycles() to GCNSchedStrategy that computes the
number of cycles an instruction must wait due to:
- Resource conflicts on unbuffered resources (from the SchedModel)
- Sequence-dependent hazards (from GCNHazardRecognizer)
- Add getHazardWaitStates() to GCNHazardRecognizer that returns the number
of wait states until all hazards for an instruction are resolved,
providing cycle-accurate hazard information for scheduling heuristics.
system: validate monitor uniqueness based on the host route presence #9844
This is a little tricky to get right but that should be it:
If the host route is disabled we allow the same monitor IP to be used
in several gateways. Dpinger uses -B to bind the source address which
should make this work as per the ticket. We still need to make sure
that although the gateway in question disables the host route feature
another gateway may still have it enabled so we also need to fail in
that case. Tested the combinations and looks ok also looking at:
# pluginctl -r host_routes
Would still consider this an experiment.
(cherry picked from commit 1156faee1df99f4d010520ac0f074cb6266864a6)
[SLP][NFC] Refactor BinOpSameOpcodeHelper BIT enum (#187067)
More readable syntax and increase type width to avoid silent errors if
we reach 17 members.