<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Nov 13, 2014 at 5:24 PM, reed kotler <span dir="ltr"><<a href="mailto:rkotler@mips.com" target="_blank">rkotler@mips.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>On 11/13/2014 05:20 PM, Reid Kleckner
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Looks like you're including that .inc file twice,
        which is going to duplicate the code. IMO it'd be better to call
        over from FastISel into a wrapper in ISelLowering if you want to
        use these.</div>
      <div class="gmail_extra"><br>
      </div>
    </blockquote>
    I think it's a mistake for tablegen to be generating static
    functions here.<br>
    <br>
    Why should I have to make a wrapper?<br>
    <br>
    I've raised this issue before but did not get any response.<br></div></blockquote><div><br></div><div>Wow. Looks like all the other backends duplicate this code:</div><div><br></div><div><div>$ git grep '#include.*GenCallingConv.inc' ../lib/Target/</div><div>../lib/Target/AArch64/AArch64FastISel.cpp:#include "AArch64GenCallingConv.inc"</div><div>../lib/Target/AArch64/AArch64ISelLowering.cpp:#include "AArch64GenCallingConv.inc"</div><div>../lib/Target/ARM/ARMFastISel.cpp:#include "ARMGenCallingConv.inc"</div><div>../lib/Target/ARM/ARMISelLowering.cpp:#include "ARMGenCallingConv.inc"</div><div>../lib/Target/MSP430/MSP430ISelLowering.cpp:#include "MSP430GenCallingConv.inc"</div><div>../lib/Target/Mips/MipsFastISel.cpp:#include "MipsGenCallingConv.inc"</div><div>../lib/Target/Mips/MipsISelLowering.cpp:#include "MipsGenCallingConv.inc"</div><div>../lib/Target/PowerPC/PPCFastISel.cpp:#include "PPCGenCallingConv.inc"</div><div>../lib/Target/PowerPC/PPCISelLowering.cpp:#include "PPCGenCallingConv.inc"</div><div>../lib/Target/R600/AMDGPUISelLowering.cpp:#include "AMDGPUGenCallingConv.inc"</div><div>../lib/Target/Sparc/SparcISelLowering.cpp:#include "SparcGenCallingConv.inc"</div><div>../lib/Target/SystemZ/SystemZISelLowering.cpp:#include "SystemZGenCallingConv.inc"</div><div>../lib/Target/X86/X86FastISel.cpp:#include "X86GenCallingConv.inc"</div><div>../lib/Target/X86/X86ISelLowering.cpp:#include "X86GenCallingConv.inc"</div><div>../lib/Target/XCore/XCoreISelLowering.cpp:#include "XCoreGenCallingConv.inc"</div></div><div><br></div><div>This seems less than ideal. Eric, should we really be doing that? </div></div></div></div>