[PATCH] D45098: [AArch64] fix PR32384: bump the number of stores per memset/memcpy/memmov

Sebastian Pop via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 30 09:19:58 PDT 2018


sebpop created this revision.
sebpop added reviewers: eli.friedman, davide, evandro.
Herald added subscribers: hiraditya, kristof.beyls, javed.absar, rengolin.

As Eli suggested in https://bugs.llvm.org/show_bug.cgi?id=32384#c1 this makes the
inlining of memset/memcpy/memmov more aggressive when compiling for speed. The
tuning remains the same when optimizing for size.

The following experiment on A-72 shows that there are several benchmarks
benefiting from this change when compiling the SPEC Cpu2000 with -O3
with a low overhead on code size.

A better score is positive, an increase in text size is positive:

| benchmark            | score  | text   |
| spec2000/164.gzip    | 0.01%  | -0.01% |
| spec2000/175.vpr     | -0.46% | 0.01%  |
| spec2000/176.gcc     | -0.28% | 0.01%  |
| spec2000/177.mesa    | 0.75%  | 0.08%  |
| spec2000/179.art     | 0.39%  | 0.00%  |
| spec2000/181.mcf     | 0.26%  | 0.00%  |
| spec2000/183.equake  | -0.34% | -0.01% |
| spec2000/186.crafty  | 0.09%  | 0.06%  |
| spec2000/188.ammp    | 2.50%  | 0.01%  |
| spec2000/197.parser  | 0.21%  | 0.00%  |
| spec2000/252.eon     | 0.50%  | 1.62%  |
| spec2000/253.perlbmk | 1.67%  | 0.00%  |
| spec2000/254.gap     | -0.40% | 0.01%  |
| spec2000/255.vortex  | -0.24% | 0.00%  |
| spec2000/256.bzip2   | 0.01%  | 0.00%  |
| spec2000/300.twolf   | 0.59%  | 0.00%  |
|


https://reviews.llvm.org/D45098

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp


Index: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
===================================================================
--- llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -575,9 +575,14 @@
   setTargetDAGCombine(ISD::INTRINSIC_W_CHAIN);
   setTargetDAGCombine(ISD::INSERT_VECTOR_ELT);
 
-  MaxStoresPerMemset = MaxStoresPerMemsetOptSize = 8;
-  MaxStoresPerMemcpy = MaxStoresPerMemcpyOptSize = 4;
-  MaxStoresPerMemmove = MaxStoresPerMemmoveOptSize = 4;
+  MaxStoresPerMemset = 32;
+  MaxStoresPerMemsetOptSize = 8;
+
+  MaxStoresPerMemcpy = 16;
+  MaxStoresPerMemcpyOptSize = 4;
+
+  MaxStoresPerMemmove = 16;
+  MaxStoresPerMemmoveOptSize = 4;
 
   setStackPointerRegisterToSaveRestore(AArch64::SP);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45098.140445.patch
Type: text/x-patch
Size: 763 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180330/df306d6c/attachment.bin>


More information about the llvm-commits mailing list