llvm-project/llvm
Quentin Colombet 21136c0273 [TableGen][AsmWriterEmitter] Use a deterministic order to sort InstrAliases
Inside an alias group, when ordering instruction aliases, we rely
on the priority field to sort them.
When the priority is not set or more generally when there is a tie between
two aliases, we used to rely on the lexicographic order. However, this
order can change for the anonymous records when more instruction, intrinsic,
etc. are inserted.

For instance, given two anonymous records r1 and r2 with respective name
A_999 and A_1000, their lexicography order will be r2 then r1. Now, if
an instruction is added before them, their name will become respectively
A_1000 and A_1001, thus the lexicography order will be r1 then r2, i.e.,
it changed.

If that happens in an alias group, the assembly output would prefer a
different alias for no apparent good reasons.

A way to fix that is to use proper priority for all aliases, but we
can also make the tie breaker comparison smarter and use a deterministic
ordering. This is what this patch does.

llvm-svn: 294695
2017-02-10 02:43:09 +00:00
..
bindings
cmake [CMake] Fix pthread handling for out-of-tree builds 2017-02-10 01:59:20 +00:00
docs AMDGPU : Add trap handler support. 2017-02-10 02:15:29 +00:00
examples [CMake] Fix pthread handling for out-of-tree builds 2017-02-10 01:59:20 +00:00
include [MC] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-02-10 01:33:54 +00:00
lib AMDGPU: Fix trailing whitespace 2017-02-10 02:42:31 +00:00
projects
resources
runtimes [CMake] Handle common options for runtimes build 2017-01-10 19:47:05 +00:00
test AMDGPU : Add trap handler support. 2017-02-10 02:15:29 +00:00
tools [dsymutil] Fix handling of empty CUs in LTO links. 2017-02-09 19:41:55 +00:00
unittests [CMake] Fix pthread handling for out-of-tree builds 2017-02-10 01:59:20 +00:00
utils [TableGen][AsmWriterEmitter] Use a deterministic order to sort InstrAliases 2017-02-10 02:43:09 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [CMake] Allow overriding CMAKE_LIBTOOL 2017-02-07 23:32:56 +00:00
CODE_OWNERS.TXT CODE_OWNERS: Update email address 2017-02-09 21:29:12 +00:00
CREDITS.TXT Revert r294228 2017-02-06 19:40:56 +00:00
LICENSE.TXT Bump year to 2017 in LICENSE.txt 2017-01-12 18:02:42 +00:00
LLVMBuild.txt
README.txt Test commit: remove a blank line. 2017-02-03 10:56:57 +00:00
RELEASE_TESTERS.TXT Update the release tester for MIPS. NFC. 2017-01-17 11:00:28 +00:00
configure
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.