[llvm-commits] [PATCH][FastMath, InstCombine] Fadd/Fsub optimizations

Shuxin Yang shuxin.llvm at gmail.com
Wed Dec 12 09:53:00 PST 2012


"XYX say that patch is complicate, then the patch has to be complicated".
I have hard time in understanding this logic. Please give some evidence!

I believe my change is simple enough.
It has only 800 lines of code for addition optimization. If were not for 
floating point,
the complexity can be cut by half.

The diff has about 800 lines, the the code has some 730 lines. Among the 
them,
150 lines for Coefficient. Another 150 lines of code are for FAddend. 
These two
classes are simplified version of the std Complex class in C++ Newbie book.

For the rest code, at lest 1/5 are comments, space etc. Please tell me 
why it complex, and where it can
be simplified.


On 12/12/12 8:34 AM, Duncan Sands wrote:
> Hi Shuxin,
>
> >> My high-level concern with this patch is basically that this is a lot
>>> of code, the algorithm is complex, and the implementation is hard to
>>> reason about; I'm trying to find places where can simplify if
>>> possible.  And I'm immediately skeptical of any performance claim
>>> without numbers.
>> Some 700 lines of code is nothing.
>> Among them 650 lines are about utility, the core has about 50 lines.
>
> I didn't read your patch but I have complete confidence in Eli's 
> judgement, and
> I think you should take whatever he says very seriously too.  If he 
> says that
> your patch seems too complex please consider the possibility that he 
> is right,
> and work hard to simplify, refactorize and clarify the code.
>
> Ciao, Duncan.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list