The 2007 McCain-Kennedy amnesty bill essentially said that all those who here would be eligible for amnesty. Their status would legalized immediately (Z visa) and then they would be processed using background checks, etc. The problem is that with immediate legalization, you essentially stop all enforcement. And the bad guys won't apply, an estimated 2 million according to McCain. In any event, a bad idea. Not only would you legalize the 12 to 20 million, but they would sponsor their relatives thru chain migration, i.e., family reunification. The Heritage Foundation estimated at the time, 66 million more legal immigrants would join their relatives. Currently, Heritage estimates an amnesty would cost a net $6.3 trillion for just the 12 million.
I believe the Reagan amnesty was only intended for illegals who did not commit serious crimes and had "sufficient ties to American life".
They couldn't be felons, they could have up to three misdemeanors. There was no requirement that they had to have sufficient ties to American life, only that they had to be here for at least five years to be eligible to apply. They also had to learn English. You can use the link below to see the full text of the amnesty bill (Simpson-Mazzoli)
It was definitely a mistake along with the Immigration Act of 1965. When historians many years from now write about the rise and fall of America, they will point to those two pieces of legislation, especially the latter, as the reasons why America fell. Demography is destiny.