Commit ac85c6d
committed
C4 was closed on the wrong objects, and the possibility it dismissed was the right one
The closure measured zstd and xz --- the two the OLD report named --- and found
them clean. The member that fails is libarchive, and it was never measured.
`lsp-mcpp-private`'s `test_archive` does not link for aarch64-macos:
ld64.lld: error: undefined symbol: memset_pattern16
referenced by `archive_read_support_format_7zip.o`. zstd and xz happen not to
trigger the idiom, so measuring them answered a different question.
THE RECORD LISTED THREE POSSIBILITIES AND PICKED THE FIRST. The third ---
"`-fno-builtin-memset_pattern16` is not enough to turn off LLVM's loop-idiom
pass" --- is the one that holds. A/B on the real compile command from
build.ninja, varying only that flag:
as built (flag present) 1 reference 38200 bytes
flag REMOVED 1 reference
-fno-builtin 0 38888 (+1.8%)
-ffreestanding 0
-mllvm -disable-loop-idiom-memset 0 38152
The flag changes nothing. And it cannot report that it changed nothing: clang
accepts `-fno-builtin-totally_not_a_function` silently, because
`memset_pattern16` is an LLVM TargetLibraryInfo libfunc rather than a clang
builtin. The preprocessed source contains the symbol zero times, which
confirms the call is generated rather than written.
TWO ENGINE-SIDE GAPS, AND THE SECOND IS WHY THE FIRST SURVIVED:
1. the token `builtins = "iso"` emits is ineffective for the one case its
own comment names;
2. that token is not verified. In the same file, `-D` and `-U` are checked
by the probe against `expectDefined`/`expectUndefined`, under a comment
saying a `-D` that did not take effect is a verification failure rather
than a silent one. `builtinsTokens` has no such list.
The criterion that follows: `builtinsTokens` needs the same probe check. A
mechanism that holds only under the assumption that it works needs an
assertion that it works.
The cost of each candidate repair is measured above rather than argued.1 parent b23cc82 commit ac85c6d
1 file changed
Lines changed: 53 additions & 0 deletions
Lines changed: 53 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
490 | 543 | | |
491 | 544 | | |
492 | 545 | | |
| |||
0 commit comments