llvm-6502/utils
Chad Rosier b7110cf5b5 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185094 91177308-0d34-0410-b5e6-96231b3b80d8
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 Remove 'deplibs' keyword, since it's no longer used. 2012-12-03 06:34:06 +00:00
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 Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
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 Sort the #include lines for utils/... 2012-12-04 10:37:14 +00:00
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 Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767 2012-09-27 10:14:43 +00:00
findmisopt Remove llvm-ld and llvm-stub (which is only used by llvm-ld). 2012-04-19 19:27:54 +00:00
findoptdiff
findsym.pl
GenLibDeps.pl Rename VMCore directory to IR. 2013-01-02 09:10:48 +00:00
GetRepositoryPath [utils] Fix Get{RepositoryPath,SourceVersion} to have a more robust is-git-svn 2012-05-15 18:44:09 +00:00
GetSourceVersion [utils] Fix Get{RepositoryPath,SourceVersion} to have a more robust is-git-svn 2012-05-15 18:44:09 +00:00
getsrcs.sh
lldbDataFormatters.py Simplify the SmallVector pretty printer for LLDB a bit and make it work with reference types. 2012-11-10 09:45:32 +00:00
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 LLVMBuild: Introduce a common section which currently has a list of the 2011-12-12 22:45:54 +00:00
llvmdo
llvmgrep Use -H on darwin as well. 2012-01-26 22:06:23 +00:00
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 Fix a "Bad fd number" error on some platforms due to a less portable 2012-07-23 20:54:17 +00:00
UpdateCMakeLists.pl Generalize matching of add_executable to add_XXX_executable. 2012-11-22 07:48:52 +00:00
wciia.py really fix permissions 2012-11-17 06:38:44 +00:00