llvm-6502/include/llvm
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
..
ADT 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
Analysis Remove unused typedefs gcc4.8 warns about. 2012-09-05 17:55:46 +00:00
Assembly
Bitcode [ms-inline asm] Enumerate the InlineAsm dialects and rename the nsdialect to 2012-09-05 19:00:49 +00:00
CodeGen TiedTo is an integer, not a bool. 2012-09-06 19:51:21 +00:00
Config replace a couple of single-line comments with /* */ to fix the build of stuff depending on the C headers 2012-09-02 14:19:21 +00:00
DebugInfo Add support for fetching inlining context (stack of source code locations) 2012-09-04 08:12:33 +00:00
ExecutionEngine MCJIT: getPointerToFunction() references target address space. 2012-09-05 16:50:40 +00:00
MC Constify subtarget info properly so that we dont cast away the const in 2012-09-05 21:43:57 +00:00
Object Teach libObject about some more ELF relocations. llvm-objdump -r now knows 2012-09-05 23:48:54 +00:00
Support Stop casting away const qualifier needlessly. 2012-09-05 22:26:57 +00:00
TableGen Re-work bit/bits value resolving in tblgen 2012-09-06 23:32:48 +00:00
Target Tablegen: Add OperandWithDefaultOps Operand type 2012-09-06 14:15:52 +00:00
Transforms Remove unneeded code. 2012-09-04 19:49:17 +00:00
Argument.h
Attributes.h [ms-inline asm] Remove the Inline Asm Non-Standard Dialect attribute. This 2012-09-04 22:29:45 +00:00
AutoUpgrade.h
BasicBlock.h
CallGraphSCCPass.h
CallingConv.h
CMakeLists.txt
Constant.h
Constants.h
DebugInfo.h
DefaultPasses.h
DerivedTypes.h
DIBuilder.h Fix a bunch of -Wdocumentation warnings. 2012-08-23 16:54:08 +00:00
Function.h
GlobalAlias.h
GlobalValue.h
GlobalVariable.h
GVMaterializer.h
InitializePasses.h 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
InlineAsm.h Cleanup a few magic numbers. 2012-09-05 22:40:13 +00:00
InstrTypes.h Fix a bunch of -Wdocumentation warnings. 2012-08-23 16:54:08 +00:00
Instruction.def
Instruction.h
Instructions.h
IntrinsicInst.h
Intrinsics.h
Intrinsics.td
IntrinsicsARM.td
IntrinsicsCellSPU.td
IntrinsicsHexagon.td
IntrinsicsMips.td Support MIPS DSP Rev2 intrinsics. 2012-08-27 12:29:01 +00:00
IntrinsicsNVVM.td
IntrinsicsPowerPC.td
IntrinsicsX86.td Mark avx2 maskstore has ReadWriteArgMem. Mark broadcast and maskload as ReadArgMem. 2012-08-26 22:01:42 +00:00
IntrinsicsXCore.td
IRBuilder.h
LinkAllPasses.h Profile: set branch weight metadata with data generated from profiling. 2012-08-28 22:21:25 +00:00
LinkAllVMCore.h
Linker.h
LLVMContext.h
MDBuilder.h
Metadata.h
Module.h
OperandTraits.h
Operator.h
Pass.h
PassAnalysisSupport.h
PassManager.h
PassManagers.h
PassRegistry.h
PassSupport.h
SymbolTableListTraits.h Remove unused typedefs gcc4.8 warns about. 2012-09-05 17:55:46 +00:00
Type.h
TypeBuilder.h
TypeFinder.h
Use.h
User.h
Value.h
ValueSymbolTable.h