Ilia Sergachev c02e8f762a
[llvm][transforms] Add a new algorithm to SplitModule (#95941)
The new round-robin algorithm overrides the hash-based distribution of
functions to modules. It achieves a more even number of functions per
module when the number of functions is close to the number of requested
modules. It's not in use by default and is available under a new flag.
2024-07-03 21:26:21 +02:00

34 lines
597 B
LLVM

; RUN: llvm-split -o %t %s -j 2 -round-robin
; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK0 %s
; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK1 %s
; CHECK0-NOT: define
; CHECK0: declare extern_weak void @e
; CHECK0: define void @A
; CHECK0: define void @C
; CHECK0-NOT: define
; CHECK1-NOT: define
; CHECK1: declare extern_weak void @e
; CHECK1: define void @B
; CHECK1: define void @D
; CHECK1-NOT: define
declare extern_weak void @e(...)
define void @A() {
ret void
}
define void @B() {
ret void
}
define void @C() {
ret void
}
define void @D() {
ret void
}