This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Proposal for adding splay_tree_find (to find elements without updating the nodes).



----------------------------------------
> From: thomas@codesourcery.com
> To: hiraditya@msn.com
> CC: richard.guenther@gmail.com; tbsaunde@tbsaunde.org; gcc@gcc.gnu.org; prathamesh.kulkarni@linaro.org
> Subject: RE: Proposal for adding splay_tree_find (to find elements without updating the nodes).
> Date: Tue, 31 Mar 2015 09:09:24 +0200
>
> Hi!
>
> On Mon, 30 Mar 2015 22:28:41 +0000, Aditya K <hiraditya@msn.com> wrote:
>> So I have modified the patch to use hash_map instead of std::map. The patch is attached.
>>
>> However, I got one regression after that.
>>
>> # Comparing directories
>> ## Dir1=../build-pristine/: 11 sum files
>> ## Dir2=../build-test/: 11 sum files
>>
>> # Comparing 11 common sum files
>> ## /bin/sh ../contrib/compare_tests /tmp/gxx-sum1.29214 /tmp/gxx-sum2.29214
>> Tests that now fail, but worked before:
>>
>> c-c++-common/goacc/loop-private-1.c -std=c++98 scan-tree-dump-times gimple "#pragma acc loop collapse\\(2\\) private\\(j\\) private\\(i\\)" 1
>> c-c++-common/goacc/loop-private-1.c scan-tree-dump-times gimple "#pragma acc loop collapse\\(2\\) private\\(j\\) private\\(i\\)" 1
>>
>> ## Differences found:
>> # 1 differences in 11 common sum files found
>>
>>
>> The error is due to mis-comparison because of reordering of private(i) private(j).
>>
>> I wanted to know if the order of the private flags matter.
>
> It doesn't matter. (I have not reviewed the proposed changes/patches
> themselves.)
>

Previously, I replaced splay_tree with std::map, and there were no regressions. I'm thinking this was because, std::map provides iterators to traverse the elements in a deterministic order (the sorted order) but
hash_map iterators may not have that order.

Thanks,
-Aditya

>
> Grüße,
> Thomas
 		 	   		  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]