Update clang to r339409b.
Change-Id: Ied8a188bb072c40035320acedc86164b66d920af
diff --git a/linux-x64/clang/include/llvm/CodeGen/SelectionDAG.h b/linux-x64/clang/include/llvm/CodeGen/SelectionDAG.h
index c691d44..973a3dd 100644
--- a/linux-x64/clang/include/llvm/CodeGen/SelectionDAG.h
+++ b/linux-x64/clang/include/llvm/CodeGen/SelectionDAG.h
@@ -28,7 +28,7 @@
#include "llvm/ADT/iterator.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Analysis/AliasAnalysis.h"
-#include "llvm/Analysis/DivergenceAnalysis.h"
+#include "llvm/Analysis/LegacyDivergenceAnalysis.h"
#include "llvm/CodeGen/DAGCombine.h"
#include "llvm/CodeGen/FunctionLoweringInfo.h"
#include "llvm/CodeGen/ISDOpcodes.h"
@@ -188,8 +188,8 @@
return DbgValues.empty() && ByvalParmDbgValues.empty() && DbgLabels.empty();
}
- ArrayRef<SDDbgValue*> getSDDbgValues(const SDNode *Node) {
- DbgValMapType::iterator I = DbgValMap.find(Node);
+ ArrayRef<SDDbgValue*> getSDDbgValues(const SDNode *Node) const {
+ auto I = DbgValMap.find(Node);
if (I != DbgValMap.end())
return I->second;
return ArrayRef<SDDbgValue*>();
@@ -229,7 +229,7 @@
LLVMContext *Context;
CodeGenOpt::Level OptLevel;
- DivergenceAnalysis * DA = nullptr;
+ LegacyDivergenceAnalysis * DA = nullptr;
FunctionLoweringInfo * FLI = nullptr;
/// The function-level optimization remark emitter. Used to emit remarks
@@ -382,7 +382,7 @@
/// Prepare this SelectionDAG to process code in the given MachineFunction.
void init(MachineFunction &NewMF, OptimizationRemarkEmitter &NewORE,
Pass *PassPtr, const TargetLibraryInfo *LibraryInfo,
- DivergenceAnalysis * Divergence);
+ LegacyDivergenceAnalysis * Divergence);
void setFunctionLoweringInfo(FunctionLoweringInfo * FuncInfo) {
FLI = FuncInfo;
@@ -471,7 +471,9 @@
return Root;
}
+#ifndef NDEBUG
void VerifyDAGDiverence();
+#endif
/// This iterates over the nodes in the SelectionDAG, folding
/// certain types of nodes together, or eliminating superfluous nodes. The
@@ -1156,6 +1158,11 @@
SDValue Op3, SDValue Op4, SDValue Op5);
SDNode *UpdateNodeOperands(SDNode *N, ArrayRef<SDValue> Ops);
+ /// *Mutate* the specified machine node's memory references to the provided
+ /// list.
+ void setNodeMemRefs(MachineSDNode *N,
+ ArrayRef<MachineMemOperand *> NewMemRefs);
+
// Propagates the change in divergence to users
void updateDivergence(SDNode * N);
@@ -1346,7 +1353,7 @@
void AddDbgLabel(SDDbgLabel *DB);
/// Get the debug values which reference the given SDNode.
- ArrayRef<SDDbgValue*> GetDbgValues(const SDNode* SD) {
+ ArrayRef<SDDbgValue*> GetDbgValues(const SDNode* SD) const {
return DbgInfo->getSDDbgValues(SD);
}
@@ -1429,15 +1436,27 @@
/// every vector element.
/// Targets can implement the computeKnownBitsForTargetNode method in the
/// TargetLowering class to allow target nodes to be understood.
- void computeKnownBits(SDValue Op, KnownBits &Known, unsigned Depth = 0) const;
+ KnownBits computeKnownBits(SDValue Op, unsigned Depth = 0) const;
/// Determine which bits of Op are known to be either zero or one and return
/// them in Known. The DemandedElts argument allows us to only collect the
/// known bits that are shared by the requested vector elements.
/// Targets can implement the computeKnownBitsForTargetNode method in the
/// TargetLowering class to allow target nodes to be understood.
+ KnownBits computeKnownBits(SDValue Op, const APInt &DemandedElts,
+ unsigned Depth = 0) const;
+
+ /// \copydoc SelectionDAG::computeKnownBits(SDValue,unsigned)
+ void computeKnownBits(SDValue Op, KnownBits &Known,
+ unsigned Depth = 0) const {
+ Known = computeKnownBits(Op, Depth);
+ }
+
+ /// \copydoc SelectionDAG::computeKnownBits(SDValue,const APInt&,unsigned)
void computeKnownBits(SDValue Op, KnownBits &Known, const APInt &DemandedElts,
- unsigned Depth = 0) const;
+ unsigned Depth = 0) const {
+ Known = computeKnownBits(Op, DemandedElts, Depth);
+ }
/// Used to represent the possible overflow behavior of an operation.
/// Never: the operation cannot overflow.