HomePhabricator

[CLANG][BPF] permit any argument type for __builtin_preserve_access_index()

Description

[CLANG][BPF] permit any argument type for __builtin_preserve_access_index()

Commit c15aa241f821 ("[CLANG][BPF] change __builtin_preserve_access_index()
signature") changed the builtin function signature to

PointerT __builtin_preserve_access_index(PointerT ptr)

with a pointer type as the argument/return type, where argument and
return types must be the same.

There is really no reason for this constraint. The builtin just
presented a code region so that IR builtins

__builtin_{array, struct, union}_preserve_access_index

can be applied.

This patch removed the pointer type restriction to permit any
argument type as long as it is permitted by the compiler.

Differential Revision: https://reviews.llvm.org/D67883

Details

Committed
yhsSun, Sep 22, 10:33 AM
Differential Revision
D67883: [CLANG][BPF] permit any argument type for __builtin_preserve_access_index()
Branches
Unknown
Tags
Unknown