Displaying 5 results from an estimated 5 matches for "useblock".
Did you mean:
unblock
2008 Oct 06
0
[LLVMdev] mem2reg optimization
On Saturday 04 October 2008 17:05, Chris Lattner wrote:
> Looking more closely at the approach, I infer that the (logical in
> hindsight) issue are cases where mem2reg scans a BB to see the
> relative ordering of two instructions. For example, the single store
Correct.
> case. I could imagine that if you saw lots of single store allocas in
> the middle of a large BB that
2008 Oct 20
3
[LLVMdev] mem2reg optimization
...st. That won't be
possible with a map indexing all instructions.
This loop is also a problem:
// Otherwise, if this is a different block or if all uses happen
// after the store, do a simple linear scan to replace loads with
// the stored value.
for (BasicBlock::iterator I = UseBlock->begin(), E = UseBlock->end();
I != E; ) {
if (LoadInst *LI = dyn_cast<LoadInst>(I++)) {
if (LI->getOperand(0) == AI) {
LI->replaceAllUsesWith(OnlyStore->getOperand(0));
if (AST && isa<PointerType>(LI->getType()))...
2016 Mar 19
2
Should we enable -Wrange-loop-analysis? (Was: [llvm] r261524 - Fix some abuse of auto...)
...Transforms/Utils/MemorySSA.cpp Mon Feb 22 07:11:58 2016
> @@ -473,7 +473,7 @@ void MemorySSA::verifyDomination(Functio
> if (!MD)
> continue;
>
> - for (const auto &U : MD->users()) {
> + for (User *U : MD->users()) {
> BasicBlock *UseBlock;
> // Things are allowed to flow to phi nodes over their predecessor edge.
> if (auto *P = dyn_cast<MemoryPhi>(U)) {
>
> Modified: llvm/trunk/tools/sancov/sancov.cc
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/sancov/sancov.cc?rev=261524&r1=...
2008 Oct 04
5
[LLVMdev] mem2reg optimization
On Oct 4, 2008, at 2:51 PM, Chris Lattner wrote:
>>> I like your approach of using the use lists but I'm not sure the
>>> ordering
>>> is guaranteed. If it is, your approach is superior.
>>
>> I got my patch updated to work with TOT. Here it is. Comments
>> welcome.
>
> Hi Dave,
>
> Great. I'd like to get this in, but would
2008 Sep 19
2
[LLVMdev] mem2reg Question
...do so now. We can't handle the case where the store doesn't dominate a
// block because there may be a path between the store and the use, but we
// may need to insert phi nodes to handle dominance properly.
if (!StoringGlobalVal && !dominates(OnlyStore->getParent(), UseBlock))
continue;
This prevents mem2reg from forwarding the single store to uses that
it does not dominate. Why is this only prevented when NOT storing
to global values? I would think it would be exactly the opposite. A global
value may have some value coming into the Function so I don't se...