summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-07-23 21:41:57 +0000
committerChris Lattner <sabre@nondot.org>2003-07-23 21:41:57 +0000
commitbfb1d03159f29021da5a97c9c1af5440756bf83d (patch)
treee8bc116e4a5ea94c8e207ddc0d495dd1ea0ed167 /llvm/lib/Transforms/Scalar/InstructionCombining.cpp
parent9763859e8d3de1237638cbce0b2e44e08367b530 (diff)
downloadbcm5719-llvm-bfb1d03159f29021da5a97c9c1af5440756bf83d.tar.gz
bcm5719-llvm-bfb1d03159f29021da5a97c9c1af5440756bf83d.zip
Add comments
llvm-svn: 7283
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 7411428f40f..6d5502533a0 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -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"
OpenPOWER on IntegriCloud