]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Report stats on erased functions TimePath/master
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 12 May 2018 04:48:19 +0000 (14:48 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 12 May 2018 04:48:19 +0000 (14:48 +1000)
ir.cpp
opts.def

diff --git a/ir.cpp b/ir.cpp
index 5e6cfaa7490012fb9bb647a54b619138d7b43dcd..18323f85db062e64d6cb1bc959f8cf72415829a9 100644 (file)
--- a/ir.cpp
+++ b/ir.cpp
@@ -3323,6 +3323,7 @@ bool ir_builder::generateGlobal(ir_value *global, bool islocal)
          * the function.
          */
         if (global->m_flags & IR_FLAG_ERASABLE && global->m_reads.empty() && global->m_vtype == TYPE_FUNCTION) {
+            ++opts_optimizationcount[OPTIM_ERASE];
             return true;
         }
 
index 5addc3c5d5fa2cc95807910506882ff7ea9b7ffc..8b7c2d5efb4bb2a5bf244cc3c372b8808eef59f9 100644 (file)
--- a/opts.def
+++ b/opts.def
@@ -97,6 +97,7 @@
     GMQCC_DEFINE_FLAG(VECTOR_COMPONENTS,    1)
     GMQCC_DEFINE_FLAG(CONST_FOLD_DCE,       2)
     GMQCC_DEFINE_FLAG(CONST_FOLD,           0) /* cannot be turned off */
+    GMQCC_DEFINE_FLAG(ERASE,                0) /* cannot be turned off */
 #endif
 
 #ifdef GMQCC_TYPE_OPTIONS