diff options
author | Rupert Swarbrick <rswarbrick@gmail.com> | 2020-05-26 11:41:32 +0100 |
---|---|---|
committer | Rupert Swarbrick <rswarbrick@gmail.com> | 2020-05-27 09:42:23 +0100 |
commit | d681c9df85eba0ab5112aba5c4b9b89af4ad36a2 (patch) | |
tree | dde1abfac624b210912c975663a4fe588efa7378 /kernel | |
parent | 061d1f0c07623d741e56a36e7a3e5cd48da30d5a (diff) | |
download | yosys-d681c9df85eba0ab5112aba5c4b9b89af4ad36a2.tar.gz yosys-d681c9df85eba0ab5112aba5c4b9b89af4ad36a2.tar.bz2 yosys-d681c9df85eba0ab5112aba5c4b9b89af4ad36a2.zip |
Pass some more args by reference in select.cc
Before this patch, the code passed around std::string objects by
value. It's probably not a hot-spot, but it can't hurt to avoid the
copying.
Removing the copy and clean-up code means the resulting code is ~6.1kb
smaller when compiled with GCC 9.3 and standard settings.
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/register.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/register.h b/kernel/register.h index 3d89386b7..7bbcd1727 100644 --- a/kernel/register.h +++ b/kernel/register.h @@ -125,7 +125,7 @@ struct Backend : Pass }; // implemented in passes/cmds/select.cc -extern void handle_extra_select_args(Pass *pass, std::vector<std::string> args, size_t argidx, size_t args_size, RTLIL::Design *design); +extern void handle_extra_select_args(Pass *pass, const std::vector<std::string> &args, size_t argidx, size_t args_size, RTLIL::Design *design); extern RTLIL::Selection eval_select_args(const vector<string> &args, RTLIL::Design *design); extern void eval_select_op(vector<RTLIL::Selection> &work, const string &op, RTLIL::Design *design); |