Loop Trace

Dear All,

Now I have a container like this: DenseMap<const Loop *, int> D, so means that for each loop, it has a corresponding number. But for some optimizations, the LoopInfo will change, and with the new loop, can I still get the number? As I tried, the answer is no.
So my question is:
Am I right?(can’t find the number by using D.find(newloop))
Is there a method to solve this?(maybe update the loopinfo in DenseMap…or some method else)

Thank you

Hanbing LI