Sander via llvm-dev
2020-Jun-01 13:06 UTC
[llvm-dev] Machinepipeliner interface. shouldIgnoreForPipelining, actually not ignoring.
Hi all, I think there is a mistake in the machinepipeliner interface. In the TargetInstrInfo.h in the class PipelinerLoopInfo there is a function "bool shouldIgnoreForPipelining(const MachineInstr *MI)". The description says that if this function returns true for a given MachineInstr it will not be pipelined. However in reality it is not ignored and is being considered for pipelining. I implemented this function in my own backend, and put an instruction there that I want to be ignored, but still this instruction end up trying to be pipelined. I implemented the same way as in PPCInstrInfo.cpp, and I think it has the same bug. Is this a bug, or am I forgetting something? Kind regards, Sander Ruben
Jinsong Ji via llvm-dev
2020-Jun-02 19:58 UTC
[llvm-dev] Machinepipeliner interface. shouldIgnoreForPipelining, actually not ignoring.
Hi Sander: It may be confusing, but it is not a bug. And you are right, if you are using the in-tree machinepipeliner, it won't have any effects, because there is NO In tree reference of this API at all. You can see the comments when James introduced this API in https://reviews.llvm.org/D67167 Best, Jinsong Ji (纪金松), PhD. XL/LLVM on Power Compiler Development E-mail: jji at us.ibm.com From: Sander via llvm-dev <llvm-dev at lists.llvm.org> To: llvm-dev at lists.llvm.org Date: 06/02/2020 03:47 PM Subject: [EXTERNAL] [llvm-dev] Machinepipeliner interface. shouldIgnoreForPipelining, actually not ignoring. Sent by: "llvm-dev" <llvm-dev-bounces at lists.llvm.org> Hi all, I think there is a mistake in the machinepipeliner interface. In the TargetInstrInfo.h in the class PipelinerLoopInfo there is a function "bool shouldIgnoreForPipelining(const MachineInstr *MI)". The description says that if this function returns true for a given MachineInstr it will not be pipelined. However in reality it is not ignored and is being considered for pipelining. I implemented this function in my own backend, and put an instruction there that I want to be ignored, but still this instruction end up trying to be pipelined. I implemented the same way as in PPCInstrInfo.cpp, and I think it has the same bug. Is this a bug, or am I forgetting something? Kind regards, Sander Ruben _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Ddev&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=DvnnfavFQBGT2CDyHzTr_Q&m=ojk4VvrrowI0f20WtXeVl11xO5qCVRzw8hmbNS7AjlQ&s=YDITnNjDMtIIk-0E0ZStzEfZ3H2tXX10BLyV1Je5lgo&e -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200602/2b2e4ba4/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: graycol.gif Type: image/gif Size: 105 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200602/2b2e4ba4/attachment.gif>
Nagurne, James via llvm-dev
2020-Sep-02 17:43 UTC
[llvm-dev] [EXTERNAL] Re: Machinepipeliner interface. shouldIgnoreForPipelining, actually not ignoring.
Sorry to bring this thread from 3 months ago back, but I’m running into this issue too. I do see that shouldIgnore is not called in the MachinePipeliner, however, James’ comment doesn’t really resolve the issue or make the story any clearer. My summary of the comment is: “Hexagon and PPC9 do not need to ignore any instructions. However, in the case that you do, such as when the indvar update is explicit, this function is provided to allow the target to strip those instructions from the pipelined kernel.” However, the reality is that the implementation seems incomplete and there’s no instructions on how to achieve the desired result. Is it left as an exercise to the reader/implementer? Is there something I’m missing? J.B. Nagurne Code Generation Texas Instruments From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Jinsong Ji via llvm-dev Sent: Tuesday, June 2, 2020 2:58 PM To: Sander Cc: llvm-dev at lists.llvm.org Subject: [EXTERNAL] Re: [llvm-dev] Machinepipeliner interface. shouldIgnoreForPipelining, actually not ignoring. Hi Sander: It may be confusing, but it is not a bug. And you are right, if you are using the in-tree machinepipeliner, it won't have any effects, because there is NO In tree reference of this API at all. You can see the comments when James introduced this API in https://reviews.llvm.org/D67167 Best, Jinsong Ji (纪金松), PhD. XL/LLVM on Power Compiler Development E-mail: jji at us.ibm.com [Inactive hide details for Sander via llvm-dev ---06/02/2020 03:47:53 PM---Hi all, I think there is a mistake in the machinepipe]Sander via llvm-dev ---06/02/2020 03:47:53 PM---Hi all, I think there is a mistake in the machinepipeliner interface. In the From: Sander via llvm-dev <llvm-dev at lists.llvm.org> To: llvm-dev at lists.llvm.org Date: 06/02/2020 03:47 PM Subject: [EXTERNAL] [llvm-dev] Machinepipeliner interface. shouldIgnoreForPipelining, actually not ignoring. Sent by: "llvm-dev" <llvm-dev-bounces at lists.llvm.org> ________________________________ Hi all, I think there is a mistake in the machinepipeliner interface. In the TargetInstrInfo.h in the class PipelinerLoopInfo there is a function "bool shouldIgnoreForPipelining(const MachineInstr *MI)". The description says that if this function returns true for a given MachineInstr it will not be pipelined. However in reality it is not ignored and is being considered for pipelining. I implemented this function in my own backend, and put an instruction there that I want to be ignored, but still this instruction end up trying to be pipelined. I implemented the same way as in PPCInstrInfo.cpp, and I think it has the same bug. Is this a bug, or am I forgetting something? Kind regards, Sander Ruben _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200902/95b3d11e/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 105 bytes Desc: image001.gif URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200902/95b3d11e/attachment.gif>
Possibly Parallel Threads
- [EXTERNAL] Re: Machinepipeliner interface. shouldIgnoreForPipelining, actually not ignoring.
- [EXTERNAL] RE: Machinepipeliner interface. shouldIgnoreForPipelining, actually not ignoring.
- [EXTERNAL] RE: Machinepipeliner interface. shouldIgnoreForPipelining, actually not ignoring.
- [EXTERNAL] RE: Machinepipeliner interface. shouldIgnoreForPipelining, actually not ignoring.
- MachinePipeliner refactoring