In
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
, in particular
compiler
In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
construction, value range analysis is a type of
data flow analysis that tracks the range (interval) of values that a numeric variable can take on at each point of a program's execution.
The resulting information can be used in optimizations such as redundancy elimination,
dead code elimination
In compiler theory, dead-code elimination (DCE, dead-code removal, dead-code stripping, or dead-code strip) is a compiler optimization to remove dead code (code that does not affect the program results). Removing such code has several benefits: i ...
, instruction selection, etc., but can also be used to improve the safety of programs, e.g. in the detection of
buffer overruns. Techniques for value range analysis typically use
symbolic analysis extensively.
Value range analysis is often implemented in the
Intel C++ Compiler
Intel oneAPI DPC++/C++ Compiler and Intel C++ Compiler Classic (deprecated icc and icl is in Intel OneAPI HPC toolkit) are Intel’s C, C++, SYCL, and Data Parallel C++ (DPC++) compilers for Intel processor-based systems, available for Wind ...
and is implemented in
GCC.
References
{{Compiler optimizations
Static program analysis
Compiler optimizations