Displaying 6 results from an estimated 6 matches for "blockstoextract".
2010 Jan 09
2
[LLVMdev] [PATCH] Fix nondeterministic behaviour in the CodeExtractor
...port/raw_ostream.h"
+#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/StringExtras.h"
#include <algorithm>
#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;
- Block...
2010 Oct 20
5
[LLVMdev] Pass Incompatibility
...;' failed.
If I register DemoteRegisterToMemoryID first then I get this assert during code extraction.
CodeExtractor.cpp:681: llvm::Function*<unnamed>::CodeExtractor::ExtractCodeRegion(const std::vector<llvm::BasicBlock*, std::allocator<llvm::BasicBlock*> >&): Assertion `BlocksToExtract.count(*PI) && "No blocks in this region may have entries from outside the region" " except for the first block!"' failed.
If I split my pass in half, then the transformation works as expected, with region extraction and DemoteRegisterToMemory going on their merry wa...
2010 Oct 20
0
[LLVMdev] Pass Incompatibility
...emoryID first
I'd expect this to work.
> then I get this assert during code extraction.
>
> CodeExtractor.cpp:681: llvm::Function*<unnamed>::CodeExtractor::ExtractCodeRegion(const std::vector<llvm::BasicBlock*, std::allocator<llvm::BasicBlock*> >&): Assertion `BlocksToExtract.count(*PI) && "No blocks in this region may have entries from outside the region" " except for the first block!"' failed.
AFAIU, this assertion is not related to ordering of analysis passes. Analyzing incoming bb vector for ExtractCodeRegion() may help you understan...
2010 Oct 20
0
[LLVMdev] Pass Incompatibility
...> If I register DemoteRegisterToMemoryID first then I get this assert during code extraction.
>
> CodeExtractor.cpp:681: llvm::Function*<unnamed>::CodeExtractor::ExtractCodeRegion(const std::vector<llvm::BasicBlock*, std::allocator<llvm::BasicBlock*> >&): Assertion `BlocksToExtract.count(*PI)&& "No blocks in this region may have entries from outside the region" " except for the first block!"' failed.
>
> If I split my pass in half, then the transformation works as expected, with region extraction and DemoteRegisterToMemory going on their...
2010 Jan 10
1
[LLVMdev] [PATCH] Fix nondeterministic behaviour in the CodeExtractor
...Transforms/Utils/CodeExtractor.cpp (revision 93080)
+++ lib/Transforms/Utils/CodeExtractor.cpp (working copy)
@@ -%ld,%ld +%ld,%ld @@
namespace {
class CodeExtractor {
- typedef std::vector<Value*> Values;
+ typedef SetVector<Value*> Values;
SetVector<BasicBlock*> BlocksToExtract;
DominatorTree* DT;
bool AggregateArgs;
@@ -%ld,%ld +%ld,%ld @@
// instruction is used outside the region, it's an output.
for (User::op_iterator O = I->op_begin(), E = I->op_end(); O != E; ++O)
if (definedInCaller(*O))
- inputs.push_back(*O);
+...
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 ?