charfi asma <charfiasma@xxxxxxxx> writes: > I red in the GCC internals doc that building e new GCC front end (compile > directly your source language rather than generating C langauge and then use gcc > to compile) > can enhance some optimization passes: > > "... GCC front ends benefit from all the optimizations in GCC. Some of these, > such as alias analysis, may work better when GCC is compiling directly from > source code then when it is compiling from generated C code ..." > > I built a new GCC front end and I am interested in enhancing optimizations. > > Any example (with any front end) or any idea that can explain How can we > enhance alias when building a new GCC front end ? You can define LANG_HOOKS_GET_ALIAS_SET to tell the middle-end which pointers can alias each other. See, e.g., c_common_get_alias_set to see how the C/C++ frontends do it. Note that type based aliasing is a complex issue. This langhook refers specifically to type based alias analysis. You should read about that on the web. Ian