[llvm] r193251 - Use address-taken to disambiguate global variable and indirect memops.
Shuxin Yang
shuxin.llvm at gmail.com
Sat Oct 26 23:53:05 PDT 2013
> "does" not "dose". A dose is a dosage of a drug. "does" is the verb to
> perform something.
Sorry this is one of my common typo. Eric spotted this typo as well,
unfortunately I forgot to fix.
>
> Also, while I am sure this is the right approach, I made some comments
> on this patch:
>
>
> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20131021/192186.html
>
>
> it looks like you committed without replying or acting on any of my
> review comments? Huh?
>
I somehow miss this mail. There is no reason to ignore any response. I
have never ever
ignore feedback before. Actually I'm expecting your feedback as you are
original author of the globalopt.
>Could I ask for the keyword to be worded "addr not taken" instead of
>"not addr taken"?
Ok.
>Does addr_not_taken imply unnamed_addr? I'm pretty sure it does. If so,
>please make sure that this works (see how readonly/readnone are handled
>-- readnone implies readonly).
I will double check next week, and go back to you.
>I'm not convinced that you actually need to cache this result. You say
>that it isn't efficient to determine whether the address is taken on the
>fly.
>How bad is it if you just loop over the direct users of the global
>variable, and bail if you see anything that isn't a load or store? Yes,
>it would have false negatives on load/store of constantexpr GEPs. How
>big a problem is that really? If that really doesn't work, is it okay if
>you do a depth-first scan over uses, and bail on anything which isn't
>load/store/constant-gep/constant-bitcast?
The compile time is really depends on how many global variables a module
have,
and how many reference it has. C-thinking programs tend to have lots
global-variables,
making compile-time impact hard to predict.
I also try to analyze address-taken and cache the result during AA phase.
However, in this case, we also need to provide a interface to let AA client
to invalidate the the cached result. (e.g. a imaginary out-lining pass makes
a addr-not-taken variable address-taken).
Thank you again for your feedback!
Shuxin
More information about the llvm-commits
mailing list