forked from OSchip/llvm-project
00602ee7ef
This patch simplified IR generation for __builtin_btf_type_id(). For __builtin_btf_type_id(obj, flag), previously IR builtin looks like if (obj is a lvalue) llvm.bpf.btf.type.id(obj.ptr, 1, flag) !type else llvm.bpf.btf.type.id(obj, 0, flag) !type The purpose of the 2nd argument is to differentiate __builtin_btf_type_id(obj, flag) where obj is a lvalue vs. __builtin_btf_type_id(obj.ptr, flag) Note that obj or obj.ptr is never used by the backend and the `obj` argument is only used to derive the type. This code sequence is subject to potential llvm CSE when - obj is the same .e.g., nullptr - flag is the same - metadata type is different, e.g., typedef of struct "s" and strust "s". In the above, we don't want CSE since their metadata is different. This patch change IR builtin to llvm.bpf.btf.type.id(seq_num, flag) !type and seq_num is always increasing. This will prevent potential llvm CSE. Also report an error if the type name is empty for remote relocation since remote relocation needs non-empty type name to do relocation against vmlinux. Differential Revision: https://reviews.llvm.org/D85174 |
||
---|---|---|
.. | ||
array-1d-char.ll | ||
array-1d-int.ll | ||
array-2d-int.ll | ||
array-size-0.ll | ||
array-typedef.ll | ||
binary-format.ll | ||
builtin-btf-type-id.ll | ||
char-no-debuginfo.ll | ||
char.ll | ||
empty-btf.ll | ||
enum-basic.ll | ||
extern-builtin.ll | ||
extern-func-arg.ll | ||
extern-global-var.ll | ||
extern-var-func-weak-section.ll | ||
extern-var-func-weak.ll | ||
extern-var-func.ll | ||
extern-var-section.ll | ||
extern-var-struct-weak.ll | ||
extern-var-struct.ll | ||
extern-var-weak-section.ll | ||
filename.ll | ||
func-func-ptr.ll | ||
func-non-void.ll | ||
func-source.ll | ||
func-typedef.ll | ||
func-unused-arg.ll | ||
func-void.ll | ||
fwd-no-define.ll | ||
fwd-with-define.ll | ||
global-var-inited.ll | ||
global-var-sec-readonly.ll | ||
global-var-sec.ll | ||
int.ll | ||
local-var-readonly-1.ll | ||
local-var-readonly-2.ll | ||
local-var.ll | ||
longlong.ll | ||
map-def-2.ll | ||
map-def-3.ll | ||
map-def.ll | ||
pruning-const.ll | ||
pruning-typedef.ll | ||
ptr-const-void.ll | ||
ptr-func-1.ll | ||
ptr-func-2.ll | ||
ptr-func-3.ll | ||
ptr-int.ll | ||
ptr-prune-type.ll | ||
ptr-void.ll | ||
ptr-volatile-const-void.ll | ||
ptr-volatile-void.ll | ||
restrict-ptr.ll | ||
short.ll | ||
static-func.ll | ||
static-var-derived-type.ll | ||
static-var-inited-sec.ll | ||
static-var-inited.ll | ||
static-var-readonly-sec.ll | ||
static-var-readonly.ll | ||
static-var-sec.ll | ||
static-var-zerolen-array.ll | ||
static-var.ll | ||
struct-anon-2.ll | ||
struct-anon.ll | ||
struct-basic.ll | ||
struct-bitfield-typedef.ll | ||
struct-enum.ll | ||
uchar.ll | ||
uint.ll | ||
ulonglong.ll | ||
union-array-typedef.ll | ||
ushort.ll | ||
weak-global-2.ll | ||
weak-global.ll |