[PATCH] [Review Request] Numbering SDNode to discard SmallPtrSet in selection DAG
Wan, Xiaofei
xiaofei.wan at intel.com
Fri Jul 12 05:09:06 PDT 2013
Thanks for your review.
1. SmallBitVector can meet what FlagVector can after some minor changes, but for the convenience of review, I don't want to change it since it is a common container which is used by most people, I will change to use SmallBitVector instead of FlagVector.
2. SmallBitVector is usually O(1), but the overhead to construct this set is hot, the insert_impl is very hot.
[cid:image001.png at 01CE7F3B.A70406A0]
-----Original Message-----
From: Benjamin Kramer [mailto:benny.kra at gmail.com]
Sent: Friday, July 12, 2013 6:04 PM
To: resistor at mac.com; Wan, Xiaofei
Cc: llvm-commits at cs.uiuc.edu; benny.kra at gmail.com
Subject: Re: [PATCH] [Review Request] Numbering SDNode to discard SmallPtrSet in selection DAG
Some high level comments:
- SmallPtrSet is usually O(1) but falls back to linear search when it's small. SmallPtrSet<64> is way too large, have you benchmarked with the small capacity lowered to 8 or 16? This of course adds malloc overhead in more cases but we might get away with it.
If the above fails:
- I really don't see the point of FlagVector. Why not just use a SmallVector (or SmallBitVector as we're only storing bools) and resize appropriately when it's used. In any case, the class does not belong in SmallVector.h.
http://llvm-reviews.chandlerc.com/D1129
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130712/e3606c16/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 51104 bytes
Desc: image001.png
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130712/e3606c16/attachment.png>
More information about the llvm-commits
mailing list