mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
If these blocks are empty, there is no reason to even emit the bytecode blocks.
This saves about 15K in 176.gcc, coupled with another patch that I'm working on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10889 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -164,7 +164,8 @@ void BytecodeWriter::outputConstantsInPlane(const std::vector<const Value*>
|
||||
void BytecodeWriter::outputConstants(bool isFunction) {
|
||||
ConstantTotalBytes -= Out.size();
|
||||
if (isFunction) FunctionConstantTotalBytes -= Out.size();
|
||||
BytecodeBlock CPool(BytecodeFormat::ConstantPool, Out);
|
||||
BytecodeBlock CPool(BytecodeFormat::ConstantPool, Out,
|
||||
true /* Elide block if empty */);
|
||||
|
||||
unsigned NumPlanes = Table.getNumPlanes();
|
||||
|
||||
@@ -286,7 +287,8 @@ void BytecodeWriter::outputSymbolTable(const SymbolTable &MST) {
|
||||
|
||||
SymTabBytes -= Out.size();
|
||||
|
||||
BytecodeBlock SymTabBlock(BytecodeFormat::SymbolTable, Out);
|
||||
BytecodeBlock SymTabBlock(BytecodeFormat::SymbolTable, Out,
|
||||
true/* ElideIfEmpty*/);
|
||||
|
||||
for (SymbolTable::const_iterator TI = MST.begin(); TI != MST.end(); ++TI) {
|
||||
SymbolTable::type_const_iterator I = MST.type_begin(TI->first);
|
||||
|
||||
Reference in New Issue
Block a user