FailedChanges

Summary

  1. [BPF] Permit all user instructed offset relocatiions Currently, not all user specified relocations (with clang intrinsic __builtin_preserve_access_index()) will turn into relocations. In the current implementation, a __builtin_preserve_access_index() chain is turned into relocation only if the result of the clang intrinsic is used in a function call or a nonzero offset computation of getelementptr. For all other cases, the relocatiion request is ignored and the __builtin_preserve_access_index() is turned into regular getelementptr instructions. The main reason is to mimic bpf_probe_read() requirement. But there are other use cases where relocatable offset is generated but not used for bpf_probe_read(). This patch relaxed previous constraints when to generate relocations. Now, all user __builtin_preserve_access_index() will have relocations generated. Differential Revision: https://reviews.llvm.org/D67688
Revision 372198 by yhs:
[BPF] Permit all user instructed offset relocatiions

Currently, not all user specified relocations
(with clang intrinsic __builtin_preserve_access_index())
will turn into relocations.

In the current implementation, a __builtin_preserve_access_index()
chain is turned into relocation only if the result of the clang
intrinsic is used in a function call or a nonzero offset computation
of getelementptr. For all other cases, the relocatiion request
is ignored and the __builtin_preserve_access_index() is turned
into regular getelementptr instructions.
The main reason is to mimic bpf_probe_read() requirement.

But there are other use cases where relocatable offset is
generated but not used for bpf_probe_read(). This patch
relaxed previous constraints when to generate relocations.
Now, all user __builtin_preserve_access_index() will have
relocations generated.

Differential Revision: https://reviews.llvm.org/D67688
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/BPF/BPFAbstractMemberAccess.cpp (diff)llvm.src/lib/Target/BPF/BPFAbstractMemberAccess.cpp
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-end-load.llllvm.src/test/CodeGen/BPF/CORE/offset-reloc-end-load.ll
The file was added/llvm/trunk/test/CodeGen/BPF/CORE/offset-reloc-end-ret.llllvm.src/test/CodeGen/BPF/CORE/offset-reloc-end-ret.ll