Purpose of PROLOG_LABEL in function prologue?

I've been building/dumping some x86_64 code and I've noticed that each of the routines has 3 temporary symbols, à la:

_main:
  pushq %rbp
Ltmp18:
  movq %rsp, %rbp
Ltmp19:
  subq $320, %rsp
Ltmp20:
  movl %ecx, -276(%rbp)

I've tracked them back to emitPrologue in X86RegisterInfo.cpp. I'm wonder what's their purpose?

They're filling up my symbol table...

Cameron Esfahani
dirty@apple.com

"All that is necessary for the triumph of evil is that good men do nothing."

Edmund Burke

EH ranges for unwind info. If you look later on in the file for the symbols you'll see them.

-eric

Oh, though they should be local and not exported at all.

-eric

I don't see any references to them, that's why I brought it up...

I'll look at why they're getting exported...

Interesting. Is this COFF? We may not emit the final debug info, but leave the ranges in. If they're filling up your symbol table then we likely need another type of assembler label for "COFF internal".

-eric

Yeah, this is for COFF.

Is there any reason why we couldn't skip emitting temporary labels in the COFF writer?

I tried that and everything looks okay...

EH and unwind labels? Probably no reason no.

-eric

You probably don't want temporary labels emitted into the symbol
table. This is what Mach-O and ELF do.

- Daniel