Skip to content

Experiment: annotate hot paths on LLVM#1384

Draft
jiribenes wants to merge 4 commits into
mainfrom
experiment/llvm-assume
Draft

Experiment: annotate hot paths on LLVM#1384
jiribenes wants to merge 4 commits into
mainfrom
experiment/llvm-assume

Conversation

@jiribenes
Copy link
Copy Markdown
Contributor

@jiribenes jiribenes commented Apr 21, 2026

My local devenv is broken so I can't benchmark this; we should really benchmark each commit individually against main to see if we get some perf.

There are three main changes:

  1. assume RC ≥ 0 (not obvious to LLVM since we use a whole i64) EDIT: removed this via a force push for now, diff here
  2. when switching on RC, assume that it's 0 for the hot path to be quicker
  3. assume that a to-be-erased value is non-null EDIT: not true, we even emit them null sometimes... diff here
  4. dumping a bunch of "this function doesn't do bad stuff" annotations all over the place

I think these are all valid assumptions / hot paths that we should prefer.
EDIT: The crossed out changes above kept the CI in a busy loop somehow 🔁

@jiribenes jiribenes added area:llvm experiment Experimental branch, do not merge! labels Apr 21, 2026
@jiribenes jiribenes changed the title Experiment: prefer hot paths on LLVM Experiment: annotate hot paths on LLVM Apr 21, 2026
@jiribenes jiribenes force-pushed the experiment/llvm-assume branch from f881e45 to 001f6b1 Compare April 21, 2026 12:57
@jiribenes jiribenes force-pushed the experiment/llvm-assume branch from 001f6b1 to b6f26ef Compare April 21, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:llvm experiment Experimental branch, do not merge!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant