mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Ooops, forgot to implement void PassManager::add(BasicBlockPass *BBP)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1523 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5048c3b853
commit
35f07eb2eb
@ -60,13 +60,17 @@ public:
|
||||
for_each(SubPasses.begin(), SubPasses.end(), deleter<MethodPass>);
|
||||
}
|
||||
|
||||
void add(BasicBlockPass *BBP) {
|
||||
if (BBPBatcher == 0) {
|
||||
BBPBatcher = new BasicBlockPassBatcher();
|
||||
SubPasses.push_back(BBPBatcher);
|
||||
}
|
||||
BBPBatcher->add(BBP);
|
||||
}
|
||||
|
||||
void add(MethodPass *P) {
|
||||
if (BasicBlockPass *BBP = dynamic_cast<BasicBlockPass*>(P)) {
|
||||
if (BBPBatcher == 0) {
|
||||
BBPBatcher = new BasicBlockPassBatcher();
|
||||
SubPasses.push_back(BBPBatcher);
|
||||
}
|
||||
BBPBatcher->add(BBP);
|
||||
add(BBP);
|
||||
} else {
|
||||
BBPBatcher = 0; // Ensure that passes don't get accidentally reordered
|
||||
SubPasses.push_back(P);
|
||||
@ -92,7 +96,15 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// add(BasicBlockPass*) - If we know it's a BasicBlockPass, we don't have to do
|
||||
// any checking...
|
||||
//
|
||||
void PassManager::add(BasicBlockPass *BBP) {
|
||||
if (Batcher == 0) // If we don't have a batcher yet, make one now.
|
||||
add((MethodPass*)BBP);
|
||||
else
|
||||
Batcher->add(BBP);
|
||||
}
|
||||
|
||||
|
||||
// add(MethodPass*) - MethodPass's must be batched together... make sure this
|
||||
|
Loading…
Reference in New Issue
Block a user