* src/vm/jit/allocator/simplereg.c: Respects opt_RegallocSpillAll flag now.
[cacao.git] / src / vm / options.c
index cc94d11cd966cd7907fa403f4359e72b6296eaac..cd38e8a71bce928bf11d3a28e4f15e3ce3fe15e0 100644 (file)
@@ -194,6 +194,7 @@ int      opt_PrintWarnings                = 0;
 int      opt_ProfileGCMemoryUsage         = 0;
 int      opt_ProfileMemoryUsage           = 0;
 FILE    *opt_ProfileMemoryUsageGNUPlot    = NULL;
+int      opt_RegallocSpillAll             = 0;
 #if defined(ENABLE_REPLACEMENT)
 int      opt_TestReplacement              = 0;
 #endif
@@ -259,6 +260,7 @@ enum {
        OPT_ProfileGCMemoryUsage,
        OPT_ProfileMemoryUsage,
        OPT_ProfileMemoryUsageGNUPlot,
+       OPT_RegallocSpillAll,
        OPT_TestReplacement,
        OPT_TraceCompilerCalls,
        OPT_TraceExceptions,
@@ -327,6 +329,7 @@ option_t options_XX[] = {
        { "ProfileGCMemoryUsage",         OPT_ProfileGCMemoryUsage,         OPT_TYPE_VALUE,   "profiles GC memory usage in the given interval, <value> is in seconds (default: 5)" },
        { "ProfileMemoryUsage",           OPT_ProfileMemoryUsage,           OPT_TYPE_VALUE,   "TODO" },
        { "ProfileMemoryUsageGNUPlot",    OPT_ProfileMemoryUsageGNUPlot,    OPT_TYPE_VALUE,   "TODO" },
+       { "RegallocSpillAll",             OPT_RegallocSpillAll,             OPT_TYPE_BOOLEAN, "spill all variables to the stack" },
 #if defined(ENABLE_REPLACEMENT)
        { "TestReplacement",              OPT_TestReplacement,              OPT_TYPE_BOOLEAN, "activate all replacement points during code generation" },
 #endif
@@ -778,6 +781,10 @@ void options_xx(JavaVMInitArgs *vm_args)
                        opt_ProfileMemoryUsageGNUPlot = file;
                        break;
 
+               case OPT_RegallocSpillAll:
+                       opt_RegallocSpillAll = enable;
+                       break;
+
 #if defined(ENABLE_REPLACEMENT)
                case OPT_TestReplacement:
                        opt_TestReplacement = enable;