TargetELFWriterInfo used for anything?

Oops, sorry hit send too early – meant to just make a draft email. I’m still looking through, but so far I hadn’t seen many of its methods being used…

I see nothing in your mail body...

Perhaps it could have been removed when ELFWriter was removed in r147615?
http://llvm.org/viewvc/llvm-project?view=rev&revision=147615

Hi Jan,

  Why do you think TargetELFWriterInfo is not used (IIUC)?
I see a lot of targets inherit class TargetELFWriterInfo
for their ELF writer.

Regards,
chenwj

Hi Jan,

  Why do you think TargetELFWriterInfo is not used (IIUC)?
I see a lot of targets inherit class TargetELFWriterInfo
for their ELF writer.

Yes, a lot of targets inherit it, but it looks like nothing ever
calls getELFWriterInfo() (anymore) to get access to the instances.

Hi Jan,

  Why do you think TargetELFWriterInfo is not used (IIUC)?
I see a lot of targets inherit class TargetELFWriterInfo
for their ELF writer.

Yes, a lot of targets inherit it, but it looks like nothing ever
calls getELFWriterInfo() (anymore) to get access to the instances.

Via greping, I find that it is only used in XXXTargetMachine class.
Obviously its codes overlap with those in XXXELFObjectWriter class.

In consideration of those codes in XXXAsmPrinter class which print out
MachineInstr in .s format, I tend to think they are old codes that
might be obsolete and will be replaced with MC layer implementation,
but I am not sure.

Hope someone authoritative answer this question.

Regards.

In consideration of those codes in XXXAsmPrinter class which print out
MachineInstr in .s format, I tend to think they are old codes that
might be obsolete and will be replaced with MC layer implementation,
but I am not sure.

  How about sending a patch which remove those obsolete code, and let
others give comment?

Cheers,
chenwj

but some target like sparc still depends on those codes...

Someone had considered remove target like sparc before...
*sigh*

Regards,
chenwj

Ah, looks like Rafael removed it in rev 166902.

Thanks!

  • Jan