diff options
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/AsmPrinter.h | 7 | ||||
-rw-r--r-- | include/llvm/CodeGen/BasicTTIImpl.h | 5 | ||||
-rw-r--r-- | include/llvm/CodeGen/DIE.h | 9 | ||||
-rw-r--r-- | include/llvm/CodeGen/GlobalISel/IRTranslator.h | 6 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineBasicBlock.h | 2 |
5 files changed, 21 insertions, 8 deletions
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h index be8822df3dba..f0be955110fb 100644 --- a/include/llvm/CodeGen/AsmPrinter.h +++ b/include/llvm/CodeGen/AsmPrinter.h @@ -140,6 +140,9 @@ private: /// If the target supports dwarf debug info, this pointer is non-null. DwarfDebug *DD; + /// If the current module uses dwarf CFI annotations strictly for debugging. + bool isCFIMoveForDebugging; + protected: explicit AsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer); @@ -262,6 +265,10 @@ public: enum CFIMoveType { CFI_M_None, CFI_M_EH, CFI_M_Debug }; CFIMoveType needsCFIMoves(); + /// Returns false if needsCFIMoves() == CFI_M_EH for any function + /// in the module. + bool needsOnlyDebugCFIMoves() const { return isCFIMoveForDebugging; } + bool needsSEHMoves(); /// Print to the current output stream assembly representations of the diff --git a/include/llvm/CodeGen/BasicTTIImpl.h b/include/llvm/CodeGen/BasicTTIImpl.h index df0dc1a38ae7..8e96336b981f 100644 --- a/include/llvm/CodeGen/BasicTTIImpl.h +++ b/include/llvm/CodeGen/BasicTTIImpl.h @@ -925,7 +925,10 @@ public: return LT.first; } - unsigned getAddressComputationCost(Type *Ty, bool IsComplex) { return 0; } + unsigned getAddressComputationCost(Type *Ty, ScalarEvolution *, + const SCEV *) { + return 0; + } unsigned getReductionCost(unsigned Opcode, Type *Ty, bool IsPairwise) { assert(Ty->isVectorTy() && "Expect a vector type"); diff --git a/include/llvm/CodeGen/DIE.h b/include/llvm/CodeGen/DIE.h index 1e3476cd8395..09c3bf6a1b56 100644 --- a/include/llvm/CodeGen/DIE.h +++ b/include/llvm/CodeGen/DIE.h @@ -651,6 +651,9 @@ class DIE : IntrusiveBackListNode, public DIEValueList { unsigned AbbrevNumber = ~0u; /// Dwarf tag code. dwarf::Tag Tag = (dwarf::Tag)0; + /// Set to true to force a DIE to emit an abbreviation that says it has + /// children even when it doesn't. This is used for unit testing purposes. + bool ForceChildren; /// Children DIEs. IntrusiveBackList<DIE> Children; @@ -659,7 +662,8 @@ class DIE : IntrusiveBackListNode, public DIEValueList { PointerUnion<DIE *, DIEUnit *> Owner; DIE() = delete; - explicit DIE(dwarf::Tag Tag) : Offset(0), Size(0), Tag(Tag) {} + explicit DIE(dwarf::Tag Tag) : Offset(0), Size(0), Tag(Tag), + ForceChildren(false) {} public: static DIE *get(BumpPtrAllocator &Alloc, dwarf::Tag Tag) { @@ -677,7 +681,8 @@ public: /// Get the compile/type unit relative offset of this DIE. unsigned getOffset() const { return Offset; } unsigned getSize() const { return Size; } - bool hasChildren() const { return !Children.empty(); } + bool hasChildren() const { return ForceChildren || !Children.empty(); } + void setForceChildren(bool B) { ForceChildren = B; } typedef IntrusiveBackList<DIE>::iterator child_iterator; typedef IntrusiveBackList<DIE>::const_iterator const_child_iterator; diff --git a/include/llvm/CodeGen/GlobalISel/IRTranslator.h b/include/llvm/CodeGen/GlobalISel/IRTranslator.h index 76e0d47ceea3..26ba5c67beb5 100644 --- a/include/llvm/CodeGen/GlobalISel/IRTranslator.h +++ b/include/llvm/CodeGen/GlobalISel/IRTranslator.h @@ -180,6 +180,8 @@ private: /// \pre \p U is a branch instruction. bool translateBr(const User &U, MachineIRBuilder &MIRBuilder); + bool translateSwitch(const User &U, MachineIRBuilder &MIRBuilder); + bool translateExtractValue(const User &U, MachineIRBuilder &MIRBuilder); bool translateInsertValue(const User &U, MachineIRBuilder &MIRBuilder); @@ -292,12 +294,8 @@ private: return translateBinaryOp(TargetOpcode::G_FREM, U, MIRBuilder); } - // Stubs to keep the compiler happy while we implement the rest of the // translation. - bool translateSwitch(const User &U, MachineIRBuilder &MIRBuilder) { - return false; - } bool translateIndirectBr(const User &U, MachineIRBuilder &MIRBuilder) { return false; } diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h index be811c6fe437..92a9896d7a18 100644 --- a/include/llvm/CodeGen/MachineBasicBlock.h +++ b/include/llvm/CodeGen/MachineBasicBlock.h @@ -308,7 +308,7 @@ public: // Iteration support for live in sets. These sets are kept in sorted // order by their register number. typedef LiveInVector::const_iterator livein_iterator; - livein_iterator livein_begin() const { return LiveIns.begin(); } + livein_iterator livein_begin() const; livein_iterator livein_end() const { return LiveIns.end(); } bool livein_empty() const { return LiveIns.empty(); } iterator_range<livein_iterator> liveins() const { |