[llvm-commits] [llvm] r124976 - /llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp

Nick Lewycky nicholas at mxc.ca
Sat Feb 5 20:33:50 PST 2011


Author: nicholas
Date: Sat Feb  5 22:33:50 2011
New Revision: 124976

URL: http://llvm.org/viewvc/llvm-project?rev=124976&view=rev
Log:
Remove specialized comparison of InlineAsm objects. They're uniqued on creation
now, and this wasn't comparing some of their relevant bits anyhow.

Modified:
    llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp

Modified: llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp?rev=124976&r1=124975&r2=124976&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp Sat Feb  5 22:33:50 2011
@@ -389,12 +389,8 @@
       C1 == ConstantExpr::getBitCast(const_cast<Constant*>(C2), C1->getType());
   }
 
-  if (isa<InlineAsm>(V1) && isa<InlineAsm>(V2)) {
-    const InlineAsm *IA1 = cast<InlineAsm>(V1);
-    const InlineAsm *IA2 = cast<InlineAsm>(V2);
-    return IA1->getAsmString() == IA2->getAsmString() &&
-           IA1->getConstraintString() == IA2->getConstraintString();
-  }
+  if (isa<InlineAsm>(V1) || isa<InlineAsm>(V2))
+    return V1 == V2;
 
   unsigned long &ID1 = Map1[V1];
   if (!ID1)





More information about the llvm-commits mailing list