[LLVMdev] The problem of densemap and loop

Hanbing Li hanbing.li at inria.fr
Thu Aug 28 09:49:58 PDT 2014


Hello, everyone, 

I created a dense map like this: DenseMap<Loop *, int> ls; 
And I have a module which contains 3 functions: 
function F and it has a loop which is " Loop at depth 1 containing: %1<header><exiting>,%3,%5<latch> " 
function G and it has two loops which are " 

Loop at depth 1 containing: %8<header><exiting>,%10,%14<latch> 

Loop at depth 1 containing: %1<header><exiting>,%3,%5<latch> " 
function main and it has 3 loops which are " 

Loop at depth 1 containing: %17<header><exiting>,%19,%23<latch> 

Loop at depth 1 containing: %8<header><exiting>,%10,%14<latch 

Loop at depth 1 containing: %1<header><exiting>,%3,%5<latch> " 
Then I tried to insert these loops into ls and the expected result is that there are 6 items in ls after the insertion. 
But I got only 3. 

So my question is why this happened? 
The dense map uses the name of the loop to check if the element is in it? 
Is there anything wrong during my code? 

Looking forward to your answer. 

Thank you 

Sincerely, 

Hanbing 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140828/fff39f25/attachment.html>


More information about the llvm-dev mailing list