Jiakun Fan
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# HIR Dump for GCC Rust Frontend ## Personal Information - Name: Jiakun Fan - Email: vincentdftbg@gmail.com - Github: [chosen-ox](https://github.com/chosen-ox) - Location: Shenzhen, China - Time Zone: UTC+8 - University: Chinese University of Hong Kong (shenzhen) - Major: Computer Engnieering ## Project Description - Name: [HIR Dump](https://hackmd.io/@Rust-GCC/B1yEfRBjj#Project-A---HIR-Dump) - Mentor: [Arthur](https://github.com/CohenArthur) - Goal: implement an HIR dump by leveraging work already done for AST dump. ## About me - My major programming language is C++, Rust. I am interested in parallel system, compiler and operating system. - This semester I am taking [CS255: Advanced Compilers](https://www.cs.rochester.edu/u/sree/courses/csc-255-455/spring-2021/) (physically in [UR](https://www.rochester.edu/) as an exchange student). I implemented some basic transform between AST, CFG, BB which is useful for me to understand and improve GCCRust. ## Homework - Download GCCRust from github and build it successfully on my machine. I also build it on github [codespace](https://github.com/features/codespaces) for convenience. - Review code of GCCRust and understand the basic workflow of GCCRust. In the process, I found some TODOs and started a [PR#1972](https://github.com/Rust-GCC/gccrs/pull/1972). With the help of GCCRust developers, I succeeded merging my first commit. And then I focused on HIR dump. Opened my second [PR#1976](https://github.com/Rust-GCC/gccrs/pull/1976) to improve HIR dump. Thanks to [Jdupak](https://github.com/jdupak) and Arthur for providing me with many suggestions. - Rust mechanism is complex. I started to read some docs like [rustc book](https://doc.rust-lang.org/rustc/what-is-rustc.html), [rustc development guide](https://rustc-dev-guide.rust-lang.org/), [rust reference](https://doc.rust-lang.org/reference/). ## Plan - **Eliminate the overlap between AST and HIR nodes:** The overlap between AST and HIR nodes makes it more difficult to pretty-dump HIR nodes(diccussed in [PR#1976](https://github.com/Rust-GCC/gccrs/pull/1976#issuecomment-1468352637)). Because AST types accepting HIR visitors will have an effect on compilation speed overall. I will try to eliminate the overlap without voliating the existing logic and code. - **Implement exisiting visit function in [rust-hir-dump.h](https://github.com/Rust-GCC/gccrs/blob/master/gcc/rust/hir/rust-hir-dump.h#L40-L185) and add new visit function:** First implement existing visit function. Then add new visit function based on those. - **Add testsuites for HIR dump:** Add as many as possible cases to test if HIR dump does well. If time permits, write a doc for using and testing HIR dump. ## Timeline ### official overview * May 4 - 18:00 UTC:Accepted GSoC contributor projects announced * May 4 - 28:Community Bonding Period | GSoC contributors get to know mentors, read documentation, get up to speed to begin working on their projects * May 29: Coding officially begins! * July 10 - 18:00 UTC:Mentors and GSoC contributors can begin submitting midterm evaluations * July 14 - 18:00 UTC:Midterm evaluation deadline (standard coding period) * July 14 - August 21:Work Period | GSoC contributors work on their project with guidance from Mentors * August 21 - 28 - 18:00 UTC:Final week: GSoC contributors submit their final work product and their final mentor evaluation (standard coding period) * August 28 - September 4 - 18:00 UTC:Mentors submit final GSoC contributor evaluations (standard coding period) * September 5:Initial results of Google Summer of Code 2023 announced ### details - **Before May 29:** Read source code and disscuss the possible taks and implementations with mentors via issue, pr or zulip. - **May 29 - June 25:** View the AST and HIR nodes to eliminate possible overlaps (`AST::AttrVec` and `AST::Lifetime::LifetimeType`). Talk to mentors and refactor AST and HIR nodes. - **June 26 - July 14:** - Implement visit functions in [rust-hir-dump.h](https://github.com/Rust-GCC/gccrs/blob/master/gcc/rust/hir/rust-hir-dump.h#L40-L184). Replace use of `AST::AttrVec` to `HIR::AttrVec`. - Write the midterm evaluation. - **July 15 - July 30:** - Add possible new visit function for dumping HIR according to possible new HIR class. - **July 31 - August 20:** Add testsuites for HIR dump, write a doc for using and testing HIR dump. - **August 21 - August 28:** Submit the final work product and write the final evaluation. ## Why me - I use GNU tools on a daily basis, and they have been invaluable to me. I am excited to have the opportunity to contribute to the GCC project and am committed to doing my best. I hope to makie a positive impact on the free software community. - To prepare for this project, I am taking a compiler course and reading Rust documentation. I am particularly drawn to Rust as I believe it is the future of programming languages. I am confident in my ability to tackle this project and look forward to the challenge.

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully