dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.91k stars 4.63k forks source link

[mono] Refactor switch statements in `process_bb` to reduce redundancy #101412

Open kotlarmilos opened 4 months ago

kotlarmilos commented 4 months ago

Description

The process_bb function in mini-llvm.c contains about 80 switch statements within switch (ins->opcode) {. The goal is to reduce code redundancy by introducing helper functions. To achieve this, the first step is to identify patterns and common operations within the switch cases. Each pattern should be encapsulated into a helper function.

dotnet-policy-service[bot] commented 4 months ago

Tagging subscribers to this area: @steveisok, @lambdageek See info in area-owners.md if you want to be subscribed.

kapilepatel commented 3 months ago

I someone working on this? I would like to co-work.

kotlarmilos commented 3 months ago

Thanks, I believe no one is working on this at the moment. If you plan to propose changes, I suggest outlining your general approach here first to get feedback before submitting a PR.