[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-21 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:9 + +// Check that -fsplit-machine-functions is passed to both x86 and cuda compilation and does not cause driver error. +// MFS2: -fsplit-machine-functions

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:9 + +// Check that -fsplit-machine-functions is passed to both x86 and cuda compilation and does not cause driver error. +// MFS2: -fsplit-machine-functions

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-21 Thread Han Shen via Phabricator via cfe-commits
shenhan added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:9 + +// Check that -fsplit-machine-functions is passed to both x86 and cuda compilation and does not cause driver error. +// MFS2: -fsplit-machine-functions

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:9 + +// Check that -fsplit-machine-functions is passed to both x86 and cuda compilation and does not cause driver error. +// MFS2: -fsplit-machine-functions

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Sorry, but I think this change should be reverted. (a) `-fsplit-machine-functions` on an unsupported target now emits a warning instead of an error. This diverges from the regular expectation for target-specific features. % fclang --target=riscv64

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-17 Thread Han Shen via Phabricator via cfe-commits
shenhan added a comment. Thanks all. Created D158231 to address the post-submit comments and added all as reviewers. @MaskRay @Hahnfeld @steelannelida Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157750/new/

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-17 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:16 +// causes a warning. +// RUN: %clang --target=x86_64-unknown-linux-gnu -nogpulib -nogpuinc \ +// RUN: --cuda-gpu-arch=sm_70 -x cuda -fsplit-machine-functions -S %s

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-17 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:16 +// causes a warning. +// RUN: %clang --target=x86_64-unknown-linux-gnu -nogpulib -nogpuinc \ +// RUN: --cuda-gpu-arch=sm_70 -x cuda -fsplit-machine-functions -S %s 2>&1

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-17 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:16 +// causes a warning. +// RUN: %clang --target=x86_64-unknown-linux-gnu -nogpulib -nogpuinc \ +// RUN: --cuda-gpu-arch=sm_70 -x cuda -fsplit-machine-functions -S %s

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-17 Thread Dmitry Chernenkov via Phabricator via cfe-commits
steelannelida added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:16 +// causes a warning. +// RUN: %clang --target=x86_64-unknown-linux-gnu -nogpulib -nogpuinc \ +// RUN: --cuda-gpu-arch=sm_70 -x cuda -fsplit-machine-functions

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-17 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. I dsabled two tests without `{arm,aarch64}-registered-target` in rGeeac4321c517ee8afc30ebe62c5b1778efc1173d ; two post-commit comments inline Comment at:

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-17 Thread Han Shen via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG317a0fe5bd71: [Driver][CodeGen] Properly handle -fsplit-machine-functions for fatbinary… (authored by shenhan). Repository: rG LLVM Github

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-16 Thread Han Shen via Phabricator via cfe-commits
shenhan added a comment. In D157750#4593582 , @dhoekwater wrote: > This patch will make it difficult to write tests for MFS on AArch64 before it > is officially enabled. Currently, because clang performs the Triple check, we > can use

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-16 Thread Han Shen via Phabricator via cfe-commits
shenhan updated this revision to Diff 550913. shenhan added a comment. Refined the test case a little bit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157750/new/ https://reviews.llvm.org/D157750 Files:

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-16 Thread Daniel Hoekwater via Phabricator via cfe-commits
dhoekwater added a comment. This patch will make it difficult to write tests for MFS on AArch64 before it is officially enabled. Currently, because clang performs the Triple check, we can use `-enable-split-machine-functions` to run tests with MFS on Arm, but after this patch the flag won't do

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-16 Thread Rong Xu via Phabricator via cfe-commits
xur accepted this revision. xur added a comment. lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157750/new/ https://reviews.llvm.org/D157750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-16 Thread Daniel Hoekwater via Phabricator via cfe-commits
dhoekwater accepted this revision. dhoekwater added a comment. This revision is now accepted and ready to land. lgtm. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157750/new/ https://reviews.llvm.org/D157750

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-16 Thread Han Shen via Phabricator via cfe-commits
shenhan updated this revision to Diff 550885. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157750/new/ https://reviews.llvm.org/D157750 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/lib/Driver/ToolChains/Clang.cpp

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-16 Thread Han Shen via Phabricator via cfe-commits
shenhan added inline comments. Comment at: llvm/test/CodeGen/X86/mfs-triple.ll:8 + +define void @foo4(i1 zeroext %0, i1 zeroext %1) nounwind { + br i1 %0, label %3, label %7 shenhan wrote: > snehasish wrote: > > Any reason why we can't use the bitcode already

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-16 Thread Han Shen via Phabricator via cfe-commits
shenhan updated this revision to Diff 550834. shenhan marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157750/new/ https://reviews.llvm.org/D157750 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-15 Thread Han Shen via Phabricator via cfe-commits
shenhan marked 3 inline comments as done. shenhan added inline comments. Comment at: llvm/lib/CodeGen/TargetPassConfig.cpp:1278 } -addPass(createMachineFunctionSplitterPass()); +if (TM->getTargetTriple().isX86()) + addPass(createMachineFunctionSplitterPass());

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-15 Thread Han Shen via Phabricator via cfe-commits
shenhan updated this revision to Diff 550423. shenhan marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157750/new/ https://reviews.llvm.org/D157750 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-14 Thread Han Shen via Phabricator via cfe-commits
shenhan marked an inline comment as done. shenhan added inline comments. Comment at: llvm/lib/CodeGen/TargetPassConfig.cpp:1281-1282 +else + WithColor::warning() + << "-fsplit-machine-functions is only valid for X86.\n"; } arsenm wrote: >

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-14 Thread Han Shen via Phabricator via cfe-commits
shenhan updated this revision to Diff 550137. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157750/new/ https://reviews.llvm.org/D157750 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/lib/Driver/ToolChains/Clang.cpp

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-14 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:9 + +// Check that -fsplit-machine-functions is passed to both x86 and cuda compilation and does not cause driver error. +// MFS2: -fsplit-machine-functions

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-14 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/CodeGen/TargetPassConfig.cpp:1281-1282 +else + WithColor::warning() + << "-fsplit-machine-functions is only valid for X86.\n"; } shenhan wrote: > arsenm wrote: > > You cannot spam warnings

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-14 Thread Han Shen via Phabricator via cfe-commits
shenhan added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:9 + +// Check that -fsplit-machine-functions is passed to both x86 and cuda compilation and does not cause driver error. +// MFS2: -fsplit-machine-functions

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-11 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:9 + +// Check that -fsplit-machine-functions is passed to both x86 and cuda compilation and does not cause driver error. +// MFS2: -fsplit-machine-functions

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-11 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/CodeGen/TargetPassConfig.cpp:1281-1282 +else + WithColor::warning() + << "-fsplit-machine-functions is only valid for X86.\n"; } You cannot spam warnings here. The other instance of printing

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-11 Thread Han Shen via Phabricator via cfe-commits
shenhan added inline comments. Comment at: llvm/lib/CodeGen/TargetPassConfig.cpp:1278 } -addPass(createMachineFunctionSplitterPass()); +if (TM->getTargetTriple().isX86()) + addPass(createMachineFunctionSplitterPass()); snehasish wrote: > Can

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-11 Thread Han Shen via Phabricator via cfe-commits
shenhan added inline comments. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:9 + +// Check that -fsplit-machine-functions is passed to both x86 and cuda compilation and does not cause driver error. +// MFS2: -fsplit-machine-functions

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-11 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Comment at: clang/test/Driver/fsplit-machine-functions-with-cuda-nvptx.c:9 + +// Check that -fsplit-machine-functions is passed to both x86 and cuda compilation and does not cause driver error. +// MFS2: -fsplit-machine-functions We will

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-11 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish added a subscriber: dhoekwater. snehasish added inline comments. Comment at: llvm/lib/CodeGen/TargetPassConfig.cpp:1278 } -addPass(createMachineFunctionSplitterPass()); +if (TM->getTargetTriple().isX86()) +

[PATCH] D157750: Properly handle -fsplit-machine-functions for fatbinary compilation

2023-08-11 Thread Han Shen via Phabricator via cfe-commits
shenhan created this revision. shenhan added reviewers: xur, snehasish. Herald added subscribers: mattd, asavonic, pengfei, hiraditya. Herald added a project: All. shenhan requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, MaskRay. Herald added projects: clang,