Renato Golin
2015-Mar-10 11:18 UTC
[LLVMdev] TargetParser - Always build all table-gen files?
On 9 March 2015 at 17:40, Renato Golin <renato.golin at linaro.org> wrote:> The only way I can think of solving this is to change how tablegen() > handles the file name, with some "if(IS_ABSOLUTE)", but looking > further, the file name is used to more than just a filename, and gets > included in some variables names, etc. Also, I can't add another > option to the end of tablegen() because, AFAICS, this function is > variadic, with all table-gen options following the file name...CMake turned out a lot more powerful than I was imagining, and the change was really simple. Let's follow it here: http://reviews.llvm.org/D8195 The biggest question now is: do we have a consensus that building all table-gen files is worth the massive de-duplication of current code and future work that will follow? cheers, --renato
Mehdi Amini
2015-Mar-10 16:20 UTC
[LLVMdev] TargetParser - Always build all table-gen files?
> On Mar 10, 2015, at 4:18 AM, Renato Golin <renato.golin at linaro.org> wrote: > > On 9 March 2015 at 17:40, Renato Golin <renato.golin at linaro.org> wrote: >> The only way I can think of solving this is to change how tablegen() >> handles the file name, with some "if(IS_ABSOLUTE)", but looking >> further, the file name is used to more than just a filename, and gets >> included in some variables names, etc. Also, I can't add another >> option to the end of tablegen() because, AFAICS, this function is >> variadic, with all table-gen options following the file name... > > CMake turned out a lot more powerful than I was imagining, and the > change was really simple. > > Let's follow it here: > > http://reviews.llvm.org/D8195 > > The biggest question now is: do we have a consensus that building all > table-gen files is worth the massive de-duplication of current code > and future work that will follow?I’d like to avoid as much as possible adding compilation time to the process unless it is necessary (I’m not saying it does not worth it here). It is not clear to me why do you need to generate *all* the table-gen files and not only the one related to target features? Thanks, Mehdi
Renato Golin
2015-Mar-10 17:07 UTC
[LLVMdev] TargetParser - Always build all table-gen files?
On 10 March 2015 at 16:20, Mehdi Amini <mehdi.amini at apple.com> wrote:> I’d like to avoid as much as possible adding compilation time to the process unless it is necessary (I’m not saying it does not worth it here).As I said in the review, it may end up being faster, because of the amount of crap we'll remove from all tools and LLVM.> It is not clear to me why do you need to generate *all* the table-gen files and not only the one related to target features?I don't know which of them yet, but I'll certainly need CPU/FPU/ARCH names, register names, feature names and anything to populate a target description object. I moved them all into the include file because I didn't want to have to choose now and get it wrong. I realise that this might not have been the best course of action. Having said that, we can always go back. So, I'm open to suggestions. I could start with only a few per arch, and then add as we see fit. My guess is that only ARMGenRegisterInfo.inc and ARMGenSubtargetInfo.inc would be a good start, with possibly ARMGenCallingConv.inc and ARMGenInstrInfo.inc being the next ones to add for Clang's benefit. That would mean separating the calls to tablegen() between CMakeLists.txt and CMakeTblgen.txt, but that's ok. cheers, --renato