summaryrefslogtreecommitdiff
path: root/gcc/config/bpf/bpf.cc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-11-08 12:36:43 +0100
committerMartin Liska <mliska@suse.cz>2022-11-08 12:36:43 +0100
commit4b13c73bba935443be3207abf26f7ba05f79badc (patch)
treea6bb1525d07859fa8fc6f61dd13df7ddfd1ac254 /gcc/config/bpf/bpf.cc
parent33f5dde0cd15df9cf89b29280d4ff5fcf7b30e66 (diff)
parentfa271afb58423014e2feef9f15c1a87428e64ddc (diff)
downloadgcc-devel/sphinx.tar.gz
Merge branch 'master' into devel/sphinxdevel/sphinx
Diffstat (limited to 'gcc/config/bpf/bpf.cc')
-rw-r--r--gcc/config/bpf/bpf.cc24
1 files changed, 1 insertions, 23 deletions
diff --git a/gcc/config/bpf/bpf.cc b/gcc/config/bpf/bpf.cc
index ea8ca64d1d6..fd4003c2bfc 100644
--- a/gcc/config/bpf/bpf.cc
+++ b/gcc/config/bpf/bpf.cc
@@ -1731,7 +1731,6 @@ handle_attr_preserve (function *fn)
{
basic_block bb;
rtx_insn *insn;
- rtx_code_label *label;
FOR_EACH_BB_FN (bb, fn)
{
FOR_BB_INSNS (bb, insn)
@@ -1762,28 +1761,7 @@ handle_attr_preserve (function *fn)
}
if (is_attr_preserve_access (expr))
- {
- auto_vec<unsigned int, 16> accessors;
- tree container = bpf_core_compute (expr, &accessors);
- if (accessors.length () < 1)
- continue;
- accessors.reverse ();
-
- container = TREE_TYPE (container);
- const char * section_name;
- if (DECL_SECTION_NAME (fn->decl))
- section_name = DECL_SECTION_NAME (fn->decl);
- else
- section_name = ".text";
-
- label = gen_label_rtx ();
- LABEL_PRESERVE_P (label) = 1;
- emit_label (label);
-
- /* Add the CO-RE relocation information to the BTF container. */
- bpf_core_reloc_add (container, section_name, &accessors, label,
- BPF_RELO_FIELD_BYTE_OFFSET);
- }
+ maybe_make_core_relo (expr, BPF_RELO_FIELD_BYTE_OFFSET);
}
}
rtx_insn *seq = get_insns ();