summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Reader/ReaderInternals.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-12-01 07:05:31 +0000
committerChris Lattner <sabre@nondot.org>2003-12-01 07:05:31 +0000
commitd9cf9b30eb3c96a3d60545501e690028029e39fb (patch)
tree75b1ae7cc15fdc1969714af5f97cc95d2c05c076 /llvm/lib/Bytecode/Reader/ReaderInternals.h
parent7c290ed25a5ea5aba07583a797992ca0646dc123 (diff)
downloadbcm5719-llvm-d9cf9b30eb3c96a3d60545501e690028029e39fb.tar.gz
bcm5719-llvm-d9cf9b30eb3c96a3d60545501e690028029e39fb.zip
Emit & read more compressed bytecode by not emitting a bytecodeblock for
each basic block in function. Instead, just emit a stream of instructions, chopping up basic blocks based on when we find terminator instructions. This saves a fairly substantial chunk of bytecode space. In stripped, sample cases, for example, we get this reduction in size: 197.parser: 163036 -> 137180: 18.8% reduction 254.gap : 844936 -> 689392: 22.6% 255.vortex: 621724 -> 528444: 17.7% ... Not bad for something this simple. :) Note that this doesn't require a new bytecode version number at all, though version 1.1 should not need to support the old format. llvm-svn: 10280
Diffstat (limited to 'llvm/lib/Bytecode/Reader/ReaderInternals.h')
-rw-r--r--llvm/lib/Bytecode/Reader/ReaderInternals.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Bytecode/Reader/ReaderInternals.h b/llvm/lib/Bytecode/Reader/ReaderInternals.h
index aea45c2bed7..fd0a1ed0082 100644
--- a/llvm/lib/Bytecode/Reader/ReaderInternals.h
+++ b/llvm/lib/Bytecode/Reader/ReaderInternals.h
@@ -162,7 +162,9 @@ private:
BasicBlock *ParseBasicBlock(const unsigned char *&Buf,
const unsigned char *End,
unsigned BlockNo);
-
+ unsigned ParseInstructionList(Function *F, const unsigned char *&Buf,
+ const unsigned char *EndBuf);
+
void ParseInstruction(const unsigned char *&Buf, const unsigned char *End,
std::vector<unsigned> &Args, BasicBlock *BB);
OpenPOWER on IntegriCloud