rust-lang / rust-lang/rustc_codegen_gcc
Simplify generate_intrinsics.py
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 105
- Avg merge
- 8h 20m
- Merged PRs (30d)
- 14
Description
Currently it tries to fetch data from three sources:
- The
Intrinsics.tdfile of the latest commit on https://github.com/llvm/llvm-project - https://github.com/GuillaumeGomez/llvmint
- https://github.com/antoyo/llvmint
The last two sources are because the last commit on llvm-project may have removed some intrinsics that stdarch uses. It should be possible to simplify this to just Intrinsics.td from llvm-project by picking the exact commit that the nightly version against which cg_gcc will build uses as LLVM version. If any intrinsics are removed there, stdarch has had to stop using them before, so the removal of the intrinsic wouldn't matter.
The manual parsing of llvm-tblgen output could also likely be replaced by usage of the --dump-json flag.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with generate_intrinsics.py and trace how it fetches Intrinsics.td and the two llvmint sources. Check the LLVM commit used by the cg_gcc nightly build, then investigate llvm-tblgen's --dump-json output; done means the generator relies on the selected llvm-project source and no longer manually parses that output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- compilers, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100