OPTIMIZATIONS
Function
-Obfv
None
None
None
None
Use this option to optimize bitfields and volatile bitfields. The compiler changes the access order or combines many accesses into one, even if the bitfields are declared as volatile.
The following listing contains bitfields to be optimized with the -Obfv compiler option.
volatile struct { unsigned int b0:1; unsigned int b1:1; unsigned int b2:1; } bf; void myfun(void) { bf.b0 = 1; bf.b1 = 1; bf.b2 = 1; }
Using the -Obfv option, bitfield access looks like:
BSET bf,#7
Without using the -Obfv option, bitfield access looks like:
BSET bf,#1
BSET bf,#2
BSET bf,#4