llvm-capstone/llvm
Ulrich Weigand d5ebc626d5 [PowerPC] Always use mfocrf if available
When accessing just a single CR register, it is always preferable to
use mfocrf instead of mfcr, if the former is available on the CPU.

Current code makes that distinction in many, but not all places
where a single CR register value is retrieved.  One missing
location is PPCRegisterInfo::lowerCRSpilling.

To fix this and make this simpler in the future, this patch changes
the bulk of the back-end to always assume mfocrf is available and
simply generate it when needed.

On machines that actually do not support mfocrf, the instruction
is replaced by mfcr at the very end, in EmitInstruction.

This has the additional benefit that we no longer need the
MFCRpseud hack, since before EmitInstruction we always have
a MFOCRF instruction pattern, which already models data flow
as required.

The patch also adds the MFOCRF8 version of the instruction,
which was missing so far.

Except for the PPCRegisterInfo::lowerCRSpilling case, no change
in generated code intended.

llvm-svn: 185556
2013-07-03 17:05:42 +00:00
..
autoconf The build system is currently miss-identifying GNU/kFreeBSD as FreeBSD. 2013-07-01 08:07:52 +00:00
bindings
cmake Support using "host" as a target in LLVM_TARGETS_TO_BUILD when using cmake. 2013-06-26 07:57:53 +00:00
docs Fixed typo in LangRef where we were using _'' to quote instead of the correct _. 2013-07-02 21:32:56 +00:00
examples
include Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size. 2013-07-03 15:07:05 +00:00
lib [PowerPC] Always use mfocrf if available 2013-07-03 17:05:42 +00:00
projects The build system is currently miss-identifying GNU/kFreeBSD as FreeBSD. 2013-07-01 08:07:52 +00:00
runtime
test Prefix failing commands with not to make clear they are expected to fail. 2013-07-03 16:41:29 +00:00
tools Make llvm-nm return 1 on error. 2013-07-03 15:46:03 +00:00
unittests Fix -Wsign-compare warning and remove windows-style line endings introduced by r185421 2013-07-02 16:48:10 +00:00
utils Improve the compression of the tablegen DiffLists by introducing a new sort 2013-06-27 19:38:13 +00:00
.arcconfig
.gitignore
CMakeLists.txt Support using "host" as a target in LLVM_TARGETS_TO_BUILD when using cmake. 2013-06-26 07:57:53 +00:00
CODE_OWNERS.TXT Add more owners to CODE_OWNERS.TXT (Kostya Serebryany: AddressSanitizer and ThreadSanitizer; Evgeniy Stepanov: MemorySanitizer) 2013-06-27 08:47:12 +00:00
configure The build system is currently miss-identifying GNU/kFreeBSD as FreeBSD. 2013-07-01 08:07:52 +00:00
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
Makefile Fix regular expression used by 'make update' to only look for 'I' and '?' at the start of svn info results and to check for spaces after 'I' instead of just after '?'. 2013-07-03 14:48:37 +00:00
Makefile.common
Makefile.config.in Add an autoconf option for turning on -gsplit-dwarf by default 2013-06-25 01:12:25 +00:00
Makefile.rules The build system is currently miss-identifying GNU/kFreeBSD as FreeBSD. 2013-07-01 08:07:52 +00:00
README.txt

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

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, 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're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.