Displaying 3 results from an estimated 3 matches for "numexitblock".
Did you mean:
numexitblocks
2010 Jan 09
2
[LLVMdev] [PATCH] Fix nondeterministic behaviour in the CodeExtractor
...orithm>
#include <set>
@@ -45,7 +46,7 @@
namespace {
class CodeExtractor {
typedef std::vector<Value*> Values;
- std::set<BasicBlock*> BlocksToExtract;
+ SetVector<BasicBlock*> BlocksToExtract;
DominatorTree* DT;
bool AggregateArgs;
unsigned NumExitBlocks;
@@ -135,7 +136,7 @@
// We only want to code extract the second block now, and it becomes the new
// header of the region.
BasicBlock *OldPred = Header;
- BlocksToExtract.erase(OldPred);
+ BlocksToExtract.remove(OldPred);
BlocksToExtract.insert(NewBB);
Header = NewBB;
@@ -180,7...
2010 Jan 10
1
[LLVMdev] [PATCH] Fix nondeterministic behaviour in the CodeExtractor
...(Value::use_iterator UI = I->use_begin(), E = I->use_end();
UI != E; ++UI)
if (!definedInRegion(*UI)) {
- outputs.push_back(I);
+ outputs.insert(I);
break;
}
} // for: insts
@@ -%ld,%ld +%ld,%ld @@
} // for: basic blocks
NumExitBlocks = ExitBlocks.size();
-
- // Eliminate duplicates.
- std::sort(inputs.begin(), inputs.end());
- inputs.erase(std::unique(inputs.begin(), inputs.end()), inputs.end());
- std::sort(outputs.begin(), outputs.end());
- outputs.erase(std::unique(outputs.begin(), outputs.end()), outputs.end());
}...
2010 Jan 09
0
[LLVMdev] [PATCH] Fix nondeterministic behaviour in the CodeExtractor
On Jan 8, 2010, at 5:01 PM, Julien Lerouge wrote:
> Hello,
>
> The CodeExtractor contains a std::set<BasicBlock*> to keep track of
> the
> blocks to extract. Iterators on this set are not deterministic, and so
> the functions that are generated are not (the order of the
> inputs/outputs can change).
>
> The attached patch uses a SetVector instead. Ok to apply ?