Commit ea7ab27
committed
[clang][modules][deps] Create more efficient API for visitation of
The current `ASTReader::visitInputFiles()` function calls into `FileManager` to create `FileEntryRef` objects. This ends up being fairly costly in `clang-scan-deps`, where we mostly only care about file paths.
This patch introduces new `ASTReader` API that gives clients access to just the serialized paths. Since the scanner needs both the as-requested path and the on-disk one (and doesn't want to transform the former into the latter via `FileManager`), this patch starts serializing both of them into the PCM file if they differ.
This increases the size of scanning PCMs by 0.1% and speeds up scanning by 5%.
Reviewed By: benlangmuir, vsapsai
Differential Revision: https://reviews.llvm.org/D157066ModuleFile inputs1 parent c6d1b19 commit ea7ab27
File tree
6 files changed
+82
-24
lines changed- clang
- include/clang/Serialization
- lib
- Serialization
- Tooling/DependencyScanning
6 files changed
+82
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2356 | 2356 | | |
2357 | 2357 | | |
2358 | 2358 | | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
| 2364 | + | |
| 2365 | + | |
2359 | 2366 | | |
2360 | 2367 | | |
2361 | 2368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
| 71 | + | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2305 | 2305 | | |
2306 | 2306 | | |
2307 | 2307 | | |
2308 | | - | |
2309 | | - | |
2310 | | - | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
| 2323 | + | |
2311 | 2324 | | |
2312 | 2325 | | |
2313 | 2326 | | |
| |||
2358 | 2371 | | |
2359 | 2372 | | |
2360 | 2373 | | |
2361 | | - | |
| 2374 | + | |
2362 | 2375 | | |
2363 | 2376 | | |
2364 | 2377 | | |
| |||
2697 | 2710 | | |
2698 | 2711 | | |
2699 | 2712 | | |
2700 | | - | |
2701 | | - | |
2702 | | - | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
2703 | 2716 | | |
2704 | 2717 | | |
2705 | 2718 | | |
| |||
9248 | 9261 | | |
9249 | 9262 | | |
9250 | 9263 | | |
| 9264 | + | |
| 9265 | + | |
| 9266 | + | |
| 9267 | + | |
| 9268 | + | |
| 9269 | + | |
| 9270 | + | |
| 9271 | + | |
| 9272 | + | |
| 9273 | + | |
| 9274 | + | |
| 9275 | + | |
| 9276 | + | |
| 9277 | + | |
| 9278 | + | |
| 9279 | + | |
9251 | 9280 | | |
9252 | 9281 | | |
9253 | 9282 | | |
| |||
9269 | 9298 | | |
9270 | 9299 | | |
9271 | 9300 | | |
9272 | | - | |
| 9301 | + | |
9273 | 9302 | | |
9274 | 9303 | | |
9275 | 9304 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1556 | 1556 | | |
1557 | 1557 | | |
1558 | 1558 | | |
1559 | | - | |
| 1559 | + | |
| 1560 | + | |
1560 | 1561 | | |
1561 | 1562 | | |
1562 | 1563 | | |
| |||
1578 | 1579 | | |
1579 | 1580 | | |
1580 | 1581 | | |
| 1582 | + | |
1581 | 1583 | | |
1582 | | - | |
| 1584 | + | |
| 1585 | + | |
1583 | 1586 | | |
1584 | 1587 | | |
1585 | 1588 | | |
| |||
1613 | 1616 | | |
1614 | 1617 | | |
1615 | 1618 | | |
1616 | | - | |
1617 | | - | |
| 1619 | + | |
| 1620 | + | |
1618 | 1621 | | |
1619 | 1622 | | |
1620 | 1623 | | |
| |||
1662 | 1665 | | |
1663 | 1666 | | |
1664 | 1667 | | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
1665 | 1677 | | |
1666 | 1678 | | |
1667 | 1679 | | |
1668 | 1680 | | |
1669 | 1681 | | |
1670 | 1682 | | |
1671 | 1683 | | |
1672 | | - | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
1673 | 1687 | | |
1674 | | - | |
| 1688 | + | |
| 1689 | + | |
1675 | 1690 | | |
1676 | 1691 | | |
1677 | 1692 | | |
| |||
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
468 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
469 | 470 | | |
470 | 471 | | |
471 | 472 | | |
472 | 473 | | |
473 | 474 | | |
474 | | - | |
| 475 | + | |
475 | 476 | | |
476 | 477 | | |
477 | 478 | | |
478 | | - | |
| 479 | + | |
479 | 480 | | |
480 | 481 | | |
481 | 482 | | |
482 | 483 | | |
483 | 484 | | |
484 | 485 | | |
485 | 486 | | |
486 | | - | |
487 | | - | |
488 | | - | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
489 | 491 | | |
490 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
491 | 496 | | |
492 | 497 | | |
493 | 498 | | |
| |||
0 commit comments