[BPF] Relax BTF_TYPE_ID_REMOTE_RELOC for unnamed types (#182370)
Currently, BTF_TYPE_ID_REMOTE_RELOC requires a named type e.g. named
struct or union types.
But in [1], there are some use cases where unnamed types, e.g., 'void
*', 'void **', 'const char *', etc. All these will fail compilation with
error:
Empty type name for BTF_TYPE_ID_REMOTE reloc
This patch relaxed this condition to allow unnamed types. The kernel
libbpf will decide what are allowed or not for each specific cases.
[1]
https://lore.kernel.org/bpf/bb4bf5fe648ac71c969c6228ac6e72ea85cbc64b.camel@gmail.com/T/#m5a7abf799b75199f6678eddd9c1ea4e31563b4dc
Make mmap-munmap interceptor fail earlier (#171295)
If the address range is not covered by shadow memory, make interceptors
like mmap fail earlier.
---------
Signed-off-by: Abhishek Varma <abhvarma at amd.com>
Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
Signed-off-by: hanhanW <hanhan0912 at gmail.com>
Signed-off-by: Nikita B <n2h9z4 at gmail.com>
Signed-off-by: Nick Sarnie <nick.sarnie at intel.com>
Signed-off-by: Ian Wood <ianwood at u.northwestern.edu>
Co-authored-by: Min-Yih Hsu <min.hsu at sifive.com>
Co-authored-by: Sersawy <65075626+Abdelrhmansersawy at users.noreply.github.com>
Co-authored-by: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Co-authored-by: Walter Lee <49250218+googlewalt at users.noreply.github.com>
Co-authored-by: cpist (He / Him) <tinyfrog12 at gmail.com>
Co-authored-by: Jonathan Cohen <joncoh at apple.com>
[139 lines not shown]
[NFC][OpenCL] Fix test function-scope-local-return.cl (#182421)
Add `-triple spir64-unknown-unknown` to fix error on arm and aarch64:
unsupported OpenCL extension '__cl_clang_function_scope_local_variables'
[LV] Allow tail folding with IVs with outside users (#182322)
#149042 added last-active-lane and removed the restriction that we
couldn't tail fold loops that had outside users (in AllowedExit).
However we still have a restriction that IVs can't have outside users.
This was added separately to the AllowedExit restriction in #81609, but
it looks like #149042 didn't remove it.
AFAICT we currently extract the correct lane for IVs, so this PR relaxes
the restriction. This helps a good few loops get tail folded in
llvm-test-suite.
-force-tail-folding-style=none was added to pr5881-scev-expansion.ll to
preserve the original scev expansion, since otherwise we end up with a
cttz.elts(false, false, true, true) that blocks SCEV analysis. We should
probably teach ConstantFolding to fold it.
[lldb] Fix batched breakpoint step-over test flakiness (#182415)
PR to fix failing test from
https://github.com/llvm/llvm-project/pull/180101 .
Fix the integration test to be resilient to non-deterministic thread
timing. Instead of requiring exact z0/Z0 counts, verify that batching
reduced toggles compared to one at a time stepping.
Also added: skip on `aarch64` where thread scheduling makes batching
unreliable.
Ran the test 20 times, passed all 20.
Co-authored-by: Bar Soloveychik <barsolo at fb.com>
[lldb] Use C linkage for plugin initialization & termination (#182406)
Use C linkage for plugin initialization & termination. I'm working on
adding support for using the existing plugin infrastructure but with
dynamic libraries. Using C linkage makes it easier to dlsym the
initialize and terminate methods.
For example, with this patch,
`__ZN12lldb_private39lldb_initialize_ScriptInterpreterPythonEv` becomes
`_lldb_initialize_ScriptInterpreterPython`.
[clang-tidy][NFC] Clean up traversal mode handling in `modernize-redundant-void-arg` (#182408)
#173340 added a bit of code to this check to work around #170953. Now
that the latter PR is merged, we can remove the workaround.
[OpenCL] Suppress -Wreturn-stack-address for function-scope local variable (#181602)
OpenCL local variable has lifetime of work-group, not function call stack.
[InferAS] Infer the address space of inttoptr (#173244)
Currently the InferAddressSpaces would check if the bit value doesn't
change for <ptrtoint, inttoptr> address space cast. However the
condition is too strict. Sometime only the low bit address changes for
swizzling, and the address space is not changed. Take below code as
an example, we can transform `%gp2 = inttoptr i64 %b to ptr` to
`%gp2 = inttoptr i64 %b to ptr addrspace(2)` and specify addrspace(2)
for the following store instruction.
```
%gp = addrspacecast ptr addrspace(2) %sp to ptr
%a = ptrtoint ptr %gp to i64
%b = xor i64 7, %a
%gp2 = inttoptr i64 %b to ptr
store i16 0, ptr %gp2, align 2
```
This patch tries to infer the unchanged leading bit for the address
and let the target determine if it is safe to perform address space
cast for inttoptr instruction.
[3 lines not shown]
[ProfCheck] Disable more passes not used in CPU pipelines (#182414)
This is another comb over the current xfail list. This patch disables
all passes that are not enabled by default for CPUs such as passes not
enabled anywhere by default or only used in GPU backends.
Reland "[llvm-readobj] Dump callgraph section info for ELF" (#176260)
This patch is a reland of #157499
Introduce a new flag --call-graph-info which outputs call graph
information in the ELF call graph section in JSON or LLVM style.
[Hexagon] Fix SplitVectors crash in HVX type legalization (#181377)
When LegalizeHvxResize splits a multi-step TL_EXTEND (e.g., v128i32 from
v128i8, which is i8->i32), SplitVectorOp halves both input and output
types. This creates operand types that are half the HVX vector width
(e.g., v64i8 = 512 bits on 128-byte HVX), which are not legal HVX types.
These sub-HVX intermediate types confuse the DAG type legalizer's map
tracking, causing "Unprocessed value in a map! SplitVectors" assertions
with EXPENSIVE_CHECKS or
-enable-legalize-types-checking.
Fix by first expanding multi-step TL_EXTEND/TL_TRUNCATE operations into
a chain of single-step operations via ExpandHvxResizeIntoSteps before
splitting. Each single-step operation (e.g., i16->i32) can be safely
split because halving its operand type produces a legal HVX type (e.g.,
v64i16 = HVX single vector).