It is also also possible to generate these functions automatically if the circuit layout topology is not going to change and if you can generate the layout automatically. CellOpt will try to reduce power and meet your constraints at the same time. Some circuit simulators have built-in optimizer support. These optimizers are not very robust, not reliable, and can't be used for power optimization the way we think it should be done. We use the circuit simulator just as a simulation tool.
Some inputs toggle more than the others, like clock inputs.
CellOpt normally calculates the switching rates automatically. You can also increase the toggle weight associated with each inputs. It respects your hierarchy. You will not get much improvement though. We have a project going on now, and we did everything to reduce its power dissipation.