diff options
author | Duncan Sands <baldrick@free.fr> | 2010-11-23 10:50:08 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-11-23 10:50:08 +0000 |
commit | 4cd2ad15b43f21d641330b4b09961af08646445e (patch) | |
tree | c77e88447b0719b0a1adba48a2936b155d395bb6 | |
parent | b9b369fa9983843c4ed77b3a35b6e9b7933955bb (diff) |
Expand a little on the description of what InstructionSimplify does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120016 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Analysis/InstructionSimplify.h | 8 | ||||
-rw-r--r-- | lib/Analysis/InstructionSimplify.cpp | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/include/llvm/Analysis/InstructionSimplify.h b/include/llvm/Analysis/InstructionSimplify.h index f88fc46c31..8f9b45b3c8 100644 --- a/include/llvm/Analysis/InstructionSimplify.h +++ b/include/llvm/Analysis/InstructionSimplify.h @@ -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"). // //===----------------------------------------------------------------------===// diff --git a/lib/Analysis/InstructionSimplify.cpp b/lib/Analysis/InstructionSimplify.cpp index 4b6320bb46..ac21a9ae20 100644 --- a/lib/Analysis/InstructionSimplify.cpp +++ b/lib/Analysis/InstructionSimplify.cpp @@ -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"). // //===----------------------------------------------------------------------===// |