aliyun / coolbpf

MIT License
247 stars 39 forks source link

Use cranelift-islec to generate instruction selection code #42

Open chengshuyi opened 1 year ago

chengshuyi commented 1 year ago

There are many conditions to consider when selecting instructions, and the logic of manually written code is complicated. Therefore, cranelift-islec is used to automatically generate this part of the code according to the rules. In the future, only these rules need to be maintained.

chengshuyi commented 1 year ago

After a rough look, although cranelift-isle can be used to clearly express the logic of instruction selection, for a relatively simple instruction set such as eBPF, it is a bit overkill. Therefore, the hard-coding method is currently used and cranelift-isle is not used for the time being.