[llvm] The compiled BPF program exceeds the kernel's limit of 1 million instructions.
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
I have a method that is always inlined, and after compiling the BPF program, the following error was reported during the loading process:
```
BPF program is too large. Processed 1000001 insn
processed 1000001 insns (limit 1000000) max_states_per_insn 31 total_states 90998 peak_states 19789 mark_read 381
-- END PROG LOAD LOG --
```
When I revert the two PRs, no error was reported during kernel loading:
https://github.com/llvm/llvm-project/commit/1a2e77cf9e11dbf56b5720c607313a566eebb16e
https://github.com/llvm/llvm-project/commit/2228b35f93256449ca2524ed38dd068b87163efc
Contributor guide
Research direction
Compare the two referenced LLVM commits and reproduce the reported BPF compilation and kernel-loading failure using the inlined method described in the issue. Start with the compiler changes introduced by those commits and the BPF load log; done means the regression is identified and the compiled program no longer exceeds the kernel's instruction limit.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100