On Mon, 7 Nov 2011, Richard Guenther wrote: > Joseph, do you have any advise on how to address frontend specific > options in a more general way? I'm trying to re-construct a > command-line that when processed frontend agnostic would produce > the same end-result in global_options as if going through the frontend. > Is that even possible (do you have option examples that would show > this is impossible?)
Reconstructing command lines is never going to be particularly reliable. I think the short-term fix will be saving these particular options explicitly, and the longer-term fix will be representing them (anything affecting IR semantics rather than just what IR gets generated) in the IR so that once the front end is finished the global settings never get used. (That doesn't mean moving them all to the individual GIMPLE operations, although for complex-method that would be the best location; moving them to struct function, with appropriate code to stream the new fields and do whatever's appropriate when inlining between functions with different settings, would still be useful.) -- Joseph S. Myers jos...@codesourcery.com