Supporting dumping, switching off and debug printing of optimization phases

This commit is contained in:
Ilia Filippov
2013-08-01 11:37:52 +04:00
parent 663ebf7857
commit a174a90f86
4 changed files with 191 additions and 30 deletions

14
ispc.h
View File

@@ -59,6 +59,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <vector>
#include <set>
#include <string>
/** @def ISPC_MAX_NVEC maximum vector size of any of the compliation
@@ -66,6 +67,9 @@
*/
#define ISPC_MAX_NVEC 64
// Number of final optimization phase
#define LAST_OPT_NUMBER 1000
// Forward declarations of a number of widely-used LLVM types
namespace llvm {
class AttributeSet;
@@ -494,6 +498,16 @@ struct Globals {
ispc's execution. */
bool debugPrint;
/** Indicates which stages of optimization we want to dump. */
std::set<int> debug_stages;
/** Indicates after which optimization we want to generate
DebugIR information. */
int debugIR;
/** Indicates which phases of optimization we want to switch off. */
std::set<int> off_stages;
/** Indicates whether all warning messages should be surpressed. */
bool disableWarnings;