mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Significantly clean up parsing of instructions. This exceptionizes and
simplifies the control flow a bit. This provides a small (~3%) speedup, but it's primarily a cleanup exercise. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8983 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -199,10 +199,7 @@ BasicBlock *BytecodeParser::ParseBasicBlock(const unsigned char *&Buf,
|
||||
BB = ParsedBasicBlocks[BlockNo];
|
||||
|
||||
while (Buf < EndBuf) {
|
||||
Instruction *Inst;
|
||||
ParseInstruction(Buf, EndBuf, Inst);
|
||||
|
||||
if (Inst == 0) { throw std::string("Could not parse Instruction."); }
|
||||
Instruction *Inst = ParseInstruction(Buf, EndBuf);
|
||||
if (insertValue(Inst, Values) == -1) {
|
||||
throw std::string("Could not insert value.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user