Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209105 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
NAKAMURA Takumi
2014-05-19 04:43:03 +00:00
parent 6ec950549b
commit 14c7036563
6 changed files with 27 additions and 28 deletions

View File

@ -21,7 +21,7 @@ namespace llvm {
class Value; class Value;
class DataLayout; class DataLayout;
class TargetLibraryInfo; class TargetLibraryInfo;
/// CastToCStr - Return V if it is an i8*, otherwise cast it to i8*. /// CastToCStr - Return V if it is an i8*, otherwise cast it to i8*.
Value *CastToCStr(Value *V, IRBuilder<> &B); Value *CastToCStr(Value *V, IRBuilder<> &B);

View File

@ -55,13 +55,13 @@ struct ClonedCodeInfo {
/// ContainsCalls - This is set to true if the cloned code contains a normal /// ContainsCalls - This is set to true if the cloned code contains a normal
/// call instruction. /// call instruction.
bool ContainsCalls; bool ContainsCalls;
/// ContainsDynamicAllocas - This is set to true if the cloned code contains /// ContainsDynamicAllocas - This is set to true if the cloned code contains
/// a 'dynamic' alloca. Dynamic allocas are allocas that are either not in /// a 'dynamic' alloca. Dynamic allocas are allocas that are either not in
/// the entry block or they are in the entry block but are not a constant /// the entry block or they are in the entry block but are not a constant
/// size. /// size.
bool ContainsDynamicAllocas; bool ContainsDynamicAllocas;
ClonedCodeInfo() : ContainsCalls(false), ContainsDynamicAllocas(false) {} ClonedCodeInfo() : ContainsCalls(false), ContainsDynamicAllocas(false) {}
}; };
@ -129,7 +129,7 @@ void CloneFunctionInto(Function *NewFunc, const Function *OldFunc,
ValueToValueMapTy &VMap, ValueToValueMapTy &VMap,
bool ModuleLevelChanges, bool ModuleLevelChanges,
SmallVectorImpl<ReturnInst*> &Returns, SmallVectorImpl<ReturnInst*> &Returns,
const char *NameSuffix = "", const char *NameSuffix = "",
ClonedCodeInfo *CodeInfo = nullptr, ClonedCodeInfo *CodeInfo = nullptr,
ValueMapTypeRemapper *TypeMapper = nullptr, ValueMapTypeRemapper *TypeMapper = nullptr,
ValueMaterializer *Materializer = nullptr); ValueMaterializer *Materializer = nullptr);
@ -149,19 +149,19 @@ void CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc,
ValueToValueMapTy &VMap, ValueToValueMapTy &VMap,
bool ModuleLevelChanges, bool ModuleLevelChanges,
SmallVectorImpl<ReturnInst*> &Returns, SmallVectorImpl<ReturnInst*> &Returns,
const char *NameSuffix = "", const char *NameSuffix = "",
ClonedCodeInfo *CodeInfo = nullptr, ClonedCodeInfo *CodeInfo = nullptr,
const DataLayout *DL = nullptr, const DataLayout *DL = nullptr,
Instruction *TheCall = nullptr); Instruction *TheCall = nullptr);
/// InlineFunctionInfo - This class captures the data input to the /// InlineFunctionInfo - This class captures the data input to the
/// InlineFunction call, and records the auxiliary results produced by it. /// InlineFunction call, and records the auxiliary results produced by it.
class InlineFunctionInfo { class InlineFunctionInfo {
public: public:
explicit InlineFunctionInfo(CallGraph *cg = nullptr, const DataLayout *DL = nullptr) explicit InlineFunctionInfo(CallGraph *cg = nullptr, const DataLayout *DL = nullptr)
: CG(cg), DL(DL) {} : CG(cg), DL(DL) {}
/// CG - If non-null, InlineFunction will update the callgraph to reflect the /// CG - If non-null, InlineFunction will update the callgraph to reflect the
/// changes it makes. /// changes it makes.
CallGraph *CG; CallGraph *CG;
@ -174,13 +174,13 @@ public:
/// InlinedCalls - InlineFunction fills this in with callsites that were /// InlinedCalls - InlineFunction fills this in with callsites that were
/// inlined from the callee. This is only filled in if CG is non-null. /// inlined from the callee. This is only filled in if CG is non-null.
SmallVector<WeakVH, 8> InlinedCalls; SmallVector<WeakVH, 8> InlinedCalls;
void reset() { void reset() {
StaticAllocas.clear(); StaticAllocas.clear();
InlinedCalls.clear(); InlinedCalls.clear();
} }
}; };
/// InlineFunction - This function inlines the called function into the basic /// InlineFunction - This function inlines the called function into the basic
/// block of the caller. This returns false if it is not possible to inline /// block of the caller. This returns false if it is not possible to inline
/// this call. The program is still in a well defined state if this occurs /// this call. The program is still in a well defined state if this occurs

View File

@ -63,4 +63,3 @@ namespace llvm {
} // end namespace llvm } // end namespace llvm
#endif #endif

View File

@ -55,16 +55,16 @@ namespace llvm {
/// @brief Replace Rem with generated code. /// @brief Replace Rem with generated code.
bool expandRemainderUpTo64Bits(BinaryOperator *Rem); bool expandRemainderUpTo64Bits(BinaryOperator *Rem);
/// Generate code to divide two integers, replacing Div with the generated /// Generate code to divide two integers, replacing Div with the generated
/// code. Uses ExpandDivision with a 32bit Div which makes it useful for /// code. Uses ExpandDivision with a 32bit Div which makes it useful for
/// targets with little or no support for less than 32 bit arithmetic. /// targets with little or no support for less than 32 bit arithmetic.
/// ///
/// @brief Replace Rem with generated code. /// @brief Replace Rem with generated code.
bool expandDivisionUpTo32Bits(BinaryOperator *Div); bool expandDivisionUpTo32Bits(BinaryOperator *Div);
/// Generate code to divide two integers, replacing Div with the generated /// Generate code to divide two integers, replacing Div with the generated
/// code. Uses ExpandDivision with a 64bit Div. /// code. Uses ExpandDivision with a 64bit Div.
/// ///
/// @brief Replace Rem with generated code. /// @brief Replace Rem with generated code.
bool expandDivisionUpTo64Bits(BinaryOperator *Div); bool expandDivisionUpTo64Bits(BinaryOperator *Div);

View File

@ -137,27 +137,27 @@ public:
LoadAndStorePromoter(const SmallVectorImpl<Instruction*> &Insts, LoadAndStorePromoter(const SmallVectorImpl<Instruction*> &Insts,
SSAUpdater &S, StringRef Name = StringRef()); SSAUpdater &S, StringRef Name = StringRef());
virtual ~LoadAndStorePromoter() {} virtual ~LoadAndStorePromoter() {}
/// \brief This does the promotion. /// \brief This does the promotion.
/// ///
/// Insts is a list of loads and stores to promote, and Name is the basename /// Insts is a list of loads and stores to promote, and Name is the basename
/// for the PHIs to insert. After this is complete, the loads and stores are /// for the PHIs to insert. After this is complete, the loads and stores are
/// removed from the code. /// removed from the code.
void run(const SmallVectorImpl<Instruction*> &Insts) const; void run(const SmallVectorImpl<Instruction*> &Insts) const;
/// \brief Return true if the specified instruction is in the Inst list. /// \brief Return true if the specified instruction is in the Inst list.
/// ///
/// The Insts list is the one passed into the constructor. Clients should /// The Insts list is the one passed into the constructor. Clients should
/// implement this with a more efficient version if possible. /// implement this with a more efficient version if possible.
virtual bool isInstInList(Instruction *I, virtual bool isInstInList(Instruction *I,
const SmallVectorImpl<Instruction*> &Insts) const; const SmallVectorImpl<Instruction*> &Insts) const;
/// \brief This hook is invoked after all the stores are found and inserted as /// \brief This hook is invoked after all the stores are found and inserted as
/// available values. /// available values.
virtual void doExtraRewritesBeforeFinalDeletion() const { virtual void doExtraRewritesBeforeFinalDeletion() const {
} }
/// \brief Clients can choose to implement this to get notified right before /// \brief Clients can choose to implement this to get notified right before
/// a load is RAUW'd another value. /// a load is RAUW'd another value.
virtual void replaceLoadWithValue(LoadInst *LI, Value *V) const { virtual void replaceLoadWithValue(LoadInst *LI, Value *V) const {

View File

@ -28,7 +28,7 @@ namespace llvm {
virtual void anchor(); // Out of line method. virtual void anchor(); // Out of line method.
public: public:
virtual ~ValueMapTypeRemapper() {} virtual ~ValueMapTypeRemapper() {}
/// remapType - The client should implement this method if they want to /// remapType - The client should implement this method if they want to
/// remap types while mapping values. /// remap types while mapping values.
virtual Type *remapType(Type *SrcTy) = 0; virtual Type *remapType(Type *SrcTy) = 0;
@ -46,26 +46,26 @@ namespace llvm {
/// lazily. /// lazily.
virtual Value *materializeValueFor(Value *V) = 0; virtual Value *materializeValueFor(Value *V) = 0;
}; };
/// RemapFlags - These are flags that the value mapping APIs allow. /// RemapFlags - These are flags that the value mapping APIs allow.
enum RemapFlags { enum RemapFlags {
RF_None = 0, RF_None = 0,
/// RF_NoModuleLevelChanges - If this flag is set, the remapper knows that /// RF_NoModuleLevelChanges - If this flag is set, the remapper knows that
/// only local values within a function (such as an instruction or argument) /// only local values within a function (such as an instruction or argument)
/// are mapped, not global values like functions and global metadata. /// are mapped, not global values like functions and global metadata.
RF_NoModuleLevelChanges = 1, RF_NoModuleLevelChanges = 1,
/// RF_IgnoreMissingEntries - If this flag is set, the remapper ignores /// RF_IgnoreMissingEntries - If this flag is set, the remapper ignores
/// entries that are not in the value map. If it is unset, it aborts if an /// entries that are not in the value map. If it is unset, it aborts if an
/// operand is asked to be remapped which doesn't exist in the mapping. /// operand is asked to be remapped which doesn't exist in the mapping.
RF_IgnoreMissingEntries = 2 RF_IgnoreMissingEntries = 2
}; };
static inline RemapFlags operator|(RemapFlags LHS, RemapFlags RHS) { static inline RemapFlags operator|(RemapFlags LHS, RemapFlags RHS) {
return RemapFlags(unsigned(LHS)|unsigned(RHS)); return RemapFlags(unsigned(LHS)|unsigned(RHS));
} }
Value *MapValue(const Value *V, ValueToValueMapTy &VM, Value *MapValue(const Value *V, ValueToValueMapTy &VM,
RemapFlags Flags = RF_None, RemapFlags Flags = RF_None,
ValueMapTypeRemapper *TypeMapper = nullptr, ValueMapTypeRemapper *TypeMapper = nullptr,
@ -75,7 +75,7 @@ namespace llvm {
RemapFlags Flags = RF_None, RemapFlags Flags = RF_None,
ValueMapTypeRemapper *TypeMapper = nullptr, ValueMapTypeRemapper *TypeMapper = nullptr,
ValueMaterializer *Materializer = nullptr); ValueMaterializer *Materializer = nullptr);
/// MapValue - provide versions that preserve type safety for MDNode and /// MapValue - provide versions that preserve type safety for MDNode and
/// Constants. /// Constants.
inline MDNode *MapValue(const MDNode *V, ValueToValueMapTy &VM, inline MDNode *MapValue(const MDNode *V, ValueToValueMapTy &VM,
@ -92,7 +92,7 @@ namespace llvm {
return cast<Constant>(MapValue((const Value*)V, VM, Flags, TypeMapper, return cast<Constant>(MapValue((const Value*)V, VM, Flags, TypeMapper,
Materializer)); Materializer));
} }
} // End llvm namespace } // End llvm namespace