Add a new insert_as() method to DenseMap and use it for ConstantUniqueMap
Summary: Just like the existing find_as() method, the new insert_as() accepts an extra parameter which is used as a key to find the bucket in the map. When creating a Constant, we want to check the map before actually creating the object. In this case we have to perform two queries to the map, and this extra parameter can save recomputing the hash value for the second query. Reviewers: dexonsmith, chandlerc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16268 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 260458
Loading
Please sign in to comment