Several miscellaneous fixes to runtime optimization: * Constant fold float*triple and triple*float (previously we only folded   f*f and t*t). * Make constant folding of division follow the (A/B == 0) rule that OSL   does in the runtime interpreter. * New optimization: turn component assignment (triple[i] = c) into nop   if the triple is known to already have that value at that position! * When "collapsing" out the unused symbols and nops, we weren't properly   adjusting init ops ranges.  Oops. http://codereview.appspot.com/1015042/show Review by: ckulla
Several miscellaneous fixes to runtime optimization:
* Constant fold float*triple and triple*float (previously we only folded
  f*f and t*t).
* Make constant folding of division follow the (A/B == 0) rule that OSL
  does in the runtime interpreter.
* New optimization: turn component assignment (triple[i] = c) into nop
  if the triple is known to already have that value at that position!
* When "collapsing" out the unused symbols and nops, we weren't properly
  adjusting init ops ranges.  Oops.
http://codereview.appspot.com/1015042/show
Review by: ckulla



git-svn-id: 93cebb81a0f5cc00f31a7ad40d16024532691b70@622 a3683778-fedd-11de-87c3-653bb6514e15

amartinez-cg/OpenShadingLanguage,imageworks/OpenShadingLanguage,Anteru/OpenShadingLanguage,lgritz/OpenShadingLanguage,aconty/OpenShadingLanguage,johnhaddon/OpenShadingLanguage,lgritz/OpenShadingLanguage,sjparker/OpenShadingLanguage,aconty/OpenShadingLanguage,mcanthony/OpenShadingLanguage,aconty/OpenShadingLanguage,aconty/OpenShadingLanguage,amartinez-cg/OpenShadingLanguage,fpsunflower/OpenShadingLanguage,juvenal/OpenShadingLanguage,rlmh/OpenShadingLanguage,imageworks/OpenShadingLanguage,gzorin/OpenShadingLanguage,lgritz/OpenShadingLanguage,rlmh/OpenShadingLanguage,Anteru/OpenShadingLanguage,juvenal/OpenShadingLanguage,brechtvl/OpenShadingLanguage,brechtvl/OpenShadingLanguage,imageworks/OpenShadingLanguage,yaroslav-tarasov/OpenShadingLanguage,fpsunflower/OpenShadingLanguage,juvenal/OpenShadingLanguage,imageworks/OpenShadingLanguage,fpsunflower/OpenShadingLanguage,imageworks/OpenShadingLanguage,sjparker/OpenShadingLanguage,fpsunflower/OpenShadingLanguage,yaroslav-tarasov/OpenShadingLanguage,sjparker/OpenShadingLanguage,johnhaddon/OpenShadingLanguage,mcanthony/OpenShadingLanguage,svenstaro/OpenShadingLanguage,mcanthony/OpenShadingLanguage,amartinez-cg/OpenShadingLanguage,juvenal/OpenShadingLanguage,brechtvl/OpenShadingLanguage,gzorin/OpenShadingLanguage,lgritz/OpenShadingLanguage,gzorin/OpenShadingLanguage,lgritz/OpenShadingLanguage,svenstaro/OpenShadingLanguage,johnhaddon/OpenShadingLanguage,rlmh/OpenShadingLanguage,gzorin/OpenShadingLanguage,rlmh/OpenShadingLanguage,johnhaddon/OpenShadingLanguage,Anteru/OpenShadingLanguage,amartinez-cg/OpenShadingLanguage,amartinez-cg/OpenShadingLanguage,yaroslav-tarasov/OpenShadingLanguage,svenstaro/OpenShadingLanguage,sjparker/OpenShadingLanguage,brechtvl/OpenShadingLanguage,aconty/OpenShadingLanguage,brechtvl/OpenShadingLanguage,gzorin/OpenShadingLanguage,svenstaro/OpenShadingLanguage,yaroslav-tarasov/OpenShadingLanguage,Anteru/OpenShadingLanguage,mcanthony/OpenShadingLanguage