Elektrine lite

← Feed

@ela@infosec.exchange

Post #2639724

2025-05-17 10:38 UTC

@nrab@hachyderm.io @porglezomp@mastodon.social LLVM extends that basic algorithm a tad bit by trying to move instructions between the call and the return to the top of the generated loop. In cases in which this isn't trivially true (like for code neither depending on the function call value nor having an influence on the return value), there is one additional trick. If the operation performed on the return value of the function call is a commutative and associative operation, it can be eliminated using accumulator recursion elimination. The code lives here: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp#L658

Replies (0)

No replies.