llvm-6502/test
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
..
Analysis BasicAA: Recognize cyclic NoAlias phis 2012-09-06 14:41:53 +00:00
Archive
Assembler
Bindings/Ocaml fix test's RUN lines 2012-09-02 15:07:25 +00:00
Bitcode
BugPoint
CodeGen Allow overlaps between virtreg and physreg live ranges. 2012-09-06 18:15:23 +00:00
DebugInfo Add support for fetching inlining context (stack of source code locations) 2012-09-04 08:12:33 +00:00
ExecutionEngine Revert "Enable MCJIT tests on Darwin." 2012-09-06 03:24:09 +00:00
Feature
Instrumentation
Integer
Linker
MC The Mips standalone assembler memory instruction support. 2012-09-06 20:00:02 +00:00
Object Add missing file for test. 2012-09-05 23:52:20 +00:00
Other
Scripts
TableGen Re-work bit/bits value resolving in tblgen 2012-09-06 23:32:48 +00:00
Transforms Fix switch_to_lookup_table.ll test from r163302. 2012-09-06 10:10:35 +00:00
Unit
Verifier
YAMLParser
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile escape special char when handling CXX_FOR_OCAMLOPT 2012-09-02 15:16:51 +00:00
Makefile.tests
TestRunner.sh