llvm.org GIT mirror llvm / 440168b
add an abbrev for loads. This shrinks the function block about 50K, from: Block ID #12 (FUNCTION_BLOCK): Num Instances: 2344 Total Size: 8.8434e+06b/1.10542e+06B/276356W % of file: 35.6726 Average Size: 3772.78b/471.598B/117.899W Tot/Avg SubBlocks: 4065/1.73422 Tot/Avg Abbrevs: 0/0 Tot/Avg Records: 128487/54.8153 % Abbrev Recs: 0 to: Block ID #12 (FUNCTION_BLOCK): Num Instances: 2344 Total Size: 8.44518e+06b/1.05565e+06B/263912W % of file: 34.6203 Average Size: 3602.89b/450.362B/112.59W Tot/Avg SubBlocks: 4065/1.73422 Tot/Avg Abbrevs: 0/0 Tot/Avg Records: 128487/54.8153 % Abbrev Recs: 22.2077 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36779 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 12 years ago
1 changed file(s) with 22 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
3939 CONSTANTS_SETTYPE_ABBREV = bitc::FIRST_APPLICATION_ABBREV,
4040 CONSTANTS_INTEGER_ABBREV,
4141 CONSTANTS_CE_CAST_Abbrev,
42 CONSTANTS_NULL_Abbrev
42 CONSTANTS_NULL_Abbrev,
43
44 // FUNCTION_BLOCK abbrev id's.
45 FUNCTION_INST_LOAD_ABBREV = bitc::FIRST_APPLICATION_ABBREV
4346 };
4447
4548
721724 Vals.push_back(VE.getValueID(I.getOperand(0))); // ptr.
722725 Vals.push_back(Log2_32(cast(I).getAlignment())+1);
723726 Vals.push_back(cast(I).isVolatile());
727 AbbrevToUse = FUNCTION_INST_LOAD_ABBREV;
724728 break;
725729 case Instruction::Store:
726730 Code = bitc::FUNC_CODE_INST_STORE;
946950 assert(0 && "Unexpected abbrev ordering!");
947951 }
948952
953
954
949955 { // SETTYPE abbrev for CONSTANTS_BLOCK.
950956 BitCodeAbbrev *Abbv = new BitCodeAbbrev();
951957 Abbv->Add(BitCodeAbbrevOp(bitc::CST_CODE_SETTYPE));
985991 assert(0 && "Unexpected abbrev ordering!");
986992 }
987993
994 // FIXME: This should only use space for first class types!
995
996 { // INST_LOAD abbrev for FUNCTION_BLOCK.
997 BitCodeAbbrev *Abbv = new BitCodeAbbrev();
998 Abbv->Add(BitCodeAbbrevOp(bitc::FUNC_CODE_INST_LOAD));
999 Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, // typeid
1000 Log2_32_Ceil(VE.getTypes().size()+1)));
1001 Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Ptr
1002 Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 4)); // Align
1003 Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // volatile
1004 if (Stream.EmitBlockInfoAbbrev(bitc::FUNCTION_BLOCK_ID,
1005 Abbv) != FUNCTION_INST_LOAD_ABBREV)
1006 assert(0 && "Unexpected abbrev ordering!");
1007 }
1008
9881009 Stream.ExitBlock();
9891010 }
9901011