An idea that's been batted about a bit lately is that our op-bloat is at least partly caused by all the constant-argument variant forms all of our ops need to support.
To address this, the constant_unfolding branch adds a step to IMCC instruction selection to check for non-const variants of an as-of-yet-unfound op. If found, this op is used and constant arguments are handled by assignments to temporary registers. This is the opposite direction of constant folding, so I have named it constant unfolding. Anyone familiar with what this is actually called, please chime in. An important component of the instruction sequence rewriting (which is already done to a considerable extent in IMCC) is that we should be able to maintain full compatibility at the PIR level while eliminating a large number of ops. As a proof of concept, I have removed 30 const form find_cclass and find_not_cclass ops in r47192 with no ill effect. The branch currently passes fulltest. Note: I selected find_cclass and find_not_cclass because they had a lot of variants and I'd never seen them used. If they are bad candidates for pessimizing for the greater good, we can easily revert their removal. Comments? Suggestions of rarely used const-variant ops to kill? Peter Lobsinger _______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev
