Shred carrots in food processor or grate by hand. Set aside.
Combine sugar, oil and eggs and beat until well mixed.
Add cinnamon, baking powder, baking soda and salt. Add flour and mix well. Batter will be stiff.
Stir in shredded carrot and nuts, if desired.
Spread into prepared pan. Bake for 45 minutes until toothpick comes out clean.
Cool on a rack for about 2 hours. Frost with cream cheese frosting.
For frosting, cream together cream cheese and butter until smooth. Add vanilla and powdered sugar until desired consistency.