[PATCH] [complex] Teach Clang to preserve different-type operands to arithmeticoperators where one type is a C complex type, and to emit both the efficientand correct implementation for complex arithmetic according to C11 AnnexG using this extra...

Steve Canon scanon at apple.com
Thu Oct 9 08:44:38 PDT 2014


Thanks for working on this, Chandler, it’s an enormous improvement over the current state of affairs.

I am a bit concerned about the performance impact of unconditionally turning mul and div into libcalls; I expect we’ll see large regressions on a few focused benchmarks from this.  In the long run, we likely want CX_LIMITED_RANGE on semantics to be the default, but that will require implementing support for the pragma or some other means to control the behavior (-fcx-limited-range=on?).

Nonetheless, this is a large performance improvement for cases that are actually used in a relatively mainstream project (and it’s strictly an improvement w.r.t. correctness), so I am perfectly content to put such issues into the bug tracker to be handled separately.

http://reviews.llvm.org/D5698






More information about the cfe-commits mailing list