The Large Hadron Collider is working at about half its design value, limited by the defective splices of the magnet interconnections. While the full energy will be attained after the splice consolidation in 2014, CERN is preparing a plan for a Luminosity upgrade (High Luminosity LHC) around 2020 and has launched a pre-study for exploring an Energy upgrade (High Energy LHC) around 2030. Both upgrades strongly rely on advanced accelerator magnet technology, requiring dipoles and quadrupoles of accelerator quality and operating fields in the 11-13 T range for the luminosity upgrade and 16-20 T range for the energy upgrade. The paper will review the last ten year of Nb3Sn accelerator magnet R&D and compare it to the needs of the upgrades and will critically assess the results of the Nb3Sn and HTS technology and the planned R&D programs also based on the inputs of first year of LHC operation.