[LLVMdev] MC ELFObjectWriter backend refactoring

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Nov 19 11:14:21 PST 2010


> 5. I could just add the MBlaze backend specific stuff into ELFObjectWriter
> like all of the other backends.
> Are their any other opinions on this? I personally prefer all of the MBlaze
> backend stuff to be contained inside of lib/Target/MBlaze so that I don't
> have to hunt around the LLVM source tree when I'm implementing/fixing the
> MBlaze backend. If #5 is preferred instead, then I can re-implement the
> MBlaze ELF stuff that way instead.

It probably depends on how much specific stuff you expect to be. If
the differences for ARM, X86, MBlaze, etc are just some constants and
the record relocation code, then it is probably better to have a
single ELF writer class that delegates to another class that does just
relocations and is implemented in the target directory.

Having the ELF writer class written in a header only looks like the
right solution if we do end up with per arch differences spread over
multiple methods.

Would you mind start by adding code to the existing file? Once we have
at least two working architectures we should have a better idea on how
to split it.

>
> --
> Wesley Peck
> University of Kansas
> SLDG Laboratory


Thanks,
Rafael



More information about the llvm-dev mailing list