Skip to content
Branch: master
Find file History
marsupial and lgritz Fix `exit` not being recognized as basic block end (#1051)
Stale assignment elision was broken in the presence of `exit`.

In general

    a = 10;
    ... stuff not involving `a`...
    a = 20;

sees two assignments within the same basic block, and because `a` is not used between the two assignments, the first one can be eliminated.

But this optimization ("stale assignment elision") was wrong for this modified code:

    a = 10;
    return;  // note: `return` in the main shader body is the same as `exit()`
    a = 20;

because the `return` changes things -- the second assignment won't be executed, and therefore should not retroactively eliminate the earlier assignment. The correct final value of a is indeed 10.

The problem boiled down to a bug in OSOProcessorBase::find_basic_blocks, where the `exit` op was simply not recognized as terminating its basic block (since it is a jump).
Latest commit 5ee8f86 Aug 15, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
Werror Modify testsuite to run optix tests (#1004) Apr 25, 2019
aastep shade_image utility runs a shader group to generate every pixel of an… May 28, 2015
allowconnect-err Improve errors for badly formed serialized shaders (#1026) May 24, 2019
and-or-not-synonyms Enable OptiX on many tests (#1018) May 13, 2019
arithmetic Enable OptiX on many tests (#1018) May 13, 2019
array-aassign Enable OptiX on many tests (#1018) May 13, 2019
array-derivs More uniform path for python binary retrieval Mar 20, 2015
array-range
array Update tests for keyword argument refactor Sep 11, 2015
blackbody More uniform path for python binary retrieval Mar 20, 2015
blendmath
breakcont Enable OptiX on many tests (#1018) May 13, 2019
bug-array-heapoffsets New ref images for recent OIIO texture improvement. Feb 26, 2016
bug-locallifetime Enable OptiX on many tests (#1018) May 13, 2019
bug-outputinit Enable OptiX on many tests (#1018) May 13, 2019
bug-param-duplicate Enable OptiX on many tests (#1018) May 13, 2019
bug-peep More uniform path for python binary retrieval Mar 20, 2015
bug-return Fix `exit` not being recognized as basic block end (#1051) Aug 15, 2019
cellnoise Fix cellnoise bug (912) Sep 5, 2018
closure-array
closure Update tests for keyword argument refactor Sep 11, 2015
color Allow aggregate component access with .[xyzrgb] (#1049) Aug 9, 2019
common Fix cellnoise bug (912) Sep 5, 2018
comparison Enable OptiX on many tests (#1018) May 13, 2019
compile-buffer
component-range
connect-components Enable OptiX on many tests (#1018) May 13, 2019
const-array-fill
const-array-params More uniform path for python binary retrieval Mar 20, 2015
debug-uninit Improve errors for badly formed serialized shaders (#1026) May 24, 2019
debugnan Fix problems running test suite on Windows. Jan 31, 2018
derivs-muldiv-clobber Enable OptiX on many tests (#1018) May 13, 2019
derivs Update ref output for minor numerical changes from #720 Mar 9, 2017
draw_string
error-dupes
error-serialized Improve errors for badly formed serialized shaders (#1026) May 24, 2019
exit Enable OptiX on many tests (#1018) May 13, 2019
exponential Enable OptiX on many tests (#1018) May 13, 2019
fprintf Implement fprintf (#780) Jul 15, 2017
function-earlyreturn More uniform path for python binary retrieval Mar 20, 2015
function-outputelem More uniform path for python binary retrieval Mar 20, 2015
function-overloads Enable OptiX on many tests (#1018) May 13, 2019
function-redef Function redefinitions (#853) Feb 6, 2018
function-simple Enable OptiX on many tests (#1018) May 13, 2019
geomath Fix missing faceforward() implementation. (#759) Jun 1, 2017
getattribute-camera Allow getattribute of camera attribs for testrender & testshade Jul 15, 2014
getattribute-shader New getattribute queries for shader, layer, and group name. (#673) Sep 29, 2016
getsymbol-nonheap More uniform path for python binary retrieval Mar 20, 2015
gettextureinfo Change the API of RendererServices::get_texture_handle to also provid… Jul 2, 2019
group-outputs More uniform path for python binary retrieval Mar 20, 2015
groupstring Improve errors for badly formed serialized shaders (#1026) May 24, 2019
hash hash() of numeric types, and hashnoise() (#775) Jun 20, 2017
hashnoise Fix cellnoise bug (912) Sep 5, 2018
hex Enable OptiX on many tests (#1018) May 13, 2019
hyperb Enable OptiX on many tests (#1018) May 13, 2019
ieee_fp Enable OptiX on many tests (#1018) May 13, 2019
if More uniform path for python binary retrieval Mar 20, 2015
incdec Enable OptiX on many tests (#1018) May 13, 2019
initlist Fix oslc assertion when passing init-lists to array parameters (#983) Mar 20, 2019
initops More uniform path for python binary retrieval Mar 20, 2015
intbits Enable OptiX on many tests (#1018) May 13, 2019
isconnected Fix bug/undefined behavior trying to format/printf a struct value. Jan 31, 2018
isconstant Fix poorly defined behavior when choosing certain function overloads. ( Feb 6, 2018
layers-Ciassign Change logic of lazy evaluation -- unconnected layers are now lazy. Sep 23, 2015
layers-entry Fix problems running test suite on Windows. Jan 31, 2018
layers-lazy More uniform path for python binary retrieval Mar 20, 2015
layers-nonlazycopy Update tests for keyword argument refactor Sep 11, 2015
layers-repeatedoutputs Extend get_symbol to retrieve the symbol from a particular named layer. Jan 15, 2015
layers Enable OptiX on many tests (#1018) May 13, 2019
lazyglobals More uniform path for python binary retrieval Mar 20, 2015
linearstep Extend linearstep and smooth_linearstep to color/point/vector/normal (#… Apr 15, 2019
logic Enable OptiX on many tests (#1018) May 13, 2019
loop Fix bug in oslc loop code generation (#947) Jan 4, 2019
matrix Bug fix: matrix param initialized with matrix(space,1) left out init … Oct 3, 2016
mergeinstances-nouserdata New option: opt_merge_instances_with_userdata Feb 4, 2015
mergeinstances-vararray Bug fix: incorrect instance merging when unspecified-length arrays di… Jul 7, 2016
message Update test reference output for recent changes Sep 11, 2015
metadata-braces
miscmath
missing-shader Improve errors for badly formed serialized shaders (#1026) May 24, 2019
named-components Allow aggregate component access with .[xyzrgb] (#1049) Aug 9, 2019
noise-cell Fix cellnoise bug (912) Sep 5, 2018
noise-gabor Fix cellnoise bug (912) Sep 5, 2018
noise-gabor2d-filter Fix cellnoise bug (912) Sep 5, 2018
noise-gabor3d-filter
noise-perlin Fix cellnoise bug (912) Sep 5, 2018
noise-simplex Fix cellnoise bug (912) Sep 5, 2018
noise Fix cellnoise bug (912) Sep 5, 2018
operator-overloading Enable OptiX on many tests (#1018) May 13, 2019
opt-warnings Warn about missed optimizations (#1010) May 2, 2019
osl-imageio Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslc-D Enable OptiX on many tests (#1018) May 13, 2019
oslc-comma Improve warnings about ill-advised use of comma operator (#978) Mar 14, 2019
oslc-empty More uniform path for python binary retrieval Mar 20, 2015
oslc-err-arrayindex Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslc-err-assignmenttypes Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslc-err-closuremul Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslc-err-field Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslc-err-format Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslc-err-funcoverload
oslc-err-initlist-args
oslc-err-initlist-return Allow shader params with empty brace inits: (#967) May 24, 2019
oslc-err-initlist Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslc-err-intoverflow Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslc-err-named-components
oslc-err-noreturn Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslc-err-notfunc Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslc-err-outputparamvararray Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslc-err-paramdefault Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslc-err-struct-array-init Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslc-err-struct-ctr Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslc-err-struct-dup Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslc-err-struct-print Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslc-err-unknown-ctr
oslc-err-write-nonoutput Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslc-variadic-macro Enable OptiX on many tests (#1018) May 13, 2019
oslc-version Add ways to test OSL version: (747) Apr 30, 2017
oslc-warn-commainit Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslinfo-arrayparams Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslinfo-colorctrfloat
oslinfo-metadata Modify testsuite to run optix tests (#1004) Apr 25, 2019
oslinfo-noparams Modify testsuite to run optix tests (#1004) Apr 25, 2019
paramval-floatpromotion Enable OptiX on many tests (#1018) May 13, 2019
pnoise-cell Fix cellnoise bug (912) Sep 5, 2018
pnoise-gabor Fix cellnoise bug (912) Sep 5, 2018
pnoise-perlin Fix cellnoise bug (912) Sep 5, 2018
pnoise Fix cellnoise bug (912) Sep 5, 2018
pointcloud-fold Change partio search (#689) Nov 23, 2016
pointcloud More uniform path for python binary retrieval Mar 20, 2015
pragma-nowarn `#pragma osl nowarn` suppresses warning on the following source line. ( Feb 16, 2018
printf-whole-array Enable OptiX on many tests (#1018) May 13, 2019
raytype-specialized Allow optimization of shader groups with known raytype bits. (#668) Sep 6, 2016
raytype More uniform path for python binary retrieval Mar 20, 2015
render-background Modify testsuite to run optix tests (#1004) Apr 25, 2019
render-bumptest
render-cornell Modify testsuite to run optix tests (#1004) Apr 25, 2019
render-furnace-diffuse Modify testsuite to run optix tests (#1004) Apr 25, 2019
render-material-layer Modify testsuite to run optix tests (#1004) Apr 25, 2019
render-microfacet Modify testsuite to run optix tests (#1004) Apr 25, 2019
render-oren-nayar Modify testsuite to run optix tests (#1004) Apr 25, 2019
render-veachmis Modify testsuite to run optix tests (#1004) Apr 25, 2019
render-ward Modify testsuite to run optix tests (#1004) Apr 25, 2019
reparam More uniform path for python binary retrieval Mar 20, 2015
select New OSL built-in: select(a,b,cond) (#696) Jan 31, 2017
shortcircuit More uniform path for python binary retrieval Mar 20, 2015
spline-boundarybug
spline-derivbug Fix variant of spline() that didn't compute derivatives properly. (#666) Aug 23, 2016
spline-nonuniformknots More uniform path for python binary retrieval Mar 20, 2015
spline shade_image utility runs a shader group to generate every pixel of an… May 28, 2015
splineinverse-ident Fix bug with inverse spline (#954) Jan 4, 2019
splineinverse More uniform path for python binary retrieval Mar 20, 2015
string Add string indexing and string hashing functions to stdosl.h Jan 8, 2016
struct-array-mixture Enable OptiX on many tests (#1018) May 13, 2019
struct-array Enable OptiX on many tests (#1018) May 13, 2019
struct-err
struct-init-copy Important bug fix for code generation of struct parameters copied whole. Sep 29, 2015
struct-isomorphic-overload Enable OptiX on many tests (#1018) May 13, 2019
struct-layers Update test reference output for recent changes Sep 11, 2015
struct-nested-assign Overaul of nested struct handling. (#640) May 10, 2016
struct-nested-deep
struct-nested Overaul of nested struct handling. (#640) May 10, 2016
struct-operator-overload Enable OptiX on many tests (#1018) May 13, 2019
struct-return Fix crash with struct parameter assignment from function call. (#934) Nov 20, 2018
struct-with-array More uniform path for python binary retrieval Mar 20, 2015
struct Allow shader params with empty brace inits: (#967) May 24, 2019
ternary More uniform path for python binary retrieval Mar 20, 2015
testoptix-noise
testoptix Refactor testshade argument parsing (#1003) Apr 23, 2019
testshade-expr Improve errors for badly formed serialized shaders (#1026) May 24, 2019
texture-alpha More uniform path for python binary retrieval Mar 20, 2015
texture-blur
texture-connected-options Bug fix: incorrect dropping of optional texture arguments. Sep 27, 2016
texture-derivs Testsuite organization overhaul -- no more src or ref in build Jan 21, 2016
texture-errormsg UDIM test Oct 17, 2016
texture-field3d CMake refactor (#928) Oct 26, 2018
texture-firstchannel
texture-interp More uniform path for python binary retrieval Mar 20, 2015
texture-missingalpha texture "missingalpha" optinal param generated the wrong IR and crash… Aug 9, 2019
texture-missingcolor More uniform path for python binary retrieval Mar 20, 2015
texture-simple More uniform path for python binary retrieval Mar 20, 2015
texture-smallderivs New ref images for recent OIIO texture improvement. Feb 26, 2016
texture-swirl New ref images for recent OIIO texture improvement. Feb 26, 2016
texture-udim testshade: rename --scalest/--offsetst -> --scaleuv/--offsetuv May 30, 2017
texture-width New ref images for recent OIIO texture improvement. Feb 26, 2016
texture-withderivs
texture-wrap Testsuite and optix fixes (#1001) Apr 22, 2019
trailing-commas
transform More uniform path for python binary retrieval Mar 20, 2015
transformc Enable OptiX on many tests (#1018) May 13, 2019
transitive-assign Enable OptiX on many tests (#1018) May 13, 2019
trig
typecast
unknown-instruction Improve errors for badly formed serialized shaders (#1026) May 24, 2019
vararray-connect Support defaults for vararry parameters, with relevant tests. May 7, 2015
vararray-default Allow shader params with empty brace inits: (#967) May 24, 2019
vararray-deserialize Testsuite organization overhaul -- no more src or ref in build Jan 21, 2016
vararray-param Support defaults for vararry parameters, with relevant tests. May 7, 2015
vecctr Enable OptiX on many tests (#1018) May 13, 2019
vector
wavelength_color Enable OptiX on many tests (#1018) May 13, 2019
xml More uniform path for python binary retrieval Mar 20, 2015
runtest.py Install crash handlers with stack trace dump (#1019) May 14, 2019
You can’t perform that action at this time.