Skip to content
  • Timothy Arceri's avatar
    glsl: use set for copy propagation kills · bf8bc619
    Timothy Arceri authored
    
    
    Previously each time we saw a variable we just created a duplicate
    entry in the list. This is particularly bad for loops were we add
    everything twice, and then throw nested loops into the mix and the
    list was growing expoentially.
    
    This stops the glsl-vs-unroll-explosion test which has 16 nested
    loops from reaching the tests mem usage limit in this pass. The
    test now hits the mem limit in opt_copy_propagation_elements()
    instead.
    
    I suspect this was also part of the reason this pass can be so
    slow with some shaders.
    
    Reviewed-by: default avatarThomas Helland <thomashelland90@gmail.com>
    bf8bc619