1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/utils
Chad Rosier 1ce13129c7 Improve the compression of the tablegen DiffLists by introducing a new sort
algorithm when assigning EnumValues to the synthesized registers.

The current algorithm, LessRecord, uses the StringRef compare_numeric
function.  This function compares strings, while handling embedded numbers.
For example, the R600 backend registers are sorted as follows:

  T1
  T1_W
  T1_X
  T1_XYZW
  T1_Y
  T1_Z
  T2
  T2_W
  T2_X
  T2_XYZW
  T2_Y
  T2_Z

In this example, the 'scaling factor' is dEnum/dN = 6 because T0, T1, T2
have an EnumValue offset of 6 from one another.  However, in other parts
of the register bank, the scaling factors are different:

dEnum/dN = 5:
  KC0_128_W
  KC0_128_X
  KC0_128_XYZW
  KC0_128_Y
  KC0_128_Z
  KC0_129_W
  KC0_129_X
  KC0_129_XYZW
  KC0_129_Y
  KC0_129_Z

The diff lists do not work correctly because different kinds of registers have
different 'scaling factors'.  This new algorithm, LessRecordRegister, tries to
enforce a scaling factor of 1.  For example, the registers are now sorted as
follows:

  T1
  T2
  T3
  ...
  T0_W
  T1_W
  T2_W
  ...
  T0_X
  T1_X
  T2_X
  ...
  KC0_128_W
  KC0_129_W
  KC0_130_W
  ...

For the Mips and R600 I see a 19% and 6% reduction in size, respectively.  I
did see a few small regressions, but the differences were on the order of a
few bytes (e.g., AArch64 was 16 bytes).  I suspect there will be even
greater wins for targets with larger register files.

Patch reviewed by Jakob.
rdar://14006013

llvm-svn: 185094
2013-06-27 19:38:13 +00:00
..
bugpoint
buildit Build Apple's llvmCore with --disable-zlib. <rdar://problem/14182316> 2013-06-18 01:22:29 +00:00
count
crosstool
emacs
FileCheck keep only the StringRef version of getFileOrSTDIN. 2013-06-25 05:28:34 +00:00
FileUpdate keep only the StringRef version of getFileOrSTDIN. 2013-06-25 05:28:34 +00:00
fpcmp Don't use PathV1.h in FileUtilities.h. 2013-06-13 20:41:00 +00:00
git [utils] Update find-rev utility to take a branch argument (name of the git-svn 2013-01-17 18:57:21 +00:00
git-svn Use 'git svn find-rev' in git-svnrevert instead of shell script fu. 2013-04-26 03:27:39 +00:00
jedit
kate Add the IR attribute 'sspstrong'. 2013-01-23 06:41:41 +00:00
KillTheDoctor Fix grammar-o. 2012-12-11 00:23:07 +00:00
lint
lit Fixed bug when tests in executable partially used absolute paths. 2013-05-30 04:56:28 +00:00
llvm-build Rename VMCore directory to IR. 2013-01-02 09:10:48 +00:00
llvm-lit [CMake][Lit][unittests] Deprecate CMAKE_BUILD_TYPE in each build directory for unittests. 2013-01-27 12:20:50 +00:00
Misc
not Avoid using PathV1.h in Program.h. 2013-06-13 20:25:38 +00:00
PerfectShuffle
release Add a script to help us create source tar balls for the release. 2013-06-07 11:15:30 +00:00
TableGen Improve the compression of the tablegen DiffLists by introducing a new sort 2013-06-27 19:38:13 +00:00
Target/ARM
testgen [MC] bundle alignment: prevent padding instructions from crossing bundle boundaries 2013-01-31 17:00:03 +00:00
textmate Add highlighting for "int" keyword 2013-01-08 16:23:02 +00:00
unittest Get the unittests compiling when building with cmake and the setting 2013-05-14 13:29:16 +00:00
valgrind llvm/utils/valgrind/x86_64-pc-linux-gnu.supp: Add /usr/bin/cmp. 2013-01-20 15:30:29 +00:00
vim Enable syntax highlighting for reStructuredText files. 2013-02-28 06:43:24 +00:00
yaml-bench
check-each-file
clang-parse-diagnostics-file [utils] Tweak utils/clang-parse-diagnostics-file to ignore autoconf diagnostics. 2012-12-22 00:47:06 +00:00
codegen-diff
countloc.sh
DSAclean.py
DSAextract.py
findmisopt
findoptdiff
findsym.pl
GenLibDeps.pl Rename VMCore directory to IR. 2013-01-02 09:10:48 +00:00
GetRepositoryPath
GetSourceVersion
getsrcs.sh
lldbDataFormatters.py
llvm-compilers-check Avoid Unnecessary Builds 2013-01-28 22:05:50 +00:00
llvm-native-gcc
llvm-native-gxx
llvm.grm Unify clang/llvm attributes for asan/tsan/msan (LLVM part) 2013-02-26 06:58:09 +00:00
llvm.natvis A port of the Visual Studio 2012 debugger visualizers for common LLVM and clang datatypes. Patch thanks to Nico Rieck! 2013-01-25 23:37:25 +00:00
LLVMBuild.txt
llvmdo
llvmgrep
Makefile Move yaml2obj to tools too. 2013-04-05 20:00:35 +00:00
makellvm
profile.pl
sort_includes.py Teach sort_includes.py to drop duplicated includes. 2012-12-21 18:00:08 +00:00
test_debuginfo.pl
UpdateCMakeLists.pl
wciia.py