Displaying 3 results from an estimated 3 matches for "storingglobalv".
Did you mean:
storingglobalval
2008 Sep 19
2
[LLVMdev] mem2reg Question
...ominates the block and if we haven'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 ma...
2008 Sep 19
0
[LLVMdev] mem2reg Question
...'s well-defined,
it's always correct to use the value stored, because undef can be
anything.
The reason for the check is question is that the stored value might
not dominate the use. This is only possible, however, if the stored
value is an instruction; dominance doesn't make sense if
StoringGlobalVal is true.
-Eli
2008 Sep 19
1
[LLVMdev] mem2reg Question
...se undef can be
> anything.
I agree.
> The reason for the check is question is that the stored value might
> not dominate the use. This is only possible, however, if the stored
Yes, that's the case I am seeing.
> value is an instruction; dominance doesn't make sense if
> StoringGlobalVal is true.
Ok, so you're saying that because we're storing a global value, by
definition it DOES dominate the use because it's a global (and
thus live-in to the Function). Is that right?
In the case I'm seeing, the "global value" is a constant. So I guess it's
ok t...