Skip to content

Commit 7d899c3

Browse files
committed
fix loop reduction docs
1 parent 2710128 commit 7d899c3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

doc/general.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,16 +457,17 @@ is converted to the equivalent of
457457
bptr += 4
458458
```
459459

460+
#### Multiply to addition
461+
462+
An expression like `(i*100)` where `i` is a loop index can be converted to
463+
something like `itmp \ itmp + 100`
464+
460465
### Cold code (-Ocold-code)
461466

462467
Moves unlikely code paths (indicated using `__builtin_expect`) to the end of the function. This means the likely path can execute without taking any branches, in exchange for the unlikely path taking two branches. Also, due to outstanding refactoring of function epilogues, using this feature adds one taken branch when the function returns at its end.
463468

464469
This optimization is not currently enabled by any flags. Use it cautiously.
465470

466-
#### Multiply to addition
467-
468-
An expression like `(i*100)` where `i` is a loop index can be converted to
469-
something like `itmp \ itmp + 100`
470471

471472
## Memory Allocation and Management
472473

0 commit comments

Comments
 (0)