| OLD | NEW |
| 1 //===-- pnacl-llc.cpp - PNaCl-specific llc: pexe ---> nexe ---------------===// | 1 //===-- pnacl-llc.cpp - PNaCl-specific llc: pexe ---> nexe ---------------===// |
| 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 // pnacl-llc: the core of the PNaCl translator, compiling a pexe into a nexe. | 10 // pnacl-llc: the core of the PNaCl translator, compiling a pexe into a nexe. |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 } | 407 } |
| 408 | 408 |
| 409 // Add the ABI verifier pass before the analysis and code emission passes. | 409 // Add the ABI verifier pass before the analysis and code emission passes. |
| 410 if (PNaClABIVerify) { | 410 if (PNaClABIVerify) { |
| 411 PM->add(createPNaClABIVerifyFunctionsPass(&ABIErrorReporter)); | 411 PM->add(createPNaClABIVerifyFunctionsPass(&ABIErrorReporter)); |
| 412 } | 412 } |
| 413 | 413 |
| 414 // Add the intrinsic resolution pass. It assumes ABI-conformant code. | 414 // Add the intrinsic resolution pass. It assumes ABI-conformant code. |
| 415 PM->add(createResolvePNaClIntrinsicsPass()); | 415 PM->add(createResolvePNaClIntrinsicsPass()); |
| 416 | 416 |
| 417 // Allow subsequent passes to better optimize vector instructions. |
| 418 PM->add(createCombineVectorInstructionsPass()); |
| 419 |
| 417 // Add an appropriate TargetLibraryInfo pass for the module's triple. | 420 // Add an appropriate TargetLibraryInfo pass for the module's triple. |
| 418 TargetLibraryInfo *TLI = new TargetLibraryInfo(TheTriple); | 421 TargetLibraryInfo *TLI = new TargetLibraryInfo(TheTriple); |
| 419 if (DisableSimplifyLibCalls) | 422 if (DisableSimplifyLibCalls) |
| 420 TLI->disableAllFunctions(); | 423 TLI->disableAllFunctions(); |
| 421 PM->add(TLI); | 424 PM->add(TLI); |
| 422 | 425 |
| 423 // Add intenal analysis passes from the target machine. | 426 // Add intenal analysis passes from the target machine. |
| 424 Target.addAnalysisPasses(*PM.get()); | 427 Target.addAnalysisPasses(*PM.get()); |
| 425 | 428 |
| 426 // Add the target data from the target machine, if it exists, or the module. | 429 // Add the target data from the target machine, if it exists, or the module. |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 757 return 0; | 760 return 0; |
| 758 } | 761 } |
| 759 | 762 |
| 760 int main(int argc, char **argv) { | 763 int main(int argc, char **argv) { |
| 761 #if defined(__native_client__) | 764 #if defined(__native_client__) |
| 762 return srpc_main(argc, argv); | 765 return srpc_main(argc, argv); |
| 763 #else | 766 #else |
| 764 return llc_main(argc, argv); | 767 return llc_main(argc, argv); |
| 765 #endif // __native_client__ | 768 #endif // __native_client__ |
| 766 } | 769 } |
| OLD | NEW |