[SCCP] Get a copy of the state of CopyOf once.
authorFlorian Hahn <flo@fhahn.com>
Fri, 1 May 2020 13:43:15 +0000 (14:43 +0100)
committerFlorian Hahn <flo@fhahn.com>
Fri, 1 May 2020 13:46:35 +0000 (14:46 +0100)
commitd911c17596c105d66be8daba4e778600527fde2e
tree2fa1f51a3ef9ef3906ef715a7f0718119d13bfda
parent85dc033caccaa6ab919d57f9759290be41240146
[SCCP] Get a copy of the state of CopyOf once.

This fixes potential reference invalidations, when no lattice value is
assigned for CopyOf. As the state of CopyOf won't change while in
handleCallResult, we can get a copy once and use that.

Should fix PR45749.
llvm/lib/Transforms/Scalar/SCCP.cpp