aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2007-10-25 18:23:45 +0000
committerBill Wendling <isanbard@gmail.com>2007-10-25 18:23:45 +0000
commit0713a224234b4596709c7582ebf17a1ccb95c872 (patch)
tree5e7feb5ee3dce97d6221ddeed6815312647b6b36
parent3b8ac40e63970f2f730bbc838513f5c9c1c40941 (diff)
downloadexternal_llvm-0713a224234b4596709c7582ebf17a1ccb95c872.zip
external_llvm-0713a224234b4596709c7582ebf17a1ccb95c872.tar.gz
external_llvm-0713a224234b4596709c7582ebf17a1ccb95c872.tar.bz2
Added comment explaining why we are doing this check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43353 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/BranchFolding.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp
index d523bf5..021001d 100644
--- a/lib/CodeGen/BranchFolding.cpp
+++ b/lib/CodeGen/BranchFolding.cpp
@@ -272,6 +272,11 @@ static unsigned ComputeCommonTailLength(MachineBasicBlock *MBB1,
while (I1 != MBB1->begin() && I2 != MBB2->begin()) {
--I1; --I2;
if (!I1->isIdenticalTo(I2) ||
+ // XXX: This check is dubious. It's used to get around a problem where
+ // people incorrectly expect inline asm directives to remain in the same
+ // relative order. This is untenable because normal compiler
+ // optimizations (like this one) may reorder and/or merge these
+ // directives.
I1->getOpcode() == TargetInstrInfo::INLINEASM) {
++I1; ++I2;
break;