[LLVMdev] [Propose] Add address-taken bit to GlobalVariable for disambiguation purpose
Shuxin Yang
shuxin.llvm at gmail.com
Wed Oct 30 10:37:43 PDT 2013
Nadav:
I don't think this is right approach for engineering.
The time-complexity of re-analyzing addr_taken for each single alias
query depends on
1. how many global variable
2. how many occurrence of these global variables.
3. how many queries the compiler have.
3) depends on compiler. You never know what we will have in the
following few years.
1 and 2 depends on the program. You never know what kind of program you
will run into.
How can we use what we have today the extrapolate the future ignoring
the highly
unpredictable complexity.
It's interesting that recently, many EE magazine (circuit cellar,
Elector, EE times) are
discussing buggy SW kill people. I remember some posts complaining that
some buggy program
have amazingly large # of global variables. I can find one post in
Chinese website:
http://forum.xitek.com/thread-1226816-5-1-1.html
The 1st post says, "a program has 11000 global variables"!
As to "Can you provide this data"? My answer is no, and I will not
to implement the analysis
which perform on-the-fly analysis unless I'm convinced that saving
addr_taken bit to llvm::GlobalVariable
is fundamentally flawed.
Shuxin
On 10/30/13 9:20 AM, Nadav Rotem wrote:
>
> On Oct 29, 2013, at 4:39 PM, Shuxin Yang <shuxin.llvm at gmail.com
> <mailto:shuxin.llvm at gmail.com>> wrote:
>
>> That said, I don't think it is still inexpensive if we re-analyze the
>> addr-taken again and again *ON THE FLY". It is really difficult to
>> predict compile-time impact. You never know how many global variables
>> in a program, and you never know how extensive they are used.
>> Poorly-written program tends to have lots of global-vars.
>
> Actually, it is not that difficult to predict the effect on compile
> time. All you need to do is implement the analysis “on the fly” and
> measure the compile time. Can you provide this data ? Compile time
> measurements can help us make a decision.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131030/292a7d20/attachment.html>
More information about the llvm-dev
mailing list