Andarwinux wrote: > > > > * Add an unwind v3 pass to chain unwind info if there are too many > > > > epilogs in a function and raise a fatal error if there are too many > > > > instructions in a prolog or epilog. > > > > > > > > > Is this expected limitation of unwindv3, or is it some workaround? > > > I encountered this problem when trying unwindv3 in an actual codebase: > > > ``` > > > ld.lld: error: <unknown>:0: value of 308819 is too large for field of 2 > > > bytes > > > > > > > > > ld.lld: error: undefined symbol: typeinfo for MediaInfoLib::File_Adm > > > >>> referenced by mediainfo.exe.lto.obj:(vtable for > > > >>> MediaInfoLib::File_Adm) > > > ``` > > > > > > This is a fundamental limitation on unwind v3 - the encoding limits only > > provides so many bits to store counts and offsets. > > Do you happen to have a reliable repro for that? > > That error happens to be a generic "too big for a fixup" error: > > https://github.com/llvm/llvm-project/blob/652915c8bb58dc5e8370fe417f64949207c0f593/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp#L710-L717 > > > > We need to know which of the various offsets is too large. Given the size > > of that, I wonder if it is because we're using the offset from the > > beginning of the function to the first epilog and should switch to using > > the offset from the end of the function to the last instead. > > https://github.com/Andarwinux/_/releases/download/unwindv3/test.zip > > This is a lld reproduce, you can run `lld-link @response.txt` to reproduce it.
I found a way to get a reduced IR reproducer. [reduced.ll.txt](https://github.com/user-attachments/files/28805989/reduced.ll.txt) ``` clang -O3 -march=tigerlake --target=x86_64-pc-windows-gnu -c reduced.ll <unknown>:0: error: value of 65699 is too large for field of 2 bytes error: cannot compile inline asm 1 error generated. ``` https://github.com/llvm/llvm-project/pull/200249 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
