aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/InstrInfoEmitter.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-08-18 21:36:47 +0000
committerChris Lattner <sabre@nondot.org>2005-08-18 21:36:47 +0000
commita3ac88d8ab4605f6c1c298a8cdaa89d16c3756b4 (patch)
tree5cf70c6a46472497b5b41b28d8b7010cbc17a9c3 /utils/TableGen/InstrInfoEmitter.h
parent068ca15d5e1c55af57e2b0898c1ea6a5aee836c0 (diff)
downloadexternal_llvm-a3ac88d8ab4605f6c1c298a8cdaa89d16c3756b4.zip
external_llvm-a3ac88d8ab4605f6c1c298a8cdaa89d16c3756b4.tar.gz
external_llvm-a3ac88d8ab4605f6c1c298a8cdaa89d16c3756b4.tar.bz2
When emitting implicit use/def lists, only emit each unique list once. Though
LLVM is able to merge identical static const globals, GCC isn't, and this caused some bloat in the generated data. This has a marginal effect on PPC, shrinking the implicit sets from 10->4, but shrinks X86 from 179 to 23, a much bigger reduction. This should speed up the register allocator as well by reducing the dcache footprint for this static data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22879 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/InstrInfoEmitter.h')
-rw-r--r--utils/TableGen/InstrInfoEmitter.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/TableGen/InstrInfoEmitter.h b/utils/TableGen/InstrInfoEmitter.h
index 005fd38..8b516f1 100644
--- a/utils/TableGen/InstrInfoEmitter.h
+++ b/utils/TableGen/InstrInfoEmitter.h
@@ -16,6 +16,8 @@
#define INSTRINFO_EMITTER_H
#include "TableGenBackend.h"
+#include <vector>
+#include <map>
namespace llvm {
@@ -35,10 +37,12 @@ public:
// runEnums - Print out enum values for all of the instructions.
void runEnums(std::ostream &OS);
private:
- void printDefList(ListInit *LI, const std::string &Name,
+ void printDefList(const std::vector<Record*> &Uses, unsigned Num,
std::ostream &OS) const;
void emitRecord(const CodeGenInstruction &Inst, unsigned Num,
- Record *InstrInfo, std::ostream &OS);
+ Record *InstrInfo,
+ std::map<ListInit*, unsigned> &ListNumbers,
+ std::ostream &OS);
void emitShiftedValue(Record *R, StringInit *Val, IntInit *Shift,
std::ostream &OS);
};