On 04/29/2015 03:36 PM, Jiong Wang wrote:
Jeff Law writes:
On 04/27/2015 02:21 PM, Jiong Wang wrote:
Jeff,
Sorry, I can't understand the meaning of "overlap between t_low and low",
assume "right" in "right value" means the opposite of "left" not
"correct".
So what you mean is t_low and low share the same pseudo regiser?
My concern is sharing the same pseudo or memory location. But thinking
more about it, the shifted value has to have range information, so it
must have been an SSA_NAME, right? If so, then it can't overlap with
the destination, so this is a non-issue. Sorry for the confusion.
Thanks for the light. By looking at related code, looks like even it's
SSA_NAME, it's still possible to share the same pseudo given the
destination is in the same SSA map parition after ssa name coleascing?
If they're the same size and have non-overlapping lifetimes, then yes,
they could be the same pseudo. That ought to be easy to check.
Thankfully we don't have to worry about MEMs, which is a harder check.
OK. I will rework the patch, and I found there is a function named
"expand_doubleword_shift" which looks like a more natural place to do
this optimization, although it's hard to get range info there. I will do
further explore on this.
Sounds good.
jeff