search for: __builtin_bpf_typeid

Displaying 5 results from an estimated 5 matches for "__builtin_bpf_typeid".

2015 Aug 05
2
[LLVMdev] Cc llvmdev: Re: llvm bpf debug info. Re: [RFC PATCH v4 3/3] bpf: Introduce function for outputing data to perf event
...; struct my_str __str_my_str; >>>> >>>> struct my_str2 { >>>> int x; >>>> int y; >>>> int z; >>>> }; >>>> struct my_str2 __str_my_str2; >>>> >>>> test_func(__builtin_bpf_typeid(&__str_my_str)); >>>> test_func(__builtin_bpf_typeid(&__str_my_str2)); >>>> mov r1, 1 >>>> call 4660 >>>> mov r1, 2 >>>> call 4660 >>> >>> this part looks good. I...
2015 Aug 12
2
llvm bpf debug info. Re: [RFC PATCH v4 3/3] bpf: Introduce function for outputing data to perf event
...t code. SDValue and SDVTList are wrappers of EVT and MVT, all information we concern won't be passed here. I think now we have 2 choices: 1. Hacking into clang, implement target specific builtin function. Now I have worked out a ugly but workable patch which setup a builtin function: __builtin_bpf_typeid(), which accepts local or global variable then returns different constant for different types. 2. Implementing an LLVM intrinsic call (llvm.typeid), make it be processed in visitIntrinsicCall(). I think we can get something useful if it is processed with that function. The next thin...
2015 Aug 18
3
[RFC PATCH 1/2] [clang]: Add AuxAttr support
This patch adds EmitTypeAuxAttribute() function to CGDebugInfo, which allows other parts of clang issue auxiliary information through an enumeration type in Dwarf information. For example, by calling DI->EmitTypeAuxAttribute(type, "ID", 1234); We can get following information in dwarf: <1><3f>: Abbrev Number: 3 (DW_TAG_structure_type) <40> DW_AT_name
2015 Aug 12
3
llvm bpf debug info. Re: [RFC PATCH v4 3/3] bpf: Introduce function for outputing data to perf event
...d MVT, all information we concern won't be passed here. >> >> I think now we have 2 choices: >> >> 1. Hacking into clang, implement target specific builtin function. Now I >> have worked out a ugly but workable patch which setup a builtin function: >> __builtin_bpf_typeid(), which accepts local or global variable then >> returns different constant for different types. >> >> 2. Implementing an LLVM intrinsic call (llvm.typeid), make it be processed >> in >> visitIntrinsicCall(). I think we can get something useful if it is >&g...
2015 Aug 14
2
[LLVM RFC] Add llvm.typeid.for intrinsic
This is for BPF output. BPF program output bytes to perf through a tracepoint. For decoding such data, we need a way to describe the format of the buffer. This patch is a try which gives each variable a unique number by introducing a new intrinsic 'llvm.typeid.for'. At the bottom is an example of using that intrinsic and the result of $ clang -target bpf -O2 -c -S ./test_typeid.c