mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-11 11:34:02 +00:00
use splice instead of remove/insert for a minor speedup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21743 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1f64025d88
commit
f924a4c21f
@ -1703,8 +1703,9 @@ InstructionList : InstructionList Inst {
|
|||||||
// Make sure to move the basic block to the correct location in the
|
// Make sure to move the basic block to the correct location in the
|
||||||
// function, instead of leaving it inserted wherever it was first
|
// function, instead of leaving it inserted wherever it was first
|
||||||
// referenced.
|
// referenced.
|
||||||
CurFun.CurrentFunction->getBasicBlockList().remove($$);
|
Function::BasicBlockListType &BBL =
|
||||||
CurFun.CurrentFunction->getBasicBlockList().push_back($$);
|
CurFun.CurrentFunction->getBasicBlockList();
|
||||||
|
BBL.splice(BBL.end(), BBL, $$);
|
||||||
}
|
}
|
||||||
| LABELSTR {
|
| LABELSTR {
|
||||||
$$ = getBBVal(ValID::create($1), true);
|
$$ = getBBVal(ValID::create($1), true);
|
||||||
@ -1712,8 +1713,9 @@ InstructionList : InstructionList Inst {
|
|||||||
// Make sure to move the basic block to the correct location in the
|
// Make sure to move the basic block to the correct location in the
|
||||||
// function, instead of leaving it inserted wherever it was first
|
// function, instead of leaving it inserted wherever it was first
|
||||||
// referenced.
|
// referenced.
|
||||||
CurFun.CurrentFunction->getBasicBlockList().remove($$);
|
Function::BasicBlockListType &BBL =
|
||||||
CurFun.CurrentFunction->getBasicBlockList().push_back($$);
|
CurFun.CurrentFunction->getBasicBlockList();
|
||||||
|
BBL.splice(BBL.end(), BBL, $$);
|
||||||
};
|
};
|
||||||
|
|
||||||
BBTerminatorInst : RET ResolvedVal { // Return with a result...
|
BBTerminatorInst : RET ResolvedVal { // Return with a result...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user