December 2015
Beginner to intermediate
166 pages
3h 8m
English
Instruction combining is a LLVM Pass and compiler technique in which we replace a sequence of instructions with instructions that are more effective and give the same result on execution in a smaller number of machine cycles. Instruction combining does not alter the CFG of the program and is mainly used for algebraic simplification. The major difference between instruction combining and instruction simplification is that in instruction simplification we cannot generate new instructions, which is possible in instruction combining. This pass is run by specifying the –instcombine argument to the opt tool and is implemented in the lib/transforms/instcombine folder. The instcombine Pass combines
%Y = add i32 %X, 1 %Z = add i32 ...
Read now
Unlock full access