On Jul 26, 2010, at 3:22 PM, Dale Johannesen wrote: On Jul 26, 2010, at 2:52 PMPDT, Jochen Wilhelmy wrote:>>> Currently we don't do any unsafe-math opts in InstCombine. Not >>> sure if this is policy or if it's just that nobody's implemented it. >>> >> perhaps in can be implemented using the existing flag -enable-unsafe- >> fp-math. >> what do you think? > > I don't see any good reason these opts shouldn't be in InstCombine. > Last time I looked that flag wasn't easily accessible in InstCombine > but it looks like that might have been fixed.Keeping it out of the mid-level optimizers is "by design". When we tackle this, we should do it right, by making the flags per-instruction. -Chris
> Keeping it out of the mid-level optimizers is "by design". When we tackle this, we should do it right, by making the flags per-instruction. >But at least ist it planned for some time in the future? then i can "survive" with a patch until then. I wonder why these optimizations can be done in the mid-level and additionaly in the backend. as a non-compiler-guru i see redundancy there. perhaps it is possible to write a "loop back" backend that outputs llvm ir again so that the optimizations need to be implemented only once. -Jochen
On Jul 27, 2010, at 4:59 AM, Jochen Wilhelmy wrote:> >> Keeping it out of the mid-level optimizers is "by design". When we tackle this, we should do it right, by making the flags per-instruction. >> > But at least ist it planned for some time in the future? > then i can "survive" with a patch until then.As an open source project, we have little ability to force things to happen. It could be implemented next week or it might be 10 years from now, or never. All I can say is that I don't know of anyone planning to work on it. It dovetails with rounding mode support, so a holistic approach would be good.> I wonder why these optimizations can be done in the mid-level and additionaly in the backend. > as a non-compiler-guru i see redundancy there. perhaps it is possible to write a "loop back" > backend that outputs llvm ir again so that the optimizations need to be implemented only once.The stuff in the backend is a hack, using global variables (TargetOptions.h). We aim to annihilate those over time :) -Chris