Yep, in general, it makes the most sense to get credit through AP tests in subjects that are not in your major and which you will not build on (and there are a lot of them). Note that the cost of an AP test is nothing compared to the cost of tuition.
BTW, if anyone is proficient in Chinese, a 5 in AP Chinese gets you 20 credit-hours, which is by far the most generous AP policy I have seen anywhere.
If costs are an issue and you had a well-rounded HS education, racking up enough credits to graduate in 3 years from UIUC certainly seems doable (tougher in Engineering, though).