Skip to content

Instantly share code, notes, and snippets.

@michaeljclark
Last active August 26, 2017 07:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaeljclark/8ba727e56084833e4f838c941eeca6be to your computer and use it in GitHub Desktop.
Save michaeljclark/8ba727e56084833e4f838c941eeca6be to your computer and use it in GitHub Desktop.
RISC-V RVC register usage histogram
NOTE: - indicates RVC accesible register
register usage histogram (gcc 7.0.1 20170321 experimental) -Os newlib
~~~~~~~~~~~~~~~~~~~~~~~~
1. a5 15.12% [1711277823] ---------------------------------------
2. a2 13.64% [1543505068] -----------------------------------
3. a7 10.38% [1174405192] ==========================
4. a4 8.95% [1012926250] -----------------------
5. a6 7.77% [878706830] ====================
6. t4 5.30% [599785556] =============
7. t6 5.08% [574619651] =============
8. t1 4.82% [545259600] ============
9. s1 2.22% [251658628] -----
10. s0 2.09% [236978697] -----
11. s8 2.08% [234881084] =====
12. t5 1.85% [209715239] ====
13. t0 1.74% [197132298] ====
14. s2 1.69% [190840995] ====
15. a1 1.56% [176161483] ----
16. s4 1.56% [176160875] ====
17. s5 1.56% [176160865] ====
18. s3 1.52% [171966611] ===
19. sp 1.48% [167773087] ===
20. s6 1.48% [167772239] ===
21. t3 1.48% [167772227] ===
22. s7 1.48% [167772218] ===
23. t2 1.41% [159383552] ===
24. s9 0.78% [88080399 ] ==
25. a3 0.74% [83887673 ] -
26. s11 0.70% [79691780 ] =
27. a0 0.59% [67109377 ] -
28. s10 0.44% [50331664 ] =
29. zero 0.41% [46138044 ] =
30. ra 0.07% [8388950 ]
31. gp 0.00% [80 ]
register usage histogram (gcc 7.1.0) -Os musl
~~~~~~~~~~~~~~~~~~~~~~~~
1. a6 18.12% [2097152150] =======================================
2. a5 11.47% [1327499174] ------------------------
3. a2 7.23% [836765036] ---------------
4. t3 7.09% [819986505] ===============
5. a4 6.94% [803211217] --------------
6. t1 6.80% [786432100] ==============
7. a7 5.38% [622854313] ===========
8. t2 3.30% [381681664] =======
9. t5 3.17% [367001607] ======
10. t0 3.14% [362807300] ======
11. t6 3.10% [358612996] ======
12. t4 2.92% [337641534] ======
13. a1 2.46% [285213276] -----
14. s6 2.03% [234881109] ====
15. s1 1.92% [222298375] ----
16. s2 1.83% [211812530] ===
17. a0 1.63% [188744304] ---
18. s0 1.63% [188744040] ---
19. s3 1.50% [174063749] ===
20. s5 1.49% [171966586] ===
21. s4 1.49% [171966574] ===
22. sp 1.01% [117441548] ==
23. s7 0.80% [92274762 ] =
24. a3 0.69% [79693585 ] -
25. zero 0.69% [79692466 ] =
26. s10 0.69% [79691834 ] =
27. s8 0.51% [58720334 ] =
28. s9 0.47% [54526020 ] =
29. s11 0.43% [50331698 ]
30. ra 0.07% [8388901 ]
31. gp 0.00% [3 ]
32. tp 0.00% [1 ]
register usage histogram (gcc 7.1.0) -O2 musl
~~~~~~~~~~~~~~~~~~~~~~~~
1. a4 6.86% [811599216] ---------------------------------------
2. a2 6.47% [765461127] ------------------------------------
3. a7 5.90% [698351837] =================================
4. a5 5.80% [685770702] --------------------------------
5. a6 5.57% [658506198] ===============================
6. a1 4.79% [566231919] ---------------------------
7. t4 4.75% [562037342] ===========================
8. t3 4.66% [551551246] ==========================
9. s0 4.63% [547357043] --------------------------
10. t5 4.52% [534773879] =========================
11. t1 4.40% [520094026] ========================
12. s8 4.38% [517996622] ========================
13. t2 4.34% [513802262] ========================
14. s4 3.65% [432013424] ====================
15. s5 3.40% [402653309] ===================
16. s6 3.35% [396361819] ===================
17. t0 3.07% [362807322] =================
18. s1 2.87% [339738890] ----------------
19. s9 2.34% [276824132] =============
20. s10 2.34% [276824122] =============
21. t6 2.32% [274726942] =============
22. s7 2.02% [239075406] ===========
23. s11 1.88% [222298162] ==========
24. a0 1.67% [197132938] ---------
25. sp 0.99% [117441572] =====
26. s3 0.99% [117440647] =====
27. s2 0.96% [113246398] =====
28. a3 0.67% [79693048 ] ---
29. zero 0.35% [41943714 ] ==
30. ra 0.07% [8388901 ]
31. gp 0.00% [3 ]
32. tp 0.00% [1 ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment