Ir cleanup.
Ir cleanup.

- Added Ir.val_type utility routines
- Replaced some type asserts with exceptions
- Minor style cleanup
ayanazmat/Halide,adasworks/Halide,myrtleTree33/Halide,aam/Halide,kgnk/Halide,ronen/Halide,aam/Halide,psuriana/Halide,rodrigob/Halide,dan-tull/Halide,smxlong/Halide,gchauras/Halide,delcypher/Halide,lglucin/Halide,dougkwan/Halide,smxlong/Halide,aam/Halide,psuriana/Halide,fengzhyuan/Halide,fengzhyuan/Halide,gchauras/Halide,tdenniston/Halide,fengzhyuan/Halide,jiawen/Halide,fengzhyuan/Halide,mcanthony/Halide,delcypher/Halide,lglucin/Halide,myrtleTree33/Halide,ronen/Halide,kgnk/Halide,kenkuang1213/Halide,tdenniston/Halide,jiawen/Halide,gchauras/Halide,jiawen/Halide,damienfir/Halide,dougkwan/Halide,dougkwan/Halide,kgnk/Halide,aam/Halide,fengzhyuan/Halide,myrtleTree33/Halide,kenkuang1213/Halide,ayanazmat/Halide,myrtleTree33/Halide,tdenniston/Halide,fengzhyuan/Halide,adasworks/Halide,mikeseven/Halide,tdenniston/Halide,kgnk/Halide,dan-tull/Halide,psuriana/Halide,dougkwan/Halide,kgnk/Halide,lglucin/Halide,kgnk/Halide,ronen/Halide,gchauras/Halide,fengzhyuan/Halide,dougkwan/Halide,delcypher/Halide,tdenniston/Halide,dan-tull/Halide,kenkuang1213/Halide,gchauras/Halide,smxlong/Halide,damienfir/Halide,jiawen/Halide,ayanazmat/Halide,gchauras/Halide,dougkwan/Halide,damienfir/Halide,mikeseven/Halide,delcypher/Halide,ayanazmat/Halide,ayanazmat/Halide,rodrigob/Halide,lglucin/Halide,dougkwan/Halide,rodrigob/Halide,kenkuang1213/Halide,ayanazmat/Halide,mcanthony/Halide,psuriana/Halide,kgnk/Halide,rodrigob/Halide,aam/Halide,mcanthony/Halide,mcanthony/Halide,ronen/Halide,myrtleTree33/Halide,kenkuang1213/Halide,mcanthony/Halide,jiawen/Halide,tdenniston/Halide,adasworks/Halide,adasworks/Halide,kenkuang1213/Halide,aam/Halide,mikeseven/Halide,damienfir/Halide,psuriana/Halide,lglucin/Halide,dan-tull/Halide,fengzhyuan/Halide,kenkuang1213/Halide,ronen/Halide,mcanthony/Halide,adasworks/Halide,rodrigob/Halide,jiawen/Halide,smxlong/Halide,myrtleTree33/Halide,dan-tull/Halide,kgnk/Halide,dan-tull/Halide,mikeseven/Halide,lglucin/Halide,rodrigob/Halide,smxlong/Halide,ayanazmat/Halide,delcypher/Halide,mikeseven/Halide,psuriana/Halide,smxlong/Halide,mcanthony/Halide,lglucin/Halide,smxlong/Halide,adasworks/Halide,adasworks/Halide,jiawen/Halide,damienfir/Halide,mcanthony/Halide,delcypher/Halide,adasworks/Halide,ayanazmat/Halide,psuriana/Halide,delcypher/Halide,ronen/Halide,delcypher/Halide,damienfir/Halide,dan-tull/Halide,myrtleTree33/Halide,myrtleTree33/Halide,kenkuang1213/Halide,dan-tull/Halide,tdenniston/Halide,damienfir/Halide,rodrigob/Halide,aam/Halide,dougkwan/Halide,rodrigob/Halide,ronen/Halide,tdenniston/Halide,damienfir/Halide,smxlong/Halide,ronen/Halide