mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
086020d2e5
- 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. llvm-svn: 163360 |
||
---|---|---|
.. | ||
2003-08-03-PassCode.td | ||
2006-09-18-LargeInt.td | ||
2010-03-24-PrematureDefaults.td | ||
AnonDefinitionOnDemand.td | ||
BitsInitOverflow.td | ||
cast.td | ||
CStyleComment.td | ||
Dag.td | ||
defmclass.td | ||
DefmInherit.td | ||
DefmInsideMultiClass.td | ||
eq.td | ||
eqbit.td | ||
FieldAccess.td | ||
foreach.td | ||
ForeachList.td | ||
ForeachLoop.td | ||
ForwardRef.td | ||
GeneralList.td | ||
if.td | ||
ifbit.td | ||
Include.inc | ||
Include.td | ||
IntBitInit.td | ||
LazyChange.td | ||
LetInsideMultiClasses.td | ||
lisp.td | ||
list-element-bitref.td | ||
ListArgs.td | ||
ListArgsSimple.td | ||
ListConversion.td | ||
ListManip.td | ||
ListOfList.td | ||
ListSlices.td | ||
lit.local.cfg | ||
LoLoL.td | ||
MultiClass.td | ||
MultiClassDefName.td | ||
MultiClassInherit.td | ||
MultiPat.td | ||
nested-comment.td | ||
NestedForeach.td | ||
Paste.td | ||
pr8330.td | ||
SetTheory.td | ||
SiblingForeach.td | ||
Slice.td | ||
strconcat.td | ||
String.td | ||
subst2.td | ||
subst.td | ||
SuperSubclassSameName.td | ||
TargetInstrInfo.td | ||
TargetInstrSpec.td | ||
TemplateArgRename.td | ||
Tree.td | ||
TreeNames.td | ||
TwoLevelName.td | ||
UnsetBitInit.td | ||
UnterminatedComment.td | ||
usevalname.td |