@@ -6933,7 +6933,6 @@ performance, memory usage, or size.
6933
6933
| ` @[packed]` | Memory usage | Potential performance loss |
6934
6934
| ` @[minify]` | Performance, Memory usage | May break binary serialization/reflection |
6935
6935
| ` _likely_/_unlikely_` | Performance | Risk of negative performance impact |
6936
- | ` -skip-unused` | Performance, Compile time, Size | Potential instability |
6937
6936
| ` -fast-math` | Performance | Risk of incorrect mathematical operations results |
6938
6937
| ` -d no_segfault_handler` | Compile time, Size | Loss of segfault trace |
6939
6938
| ` -cflags -march=native` | Performance | Risk of reduced CPU compatibility |
@@ -7059,15 +7058,6 @@ expression is highly improbable. In the JS backend, that does nothing.
7059
7058
- When the prediction can be wrong, as it might cause a performance penalty due to branch
7060
7059
misprediction.
7061
7060
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
-
7071
7061
**When to Use**
7072
7062
7073
7063
- For production builds where you want to reduce the executable size and improve runtime
@@ -7177,7 +7167,7 @@ rm -f *.profraw
7177
7167
rm -f default.profdata
7178
7168
7179
7169
# 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 .
7181
7171
7182
7172
# Run the instrumented executable 10 times
7183
7173
for i in {1..10}; do
@@ -7188,7 +7178,7 @@ done
7188
7178
llvm-profdata merge -o default.profdata * .profraw
7189
7179
7190
7180
# 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 .
7192
7182
7193
7183
# Remove PGO data and instrumented executable
7194
7184
rm * .profraw
0 commit comments