[llvm-commits] [llvm] r109739 - in /llvm/trunk/tools/llvm-diff: ./ CMakeLists.txt DifferenceEngine.cpp DifferenceEngine.h Makefile llvm-diff.cpp

Devang Patel dpatel at apple.com
Thu Jul 29 10:02:03 PDT 2010


John,
On Jul 29, 2010, at 12:53 AM, John McCall wrote:

> +  bool diff(Instruction *L, Instruction *R, bool Complain, bool TryUnify) {

Any reason to not directly use one of the following Instruction methods here ?

  /// isIdenticalTo - Return true if the specified instruction is exactly                                     
  /// identical to the current one.  This means that all operands match and any                               
  /// extra information (e.g. load is volatile) agree.                                                        
  bool isIdenticalTo(const Instruction *I) const;

  /// isIdenticalToWhenDefined - This is like isIdenticalTo, except that it                                   
  /// ignores the SubclassOptionalData flags, which specify conditions                                        
  /// under which the instruction's result is undefined.                                                      
  bool isIdenticalToWhenDefined(const Instruction *I) const;

  /// This function determines if the specified instruction executes the same                                 
  /// operation as the current one. This means that the opcodes, type, operand                                
  /// types and any other factors affecting the operation must be the same. This                              
  /// is similar to isIdenticalTo except the operands themselves don't have to                                
  /// be identical.                                                                                           
  /// @returns true if the specified instruction is the same operation as                                     
  /// the current one.                                                                                        
  /// @brief Determine if one instruction is the same operation as another.                                   
  bool isSameOperationAs(const Instruction *I) const;

-
Devang



More information about the llvm-commits mailing list