[llvm] r354021 - Make widenable condition transparent for MemoryWriteTracking
Max Kazantsev via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 14 03:10:29 PST 2019
Author: mkazantsev
Date: Thu Feb 14 03:10:29 2019
New Revision: 354021
URL: http://llvm.org/viewvc/llvm-project?rev=354021&view=rev
Log:
Make widenable condition transparent for MemoryWriteTracking
Side effects of widenable condition intrinsic are modelled via
InaccessibleMemOnly, and there is no way to say that it isn't
really writing any memory. This patch teaches MemoryWriteTracking
ignore this intrinsic.
Modified:
llvm/trunk/lib/Analysis/InstructionPrecedenceTracking.cpp
Modified: llvm/trunk/lib/Analysis/InstructionPrecedenceTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionPrecedenceTracking.cpp?rev=354021&r1=354020&r2=354021&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InstructionPrecedenceTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/InstructionPrecedenceTracking.cpp Thu Feb 14 03:10:29 2019
@@ -19,6 +19,7 @@
#include "llvm/Analysis/InstructionPrecedenceTracking.h"
#include "llvm/Analysis/ValueTracking.h"
+#include "llvm/IR/PatternMatch.h"
using namespace llvm;
@@ -152,5 +153,8 @@ bool ImplicitControlFlowTracking::isSpec
bool MemoryWriteTracking::isSpecialInstruction(
const Instruction *Insn) const {
+ using namespace PatternMatch;
+ if (match(Insn, m_Intrinsic<Intrinsic::experimental_widenable_condition>()))
+ return false;
return Insn->mayWriteToMemory();
}
More information about the llvm-commits
mailing list