-Onbt: Disable ICG Level Branch Tail Merging

Group

OPTIMIZATIONS

Scope

Function

Syntax
  -Onbt
  
  
Arguments

None

Default

None

Defines

None

Pragmas

None

Description

This option switches the ICG level branch tail merging off. This simplifies debugging and produces more readable code.

The example in the following listing disassembles to the following pseudocode.

Listing: Example Function


void main(void) {
  if(x > 0) {

    y = 4;

  } else {

    y = 9;

  }

}

Without -Onbt, the above example disassembles as shown in the following listing.

Listing: Case (1) Without -Onbt: (Pseudo Intermediate Code)


             CMP   x, 0
             BLE   else_label

             LOAD  reg, #4

             BRA   branch_tail

else_label:  LOAD  reg, #9

branch_tail: STORE y, reg

go_on:        ...

With the -Obnt compiler option, Listing: Example Function listing disassembles as in the following listing.

Listing: Case (2) with -Onbt: (Pseudo Intermediate Code)


             CMP   x, 0
             BLE   else_label

             LOAD  reg, #4

             STORE y, reg

             BRA   go_on

else_label:  LOAD  reg, #9

             STORE y, reg

go_on:       ...
Example
  -Onbt