mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
use smallvector instead of vector for a couple worklists. This speeds up instcombine
by ~10% on some testcases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54811 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bbf5583283
commit
2806dffc73
@ -74,7 +74,7 @@ namespace {
|
|||||||
: public FunctionPass,
|
: public FunctionPass,
|
||||||
public InstVisitor<InstCombiner, Instruction*> {
|
public InstVisitor<InstCombiner, Instruction*> {
|
||||||
// Worklist of all of the instructions that need to be simplified.
|
// Worklist of all of the instructions that need to be simplified.
|
||||||
std::vector<Instruction*> Worklist;
|
SmallVector<Instruction*, 256> Worklist;
|
||||||
DenseMap<Instruction*, unsigned> WorklistMap;
|
DenseMap<Instruction*, unsigned> WorklistMap;
|
||||||
TargetData *TD;
|
TargetData *TD;
|
||||||
bool MustPreserveLCSSA;
|
bool MustPreserveLCSSA;
|
||||||
@ -11386,7 +11386,7 @@ static void AddReachableCodeToWorklist(BasicBlock *BB,
|
|||||||
SmallPtrSet<BasicBlock*, 64> &Visited,
|
SmallPtrSet<BasicBlock*, 64> &Visited,
|
||||||
InstCombiner &IC,
|
InstCombiner &IC,
|
||||||
const TargetData *TD) {
|
const TargetData *TD) {
|
||||||
std::vector<BasicBlock*> Worklist;
|
SmallVector<BasicBlock*, 256> Worklist;
|
||||||
Worklist.push_back(BB);
|
Worklist.push_back(BB);
|
||||||
|
|
||||||
while (!Worklist.empty()) {
|
while (!Worklist.empty()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user