This is an archive of the discontinued LLVM Phabricator instance.

[BPF] generate proper code for __builtin_bpf_load_u32_to_ptr()
AbandonedPublic

Authored by yonghong-song on Jun 9 2020, 9:54 AM.

Details

Reviewers
ast
Summary

This is the BPF backend support for __builtin_bpf_load_u32_to_ptr().
A new codegen only opcode LOAD_U32_TO_PTR is introduced
for IR builtin int_bpf_load_u32_to_ptr(). Finally, a
single LDW instruction is generated for the builtin.

Diff Detail

Event Timeline

yonghong-song created this revision.Jun 9 2020, 9:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2020, 9:54 AM

generate code for LOAD_U32_TO_PTR through BPFInstrInfo.td specificaiton instead of rewrite at AsmPrint time.

yonghong-song retitled this revision from [BPF] generate proper code for __builtin_load_u32_to_ptr() to [BPF] generate proper code for __builtin_bpf_load_u32_to_ptr().Jun 9 2020, 7:20 PM
yonghong-song edited the summary of this revision. (Show Details)
yonghong-song abandoned this revision.Aug 6 2020, 5:53 PM

user inline asm can do the work so abandon this patch.