Fixed 'inline' lossage --flo
[libfirm] / ir / ir / irflag.c
index 07004f2..fdfbd2d 100644 (file)
@@ -186,3 +186,91 @@ void restore_optimization_state(const optimization_state_t *state)
 {
   libFIRM_opt = *state;
 }
+
+/* repeat 'inline' methods here */
+
+# ifndef USE_GCC_INLINE
+
+/** Returns constant folding optimization setting. */
+int get_opt_cse(void)           /* iropt.c */
+{
+  return libFIRM_opt & OPT_CSE;
+}
+
+/** Returns constant subexpression elimination setting. */
+int get_opt_global_cse(void)    /* irgopt.c iropt.c */
+{
+  return libFIRM_opt & OPT_GLOBAL_CSE;
+}
+
+/** Returns global constant subexpression elimination setting. */
+int get_opt_constant_folding(void) /* iropt.c */
+{
+  return libFIRM_opt & OPT_CONSTANT_FOLDING;
+}
+
+/** Returns unreachable code elimination setting. */
+int get_opt_unreachable_code(void) /* iropt.c */
+{
+  return libFIRM_opt & OPT_UNREACHABLE_CODE;
+}
+
+/** Returns Straightening setting. */
+int get_opt_control_flow_straightening(void) /* iropt.c, irgopt.c */
+{
+  return libFIRM_opt & OPT_CONTROL_FLOW_STRAIGHTENING;
+}
+
+/** Returns if simplifications in local optimizations setting. */
+int get_opt_control_flow_weak_simplification(void) /* iropt.c, irgopt.c */
+{
+  return libFIRM_opt & OPT_CONTROL_FLOW_WEAK_SIMPLIFICATION;
+}
+
+/** Returns strong if and loop simplification setting */
+int get_opt_control_flow_strong_simplification(void) /* irgopt.c */
+{
+  return libFIRM_opt & OPT_CONTROL_FLOW_STRONG_SIMPLIFICATION;
+}
+
+/** Returns whether critical edges are removed */
+int get_opt_critical_edges(void) /* irgopt.c */
+{
+  return libFIRM_opt & OPT_CRITICAL_EDGES;
+}
+
+/** Returns reassociation setting. */
+int get_opt_reassociation(void) /* iropt.c */
+{
+  return libFIRM_opt & OPT_REASSOCIATION;
+}
+
+/** Returns dead node elimination setting. */
+int get_opt_dead_node_elimination(void) /* irgopt.c */
+{
+  return libFIRM_opt & OPT_DEAD_NODE_ELIMINATION;
+}
+
+/** Returns global optimization setting */
+int get_opt_optimize(void)      /* iropt.c, irgopt.c */
+{
+  return libFIRM_opt & OPT_OPTIMIZED;
+}
+
+/** Returns inlining setting. */ /* how appropriate */
+int get_opt_inline(void)        /* irgopt.c */
+{
+  return libFIRM_opt & OPT_INLINE;
+}
+
+int get_opt_dyn_meth_dispatch(void) /* cgana.c */
+{
+  return libFIRM_opt & OPT_DYN_METH_DISPATCH;
+}
+
+int get_opt_normalize(void)     /* irgopt.c, irnode.c, iropt.c */
+{
+  return libFIRM_opt & OPT_NORMALIZE;
+}
+
+# endif /* not defined USE_GCC_INLINE */