1. Main Differences Between armcl and tiarmclang¶
This section of the Migration Guide describes the primary differences between the armcl compiler tools and the TI Arm Clang (tiarmclang) Compiler Tools.
For more information about the differences introduced below, see the following subsections:
Language Support For C/C++ and Assembly Differences
C/C++: Discontinued support for legacy TI pre-defined macro symbols, pragmas, and intrinsics.
Assembly: The tiarmclang compiler tools support GNU-syntax Arm assembly language by default as opposed to legacy TI-syntax Arm assembly language.
For more information, see C/C++ and Assembly Language Differences.
Development Flow Related Differences
The tiarmclang compiler invokes the linker by default, whereas the user must specify armcl’s -run_linker option to invoked the linker from the armcl command-line. However, the --rom_model (-c) linker option is not set by default by the tiarmclang compiler when running the linker. Therefore, the --rom_model (-c) or --ram_model (-cr) option must be passed to the linker on the tiarmclang command line or in the linker command file.
The tiarmclang compiler does not support a C/C++ interlist option from the compiler command-line.
The tiarmclang compiler ends compilation after emitting assembly output when using the -S option.
The tiarmclang compiler does not support altering the file extension of compiler generated files.
For more information, see Development Flow Differences.
Differences in Behavior of Binary Utilities
The armcl compiler does not attempt to inline a function that contains an asm() statement, but the tiarmclang compiler inlines a function containing an asm() statement if it is beneficial to do so.
The command-line interface for the tiarmclang versions of the C++ Name Demangler Utility (tiarmdem) and the Name Utility (tiarmnm) behave differently than the armcl versions of armdem and armnm.
For more information, see Binary Utility Differences.
Differences in Type Aliasing Assumptions
When optimizing memory accesses, tiarmclang assumes that pointers of different types cannot refer to the same memory. This means that if a pointer to an object is cast to a pointer of a different type, the compiler will treat the two pointers as not referencing the same memory. A user access of either pointer with the assumption that they refer to the same memory is undefined behavior. The C standard allows compilers to make a less conservative assumption about strict type aliasing in order to better optimize code to yield better performance. This behavior is consistent with that of other compilers, but it is different from armcl, which makes a more conservative assumption while sacrificing optimization.
Users with code for which this poses problems should disable strict type aliasing by using the -fno-strict-aliasing compiler option.
For more information, see Controlling Optimization.