[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2022-09-06 Thread Zakk Chen via Phabricator via cfe-commits
khchen added a comment. In D71387#3755056 , @lewis-revill wrote: > I believe this patch is still relevant/necessary when using LTO for RISCV, so > can I ask if @khchen is able to update it to rebase/address the feedback? If > not, are there are any

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2022-09-06 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment. In D71387#3755056 , @lewis-revill wrote: > I believe this patch is still relevant/necessary when using LTO for RISCV, so > can I ask if @khchen is able to update it to rebase/address the feedback? If > not, are there are any

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2022-08-29 Thread Lewis Revill via Phabricator via cfe-commits
lewis-revill added a comment. Herald added subscribers: sunshaoce, pcwang-thead, VincentWu, luke957, StephenFan, arichardson. Herald added a project: All. I believe this patch is still relevant/necessary when using LTO for RISCV, so can I ask if @khchen is able to update it to rebase/address

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2021-07-06 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:633 + // pass more options in specific target + switch (ToolChain.getArch()) { Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:634-638 + switch

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2021-07-04 Thread Zakk Chen via Phabricator via cfe-commits
khchen updated this revision to Diff 356425. khchen added a comment. Update test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71387/new/ https://reviews.llvm.org/D71387 Files: clang/lib/Driver/ToolChains/Arch/RISCV.cpp

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2021-05-16 Thread Zakk Chen via Phabricator via cfe-commits
khchen added a comment. In D71387#2762120 , @jrtc27 wrote: > In D71387#2762115 , @khchen wrote: > >> In D71387#1820995 , @efriedma wrote: >> >>> Okay. Please let me know if

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2021-05-16 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D71387#2762115 , @khchen wrote: > In D71387#1820995 , @efriedma wrote: > >> Okay. Please let me know if you want me to review anything. > > Hi all, > We had encoded the target-abi into

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2021-05-16 Thread Zakk Chen via Phabricator via cfe-commits
khchen added a comment. In D71387#1820995 , @efriedma wrote: > Okay. Please let me know if you want me to review anything. Hi all, We had encoded the target-abi into module now, but I feel it does not make sense to support overwrite ABI option and

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2021-05-16 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: clang/test/Driver/lto.c:81-90 +// Need to pass -target-abi in RISC-V target. +// RUN: %clang -target riscv64-unknown-elf %s -fuse-ld=gold -flto \ +// RUN: -mabi=lp64f -### 2>&1 | FileCheck %s --check-prefix=RISCV +// RUN: %clang

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2021-05-16 Thread Zakk Chen via Phabricator via cfe-commits
khchen updated this revision to Diff 345712. khchen added a comment. Herald added a subscriber: vkmr. Pass -target-abi option into LTO codegenerator base on D102582 patch. please see D102582 for more detal. Repository: rG

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2020-01-14 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Okay. Please let me know if you want me to review anything. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71387/new/ https://reviews.llvm.org/D71387 ___ cfe-commits mailing

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2020-01-14 Thread Sam Elliott via Phabricator via cfe-commits
lenary added a comment. @efriedma To keep you in the loop, D72624 is the patch to add a target hook for setting the TargetMachine options based on module metadata. That patch does not add any RISC-V specific functionality, it only lays the groundwork for it.

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2020-01-06 Thread Kuan Hsu Chen (Zakk) via Phabricator via cfe-commits
khchen added a comment. I'd like to discuss what is good way to pass target-abi in maillist after I had a try to encoding ABI info into LLVM IR via module flag. any suggestions are welcome, thanks. Repository: rG LLVM

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2019-12-19 Thread Kuan Hsu Chen (Zakk) via Phabricator via cfe-commits
khchen added a comment. In D71387#1790413 , @efriedma wrote: > > But in RISCV clang emits the same IR for different ABI (-mabi), > > This is not true. For simple cases, it does, yes, but there are some weird > edge cases for functions with many

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2019-12-18 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > But in RISCV clang emits the same IR for different ABI (-mabi), This is not true. For simple cases, it does, yes, but there are some weird edge cases for functions with many arguments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2019-12-17 Thread Kuan Hsu Chen (Zakk) via Phabricator via cfe-commits
khchen planned changes to this revision. khchen added a subscriber: eli.friedman. khchen added a comment. I asked @kito-cheng about the GCC LTO behavior, GCC LTO encodes the ABI info in elf and the behavior in above examples match to @efriedma 's responses. So I think maybe encode ABI in module

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2019-12-17 Thread Kuan Hsu Chen (Zakk) via Phabricator via cfe-commits
khchen added a comment. In D71387#1788472 , @efriedma wrote: > > Unfortunately on RISCV, the ABI info is only derived from -mabi option and > > the target triple does not encode ABI info (same to gcc). > > How does gcc decide the default ABI for a

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2019-12-17 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > Unfortunately on RISCV, the ABI info is only derived from -mabi option and > the target triple does not encode ABI info (same to gcc). How does gcc decide the default ABI for a target? Do you explicitly specify it at configure time? > example 1: > What's expected

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2019-12-17 Thread Kuan Hsu Chen (Zakk) via Phabricator via cfe-commits
khchen marked an inline comment as done. khchen added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/RISCV.cpp:585 +const llvm::opt::ArgList , +llvm::opt::ArgStringList ) { + // -mabi is not encoded

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2019-12-17 Thread Kuan Hsu Chen (Zakk) via Phabricator via cfe-commits
khchen added a comment. In D71387#1786518 , @efriedma wrote: > My primary concern with this is that I'm not sure you should be passing this > information separately, as opposed to encoding it into the bitcode. > > On ARM, the ABI for a file is generally

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2019-12-16 Thread Jim Lin via Phabricator via cfe-commits
Jim added a comment. This patch is only for RISCV. The title should have prefix "[RISCV]". Comment at: clang/lib/Driver/ToolChains/Arch/RISCV.cpp:585 +const llvm::opt::ArgList , +llvm::opt::ArgStringList ) { + //

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2019-12-16 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. My primary concern with this is that I'm not sure you should be passing this information separately, as opposed to encoding it into the bitcode. On ARM, the ABI for a file is generally derived from the target triple. For example, "arm-eabi" is soft-float,

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2019-12-16 Thread Sam Elliott via Phabricator via cfe-commits
lenary accepted this revision. lenary added a comment. This revision is now accepted and ready to land. Nice! I think this is the correct way of implementing this, and I don't think it will have any issue with other backends. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2019-12-11 Thread Kuan Hsu Chen (Zakk) via Phabricator via cfe-commits
khchen updated this revision to Diff 233508. khchen added a comment. update missed code.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71387/new/ https://reviews.llvm.org/D71387 Files: clang/lib/Driver/ToolChains/Arch/RISCV.cpp

[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2019-12-11 Thread Kuan Hsu Chen (Zakk) via Phabricator via cfe-commits
khchen created this revision. khchen added reviewers: efriedma, lenary, asb, shiva0217, tejohnson. khchen added a project: clang. Herald added subscribers: cfe-commits, luismarques, apazos, sameer.abuasal, pzheng, s.egerton, jocewei, PkmX, rkruppe, dexonsmith, the_o, brucehoult, MartinMosbeck,