[PATCH] D80316: [HardwareLoops] Intrinsic LangRef descriptions
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 22 12:20:29 PDT 2020
SjoerdMeijer added a comment.
In D80316#2051371 <https://reviews.llvm.org/D80316#2051371>, @efriedma wrote:
> The descriptions here related to llvm.loop.decrement still aren't really sufficient. The description of llvm.set.loop.iterations says "It's a hint to the backend". But llvm.loop.decrement is apparently depending on llvm.set.loop.iterations to have some sort of side-effect.
>
> Really, I suspect the problem here is that llvm.loop.decrement is actually just unsound, and we avoid any issues with it simply by running it really late in the pass pipeline. But if that's the case, I'd prefer to state that explicitly.
Yep, agreed. I was unfamiliar with llvm.loop.decrement, looked into it today, but was struggling with it. I will have a look again to see if I haven't missed anything. And llvm.set.loop.iterations is probably very dubious too, because it just sits there, floating around. As you said, we get away with this because this is run really late. Probably slightly better is to let llvm.set.loop.iterations produce a value, so that it probably kind of models a move of the iteration count to the iteration count register, which can be picked up. But I don't have the bandwidth to do this right now: first I would like to document the current state of the art here, then finish D79100 <https://reviews.llvm.org/D79100> and D79783 <https://reviews.llvm.org/D79783>, and after that I would like to return to this. So I will add a statement about unsoundness of this.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80316/new/
https://reviews.llvm.org/D80316
More information about the llvm-commits
mailing list