Displaying 5 results from an estimated 5 matches for "onlystore".
2008 Oct 20
3
[LLVMdev] mem2reg optimization
...oads and stores
> > within the block.
>
> This is a simpler approach and should have the same effect. I'll code it
> up.
Urk. After looking at doing this today, I realized it won't work. The
problem is that RewriteSingleStoreAlloca has this loop:
for (; &*I != OnlyStore; ++I) { // scan block for store.
if (isa<LoadInst>(I) && I->getOperand(0) == AI)
break;
It's looking for a load that matches the address of the single store. This
is the loop that's taking all the time. What I did with the original patch
was to make...
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 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
...t processed it yet,
// 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...
2008 Oct 20
0
[LLVMdev] mem2reg optimization
...;
>> This is a simpler approach and should have the same effect. I'll
>> code it
>> up.
>
> Urk. After looking at doing this today, I realized it won't work.
> The
> problem is that RewriteSingleStoreAlloca has this loop:
>
> for (; &*I != OnlyStore; ++I) { // scan block for store.
> if (isa<LoadInst>(I) && I->getOperand(0) == AI)
> break;
>
> It's looking for a load that matches the address of the single
> store. This
> is the loop that's taking all the time. What I did with the...