Skip to content

Commit f198e69

Browse files
docs: remove -skip-unused from the docs, it is now on by default (close #23265) (#23303)
1 parent 50e3f9c commit f198e69

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

doc/docs.md

+2-12
Original file line numberDiff line numberDiff line change
@@ -6933,7 +6933,6 @@ performance, memory usage, or size.
69336933
| `@[packed]` | Memory usage | Potential performance loss |
69346934
| `@[minify]` | Performance, Memory usage | May break binary serialization/reflection |
69356935
| `_likely_/_unlikely_` | Performance | Risk of negative performance impact |
6936-
| `-skip-unused` | Performance, Compile time, Size | Potential instability |
69376936
| `-fast-math` | Performance | Risk of incorrect mathematical operations results |
69386937
| `-d no_segfault_handler` | Compile time, Size | Loss of segfault trace |
69396938
| `-cflags -march=native` | Performance | Risk of reduced CPU compatibility |
@@ -7059,15 +7058,6 @@ expression is highly improbable. In the JS backend, that does nothing.
70597058
- When the prediction can be wrong, as it might cause a performance penalty due to branch
70607059
misprediction.
70617060
7062-
#### `-skip-unused`
7063-
7064-
This flag tells the V compiler to omit code that is not needed in the final executable to run your
7065-
program correctly. This will remove unneeded `const` arrays allocations and unused functions
7066-
from the code in the generated executable.
7067-
7068-
This flag will be on by default in the future when its implementation will be stabilized and all
7069-
severe bugs will be found.
7070-
70717061
**When to Use**
70727062
70737063
- For production builds where you want to reduce the executable size and improve runtime
@@ -7177,7 +7167,7 @@ rm -f *.profraw
71777167
rm -f default.profdata
71787168
71797169
# Initial build with PGO instrumentation
7180-
v -cc clang -skip-unused -prod -cflags -fprofile-generate -o pgo_gen .
7170+
v -cc clang -prod -cflags -fprofile-generate -o pgo_gen .
71817171
71827172
# Run the instrumented executable 10 times
71837173
for i in {1..10}; do
@@ -7188,7 +7178,7 @@ done
71887178
llvm-profdata merge -o default.profdata *.profraw
71897179
71907180
# Compile the optimized version using the PGO data
7191-
v -cc clang -skip-unused -prod -cflags "-fprofile-use=${CUR_DIR}/default.profdata" -o optimized_program .
7181+
v -cc clang -prod -cflags "-fprofile-use=${CUR_DIR}/default.profdata" -o optimized_program .
71927182
71937183
# Remove PGO data and instrumented executable
71947184
rm *.profraw

0 commit comments

Comments
 (0)