Displaying 12 results from an estimated 12 matches for "exitblock".
2019 Oct 30
2
How to make ScalarEvolution recompute SCEV values?
...ader = L->getLoopPreheader();
// keep track of the original predecessors
std::set<BasicBlock *> AllPredecessors;
for (auto PredIt = pred_begin(PreHeader), E = pred_end(PreHeader);
PredIt != E; PredIt++)
AllPredecessors.insert(*PredIt);
BasicBlock *ExitBlock = L->getExitBlock();
auto DT = DominatorTree(*F);
SmallVector<BasicBlock *, 8> Blocks;
const auto ClonedLoop = cloneLoopWithPreheader(PreHeader, PreHeader, L, VMap, NameSuffix, LI, &DT, Blocks);
VMap[ExitBlock] = PreHeader; // chain: cloned loop -> original...
2012 Apr 20
2
[LLVMdev] Should repetitive basic blocks be removed in the results of LoopBase::getExitBlocks()?
Hi, all. I'm using void LoopBase::getExitBlocks (SmallVectorImpl< BlockT *
> &ExitBlocks) const to get all
exit blocks for a loop. The problem I find with this API is that it returns
repetitive basic blocks in certain
situations. Should repetitive basic blocks be removed?
I have an example to show the problem. Following is the source...
2012 Apr 24
2
[LLVMdev] Should repetitive basic blocks be removed in the results of LoopBase::getExitBlocks()?
On Apr 23, 2012, at 10:31 PM, Andrew Trick <atrick at apple.com> wrote:
>
> On Apr 19, 2012, at 10:43 PM, xiaoming gu <xiaoming.gu at gmail.com> wrote:
>
>> Hi, all. I'm using void LoopBase::getExitBlocks (SmallVectorImpl< BlockT * > &ExitBlocks) const to get all
>> exit blocks for a loop. The problem I find with this API is that it returns repetitive basic blocks in certain
>> situations. Should repetitive basic blocks be removed?
>
> Users generally expect a unique...
2012 Apr 24
0
[LLVMdev] Should repetitive basic blocks be removed in the results of LoopBase::getExitBlocks()?
On Apr 19, 2012, at 10:43 PM, xiaoming gu <xiaoming.gu at gmail.com> wrote:
> Hi, all. I'm using void LoopBase::getExitBlocks (SmallVectorImpl< BlockT * > &ExitBlocks) const to get all
> exit blocks for a loop. The problem I find with this API is that it returns repetitive basic blocks in certain
> situations. Should repetitive basic blocks be removed?
Users generally expect a unique set of exit blocks...
2018 Nov 27
2
ScalarEvolution class returns no valid loop exit count
...II(MT);
TargetLibraryInfoWrapperPass TLI =
TargetLibraryInfoWrapperPass(TLII);
LoopInfo LI = LoopInfo(DT);
LI.analyze(DT);
*ScalarEvolution SE = ScalarEvolution(*func, TLI.getTLI(),AC,
DT, LI);*
BasicBlock * exitingblock = L->getUniqueExitBlock();
const SCEV * exitingcount = SE.getExitCount (L,exitblock );
}
}
}
......
Unfortunately I get this result by printing the SCEV exitingcount variable:
***COULDNOTCOMPUTE***
It has been tested that the exitingblock of the loop was calculated
successfully.
The LLVM IR is pa...
2012 Apr 24
0
[LLVMdev] Should repetitive basic blocks be removed in the results of LoopBase::getExitBlocks()?
...cks, but don't make any
> strong assumption. The worst that can happen is missed optimization or
> redundant analysis. In most cases, the loop is in LoopSimplifyForm, so it's
> probably not a problem in practice.
>
>
> Another thing I should mention. The iteration order of ExitBlocks is
> important. In llvm, generating unique sets is a pain because values are not
> numbered and iteration order needs to be reproducible. We would need to keep
> a SmallPtrSet for membership checking while populating the result vector.
What about use the SetVector[1] as container? As its...
2010 Jan 09
2
[LLVMdev] [PATCH] Fix nondeterministic behaviour in the CodeExtractor
...thm>
#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...
2012 Feb 28
0
[LLVMdev] Exit Block Transformation in LoopSimplify
...ansformed.
In SplitLandingPadPredecessors, all the in-the-loop predecessors of
the exits block are grouped and given to the .loopexit basic block and
the out-of-loop predecessors are grouped and given to the .nonloopexit
basic block. the .loopexit basic block is then returned and replace
the old exitBlock. what happened to the .nonloopexit basic block ? A
diagram/code snippet should really help.
Thanks
2010 Jan 10
1
[LLVMdev] [PATCH] Fix nondeterministic behaviour in the CodeExtractor
...alue::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 ?
2017 Apr 04
3
RFC: Adding a string table to the bitcode format
On Tue, Apr 4, 2017 at 12:36 PM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:
>
> On 2017-Apr-04, at 12:12, Peter Collingbourne <peter at pcc.me.uk> wrote:
>
> On Mon, Apr 3, 2017 at 8:13 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:
>
>>
>> On Apr 3, 2017, at 7:08 PM, Peter Collingbourne <peter at pcc.me.uk> wrote:
>>
2012 Jul 16
3
[LLVMdev] RFC: LLVM incubation, or requirements for committing new backends
...> + int loopbreakPatternMatch(LoopT *LoopRep, BlockT *LoopHeader);
> + int loopcontPatternMatch(LoopT *LoopRep, BlockT *LoopHeader);
> + //int loopWithoutBreak(BlockT *);
> +
> + void handleLoopbreak (BlockT *ExitingBlock, LoopT *ExitingLoop,
> + BlockT *ExitBlock, LoopT *exitLoop, BlockT *landBlock);
> + void handleLoopcontBlock(BlockT *ContingBlock, LoopT *contingLoop,
> + BlockT *ContBlock, LoopT *contLoop);
> + bool isSameloopDetachedContbreak(BlockT *Src1Block, BlockT *Src2Block);
> + int handleJumpintoIf(BlockT...