[llvm-commits] [llvm] r71210 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp

Nick Lewycky nicholas at mxc.ca
Sat May 9 00:05:30 PDT 2009


Misha Brukman wrote:
> On Fri, May 8, 2009 at 2:47 AM, Nick Lewycky <nicholas at mxc.ca 
> <mailto:nicholas at mxc.ca>> wrote:
> 
>     Author: nicholas
>     Date: Fri May  8 01:47:37 2009
>     New Revision: 71210
> 
>     URL: http://llvm.org/viewvc/llvm-project?rev=71210&view=rev
>     <http://llvm.org/viewvc/llvm-project?rev=71210&view=rev>
>     Log:
>     This transform requires valid TargetData info. Wrap it in 'if (TD)' in
>     preparation for the day we use null TargetData when no target is
>     specified.
> 
> 
> Instead of adding an extra indent level, how about adding:
> 
> if (!TD) {
>   return;
> }
> 
> before the TargetData-dependent code?

There's additional code in the same function that doesn't depend on TD. 
I could've broken them into two functions but made a judgement call not 
to (I couldn't think of a name to distinguish the two functions).

Nick

> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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