[LLVMdev] merging globals

Tatu Vaajalahti tatuvaaj at mac.com
Fri Oct 17 09:10:00 PDT 2008


On 17.10.2008, at 17.30, Anton Korobeynikov wrote:

Hi Anton,

> Currently we're aggressively merging globals by default. Do you  
> think it
> will be better to provide special flag to control this behavior?


I think that (once again from the user POV) the "Principle of Least  
Surprise" should apply here - meaning that this behavior should never  
be on by default.

It is interesting that in GCC documentation for -fmerge-all-constants  
you find this:
"Languages like C or C++ require each non-automatic variable to have  
distinct location, so using this option will result in non-conforming  
behavior."

---
Tatu Vaajalahti
Tampere, Finland









More information about the llvm-dev mailing list