diff options
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/ADT/APFloat.h | 8 | ||||
-rw-r--r-- | include/llvm/ADT/APInt.h | 6 | ||||
-rw-r--r-- | include/llvm/CodeGen/FastISel.h | 13 | ||||
-rw-r--r-- | include/llvm/CodeGen/LiveIntervalAnalysis.h | 4 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineModuleInfo.h | 2 | ||||
-rw-r--r-- | include/llvm/CodeGen/ProcessImplicitDefs.h | 4 | ||||
-rw-r--r-- | include/llvm/MC/MCParser/AsmParser.h | 2 | ||||
-rw-r--r-- | include/llvm/Support/COFF.h | 92 | ||||
-rw-r--r-- | include/llvm/Support/Regex.h | 4 | ||||
-rw-r--r-- | include/llvm/Support/StringPool.h | 2 | ||||
-rw-r--r-- | include/llvm/Target/TargetAsmParser.h | 2 | ||||
-rw-r--r-- | include/llvm/Target/TargetInstrInfo.h | 10 | ||||
-rw-r--r-- | include/llvm/Target/TargetOptions.h | 2 | ||||
-rw-r--r-- | include/llvm/Value.h | 4 |
14 files changed, 97 insertions, 58 deletions
diff --git a/include/llvm/ADT/APFloat.h b/include/llvm/ADT/APFloat.h index 3cccc81..dfe4e0f 100644 --- a/include/llvm/ADT/APFloat.h +++ b/include/llvm/ADT/APFloat.h @@ -179,7 +179,7 @@ namespace llvm { // Constructors. APFloat(const fltSemantics &); // Default construct to 0.0 - APFloat(const fltSemantics &, const StringRef &); + APFloat(const fltSemantics &, StringRef); APFloat(const fltSemantics &, integerPart); APFloat(const fltSemantics &, fltCategory, bool negative); APFloat(const fltSemantics &, uninitializedTag); @@ -282,7 +282,7 @@ namespace llvm { bool, roundingMode); opStatus convertFromZeroExtendedInteger(const integerPart *, unsigned int, bool, roundingMode); - opStatus convertFromString(const StringRef&, roundingMode); + opStatus convertFromString(StringRef, roundingMode); APInt bitcastToAPInt() const; double convertToDouble() const; float convertToFloat() const; @@ -386,8 +386,8 @@ namespace llvm { roundingMode, bool *) const; opStatus convertFromUnsignedParts(const integerPart *, unsigned int, roundingMode); - opStatus convertFromHexadecimalString(const StringRef&, roundingMode); - opStatus convertFromDecimalString (const StringRef&, roundingMode); + opStatus convertFromHexadecimalString(StringRef, roundingMode); + opStatus convertFromDecimalString(StringRef, roundingMode); char *convertNormalToHexString(char *, unsigned int, bool, roundingMode) const; opStatus roundSignificandWithExponent(const integerPart *, unsigned int, diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h index ec76fbd..59e023b 100644 --- a/include/llvm/ADT/APInt.h +++ b/include/llvm/ADT/APInt.h @@ -162,7 +162,7 @@ class APInt { /// /// @param radix 2, 8, 10, or 16 /// @brief Convert a char array into an APInt - void fromString(unsigned numBits, const StringRef &str, uint8_t radix); + void fromString(unsigned numBits, StringRef str, uint8_t radix); /// This is used by the toString method to divide by the radix. It simply /// provides a more convenient form of divide for internal use since KnuthDiv @@ -248,7 +248,7 @@ public: /// @param str the string to be interpreted /// @param radix the radix to use for the conversion /// @brief Construct an APInt from a string representation. - APInt(unsigned numBits, const StringRef &str, uint8_t radix); + APInt(unsigned numBits, StringRef str, uint8_t radix); /// Simply makes *this a copy of that. /// @brief Copy Constructor. @@ -1153,7 +1153,7 @@ public: /// This method determines how many bits are required to hold the APInt /// equivalent of the string given by \arg str. /// @brief Get bits required for string value. - static unsigned getBitsNeeded(const StringRef& str, uint8_t radix); + static unsigned getBitsNeeded(StringRef str, uint8_t radix); /// countLeadingZeros - This function is an APInt version of the /// countLeadingZeros_{32,64} functions in MathExtras.h. It counts the number diff --git a/include/llvm/CodeGen/FastISel.h b/include/llvm/CodeGen/FastISel.h index 7f3a7c7..79b1554 100644 --- a/include/llvm/CodeGen/FastISel.h +++ b/include/llvm/CodeGen/FastISel.h @@ -106,12 +106,17 @@ public: /// into the current block. void recomputeInsertPt(); + struct SavePoint { + MachineBasicBlock::iterator InsertPt; + DebugLoc DL; + }; + /// enterLocalValueArea - Prepare InsertPt to begin inserting instructions /// into the local value area and return the old insert position. - MachineBasicBlock::iterator enterLocalValueArea(); + SavePoint enterLocalValueArea(); - /// leaveLocalValueArea - Reset InsertPt to the given old insert position - void leaveLocalValueArea(MachineBasicBlock::iterator OldInsertPt); + /// leaveLocalValueArea - Reset InsertPt to the given old insert position. + void leaveLocalValueArea(SavePoint Old); virtual ~FastISel(); @@ -302,8 +307,6 @@ protected: } private: - bool SelectLoad(const User *I); - bool SelectBinaryOp(const User *I, unsigned ISDOpcode); bool SelectFNeg(const User *I); diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h index 5a0d81b..c136048 100644 --- a/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h @@ -272,10 +272,6 @@ namespace llvm { unsigned getNumConflictsWithPhysReg(const LiveInterval &li, unsigned PhysReg) const; - /// processImplicitDefs - Process IMPLICIT_DEF instructions. Add isUndef - /// marker to implicit_def defs and their uses. - void processImplicitDefs(); - /// intervalIsInOneMBB - Returns true if the specified interval is entirely /// within a single basic block. bool intervalIsInOneMBB(const LiveInterval &li) const; diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h index 84aef10..50e38b4 100644 --- a/include/llvm/CodeGen/MachineModuleInfo.h +++ b/include/llvm/CodeGen/MachineModuleInfo.h @@ -344,7 +344,7 @@ public: VariableDbgInfo.push_back(std::make_pair(N, std::make_pair(Slot, Loc))); } - VariableDbgInfoMapTy &getVariableDbgInfo() { return VariableDbgInfo; } + VariableDbgInfoMapTy &getVariableDbgInfo(); }; // End class MachineModuleInfo diff --git a/include/llvm/CodeGen/ProcessImplicitDefs.h b/include/llvm/CodeGen/ProcessImplicitDefs.h index cec867f..30477b9 100644 --- a/include/llvm/CodeGen/ProcessImplicitDefs.h +++ b/include/llvm/CodeGen/ProcessImplicitDefs.h @@ -12,6 +12,7 @@ #define LLVM_CODEGEN_PROCESSIMPLICITDEFS_H #include "llvm/CodeGen/MachineFunctionPass.h" +#include "llvm/ADT/SmallSet.h" namespace llvm { @@ -24,7 +25,8 @@ namespace llvm { private: bool CanTurnIntoImplicitDef(MachineInstr *MI, unsigned Reg, - unsigned OpIdx, const TargetInstrInfo *tii_); + unsigned OpIdx, const TargetInstrInfo *tii_, + SmallSet<unsigned, 8> &ImpDefRegs); public: static char ID; diff --git a/include/llvm/MC/MCParser/AsmParser.h b/include/llvm/MC/MCParser/AsmParser.h index 82b120b..0e8570a 100644 --- a/include/llvm/MC/MCParser/AsmParser.h +++ b/include/llvm/MC/MCParser/AsmParser.h @@ -107,7 +107,7 @@ private: void EatToEndOfStatement(); - bool ParseAssignment(const StringRef &Name); + bool ParseAssignment(StringRef Name); bool ParsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc); bool ParseBinOpRHS(unsigned Precedence, const MCExpr *&Res, SMLoc &EndLoc); diff --git a/include/llvm/Support/COFF.h b/include/llvm/Support/COFF.h index 2d4e054..69137bf 100644 --- a/include/llvm/Support/COFF.h +++ b/include/llvm/Support/COFF.h @@ -10,12 +10,12 @@ // This file contains an definitions used in Windows COFF Files. // // Structures and enums defined within this file where created using -// information from Microsofts publicly available PE/COFF format document: +// information from Microsoft's publicly available PE/COFF format document: // // Microsoft Portable Executable and Common Object File Format Specification // Revision 8.1 - February 15, 2008 // -// As of 5/2/2010, hosted by microsoft at: +// As of 5/2/2010, hosted by Microsoft at: // http://www.microsoft.com/whdc/system/platform/firmware/pecoff.mspx // //===----------------------------------------------------------------------===// @@ -57,7 +57,7 @@ namespace COFF { uint8_t NumberOfAuxSymbols; }; - enum symbol_flags { + enum SymbolFlags { SF_TypeMask = 0x0000FFFF, SF_TypeShift = 0, @@ -67,36 +67,70 @@ namespace COFF { SF_WeakReference = 0x01000000 }; - enum symbol_storage_class { - IMAGE_SYM_CLASS_END_OF_FUNCTION = -1, - IMAGE_SYM_CLASS_NULL = 0, - IMAGE_SYM_CLASS_AUTOMATIC = 1, - IMAGE_SYM_CLASS_EXTERNAL = 2, - IMAGE_SYM_CLASS_STATIC = 3, - IMAGE_SYM_CLASS_REGISTER = 4, - IMAGE_SYM_CLASS_EXTERNAL_DEF = 5, - IMAGE_SYM_CLASS_LABEL = 6, - IMAGE_SYM_CLASS_UNDEFINED_LABEL = 7, - IMAGE_SYM_CLASS_MEMBER_OF_STRUCT = 8, - IMAGE_SYM_CLASS_ARGUMENT = 9, - IMAGE_SYM_CLASS_STRUCT_TAG = 10, - IMAGE_SYM_CLASS_MEMBER_OF_UNION = 11, - IMAGE_SYM_CLASS_UNION_TAG = 12, - IMAGE_SYM_CLASS_TYPE_DEFINITION = 13, - IMAGE_SYM_CLASS_UNDEFINED_STATIC = 14, - IMAGE_SYM_CLASS_ENUM_TAG = 15, - IMAGE_SYM_CLASS_MEMBER_OF_ENUM = 16, - IMAGE_SYM_CLASS_REGISTER_PARAM = 17, - IMAGE_SYM_CLASS_BIT_FIELD = 18, + /// Storage class tells where and what the symbol represents + enum SymbolStorageClass { + IMAGE_SYM_CLASS_END_OF_FUNCTION = -1, ///< Physical end of function + IMAGE_SYM_CLASS_NULL = 0, ///< No symbol + IMAGE_SYM_CLASS_AUTOMATIC = 1, ///< Stack variable + IMAGE_SYM_CLASS_EXTERNAL = 2, ///< External symbol + IMAGE_SYM_CLASS_STATIC = 3, ///< Static + IMAGE_SYM_CLASS_REGISTER = 4, ///< Register variable + IMAGE_SYM_CLASS_EXTERNAL_DEF = 5, ///< External definition + IMAGE_SYM_CLASS_LABEL = 6, ///< Label + IMAGE_SYM_CLASS_UNDEFINED_LABEL = 7, ///< Undefined label + IMAGE_SYM_CLASS_MEMBER_OF_STRUCT = 8, ///< Member of structure + IMAGE_SYM_CLASS_ARGUMENT = 9, ///< Function argument + IMAGE_SYM_CLASS_STRUCT_TAG = 10, ///< Structure tag + IMAGE_SYM_CLASS_MEMBER_OF_UNION = 11, ///< Member of union + IMAGE_SYM_CLASS_UNION_TAG = 12, ///< Union tag + IMAGE_SYM_CLASS_TYPE_DEFINITION = 13, ///< Type definition + IMAGE_SYM_CLASS_UNDEFINED_STATIC = 14, ///< Undefined static + IMAGE_SYM_CLASS_ENUM_TAG = 15, ///< Enumeration tag + IMAGE_SYM_CLASS_MEMBER_OF_ENUM = 16, ///< Member of enumeration + IMAGE_SYM_CLASS_REGISTER_PARAM = 17, ///< Register parameter + IMAGE_SYM_CLASS_BIT_FIELD = 18, ///< Bit field + /// ".bb" or ".eb" - beginning or end of block IMAGE_SYM_CLASS_BLOCK = 100, + /// ".bf" or ".ef" - beginning or end of function IMAGE_SYM_CLASS_FUNCTION = 101, - IMAGE_SYM_CLASS_END_OF_STRUCT = 102, - IMAGE_SYM_CLASS_FILE = 103, + IMAGE_SYM_CLASS_END_OF_STRUCT = 102, ///< End of structure + IMAGE_SYM_CLASS_FILE = 103, ///< File name + /// Line number, reformatted as symbol IMAGE_SYM_CLASS_SECTION = 104, - IMAGE_SYM_CLASS_WEAK_EXTERNAL = 105, + IMAGE_SYM_CLASS_WEAK_EXTERNAL = 105, ///< Duplicate tag + /// External symbol in dmert public lib IMAGE_SYM_CLASS_CLR_TOKEN = 107 }; + enum SymbolBaseType { + IMAGE_SYM_TYPE_NULL = 0, ///< No type information or unknown base type. + IMAGE_SYM_TYPE_VOID = 1, ///< Used with void pointers and functions. + IMAGE_SYM_TYPE_CHAR = 2, ///< A character (signed byte). + IMAGE_SYM_TYPE_SHORT = 3, ///< A 2-byte signed integer. + IMAGE_SYM_TYPE_INT = 4, ///< A natural integer type on the target. + IMAGE_SYM_TYPE_LONG = 5, ///< A 4-byte signed integer. + IMAGE_SYM_TYPE_FLOAT = 6, ///< A 4-byte floating-point number. + IMAGE_SYM_TYPE_DOUBLE = 7, ///< An 8-byte floating-point number. + IMAGE_SYM_TYPE_STRUCT = 8, ///< A structure. + IMAGE_SYM_TYPE_UNION = 9, ///< An union. + IMAGE_SYM_TYPE_ENUM = 10, ///< An enumerated type. + IMAGE_SYM_TYPE_MOE = 11, ///< A member of enumeration (a specific value). + IMAGE_SYM_TYPE_BYTE = 12, ///< A byte; unsigned 1-byte integer. + IMAGE_SYM_TYPE_WORD = 13, ///< A word; unsigned 2-byte integer. + IMAGE_SYM_TYPE_UINT = 14, ///< An unsigned integer of natural size. + IMAGE_SYM_TYPE_DWORD = 15 ///< An unsigned 4-byte integer. + }; + + enum SymbolComplexType { + IMAGE_SYM_DTYPE_NULL = 0, ///< No complex type; simple scalar variable. + IMAGE_SYM_DTYPE_POINTER = 1, ///< A pointer to base type. + IMAGE_SYM_DTYPE_FUNCTION = 2, ///< A function that returns a base type. + IMAGE_SYM_DTYPE_ARRAY = 3, ///< An array of base type. + + /// Type is formed as (base + (derived << SCT_COMPLEX_TYPE_SHIFT)) + SCT_COMPLEX_TYPE_SHIFT = 4 + }; + struct section { char Name[NameSize]; uint32_t VirtualSize; @@ -110,7 +144,7 @@ namespace COFF { uint32_t Characteristics; }; - enum section_characteristics { + enum SectionCharacteristics { IMAGE_SCN_TYPE_NO_PAD = 0x00000008, IMAGE_SCN_CNT_CODE = 0x00000020, IMAGE_SCN_CNT_INITIALIZED_DATA = 0x00000040, @@ -154,7 +188,7 @@ namespace COFF { uint16_t Type; }; - enum relocation_type_x86 { + enum RelocationTypeX86 { IMAGE_REL_I386_ABSOLUTE = 0x0000, IMAGE_REL_I386_DIR16 = 0x0001, IMAGE_REL_I386_REL16 = 0x0002, diff --git a/include/llvm/Support/Regex.h b/include/llvm/Support/Regex.h index 591af00..ea65ccf 100644 --- a/include/llvm/Support/Regex.h +++ b/include/llvm/Support/Regex.h @@ -36,7 +36,7 @@ namespace llvm { /// Compiles the given POSIX Extended Regular Expression \arg Regex. /// This implementation supports regexes and matching strings with embedded /// NUL characters. - Regex(const StringRef &Regex, unsigned Flags = NoFlags); + Regex(StringRef Regex, unsigned Flags = NoFlags); ~Regex(); /// isValid - returns the error encountered during regex compilation, or @@ -55,7 +55,7 @@ namespace llvm { /// the first group is always the entire pattern. /// /// This returns true on a successful match. - bool match(const StringRef &String, SmallVectorImpl<StringRef> *Matches=0); + bool match(StringRef String, SmallVectorImpl<StringRef> *Matches = 0); /// sub - Return the result of replacing the first match of the regex in /// \arg String with the \arg Repl string. Backreferences like "\0" in the diff --git a/include/llvm/Support/StringPool.h b/include/llvm/Support/StringPool.h index 82e46d4..de05e0b 100644 --- a/include/llvm/Support/StringPool.h +++ b/include/llvm/Support/StringPool.h @@ -64,7 +64,7 @@ namespace llvm { /// intern - Adds a string to the pool and returns a reference-counted /// pointer to it. No additional memory is allocated if the string already /// exists in the pool. - PooledStringPtr intern(const StringRef &Str); + PooledStringPtr intern(StringRef Str); /// empty - Checks whether the pool is empty. Returns true if so. /// diff --git a/include/llvm/Target/TargetAsmParser.h b/include/llvm/Target/TargetAsmParser.h index dc2b236..f431c38 100644 --- a/include/llvm/Target/TargetAsmParser.h +++ b/include/llvm/Target/TargetAsmParser.h @@ -49,7 +49,7 @@ public: /// \param Operands [out] - The list of parsed operands, this returns /// ownership of them to the caller. /// \return True on failure. - virtual bool ParseInstruction(const StringRef &Name, SMLoc NameLoc, + virtual bool ParseInstruction(StringRef Name, SMLoc NameLoc, SmallVectorImpl<MCParsedAsmOperand*> &Operands) = 0; /// ParseDirective - Parse a target specific assembler directive diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h index 6e69914..e42be26 100644 --- a/include/llvm/Target/TargetInstrInfo.h +++ b/include/llvm/Target/TargetInstrInfo.h @@ -371,7 +371,7 @@ public: unsigned SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const { - assert(0 && "Target didn't implement TargetInstrInfo::storeRegToStackSlot!"); + assert(0 && "Target didn't implement TargetInstrInfo::storeRegToStackSlot!"); } /// loadRegFromStackSlot - Load the specified register of the given register @@ -383,7 +383,7 @@ public: unsigned DestReg, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const { - assert(0 && "Target didn't implement TargetInstrInfo::loadRegFromStackSlot!"); + assert(0 && "Target didn't implement TargetInstrInfo::loadRegFromStackSlot!"); } /// spillCalleeSavedRegisters - Issues instruction(s) to spill all callee @@ -392,7 +392,7 @@ public: /// storeRegToStackSlot(). Returns false otherwise. virtual bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, - const std::vector<CalleeSavedInfo> &CSI, + const std::vector<CalleeSavedInfo> &CSI, const TargetRegisterInfo *TRI) const { return false; } @@ -457,7 +457,7 @@ protected: /// take care of adding a MachineMemOperand to the newly created instruction. virtual MachineInstr* foldMemoryOperandImpl(MachineFunction &MF, MachineInstr* MI, - const SmallVectorImpl<unsigned> &Ops, + const SmallVectorImpl<unsigned> &Ops, MachineInstr* LoadMI) const { return 0; } @@ -501,7 +501,7 @@ public: /// only differences between the two addresses are the offset. It also returns /// the offsets by reference. virtual bool areLoadsFromSameBasePtr(SDNode *Load1, SDNode *Load2, - int64_t &Offset1, int64_t &Offset2) const { + int64_t &Offset1, int64_t &Offset2) const { return false; } diff --git a/include/llvm/Target/TargetOptions.h b/include/llvm/Target/TargetOptions.h index a316c70..b369880 100644 --- a/include/llvm/Target/TargetOptions.h +++ b/include/llvm/Target/TargetOptions.h @@ -68,7 +68,7 @@ namespace llvm { /// this flag is off (the default), the code generator is not allowed to /// produce results that are "less precise" than IEEE allows. This includes /// use of X86 instructions like FSIN and FCOS instead of libcalls. - /// UnsafeFPMath implies FiniteOnlyFPMath and LessPreciseFPMAD. + /// UnsafeFPMath implies LessPreciseFPMAD. extern bool UnsafeFPMath; /// FiniteOnlyFPMath - This returns true when the -enable-finite-only-fp-math diff --git a/include/llvm/Value.h b/include/llvm/Value.h index 16b6207..cfb4422 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -266,6 +266,10 @@ public: SubclassOptionalData &= V->SubclassOptionalData; } + /// hasValueHandle - Return true if there is a value handle associated with + /// this value. + bool hasValueHandle() const { return HasValueHandle; } + // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const Value *) { return true; // Values are always values. |