[llvm-commits] [llvm] r120016 - in /llvm/trunk: include/llvm/Analysis/InstructionSimplify.h lib/Analysis/InstructionSimplify.cpp

Duncan Sands baldrick at free.fr
Tue Nov 23 02:50:08 PST 2010


Author: baldrick
Date: Tue Nov 23 04:50:08 2010
New Revision: 120016

URL: http://llvm.org/viewvc/llvm-project?rev=120016&view=rev
Log:
Expand a little on the description of what InstructionSimplify does.

Modified:
    llvm/trunk/include/llvm/Analysis/InstructionSimplify.h
    llvm/trunk/lib/Analysis/InstructionSimplify.cpp

Modified: llvm/trunk/include/llvm/Analysis/InstructionSimplify.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/InstructionSimplify.h?rev=120016&r1=120015&r2=120016&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/InstructionSimplify.h (original)
+++ llvm/trunk/include/llvm/Analysis/InstructionSimplify.h Tue Nov 23 04:50:08 2010
@@ -7,9 +7,11 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file declares routines for folding instructions into simpler forms that
-// do not require creating new instructions.  For example, this does constant
-// folding, and can handle identities like (X&0)->0.
+// This file declares routines for folding instructions into simpler forms
+// that do not require creating new instructions.  This does constant folding
+// ("add i32 1, 1" -> "2") but can also handle non-constant operands, either
+// returning a constant ("and i32 %x, 0" -> "0") or an already existing value
+// ("and i32 %x, %x" -> "%x").
 //
 //===----------------------------------------------------------------------===//
 

Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionSimplify.cpp?rev=120016&r1=120015&r2=120016&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InstructionSimplify.cpp (original)
+++ llvm/trunk/lib/Analysis/InstructionSimplify.cpp Tue Nov 23 04:50:08 2010
@@ -8,8 +8,10 @@
 //===----------------------------------------------------------------------===//
 //
 // This file implements routines for folding instructions into simpler forms
-// that do not require creating new instructions.  For example, this does
-// constant folding, and can handle identities like (X&0)->0.
+// that do not require creating new instructions.  This does constant folding
+// ("add i32 1, 1" -> "2") but can also handle non-constant operands, either
+// returning a constant ("and i32 %x, 0" -> "0") or an already existing value
+// ("and i32 %x, %x" -> "%x").
 //
 //===----------------------------------------------------------------------===//
 





More information about the llvm-commits mailing list