Reformat blank lines.

llvm-svn: 248263
This commit is contained in:
NAKAMURA Takumi 2015-09-22 11:14:39 +00:00
parent 84965031a7
commit a9cb538a74
37 changed files with 155 additions and 178 deletions

View File

@ -27,7 +27,6 @@ class formatted_raw_ostream;
class AssemblyAnnotationWriter {
public:
virtual ~AssemblyAnnotationWriter();
/// emitFunctionAnnot - This may be implemented to emit a string right before

View File

@ -120,9 +120,11 @@ public:
EndAttrKinds ///< Sentinal value useful for loops
};
private:
AttributeImpl *pImpl;
Attribute(AttributeImpl *A) : pImpl(A) {}
public:
Attribute() : pImpl(nullptr) {}
@ -226,6 +228,7 @@ public:
ReturnIndex = 0U,
FunctionIndex = ~0U
};
private:
friend class AttrBuilder;
friend class AttributeSetImpl;
@ -249,8 +252,8 @@ private:
ArrayRef<std::pair<unsigned,
AttributeSetNode*> > Attrs);
explicit AttributeSet(AttributeSetImpl *LI) : pImpl(LI) {}
public:
AttributeSet() : pImpl(nullptr) {}
@ -439,6 +442,7 @@ class AttrBuilder {
uint64_t StackAlignment;
uint64_t DerefBytes;
uint64_t DerefOrNullBytes;
public:
AttrBuilder()
: Attrs(0), Alignment(0), StackAlignment(0), DerefBytes(0),

View File

@ -69,6 +69,7 @@ private:
}
return CallSiteBase();
}
public:
/// isCall - true if a CallInst is enclosed.
/// Note that !isCall() does not mean it is an InvokeInst enclosed,

View File

@ -41,6 +41,7 @@ protected:
explicit IntegerType(LLVMContext &C, unsigned NumBits) : Type(C, IntegerTyID){
setSubclassData(NumBits);
}
public:
/// This enum is just used to hold constants we need for IntegerType.
enum {
@ -90,7 +91,6 @@ public:
}
};
/// FunctionType - Class to represent function types
///
class FunctionType : public Type {
@ -167,7 +167,6 @@ public:
}
};
/// StructType - Class to represent struct types. There are two different kinds
/// of struct types: Literal structs and Identified structs.
///
@ -207,8 +206,8 @@ class StructType : public CompositeType {
/// a identified type that has an empty name.
///
void *SymbolTableEntry;
public:
public:
/// StructType::create - This creates an identified struct.
static StructType *create(LLVMContext &Context, StringRef Name);
static StructType *create(LLVMContext &Context);
@ -270,7 +269,6 @@ public:
/// element type.
static bool isValidElementType(Type *ElemTy);
// Iterator access to the elements.
typedef Type::subtype_iterator element_iterator;
element_iterator element_begin() const { return ContainedTys; }
@ -327,7 +325,6 @@ public:
}
};
/// ArrayType - Class to represent array types.
///
class ArrayType : public SequentialType {
@ -336,6 +333,7 @@ class ArrayType : public SequentialType {
ArrayType(const ArrayType &) = delete;
const ArrayType &operator=(const ArrayType &) = delete;
ArrayType(Type *ElType, uint64_t NumEl);
public:
/// ArrayType::get - This static method is the primary way to construct an
/// ArrayType
@ -362,6 +360,7 @@ class VectorType : public SequentialType {
VectorType(const VectorType &) = delete;
const VectorType &operator=(const VectorType &) = delete;
VectorType(Type *ElType, unsigned NumEl);
public:
/// VectorType::get - This static method is the primary way to construct an
/// VectorType.
@ -440,13 +439,13 @@ public:
}
};
/// PointerType - Class to represent pointers.
///
class PointerType : public SequentialType {
PointerType(const PointerType &) = delete;
const PointerType &operator=(const PointerType &) = delete;
explicit PointerType(Type *ElType, unsigned AddrSpace);
public:
/// PointerType::get - This constructs a pointer to an object of the specified
/// type in a numbered address space.

View File

@ -47,6 +47,7 @@ template<> struct ilist_traits<Argument>
static void noteHead(Argument*, Argument*) {}
static ValueSymbolTable *getSymTab(Function *ItemParent);
private:
mutable ilist_half_node<Argument> Sentinel;
};
@ -424,7 +425,6 @@ public:
///
void eraseFromParent() override;
/// Get the underlying elements of the Function... the basic block list is
/// empty for external functions.
///
@ -457,7 +457,6 @@ public:
inline ValueSymbolTable &getValueSymbolTable() { return *SymTab; }
inline const ValueSymbolTable &getValueSymbolTable() const { return *SymTab; }
//===--------------------------------------------------------------------===//
// BasicBlock iterator forwarding functions
//

View File

@ -52,6 +52,7 @@ protected:
/// \brief Common base class shared among various IRBuilders.
class IRBuilderBase {
DebugLoc CurDbgLocation;
protected:
BasicBlock *BB;
BasicBlock::iterator InsertPt;
@ -59,8 +60,8 @@ protected:
MDNode *DefaultFPMathTag;
FastMathFlags FMF;
public:
public:
IRBuilderBase(LLVMContext &context, MDNode *FPMathTag = nullptr)
: Context(context), DefaultFPMathTag(FPMathTag), FMF() {
ClearInsertionPoint();
@ -515,6 +516,7 @@ template<bool preserveNames = true, typename T = ConstantFolder,
typename Inserter = IRBuilderDefaultInserter<preserveNames> >
class IRBuilder : public IRBuilderBase, public Inserter {
T Folder;
public:
IRBuilder(LLVMContext &C, const T &F, Inserter I = Inserter(),
MDNode *FPMathTag = nullptr)
@ -737,6 +739,7 @@ private:
I->setFastMathFlags(FMF);
return I;
}
public:
Value *CreateAdd(Value *LHS, Value *RHS, const Twine &Name = "",
bool HasNUW = false, bool HasNSW = false) {
@ -1372,11 +1375,13 @@ public:
return CreateBitCast(V, DestTy, Name);
}
private:
// \brief Provided to resolve 'CreateIntCast(Ptr, Ptr, "...")', giving a
// compile time error, instead of converting the string to bool for the
// isSigned parameter.
Value *CreateIntCast(Value *, Type *, const char *) = delete;
public:
Value *CreateFPCast(Value *V, Type *DestTy, const Twine &Name = "") {
if (V->getType() == DestTy)
@ -1740,7 +1745,6 @@ public:
// Create wrappers for C Binding types (see CBindingWrapping.h).
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(IRBuilder<>, LLVMBuilderRef)
}
#endif

View File

@ -57,8 +57,8 @@ private:
/// When the ConstantUniqueMap merges two types and makes two InlineAsms
/// identical, it destroys one of them with this method.
void destroyConstant();
public:
public:
/// InlineAsm::get - Return the specified uniqued inline asm string.
///
static InlineAsm *get(FunctionType *Ty, StringRef AsmString,
@ -187,7 +187,6 @@ public:
return V->getValueID() == Value::InlineAsmVal;
}
// These are helper methods for dealing with flags in the INLINEASM SDNode
// in the backend.
//
@ -356,7 +355,6 @@ public:
RC = High - 1;
return true;
}
};
} // End llvm namespace

View File

@ -51,8 +51,8 @@ protected:
virtual BasicBlock *getSuccessorV(unsigned idx) const = 0;
virtual unsigned getNumSuccessorsV() const = 0;
virtual void setSuccessorV(unsigned idx, BasicBlock *B) = 0;
public:
public:
/// Return the number of successors that this terminator has.
unsigned getNumSuccessors() const {
return getNumSuccessorsV();
@ -271,7 +271,6 @@ public:
}
};
//===----------------------------------------------------------------------===//
// UnaryInstruction Class
//===----------------------------------------------------------------------===//
@ -289,6 +288,7 @@ protected:
: Instruction(Ty, iType, &Op<0>(), 1, IAE) {
Op<0>() = V;
}
public:
// allocate space for exactly one operand
void *operator new(size_t s) {
@ -327,6 +327,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(UnaryInstruction, Value)
class BinaryOperator : public Instruction {
void *operator new(size_t, unsigned) = delete;
protected:
void init(BinaryOps iType);
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.
class CastInst : public UnaryInstruction {
void anchor() override;
protected:
/// @brief Constructor with insert-before-instruction semantics for subclasses
CastInst(Type *Ty, unsigned iType, Value *S,
@ -595,6 +597,7 @@ protected:
: UnaryInstruction(Ty, iType, S, InsertAtEnd) {
setName(NameStr);
}
public:
/// 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
@ -873,6 +876,7 @@ public:
class CmpInst : public Instruction {
void *operator new(size_t, unsigned) = delete;
CmpInst() = delete;
protected:
CmpInst(Type *ty, Instruction::OtherOps op, unsigned short pred,
Value *LHS, Value *RHS, const Twine &Name = "",
@ -883,6 +887,7 @@ protected:
BasicBlock *InsertAtEnd);
void anchor() override; // Out of line virtual method.
public:
/// This enumeration lists the possible predicates for CmpInst subclasses.
/// 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 isIntPredicate() const { return isIntPredicate(getPredicate()); }
/// For example, EQ -> NE, UGT -> ULE, SLT -> SGE,
/// OEQ -> UNE, UGT -> OLE, OLT -> UGE, etc.
/// @returns the inverse predicate for the instruction's current predicate.
@ -1076,6 +1080,7 @@ public:
}
return Type::getInt1Ty(opnd_type->getContext());
}
private:
// Shadow Value::setValueSubclassData with a private forwarding method so that
// subclasses cannot accidentally use it.
@ -1084,7 +1089,6 @@ private:
}
};
// FIXME: these are redundant if CmpInst < BinaryOperator
template <>
struct OperandTraits<CmpInst> : public FixedNumOperandTraits<CmpInst, 2> {

View File

@ -88,7 +88,6 @@
#define LAST_OTHER_INST(num)
#endif
// Terminator Instructions - These instructions are used to terminate a basic
// block of the program. Every basic block must end with one of these
// instructions for it to be a well formed basic block.

View File

@ -158,6 +158,7 @@ public:
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
private:
// Shadow Instruction::setInstructionSubclassData with a private forwarding
// method so that subclasses cannot accidentally use it.
@ -166,7 +167,6 @@ private:
}
};
//===----------------------------------------------------------------------===//
// LoadInst Class
//===----------------------------------------------------------------------===//
@ -176,6 +176,7 @@ private:
///
class LoadInst : public UnaryInstruction {
void AssertOK();
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
@ -290,7 +291,6 @@ public:
return getPointerOperand()->getType()->getPointerAddressSpace();
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::Load;
@ -298,6 +298,7 @@ public:
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
private:
// Shadow Instruction::setInstructionSubclassData with a private forwarding
// method so that subclasses cannot accidentally use it.
@ -306,7 +307,6 @@ private:
}
};
//===----------------------------------------------------------------------===//
// StoreInst Class
//===----------------------------------------------------------------------===//
@ -316,6 +316,7 @@ private:
class StoreInst : public Instruction {
void *operator new(size_t, unsigned) = delete;
void AssertOK();
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
@ -344,7 +345,6 @@ public:
SynchronizationScope SynchScope,
BasicBlock *InsertAtEnd);
/// isVolatile - Return true if this is a store to a volatile memory
/// location.
///
@ -422,6 +422,7 @@ public:
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
private:
// Shadow Instruction::setInstructionSubclassData with a private forwarding
// method so that subclasses cannot accidentally use it.
@ -445,6 +446,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(StoreInst, Value)
class FenceInst : public Instruction {
void *operator new(size_t, unsigned) = delete;
void Init(AtomicOrdering Ordering, SynchronizationScope SynchScope);
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
@ -496,6 +498,7 @@ public:
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
private:
// Shadow Instruction::setInstructionSubclassData with a private forwarding
// method so that subclasses cannot accidentally use it.
@ -517,6 +520,7 @@ class AtomicCmpXchgInst : public Instruction {
void Init(Value *Ptr, Value *Cmp, Value *NewVal,
AtomicOrdering SuccessOrdering, AtomicOrdering FailureOrdering,
SynchronizationScope SynchScope);
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
@ -648,6 +652,7 @@ public:
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
private:
// Shadow Instruction::setInstructionSubclassData with a private forwarding
// method so that subclasses cannot accidentally use it.
@ -673,6 +678,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(AtomicCmpXchgInst, Value)
///
class AtomicRMWInst : public Instruction {
void *operator new(size_t, unsigned) = delete;
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
@ -795,6 +801,7 @@ public:
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
private:
void Init(BinOp Operation, Value *Ptr, Value *Val,
AtomicOrdering Ordering, SynchronizationScope SynchScope);
@ -1078,10 +1085,8 @@ GetElementPtrInst::GetElementPtrInst(Type *PointeeType, Value *Ptr,
init(Ptr, IdxList, NameStr);
}
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(GetElementPtrInst, Value)
//===----------------------------------------------------------------------===//
// ICmpInst Class
//===----------------------------------------------------------------------===//
@ -1226,7 +1231,6 @@ public:
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
//===----------------------------------------------------------------------===//
@ -1381,6 +1385,7 @@ class CallInst : public Instruction {
explicit CallInst(Value *F, const Twine &NameStr,
Instruction *InsertBefore);
CallInst(Value *F, const Twine &NameStr, BasicBlock *InsertAtEnd);
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
@ -1728,7 +1733,6 @@ CallInst::CallInst(FunctionType *Ty, Value *Func, ArrayRef<Value *> Args,
init(Ty, Func, Args, NameStr);
}
// Note: if you get compile errors about private methods then
// please update your code to use the high-level operand
// interfaces. See line 943 above.
@ -1762,6 +1766,7 @@ class SelectInst : public Instruction {
init(C, S1, S2);
setName(NameStr);
}
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
@ -1862,6 +1867,7 @@ class ExtractElementInst : public Instruction {
Instruction *InsertBefore = nullptr);
ExtractElementInst(Value *Vec, Value *Idx, const Twine &NameStr,
BasicBlock *InsertAtEnd);
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
@ -1892,7 +1898,6 @@ public:
return cast<VectorType>(getVectorOperand()->getType());
}
/// Transparently provide more efficient getOperand methods.
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
@ -2038,7 +2043,6 @@ public:
return Mask;
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::ShuffleVector;
@ -2164,7 +2168,6 @@ ExtractValueInst::ExtractValueInst(Value *Agg,
init(Idxs, NameStr);
}
//===----------------------------------------------------------------------===//
// InsertValueInst Class
//===----------------------------------------------------------------------===//
@ -2337,6 +2340,7 @@ class PHINode : public Instruction {
setName(NameStr);
allocHungoffUses(ReservedSpace);
}
protected:
// allocHungoffUses - this is more complicated than the generic
// User::allocHungoffUses, because we have to allocate Uses for the incoming
@ -2497,6 +2501,7 @@ public:
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
private:
void growOperands();
};
@ -2524,8 +2529,10 @@ class LandingPadInst : public Instruction {
/// the number actually in use.
unsigned ReservedSpace;
LandingPadInst(const LandingPadInst &LP);
public:
enum ClauseType { Catch, Filter };
private:
void *operator new(size_t, unsigned) = delete;
// Allocate space for exactly zero operands.
@ -2636,6 +2643,7 @@ private:
Instruction *InsertBefore = nullptr);
ReturnInst(LLVMContext &C, Value *retVal, BasicBlock *InsertAtEnd);
explicit ReturnInst(LLVMContext &C, BasicBlock *InsertAtEnd);
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
@ -2672,6 +2680,7 @@ public:
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
private:
BasicBlock *getSuccessorV(unsigned idx) const override;
unsigned getNumSuccessorsV() const override;
@ -2711,6 +2720,7 @@ class BranchInst : public TerminatorInst {
BranchInst(BasicBlock *IfTrue, BasicBlock *InsertAtEnd);
BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
BasicBlock *InsertAtEnd);
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
@ -2775,6 +2785,7 @@ public:
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
private:
BasicBlock *getSuccessorV(unsigned idx) const override;
unsigned getNumSuccessorsV() const override;
@ -2821,25 +2832,23 @@ class SwitchInst : public TerminatorInst {
/// constructor also autoinserts at the end of the specified BasicBlock.
SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases,
BasicBlock *InsertAtEnd);
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
SwitchInst *cloneImpl() const;
public:
// -2
static const unsigned DefaultPseudoIndex = static_cast<unsigned>(~0L-1);
template <class SwitchInstTy, class ConstantIntTy, class BasicBlockTy>
class CaseIteratorT {
protected:
SwitchInstTy *SI;
unsigned Index;
public:
typedef CaseIteratorT<SwitchInstTy, ConstantIntTy, BasicBlockTy> Self;
/// Initializes case iterator for given SwitchInst and for given
@ -3083,6 +3092,7 @@ public:
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
private:
BasicBlock *getSuccessorV(unsigned idx) const override;
unsigned getNumSuccessorsV() const override;
@ -3095,7 +3105,6 @@ struct OperandTraits<SwitchInst> : public HungoffOperandTraits<2> {
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(SwitchInst, Value)
//===----------------------------------------------------------------------===//
// IndirectBrInst Class
//===----------------------------------------------------------------------===//
@ -3128,6 +3137,7 @@ class IndirectBrInst : public TerminatorInst {
/// here to make memory allocation more efficient. This constructor also
/// autoinserts at the end of the specified BasicBlock.
IndirectBrInst(Value *Address, unsigned NumDests, BasicBlock *InsertAtEnd);
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
@ -3151,7 +3161,6 @@ public:
const Value *getAddress() const { return getOperand(0); }
void setAddress(Value *V) { setOperand(0, V); }
/// getNumDestinations - return the number of possible destinations in this
/// indirectbr instruction.
unsigned getNumDestinations() const { return getNumOperands()-1; }
@ -3183,6 +3192,7 @@ public:
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
private:
BasicBlock *getSuccessorV(unsigned idx) const override;
unsigned getNumSuccessorsV() const override;
@ -3195,7 +3205,6 @@ struct OperandTraits<IndirectBrInst> : public HungoffOperandTraits<1> {
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(IndirectBrInst, Value)
//===----------------------------------------------------------------------===//
// InvokeInst Class
//===----------------------------------------------------------------------===//
@ -3238,6 +3247,7 @@ class InvokeInst : public TerminatorInst {
inline InvokeInst(Value *Func, BasicBlock *IfNormal, BasicBlock *IfException,
ArrayRef<Value *> Args, unsigned Values,
const Twine &NameStr, BasicBlock *InsertAtEnd);
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
@ -3557,6 +3567,7 @@ class ResumeInst : public TerminatorInst {
explicit ResumeInst(Value *Exn, Instruction *InsertBefore=nullptr);
ResumeInst(Value *Exn, BasicBlock *InsertAtEnd);
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
@ -3585,6 +3596,7 @@ public:
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
private:
BasicBlock *getSuccessorV(unsigned idx) const override;
unsigned getNumSuccessorsV() const override;
@ -4209,6 +4221,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CleanupReturnInst, Value)
///
class UnreachableInst : public TerminatorInst {
void *operator new(size_t, unsigned) = delete;
protected:
// Note: Instruction needs to be a friend here to call cloneImpl.
friend class Instruction;
@ -4231,6 +4244,7 @@ public:
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
private:
BasicBlock *getSuccessorV(unsigned idx) const override;
unsigned getNumSuccessorsV() const override;

View File

@ -118,6 +118,7 @@ class PassManagerPrettyStackEntry : public PrettyStackTraceEntry {
Pass *P;
Value *V;
Module *M;
public:
explicit PassManagerPrettyStackEntry(Pass *p)
: P(p), V(nullptr), M(nullptr) {} // When P is releaseMemory'd.
@ -130,7 +131,6 @@ public:
void print(raw_ostream &OS) const override;
};
//===----------------------------------------------------------------------===//
// PMStack
//
@ -158,7 +158,6 @@ private:
std::vector<PMDataManager *> S;
};
//===----------------------------------------------------------------------===//
// PMTopLevelManager
//
@ -228,12 +227,10 @@ public:
PMStack activeStack;
protected:
/// Collection of pass managers
SmallVector<PMDataManager *, 8> PassManagers;
private:
/// Collection of pass managers that are not directly maintained
/// by this pass manager
SmallVector<PMDataManager *, 8> IndirectPassManagers;
@ -262,8 +259,6 @@ private:
mutable DenseMap<AnalysisID, const PassInfo *> AnalysisPassInfos;
};
//===----------------------------------------------------------------------===//
// PMDataManager
@ -271,7 +266,6 @@ private:
/// used by pass managers.
class PMDataManager {
public:
explicit PMDataManager() : TPM(nullptr), Depth(0) {
initializeAnalysisInfo();
}
@ -319,7 +313,6 @@ public:
// passes that are managed by this manager.
bool preserveHigherLevelAnalysis(Pass *P);
/// Populate UsedPasses with analysis pass that are used or required by pass
/// P and are available. Populate ReqPassNotAvailable with analysis pass that
/// are required by pass P but are not available.
@ -375,7 +368,6 @@ public:
}
protected:
// Top level manager.
PMTopLevelManager *TPM;
@ -474,7 +466,6 @@ public:
};
Timer *getPassTimer(Pass *);
}
#endif

View File

@ -100,6 +100,7 @@ template<> struct ilist_traits<NamedMDNode>
static void noteHead(NamedMDNode*, NamedMDNode*) {}
void addNodeToList(NamedMDNode *) {}
void removeNodeFromList(NamedMDNode *) {}
private:
mutable ilist_node<NamedMDNode> Sentinel;
};

View File

@ -40,6 +40,7 @@ template <typename Ty> struct ilist_traits;
template<typename ValueSubClass, typename ItemParentClass>
class SymbolTableListTraits : public ilist_default_traits<ValueSubClass> {
typedef ilist_traits<ValueSubClass> TraitsClass;
public:
SymbolTableListTraits() {}

View File

@ -433,7 +433,6 @@ template <> struct isa_impl<PointerType, Type> {
}
};
//===----------------------------------------------------------------------===//
// Provide specializations of GraphTraits to be able to treat a type as a
// graph of sub types.

View File

@ -55,7 +55,6 @@ public:
/// @name Constructors
/// @{
public:
ValueSymbolTable() : vmap(0), LastUnique(0) {}
~ValueSymbolTable();
@ -63,7 +62,6 @@ public:
/// @name Accessors
/// @{
public:
/// This method finds the value with the given \p Name in the
/// the symbol table.
/// @returns the value associated with the \p Name

View File

@ -1644,7 +1644,6 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
FirstOp = false;
}
for (unsigned i = StartOp, e = getNumOperands(); i != e; ++i) {
const MachineOperand &MO = getOperand(i);

View File

@ -2305,7 +2305,6 @@ unsigned TargetLowering::AsmOperandInfo::getMatchedOperand() const {
return atoi(ConstraintCode.c_str());
}
/// ParseConstraints - Split up the constraint string from the inline
/// assembly value into the specific constraints and their prefixes,
/// and also tie in the associated operand values.
@ -2490,14 +2489,12 @@ TargetLowering::ParseConstraints(const DataLayout &DL,
" incompatible type!");
}
}
}
}
return ConstraintOperands;
}
/// getConstraintGenerality - Return an integer indicating how general CT
/// is.
static unsigned getConstraintGenerality(TargetLowering::ConstraintType CT) {

View File

@ -1536,7 +1536,6 @@ TwoAddressInstructionPass::processTiedPairs(MachineInstr *MI,
SrcRegMap[RegA] = RegB;
}
if (AllUsesCopied) {
if (!IsEarlyClobber) {
// Replace other (un-tied) uses of regB with LastCopiedReg.

View File

@ -403,7 +403,6 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(Triple T) {
EHSectionFlags |= ELF::SHF_WRITE;
}
// ELF
BSSSection = Ctx->getELFSection(".bss", ELF::SHT_NOBITS,
ELF::SHF_WRITE | ELF::SHF_ALLOC);

View File

@ -78,7 +78,6 @@ uint64_t MachObjectWriter::getSymbolAddress(const MCSymbol &S,
dyn_cast<const MCConstantExpr>(S.getVariableValue()))
return C->getValue();
MCValue Target;
if (!S.getVariableValue()->evaluateAsRelocatable(Target, &Layout, nullptr))
report_fatal_error("unable to evaluate offset for variable '" +

View File

@ -1386,7 +1386,6 @@ iterator_range<export_iterator> MachOObjectFile::exports() const {
return exports(getDyldInfoExportsTrie());
}
MachORebaseEntry::MachORebaseEntry(ArrayRef<uint8_t> Bytes, bool is64Bit)
: Opcodes(Bytes), Ptr(Bytes.begin()), SegmentOffset(0), SegmentIndex(0),
RemainingLoopCount(0), AdvanceAmount(0), RebaseType(0),
@ -1762,7 +1761,6 @@ int64_t MachOBindEntry::readSLEB128() {
return Result;
}
uint32_t MachOBindEntry::segmentIndex() const { return SegmentIndex; }
uint64_t MachOBindEntry::segmentOffset() const { return SegmentOffset; }
@ -2308,4 +2306,3 @@ ObjectFile::createMachOObjectFile(MemoryBufferRef Buffer) {
return EC;
return std::move(Ret);
}

View File

@ -162,7 +162,6 @@ public:
}
static bool classof(const AArch64MCExpr *) { return true; }
};
} // end namespace llvm

View File

@ -499,7 +499,6 @@ void AMDGPUAsmPrinter::EmitAmdKernelCodeT(const MachineFunction &MF,
header.wavefront_sgpr_count = KernelInfo.NumSGPR;
header.workitem_vgpr_count = KernelInfo.NumVGPR;
AMDGPUTargetStreamer *TS =
static_cast<AMDGPUTargetStreamer *>(OutStreamer->getTargetStreamer());
TS->EmitAMDKernelCodeT(header);

View File

@ -40,6 +40,7 @@ class AMDGPUDAGToDAGISel : public SelectionDAGISel {
// Subtarget - Keep a pointer to the AMDGPU Subtarget around so that we can
// make the right decision when generating code for different targets.
const AMDGPUSubtarget *Subtarget;
public:
AMDGPUDAGToDAGISel(TargetMachine &TM);
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),
N->getOperand(0), OffsetVal, WidthVal);
}
case AMDGPUISD::DIV_SCALE: {
return SelectDIV_SCALE(N);
@ -611,7 +611,6 @@ SDNode *AMDGPUDAGToDAGISel::Select(SDNode *N) {
return SelectCode(N);
}
bool AMDGPUDAGToDAGISel::checkType(const Value *Ptr, unsigned AS) {
assert(AS != 0 && "Use checkPrivateAddress instead.");
if (!Ptr)
@ -1082,7 +1081,6 @@ void AMDGPUDAGToDAGISel::SelectMUBUF(SDValue Addr, SDValue &Ptr,
VAddr = CurDAG->getTargetConstant(0, DL, MVT::i32);
Ptr = Addr;
Offset = CurDAG->getTargetConstant(0, DL, MVT::i16);
}
bool AMDGPUDAGToDAGISel::SelectMUBUFAddr64(SDValue Addr, SDValue &SRsrc,
@ -1367,7 +1365,6 @@ SDNode *AMDGPUDAGToDAGISel::SelectAddrSpaceCast(SDNode *N) {
CurDAG->getTargetConstant(AMDGPU::sub0, DL, MVT::i32));
}
if (DestSize > SrcSize) {
assert(SrcSize == 32 && DestSize == 64);

View File

@ -37,7 +37,6 @@ class R600MCCodeEmitter : public AMDGPUMCCodeEmitter {
const MCRegisterInfo &MRI;
public:
R600MCCodeEmitter(const MCInstrInfo &mcii, const MCRegisterInfo &mri)
: MCII(mcii), MRI(mri) { }
@ -50,8 +49,8 @@ public:
uint64_t getMachineOpValue(const MCInst &MI, const MCOperand &MO,
SmallVectorImpl<MCFixup> &Fixups,
const MCSubtargetInfo &STI) const override;
private:
private:
void EmitByte(unsigned int byte, raw_ostream &OS) const;
void Emit(uint32_t value, raw_ostream &OS) const;
@ -59,7 +58,6 @@ private:
unsigned getHWRegChan(unsigned reg) const;
unsigned getHWReg(unsigned regNo) const;
};
} // End anonymous namespace

View File

@ -12,7 +12,6 @@
//
//===----------------------------------------------------------------------===//
#include "SIRegisterInfo.h"
#include "SIInstrInfo.h"
#include "SIMachineFunctionInfo.h"

View File

@ -232,7 +232,6 @@ void Thumb1FrameLowering::emitPrologue(MachineFunction &MF,
}
}
// Adjust FP so it point to the stack slot that contains the previous FP.
if (HasFP) {
FramePtrOffsetInBlock += MFI->getObjectOffset(FramePtrSpillFI)

View File

@ -316,7 +316,6 @@ bool PPCAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
return false;
}
/// lookUpOrCreateTOCEntry -- Given a symbol, look up whether a TOC entry
/// exists for it. If not, create one. Then return a symbol that references
/// the TOC entry.
@ -403,7 +402,6 @@ void PPCAsmPrinter::LowerPATCHPOINT(MCStreamer &OutStreamer, StackMaps &SM,
.addReg(PPC::X1));
++EncodedBytes;
// If we're on ELFv1, then we need to load the actual function pointer
// from the function descriptor.
if (!Subtarget->isELFv2ABI()) {
@ -1131,7 +1129,6 @@ void PPCLinuxAsmPrinter::EmitFunctionEntryLabel() {
OutStreamer->SwitchSection(Current.first, Current.second);
}
bool PPCLinuxAsmPrinter::doFinalization(Module &M) {
const DataLayout &DL = getDataLayout();
@ -1468,7 +1465,6 @@ EmitFunctionStubs(const MachineModuleInfoMachO::SymbolListTy &Stubs) {
OutStreamer->AddBlankLine();
}
bool PPCDarwinAsmPrinter::doFinalization(Module &M) {
bool isPPC64 = getDataLayout().getPointerSizeInBits() == 64;

View File

@ -685,4 +685,3 @@ bool PPCCTRLoopsVerify::runOnMachineFunction(MachineFunction &MF) {
return false;
}
#endif // NDEBUG

View File

@ -1637,7 +1637,6 @@ static bool isIntS16Immediate(SDValue Op, short &Imm) {
return isIntS16Immediate(Op.getNode(), Imm);
}
/// 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 more efficiently represented with [r+imm].
@ -2491,7 +2490,6 @@ SDValue PPCTargetLowering::LowerVASTART(SDValue Op, SelectionDAG &DAG,
// */
// } va_list[1];
SDValue ArgGPR = DAG.getConstant(FuncInfo->getVarArgsNumGPR(), dl, MVT::i32);
SDValue ArgFPR = DAG.getConstant(FuncInfo->getVarArgsNumFPR(), dl, MVT::i32);
@ -3891,7 +3889,6 @@ struct TailCallArgumentInfo {
TailCallArgumentInfo() : FrameIdx(0) {}
};
}
/// 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);
}
/// BuildVSLDOI - Return a VECTOR_SHUFFLE that is a vsldoi of the specified
/// amount. The result has the specified value type.
static SDValue BuildVSLDOI(SDValue LHS, SDValue RHS, unsigned Amt,
@ -6938,7 +6934,6 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
if (SextVal >= -16 && SextVal <= 15)
return BuildSplatI(SextVal, SplatSize, Op.getValueType(), DAG, dl);
// Two instruction sequences.
// 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
//===----------------------------------------------------------------------===//
@ -10944,7 +10938,6 @@ PPCTargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
return R;
}
/// LowerAsmOperandForConstraint - Lower the specified operand into the Ops
/// vector. If it is invalid, don't add anything to Ops.
void PPCTargetLowering::LowerAsmOperandForConstraint(SDValue Op,

View File

@ -54,10 +54,10 @@ inline static unsigned getCRFromCRBit(unsigned SrcReg) {
return Reg;
}
class PPCRegisterInfo : public PPCGenRegisterInfo {
DenseMap<unsigned, unsigned> ImmToIdxMap;
const PPCTargetMachine &TM;
public:
PPCRegisterInfo(const PPCTargetMachine &TM);

View File

@ -61,6 +61,7 @@ class X86AsmParser : public MCTargetAsmParser {
const MCInstrInfo &MII;
ParseInstructionInfo *InstInfo;
std::unique_ptr<X86AsmInstrumentation> Instrumentation;
private:
SMLoc consumeToken() {
MCAsmParser &Parser = getParser();
@ -269,6 +270,7 @@ private:
bool StopOnLBrac, AddImmPrefix;
InfixCalculator IC;
InlineAsmIdentifierInfo Info;
public:
IntelExprStateMachine(int64_t imm, bool stoponlbrac, bool addimmprefix) :
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 == "rex64" || Name == "data16";
// 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
// just want to parse the "lock" as the first instruction and the "incl" as

View File

@ -1279,7 +1279,6 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
if (Subtarget->hasInt256())
setOperationAction(ISD::VSELECT, MVT::v32i8, Legal);
// Promote v32i8, v16i16, v8i32 select, and, or, xor to v4i64.
for (int i = MVT::v32i8; i != MVT::v4i64; ++i) {
MVT VT = (MVT::SimpleValueType)i;
@ -1717,7 +1716,6 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
setOperationAction(ISD::UMULO, VT, Custom);
}
if (!Subtarget->is64Bit()) {
// These libcalls are not available in 32-bit.
setLibcallName(RTLIB::SHL_I128, nullptr);
@ -6472,7 +6470,6 @@ static SDValue LowerCONCAT_VECTORS(SDValue Op,
return LowerAVXCONCAT_VECTORS(Op, DAG);
}
//===----------------------------------------------------------------------===//
// Vector shuffle lowering
//
@ -24860,7 +24857,6 @@ static SDValue PerformMLOADCombine(SDNode *N, SelectionDAG &DAG,
ISD::NON_EXTLOAD);
SDValue NewVec = DAG.getNode(X86ISD::VSEXT, dl, VT, WideLd);
return DCI.CombineTo(N, NewVec, WideLd.getValue(1), true);
}
/// PerformMSTORECombine - Resolve truncating stores
static SDValue PerformMSTORECombine(SDNode *N, SelectionDAG &DAG,