Paul C. Anagnostopoulos via llvm-dev
2020-Oct-20 22:31 UTC
[llvm-dev] TableGen enhancements
I just saw this post. I'm certainly looking for areas to improve. I will investigate the example you provided.
Thanks Paul - Its awesome to have someone looking at tblgen build performance! Something that I've looked at every so often is the poor choice of containers - e.g. passing a const std::vector& around when ArrayRef<> would be a lot cheaper (no expensive iterator bounds checks....). Another is using map/set everywhere - they are great when data is being parsed/collected, but once its sorted transfering to an array/vector could be a lot cheaper if really we spend more time sequentially iterating across the data many times. Simon. On 20/10/2020 23:31, Paul C. Anagnostopoulos via llvm-dev wrote:> I just saw this post. I'm certainly looking for areas to improve. I will investigate the example you provided. > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Paul C. Anagnostopoulos via llvm-dev
2020-Oct-21 13:46 UTC
[llvm-dev] TableGen enhancements
It will take me awhile to learn my way around the matcher table emitter, but it sounds like a big piece of fun! At 10/21/2020 05:48 AM, Simon Pilgrim wrote:>Thanks Paul - Its awesome to have someone looking at tblgen build performance! > >Something that I've looked at every so often is the poor choice of containers - e.g. passing a const std::vector& around when ArrayRef<> would be a lot cheaper (no expensive iterator bounds checks....). > >Another is using map/set everywhere - they are great when data is being parsed/collected, but once its sorted transfering to an array/vector could be a lot cheaper if really we spend more time sequentially iterating across the data many times. > >Simon.
Paul C. Anagnostopoulos via llvm-dev
2020-Oct-21 22:49 UTC
[llvm-dev] TableGen enhancements
At 10/21/2020 05:48 AM, Simon Pilgrim wrote:>Thanks Paul - Its awesome to have someone looking at tblgen build performance!I thought you would be interesting in the timing of the phases in the DAGISel emitter. This is for the ARM target. ===-------------------------------------------------------------------------== TableGen phase timing ===-------------------------------------------------------------------------== Total Execution Time: 18.3457 seconds (18.3570 wall clock) ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name --- 7.6128 ( 41.5%) 0.0000 ( 0.0%) 7.6128 ( 41.5%) 7.6274 ( 41.6%) Convert to matchers 5.1636 ( 28.2%) 0.0156 (100.0%) 5.1792 ( 28.2%) 5.1753 ( 28.2%) Parse, build records 4.3680 ( 23.8%) 0.0000 ( 0.0%) 4.3680 ( 23.8%) 4.3592 ( 23.7%) Emit matcher table 0.8892 ( 4.9%) 0.0000 ( 0.0%) 0.8892 ( 4.8%) 0.8891 ( 4.8%) Sort patterns 0.2964 ( 1.6%) 0.0000 ( 0.0%) 0.2964 ( 1.6%) 0.3060 ( 1.7%) Optimize matchers 18.3301 (100.0%) 0.0156 (100.0%) 18.3457 (100.0%) 18.3570 (100.0%) Total ---------------------------------------------------------------- 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