[llvm] [CGSCC] Fix compile time blowup with large RefSCCs (PR #94815)
Lei Wang via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 8 14:57:40 PDT 2024
wlei-llvm wrote:
> @wlei-llvm yes a reduced repro would be helpful, I can't figure out what's wrong with just the assert
Hi @aeubanks , here is the reduced repro:
cmd:
```
opt -disable-output -passes="cgscc(devirt<4>(inline,openmp-opt-cgscc,function<>(simplifycfg<>)))" < reduced.ll
```
reduced.ll:
```
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-redhat-linux-gnu"
define internal fastcc void @foo() #0 personality ptr null {
br label %1
1: ; preds = %2, %0
ret void
2: ; No predecessors!
call fastcc void @bar()
br label %1
}
define fastcc void @baz() personality ptr null {
switch i64 0, label %3 [
i64 0, label %3
i64 1, label %3
i64 2, label %3
i64 3, label %4
i64 4, label %3
i64 5, label %3
i64 6, label %3
i64 7, label %3
i64 8, label %3
i64 9, label %3
i64 10, label %3
i64 11, label %3
i64 12, label %3
i64 13, label %3
i64 14, label %3
i64 15, label %3
i64 16, label %3
]
1: ; No predecessors!
%2 = landingpad { ptr, i32 }
cleanup
call fastcc void @foo()
resume { ptr, i32 } zeroinitializer
3: ; preds = %4, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0
ret void
4: ; preds = %0
call fastcc void @baz()
br label %3
}
define fastcc void @bar() personality ptr null {
call fastcc void @baz()
ret void
}
; uselistorder directives
uselistorder ptr null, { 3, 4, 0, 5, 6, 1, 7, 8, 2 }
attributes #0 = { "target-cpu"="haswell" }
!llvm.module.flags = !{!0}
!0 = !{i32 7, !"openmp", i32 50}
```
Please take a look, thanks!
https://github.com/llvm/llvm-project/pull/94815
More information about the llvm-commits
mailing list