There are a few things that will cause a Diesel to lose power. Most common is the Injector pump timing off, or a pump failure. ( G.M. has had problems with their Pumps). Also waste gate pressure could be set low. I would lean toward the Pump. It fits your problem of running better cold also. Have the Injector timing reset. The pump may have been changed prior to you purchasing the truck and it may have never been adjusted correctly. Hope this helps.
Thanks, Joe
ASE Certified Technician
over 30 years experience in Import and Domestic repairs.