[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Jul 23 16:43:02 PDT 2003
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.105 -> 1.106
---
Log message:
Add comments
---
Diffs of the changes:
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.105 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.106
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.105 Wed Jul 23 16:37:07 2003
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Jul 23 16:41:57 2003
@@ -12,6 +12,15 @@
//
// This is a simple worklist driven algorithm.
//
+// This pass guarantees that the following cannonicalizations are performed on
+// the program:
+// 1. If a binary operator has a constant operand, it is moved to the RHS
+// 2. Logical operators with constant operands are always grouped so that
+// 'or's are performed first, then 'and's, then 'xor's.
+// 3. SetCC instructions are converted from <,>,<=,>= to ==,!= if possible
+// 4. All SetCC instructions on boolean values are replaced with logical ops
+// N. This list is incomplete
+//
//===----------------------------------------------------------------------===//
#include "llvm/Transforms/Scalar.h"
More information about the llvm-commits
mailing list