LLVM backend for 6502
Go to file
Preston Gurd 6a8c7bf8e7 This patch fixes a problem which arose when using the Post-RA scheduler
on X86 Atom. Some of our tests failed because the tail merging part of
the BranchFolding pass was creating new basic blocks which did not
contain live-in information. When the anti-dependency code in the Post-RA
scheduler ran, it would sometimes rename the register containing
the function return value because the fact that the return value was
live-in to the subsequent block had been lost. To fix this, it is necessary
to run the RegisterScavenging code in the BranchFolding pass.

This patch makes sure that the register scavenging code is invoked
in the X86 subtarget only when post-RA scheduling is being done.
Post RA scheduling in the X86 subtarget is only done for Atom.

This patch adds a new function to the TargetRegisterClass to control
whether or not live-ins should be preserved during branch folding.
This is necessary in order for the anti-dependency optimizations done
during the PostRASchedulerList pass to work properly when doing
Post-RA scheduling for the X86 in general and for the Intel Atom in particular.

The patch adds and invokes the new function trackLivenessAfterRegAlloc()
instead of using the existing requiresRegisterScavenging().
It changes BranchFolding.cpp to call trackLivenessAfterRegAlloc() instead of
requiresRegisterScavenging(). It changes the all the targets that
implemented requiresRegisterScavenging() to also implement
trackLivenessAfterRegAlloc().  

It adds an assertion in the Post RA scheduler to make sure that post RA
liveness information is available when it is needed.

It changes the X86 break-anti-dependencies test to use –mcpu=atom, in order
to avoid running into the added assertion.

Finally, this patch restores the use of anti-dependency checking
(which was turned off temporarily for the 3.1 release) for
Intel Atom in the Post RA scheduler.

Patch by Andy Zhang!

Thanks to Jakob and Anton for their reviews.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155395 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 21:39:35 +00:00
autoconf Kick off 3.2 cycle for LLVM trunk. 2012-04-20 18:15:07 +00:00
bindings [python] Add negative MemoryBuffer testcase 2012-03-22 11:23:52 +00:00
cmake CMake: Enable LLVM_COMPILER_JOBS on all MS IDEs. We don't support older environments than VS9. 2012-04-21 14:51:02 +00:00
docs [docs] Update version number. I suggest that at some point we make the 2012-04-20 19:28:40 +00:00
examples Remove llvm-ld and llvm-stub (which is only used by llvm-ld). 2012-04-19 19:27:54 +00:00
include This patch fixes a problem which arose when using the Post-RA scheduler 2012-04-23 21:39:35 +00:00
lib This patch fixes a problem which arose when using the Post-RA scheduler 2012-04-23 21:39:35 +00:00
projects Remove llvm-ld and llvm-stub (which is only used by llvm-ld). 2012-04-19 19:27:54 +00:00
runtime Use the correct filename for the error message. 2012-03-28 02:39:06 +00:00
test This patch fixes a problem which arose when using the Post-RA scheduler 2012-04-23 21:39:35 +00:00
tools
unittests SparseSet: Add support for key-derived indexes and arbitrary key types. 2012-04-20 20:05:28 +00:00
utils Remove 'XXXRegisterClass' from tablegen output. Targets should use '&XXXRegClass' instead. 2012-04-21 01:49:25 +00:00
.gitignore
CMakeLists.txt CMake: Prune redundant LLVM_COMPILER_JOBS from llvm/CMakeLists.txt. HandleLLVMOptions.cmake has it. 2012-04-21 14:50:56 +00:00
configure Kick off 3.2 cycle for LLVM trunk. 2012-04-20 18:15:07 +00:00
CREDITS.TXT Update woefully stale credits entry. Everything listed there had been 2012-04-17 01:19:37 +00:00
LICENSE.TXT Add YAML parser to Support. 2012-04-03 23:09:22 +00:00
llvm.spec.in
LLVMBuild.txt LLVMBuild: Introduce a common section which currently has a list of the 2011-12-12 22:45:54 +00:00
Makefile When cross compiling, install a host version of llvm-config. <rdar://11187889> 2012-04-19 23:19:55 +00:00
Makefile.common
Makefile.config.in Add profiling support for Intel Parallel Amplifier XE (VTune) for JITted code in LLVM. 2012-03-13 08:33:15 +00:00
Makefile.rules Remove llvm-ld and llvm-stub (which is only used by llvm-ld). 2012-04-19 19:27:54 +00:00
README.txt test commit 2012-03-20 13:12:38 +00:00

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 HTML documentation provided in docs/index.html for further
assistance with LLVM.

If you're writing a package for LLVM, see docs/Packaging.html for our
suggestions.