I know you've decided to tell her and I think that's a great idea. I just wanted to pass along my own personal experience for reference.
I just returned from a wedding this weekend for one of my dearest and closest friends. I have known her for 22 years. This was her second wedding and I was there for the first one. Her first marriage was a disaster. Her ex cheated on her multiple times, didn't work, was demanding, insulting and basically made her life hell.
One week before the first wedding, 12 years ago, he called it off. My initial response had been to tell her that it was for the best. But I kept my mouth shut because she was so "in love" and knew it was just cold feet and I didn't want to lose her friendship. So, I not only kept my mouth shut about my true feelings, but I stayed up all night with her and the ex helping her to convince the jerk that it was just cold feet. I have regretted that for 12 years.
She has just married a wonderful man, but I was completely prepared to tell her the truth if I didn't think it was a good idea, regardless of her response. I was not going to make the same mistake.
Tell her that you are worried about her. Tell her about your experience and that you see similarities with her boyfriend. But stress no matter what she decides, only she knows in her heart what is right and you will be her friend no matter what. And then, no matter how hard it may be if she doesn't dump him, continue to support her. Even if it means telling her at some point that you can't hear any more complaints about him.
Good luck.