[PATCH] D19421: [RewriteStatepointsForGC] Stabilise rematerialization order

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 11:17:10 PDT 2016


sanjoy added a comment.

In http://reviews.llvm.org/D19421#413633, @igor-laevsky wrote:

> So what do you think? Basically we will consume twice as much memory for sustaining order via SetVector/MapVector. And since we only need stable order in certain points and not during whole pass run, I think it's fine to keep explicit sorting. We should probably hoist such code into a clear helper function though.


I'd say if the additional time or space consumption creates trouble, we can consider moving to a cleverer algorithm (i.e. doing less work because doing the same units of work is more expensive).  For now, given that non-determinism in this pass leads to actual codegen differences, I'm fairly inclined to make things deterministic by construction.


http://reviews.llvm.org/D19421





More information about the llvm-commits mailing list