[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-11-13 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D143967#4656478 , @dblaikie wrote: > Fair enough - all seems a bit unfortunate to be pushing these attributes > through to places they don't technically apply to (both complicates the > implementation, and might be confusing

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-11-13 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 updated this revision to Diff 558086. eddyz87 marked 2 inline comments as done. eddyz87 added a comment. Rebase, fixes for review feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143967/new/ https://reviews.llvm.org/D143967 Files:

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-11-07 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Hi @dblaikie, If you have some time, could you please take a look at my response ? It would be great if decision on this revision could be reached before next LLVM release. The overall design of this thing was discussed with

[PATCH] D133361: [BPF] Attribute preserve_static_offset for structs

2023-10-10 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3791 + if (hasBPFPreserveStaticOffset(Base)) +addr = wrapWithBPFPreserveStaticOffset(CGF, addr); + ast wrote: > eddyz87 wrote: > > ast wrote: > > > eddyz87 wrote: > > > > ast wrote: > >

[PATCH] D133361: [BPF] Attribute preserve_static_offset for structs

2023-10-10 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3791 + if (hasBPFPreserveStaticOffset(Base)) +addr = wrapWithBPFPreserveStaticOffset(CGF, addr); + ast wrote: > eddyz87 wrote: > > ast wrote: > > > If I'm reading this correctly

[PATCH] D133361: [BPF] Attribute preserve_static_offset for structs

2023-10-10 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 marked an inline comment as done. eddyz87 added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3791 + if (hasBPFPreserveStaticOffset(Base)) +addr = wrapWithBPFPreserveStaticOffset(CGF, addr); + ast wrote: > If I'm reading this correctly

[PATCH] D133361: [BPF] Attribute preserve_static_offset for structs

2023-10-04 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 marked 3 inline comments as done. eddyz87 added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3701 + QualType PointeeType = E->getType()->getPointeeType(); + if (PointeeType.isNull()) +return false; erichkeane wrote: > eddyz87 wrote: >

[PATCH] D133361: [BPF] Attribute preserve_static_offset for structs

2023-10-03 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3701 + QualType PointeeType = E->getType()->getPointeeType(); + if (PointeeType.isNull()) +return false; erichkeane wrote: > We override `operator bool` to make this work. Sorry, just

[PATCH] D133361: [BPF] Attribute preserve_static_offset for structs

2023-10-02 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added inline comments. Comment at: llvm/test/CodeGen/BPF/preserve-static-offset/load-align.ll:61 +!0 = !{i32 1, !"wchar_size", i32 4} +!1 = !{!"clang version 18.0.0 (/home/eddy/work/llvm-project/clang c899a1ca75d0f1b559204eff79a2578d2cafc7ab)"} +!2 = !{!3, !4, i64 128}

[PATCH] D133361: [BPF] Attribute preserve_static_offset for structs

2023-10-02 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3700 +return false; + if (auto *BaseDecl = E->getType()->getPointeeType()->getAsRecordDecl()) +return hasBPFPreserveStaticOffset(BaseDecl); erichkeane wrote: > eddyz87 wrote: > >

[PATCH] D133361: [BPF] Attribute preserve_static_offset for structs

2023-10-02 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3700 +return false; + if (auto *BaseDecl = E->getType()->getPointeeType()->getAsRecordDecl()) +return hasBPFPreserveStaticOffset(BaseDecl); erichkeane wrote: > getPointeeType can

[PATCH] D133361: [BPF] Attribute preserve_static_offset for structs

2023-10-02 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D133361#4652368 , @erichkeane wrote: > I don't see the comment response you had to me. Sorry, forgot to click submit. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:7601 + auto *Rec = cast(D); +

[PATCH] D133361: [BPF] Attribute btf_decl_tag("ctx") for structs

2023-09-04 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D133361#4629292 , @ast wrote: > ... > Right. Such recursive propagation of PAI is necessary. For btf_tag we cannot > do it. Always propagating it won't be correct. > New preserve_const_field_offset would need to be propagated

[PATCH] D133361: [BPF] Attribute btf_decl_tag("ctx") for structs

2023-09-04 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. After retesting kernel build with LLVM=1 and libbpf patch to reconstruct btf_decl_tag [1], statistics for BPF selftests looks as follows: - out of 653 object files 13 have some differences with and w/o this change;

[PATCH] D133361: [BPF] Attribute btf_decl_tag("ctx") for structs

2023-08-30 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D133361#4628951 , @ast wrote: > I agree that it's not useful outside of BPF, but it's useful outside of > 'ctx'. I think 'preserve_constant_field_offset' would be more accurate > description of the restriction. > We can

[PATCH] D133361: [BPF] Attribute btf_decl_tag("ctx") for structs

2023-08-29 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added inline comments. Comment at: llvm/include/llvm/IR/Intrinsics.td:2432 ImmArg>]>; +def int_context_marker_bpf : DefaultAttrsIntrinsic<[llvm_ptr_ty], + [llvm_ptr_ty],

[PATCH] D133361: [BPF] Attribute btf_decl_tag("ctx") for structs

2023-08-28 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added inline comments. Comment at: llvm/include/llvm/IR/Intrinsics.td:2432 ImmArg>]>; +def int_context_marker_bpf : DefaultAttrsIntrinsic<[llvm_ptr_ty], + [llvm_ptr_ty],

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-08-21 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Hi @dblaikie, If you have some time, could you please take a look at my response ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143967/new/ https://reviews.llvm.org/D143967

[PATCH] D156726: Make globals with mutable members non-constant, even in custom sections

2023-08-16 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. As an additional data point, the same example but w/o section specification compiles fine: const int with_init = 1; const int no_init; And puts both globals to the same section: $ clang -c t.c -o - | llvm-readelf --section-headers -s - Section Headers:

[PATCH] D156726: Make globals with mutable members non-constant, even in custom sections

2023-08-16 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Hi @dblaikie, After this revision landed yesterday one BPF kernel selftest (written in C) stopped building. I narrowed the issue to the following example: #define SEC(n) __attribute__((section(n))) const int with_init SEC("foo") = 1; const int no_init

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-08-10 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Hi @dblaikie, Could you please take a look at my response ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143967/new/ https://reviews.llvm.org/D143967

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-08-01 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Hi @dblaikie Thank you for the detailed response! > So you get some bunch of annotations from the BTFTagAttributedType, then you > build the underlying type (which might already be built/needed/fine because > it's used without attributes in other places/needs to exist

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-07-27 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Hi @dblaikie, Could you please take a look at my reply ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143967/new/ https://reviews.llvm.org/D143967

[PATCH] D144829: [BPF] Add a few new insns under cpu=v4

2023-07-25 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 accepted this revision. eddyz87 added a comment. Hi Yonghong, Looks good to me, thanks! Before landing this, could you please adjust tests a little bit more? - Extend `assembler-disassembler-v4.s` with signed `div` and `mod`, e.g.: // CHECK: 3f 31 01 00 00 00 00 00 r1 s/= r3 //

[PATCH] D144829: [BPF] Add a few new insns under cpu=v4

2023-07-24 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Hi Yonghong, Thank you for the comments. Could you please also add a few tests for `gotol`? Sorry, I should have asked for those last week. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144829/new/

[PATCH] D144829: [BPF] Add a few new insns under cpu=v4

2023-07-20 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. I tried adding a test similar to `assemble-disassemble.ll`: // RUN: llvm-mc -triple bpfel --mcpu=v4 --assemble --filetype=obj %s \ // RUN: | llvm-objdump -d --mattr=+alu32 - \ // RUN: | FileCheck %s // CHECK: d7 01 00 00 10 00 00 00 r1 = bswap16 r1

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-07-06 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Hi @dblaikie , Could you please take a look at my reply here ? It would be really great if this could be sorted out before LLVM 17 release... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D144829: [WIP][BPF] Add a few new insns under cpu=v4

2023-06-30 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Hi Yonghong, What is the current plan for these changes? I'd like to refresh D140804 to make BPF_ST instruction available for cpu v4. I see that the latest CI run failed because of libcxx issue, I think it is completely unrelated to

[PATCH] D151963: [clang][NFC] Remove trailing whitespaces and enforce it in lib, include and docs

2023-06-30 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added inline comments. Comment at: libcxx/utils/ci/buildkite-pipeline-clang.yml:20-31 + - label: "Format" +commands: + - "! grep -rnI '[[:blank:]]$' clang/lib clang/include clang/docs || false" + +agents: + queue: "libcxx-builders" + os: "linux"

[PATCH] D152986: [clang] Allow 'nomerge' attribute for function pointers

2023-06-26 Thread Eduard Zingerman via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG06eee734c1ea: [clang] Allow nomerge attribute for function pointers (authored by eddyz87). Changed prior to commit:

[PATCH] D152986: [clang] Allow 'nomerge' attribute for function pointers

2023-06-26 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 updated this revision to Diff 534585. eddyz87 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152986/new/ https://reviews.llvm.org/D152986 Files: clang/include/clang/Basic/Attr.td

[PATCH] D152986: [clang] Allow 'nomerge' attribute for function pointers

2023-06-22 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 updated this revision to Diff 533824. eddyz87 added a comment. Rebase, `nomerge` documentation updated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152986/new/ https://reviews.llvm.org/D152986 Files: clang/include/clang/Basic/Attr.td

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-06-22 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 updated this revision to Diff 533746. eddyz87 edited the summary of this revision. eddyz87 added a comment. Rebase: replace usage of removeLocalCVRQualifiers by removeLocalFastQualifiers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-06-22 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D143967#4438815 , @dblaikie wrote: > I haven't looked closely at this, but from a vague/quick reading, it sounds > like this is creating annotations on certain type DINodes, but then moving > them around to different types?

[PATCH] D152986: [clang] Allow 'nomerge' attribute for function pointers

2023-06-15 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D152986#4425736 , @rnk wrote: > Thank you for the review! > The purpose of the attribute is really limited to preserving source location > information on instructions, and this isn't really a supported usage. But it would

[PATCH] D152986: [clang] Allow 'nomerge' attribute for function pointers

2023-06-15 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added subscribers: dfaust, jemarch. eddyz87 added a comment. Hi @jemarch, @dfaust, You might be interested in this discussion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152986/new/ https://reviews.llvm.org/D152986

[PATCH] D152986: [clang] Allow 'nomerge' attribute for function pointers

2023-06-15 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added reviewers: rnk, yonghong-song. eddyz87 added a subscriber: rnk. eddyz87 added a comment. Hi @aaron.ballman, @rnk, I see that you were involved in the discussion when `nomerge` attribute was added in D79121 . Could you please take a look at this

[PATCH] D152986: [clang] Allow 'nomerge' attribute for function pointers

2023-06-15 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 created this revision. Herald added a reviewer: aaron.ballman. Herald added subscribers: jeroen.dobbelaere, jdoerfert. Herald added a project: All. eddyz87 published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. Allow specifying 'nomerge'

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-05-23 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Hi @dblaikie , Could you please take a look at this revision (and the previous one in the stack, D143966 ) or suggest some other reviewer familiar with this part of the code base? Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-05-17 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 updated this revision to Diff 523233. eddyz87 added a comment. Fix for case when CVR qualifier is behind type ignored by UnwrapTypeForDebugInfo(). E.g. for the following example: const int *foo; typeof(*foo) __attribute__((btf_type_tag("tag"))) buz; Repository: rG LLVM Github

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-05-16 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D143967#4346934 , @dfaust wrote: > In D143967#4343841 , @eddyz87 wrote: > >> Changes to avoid attaching type tags to DWARF derived types for >> const/volatile/restrict qualifiers. > >

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-05-15 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 updated this revision to Diff 522338. eddyz87 edited the summary of this revision. eddyz87 added a comment. Changes to avoid attaching type tags to DWARF derived types for const/volatile/restrict qualifiers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-05-02 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 planned changes to this revision. eddyz87 added a comment. In D143967#4312746 , @yonghong-song wrote: > I see the following in the Summary: > > Type tag for CVR modifier type > > C: > > volatile int

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-03-30 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Moving type tags past typedefs would also make C code reconstruction from BTF incomplete. Such reconstruction is used now by e.g. bpftool to create a vmlinux.h header with all kernel type definitions. So, I think type tags should not be moved past typedefs.

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-03-30 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D143967#4233414 , @jemarch wrote: >> If some tooling applies such tags movement it should also apply >> appropriate copying of tags, e.g. it should transform DWARF like this: >> >> var1 -> const -> typedef (bar) -> int >>

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-03-29 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D143967#4232089 , @jemarch wrote: > Thinking about typedef, some C cases may be problematic if we adopt the > flexible rule we are discussing: > > typedef int bar; > const bar __tag1 var1; > bar var2; > > DWARF: >

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-03-29 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a subscriber: anakryiko. eddyz87 added a comment. In D143967#4231746 , @jemarch wrote: >> eddyz87 added a comment. >> ... >> If we consider type tag a qualifier, conceptually it would be simpler >> if ordering would not matter for it as

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-03-29 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D143967#4231517 , @dfaust wrote: > In D143967#4220233 , @jemarch wrote: > >> > > Ok, I understand your point. > For example if we have: > > volatile int __tag1 b; > > The tag

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-03-16 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D143967#4200331 , @dfaust wrote: > In D143967#4197288 , @eddyz87 wrote: > >> ... >> I think there are two sides to this: >> >> - conceptual: is it ok to allow annotations for CVR

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-03-15 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. > ! In D143967#4197142 , @jemarch > wrote: > ... > In GCC we also translate from the internal DWARF structures into BTF. > So, for us, it would also imply to reoder (before generating the BTF > from the interal DWARF) in case

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-03-15 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D143967#4197041 , @dfaust wrote: > The way I see it both 'volatile' and the type tag are modifying 'int' type > here, so the annotation DIE more properly fits as a child of 'int' rather > than the 'volatile'. > > I don't

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-03-15 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Hi @dfaust , Two head-ups, the following items turned out to be important when I tested using kernel BPF testsuite: - in the final BTF, type tags have to precede CVR modifiers, e.g. TYPE_TAG 'foo' -> CONST -> INT. Right now `pahole` does not do any reordering, so I

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-03-15 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a subscriber: jemarch. eddyz87 added a comment. Hi @jemarch, Could you please take a look to verify that this implementation is on the same page with what is planned for GCC? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143967/new/

[PATCH] D143967: [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF

2023-03-13 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 created this revision. Herald added a subscriber: hiraditya. Herald added a project: All. eddyz87 updated this revision to Diff 497835. eddyz87 added a comment. eddyz87 retitled this revision from "[DebugInfo][BPF] 'annotations' on a target type to represent btf_type_tag" to

[PATCH] D144829: [WIP][BPF] Add a few new insns under cpu=v4

2023-03-13 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Hi Yonghong, Left a few nitpicks and one comment in `BPFMIPreEmitPeephole::adjustBranch()` that I think points to a bug. Overall `adjustBranch()` algorithm looks good. It would be great to have some test cases for it, e.g. preprocess test .ll by replacing some template

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-22 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Hi Yonghong, Thank you for taking care of this issue. This was sloppy on my side as the parameter name was completely irrelevant for the test. Best regards, Eduard Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142046/new/

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-19 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. I can relax the warning to note to be on the same page with GCC, the reason I didn't is that similar things in DiagnosticDriverKinds.td are warnings. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142046/new/

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-18 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. Slightly above my edit there is a similar logic for NVPTX target: static void RenderSSPOptions(const Driver , const ToolChain , const ArgList , ArgStringList , bool KernelOrKext) { const llvm::Triple =

[PATCH] D142046: [BPF][clang] Ignore stack protector options for BPF target

2023-01-18 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 created this revision. Herald added a project: All. eddyz87 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Stack protector builtin functions are not implemented for BPF target, thus compiling programs with one of the

[PATCH] D140970: [BPF] preserve btf_decl_tag for parameters of extern functions

2023-01-04 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 updated this revision to Diff 486295. eddyz87 added a comment. Fix for formatting issue reported by CI. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140970/new/ https://reviews.llvm.org/D140970 Files: clang/lib/CodeGen/CGDebugInfo.cpp

[PATCH] D140970: [BPF] preserve btf_decl_tag for parameters of extern functions

2023-01-04 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 created this revision. Herald added a project: All. eddyz87 published this revision for review. eddyz87 added a reviewer: yonghong-song. Herald added a project: clang. Herald added a subscriber: cfe-commits. Generate DILocalVariable entries for parameters of extern functions, the

[PATCH] D140929: [BPF] Support for "btf_decl_tag" annotations for arguments of extern functions

2023-01-04 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 abandoned this revision. eddyz87 added a comment. I think I messed up while creating this revision. I've created a proper stack of revisions with a tip at D140971 . Sorry for all the spam in emails. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D140929: [BPF] Support for "btf_decl_tag" annotations for arguments of extern functions

2023-01-04 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 updated this revision to Diff 486245. eddyz87 added a comment. Reorganize commits as a stack. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140929/new/ https://reviews.llvm.org/D140929 Files: llvm/lib/Target/BPF/BTFDebug.cpp

[PATCH] D140929: [BPF] Support for "btf_decl_tag" annotations for arguments of extern functions

2023-01-04 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D140929#4025562 , @eddyz87 wrote: > In D140929#4025118 , @yonghong-song > wrote: > >> Please separate the patch to clang and llvm part. > > It's already split in three commits: two

[PATCH] D140929: [BPF] Support for "btf_decl_tag" annotations for arguments of extern functions

2023-01-04 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D140929#4025118 , @yonghong-song wrote: > Please separate the patch to clang and llvm part. It's already split in three commits: two for clang, one for llvm. Not sure if this is possible to see in the Phabricator UI, though.

[PATCH] D140929: [BPF] Support for "btf_decl_tag" annotations for arguments of extern functions

2023-01-03 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 created this revision. Herald added a subscriber: hiraditya. Herald added a project: All. eddyz87 retitled this revision from "This series of patches adds support for "btf_decl_tag" annotations for arguments of extern functions. Patch descriptions follow. [BPF] Triple::isBPF() utility

[PATCH] D136041: [clang][DebugInfo] Emit DISubprogram for extern functions with reserved names

2022-10-19 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 marked 2 inline comments as done. eddyz87 added inline comments. Comment at: llvm/lib/IR/Verifier.cpp:3473 !Call.getCalledFunction()->isInterposable() && + !Call.getCalledFunction()->isDeclaration() && Call.getCalledFunction()->getSubprogram())

[PATCH] D136041: [clang][DebugInfo] Emit DISubprogram for extern functions with reserved names

2022-10-19 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 updated this revision to Diff 469081. eddyz87 marked an inline comment as done. eddyz87 added a comment. Fixed test case to fail if `!Call.getCalledFunction()->isDeclaration()` condition is removed in `Verifier::visitCallBase`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D136041: [clang][DebugInfo] Emit DISubprogram for extern functions with reserved names

2022-10-18 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 updated this revision to Diff 468611. eddyz87 added a comment. Comment fixed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136041/new/ https://reviews.llvm.org/D136041 Files: clang/lib/CodeGen/CGDebugInfo.cpp

[PATCH] D136041: [clang][DebugInfo] Emit DISubprogram for extern functions with reserved names

2022-10-18 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D136041#3862741 , @aprantl wrote: > ... Do you have any idea how much this will grow the debug info for something > like, e.g., clang? I made the measurements but I'm not sure what to make of these numbers (e.g. is it good

[PATCH] D136041: [clang][DebugInfo] Emit DISubprogram for extern functions with reserved names

2022-10-18 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 updated this revision to Diff 468514. eddyz87 added a comment. Split the original commit in two to separate clang and llvm parts. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136041/new/ https://reviews.llvm.org/D136041 Files:

[PATCH] D136041: [clang][DebugInfo] Emit DISubprogram for extern functions with reserved names

2022-10-18 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D136041#3863748 , @dblaikie wrote: > Hmm - this does mean linking IR can produce invalid code, though, right (you > link in a definition of the function, so what was valid is now invalid - > because it now has a definition,

[PATCH] D136041: [clang][DebugInfo] Emit DISubprogram for extern functions with reserved names

2022-10-17 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a comment. In D136041#3862741 , @aprantl wrote: > I think this is reasonable. Ideally the LLVM and Clang patches should be two > independent commits. > Please wait a few days for others to chime in though. Do you have any idea > how much

[PATCH] D136041: [clang][DebugInfo] Emit DISubprogram for extern functions with reserved names

2022-10-16 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 added a reviewer: aprantl. eddyz87 added a comment. Hello Adrian, I've noticed that you was tagged as a reviewer in a somewhat related revision: https://reviews.llvm.org/D133060, so decided to tag you here. Could you please take a look? Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D136041: [clang][DebugInfo] Emit DISubprogram for extern functions with reserved names

2022-10-16 Thread Eduard Zingerman via Phabricator via cfe-commits
eddyz87 created this revision. Herald added subscribers: hiraditya, kristof.beyls. Herald added a project: All. eddyz87 updated this revision to Diff 468102. eddyz87 added a comment. eddyz87 published this revision for review. Herald added projects: clang, LLVM. Herald added subscribers: