[Mesa-dev] [PATCH 2/2] st/glsl_to_tgsi: remove unused code in temprename

Nicolai Hähnle nhaehnle at gmail.com
Wed Sep 6 09:54:50 UTC 2017


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

---
 src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp
index 8ba1f5bb0be..6cb79056ad4 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp
@@ -93,38 +93,35 @@ public:
 
    const prog_scope *in_ifelse_scope() const;
    const prog_scope *in_switchcase_scope() const;
    const prog_scope *innermost_loop() const;
    const prog_scope *outermost_loop() const;
    const prog_scope *enclosing_conditional() const;
 
    bool is_loop() const;
    bool is_in_loop() const;
    bool is_conditional() const;
-   bool is_conditional_in_loop() const;
 
    bool break_is_for_switchcase() const;
    bool contains_range_of(const prog_scope& other) const;
-   const st_src_reg *switch_register() const;
 
    void set_end(int end);
    void set_loop_break_line(int line);
 
 private:
    prog_scope_type scope_type;
    int scope_id;
    int scope_nesting_depth;
    int scope_begin;
    int scope_end;
    int break_loop_line;
    prog_scope *parent_scope;
-   const st_src_reg *switch_reg;
 };
 
 /* Some storage class to encapsulate the prog_scope (de-)allocations */
 class prog_scope_storage {
 public:
    prog_scope_storage(void *mem_ctx, int n);
    ~prog_scope_storage();
    prog_scope * create(prog_scope *p, prog_scope_type type, int id,
                        int lvl, int s_begin);
 private:
@@ -187,22 +184,21 @@ prog_scope_storage::create(prog_scope *p, prog_scope_type type, int id,
 }
 
 prog_scope::prog_scope(prog_scope *parent, prog_scope_type type, int id,
                        int depth, int scope_begin):
    scope_type(type),
    scope_id(id),
    scope_nesting_depth(depth),
    scope_begin(scope_begin),
    scope_end(-1),
    break_loop_line(numeric_limits<int>::max()),
-   parent_scope(parent),
-   switch_reg(nullptr)
+   parent_scope(parent)
 {
 }
 
 prog_scope_type prog_scope::type() const
 {
    return scope_type;
 }
 
 prog_scope *prog_scope::parent() const
 {
@@ -223,25 +219,20 @@ bool prog_scope::is_in_loop() const
 {
    if (scope_type == loop_body)
       return true;
 
    if (parent_scope)
       return parent_scope->is_in_loop();
 
    return false;
 }
 
-bool prog_scope::is_conditional_in_loop() const
-{
-   return is_conditional() && is_in_loop();
-}
-
 const prog_scope *prog_scope::innermost_loop() const
 {
    if (scope_type == loop_body)
       return this;
 
    if (parent_scope)
       return parent_scope->innermost_loop();
 
    return nullptr;
 }
@@ -289,25 +280,20 @@ const prog_scope *prog_scope::in_ifelse_scope() const
    if (scope_type == if_branch ||
        scope_type == else_branch)
       return this;
 
    if (parent_scope)
       return parent_scope->in_ifelse_scope();
 
    return nullptr;
 }
 
-const st_src_reg *prog_scope::switch_register() const
-{
-   return switch_reg;
-}
-
 const prog_scope *prog_scope::in_switchcase_scope() const
 {
    if (scope_type == switch_case_branch ||
        scope_type == switch_default_branch)
       return this;
 
    if (parent_scope)
       return parent_scope->in_switchcase_scope();
 
    return nullptr;
-- 
2.11.0



More information about the mesa-dev mailing list