[PATCH] "float2int": Add a new pass to demote from float to int where possible.

James Molloy james.molloy at arm.com
Wed Feb 25 09:17:38 PST 2015


> This is directly recursive; that's likely a bad idea (especially considering that it has no depth cutoff). Can you make this be worklist-based instead. We don't need a small cutoff if we have a worklist.


Hrmm, I agree. It's slightly awkward because I do need the return value of traverse() right there and then, so converting it to be breadth first is going to be awkward.

I think I'll separate these out into two parts - first, scan up the use-def graph using a worklist to find all the nodes that I want to visit. Then, so a linear walk of the result back-to-front calculating node values.

For the moment I've added a cutoff of 32 instructions; I'll go work on reworking the algorithm now.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7790

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list