[llvm-commits] CVS: llvm/include/llvm/Reoptimizer/Mapping/MappingInfo.h
Brian Gaeke
gaeke at cs.uiuc.edu
Wed Jun 4 17:03:01 PDT 2003
Changes in directory llvm/include/llvm/Reoptimizer/Mapping:
MappingInfo.h updated: 1.1 -> 1.2
---
Log message:
Add file comment. Include <vector> and <string>. Update include guards
to reflect file's current location. Add definition of class
MappingInfo.
---
Diffs of the changes:
Index: llvm/include/llvm/Reoptimizer/Mapping/MappingInfo.h
diff -u llvm/include/llvm/Reoptimizer/Mapping/MappingInfo.h:1.1 llvm/include/llvm/Reoptimizer/Mapping/MappingInfo.h:1.2
--- llvm/include/llvm/Reoptimizer/Mapping/MappingInfo.h:1.1 Mon Jul 22 17:09:35 2002
+++ llvm/include/llvm/Reoptimizer/Mapping/MappingInfo.h Wed Jun 4 17:02:47 2003
@@ -1,11 +1,38 @@
-#ifndef LLVM_CODEGEN_MAPPINGINFO_H
-#define LLVM_CODEGEN_MAPPINGINFO_H
+//===- llvm/Reoptimizer/Mapping/MappingInfo.h ------------------*- C++ -*--=////
+//
+// Data structures to support the Reoptimizer's Instruction-to-MachineInstr
+// mapping information gatherer.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_REOPTIMIZER_MAPPING_MAPPINGINFO_H
+#define LLVM_REOPTIMIZER_MAPPING_MAPPINGINFO_H
#include <iosfwd>
+#include <vector>
+#include <string>
class Pass;
-Pass *MappingInfoForFunction(std::ostream &out);
-
-#endif
+Pass *getMappingInfoCollector(std::ostream &out);
+class MappingInfo {
+ class byteVector : public std::vector <unsigned char> {
+ public:
+ void dumpAssembly (std::ostream &Out);
+ };
+ std::string comment;
+ std::string symbolPrefix;
+ unsigned functionNumber;
+ byteVector bytes;
+public:
+ void outByte (unsigned char b) { bytes.push_back (b); }
+ MappingInfo (std::string _comment, std::string _symbolPrefix,
+ unsigned _functionNumber) : comment(_comment),
+ symbolPrefix(_symbolPrefix), functionNumber(_functionNumber) { }
+ void dumpAssembly (std::ostream &Out);
+ unsigned char *getBytes (unsigned int &length) {
+ length = bytes.size(); return &bytes[0];
+ }
+};
+#endif
More information about the llvm-commits
mailing list