[PATCH] D64597: CodeGet: Init 32bit pointers with 0xAAAAAAAA

Vitaly Buka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 11 14:13:13 PDT 2019


vitalybuka created this revision.
vitalybuka added reviewers: pcc, eugenis, glider, jfb.
Herald added subscribers: cfe-commits, dexonsmith.
Herald added a project: clang.

Patch extends effect of D63967 <https://reviews.llvm.org/D63967> to 32bit platforms and improves pattern
initialization there. It cuts size of 32bit binary compiled with 
-ftrivial-auto-var-init=pattern by 2%.

Using pointer on the first page was useful but is not worth of 2%

Binary size change on CTMark, (with -fuse-ld=lld -Wl,--icf=all, similar results with default linker options)

                     master           patch      diff
  Os pattern   7.915580e+05    7.727164e+05 -0.026256 
  O3 pattern   9.953688e+05    9.769336e+05 -0.018545 

Zero vs Pattern on master

                 zero       pattern      diff
  Os     7.689712e+05  7.915580e+05  0.031380
  O3     9.744796e+05  9.953688e+05  0.021133

Zero vs Pattern with the patch

                 zero       pattern      diff
  Os     7.689712e+05  7.727164e+05  0.003025
  O3     9.744796e+05  9.769336e+05  0.001525


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D64597

Files:
  clang/lib/CodeGen/PatternInit.cpp
  clang/test/CodeGenCXX/auto-var-init.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64597.209330.patch
Type: text/x-patch
Size: 7845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190711/5547a6e5/attachment-0001.bin>


More information about the cfe-commits mailing list