diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2018-06-04 16:12:33 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2018-06-04 16:12:33 +0000 |
commit | 38eba07f5f0267f415b9b3eac7820fb1caccdb91 (patch) | |
tree | 6f4adac95f806017f6262dee8217285ce42d4c92 /lib/Target/NVPTX/NVPTXAsmPrinter.h | |
parent | 47acfadfe75390a1f2133566c88824f6ea8e0ee1 (diff) |
[NVPTX] Delete dead code from the AsmPrinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333924 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/NVPTX/NVPTXAsmPrinter.h')
-rw-r--r-- | lib/Target/NVPTX/NVPTXAsmPrinter.h | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/lib/Target/NVPTX/NVPTXAsmPrinter.h b/lib/Target/NVPTX/NVPTXAsmPrinter.h index 9fe9c1e736f..02d1a041a15 100644 --- a/lib/Target/NVPTX/NVPTXAsmPrinter.h +++ b/lib/Target/NVPTX/NVPTXAsmPrinter.h @@ -41,7 +41,6 @@ #include "llvm/Target/TargetMachine.h" #include <algorithm> #include <cassert> -#include <fstream> #include <map> #include <memory> #include <string> @@ -60,27 +59,6 @@ namespace llvm { class MCOperand; -class LineReader { -private: - unsigned theCurLine; - std::ifstream fstr; - char buff[512]; - std::string theFileName; - SmallVector<unsigned, 32> lineOffset; - -public: - LineReader(std::string filename) { - theCurLine = 0; - fstr.open(filename.c_str()); - theFileName = filename; - } - - ~LineReader() { fstr.close(); } - - std::string fileName() { return theFileName; } - std::string readLine(unsigned line); -}; - class LLVM_LIBRARY_VISIBILITY NVPTXAsmPrinter : public AsmPrinter { class AggBuffer { @@ -217,8 +195,6 @@ class LLVM_LIBRARY_VISIBILITY NVPTXAsmPrinter : public AsmPrinter { friend class AggBuffer; - void emitSrcInText(StringRef filename, unsigned line); - private: StringRef getPassName() const override { return "NVPTX Assembly Printer"; } @@ -271,8 +247,6 @@ protected: bool doFinalization(Module &M) override; private: - std::string CurrentBankselLabelInBasicBlock; - bool GlobalsEmitted; // This is specific per MachineFunction. @@ -287,17 +261,9 @@ private: // Cache the subtarget here. const NVPTXSubtarget *nvptxSubtarget; - // Build the map between type name and ID based on module's type - // symbol table. - std::map<Type *, std::string> TypeNameMap; - // List of variables demoted to a function scope. std::map<const Function *, std::vector<const GlobalVariable *>> localDecls; - // To record filename to ID mapping - std::map<std::string, unsigned> filenameMap; - void recordAndEmitFilenames(Module &); - void emitPTXGlobalVariable(const GlobalVariable *GVar, raw_ostream &O); void emitPTXAddressSpace(unsigned int AddressSpace, raw_ostream &O) const; std::string getPTXFundamentalTypeStr(Type *Ty, bool = true) const; @@ -317,10 +283,6 @@ private: bool isLoopHeaderOfNoUnroll(const MachineBasicBlock &MBB) const; - LineReader *reader = nullptr; - - LineReader *getReader(const std::string &); - // Used to control the need to emit .generic() in the initializer of // module scope variables. // Although ptx supports the hybrid mode like the following, @@ -340,10 +302,6 @@ public: EmitGeneric(static_cast<NVPTXTargetMachine &>(TM).getDrvInterface() == NVPTX::CUDA) {} - ~NVPTXAsmPrinter() override { - delete reader; - } - bool runOnMachineFunction(MachineFunction &F) override; void getAnalysisUsage(AnalysisUsage &AU) const override { @@ -351,8 +309,6 @@ public: AsmPrinter::getAnalysisUsage(AU); } - bool ignoreLoc(const MachineInstr &); - std::string getVirtualRegisterName(unsigned) const; }; |