Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
2169625
feat: add dependency graph scanner with include resolution and benchmark
16bit-ykiko Mar 23, 2026
9a91658
fix: use putenv for Windows compat and system compiler for LLVM confi…
16bit-ykiko Mar 23, 2026
1061b65
fix: init resource_dir in benchmark and use project toolchain for LLVM
16bit-ykiko Mar 23, 2026
110dec6
fix: use absolute path for toolchain file in LLVM configure
16bit-ykiko Mar 23, 2026
32cbf84
fix: use bash shell on all platforms, add scan error checking
16bit-ykiko Mar 23, 2026
91a29b3
fix: use $(pwd) instead of github.workspace for toolchain path
16bit-ykiko Mar 23, 2026
5cc8778
feat: add deco CLI options to scan_benchmark
16bit-ykiko Mar 23, 2026
3d7e026
feat: add I/O statistics to dependency scan report
16bit-ykiko Mar 23, 2026
e713142
feat: add wall-clock phase breakdown to scan report
16bit-ykiko Mar 23, 2026
a93a9d1
perf: replace per-file stat() with directory listing cache
16bit-ykiko Mar 23, 2026
4baf8f2
perf: parallelize Phase 2 with sharded dir listing cache
16bit-ykiko Mar 23, 2026
86c88e7
refactor: revert Phase 2 to serial and simplify DirListingCache
16bit-ykiko Mar 23, 2026
e3275fa
perf: parallelize toolchain queries during config extraction
16bit-ykiko Mar 23, 2026
a3ca649
bench: add parser microbenchmark to scan_benchmark
16bit-ykiko Mar 23, 2026
b418768
fix: pre-warm all toolchain keys instead of driver+ext heuristic
16bit-ykiko Mar 23, 2026
75a96d3
diag: add fine-grained timing to config extraction loop
16bit-ykiko Mar 23, 2026
471552f
diag: reorder benchmark (scan first), add cache miss detection
16bit-ykiko Mar 23, 2026
9e04aa1
diag: add context dedup diagnostic to benchmark
16bit-ykiko Mar 23, 2026
19b27ed
fix: handle Windows path separator mismatch in CompilationInfo dedup
16bit-ykiko Mar 23, 2026
29f7929
cleanup: simplify diagnostic output, reduce log verbosity
16bit-ykiko Mar 23, 2026
6fbb4f4
style: apply clang-format
16bit-ykiko Mar 23, 2026
1fb052e
style: format command.h
16bit-ykiko Mar 23, 2026
008ea1d
fix: replace et::fs::sync with llvm::MemoryBuffer in scan worker
16bit-ykiko Mar 24, 2026
eeea0ad
perf: optimize scan with dir cache prefetch, reduced allocations
16bit-ykiko Mar 24, 2026
bc27ac3
perf: disable null terminator for mmap, reserve edge vectors
16bit-ykiko Mar 24, 2026
9387f4e
perf: merge Phase 2+3, use stack-allocated SmallString for paths
16bit-ykiko Mar 24, 2026
4a80dd4
perf: use DenseSet for scanned files, prefetch source dirs, reserve i…
16bit-ykiko Mar 24, 2026
815ec43
style: apply clang-format
16bit-ykiko Mar 24, 2026
be96f75
perf: add include resolution cache, eliminate string copies in scan
16bit-ykiko Mar 24, 2026
2ae2e25
perf: cache SearchConfig per CompilationInfo, skip re-parsing on warm…
16bit-ykiko Mar 24, 2026
bbd00c7
perf: skip toolchain pre-warm on warm runs
16bit-ykiko Mar 24, 2026
82f197c
style: apply clang-format
16bit-ykiko Mar 24, 2026
cca5532
perf: eliminate path string copy in scan worker, fix deco include
16bit-ykiko Mar 24, 2026
8007b71
perf: persist DirListingCache and include cache across scan calls (Sc…
16bit-ykiko Mar 24, 2026
a422d8e
perf: cache lexer scan results across scan calls (ScanCache::scan_res…
16bit-ykiko Mar 24, 2026
59e816a
perf: cache context_groups, configs, and initial_wave in ScanCache
16bit-ykiko Mar 24, 2026
ae2c1fe
fix: null-terminate PathPool strings so resolve().data() is safe as c…
16bit-ykiko Mar 24, 2026
f0b0347
perf: cold-start-only benchmark with per-wave breakdown
16bit-ykiko Mar 25, 2026
1ccfb56
perf: true cold start benchmark with multi-run statistics
16bit-ykiko Mar 25, 2026
3838bb5
perf: force read() instead of mmap to benchmark true I/O vs lexer cost
16bit-ykiko Mar 25, 2026
a42d156
perf: overlap config extraction with Phase 1 + Phase 2 diagnostics
16bit-ykiko Mar 25, 2026
74a84d1
Revert "perf: overlap config extraction with Phase 1 + Phase 2 diagno…
16bit-ykiko Mar 25, 2026
329ef77
perf: optimize resolve_include — skip path construction on cache misses
16bit-ykiko Mar 25, 2026
f78248b
perf: pre-resolve DirListingCache pointers to eliminate StringMap loo…
16bit-ykiko Mar 25, 2026
c5ef15e
fix: handle multi-component include paths in DirListingCache lookup
16bit-ykiko Mar 25, 2026
f745ec9
perf: add first-component quick rejection for multi-component includes
16bit-ykiko Mar 25, 2026
97f15bb
fix: normalize resolved include paths to deduplicate .. components
16bit-ykiko Mar 25, 2026
a0c56a2
refactor: extract ToolchainProvider from CompilationDatabase
16bit-ykiko Mar 25, 2026
e6e7021
refactor: extract SearchConfig into standalone module
16bit-ykiko Mar 25, 2026
f680447
fix: align header search directory priority with clang's InitHeaderSe…
16bit-ykiko Mar 25, 2026
f7e336e
style: clean up include_resolver.h and shorten test names
16bit-ykiko Mar 25, 2026
1020993
docs: add TODOs for remaining clang header search gaps
16bit-ykiko Mar 25, 2026
6c55172
feat: support -idirafter (After group) in SearchConfig
16bit-ykiko Mar 25, 2026
4994d83
fix: update deco includes to use consolidated deco/deco.h
16bit-ykiko Mar 25, 2026
3843ffc
refactor: move command-processing files to src/command/
16bit-ykiko Mar 25, 2026
f9048e4
fix: update deco Dispatcher API and fix include ordering
16bit-ykiko Mar 25, 2026
809b9e1
fix: Windows CI — resource dir, JSON escaping, test paths
16bit-ykiko Mar 25, 2026
b730ccc
refactor: extract shared TempDir helper, remove P() macro
16bit-ykiko Mar 25, 2026
b518a6e
fix(tests): use CDB arguments array form to fix Windows backslash cor…
16bit-ykiko Mar 25, 2026
33d6e91
fix(Windows): use Windows tokenizer for CDB command strings on Windows
16bit-ykiko Mar 25, 2026
586525f
fix(tests): normalize path separators in TempDir::path()
16bit-ykiko Mar 25, 2026
1507647
format the code
16bit-ykiko Mar 25, 2026
6409878
fix: address CodeRabbit review findings
16bit-ykiko Mar 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: benchmark

on:
pull_request:
branches: [main]

jobs:
benchmark:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-15, windows-2025]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v4

# ── Build scan_benchmark ──

- uses: ./.github/actions/setup-pixi

- name: Build scan_benchmark
run: |
pixi run cmake-config RelWithDebInfo ON
cmake --build build/RelWithDebInfo --target scan_benchmark

# ── Clone LLVM and generate CDB ──

- name: Clone LLVM
run: git clone --depth 1 https://github.com/llvm/llvm-project.git
Comment thread
16bit-ykiko marked this conversation as resolved.

- name: Generate CDB
run: |
cmake -B llvm-build -G Ninja \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_TOOLCHAIN_FILE="$(pwd)/cmake/toolchain.cmake" \
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;lldb;mlir;polly;flang;bolt" \
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \
llvm-project/llvm

# ── Run benchmark ──

- name: Run benchmark
run: ./build/RelWithDebInfo/bin/scan_benchmark --runs 20 llvm-build/compile_commands.json
16 changes: 14 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ add_custom_target(generate_flatbuffers_schema DEPENDS "${GENERATED_HEADER}")

# Temporary migration-only build graph.
add_library(clice-core STATIC
"${PROJECT_SOURCE_DIR}/src/compile/command.cpp"
"${PROJECT_SOURCE_DIR}/src/compile/toolchain.cpp"
"${PROJECT_SOURCE_DIR}/src/command/command.cpp"
"${PROJECT_SOURCE_DIR}/src/command/search_config.cpp"
"${PROJECT_SOURCE_DIR}/src/command/toolchain.cpp"
"${PROJECT_SOURCE_DIR}/src/command/toolchain_provider.cpp"
"${PROJECT_SOURCE_DIR}/src/compile/compilation.cpp"
"${PROJECT_SOURCE_DIR}/src/compile/compilation_unit.cpp"
"${PROJECT_SOURCE_DIR}/src/compile/diagnostic.cpp"
Expand All @@ -145,6 +147,8 @@ add_library(clice-core STATIC
"${PROJECT_SOURCE_DIR}/src/support/logging.cpp"
"${PROJECT_SOURCE_DIR}/src/syntax/lexer.cpp"
"${PROJECT_SOURCE_DIR}/src/syntax/scan.cpp"
"${PROJECT_SOURCE_DIR}/src/syntax/include_resolver.cpp"
"${PROJECT_SOURCE_DIR}/src/syntax/dependency_graph.cpp"
"${PROJECT_SOURCE_DIR}/src/feature/semantic_tokens.cpp"
"${PROJECT_SOURCE_DIR}/src/feature/document_links.cpp"
"${PROJECT_SOURCE_DIR}/src/feature/document_symbols.cpp"
Expand Down Expand Up @@ -221,3 +225,11 @@ if(CLICE_ENABLE_TEST)
)
target_link_libraries(unit_tests PRIVATE clice::core eventide::zest eventide::deco)
endif()

add_executable(scan_benchmark
"${PROJECT_SOURCE_DIR}/benchmarks/scan_benchmark.cpp"
)
target_include_directories(scan_benchmark PRIVATE
"${PROJECT_SOURCE_DIR}/src"
)
target_link_libraries(scan_benchmark PRIVATE clice::core eventide::deco)
Loading
Loading