nir: add a 'const' qualifier to nir_ssa_def_components_read()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 11 Jan 2018 21:07:23 +0000 (22:07 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 12 Jan 2018 11:25:17 +0000 (12:25 +0100)
To avoid compilation warnings and because this helper
shouldn't update anything.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/compiler/nir/nir.c
src/compiler/nir/nir.h

index 692d97bf9aab477e1703787ccba7e58bc510051c..bdd8960403cd2be0c217ea01453aa114c4c854c3 100644 (file)
@@ -1650,7 +1650,7 @@ nir_ssa_def_rewrite_uses_after(nir_ssa_def *def, nir_src new_src,
 }
 
 uint8_t
-nir_ssa_def_components_read(nir_ssa_def *def)
+nir_ssa_def_components_read(const nir_ssa_def *def)
 {
    uint8_t read_mask = 0;
    nir_foreach_use(use, def) {
index 440c3fe9974cc9dc514556feb83fbbd10e5940ed..41a07b0b48c16f06963f27b55a4b1cb9e929b14f 100644 (file)
@@ -2277,7 +2277,7 @@ void nir_ssa_def_rewrite_uses(nir_ssa_def *def, nir_src new_src);
 void nir_ssa_def_rewrite_uses_after(nir_ssa_def *def, nir_src new_src,
                                     nir_instr *after_me);
 
-uint8_t nir_ssa_def_components_read(nir_ssa_def *def);
+uint8_t nir_ssa_def_components_read(const nir_ssa_def *def);
 
 /*
  * finds the next basic block in source-code order, returns NULL if there is