diff options
Diffstat (limited to 'include/llvm/CodeGen/FunctionLoweringInfo.h')
-rw-r--r-- | include/llvm/CodeGen/FunctionLoweringInfo.h | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/include/llvm/CodeGen/FunctionLoweringInfo.h b/include/llvm/CodeGen/FunctionLoweringInfo.h index e7544bd7b70c..7d7c3e8cfd22 100644 --- a/include/llvm/CodeGen/FunctionLoweringInfo.h +++ b/include/llvm/CodeGen/FunctionLoweringInfo.h @@ -1,4 +1,4 @@ -//===-- FunctionLoweringInfo.h - Lower functions from LLVM IR to CodeGen --===// +//===- FunctionLoweringInfo.h - Lower functions from LLVM IR to CodeGen ---===// // // The LLVM Compiler Infrastructure // @@ -23,29 +23,28 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/ISDOpcodes.h" #include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/IR/InlineAsm.h" #include "llvm/IR/Instructions.h" +#include "llvm/IR/Type.h" +#include "llvm/IR/Value.h" #include "llvm/Support/KnownBits.h" #include "llvm/Target/TargetRegisterInfo.h" +#include <cassert> +#include <utility> #include <vector> namespace llvm { -class AllocaInst; +class Argument; class BasicBlock; class BranchProbabilityInfo; class Function; -class GlobalVariable; class Instruction; -class MachineInstr; -class MachineBasicBlock; class MachineFunction; -class MachineModuleInfo; +class MachineInstr; class MachineRegisterInfo; -class SelectionDAG; class MVT; +class SelectionDAG; class TargetLowering; -class Value; //===--------------------------------------------------------------------===// /// FunctionLoweringInfo - This contains information that is global to a @@ -74,25 +73,24 @@ public: /// A map from swifterror value in a basic block to the virtual register it is /// currently represented by. - llvm::DenseMap<std::pair<const MachineBasicBlock *, const Value *>, unsigned> + DenseMap<std::pair<const MachineBasicBlock *, const Value *>, unsigned> SwiftErrorVRegDefMap; /// A list of upward exposed vreg uses that need to be satisfied by either a /// copy def or a phi node at the beginning of the basic block representing /// the predecessor(s) swifterror value. - llvm::DenseMap<std::pair<const MachineBasicBlock *, const Value *>, unsigned> + DenseMap<std::pair<const MachineBasicBlock *, const Value *>, unsigned> SwiftErrorVRegUpwardsUse; /// The swifterror argument of the current function. const Value *SwiftErrorArg; - typedef SmallVector<const Value*, 1> SwiftErrorValues; + using SwiftErrorValues = SmallVector<const Value*, 1>; /// A function can only have a single swifterror argument. And if it does /// have a swifterror argument, it must be the first entry in /// SwiftErrorVals. SwiftErrorValues SwiftErrorVals; - /// Get or create the swifterror value virtual register in /// SwiftErrorVRegDefMap for this basic block. unsigned getOrCreateSwiftErrorVReg(const MachineBasicBlock *, @@ -118,7 +116,7 @@ public: /// slot), and we track that here. struct StatepointSpillMap { - typedef DenseMap<const Value *, Optional<int>> SlotMapTy; + using SlotMapTy = DenseMap<const Value *, Optional<int>>; /// Maps uniqued llvm IR values to the slots they were spilled in. If a /// value is mapped to None it means we visited the value but didn't spill @@ -172,8 +170,9 @@ public: struct LiveOutInfo { unsigned NumSignBits : 31; unsigned IsValid : 1; - KnownBits Known; - LiveOutInfo() : NumSignBits(0), IsValid(true), Known(1) {} + KnownBits Known = 1; + + LiveOutInfo() : NumSignBits(0), IsValid(true) {} }; /// Record the preferred extend type (ISD::SIGN_EXTEND or ISD::ZERO_EXTEND) @@ -298,4 +297,4 @@ private: } // end namespace llvm -#endif +#endif // LLVM_CODEGEN_FUNCTIONLOWERINGINFO_H |