[Patch] Add TargetLibraryInfo in LTO passes builder
Yi Jiang
yjiang at apple.com
Mon Dec 9 14:24:55 PST 2013
Hi Duncan,
Thank you for your information. However, I found the function body will be kept only we specify target triple = "x86_64-unknown-linux-gnu" in the source file. The function body will be cleaned up if we specify something like target triple = "x86_64-apple-darwin12.5.0". It is the same behavior on test/LTO/cfi_endproc.ll and my own test case, Do you know the reason? Thank you!
On Dec 7, 2013, at 1:56 AM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> On 2013 Dec 6, at 17:32, Yi Jiang <yjiang at apple.com> wrote:
>
>> Also I have difficult time creating the test cases. I tried to mimic the ones in test/lib/LTO but found out that the function body will be always cleaned up by SCCP, any suggestions on this? Thank you very much.
>
> Hi Yi,
>
> Unexported functions are given internal linkage by -internalize (and then can be optimized away by -ipsccp and -globalopt). You need to use -exported-symbol=foo. There’s an example of its use in test/LTO/cfi_endproc.ll.
>
> Cheers,
> Duncan
More information about the llvm-commits
mailing list