[PATCH] [mips][msa] Few MSA Builtins have side-effects. Added IntrNoMem to those that don't.

Jack Carter Jack.Carter at imgtec.com
Fri Aug 23 04:05:07 PDT 2013


LGTM (this time including the list)

Jack
________________________________
From: Daniel Sanders
Sent: Wednesday, August 21, 2013 4:07 AM
To: Daniel Sanders; Jack Carter
Cc: llvm-commits at cs.uiuc.edu
Subject: RE: [PATCH] [mips][msa] Few MSA Builtins have side-effects. Added IntrNoMem to those that don't.

Jack and I discussed this patch offline and he asked me to explain why I think a new test case isn't necessary in more detail.

This patch promises the compiler that these intrinsics neither read or write memory (or have any other side-effects). Ultimately this allows load/store instructions to be moved across the intrinsic. The practical effect at this point though is that the intrinsics will be represented as a INTRINSIC_WO_CHAIN or as INTRINSIC_VOID rather than a INTRINSIC_W_CHAIN and will be lowered by the appropriate function. This will be important when we apply the patches that lower the intrinsics into equivalent SelectionDAG nodes (where doing so is possible) since we won't need to repair the unnecessary chain that the intrinsics have prior to this patch.

The best I can do for a testcase for this patch is a Pass/Maybe test. If a memory operation is moved across the intrinsic then it definitely passed, but if it isn't then it might still have passed (the optimizers decided not to do it) or it might have failed (the optimizers couldn't do it). In general, I don't think we should be testing for specific instruction orderings (beyond topographical order). Partly because such tests tend to be fragile, and partly because we are more concerned with correctness than optimisation at this early stage in MSA's development.

From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Daniel Sanders
Sent: 16 August 2013 17:10
To: Jack Carter
Cc: llvm-commits at cs.uiuc.edu
Subject: [PATCH] [mips][msa] Few MSA Builtins have side-effects. Added IntrNoMem to those that don't.

Few MSA Builtins have side-effects. Added IntrNoMem to those that don't.

There isn’t a new testcase in this patch since the existing tests should test the intrinsics to the same standard.

Daniel Sanders
Leading Software Design Engineer, MIPS Processor IP
Imagination Technologies Limited
www.imgtec.com<http://www.imgtec.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130823/47fb91b7/attachment.html>


More information about the llvm-commits mailing list