Changeset 91 for trunk/UBFTarget.pas
- Timestamp:
- Jul 20, 2018, 9:41:37 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UBFTarget.pas
r90 r91 17 17 Parameter: Integer; 18 18 RelIndex: Integer; 19 end; 20 21 TOptimizations = record 22 AddSub: Boolean; 23 Merge: Boolean; 24 RelativeIndexes: Boolean; 25 CopyMultiply: Boolean; 19 26 end; 20 27 … … 39 46 MemoryMaxUsed: Integer; 40 47 CellSize: Integer; 48 Optimizations: TOptimizations; 41 49 constructor Create; override; 42 50 procedure OptimizeSource; override; … … 259 267 procedure TBFTarget.OptimizeZeroInitMemory; 260 268 begin 261 // Here optimizationrelated to assumption that initial memory is filled with zeroes269 // Here Optimizations related to assumption that initial memory is filled with zeroes 262 270 // Then code for constants preparation can be translated to cmSet commands 263 271 // To eliminate also loops for building constants code need to be somehow interpretted partialy … … 516 524 begin 517 525 inherited; 518 OptimizeAddSub; 526 if Optimizations.AddSub then OptimizeAddSub; 527 if Optimizations.Merge then 519 528 repeat 520 529 OldLength := Length(FProgram); … … 522 531 until Length(FProgram) = OldLength; 523 532 OptimizeZeroInitMemory; 524 OptimizeRelativeIndexes;525 OptimizeCopyMultiply;533 if Optimizations.RelativeIndexes then OptimizeRelativeIndexes; 534 if Optimizations.CopyMultiply then OptimizeCopyMultiply; 526 535 end; 527 536
Note:
See TracChangeset
for help on using the changeset viewer.