I was looking into the AsmPrinter and the method EmitSectionOffset which
contains this code:
So, clearly the optimization is making things worse. Would it be okay to delete
this code and eliminate the isBaseAddressKnownZero? I would like to get rid of
it.
I think it is OK. I can see ld/gdb expecting a relocation, but if that is the case we should just have a flag saying it is needed.
If you are really motivated to check it, run the gdb testsuite with your patch, but on ELF our debug info is still too big to be usable.
- Jan
Cheers,
Rafael
Will the testsuite work on ELF? The patch does not make any functional change
for the other formats. I know that gdb is okay with the example, but that
doesn't say very much.
- Jan
Will the testsuite work on ELF? The patch does not make any functional change
for the other formats. I know that gdb is okay with the example, but that
doesn't say very much.
The patch is probably OK then. The gdb testsuite works with clang on ELF. There used to be a lot of silly failures like it not expecting clang warnings, but I think most of the current ones are real.
- Jan
Cheers,
Rafael
Ok, I will try and run the testsuite and spend some time checking things before
I post a patch for review.
Thanks,
Jan
From: Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
To: llvmdev@cs.uiuc.edu
Sent: Thu, March 10, 2011 4:22:32 PM
Subject: Re: [LLVMdev] Detrimental optimization for reducing relocations.> So, clearly the optimization is making things worse. Would it be okay to
delete
> this code and eliminate the isBaseAddressKnownZero? I would like to get rid
of
> it.I think it is OK. I can see ld/gdb expecting a relocation, but if that
is the case we should just have a flag saying it is needed.If you are really motivated to check it, run the gdb testsuite with your
patch, but on ELF our debug info is still too big to be usable.> - Jan
Cheers,
Rafael
I ran the gdb tests with and without the patch and there was no difference. I
attached the patch.
Thanks,
Jan
0047_sectionbasezerodelete.patch (2.26 KB)
s with and without the patch and there was no difference. I
attached the patch.
LGTM!
Thanks,
Cheers,
Rafael