Re: [PATCH] D21006: [Driver] Make -flto -S emit assembly

2016-06-05 Thread Mehdi Amini via cfe-commits
But what pipeline do we setup? For instance with ThinLTO we reduced the amount of passes ran during the compile phase with the expectation that more will run during the link, this would get fuzzy here... > On Jun 5, 2016, at 6:49 PM, Davide Italiano wrote: > > davide

Re: [PATCH] D21006: [Driver] Make -flto -S emit assembly

2016-06-05 Thread Mehdi AMINI via cfe-commits
mehdi_amini added a comment. But what pipeline do we setup? For instance with ThinLTO we reduced the amount of passes ran during the compile phase with the expectation that more will run during the link, this would get fuzzy here... http://reviews.llvm.org/D21006

Re: [PATCH] D21006: [Driver] Make -flto -S emit assembly

2016-06-05 Thread Davide Italiano via cfe-commits
davide added a comment. In http://reviews.llvm.org/D21006#449409, @dexonsmith wrote: > I agree with Mehdi. I expect `-S -flto` to give equivalent output to `-c > -flto`. > > In effect, with this change, `-flto -S` would silently ignore the `-flto` > flag. That doesn't make sense to me. I

Re: [PATCH] D21006: [Driver] Make -flto -S emit assembly

2016-06-05 Thread Rafael Ávila de Espíndola via cfe-commits
rafael added a comment. Fair enough, let's keep it as is and try to update the build. Cheers, Rafael http://reviews.llvm.org/D21006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21006: [Driver] Make -flto -S emit assembly

2016-06-05 Thread Rafael Espíndola via cfe-commits
Fair enough, let's keep it as is and try to update the build. Cheers, Rafael On Jun 5, 2016 9:28 PM, "Mehdi AMINI" wrote: > mehdi_amini added a comment. > > What makes me not comfortable with this change is that after that `-c` > would not involves codegen but `-S`

Re: [PATCH] D21006: [Driver] Make -flto -S emit assembly

2016-06-05 Thread Duncan P. N. Exon Smith via cfe-commits
I agree with Mehdi. I expect `-S -flto` to give equivalent output to `-c -flto`. In effect, with this change, `-flto -S` would silently ignore the `-flto` flag. That doesn't make sense to me. > On 2016-Jun-05, at 18:28, Mehdi AMINI wrote: > > mehdi_amini added a

Re: [PATCH] D21006: [Driver] Make -flto -S emit assembly

2016-06-05 Thread Duncan P. N. Exon Smith via cfe-commits
dexonsmith added a subscriber: dexonsmith. dexonsmith added a comment. I agree with Mehdi. I expect `-S -flto` to give equivalent output to `-c -flto`. In effect, with this change, `-flto -S` would silently ignore the `-flto` flag. That doesn't make sense to me.

Re: [PATCH] D21006: [Driver] Make -flto -S emit assembly

2016-06-05 Thread Mehdi AMINI via cfe-commits
mehdi_amini added a comment. What makes me not comfortable with this change is that after that `-c` would not involves codegen but `-S` would. Indeed I am using sometimes `-flto -S` and I expect IR, that's what is the most logical to me considering what -c does.

Re: [PATCH] D21006: [Driver] Make -flto -S emit assembly

2016-06-05 Thread Rafael Espíndola via cfe-commits
OK, it prints assembly with ir in it. That doesn't apply to us since .BC is not elf. I guess we could just produce assembly. A .ll cannot be used for lto. So I guess this is OK, but please wait to see what others think. Cheers, Rafael On Jun 5, 2016 7:45 PM, "Davide Italiano"

Re: [PATCH] D21006: [Driver] Make -flto -S emit assembly

2016-06-05 Thread Rafael Ávila de Espíndola via cfe-commits
rafael added a comment. OK, it prints assembly with ir in it. That doesn't apply to us since .BC is not elf. I guess we could just produce assembly. A .ll cannot be used for lto. So I guess this is OK, but please wait to see what others think. Cheers, Rafael http://reviews.llvm.org/D21006

Re: [PATCH] D21006: [Driver] Make -flto -S emit assembly

2016-06-05 Thread Davide Italiano via cfe-commits
davide added a comment. In http://reviews.llvm.org/D21006#449380, @rafael wrote: > Can you check what GCC does? Sure. $ gcc flto.c -o flto.o -flto -S && cat flto.o |head -n 15 .file "flto.c" .section.gnu.lto_.inline.513e7babbe55b1f8,"e",@progbits .string

Re: [PATCH] D21006: [Driver] Make -flto -S emit assembly

2016-06-05 Thread Rafael Ávila de Espíndola via cfe-commits
rafael added a subscriber: rafael. rafael added a comment. Can you check what GCC does? http://reviews.llvm.org/D21006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21006: [Driver] Make -flto -S emit assembly

2016-06-05 Thread Rafael Espíndola via cfe-commits
Can you check what GCC does? On Jun 5, 2016 6:40 PM, "Mehdi AMINI" wrote: > mehdi_amini added a comment. > > Duncan CC for opinion. > > > http://reviews.llvm.org/D21006 > > > > ___ cfe-commits mailing list

Re: [PATCH] D21006: [Driver] Make -flto -S emit assembly

2016-06-05 Thread Mehdi AMINI via cfe-commits
mehdi_amini added a comment. Duncan CC for opinion. http://reviews.llvm.org/D21006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21006: [Driver] Make -flto -S emit assembly

2016-06-05 Thread Davide Italiano via cfe-commits
davide added a comment. In http://reviews.llvm.org/D21006#449365, @mehdi_amini wrote: > I'm not sure it is consistent with how we handle -flto, for instance -c means > usually to output an object file, but adding -flto indicates to dump bitcode > instead. I see two alternative approaches:

Re: [PATCH] D21006: [Driver] Make -flto -S emit assembly

2016-06-05 Thread Mehdi AMINI via cfe-commits
mehdi_amini added a comment. I'm not sure it is consistent with how we handle -flto, for instance -c means usually to output an object file, but adding -flto indicates to dump bitcode instead. http://reviews.llvm.org/D21006 ___ cfe-commits

Re: [PATCH] D21006: [Driver] Make -flto -S emit assembly

2016-06-05 Thread Davide Italiano via cfe-commits
davide updated this revision to Diff 59679. davide added a comment. Add a test, fix a typo. http://reviews.llvm.org/D21006 Files: lib/Driver/Driver.cpp test/CodeGen/2009-10-20-GlobalDebug.c test/CodeGen/emit-asm.c test/CodeGenCXX/cxx-apple-kext.cpp