# LLVM: enable sancov pass partially · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/88bba4c15463796c0b89a4d097366b11bdb7679c)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 88bba4c15463796c0b89a4d097366b11bdb7679c

Requested commit: 88bba4c15463796c0b89a4d097366b11bdb7679c

Commit: 88bba4c15463796c0b89a4d097366b11bdb7679c

Tree: 7d2ce0cb17531525470f110fc6a5516ea1da65a3

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
LLVM: enable sancov pass partially

It's useful to have TraceCmp based on the results of LLVM optimizations,
while the code coverage bits were emitted by Zig manually, allowing more
careful correlation to points of interest in the source code.

This re-enables the sancov pass in `-ffuzz` mode, but only TraceCmp.

Notably, IndirectCalls is off, which needs to be implemented manually in
the LLVM backend, and StackDepth remains off, because it is not used by
libfuzzer or AFL either.

If stack depth is re-introduced, it can be done with better performance
characteristics by being function call graph aware, and only lowered in
call graph cycles, where its heuristic properties come in useful.

Fixes the fuzzing regression.

```

## Parents

- [b8d99a332395ec0a1b9ed1a8e18f0db8db131b3c](https://git.cafe/gitcafe/zig/commit/b8d99a332395ec0a1b9ed1a8e18f0db8db131b3c?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/88bba4c15463796c0b89a4d097366b11bdb7679c?format=markdown)
