I am learning about compilers at the moment and in my textbook it is briefly mentioned that UD/DU (Use-Def, Def-Use Chains) a way of saving information from the reaching definition is. It is just said that, when a variable is used, it has a list of the reaching definitions.
The problem that I am having is, that I am not clearly understanding the way this information is being used. How can this help the compiler optimize the code? Are there any other ways of saving (using) this information?