OLD | NEW |
1 //===- opt.cpp - The LLVM Modular Optimizer -------------------------------===// | 1 //===- opt.cpp - The LLVM Modular Optimizer -------------------------------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // Optimizations may be specified an arbitrary number of times on the command | 10 // Optimizations may be specified an arbitrary number of times on the command |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 initializeRewritePNaClLibraryCallsPass(Registry); | 435 initializeRewritePNaClLibraryCallsPass(Registry); |
436 initializeSandboxIndirectCallsPass(Registry); | 436 initializeSandboxIndirectCallsPass(Registry); |
437 initializeSandboxMemoryAccessesPass(Registry); | 437 initializeSandboxMemoryAccessesPass(Registry); |
438 initializeSimplifyAllocasPass(Registry); | 438 initializeSimplifyAllocasPass(Registry); |
439 initializeSimplifyStructRegSignaturesPass(Registry); | 439 initializeSimplifyStructRegSignaturesPass(Registry); |
440 initializeStripAttributesPass(Registry); | 440 initializeStripAttributesPass(Registry); |
441 initializeStripMetadataPass(Registry); | 441 initializeStripMetadataPass(Registry); |
442 initializeStripModuleFlagsPass(Registry); | 442 initializeStripModuleFlagsPass(Registry); |
443 initializeStripTlsPass(Registry); | 443 initializeStripTlsPass(Registry); |
444 initializeSubstituteUndefsPass(Registry); | 444 initializeSubstituteUndefsPass(Registry); |
445 // Emscripten passes: | |
446 initializeExpandI64Pass(Registry); | |
447 initializeExpandInsertExtractElementPass(Registry); | |
448 initializeLowerEmAsyncifyPass(Registry); | |
449 initializeLowerEmExceptionsPass(Registry); | |
450 initializeLowerEmSetjmpPass(Registry); | |
451 initializeNoExitRuntimePass(Registry); | |
452 // Emscripten passes end. | |
453 // @LOCALMOD-END | 445 // @LOCALMOD-END |
454 | 446 |
455 cl::ParseCommandLineOptions(argc, argv, | 447 cl::ParseCommandLineOptions(argc, argv, |
456 "llvm .bc -> .bc modular optimizer and analysis printer\n"); | 448 "llvm .bc -> .bc modular optimizer and analysis printer\n"); |
457 | 449 |
458 if (AnalyzeOnly && NoOutput) { | 450 if (AnalyzeOnly && NoOutput) { |
459 errs() << argv[0] << ": analyze mode conflicts with no-output mode.\n"; | 451 errs() << argv[0] << ": analyze mode conflicts with no-output mode.\n"; |
460 return 1; | 452 return 1; |
461 } | 453 } |
462 | 454 |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 | 746 |
755 // Now that we have all of the passes ready, run them. | 747 // Now that we have all of the passes ready, run them. |
756 Passes.run(*M); | 748 Passes.run(*M); |
757 | 749 |
758 // Declare success. | 750 // Declare success. |
759 if (!NoOutput || PrintBreakpoints) | 751 if (!NoOutput || PrintBreakpoints) |
760 Out->keep(); | 752 Out->keep(); |
761 | 753 |
762 return 0; | 754 return 0; |
763 } | 755 } |
OLD | NEW |