From ea61c358720aa6c7a159d51658b34276316aa841 Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Thu, 21 Apr 2005 20:39:54 +0000 Subject: Remove trailing whitespace git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21409 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Bytecode/Analyzer.h | 26 ++--- include/llvm/Bytecode/Archive.h | 126 ++++++++++++------------- include/llvm/Bytecode/BytecodeHandler.h | 68 ++++++------- include/llvm/Bytecode/Format.h | 14 +-- include/llvm/Bytecode/Reader.h | 14 +-- include/llvm/Bytecode/WriteBytecodePass.h | 10 +- include/llvm/Bytecode/Writer.h | 6 +- include/llvm/CodeGen/AsmPrinter.h | 6 +- include/llvm/CodeGen/InstrScheduling.h | 6 +- include/llvm/CodeGen/IntrinsicLowering.h | 10 +- include/llvm/CodeGen/LiveVariables.h | 10 +- include/llvm/CodeGen/MachineBasicBlock.h | 30 +++--- include/llvm/CodeGen/MachineCodeEmitter.h | 8 +- include/llvm/CodeGen/MachineConstantPool.h | 6 +- include/llvm/CodeGen/MachineFrameInfo.h | 10 +- include/llvm/CodeGen/MachineFunction.h | 26 ++--- include/llvm/CodeGen/MachineFunctionPass.h | 4 +- include/llvm/CodeGen/MachineInstr.h | 96 +++++++++---------- include/llvm/CodeGen/MachineInstrBuilder.h | 6 +- include/llvm/CodeGen/MachineRelocation.h | 4 +- include/llvm/CodeGen/Passes.h | 12 +-- include/llvm/CodeGen/SchedGraphCommon.h | 84 ++++++++--------- include/llvm/CodeGen/SelectionDAG.h | 10 +- include/llvm/CodeGen/SelectionDAGISel.h | 8 +- include/llvm/CodeGen/SelectionDAGNodes.h | 36 +++---- include/llvm/CodeGen/ValueSet.h | 6 +- include/llvm/CodeGen/ValueTypes.h | 4 +- include/llvm/Config/alloca.h | 2 +- include/llvm/Debugger/Debugger.h | 4 +- include/llvm/Debugger/InferiorProcess.h | 6 +- include/llvm/Debugger/ProgramInfo.h | 12 +-- include/llvm/Debugger/RuntimeInfo.h | 8 +- include/llvm/Debugger/SourceFile.h | 12 +-- include/llvm/Debugger/SourceLanguage.h | 4 +- include/llvm/ExecutionEngine/ExecutionEngine.h | 6 +- include/llvm/ExecutionEngine/GenericValue.h | 6 +- 36 files changed, 353 insertions(+), 353 deletions(-) diff --git a/include/llvm/Bytecode/Analyzer.h b/include/llvm/Bytecode/Analyzer.h index 325da8cb37..825325dcf9 100644 --- a/include/llvm/Bytecode/Analyzer.h +++ b/include/llvm/Bytecode/Analyzer.h @@ -1,17 +1,17 @@ //===-- llvm/Bytecode/Analyzer.h - Analyzer for Bytecode files --*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // -// This file was developed by Reid Spencer and is distributed under the +// This file was developed by Reid Spencer and is distributed under the // University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This functionality is implemented by the lib/Bytecode/Reader library. // It is used to read VM bytecode files from a file or memory buffer -// and print out a diagnostic analysis of the contents of the file. It is -// intended for three uses: (a) understanding the bytecode format, (b) ensuring -// correctness of bytecode format, (c) statistical analysis of generated +// and print out a diagnostic analysis of the contents of the file. It is +// intended for three uses: (a) understanding the bytecode format, (b) ensuring +// correctness of bytecode format, (c) statistical analysis of generated // bytecode files. // //===----------------------------------------------------------------------===// @@ -30,8 +30,8 @@ namespace llvm { class Function; class Module; -/// This structure is used to contain the output of the Bytecode Analysis -/// library. It simply contains fields to hold each item of the analysis +/// This structure is used to contain the output of the Bytecode Analysis +/// library. It simply contains fields to hold each item of the analysis /// results. /// @brief Bytecode Analysis results structure struct BytecodeAnalysis { @@ -68,7 +68,7 @@ struct BytecodeAnalysis { unsigned vbrCompBytes; ///< Number of vbr bytes (compressed) unsigned vbrExpdBytes; ///< Number of vbr bytes (expanded) - typedef std::map + typedef std::map BlockSizeMap; BlockSizeMap BlockSizes; @@ -91,20 +91,20 @@ struct BytecodeAnalysis { unsigned vbrExpdBytes; ///< Number of vbr bytes (expanded) }; - /// A mapping of function slot numbers to the collected information about + /// A mapping of function slot numbers to the collected information about /// the function. - std::map FunctionInfo; + std::map FunctionInfo; /// The content of the progressive verification std::string VerifyInfo; /// Flags for what should be done - bool detailedResults; ///< If true, FunctionInfo has contents + bool detailedResults; ///< If true, FunctionInfo has contents bool progressiveVerify; ///< If true, VerifyInfo has contents }; /// This function is the main entry point into the bytecode analysis library. It -/// allows you to simply provide a \p filename and storage for the \p Results +/// allows you to simply provide a \p filename and storage for the \p Results /// that will be filled in with the analysis results. /// @brief Analyze contents of a bytecode File Module* AnalyzeBytecodeFile( diff --git a/include/llvm/Bytecode/Archive.h b/include/llvm/Bytecode/Archive.h index 3805d0b249..b81ec3cb0d 100644 --- a/include/llvm/Bytecode/Archive.h +++ b/include/llvm/Bytecode/Archive.h @@ -1,16 +1,16 @@ //===-- llvm/Bytecode/Archive.h - LLVM Bytecode Archive ---------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // -// This file was developed by Reid Spencer and is distributed under the +// This file was developed by Reid Spencer and is distributed under the // University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This header file declares the Archive and ArchiveMember classes that provide // manipulation of LLVM Archive files. The implementation is provided by the -// lib/Bytecode/Archive library. This library is used to read and write -// archive (*.a) files that contain LLVM bytecode files (or others). +// lib/Bytecode/Archive library. This library is used to read and write +// archive (*.a) files that contain LLVM bytecode files (or others). // //===----------------------------------------------------------------------===// @@ -26,7 +26,7 @@ namespace llvm { -// Forward declare classes +// Forward declare classes class ModuleProvider; // From VMCore class Module; // From VMCore class Archive; // Declared below @@ -34,9 +34,9 @@ class ArchiveMemberHeader; // Internal implementation class /// This class is the main class manipulated by users of the Archive class. It /// holds information about one member of the Archive. It is also the element -/// stored by the Archive's ilist, the Archive's main abstraction. Because of -/// the special requirements of archive files, users are not permitted to -/// construct ArchiveMember instances. You should obtain them from the methods +/// stored by the Archive's ilist, the Archive's main abstraction. Because of +/// the special requirements of archive files, users are not permitted to +/// construct ArchiveMember instances. You should obtain them from the methods /// of the Archive class instead. /// @brief This class represents a single archive member. class ArchiveMember { @@ -77,19 +77,19 @@ class ArchiveMember { /// @brief Get the user associated with this archive member. unsigned getUser() const { return info.user; } - /// The "group" is the owning group of the file per Unix security. This - /// may not have any applicability on non-Unix systems but is a required + /// The "group" is the owning group of the file per Unix security. This + /// may not have any applicability on non-Unix systems but is a required /// component of the "ar" file format. /// @brief Get the group associated with this archive member. unsigned getGroup() const { return info.group; } - /// The "mode" specifies the access permissions for the file per Unix + /// The "mode" specifies the access permissions for the file per Unix /// security. This may not have any applicabiity on non-Unix systems but is /// a required component of the "ar" file format. /// @brief Get the permission mode associated with this archive member. unsigned getMode() const { return info.mode; } - /// This method returns the time at which the archive member was last + /// This method returns the time at which the archive member was last /// modified when it was not in the archive. /// @brief Get the time of last modification of the archive member. sys::TimeValue getModTime() const { return info.modTime; } @@ -98,7 +98,7 @@ class ArchiveMember { /// @brief Get the size of the archive member. unsigned getSize() const { return info.fileSize; } - /// This method returns the total size of the archive member as it + /// This method returns the total size of the archive member as it /// appears on disk. This includes the file content, the header, the /// long file name if any, and the padding. /// @brief Get total on-disk member size. @@ -106,7 +106,7 @@ class ArchiveMember { /// This method will return a pointer to the in-memory content of the /// archive member, if it is available. If the data has not been loaded - /// into memory, the return value will be null. + /// into memory, the return value will be null. /// @returns a pointer to the member's data. /// @brief Get the data content of the archive member const void* getData() const { return data; } @@ -147,7 +147,7 @@ class ArchiveMember { bool hasPath() const { return flags&HasPathFlag; } /// Long filenames are an artifact of the ar(1) file format which allows - /// up to sixteen characters in its header and doesn't allow a path + /// up to sixteen characters in its header and doesn't allow a path /// separator character (/). To avoid this, a "long format" member name is /// allowed that doesn't have this restriction. This method determines if /// that "long format" is used for this member. @@ -158,7 +158,7 @@ class ArchiveMember { /// This method returns the status info (like Unix stat(2)) for the archive /// member. The status info provides the file's size, permissions, and /// modification time. The contents of the Path::StatusInfo structure, other - /// than the size and modification time, may not have utility on non-Unix + /// than the size and modification time, may not have utility on non-Unix /// systems. /// @returns the status info for the archive member /// @brief Obtain the status info for the archive member @@ -212,14 +212,14 @@ class ArchiveMember { /// @} }; -/// This class defines the interface to LLVM Archive files. The Archive class -/// presents the archive file as an ilist of ArchiveMember objects. The members +/// This class defines the interface to LLVM Archive files. The Archive class +/// presents the archive file as an ilist of ArchiveMember objects. The members /// can be rearranged in any fashion either by directly editing the ilist or by -/// using editing methods on the Archive class (recommended). The Archive -/// class also provides several ways of accessing the archive file for various +/// using editing methods on the Archive class (recommended). The Archive +/// class also provides several ways of accessing the archive file for various /// purposes such as editing and linking. Full symbol table support is provided -/// for loading only those files that resolve symbols. Note that read -/// performance of this library is _crucial_ for performance of JIT type +/// for loading only those files that resolve symbols. Note that read +/// performance of this library is _crucial_ for performance of JIT type /// applications and the linkers. Consequently, the implementation of the class /// is optimized for reading. class Archive { @@ -273,12 +273,12 @@ class Archive { /// @{ public: /// This method splices a \p src member from an archive (possibly \p this), - /// to a position just before the member given by \p dest in \p this. When + /// to a position just before the member given by \p dest in \p this. When /// the archive is written, \p src will be written in its new location. /// @brief Move a member to a new location inline void splice(iterator dest, Archive& arch, iterator src) { return members.splice(dest,arch.members,src); } - + /// This method erases a \p target member from the archive. When the /// archive is written, it will no longer contain \p target. The associated /// ArchiveMember is deleted. @@ -290,10 +290,10 @@ class Archive { /// @{ public: /// Create an empty archive file and associate it with the \p Filename. This - /// method does not actually create the archive disk file. It creates an + /// method does not actually create the archive disk file. It creates an /// empty Archive object. If the writeToDisk method is called, the archive - /// file \p Filename will be created at that point, with whatever content - /// the returned Archive object has at that time. + /// file \p Filename will be created at that point, with whatever content + /// the returned Archive object has at that time. /// @returns An Archive* that represents the new archive file. /// @brief Create an empty Archive. static Archive* CreateEmpty( @@ -314,15 +314,15 @@ class Archive { /// This method opens an existing archive file from \p Filename and reads in /// its symbol table without reading in any of the archive's members. This /// reduces both I/O and cpu time in opening the archive if it is to be used - /// solely for symbol lookup (e.g. during linking). The \p Filename must + /// solely for symbol lookup (e.g. during linking). The \p Filename must /// exist and be an archive file or an exception will be thrown. This form /// of opening the archive is intended for read-only operations that need to /// locate members via the symbol table for link editing. Since the archve /// members are not read by this method, the archive will appear empty upon - /// return. If editing operations are performed on the archive, they will + /// return. If editing operations are performed on the archive, they will /// completely replace the contents of the archive! It is recommended that /// if this form of opening the archive is used that only the symbol table - /// lookup methods (getSymbolTable, findModuleDefiningSymbol, and + /// lookup methods (getSymbolTable, findModuleDefiningSymbol, and /// findModulesDefiningSymbols) be used. /// @throws std::string if an error occurs opening the file /// @returns an Archive* that represents the archive file. @@ -333,11 +333,11 @@ class Archive { ); /// This destructor cleans up the Archive object, releases all memory, and - /// closes files. It does nothing with the archive file on disk. If you - /// haven't used the writeToDisk method by the time the destructor is + /// closes files. It does nothing with the archive file on disk. If you + /// haven't used the writeToDisk method by the time the destructor is /// called, all changes to the archive will be lost. /// @throws std::string if an error occurs - /// @brief Destruct in-memory archive + /// @brief Destruct in-memory archive ~Archive(); /// @} @@ -355,15 +355,15 @@ class Archive { /// @brief Get the iplist of the members MembersList& getMembers() { return members; } - /// This method allows direct query of the Archive's symbol table. The + /// This method allows direct query of the Archive's symbol table. The /// symbol table is a std::map of std::string (the symbol) to unsigned (the - /// file offset). Note that for efficiency reasons, the offset stored in + /// file offset). Note that for efficiency reasons, the offset stored in /// the symbol table is not the actual offset. It is the offset from the /// beginning of the first "real" file member (after the symbol table). Use /// the getFirstFileOffset() to obtain that offset and add this value to the - /// offset in the symbol table to obtain the real file offset. Note that - /// there is purposefully no interface provided by Archive to look up - /// members by their offset. Use the findModulesDefiningSymbols and + /// offset in the symbol table to obtain the real file offset. Note that + /// there is purposefully no interface provided by Archive to look up + /// members by their offset. Use the findModulesDefiningSymbols and /// findModuleDefiningSymbol methods instead. /// @returns the Archive's symbol table. /// @brief Get the archive's symbol table @@ -386,15 +386,15 @@ class Archive { /// @brief Instantiate all the bytecode modules located in the archive bool getAllModules(std::vector& Modules, std::string* ErrMessage); - /// This accessor looks up the \p symbol in the archive's symbol table and + /// This accessor looks up the \p symbol in the archive's symbol table and /// returns the associated module that defines that symbol. This method can - /// be called as many times as necessary. This is handy for linking the + /// be called as many times as necessary. This is handy for linking the /// archive into another module based on unresolved symbols. Note that the /// ModuleProvider returned by this accessor should not be deleted by the - /// caller. It is managed internally by the Archive class. It is possible + /// caller. It is managed internally by the Archive class. It is possible /// that multiple calls to this accessor will return the same ModuleProvider - /// instance because the associated module defines multiple symbols. - /// @returns The ModuleProvider* found or null if the archive does not + /// instance because the associated module defines multiple symbols. + /// @returns The ModuleProvider* found or null if the archive does not /// contain a module that defines the \p symbol. /// @brief Look up a module by symbol name. ModuleProvider* findModuleDefiningSymbol( @@ -402,10 +402,10 @@ class Archive { ); /// This method is similar to findModuleDefiningSymbol but allows lookup of - /// more than one symbol at a time. If \p symbols contains a list of - /// undefined symbols in some module, then calling this method is like + /// more than one symbol at a time. If \p symbols contains a list of + /// undefined symbols in some module, then calling this method is like /// making one complete pass through the archive to resolve symbols but is - /// more efficient than looking at the individual members. Note that on + /// more efficient than looking at the individual members. Note that on /// exit, the symbols resolved by this method will be removed from \p /// symbols to ensure they are not re-searched on a subsequent call. If /// you need to retain the list of symbols, make a copy. @@ -414,11 +414,11 @@ class Archive { std::set& symbols, ///< Symbols to be sought std::set& modules ///< The modules matching \p symbols ); - - /// This method determines whether the archive is a properly formed llvm - /// bytecode archive. It first makes sure the symbol table has been loaded - /// and has a non-zero size. If it does, then it is an archive. If not, - /// then it tries to load all the bytecode modules of the archive. Finally, + + /// This method determines whether the archive is a properly formed llvm + /// bytecode archive. It first makes sure the symbol table has been loaded + /// and has a non-zero size. If it does, then it is an archive. If not, + /// then it tries to load all the bytecode modules of the archive. Finally, /// it returns whether it was successfull. /// @returns true if the archive is a proper llvm bytecode archive /// @brief Determine whether the archive is a proper llvm bytecode archive. @@ -428,15 +428,15 @@ class Archive { /// @name Mutators /// @{ public: - /// This method is the only way to get the archive written to disk. It + /// This method is the only way to get the archive written to disk. It /// creates or overwrites the file specified when \p this was created /// or opened. The arguments provide options for writing the archive. If /// \p CreateSymbolTable is true, the archive is scanned for bytecode files - /// and a symbol table of the externally visible function and global + /// and a symbol table of the externally visible function and global /// variable names is created. If \p TruncateNames is true, the names of the - /// archive members will have their path component stripped and the file - /// name will be truncated at 15 characters. If \p Compress is specified, - /// all archive members will be compressed before being written. If + /// archive members will have their path component stripped and the file + /// name will be truncated at 15 characters. If \p Compress is specified, + /// all archive members will be compressed before being written. If /// \p PrintSymTab is true, the symbol table will be printed to std::cout. /// @throws std::string if an error occurs /// @brief Write (possibly modified) archive contents to disk @@ -449,7 +449,7 @@ class Archive { /// This method adds a new file to the archive. The \p filename is examined /// to determine just enough information to create an ArchiveMember object /// which is then inserted into the Archive object's ilist at the location - /// given by \p where. + /// given by \p where. /// @throws std::string if an error occurs reading the \p filename. /// @returns nothing /// @brief Add a file to the archive. @@ -459,7 +459,7 @@ class Archive { /// @name Implementation /// @{ protected: - /// @brief Construct an Archive for \p filename and optionally map it + /// @brief Construct an Archive for \p filename and optionally map it /// into memory. Archive(const sys::Path& filename, bool map = false ); @@ -486,14 +486,14 @@ class Archive { bool CreateSymbolTable, bool TruncateNames, bool ShouldCompress); /// @brief Fill in an ArchiveMemberHeader from ArchiveMember. - bool fillHeader(const ArchiveMember&mbr, + bool fillHeader(const ArchiveMember&mbr, ArchiveMemberHeader& hdr,int sz, bool TruncateNames) const; - + /// This type is used to keep track of bytecode modules loaded from the /// symbol table. It maps the file offset to a pair that consists of the - /// associated ArchiveMember and the ModuleProvider. + /// associated ArchiveMember and the ModuleProvider. /// @brief Module mapping type - typedef std::map > + typedef std::map > ModuleMap; /// @} diff --git a/include/llvm/Bytecode/BytecodeHandler.h b/include/llvm/Bytecode/BytecodeHandler.h index 67c209753a..c12ac099b8 100644 --- a/include/llvm/Bytecode/BytecodeHandler.h +++ b/include/llvm/Bytecode/BytecodeHandler.h @@ -1,10 +1,10 @@ //===-- BytecodeHandler.h - Handle Bytecode Parsing Events ------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // -// This file was developed by Reid Spencer and is distributed under the +// This file was developed by Reid Spencer and is distributed under the // University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This header file defines the interface to the Bytecode Handler. The handler @@ -28,11 +28,11 @@ class ConstantArray; class Module; /// This class provides the interface for handling bytecode events during -/// reading of bytecode. The methods on this interface are invoked by the -/// BytecodeReader as it discovers the content of a bytecode stream. -/// This class provides a a clear separation of concerns between recognizing -/// the semantic units of a bytecode file (the Reader) and deciding what to do -/// with them (the Handler). +/// reading of bytecode. The methods on this interface are invoked by the +/// BytecodeReader as it discovers the content of a bytecode stream. +/// This class provides a a clear separation of concerns between recognizing +/// the semantic units of a bytecode file (the Reader) and deciding what to do +/// with them (the Handler). /// /// The BytecodeReader recognizes the content of the bytecode file and /// calls the BytecodeHandler methods to let it perform additional tasks. This @@ -40,7 +40,7 @@ class Module; /// purposes simply by creating a subclass of BytecodeHandler. None of the /// parsing details need to be understood, only the meaning of the calls /// made on this interface. -/// +/// /// @see BytecodeHandler /// @brief Handle Bytecode Parsing Events class BytecodeHandler { @@ -64,8 +64,8 @@ public: /// This method is called whenever the parser detects an error in the /// bytecode formatting. It gives the handler a chance to do something - /// with the error message before the parser throws an exception to - /// terminate the parsing. + /// with the error message before the parser throws an exception to + /// terminate the parsing. /// @brief Handle parsing errors. virtual void handleError(const std::string& str ) {} @@ -91,8 +91,8 @@ public: const std::string& moduleId ///< An identifier for the module ) {} - /// This method is called once the version information has been parsed. It - /// provides the information about the version of the bytecode file being + /// This method is called once the version information has been parsed. It + /// provides the information about the version of the bytecode file being /// read. /// @brief Handle the bytecode prolog virtual void handleVersionInfo( @@ -105,10 +105,10 @@ public: /// contains the global variables and the function placeholders virtual void handleModuleGlobalsBegin() {} - /// This method is called when a non-initialized global variable is + /// This method is called when a non-initialized global variable is /// recognized. Its type, constness, and linkage type are provided. /// @brief Handle a non-initialized global variable - virtual void handleGlobalVariable( + virtual void handleGlobalVariable( const Type* ElemType, ///< The type of the global variable bool isConstant, ///< Whether the GV is constant or not GlobalValue::LinkageTypes,///< The linkage type of the GV @@ -120,20 +120,20 @@ public: /// provides the number of types that the list contains. The handler /// should expect that number of calls to handleType. /// @brief Handle a type - virtual void handleTypeList( + virtual void handleTypeList( unsigned numEntries ///< The number of entries in the type list ) {} - /// This method is called when a new type is recognized. The type is + /// This method is called when a new type is recognized. The type is /// converted from the bytecode and passed to this method. /// @brief Handle a type - virtual void handleType( + virtual void handleType( const Type* Ty ///< The type that was just recognized ) {} /// This method is called when the function prototype for a function is /// encountered in the module globals block. - virtual void handleFunctionDeclaration( + virtual void handleFunctionDeclaration( Function* Func ///< The function being declared ) {} @@ -146,7 +146,7 @@ public: /// in the module globals block. virtual void handleDependentLibrary(const std::string& libName) {} - /// This method is called if the module globals has a non-empty target + /// This method is called if the module globals has a non-empty target /// triple virtual void handleTargetTriple(const std::string& triple) {} @@ -159,13 +159,13 @@ public: virtual void handleCompactionTableBegin() {} /// @brief Handle start of a compaction table plane - virtual void handleCompactionTablePlane( + virtual void handleCompactionTablePlane( unsigned Ty, ///< The type of the plane (slot number) unsigned NumEntries ///< The number of entries in the plane ) {} /// @brief Handle a type entry in the compaction table - virtual void handleCompactionTableType( + virtual void handleCompactionTableType( unsigned i, ///< Index in the plane of this type unsigned TypSlot, ///< Slot number for this type const Type* ///< The type referenced by this slot @@ -182,27 +182,27 @@ public: virtual void handleCompactionTableEnd() {} /// @brief Handle start of a symbol table - virtual void handleSymbolTableBegin( + virtual void handleSymbolTableBegin( Function* Func, ///< The function to which the ST belongs SymbolTable* ST ///< The symbol table being filled ) {} /// @brief Handle start of a symbol table plane - virtual void handleSymbolTablePlane( + virtual void handleSymbolTablePlane( unsigned TySlot, ///< The slotnum of the type plane unsigned NumEntries, ///< Number of entries in the plane const Type* Typ ///< The type of this type plane ) {} /// @brief Handle a named type in the symbol table - virtual void handleSymbolTableType( + virtual void handleSymbolTableType( unsigned i, ///< The index of the type in this plane unsigned slot, ///< Slot number of the named type const std::string& name ///< Name of the type ) {} /// @brief Handle a named value in the symbol table - virtual void handleSymbolTableValue( + virtual void handleSymbolTableValue( unsigned i, ///< The index of the value in this plane unsigned slot, ///< Slot number of the named value const std::string& name ///< Name of the value. @@ -227,7 +227,7 @@ public: unsigned blocknum ///< The block number of the block ) {} - /// This method is called for each instruction that is parsed. + /// This method is called for each instruction that is parsed. /// @returns true if the instruction is a block terminating instruction /// @brief Handle an instruction virtual bool handleInstruction( @@ -246,29 +246,29 @@ public: virtual void handleGlobalConstantsBegin() {} /// @brief Handle a constant expression - virtual void handleConstantExpression( + virtual void handleConstantExpression( unsigned Opcode, ///< Opcode of primary expression operator std::vector ArgVec, ///< expression args Constant* C ///< The constant value ) {} /// @brief Handle a constant array - virtual void handleConstantArray( + virtual void handleConstantArray( const ArrayType* AT, ///< Type of the array std::vector& ElementSlots,///< Slot nums for array values unsigned TypeSlot, ///< Slot # of type Constant* Val ///< The constant value ) {} - /// @brief Handle a constant structure - virtual void handleConstantStruct( + /// @brief Handle a constant structure + virtual void handleConstantStruct( const StructType* ST, ///< Type of the struct std::vector& ElementSlots,///< Slot nums for struct values Constant* Val ///< The constant value ) {} /// @brief Handle a constant packed - virtual void handleConstantPacked( + virtual void handleConstantPacked( const PackedType* PT, ///< Type of the array std::vector& ElementSlots,///< Slot nums for packed values unsigned TypeSlot, ///< Slot # of type @@ -276,7 +276,7 @@ public: ) {} /// @brief Handle a constant pointer - virtual void handleConstantPointer( + virtual void handleConstantPointer( const PointerType* PT, ///< Type of the pointer unsigned Slot, ///< Slot num of initializer value GlobalValue* GV ///< Referenced global value @@ -288,7 +288,7 @@ public: ) {} /// @brief Handle a primitive constant value - virtual void handleConstantValue( + virtual void handleConstantValue( Constant * c ///< The constant just defined ) {} diff --git a/include/llvm/Bytecode/Format.h b/include/llvm/Bytecode/Format.h index 5620aa7211..5f5feb8ddc 100644 --- a/include/llvm/Bytecode/Format.h +++ b/include/llvm/Bytecode/Format.h @@ -1,13 +1,13 @@ //===-- llvm/Bytecode/Format.h - VM bytecode file format info ---*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // -// This header defines intrinsic constants that are useful to libraries that +// This header defines intrinsic constants that are useful to libraries that // need to hack on bytecode files directly, like the reader and writer. // //===----------------------------------------------------------------------===// @@ -51,9 +51,9 @@ public: }; /// In LLVM 1.3 format, the identifier and the size of the block are - /// encoded into a single vbr_uint32 with 5 bits for the block identifier - /// and 27-bits for block length. This limits blocks to a maximum of - /// 128MBytes of data, and block types to 31 which should be sufficient + /// encoded into a single vbr_uint32 with 5 bits for the block identifier + /// and 27-bits for block length. This limits blocks to a maximum of + /// 128MBytes of data, and block types to 31 which should be sufficient /// for the foreseeable usage. Because the values of block identifiers MUST /// fit within 5 bits (values 1-31), this enumeration is used to ensure /// smaller values are used for 1.3 and subsequent bytecode versions. @@ -80,7 +80,7 @@ public: // InstructionList - The instructions in the body of a function. This // superceeds the old BasicBlock node used in LLVM 1.0. - InstructionListBlockID = 0x07, ///< 1.3 identifier for insruction list + InstructionListBlockID = 0x07, ///< 1.3 identifier for insruction list // CompactionTable - blocks with this id are used to define local remapping // tables for a function, allowing the indices used within the function to diff --git a/include/llvm/Bytecode/Reader.h b/include/llvm/Bytecode/Reader.h index 34b533eeaa..a28a788174 100644 --- a/include/llvm/Bytecode/Reader.h +++ b/include/llvm/Bytecode/Reader.h @@ -1,10 +1,10 @@ //===-- llvm/Bytecode/Reader.h - Reader for VM bytecode files ---*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This functionality is implemented by the lib/Bytecode/Reader library. @@ -60,21 +60,21 @@ Module* ParseBytecodeBuffer(const unsigned char *Buffer, /// dependent libraries. /// @returns true on success, false otherwise /// @brief Get the list of dependent libraries from a bytecode file. -bool GetBytecodeDependentLibraries(const std::string &fileName, +bool GetBytecodeDependentLibraries(const std::string &fileName, Module::LibraryListType& deplibs); /// This function will read only the necessary parts of a bytecode file in order /// to obtain a list of externally visible global symbols that the bytecode -/// module defines. This is used for archiving and linking when only the list +/// module defines. This is used for archiving and linking when only the list /// of symbols the module defines is needed. /// @returns true on success, false otherwise /// @brief Get a bytecode file's externally visibile defined global symbols. -bool GetBytecodeSymbols(const sys::Path& fileName, +bool GetBytecodeSymbols(const sys::Path& fileName, std::vector& syms); /// This function will read only the necessary parts of a bytecode buffer in -/// order to obtain a list of externally visible global symbols that the -/// bytecode module defines. This is used for archiving and linking when only +/// order to obtain a list of externally visible global symbols that the +/// bytecode module defines. This is used for archiving and linking when only /// the list of symbols the module defines is needed and the bytecode is /// already in memory. /// @returns the ModuleProvider on success, 0 if the bytecode can't be parsed diff --git a/include/llvm/Bytecode/WriteBytecodePass.h b/include/llvm/Bytecode/WriteBytecodePass.h index 61a2a3841f..a102863509 100644 --- a/include/llvm/Bytecode/WriteBytecodePass.h +++ b/include/llvm/Bytecode/WriteBytecodePass.h @@ -1,10 +1,10 @@ //===- llvm/Bytecode/WriteBytecodePass.h - Bytecode Writer Pass -*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines a simple pass to write the working module to a file after @@ -26,15 +26,15 @@ class WriteBytecodePass : public ModulePass { bool DeleteStream; bool CompressFile; public: - WriteBytecodePass() + WriteBytecodePass() : Out(&std::cout), DeleteStream(false), CompressFile(true) {} - WriteBytecodePass(std::ostream *o, bool DS = false, bool CF = true) + WriteBytecodePass(std::ostream *o, bool DS = false, bool CF = true) : Out(o), DeleteStream(DS), CompressFile(CF) {} inline ~WriteBytecodePass() { if (DeleteStream) delete Out; } - + bool runOnModule(Module &M) { WriteBytecodeToFile(&M, *Out, CompressFile ); return false; diff --git a/include/llvm/Bytecode/Writer.h b/include/llvm/Bytecode/Writer.h index ad6c7741b5..4db6d13664 100644 --- a/include/llvm/Bytecode/Writer.h +++ b/include/llvm/Bytecode/Writer.h @@ -1,10 +1,10 @@ //===-- llvm/Bytecode/Writer.h - Writer for VM bytecode files ---*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This functionality is implemented by the lib/BytecodeWriter library. @@ -28,7 +28,7 @@ namespace llvm { class Module; - void WriteBytecodeToFile(const Module *M, std::ostream &Out, + void WriteBytecodeToFile(const Module *M, std::ostream &Out, bool compress = true); } // End llvm namespace diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h index 512cae7927..f28c00faee 100644 --- a/include/llvm/CodeGen/AsmPrinter.h +++ b/include/llvm/CodeGen/AsmPrinter.h @@ -1,10 +1,10 @@ //===-- llvm/CodeGen/AsmPrinter.h - AsmPrinter Framework --------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This class is intended to be used as a base class for target-specific @@ -78,7 +78,7 @@ namespace llvm { /// AsciiDirective - This directive allows emission of an ascii string with /// the standard C escape characters embedded into it. const char *AsciiDirective; - + /// DataDirectives - These directives are used to output some unit of /// integer data to the current section. If a data directive is set to /// null, smaller data directives will be used to emit the large sizes. diff --git a/include/llvm/CodeGen/InstrScheduling.h b/include/llvm/CodeGen/InstrScheduling.h index 816aa7e806..c9aee2244a 100644 --- a/include/llvm/CodeGen/InstrScheduling.h +++ b/include/llvm/CodeGen/InstrScheduling.h @@ -1,10 +1,10 @@ //===-- InstrScheduling.h - Interface To Instruction Scheduling -*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines a minimal, but complete, interface to instruction @@ -22,7 +22,7 @@ class TargetMachine; //--------------------------------------------------------------------------- // Function: createScheduleInstructionsWithSSAPass(..) -// +// // Purpose: // Entry point for instruction scheduling on SSA form. // Schedules the machine instructions generated by instruction selection. diff --git a/include/llvm/CodeGen/IntrinsicLowering.h b/include/llvm/CodeGen/IntrinsicLowering.h index b15d505308..12b9624860 100644 --- a/include/llvm/CodeGen/IntrinsicLowering.h +++ b/include/llvm/CodeGen/IntrinsicLowering.h @@ -1,12 +1,12 @@ //===-- IntrinsicLowering.h - Intrinsic Function Lowering -------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// -// +// // This file defines the IntrinsicLowering interface. This interface allows // addition of domain-specific or front-end specific intrinsics to LLVM without // having to modify all of the code generators to support the new intrinsic. @@ -38,7 +38,7 @@ namespace llvm { class CallInst; class Module; - + class IntrinsicLowering { public: virtual ~IntrinsicLowering() {} @@ -67,7 +67,7 @@ namespace llvm { /// implementation to allow for future extensibility. struct DefaultIntrinsicLowering : public IntrinsicLowering { virtual void AddPrototypes(Module &M); - virtual void LowerIntrinsicCall(CallInst *CI); + virtual void LowerIntrinsicCall(CallInst *CI); }; } diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h index 17c1e2a770..5cb9b98661 100644 --- a/include/llvm/CodeGen/LiveVariables.h +++ b/include/llvm/CodeGen/LiveVariables.h @@ -1,12 +1,12 @@ //===-- llvm/CodeGen/LiveVariables.h - Live Variable Analysis ---*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// -// +// // This file implements the LiveVariable analysis pass. For each machine // instruction in the function, this pass calculates the set of registers that // are immediately dead after the instruction (i.e., the instruction calculates @@ -23,7 +23,7 @@ // to resolve physical register lifetimes in each basic block). If a physical // register is not register allocatable, it is not tracked. This is useful for // things like the stack pointer and condition codes. -// +// //===----------------------------------------------------------------------===// #ifndef LLVM_CODEGEN_LIVEVARIABLES_H @@ -111,7 +111,7 @@ public: /// killed_iterator - Iterate over registers killed by a machine instruction /// typedef std::multimap::iterator killed_iterator; - + /// killed_begin/end - Get access to the range of registers killed by a /// machine instruction. killed_iterator killed_begin(MachineInstr *MI) { diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h index 3f781222c9..b354f71f4e 100644 --- a/include/llvm/CodeGen/MachineBasicBlock.h +++ b/include/llvm/CodeGen/MachineBasicBlock.h @@ -1,12 +1,12 @@ //===-- llvm/CodeGen/MachineBasicBlock.h ------------------------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// -// +// // Collect the sequence of machine instructions for a basic block. // //===----------------------------------------------------------------------===// @@ -75,7 +75,7 @@ public: } ~MachineBasicBlock(); - + /// getBasicBlock - Return the LLVM basic block that this instance /// corresponded to originally. /// @@ -111,7 +111,7 @@ public: typedef std::vector::const_iterator const_pred_iterator; typedef std::vector::iterator succ_iterator; typedef std::vector::const_iterator const_succ_iterator; - + pred_iterator pred_begin() { return Predecessors.begin (); } const_pred_iterator pred_begin() const { return Predecessors.begin (); } pred_iterator pred_end() { return Predecessors.end (); } @@ -162,7 +162,7 @@ public: iterator erase(iterator I, iterator E) { return Insts.erase(I, E); } MachineInstr *remove(MachineInstr *I) { return Insts.remove(I); } void clear() { Insts.clear(); } - + /// splice - Take a block of instructions from MBB 'Other' in the range [From, /// To), and insert them into this MBB right before 'where'. void splice(iterator where, MachineBasicBlock *Other, iterator From, @@ -219,10 +219,10 @@ template <> struct GraphTraits { typedef MachineBasicBlock::succ_iterator ChildIteratorType; static NodeType *getEntryNode(MachineBasicBlock *BB) { return BB; } - static inline ChildIteratorType child_begin(NodeType *N) { + static inline ChildIteratorType child_begin(NodeType *N) { return N->succ_begin(); } - static inline ChildIteratorType child_end(NodeType *N) { + static inline ChildIteratorType child_end(NodeType *N) { return N->succ_end(); } }; @@ -232,10 +232,10 @@ template <> struct GraphTraits { typedef MachineBasicBlock::const_succ_iterator ChildIteratorType; static NodeType *getEntryNode(const MachineBasicBlock *BB) { return BB; } - static inline ChildIteratorType child_begin(NodeType *N) { + static inline ChildIteratorType child_begin(NodeType *N) { return N->succ_begin(); } - static inline ChildIteratorType child_end(NodeType *N) { + static inline ChildIteratorType child_end(NodeType *N) { return N->succ_end(); } }; @@ -252,10 +252,10 @@ template <> struct GraphTraits > { static NodeType *getEntryNode(Inverse G) { return G.Graph; } - static inline ChildIteratorType child_begin(NodeType *N) { + static inline ChildIteratorType child_begin(NodeType *N) { return N->pred_begin(); } - static inline ChildIteratorType child_end(NodeType *N) { + static inline ChildIteratorType child_end(NodeType *N) { return N->pred_end(); } }; @@ -264,12 +264,12 @@ template <> struct GraphTraits > { typedef const MachineBasicBlock NodeType; typedef MachineBasicBlock::const_pred_iterator ChildIteratorType; static NodeType *getEntryNode(Inverse G) { - return G.Graph; + return G.Graph; } - static inline ChildIteratorType child_begin(NodeType *N) { + static inline ChildIteratorType child_begin(NodeType *N) { return N->pred_begin(); } - static inline ChildIteratorType child_end(NodeType *N) { + static inline ChildIteratorType child_end(NodeType *N) { return N->pred_end(); } }; diff --git a/include/llvm/CodeGen/MachineCodeEmitter.h b/include/llvm/CodeGen/MachineCodeEmitter.h index 562d4c695e..f3155ba7f7 100644 --- a/include/llvm/CodeGen/MachineCodeEmitter.h +++ b/include/llvm/CodeGen/MachineCodeEmitter.h @@ -1,10 +1,10 @@ //===-- llvm/CodeGen/MachineCodeEmitter.h - Code emission -------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines an abstract interface that is used by the machine code @@ -37,7 +37,7 @@ public: /// about to be code generated. /// virtual void startFunction(MachineFunction &F) {} - + /// finishFunction - This callback is invoked when the specified function has /// finished code generation. /// @@ -88,7 +88,7 @@ public: /// addRelocation - Whenever a relocatable address is needed, it should be /// noted with this interface. virtual void addRelocation(const MachineRelocation &MR) = 0; - + // getConstantPoolEntryAddress - Return the address of the 'Index' entry in // the constant pool that was last emitted with the 'emitConstantPool' method. // diff --git a/include/llvm/CodeGen/MachineConstantPool.h b/include/llvm/CodeGen/MachineConstantPool.h index edfd601faa..0e6c642e8e 100644 --- a/include/llvm/CodeGen/MachineConstantPool.h +++ b/include/llvm/CodeGen/MachineConstantPool.h @@ -1,12 +1,12 @@ //===-- CodeGen/MachineConstantPool.h - Abstract Constant Pool --*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// -// +// // The MachineConstantPool class keeps track of constants referenced by a // function which must be spilled to memory. This is used for constants which // are unable to be used directly as operands to instructions, which typically diff --git a/include/llvm/CodeGen/MachineFrameInfo.h b/include/llvm/CodeGen/MachineFrameInfo.h index 7ac582c75d..8f8a852480 100644 --- a/include/llvm/CodeGen/MachineFrameInfo.h +++ b/include/llvm/CodeGen/MachineFrameInfo.h @@ -1,12 +1,12 @@ //===-- CodeGen/MachineFrameInfo.h - Abstract Stack Frame Rep. --*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// -// +// // The MachineFrameInfo class represents an abstract stack frame until // prolog/epilog code is inserted. This class is key to allowing stack frame // representation optimizations, such as frame pointer elimination. It also @@ -168,7 +168,7 @@ public: /// bool hasCalls() const { return HasCalls; } void setHasCalls(bool V) { HasCalls = V; } - + /// getMaxCallFrameSize - Return the maximum size of a call frame that must be /// allocated for an outgoing function call. This is only available if /// CallFrameSetup/Destroy pseudo instructions are used by the target, and @@ -186,7 +186,7 @@ public: Objects.insert(Objects.begin(), StackObject(Size, 1, SPOffset)); return -++NumFixedObjects; } - + /// CreateStackObject - Create a new statically sized stack object, returning /// a postive identifier to represent it. /// diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index 1121fd0480..bc4c4c4f92 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -1,18 +1,18 @@ //===-- llvm/CodeGen/MachineFunction.h --------------------------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// -// +// // Collect native machine code for a function. This class contains a list of // MachineBasicBlock instances that make up the current compiled function. // // This class also contains pointers to various classes which hold // target-specific information about the generated code. -// +// //===----------------------------------------------------------------------===// #ifndef LLVM_CODEGEN_MACHINEFUNCTION_H @@ -35,19 +35,19 @@ struct ilist_traits { // this is only set by the MachineFunction owning the ilist friend class MachineFunction; MachineFunction* Parent; - + public: ilist_traits() : Parent(0) { } - + static MachineBasicBlock* getPrev(MachineBasicBlock* N) { return N->Prev; } static MachineBasicBlock* getNext(MachineBasicBlock* N) { return N->Next; } - + static const MachineBasicBlock* getPrev(const MachineBasicBlock* N) { return N->Prev; } - + static const MachineBasicBlock* getNext(const MachineBasicBlock* N) { return N->Next; } - + static void setPrev(MachineBasicBlock* N, MachineBasicBlock* prev) { N->Prev = prev; } @@ -179,7 +179,7 @@ public: /// is an error to add the same register to the same set more than once. void addLiveIn(unsigned Reg) { LiveIns.push_back(Reg); } void addLiveOut(unsigned Reg) { LiveOuts.push_back(Reg); } - + // Iteration support for live in/out sets. These sets are kept in sorted // order by their register number. typedef std::vector::const_iterator liveinout_iterator; @@ -219,7 +219,7 @@ public: /// in your path. /// void viewCFG() const; - + /// viewCFGOnly - This function is meant for use from the debugger. It works /// just like viewCFG, but it does not include the contents of basic blocks /// into the nodes, just the label. If you are only interested in the CFG @@ -256,7 +256,7 @@ public: // Provide accessors for basic blocks... const BasicBlockListType &getBasicBlockList() const { return BasicBlocks; } BasicBlockListType &getBasicBlockList() { return BasicBlocks; } - + //===--------------------------------------------------------------------===// // BasicBlock iterator forwarding functions // @@ -331,7 +331,7 @@ template <> struct GraphTraits : }; -// Provide specializations of GraphTraits to be able to treat a function as a +// Provide specializations of GraphTraits to be able to treat a function as a // graph of basic blocks... and to walk it in inverse order. Inverse order for // a function is considered to be when traversing the predecessor edges of a BB // instead of the successor edges. diff --git a/include/llvm/CodeGen/MachineFunctionPass.h b/include/llvm/CodeGen/MachineFunctionPass.h index 390dcb8562..973babd702 100644 --- a/include/llvm/CodeGen/MachineFunctionPass.h +++ b/include/llvm/CodeGen/MachineFunctionPass.h @@ -1,10 +1,10 @@ //===-- MachineFunctionPass.h - Pass for MachineFunctions --------*-C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines the MachineFunctionPass class. MachineFunctionPass's are diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 6a6d380fef..ea2233f8d2 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -1,10 +1,10 @@ //===-- llvm/CodeGen/MachineInstr.h - MachineInstr class --------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file contains the declaration of the MachineInstr class, which is the @@ -35,8 +35,8 @@ template struct ilist; typedef short MachineOpCode; //===----------------------------------------------------------------------===// -// class MachineOperand -// +// class MachineOperand +// // Purpose: // Representation of each machine instruction operand. // This class is designed so that you can allocate a vector of operands @@ -45,10 +45,10 @@ typedef short MachineOpCode; // E.g, for this VM instruction: // ptr = alloca type, numElements // we generate 2 machine instructions on the SPARC: -// +// // mul Constant, Numelements -> Reg // add %sp, Reg -> Ptr -// +// // Each instruction has 3 operands, listed above. Of those: // - Reg, NumElements, and Ptr are of operand type MO_Register. // - Constant is of operand type MO_SignExtendedImmed on the SPARC. @@ -57,16 +57,16 @@ typedef short MachineOpCode; // // - Reg will be of virtual register type MO_MInstrVirtualReg. The field // MachineInstr* minstr will point to the instruction that computes reg. -// +// // - %sp will be of virtual register type MO_MachineReg. // The field regNum identifies the machine register. -// +// // - NumElements will be of virtual register type MO_VirtualReg. // The field Value* value identifies the value. -// +// // - Ptr will also be of virtual register type MO_VirtualReg. // Again, the field Value* value identifies the value. -// +// //===----------------------------------------------------------------------===// struct MachineOperand { @@ -108,14 +108,14 @@ public: MO_ExternalSymbol, // Name of external global symbol MO_GlobalAddress, // Address of a global value }; - + private: union { Value* value; // BasicBlockVal for a label operand. // ConstantVal for a non-address immediate. // Virtual register for an SSA operand, // including hidden operands required for - // the generated machine code. + // the generated machine code. // LLVM global for MO_GlobalAddress. int64_t immedVal; // Constant value for an explicit constant @@ -134,7 +134,7 @@ private: // valid for MO_GlobalAddress and MO_ExternalSym } extra; - void zeroContents () { + void zeroContents () { memset (&contents, 0, sizeof (contents)); memset (&extra, 0, sizeof (extra)); } @@ -193,9 +193,9 @@ public: extra = M.extra; } - + ~MachineOperand() {} - + const MachineOperand &operator=(const MachineOperand &MO) { contents = MO.contents; flags = MO.flags; @@ -205,7 +205,7 @@ public: } /// getType - Returns the MachineOperandType for this operand. - /// + /// MachineOperandType getType() const { return opType; } /// getUseType - Returns the MachineOperandUseType of this operand. @@ -245,7 +245,7 @@ public: /// has one. This is deprecated and only used by the SPARC v9 backend. /// Value* getVRegValueOrNull() const { - return (opType == MO_VirtualRegister || opType == MO_CCRegister || + return (opType == MO_VirtualRegister || opType == MO_CCRegister || isPCRelativeDisp()) ? contents.value : NULL; } @@ -312,7 +312,7 @@ public: /// bool hasAllocatedReg() const { return (extra.regNum >= 0 && - (opType == MO_VirtualRegister || opType == MO_CCRegister || + (opType == MO_VirtualRegister || opType == MO_CCRegister || opType == MO_MachineRegister)); } @@ -331,13 +331,13 @@ public: // code.' It's not clear where the duplication is. assert(hasAllocatedReg() && "This operand cannot have a register number!"); extra.regNum = Reg; - } + } void setValueReg(Value *val) { assert(getVRegValueOrNull() != 0 && "Original operand must of type Value*"); contents.value = val; } - + void setImmedValue(int immVal) { assert(isImmediate() && "Wrong MachineOperand mutator"); contents.immedVal = immVal; @@ -358,35 +358,35 @@ public: void markLo32() { flags |= LOFLAG32; } void markHi64() { flags |= HIFLAG64; } void markLo64() { flags |= LOFLAG64; } - + private: /// setRegForValue - Replaces the Value with its corresponding physical /// register after register allocation is complete. This is deprecated /// and only used by the SPARC v9 back-end. /// void setRegForValue(int reg) { - assert(opType == MO_VirtualRegister || opType == MO_CCRegister || + assert(opType == MO_VirtualRegister || opType == MO_CCRegister || opType == MO_MachineRegister); extra.regNum = reg; } - + friend class MachineInstr; }; //===----------------------------------------------------------------------===// -// class MachineInstr -// +// class MachineInstr +// // Purpose: // Representation of each machine instruction. -// +// // MachineOpCode must be an enum, defined separately for each target. // E.g., It is defined in SparcInstructionSelection.h for the SPARC. -// +// // There are 2 kinds of operands: -// -// (1) Explicit operands of the machine instruction in vector operands[] -// +// +// (1) Explicit operands of the machine instruction in vector operands[] +// // (2) "Implicit operands" are values implicitly used or defined by the // machine instruction, such as arguments to a CALL, return value of // a CALL (if any), and return value of a RETURN. @@ -426,7 +426,7 @@ public: /// block. /// MachineInstr(MachineBasicBlock *MBB, short Opcode, unsigned numOps); - + ~MachineInstr(); const MachineBasicBlock* getParent() const { return parent; } @@ -439,7 +439,7 @@ public: /// Access to explicit operands of the instruction. /// unsigned getNumOperands() const { return operands.size() - numImplicitRefs; } - + const MachineOperand& getOperand(unsigned i) const { assert(i < getNumOperands() && "getOperand() out of range!"); return operands[i]; @@ -454,7 +454,7 @@ public: // This returns the i'th entry in the operand vector. // That represents the i'th explicit operand or the (i-N)'th implicit operand, // depending on whether i < N or i >= N. - // + // const MachineOperand& getExplOrImplOperand(unsigned i) const { assert(i < operands.size() && "getExplOrImplOperand() out of range!"); return (i < getNumOperands()? getOperand(i) @@ -463,9 +463,9 @@ public: // // Access to implicit operands of the instruction - // + // unsigned getNumImplicitRefs() const{ return numImplicitRefs; } - + MachineOperand& getImplicitOp(unsigned i) { assert(i < numImplicitRefs && "implicit ref# out of range!"); return operands[i + operands.size() - numImplicitRefs]; @@ -672,7 +672,7 @@ public: /// replace - Support to rewrite a machine instruction in place: for now, /// simply replace() and then set new operands with Set.*Operand methods /// below. - /// + /// void replace(short Opcode, unsigned numOperands); /// setOpcode - Replace the opcode of the current instruction with a new one. @@ -687,7 +687,7 @@ public: } // Access to set the operands when building the machine instruction - // + // void SetMachineOperandVal(unsigned i, MachineOperand::MachineOperandType operandType, Value* V); @@ -702,22 +702,22 @@ public: unsigned substituteValue(const Value* oldVal, Value* newVal, bool defsOnly, bool notDefsAndUses, bool& someArgsWereIgnored); - + // SetRegForOperand - // SetRegForImplicitRef - // Mark an explicit or implicit operand with its allocated physical register. - // + // void SetRegForOperand(unsigned i, int regNum); void SetRegForImplicitRef(unsigned i, int regNum); // // Iterator to enumerate machine operands. - // + // template class ValOpIterator : public forward_iterator { unsigned i; MITy MI; - + void skipToNextVal() { while (i < MI->getNumOperands() && !( (MI->getOperand(i).getType() == MachineOperand::MO_VirtualRegister || @@ -725,14 +725,14 @@ public: && MI->getOperand(i).getVRegValue() != 0)) ++i; } - + inline ValOpIterator(MITy mi, unsigned I) : i(I), MI(mi) { skipToNextVal(); } - + public: typedef ValOpIterator _Self; - + inline VTy operator*() const { return MI->getOperand(i).getVRegValue(); } @@ -742,16 +742,16 @@ public: inline VTy operator->() const { return operator*(); } - inline bool isUse() const { return MI->getOperand(i).isUse(); } - inline bool isDef() const { return MI->getOperand(i).isDef(); } + inline bool isUse() const { return MI->getOperand(i).isUse(); } + inline bool isDef() const { return MI->getOperand(i).isDef(); } inline _Self& operator++() { i++; skipToNextVal(); return *this; } inline _Self operator++(int) { _Self tmp = *this; ++*this; return tmp; } - inline bool operator==(const _Self &y) const { + inline bool operator==(const _Self &y) const { return i == y.i; } - inline bool operator!=(const _Self &y) const { + inline bool operator!=(const _Self &y) const { return !operator==(y); } diff --git a/include/llvm/CodeGen/MachineInstrBuilder.h b/include/llvm/CodeGen/MachineInstrBuilder.h index 060f90c53f..2aee02ee6c 100644 --- a/include/llvm/CodeGen/MachineInstrBuilder.h +++ b/include/llvm/CodeGen/MachineInstrBuilder.h @@ -1,10 +1,10 @@ //===-- CodeGen/MachineInstBuilder.h - Simplify creation of MIs -*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file exposes a function named BuildMI, which is useful for dramatically @@ -86,7 +86,7 @@ public: MI->addMachineRegOperand(Reg, Ty); return *this; } - + /// addImm - Add a new immediate operand. /// const MachineInstrBuilder &addImm(int Val) const { diff --git a/include/llvm/CodeGen/MachineRelocation.h b/include/llvm/CodeGen/MachineRelocation.h index a72f29dd0f..93d2527ab6 100644 --- a/include/llvm/CodeGen/MachineRelocation.h +++ b/include/llvm/CodeGen/MachineRelocation.h @@ -1,10 +1,10 @@ //===-- llvm/CodeGen/MachineRelocation.h - Target Relocation ----*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines the MachineRelocation class. diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h index 866d07ff43..a053dd95a6 100644 --- a/include/llvm/CodeGen/Passes.h +++ b/include/llvm/CodeGen/Passes.h @@ -1,10 +1,10 @@ //===-- Passes.h - Target independent code generation passes ----*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines interfaces to access the target independent code generation @@ -31,7 +31,7 @@ namespace llvm { /// last LLVM modifying pass to clean up blocks that are not reachable from /// the entry block. FunctionPass *createUnreachableBlockEliminationPass(); - + /// MachineFunctionPrinter pass - This pass prints out the machine function to /// standard error, as a debugging tool. FunctionPass *createMachineFunctionPrinterPass(std::ostream *OS, @@ -62,9 +62,9 @@ namespace llvm { /// LocalRegisterAllocation Pass - This pass register allocates the input code /// a basic block at a time, yielding code better than the simple register /// allocator, but not as good as a global allocator. - /// + /// FunctionPass *createLocalRegisterAllocator(); - + /// LinearScanRegisterAllocation Pass - This pass implements the linear scan /// register allocation algorithm, a global register allocator. /// @@ -90,7 +90,7 @@ namespace llvm { /// the current function, which should happen after the function has been /// emitted to a .s file or to memory. FunctionPass *createMachineCodeDeleter(); - + /// getRegisterAllocator - This creates an instance of the register allocator /// for the Sparc. FunctionPass *getRegisterAllocator(TargetMachine &T); diff --git a/include/llvm/CodeGen/SchedGraphCommon.h b/include/llvm/CodeGen/SchedGraphCommon.h index 167bfb0f2d..7560690230 100644 --- a/include/llvm/CodeGen/SchedGraphCommon.h +++ b/include/llvm/CodeGen/SchedGraphCommon.h @@ -1,10 +1,10 @@ //===-- SchedGraphCommon.h - Scheduling Base Graph --------------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // A common graph class that is based on the SSA graph. It includes @@ -47,7 +47,7 @@ public: typedef std::vector::const_iterator const_iterator; typedef std::vector::reverse_iterator reverse_iterator; typedef std::vector::const_reverse_iterator const_reverse_iterator; - + // Accessor methods unsigned getNodeId() const { return ID; } int getLatency() const { return latency; } @@ -60,7 +60,7 @@ public: iterator endInEdges() { return inEdges.end(); } iterator beginOutEdges() { return outEdges.begin(); } iterator endOutEdges() { return outEdges.end(); } - + const_iterator beginInEdges() const { return inEdges.begin(); } const_iterator endInEdges() const { return inEdges.end(); } const_iterator beginOutEdges() const { return outEdges.begin(); } @@ -70,29 +70,29 @@ public: // Debugging support virtual void print(std::ostream &os) const = 0; - + protected: friend class SchedGraphCommon; friend class SchedGraphEdge; // give access for adding edges - - + + // disable default constructor and provide a ctor for single-block graphs SchedGraphNodeCommon(); // DO NOT IMPLEMENT - + inline SchedGraphNodeCommon(unsigned Id, int index, int late=0) : ID(Id), latency(late), origIndexInBB(index) {} - + virtual ~SchedGraphNodeCommon(); - + //Functions to add and remove edges inline void addInEdge(SchedGraphEdge* edge) { inEdges.push_back(edge); } inline void addOutEdge(SchedGraphEdge* edge) { outEdges.push_back(edge); } void removeInEdge(const SchedGraphEdge* edge); void removeOutEdge(const SchedGraphEdge* edge); - + }; // ostream << operator for SchedGraphNode class -inline std::ostream &operator<<(std::ostream &os, +inline std::ostream &operator<<(std::ostream &os, const SchedGraphNodeCommon &node) { node.print(os); return os; @@ -112,7 +112,7 @@ public: enum DataDepOrderType { TrueDep = 0x1, AntiDep=0x2, OutputDep=0x4, NonDataDep=0x8 }; - + protected: SchedGraphNodeCommon* src; SchedGraphNodeCommon* sink; @@ -120,7 +120,7 @@ protected: unsigned int depOrderType; int minDelay; // cached latency (assumes fixed target arch) int iteDiff; - + union { const Value* val; int machineRegNum; @@ -130,30 +130,30 @@ protected: public: // For all constructors, if minDelay is unspecified, minDelay is // set to _src->getLatency(). - + // constructor for CtrlDep or MemoryDep edges, selected by 3rd argument SchedGraphEdge(SchedGraphNodeCommon* _src, SchedGraphNodeCommon* _sink, SchedGraphEdgeDepType _depType, unsigned int _depOrderType, int _minDelay = -1); - + // constructor for explicit value dependence (may be true/anti/output) SchedGraphEdge(SchedGraphNodeCommon* _src, SchedGraphNodeCommon* _sink, const Value* _val, unsigned int _depOrderType, int _minDelay = -1); - + // constructor for machine register dependence SchedGraphEdge(SchedGraphNodeCommon* _src,SchedGraphNodeCommon* _sink, unsigned int _regNum, unsigned int _depOrderType, int _minDelay = -1); - + // constructor for any other machine resource dependences. // DataDepOrderType is always NonDataDep. It it not an argument to // avoid overloading ambiguity with previous constructor. SchedGraphEdge(SchedGraphNodeCommon* _src, SchedGraphNodeCommon* _sink, ResourceId _resourceId, int _minDelay = -1); - + ~SchedGraphEdge() {} - + SchedGraphNodeCommon* getSrc() const { return src; } SchedGraphNodeCommon* getSink() const { return sink; } int getMinDelay() const { return minDelay; } @@ -179,12 +179,12 @@ public: int getIteDiff() { return iteDiff; } - + public: // Debugging support void print(std::ostream &os) const; void dump(int indent=0) const; - + private: // disable default ctor SchedGraphEdge(); // DO NOT IMPLEMENT @@ -197,7 +197,7 @@ inline std::ostream &operator<<(std::ostream &os, const SchedGraphEdge &edge) { } class SchedGraphCommon { - + protected: SchedGraphNodeCommon* graphRoot; // the root and leaf are not inserted SchedGraphNodeCommon* graphLeaf; // in the hash_map (see getNumNodes()) @@ -207,16 +207,16 @@ public: // Accessor methods // SchedGraphNodeCommon* getRoot() const { return graphRoot; } - SchedGraphNodeCommon* getLeaf() const { return graphLeaf; } - + SchedGraphNodeCommon* getLeaf() const { return graphLeaf; } + // // Delete nodes or edges from the graph. - // + // void eraseNode(SchedGraphNodeCommon* node); void eraseIncomingEdges(SchedGraphNodeCommon* node, bool addDummyEdges = true); void eraseOutgoingEdges(SchedGraphNodeCommon* node, bool addDummyEdges = true); void eraseIncidentEdges(SchedGraphNodeCommon* node, bool addDummyEdges = true); - + SchedGraphCommon() {} ~SchedGraphCommon(); }; @@ -227,30 +227,30 @@ public: // Ok to make it a template because it shd get instantiated at most twice: // for and // for . -// +// template class SGPredIterator: public bidirectional_iterator<_NodeType, ptrdiff_t> { protected: _EdgeIter oi; public: typedef SGPredIterator<_NodeType, _EdgeType, _EdgeIter> _Self; - + inline SGPredIterator(_EdgeIter startEdge) : oi(startEdge) {} - + inline bool operator==(const _Self& x) const { return oi == x.oi; } inline bool operator!=(const _Self& x) const { return !operator==(x); } - + // operator*() differs for pred or succ iterator inline _NodeType* operator*() const { return (_NodeType*)(*oi)->getSrc(); } inline _NodeType* operator->() const { return operator*(); } - + inline _EdgeType* getEdge() const { return *(oi); } - + inline _Self &operator++() { ++oi; return *this; } // Preincrement inline _Self operator++(int) { // Postincrement - _Self tmp(*this); ++*this; return tmp; + _Self tmp(*this); ++*this; return tmp; } - + inline _Self &operator--() { --oi; return *this; } // Predecrement inline _Self operator--(int) { // Postdecrement _Self tmp = *this; --*this; return tmp; @@ -263,22 +263,22 @@ protected: _EdgeIter oi; public: typedef SGSuccIterator<_NodeType, _EdgeType, _EdgeIter> _Self; - + inline SGSuccIterator(_EdgeIter startEdge) : oi(startEdge) {} - + inline bool operator==(const _Self& x) const { return oi == x.oi; } inline bool operator!=(const _Self& x) const { return !operator==(x); } - + inline _NodeType* operator*() const { return (_NodeType*)(*oi)->getSink(); } inline _NodeType* operator->() const { return operator*(); } - + inline _EdgeType* getEdge() const { return *(oi); } - + inline _Self &operator++() { ++oi; return *this; } // Preincrement inline _Self operator++(int) { // Postincrement - _Self tmp(*this); ++*this; return tmp; + _Self tmp(*this); ++*this; return tmp; } - + inline _Self &operator--() { --oi; return *this; } // Predecrement inline _Self operator--(int) { // Postdecrement _Self tmp = *this; --*this; return tmp; diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index 9ae69c256b..39d4ef4ffc 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -1,15 +1,15 @@ //===-- llvm/CodeGen/SelectionDAG.h - InstSelection DAG ---------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// -// +// // This file declares the SelectionDAG class, and transitively defines the // SDNode class and subclasses. -// +// //===----------------------------------------------------------------------===// #ifndef LLVM_CODEGEN_SELECTIONDAG_H @@ -62,7 +62,7 @@ public: typedef std::vector::const_iterator allnodes_iterator; allnodes_iterator allnodes_begin() const { return AllNodes.begin(); } allnodes_iterator allnodes_end() const { return AllNodes.end(); } - + /// getRoot - Return the root tag of the SelectionDAG. /// const SDOperand &getRoot() const { return Root; } diff --git a/include/llvm/CodeGen/SelectionDAGISel.h b/include/llvm/CodeGen/SelectionDAGISel.h index 93672f97db..ee028a6876 100644 --- a/include/llvm/CodeGen/SelectionDAGISel.h +++ b/include/llvm/CodeGen/SelectionDAGISel.h @@ -1,10 +1,10 @@ //===-- llvm/CodeGen/SelectionDAGISel.h - Common Base Class------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file implements the SelectionDAGISel class, which is used as the common @@ -49,13 +49,13 @@ public: unsigned MakeReg(MVT::ValueType VT); virtual void InstructionSelectBasicBlock(SelectionDAG &SD) = 0; - + private: SDOperand CopyValueToVirtualRegister(SelectionDAGLowering &SDL, Value *V, unsigned Reg); void SelectBasicBlock(BasicBlock *BB, MachineFunction &MF, FunctionLoweringInfo &FuncInfo); - + void BuildSelectionDAG(SelectionDAG &DAG, BasicBlock *LLVMBB, std::vector > &PHINodesToUpdate, FunctionLoweringInfo &FuncInfo); diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index d605961bb4..35993d986a 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -1,12 +1,12 @@ //===-- llvm/CodeGen/SelectionDAGNodes.h - SelectionDAG Nodes ---*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// -// +// // This file declares the SDNode class and derived classes, which are used to // represent the nodes and operations present in a SelectionDAG. These nodes // and operations are machine code level operations, with some similarities to @@ -51,7 +51,7 @@ namespace ISD { // single token result. This is used to represent the fact that the operand // operators are independent of each other. TokenFactor, - + // Various leaf nodes. Constant, ConstantFP, GlobalAddress, FrameIndex, ConstantPool, BasicBlock, ExternalSymbol, @@ -185,7 +185,7 @@ namespace ISD { // integer result type. // ZEXTLOAD loads the integer operand and zero extends it to a larger // integer result type. - // EXTLOAD is used for two things: floating point extending loads, and + // EXTLOAD is used for two things: floating point extending loads, and // integer extending loads where it doesn't matter what the high // bits are set to. The code generator is allowed to codegen this // into whichever operation is more efficient. @@ -205,7 +205,7 @@ namespace ISD { DYNAMIC_STACKALLOC, // Control flow instructions. These all have token chains. - + // BR - Unconditional branch. The first operand is the chain // operand, the second is the MBB to branch to. BR, @@ -240,7 +240,7 @@ namespace ISD { MEMSET, MEMMOVE, MEMCPY, - + // ADJCALLSTACKDOWN/ADJCALLSTACKUP - These operators mark the beginning and // end of a call sequence and indicate how much the stack pointer needs to // be adjusted for that particular call. The first operand is a chain, the @@ -284,7 +284,7 @@ namespace ISD { SETUGT, // 1 0 1 0 True if unordered or greater than SETUGE, // 1 0 1 1 True if unordered, greater than, or equal SETULT, // 1 1 0 0 True if unordered or less than - SETULE, // 1 1 0 1 True if unordered, less than, or equal + SETULE, // 1 1 0 1 True if unordered, less than, or equal SETUNE, // 1 1 1 0 True if unordered or not equal SETTRUE, // 1 1 1 1 Always true (always folded) // Don't care operations: undefined if the input is a nan. @@ -293,7 +293,7 @@ namespace ISD { SETGT, // 1 X 0 1 0 True if greater than SETGE, // 1 X 0 1 1 True if greater than or equal SETLT, // 1 X 1 0 0 True if less than - SETLE, // 1 X 1 0 1 True if less than or equal + SETLE, // 1 X 1 0 1 True if less than or equal SETNE, // 1 X 1 1 0 True if not equal SETTRUE2, // 1 X 1 1 1 Always true (always folded) @@ -385,7 +385,7 @@ public: /// getValueType - Return the ValueType of the referenced return value. /// inline MVT::ValueType getValueType() const; - + // Forwarding methods - These forward to the corresponding methods in SDNode. inline unsigned getOpcode() const; inline unsigned getNodeDepth() const; @@ -806,11 +806,11 @@ public: static bool classof(const MVTSDNode *) { return true; } static bool classof(const SDNode *N) { - return + return N->getOpcode() == ISD::SIGN_EXTEND_INREG || N->getOpcode() == ISD::FP_ROUND_INREG || N->getOpcode() == ISD::EXTLOAD || - N->getOpcode() == ISD::SEXTLOAD || + N->getOpcode() == ISD::SEXTLOAD || N->getOpcode() == ISD::ZEXTLOAD || N->getOpcode() == ISD::TRUNCSTORE; } @@ -819,7 +819,7 @@ public: class SDNodeIterator : public forward_iterator { SDNode *Node; unsigned Operand; - + SDNodeIterator(SDNode *N, unsigned Op) : Node(N), Operand(Op) {} public: bool operator==(const SDNodeIterator& x) const { @@ -832,18 +832,18 @@ public: Operand = I.Operand; return *this; } - + pointer operator*() const { return Node->getOperand(Operand).Val; } pointer operator->() const { return operator*(); } - + SDNodeIterator& operator++() { // Preincrement ++Operand; return *this; } SDNodeIterator operator++(int) { // Postincrement - SDNodeIterator tmp = *this; ++*this; return tmp; + SDNodeIterator tmp = *this; ++*this; return tmp; } static SDNodeIterator begin(SDNode *N) { return SDNodeIterator(N, 0); } @@ -859,10 +859,10 @@ template <> struct GraphTraits { typedef SDNode NodeType; typedef SDNodeIterator ChildIteratorType; static inline NodeType *getEntryNode(SDNode *N) { return N; } - static inline ChildIteratorType child_begin(NodeType *N) { + static inline ChildIteratorType child_begin(NodeType *N) { return SDNodeIterator::begin(N); } - static inline ChildIteratorType child_end(NodeType *N) { + static inline ChildIteratorType child_end(NodeType *N) { return SDNodeIterator::end(N); } }; diff --git a/include/llvm/CodeGen/ValueSet.h b/include/llvm/CodeGen/ValueSet.h index f4bc6e80d4..558e7489d1 100644 --- a/include/llvm/CodeGen/ValueSet.h +++ b/include/llvm/CodeGen/ValueSet.h @@ -1,10 +1,10 @@ //===-- llvm/CodeGen/ValueSet.h ---------------------------------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This header is OBSOLETE, do not use it for new code. @@ -22,7 +22,7 @@ namespace llvm { class Value; -// RAV - Used to print values in a form used by the register allocator. +// RAV - Used to print values in a form used by the register allocator. // struct RAV { // Register Allocator Value const Value &V; diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h index ce6cb0764f..7efad1103c 100644 --- a/include/llvm/CodeGen/ValueTypes.h +++ b/include/llvm/CodeGen/ValueTypes.h @@ -1,10 +1,10 @@ //===- CodeGen/ValueTypes.h - Low-Level Target independ. types --*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines the set of low-level target independent types which various diff --git a/include/llvm/Config/alloca.h b/include/llvm/Config/alloca.h index 0756db4785..88c8c63248 100644 --- a/include/llvm/Config/alloca.h +++ b/include/llvm/Config/alloca.h @@ -3,7 +3,7 @@ * * This file was developed by the LLVM research group and is distributed under * the University of Illinois Open Source License. See LICENSE.TXT for details. - * + * ****************************************************************************** * * Description: diff --git a/include/llvm/Debugger/Debugger.h b/include/llvm/Debugger/Debugger.h index 0d45187c5a..e708bc0edd 100644 --- a/include/llvm/Debugger/Debugger.h +++ b/include/llvm/Debugger/Debugger.h @@ -1,10 +1,10 @@ //===- Debugger.h - LLVM debugger library interface -------------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines the LLVM source-level debugger library interface. diff --git a/include/llvm/Debugger/InferiorProcess.h b/include/llvm/Debugger/InferiorProcess.h index c3f388654a..980e5cf892 100644 --- a/include/llvm/Debugger/InferiorProcess.h +++ b/include/llvm/Debugger/InferiorProcess.h @@ -1,10 +1,10 @@ //===- InferiorProcess.h - Represent the program being debugged -*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines the InferiorProcess class, which is used to represent, @@ -59,7 +59,7 @@ namespace llvm { static InferiorProcess *create(Module *M, const std::vector &Arguments, const char * const *envp); - + // InferiorProcess destructor - Kill the current process. If something // terrible happens, we throw an exception from the destructor. virtual ~InferiorProcess() {} diff --git a/include/llvm/Debugger/ProgramInfo.h b/include/llvm/Debugger/ProgramInfo.h index f7ee77dc31..b5f9402a19 100644 --- a/include/llvm/Debugger/ProgramInfo.h +++ b/include/llvm/Debugger/ProgramInfo.h @@ -1,10 +1,10 @@ //===- ProgramInfo.h - Information about the loaded program -----*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines various pieces of information about the currently loaded @@ -70,7 +70,7 @@ namespace llvm { public: SourceFileInfo(const GlobalVariable *Desc, const SourceLanguage &Lang); ~SourceFileInfo(); - + const std::string &getBaseName() const { return BaseName; } const std::string &getDirectory() const { return Directory; } unsigned getDebugVersion() const { return Version; } @@ -149,7 +149,7 @@ namespace llvm { /// with the program, through the getSourceFileFromDesc method. If ALL of /// the source files are needed, the getSourceFiles() method scans the /// entire program looking for them. - /// + /// std::multimap SourceFileIndex; /// SourceFunctions - This map contains entries functions in the source @@ -163,7 +163,7 @@ namespace llvm { /// effectively a small map from the languages that are active in the /// program to their caches. This can be accessed by the language by the /// "getLanguageCache" method. - std::vector > LanguageCaches; public: ProgramInfo(Module *m); @@ -172,7 +172,7 @@ namespace llvm { /// getProgramTimeStamp - Return the time-stamp of the program when it was /// loaded. sys::TimeValue getProgramTimeStamp() const { return ProgramTimeStamp; } - + //===------------------------------------------------------------------===// // Interfaces to the source code files that make up the program. // diff --git a/include/llvm/Debugger/RuntimeInfo.h b/include/llvm/Debugger/RuntimeInfo.h index 5e798e8e24..2f4d37a148 100644 --- a/include/llvm/Debugger/RuntimeInfo.h +++ b/include/llvm/Debugger/RuntimeInfo.h @@ -1,10 +1,10 @@ //===- RuntimeInfo.h - Information about running program --------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines classes that capture various pieces of information about @@ -42,7 +42,7 @@ namespace llvm { const SourceFileInfo *SourceInfo; public: StackFrame(RuntimeInfo &RI, void *ParentFrameID); - + StackFrame &operator=(const StackFrame &RHS) { FrameID = RHS.FrameID; FunctionDesc = RHS.FunctionDesc; @@ -80,7 +80,7 @@ namespace llvm { /// CallStack - This caches information about the current stack trace of the /// program. This is lazily computed as needed. std::vector CallStack; - + /// CurrentFrame - The user can traverse the stack frame with the /// up/down/frame family of commands. This index indicates the current /// stack frame. diff --git a/include/llvm/Debugger/SourceFile.h b/include/llvm/Debugger/SourceFile.h index 042350ab1f..6d49fbe5d2 100644 --- a/include/llvm/Debugger/SourceFile.h +++ b/include/llvm/Debugger/SourceFile.h @@ -1,10 +1,10 @@ //===- SourceFile.h - Class to represent a source code file -----*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines the SourceFile class which is used to represent a single @@ -60,11 +60,11 @@ namespace llvm { /// getDescriptor - Return the debugging decriptor for this source file. /// const GlobalVariable *getDescriptor() const { return Descriptor; } - + /// getFilename - Return the fully resolved path that this file was loaded /// from. const std::string &getFilename() const { return Filename.toString(); } - + /// getSourceLine - Given a line number, return the start and end of the /// line in the file. If the line number is invalid, or if the file could /// not be loaded, null pointers are returned for the start and end of the @@ -72,7 +72,7 @@ namespace llvm { /// any newlines from the end of the line, to ease formatting of the text. void getSourceLine(unsigned LineNo, const char *&LineStart, const char *&LineEnd) const; - + /// getNumLines - Return the number of lines the source file contains. /// unsigned getNumLines() const { @@ -84,7 +84,7 @@ namespace llvm { /// readFile - Load Filename into memory /// void readFile(); - + /// calculateLineOffsets - Compute the LineOffset vector for the current /// file. void calculateLineOffsets() const; diff --git a/include/llvm/Debugger/SourceLanguage.h b/include/llvm/Debugger/SourceLanguage.h index 798e0fb49c..06f4381be0 100644 --- a/include/llvm/Debugger/SourceLanguage.h +++ b/include/llvm/Debugger/SourceLanguage.h @@ -1,10 +1,10 @@ //===- SourceLanguage.h - Interact with source languages --------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines the abstract SourceLanguage interface, which is used by the diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h index 1ede32dd92..13bc9ccc13 100644 --- a/include/llvm/ExecutionEngine/ExecutionEngine.h +++ b/include/llvm/ExecutionEngine/ExecutionEngine.h @@ -1,10 +1,10 @@ //===- ExecutionEngine.h - Abstract Execution Engine Interface --*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// // // This file defines the abstract interface that implements execution support @@ -57,7 +57,7 @@ public: ExecutionEngine(ModuleProvider *P); ExecutionEngine(Module *M); virtual ~ExecutionEngine(); - + Module &getModule() const { return CurMod; } const TargetData &getTargetData() const { return *TD; } diff --git a/include/llvm/ExecutionEngine/GenericValue.h b/include/llvm/ExecutionEngine/GenericValue.h index 6ea4366784..8740b31391 100644 --- a/include/llvm/ExecutionEngine/GenericValue.h +++ b/include/llvm/ExecutionEngine/GenericValue.h @@ -1,12 +1,12 @@ //===-- GenericValue.h - Represent any type of LLVM value -------*- C++ -*-===// -// +// // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// //===----------------------------------------------------------------------===// -// +// // The GenericValue class is used to represent an LLVM value of arbitrary type. // //===----------------------------------------------------------------------===// -- cgit v1.2.3