mirror of
https://github.com/KarolS/millfork.git
synced 2026-04-20 18:16:35 +00:00
Interprocedural optimization plus some minor fixes:
– fixed handling LDX/LDY/LDZ when inlining variables into registers – fixed CLA/CLX/CLY instruction generation – refactored optimization definitions
This commit is contained in:
@@ -53,7 +53,7 @@ and ending when the function returns.
|
||||
Most automatic variables reside in memory.
|
||||
They can share their memory location with other automatic variables and parameters,
|
||||
to conserve memory usage.
|
||||
Some small automatic variables may be inlined to index registers.
|
||||
Some small automatic variables may be inlined to registers.
|
||||
They are not automatically initialized before reading, reading them before initialization yields an undefined value.
|
||||
Automatic local variables are not safe to use with reentrant functions, see the [relevant documentation](../lang/reentrancy.md) for more details.
|
||||
|
||||
@@ -66,7 +66,7 @@ of the function call to the function they're defined in
|
||||
and ending when the function returns.
|
||||
They reside in memory and can share their memory location with other parameters and automatic variables,
|
||||
to conserve memory usage.
|
||||
Unlike automatic variables, they are never inlined into index registers.
|
||||
Unlike automatic variables, they are almost never inlined into registers.
|
||||
Parameters are not safe to use with reentrant functions, see the [relevant documentation](../lang/reentrancy.md) for more details.
|
||||
|
||||
|
||||
|
||||
@@ -89,13 +89,19 @@ This may cause problems if the parameter table is stored next to a hardware regi
|
||||
|
||||
* `--inline` – Inline functions automatically (experimental). See the [documentation about inlining](../abi/inlining.md). Computationally easy, can give decent gains.
|
||||
|
||||
* `--fipo`, `--fno-ipo` – Whether should perform interprocedural optimization.
|
||||
It enables certain optimization similar to what inlining would enable, but without actual inlining.
|
||||
|
||||
* `--size` – Optimize for size, sacrificing some speed (experimental).
|
||||
|
||||
* `--fast` – Optimize for speed, even if it increases the size a bit (experimental).
|
||||
|
||||
* `--blast-processing` – Optimize for speed, even if it increases the size a lot (experimental).
|
||||
Enables `--inline` automatically.
|
||||
|
||||
* `--dangerous-optimizations` – Use dangerous optimizations (experimental). Dangerous optimizations are more likely to result in broken code.
|
||||
* `--dangerous-optimizations` – Use dangerous optimizations (experimental).
|
||||
Dangerous optimizations are more likely to result in broken code.
|
||||
Enables `--fipo` automatically.
|
||||
|
||||
## Warning options
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@ You may be also interested in the following:
|
||||
|
||||
* `--inline` – automatically inline functions for better optimization
|
||||
|
||||
* `--fipo` – enable interprocedural optimization
|
||||
|
||||
* `-s` – additionally generate assembly output
|
||||
|
||||
* `-g` – additionally generate a label file, in format compatible with VICE emulator
|
||||
|
||||
Reference in New Issue
Block a user