summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-03-07 06:08:31 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-03-07 06:08:31 +0000
commit7d7d99622fa1aa9445f3da1171b79ba2641efbc4 (patch)
treed04628a32120288ee11d8ccc52409c47a8157b3a /utils
parentec7ab535706e9a205c1cb84a86b33edc56117900 (diff)
downloadllvm-7d7d99622fa1aa9445f3da1171b79ba2641efbc4.tar.gz
llvm-7d7d99622fa1aa9445f3da1171b79ba2641efbc4.tar.bz2
llvm-7d7d99622fa1aa9445f3da1171b79ba2641efbc4.tar.xz
Replace PROLOG_LABEL with a new CFI_INSTRUCTION.
The old system was fairly convoluted: * A temporary label was created. * A single PROLOG_LABEL was created with it. * A few MCCFIInstructions were created with the same label. The semantics were that the cfi instructions were mapped to the PROLOG_LABEL via the temporary label. The output position was that of the PROLOG_LABEL. The temporary label itself was used only for doing the mapping. The new CFI_INSTRUCTION has a 1:1 mapping to MCCFIInstructions and points to one by holding an index into the CFI instructions of this function. I did consider removing MMI.getFrameInstructions completelly and having CFI_INSTRUCTION own a MCCFIInstruction, but MCCFIInstructions have non trivial constructors and destructors and are somewhat big, so the this setup is probably better. The net result is that we don't create temporary labels that are never used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203204 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/AsmWriterEmitter.cpp3
-rw-r--r--utils/TableGen/CodeGenTarget.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp
index b75e960dc3..131e27bf6e 100644
--- a/utils/TableGen/AsmWriterEmitter.cpp
+++ b/utils/TableGen/AsmWriterEmitter.cpp
@@ -152,7 +152,8 @@ FindUniqueOperandCommands(std::vector<std::string> &UniqueOperandCommands,
for (unsigned i = 0, e = NumberedInstructions->size(); i != e; ++i) {
const AsmWriterInst *Inst = getAsmWriterInstByID(i);
- if (Inst == 0) continue; // PHI, INLINEASM, PROLOG_LABEL, etc.
+ if (Inst == 0)
+ continue; // PHI, INLINEASM, CFI_INSTRUCTION, etc.
std::string Command;
if (Inst->Operands.empty())
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index 6f6acaa85f..1f47675eb5 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/utils/TableGen/CodeGenTarget.cpp
@@ -294,7 +294,7 @@ GetInstByName(const char *Name,
void CodeGenTarget::ComputeInstrsByEnum() const {
// The ordering here must match the ordering in TargetOpcodes.h.
static const char *const FixedInstrs[] = {
- "PHI", "INLINEASM", "PROLOG_LABEL", "EH_LABEL",
+ "PHI", "INLINEASM", "CFI_INSTRUCTION", "EH_LABEL",
"GC_LABEL", "KILL", "EXTRACT_SUBREG", "INSERT_SUBREG",
"IMPLICIT_DEF", "SUBREG_TO_REG", "COPY_TO_REGCLASS", "DBG_VALUE",
"REG_SEQUENCE", "COPY", "BUNDLE", "LIFETIME_START",