llvm.org GIT mirror llvm / 2453f71
shave another 150K off of kc++, by using a 7-bit encoding for BB names where we can. This shrinks kc++'s down to 3368K, with a VST record of: Block ID #14 (VALUE_SYMTAB): Num Instances: 2345 Total Size: 1.29508e+07b/1.61885e+06B/404713W Average Size: 5522.73b/690.342B/172.585W % of file: 48.0645 Tot/Avg SubBlocks: 0/0 Tot/Avg Abbrevs: 7035/3 Tot/Avg Records: 120924/51.5667 % Abbrev Recs: 100 Isn't it nice to be able to optimizer bc size without touching the reader? :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36759 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 12 years ago
1 changed file(s) with 12 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
3131
3232 // VALUE_SYMTAB_BLOCK abbrev id's.
3333 VST_ENTRY_8_ABBREV = bitc::FIRST_APPLICATION_ABBREV,
34 VST_ENTRY_7_ABBREV
34 VST_ENTRY_7_ABBREV,
35 VST_BBENTRY_7_ABBREV
3536
3637 };
3738
731732 if (Stream.EmitAbbrev(Abbv) != VST_ENTRY_7_ABBREV)
732733 assert(0 && "Unexpected abbrev ordering!");
733734 }
735 { // 7-bit fixed width VST_BBENTRY strings.
736 BitCodeAbbrev *Abbv = new BitCodeAbbrev();
737 Abbv->Add(BitCodeAbbrevOp(bitc::VST_CODE_BBENTRY));
738 Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8));
739 Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array));
740 Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 7));
741 if (Stream.EmitAbbrev(Abbv) != VST_BBENTRY_7_ABBREV)
742 assert(0 && "Unexpected abbrev ordering!");
743 }
734744
735745
736746 // FIXME: Set up the abbrev, we know how many values there are!
758768 unsigned Code;
759769 if (isa(SI->getValue())) {
760770 Code = bitc::VST_CODE_BBENTRY;
771 if (is7Bit) AbbrevToUse = VST_BBENTRY_7_ABBREV;
761772 } else {
762773 Code = bitc::VST_CODE_ENTRY;
763774 AbbrevToUse = is7Bit ? VST_ENTRY_7_ABBREV : VST_ENTRY_8_ABBREV;