diff options
| author | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2018-03-08 10:38:45 +0000 |
|---|---|---|
| committer | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2018-03-08 10:38:45 +0000 |
| commit | 30e94029d8d4aeb3584319b6cd696016c206b217 (patch) | |
| tree | b9f5d6ad647a2459961883009be85b3e308ab059 /llvm | |
| parent | a406796f5f690da895015c4106a9289d88408c93 (diff) | |
| download | bcm5719-llvm-30e94029d8d4aeb3584319b6cd696016c206b217.tar.gz bcm5719-llvm-30e94029d8d4aeb3584319b6cd696016c206b217.zip | |
[MCSchedule] Always generate processor resource names.
With this patch, the tablegen 'SubtargetEmitter' always generates processor
resource names.
The impact of this patch on the code size of other llvm tools is small. I have
observed an average increase of 0.03% in code size when doing a release build of
LLVM (on windows, using MSVC) with all the default backends.
This change is done in preparation for the upcoming llvm-mca patch.
llvm-svn: 326993
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/MC/MCSchedule.h | 2 | ||||
| -rw-r--r-- | llvm/utils/TableGen/SubtargetEmitter.cpp | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/llvm/include/llvm/MC/MCSchedule.h b/llvm/include/llvm/MC/MCSchedule.h index d2e6db0e340..b6afab96067 100644 --- a/llvm/include/llvm/MC/MCSchedule.h +++ b/llvm/include/llvm/MC/MCSchedule.h @@ -24,9 +24,7 @@ struct InstrItinerary; /// Define a kind of processor resource that will be modeled by the scheduler. struct MCProcResourceDesc { -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) const char *Name; -#endif unsigned NumUnits; // Number of resource of this kind unsigned SuperIdx; // Index of the resources kind that contains this kind. diff --git a/llvm/utils/TableGen/SubtargetEmitter.cpp b/llvm/utils/TableGen/SubtargetEmitter.cpp index 97b8d116868..7cfd062ab7b 100644 --- a/llvm/utils/TableGen/SubtargetEmitter.cpp +++ b/llvm/utils/TableGen/SubtargetEmitter.cpp @@ -616,7 +616,7 @@ void SubtargetEmitter::EmitProcessorResources(const CodeGenProcModel &ProcModel, OS << "static const llvm::MCProcResourceDesc " << ProcModel.ModelName << "ProcResources" << "[] = {\n" - << " {DBGFIELD(\"InvalidUnit\") 0, 0, 0, 0},\n"; + << " {\"InvalidUnit\", 0, 0, 0, 0},\n"; unsigned SubUnitsOffset = 1; for (unsigned i = 0, e = ProcModel.ProcResourceDefs.size(); i < e; ++i) { @@ -645,7 +645,7 @@ void SubtargetEmitter::EmitProcessorResources(const CodeGenProcModel &ProcModel, NumUnits = PRDef->getValueAsInt("NumUnits"); } // Emit the ProcResourceDesc - OS << " {DBGFIELD(\"" << PRDef->getName() << "\") "; + OS << " {\"" << PRDef->getName() << "\", "; if (PRDef->getName().size() < 15) OS.indent(15 - PRDef->getName().size()); OS << NumUnits << ", " << SuperIdx << ", " << BufferSize << ", "; |

