[llvm] r173721 - Add a comment mentioning that InstructionSimplify routines do,

Dan Gohman dan433584 at gmail.com
Mon Jan 28 13:45:32 PST 2013


Author: djg
Date: Mon Jan 28 15:45:32 2013
New Revision: 173721

URL: http://llvm.org/viewvc/llvm-project?rev=173721&view=rev
Log:
Add a comment mentioning that InstructionSimplify routines do,
in fact, resolve undef uses.

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

Modified: llvm/trunk/include/llvm/Analysis/InstructionSimplify.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/InstructionSimplify.h?rev=173721&r1=173720&r2=173721&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/InstructionSimplify.h (original)
+++ llvm/trunk/include/llvm/Analysis/InstructionSimplify.h Mon Jan 28 15:45:32 2013
@@ -14,6 +14,12 @@
 // ("and i32 %x, %x" -> "%x").  If the simplification is also an instruction
 // then it dominates the original instruction.
 //
+// These routines implicitly resolve undef uses. The easiest way to be safe when
+// using these routines to obtain simplified values for existing instructions is
+// to always replace all uses of the instructions with the resulting simplified
+// values. This will prevent other code from seeing the same undef uses and
+// resolving them to different values.
+//
 //===----------------------------------------------------------------------===//
 
 #ifndef LLVM_ANALYSIS_INSTRUCTIONSIMPLIFY_H





More information about the llvm-commits mailing list