[llvm] r325004 - [CallSiteSplitting] Dereference pointer earlier.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 05:51:52 PST 2018
Author: fhahn
Date: Tue Feb 13 05:51:51 2018
New Revision: 325004
URL: http://llvm.org/viewvc/llvm-project?rev=325004&view=rev
Log:
[CallSiteSplitting] Dereference pointer earlier.
This should make the sanitizers happy.
Modified:
llvm/trunk/lib/Transforms/Scalar/CallSiteSplitting.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/CallSiteSplitting.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CallSiteSplitting.cpp?rev=325004&r1=325003&r2=325004&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CallSiteSplitting.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CallSiteSplitting.cpp Tue Feb 13 05:51:51 2018
@@ -296,10 +296,10 @@ static void splitCallSite(
CallPN->addIncoming(NewCI, SplitBlock);
}
- auto OriginalBegin = TailBB->begin();
+ auto *OriginalBegin = &*TailBB->begin();
// Replace users of the original call with a PHI mering call-sites split.
if (CallPN) {
- CallPN->insertBefore(&*OriginalBegin);
+ CallPN->insertBefore(OriginalBegin);
Instr->replaceAllUsesWith(CallPN);
}
@@ -327,7 +327,7 @@ static void splitCallSite(
}
CurrentI->eraseFromParent();
// We are done once we handled the first original instruction in TailBB.
- if (CurrentI == &*OriginalBegin)
+ if (CurrentI == OriginalBegin)
break;
}
NumCallSiteSplit++;
More information about the llvm-commits
mailing list