3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-07 01:54:10 +00:00
yosys/kernel
Rupert Swarbrick 7ff306ccdb Minor optimisation in Module::wire() and Module::cell()
The existing code does a search to figure out whether id is in the
dict (with the call to count()), and then looks it up again to get the
result (with the call to at()). This version calls find() instead,
avoiding the double lookup.

Code size increases slightly (6kb). I think this is because the
contents of find() are getting inlined, and then inlined into lots of
the callsites for cell() and wire().

Looking at the compiled code before this patch, you just get
a (non-inlined) call to count() followed by a call to at(). After the
patch, the contents of find() have been inlined (so you see do_hash,
then do_lookup). The result for each function is about 30 bytes / 40%
bigger, which presumably also enlarges call-sites that inline it.
2020-05-26 16:07:36 +01:00
..
bitpattern.h Removed unnecessary cast. 2015-09-01 12:40:36 +02:00
calc.cc Fix mingw compile issue (2nd attempt) 2017-02-23 14:21:02 +01:00
cellaigs.cc kernel: big fat patch to use more ID::*, otherwise ID(*) 2020-04-02 09:51:32 -07:00
cellaigs.h Fixed trailing whitespaces 2015-07-02 11:14:30 +02:00
celledges.cc kernel: big fat patch to use more ID::*, otherwise ID(*) 2020-04-02 09:51:32 -07:00
celledges.h Consistent use of 'override' for virtual methods in derived classes. 2018-07-20 23:51:06 -07:00
celltypes.h kernel: big fat patch to use more ID::*, otherwise ID(*) 2020-04-02 09:51:32 -07:00
consteval.h kernel: big fat patch to use more ID::*, otherwise ID(*) 2020-04-02 09:51:32 -07:00
constids.inc Add force_downto and force_upto wire attributes. 2020-05-19 01:42:40 +02:00
cost.h Use ID() in kernel/*, add simple ID:: hack (to be improved upon later) 2019-08-11 11:39:46 +02:00
driver.cc Add WASI platform support. 2020-04-30 18:56:25 +00:00
hashlib.h Merge pull request #1969 from boqwxp/pool_emplace 2020-04-22 12:10:42 -07:00
log.cc log: Use dict instead of std::vector<std::pair> for log_expect_{error, warning, log} to better express the intent that each element is unique. 2020-05-15 00:55:32 +00:00
log.h Merge pull request #2059 from boqwxp/logger-vector-to-dict 2020-05-21 15:36:30 +02:00
macc.h kernel: big fat patch to use more ID::*, otherwise ID(*) 2020-04-02 09:51:32 -07:00
modtools.h Merge pull request #1845 from YosysHQ/eddie/kernel_speedup 2020-04-02 07:13:33 -07:00
register.cc Add WASI platform support. 2020-04-30 18:56:25 +00:00
register.h Add ScriptPass::run_nocheck and use for abc9 2020-03-09 14:34:22 +00:00
rtlil.cc Revert "Merge branch 'eddie/kernel_makeblackbox' into eddie/abc9_auto_dff" 2020-05-14 10:33:56 -07:00
rtlil.h Minor optimisation in Module::wire() and Module::cell() 2020-05-26 16:07:36 +01:00
satgen.h kernel: big fat patch to use more ID::*, otherwise ID(*) 2020-04-02 09:51:32 -07:00
sigtools.h kernel: const Wire* overload -> Wire* !!! 2020-03-26 16:21:30 -07:00
timinginfo.h timinginfo: ignore $specify2 cells if EN is false 2020-05-14 10:33:56 -07:00
utils.h Fixed trailing whitespaces 2015-07-02 11:14:30 +02:00
yosys.cc Add WASI platform support. 2020-04-30 18:56:25 +00:00
yosys.h Fix clang compiler warning 2020-05-08 10:13:39 +02:00