[PATCH][Review Requested][Compilation Time] Using hashing in getVTList()

Nowicki, Tyler tyler.nowicki at intel.com
Thu Feb 14 15:44:14 PST 2013


Hi Chris,

Thanks for the review. We have committed the const change.

FoldingSet - We have experimented with using FoldingSet on another compile-time optimization however we found that it was slower. Sriram Murali posted a message discussing our findings on this. See `RE: [PATCH][Review Requested][Compilation Time] Calculate hash   value and equality comparison within SCEV node itself'

Hashing - The patch uses bucket hashing. It is simple and fast. Can you suggest something better?

Tyler

From: Chris Lattner [mailto:clattner at apple.com]
Sent: Wednesday, February 13, 2013 12:05 AM
To: Nowicki, Tyler
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [PATCH][Review Requested][Compilation Time] Using hashing in getVTList()


On Jan 31, 2013, at 2:54 PM, "Nowicki, Tyler" <tyler.nowicki at intel.com<mailto:tyler.nowicki at intel.com>> wrote:


Hi,

This patch aims to improve compile time performance by replacing a sequential search over an std::vector in the function getVTList() with a look up into a SmallVector where the index is calculated by hashing the input VTs and a sequential search through a smaller VT bucket.

This patch is part of a series of compile time improvements. Although these were originally produced by our colleague Wan Xiaofei, our team consisting of preston.gurd at intel.com<mailto:preston.gurd at intel.com>;sriram.murali at intel.com<mailto:sriram.murali at intel.com> and myself, are assuming all responsibility for this work.

Hi Tyler,

Marking stuff const is obvious, please commit that.  For the actual algorithm here, have you considered using a FoldingSet or a hash table of some sort to unique the lists instead of switching the order of the linear scan?

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130214/fe0f68fa/attachment.html>


More information about the llvm-commits mailing list