LLVM: lib/CodeGen/RemoveLoadsIntoFakeUses.cpp File Reference (original) (raw)
The FAKE_USE instruction is used to preserve certain values through optimizations for the sake of debugging. More...
The FAKE_USE instruction is used to preserve certain values through optimizations for the sake of debugging.
This may result in spilled values being loaded into registers that are only used by FAKE_USEs; this is not necessary for debugging purposes, because at that point the value must be on the stack and hence available for debugging. Therefore, this pass removes loads that are only used by FAKE_USEs.
This pass should run very late, to ensure that we don't inadvertently shorten stack lifetimes by removing these loads, since the FAKE_USEs will also no longer be in effect. Running immediately before LiveDebugValues ensures that LDV will have accurate information of the machine location of debug values.
Definition in file RemoveLoadsIntoFakeUses.cpp.