[llvm-dev] Optimised stack direction?
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Tue Jun 25 05:24:22 PDT 2019
On Tue, 25 Jun 2019 at 13:22, Tim Northover <t.p.northover at gmail.com> wrote:
> The only way I can think of to reliably detect the direction is using
> an __attribute__((noinline)) function to compare locals from two
> different, nested frames (even that's iffy though on a semantic
> level). If there turned out to be a compelling enough use-case, an
> intrinsic could be added to get the result more efficiently.
Actually, (uintptr_t)__builtin_frame_address(0) <
(uintptr_t)__builtin_frame_address(1) would probably work too.
Cheers.
Tim.
More information about the llvm-dev
mailing list