[clang] [llvm] [Clang][RISCV] Move getVScaleRange logic into libLLVMFrontendDriver. NFC (PR #77327)

2024-01-11 Thread Luke Lau via cfe-commits
lukel97 wrote: Closing for now as deduplication the clang/flang frontend logic most likely requires more thought and discussion https://github.com/llvm/llvm-project/pull/77327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [llvm] [Clang][RISCV] Move getVScaleRange logic into libLLVMFrontendDriver. NFC (PR #77327)

2024-01-10 Thread Luke Lau via cfe-commits
@@ -2,6 +2,7 @@ set(LLVM_LINK_COMPONENTS Support TargetParser FrontendOpenMP + FrontendDriver lukel97 wrote: I think the issue with llvmFrontendDriver specifically is that this code wouldn't be called from any of the drivers, it would be called from cl

[clang] [llvm] [Clang][RISCV] Move getVScaleRange logic into libLLVMFrontendDriver. NFC (PR #77327)

2024-01-10 Thread Thorsten Schütt via cfe-commits
@@ -2,6 +2,7 @@ set(LLVM_LINK_COMPONENTS Support TargetParser FrontendOpenMP + FrontendDriver tschuett wrote: I would prefer putting it into FrontendDriver for style and as a precedence to encourage others to put more into the frontend. https://github

[clang] [llvm] [Clang][RISCV] Move getVScaleRange logic into libLLVMFrontendDriver. NFC (PR #77327)

2024-01-09 Thread Luke Lau via cfe-commits
lukel97 wrote: > I'm wondering if you considered moving the helper function into RISCVISAInfo? Initially yes, but I ended up backing out of it since it would have been the only bit of "codegen" logic in RISCVISAInfo, and it seemed a shame to pollute it. I also have a feeling that we will need

[clang] [llvm] [Clang][RISCV] Move getVScaleRange logic into libLLVMFrontendDriver. NFC (PR #77327)

2024-01-09 Thread Alex Bradbury via cfe-commits
asb wrote: libLLVMFrontendDriver intuitively seems like a sensible home, though I think we'd be the first to use it in this way. I'm wondering if you considered moving the helper function into RISCVISAInfo? I'm not sure it's _better_ but it doesn't seem like a terrible place for this logic. h

[clang] [llvm] [Clang][RISCV] Move getVScaleRange logic into libLLVMFrontendDriver. NFC (PR #77327)

2024-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Luke Lau (lukel97) Changes In #77277, we would like to be able to reuse the logic for calculating the vscale_range in Flang. This is currently in clang::TargetInfo which is quite C specific, and given that only two targets impleme

[clang] [llvm] [Clang][RISCV] Move getVScaleRange logic into libLLVMFrontendDriver. NFC (PR #77327)

2024-01-08 Thread Luke Lau via cfe-commits
https://github.com/lukel97 edited https://github.com/llvm/llvm-project/pull/77327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][RISCV] Move getVScaleRange logic into libLLVMFrontendDriver. NFC (PR #77327)

2024-01-08 Thread Luke Lau via cfe-commits
https://github.com/lukel97 created https://github.com/llvm/llvm-project/pull/77327 In #77277, we would like to be able to reuse the logic for calculating the vscale_range in Flang. This is currently in clang::TargetInfo which is quite C specific, and given that only two targets implement getVSca