Reformat blank lines.
llvm-svn: 248263
This commit is contained in:
@@ -27,7 +27,6 @@ class formatted_raw_ostream;
|
|||||||
|
|
||||||
class AssemblyAnnotationWriter {
|
class AssemblyAnnotationWriter {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual ~AssemblyAnnotationWriter();
|
virtual ~AssemblyAnnotationWriter();
|
||||||
|
|
||||||
/// emitFunctionAnnot - This may be implemented to emit a string right before
|
/// emitFunctionAnnot - This may be implemented to emit a string right before
|
||||||
|
|||||||
@@ -120,9 +120,11 @@ public:
|
|||||||
|
|
||||||
EndAttrKinds ///< Sentinal value useful for loops
|
EndAttrKinds ///< Sentinal value useful for loops
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AttributeImpl *pImpl;
|
AttributeImpl *pImpl;
|
||||||
Attribute(AttributeImpl *A) : pImpl(A) {}
|
Attribute(AttributeImpl *A) : pImpl(A) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Attribute() : pImpl(nullptr) {}
|
Attribute() : pImpl(nullptr) {}
|
||||||
|
|
||||||
@@ -226,6 +228,7 @@ public:
|
|||||||
ReturnIndex = 0U,
|
ReturnIndex = 0U,
|
||||||
FunctionIndex = ~0U
|
FunctionIndex = ~0U
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class AttrBuilder;
|
friend class AttrBuilder;
|
||||||
friend class AttributeSetImpl;
|
friend class AttributeSetImpl;
|
||||||
@@ -249,8 +252,8 @@ private:
|
|||||||
ArrayRef<std::pair<unsigned,
|
ArrayRef<std::pair<unsigned,
|
||||||
AttributeSetNode*> > Attrs);
|
AttributeSetNode*> > Attrs);
|
||||||
|
|
||||||
|
|
||||||
explicit AttributeSet(AttributeSetImpl *LI) : pImpl(LI) {}
|
explicit AttributeSet(AttributeSetImpl *LI) : pImpl(LI) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AttributeSet() : pImpl(nullptr) {}
|
AttributeSet() : pImpl(nullptr) {}
|
||||||
|
|
||||||
@@ -439,6 +442,7 @@ class AttrBuilder {
|
|||||||
uint64_t StackAlignment;
|
uint64_t StackAlignment;
|
||||||
uint64_t DerefBytes;
|
uint64_t DerefBytes;
|
||||||
uint64_t DerefOrNullBytes;
|
uint64_t DerefOrNullBytes;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AttrBuilder()
|
AttrBuilder()
|
||||||
: Attrs(0), Alignment(0), StackAlignment(0), DerefBytes(0),
|
: Attrs(0), Alignment(0), StackAlignment(0), DerefBytes(0),
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ private:
|
|||||||
}
|
}
|
||||||
return CallSiteBase();
|
return CallSiteBase();
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// isCall - true if a CallInst is enclosed.
|
/// isCall - true if a CallInst is enclosed.
|
||||||
/// Note that !isCall() does not mean it is an InvokeInst enclosed,
|
/// Note that !isCall() does not mean it is an InvokeInst enclosed,
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ protected:
|
|||||||
explicit IntegerType(LLVMContext &C, unsigned NumBits) : Type(C, IntegerTyID){
|
explicit IntegerType(LLVMContext &C, unsigned NumBits) : Type(C, IntegerTyID){
|
||||||
setSubclassData(NumBits);
|
setSubclassData(NumBits);
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// This enum is just used to hold constants we need for IntegerType.
|
/// This enum is just used to hold constants we need for IntegerType.
|
||||||
enum {
|
enum {
|
||||||
@@ -90,7 +91,6 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/// FunctionType - Class to represent function types
|
/// FunctionType - Class to represent function types
|
||||||
///
|
///
|
||||||
class FunctionType : public Type {
|
class FunctionType : public Type {
|
||||||
@@ -167,7 +167,6 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/// StructType - Class to represent struct types. There are two different kinds
|
/// StructType - Class to represent struct types. There are two different kinds
|
||||||
/// of struct types: Literal structs and Identified structs.
|
/// of struct types: Literal structs and Identified structs.
|
||||||
///
|
///
|
||||||
@@ -207,8 +206,8 @@ class StructType : public CompositeType {
|
|||||||
/// a identified type that has an empty name.
|
/// a identified type that has an empty name.
|
||||||
///
|
///
|
||||||
void *SymbolTableEntry;
|
void *SymbolTableEntry;
|
||||||
public:
|
|
||||||
|
|
||||||
|
public:
|
||||||
/// StructType::create - This creates an identified struct.
|
/// StructType::create - This creates an identified struct.
|
||||||
static StructType *create(LLVMContext &Context, StringRef Name);
|
static StructType *create(LLVMContext &Context, StringRef Name);
|
||||||
static StructType *create(LLVMContext &Context);
|
static StructType *create(LLVMContext &Context);
|
||||||
@@ -270,7 +269,6 @@ public:
|
|||||||
/// element type.
|
/// element type.
|
||||||
static bool isValidElementType(Type *ElemTy);
|
static bool isValidElementType(Type *ElemTy);
|
||||||
|
|
||||||
|
|
||||||
// Iterator access to the elements.
|
// Iterator access to the elements.
|
||||||
typedef Type::subtype_iterator element_iterator;
|
typedef Type::subtype_iterator element_iterator;
|
||||||
element_iterator element_begin() const { return ContainedTys; }
|
element_iterator element_begin() const { return ContainedTys; }
|
||||||
@@ -327,7 +325,6 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/// ArrayType - Class to represent array types.
|
/// ArrayType - Class to represent array types.
|
||||||
///
|
///
|
||||||
class ArrayType : public SequentialType {
|
class ArrayType : public SequentialType {
|
||||||
@@ -336,6 +333,7 @@ class ArrayType : public SequentialType {
|
|||||||
ArrayType(const ArrayType &) = delete;
|
ArrayType(const ArrayType &) = delete;
|
||||||
const ArrayType &operator=(const ArrayType &) = delete;
|
const ArrayType &operator=(const ArrayType &) = delete;
|
||||||
ArrayType(Type *ElType, uint64_t NumEl);
|
ArrayType(Type *ElType, uint64_t NumEl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// ArrayType::get - This static method is the primary way to construct an
|
/// ArrayType::get - This static method is the primary way to construct an
|
||||||
/// ArrayType
|
/// ArrayType
|
||||||
@@ -362,6 +360,7 @@ class VectorType : public SequentialType {
|
|||||||
VectorType(const VectorType &) = delete;
|
VectorType(const VectorType &) = delete;
|
||||||
const VectorType &operator=(const VectorType &) = delete;
|
const VectorType &operator=(const VectorType &) = delete;
|
||||||
VectorType(Type *ElType, unsigned NumEl);
|
VectorType(Type *ElType, unsigned NumEl);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// VectorType::get - This static method is the primary way to construct an
|
/// VectorType::get - This static method is the primary way to construct an
|
||||||
/// VectorType.
|
/// VectorType.
|
||||||
@@ -440,13 +439,13 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/// PointerType - Class to represent pointers.
|
/// PointerType - Class to represent pointers.
|
||||||
///
|
///
|
||||||
class PointerType : public SequentialType {
|
class PointerType : public SequentialType {
|
||||||
PointerType(const PointerType &) = delete;
|
PointerType(const PointerType &) = delete;
|
||||||
const PointerType &operator=(const PointerType &) = delete;
|
const PointerType &operator=(const PointerType &) = delete;
|
||||||
explicit PointerType(Type *ElType, unsigned AddrSpace);
|
explicit PointerType(Type *ElType, unsigned AddrSpace);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// PointerType::get - This constructs a pointer to an object of the specified
|
/// PointerType::get - This constructs a pointer to an object of the specified
|
||||||
/// type in a numbered address space.
|
/// type in a numbered address space.
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ template<> struct ilist_traits<Argument>
|
|||||||
static void noteHead(Argument*, Argument*) {}
|
static void noteHead(Argument*, Argument*) {}
|
||||||
|
|
||||||
static ValueSymbolTable *getSymTab(Function *ItemParent);
|
static ValueSymbolTable *getSymTab(Function *ItemParent);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mutable ilist_half_node<Argument> Sentinel;
|
mutable ilist_half_node<Argument> Sentinel;
|
||||||
};
|
};
|
||||||
@@ -424,7 +425,6 @@ public:
|
|||||||
///
|
///
|
||||||
void eraseFromParent() override;
|
void eraseFromParent() override;
|
||||||
|
|
||||||
|
|
||||||
/// Get the underlying elements of the Function... the basic block list is
|
/// Get the underlying elements of the Function... the basic block list is
|
||||||
/// empty for external functions.
|
/// empty for external functions.
|
||||||
///
|
///
|
||||||
@@ -457,7 +457,6 @@ public:
|
|||||||
inline ValueSymbolTable &getValueSymbolTable() { return *SymTab; }
|
inline ValueSymbolTable &getValueSymbolTable() { return *SymTab; }
|
||||||
inline const ValueSymbolTable &getValueSymbolTable() const { return *SymTab; }
|
inline const ValueSymbolTable &getValueSymbolTable() const { return *SymTab; }
|
||||||
|
|
||||||
|
|
||||||
//===--------------------------------------------------------------------===//
|
//===--------------------------------------------------------------------===//
|
||||||
// BasicBlock iterator forwarding functions
|
// BasicBlock iterator forwarding functions
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ protected:
|
|||||||
/// \brief Common base class shared among various IRBuilders.
|
/// \brief Common base class shared among various IRBuilders.
|
||||||
class IRBuilderBase {
|
class IRBuilderBase {
|
||||||
DebugLoc CurDbgLocation;
|
DebugLoc CurDbgLocation;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
BasicBlock *BB;
|
BasicBlock *BB;
|
||||||
BasicBlock::iterator InsertPt;
|
BasicBlock::iterator InsertPt;
|
||||||
@@ -59,8 +60,8 @@ protected:
|
|||||||
|
|
||||||
MDNode *DefaultFPMathTag;
|
MDNode *DefaultFPMathTag;
|
||||||
FastMathFlags FMF;
|
FastMathFlags FMF;
|
||||||
public:
|
|
||||||
|
|
||||||
|
public:
|
||||||
IRBuilderBase(LLVMContext &context, MDNode *FPMathTag = nullptr)
|
IRBuilderBase(LLVMContext &context, MDNode *FPMathTag = nullptr)
|
||||||
: Context(context), DefaultFPMathTag(FPMathTag), FMF() {
|
: Context(context), DefaultFPMathTag(FPMathTag), FMF() {
|
||||||
ClearInsertionPoint();
|
ClearInsertionPoint();
|
||||||
@@ -515,6 +516,7 @@ template<bool preserveNames = true, typename T = ConstantFolder,
|
|||||||
typename Inserter = IRBuilderDefaultInserter<preserveNames> >
|
typename Inserter = IRBuilderDefaultInserter<preserveNames> >
|
||||||
class IRBuilder : public IRBuilderBase, public Inserter {
|
class IRBuilder : public IRBuilderBase, public Inserter {
|
||||||
T Folder;
|
T Folder;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IRBuilder(LLVMContext &C, const T &F, Inserter I = Inserter(),
|
IRBuilder(LLVMContext &C, const T &F, Inserter I = Inserter(),
|
||||||
MDNode *FPMathTag = nullptr)
|
MDNode *FPMathTag = nullptr)
|
||||||
@@ -737,6 +739,7 @@ private:
|
|||||||
I->setFastMathFlags(FMF);
|
I->setFastMathFlags(FMF);
|
||||||
return I;
|
return I;
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Value *CreateAdd(Value *LHS, Value *RHS, const Twine &Name = "",
|
Value *CreateAdd(Value *LHS, Value *RHS, const Twine &Name = "",
|
||||||
bool HasNUW = false, bool HasNSW = false) {
|
bool HasNUW = false, bool HasNSW = false) {
|
||||||
@@ -1372,11 +1375,13 @@ public:
|
|||||||
|
|
||||||
return CreateBitCast(V, DestTy, Name);
|
return CreateBitCast(V, DestTy, Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// \brief Provided to resolve 'CreateIntCast(Ptr, Ptr, "...")', giving a
|
// \brief Provided to resolve 'CreateIntCast(Ptr, Ptr, "...")', giving a
|
||||||
// compile time error, instead of converting the string to bool for the
|
// compile time error, instead of converting the string to bool for the
|
||||||
// isSigned parameter.
|
// isSigned parameter.
|
||||||
Value *CreateIntCast(Value *, Type *, const char *) = delete;
|
Value *CreateIntCast(Value *, Type *, const char *) = delete;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Value *CreateFPCast(Value *V, Type *DestTy, const Twine &Name = "") {
|
Value *CreateFPCast(Value *V, Type *DestTy, const Twine &Name = "") {
|
||||||
if (V->getType() == DestTy)
|
if (V->getType() == DestTy)
|
||||||
@@ -1740,7 +1745,6 @@ public:
|
|||||||
|
|
||||||
// Create wrappers for C Binding types (see CBindingWrapping.h).
|
// Create wrappers for C Binding types (see CBindingWrapping.h).
|
||||||
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(IRBuilder<>, LLVMBuilderRef)
|
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(IRBuilder<>, LLVMBuilderRef)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ private:
|
|||||||
/// When the ConstantUniqueMap merges two types and makes two InlineAsms
|
/// When the ConstantUniqueMap merges two types and makes two InlineAsms
|
||||||
/// identical, it destroys one of them with this method.
|
/// identical, it destroys one of them with this method.
|
||||||
void destroyConstant();
|
void destroyConstant();
|
||||||
public:
|
|
||||||
|
|
||||||
|
public:
|
||||||
/// InlineAsm::get - Return the specified uniqued inline asm string.
|
/// InlineAsm::get - Return the specified uniqued inline asm string.
|
||||||
///
|
///
|
||||||
static InlineAsm *get(FunctionType *Ty, StringRef AsmString,
|
static InlineAsm *get(FunctionType *Ty, StringRef AsmString,
|
||||||
@@ -187,7 +187,6 @@ public:
|
|||||||
return V->getValueID() == Value::InlineAsmVal;
|
return V->getValueID() == Value::InlineAsmVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// These are helper methods for dealing with flags in the INLINEASM SDNode
|
// These are helper methods for dealing with flags in the INLINEASM SDNode
|
||||||
// in the backend.
|
// in the backend.
|
||||||
//
|
//
|
||||||
@@ -356,7 +355,6 @@ public:
|
|||||||
RC = High - 1;
|
RC = High - 1;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
|||||||
@@ -51,8 +51,8 @@ protected:
|
|||||||
virtual BasicBlock *getSuccessorV(unsigned idx) const = 0;
|
virtual BasicBlock *getSuccessorV(unsigned idx) const = 0;
|
||||||
virtual unsigned getNumSuccessorsV() const = 0;
|
virtual unsigned getNumSuccessorsV() const = 0;
|
||||||
virtual void setSuccessorV(unsigned idx, BasicBlock *B) = 0;
|
virtual void setSuccessorV(unsigned idx, BasicBlock *B) = 0;
|
||||||
public:
|
|
||||||
|
|
||||||
|
public:
|
||||||
/// Return the number of successors that this terminator has.
|
/// Return the number of successors that this terminator has.
|
||||||
unsigned getNumSuccessors() const {
|
unsigned getNumSuccessors() const {
|
||||||
return getNumSuccessorsV();
|
return getNumSuccessorsV();
|
||||||
@@ -271,7 +271,6 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// UnaryInstruction Class
|
// UnaryInstruction Class
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@@ -289,6 +288,7 @@ protected:
|
|||||||
: Instruction(Ty, iType, &Op<0>(), 1, IAE) {
|
: Instruction(Ty, iType, &Op<0>(), 1, IAE) {
|
||||||
Op<0>() = V;
|
Op<0>() = V;
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// allocate space for exactly one operand
|
// allocate space for exactly one operand
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t s) {
|
||||||
@@ -327,6 +327,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(UnaryInstruction, Value)
|
|||||||
|
|
||||||
class BinaryOperator : public Instruction {
|
class BinaryOperator : public Instruction {
|
||||||
void *operator new(size_t, unsigned) = delete;
|
void *operator new(size_t, unsigned) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void init(BinaryOps iType);
|
void init(BinaryOps iType);
|
||||||
BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty,
|
BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty,
|
||||||
@@ -582,6 +583,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(BinaryOperator, Value)
|
|||||||
/// @brief Base class of casting instructions.
|
/// @brief Base class of casting instructions.
|
||||||
class CastInst : public UnaryInstruction {
|
class CastInst : public UnaryInstruction {
|
||||||
void anchor() override;
|
void anchor() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// @brief Constructor with insert-before-instruction semantics for subclasses
|
/// @brief Constructor with insert-before-instruction semantics for subclasses
|
||||||
CastInst(Type *Ty, unsigned iType, Value *S,
|
CastInst(Type *Ty, unsigned iType, Value *S,
|
||||||
@@ -595,6 +597,7 @@ protected:
|
|||||||
: UnaryInstruction(Ty, iType, S, InsertAtEnd) {
|
: UnaryInstruction(Ty, iType, S, InsertAtEnd) {
|
||||||
setName(NameStr);
|
setName(NameStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// Provides a way to construct any of the CastInst subclasses using an
|
/// Provides a way to construct any of the CastInst subclasses using an
|
||||||
/// opcode instead of the subclass's constructor. The opcode must be in the
|
/// opcode instead of the subclass's constructor. The opcode must be in the
|
||||||
@@ -873,6 +876,7 @@ public:
|
|||||||
class CmpInst : public Instruction {
|
class CmpInst : public Instruction {
|
||||||
void *operator new(size_t, unsigned) = delete;
|
void *operator new(size_t, unsigned) = delete;
|
||||||
CmpInst() = delete;
|
CmpInst() = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CmpInst(Type *ty, Instruction::OtherOps op, unsigned short pred,
|
CmpInst(Type *ty, Instruction::OtherOps op, unsigned short pred,
|
||||||
Value *LHS, Value *RHS, const Twine &Name = "",
|
Value *LHS, Value *RHS, const Twine &Name = "",
|
||||||
@@ -883,6 +887,7 @@ protected:
|
|||||||
BasicBlock *InsertAtEnd);
|
BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
void anchor() override; // Out of line virtual method.
|
void anchor() override; // Out of line virtual method.
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// This enumeration lists the possible predicates for CmpInst subclasses.
|
/// This enumeration lists the possible predicates for CmpInst subclasses.
|
||||||
/// Values in the range 0-31 are reserved for FCmpInst, while values in the
|
/// Values in the range 0-31 are reserved for FCmpInst, while values in the
|
||||||
@@ -969,7 +974,6 @@ public:
|
|||||||
bool isFPPredicate() const { return isFPPredicate(getPredicate()); }
|
bool isFPPredicate() const { return isFPPredicate(getPredicate()); }
|
||||||
bool isIntPredicate() const { return isIntPredicate(getPredicate()); }
|
bool isIntPredicate() const { return isIntPredicate(getPredicate()); }
|
||||||
|
|
||||||
|
|
||||||
/// For example, EQ -> NE, UGT -> ULE, SLT -> SGE,
|
/// For example, EQ -> NE, UGT -> ULE, SLT -> SGE,
|
||||||
/// OEQ -> UNE, UGT -> OLE, OLT -> UGE, etc.
|
/// OEQ -> UNE, UGT -> OLE, OLT -> UGE, etc.
|
||||||
/// @returns the inverse predicate for the instruction's current predicate.
|
/// @returns the inverse predicate for the instruction's current predicate.
|
||||||
@@ -1076,6 +1080,7 @@ public:
|
|||||||
}
|
}
|
||||||
return Type::getInt1Ty(opnd_type->getContext());
|
return Type::getInt1Ty(opnd_type->getContext());
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Shadow Value::setValueSubclassData with a private forwarding method so that
|
// Shadow Value::setValueSubclassData with a private forwarding method so that
|
||||||
// subclasses cannot accidentally use it.
|
// subclasses cannot accidentally use it.
|
||||||
@@ -1084,7 +1089,6 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// FIXME: these are redundant if CmpInst < BinaryOperator
|
// FIXME: these are redundant if CmpInst < BinaryOperator
|
||||||
template <>
|
template <>
|
||||||
struct OperandTraits<CmpInst> : public FixedNumOperandTraits<CmpInst, 2> {
|
struct OperandTraits<CmpInst> : public FixedNumOperandTraits<CmpInst, 2> {
|
||||||
|
|||||||
@@ -88,7 +88,6 @@
|
|||||||
#define LAST_OTHER_INST(num)
|
#define LAST_OTHER_INST(num)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Terminator Instructions - These instructions are used to terminate a basic
|
// Terminator Instructions - These instructions are used to terminate a basic
|
||||||
// block of the program. Every basic block must end with one of these
|
// block of the program. Every basic block must end with one of these
|
||||||
// instructions for it to be a well formed basic block.
|
// instructions for it to be a well formed basic block.
|
||||||
|
|||||||
@@ -158,6 +158,7 @@ public:
|
|||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Shadow Instruction::setInstructionSubclassData with a private forwarding
|
// Shadow Instruction::setInstructionSubclassData with a private forwarding
|
||||||
// method so that subclasses cannot accidentally use it.
|
// method so that subclasses cannot accidentally use it.
|
||||||
@@ -166,7 +167,6 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// LoadInst Class
|
// LoadInst Class
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@@ -176,6 +176,7 @@ private:
|
|||||||
///
|
///
|
||||||
class LoadInst : public UnaryInstruction {
|
class LoadInst : public UnaryInstruction {
|
||||||
void AssertOK();
|
void AssertOK();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Note: Instruction needs to be a friend here to call cloneImpl.
|
// Note: Instruction needs to be a friend here to call cloneImpl.
|
||||||
friend class Instruction;
|
friend class Instruction;
|
||||||
@@ -290,7 +291,6 @@ public:
|
|||||||
return getPointerOperand()->getType()->getPointerAddressSpace();
|
return getPointerOperand()->getType()->getPointerAddressSpace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const Instruction *I) {
|
static inline bool classof(const Instruction *I) {
|
||||||
return I->getOpcode() == Instruction::Load;
|
return I->getOpcode() == Instruction::Load;
|
||||||
@@ -298,6 +298,7 @@ public:
|
|||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Shadow Instruction::setInstructionSubclassData with a private forwarding
|
// Shadow Instruction::setInstructionSubclassData with a private forwarding
|
||||||
// method so that subclasses cannot accidentally use it.
|
// method so that subclasses cannot accidentally use it.
|
||||||
@@ -306,7 +307,6 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// StoreInst Class
|
// StoreInst Class
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@@ -316,6 +316,7 @@ private:
|
|||||||
class StoreInst : public Instruction {
|
class StoreInst : public Instruction {
|
||||||
void *operator new(size_t, unsigned) = delete;
|
void *operator new(size_t, unsigned) = delete;
|
||||||
void AssertOK();
|
void AssertOK();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Note: Instruction needs to be a friend here to call cloneImpl.
|
// Note: Instruction needs to be a friend here to call cloneImpl.
|
||||||
friend class Instruction;
|
friend class Instruction;
|
||||||
@@ -344,7 +345,6 @@ public:
|
|||||||
SynchronizationScope SynchScope,
|
SynchronizationScope SynchScope,
|
||||||
BasicBlock *InsertAtEnd);
|
BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
|
|
||||||
/// isVolatile - Return true if this is a store to a volatile memory
|
/// isVolatile - Return true if this is a store to a volatile memory
|
||||||
/// location.
|
/// location.
|
||||||
///
|
///
|
||||||
@@ -422,6 +422,7 @@ public:
|
|||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Shadow Instruction::setInstructionSubclassData with a private forwarding
|
// Shadow Instruction::setInstructionSubclassData with a private forwarding
|
||||||
// method so that subclasses cannot accidentally use it.
|
// method so that subclasses cannot accidentally use it.
|
||||||
@@ -445,6 +446,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(StoreInst, Value)
|
|||||||
class FenceInst : public Instruction {
|
class FenceInst : public Instruction {
|
||||||
void *operator new(size_t, unsigned) = delete;
|
void *operator new(size_t, unsigned) = delete;
|
||||||
void Init(AtomicOrdering Ordering, SynchronizationScope SynchScope);
|
void Init(AtomicOrdering Ordering, SynchronizationScope SynchScope);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Note: Instruction needs to be a friend here to call cloneImpl.
|
// Note: Instruction needs to be a friend here to call cloneImpl.
|
||||||
friend class Instruction;
|
friend class Instruction;
|
||||||
@@ -496,6 +498,7 @@ public:
|
|||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Shadow Instruction::setInstructionSubclassData with a private forwarding
|
// Shadow Instruction::setInstructionSubclassData with a private forwarding
|
||||||
// method so that subclasses cannot accidentally use it.
|
// method so that subclasses cannot accidentally use it.
|
||||||
@@ -517,6 +520,7 @@ class AtomicCmpXchgInst : public Instruction {
|
|||||||
void Init(Value *Ptr, Value *Cmp, Value *NewVal,
|
void Init(Value *Ptr, Value *Cmp, Value *NewVal,
|
||||||
AtomicOrdering SuccessOrdering, AtomicOrdering FailureOrdering,
|
AtomicOrdering SuccessOrdering, AtomicOrdering FailureOrdering,
|
||||||
SynchronizationScope SynchScope);
|
SynchronizationScope SynchScope);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Note: Instruction needs to be a friend here to call cloneImpl.
|
// Note: Instruction needs to be a friend here to call cloneImpl.
|
||||||
friend class Instruction;
|
friend class Instruction;
|
||||||
@@ -648,6 +652,7 @@ public:
|
|||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Shadow Instruction::setInstructionSubclassData with a private forwarding
|
// Shadow Instruction::setInstructionSubclassData with a private forwarding
|
||||||
// method so that subclasses cannot accidentally use it.
|
// method so that subclasses cannot accidentally use it.
|
||||||
@@ -673,6 +678,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(AtomicCmpXchgInst, Value)
|
|||||||
///
|
///
|
||||||
class AtomicRMWInst : public Instruction {
|
class AtomicRMWInst : public Instruction {
|
||||||
void *operator new(size_t, unsigned) = delete;
|
void *operator new(size_t, unsigned) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Note: Instruction needs to be a friend here to call cloneImpl.
|
// Note: Instruction needs to be a friend here to call cloneImpl.
|
||||||
friend class Instruction;
|
friend class Instruction;
|
||||||
@@ -795,6 +801,7 @@ public:
|
|||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init(BinOp Operation, Value *Ptr, Value *Val,
|
void Init(BinOp Operation, Value *Ptr, Value *Val,
|
||||||
AtomicOrdering Ordering, SynchronizationScope SynchScope);
|
AtomicOrdering Ordering, SynchronizationScope SynchScope);
|
||||||
@@ -1078,10 +1085,8 @@ GetElementPtrInst::GetElementPtrInst(Type *PointeeType, Value *Ptr,
|
|||||||
init(Ptr, IdxList, NameStr);
|
init(Ptr, IdxList, NameStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(GetElementPtrInst, Value)
|
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(GetElementPtrInst, Value)
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// ICmpInst Class
|
// ICmpInst Class
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@@ -1226,7 +1231,6 @@ public:
|
|||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@@ -1381,6 +1385,7 @@ class CallInst : public Instruction {
|
|||||||
explicit CallInst(Value *F, const Twine &NameStr,
|
explicit CallInst(Value *F, const Twine &NameStr,
|
||||||
Instruction *InsertBefore);
|
Instruction *InsertBefore);
|
||||||
CallInst(Value *F, const Twine &NameStr, BasicBlock *InsertAtEnd);
|
CallInst(Value *F, const Twine &NameStr, BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Note: Instruction needs to be a friend here to call cloneImpl.
|
// Note: Instruction needs to be a friend here to call cloneImpl.
|
||||||
friend class Instruction;
|
friend class Instruction;
|
||||||
@@ -1728,7 +1733,6 @@ CallInst::CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
|
|||||||
init(Ty, Func, Args, NameStr);
|
init(Ty, Func, Args, NameStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Note: if you get compile errors about private methods then
|
// Note: if you get compile errors about private methods then
|
||||||
// please update your code to use the high-level operand
|
// please update your code to use the high-level operand
|
||||||
// interfaces. See line 943 above.
|
// interfaces. See line 943 above.
|
||||||
@@ -1762,6 +1766,7 @@ class SelectInst : public Instruction {
|
|||||||
init(C, S1, S2);
|
init(C, S1, S2);
|
||||||
setName(NameStr);
|
setName(NameStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Note: Instruction needs to be a friend here to call cloneImpl.
|
// Note: Instruction needs to be a friend here to call cloneImpl.
|
||||||
friend class Instruction;
|
friend class Instruction;
|
||||||
@@ -1862,6 +1867,7 @@ class ExtractElementInst : public Instruction {
|
|||||||
Instruction *InsertBefore = nullptr);
|
Instruction *InsertBefore = nullptr);
|
||||||
ExtractElementInst(Value *Vec, Value *Idx, const Twine &NameStr,
|
ExtractElementInst(Value *Vec, Value *Idx, const Twine &NameStr,
|
||||||
BasicBlock *InsertAtEnd);
|
BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Note: Instruction needs to be a friend here to call cloneImpl.
|
// Note: Instruction needs to be a friend here to call cloneImpl.
|
||||||
friend class Instruction;
|
friend class Instruction;
|
||||||
@@ -1892,7 +1898,6 @@ public:
|
|||||||
return cast<VectorType>(getVectorOperand()->getType());
|
return cast<VectorType>(getVectorOperand()->getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Transparently provide more efficient getOperand methods.
|
/// Transparently provide more efficient getOperand methods.
|
||||||
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
||||||
|
|
||||||
@@ -2038,7 +2043,6 @@ public:
|
|||||||
return Mask;
|
return Mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const Instruction *I) {
|
static inline bool classof(const Instruction *I) {
|
||||||
return I->getOpcode() == Instruction::ShuffleVector;
|
return I->getOpcode() == Instruction::ShuffleVector;
|
||||||
@@ -2164,7 +2168,6 @@ ExtractValueInst::ExtractValueInst(Value *Agg,
|
|||||||
init(Idxs, NameStr);
|
init(Idxs, NameStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// InsertValueInst Class
|
// InsertValueInst Class
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@@ -2337,6 +2340,7 @@ class PHINode : public Instruction {
|
|||||||
setName(NameStr);
|
setName(NameStr);
|
||||||
allocHungoffUses(ReservedSpace);
|
allocHungoffUses(ReservedSpace);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// allocHungoffUses - this is more complicated than the generic
|
// allocHungoffUses - this is more complicated than the generic
|
||||||
// User::allocHungoffUses, because we have to allocate Uses for the incoming
|
// User::allocHungoffUses, because we have to allocate Uses for the incoming
|
||||||
@@ -2497,7 +2501,8 @@ public:
|
|||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
private:
|
|
||||||
|
private:
|
||||||
void growOperands();
|
void growOperands();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2524,8 +2529,10 @@ class LandingPadInst : public Instruction {
|
|||||||
/// the number actually in use.
|
/// the number actually in use.
|
||||||
unsigned ReservedSpace;
|
unsigned ReservedSpace;
|
||||||
LandingPadInst(const LandingPadInst &LP);
|
LandingPadInst(const LandingPadInst &LP);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum ClauseType { Catch, Filter };
|
enum ClauseType { Catch, Filter };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void *operator new(size_t, unsigned) = delete;
|
void *operator new(size_t, unsigned) = delete;
|
||||||
// Allocate space for exactly zero operands.
|
// Allocate space for exactly zero operands.
|
||||||
@@ -2636,6 +2643,7 @@ private:
|
|||||||
Instruction *InsertBefore = nullptr);
|
Instruction *InsertBefore = nullptr);
|
||||||
ReturnInst(LLVMContext &C, Value *retVal, BasicBlock *InsertAtEnd);
|
ReturnInst(LLVMContext &C, Value *retVal, BasicBlock *InsertAtEnd);
|
||||||
explicit ReturnInst(LLVMContext &C, BasicBlock *InsertAtEnd);
|
explicit ReturnInst(LLVMContext &C, BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Note: Instruction needs to be a friend here to call cloneImpl.
|
// Note: Instruction needs to be a friend here to call cloneImpl.
|
||||||
friend class Instruction;
|
friend class Instruction;
|
||||||
@@ -2672,7 +2680,8 @@ public:
|
|||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
private:
|
|
||||||
|
private:
|
||||||
BasicBlock *getSuccessorV(unsigned idx) const override;
|
BasicBlock *getSuccessorV(unsigned idx) const override;
|
||||||
unsigned getNumSuccessorsV() const override;
|
unsigned getNumSuccessorsV() const override;
|
||||||
void setSuccessorV(unsigned idx, BasicBlock *B) override;
|
void setSuccessorV(unsigned idx, BasicBlock *B) override;
|
||||||
@@ -2711,6 +2720,7 @@ class BranchInst : public TerminatorInst {
|
|||||||
BranchInst(BasicBlock *IfTrue, BasicBlock *InsertAtEnd);
|
BranchInst(BasicBlock *IfTrue, BasicBlock *InsertAtEnd);
|
||||||
BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
|
BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
|
||||||
BasicBlock *InsertAtEnd);
|
BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Note: Instruction needs to be a friend here to call cloneImpl.
|
// Note: Instruction needs to be a friend here to call cloneImpl.
|
||||||
friend class Instruction;
|
friend class Instruction;
|
||||||
@@ -2775,6 +2785,7 @@ public:
|
|||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BasicBlock *getSuccessorV(unsigned idx) const override;
|
BasicBlock *getSuccessorV(unsigned idx) const override;
|
||||||
unsigned getNumSuccessorsV() const override;
|
unsigned getNumSuccessorsV() const override;
|
||||||
@@ -2821,25 +2832,23 @@ class SwitchInst : public TerminatorInst {
|
|||||||
/// constructor also autoinserts at the end of the specified BasicBlock.
|
/// constructor also autoinserts at the end of the specified BasicBlock.
|
||||||
SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases,
|
SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases,
|
||||||
BasicBlock *InsertAtEnd);
|
BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Note: Instruction needs to be a friend here to call cloneImpl.
|
// Note: Instruction needs to be a friend here to call cloneImpl.
|
||||||
friend class Instruction;
|
friend class Instruction;
|
||||||
SwitchInst *cloneImpl() const;
|
SwitchInst *cloneImpl() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// -2
|
// -2
|
||||||
static const unsigned DefaultPseudoIndex = static_cast<unsigned>(~0L-1);
|
static const unsigned DefaultPseudoIndex = static_cast<unsigned>(~0L-1);
|
||||||
|
|
||||||
template <class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
|
template <class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
|
||||||
class CaseIteratorT {
|
class CaseIteratorT {
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
SwitchInstTy *SI;
|
SwitchInstTy *SI;
|
||||||
unsigned Index;
|
unsigned Index;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef CaseIteratorT<SwitchInstTy, ConstantIntTy, BasicBlockTy> Self;
|
typedef CaseIteratorT<SwitchInstTy, ConstantIntTy, BasicBlockTy> Self;
|
||||||
|
|
||||||
/// Initializes case iterator for given SwitchInst and for given
|
/// Initializes case iterator for given SwitchInst and for given
|
||||||
@@ -3083,6 +3092,7 @@ public:
|
|||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BasicBlock *getSuccessorV(unsigned idx) const override;
|
BasicBlock *getSuccessorV(unsigned idx) const override;
|
||||||
unsigned getNumSuccessorsV() const override;
|
unsigned getNumSuccessorsV() const override;
|
||||||
@@ -3095,7 +3105,6 @@ struct OperandTraits<SwitchInst> : public HungoffOperandTraits<2> {
|
|||||||
|
|
||||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(SwitchInst, Value)
|
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(SwitchInst, Value)
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// IndirectBrInst Class
|
// IndirectBrInst Class
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@@ -3128,6 +3137,7 @@ class IndirectBrInst : public TerminatorInst {
|
|||||||
/// here to make memory allocation more efficient. This constructor also
|
/// here to make memory allocation more efficient. This constructor also
|
||||||
/// autoinserts at the end of the specified BasicBlock.
|
/// autoinserts at the end of the specified BasicBlock.
|
||||||
IndirectBrInst(Value *Address, unsigned NumDests, BasicBlock *InsertAtEnd);
|
IndirectBrInst(Value *Address, unsigned NumDests, BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Note: Instruction needs to be a friend here to call cloneImpl.
|
// Note: Instruction needs to be a friend here to call cloneImpl.
|
||||||
friend class Instruction;
|
friend class Instruction;
|
||||||
@@ -3151,7 +3161,6 @@ public:
|
|||||||
const Value *getAddress() const { return getOperand(0); }
|
const Value *getAddress() const { return getOperand(0); }
|
||||||
void setAddress(Value *V) { setOperand(0, V); }
|
void setAddress(Value *V) { setOperand(0, V); }
|
||||||
|
|
||||||
|
|
||||||
/// getNumDestinations - return the number of possible destinations in this
|
/// getNumDestinations - return the number of possible destinations in this
|
||||||
/// indirectbr instruction.
|
/// indirectbr instruction.
|
||||||
unsigned getNumDestinations() const { return getNumOperands()-1; }
|
unsigned getNumDestinations() const { return getNumOperands()-1; }
|
||||||
@@ -3183,6 +3192,7 @@ public:
|
|||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BasicBlock *getSuccessorV(unsigned idx) const override;
|
BasicBlock *getSuccessorV(unsigned idx) const override;
|
||||||
unsigned getNumSuccessorsV() const override;
|
unsigned getNumSuccessorsV() const override;
|
||||||
@@ -3195,7 +3205,6 @@ struct OperandTraits<IndirectBrInst> : public HungoffOperandTraits<1> {
|
|||||||
|
|
||||||
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(IndirectBrInst, Value)
|
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(IndirectBrInst, Value)
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// InvokeInst Class
|
// InvokeInst Class
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@@ -3238,6 +3247,7 @@ class InvokeInst : public TerminatorInst {
|
|||||||
inline InvokeInst(Value *Func, BasicBlock *IfNormal, BasicBlock *IfException,
|
inline InvokeInst(Value *Func, BasicBlock *IfNormal, BasicBlock *IfException,
|
||||||
ArrayRef<Value *> Args, unsigned Values,
|
ArrayRef<Value *> Args, unsigned Values,
|
||||||
const Twine &NameStr, BasicBlock *InsertAtEnd);
|
const Twine &NameStr, BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Note: Instruction needs to be a friend here to call cloneImpl.
|
// Note: Instruction needs to be a friend here to call cloneImpl.
|
||||||
friend class Instruction;
|
friend class Instruction;
|
||||||
@@ -3557,6 +3567,7 @@ class ResumeInst : public TerminatorInst {
|
|||||||
|
|
||||||
explicit ResumeInst(Value *Exn, Instruction *InsertBefore=nullptr);
|
explicit ResumeInst(Value *Exn, Instruction *InsertBefore=nullptr);
|
||||||
ResumeInst(Value *Exn, BasicBlock *InsertAtEnd);
|
ResumeInst(Value *Exn, BasicBlock *InsertAtEnd);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Note: Instruction needs to be a friend here to call cloneImpl.
|
// Note: Instruction needs to be a friend here to call cloneImpl.
|
||||||
friend class Instruction;
|
friend class Instruction;
|
||||||
@@ -3585,6 +3596,7 @@ public:
|
|||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BasicBlock *getSuccessorV(unsigned idx) const override;
|
BasicBlock *getSuccessorV(unsigned idx) const override;
|
||||||
unsigned getNumSuccessorsV() const override;
|
unsigned getNumSuccessorsV() const override;
|
||||||
@@ -4209,6 +4221,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CleanupReturnInst, Value)
|
|||||||
///
|
///
|
||||||
class UnreachableInst : public TerminatorInst {
|
class UnreachableInst : public TerminatorInst {
|
||||||
void *operator new(size_t, unsigned) = delete;
|
void *operator new(size_t, unsigned) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Note: Instruction needs to be a friend here to call cloneImpl.
|
// Note: Instruction needs to be a friend here to call cloneImpl.
|
||||||
friend class Instruction;
|
friend class Instruction;
|
||||||
@@ -4231,6 +4244,7 @@ public:
|
|||||||
static inline bool classof(const Value *V) {
|
static inline bool classof(const Value *V) {
|
||||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BasicBlock *getSuccessorV(unsigned idx) const override;
|
BasicBlock *getSuccessorV(unsigned idx) const override;
|
||||||
unsigned getNumSuccessorsV() const override;
|
unsigned getNumSuccessorsV() const override;
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ class PassManagerPrettyStackEntry : public PrettyStackTraceEntry {
|
|||||||
Pass *P;
|
Pass *P;
|
||||||
Value *V;
|
Value *V;
|
||||||
Module *M;
|
Module *M;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit PassManagerPrettyStackEntry(Pass *p)
|
explicit PassManagerPrettyStackEntry(Pass *p)
|
||||||
: P(p), V(nullptr), M(nullptr) {} // When P is releaseMemory'd.
|
: P(p), V(nullptr), M(nullptr) {} // When P is releaseMemory'd.
|
||||||
@@ -130,7 +131,6 @@ public:
|
|||||||
void print(raw_ostream &OS) const override;
|
void print(raw_ostream &OS) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// PMStack
|
// PMStack
|
||||||
//
|
//
|
||||||
@@ -158,7 +158,6 @@ private:
|
|||||||
std::vector<PMDataManager *> S;
|
std::vector<PMDataManager *> S;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// PMTopLevelManager
|
// PMTopLevelManager
|
||||||
//
|
//
|
||||||
@@ -228,12 +227,10 @@ public:
|
|||||||
PMStack activeStack;
|
PMStack activeStack;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/// Collection of pass managers
|
/// Collection of pass managers
|
||||||
SmallVector<PMDataManager *, 8> PassManagers;
|
SmallVector<PMDataManager *, 8> PassManagers;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/// Collection of pass managers that are not directly maintained
|
/// Collection of pass managers that are not directly maintained
|
||||||
/// by this pass manager
|
/// by this pass manager
|
||||||
SmallVector<PMDataManager *, 8> IndirectPassManagers;
|
SmallVector<PMDataManager *, 8> IndirectPassManagers;
|
||||||
@@ -262,8 +259,6 @@ private:
|
|||||||
mutable DenseMap<AnalysisID, const PassInfo *> AnalysisPassInfos;
|
mutable DenseMap<AnalysisID, const PassInfo *> AnalysisPassInfos;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// PMDataManager
|
// PMDataManager
|
||||||
|
|
||||||
@@ -271,7 +266,6 @@ private:
|
|||||||
/// used by pass managers.
|
/// used by pass managers.
|
||||||
class PMDataManager {
|
class PMDataManager {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit PMDataManager() : TPM(nullptr), Depth(0) {
|
explicit PMDataManager() : TPM(nullptr), Depth(0) {
|
||||||
initializeAnalysisInfo();
|
initializeAnalysisInfo();
|
||||||
}
|
}
|
||||||
@@ -319,7 +313,6 @@ public:
|
|||||||
// passes that are managed by this manager.
|
// passes that are managed by this manager.
|
||||||
bool preserveHigherLevelAnalysis(Pass *P);
|
bool preserveHigherLevelAnalysis(Pass *P);
|
||||||
|
|
||||||
|
|
||||||
/// Populate UsedPasses with analysis pass that are used or required by pass
|
/// Populate UsedPasses with analysis pass that are used or required by pass
|
||||||
/// P and are available. Populate ReqPassNotAvailable with analysis pass that
|
/// P and are available. Populate ReqPassNotAvailable with analysis pass that
|
||||||
/// are required by pass P but are not available.
|
/// are required by pass P but are not available.
|
||||||
@@ -375,7 +368,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Top level manager.
|
// Top level manager.
|
||||||
PMTopLevelManager *TPM;
|
PMTopLevelManager *TPM;
|
||||||
|
|
||||||
@@ -474,7 +466,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
Timer *getPassTimer(Pass *);
|
Timer *getPassTimer(Pass *);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ template<> struct ilist_traits<NamedMDNode>
|
|||||||
static void noteHead(NamedMDNode*, NamedMDNode*) {}
|
static void noteHead(NamedMDNode*, NamedMDNode*) {}
|
||||||
void addNodeToList(NamedMDNode *) {}
|
void addNodeToList(NamedMDNode *) {}
|
||||||
void removeNodeFromList(NamedMDNode *) {}
|
void removeNodeFromList(NamedMDNode *) {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mutable ilist_node<NamedMDNode> Sentinel;
|
mutable ilist_node<NamedMDNode> Sentinel;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ template <typename Ty> struct ilist_traits;
|
|||||||
template<typename ValueSubClass, typename ItemParentClass>
|
template<typename ValueSubClass, typename ItemParentClass>
|
||||||
class SymbolTableListTraits : public ilist_default_traits<ValueSubClass> {
|
class SymbolTableListTraits : public ilist_default_traits<ValueSubClass> {
|
||||||
typedef ilist_traits<ValueSubClass> TraitsClass;
|
typedef ilist_traits<ValueSubClass> TraitsClass;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SymbolTableListTraits() {}
|
SymbolTableListTraits() {}
|
||||||
|
|
||||||
|
|||||||
@@ -433,7 +433,6 @@ template <> struct isa_impl<PointerType, Type> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Provide specializations of GraphTraits to be able to treat a type as a
|
// Provide specializations of GraphTraits to be able to treat a type as a
|
||||||
// graph of sub types.
|
// graph of sub types.
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ public:
|
|||||||
/// @name Constructors
|
/// @name Constructors
|
||||||
/// @{
|
/// @{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
ValueSymbolTable() : vmap(0), LastUnique(0) {}
|
ValueSymbolTable() : vmap(0), LastUnique(0) {}
|
||||||
~ValueSymbolTable();
|
~ValueSymbolTable();
|
||||||
|
|
||||||
@@ -63,7 +62,6 @@ public:
|
|||||||
/// @name Accessors
|
/// @name Accessors
|
||||||
/// @{
|
/// @{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/// This method finds the value with the given \p Name in the
|
/// This method finds the value with the given \p Name in the
|
||||||
/// the symbol table.
|
/// the symbol table.
|
||||||
/// @returns the value associated with the \p Name
|
/// @returns the value associated with the \p Name
|
||||||
|
|||||||
@@ -1644,7 +1644,6 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
|
|||||||
FirstOp = false;
|
FirstOp = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (unsigned i = StartOp, e = getNumOperands(); i != e; ++i) {
|
for (unsigned i = StartOp, e = getNumOperands(); i != e; ++i) {
|
||||||
const MachineOperand &MO = getOperand(i);
|
const MachineOperand &MO = getOperand(i);
|
||||||
|
|
||||||
|
|||||||
@@ -2305,7 +2305,6 @@ unsigned TargetLowering::AsmOperandInfo::getMatchedOperand() const {
|
|||||||
return atoi(ConstraintCode.c_str());
|
return atoi(ConstraintCode.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// ParseConstraints - Split up the constraint string from the inline
|
/// ParseConstraints - Split up the constraint string from the inline
|
||||||
/// assembly value into the specific constraints and their prefixes,
|
/// assembly value into the specific constraints and their prefixes,
|
||||||
/// and also tie in the associated operand values.
|
/// and also tie in the associated operand values.
|
||||||
@@ -2490,14 +2489,12 @@ TargetLowering::ParseConstraints(const DataLayout &DL,
|
|||||||
" incompatible type!");
|
" incompatible type!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ConstraintOperands;
|
return ConstraintOperands;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// getConstraintGenerality - Return an integer indicating how general CT
|
/// getConstraintGenerality - Return an integer indicating how general CT
|
||||||
/// is.
|
/// is.
|
||||||
static unsigned getConstraintGenerality(TargetLowering::ConstraintType CT) {
|
static unsigned getConstraintGenerality(TargetLowering::ConstraintType CT) {
|
||||||
|
|||||||
@@ -1536,7 +1536,6 @@ TwoAddressInstructionPass::processTiedPairs(MachineInstr *MI,
|
|||||||
SrcRegMap[RegA] = RegB;
|
SrcRegMap[RegA] = RegB;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (AllUsesCopied) {
|
if (AllUsesCopied) {
|
||||||
if (!IsEarlyClobber) {
|
if (!IsEarlyClobber) {
|
||||||
// Replace other (un-tied) uses of regB with LastCopiedReg.
|
// Replace other (un-tied) uses of regB with LastCopiedReg.
|
||||||
|
|||||||
@@ -403,7 +403,6 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(Triple T) {
|
|||||||
EHSectionFlags |= ELF::SHF_WRITE;
|
EHSectionFlags |= ELF::SHF_WRITE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ELF
|
// ELF
|
||||||
BSSSection = Ctx->getELFSection(".bss", ELF::SHT_NOBITS,
|
BSSSection = Ctx->getELFSection(".bss", ELF::SHT_NOBITS,
|
||||||
ELF::SHF_WRITE | ELF::SHF_ALLOC);
|
ELF::SHF_WRITE | ELF::SHF_ALLOC);
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ uint64_t MachObjectWriter::getSymbolAddress(const MCSymbol &S,
|
|||||||
dyn_cast<const MCConstantExpr>(S.getVariableValue()))
|
dyn_cast<const MCConstantExpr>(S.getVariableValue()))
|
||||||
return C->getValue();
|
return C->getValue();
|
||||||
|
|
||||||
|
|
||||||
MCValue Target;
|
MCValue Target;
|
||||||
if (!S.getVariableValue()->evaluateAsRelocatable(Target, &Layout, nullptr))
|
if (!S.getVariableValue()->evaluateAsRelocatable(Target, &Layout, nullptr))
|
||||||
report_fatal_error("unable to evaluate offset for variable '" +
|
report_fatal_error("unable to evaluate offset for variable '" +
|
||||||
|
|||||||
@@ -1386,7 +1386,6 @@ iterator_range<export_iterator> MachOObjectFile::exports() const {
|
|||||||
return exports(getDyldInfoExportsTrie());
|
return exports(getDyldInfoExportsTrie());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MachORebaseEntry::MachORebaseEntry(ArrayRef<uint8_t> Bytes, bool is64Bit)
|
MachORebaseEntry::MachORebaseEntry(ArrayRef<uint8_t> Bytes, bool is64Bit)
|
||||||
: Opcodes(Bytes), Ptr(Bytes.begin()), SegmentOffset(0), SegmentIndex(0),
|
: Opcodes(Bytes), Ptr(Bytes.begin()), SegmentOffset(0), SegmentIndex(0),
|
||||||
RemainingLoopCount(0), AdvanceAmount(0), RebaseType(0),
|
RemainingLoopCount(0), AdvanceAmount(0), RebaseType(0),
|
||||||
@@ -1762,7 +1761,6 @@ int64_t MachOBindEntry::readSLEB128() {
|
|||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32_t MachOBindEntry::segmentIndex() const { return SegmentIndex; }
|
uint32_t MachOBindEntry::segmentIndex() const { return SegmentIndex; }
|
||||||
|
|
||||||
uint64_t MachOBindEntry::segmentOffset() const { return SegmentOffset; }
|
uint64_t MachOBindEntry::segmentOffset() const { return SegmentOffset; }
|
||||||
@@ -2308,4 +2306,3 @@ ObjectFile::createMachOObjectFile(MemoryBufferRef Buffer) {
|
|||||||
return EC;
|
return EC;
|
||||||
return std::move(Ret);
|
return std::move(Ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -162,7 +162,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool classof(const AArch64MCExpr *) { return true; }
|
static bool classof(const AArch64MCExpr *) { return true; }
|
||||||
|
|
||||||
};
|
};
|
||||||
} // end namespace llvm
|
} // end namespace llvm
|
||||||
|
|
||||||
|
|||||||
@@ -499,7 +499,6 @@ void AMDGPUAsmPrinter::EmitAmdKernelCodeT(const MachineFunction &MF,
|
|||||||
header.wavefront_sgpr_count = KernelInfo.NumSGPR;
|
header.wavefront_sgpr_count = KernelInfo.NumSGPR;
|
||||||
header.workitem_vgpr_count = KernelInfo.NumVGPR;
|
header.workitem_vgpr_count = KernelInfo.NumVGPR;
|
||||||
|
|
||||||
|
|
||||||
AMDGPUTargetStreamer *TS =
|
AMDGPUTargetStreamer *TS =
|
||||||
static_cast<AMDGPUTargetStreamer *>(OutStreamer->getTargetStreamer());
|
static_cast<AMDGPUTargetStreamer *>(OutStreamer->getTargetStreamer());
|
||||||
TS->EmitAMDKernelCodeT(header);
|
TS->EmitAMDKernelCodeT(header);
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ class AMDGPUDAGToDAGISel : public SelectionDAGISel {
|
|||||||
// Subtarget - Keep a pointer to the AMDGPU Subtarget around so that we can
|
// Subtarget - Keep a pointer to the AMDGPU Subtarget around so that we can
|
||||||
// make the right decision when generating code for different targets.
|
// make the right decision when generating code for different targets.
|
||||||
const AMDGPUSubtarget *Subtarget;
|
const AMDGPUSubtarget *Subtarget;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AMDGPUDAGToDAGISel(TargetMachine &TM);
|
AMDGPUDAGToDAGISel(TargetMachine &TM);
|
||||||
virtual ~AMDGPUDAGToDAGISel();
|
virtual ~AMDGPUDAGToDAGISel();
|
||||||
@@ -585,7 +586,6 @@ SDNode *AMDGPUDAGToDAGISel::Select(SDNode *N) {
|
|||||||
|
|
||||||
return getS_BFE(Signed ? AMDGPU::S_BFE_I32 : AMDGPU::S_BFE_U32, SDLoc(N),
|
return getS_BFE(Signed ? AMDGPU::S_BFE_I32 : AMDGPU::S_BFE_U32, SDLoc(N),
|
||||||
N->getOperand(0), OffsetVal, WidthVal);
|
N->getOperand(0), OffsetVal, WidthVal);
|
||||||
|
|
||||||
}
|
}
|
||||||
case AMDGPUISD::DIV_SCALE: {
|
case AMDGPUISD::DIV_SCALE: {
|
||||||
return SelectDIV_SCALE(N);
|
return SelectDIV_SCALE(N);
|
||||||
@@ -611,7 +611,6 @@ SDNode *AMDGPUDAGToDAGISel::Select(SDNode *N) {
|
|||||||
return SelectCode(N);
|
return SelectCode(N);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool AMDGPUDAGToDAGISel::checkType(const Value *Ptr, unsigned AS) {
|
bool AMDGPUDAGToDAGISel::checkType(const Value *Ptr, unsigned AS) {
|
||||||
assert(AS != 0 && "Use checkPrivateAddress instead.");
|
assert(AS != 0 && "Use checkPrivateAddress instead.");
|
||||||
if (!Ptr)
|
if (!Ptr)
|
||||||
@@ -1082,7 +1081,6 @@ void AMDGPUDAGToDAGISel::SelectMUBUF(SDValue Addr, SDValue &Ptr,
|
|||||||
VAddr = CurDAG->getTargetConstant(0, DL, MVT::i32);
|
VAddr = CurDAG->getTargetConstant(0, DL, MVT::i32);
|
||||||
Ptr = Addr;
|
Ptr = Addr;
|
||||||
Offset = CurDAG->getTargetConstant(0, DL, MVT::i16);
|
Offset = CurDAG->getTargetConstant(0, DL, MVT::i16);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AMDGPUDAGToDAGISel::SelectMUBUFAddr64(SDValue Addr, SDValue &SRsrc,
|
bool AMDGPUDAGToDAGISel::SelectMUBUFAddr64(SDValue Addr, SDValue &SRsrc,
|
||||||
@@ -1367,7 +1365,6 @@ SDNode *AMDGPUDAGToDAGISel::SelectAddrSpaceCast(SDNode *N) {
|
|||||||
CurDAG->getTargetConstant(AMDGPU::sub0, DL, MVT::i32));
|
CurDAG->getTargetConstant(AMDGPU::sub0, DL, MVT::i32));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (DestSize > SrcSize) {
|
if (DestSize > SrcSize) {
|
||||||
assert(SrcSize == 32 && DestSize == 64);
|
assert(SrcSize == 32 && DestSize == 64);
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ class R600MCCodeEmitter : public AMDGPUMCCodeEmitter {
|
|||||||
const MCRegisterInfo &MRI;
|
const MCRegisterInfo &MRI;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
R600MCCodeEmitter(const MCInstrInfo &mcii, const MCRegisterInfo &mri)
|
R600MCCodeEmitter(const MCInstrInfo &mcii, const MCRegisterInfo &mri)
|
||||||
: MCII(mcii), MRI(mri) { }
|
: MCII(mcii), MRI(mri) { }
|
||||||
|
|
||||||
@@ -50,8 +49,8 @@ public:
|
|||||||
uint64_t getMachineOpValue(const MCInst &MI, const MCOperand &MO,
|
uint64_t getMachineOpValue(const MCInst &MI, const MCOperand &MO,
|
||||||
SmallVectorImpl<MCFixup> &Fixups,
|
SmallVectorImpl<MCFixup> &Fixups,
|
||||||
const MCSubtargetInfo &STI) const override;
|
const MCSubtargetInfo &STI) const override;
|
||||||
private:
|
|
||||||
|
|
||||||
|
private:
|
||||||
void EmitByte(unsigned int byte, raw_ostream &OS) const;
|
void EmitByte(unsigned int byte, raw_ostream &OS) const;
|
||||||
|
|
||||||
void Emit(uint32_t value, raw_ostream &OS) const;
|
void Emit(uint32_t value, raw_ostream &OS) const;
|
||||||
@@ -59,7 +58,6 @@ private:
|
|||||||
|
|
||||||
unsigned getHWRegChan(unsigned reg) const;
|
unsigned getHWRegChan(unsigned reg) const;
|
||||||
unsigned getHWReg(unsigned regNo) const;
|
unsigned getHWReg(unsigned regNo) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End anonymous namespace
|
} // End anonymous namespace
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
|
||||||
#include "SIRegisterInfo.h"
|
#include "SIRegisterInfo.h"
|
||||||
#include "SIInstrInfo.h"
|
#include "SIInstrInfo.h"
|
||||||
#include "SIMachineFunctionInfo.h"
|
#include "SIMachineFunctionInfo.h"
|
||||||
|
|||||||
@@ -232,7 +232,6 @@ void Thumb1FrameLowering::emitPrologue(MachineFunction &MF,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Adjust FP so it point to the stack slot that contains the previous FP.
|
// Adjust FP so it point to the stack slot that contains the previous FP.
|
||||||
if (HasFP) {
|
if (HasFP) {
|
||||||
FramePtrOffsetInBlock += MFI->getObjectOffset(FramePtrSpillFI)
|
FramePtrOffsetInBlock += MFI->getObjectOffset(FramePtrSpillFI)
|
||||||
|
|||||||
@@ -316,7 +316,6 @@ bool PPCAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// lookUpOrCreateTOCEntry -- Given a symbol, look up whether a TOC entry
|
/// lookUpOrCreateTOCEntry -- Given a symbol, look up whether a TOC entry
|
||||||
/// exists for it. If not, create one. Then return a symbol that references
|
/// exists for it. If not, create one. Then return a symbol that references
|
||||||
/// the TOC entry.
|
/// the TOC entry.
|
||||||
@@ -403,7 +402,6 @@ void PPCAsmPrinter::LowerPATCHPOINT(MCStreamer &OutStreamer, StackMaps &SM,
|
|||||||
.addReg(PPC::X1));
|
.addReg(PPC::X1));
|
||||||
++EncodedBytes;
|
++EncodedBytes;
|
||||||
|
|
||||||
|
|
||||||
// If we're on ELFv1, then we need to load the actual function pointer
|
// If we're on ELFv1, then we need to load the actual function pointer
|
||||||
// from the function descriptor.
|
// from the function descriptor.
|
||||||
if (!Subtarget->isELFv2ABI()) {
|
if (!Subtarget->isELFv2ABI()) {
|
||||||
@@ -1131,7 +1129,6 @@ void PPCLinuxAsmPrinter::EmitFunctionEntryLabel() {
|
|||||||
OutStreamer->SwitchSection(Current.first, Current.second);
|
OutStreamer->SwitchSection(Current.first, Current.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool PPCLinuxAsmPrinter::doFinalization(Module &M) {
|
bool PPCLinuxAsmPrinter::doFinalization(Module &M) {
|
||||||
const DataLayout &DL = getDataLayout();
|
const DataLayout &DL = getDataLayout();
|
||||||
|
|
||||||
@@ -1468,7 +1465,6 @@ EmitFunctionStubs(const MachineModuleInfoMachO::SymbolListTy &Stubs) {
|
|||||||
OutStreamer->AddBlankLine();
|
OutStreamer->AddBlankLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool PPCDarwinAsmPrinter::doFinalization(Module &M) {
|
bool PPCDarwinAsmPrinter::doFinalization(Module &M) {
|
||||||
bool isPPC64 = getDataLayout().getPointerSizeInBits() == 64;
|
bool isPPC64 = getDataLayout().getPointerSizeInBits() == 64;
|
||||||
|
|
||||||
|
|||||||
@@ -685,4 +685,3 @@ bool PPCCTRLoopsVerify::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif // NDEBUG
|
#endif // NDEBUG
|
||||||
|
|
||||||
|
|||||||
@@ -1637,7 +1637,6 @@ static bool isIntS16Immediate(SDValue Op, short &Imm) {
|
|||||||
return isIntS16Immediate(Op.getNode(), Imm);
|
return isIntS16Immediate(Op.getNode(), Imm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// SelectAddressRegReg - Given the specified addressed, check to see if it
|
/// SelectAddressRegReg - Given the specified addressed, check to see if it
|
||||||
/// can be represented as an indexed [r+r] operation. Returns false if it
|
/// can be represented as an indexed [r+r] operation. Returns false if it
|
||||||
/// can be more efficiently represented with [r+imm].
|
/// can be more efficiently represented with [r+imm].
|
||||||
@@ -2491,7 +2490,6 @@ SDValue PPCTargetLowering::LowerVASTART(SDValue Op, SelectionDAG &DAG,
|
|||||||
// */
|
// */
|
||||||
// } va_list[1];
|
// } va_list[1];
|
||||||
|
|
||||||
|
|
||||||
SDValue ArgGPR = DAG.getConstant(FuncInfo->getVarArgsNumGPR(), dl, MVT::i32);
|
SDValue ArgGPR = DAG.getConstant(FuncInfo->getVarArgsNumGPR(), dl, MVT::i32);
|
||||||
SDValue ArgFPR = DAG.getConstant(FuncInfo->getVarArgsNumFPR(), dl, MVT::i32);
|
SDValue ArgFPR = DAG.getConstant(FuncInfo->getVarArgsNumFPR(), dl, MVT::i32);
|
||||||
|
|
||||||
@@ -3891,7 +3889,6 @@ struct TailCallArgumentInfo {
|
|||||||
|
|
||||||
TailCallArgumentInfo() : FrameIdx(0) {}
|
TailCallArgumentInfo() : FrameIdx(0) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// StoreTailCallArgumentsToStackSlot - Stores arguments to their stack slot.
|
/// StoreTailCallArgumentsToStackSlot - Stores arguments to their stack slot.
|
||||||
@@ -6757,7 +6754,6 @@ static SDValue BuildIntrinsicOp(unsigned IID, SDValue Op0, SDValue Op1,
|
|||||||
DAG.getConstant(IID, dl, MVT::i32), Op0, Op1, Op2);
|
DAG.getConstant(IID, dl, MVT::i32), Op0, Op1, Op2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// BuildVSLDOI - Return a VECTOR_SHUFFLE that is a vsldoi of the specified
|
/// BuildVSLDOI - Return a VECTOR_SHUFFLE that is a vsldoi of the specified
|
||||||
/// amount. The result has the specified value type.
|
/// amount. The result has the specified value type.
|
||||||
static SDValue BuildVSLDOI(SDValue LHS, SDValue RHS, unsigned Amt,
|
static SDValue BuildVSLDOI(SDValue LHS, SDValue RHS, unsigned Amt,
|
||||||
@@ -6938,7 +6934,6 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
|
|||||||
if (SextVal >= -16 && SextVal <= 15)
|
if (SextVal >= -16 && SextVal <= 15)
|
||||||
return BuildSplatI(SextVal, SplatSize, Op.getValueType(), DAG, dl);
|
return BuildSplatI(SextVal, SplatSize, Op.getValueType(), DAG, dl);
|
||||||
|
|
||||||
|
|
||||||
// Two instruction sequences.
|
// Two instruction sequences.
|
||||||
|
|
||||||
// If this value is in the range [-32,30] and is even, use:
|
// If this value is in the range [-32,30] and is even, use:
|
||||||
@@ -8038,7 +8033,6 @@ void PPCTargetLowering::ReplaceNodeResults(SDNode *N,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Other Lowering Code
|
// Other Lowering Code
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@@ -10944,7 +10938,6 @@ PPCTargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
|
|||||||
return R;
|
return R;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// LowerAsmOperandForConstraint - Lower the specified operand into the Ops
|
/// LowerAsmOperandForConstraint - Lower the specified operand into the Ops
|
||||||
/// vector. If it is invalid, don't add anything to Ops.
|
/// vector. If it is invalid, don't add anything to Ops.
|
||||||
void PPCTargetLowering::LowerAsmOperandForConstraint(SDValue Op,
|
void PPCTargetLowering::LowerAsmOperandForConstraint(SDValue Op,
|
||||||
|
|||||||
@@ -54,10 +54,10 @@ inline static unsigned getCRFromCRBit(unsigned SrcReg) {
|
|||||||
return Reg;
|
return Reg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class PPCRegisterInfo : public PPCGenRegisterInfo {
|
class PPCRegisterInfo : public PPCGenRegisterInfo {
|
||||||
DenseMap<unsigned, unsigned> ImmToIdxMap;
|
DenseMap<unsigned, unsigned> ImmToIdxMap;
|
||||||
const PPCTargetMachine &TM;
|
const PPCTargetMachine &TM;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PPCRegisterInfo(const PPCTargetMachine &TM);
|
PPCRegisterInfo(const PPCTargetMachine &TM);
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ class X86AsmParser : public MCTargetAsmParser {
|
|||||||
const MCInstrInfo &MII;
|
const MCInstrInfo &MII;
|
||||||
ParseInstructionInfo *InstInfo;
|
ParseInstructionInfo *InstInfo;
|
||||||
std::unique_ptr<X86AsmInstrumentation> Instrumentation;
|
std::unique_ptr<X86AsmInstrumentation> Instrumentation;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SMLoc consumeToken() {
|
SMLoc consumeToken() {
|
||||||
MCAsmParser &Parser = getParser();
|
MCAsmParser &Parser = getParser();
|
||||||
@@ -269,6 +270,7 @@ private:
|
|||||||
bool StopOnLBrac, AddImmPrefix;
|
bool StopOnLBrac, AddImmPrefix;
|
||||||
InfixCalculator IC;
|
InfixCalculator IC;
|
||||||
InlineAsmIdentifierInfo Info;
|
InlineAsmIdentifierInfo Info;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IntelExprStateMachine(int64_t imm, bool stoponlbrac, bool addimmprefix) :
|
IntelExprStateMachine(int64_t imm, bool stoponlbrac, bool addimmprefix) :
|
||||||
State(IES_PLUS), PrevState(IES_ERROR), BaseReg(0), IndexReg(0), TmpReg(0),
|
State(IES_PLUS), PrevState(IES_ERROR), BaseReg(0), IndexReg(0), TmpReg(0),
|
||||||
@@ -2185,7 +2187,6 @@ bool X86AsmParser::ParseInstruction(ParseInstructionInfo &Info, StringRef Name,
|
|||||||
Name == "repne" || Name == "repnz" ||
|
Name == "repne" || Name == "repnz" ||
|
||||||
Name == "rex64" || Name == "data16";
|
Name == "rex64" || Name == "data16";
|
||||||
|
|
||||||
|
|
||||||
// This does the actual operand parsing. Don't parse any more if we have a
|
// This does the actual operand parsing. Don't parse any more if we have a
|
||||||
// prefix juxtaposed with an operation like "lock incl 4(%rax)", because we
|
// prefix juxtaposed with an operation like "lock incl 4(%rax)", because we
|
||||||
// just want to parse the "lock" as the first instruction and the "incl" as
|
// just want to parse the "lock" as the first instruction and the "incl" as
|
||||||
|
|||||||
@@ -1279,7 +1279,6 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
|
|||||||
if (Subtarget->hasInt256())
|
if (Subtarget->hasInt256())
|
||||||
setOperationAction(ISD::VSELECT, MVT::v32i8, Legal);
|
setOperationAction(ISD::VSELECT, MVT::v32i8, Legal);
|
||||||
|
|
||||||
|
|
||||||
// Promote v32i8, v16i16, v8i32 select, and, or, xor to v4i64.
|
// Promote v32i8, v16i16, v8i32 select, and, or, xor to v4i64.
|
||||||
for (int i = MVT::v32i8; i != MVT::v4i64; ++i) {
|
for (int i = MVT::v32i8; i != MVT::v4i64; ++i) {
|
||||||
MVT VT = (MVT::SimpleValueType)i;
|
MVT VT = (MVT::SimpleValueType)i;
|
||||||
@@ -1717,7 +1716,6 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
|
|||||||
setOperationAction(ISD::UMULO, VT, Custom);
|
setOperationAction(ISD::UMULO, VT, Custom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!Subtarget->is64Bit()) {
|
if (!Subtarget->is64Bit()) {
|
||||||
// These libcalls are not available in 32-bit.
|
// These libcalls are not available in 32-bit.
|
||||||
setLibcallName(RTLIB::SHL_I128, nullptr);
|
setLibcallName(RTLIB::SHL_I128, nullptr);
|
||||||
@@ -6472,7 +6470,6 @@ static SDValue LowerCONCAT_VECTORS(SDValue Op,
|
|||||||
return LowerAVXCONCAT_VECTORS(Op, DAG);
|
return LowerAVXCONCAT_VECTORS(Op, DAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Vector shuffle lowering
|
// Vector shuffle lowering
|
||||||
//
|
//
|
||||||
@@ -24860,7 +24857,6 @@ static SDValue PerformMLOADCombine(SDNode *N, SelectionDAG &DAG,
|
|||||||
ISD::NON_EXTLOAD);
|
ISD::NON_EXTLOAD);
|
||||||
SDValue NewVec = DAG.getNode(X86ISD::VSEXT, dl, VT, WideLd);
|
SDValue NewVec = DAG.getNode(X86ISD::VSEXT, dl, VT, WideLd);
|
||||||
return DCI.CombineTo(N, NewVec, WideLd.getValue(1), true);
|
return DCI.CombineTo(N, NewVec, WideLd.getValue(1), true);
|
||||||
|
|
||||||
}
|
}
|
||||||
/// PerformMSTORECombine - Resolve truncating stores
|
/// PerformMSTORECombine - Resolve truncating stores
|
||||||
static SDValue PerformMSTORECombine(SDNode *N, SelectionDAG &DAG,
|
static SDValue PerformMSTORECombine(SDNode *N, SelectionDAG &DAG,
|
||||||
|
|||||||
Reference in New Issue
Block a user