mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-01 00:25:01 +00:00
use splice instead of remove/insert for a minor speedup
llvm-svn: 21743
This commit is contained in:
parent
146014b748
commit
0995b3da02
@ -1703,8 +1703,9 @@ InstructionList : InstructionList Inst {
|
||||
// Make sure to move the basic block to the correct location in the
|
||||
// function, instead of leaving it inserted wherever it was first
|
||||
// referenced.
|
||||
CurFun.CurrentFunction->getBasicBlockList().remove($$);
|
||||
CurFun.CurrentFunction->getBasicBlockList().push_back($$);
|
||||
Function::BasicBlockListType &BBL =
|
||||
CurFun.CurrentFunction->getBasicBlockList();
|
||||
BBL.splice(BBL.end(), BBL, $$);
|
||||
}
|
||||
| LABELSTR {
|
||||
$$ = 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
|
||||
// function, instead of leaving it inserted wherever it was first
|
||||
// referenced.
|
||||
CurFun.CurrentFunction->getBasicBlockList().remove($$);
|
||||
CurFun.CurrentFunction->getBasicBlockList().push_back($$);
|
||||
Function::BasicBlockListType &BBL =
|
||||
CurFun.CurrentFunction->getBasicBlockList();
|
||||
BBL.splice(BBL.end(), BBL, $$);
|
||||
};
|
||||
|
||||
BBTerminatorInst : RET ResolvedVal { // Return with a result...
|
||||
|
Loading…
Reference in New Issue
Block a user