LLVM backend for 6502
Go to file
Jakob Stoklund Olesen 72847f3057 Reapply r155136 after fixing PR12599.
Original commit message:

Defer some shl transforms to DAGCombine.

The shl instruction is used to represent multiplication by a constant
power of two as well as bitwise left shifts. Some InstCombine
transformations would turn an shl instruction into a bit mask operation,
making it difficult for later analysis passes to recognize the
constsnt multiplication.

Disable those shl transformations, deferring them to DAGCombine time.
An 'shl X, C' instruction is now treated mostly the same was as 'mul X, C'.

These transformations are deferred:

  (X >>? C) << C   --> X & (-1 << C)  (When X >> C has multiple uses)
  (X >>? C1) << C2 --> X << (C2-C1) & (-1 << C2)   (When C2 > C1)
  (X >>? C1) << C2 --> X >>? (C1-C2) & (-1 << C2)  (When C1 > C2)

The corresponding exact transformations are preserved, just like
div-exact + mul:

  (X >>?,exact C) << C   --> X
  (X >>?,exact C1) << C2 --> X << (C2-C1)
  (X >>?,exact C1) << C2 --> X >>?,exact (C1-C2)

The disabled transformations could also prevent the instruction selector
from recognizing rotate patterns in hash functions and cryptographic
primitives. I have a test case for that, but it is too fragile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155362 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 17:39:52 +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 Conflict with st_dev/st_ino identifiers under Debian GNU/Hurd 2012-04-23 16:37:23 +00:00
lib Reapply r155136 after fixing PR12599. 2012-04-23 17:39:52 +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 Reapply r155136 after fixing PR12599. 2012-04-23 17:39:52 +00:00
tools Remove llvm-ld and llvm-stub (which is only used by llvm-ld). 2012-04-19 19:27:54 +00:00
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 [docs] Stub out structure for Sphinx-based docs. 2012-04-19 16:31:19 +00:00
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 Tidy up. s/Low Level Virtual Machine/LLVM/. 2012-01-25 22:00:23 +00:00
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.