what save more electricity? Solar panels over half my roof, or trees covering half my roof?

I was wondering which would save more money in the electricity arena (I know tree’s can damage roofs).
I had heard that the shade provided by trees covering your house can help to greatly reduce summer electric bills.
I had read that Solar panels need to go onto the south side of the house, and that is where the tree’s shade the house. So which is more cost effective?
Also I know many of the benefit’s tree’s can provide, as well as the negatives associated with large tree’s near houses.