On 01/29/2014 03:39 PM, Rafael Espíndola wrote:>> So explain to me how this mechanism would work. >> >> As I'm processing a single mips16 function, I realize that I need to create >> one or more mips32 helper functions. >> >> I'm in a function pass. So I'm not supposed to be creating new functions, as >> far as I understand. >> >> >> Also, I can't know which mips32 stub functions to create until I have >> processed all functions because otherwise I might create duplicates. >> >> >> So how would you do this within the existing LLVM pass structure? > A module pass that iterates oven the functions should do it. > > Cheers, > RafaelHow would this pass get added to the chain? It has to create more functions and then those in turn need to be compiled. Reed
> How would this pass get added to the chain? > > It has to create more functions and then those in turn need to be compiled.I am sure it can be done. MergeFunctions for example creates new functions. Now, it does seem this request/code review is a bit upside down. You have been told that your original proposal is not acceptable. Reviewers may offer to help, but in the end it is the author that has to go figure out how something has to be done. You seem to expect that Eric and I are now the ones responsible for it. Cheers, Rafael
On 01/29/2014 04:25 PM, Rafael Espíndola wrote:>> How would this pass get added to the chain? >> >> It has to create more functions and then those in turn need to be compiled. > I am sure it can be done. MergeFunctions for example creates new functions. > > Now, it does seem this request/code review is a bit upside down. You > have been told that your original proposal is not acceptable. > Reviewers may offer to help, but in the end it is the author that has > to go figure out how something has to be done. You seem to expect that > Eric and I are now the ones responsible for it. > > Cheers, > RafaelYou are making an assumption without knowing the whole problem, that there is a better way to do what I want to do. What you are proposing seems a very round about way to solve a simple problem. I am trying to understand better Erics original proposal because maybe there is some way I can use the primitives of McStreamer and McInstruction from within Asm Printer in place of emitting raw text. Reed
On 01/29/2014 04:25 PM, Rafael Espíndola wrote:>> How would this pass get added to the chain? >> >> It has to create more functions and then those in turn need to be compiled. > I am sure it can be done. MergeFunctions for example creates new functions. > > Now, it does seem this request/code review is a bit upside down. You > have been told that your original proposal is not acceptable. > Reviewers may offer to help, but in the end it is the author that has > to go figure out how something has to be done. You seem to expect that > Eric and I are now the ones responsible for it. > > Cheers, > RafaelYou may have missed this in the discussion, but this cannot be done in an IR pass. I find out that I need the stub during ISEL lowering. Reed