[llvm-commits] [llvm] r72567 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp

Chris Lattner clattner at apple.com
Fri May 29 08:30:24 PDT 2009


On May 29, 2009, at 3:28 AM, Torok Edwin wrote:

> Author: edwin
> Date: Fri May 29 05:28:44 2009
> New Revision: 72567
>
> URL: http://llvm.org/viewvc/llvm-project?rev=72567&view=rev
> Log:
> for instructions with void type we have no choice but print the  
> instruction as
> is, otherwise we get a <badref>.

Hi Edwin, would it make sense to print the clobbering instruction as  
an instruction, instead of as an operand?

-Chris

>
>
> Modified:
>    llvm/trunk/lib/Transforms/Scalar/GVN.cpp
>
> Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=72567&r1=72566&r2=72567&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Fri May 29 05:28:44 2009
> @@ -1165,7 +1165,10 @@
>       WriteAsOperand(*DOUT.stream(), L);
>       Instruction *I = dep.getInst();
>       DOUT << " is clobbered by " << I->getOpcodeName() << "  
> instruction ";
> -      WriteAsOperand(*DOUT.stream(), I, false);
> +      if (I->getType()->isFirstClassType())
> +        WriteAsOperand(*DOUT.stream(), I, false);
> +      else
> +        DOUT << *I;
>       DOUT << "\n";
>     );
>     return false;
>
>
> _______________________________________________
> 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