llvm.org GIT mirror llvm / fd1ae95
allow the 8-bit abbrev to be used for either bb or other values git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36761 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 12 years ago
1 changed file(s) with 7 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
713713 if (VST.empty()) return;
714714 Stream.EnterSubblock(bitc::VALUE_SYMTAB_BLOCK_ID, 3);
715715
716 { // 8-bit fixed width VST_ENTRY strings.
716 { // 8-bit fixed-width VST_ENTRY/VST_BBENTRY strings.
717717 BitCodeAbbrev *Abbv = new BitCodeAbbrev();
718 Abbv->Add(BitCodeAbbrevOp(bitc::VST_CODE_ENTRY));
718 Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3));
719719 Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8));
720720 Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
721721 Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 8));
761761 }
762762
763763
764 unsigned AbbrevToUse = 0;
765
766 // VST_ENTRY: [valueid, namelen, namechar x N]
767 // VST_BBENTRY: [bbid, namelen, namechar x N]
764 unsigned AbbrevToUse = VST_ENTRY_8_ABBREV;
765
766 // VST_ENTRY: [valueid, namechar x N]
767 // VST_BBENTRY: [bbid, namechar x N]
768768 unsigned Code;
769769 if (isa(SI->getValue())) {
770770 Code = bitc::VST_CODE_BBENTRY;
771771 if (is7Bit) AbbrevToUse = VST_BBENTRY_7_ABBREV;
772772 } else {
773773 Code = bitc::VST_CODE_ENTRY;
774 AbbrevToUse = is7Bit ? VST_ENTRY_7_ABBREV : VST_ENTRY_8_ABBREV;
774 if (is7Bit) AbbrevToUse = VST_ENTRY_7_ABBREV;
775775 }
776776
777777 NameVals.push_back(VE.getValueID(SI->getValue()));