Mesa (master): glsl: Remove unused ir_loop_jump::loop pointer.
Kenneth Graunke
kwg at kemper.freedesktop.org
Mon Jul 2 18:09:48 UTC 2012
Module: Mesa
Branch: master
Commit: b1802a2115323233352da558430e109ff187b8af
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b1802a2115323233352da558430e109ff187b8af
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Sun Jul 1 16:21:32 2012 -0700
glsl: Remove unused ir_loop_jump::loop pointer.
Commit 0c005bd7 intended to make ir_loop_jump::mode public, but also
accidentally added a new pointer to the enclosing loop. Furthermore, it
tried to initialize the new field by adding "this->loop = loop;" to the
constructor, but since there is no loop parameter, this only initialized
the field to itself---so it will likely be a garbage pointer.
A lot of code, such as lower_jumps, allocates new loop jumps without
setting this field appropriately, so any uses would probably just crash.
Thankfully, there were none, so we can just delete the field.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51574
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
src/glsl/ir.h | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 505d2e7..b54e2f2 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -1245,7 +1245,6 @@ public:
{
this->ir_type = ir_type_loop_jump;
this->mode = mode;
- this->loop = loop;
}
virtual ir_loop_jump *clone(void *mem_ctx, struct hash_table *) const;
@@ -1269,9 +1268,6 @@ public:
/** Mode selector for the jump instruction. */
enum jump_mode mode;
-private:
- /** Loop containing this break instruction. */
- ir_loop *loop;
};
/**
More information about the mesa-commit
mailing list