COMPILER DESIGN

TOOLS AND TECHNIQUES FOR COMPILER DESIGN

LLVM

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Compile-time memory barriers are used to prevent the compiler from reordering instructions at compile-time
A
True
B
False
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -Compiler Reordering For example, registers are used to cache the values of variables and instruction reordering in the memory. The premise of these optimizations is that the optimizations cannot affect the normal implementation of the functionality in single-threaded programs.

Detailed explanation-2: -Compiler and hardware try to reorder programs in order to improve their efficiency, while respecting dependencies. Indeed their actions is complementary. Compiler can consider larger reorganisations than processor and uses more complex heuristics to do it.

There is 1 question to complete.