add -v phase timing and gate .ll write behind -v/-g#497
Open
Conversation
Contributor
Benchmark Results (Linux x86-64)
CLI Tool Benchmarks
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
parse=Xms sema=Yms codegen=Zms ir-write=Wms llvm=Vms link=Ums total=Tms) printed at the end ofchad build -v, so next time a compile is mysteriously slow you can see where the time goes instead of guessing..llartifact to disk on every build. It's now only written under-v,-g, orirsubcommand — the cases where you'd actually want to read it..build/stays clean.Why
chad build src/chad-native.tstakes ~27s. I suspected the.lldisk write was a chunk of that; turns out it's 10ms. The real answer (from the new phase line) is that LLVM-O2optimization owns ~92% of the time. Good to know — and cheap to keep the instrumentation around so we don't have to re-derive it.Example output under
-v:Test plan
npm run verify:quickpasses (tsc + stage 0 + stage 1 + unit tests)chad build foo.ts(no flags) produces no.llfile and no phase linechad build foo.ts -vwrites.lland prints phase linechad build foo.ts -gwrites.ll(debug path)