Use toplevel function pass manager as OnTheFly manager.
[oota-llvm.git] / tools / llvm-upgrade / UpgradeParser.h.cvs
index ea0c85de380bb8b8b0a258a2f588d762865a767b..a96144201c76941d42189b4f15e2f93a11cdd8de 100644 (file)
    /* Put the tokens into the symbol table, so that GDB and other debuggers
       know about them.  */
    enum yytokentype {
-     VOID = 258,
-     BOOL = 259,
-     SBYTE = 260,
-     UBYTE = 261,
-     SHORT = 262,
-     USHORT = 263,
-     INT = 264,
-     UINT = 265,
-     LONG = 266,
-     ULONG = 267,
-     FLOAT = 268,
-     DOUBLE = 269,
-     LABEL = 270,
-     OPAQUE = 271,
-     ESINT64VAL = 272,
-     EUINT64VAL = 273,
-     SINTVAL = 274,
-     UINTVAL = 275,
-     FPVAL = 276,
-     NULL_TOK = 277,
-     UNDEF = 278,
-     ZEROINITIALIZER = 279,
-     TRUETOK = 280,
-     FALSETOK = 281,
-     TYPE = 282,
-     VAR_ID = 283,
-     LABELSTR = 284,
-     STRINGCONSTANT = 285,
-     IMPLEMENTATION = 286,
-     BEGINTOK = 287,
-     ENDTOK = 288,
-     DECLARE = 289,
-     DEFINE = 290,
-     GLOBAL = 291,
-     CONSTANT = 292,
-     SECTION = 293,
-     VOLATILE = 294,
-     TO = 295,
-     DOTDOTDOT = 296,
-     CONST = 297,
-     INTERNAL = 298,
-     LINKONCE = 299,
-     WEAK = 300,
-     DLLIMPORT = 301,
-     DLLEXPORT = 302,
-     EXTERN_WEAK = 303,
-     APPENDING = 304,
-     NOT = 305,
-     EXTERNAL = 306,
-     TARGET = 307,
-     TRIPLE = 308,
-     ENDIAN = 309,
-     POINTERSIZE = 310,
-     LITTLE = 311,
-     BIG = 312,
-     ALIGN = 313,
-     UNINITIALIZED = 314,
-     DEPLIBS = 315,
-     CALL = 316,
-     TAIL = 317,
-     ASM_TOK = 318,
-     MODULE = 319,
-     SIDEEFFECT = 320,
-     CC_TOK = 321,
-     CCC_TOK = 322,
-     CSRETCC_TOK = 323,
-     FASTCC_TOK = 324,
-     COLDCC_TOK = 325,
-     X86_STDCALLCC_TOK = 326,
-     X86_FASTCALLCC_TOK = 327,
-     DATALAYOUT = 328,
-     RET = 329,
-     BR = 330,
-     SWITCH = 331,
-     INVOKE = 332,
+     ESINT64VAL = 258,
+     EUINT64VAL = 259,
+     SINTVAL = 260,
+     UINTVAL = 261,
+     FPVAL = 262,
+     VOID = 263,
+     BOOL = 264,
+     SBYTE = 265,
+     UBYTE = 266,
+     SHORT = 267,
+     USHORT = 268,
+     INT = 269,
+     UINT = 270,
+     LONG = 271,
+     ULONG = 272,
+     FLOAT = 273,
+     DOUBLE = 274,
+     TYPE = 275,
+     LABEL = 276,
+     VAR_ID = 277,
+     LABELSTR = 278,
+     STRINGCONSTANT = 279,
+     IMPLEMENTATION = 280,
+     ZEROINITIALIZER = 281,
+     TRUETOK = 282,
+     FALSETOK = 283,
+     BEGINTOK = 284,
+     ENDTOK = 285,
+     DECLARE = 286,
+     GLOBAL = 287,
+     CONSTANT = 288,
+     SECTION = 289,
+     VOLATILE = 290,
+     TO = 291,
+     DOTDOTDOT = 292,
+     NULL_TOK = 293,
+     UNDEF = 294,
+     CONST = 295,
+     INTERNAL = 296,
+     LINKONCE = 297,
+     WEAK = 298,
+     APPENDING = 299,
+     DLLIMPORT = 300,
+     DLLEXPORT = 301,
+     EXTERN_WEAK = 302,
+     OPAQUE = 303,
+     NOT = 304,
+     EXTERNAL = 305,
+     TARGET = 306,
+     TRIPLE = 307,
+     ENDIAN = 308,
+     POINTERSIZE = 309,
+     LITTLE = 310,
+     BIG = 311,
+     ALIGN = 312,
+     DEPLIBS = 313,
+     CALL = 314,
+     TAIL = 315,
+     ASM_TOK = 316,
+     MODULE = 317,
+     SIDEEFFECT = 318,
+     CC_TOK = 319,
+     CCC_TOK = 320,
+     CSRETCC_TOK = 321,
+     FASTCC_TOK = 322,
+     COLDCC_TOK = 323,
+     X86_STDCALLCC_TOK = 324,
+     X86_FASTCALLCC_TOK = 325,
+     DATALAYOUT = 326,
+     RET = 327,
+     BR = 328,
+     SWITCH = 329,
+     INVOKE = 330,
+     UNREACHABLE = 331,
+     UNWIND = 332,
      EXCEPT = 333,
-     UNWIND = 334,
-     UNREACHABLE = 335,
-     ADD = 336,
-     SUB = 337,
-     MUL = 338,
-     DIV = 339,
-     UDIV = 340,
-     SDIV = 341,
-     FDIV = 342,
-     REM = 343,
-     UREM = 344,
-     SREM = 345,
-     FREM = 346,
-     AND = 347,
-     OR = 348,
-     XOR = 349,
-     SETLE = 350,
-     SETGE = 351,
-     SETLT = 352,
-     SETGT = 353,
-     SETEQ = 354,
-     SETNE = 355,
-     ICMP = 356,
-     FCMP = 357,
-     EQ = 358,
-     NE = 359,
-     SLT = 360,
-     SGT = 361,
-     SLE = 362,
-     SGE = 363,
-     OEQ = 364,
-     ONE = 365,
-     OLT = 366,
-     OGT = 367,
-     OLE = 368,
-     OGE = 369,
-     ORD = 370,
-     UNO = 371,
-     UEQ = 372,
-     UNE = 373,
-     ULT = 374,
-     UGT = 375,
-     ULE = 376,
-     UGE = 377,
-     MALLOC = 378,
-     ALLOCA = 379,
-     FREE = 380,
-     LOAD = 381,
-     STORE = 382,
-     GETELEMENTPTR = 383,
-     PHI_TOK = 384,
-     SELECT = 385,
-     SHL = 386,
-     SHR = 387,
-     ASHR = 388,
-     LSHR = 389,
-     VAARG = 390,
-     EXTRACTELEMENT = 391,
-     INSERTELEMENT = 392,
-     SHUFFLEVECTOR = 393,
+     ADD = 334,
+     SUB = 335,
+     MUL = 336,
+     DIV = 337,
+     UDIV = 338,
+     SDIV = 339,
+     FDIV = 340,
+     REM = 341,
+     UREM = 342,
+     SREM = 343,
+     FREM = 344,
+     AND = 345,
+     OR = 346,
+     XOR = 347,
+     SHL = 348,
+     SHR = 349,
+     ASHR = 350,
+     LSHR = 351,
+     SETLE = 352,
+     SETGE = 353,
+     SETLT = 354,
+     SETGT = 355,
+     SETEQ = 356,
+     SETNE = 357,
+     ICMP = 358,
+     FCMP = 359,
+     MALLOC = 360,
+     ALLOCA = 361,
+     FREE = 362,
+     LOAD = 363,
+     STORE = 364,
+     GETELEMENTPTR = 365,
+     PHI_TOK = 366,
+     SELECT = 367,
+     VAARG = 368,
+     EXTRACTELEMENT = 369,
+     INSERTELEMENT = 370,
+     SHUFFLEVECTOR = 371,
+     VAARG_old = 372,
+     VANEXT_old = 373,
+     EQ = 374,
+     NE = 375,
+     SLT = 376,
+     SGT = 377,
+     SLE = 378,
+     SGE = 379,
+     ULT = 380,
+     UGT = 381,
+     ULE = 382,
+     UGE = 383,
+     OEQ = 384,
+     ONE = 385,
+     OLT = 386,
+     OGT = 387,
+     OLE = 388,
+     OGE = 389,
+     ORD = 390,
+     UNO = 391,
+     UEQ = 392,
+     UNE = 393,
      CAST = 394,
      TRUNC = 395,
      ZEXT = 396,
    };
 #endif
 /* Tokens.  */
-#define VOID 258
-#define BOOL 259
-#define SBYTE 260
-#define UBYTE 261
-#define SHORT 262
-#define USHORT 263
-#define INT 264
-#define UINT 265
-#define LONG 266
-#define ULONG 267
-#define FLOAT 268
-#define DOUBLE 269
-#define LABEL 270
-#define OPAQUE 271
-#define ESINT64VAL 272
-#define EUINT64VAL 273
-#define SINTVAL 274
-#define UINTVAL 275
-#define FPVAL 276
-#define NULL_TOK 277
-#define UNDEF 278
-#define ZEROINITIALIZER 279
-#define TRUETOK 280
-#define FALSETOK 281
-#define TYPE 282
-#define VAR_ID 283
-#define LABELSTR 284
-#define STRINGCONSTANT 285
-#define IMPLEMENTATION 286
-#define BEGINTOK 287
-#define ENDTOK 288
-#define DECLARE 289
-#define DEFINE 290
-#define GLOBAL 291
-#define CONSTANT 292
-#define SECTION 293
-#define VOLATILE 294
-#define TO 295
-#define DOTDOTDOT 296
-#define CONST 297
-#define INTERNAL 298
-#define LINKONCE 299
-#define WEAK 300
-#define DLLIMPORT 301
-#define DLLEXPORT 302
-#define EXTERN_WEAK 303
-#define APPENDING 304
-#define NOT 305
-#define EXTERNAL 306
-#define TARGET 307
-#define TRIPLE 308
-#define ENDIAN 309
-#define POINTERSIZE 310
-#define LITTLE 311
-#define BIG 312
-#define ALIGN 313
-#define UNINITIALIZED 314
-#define DEPLIBS 315
-#define CALL 316
-#define TAIL 317
-#define ASM_TOK 318
-#define MODULE 319
-#define SIDEEFFECT 320
-#define CC_TOK 321
-#define CCC_TOK 322
-#define CSRETCC_TOK 323
-#define FASTCC_TOK 324
-#define COLDCC_TOK 325
-#define X86_STDCALLCC_TOK 326
-#define X86_FASTCALLCC_TOK 327
-#define DATALAYOUT 328
-#define RET 329
-#define BR 330
-#define SWITCH 331
-#define INVOKE 332
+#define ESINT64VAL 258
+#define EUINT64VAL 259
+#define SINTVAL 260
+#define UINTVAL 261
+#define FPVAL 262
+#define VOID 263
+#define BOOL 264
+#define SBYTE 265
+#define UBYTE 266
+#define SHORT 267
+#define USHORT 268
+#define INT 269
+#define UINT 270
+#define LONG 271
+#define ULONG 272
+#define FLOAT 273
+#define DOUBLE 274
+#define TYPE 275
+#define LABEL 276
+#define VAR_ID 277
+#define LABELSTR 278
+#define STRINGCONSTANT 279
+#define IMPLEMENTATION 280
+#define ZEROINITIALIZER 281
+#define TRUETOK 282
+#define FALSETOK 283
+#define BEGINTOK 284
+#define ENDTOK 285
+#define DECLARE 286
+#define GLOBAL 287
+#define CONSTANT 288
+#define SECTION 289
+#define VOLATILE 290
+#define TO 291
+#define DOTDOTDOT 292
+#define NULL_TOK 293
+#define UNDEF 294
+#define CONST 295
+#define INTERNAL 296
+#define LINKONCE 297
+#define WEAK 298
+#define APPENDING 299
+#define DLLIMPORT 300
+#define DLLEXPORT 301
+#define EXTERN_WEAK 302
+#define OPAQUE 303
+#define NOT 304
+#define EXTERNAL 305
+#define TARGET 306
+#define TRIPLE 307
+#define ENDIAN 308
+#define POINTERSIZE 309
+#define LITTLE 310
+#define BIG 311
+#define ALIGN 312
+#define DEPLIBS 313
+#define CALL 314
+#define TAIL 315
+#define ASM_TOK 316
+#define MODULE 317
+#define SIDEEFFECT 318
+#define CC_TOK 319
+#define CCC_TOK 320
+#define CSRETCC_TOK 321
+#define FASTCC_TOK 322
+#define COLDCC_TOK 323
+#define X86_STDCALLCC_TOK 324
+#define X86_FASTCALLCC_TOK 325
+#define DATALAYOUT 326
+#define RET 327
+#define BR 328
+#define SWITCH 329
+#define INVOKE 330
+#define UNREACHABLE 331
+#define UNWIND 332
 #define EXCEPT 333
-#define UNWIND 334
-#define UNREACHABLE 335
-#define ADD 336
-#define SUB 337
-#define MUL 338
-#define DIV 339
-#define UDIV 340
-#define SDIV 341
-#define FDIV 342
-#define REM 343
-#define UREM 344
-#define SREM 345
-#define FREM 346
-#define AND 347
-#define OR 348
-#define XOR 349
-#define SETLE 350
-#define SETGE 351
-#define SETLT 352
-#define SETGT 353
-#define SETEQ 354
-#define SETNE 355
-#define ICMP 356
-#define FCMP 357
-#define EQ 358
-#define NE 359
-#define SLT 360
-#define SGT 361
-#define SLE 362
-#define SGE 363
-#define OEQ 364
-#define ONE 365
-#define OLT 366
-#define OGT 367
-#define OLE 368
-#define OGE 369
-#define ORD 370
-#define UNO 371
-#define UEQ 372
-#define UNE 373
-#define ULT 374
-#define UGT 375
-#define ULE 376
-#define UGE 377
-#define MALLOC 378
-#define ALLOCA 379
-#define FREE 380
-#define LOAD 381
-#define STORE 382
-#define GETELEMENTPTR 383
-#define PHI_TOK 384
-#define SELECT 385
-#define SHL 386
-#define SHR 387
-#define ASHR 388
-#define LSHR 389
-#define VAARG 390
-#define EXTRACTELEMENT 391
-#define INSERTELEMENT 392
-#define SHUFFLEVECTOR 393
+#define ADD 334
+#define SUB 335
+#define MUL 336
+#define DIV 337
+#define UDIV 338
+#define SDIV 339
+#define FDIV 340
+#define REM 341
+#define UREM 342
+#define SREM 343
+#define FREM 344
+#define AND 345
+#define OR 346
+#define XOR 347
+#define SHL 348
+#define SHR 349
+#define ASHR 350
+#define LSHR 351
+#define SETLE 352
+#define SETGE 353
+#define SETLT 354
+#define SETGT 355
+#define SETEQ 356
+#define SETNE 357
+#define ICMP 358
+#define FCMP 359
+#define MALLOC 360
+#define ALLOCA 361
+#define FREE 362
+#define LOAD 363
+#define STORE 364
+#define GETELEMENTPTR 365
+#define PHI_TOK 366
+#define SELECT 367
+#define VAARG 368
+#define EXTRACTELEMENT 369
+#define INSERTELEMENT 370
+#define SHUFFLEVECTOR 371
+#define VAARG_old 372
+#define VANEXT_old 373
+#define EQ 374
+#define NE 375
+#define SLT 376
+#define SGT 377
+#define SLE 378
+#define SGE 379
+#define ULT 380
+#define UGT 381
+#define ULE 382
+#define UGE 383
+#define OEQ 384
+#define ONE 385
+#define OLT 386
+#define OGT 387
+#define OLE 388
+#define OGE 389
+#define ORD 390
+#define UNO 391
+#define UEQ 392
+#define UNE 393
 #define CAST 394
 #define TRUNC 395
 #define ZEXT 396
 
 
 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 275 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
+#line 1771 "/proj/llvm/llvm-2/tools/llvm-upgrade/UpgradeParser.y"
 typedef union YYSTYPE {
-  std::string*    String;
-  TypeInfo        Type;
-  ValueInfo       Value;
-  ConstInfo       Const;
-  ValueList*      ValList;
+  llvm::Module                           *ModuleVal;
+  llvm::Function                         *FunctionVal;
+  std::pair<llvm::PATypeInfo, char*>     *ArgVal;
+  llvm::BasicBlock                       *BasicBlockVal;
+  llvm::TermInstInfo                     TermInstVal;
+  llvm::InstrInfo                        InstVal;
+  llvm::ConstInfo                        ConstVal;
+  llvm::ValueInfo                        ValueVal;
+  llvm::PATypeInfo                       TypeVal;
+  llvm::TypeInfo                         PrimType;
+  llvm::PHIListInfo                      PHIList;
+  std::list<llvm::PATypeInfo>            *TypeList;
+  std::vector<llvm::ValueInfo>           *ValueList;
+  std::vector<llvm::ConstInfo>           *ConstVector;
+
+
+  std::vector<std::pair<llvm::PATypeInfo,char*> > *ArgList;
+  // Represent the RHS of PHI node
+  std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
+
+  llvm::GlobalValue::LinkageTypes         Linkage;
+  int64_t                           SInt64Val;
+  uint64_t                          UInt64Val;
+  int                               SIntVal;
+  unsigned                          UIntVal;
+  double                            FPVal;
+  bool                              BoolVal;
+
+  char                             *StrVal;   // This memory is strdup'd!
+  llvm::ValID                       ValIDVal; // strdup'd memory maybe!
+
+  llvm::BinaryOps                   BinaryOpVal;
+  llvm::TermOps                     TermOpVal;
+  llvm::MemoryOps                   MemOpVal;
+  llvm::OtherOps                    OtherOpVal;
+  llvm::CastOps                     CastOpVal;
+  llvm::ICmpInst::Predicate         IPred;
+  llvm::FCmpInst::Predicate         FPred;
+  llvm::Module::Endianness          Endianness;
 } YYSTYPE;
 /* Line 1447 of yacc.c.  */
-#line 348 "UpgradeParser.tab.h"
+#line 382 "UpgradeParser.tab.h"
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
 # define YYSTYPE_IS_TRIVIAL 1