Paul C. Anagnostopoulos via llvm-dev
2020-Aug-04 18:31 UTC
[llvm-dev] Organization of LLVM utilities
I was confused by the lack of TableGen backends in the llvm/lib/tablegen directory until I stumbled upon the llvm/utils/tablegen directory. Could someone explain why TableGen is divided into these two directories? ---------------------------------------------------------------- Windfall Paul C. Anagnostopoulos ---------------------------------------------------------- Software 978 369-0839 www.windfall.com ---------------------------------------------------------------- My life has been filled with calamities, some of which actually happened. ---Mark Twain Guga 'mzimba, sala 'nhliziyo
Charlotte Delenk via llvm-dev
2020-Aug-04 18:38 UTC
[llvm-dev] Organization of LLVM utilities
On 8/4/20 7:31 PM, Paul C. Anagnostopoulos via llvm-dev wrote:> I was confused by the lack of TableGen backends in the llvm/lib/tablegen directory until I stumbled upon the llvm/utils/tablegen directory. Could someone explain why TableGen is divided into these two directories? > _________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-devI am assuming the TableGen code is split like this so that external tools can utilize the TableGen parser without all of the specific logic in the LLVM tablegen binary. I can't find any application that uses it though aside from tablegen proper.
Matt Arsenault via llvm-dev
2020-Aug-04 18:40 UTC
[llvm-dev] Organization of LLVM utilities
> On Aug 4, 2020, at 14:31, Paul C. Anagnostopoulos via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > I was confused by the lack of TableGen backends in the llvm/lib/tablegen directory until I stumbled upon the llvm/utils/tablegen directory. Could someone explain why TableGen is divided into these two directories?Lib is for the core implementation of the language. The different features in utils are the different backends that all interpret it in different ways. -Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200804/3e083796/attachment.html>
There is also clang/utils/TableGen which contains the clang tablegen backends.The build produces an llvm-tblgen from llvm/utils/TableGen and clang-tblgen from clang/utils/TableGen ~Craig On Tue, Aug 4, 2020 at 11:41 AM Charlotte Delenk via llvm-dev < llvm-dev at lists.llvm.org> wrote:> > On 8/4/20 7:31 PM, Paul C. Anagnostopoulos via llvm-dev wrote: > > I was confused by the lack of TableGen backends in the llvm/lib/tablegen > directory until I stumbled upon the llvm/utils/tablegen directory. Could > someone explain why TableGen is divided into these two directories? > > _________________________________ > > LLVM Developers mailing list > > llvm-dev at lists.llvm.org > > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > I am assuming the TableGen code is split like this so that external > tools can utilize the TableGen parser without all of the specific logic > in the LLVM tablegen binary. I can't find any application that uses it > though aside from tablegen proper. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200804/37d4e6a4/attachment.html>
Chris Lattner via llvm-dev
2020-Aug-04 18:44 UTC
[llvm-dev] Organization of LLVM utilities
> On Aug 4, 2020, at 11:31 AM, Paul C. Anagnostopoulos via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > I was confused by the lack of TableGen backends in the llvm/lib/tablegen directory until I stumbled upon the llvm/utils/tablegen directory. Could someone explain why TableGen is divided into these two directories?The mechanical reason is that llvm/utils builds before llvm/libs. The basic TableGen support is required to generate .inc files in the libs directory. -Chris
Paul C. Anagnostopoulos via llvm-dev
2020-Aug-04 19:06 UTC
[llvm-dev] Organization of LLVM utilities
Could you expand on this a bit? I see from my build directory that llvm-tblgen.exe was built before the Target/* .inc files. It sounds like you're saying that something has to be built between the .exe and the .inc files. At 8/4/2020 02:44 PM, Chris Lattner wrote:>> On Aug 4, 2020, at 11:31 AM, Paul C. Anagnostopoulos via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> >> I was confused by the lack of TableGen backends in the llvm/lib/tablegen directory until I stumbled upon the llvm/utils/tablegen directory. Could someone explain why TableGen is divided into these two directories? > >The mechanical reason is that llvm/utils builds before llvm/libs. The basic TableGen support is required to generate .inc files in the libs directory. > >-Chris---------------------------------------------------------------- Windfall Paul C. Anagnostopoulos ---------------------------------------------------------- Software 978 369-0839 www.windfall.com ---------------------------------------------------------------- My life has been filled with calamities, some of which actually happened. ---Mark Twain Guga 'mzimba, sala 'nhliziyo