Hendrik Greving via llvm-dev
2020-Jul-16 18:47 UTC
[llvm-dev] Selection DAG chain question
> Chain doesn't guarantee that operations on parallel chains don't getinterleaved This would be a sequential chain...> This is the case for all operations expanded as library callsI think their originating node already has a chain (i.e. mem operand or side effect in llvm-ir). My case is a arithmetic node without ordering constraints (divrem) getting lowered into sth that _does_ have ordering constraints. I first thought it is very straight forward, turns out it is not a common case. My current WA will be to code prepare into intrinsics with side-effects. I was wondering if that's really necessary.. Thanks for the input On Thu, Jul 16, 2020 at 11:21 AM Matt Arsenault <arsenm2 at gmail.com> wrote:> > > On Jul 16, 2020, at 14:10, Hendrik Greving via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > I scanned other architectures, haven't found an example where somebody > creates a chain out of thin air. Do you know any? > > > > This is the case for all operations expanded as library calls. The call > sequence involves a chain. One of the AMDGPU fdiv expansions also > introduces a side effecting mode switch with a chain > > -Matt >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200716/8fb7fe99/attachment.html>
> On Jul 16, 2020, at 14:47, Hendrik Greving <hgreving at google.com> wrote: > > I think their originating node already has a chain (i.e. mem operand or side effect in llvm-ir)No, non-sideeffecting operations can be legalized as compiler-rt calls -Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200716/d2a7dc44/attachment.html>
Hendrik Greving via llvm-dev
2020-Jul-16 21:00 UTC
[llvm-dev] Selection DAG chain question
> No, non-sideeffecting operations can be legalized as compiler-rt callsRight, but not as "regular" nodes with side-effects? I guess you could search and analyze the DAG manually but that seems hacky. Maybe something that one day LLVM could support natively. On Thu, Jul 16, 2020 at 11:55 AM Matt Arsenault <arsenm2 at gmail.com> wrote:> > > On Jul 16, 2020, at 14:47, Hendrik Greving <hgreving at google.com> wrote: > > I think their originating node already has a chain (i.e. mem operand or > side effect in llvm-ir) > > > > No, non-sideeffecting operations can be legalized as compiler-rt calls > > -Matt >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200716/89819cda/attachment.html>