Changeset 126 for trunk/Forms


Ignore:
Timestamp:
Jan 14, 2022, 7:13:36 PM (2 years ago)
Author:
chronos
Message:
  • Modified: SetZero optimization made as separate step.
  • Fixed: Error during compilation in CopyMultiply optimization.
Location:
trunk/Forms
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r116 r126  
    306306      Core.CurrentTarget := TTarget(Core.Targets[0]);
    307307    Core.Optimizations.AddSub := ReadBoolWithDefault('OptimizationAddSubEnabled', True);
     308    Core.Optimizations.SetZero := ReadBoolWithDefault('OptimizationSetZeroEnabled', True);
    308309    Core.Optimizations.Merge := ReadBoolWithDefault('OptimizationMerge', True);
    309310    Core.Optimizations.CopyMultiply := ReadBoolWithDefault('OptimizationCopyMultiplyEnabled', True);
     
    321322    WriteString('TargetName', Core.CurrentTarget.Name);
    322323    WriteBool('OptimizationAddSubEnabled', Core.Optimizations.AddSub);
     324    WriteBool('OptimizationSetZeroEnabled', Core.Optimizations.SetZero);
    323325    WriteBool('OptimizationMerge', Core.Optimizations.Merge);
    324326    WriteBool('OptimizationCopyMultiplyEnabled', Core.Optimizations.CopyMultiply);
  • trunk/Forms/UFormOptions.lfm

    r103 r126  
    1111  OnCreate = FormCreate
    1212  OnShow = FormShow
    13   LCLVersion = '2.0.0.4'
     13  LCLVersion = '2.2.0.4'
    1414  object ButtonOk: TButton
    1515    Left = 631
     
    4646    object TabSheetGeneral: TTabSheet
    4747      Caption = 'General'
    48       ClientHeight = 277
    49       ClientWidth = 585
     48      ClientHeight = 331
     49      ClientWidth = 701
    5050      ParentFont = False
    5151      object Panel1: TPanel
    5252        Left = 0
    53         Height = 277
     53        Height = 331
    5454        Top = 0
    55         Width = 585
     55        Width = 701
    5656        Align = alClient
    5757        BevelOuter = bvNone
    58         ClientHeight = 277
    59         ClientWidth = 585
     58        ClientHeight = 331
     59        ClientWidth = 701
    6060        ParentFont = False
    6161        TabOrder = 0
    6262        object Label3: TLabel
    6363          Left = 10
    64           Height = 20
     64          Height = 26
    6565          Top = 58
    66           Width = 127
     66          Width = 164
    6767          Caption = 'Interface language:'
    68           ParentColor = False
    6968          ParentFont = False
    7069        end
    7170        object ComboBoxLanguage: TComboBox
    7271          Left = 307
    73           Height = 33
     72          Height = 41
    7473          Top = 58
    7574          Width = 226
    76           ItemHeight = 25
     75          ItemHeight = 0
    7776          ParentFont = False
    7877          Style = csDropDownList
     
    8382          Height = 32
    8483          Top = 102
    85           Width = 1144
     84          Width = 1260
    8685          Anchors = [akTop, akLeft, akRight]
    8786          AutoSize = False
     
    9493          Height = 32
    9594          Top = 150
    96           Width = 1134
     95          Width = 1250
    9796          Anchors = [akTop, akLeft, akRight]
    9897          AutoSize = False
     
    104103        object LabelDPI: TLabel
    105104          Left = 36
    106           Height = 20
    107           Top = 192
    108           Width = 26
     105          Height = 26
     106          Top = 192
     107          Width = 35
    109108          Caption = 'DPI:'
    110           ParentColor = False
    111109          ParentFont = False
    112110        end
    113111        object SpinEditDPIX: TSpinEdit
    114112          Left = 134
    115           Height = 28
     113          Height = 42
    116114          Top = 190
    117115          Width = 96
     
    124122        object SpinEditDPIY: TSpinEdit
    125123          Left = 259
    126           Height = 28
     124          Height = 42
    127125          Top = 192
    128126          Width = 96
     
    135133        object LabelX: TLabel
    136134          Left = 240
    137           Height = 20
    138           Top = 192
    139           Width = 7
     135          Height = 26
     136          Top = 192
     137          Width = 10
    140138          Caption = 'x'
    141           ParentColor = False
    142139          ParentFont = False
    143140        end
    144141        object LabelTheme: TLabel
    145142          Left = 10
    146           Height = 20
     143          Height = 26
    147144          Top = 19
    148           Width = 48
     145          Width = 63
    149146          Caption = 'Theme:'
    150           ParentColor = False
    151147          ParentFont = False
    152148        end
    153149        object ComboBoxTheme: TComboBox
    154150          Left = 307
    155           Height = 33
     151          Height = 41
    156152          Top = 10
    157153          Width = 226
    158           ItemHeight = 25
     154          ItemHeight = 0
    159155          ParentFont = False
    160156          Style = csDropDownList
     
    165161    object TabSheetBuild: TTabSheet
    166162      Caption = 'Build'
    167       ClientHeight = 333
    168       ClientWidth = 703
     163      ClientHeight = 331
     164      ClientWidth = 701
    169165      ParentFont = False
    170166      object Panel2: TPanel
    171167        Left = 0
    172         Height = 333
     168        Height = 331
    173169        Top = 0
    174         Width = 703
     170        Width = 701
    175171        Align = alClient
    176172        BevelOuter = bvNone
    177         ClientHeight = 333
    178         ClientWidth = 703
     173        ClientHeight = 331
     174        ClientWidth = 701
    179175        ParentFont = False
    180176        TabOrder = 0
    181177        object Label4: TLabel
    182178          Left = 10
    183           Height = 25
     179          Height = 26
    184180          Top = 125
    185           Width = 189
     181          Width = 202
    186182          Caption = 'Compiler optimizations:'
    187           ParentColor = False
    188183          ParentFont = False
    189184        end
    190185        object ComboBoxOptimization: TComboBox
    191186          Left = 298
    192           Height = 33
    193           Top = 125
     187          Height = 38
     188          Top = 120
    194189          Width = 226
    195           ItemHeight = 25
     190          ItemHeight = 0
    196191          Items.Strings = (
    197192            'None'
     
    205200        object CheckBoxOptimizeAddSub: TCheckBox
    206201          Left = 37
    207           Height = 29
     202          Height = 30
    208203          Top = 163
    209           Width = 228
     204          Width = 236
    210205          Caption = 'Addition and subtraction'
    211206          ParentFont = False
     
    214209        object CheckBoxOptimizeMerge: TCheckBox
    215210          Left = 37
    216           Height = 29
    217           Top = 192
    218           Width = 218
     211          Height = 30
     212          Top = 224
     213          Width = 227
    219214          Caption = 'Merge same operations'
    220215          ParentFont = False
     
    223218        object CheckBoxOptimizeCopyMultiply: TCheckBox
    224219          Left = 37
    225           Height = 29
    226           Top = 250
    227           Width = 141
     220          Height = 30
     221          Top = 282
     222          Width = 142
    228223          Caption = 'Copy multiply'
     224          OnChange = CheckBoxOptimizeCopyMultiplyChange
    229225          ParentFont = False
    230226          TabOrder = 3
     
    232228        object CheckBoxOptimizeRelativeIndexes: TCheckBox
    233229          Left = 37
    234           Height = 29
    235           Top = 221
    236           Width = 155
     230          Height = 30
     231          Top = 253
     232          Width = 162
    237233          Caption = 'Relative indexes'
     234          OnChange = CheckBoxOptimizeRelativeIndexesChange
    238235          ParentFont = False
    239236          TabOrder = 4
     
    241238        object Label2: TLabel
    242239          Left = 10
    243           Height = 25
    244           Top = 48
    245           Width = 66
     240          Height = 26
     241          Top = 64
     242          Width = 73
    246243          Caption = 'Cell size:'
    247           ParentColor = False
    248244          ParentFont = False
    249245        end
    250246        object Label1: TLabel
    251247          Left = 10
    252           Height = 25
    253           Top = 10
    254           Width = 105
     248          Height = 26
     249          Top = 16
     250          Width = 112
    255251          Caption = 'Memory size:'
    256           ParentColor = False
    257252          ParentFont = False
    258253        end
    259254        object SpinEditMemorySize: TSpinEdit
    260255          Left = 198
    261           Height = 33
     256          Height = 42
    262257          Top = 7
    263258          Width = 156
     
    268263        object SpinEditCellSize: TSpinEdit
    269264          Left = 198
    270           Height = 33
    271           Top = 48
     265          Height = 42
     266          Top = 56
    272267          Width = 156
    273268          MaxValue = 2000000000
    274269          ParentFont = False
    275270          TabOrder = 6
     271        end
     272        object CheckBoxOptimizeSetZero: TCheckBox
     273          Left = 37
     274          Height = 30
     275          Top = 192
     276          Width = 93
     277          Caption = 'Set zero'
     278          ParentFont = False
     279          TabOrder = 7
    276280        end
    277281      end
  • trunk/Forms/UFormOptions.lrj

    r103 r126  
    1717{"hash":150963587,"name":"tformoptions.checkboxoptimizerelativeindexes.caption","sourcebytes":[82,101,108,97,116,105,118,101,32,105,110,100,101,120,101,115],"value":"Relative indexes"},
    1818{"hash":243182762,"name":"tformoptions.label2.caption","sourcebytes":[67,101,108,108,32,115,105,122,101,58],"value":"Cell size:"},
    19 {"hash":239490586,"name":"tformoptions.label1.caption","sourcebytes":[77,101,109,111,114,121,32,115,105,122,101,58],"value":"Memory size:"}
     19{"hash":239490586,"name":"tformoptions.label1.caption","sourcebytes":[77,101,109,111,114,121,32,115,105,122,101,58],"value":"Memory size:"},
     20{"hash":208144671,"name":"tformoptions.checkboxoptimizesetzero.caption","sourcebytes":[83,101,116,32,122,101,114,111],"value":"Set zero"}
    2021]}
  • trunk/Forms/UFormOptions.pas

    r115 r126  
    2020    CheckBoxOptimizeAddSub: TCheckBox;
    2121    CheckBoxOptimizeCopyMultiply: TCheckBox;
     22    CheckBoxOptimizeSetZero: TCheckBox;
    2223    CheckBoxOptimizeMerge: TCheckBox;
    2324    CheckBoxOptimizeRelativeIndexes: TCheckBox;
     
    4243    TabSheetBuild: TTabSheet;
    4344    procedure CheckBoxDPIAutoChange(Sender: TObject);
     45    procedure CheckBoxOptimizeCopyMultiplyChange(Sender: TObject);
     46    procedure CheckBoxOptimizeRelativeIndexesChange(Sender: TObject);
    4447    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    4548    procedure FormCreate(Sender: TObject);
     
    8184  end;
    8285  CheckBoxOptimizeAddSub.Enabled := ComboBoxOptimization.ItemIndex > 0;
     86  CheckBoxOptimizeSetZero.Enabled := ComboBoxOptimization.ItemIndex > 0;
    8387  CheckBoxOptimizeMerge.Enabled := ComboBoxOptimization.ItemIndex > 0;
    8488  CheckBoxOptimizeRelativeIndexes.Enabled := ComboBoxOptimization.ItemIndex > 0;
     
    9498  CheckBox1.Checked := Core.OpenProjectOnStart;
    9599  CheckBoxOptimizeAddSub.Checked := Core.Optimizations.AddSub;
     100  CheckBoxOptimizeSetZero.Checked := Core.Optimizations.SetZero;
    96101  CheckBoxOptimizeMerge.Checked := Core.Optimizations.Merge;
    97102  CheckBoxOptimizeRelativeIndexes.Checked := Core.Optimizations.RelativeIndexes;
     
    119124  Core.MemorySize := SpinEditMemorySize.Value;
    120125  Core.Optimizations.AddSub := CheckBoxOptimizeAddSub.Checked;
     126  Core.Optimizations.SetZero := CheckBoxOptimizeSetZero.Checked;
    121127  Core.Optimizations.Merge := CheckBoxOptimizeMerge.Checked;
    122128  Core.Optimizations.RelativeIndexes := CheckBoxOptimizeRelativeIndexes.Checked;
     
    127133begin
    128134  UpdateInterface;
     135end;
     136
     137procedure TFormOptions.CheckBoxOptimizeCopyMultiplyChange(Sender: TObject);
     138begin
     139  // Needed for optimize copy multiply
     140  if CheckBoxOptimizeCopyMultiply.Checked then
     141    CheckBoxOptimizeRelativeIndexes.Checked := True;
     142end;
     143
     144procedure TFormOptions.CheckBoxOptimizeRelativeIndexesChange(Sender: TObject);
     145begin
     146  // Needed for optimize copy multiply
     147  if not CheckBoxOptimizeRelativeIndexes.Checked then
     148    CheckBoxOptimizeCopyMultiply.Checked := False;
    129149end;
    130150
Note: See TracChangeset for help on using the changeset viewer.