https://www.aa.com/intl/ie/travelInformation/dublinAirport.jsp#
says "We recommend that you arrive at the airport 3 hours prior to your intended flight departure. Check-in closes 75 minutes prior to flight departure in order to allow passengers to complete the U.S. pre-clearance process."
I did the DUB-ORD flight 12 months ago. 2 hours was sufficient, but bear in mind there are other flights to the USA leaving the same set of gates and it could get busy.