LLVM backend for 6502
Go to file
Michael Liao 307525cd24 Re-work bit/bits value resolving in tblgen
- This patch is inspired by the failure of the following code snippet
  which is used to convert enumerable values into encoding bits to
  improve the readability of td files.

  class S<int s> {
    bits<2> V = !if(!eq(s, 8),  {0, 0},
                !if(!eq(s, 16), {0, 1},
                !if(!eq(s, 32), {1, 0},
                !if(!eq(s, 64), {1, 1}, {?, ?}))));
  }

  Later, PR8330 is found to report not exactly the same bug relevant
  issue to bit/bits values.

- Instead of resolving bit/bits values separately through
  resolveBitReference(), this patch adds getBit() for all Inits and
  resolves bit value by resolving plus getting the specified bit. This
  unifies the resolving of bit with other values and removes redundant
  logic for resolving bit only. In addition,
  BitsInit::resolveReferences() is optimized to take advantage of this
  origanization by resolving VarBitInit's variable reference first and
  then getting bits from it.

- The type interference in '!if' operator is revised to support possible
  combinations of int and bits/bit in MHS and RHS.

- As there may be illegal assignments from integer value to bit, says
  assign 2 to a bit, but we only check this during instantiation in some
  cases, e.g.

  bit V = !if(!eq(x, 17), 0, 2);

  Verbose diagnostic message is generated when invalid value is
  resolveed to help locating the error.

- PR8330 is fixed as well.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163360 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-06 23:32:48 +00:00
autoconf Temporarily revert this to bring back the bots. 2012-08-28 01:17:46 +00:00
bindings add support for ocaml 3.12 2012-09-02 14:42:56 +00:00
cmake Fix Android build of gtest and lib/Support. 2012-09-04 09:14:45 +00:00
docs Add a new optimization pass: Stack Coloring, that merges disjoint static allocations (allocas). Allocas are known to be 2012-09-06 09:17:37 +00:00
examples Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.h 2012-06-29 12:38:19 +00:00
include Re-work bit/bits value resolving in tblgen 2012-09-06 23:32:48 +00:00
lib Re-work bit/bits value resolving in tblgen 2012-09-06 23:32:48 +00:00
projects Enable recursing into the compiler-rt projcet with the CMake build. 2012-08-29 00:38:02 +00:00
runtime libprofile: [CMake] Let libprofile_rt be not loadable_module but shared library. Autoconf's one does so. 2012-08-29 00:37:51 +00:00
test Re-work bit/bits value resolving in tblgen 2012-09-06 23:32:48 +00:00
tools Don't include stdint.h directly. 2012-09-06 22:55:11 +00:00
unittests ADTTests: [CMake] Exclude DenseMapTest.cpp and SmallVectorTest.cpp on MSVC9 due to its bug. 2012-08-30 16:22:32 +00:00
utils Re-work bit/bits value resolving in tblgen 2012-09-06 23:32:48 +00:00
.gitignore Ignore the documentation-suggested location for compile_commands.json 2012-08-21 19:23:30 +00:00
CMakeLists.txt enable cross compilation with cmake 2012-08-20 19:56:52 +00:00
CODE_OWNERS.TXT
configure Temporarily revert this to bring back the bots. 2012-08-28 01:17:46 +00:00
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
Makefile darwin/cross-build: Unset SDKROOT when building BuildTools. 2012-08-22 22:01:01 +00:00
Makefile.common
Makefile.config.in Temporarily revert this to bring back the bots. 2012-08-28 01:17:46 +00:00
Makefile.rules Temporarily revert this to bring back the bots. 2012-08-28 01:17:46 +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 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.