From bfb1d03159f29021da5a97c9c1af5440756bf83d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 23 Jul 2003 21:41:57 +0000 Subject: Add comments llvm-svn: 7283 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp') 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" -- cgit v1.2.3