Chris Bieneman via llvm-dev
2019-Jan-07 19:35 UTC
[llvm-dev] Removing LLVM_ALWAYS_INLINE from ADT classes
Historically there was a request to make LLVM_OPTIMIZED_TABLEGEN On by default for debug builds, which I discouraged. At the time it was suggested that workflow was fairly new and untested in a lot of build configurations. Today I believe that situation is slightly better. I believe there are still issues with it not working correctly in the Xcode generator, but I know people have used it successfully with Visual Studio. I think that enabling it by default in Debug builds is probably reasonable for most generators, but anyone looking to make that change should expect some bumps in the road. -Chris> On Jan 7, 2019, at 9:03 AM, Paweł Bylica via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > I believe the issues about Debug config and Visual Studio can be solved by using generator expressions > $<$<CONFIG:Debug>:-O2> > or alternatively CMAKE_CXX_CLAGS_DEBUG. > > At first we don't have to modify the assertions build option so if Debug config builds with assertions tablegen will be build with as well. > > Also we can start with keeping LLVM_OPTIMIZE_TABLEGEN off by default. > > If that sounds good, I can come with a prototype later. > > // P. > > On Mon, Jan 7, 2019 at 5:54 PM Mehdi AMINI via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > > > On Mon, Jan 7, 2019 at 8:39 AM <paul.robinson at sony.com <mailto:paul.robinson at sony.com>> wrote: > > > > -----Original Message----- > > From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org <mailto:llvm-dev-bounces at lists.llvm.org>] On Behalf Of Alex > > Bradbury via llvm-dev > > Sent: Monday, January 07, 2019 11:33 AM > > To: Mehdi AMINI > > Cc: LLVM Dev > > Subject: Re: [llvm-dev] Removing LLVM_ALWAYS_INLINE from ADT classes > > > > On Sun, 6 Jan 2019 at 00:42, Mehdi AMINI via llvm-dev > > <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > > > > > > > > > > > > On Fri, Jan 4, 2019 at 3:52 PM Paweł Bylica via llvm-dev <llvm- > > dev at lists.llvm.org <mailto:dev at lists.llvm.org>> wrote: > > >> > > >> On Sat, Jan 5, 2019 at 12:38 AM Duncan P. N. Exon Smith via llvm-dev > > <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > > >>> > > >>> This makes sense to me. > > >>> > > >>> One concern is that this in itself will slow down the build, since > > tablegen will get even slower. Ideally, there would be some (perhaps > > default?) configuration where we build the tablegen binaries with > > optimizations on and then use them in the build, as if we were cross- > > compiling. > > >> > > >> > > >> Maybe something simple like -DLLVM_OPTIMIZE_TABLEGEN=ON (enabled by > > default for Debug builds). You would need to set it to off only if you > > want to debug tablegen. > > > > > > > > > I proposed this a while back, but it think there were some problems with > > it, I don't remember what exactly but maybe related to bootstrapping / 2- > > stages builds? > > > > > > + Chris, maybe he remembers something? > > > > LLVM_OPTIMIZED_TABLEGEN=ON is a handy way of speeding up build times, > > but it really shouldn't be recommended for anyone who is modifying .td > > files. You run the risk of making .td modifications that trigger > > asserts for those not using LLVM_OPTIMIZED_TABLEGEN. > > Can we make LLVM_OPTIMIZED_TABLEGEN=ON build it as Release+Asserts? > > There is (use to be) some very expensive assertions in llvm-tblgen. > > — > Mehdi > > --paulr > > > > > Best, > > > > Alex > > _______________________________________________ > > LLVM Developers mailing list > > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev> > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev> > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://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/20190107/c6821cf5/attachment.html>
Alex Bradbury via llvm-dev
2019-Jan-09 12:56 UTC
[llvm-dev] Removing LLVM_ALWAYS_INLINE from ADT classes
On Mon, 7 Jan 2019 at 19:35, Chris Bieneman <chris.bieneman at me.com> wrote:> > Historically there was a request to make LLVM_OPTIMIZED_TABLEGEN On by default for debug builds, which I discouraged. At the time it was suggested that workflow was fairly new and untested in a lot of build configurations. Today I believe that situation is slightly better. > > I believe there are still issues with it not working correctly in the Xcode generator, but I know people have used it successfully with Visual Studio. > > I think that enabling it by default in Debug builds is probably reasonable for most generators, but anyone looking to make that change should expect some bumps in the road.Although it's super handy to have it available, IMHO the risks of writing, submitting, and ultimately committing incorrect .td modifications mean that making LLVM_OPTIMIZED_TABLEGEN the default would be unwise. It might be more feasible if there were a 'check-td' target that put all the .td specified in the CMakeLists for each configured target through a debug+asserts or release+asserts tblgen. In fact maybe there should be a warning in the current CMake docs to indicate of using a no-asserts tblgen binary while hacking on LLVM. Best, Alex
Mehdi AMINI via llvm-dev
2019-Jan-09 15:47 UTC
[llvm-dev] Removing LLVM_ALWAYS_INLINE from ADT classes
On Wed, Jan 9, 2019 at 4:52 AM Alex Bradbury <asb at lowrisc.org> wrote:> On Mon, 7 Jan 2019 at 19:35, Chris Bieneman <chris.bieneman at me.com> wrote: > > > > Historically there was a request to make LLVM_OPTIMIZED_TABLEGEN On by > default for debug builds, which I discouraged. At the time it was suggested > that workflow was fairly new and untested in a lot of build configurations. > Today I believe that situation is slightly better. > > > > I believe there are still issues with it not working correctly in the > Xcode generator, but I know people have used it successfully with Visual > Studio. > > > > I think that enabling it by default in Debug builds is probably > reasonable for most generators, but anyone looking to make that change > should expect some bumps in the road. > > Although it's super handy to have it available, IMHO the risks of > writing, submitting, and ultimately committing incorrect .td > modifications mean that making LLVM_OPTIMIZED_TABLEGEN the default > would be unwise.But modifying a .td is not necessarily part of the main routine of developing on LLVM. It might be more feasible if there were a 'check-td'> target that put all the .td specified in the CMakeLists for each > configured target through a debug+asserts or release+asserts tblgen. > > In fact maybe there should be a warning in the current CMake docs to > indicate of using a no-asserts tblgen binary while hacking on LLVM.How do you detect what is « hacking on LLVM » when running Cmake? Why do you single out tblgen assertions? I was using an « external » llvm-tblgen most of the time I was hacking on LLVM to avoid constantly rebuilding it. More importantly: assertions should catch internal issues with tblgen itself. Issues with invalid .td should not be implemented through assertions IMO but always-on checks. — Mehdi> > Best, > > Alex >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190109/83e38a53/attachment.html>