[llvm] r177525 - Move SDNode order propagation to SDNodeOrdering, which also fixes a missed

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Mar 20 14:20:35 PDT 2013


On Mar 20, 2013, at 7:51 AM, Justin Holewinski <jholewinski at nvidia.com> wrote:

>   void add(const SDNode *Node, unsigned O) {
> -    OrderMap[Node] = O;
> +    unsigned OldOrder = getOrder(Node);
> +    if (OldOrder == 0 || (OldOrder > 0 && O < OldOrder))

Perhaps O is no longer a good choice for a variable name here?

Also, please avoid using two hash table lookups in this function. One is enough. They are not as cheap as the syntax suggests.

Thanks,
/jakob




More information about the llvm-commits mailing list