From 292c2829ab3d9b258acf187cc303b6632829f395 Mon Sep 17 00:00:00 2001 From: Jeremy Rand Date: Fri, 4 Jul 2014 22:48:00 -0400 Subject: [PATCH] Initial commit with LLVM 3.4.1, cfe 3.4.1 and compiler-rt 3.4 --- .arcconfig | 4 + .clang-format | 1 + .gitignore | 48 + CMakeLists.txt | 532 + CODE_OWNERS.TXT | 151 + CREDITS.TXT | 445 + LICENSE.TXT | 71 + LLVMBuild.txt | 24 + Makefile | 285 + Makefile.common | 69 + Makefile.config.in | 412 + Makefile.rules | 2122 + README.txt | 18 + autoconf/AutoRegen.sh | 58 + autoconf/ExportMap.map | 7 + autoconf/LICENSE.TXT | 24 + autoconf/README.TXT | 49 + autoconf/config.guess | 1523 + autoconf/config.sub | 1768 + autoconf/configure.ac | 1995 + autoconf/depcomp | 522 + autoconf/install-sh | 322 + autoconf/ltmain.sh | 6863 ++ autoconf/m4/build_exeext.m4 | 42 + autoconf/m4/c_printf_a.m4 | 31 + autoconf/m4/check_gnu_make.m4 | 26 + autoconf/m4/config_makefile.m4 | 9 + autoconf/m4/config_project.m4 | 14 + autoconf/m4/cxx_flag_check.m4 | 2 + autoconf/m4/find_std_program.m4 | 118 + autoconf/m4/func_isinf.m4 | 42 + autoconf/m4/func_isnan.m4 | 27 + autoconf/m4/func_mmap_file.m4 | 26 + autoconf/m4/header_mmap_anonymous.m4 | 21 + autoconf/m4/huge_val.m4 | 18 + autoconf/m4/libtool.m4 | 6389 ++ autoconf/m4/link_options.m4 | 109 + autoconf/m4/linux_mixed_64_32.m4 | 17 + autoconf/m4/ltdl.m4 | 397 + autoconf/m4/need_dev_zero_for_mmap.m4 | 17 + autoconf/m4/path_tclsh.m4 | 39 + autoconf/m4/rand48.m4 | 12 + autoconf/m4/sanity_check.m4 | 31 + autoconf/m4/single_cxx_check.m4 | 16 + autoconf/m4/visibility_inlines_hidden.m4 | 24 + autoconf/missing | 353 + autoconf/mkinstalldirs | 150 + bindings/LLVMBuild.txt | 21 + bindings/Makefile | 16 + bindings/README.txt | 3 + bindings/ocaml/Makefile | 20 + bindings/ocaml/Makefile.ocaml | 491 + bindings/ocaml/analysis/Makefile | 19 + bindings/ocaml/analysis/analysis_ocaml.c | 72 + bindings/ocaml/analysis/llvm_analysis.ml | 22 + bindings/ocaml/analysis/llvm_analysis.mli | 46 + bindings/ocaml/backends/META.llvm_backend.in | 8 + bindings/ocaml/backends/Makefile | 61 + bindings/ocaml/backends/Makefile.common | 65 + bindings/ocaml/backends/backend_ocaml.c | 37 + bindings/ocaml/backends/llvm_backend.ml.in | 10 + bindings/ocaml/backends/llvm_backend.mli.in | 19 + bindings/ocaml/bitreader/Makefile | 19 + bindings/ocaml/bitreader/bitreader_ocaml.c | 73 + bindings/ocaml/bitreader/llvm_bitreader.ml | 20 + bindings/ocaml/bitreader/llvm_bitreader.mli | 28 + bindings/ocaml/bitwriter/Makefile | 19 + bindings/ocaml/bitwriter/bitwriter_ocaml.c | 45 + bindings/ocaml/bitwriter/llvm_bitwriter.ml | 25 + bindings/ocaml/bitwriter/llvm_bitwriter.mli | 30 + bindings/ocaml/executionengine/Makefile | 19 + .../executionengine/executionengine_ocaml.c | 341 + .../executionengine/llvm_executionengine.ml | 111 + .../executionengine/llvm_executionengine.mli | 154 + bindings/ocaml/irreader/Makefile | 19 + bindings/ocaml/irreader/irreader_ocaml.c | 59 + bindings/ocaml/irreader/llvm_irreader.ml | 17 + bindings/ocaml/irreader/llvm_irreader.mli | 21 + bindings/ocaml/linker/Makefile | 19 + bindings/ocaml/linker/linker_ocaml.c | 54 + bindings/ocaml/linker/llvm_linker.ml | 22 + bindings/ocaml/linker/llvm_linker.mli | 26 + bindings/ocaml/llvm/META.llvm.in | 95 + bindings/ocaml/llvm/Makefile | 42 + bindings/ocaml/llvm/llvm.ml | 1279 + bindings/ocaml/llvm/llvm.mli | 2465 + bindings/ocaml/llvm/llvm_ocaml.c | 2235 + bindings/ocaml/target/Makefile | 19 + bindings/ocaml/target/llvm_target.ml | 138 + bindings/ocaml/target/llvm_target.mli | 222 + bindings/ocaml/target/target_ocaml.c | 390 + bindings/ocaml/transforms/Makefile | 18 + bindings/ocaml/transforms/ipo/Makefile | 19 + bindings/ocaml/transforms/ipo/ipo_ocaml.c | 110 + bindings/ocaml/transforms/ipo/llvm_ipo.ml | 37 + bindings/ocaml/transforms/ipo/llvm_ipo.mli | 69 + .../ocaml/transforms/passmgr_builder/Makefile | 19 + .../passmgr_builder/llvm_passmgr_builder.ml | 32 + .../passmgr_builder/llvm_passmgr_builder.mli | 54 + .../passmgr_builder/passmgr_builder_ocaml.c | 113 + bindings/ocaml/transforms/scalar/Makefile | 19 + .../transforms/scalar/llvm_scalar_opts.ml | 114 + .../transforms/scalar/llvm_scalar_opts.mli | 168 + .../transforms/scalar/scalar_opts_ocaml.c | 207 + bindings/ocaml/transforms/vectorize/Makefile | 19 + .../transforms/vectorize/llvm_vectorize.ml | 15 + .../transforms/vectorize/llvm_vectorize.mli | 25 + .../transforms/vectorize/vectorize_ocaml.c | 38 + bindings/python/README.txt | 67 + bindings/python/llvm/__init__.py | 0 bindings/python/llvm/bit_reader.py | 31 + bindings/python/llvm/common.py | 126 + bindings/python/llvm/core.py | 540 + bindings/python/llvm/disassembler.py | 170 + bindings/python/llvm/enumerations.py | 211 + bindings/python/llvm/object.py | 523 + bindings/python/llvm/tests/__init__.py | 0 bindings/python/llvm/tests/base.py | 38 + bindings/python/llvm/tests/test.bc | Bin 0 -> 1344 bytes bindings/python/llvm/tests/test_bitreader.py | 15 + bindings/python/llvm/tests/test_core.py | 130 + .../python/llvm/tests/test_disassembler.py | 43 + bindings/python/llvm/tests/test_file | 1 + bindings/python/llvm/tests/test_object.py | 67 + cmake/README | 1 + cmake/config-ix.cmake | 500 + cmake/modules/AddLLVM.cmake | 366 + cmake/modules/AddLLVMDefinitions.cmake | 13 + cmake/modules/CMakeLists.txt | 39 + cmake/modules/CheckAtomic.cmake | 29 + cmake/modules/ChooseMSVCCRT.cmake | 106 + cmake/modules/GetHostTriple.cmake | 30 + cmake/modules/GetSVN.cmake | 25 + cmake/modules/HandleLLVMOptions.cmake | 299 + cmake/modules/LLVM-Config.cmake | 189 + cmake/modules/LLVMConfig.cmake.in | 58 + cmake/modules/LLVMConfigVersion.cmake.in | 1 + cmake/modules/LLVMParseArguments.cmake | 80 + cmake/modules/LLVMProcessSources.cmake | 94 + cmake/modules/TableGen.cmake | 143 + cmake/modules/VersionFromVCS.cmake | 72 + cmake/nsis_logo.bmp | Bin 0 -> 30776 bytes cmake/platforms/Android.cmake | 28 + configure | 23947 ++++ docs/AliasAnalysis.rst | 699 + docs/Atomics.rst | 439 + docs/BitCodeFormat.rst | 1093 + docs/BranchWeightMetadata.rst | 116 + docs/Bugpoint.rst | 216 + docs/CMake.rst | 426 + docs/CMakeLists.txt | 51 + docs/CodeGenerator.rst | 2444 + docs/CodingStandards.rst | 1348 + docs/CommandGuide/FileCheck.rst | 410 + docs/CommandGuide/bugpoint.rst | 187 + docs/CommandGuide/index.rst | 52 + docs/CommandGuide/lit.rst | 414 + docs/CommandGuide/llc.rst | 195 + docs/CommandGuide/lli.rst | 300 + docs/CommandGuide/llvm-ar.rst | 367 + docs/CommandGuide/llvm-as.rst | 56 + docs/CommandGuide/llvm-bcanalyzer.rst | 305 + docs/CommandGuide/llvm-build.rst | 102 + docs/CommandGuide/llvm-config.rst | 176 + docs/CommandGuide/llvm-cov.rst | 39 + docs/CommandGuide/llvm-diff.rst | 56 + docs/CommandGuide/llvm-dis.rst | 69 + docs/CommandGuide/llvm-extract.rst | 79 + docs/CommandGuide/llvm-link.rst | 56 + docs/CommandGuide/llvm-nm.rst | 146 + docs/CommandGuide/llvm-prof.rst | 63 + docs/CommandGuide/llvm-readobj.rst | 86 + docs/CommandGuide/llvm-stress.rst | 34 + docs/CommandGuide/llvm-symbolizer.rst | 81 + docs/CommandGuide/opt.rst | 143 + docs/CommandGuide/tblgen.rst | 131 + docs/CommandLine.rst | 1743 + docs/CompilerWriterInfo.rst | 155 + docs/DebuggingJITedCode.rst | 143 + docs/DeveloperPolicy.rst | 533 + docs/Dummy.html | 0 docs/ExceptionHandling.rst | 364 + docs/ExtendedIntegerResults.txt | 133 + docs/ExtendingLLVM.rst | 304 + docs/Extensions.rst | 145 + docs/FAQ.rst | 485 + docs/GarbageCollection.rst | 1015 + docs/GetElementPtr.rst | 536 + docs/GettingStarted.rst | 1383 + docs/GettingStartedVS.rst | 235 + docs/GoldPlugin.rst | 172 + .../2000-11-18-EarlyDesignIdeas.txt | 74 + .../2000-11-18-EarlyDesignIdeasResp.txt | 199 + .../2000-12-06-EncodingIdea.txt | 30 + .../2000-12-06-MeetingSummary.txt | 83 + .../2001-01-31-UniversalIRIdea.txt | 39 + .../2001-02-06-TypeNotationDebate.txt | 67 + .../2001-02-06-TypeNotationDebateResp1.txt | 75 + .../2001-02-06-TypeNotationDebateResp2.txt | 53 + .../2001-02-06-TypeNotationDebateResp4.txt | 89 + .../2001-02-09-AdveComments.txt | 120 + .../2001-02-09-AdveCommentsResponse.txt | 245 + .../2001-02-13-Reference-Memory.txt | 39 + .../2001-02-13-Reference-MemoryResponse.txt | 47 + .../2001-04-16-DynamicCompilation.txt | 49 + .../2001-05-18-ExceptionHandling.txt | 202 + .../2001-05-19-ExceptionResponse.txt | 45 + .../2001-06-01-GCCOptimizations.txt | 63 + .../2001-06-01-GCCOptimizations2.txt | 71 + .../2001-06-20-.NET-Differences.txt | 30 + .../2001-07-06-LoweringIRForCodeGen.txt | 31 + .../2001-09-18-OptimizeExceptions.txt | 56 + .../2002-05-12-InstListChange.txt | 55 + .../2002-06-25-MegaPatchInfo.txt | 72 + .../2003-01-23-CygwinNotes.txt | 28 + .../2003-06-25-Reoptimizer1.txt | 137 + .../2003-06-26-Reoptimizer2.txt | 110 + .../2007-OriginalClangReadme.txt | 178 + docs/HowToAddABuilder.rst | 86 + docs/HowToBuildOnARM.rst | 69 + docs/HowToCrossCompileLLVM.rst | 175 + docs/HowToReleaseLLVM.rst | 425 + docs/HowToSetUpLLVMStyleRTTI.rst | 400 + docs/HowToSubmitABug.rst | 229 + docs/HowToUseAttributes.rst | 81 + docs/HowToUseInstrMappings.rst | 175 + docs/LLVMBuild.rst | 325 + docs/LLVMBuild.txt | 21 + docs/LangRef.rst | 8960 ++ docs/Lexicon.rst | 222 + docs/LinkTimeOptimization.rst | 299 + docs/MCJIT-creation.png | Bin 0 -> 26456 bytes docs/MCJIT-dyld-load.png | Bin 0 -> 38960 bytes docs/MCJIT-engine-builder.png | Bin 0 -> 18731 bytes docs/MCJIT-load-object.png | Bin 0 -> 76467 bytes docs/MCJIT-load.png | Bin 0 -> 27365 bytes docs/MCJIT-resolve-relocations.png | Bin 0 -> 57621 bytes docs/MCJITDesignAndImplementation.rst | 180 + docs/Makefile | 128 + docs/Makefile.sphinx | 155 + docs/MakefileGuide.rst | 918 + docs/MarkedUpDisassembly.rst | 86 + docs/NVPTXUsage.rst | 980 + docs/Packaging.rst | 73 + docs/Passes.rst | 1261 + docs/Phabricator.rst | 106 + docs/ProgrammersManual.rst | 3204 + docs/Projects.rst | 323 + docs/README.txt | 42 + docs/ReleaseNotes.rst | 249 + docs/ReleaseProcess.rst | 212 + docs/SegmentedStacks.rst | 78 + docs/SourceLevelDebugging.rst | 2317 + docs/SphinxQuickstartTemplate.rst | 160 + docs/SystemLibrary.rst | 247 + docs/TableGen/LangRef.rst | 383 + docs/TableGenFundamentals.rst | 800 + docs/TestSuiteMakefileGuide.rst | 276 + docs/TestingGuide.rst | 517 + docs/Vectorizers.rst | 340 + docs/WritingAnLLVMBackend.rst | 1935 + docs/WritingAnLLVMPass.rst | 1436 + docs/YamlIO.rst | 874 + docs/_static/lines.gif | Bin 0 -> 91 bytes docs/_static/llvm.css | 112 + docs/_templates/indexsidebar.html | 7 + docs/_templates/layout.html | 13 + docs/_themes/llvm-theme/layout.html | 23 + docs/_themes/llvm-theme/static/contents.png | Bin 0 -> 202 bytes docs/_themes/llvm-theme/static/llvm-theme.css | 371 + docs/_themes/llvm-theme/static/logo.png | Bin 0 -> 9864 bytes docs/_themes/llvm-theme/static/navigation.png | Bin 0 -> 218 bytes docs/_themes/llvm-theme/theme.conf | 4 + docs/conf.py | 252 + docs/doxygen.cfg.in | 1641 + docs/doxygen.css | 408 + docs/doxygen.footer | 13 + docs/doxygen.header | 9 + docs/doxygen.intro | 18 + docs/gcc-loops.png | Bin 0 -> 21535 bytes docs/index.rst | 426 + docs/linpack-pc.png | Bin 0 -> 13578 bytes docs/make.bat | 190 + docs/re_format.7 | 756 + docs/tutorial/LangImpl1.rst | 278 + docs/tutorial/LangImpl2.rst | 698 + docs/tutorial/LangImpl3.rst | 594 + docs/tutorial/LangImpl4.rst | 445 + docs/tutorial/LangImpl5-cfg.png | Bin 0 -> 38586 bytes docs/tutorial/LangImpl5.rst | 749 + docs/tutorial/LangImpl6.rst | 750 + docs/tutorial/LangImpl7.rst | 860 + docs/tutorial/LangImpl8.rst | 267 + docs/tutorial/OCamlLangImpl1.rst | 285 + docs/tutorial/OCamlLangImpl2.rst | 899 + docs/tutorial/OCamlLangImpl3.rst | 961 + docs/tutorial/OCamlLangImpl4.rst | 915 + docs/tutorial/OCamlLangImpl5.rst | 1362 + docs/tutorial/OCamlLangImpl6.rst | 1441 + docs/tutorial/OCamlLangImpl7.rst | 1723 + docs/tutorial/OCamlLangImpl8.rst | 267 + docs/tutorial/index.rst | 43 + docs/yaml2obj.rst | 220 + examples/BrainF/BrainF.cpp | 467 + examples/BrainF/BrainF.h | 94 + examples/BrainF/BrainFDriver.cpp | 159 + examples/BrainF/CMakeLists.txt | 6 + examples/BrainF/Makefile | 15 + examples/CMakeLists.txt | 13 + examples/ExceptionDemo/CMakeLists.txt | 8 + examples/ExceptionDemo/ExceptionDemo.cpp | 2038 + examples/ExceptionDemo/Makefile | 16 + examples/Fibonacci/CMakeLists.txt | 5 + examples/Fibonacci/Makefile | 17 + examples/Fibonacci/fibonacci.cpp | 137 + examples/HowToUseJIT/CMakeLists.txt | 5 + examples/HowToUseJIT/HowToUseJIT.cpp | 133 + examples/HowToUseJIT/Makefile | 15 + examples/Kaleidoscope/CMakeLists.txt | 6 + examples/Kaleidoscope/Chapter2/CMakeLists.txt | 3 + examples/Kaleidoscope/Chapter2/Makefile | 13 + examples/Kaleidoscope/Chapter2/toy.cpp | 391 + examples/Kaleidoscope/Chapter3/CMakeLists.txt | 5 + examples/Kaleidoscope/Chapter3/Makefile | 15 + examples/Kaleidoscope/Chapter3/toy.cpp | 565 + examples/Kaleidoscope/Chapter4/CMakeLists.txt | 5 + examples/Kaleidoscope/Chapter4/Makefile | 15 + examples/Kaleidoscope/Chapter4/toy.cpp | 615 + examples/Kaleidoscope/Chapter5/CMakeLists.txt | 5 + examples/Kaleidoscope/Chapter5/Makefile | 15 + examples/Kaleidoscope/Chapter5/toy.cpp | 860 + examples/Kaleidoscope/Chapter6/CMakeLists.txt | 5 + examples/Kaleidoscope/Chapter6/Makefile | 15 + examples/Kaleidoscope/Chapter6/toy.cpp | 978 + examples/Kaleidoscope/Chapter7/CMakeLists.txt | 6 + examples/Kaleidoscope/Chapter7/Makefile | 16 + examples/Kaleidoscope/Chapter7/toy.cpp | 1144 + examples/Kaleidoscope/MCJIT/README.txt | 12 + examples/Kaleidoscope/MCJIT/cached/Makefile | 11 + examples/Kaleidoscope/MCJIT/cached/README.txt | 28 + .../Kaleidoscope/MCJIT/cached/genk-timing.py | 219 + .../Kaleidoscope/MCJIT/cached/split-lib.py | 70 + .../Kaleidoscope/MCJIT/cached/toy-jit.cpp | 1208 + examples/Kaleidoscope/MCJIT/cached/toy.cpp | 1552 + examples/Kaleidoscope/MCJIT/complete/Makefile | 4 + .../Kaleidoscope/MCJIT/complete/README.txt | 25 + .../MCJIT/complete/genk-timing.py | 224 + .../Kaleidoscope/MCJIT/complete/split-lib.py | 70 + examples/Kaleidoscope/MCJIT/complete/toy.cpp | 1711 + examples/Kaleidoscope/MCJIT/initial/Makefile | 4 + .../Kaleidoscope/MCJIT/initial/README.txt | 18 + examples/Kaleidoscope/MCJIT/initial/toy.cpp | 1382 + examples/Kaleidoscope/MCJIT/lazy/Makefile | 7 + examples/Kaleidoscope/MCJIT/lazy/README.txt | 25 + .../Kaleidoscope/MCJIT/lazy/genk-timing.py | 219 + examples/Kaleidoscope/MCJIT/lazy/toy-jit.cpp | 1168 + examples/Kaleidoscope/MCJIT/lazy/toy.cpp | 1423 + examples/Kaleidoscope/Makefile | 15 + examples/LLVMBuild.txt | 21 + examples/Makefile | 32 + examples/ModuleMaker/CMakeLists.txt | 5 + examples/ModuleMaker/Makefile | 14 + examples/ModuleMaker/ModuleMaker.cpp | 64 + examples/ModuleMaker/README.txt | 8 + examples/OCaml-Kaleidoscope/Chapter2/Makefile | 22 + examples/OCaml-Kaleidoscope/Chapter2/_tags | 1 + examples/OCaml-Kaleidoscope/Chapter2/ast.ml | 25 + examples/OCaml-Kaleidoscope/Chapter2/lexer.ml | 52 + .../OCaml-Kaleidoscope/Chapter2/parser.ml | 122 + examples/OCaml-Kaleidoscope/Chapter2/token.ml | 15 + .../OCaml-Kaleidoscope/Chapter2/toplevel.ml | 34 + examples/OCaml-Kaleidoscope/Chapter2/toy.ml | 21 + examples/OCaml-Kaleidoscope/Chapter3/Makefile | 24 + examples/OCaml-Kaleidoscope/Chapter3/_tags | 2 + examples/OCaml-Kaleidoscope/Chapter3/ast.ml | 25 + .../OCaml-Kaleidoscope/Chapter3/codegen.ml | 100 + examples/OCaml-Kaleidoscope/Chapter3/lexer.ml | 52 + .../Chapter3/myocamlbuild.ml | 6 + .../OCaml-Kaleidoscope/Chapter3/parser.ml | 122 + examples/OCaml-Kaleidoscope/Chapter3/token.ml | 15 + .../OCaml-Kaleidoscope/Chapter3/toplevel.ml | 39 + examples/OCaml-Kaleidoscope/Chapter3/toy.ml | 26 + examples/OCaml-Kaleidoscope/Chapter4/Makefile | 25 + examples/OCaml-Kaleidoscope/Chapter4/_tags | 4 + examples/OCaml-Kaleidoscope/Chapter4/ast.ml | 25 + .../OCaml-Kaleidoscope/Chapter4/bindings.c | 7 + .../OCaml-Kaleidoscope/Chapter4/codegen.ml | 103 + examples/OCaml-Kaleidoscope/Chapter4/lexer.ml | 52 + .../Chapter4/myocamlbuild.ml | 10 + .../OCaml-Kaleidoscope/Chapter4/parser.ml | 122 + examples/OCaml-Kaleidoscope/Chapter4/token.ml | 15 + .../OCaml-Kaleidoscope/Chapter4/toplevel.ml | 49 + examples/OCaml-Kaleidoscope/Chapter4/toy.ml | 53 + examples/OCaml-Kaleidoscope/Chapter5/Makefile | 25 + examples/OCaml-Kaleidoscope/Chapter5/_tags | 4 + examples/OCaml-Kaleidoscope/Chapter5/ast.ml | 31 + .../OCaml-Kaleidoscope/Chapter5/bindings.c | 7 + .../OCaml-Kaleidoscope/Chapter5/codegen.ml | 225 + examples/OCaml-Kaleidoscope/Chapter5/lexer.ml | 57 + .../Chapter5/myocamlbuild.ml | 10 + .../OCaml-Kaleidoscope/Chapter5/parser.ml | 158 + examples/OCaml-Kaleidoscope/Chapter5/token.ml | 19 + .../OCaml-Kaleidoscope/Chapter5/toplevel.ml | 49 + examples/OCaml-Kaleidoscope/Chapter5/toy.ml | 53 + examples/OCaml-Kaleidoscope/Chapter6/Makefile | 34 + examples/OCaml-Kaleidoscope/Chapter6/_tags | 4 + examples/OCaml-Kaleidoscope/Chapter6/ast.ml | 36 + .../OCaml-Kaleidoscope/Chapter6/bindings.c | 13 + .../OCaml-Kaleidoscope/Chapter6/codegen.ml | 251 + examples/OCaml-Kaleidoscope/Chapter6/lexer.ml | 59 + .../Chapter6/myocamlbuild.ml | 10 + .../OCaml-Kaleidoscope/Chapter6/parser.ml | 195 + examples/OCaml-Kaleidoscope/Chapter6/token.ml | 22 + .../OCaml-Kaleidoscope/Chapter6/toplevel.ml | 49 + examples/OCaml-Kaleidoscope/Chapter6/toy.ml | 53 + examples/OCaml-Kaleidoscope/Chapter7/Makefile | 34 + examples/OCaml-Kaleidoscope/Chapter7/_tags | 4 + examples/OCaml-Kaleidoscope/Chapter7/ast.ml | 39 + .../OCaml-Kaleidoscope/Chapter7/bindings.c | 13 + .../OCaml-Kaleidoscope/Chapter7/codegen.ml | 370 + examples/OCaml-Kaleidoscope/Chapter7/lexer.ml | 60 + .../Chapter7/myocamlbuild.ml | 10 + .../OCaml-Kaleidoscope/Chapter7/parser.ml | 221 + examples/OCaml-Kaleidoscope/Chapter7/token.ml | 25 + .../OCaml-Kaleidoscope/Chapter7/toplevel.ml | 49 + examples/OCaml-Kaleidoscope/Chapter7/toy.ml | 57 + examples/OCaml-Kaleidoscope/Makefile | 15 + examples/ParallelJIT/CMakeLists.txt | 9 + examples/ParallelJIT/Makefile | 17 + examples/ParallelJIT/ParallelJIT.cpp | 305 + include/llvm-c/Analysis.h | 65 + include/llvm-c/BitReader.h | 76 + include/llvm-c/BitWriter.h | 56 + include/llvm-c/Core.h | 2828 + include/llvm-c/Disassembler.h | 216 + include/llvm-c/ExecutionEngine.h | 212 + include/llvm-c/IRReader.h | 40 + include/llvm-c/Initialization.h | 55 + include/llvm-c/LinkTimeOptimizer.h | 69 + include/llvm-c/Linker.h | 42 + include/llvm-c/Object.h | 102 + include/llvm-c/Support.h | 35 + include/llvm-c/Target.h | 290 + include/llvm-c/TargetMachine.h | 144 + include/llvm-c/Transforms/IPO.h | 81 + .../llvm-c/Transforms/PassManagerBuilder.h | 91 + include/llvm-c/Transforms/Scalar.h | 140 + include/llvm-c/Transforms/Vectorize.h | 54 + include/llvm-c/lto.h | 321 + include/llvm/ADT/APFloat.h | 580 + include/llvm/ADT/APInt.h | 1864 + include/llvm/ADT/APSInt.h | 312 + include/llvm/ADT/ArrayRef.h | 329 + include/llvm/ADT/BitVector.h | 596 + include/llvm/ADT/DAGDeltaAlgorithm.h | 77 + include/llvm/ADT/DeltaAlgorithm.h | 91 + include/llvm/ADT/DenseMap.h | 1058 + include/llvm/ADT/DenseMapInfo.h | 168 + include/llvm/ADT/DenseSet.h | 131 + include/llvm/ADT/DepthFirstIterator.h | 268 + include/llvm/ADT/EquivalenceClasses.h | 283 + include/llvm/ADT/FoldingSet.h | 795 + include/llvm/ADT/GraphTraits.h | 106 + include/llvm/ADT/Hashing.h | 765 + include/llvm/ADT/ImmutableIntervalMap.h | 248 + include/llvm/ADT/ImmutableList.h | 229 + include/llvm/ADT/ImmutableMap.h | 439 + include/llvm/ADT/ImmutableSet.h | 1245 + include/llvm/ADT/IndexedMap.h | 82 + include/llvm/ADT/IntEqClasses.h | 88 + include/llvm/ADT/IntervalMap.h | 2166 + include/llvm/ADT/IntrusiveRefCntPtr.h | 243 + include/llvm/ADT/MapVector.h | 132 + include/llvm/ADT/None.h | 27 + include/llvm/ADT/Optional.h | 193 + include/llvm/ADT/OwningPtr.h | 153 + include/llvm/ADT/PackedVector.h | 159 + include/llvm/ADT/PointerIntPair.h | 200 + include/llvm/ADT/PointerUnion.h | 460 + include/llvm/ADT/PostOrderIterator.h | 279 + include/llvm/ADT/PriorityQueue.h | 84 + include/llvm/ADT/SCCIterator.h | 220 + include/llvm/ADT/STLExtras.h | 332 + include/llvm/ADT/ScopedHashTable.h | 256 + include/llvm/ADT/SetOperations.h | 71 + include/llvm/ADT/SetVector.h | 232 + include/llvm/ADT/SmallBitVector.h | 608 + include/llvm/ADT/SmallPtrSet.h | 307 + include/llvm/ADT/SmallSet.h | 119 + include/llvm/ADT/SmallString.h | 300 + include/llvm/ADT/SmallVector.h | 944 + include/llvm/ADT/SparseBitVector.h | 897 + include/llvm/ADT/SparseMultiSet.h | 526 + include/llvm/ADT/SparseSet.h | 308 + include/llvm/ADT/Statistic.h | 181 + include/llvm/ADT/StringExtras.h | 207 + include/llvm/ADT/StringMap.h | 476 + include/llvm/ADT/StringRef.h | 563 + include/llvm/ADT/StringSet.h | 45 + include/llvm/ADT/StringSwitch.h | 126 + include/llvm/ADT/TinyPtrVector.h | 291 + include/llvm/ADT/Triple.h | 464 + include/llvm/ADT/Twine.h | 524 + include/llvm/ADT/UniqueVector.h | 89 + include/llvm/ADT/ValueMap.h | 377 + include/llvm/ADT/VariadicFunction.h | 331 + include/llvm/ADT/edit_distance.h | 102 + include/llvm/ADT/ilist.h | 722 + include/llvm/ADT/ilist_node.h | 106 + include/llvm/ADT/polymorphic_ptr.h | 117 + include/llvm/Analysis/AliasAnalysis.h | 602 + include/llvm/Analysis/AliasSetTracker.h | 437 + include/llvm/Analysis/BlockFrequencyImpl.h | 347 + include/llvm/Analysis/BlockFrequencyInfo.h | 57 + include/llvm/Analysis/BranchProbabilityInfo.h | 152 + include/llvm/Analysis/CFG.h | 83 + include/llvm/Analysis/CFGPrinter.h | 131 + include/llvm/Analysis/CallGraph.h | 379 + include/llvm/Analysis/CallGraphSCCPass.h | 107 + include/llvm/Analysis/CallPrinter.h | 27 + include/llvm/Analysis/CaptureTracking.h | 62 + include/llvm/Analysis/CodeMetrics.h | 93 + include/llvm/Analysis/ConstantFolding.h | 102 + include/llvm/Analysis/ConstantsScanner.h | 93 + include/llvm/Analysis/DOTGraphTraitsPass.h | 142 + include/llvm/Analysis/DependenceAnalysis.h | 933 + include/llvm/Analysis/DomPrinter.h | 30 + include/llvm/Analysis/DominanceFrontier.h | 190 + include/llvm/Analysis/DominatorInternals.h | 289 + include/llvm/Analysis/Dominators.h | 940 + include/llvm/Analysis/FindUsedTypes.h | 66 + include/llvm/Analysis/IVUsers.h | 184 + include/llvm/Analysis/InlineCost.h | 142 + include/llvm/Analysis/InstructionSimplify.h | 274 + include/llvm/Analysis/Interval.h | 153 + include/llvm/Analysis/IntervalIterator.h | 259 + include/llvm/Analysis/IntervalPartition.h | 111 + include/llvm/Analysis/LazyValueInfo.h | 81 + include/llvm/Analysis/LibCallAliasAnalysis.h | 73 + include/llvm/Analysis/LibCallSemantics.h | 167 + include/llvm/Analysis/Lint.h | 49 + include/llvm/Analysis/Loads.h | 57 + include/llvm/Analysis/LoopInfo.h | 741 + include/llvm/Analysis/LoopInfoImpl.h | 549 + include/llvm/Analysis/LoopIterator.h | 181 + include/llvm/Analysis/LoopPass.h | 160 + include/llvm/Analysis/MemoryBuiltins.h | 273 + .../llvm/Analysis/MemoryDependenceAnalysis.h | 445 + include/llvm/Analysis/PHITransAddr.h | 121 + include/llvm/Analysis/Passes.h | 168 + include/llvm/Analysis/PostDominators.h | 111 + include/llvm/Analysis/PtrUseVisitor.h | 285 + include/llvm/Analysis/RegionInfo.h | 739 + include/llvm/Analysis/RegionIterator.h | 342 + include/llvm/Analysis/RegionPass.h | 127 + include/llvm/Analysis/RegionPrinter.h | 26 + include/llvm/Analysis/ScalarEvolution.h | 906 + .../llvm/Analysis/ScalarEvolutionExpander.h | 269 + .../Analysis/ScalarEvolutionExpressions.h | 752 + .../Analysis/ScalarEvolutionNormalization.h | 78 + include/llvm/Analysis/SparsePropagation.h | 206 + include/llvm/Analysis/TargetTransformInfo.h | 420 + include/llvm/Analysis/Trace.h | 119 + include/llvm/Analysis/ValueTracking.h | 194 + include/llvm/Analysis/Verifier.h | 75 + .../llvm/Assembly/AssemblyAnnotationWriter.h | 63 + include/llvm/Assembly/Parser.h | 64 + include/llvm/Assembly/PrintModulePass.h | 48 + include/llvm/Assembly/Writer.h | 37 + include/llvm/AutoUpgrade.h | 66 + include/llvm/Bitcode/BitCodes.h | 187 + include/llvm/Bitcode/BitstreamReader.h | 557 + include/llvm/Bitcode/BitstreamWriter.h | 549 + include/llvm/Bitcode/LLVMBitCodes.h | 379 + include/llvm/Bitcode/ReaderWriter.h | 154 + include/llvm/CMakeLists.txt | 13 + include/llvm/CodeGen/Analysis.h | 102 + include/llvm/CodeGen/AsmPrinter.h | 501 + include/llvm/CodeGen/CalcSpillWeights.h | 77 + include/llvm/CodeGen/CallingConvLower.h | 408 + include/llvm/CodeGen/CommandFlags.h | 213 + include/llvm/CodeGen/DAGCombine.h | 25 + include/llvm/CodeGen/DFAPacketizer.h | 167 + include/llvm/CodeGen/EdgeBundles.h | 69 + include/llvm/CodeGen/FastISel.h | 412 + include/llvm/CodeGen/FunctionLoweringInfo.h | 233 + include/llvm/CodeGen/GCMetadata.h | 200 + include/llvm/CodeGen/GCMetadataPrinter.h | 74 + include/llvm/CodeGen/GCStrategy.h | 153 + include/llvm/CodeGen/GCs.h | 41 + include/llvm/CodeGen/ISDOpcodes.h | 817 + include/llvm/CodeGen/IntrinsicLowering.h | 59 + include/llvm/CodeGen/JITCodeEmitter.h | 341 + include/llvm/CodeGen/LatencyPriorityQueue.h | 100 + include/llvm/CodeGen/LexicalScopes.h | 248 + .../llvm/CodeGen/LinkAllAsmWriterComponents.h | 38 + .../llvm/CodeGen/LinkAllCodegenComponents.h | 54 + include/llvm/CodeGen/LiveInterval.h | 683 + include/llvm/CodeGen/LiveIntervalAnalysis.h | 407 + include/llvm/CodeGen/LiveIntervalUnion.h | 205 + include/llvm/CodeGen/LiveRangeEdit.h | 231 + include/llvm/CodeGen/LiveRegMatrix.h | 148 + include/llvm/CodeGen/LiveRegUnits.h | 88 + include/llvm/CodeGen/LiveStackAnalysis.h | 99 + include/llvm/CodeGen/LiveVariables.h | 307 + include/llvm/CodeGen/MachORelocation.h | 56 + include/llvm/CodeGen/MachineBasicBlock.h | 763 + .../llvm/CodeGen/MachineBlockFrequencyInfo.h | 56 + .../CodeGen/MachineBranchProbabilityInfo.h | 88 + include/llvm/CodeGen/MachineCodeEmitter.h | 334 + include/llvm/CodeGen/MachineCodeInfo.h | 53 + include/llvm/CodeGen/MachineConstantPool.h | 176 + include/llvm/CodeGen/MachineDominators.h | 205 + include/llvm/CodeGen/MachineFrameInfo.h | 565 + include/llvm/CodeGen/MachineFunction.h | 524 + .../llvm/CodeGen/MachineFunctionAnalysis.h | 51 + include/llvm/CodeGen/MachineFunctionPass.h | 59 + include/llvm/CodeGen/MachineInstr.h | 1077 + include/llvm/CodeGen/MachineInstrBuilder.h | 492 + include/llvm/CodeGen/MachineInstrBundle.h | 252 + include/llvm/CodeGen/MachineJumpTableInfo.h | 130 + include/llvm/CodeGen/MachineLoopInfo.h | 190 + include/llvm/CodeGen/MachineMemOperand.h | 189 + include/llvm/CodeGen/MachineModuleInfo.h | 411 + include/llvm/CodeGen/MachineModuleInfoImpls.h | 97 + include/llvm/CodeGen/MachineOperand.h | 700 + include/llvm/CodeGen/MachinePassRegistry.h | 158 + include/llvm/CodeGen/MachinePostDominators.h | 87 + include/llvm/CodeGen/MachineRegisterInfo.h | 702 + include/llvm/CodeGen/MachineRelocation.h | 342 + include/llvm/CodeGen/MachineSSAUpdater.h | 117 + include/llvm/CodeGen/MachineScheduler.h | 475 + include/llvm/CodeGen/MachineTraceMetrics.h | 391 + include/llvm/CodeGen/PBQP/Graph.h | 478 + include/llvm/CodeGen/PBQP/HeuristicBase.h | 247 + include/llvm/CodeGen/PBQP/HeuristicSolver.h | 618 + include/llvm/CodeGen/PBQP/Heuristics/Briggs.h | 468 + include/llvm/CodeGen/PBQP/Math.h | 288 + include/llvm/CodeGen/PBQP/Solution.h | 92 + include/llvm/CodeGen/Passes.h | 573 + include/llvm/CodeGen/PseudoSourceValue.h | 108 + include/llvm/CodeGen/RegAllocPBQP.h | 164 + include/llvm/CodeGen/RegAllocRegistry.h | 66 + include/llvm/CodeGen/RegisterClassInfo.h | 146 + include/llvm/CodeGen/RegisterPressure.h | 442 + include/llvm/CodeGen/RegisterScavenging.h | 208 + include/llvm/CodeGen/ResourcePriorityQueue.h | 142 + include/llvm/CodeGen/RuntimeLibcalls.h | 417 + include/llvm/CodeGen/ScheduleDAG.h | 739 + include/llvm/CodeGen/ScheduleDAGInstrs.h | 259 + include/llvm/CodeGen/ScheduleDFS.h | 196 + .../llvm/CodeGen/ScheduleHazardRecognizer.h | 95 + include/llvm/CodeGen/SchedulerRegistry.h | 112 + .../llvm/CodeGen/ScoreboardHazardRecognizer.h | 126 + include/llvm/CodeGen/SelectionDAG.h | 1199 + include/llvm/CodeGen/SelectionDAGISel.h | 293 + include/llvm/CodeGen/SelectionDAGNodes.h | 1957 + include/llvm/CodeGen/SlotIndexes.h | 710 + include/llvm/CodeGen/StackMaps.h | 175 + include/llvm/CodeGen/StackProtector.h | 127 + .../CodeGen/TargetLoweringObjectFileImpl.h | 141 + include/llvm/CodeGen/TargetSchedule.h | 172 + include/llvm/CodeGen/ValueTypes.h | 900 + include/llvm/CodeGen/ValueTypes.td | 100 + include/llvm/CodeGen/VirtRegMap.h | 190 + include/llvm/Config/AsmParsers.def.in | 29 + include/llvm/Config/AsmPrinters.def.in | 29 + include/llvm/Config/Disassemblers.def.in | 29 + include/llvm/Config/Targets.def.in | 28 + include/llvm/Config/config.h.cmake | 689 + include/llvm/Config/config.h.in | 712 + include/llvm/Config/llvm-config.h.cmake | 127 + include/llvm/Config/llvm-config.h.in | 124 + include/llvm/DIBuilder.h | 697 + include/llvm/DebugInfo.h | 850 + include/llvm/DebugInfo/DIContext.h | 154 + include/llvm/DebugInfo/DWARFFormValue.h | 85 + .../llvm/ExecutionEngine/ExecutionEngine.h | 676 + include/llvm/ExecutionEngine/GenericValue.h | 53 + include/llvm/ExecutionEngine/Interpreter.h | 38 + include/llvm/ExecutionEngine/JIT.h | 38 + .../llvm/ExecutionEngine/JITEventListener.h | 130 + .../llvm/ExecutionEngine/JITMemoryManager.h | 164 + include/llvm/ExecutionEngine/MCJIT.h | 38 + .../llvm/ExecutionEngine/OProfileWrapper.h | 124 + include/llvm/ExecutionEngine/ObjectBuffer.h | 83 + include/llvm/ExecutionEngine/ObjectCache.h | 41 + include/llvm/ExecutionEngine/ObjectImage.h | 64 + .../ExecutionEngine/RTDyldMemoryManager.h | 112 + include/llvm/ExecutionEngine/RuntimeDyld.h | 81 + .../ExecutionEngine/SectionMemoryManager.h | 108 + include/llvm/GVMaterializer.h | 62 + include/llvm/IR/Argument.h | 105 + include/llvm/IR/Attributes.h | 504 + include/llvm/IR/BasicBlock.h | 307 + include/llvm/IR/CMakeLists.txt | 7 + include/llvm/IR/CallingConv.h | 138 + include/llvm/IR/Constant.h | 170 + include/llvm/IR/Constants.h | 1171 + include/llvm/IR/DataLayout.h | 501 + include/llvm/IR/DerivedTypes.h | 455 + include/llvm/IR/Function.h | 507 + include/llvm/IR/GlobalAlias.h | 104 + include/llvm/IR/GlobalValue.h | 299 + include/llvm/IR/GlobalVariable.h | 208 + include/llvm/IR/IRBuilder.h | 1453 + include/llvm/IR/InlineAsm.h | 309 + include/llvm/IR/InstrTypes.h | 857 + include/llvm/IR/Instruction.def | 200 + include/llvm/IR/Instruction.h | 467 + include/llvm/IR/Instructions.h | 3657 + include/llvm/IR/IntrinsicInst.h | 316 + include/llvm/IR/Intrinsics.h | 126 + include/llvm/IR/Intrinsics.td | 526 + include/llvm/IR/IntrinsicsAArch64.td | 388 + include/llvm/IR/IntrinsicsARM.td | 490 + include/llvm/IR/IntrinsicsHexagon.td | 4877 + include/llvm/IR/IntrinsicsMips.td | 1757 + include/llvm/IR/IntrinsicsNVVM.td | 962 + include/llvm/IR/IntrinsicsPowerPC.td | 476 + include/llvm/IR/IntrinsicsR600.td | 36 + include/llvm/IR/IntrinsicsX86.td | 3125 + include/llvm/IR/IntrinsicsXCore.td | 118 + include/llvm/IR/LLVMContext.h | 129 + include/llvm/IR/LegacyPassManager.h | 111 + include/llvm/IR/LegacyPassManagers.h | 470 + include/llvm/IR/MDBuilder.h | 198 + include/llvm/IR/Metadata.h | 246 + include/llvm/IR/Module.h | 607 + include/llvm/IR/OperandTraits.h | 160 + include/llvm/IR/Operator.h | 478 + include/llvm/IR/PassManager.h | 383 + include/llvm/IR/SymbolTableListTraits.h | 78 + include/llvm/IR/Type.h | 495 + include/llvm/IR/TypeBuilder.h | 399 + include/llvm/IR/TypeFinder.h | 78 + include/llvm/IR/Use.h | 223 + include/llvm/IR/User.h | 205 + include/llvm/IR/Value.h | 465 + include/llvm/IR/ValueSymbolTable.h | 133 + include/llvm/IRReader/IRReader.h | 55 + include/llvm/InitializePasses.h | 270 + include/llvm/InstVisitor.h | 289 + include/llvm/LTO/LTOCodeGenerator.h | 153 + include/llvm/LTO/LTOModule.h | 196 + include/llvm/LinkAllIR.h | 53 + include/llvm/LinkAllPasses.h | 170 + include/llvm/Linker.h | 59 + include/llvm/MC/MCAsmBackend.h | 173 + include/llvm/MC/MCAsmInfo.h | 558 + include/llvm/MC/MCAsmInfoCOFF.h | 36 + include/llvm/MC/MCAsmInfoDarwin.h | 29 + include/llvm/MC/MCAsmInfoELF.h | 23 + include/llvm/MC/MCAsmLayout.h | 112 + include/llvm/MC/MCAssembler.h | 1183 + include/llvm/MC/MCAtom.h | 199 + include/llvm/MC/MCCodeEmitter.h | 43 + include/llvm/MC/MCCodeGenInfo.h | 51 + include/llvm/MC/MCContext.h | 496 + include/llvm/MC/MCDirectives.h | 65 + include/llvm/MC/MCDisassembler.h | 143 + include/llvm/MC/MCDwarf.h | 467 + include/llvm/MC/MCELF.h | 37 + include/llvm/MC/MCELFObjectWriter.h | 147 + include/llvm/MC/MCELFStreamer.h | 126 + include/llvm/MC/MCELFSymbolFlags.h | 58 + include/llvm/MC/MCExpr.h | 516 + include/llvm/MC/MCExternalSymbolizer.h | 58 + include/llvm/MC/MCFixedLenDisassembler.h | 32 + include/llvm/MC/MCFixup.h | 112 + include/llvm/MC/MCFixupKindInfo.h | 43 + include/llvm/MC/MCFunction.h | 142 + include/llvm/MC/MCInst.h | 204 + include/llvm/MC/MCInstBuilder.h | 68 + include/llvm/MC/MCInstPrinter.h | 107 + include/llvm/MC/MCInstrAnalysis.h | 66 + include/llvm/MC/MCInstrDesc.h | 595 + include/llvm/MC/MCInstrInfo.h | 62 + include/llvm/MC/MCInstrItineraries.h | 251 + include/llvm/MC/MCLabel.h | 58 + include/llvm/MC/MCMachOSymbolFlags.h | 46 + include/llvm/MC/MCMachObjectWriter.h | 275 + include/llvm/MC/MCModule.h | 133 + include/llvm/MC/MCModuleYAML.h | 41 + include/llvm/MC/MCObjectDisassembler.h | 175 + include/llvm/MC/MCObjectFileInfo.h | 374 + include/llvm/MC/MCObjectStreamer.h | 124 + include/llvm/MC/MCObjectSymbolizer.h | 81 + include/llvm/MC/MCObjectWriter.h | 199 + include/llvm/MC/MCParser/AsmCond.h | 40 + include/llvm/MC/MCParser/AsmLexer.h | 71 + include/llvm/MC/MCParser/MCAsmLexer.h | 177 + include/llvm/MC/MCParser/MCAsmParser.h | 203 + .../llvm/MC/MCParser/MCAsmParserExtension.h | 80 + include/llvm/MC/MCParser/MCParsedAsmOperand.h | 87 + include/llvm/MC/MCRegisterInfo.h | 616 + include/llvm/MC/MCRelocationInfo.h | 55 + include/llvm/MC/MCSchedule.h | 247 + include/llvm/MC/MCSection.h | 79 + include/llvm/MC/MCSectionCOFF.h | 97 + include/llvm/MC/MCSectionELF.h | 95 + include/llvm/MC/MCSectionMachO.h | 190 + include/llvm/MC/MCStreamer.h | 740 + include/llvm/MC/MCSubtargetInfo.h | 142 + include/llvm/MC/MCSymbol.h | 165 + include/llvm/MC/MCSymbolizer.h | 81 + include/llvm/MC/MCTargetAsmParser.h | 190 + include/llvm/MC/MCValue.h | 77 + include/llvm/MC/MCWin64EH.h | 93 + include/llvm/MC/MCWinCOFFObjectWriter.h | 44 + include/llvm/MC/MachineLocation.h | 78 + include/llvm/MC/SectionKind.h | 240 + include/llvm/MC/SubtargetFeature.h | 108 + include/llvm/Object/Archive.h | 203 + include/llvm/Object/Binary.h | 126 + include/llvm/Object/COFF.h | 371 + include/llvm/Object/COFFYAML.h | 141 + include/llvm/Object/ELF.h | 1005 + include/llvm/Object/ELFObjectFile.h | 1027 + include/llvm/Object/ELFTypes.h | 463 + include/llvm/Object/ELFYAML.h | 163 + include/llvm/Object/Error.h | 51 + include/llvm/Object/MachO.h | 275 + include/llvm/Object/MachOUniversal.h | 102 + include/llvm/Object/ObjectFile.h | 613 + include/llvm/Object/RelocVisitor.h | 279 + include/llvm/Object/YAML.h | 116 + include/llvm/Option/Arg.h | 132 + include/llvm/Option/ArgList.h | 423 + include/llvm/Option/OptParser.td | 131 + include/llvm/Option/OptSpecifier.h | 39 + include/llvm/Option/OptTable.h | 179 + include/llvm/Option/Option.h | 205 + include/llvm/Pass.h | 369 + include/llvm/PassAnalysisSupport.h | 253 + include/llvm/PassManager.h | 39 + include/llvm/PassRegistry.h | 89 + include/llvm/PassSupport.h | 341 + include/llvm/Support/AIXDataTypesFix.h | 25 + include/llvm/Support/AlignOf.h | 204 + include/llvm/Support/Allocator.h | 245 + include/llvm/Support/ArrayRecycler.h | 143 + include/llvm/Support/Atomic.h | 39 + include/llvm/Support/BlockFrequency.h | 89 + include/llvm/Support/BranchProbability.h | 77 + include/llvm/Support/CBindingWrapping.h | 46 + include/llvm/Support/CFG.h | 365 + include/llvm/Support/COFF.h | 617 + include/llvm/Support/CallSite.h | 330 + include/llvm/Support/Capacity.h | 32 + include/llvm/Support/Casting.h | 290 + include/llvm/Support/CodeGen.h | 91 + include/llvm/Support/CommandLine.h | 1809 + include/llvm/Support/Compiler.h | 414 + include/llvm/Support/Compression.h | 60 + include/llvm/Support/ConstantFolder.h | 238 + include/llvm/Support/ConstantRange.h | 277 + include/llvm/Support/ConvertUTF.h | 248 + include/llvm/Support/CrashRecoveryContext.h | 200 + include/llvm/Support/DOTGraphTraits.h | 166 + include/llvm/Support/DataExtractor.h | 355 + include/llvm/Support/DataFlow.h | 103 + include/llvm/Support/DataStream.h | 38 + include/llvm/Support/DataTypes.h.cmake | 204 + include/llvm/Support/DataTypes.h.in | 202 + include/llvm/Support/Debug.h | 101 + include/llvm/Support/DebugLoc.h | 114 + include/llvm/Support/Disassembler.h | 35 + include/llvm/Support/Dwarf.h | 922 + include/llvm/Support/DynamicLibrary.h | 104 + include/llvm/Support/ELF.h | 1740 + include/llvm/Support/Endian.h | 179 + include/llvm/Support/Errno.h | 34 + include/llvm/Support/ErrorHandling.h | 111 + include/llvm/Support/ErrorOr.h | 294 + include/llvm/Support/FEnv.h | 56 + include/llvm/Support/FileOutputBuffer.h | 92 + include/llvm/Support/FileSystem.h | 1002 + include/llvm/Support/FileUtilities.h | 80 + include/llvm/Support/Format.h | 236 + include/llvm/Support/FormattedStream.h | 184 + include/llvm/Support/GCOV.h | 261 + .../llvm/Support/GetElementPtrTypeIterator.h | 113 + include/llvm/Support/GraphWriter.h | 359 + include/llvm/Support/Host.h | 74 + include/llvm/Support/IncludeFile.h | 79 + include/llvm/Support/InstIterator.h | 147 + include/llvm/Support/LEB128.h | 95 + include/llvm/Support/LICENSE.TXT | 6 + include/llvm/Support/LeakDetector.h | 92 + include/llvm/Support/Locale.h | 17 + include/llvm/Support/LockFileManager.h | 75 + include/llvm/Support/MD5.h | 71 + include/llvm/Support/MachO.h | 1009 + include/llvm/Support/ManagedStatic.h | 114 + include/llvm/Support/MathExtras.h | 616 + include/llvm/Support/Memory.h | 161 + include/llvm/Support/MemoryBuffer.h | 144 + include/llvm/Support/MemoryObject.h | 64 + include/llvm/Support/Mutex.h | 155 + include/llvm/Support/MutexGuard.h | 41 + include/llvm/Support/NoFolder.h | 298 + include/llvm/Support/OutputBuffer.h | 166 + include/llvm/Support/PassNameParser.h | 136 + include/llvm/Support/Path.h | 389 + include/llvm/Support/PatternMatch.h | 1121 + include/llvm/Support/PluginLoader.h | 37 + include/llvm/Support/PointerLikeTypeTraits.h | 81 + include/llvm/Support/PredIteratorCache.h | 70 + include/llvm/Support/PrettyStackTrace.h | 71 + include/llvm/Support/Process.h | 266 + include/llvm/Support/Program.h | 149 + include/llvm/Support/RWMutex.h | 174 + include/llvm/Support/Recycler.h | 129 + include/llvm/Support/RecyclingAllocator.h | 77 + include/llvm/Support/Regex.h | 90 + include/llvm/Support/Registry.h | 226 + include/llvm/Support/RegistryParser.h | 55 + include/llvm/Support/SMLoc.h | 63 + include/llvm/Support/SaveAndRestore.h | 47 + include/llvm/Support/Signals.h | 63 + include/llvm/Support/Solaris.h | 49 + include/llvm/Support/SourceMgr.h | 264 + include/llvm/Support/StreamableMemoryObject.h | 179 + include/llvm/Support/StringPool.h | 139 + include/llvm/Support/StringRefMemoryObject.h | 41 + include/llvm/Support/SwapByteOrder.h | 101 + include/llvm/Support/SystemUtils.h | 34 + include/llvm/Support/TargetFolder.h | 262 + include/llvm/Support/TargetRegistry.h | 1160 + include/llvm/Support/TargetSelect.h | 166 + include/llvm/Support/ThreadLocal.h | 63 + include/llvm/Support/Threading.h | 59 + include/llvm/Support/TimeValue.h | 386 + include/llvm/Support/Timer.h | 190 + include/llvm/Support/ToolOutputFile.h | 64 + include/llvm/Support/Unicode.h | 62 + include/llvm/Support/UnicodeCharRanges.h | 96 + include/llvm/Support/Valgrind.h | 75 + include/llvm/Support/ValueHandle.h | 380 + include/llvm/Support/Watchdog.h | 38 + include/llvm/Support/Win64EH.h | 145 + include/llvm/Support/YAMLParser.h | 577 + include/llvm/Support/YAMLTraits.h | 1108 + include/llvm/Support/circular_raw_ostream.h | 171 + include/llvm/Support/raw_os_ostream.h | 42 + include/llvm/Support/raw_ostream.h | 493 + include/llvm/Support/system_error.h | 905 + include/llvm/Support/type_traits.h | 244 + include/llvm/TableGen/Error.h | 40 + include/llvm/TableGen/Main.h | 29 + include/llvm/TableGen/Record.h | 1828 + include/llvm/TableGen/StringMatcher.h | 54 + include/llvm/TableGen/StringToOffsetTable.h | 83 + include/llvm/TableGen/TableGenBackend.h | 29 + include/llvm/Target/CostTable.h | 81 + include/llvm/Target/Mangler.h | 67 + include/llvm/Target/Target.td | 1128 + include/llvm/Target/TargetCallingConv.h | 169 + include/llvm/Target/TargetCallingConv.td | 152 + include/llvm/Target/TargetFrameLowering.h | 224 + include/llvm/Target/TargetInstrInfo.h | 1015 + include/llvm/Target/TargetIntrinsicInfo.h | 65 + include/llvm/Target/TargetItinerary.td | 136 + include/llvm/Target/TargetJITInfo.h | 137 + include/llvm/Target/TargetLibraryInfo.h | 759 + include/llvm/Target/TargetLowering.h | 2303 + .../llvm/Target/TargetLoweringObjectFile.h | 157 + include/llvm/Target/TargetMachine.h | 359 + include/llvm/Target/TargetOpcodes.h | 112 + include/llvm/Target/TargetOptions.h | 229 + include/llvm/Target/TargetRegisterInfo.h | 935 + include/llvm/Target/TargetSchedule.td | 383 + include/llvm/Target/TargetSelectionDAG.td | 1031 + include/llvm/Target/TargetSelectionDAGInfo.h | 169 + include/llvm/Target/TargetSubtargetInfo.h | 102 + include/llvm/Transforms/IPO.h | 203 + include/llvm/Transforms/IPO/InlinerPass.h | 91 + .../llvm/Transforms/IPO/PassManagerBuilder.h | 158 + include/llvm/Transforms/Instrumentation.h | 132 + include/llvm/Transforms/ObjCARC.h | 49 + include/llvm/Transforms/Scalar.h | 375 + .../llvm/Transforms/Utils/BasicBlockUtils.h | 219 + include/llvm/Transforms/Utils/BuildLibCalls.h | 125 + .../Transforms/Utils/BypassSlowDivision.h | 34 + include/llvm/Transforms/Utils/Cloning.h | 200 + .../llvm/Transforms/Utils/CmpInstAnalysis.h | 66 + include/llvm/Transforms/Utils/CodeExtractor.h | 127 + include/llvm/Transforms/Utils/GlobalStatus.h | 82 + .../llvm/Transforms/Utils/IntegerDivision.h | 62 + include/llvm/Transforms/Utils/Local.h | 280 + include/llvm/Transforms/Utils/LoopUtils.h | 26 + include/llvm/Transforms/Utils/ModuleUtils.h | 41 + .../llvm/Transforms/Utils/PromoteMemToReg.h | 48 + include/llvm/Transforms/Utils/SSAUpdater.h | 177 + .../llvm/Transforms/Utils/SSAUpdaterImpl.h | 456 + .../llvm/Transforms/Utils/SimplifyIndVar.h | 52 + .../llvm/Transforms/Utils/SimplifyLibCalls.h | 53 + .../llvm/Transforms/Utils/SpecialCaseList.h | 110 + .../Transforms/Utils/UnifyFunctionExitNodes.h | 51 + include/llvm/Transforms/Utils/UnrollLoop.h | 33 + include/llvm/Transforms/Utils/ValueMapper.h | 99 + include/llvm/Transforms/Vectorize.h | 140 + lib/Analysis/AliasAnalysis.cpp | 556 + lib/Analysis/AliasAnalysisCounter.cpp | 171 + lib/Analysis/AliasAnalysisEvaluator.cpp | 372 + lib/Analysis/AliasDebugger.cpp | 138 + lib/Analysis/AliasSetTracker.cpp | 653 + lib/Analysis/Analysis.cpp | 100 + lib/Analysis/BasicAliasAnalysis.cpp | 1399 + lib/Analysis/BlockFrequencyInfo.cpp | 161 + lib/Analysis/BranchProbabilityInfo.cpp | 651 + lib/Analysis/CFG.cpp | 245 + lib/Analysis/CFGPrinter.cpp | 164 + lib/Analysis/CMakeLists.txt | 57 + lib/Analysis/CaptureTracking.cpp | 186 + lib/Analysis/CodeMetrics.cpp | 96 + lib/Analysis/ConstantFolding.cpp | 1640 + lib/Analysis/CostModel.cpp | 518 + lib/Analysis/Delinearization.cpp | 133 + lib/Analysis/DependenceAnalysis.cpp | 3909 + lib/Analysis/DomPrinter.cpp | 232 + lib/Analysis/DominanceFrontier.cpp | 141 + lib/Analysis/IPA/CMakeLists.txt | 11 + lib/Analysis/IPA/CallGraph.cpp | 264 + lib/Analysis/IPA/CallGraphSCCPass.cpp | 614 + lib/Analysis/IPA/CallPrinter.cpp | 87 + lib/Analysis/IPA/FindUsedTypes.cpp | 101 + lib/Analysis/IPA/GlobalsModRef.cpp | 607 + lib/Analysis/IPA/IPA.cpp | 31 + lib/Analysis/IPA/InlineCost.cpp | 1304 + lib/Analysis/IPA/LLVMBuild.txt | 23 + lib/Analysis/IPA/Makefile | 15 + lib/Analysis/IVUsers.cpp | 354 + lib/Analysis/InstCount.cpp | 87 + lib/Analysis/InstructionSimplify.cpp | 3239 + lib/Analysis/Interval.cpp | 58 + lib/Analysis/IntervalPartition.cpp | 114 + lib/Analysis/LLVMBuild.txt | 25 + lib/Analysis/LazyValueInfo.cpp | 1143 + lib/Analysis/LibCallAliasAnalysis.cpp | 137 + lib/Analysis/LibCallSemantics.cpp | 63 + lib/Analysis/Lint.cpp | 720 + lib/Analysis/Loads.cpp | 221 + lib/Analysis/LoopInfo.cpp | 726 + lib/Analysis/LoopPass.cpp | 367 + lib/Analysis/Makefile | 16 + lib/Analysis/MemDepPrinter.cpp | 192 + lib/Analysis/MemoryBuiltins.cpp | 802 + lib/Analysis/MemoryDependenceAnalysis.cpp | 1539 + lib/Analysis/ModuleDebugInfoPrinter.cpp | 87 + lib/Analysis/NoAliasAnalysis.cpp | 88 + lib/Analysis/PHITransAddr.cpp | 443 + lib/Analysis/PostDominators.cpp | 51 + lib/Analysis/PtrUseVisitor.cpp | 36 + lib/Analysis/README.txt | 30 + lib/Analysis/RegionInfo.cpp | 865 + lib/Analysis/RegionPass.cpp | 275 + lib/Analysis/RegionPrinter.cpp | 218 + lib/Analysis/ScalarEvolution.cpp | 7720 ++ lib/Analysis/ScalarEvolutionAliasAnalysis.cpp | 173 + lib/Analysis/ScalarEvolutionExpander.cpp | 1748 + lib/Analysis/ScalarEvolutionNormalization.cpp | 231 + lib/Analysis/SparsePropagation.cpp | 347 + lib/Analysis/TargetTransformInfo.cpp | 614 + lib/Analysis/Trace.cpp | 53 + lib/Analysis/TypeBasedAliasAnalysis.cpp | 607 + lib/Analysis/ValueTracking.cpp | 2084 + lib/AsmParser/CMakeLists.txt | 6 + lib/AsmParser/LLLexer.cpp | 892 + lib/AsmParser/LLLexer.h | 93 + lib/AsmParser/LLParser.cpp | 4390 + lib/AsmParser/LLParser.h | 412 + lib/AsmParser/LLToken.h | 188 + lib/AsmParser/LLVMBuild.txt | 22 + lib/AsmParser/Makefile | 14 + lib/AsmParser/Parser.cpp | 62 + lib/Bitcode/CMakeLists.txt | 2 + lib/Bitcode/LLVMBuild.txt | 24 + lib/Bitcode/Makefile | 14 + lib/Bitcode/Reader/BitReader.cpp | 89 + lib/Bitcode/Reader/BitcodeReader.cpp | 3351 + lib/Bitcode/Reader/BitcodeReader.h | 375 + lib/Bitcode/Reader/BitstreamReader.cpp | 378 + lib/Bitcode/Reader/CMakeLists.txt | 7 + lib/Bitcode/Reader/LLVMBuild.txt | 22 + lib/Bitcode/Reader/Makefile | 15 + lib/Bitcode/Writer/BitWriter.cpp | 40 + lib/Bitcode/Writer/BitcodeWriter.cpp | 2040 + lib/Bitcode/Writer/BitcodeWriterPass.cpp | 41 + lib/Bitcode/Writer/CMakeLists.txt | 6 + lib/Bitcode/Writer/LLVMBuild.txt | 22 + lib/Bitcode/Writer/Makefile | 15 + lib/Bitcode/Writer/ValueEnumerator.cpp | 545 + lib/Bitcode/Writer/ValueEnumerator.h | 171 + lib/CMakeLists.txt | 17 + lib/CodeGen/AggressiveAntiDepBreaker.cpp | 943 + lib/CodeGen/AggressiveAntiDepBreaker.h | 184 + lib/CodeGen/AllocationOrder.cpp | 52 + lib/CodeGen/AllocationOrder.h | 85 + lib/CodeGen/Analysis.cpp | 609 + lib/CodeGen/AntiDepBreaker.h | 71 + lib/CodeGen/AsmPrinter/ARMException.cpp | 142 + lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 2264 + lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp | 195 + .../AsmPrinter/AsmPrinterInlineAsm.cpp | 553 + lib/CodeGen/AsmPrinter/CMakeLists.txt | 18 + lib/CodeGen/AsmPrinter/DIE.cpp | 449 + lib/CodeGen/AsmPrinter/DIE.h | 453 + lib/CodeGen/AsmPrinter/DIEHash.cpp | 507 + lib/CodeGen/AsmPrinter/DIEHash.h | 147 + lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp | 257 + lib/CodeGen/AsmPrinter/DwarfAccelTable.h | 253 + lib/CodeGen/AsmPrinter/DwarfCFIException.cpp | 156 + lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 1956 + lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | 409 + lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 3048 + lib/CodeGen/AsmPrinter/DwarfDebug.h | 741 + lib/CodeGen/AsmPrinter/DwarfException.cpp | 736 + lib/CodeGen/AsmPrinter/DwarfException.h | 236 + lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp | 120 + lib/CodeGen/AsmPrinter/LLVMBuild.txt | 22 + lib/CodeGen/AsmPrinter/Makefile | 13 + lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp | 166 + lib/CodeGen/AsmPrinter/Win64Exception.cpp | 114 + lib/CodeGen/BasicTargetTransformInfo.cpp | 527 + lib/CodeGen/BranchFolding.cpp | 1732 + lib/CodeGen/BranchFolding.h | 125 + lib/CodeGen/CMakeLists.txt | 117 + lib/CodeGen/CalcSpillWeights.cpp | 187 + lib/CodeGen/CallingConvLower.cpp | 180 + lib/CodeGen/CodeGen.cpp | 76 + lib/CodeGen/CriticalAntiDepBreaker.cpp | 658 + lib/CodeGen/CriticalAntiDepBreaker.h | 110 + lib/CodeGen/DFAPacketizer.cpp | 226 + lib/CodeGen/DeadMachineInstructionElim.cpp | 190 + lib/CodeGen/DwarfEHPrepare.cpp | 179 + lib/CodeGen/EarlyIfConversion.cpp | 801 + lib/CodeGen/EdgeBundles.cpp | 97 + lib/CodeGen/ErlangGC.cpp | 81 + lib/CodeGen/ExecutionDepsFix.cpp | 798 + lib/CodeGen/ExpandISelPseudos.cpp | 74 + lib/CodeGen/ExpandPostRAPseudos.cpp | 225 + lib/CodeGen/GCMetadata.cpp | 178 + lib/CodeGen/GCMetadataPrinter.cpp | 27 + lib/CodeGen/GCStrategy.cpp | 430 + lib/CodeGen/IfConversion.cpp | 1633 + lib/CodeGen/InlineSpiller.cpp | 1358 + lib/CodeGen/InterferenceCache.cpp | 231 + lib/CodeGen/InterferenceCache.h | 228 + lib/CodeGen/IntrinsicLowering.cpp | 572 + lib/CodeGen/JITCodeEmitter.cpp | 14 + lib/CodeGen/LLVMBuild.txt | 25 + lib/CodeGen/LLVMTargetMachine.cpp | 296 + lib/CodeGen/LatencyPriorityQueue.cpp | 152 + lib/CodeGen/LexicalScopes.cpp | 335 + lib/CodeGen/LiveDebugVariables.cpp | 997 + lib/CodeGen/LiveDebugVariables.h | 72 + lib/CodeGen/LiveInterval.cpp | 958 + lib/CodeGen/LiveIntervalAnalysis.cpp | 1173 + lib/CodeGen/LiveIntervalUnion.cpp | 204 + lib/CodeGen/LiveRangeCalc.cpp | 376 + lib/CodeGen/LiveRangeCalc.h | 236 + lib/CodeGen/LiveRangeEdit.cpp | 419 + lib/CodeGen/LiveRegMatrix.cpp | 156 + lib/CodeGen/LiveRegUnits.cpp | 111 + lib/CodeGen/LiveStackAnalysis.cpp | 86 + lib/CodeGen/LiveVariables.cpp | 825 + lib/CodeGen/LocalStackSlotAllocation.cpp | 373 + lib/CodeGen/MachineBasicBlock.cpp | 1218 + lib/CodeGen/MachineBlockFrequencyInfo.cpp | 56 + lib/CodeGen/MachineBlockPlacement.cpp | 1201 + lib/CodeGen/MachineBranchProbabilityInfo.cpp | 126 + lib/CodeGen/MachineCSE.cpp | 661 + lib/CodeGen/MachineCodeEmitter.cpp | 14 + lib/CodeGen/MachineCopyPropagation.cpp | 333 + lib/CodeGen/MachineDominators.cpp | 59 + lib/CodeGen/MachineFunction.cpp | 921 + lib/CodeGen/MachineFunctionAnalysis.cpp | 57 + lib/CodeGen/MachineFunctionPass.cpp | 56 + lib/CodeGen/MachineFunctionPrinterPass.cpp | 67 + lib/CodeGen/MachineInstr.cpp | 1846 + lib/CodeGen/MachineInstrBundle.cpp | 330 + lib/CodeGen/MachineLICM.cpp | 1489 + lib/CodeGen/MachineLoopInfo.cpp | 81 + lib/CodeGen/MachineModuleInfo.cpp | 576 + lib/CodeGen/MachineModuleInfoImpls.cpp | 45 + lib/CodeGen/MachinePassRegistry.cpp | 55 + lib/CodeGen/MachinePostDominators.cpp | 55 + lib/CodeGen/MachineRegisterInfo.cpp | 424 + lib/CodeGen/MachineSSAUpdater.cpp | 364 + lib/CodeGen/MachineScheduler.cpp | 3140 + lib/CodeGen/MachineSink.cpp | 728 + lib/CodeGen/MachineTraceMetrics.cpp | 1302 + lib/CodeGen/MachineVerifier.cpp | 1752 + lib/CodeGen/Makefile | 22 + lib/CodeGen/OcamlGC.cpp | 37 + lib/CodeGen/OptimizePHIs.cpp | 193 + lib/CodeGen/PHIElimination.cpp | 648 + lib/CodeGen/PHIEliminationUtils.cpp | 61 + lib/CodeGen/PHIEliminationUtils.h | 25 + lib/CodeGen/Passes.cpp | 751 + lib/CodeGen/PeepholeOptimizer.cpp | 659 + lib/CodeGen/PostRASchedulerList.cpp | 785 + lib/CodeGen/ProcessImplicitDefs.cpp | 170 + lib/CodeGen/PrologEpilogInserter.cpp | 866 + lib/CodeGen/PrologEpilogInserter.h | 78 + lib/CodeGen/PseudoSourceValue.cpp | 132 + lib/CodeGen/README.txt | 199 + lib/CodeGen/RegAllocBase.cpp | 147 + lib/CodeGen/RegAllocBase.h | 109 + lib/CodeGen/RegAllocBasic.cpp | 299 + lib/CodeGen/RegAllocFast.cpp | 1113 + lib/CodeGen/RegAllocGreedy.cpp | 1856 + lib/CodeGen/RegAllocPBQP.cpp | 641 + lib/CodeGen/RegisterClassInfo.cpp | 178 + lib/CodeGen/RegisterCoalescer.cpp | 2252 + lib/CodeGen/RegisterCoalescer.h | 120 + lib/CodeGen/RegisterPressure.cpp | 997 + lib/CodeGen/RegisterScavenging.cpp | 441 + lib/CodeGen/ScheduleDAG.cpp | 642 + lib/CodeGen/ScheduleDAGInstrs.cpp | 1341 + lib/CodeGen/ScheduleDAGPrinter.cpp | 100 + lib/CodeGen/ScoreboardHazardRecognizer.cpp | 248 + lib/CodeGen/SelectionDAG/CMakeLists.txt | 27 + lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 11054 ++ lib/CodeGen/SelectionDAG/FastISel.cpp | 1589 + .../SelectionDAG/FunctionLoweringInfo.cpp | 489 + lib/CodeGen/SelectionDAG/InstrEmitter.cpp | 1010 + lib/CodeGen/SelectionDAG/InstrEmitter.h | 146 + lib/CodeGen/SelectionDAG/LLVMBuild.txt | 22 + lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 4062 + .../SelectionDAG/LegalizeFloatTypes.cpp | 1486 + .../SelectionDAG/LegalizeIntegerTypes.cpp | 3063 + lib/CodeGen/SelectionDAG/LegalizeTypes.cpp | 1108 + lib/CodeGen/SelectionDAG/LegalizeTypes.h | 761 + .../SelectionDAG/LegalizeTypesGeneric.cpp | 546 + .../SelectionDAG/LegalizeVectorOps.cpp | 779 + .../SelectionDAG/LegalizeVectorTypes.cpp | 2923 + lib/CodeGen/SelectionDAG/Makefile | 13 + .../SelectionDAG/ResourcePriorityQueue.cpp | 654 + lib/CodeGen/SelectionDAG/SDNodeDbgValue.h | 114 + lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp | 799 + .../SelectionDAG/ScheduleDAGRRList.cpp | 3040 + .../SelectionDAG/ScheduleDAGSDNodes.cpp | 912 + lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h | 185 + lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp | 278 + lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 6573 ++ .../SelectionDAG/SelectionDAGBuilder.cpp | 7526 ++ .../SelectionDAG/SelectionDAGBuilder.h | 787 + .../SelectionDAG/SelectionDAGDumper.cpp | 651 + lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 3172 + .../SelectionDAG/SelectionDAGPrinter.cpp | 299 + lib/CodeGen/SelectionDAG/TargetLowering.cpp | 2665 + .../SelectionDAG/TargetSelectionDAGInfo.cpp | 23 + lib/CodeGen/ShadowStackGC.cpp | 452 + lib/CodeGen/SjLjEHPrepare.cpp | 506 + lib/CodeGen/SlotIndexes.cpp | 250 + lib/CodeGen/SpillPlacement.cpp | 378 + lib/CodeGen/SpillPlacement.h | 157 + lib/CodeGen/Spiller.cpp | 185 + lib/CodeGen/Spiller.h | 47 + lib/CodeGen/SplitKit.cpp | 1437 + lib/CodeGen/SplitKit.h | 471 + lib/CodeGen/StackColoring.cpp | 804 + lib/CodeGen/StackMaps.cpp | 314 + lib/CodeGen/StackProtector.cpp | 471 + lib/CodeGen/StackSlotColoring.cpp | 463 + lib/CodeGen/TailDuplication.cpp | 966 + lib/CodeGen/TargetFrameLoweringImpl.cpp | 44 + lib/CodeGen/TargetInstrInfo.cpp | 769 + lib/CodeGen/TargetLoweringBase.cpp | 1370 + lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 835 + lib/CodeGen/TargetOptionsImpl.cpp | 53 + lib/CodeGen/TargetRegisterInfo.cpp | 295 + lib/CodeGen/TargetSchedule.cpp | 288 + lib/CodeGen/TwoAddressInstructionPass.cpp | 1682 + lib/CodeGen/UnreachableBlockElim.cpp | 211 + lib/CodeGen/VirtRegMap.cpp | 399 + lib/DebugInfo/CMakeLists.txt | 17 + lib/DebugInfo/DIContext.cpp | 18 + .../DWARFAbbreviationDeclaration.cpp | 97 + lib/DebugInfo/DWARFAbbreviationDeclaration.h | 55 + lib/DebugInfo/DWARFCompileUnit.cpp | 32 + lib/DebugInfo/DWARFCompileUnit.h | 30 + lib/DebugInfo/DWARFContext.cpp | 719 + lib/DebugInfo/DWARFContext.h | 241 + lib/DebugInfo/DWARFDebugAbbrev.cpp | 106 + lib/DebugInfo/DWARFDebugAbbrev.h | 73 + lib/DebugInfo/DWARFDebugArangeSet.cpp | 102 + lib/DebugInfo/DWARFDebugArangeSet.h | 70 + lib/DebugInfo/DWARFDebugAranges.cpp | 152 + lib/DebugInfo/DWARFDebugAranges.h | 84 + lib/DebugInfo/DWARFDebugFrame.cpp | 391 + lib/DebugInfo/DWARFDebugFrame.h | 46 + lib/DebugInfo/DWARFDebugInfoEntry.cpp | 340 + lib/DebugInfo/DWARFDebugInfoEntry.h | 179 + lib/DebugInfo/DWARFDebugLine.cpp | 628 + lib/DebugInfo/DWARFDebugLine.h | 254 + lib/DebugInfo/DWARFDebugLoc.cpp | 74 + lib/DebugInfo/DWARFDebugLoc.h | 60 + lib/DebugInfo/DWARFDebugRangeList.cpp | 67 + lib/DebugInfo/DWARFDebugRangeList.h | 78 + lib/DebugInfo/DWARFFormValue.cpp | 549 + lib/DebugInfo/DWARFRelocMap.h | 22 + lib/DebugInfo/DWARFTypeUnit.cpp | 39 + lib/DebugInfo/DWARFTypeUnit.h | 35 + lib/DebugInfo/DWARFUnit.cpp | 365 + lib/DebugInfo/DWARFUnit.h | 168 + lib/DebugInfo/LLVMBuild.txt | 22 + lib/DebugInfo/Makefile | 14 + lib/ExecutionEngine/CMakeLists.txt | 21 + lib/ExecutionEngine/EventListenerCommon.h | 67 + lib/ExecutionEngine/ExecutionEngine.cpp | 1335 + .../ExecutionEngineBindings.cpp | 439 + .../IntelJITEvents/CMakeLists.txt | 6 + .../IntelJITEvents/IntelJITEventListener.cpp | 302 + .../IntelJITEvents/IntelJITEventsWrapper.h | 96 + .../IntelJITEvents/LLVMBuild.txt | 23 + lib/ExecutionEngine/IntelJITEvents/Makefile | 18 + .../IntelJITEvents/ittnotify_config.h | 454 + .../IntelJITEvents/ittnotify_types.h | 70 + .../IntelJITEvents/jitprofiling.c | 481 + .../IntelJITEvents/jitprofiling.h | 259 + .../Interpreter/CMakeLists.txt | 19 + lib/ExecutionEngine/Interpreter/Execution.cpp | 2146 + .../Interpreter/ExternalFunctions.cpp | 511 + .../Interpreter/Interpreter.cpp | 98 + lib/ExecutionEngine/Interpreter/Interpreter.h | 254 + lib/ExecutionEngine/Interpreter/LLVMBuild.txt | 22 + lib/ExecutionEngine/Interpreter/Makefile | 13 + lib/ExecutionEngine/JIT/CMakeLists.txt | 8 + lib/ExecutionEngine/JIT/JIT.cpp | 692 + lib/ExecutionEngine/JIT/JIT.h | 226 + lib/ExecutionEngine/JIT/JITEmitter.cpp | 1251 + lib/ExecutionEngine/JIT/JITMemoryManager.cpp | 912 + lib/ExecutionEngine/JIT/LLVMBuild.txt | 22 + lib/ExecutionEngine/JIT/Makefile | 38 + lib/ExecutionEngine/LLVMBuild.txt | 25 + lib/ExecutionEngine/MCJIT/CMakeLists.txt | 4 + lib/ExecutionEngine/MCJIT/LLVMBuild.txt | 22 + lib/ExecutionEngine/MCJIT/MCJIT.cpp | 541 + lib/ExecutionEngine/MCJIT/MCJIT.h | 339 + lib/ExecutionEngine/MCJIT/Makefile | 13 + .../MCJIT/SectionMemoryManager.cpp | 177 + lib/ExecutionEngine/Makefile | 24 + .../OProfileJIT/CMakeLists.txt | 7 + lib/ExecutionEngine/OProfileJIT/LLVMBuild.txt | 23 + lib/ExecutionEngine/OProfileJIT/Makefile | 18 + .../OProfileJIT/OProfileJITEventListener.cpp | 243 + .../OProfileJIT/OProfileWrapper.cpp | 267 + lib/ExecutionEngine/RTDyldMemoryManager.cpp | 282 + .../RuntimeDyld/CMakeLists.txt | 6 + .../RuntimeDyld/GDBRegistrar.cpp | 214 + .../RuntimeDyld/JITRegistrar.h | 44 + lib/ExecutionEngine/RuntimeDyld/LLVMBuild.txt | 22 + lib/ExecutionEngine/RuntimeDyld/Makefile | 13 + .../RuntimeDyld/ObjectImageCommon.h | 79 + .../RuntimeDyld/RuntimeDyld.cpp | 647 + .../RuntimeDyld/RuntimeDyldELF.cpp | 1406 + .../RuntimeDyld/RuntimeDyldELF.h | 152 + .../RuntimeDyld/RuntimeDyldImpl.h | 368 + .../RuntimeDyld/RuntimeDyldMachO.cpp | 458 + .../RuntimeDyld/RuntimeDyldMachO.h | 103 + lib/ExecutionEngine/TargetSelect.cpp | 107 + lib/IR/AsmWriter.cpp | 2221 + lib/IR/AsmWriter.h | 118 + lib/IR/AttributeImpl.h | 270 + lib/IR/Attributes.cpp | 1180 + lib/IR/AutoUpgrade.cpp | 501 + lib/IR/BasicBlock.cpp | 371 + lib/IR/CMakeLists.txt | 52 + lib/IR/ConstantFold.cpp | 2137 + lib/IR/ConstantFold.h | 56 + lib/IR/Constants.cpp | 2825 + lib/IR/ConstantsContext.h | 774 + lib/IR/Core.cpp | 2628 + lib/IR/DIBuilder.cpp | 1264 + lib/IR/DataLayout.cpp | 705 + lib/IR/DebugInfo.cpp | 1488 + lib/IR/DebugLoc.cpp | 315 + lib/IR/Dominators.cpp | 302 + lib/IR/Function.cpp | 768 + lib/IR/GCOV.cpp | 314 + lib/IR/GVMaterializer.cpp | 18 + lib/IR/Globals.cpp | 269 + lib/IR/IRBuilder.cpp | 153 + lib/IR/InlineAsm.cpp | 295 + lib/IR/Instruction.cpp | 556 + lib/IR/Instructions.cpp | 3684 + lib/IR/IntrinsicInst.cpp | 73 + lib/IR/LLVMBuild.txt | 22 + lib/IR/LLVMContext.cpp | 168 + lib/IR/LLVMContextImpl.cpp | 156 + lib/IR/LLVMContextImpl.h | 372 + lib/IR/LeakDetector.cpp | 69 + lib/IR/LeaksContext.h | 92 + lib/IR/LegacyPassManager.cpp | 1920 + lib/IR/Makefile | 33 + lib/IR/Metadata.cpp | 711 + lib/IR/Module.cpp | 464 + lib/IR/Pass.cpp | 276 + lib/IR/PassManager.cpp | 157 + lib/IR/PassRegistry.cpp | 210 + lib/IR/PrintModulePass.cpp | 136 + lib/IR/SymbolTableListTraitsImpl.h | 118 + lib/IR/Type.cpp | 763 + lib/IR/TypeFinder.cpp | 159 + lib/IR/Use.cpp | 145 + lib/IR/User.cpp | 90 + lib/IR/Value.cpp | 739 + lib/IR/ValueSymbolTable.cpp | 117 + lib/IR/ValueTypes.cpp | 287 + lib/IR/Verifier.cpp | 2442 + lib/IRReader/CMakeLists.txt | 3 + lib/IRReader/IRReader.cpp | 121 + lib/IRReader/LLVMBuild.txt | 22 + lib/IRReader/Makefile | 14 + lib/LLVMBuild.txt | 24 + lib/LTO/CMakeLists.txt | 4 + lib/LTO/LLVMBuild.txt | 22 + lib/LTO/LTOCodeGenerator.cpp | 521 + lib/LTO/LTOModule.cpp | 794 + lib/LTO/Makefile | 15 + lib/Linker/CMakeLists.txt | 3 + lib/Linker/LLVMBuild.txt | 22 + lib/Linker/LinkModules.cpp | 1397 + lib/Linker/Makefile | 15 + lib/MC/CMakeLists.txt | 56 + lib/MC/ELFObjectWriter.cpp | 1618 + lib/MC/LLVMBuild.txt | 25 + lib/MC/MCAsmBackend.cpp | 43 + lib/MC/MCAsmInfo.cpp | 142 + lib/MC/MCAsmInfoCOFF.cpp | 52 + lib/MC/MCAsmInfoDarwin.cpp | 63 + lib/MC/MCAsmInfoELF.cpp | 23 + lib/MC/MCAsmStreamer.cpp | 1380 + lib/MC/MCAssembler.cpp | 1187 + lib/MC/MCAtom.cpp | 114 + lib/MC/MCCodeEmitter.cpp | 18 + lib/MC/MCCodeGenInfo.cpp | 23 + lib/MC/MCContext.cpp | 426 + lib/MC/MCDisassembler.cpp | 56 + lib/MC/MCDisassembler/CMakeLists.txt | 3 + lib/MC/MCDisassembler/Disassembler.cpp | 362 + lib/MC/MCDisassembler/Disassembler.h | 130 + lib/MC/MCDisassembler/LLVMBuild.txt | 22 + lib/MC/MCDisassembler/Makefile | 14 + lib/MC/MCDwarf.cpp | 1521 + lib/MC/MCELF.cpp | 85 + lib/MC/MCELFObjectTargetWriter.cpp | 61 + lib/MC/MCELFStreamer.cpp | 625 + lib/MC/MCExpr.cpp | 782 + lib/MC/MCExternalSymbolizer.cpp | 181 + lib/MC/MCFunction.cpp | 81 + lib/MC/MCInst.cpp | 72 + lib/MC/MCInstPrinter.cpp | 110 + lib/MC/MCInstrAnalysis.cpp | 22 + lib/MC/MCLabel.cpp | 23 + lib/MC/MCMachOStreamer.cpp | 440 + lib/MC/MCMachObjectTargetWriter.cpp | 22 + lib/MC/MCModule.cpp | 142 + lib/MC/MCModuleYAML.cpp | 461 + lib/MC/MCNullStreamer.cpp | 118 + lib/MC/MCObjectDisassembler.cpp | 584 + lib/MC/MCObjectFileInfo.cpp | 742 + lib/MC/MCObjectStreamer.cpp | 393 + lib/MC/MCObjectSymbolizer.cpp | 310 + lib/MC/MCObjectWriter.cpp | 56 + lib/MC/MCParser/AsmLexer.cpp | 568 + lib/MC/MCParser/AsmParser.cpp | 4319 + lib/MC/MCParser/CMakeLists.txt | 11 + lib/MC/MCParser/COFFAsmParser.cpp | 777 + lib/MC/MCParser/DarwinAsmParser.cpp | 867 + lib/MC/MCParser/ELFAsmParser.cpp | 682 + lib/MC/MCParser/LLVMBuild.txt | 22 + lib/MC/MCParser/MCAsmLexer.cpp | 32 + lib/MC/MCParser/MCAsmParser.cpp | 50 + lib/MC/MCParser/MCAsmParserExtension.cpp | 22 + lib/MC/MCParser/MCTargetAsmParser.cpp | 19 + lib/MC/MCParser/Makefile | 15 + lib/MC/MCPureStreamer.cpp | 235 + lib/MC/MCRegisterInfo.cpp | 86 + lib/MC/MCRelocationInfo.cpp | 39 + lib/MC/MCSection.cpp | 22 + lib/MC/MCSectionCOFF.cpp | 99 + lib/MC/MCSectionELF.cpp | 169 + lib/MC/MCSectionMachO.cpp | 304 + lib/MC/MCStreamer.cpp | 615 + lib/MC/MCSubtargetInfo.cpp | 121 + lib/MC/MCSymbol.cpp | 94 + lib/MC/MCSymbolizer.cpp | 20 + lib/MC/MCValue.cpp | 38 + lib/MC/MCWin64EH.cpp | 298 + lib/MC/MachObjectWriter.cpp | 958 + lib/MC/Makefile | 16 + lib/MC/SubtargetFeature.cpp | 370 + lib/MC/WinCOFFObjectWriter.cpp | 929 + lib/MC/WinCOFFStreamer.cpp | 341 + lib/Makefile | 17 + lib/Object/Archive.cpp | 450 + lib/Object/Binary.cpp | 118 + lib/Object/CMakeLists.txt | 15 + lib/Object/COFFObjectFile.cpp | 938 + lib/Object/COFFYAML.cpp | 281 + lib/Object/ELF.cpp | 714 + lib/Object/ELFObjectFile.cpp | 73 + lib/Object/ELFYAML.cpp | 338 + lib/Object/Error.cpp | 59 + lib/Object/LLVMBuild.txt | 22 + lib/Object/MachOObjectFile.cpp | 1605 + lib/Object/MachOUniversal.cpp | 139 + lib/Object/Makefile | 14 + lib/Object/Object.cpp | 254 + lib/Object/ObjectFile.cpp | 84 + lib/Object/YAML.cpp | 68 + lib/Option/Arg.cpp | 122 + lib/Option/ArgList.cpp | 400 + lib/Option/CMakeLists.txt | 6 + lib/Option/LLVMBuild.txt | 22 + lib/Option/Makefile | 14 + lib/Option/OptTable.cpp | 424 + lib/Option/Option.cpp | 231 + lib/Support/APFloat.cpp | 3886 + lib/Support/APInt.cpp | 2890 + lib/Support/APSInt.cpp | 23 + lib/Support/Allocator.cpp | 197 + lib/Support/Atomic.cpp | 116 + lib/Support/BlockFrequency.cpp | 172 + lib/Support/BranchProbability.cpp | 36 + lib/Support/CMakeLists.txt | 115 + lib/Support/COPYRIGHT.regex | 54 + lib/Support/CommandLine.cpp | 1784 + lib/Support/Compression.cpp | 104 + lib/Support/ConstantRange.cpp | 734 + lib/Support/ConvertUTF.c | 571 + lib/Support/ConvertUTFWrapper.cpp | 131 + lib/Support/CrashRecoveryContext.cpp | 356 + lib/Support/DAGDeltaAlgorithm.cpp | 360 + lib/Support/DataExtractor.cpp | 175 + lib/Support/DataStream.cpp | 91 + lib/Support/Debug.cpp | 134 + lib/Support/DeltaAlgorithm.cpp | 114 + lib/Support/Disassembler.cpp | 74 + lib/Support/Dwarf.cpp | 776 + lib/Support/DynamicLibrary.cpp | 180 + lib/Support/Errno.cpp | 74 + lib/Support/ErrorHandling.cpp | 121 + lib/Support/FileOutputBuffer.cpp | 104 + lib/Support/FileUtilities.cpp | 259 + lib/Support/FoldingSet.cpp | 424 + lib/Support/FormattedStream.cpp | 106 + lib/Support/GraphWriter.cpp | 226 + lib/Support/Hashing.cpp | 29 + lib/Support/Host.cpp | 733 + lib/Support/IncludeFile.cpp | 20 + lib/Support/IntEqClasses.cpp | 70 + lib/Support/IntervalMap.cpp | 161 + lib/Support/IntrusiveRefCntPtr.cpp | 14 + lib/Support/IsInf.cpp | 49 + lib/Support/IsNAN.cpp | 33 + lib/Support/LLVMBuild.txt | 21 + lib/Support/Locale.cpp | 31 + lib/Support/LockFileManager.cpp | 258 + lib/Support/MD5.cpp | 286 + lib/Support/Makefile | 19 + lib/Support/ManagedStatic.cpp | 81 + lib/Support/Memory.cpp | 25 + lib/Support/MemoryBuffer.cpp | 432 + lib/Support/MemoryObject.cpp | 33 + lib/Support/Mutex.cpp | 129 + lib/Support/Path.cpp | 1039 + lib/Support/PluginLoader.cpp | 47 + lib/Support/PrettyStackTrace.cpp | 151 + lib/Support/Process.cpp | 107 + lib/Support/Program.cpp | 67 + lib/Support/README.txt.system | 43 + lib/Support/RWMutex.cpp | 125 + lib/Support/Regex.cpp | 177 + .../SearchForAddressOfSpecialSymbol.cpp | 58 + lib/Support/Signals.cpp | 34 + lib/Support/SmallPtrSet.cpp | 278 + lib/Support/SmallVector.cpp | 40 + lib/Support/SourceMgr.cpp | 494 + lib/Support/Statistic.cpp | 170 + lib/Support/StreamableMemoryObject.cpp | 141 + lib/Support/StringExtras.cpp | 59 + lib/Support/StringMap.cpp | 238 + lib/Support/StringPool.cpp | 35 + lib/Support/StringRef.cpp | 486 + lib/Support/StringRefMemoryObject.cpp | 29 + lib/Support/SystemUtils.cpp | 33 + lib/Support/TargetRegistry.cpp | 163 + lib/Support/ThreadLocal.cpp | 92 + lib/Support/Threading.cpp | 147 + lib/Support/TimeValue.cpp | 62 + lib/Support/Timer.cpp | 389 + lib/Support/ToolOutputFile.cpp | 49 + lib/Support/Triple.cpp | 798 + lib/Support/Twine.cpp | 171 + lib/Support/Unicode.cpp | 367 + lib/Support/Unix/Host.inc | 63 + lib/Support/Unix/Memory.inc | 360 + lib/Support/Unix/Mutex.inc | 43 + lib/Support/Unix/Path.inc | 797 + lib/Support/Unix/Process.inc | 374 + lib/Support/Unix/Program.inc | 461 + lib/Support/Unix/README.txt | 16 + lib/Support/Unix/RWMutex.inc | 43 + lib/Support/Unix/Signals.inc | 390 + lib/Support/Unix/ThreadLocal.inc | 26 + lib/Support/Unix/TimeValue.inc | 52 + lib/Support/Unix/Unix.h | 79 + lib/Support/Unix/Watchdog.inc | 32 + lib/Support/Unix/system_error.inc | 34 + lib/Support/Valgrind.cpp | 67 + lib/Support/Watchdog.cpp | 23 + lib/Support/Windows/DynamicLibrary.inc | 170 + lib/Support/Windows/Host.inc | 22 + lib/Support/Windows/Memory.inc | 235 + lib/Support/Windows/Mutex.inc | 58 + lib/Support/Windows/Path.inc | 1122 + lib/Support/Windows/Process.inc | 360 + lib/Support/Windows/Program.inc | 462 + lib/Support/Windows/RWMutex.inc | 132 + lib/Support/Windows/Signals.inc | 480 + lib/Support/Windows/ThreadLocal.inc | 53 + lib/Support/Windows/TimeValue.inc | 59 + lib/Support/Windows/Watchdog.inc | 24 + lib/Support/Windows/Windows.h | 168 + lib/Support/Windows/explicit_symbols.inc | 66 + lib/Support/Windows/system_error.inc | 142 + lib/Support/YAMLParser.cpp | 2236 + lib/Support/YAMLTraits.cpp | 897 + lib/Support/circular_raw_ostream.cpp | 45 + lib/Support/raw_os_ostream.cpp | 30 + lib/Support/raw_ostream.cpp | 773 + lib/Support/regcclass.h | 70 + lib/Support/regcname.h | 139 + lib/Support/regcomp.c | 1553 + lib/Support/regengine.inc | 1034 + lib/Support/regerror.c | 135 + lib/Support/regex2.h | 157 + lib/Support/regex_impl.h | 108 + lib/Support/regexec.c | 162 + lib/Support/regfree.c | 72 + lib/Support/regstrlcpy.c | 52 + lib/Support/regutils.h | 53 + lib/Support/system_error.cpp | 130 + lib/TableGen/CMakeLists.txt | 9 + lib/TableGen/Error.cpp | 75 + lib/TableGen/LLVMBuild.txt | 22 + lib/TableGen/Main.cpp | 130 + lib/TableGen/Makefile | 14 + lib/TableGen/Record.cpp | 2066 + lib/TableGen/StringMatcher.cpp | 149 + lib/TableGen/TGLexer.cpp | 486 + lib/TableGen/TGLexer.h | 132 + lib/TableGen/TGParser.cpp | 2595 + lib/TableGen/TGParser.h | 191 + lib/TableGen/TableGenBackend.cpp | 56 + lib/Target/AArch64/AArch64.h | 42 + lib/Target/AArch64/AArch64.td | 73 + lib/Target/AArch64/AArch64AsmPrinter.cpp | 305 + lib/Target/AArch64/AArch64AsmPrinter.h | 76 + lib/Target/AArch64/AArch64BranchFixupPass.cpp | 600 + lib/Target/AArch64/AArch64CallingConv.td | 197 + lib/Target/AArch64/AArch64FrameLowering.cpp | 635 + lib/Target/AArch64/AArch64FrameLowering.h | 108 + lib/Target/AArch64/AArch64ISelDAGToDAG.cpp | 1586 + lib/Target/AArch64/AArch64ISelLowering.cpp | 4595 + lib/Target/AArch64/AArch64ISelLowering.h | 367 + lib/Target/AArch64/AArch64InstrFormats.td | 1489 + lib/Target/AArch64/AArch64InstrInfo.cpp | 839 + lib/Target/AArch64/AArch64InstrInfo.h | 108 + lib/Target/AArch64/AArch64InstrInfo.td | 5194 + lib/Target/AArch64/AArch64InstrNEON.td | 8671 ++ lib/Target/AArch64/AArch64MCInstLower.cpp | 157 + .../AArch64/AArch64MachineFunctionInfo.cpp | 18 + .../AArch64/AArch64MachineFunctionInfo.h | 149 + lib/Target/AArch64/AArch64RegisterInfo.cpp | 172 + lib/Target/AArch64/AArch64RegisterInfo.h | 71 + lib/Target/AArch64/AArch64RegisterInfo.td | 291 + lib/Target/AArch64/AArch64Schedule.td | 10 + .../AArch64/AArch64SelectionDAGInfo.cpp | 25 + lib/Target/AArch64/AArch64SelectionDAGInfo.h | 32 + lib/Target/AArch64/AArch64Subtarget.cpp | 61 + lib/Target/AArch64/AArch64Subtarget.h | 72 + lib/Target/AArch64/AArch64TargetMachine.cpp | 82 + lib/Target/AArch64/AArch64TargetMachine.h | 69 + .../AArch64/AArch64TargetObjectFile.cpp | 31 + lib/Target/AArch64/AArch64TargetObjectFile.h | 35 + .../AArch64/AsmParser/AArch64AsmParser.cpp | 2596 + lib/Target/AArch64/AsmParser/CMakeLists.txt | 7 + lib/Target/AArch64/AsmParser/LLVMBuild.txt | 24 + lib/Target/AArch64/AsmParser/Makefile | 15 + lib/Target/AArch64/CMakeLists.txt | 38 + .../Disassembler/AArch64Disassembler.cpp | 1572 + .../AArch64/Disassembler/CMakeLists.txt | 7 + lib/Target/AArch64/Disassembler/LLVMBuild.txt | 24 + lib/Target/AArch64/Disassembler/Makefile | 16 + .../InstPrinter/AArch64InstPrinter.cpp | 539 + .../AArch64/InstPrinter/AArch64InstPrinter.h | 182 + lib/Target/AArch64/InstPrinter/CMakeLists.txt | 8 + lib/Target/AArch64/InstPrinter/LLVMBuild.txt | 24 + lib/Target/AArch64/InstPrinter/Makefile | 15 + lib/Target/AArch64/LLVMBuild.txt | 36 + .../MCTargetDesc/AArch64AsmBackend.cpp | 585 + .../MCTargetDesc/AArch64ELFObjectWriter.cpp | 292 + .../MCTargetDesc/AArch64ELFStreamer.cpp | 159 + .../AArch64/MCTargetDesc/AArch64ELFStreamer.h | 27 + .../AArch64/MCTargetDesc/AArch64FixupKinds.h | 113 + .../AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp | 42 + .../AArch64/MCTargetDesc/AArch64MCAsmInfo.h | 29 + .../MCTargetDesc/AArch64MCCodeEmitter.cpp | 566 + .../AArch64/MCTargetDesc/AArch64MCExpr.cpp | 178 + .../AArch64/MCTargetDesc/AArch64MCExpr.h | 187 + .../MCTargetDesc/AArch64MCTargetDesc.cpp | 201 + .../MCTargetDesc/AArch64MCTargetDesc.h | 66 + .../AArch64/MCTargetDesc/CMakeLists.txt | 13 + lib/Target/AArch64/MCTargetDesc/LLVMBuild.txt | 24 + lib/Target/AArch64/MCTargetDesc/Makefile | 16 + lib/Target/AArch64/Makefile | 30 + lib/Target/AArch64/README.txt | 2 + .../AArch64/TargetInfo/AArch64TargetInfo.cpp | 24 + lib/Target/AArch64/TargetInfo/CMakeLists.txt | 7 + lib/Target/AArch64/TargetInfo/LLVMBuild.txt | 24 + lib/Target/AArch64/TargetInfo/Makefile | 15 + lib/Target/AArch64/Utils/AArch64BaseInfo.cpp | 1173 + lib/Target/AArch64/Utils/AArch64BaseInfo.h | 1138 + lib/Target/AArch64/Utils/CMakeLists.txt | 7 + lib/Target/AArch64/Utils/LLVMBuild.txt | 23 + lib/Target/AArch64/Utils/Makefile | 15 + lib/Target/ARM/A15SDOptimizer.cpp | 717 + lib/Target/ARM/ARM.h | 56 + lib/Target/ARM/ARM.td | 386 + lib/Target/ARM/ARMAsmPrinter.cpp | 1792 + lib/Target/ARM/ARMAsmPrinter.h | 128 + lib/Target/ARM/ARMBaseInstrInfo.cpp | 4352 + lib/Target/ARM/ARMBaseInstrInfo.h | 437 + lib/Target/ARM/ARMBaseRegisterInfo.cpp | 767 + lib/Target/ARM/ARMBaseRegisterInfo.h | 190 + lib/Target/ARM/ARMBuildAttrs.h | 170 + lib/Target/ARM/ARMCallingConv.h | 165 + lib/Target/ARM/ARMCallingConv.td | 230 + lib/Target/ARM/ARMCodeEmitter.cpp | 1918 + lib/Target/ARM/ARMConstantIslandPass.cpp | 2062 + lib/Target/ARM/ARMConstantPoolValue.cpp | 262 + lib/Target/ARM/ARMConstantPoolValue.h | 259 + lib/Target/ARM/ARMExpandPseudoInsts.cpp | 1284 + lib/Target/ARM/ARMFPUName.def | 32 + lib/Target/ARM/ARMFPUName.h | 26 + lib/Target/ARM/ARMFastISel.cpp | 3158 + lib/Target/ARM/ARMFeatures.h | 93 + lib/Target/ARM/ARMFrameLowering.cpp | 1446 + lib/Target/ARM/ARMFrameLowering.h | 82 + lib/Target/ARM/ARMHazardRecognizer.cpp | 104 + lib/Target/ARM/ARMHazardRecognizer.h | 49 + lib/Target/ARM/ARMISelDAGToDAG.cpp | 3584 + lib/Target/ARM/ARMISelLowering.cpp | 11245 ++ lib/Target/ARM/ARMISelLowering.h | 600 + lib/Target/ARM/ARMInstrFormats.td | 2354 + lib/Target/ARM/ARMInstrInfo.cpp | 162 + lib/Target/ARM/ARMInstrInfo.h | 46 + lib/Target/ARM/ARMInstrInfo.td | 5559 + lib/Target/ARM/ARMInstrNEON.td | 7110 ++ lib/Target/ARM/ARMInstrThumb.td | 1450 + lib/Target/ARM/ARMInstrThumb2.td | 4616 + lib/Target/ARM/ARMInstrVFP.td | 1737 + lib/Target/ARM/ARMJITInfo.cpp | 336 + lib/Target/ARM/ARMJITInfo.h | 183 + lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 2004 + lib/Target/ARM/ARMMCInstLower.cpp | 125 + lib/Target/ARM/ARMMachineFunctionInfo.cpp | 14 + lib/Target/ARM/ARMMachineFunctionInfo.h | 229 + lib/Target/ARM/ARMPerfectShuffle.h | 6586 ++ lib/Target/ARM/ARMRegisterInfo.cpp | 23 + lib/Target/ARM/ARMRegisterInfo.h | 33 + lib/Target/ARM/ARMRegisterInfo.td | 419 + lib/Target/ARM/ARMRelocations.h | 62 + lib/Target/ARM/ARMSchedule.td | 354 + lib/Target/ARM/ARMScheduleA8.td | 1075 + lib/Target/ARM/ARMScheduleA9.td | 2518 + lib/Target/ARM/ARMScheduleSwift.td | 2076 + lib/Target/ARM/ARMScheduleV6.td | 300 + lib/Target/ARM/ARMSelectionDAGInfo.cpp | 200 + lib/Target/ARM/ARMSelectionDAGInfo.h | 68 + lib/Target/ARM/ARMSubtarget.cpp | 324 + lib/Target/ARM/ARMSubtarget.h | 364 + lib/Target/ARM/ARMTargetMachine.cpp | 232 + lib/Target/ARM/ARMTargetMachine.h | 146 + lib/Target/ARM/ARMTargetObjectFile.cpp | 53 + lib/Target/ARM/ARMTargetObjectFile.h | 43 + lib/Target/ARM/ARMTargetTransformInfo.cpp | 557 + lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 8305 ++ lib/Target/ARM/AsmParser/CMakeLists.txt | 7 + lib/Target/ARM/AsmParser/LLVMBuild.txt | 23 + lib/Target/ARM/AsmParser/Makefile | 15 + lib/Target/ARM/CMakeLists.txt | 66 + .../ARM/Disassembler/ARMDisassembler.cpp | 4988 + lib/Target/ARM/Disassembler/CMakeLists.txt | 13 + lib/Target/ARM/Disassembler/LLVMBuild.txt | 23 + lib/Target/ARM/Disassembler/Makefile | 16 + lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp | 1487 + lib/Target/ARM/InstPrinter/ARMInstPrinter.h | 170 + lib/Target/ARM/InstPrinter/CMakeLists.txt | 7 + lib/Target/ARM/InstPrinter/LLVMBuild.txt | 23 + lib/Target/ARM/InstPrinter/Makefile | 15 + lib/Target/ARM/LICENSE.TXT | 47 + lib/Target/ARM/LLVMBuild.txt | 35 + .../ARM/MCTargetDesc/ARMAddressingModes.h | 668 + lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp | 693 + lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h | 464 + .../ARM/MCTargetDesc/ARMELFObjectWriter.cpp | 289 + .../ARM/MCTargetDesc/ARMELFStreamer.cpp | 954 + lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h | 119 + lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp | 58 + lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h | 36 + .../ARM/MCTargetDesc/ARMMCCodeEmitter.cpp | 1551 + lib/Target/ARM/MCTargetDesc/ARMMCExpr.cpp | 72 + lib/Target/ARM/MCTargetDesc/ARMMCExpr.h | 76 + .../ARM/MCTargetDesc/ARMMCTargetDesc.cpp | 371 + lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h | 91 + .../MCTargetDesc/ARMMachORelocationInfo.cpp | 43 + .../ARM/MCTargetDesc/ARMMachObjectWriter.cpp | 496 + lib/Target/ARM/MCTargetDesc/ARMUnwindOp.h | 125 + .../ARM/MCTargetDesc/ARMUnwindOpAsm.cpp | 221 + lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.h | 89 + lib/Target/ARM/MCTargetDesc/CMakeLists.txt | 17 + lib/Target/ARM/MCTargetDesc/LLVMBuild.txt | 23 + lib/Target/ARM/MCTargetDesc/Makefile | 16 + lib/Target/ARM/MLxExpansionPass.cpp | 399 + lib/Target/ARM/Makefile | 24 + lib/Target/ARM/README-Thumb.txt | 265 + lib/Target/ARM/README-Thumb2.txt | 6 + lib/Target/ARM/README.txt | 733 + lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp | 23 + lib/Target/ARM/TargetInfo/CMakeLists.txt | 7 + lib/Target/ARM/TargetInfo/LLVMBuild.txt | 23 + lib/Target/ARM/TargetInfo/Makefile | 15 + lib/Target/ARM/Thumb1FrameLowering.cpp | 405 + lib/Target/ARM/Thumb1FrameLowering.h | 56 + lib/Target/ARM/Thumb1InstrInfo.cpp | 104 + lib/Target/ARM/Thumb1InstrInfo.h | 61 + lib/Target/ARM/Thumb1RegisterInfo.cpp | 681 + lib/Target/ARM/Thumb1RegisterInfo.h | 65 + lib/Target/ARM/Thumb2ITBlockPass.cpp | 281 + lib/Target/ARM/Thumb2InstrInfo.cpp | 631 + lib/Target/ARM/Thumb2InstrInfo.h | 75 + lib/Target/ARM/Thumb2RegisterInfo.cpp | 52 + lib/Target/ARM/Thumb2RegisterInfo.h | 42 + lib/Target/ARM/Thumb2SizeReduction.cpp | 1035 + lib/Target/CMakeLists.txt | 16 + lib/Target/CppBackend/CMakeLists.txt | 5 + lib/Target/CppBackend/CPPBackend.cpp | 2127 + lib/Target/CppBackend/CPPTargetMachine.h | 46 + lib/Target/CppBackend/LLVMBuild.txt | 31 + lib/Target/CppBackend/Makefile | 16 + .../CppBackend/TargetInfo/CMakeLists.txt | 5 + .../TargetInfo/CppBackendTargetInfo.cpp | 28 + .../CppBackend/TargetInfo/LLVMBuild.txt | 23 + lib/Target/CppBackend/TargetInfo/Makefile | 15 + lib/Target/Hexagon/CMakeLists.txt | 45 + lib/Target/Hexagon/Hexagon.h | 82 + lib/Target/Hexagon/Hexagon.td | 225 + lib/Target/Hexagon/HexagonAsmPrinter.cpp | 314 + lib/Target/Hexagon/HexagonAsmPrinter.h | 165 + lib/Target/Hexagon/HexagonCFGOptimizer.cpp | 252 + lib/Target/Hexagon/HexagonCallingConv.td | 35 + .../Hexagon/HexagonCallingConvLower.cpp | 204 + lib/Target/Hexagon/HexagonCallingConvLower.h | 188 + lib/Target/Hexagon/HexagonCopyToCombine.cpp | 677 + .../Hexagon/HexagonExpandPredSpillCode.cpp | 201 + lib/Target/Hexagon/HexagonFixupHwLoops.cpp | 183 + lib/Target/Hexagon/HexagonFrameLowering.cpp | 346 + lib/Target/Hexagon/HexagonFrameLowering.h | 55 + lib/Target/Hexagon/HexagonHardwareLoops.cpp | 1548 + lib/Target/Hexagon/HexagonISelDAGToDAG.cpp | 1684 + lib/Target/Hexagon/HexagonISelLowering.cpp | 1725 + lib/Target/Hexagon/HexagonISelLowering.h | 179 + lib/Target/Hexagon/HexagonInstrFormats.td | 382 + lib/Target/Hexagon/HexagonInstrFormatsV4.td | 66 + lib/Target/Hexagon/HexagonInstrInfo.cpp | 1856 + lib/Target/Hexagon/HexagonInstrInfo.h | 223 + lib/Target/Hexagon/HexagonInstrInfo.td | 2851 + lib/Target/Hexagon/HexagonInstrInfoV3.td | 107 + lib/Target/Hexagon/HexagonInstrInfoV4.td | 3392 + lib/Target/Hexagon/HexagonInstrInfoV5.td | 633 + lib/Target/Hexagon/HexagonIntrinsics.td | 3503 + .../Hexagon/HexagonIntrinsicsDerived.td | 39 + lib/Target/Hexagon/HexagonIntrinsicsV3.td | 50 + lib/Target/Hexagon/HexagonIntrinsicsV4.td | 369 + lib/Target/Hexagon/HexagonIntrinsicsV5.td | 395 + lib/Target/Hexagon/HexagonMCInstLower.cpp | 95 + .../Hexagon/HexagonMachineFunctionInfo.cpp | 16 + .../Hexagon/HexagonMachineFunctionInfo.h | 80 + .../Hexagon/HexagonMachineScheduler.cpp | 691 + lib/Target/Hexagon/HexagonMachineScheduler.h | 243 + lib/Target/Hexagon/HexagonNewValueJump.cpp | 657 + lib/Target/Hexagon/HexagonOperands.td | 858 + lib/Target/Hexagon/HexagonPeephole.cpp | 346 + lib/Target/Hexagon/HexagonRegisterInfo.cpp | 299 + lib/Target/Hexagon/HexagonRegisterInfo.h | 85 + lib/Target/Hexagon/HexagonRegisterInfo.td | 167 + lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp | 89 + lib/Target/Hexagon/HexagonSchedule.td | 69 + lib/Target/Hexagon/HexagonScheduleV4.td | 74 + lib/Target/Hexagon/HexagonSelectCCInfo.td | 121 + .../Hexagon/HexagonSelectionDAGInfo.cpp | 46 + lib/Target/Hexagon/HexagonSelectionDAGInfo.h | 40 + .../Hexagon/HexagonSplitConst32AndConst64.cpp | 174 + .../Hexagon/HexagonSplitTFRCondSets.cpp | 235 + lib/Target/Hexagon/HexagonSubtarget.cpp | 90 + lib/Target/Hexagon/HexagonSubtarget.h | 80 + lib/Target/Hexagon/HexagonTargetMachine.cpp | 204 + lib/Target/Hexagon/HexagonTargetMachine.h | 83 + .../Hexagon/HexagonTargetObjectFile.cpp | 100 + lib/Target/Hexagon/HexagonTargetObjectFile.h | 41 + lib/Target/Hexagon/HexagonVLIWPacketizer.cpp | 1427 + .../Hexagon/HexagonVarargsCallingConvention.h | 141 + lib/Target/Hexagon/InstPrinter/CMakeLists.txt | 5 + .../InstPrinter/HexagonInstPrinter.cpp | 203 + .../Hexagon/InstPrinter/HexagonInstPrinter.h | 87 + lib/Target/Hexagon/InstPrinter/LLVMBuild.txt | 23 + lib/Target/Hexagon/InstPrinter/Makefile | 15 + lib/Target/Hexagon/LLVMBuild.txt | 32 + .../Hexagon/MCTargetDesc/CMakeLists.txt | 7 + .../Hexagon/MCTargetDesc/HexagonBaseInfo.h | 184 + .../Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp | 39 + .../Hexagon/MCTargetDesc/HexagonMCAsmInfo.h | 29 + .../Hexagon/MCTargetDesc/HexagonMCInst.cpp | 175 + .../Hexagon/MCTargetDesc/HexagonMCInst.h | 100 + .../MCTargetDesc/HexagonMCTargetDesc.cpp | 98 + .../MCTargetDesc/HexagonMCTargetDesc.h | 39 + lib/Target/Hexagon/MCTargetDesc/LLVMBuild.txt | 23 + lib/Target/Hexagon/MCTargetDesc/Makefile | 16 + lib/Target/Hexagon/Makefile | 23 + lib/Target/Hexagon/TargetInfo/CMakeLists.txt | 8 + .../Hexagon/TargetInfo/HexagonTargetInfo.cpp | 19 + lib/Target/Hexagon/TargetInfo/LLVMBuild.txt | 23 + lib/Target/Hexagon/TargetInfo/Makefile | 15 + lib/Target/LLVMBuild.txt | 56 + lib/Target/MSP430/CMakeLists.txt | 30 + lib/Target/MSP430/InstPrinter/CMakeLists.txt | 7 + lib/Target/MSP430/InstPrinter/LLVMBuild.txt | 23 + .../MSP430/InstPrinter/MSP430InstPrinter.cpp | 114 + .../MSP430/InstPrinter/MSP430InstPrinter.h | 44 + lib/Target/MSP430/InstPrinter/Makefile | 15 + lib/Target/MSP430/LLVMBuild.txt | 32 + lib/Target/MSP430/MCTargetDesc/CMakeLists.txt | 6 + lib/Target/MSP430/MCTargetDesc/LLVMBuild.txt | 23 + .../MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp | 28 + .../MSP430/MCTargetDesc/MSP430MCAsmInfo.h | 30 + .../MCTargetDesc/MSP430MCTargetDesc.cpp | 94 + .../MSP430/MCTargetDesc/MSP430MCTargetDesc.h | 36 + lib/Target/MSP430/MCTargetDesc/Makefile | 16 + lib/Target/MSP430/MSP430.h | 47 + lib/Target/MSP430/MSP430.td | 66 + lib/Target/MSP430/MSP430AsmPrinter.cpp | 167 + lib/Target/MSP430/MSP430BranchSelector.cpp | 180 + lib/Target/MSP430/MSP430CallingConv.td | 37 + lib/Target/MSP430/MSP430FrameLowering.cpp | 297 + lib/Target/MSP430/MSP430FrameLowering.h | 59 + lib/Target/MSP430/MSP430ISelDAGToDAG.cpp | 494 + lib/Target/MSP430/MSP430ISelLowering.cpp | 1374 + lib/Target/MSP430/MSP430ISelLowering.h | 179 + lib/Target/MSP430/MSP430InstrFormats.td | 211 + lib/Target/MSP430/MSP430InstrInfo.cpp | 329 + lib/Target/MSP430/MSP430InstrInfo.h | 92 + lib/Target/MSP430/MSP430InstrInfo.td | 1211 + lib/Target/MSP430/MSP430MCInstLower.cpp | 153 + lib/Target/MSP430/MSP430MCInstLower.h | 47 + .../MSP430/MSP430MachineFunctionInfo.cpp | 14 + lib/Target/MSP430/MSP430MachineFunctionInfo.h | 54 + lib/Target/MSP430/MSP430RegisterInfo.cpp | 162 + lib/Target/MSP430/MSP430RegisterInfo.h | 54 + lib/Target/MSP430/MSP430RegisterInfo.td | 81 + lib/Target/MSP430/MSP430SelectionDAGInfo.cpp | 23 + lib/Target/MSP430/MSP430SelectionDAGInfo.h | 31 + lib/Target/MSP430/MSP430Subtarget.cpp | 34 + lib/Target/MSP430/MSP430Subtarget.h | 42 + lib/Target/MSP430/MSP430TargetMachine.cpp | 73 + lib/Target/MSP430/MSP430TargetMachine.h | 69 + lib/Target/MSP430/Makefile | 23 + lib/Target/MSP430/README.txt | 40 + lib/Target/MSP430/TargetInfo/CMakeLists.txt | 7 + lib/Target/MSP430/TargetInfo/LLVMBuild.txt | 23 + .../MSP430/TargetInfo/MSP430TargetInfo.cpp | 20 + lib/Target/MSP430/TargetInfo/Makefile | 15 + lib/Target/Makefile | 20 + lib/Target/Mangler.cpp | 143 + lib/Target/Mips/AsmParser/CMakeLists.txt | 6 + lib/Target/Mips/AsmParser/LLVMBuild.txt | 23 + lib/Target/Mips/AsmParser/Makefile | 15 + lib/Target/Mips/AsmParser/MipsAsmParser.cpp | 2509 + lib/Target/Mips/CMakeLists.txt | 57 + lib/Target/Mips/Disassembler/CMakeLists.txt | 15 + lib/Target/Mips/Disassembler/LLVMBuild.txt | 23 + lib/Target/Mips/Disassembler/Makefile | 16 + .../Mips/Disassembler/MipsDisassembler.cpp | 822 + lib/Target/Mips/InstPrinter/CMakeLists.txt | 7 + lib/Target/Mips/InstPrinter/LLVMBuild.txt | 23 + lib/Target/Mips/InstPrinter/Makefile | 16 + .../Mips/InstPrinter/MipsInstPrinter.cpp | 288 + lib/Target/Mips/InstPrinter/MipsInstPrinter.h | 110 + lib/Target/Mips/LLVMBuild.txt | 35 + lib/Target/Mips/MCTargetDesc/CMakeLists.txt | 11 + lib/Target/Mips/MCTargetDesc/LLVMBuild.txt | 23 + lib/Target/Mips/MCTargetDesc/Makefile | 17 + .../Mips/MCTargetDesc/MipsAsmBackend.cpp | 312 + lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h | 153 + .../Mips/MCTargetDesc/MipsELFObjectWriter.cpp | 324 + lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h | 178 + .../Mips/MCTargetDesc/MipsMCAsmInfo.cpp | 46 + lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.h | 30 + .../Mips/MCTargetDesc/MipsMCCodeEmitter.cpp | 537 + .../Mips/MCTargetDesc/MipsMCTargetDesc.cpp | 234 + .../Mips/MCTargetDesc/MipsMCTargetDesc.h | 72 + lib/Target/Mips/MCTargetDesc/MipsReginfo.cpp | 80 + lib/Target/Mips/MCTargetDesc/MipsReginfo.h | 31 + .../Mips/MCTargetDesc/MipsTargetStreamer.cpp | 67 + lib/Target/Mips/MSA.txt | 78 + lib/Target/Mips/Makefile | 25 + lib/Target/Mips/MicroMipsInstrFormats.td | 304 + lib/Target/Mips/MicroMipsInstrInfo.td | 219 + lib/Target/Mips/Mips.h | 33 + lib/Target/Mips/Mips.td | 121 + lib/Target/Mips/Mips16FrameLowering.cpp | 180 + lib/Target/Mips/Mips16FrameLowering.h | 52 + lib/Target/Mips/Mips16HardFloat.cpp | 517 + lib/Target/Mips/Mips16HardFloat.h | 54 + lib/Target/Mips/Mips16ISelDAGToDAG.cpp | 316 + lib/Target/Mips/Mips16ISelDAGToDAG.h | 53 + lib/Target/Mips/Mips16ISelLowering.cpp | 775 + lib/Target/Mips/Mips16ISelLowering.h | 78 + lib/Target/Mips/Mips16InstrFormats.td | 640 + lib/Target/Mips/Mips16InstrInfo.cpp | 548 + lib/Target/Mips/Mips16InstrInfo.h | 133 + lib/Target/Mips/Mips16InstrInfo.td | 1909 + lib/Target/Mips/Mips16RegisterInfo.cpp | 153 + lib/Target/Mips/Mips16RegisterInfo.h | 48 + lib/Target/Mips/Mips64InstrInfo.td | 330 + lib/Target/Mips/MipsAnalyzeImmediate.cpp | 153 + lib/Target/Mips/MipsAnalyzeImmediate.h | 63 + lib/Target/Mips/MipsAsmPrinter.cpp | 708 + lib/Target/Mips/MipsAsmPrinter.h | 111 + lib/Target/Mips/MipsCallingConv.td | 249 + lib/Target/Mips/MipsCodeEmitter.cpp | 399 + lib/Target/Mips/MipsCondMov.td | 245 + lib/Target/Mips/MipsConstantIslandPass.cpp | 1533 + lib/Target/Mips/MipsDSPInstrFormats.td | 337 + lib/Target/Mips/MipsDSPInstrInfo.td | 1417 + lib/Target/Mips/MipsDelaySlotFiller.cpp | 719 + lib/Target/Mips/MipsFrameLowering.cpp | 134 + lib/Target/Mips/MipsFrameLowering.h | 47 + lib/Target/Mips/MipsISelDAGToDAG.cpp | 232 + lib/Target/Mips/MipsISelDAGToDAG.h | 131 + lib/Target/Mips/MipsISelLowering.cpp | 3614 + lib/Target/Mips/MipsISelLowering.h | 605 + lib/Target/Mips/MipsInstrFPU.td | 605 + lib/Target/Mips/MipsInstrFormats.td | 754 + lib/Target/Mips/MipsInstrInfo.cpp | 295 + lib/Target/Mips/MipsInstrInfo.h | 144 + lib/Target/Mips/MipsInstrInfo.td | 1421 + lib/Target/Mips/MipsJITInfo.cpp | 285 + lib/Target/Mips/MipsJITInfo.h | 71 + lib/Target/Mips/MipsLongBranch.cpp | 472 + lib/Target/Mips/MipsMCInstLower.cpp | 165 + lib/Target/Mips/MipsMCInstLower.h | 42 + lib/Target/Mips/MipsMSAInstrFormats.td | 406 + lib/Target/Mips/MipsMSAInstrInfo.td | 3694 + lib/Target/Mips/MipsMachineFunction.cpp | 141 + lib/Target/Mips/MipsMachineFunction.h | 136 + lib/Target/Mips/MipsModuleISelDAGToDAG.cpp | 34 + lib/Target/Mips/MipsModuleISelDAGToDAG.h | 66 + lib/Target/Mips/MipsOs16.cpp | 146 + lib/Target/Mips/MipsOs16.h | 49 + lib/Target/Mips/MipsRegisterInfo.cpp | 242 + lib/Target/Mips/MipsRegisterInfo.h | 82 + lib/Target/Mips/MipsRegisterInfo.td | 549 + lib/Target/Mips/MipsRelocations.h | 41 + lib/Target/Mips/MipsSEFrameLowering.cpp | 549 + lib/Target/Mips/MipsSEFrameLowering.h | 49 + lib/Target/Mips/MipsSEISelDAGToDAG.cpp | 849 + lib/Target/Mips/MipsSEISelDAGToDAG.h | 107 + lib/Target/Mips/MipsSEISelLowering.cpp | 2975 + lib/Target/Mips/MipsSEISelLowering.h | 114 + lib/Target/Mips/MipsSEInstrInfo.cpp | 571 + lib/Target/Mips/MipsSEInstrInfo.h | 120 + lib/Target/Mips/MipsSERegisterInfo.cpp | 179 + lib/Target/Mips/MipsSERegisterInfo.h | 41 + lib/Target/Mips/MipsSchedule.td | 76 + lib/Target/Mips/MipsSelectionDAGInfo.cpp | 23 + lib/Target/Mips/MipsSelectionDAGInfo.h | 31 + lib/Target/Mips/MipsSubtarget.cpp | 176 + lib/Target/Mips/MipsSubtarget.h | 235 + lib/Target/Mips/MipsTargetMachine.cpp | 220 + lib/Target/Mips/MipsTargetMachine.h | 125 + lib/Target/Mips/MipsTargetObjectFile.cpp | 118 + lib/Target/Mips/MipsTargetObjectFile.h | 43 + lib/Target/Mips/MipsTargetStreamer.h | 44 + lib/Target/Mips/TargetInfo/CMakeLists.txt | 7 + lib/Target/Mips/TargetInfo/LLVMBuild.txt | 23 + lib/Target/Mips/TargetInfo/Makefile | 15 + lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp | 31 + lib/Target/NVPTX/CMakeLists.txt | 37 + lib/Target/NVPTX/InstPrinter/CMakeLists.txt | 7 + lib/Target/NVPTX/InstPrinter/LLVMBuild.txt | 23 + lib/Target/NVPTX/InstPrinter/Makefile | 15 + .../NVPTX/InstPrinter/NVPTXInstPrinter.cpp | 289 + .../NVPTX/InstPrinter/NVPTXInstPrinter.h | 53 + lib/Target/NVPTX/LLVMBuild.txt | 32 + lib/Target/NVPTX/MCTargetDesc/CMakeLists.txt | 9 + lib/Target/NVPTX/MCTargetDesc/LLVMBuild.txt | 23 + lib/Target/NVPTX/MCTargetDesc/Makefile | 16 + lib/Target/NVPTX/MCTargetDesc/NVPTXBaseInfo.h | 85 + .../NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp | 59 + .../NVPTX/MCTargetDesc/NVPTXMCAsmInfo.h | 30 + .../NVPTX/MCTargetDesc/NVPTXMCTargetDesc.cpp | 105 + .../NVPTX/MCTargetDesc/NVPTXMCTargetDesc.h | 36 + lib/Target/NVPTX/Makefile | 23 + lib/Target/NVPTX/ManagedStringPool.h | 48 + lib/Target/NVPTX/NVPTX.h | 190 + lib/Target/NVPTX/NVPTX.td | 68 + lib/Target/NVPTX/NVPTXAllocaHoisting.cpp | 46 + lib/Target/NVPTX/NVPTXAllocaHoisting.h | 49 + lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 2179 + lib/Target/NVPTX/NVPTXAsmPrinter.h | 305 + lib/Target/NVPTX/NVPTXFrameLowering.cpp | 73 + lib/Target/NVPTX/NVPTXFrameLowering.h | 42 + lib/Target/NVPTX/NVPTXGenericToNVVM.cpp | 436 + lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp | 2463 + lib/Target/NVPTX/NVPTXISelDAGToDAG.h | 97 + lib/Target/NVPTX/NVPTXISelLowering.cpp | 2316 + lib/Target/NVPTX/NVPTXISelLowering.h | 171 + lib/Target/NVPTX/NVPTXInstrFormats.td | 43 + lib/Target/NVPTX/NVPTXInstrInfo.cpp | 272 + lib/Target/NVPTX/NVPTXInstrInfo.h | 79 + lib/Target/NVPTX/NVPTXInstrInfo.td | 2634 + lib/Target/NVPTX/NVPTXIntrinsics.td | 1782 + lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp | 205 + lib/Target/NVPTX/NVPTXLowerAggrCopies.h | 47 + lib/Target/NVPTX/NVPTXMCExpr.cpp | 46 + lib/Target/NVPTX/NVPTXMCExpr.h | 83 + lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp | 225 + lib/Target/NVPTX/NVPTXRegisterInfo.cpp | 124 + lib/Target/NVPTX/NVPTXRegisterInfo.h | 79 + lib/Target/NVPTX/NVPTXRegisterInfo.td | 64 + lib/Target/NVPTX/NVPTXSection.h | 48 + lib/Target/NVPTX/NVPTXSplitBBatBar.cpp | 73 + lib/Target/NVPTX/NVPTXSplitBBatBar.h | 41 + lib/Target/NVPTX/NVPTXSubtarget.cpp | 59 + lib/Target/NVPTX/NVPTXSubtarget.h | 96 + lib/Target/NVPTX/NVPTXTargetMachine.cpp | 181 + lib/Target/NVPTX/NVPTXTargetMachine.h | 118 + lib/Target/NVPTX/NVPTXTargetObjectFile.h | 104 + lib/Target/NVPTX/NVPTXUtilities.cpp | 504 + lib/Target/NVPTX/NVPTXUtilities.h | 92 + lib/Target/NVPTX/NVPTXVector.td | 1481 + lib/Target/NVPTX/NVPTXutil.cpp | 90 + lib/Target/NVPTX/NVPTXutil.h | 25 + lib/Target/NVPTX/NVVMReflect.cpp | 195 + lib/Target/NVPTX/TargetInfo/CMakeLists.txt | 7 + lib/Target/NVPTX/TargetInfo/LLVMBuild.txt | 23 + lib/Target/NVPTX/TargetInfo/Makefile | 15 + .../NVPTX/TargetInfo/NVPTXTargetInfo.cpp | 23 + lib/Target/NVPTX/cl_common_defines.h | 122 + lib/Target/PowerPC/AsmParser/CMakeLists.txt | 8 + lib/Target/PowerPC/AsmParser/LLVMBuild.txt | 23 + lib/Target/PowerPC/AsmParser/Makefile | 15 + lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp | 1397 + lib/Target/PowerPC/CMakeLists.txt | 42 + lib/Target/PowerPC/InstPrinter/CMakeLists.txt | 7 + lib/Target/PowerPC/InstPrinter/LLVMBuild.txt | 23 + lib/Target/PowerPC/InstPrinter/Makefile | 16 + .../PowerPC/InstPrinter/PPCInstPrinter.cpp | 341 + .../PowerPC/InstPrinter/PPCInstPrinter.h | 63 + lib/Target/PowerPC/LLVMBuild.txt | 33 + .../PowerPC/MCTargetDesc/CMakeLists.txt | 12 + lib/Target/PowerPC/MCTargetDesc/LLVMBuild.txt | 23 + lib/Target/PowerPC/MCTargetDesc/Makefile | 16 + .../PowerPC/MCTargetDesc/PPCAsmBackend.cpp | 206 + .../MCTargetDesc/PPCELFObjectWriter.cpp | 419 + .../PowerPC/MCTargetDesc/PPCFixupKinds.h | 56 + .../PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp | 95 + .../PowerPC/MCTargetDesc/PPCMCAsmInfo.h | 40 + .../PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp | 263 + lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp | 155 + lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.h | 96 + .../PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp | 226 + .../PowerPC/MCTargetDesc/PPCMCTargetDesc.h | 74 + .../MCTargetDesc/PPCMachObjectWriter.cpp | 389 + .../PowerPC/MCTargetDesc/PPCPredicates.cpp | 78 + .../PowerPC/MCTargetDesc/PPCPredicates.h | 63 + lib/Target/PowerPC/Makefile | 23 + lib/Target/PowerPC/PPC.h | 97 + lib/Target/PowerPC/PPC.td | 313 + lib/Target/PowerPC/PPCAsmPrinter.cpp | 1143 + lib/Target/PowerPC/PPCBranchSelector.cpp | 201 + lib/Target/PowerPC/PPCCTRLoops.cpp | 654 + lib/Target/PowerPC/PPCCallingConv.td | 180 + lib/Target/PowerPC/PPCCodeEmitter.cpp | 290 + lib/Target/PowerPC/PPCFastISel.cpp | 2238 + lib/Target/PowerPC/PPCFrameLowering.cpp | 1424 + lib/Target/PowerPC/PPCFrameLowering.h | 303 + lib/Target/PowerPC/PPCHazardRecognizers.cpp | 245 + lib/Target/PowerPC/PPCHazardRecognizers.h | 91 + lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 1560 + lib/Target/PowerPC/PPCISelLowering.cpp | 7937 ++ lib/Target/PowerPC/PPCISelLowering.h | 657 + lib/Target/PowerPC/PPCInstr64Bit.td | 1083 + lib/Target/PowerPC/PPCInstrAltivec.td | 852 + lib/Target/PowerPC/PPCInstrBuilder.h | 43 + lib/Target/PowerPC/PPCInstrFormats.td | 1115 + lib/Target/PowerPC/PPCInstrInfo.cpp | 1536 + lib/Target/PowerPC/PPCInstrInfo.h | 223 + lib/Target/PowerPC/PPCInstrInfo.td | 2720 + lib/Target/PowerPC/PPCJITInfo.cpp | 471 + lib/Target/PowerPC/PPCJITInfo.h | 49 + lib/Target/PowerPC/PPCMCInstLower.cpp | 206 + lib/Target/PowerPC/PPCMachineFunctionInfo.cpp | 15 + lib/Target/PowerPC/PPCMachineFunctionInfo.h | 178 + lib/Target/PowerPC/PPCPerfectShuffle.h | 6586 ++ lib/Target/PowerPC/PPCRegisterInfo.cpp | 838 + lib/Target/PowerPC/PPCRegisterInfo.h | 104 + lib/Target/PowerPC/PPCRegisterInfo.td | 248 + lib/Target/PowerPC/PPCRelocations.h | 56 + lib/Target/PowerPC/PPCSchedule.td | 527 + lib/Target/PowerPC/PPCSchedule440.td | 663 + lib/Target/PowerPC/PPCScheduleA2.td | 155 + lib/Target/PowerPC/PPCScheduleE500mc.td | 267 + lib/Target/PowerPC/PPCScheduleE5500.td | 310 + lib/Target/PowerPC/PPCScheduleG3.td | 71 + lib/Target/PowerPC/PPCScheduleG4.td | 81 + lib/Target/PowerPC/PPCScheduleG4Plus.td | 88 + lib/Target/PowerPC/PPCScheduleG5.td | 109 + lib/Target/PowerPC/PPCSelectionDAGInfo.cpp | 23 + lib/Target/PowerPC/PPCSelectionDAGInfo.h | 31 + lib/Target/PowerPC/PPCSubtarget.cpp | 219 + lib/Target/PowerPC/PPCSubtarget.h | 210 + lib/Target/PowerPC/PPCTargetMachine.cpp | 206 + lib/Target/PowerPC/PPCTargetMachine.h | 100 + lib/Target/PowerPC/PPCTargetObjectFile.cpp | 67 + lib/Target/PowerPC/PPCTargetObjectFile.h | 35 + lib/Target/PowerPC/PPCTargetStreamer.h | 23 + lib/Target/PowerPC/PPCTargetTransformInfo.cpp | 249 + lib/Target/PowerPC/README.txt | 898 + lib/Target/PowerPC/README_ALTIVEC.txt | 211 + lib/Target/PowerPC/TargetInfo/CMakeLists.txt | 7 + lib/Target/PowerPC/TargetInfo/LLVMBuild.txt | 23 + lib/Target/PowerPC/TargetInfo/Makefile | 15 + .../PowerPC/TargetInfo/PowerPCTargetInfo.cpp | 26 + lib/Target/R600/AMDGPU.h | 110 + lib/Target/R600/AMDGPU.td | 126 + lib/Target/R600/AMDGPUAsmPrinter.cpp | 292 + lib/Target/R600/AMDGPUAsmPrinter.h | 51 + lib/Target/R600/AMDGPUCallingConv.td | 74 + lib/Target/R600/AMDGPUConvertToISA.cpp | 62 + lib/Target/R600/AMDGPUFrameLowering.cpp | 103 + lib/Target/R600/AMDGPUFrameLowering.h | 44 + lib/Target/R600/AMDGPUISelDAGToDAG.cpp | 585 + lib/Target/R600/AMDGPUISelLowering.cpp | 837 + lib/Target/R600/AMDGPUISelLowering.h | 185 + lib/Target/R600/AMDGPUInstrInfo.cpp | 359 + lib/Target/R600/AMDGPUInstrInfo.h | 212 + lib/Target/R600/AMDGPUInstrInfo.td | 88 + lib/Target/R600/AMDGPUInstructions.td | 426 + lib/Target/R600/AMDGPUIntrinsics.td | 62 + lib/Target/R600/AMDGPUMCInstLower.cpp | 118 + lib/Target/R600/AMDGPUMCInstLower.h | 34 + lib/Target/R600/AMDGPUMachineFunction.cpp | 25 + lib/Target/R600/AMDGPUMachineFunction.h | 34 + lib/Target/R600/AMDGPURegisterInfo.cpp | 67 + lib/Target/R600/AMDGPURegisterInfo.h | 73 + lib/Target/R600/AMDGPURegisterInfo.td | 26 + lib/Target/R600/AMDGPUSubtarget.cpp | 120 + lib/Target/R600/AMDGPUSubtarget.h | 88 + lib/Target/R600/AMDGPUTargetMachine.cpp | 191 + lib/Target/R600/AMDGPUTargetMachine.h | 71 + lib/Target/R600/AMDGPUTargetTransformInfo.cpp | 90 + lib/Target/R600/AMDILBase.td | 25 + lib/Target/R600/AMDILCFGStructurizer.cpp | 1904 + lib/Target/R600/AMDILISelLowering.cpp | 642 + lib/Target/R600/AMDILInstrInfo.td | 150 + lib/Target/R600/AMDILIntrinsicInfo.cpp | 81 + lib/Target/R600/AMDILIntrinsicInfo.h | 49 + lib/Target/R600/AMDILIntrinsics.td | 232 + lib/Target/R600/AMDILRegisterInfo.td | 107 + lib/Target/R600/CMakeLists.txt | 57 + .../R600/InstPrinter/AMDGPUInstPrinter.cpp | 336 + .../R600/InstPrinter/AMDGPUInstPrinter.h | 61 + lib/Target/R600/InstPrinter/CMakeLists.txt | 7 + lib/Target/R600/InstPrinter/LLVMBuild.txt | 24 + lib/Target/R600/InstPrinter/Makefile | 15 + lib/Target/R600/LLVMBuild.txt | 32 + .../R600/MCTargetDesc/AMDGPUAsmBackend.cpp | 103 + .../MCTargetDesc/AMDGPUELFObjectWriter.cpp | 39 + .../R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp | 68 + .../R600/MCTargetDesc/AMDGPUMCAsmInfo.h | 28 + .../R600/MCTargetDesc/AMDGPUMCCodeEmitter.cpp | 21 + .../R600/MCTargetDesc/AMDGPUMCCodeEmitter.h | 41 + .../R600/MCTargetDesc/AMDGPUMCTargetDesc.cpp | 113 + .../R600/MCTargetDesc/AMDGPUMCTargetDesc.h | 58 + lib/Target/R600/MCTargetDesc/CMakeLists.txt | 12 + lib/Target/R600/MCTargetDesc/LLVMBuild.txt | 23 + lib/Target/R600/MCTargetDesc/Makefile | 16 + .../R600/MCTargetDesc/R600MCCodeEmitter.cpp | 186 + .../R600/MCTargetDesc/SIMCCodeEmitter.cpp | 201 + lib/Target/R600/Makefile | 23 + lib/Target/R600/Processors.td | 54 + lib/Target/R600/R600ClauseMergePass.cpp | 204 + lib/Target/R600/R600ControlFlowFinalizer.cpp | 526 + lib/Target/R600/R600Defines.h | 171 + lib/Target/R600/R600EmitClauseMarkers.cpp | 325 + lib/Target/R600/R600ExpandSpecialInstrs.cpp | 333 + lib/Target/R600/R600ISelLowering.cpp | 1961 + lib/Target/R600/R600ISelLowering.h | 74 + lib/Target/R600/R600InstrFormats.td | 492 + lib/Target/R600/R600InstrInfo.cpp | 1395 + lib/Target/R600/R600InstrInfo.h | 290 + lib/Target/R600/R600Instructions.td | 2396 + lib/Target/R600/R600Intrinsics.td | 75 + lib/Target/R600/R600MachineFunctionInfo.cpp | 20 + lib/Target/R600/R600MachineFunctionInfo.h | 34 + lib/Target/R600/R600MachineScheduler.cpp | 467 + lib/Target/R600/R600MachineScheduler.h | 104 + .../R600/R600OptimizeVectorRegisters.cpp | 380 + lib/Target/R600/R600Packetizer.cpp | 404 + lib/Target/R600/R600RegisterInfo.cpp | 100 + lib/Target/R600/R600RegisterInfo.h | 56 + lib/Target/R600/R600RegisterInfo.td | 210 + lib/Target/R600/R600Schedule.td | 49 + .../R600/R600TextureIntrinsicsReplacer.cpp | 303 + lib/Target/R600/SIAnnotateControlFlow.cpp | 331 + lib/Target/R600/SIDefines.h | 38 + lib/Target/R600/SIFixSGPRCopies.cpp | 263 + lib/Target/R600/SIISelLowering.cpp | 1399 + lib/Target/R600/SIISelLowering.h | 79 + lib/Target/R600/SIInsertWaits.cpp | 374 + lib/Target/R600/SIInstrFormats.td | 480 + lib/Target/R600/SIInstrInfo.cpp | 707 + lib/Target/R600/SIInstrInfo.h | 148 + lib/Target/R600/SIInstrInfo.td | 623 + lib/Target/R600/SIInstructions.td | 2161 + lib/Target/R600/SIIntrinsics.td | 82 + lib/Target/R600/SILowerControlFlow.cpp | 545 + lib/Target/R600/SIMachineFunctionInfo.cpp | 22 + lib/Target/R600/SIMachineFunctionInfo.h | 34 + lib/Target/R600/SIRegisterInfo.cpp | 131 + lib/Target/R600/SIRegisterInfo.h | 70 + lib/Target/R600/SIRegisterInfo.td | 194 + lib/Target/R600/SISchedule.td | 15 + lib/Target/R600/SITypeRewriter.cpp | 162 + .../R600/TargetInfo/AMDGPUTargetInfo.cpp | 26 + lib/Target/R600/TargetInfo/CMakeLists.txt | 7 + lib/Target/R600/TargetInfo/LLVMBuild.txt | 23 + lib/Target/R600/TargetInfo/Makefile | 15 + lib/Target/README.txt | 2354 + lib/Target/Sparc/CMakeLists.txt | 31 + lib/Target/Sparc/DelaySlotFiller.cpp | 505 + lib/Target/Sparc/LLVMBuild.txt | 34 + lib/Target/Sparc/MCTargetDesc/CMakeLists.txt | 6 + lib/Target/Sparc/MCTargetDesc/LLVMBuild.txt | 23 + lib/Target/Sparc/MCTargetDesc/Makefile | 16 + lib/Target/Sparc/MCTargetDesc/SparcBaseInfo.h | 82 + .../Sparc/MCTargetDesc/SparcMCAsmInfo.cpp | 47 + .../Sparc/MCTargetDesc/SparcMCAsmInfo.h | 30 + .../Sparc/MCTargetDesc/SparcMCTargetDesc.cpp | 109 + .../Sparc/MCTargetDesc/SparcMCTargetDesc.h | 39 + lib/Target/Sparc/Makefile | 23 + lib/Target/Sparc/README.txt | 61 + lib/Target/Sparc/Sparc.h | 126 + lib/Target/Sparc/Sparc.td | 76 + lib/Target/Sparc/SparcAsmPrinter.cpp | 341 + lib/Target/Sparc/SparcCallingConv.td | 130 + lib/Target/Sparc/SparcCodeEmitter.cpp | 245 + lib/Target/Sparc/SparcFrameLowering.cpp | 252 + lib/Target/Sparc/SparcFrameLowering.h | 64 + lib/Target/Sparc/SparcISelDAGToDAG.cpp | 221 + lib/Target/Sparc/SparcISelLowering.cpp | 2834 + lib/Target/Sparc/SparcISelLowering.h | 164 + lib/Target/Sparc/SparcInstr64Bit.td | 404 + lib/Target/Sparc/SparcInstrFormats.td | 233 + lib/Target/Sparc/SparcInstrInfo.cpp | 442 + lib/Target/Sparc/SparcInstrInfo.h | 100 + lib/Target/Sparc/SparcInstrInfo.td | 1035 + lib/Target/Sparc/SparcJITInfo.cpp | 165 + lib/Target/Sparc/SparcJITInfo.h | 67 + lib/Target/Sparc/SparcMachineFunctionInfo.cpp | 14 + lib/Target/Sparc/SparcMachineFunctionInfo.h | 56 + lib/Target/Sparc/SparcRegisterInfo.cpp | 211 + lib/Target/Sparc/SparcRegisterInfo.h | 57 + lib/Target/Sparc/SparcRegisterInfo.td | 206 + lib/Target/Sparc/SparcRelocations.h | 41 + lib/Target/Sparc/SparcSelectionDAGInfo.cpp | 23 + lib/Target/Sparc/SparcSelectionDAGInfo.h | 31 + lib/Target/Sparc/SparcSubtarget.cpp | 75 + lib/Target/Sparc/SparcSubtarget.h | 73 + lib/Target/Sparc/SparcTargetMachine.cpp | 105 + lib/Target/Sparc/SparcTargetMachine.h | 93 + lib/Target/Sparc/TargetInfo/CMakeLists.txt | 7 + lib/Target/Sparc/TargetInfo/LLVMBuild.txt | 23 + lib/Target/Sparc/TargetInfo/Makefile | 15 + .../Sparc/TargetInfo/SparcTargetInfo.cpp | 23 + lib/Target/SystemZ/AsmParser/CMakeLists.txt | 7 + lib/Target/SystemZ/AsmParser/LLVMBuild.txt | 23 + lib/Target/SystemZ/AsmParser/Makefile | 16 + .../SystemZ/AsmParser/SystemZAsmParser.cpp | 806 + lib/Target/SystemZ/CMakeLists.txt | 39 + .../SystemZ/Disassembler/CMakeLists.txt | 7 + lib/Target/SystemZ/Disassembler/LLVMBuild.txt | 23 + lib/Target/SystemZ/Disassembler/Makefile | 16 + .../Disassembler/SystemZDisassembler.cpp | 323 + lib/Target/SystemZ/InstPrinter/CMakeLists.txt | 7 + lib/Target/SystemZ/InstPrinter/LLVMBuild.txt | 23 + lib/Target/SystemZ/InstPrinter/Makefile | 16 + .../InstPrinter/SystemZInstPrinter.cpp | 165 + .../SystemZ/InstPrinter/SystemZInstPrinter.h | 69 + lib/Target/SystemZ/LLVMBuild.txt | 35 + .../SystemZ/MCTargetDesc/CMakeLists.txt | 9 + lib/Target/SystemZ/MCTargetDesc/LLVMBuild.txt | 23 + lib/Target/SystemZ/MCTargetDesc/Makefile | 16 + .../MCTargetDesc/SystemZMCAsmBackend.cpp | 126 + .../SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp | 36 + .../SystemZ/MCTargetDesc/SystemZMCAsmInfo.h | 30 + .../MCTargetDesc/SystemZMCCodeEmitter.cpp | 187 + .../SystemZ/MCTargetDesc/SystemZMCFixups.h | 31 + .../MCTargetDesc/SystemZMCObjectWriter.cpp | 140 + .../MCTargetDesc/SystemZMCTargetDesc.cpp | 229 + .../MCTargetDesc/SystemZMCTargetDesc.h | 96 + lib/Target/SystemZ/Makefile | 29 + lib/Target/SystemZ/README.txt | 181 + lib/Target/SystemZ/SystemZ.h | 115 + lib/Target/SystemZ/SystemZ.td | 72 + lib/Target/SystemZ/SystemZAsmPrinter.cpp | 239 + lib/Target/SystemZ/SystemZAsmPrinter.h | 52 + lib/Target/SystemZ/SystemZCallingConv.cpp | 21 + lib/Target/SystemZ/SystemZCallingConv.h | 23 + lib/Target/SystemZ/SystemZCallingConv.td | 65 + .../SystemZ/SystemZConstantPoolValue.cpp | 62 + lib/Target/SystemZ/SystemZConstantPoolValue.h | 55 + lib/Target/SystemZ/SystemZElimCompare.cpp | 471 + lib/Target/SystemZ/SystemZFrameLowering.cpp | 521 + lib/Target/SystemZ/SystemZFrameLowering.h | 78 + lib/Target/SystemZ/SystemZISelDAGToDAG.cpp | 1148 + lib/Target/SystemZ/SystemZISelLowering.cpp | 3248 + lib/Target/SystemZ/SystemZISelLowering.h | 319 + lib/Target/SystemZ/SystemZInstrBuilder.h | 48 + lib/Target/SystemZ/SystemZInstrFP.td | 366 + lib/Target/SystemZ/SystemZInstrFormats.td | 1603 + lib/Target/SystemZ/SystemZInstrInfo.cpp | 1247 + lib/Target/SystemZ/SystemZInstrInfo.h | 257 + lib/Target/SystemZ/SystemZInstrInfo.td | 1393 + lib/Target/SystemZ/SystemZLongBranch.cpp | 462 + lib/Target/SystemZ/SystemZMCInstLower.cpp | 100 + lib/Target/SystemZ/SystemZMCInstLower.h | 44 + .../SystemZ/SystemZMachineFunctionInfo.cpp | 17 + .../SystemZ/SystemZMachineFunctionInfo.h | 68 + lib/Target/SystemZ/SystemZOperands.td | 482 + lib/Target/SystemZ/SystemZOperators.td | 378 + lib/Target/SystemZ/SystemZPatterns.td | 152 + lib/Target/SystemZ/SystemZProcessors.td | 46 + lib/Target/SystemZ/SystemZRegisterInfo.cpp | 141 + lib/Target/SystemZ/SystemZRegisterInfo.h | 68 + lib/Target/SystemZ/SystemZRegisterInfo.td | 167 + .../SystemZ/SystemZSelectionDAGInfo.cpp | 293 + lib/Target/SystemZ/SystemZSelectionDAGInfo.h | 80 + lib/Target/SystemZ/SystemZShortenInst.cpp | 163 + lib/Target/SystemZ/SystemZSubtarget.cpp | 67 + lib/Target/SystemZ/SystemZSubtarget.h | 70 + lib/Target/SystemZ/SystemZTargetMachine.cpp | 108 + lib/Target/SystemZ/SystemZTargetMachine.h | 74 + lib/Target/SystemZ/TargetInfo/CMakeLists.txt | 7 + lib/Target/SystemZ/TargetInfo/LLVMBuild.txt | 23 + lib/Target/SystemZ/TargetInfo/Makefile | 15 + .../SystemZ/TargetInfo/SystemZTargetInfo.cpp | 20 + lib/Target/Target.cpp | 142 + lib/Target/TargetIntrinsicInfo.cpp | 30 + lib/Target/TargetJITInfo.cpp | 14 + lib/Target/TargetLibraryInfo.cpp | 685 + lib/Target/TargetLoweringObjectFile.cpp | 335 + lib/Target/TargetMachine.cpp | 194 + lib/Target/TargetMachineC.cpp | 269 + lib/Target/TargetSubtargetInfo.cpp | 56 + lib/Target/X86/AsmParser/CMakeLists.txt | 7 + lib/Target/X86/AsmParser/LLVMBuild.txt | 23 + lib/Target/X86/AsmParser/Makefile | 15 + lib/Target/X86/AsmParser/X86AsmParser.cpp | 2705 + lib/Target/X86/CMakeLists.txt | 63 + lib/Target/X86/Disassembler/CMakeLists.txt | 16 + lib/Target/X86/Disassembler/LLVMBuild.txt | 23 + lib/Target/X86/Disassembler/Makefile | 16 + .../X86/Disassembler/X86Disassembler.cpp | 729 + lib/Target/X86/Disassembler/X86Disassembler.h | 131 + .../X86/Disassembler/X86DisassemblerDecoder.c | 1748 + .../X86/Disassembler/X86DisassemblerDecoder.h | 676 + .../X86DisassemblerDecoderCommon.h | 557 + lib/Target/X86/InstPrinter/CMakeLists.txt | 9 + lib/Target/X86/InstPrinter/LLVMBuild.txt | 23 + lib/Target/X86/InstPrinter/Makefile | 15 + .../X86/InstPrinter/X86ATTInstPrinter.cpp | 233 + .../X86/InstPrinter/X86ATTInstPrinter.h | 107 + .../X86/InstPrinter/X86InstComments.cpp | 511 + lib/Target/X86/InstPrinter/X86InstComments.h | 25 + .../X86/InstPrinter/X86IntelInstPrinter.cpp | 218 + .../X86/InstPrinter/X86IntelInstPrinter.h | 122 + lib/Target/X86/LLVMBuild.txt | 35 + lib/Target/X86/MCTargetDesc/CMakeLists.txt | 16 + lib/Target/X86/MCTargetDesc/LLVMBuild.txt | 23 + lib/Target/X86/MCTargetDesc/Makefile | 16 + lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp | 839 + lib/Target/X86/MCTargetDesc/X86BaseInfo.h | 703 + .../X86/MCTargetDesc/X86ELFObjectWriter.cpp | 247 + .../X86/MCTargetDesc/X86ELFRelocationInfo.cpp | 135 + lib/Target/X86/MCTargetDesc/X86FixupKinds.h | 33 + lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp | 167 + lib/Target/X86/MCTargetDesc/X86MCAsmInfo.h | 59 + .../X86/MCTargetDesc/X86MCCodeEmitter.cpp | 1462 + .../X86/MCTargetDesc/X86MCTargetDesc.cpp | 461 + lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h | 123 + .../MCTargetDesc/X86MachORelocationInfo.cpp | 116 + .../X86/MCTargetDesc/X86MachObjectWriter.cpp | 605 + .../MCTargetDesc/X86WinCOFFObjectWriter.cpp | 79 + lib/Target/X86/Makefile | 23 + lib/Target/X86/README-FPStack.txt | 85 + lib/Target/X86/README-MMX.txt | 71 + lib/Target/X86/README-SSE.txt | 933 + lib/Target/X86/README-UNIMPLEMENTED.txt | 14 + lib/Target/X86/README-X86-64.txt | 184 + lib/Target/X86/README.txt | 2043 + lib/Target/X86/TargetInfo/CMakeLists.txt | 7 + lib/Target/X86/TargetInfo/LLVMBuild.txt | 23 + lib/Target/X86/TargetInfo/Makefile | 16 + lib/Target/X86/TargetInfo/X86TargetInfo.cpp | 23 + lib/Target/X86/Utils/CMakeLists.txt | 7 + lib/Target/X86/Utils/LLVMBuild.txt | 23 + lib/Target/X86/Utils/Makefile | 15 + lib/Target/X86/Utils/X86ShuffleDecode.cpp | 217 + lib/Target/X86/Utils/X86ShuffleDecode.h | 71 + lib/Target/X86/X86.h | 80 + lib/Target/X86/X86.td | 404 + lib/Target/X86/X86AsmPrinter.cpp | 739 + lib/Target/X86/X86AsmPrinter.h | 87 + lib/Target/X86/X86COFFMachineModuleInfo.cpp | 19 + lib/Target/X86/X86COFFMachineModuleInfo.h | 46 + lib/Target/X86/X86CallingConv.h | 35 + lib/Target/X86/X86CallingConv.td | 623 + lib/Target/X86/X86CodeEmitter.cpp | 1508 + .../X86/X86CompilationCallback_Win64.asm | 68 + lib/Target/X86/X86FastISel.cpp | 2557 + lib/Target/X86/X86FixupLEAs.cpp | 262 + lib/Target/X86/X86FloatingPoint.cpp | 1770 + lib/Target/X86/X86FrameLowering.cpp | 1560 + lib/Target/X86/X86FrameLowering.h | 76 + lib/Target/X86/X86ISelDAGToDAG.cpp | 2812 + lib/Target/X86/X86ISelLowering.cpp | 19956 ++++ lib/Target/X86/X86ISelLowering.h | 995 + lib/Target/X86/X86Instr3DNow.td | 103 + lib/Target/X86/X86InstrAVX512.td | 3526 + lib/Target/X86/X86InstrArithmetic.td | 1395 + lib/Target/X86/X86InstrBuilder.h | 183 + lib/Target/X86/X86InstrCMovSetCC.td | 111 + lib/Target/X86/X86InstrCompiler.td | 1842 + lib/Target/X86/X86InstrControl.td | 290 + lib/Target/X86/X86InstrExtension.td | 172 + lib/Target/X86/X86InstrFMA.td | 369 + lib/Target/X86/X86InstrFPStack.td | 692 + lib/Target/X86/X86InstrFormats.td | 805 + lib/Target/X86/X86InstrFragmentsSIMD.td | 537 + lib/Target/X86/X86InstrInfo.cpp | 5492 + lib/Target/X86/X86InstrInfo.h | 433 + lib/Target/X86/X86InstrInfo.td | 2467 + lib/Target/X86/X86InstrMMX.td | 617 + lib/Target/X86/X86InstrSSE.td | 8406 ++ lib/Target/X86/X86InstrSVM.td | 62 + lib/Target/X86/X86InstrShiftRotate.td | 978 + lib/Target/X86/X86InstrSystem.td | 529 + lib/Target/X86/X86InstrTSX.td | 46 + lib/Target/X86/X86InstrVMX.td | 66 + lib/Target/X86/X86InstrXOP.td | 289 + lib/Target/X86/X86JITInfo.cpp | 582 + lib/Target/X86/X86JITInfo.h | 81 + lib/Target/X86/X86MCInstLower.cpp | 922 + lib/Target/X86/X86MachineFunctionInfo.cpp | 14 + lib/Target/X86/X86MachineFunctionInfo.h | 145 + lib/Target/X86/X86PadShortFunction.cpp | 212 + lib/Target/X86/X86RegisterInfo.cpp | 706 + lib/Target/X86/X86RegisterInfo.h | 141 + lib/Target/X86/X86RegisterInfo.td | 471 + lib/Target/X86/X86Relocations.h | 52 + lib/Target/X86/X86SchedHaswell.td | 136 + lib/Target/X86/X86SchedSandyBridge.td | 131 + lib/Target/X86/X86Schedule.td | 606 + lib/Target/X86/X86ScheduleAtom.td | 539 + lib/Target/X86/X86ScheduleSLM.td | 668 + lib/Target/X86/X86SelectionDAGInfo.cpp | 268 + lib/Target/X86/X86SelectionDAGInfo.h | 56 + lib/Target/X86/X86Subtarget.cpp | 556 + lib/Target/X86/X86Subtarget.h | 410 + lib/Target/X86/X86TargetMachine.cpp | 234 + lib/Target/X86/X86TargetMachine.h | 137 + lib/Target/X86/X86TargetObjectFile.cpp | 55 + lib/Target/X86/X86TargetObjectFile.h | 46 + lib/Target/X86/X86TargetTransformInfo.cpp | 694 + lib/Target/X86/X86VZeroUpper.cpp | 326 + lib/Target/XCore/CMakeLists.txt | 34 + lib/Target/XCore/Disassembler/CMakeLists.txt | 5 + lib/Target/XCore/Disassembler/LLVMBuild.txt | 23 + lib/Target/XCore/Disassembler/Makefile | 16 + .../XCore/Disassembler/XCoreDisassembler.cpp | 799 + lib/Target/XCore/InstPrinter/CMakeLists.txt | 7 + lib/Target/XCore/InstPrinter/LLVMBuild.txt | 23 + lib/Target/XCore/InstPrinter/Makefile | 16 + .../XCore/InstPrinter/XCoreInstPrinter.cpp | 86 + .../XCore/InstPrinter/XCoreInstPrinter.h | 44 + lib/Target/XCore/LLVMBuild.txt | 33 + lib/Target/XCore/MCTargetDesc/CMakeLists.txt | 9 + lib/Target/XCore/MCTargetDesc/LLVMBuild.txt | 23 + lib/Target/XCore/MCTargetDesc/Makefile | 16 + .../XCore/MCTargetDesc/XCoreMCAsmInfo.cpp | 36 + .../XCore/MCTargetDesc/XCoreMCAsmInfo.h | 31 + .../XCore/MCTargetDesc/XCoreMCTargetDesc.cpp | 107 + .../XCore/MCTargetDesc/XCoreMCTargetDesc.h | 38 + lib/Target/XCore/Makefile | 23 + lib/Target/XCore/README.txt | 8 + lib/Target/XCore/TargetInfo/CMakeLists.txt | 7 + lib/Target/XCore/TargetInfo/LLVMBuild.txt | 23 + lib/Target/XCore/TargetInfo/Makefile | 16 + .../XCore/TargetInfo/XCoreTargetInfo.cpp | 19 + lib/Target/XCore/XCore.h | 38 + lib/Target/XCore/XCore.td | 53 + lib/Target/XCore/XCoreAsmPrinter.cpp | 293 + lib/Target/XCore/XCoreCallingConv.td | 36 + lib/Target/XCore/XCoreFrameLowering.cpp | 420 + lib/Target/XCore/XCoreFrameLowering.h | 58 + lib/Target/XCore/XCoreISelDAGToDAG.cpp | 250 + lib/Target/XCore/XCoreISelLowering.cpp | 1680 + lib/Target/XCore/XCoreISelLowering.h | 210 + lib/Target/XCore/XCoreInstrFormats.td | 277 + lib/Target/XCore/XCoreInstrInfo.cpp | 401 + lib/Target/XCore/XCoreInstrInfo.h | 88 + lib/Target/XCore/XCoreInstrInfo.td | 1288 + lib/Target/XCore/XCoreLowerThreadLocal.cpp | 241 + lib/Target/XCore/XCoreMCInstLower.cpp | 117 + lib/Target/XCore/XCoreMCInstLower.h | 42 + lib/Target/XCore/XCoreMachineFunctionInfo.cpp | 14 + lib/Target/XCore/XCoreMachineFunctionInfo.h | 69 + lib/Target/XCore/XCoreRegisterInfo.cpp | 261 + lib/Target/XCore/XCoreRegisterInfo.h | 68 + lib/Target/XCore/XCoreRegisterInfo.td | 59 + lib/Target/XCore/XCoreSelectionDAGInfo.cpp | 23 + lib/Target/XCore/XCoreSelectionDAGInfo.h | 31 + lib/Target/XCore/XCoreSubtarget.cpp | 30 + lib/Target/XCore/XCoreSubtarget.h | 43 + lib/Target/XCore/XCoreTargetMachine.cpp | 80 + lib/Target/XCore/XCoreTargetMachine.h | 66 + lib/Target/XCore/XCoreTargetObjectFile.cpp | 60 + lib/Target/XCore/XCoreTargetObjectFile.h | 25 + lib/Target/XCore/XCoreTargetTransformInfo.cpp | 83 + lib/Transforms/CMakeLists.txt | 8 + lib/Transforms/Hello/CMakeLists.txt | 3 + lib/Transforms/Hello/Hello.cpp | 64 + lib/Transforms/Hello/Hello.exports | 0 lib/Transforms/Hello/Makefile | 24 + lib/Transforms/IPO/ArgumentPromotion.cpp | 894 + lib/Transforms/IPO/BarrierNoopPass.cpp | 47 + lib/Transforms/IPO/CMakeLists.txt | 25 + lib/Transforms/IPO/ConstantMerge.cpp | 233 + .../IPO/DeadArgumentElimination.cpp | 1144 + lib/Transforms/IPO/ExtractGV.cpp | 155 + lib/Transforms/IPO/FunctionAttrs.cpp | 1686 + lib/Transforms/IPO/GlobalDCE.cpp | 219 + lib/Transforms/IPO/GlobalOpt.cpp | 3194 + lib/Transforms/IPO/IPConstantPropagation.cpp | 279 + lib/Transforms/IPO/IPO.cpp | 110 + lib/Transforms/IPO/InlineAlways.cpp | 112 + lib/Transforms/IPO/InlineSimple.cpp | 83 + lib/Transforms/IPO/Inliner.cpp | 636 + lib/Transforms/IPO/Internalize.cpp | 222 + lib/Transforms/IPO/LLVMBuild.txt | 23 + lib/Transforms/IPO/LoopExtractor.cpp | 304 + lib/Transforms/IPO/Makefile | 15 + lib/Transforms/IPO/MergeFunctions.cpp | 911 + lib/Transforms/IPO/PartialInlining.cpp | 183 + lib/Transforms/IPO/PassManagerBuilder.cpp | 440 + lib/Transforms/IPO/PruneEH.cpp | 258 + lib/Transforms/IPO/StripDeadPrototypes.cpp | 73 + lib/Transforms/IPO/StripSymbols.cpp | 388 + lib/Transforms/InstCombine/CMakeLists.txt | 17 + lib/Transforms/InstCombine/InstCombine.h | 392 + .../InstCombine/InstCombineAddSub.cpp | 1560 + .../InstCombine/InstCombineAndOrXor.cpp | 2510 + .../InstCombine/InstCombineCalls.cpp | 1390 + .../InstCombine/InstCombineCasts.cpp | 1862 + .../InstCombine/InstCombineCompares.cpp | 3413 + .../InstCombineLoadStoreAlloca.cpp | 820 + .../InstCombine/InstCombineMulDivRem.cpp | 1259 + lib/Transforms/InstCombine/InstCombinePHI.cpp | 902 + .../InstCombine/InstCombineSelect.cpp | 998 + .../InstCombine/InstCombineShifts.cpp | 810 + .../InstCombineSimplifyDemanded.cpp | 1285 + .../InstCombine/InstCombineVectorOps.cpp | 1048 + .../InstCombine/InstCombineWorklist.h | 105 + .../InstCombine/InstructionCombining.cpp | 2534 + lib/Transforms/InstCombine/LLVMBuild.txt | 22 + lib/Transforms/InstCombine/Makefile | 15 + .../Instrumentation/AddressSanitizer.cpp | 1679 + .../Instrumentation/BoundsChecking.cpp | 212 + lib/Transforms/Instrumentation/CMakeLists.txt | 12 + .../Instrumentation/DataFlowSanitizer.cpp | 1397 + lib/Transforms/Instrumentation/DebugIR.cpp | 618 + lib/Transforms/Instrumentation/DebugIR.h | 99 + .../Instrumentation/GCOVProfiling.cpp | 884 + .../Instrumentation/Instrumentation.cpp | 37 + lib/Transforms/Instrumentation/LLVMBuild.txt | 22 + lib/Transforms/Instrumentation/Makefile | 15 + .../Instrumentation/MaximumSpanningTree.h | 111 + .../Instrumentation/MemorySanitizer.cpp | 2350 + .../Instrumentation/ThreadSanitizer.cpp | 581 + lib/Transforms/LLVMBuild.txt | 24 + lib/Transforms/Makefile | 20 + .../ObjCARC/ARCRuntimeEntryPoints.h | 186 + lib/Transforms/ObjCARC/CMakeLists.txt | 13 + lib/Transforms/ObjCARC/DependencyAnalysis.cpp | 262 + lib/Transforms/ObjCARC/DependencyAnalysis.h | 79 + lib/Transforms/ObjCARC/LLVMBuild.txt | 23 + lib/Transforms/ObjCARC/Makefile | 15 + lib/Transforms/ObjCARC/ObjCARC.cpp | 49 + lib/Transforms/ObjCARC/ObjCARC.h | 397 + lib/Transforms/ObjCARC/ObjCARCAPElim.cpp | 175 + .../ObjCARC/ObjCARCAliasAnalysis.cpp | 162 + lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.h | 74 + lib/Transforms/ObjCARC/ObjCARCContract.cpp | 516 + lib/Transforms/ObjCARC/ObjCARCExpand.cpp | 128 + lib/Transforms/ObjCARC/ObjCARCOpts.cpp | 3135 + lib/Transforms/ObjCARC/ObjCARCUtil.cpp | 254 + lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp | 177 + lib/Transforms/ObjCARC/ProvenanceAnalysis.h | 80 + lib/Transforms/Scalar/ADCE.cpp | 97 + lib/Transforms/Scalar/CMakeLists.txt | 39 + lib/Transforms/Scalar/CodeGenPrepare.cpp | 2002 + lib/Transforms/Scalar/ConstantProp.cpp | 98 + .../Scalar/CorrelatedValuePropagation.cpp | 321 + lib/Transforms/Scalar/DCE.cpp | 134 + .../Scalar/DeadStoreElimination.cpp | 900 + lib/Transforms/Scalar/EarlyCSE.cpp | 618 + lib/Transforms/Scalar/FlattenCFGPass.cpp | 79 + lib/Transforms/Scalar/GVN.cpp | 2803 + lib/Transforms/Scalar/GlobalMerge.cpp | 310 + lib/Transforms/Scalar/IndVarSimplify.cpp | 1860 + lib/Transforms/Scalar/JumpThreading.cpp | 1705 + lib/Transforms/Scalar/LICM.cpp | 895 + lib/Transforms/Scalar/LLVMBuild.txt | 23 + lib/Transforms/Scalar/LoopDeletion.cpp | 250 + lib/Transforms/Scalar/LoopIdiomRecognize.cpp | 1150 + lib/Transforms/Scalar/LoopInstSimplify.cpp | 175 + lib/Transforms/Scalar/LoopRerollPass.cpp | 1186 + lib/Transforms/Scalar/LoopRotation.cpp | 523 + lib/Transforms/Scalar/LoopStrengthReduce.cpp | 4951 + lib/Transforms/Scalar/LoopUnrollPass.cpp | 260 + lib/Transforms/Scalar/LoopUnswitch.cpp | 1158 + lib/Transforms/Scalar/LowerAtomic.cpp | 142 + lib/Transforms/Scalar/Makefile | 15 + lib/Transforms/Scalar/MemCpyOptimizer.cpp | 1029 + .../Scalar/PartiallyInlineLibCalls.cpp | 156 + lib/Transforms/Scalar/Reassociate.cpp | 2005 + lib/Transforms/Scalar/Reg2Mem.cpp | 133 + lib/Transforms/Scalar/SCCP.cpp | 1936 + lib/Transforms/Scalar/SROA.cpp | 3590 + lib/Transforms/Scalar/SampleProfile.cpp | 479 + lib/Transforms/Scalar/Scalar.cpp | 199 + .../Scalar/ScalarReplAggregates.cpp | 2605 + lib/Transforms/Scalar/SimplifyCFGPass.cpp | 194 + lib/Transforms/Scalar/Sink.cpp | 270 + lib/Transforms/Scalar/StructurizeCFG.cpp | 906 + .../Scalar/TailRecursionElimination.cpp | 672 + lib/Transforms/Utils/BasicBlockUtils.cpp | 771 + lib/Transforms/Utils/BreakCriticalEdges.cpp | 370 + lib/Transforms/Utils/BuildLibCalls.cpp | 597 + lib/Transforms/Utils/BypassSlowDivision.cpp | 262 + lib/Transforms/Utils/CMakeLists.txt | 39 + lib/Transforms/Utils/CloneFunction.cpp | 574 + lib/Transforms/Utils/CloneModule.cpp | 122 + lib/Transforms/Utils/CmpInstAnalysis.cpp | 96 + lib/Transforms/Utils/CodeExtractor.cpp | 779 + lib/Transforms/Utils/DemoteRegToStack.cpp | 149 + lib/Transforms/Utils/FlattenCFG.cpp | 486 + lib/Transforms/Utils/GlobalStatus.cpp | 183 + lib/Transforms/Utils/InlineFunction.cpp | 932 + lib/Transforms/Utils/InstructionNamer.cpp | 64 + lib/Transforms/Utils/IntegerDivision.cpp | 524 + lib/Transforms/Utils/LCSSA.cpp | 283 + lib/Transforms/Utils/LLVMBuild.txt | 22 + lib/Transforms/Utils/Local.cpp | 1273 + lib/Transforms/Utils/LoopSimplify.cpp | 801 + lib/Transforms/Utils/LoopUnroll.cpp | 457 + lib/Transforms/Utils/LoopUnrollRuntime.cpp | 374 + lib/Transforms/Utils/LowerExpectIntrinsic.cpp | 174 + lib/Transforms/Utils/LowerInvoke.cpp | 579 + lib/Transforms/Utils/LowerSwitch.cpp | 323 + lib/Transforms/Utils/Makefile | 15 + lib/Transforms/Utils/Mem2Reg.cpp | 90 + lib/Transforms/Utils/MetaRenamer.cpp | 145 + lib/Transforms/Utils/ModuleUtils.cpp | 82 + .../Utils/PromoteMemoryToRegister.cpp | 1079 + lib/Transforms/Utils/SSAUpdater.cpp | 492 + lib/Transforms/Utils/SimplifyCFG.cpp | 4156 + lib/Transforms/Utils/SimplifyIndVar.cpp | 393 + lib/Transforms/Utils/SimplifyInstructions.cpp | 100 + lib/Transforms/Utils/SimplifyLibCalls.cpp | 2253 + lib/Transforms/Utils/SpecialCaseList.cpp | 222 + .../Utils/UnifyFunctionExitNodes.cpp | 122 + lib/Transforms/Utils/Utils.cpp | 39 + lib/Transforms/Utils/ValueMapper.cpp | 224 + lib/Transforms/Vectorize/BBVectorize.cpp | 3183 + lib/Transforms/Vectorize/CMakeLists.txt | 8 + lib/Transforms/Vectorize/LLVMBuild.txt | 24 + lib/Transforms/Vectorize/LoopVectorize.cpp | 5166 + lib/Transforms/Vectorize/Makefile | 15 + lib/Transforms/Vectorize/SLPVectorizer.cpp | 2665 + lib/Transforms/Vectorize/Vectorize.cpp | 48 + llvm.spec.in | 67 + projects/CMakeLists.txt | 27 + projects/Makefile | 31 + projects/sample/Makefile | 18 + projects/sample/Makefile.common.in | 26 + projects/sample/Makefile.llvm.config.in | 317 + projects/sample/Makefile.llvm.rules | 2007 + projects/sample/autoconf/AutoRegen.sh | 45 + projects/sample/autoconf/ExportMap.map | 7 + projects/sample/autoconf/LICENSE.TXT | 24 + projects/sample/autoconf/config.guess | 1519 + projects/sample/autoconf/config.sub | 1768 + projects/sample/autoconf/configure.ac | 1548 + projects/sample/autoconf/install-sh | 322 + projects/sample/autoconf/ltmain.sh | 6863 ++ projects/sample/autoconf/m4/build_exeext.m4 | 42 + projects/sample/autoconf/m4/c_printf_a.m4 | 31 + projects/sample/autoconf/m4/check_gnu_make.m4 | 26 + .../sample/autoconf/m4/config_makefile.m4 | 9 + projects/sample/autoconf/m4/config_project.m4 | 14 + projects/sample/autoconf/m4/cxx_flag_check.m4 | 2 + .../sample/autoconf/m4/find_std_program.m4 | 118 + projects/sample/autoconf/m4/func_isinf.m4 | 36 + projects/sample/autoconf/m4/func_isnan.m4 | 27 + projects/sample/autoconf/m4/func_mmap_file.m4 | 26 + .../autoconf/m4/header_mmap_anonymous.m4 | 21 + projects/sample/autoconf/m4/huge_val.m4 | 20 + projects/sample/autoconf/m4/libtool.m4 | 6389 ++ projects/sample/autoconf/m4/link_options.m4 | 109 + .../sample/autoconf/m4/linux_mixed_64_32.m4 | 17 + projects/sample/autoconf/m4/ltdl.m4 | 403 + .../autoconf/m4/need_dev_zero_for_mmap.m4 | 17 + projects/sample/autoconf/m4/path_tclsh.m4 | 39 + projects/sample/autoconf/m4/rand48.m4 | 12 + projects/sample/autoconf/m4/sanity_check.m4 | 31 + .../sample/autoconf/m4/single_cxx_check.m4 | 10 + .../autoconf/m4/visibility_inlines_hidden.m4 | 24 + projects/sample/autoconf/mkinstalldirs | 150 + projects/sample/configure | 22937 ++++ projects/sample/docs/index.html | 6 + projects/sample/include/sample.h | 8 + projects/sample/lib/Makefile | 13 + projects/sample/lib/sample/Makefile | 16 + projects/sample/lib/sample/sample.c | 25 + projects/sample/tools/Makefile | 13 + projects/sample/tools/sample/Makefile | 23 + projects/sample/tools/sample/main.c | 12 + test/.clang-format | 2 + .../BasicAA/2003-02-26-AccessSizeTest.ll | 20 + test/Analysis/BasicAA/2003-03-04-GEPCrash.ll | 7 + .../Analysis/BasicAA/2003-04-22-GEPProblem.ll | 14 + test/Analysis/BasicAA/2003-04-25-GEPCrash.ll | 7 + .../BasicAA/2003-05-21-GEP-Problem.ll | 21 + .../Analysis/BasicAA/2003-06-01-AliasCrash.ll | 11 + .../BasicAA/2003-07-03-BasicAACrash.ll | 10 + .../BasicAA/2003-09-19-LocalArgument.ll | 15 + .../BasicAA/2003-11-04-SimpleCases.ll | 18 + .../BasicAA/2003-12-11-ConstExprGEP.ll | 20 + .../BasicAA/2004-07-28-MustAliasbug.ll | 11 + .../BasicAA/2006-03-03-BadArraySubscript.ll | 33 + .../BasicAA/2006-11-03-BasicAAVectorCrash.ll | 48 + .../2007-01-13-BasePointerBadNoAlias.ll | 34 + .../BasicAA/2007-08-01-NoAliasAndCalls.ll | 13 + .../BasicAA/2007-08-01-NoAliasAndGEP.ll | 20 + .../BasicAA/2007-08-05-GetOverloadedModRef.ll | 16 + .../BasicAA/2007-10-24-ArgumentsGlobals.ll | 16 + test/Analysis/BasicAA/2007-11-05-SizeCrash.ll | 34 + .../BasicAA/2007-12-08-OutOfBoundsCrash.ll | 31 + test/Analysis/BasicAA/2008-04-15-Byval.ll | 19 + .../BasicAA/2008-06-02-GEPTailCrash.ll | 15 + .../Analysis/BasicAA/2008-11-23-NoaliasRet.ll | 14 + .../Analysis/BasicAA/2009-03-04-GEPNoalias.ll | 14 + .../BasicAA/2009-10-13-AtomicModRef.ll | 15 + .../BasicAA/2009-10-13-GEP-BaseNoAlias.ll | 33 + .../2010-09-15-GEP-SignedArithmetic.ll | 17 + test/Analysis/BasicAA/aligned-overread.ll | 25 + .../BasicAA/args-rets-allocas-loads.ll | 311 + test/Analysis/BasicAA/byval.ll | 18 + test/Analysis/BasicAA/cas.ll | 14 + test/Analysis/BasicAA/constant-over-index.ll | 28 + test/Analysis/BasicAA/dag.ll | 41 + test/Analysis/BasicAA/empty.ll | 12 + test/Analysis/BasicAA/featuretest.ll | 127 + .../BasicAA/full-store-partial-alias.ll | 37 + test/Analysis/BasicAA/gcsetest.ll | 61 + test/Analysis/BasicAA/gep-alias.ll | 230 + test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll | 26 + test/Analysis/BasicAA/global-size.ll | 52 + test/Analysis/BasicAA/intrinsics.ll | 42 + test/Analysis/BasicAA/invariant_load.ll | 26 + test/Analysis/BasicAA/memset_pattern.ll | 21 + test/Analysis/BasicAA/modref.ll | 151 + test/Analysis/BasicAA/must-and-partial.ll | 39 + test/Analysis/BasicAA/no-escape-call.ll | 24 + test/Analysis/BasicAA/noalias-bugs.ll | 33 + test/Analysis/BasicAA/noalias-geps.ll | 56 + test/Analysis/BasicAA/noalias-param.ll | 23 + test/Analysis/BasicAA/nocapture.ll | 36 + test/Analysis/BasicAA/phi-aa.ll | 78 + test/Analysis/BasicAA/phi-and-select.ll | 82 + test/Analysis/BasicAA/phi-spec-order.ll | 67 + test/Analysis/BasicAA/phi-speculation.ll | 94 + test/Analysis/BasicAA/pure-const-dce.ll | 54 + test/Analysis/BasicAA/store-promote.ll | 54 + test/Analysis/BasicAA/tailcall-modref.ll | 16 + test/Analysis/BasicAA/underlying-value.ll | 25 + test/Analysis/BasicAA/unreachable-block.ll | 16 + test/Analysis/BlockFrequencyInfo/basic.ll | 134 + test/Analysis/BranchProbabilityInfo/basic.ll | 214 + test/Analysis/BranchProbabilityInfo/loop.ll | 365 + .../BranchProbabilityInfo/noreturn.ll | 79 + .../CallGraph/2008-09-09-DirectCall.ll | 17 + .../CallGraph/2008-09-09-UsedByGlobal.ll | 9 + .../CallGraph/do-nothing-intrinsic.ll | 13 + test/Analysis/CallGraph/no-intrinsics.ll | 13 + test/Analysis/CostModel/ARM/cast.ll | 547 + test/Analysis/CostModel/ARM/divrem.ll | 450 + test/Analysis/CostModel/ARM/gep.ll | 43 + test/Analysis/CostModel/ARM/insertelement.ll | 46 + test/Analysis/CostModel/ARM/lit.local.cfg | 4 + test/Analysis/CostModel/ARM/select.ll | 75 + test/Analysis/CostModel/ARM/shuffle.ll | 40 + .../CostModel/PowerPC/insert_extract.ll | 16 + test/Analysis/CostModel/PowerPC/lit.local.cfg | 4 + test/Analysis/CostModel/PowerPC/load_store.ll | 34 + test/Analysis/CostModel/X86/arith.ll | 128 + test/Analysis/CostModel/X86/cast.ll | 160 + test/Analysis/CostModel/X86/cmp.ll | 56 + test/Analysis/CostModel/X86/div.ll | 32 + test/Analysis/CostModel/X86/gep.ll | 40 + test/Analysis/CostModel/X86/i32.ll | 7 + .../CostModel/X86/insert-extract-at-zero.ll | 40 + test/Analysis/CostModel/X86/intrinsic-cost.ll | 60 + test/Analysis/CostModel/X86/lit.local.cfg | 4 + test/Analysis/CostModel/X86/load_store.ll | 83 + test/Analysis/CostModel/X86/loop_v2.ll | 39 + test/Analysis/CostModel/X86/reduction.ll | 365 + test/Analysis/CostModel/X86/sitofp.ll | 281 + test/Analysis/CostModel/X86/testshiftashr.ll | 531 + test/Analysis/CostModel/X86/testshiftlshr.ll | 529 + test/Analysis/CostModel/X86/testshiftshl.ll | 529 + test/Analysis/CostModel/X86/tiny.ll | 11 + test/Analysis/CostModel/X86/uitofp.ll | 368 + .../Analysis/CostModel/X86/vectorized-loop.ll | 75 + test/Analysis/CostModel/no_info.ll | 12 + test/Analysis/Delinearization/a.ll | 74 + test/Analysis/Delinearization/himeno_1.ll | 102 + test/Analysis/Delinearization/himeno_2.ll | 102 + test/Analysis/Delinearization/lit.local.cfg | 1 + .../multidim_ivs_and_integer_offsets_3d.ll | 68 + ...multidim_ivs_and_integer_offsets_nts_3d.ll | 72 + ...multidim_ivs_and_parameteric_offsets_3d.ll | 68 + .../Delinearization/multidim_only_ivs_2d.ll | 46 + .../multidim_only_ivs_2d_nested.ll | 78 + .../Delinearization/multidim_only_ivs_3d.ll | 65 + .../multidim_only_ivs_3d_cast.ll | 75 + test/Analysis/DependenceAnalysis/Banerjee.ll | 685 + test/Analysis/DependenceAnalysis/Coupled.ll | 604 + test/Analysis/DependenceAnalysis/ExactRDIV.ll | 618 + test/Analysis/DependenceAnalysis/ExactSIV.ll | 512 + test/Analysis/DependenceAnalysis/GCD.ll | 661 + test/Analysis/DependenceAnalysis/Invariant.ll | 40 + .../DependenceAnalysis/Preliminary.ll | 699 + .../DependenceAnalysis/Propagating.ll | 535 + .../DependenceAnalysis/Separability.ll | 303 + test/Analysis/DependenceAnalysis/StrongSIV.ll | 436 + .../DependenceAnalysis/SymbolicRDIV.ll | 446 + .../DependenceAnalysis/SymbolicSIV.ll | 423 + .../DependenceAnalysis/WeakCrossingSIV.ll | 280 + .../DependenceAnalysis/WeakZeroDstSIV.ll | 266 + .../DependenceAnalysis/WeakZeroSrcSIV.ll | 266 + test/Analysis/DependenceAnalysis/ZIV.ll | 74 + .../Dominators/2006-10-02-BreakCritEdges.ll | 21 + .../Dominators/2007-01-14-BreakCritEdges.ll | 187 + .../Dominators/2007-07-11-SplitBlock.ll | 21 + .../Dominators/2007-07-12-SplitBlock.ll | 13 + test/Analysis/Dominators/invoke.ll | 19 + .../GlobalsModRef/2008-09-03-ReadGlobals.ll | 20 + test/Analysis/GlobalsModRef/aliastest.ll | 14 + .../GlobalsModRef/chaining-analysis.ll | 24 + .../Analysis/GlobalsModRef/indirect-global.ll | 22 + test/Analysis/GlobalsModRef/modreftest.ll | 18 + test/Analysis/GlobalsModRef/pr12351.ll | 33 + test/Analysis/GlobalsModRef/purecse.ll | 27 + .../Analysis/GlobalsModRef/volatile-instrs.ll | 30 + test/Analysis/Lint/check-zero-divide.ll | 78 + test/Analysis/Lint/lit.local.cfg | 1 + .../LoopInfo/2003-05-15-NestingProblem.ll | 31 + .../memdep_requires_dominator_tree.ll | 19 + test/Analysis/PostDominators/pr1098.ll | 15 + test/Analysis/PostDominators/pr6047_a.ll | 15 + test/Analysis/PostDominators/pr6047_b.ll | 19 + test/Analysis/PostDominators/pr6047_c.ll | 147 + test/Analysis/PostDominators/pr6047_d.ll | 24 + .../RegionInfo/20100809_bb_not_in_domtree.ll | 20 + test/Analysis/RegionInfo/block_sort.ll | 43 + test/Analysis/RegionInfo/cond_loop.ll | 34 + .../RegionInfo/condition_complicated.ll | 61 + .../RegionInfo/condition_complicated_2.ll | 45 + .../RegionInfo/condition_forward_edge.ll | 27 + .../RegionInfo/condition_same_exit.ll | 32 + test/Analysis/RegionInfo/condition_simple.ll | 29 + test/Analysis/RegionInfo/exit_in_condition.ll | 39 + test/Analysis/RegionInfo/infinite_loop.ll | 21 + test/Analysis/RegionInfo/infinite_loop_2.ll | 37 + test/Analysis/RegionInfo/infinite_loop_3.ll | 53 + test/Analysis/RegionInfo/infinite_loop_4.ll | 49 + .../RegionInfo/loop_with_condition.ll | 47 + test/Analysis/RegionInfo/loops_1.ll | 41 + test/Analysis/RegionInfo/loops_2.ll | 50 + test/Analysis/RegionInfo/mix_1.ll | 70 + .../RegionInfo/multiple_exiting_edge.ll | 38 + test/Analysis/RegionInfo/nested_loops.ll | 34 + test/Analysis/RegionInfo/next.ll | 50 + test/Analysis/RegionInfo/paper.ll | 56 + .../RegionInfo/two_loops_same_header.ll | 47 + test/Analysis/RegionInfo/unreachable_bb.ll | 29 + .../2007-07-15-NegativeStride.ll | 22 + .../2007-08-06-MisinterpretBranch.ll | 20 + .../ScalarEvolution/2007-08-06-Unsigned.ll | 32 + .../2007-09-27-LargeStepping.ll | 23 + .../2007-11-14-SignedAddRec.ll | 26 + .../2007-11-18-OrInstruction.ll | 21 + .../2008-02-11-ReversedCondition.ll | 17 + .../2008-02-12-SMAXTripCount.ll | 17 + .../ScalarEvolution/2008-02-15-UMax.ll | 19 + .../2008-05-25-NegativeStepToZero.ll | 23 + .../2008-06-12-BinomialInt64.ll | 43 + .../2008-07-12-UnneededSelect1.ll | 39 + .../2008-07-12-UnneededSelect2.ll | 33 + .../2008-07-19-InfiniteLoop.ll | 16 + .../ScalarEvolution/2008-07-19-WrappingIV.ll | 16 + .../2008-07-29-SGTTripCount.ll | 28 + .../ScalarEvolution/2008-07-29-SMinExpr.ll | 26 + .../ScalarEvolution/2008-08-04-IVOverflow.ll | 27 + .../ScalarEvolution/2008-08-04-LongAddRec.ll | 58 + .../2008-11-02-QuadraticCrash.ll | 21 + .../ScalarEvolution/2008-11-15-CubicOOM.ll | 19 + .../2008-11-18-LessThanOrEqual.ll | 32 + .../ScalarEvolution/2008-11-18-Stride1.ll | 38 + .../ScalarEvolution/2008-11-18-Stride2.ll | 37 + .../ScalarEvolution/2008-12-08-FiniteSGE.ll | 26 + .../2008-12-11-SMaxOverflow.ll | 30 + .../2008-12-14-StrideAndSigned.ll | 23 + .../ScalarEvolution/2008-12-15-DontUseSDiv.ll | 22 + .../2009-01-02-SignedNegativeStride.ll | 43 + .../ScalarEvolution/2009-04-22-TruncCast.ll | 55 + .../2009-05-09-PointerEdgeCount.ll | 31 + .../2009-07-04-GroupConstantsWidthMismatch.ll | 16 + .../2010-09-03-RequiredTransitive.ll | 26 + .../2011-03-09-ExactNoMaxBECount.ll | 34 + .../ScalarEvolution/2011-04-26-FoldAddRec.ll | 33 + .../ScalarEvolution/2011-10-04-ConstEvolve.ll | 50 + .../2012-03-26-LoadConstant.ll | 43 + .../2012-05-18-LoopPredRecurse.ll | 30 + .../ScalarEvolution/2012-05-29-MulAddRec.ll | 45 + .../ScalarEvolution/SolveQuadraticEquation.ll | 102 + test/Analysis/ScalarEvolution/and-xor.ll | 11 + .../avoid-infinite-recursion-0.ll | 30 + .../avoid-infinite-recursion-1.ll | 354 + test/Analysis/ScalarEvolution/avoid-smax-0.ll | 37 + test/Analysis/ScalarEvolution/avoid-smax-1.ll | 234 + test/Analysis/ScalarEvolution/div-overflow.ll | 11 + test/Analysis/ScalarEvolution/do-loop.ll | 20 + test/Analysis/ScalarEvolution/fold.ll | 62 + .../ScalarEvolution/how-far-to-zero.ll | 27 + test/Analysis/ScalarEvolution/load.ll | 65 + .../max-trip-count-address-space.ll | 68 + .../ScalarEvolution/max-trip-count.ll | 100 + test/Analysis/ScalarEvolution/nsw-offset.ll | 77 + test/Analysis/ScalarEvolution/nsw.ll | 160 + .../ScalarEvolution/pointer-sign-bits.ll | 220 + test/Analysis/ScalarEvolution/pr3909.ll | 30 + test/Analysis/ScalarEvolution/scev-aa.ll | 215 + test/Analysis/ScalarEvolution/scev-invalid.ll | 34 + test/Analysis/ScalarEvolution/sext-inreg.ll | 30 + test/Analysis/ScalarEvolution/sext-iv-0.ll | 38 + test/Analysis/ScalarEvolution/sext-iv-1.ll | 100 + test/Analysis/ScalarEvolution/sext-iv-2.ll | 74 + test/Analysis/ScalarEvolution/sle.ll | 27 + test/Analysis/ScalarEvolution/smax.ll | 14 + test/Analysis/ScalarEvolution/trip-count.ll | 28 + test/Analysis/ScalarEvolution/trip-count10.ll | 151 + test/Analysis/ScalarEvolution/trip-count11.ll | 55 + test/Analysis/ScalarEvolution/trip-count12.ll | 35 + test/Analysis/ScalarEvolution/trip-count2.ll | 34 + test/Analysis/ScalarEvolution/trip-count3.ll | 80 + test/Analysis/ScalarEvolution/trip-count4.ll | 25 + test/Analysis/ScalarEvolution/trip-count5.ll | 48 + test/Analysis/ScalarEvolution/trip-count6.ll | 38 + test/Analysis/ScalarEvolution/trip-count7.ll | 151 + test/Analysis/ScalarEvolution/trip-count8.ll | 38 + test/Analysis/ScalarEvolution/trip-count9.ll | 415 + test/Analysis/ScalarEvolution/undefined.ll | 39 + .../ScalarEvolution/unreachable-code.ll | 13 + .../ScalarEvolution/unsimplified-loop.ll | 29 + test/Analysis/ScalarEvolution/xor-and.ll | 13 + .../ScalarEvolution/zext-signed-addrec.ll | 81 + test/Analysis/ScalarEvolution/zext-wrap.ll | 23 + .../TypeBasedAliasAnalysis/PR17620.ll | 45 + .../TypeBasedAliasAnalysis/aliastest.ll | 67 + .../argument-promotion.ll | 39 + test/Analysis/TypeBasedAliasAnalysis/dse.ll | 71 + .../TypeBasedAliasAnalysis/dynamic-indices.ll | 137 + .../TypeBasedAliasAnalysis/functionattrs.ll | 86 + .../gvn-nonlocal-type-mismatch.ll | 95 + .../TypeBasedAliasAnalysis/intrinsics.ll | 32 + test/Analysis/TypeBasedAliasAnalysis/licm.ll | 65 + .../TypeBasedAliasAnalysis/memcpyopt.ll | 27 + .../TypeBasedAliasAnalysis/placement-tbaa.ll | 110 + .../TypeBasedAliasAnalysis/precedence.ll | 50 + test/Analysis/TypeBasedAliasAnalysis/sink.ll | 24 + .../TypeBasedAliasAnalysis/tbaa-path.ll | 392 + test/Assembler/2002-03-08-NameCollision.ll | 15 + test/Assembler/2002-03-08-NameCollision2.ll | 12 + .../Assembler/2002-04-07-HexFloatConstants.ll | 16 + test/Assembler/2002-04-07-InfConstant.ll | 9 + test/Assembler/2002-04-29-NameBinding.ll | 18 + .../Assembler/2002-05-02-InvalidForwardRef.ll | 10 + test/Assembler/2002-07-14-OpaqueType.ll | 10 + test/Assembler/2002-07-25-QuoteInString.ll | 5 + .../Assembler/2002-07-25-ReturnPtrFunction.ll | 13 + test/Assembler/2002-07-31-SlashInString.ll | 5 + test/Assembler/2002-08-15-CastAmbiguity.ll | 6 + .../2002-08-15-ConstantExprProblem.ll | 16 + .../2002-08-15-UnresolvedGlobalReference.ll | 8 + test/Assembler/2002-08-16-ConstExprInlined.ll | 22 + test/Assembler/2002-08-19-BytecodeReader.ll | 17 + test/Assembler/2002-08-22-DominanceProblem.ll | 17 + .../2002-10-08-LargeArrayPerformance.ll | 8 + .../2002-10-13-ConstantEncodingProblem.ll | 5 + test/Assembler/2002-12-15-GlobalResolve.ll | 7 + test/Assembler/2003-01-30-UnsignedString.ll | 4 + .../2003-04-15-ConstantInitAssertion.ll | 5 + .../2003-04-25-UnresolvedGlobalReference.ll | 7 + .../2003-05-03-BytecodeReaderProblem.ll | 6 + test/Assembler/2003-05-12-MinIntProblem.ll | 5 + test/Assembler/2003-05-15-AssemblerProblem.ll | 14 + test/Assembler/2003-05-15-SwitchBug.ll | 11 + .../Assembler/2003-05-21-ConstantShiftExpr.ll | 4 + test/Assembler/2003-05-21-EmptyStructTest.ll | 6 + .../2003-05-21-MalformedShiftCrash.ll | 5 + .../2003-05-21-MalformedStructCrash.ll | 5 + .../2003-08-20-ConstantExprGEP-Fold.ll | 16 + .../2003-08-21-ConstantExprCast-Fold.ll | 4 + .../Assembler/2003-11-05-ConstantExprShift.ll | 5 + test/Assembler/2003-11-11-ImplicitRename.ll | 8 + test/Assembler/2003-11-12-ConstantExprCast.ll | 10 + test/Assembler/2003-11-24-SymbolTableCrash.ll | 10 + .../2004-01-11-getelementptrfolding.ll | 12 + test/Assembler/2004-01-20-MaxLongLong.ll | 4 + test/Assembler/2004-02-01-NegativeZero.ll | 5 + .../2004-02-27-SelfUseAssertError.ll | 25 + .../2004-03-07-FunctionAddressAlignment.ll | 15 + .../2004-03-30-UnclosedFunctionCrash.ll | 3 + .../2004-04-04-GetElementPtrIndexTypes.ll | 10 + test/Assembler/2004-06-07-VerifierBug.ll | 11 + test/Assembler/2004-10-22-BCWriterUndefBug.ll | 5 + test/Assembler/2004-11-28-InvalidTypeCrash.ll | 4 + .../2005-01-03-FPConstantDisassembly.ll | 6 + .../2005-01-31-CallingAggregateFunction.ll | 8 + .../Assembler/2005-05-05-OpaqueUndefValues.ll | 4 + test/Assembler/2005-12-21-ZeroInitVector.ll | 6 + test/Assembler/2006-09-28-CrashOnInvalid.ll | 9 + test/Assembler/2006-12-09-Cast-To-Bool.ll | 6 + .../2007-01-02-Undefined-Arg-Type.ll | 9 + test/Assembler/2007-01-05-Cmp-ConstExpr.ll | 18 + test/Assembler/2007-01-16-CrashOnBadCast.ll | 7 + test/Assembler/2007-01-16-CrashOnBadCast2.ll | 4 + .../2007-03-18-InvalidNumberedVar.ll | 10 + test/Assembler/2007-03-19-NegValue.ll | 7 + test/Assembler/2007-04-20-AlignedLoad.ll | 7 + test/Assembler/2007-04-20-AlignedStore.ll | 7 + .../2007-04-25-AssemblerFoldExternWeak.ll | 6 + test/Assembler/2007-05-21-Escape.ll | 22 + .../2007-07-19-ParamAttrAmbiguity.ll | 9 + test/Assembler/2007-08-06-AliasInvalid.ll | 10 + test/Assembler/2007-09-10-AliasFwdRef.ll | 9 + test/Assembler/2007-09-29-GC.ll | 12 + .../Assembler/2007-11-26-AttributeOverload.ll | 4 + test/Assembler/2007-12-11-AddressSpaces.ll | 25 + test/Assembler/2008-01-11-VarargAttrs.ll | 10 + test/Assembler/2008-02-18-IntPointerCrash.ll | 6 + test/Assembler/2008-07-10-APInt.ll | 9 + test/Assembler/2008-09-02-FunctionNotes.ll | 21 + test/Assembler/2008-09-02-FunctionNotes2.ll | 6 + test/Assembler/2008-09-29-RetAttr.ll | 13 + test/Assembler/2008-10-14-QuoteInName.ll | 3 + .../Assembler/2009-02-01-UnnamedForwardRef.ll | 6 + test/Assembler/2009-02-28-CastOpc.ll | 7 + test/Assembler/2009-02-28-StripOpaqueName.ll | 6 + test/Assembler/2009-03-24-ZextConstantExpr.ll | 11 + test/Assembler/2009-04-25-AliasGEP.ll | 8 + test/Assembler/2009-07-24-ZeroArgGEP.ll | 5 + ...-02-05-FunctionLocalMetadataBecomesNull.ll | 34 + test/Assembler/ConstantExprFold.ll | 31 + test/Assembler/ConstantExprFoldCast.ll | 16 + test/Assembler/ConstantExprNoFold.ll | 26 + test/Assembler/MultipleReturnValueType.ll | 13 + test/Assembler/aggregate-constant-values.ll | 50 + .../aggregate-return-single-value.ll | 8 + test/Assembler/align-inst-alloca.ll | 6 + test/Assembler/align-inst-load.ll | 6 + test/Assembler/align-inst-store.ll | 6 + test/Assembler/align-inst.ll | 10 + test/Assembler/alignstack.ll | 36 + test/Assembler/anon-functions.ll | 26 + test/Assembler/atomic.ll | 26 + test/Assembler/attribute-builtin.ll | 50 + test/Assembler/auto_upgrade_intrinsics.ll | 59 + test/Assembler/bcwrap.ll | 11 + test/Assembler/comment.ll | 19 + test/Assembler/externally-initialized.ll | 5 + test/Assembler/extractvalue-invalid-idx.ll | 10 + test/Assembler/fast-math-flags.ll | 142 + test/Assembler/flags.ll | 276 + test/Assembler/functionlocal-metadata.ll | 56 + test/Assembler/getelementptr.ll | 37 + test/Assembler/getelementptr_struct.ll | 15 + test/Assembler/getelementptr_vec_idx1.ll | 10 + test/Assembler/getelementptr_vec_idx2.ll | 10 + test/Assembler/getelementptr_vec_idx3.ll | 10 + test/Assembler/getelementptr_vec_struct.ll | 10 + test/Assembler/global-addrspace-forwardref.ll | 8 + test/Assembler/half-constprop.ll | 17 + test/Assembler/half-conv.ll | 13 + test/Assembler/half.ll | 8 + test/Assembler/huge-array.ll | 7 + test/Assembler/insertextractvalue.ll | 46 + test/Assembler/insertvalue-invalid-idx.ll | 9 + test/Assembler/invalid-fwdref1.ll | 4 + test/Assembler/invalid_cast.ll | 8 + test/Assembler/invalid_cast2.ll | 8 + test/Assembler/metadata.ll | 19 + test/Assembler/named-metadata.ll | 24 + test/Assembler/numbered-values.ll | 16 + test/Assembler/select.ll | 9 + test/Assembler/tls-models.ll | 11 + test/Assembler/unnamed-addr.ll | 20 + test/Assembler/unnamed.ll | 51 + test/Assembler/vbool-cmp.ll | 18 + test/Assembler/vector-cmp.ll | 16 + test/Assembler/vector-select.ll | 11 + test/Assembler/vector-shift.ll | 45 + test/Assembler/x86mmx.ll | 8 + test/Bindings/Ocaml/analysis.ml | 54 + test/Bindings/Ocaml/bitreader.ml | 79 + test/Bindings/Ocaml/bitwriter.ml | 48 + test/Bindings/Ocaml/executionengine.ml | 118 + test/Bindings/Ocaml/ext_exc.ml | 20 + test/Bindings/Ocaml/ipo_opts.ml | 72 + test/Bindings/Ocaml/irreader.ml | 59 + test/Bindings/Ocaml/linker.ml | 63 + test/Bindings/Ocaml/lit.local.cfg | 5 + test/Bindings/Ocaml/passmgr_builder.ml | 64 + test/Bindings/Ocaml/scalar_opts.ml | 87 + test/Bindings/Ocaml/target.ml | 117 + test/Bindings/Ocaml/vectorize_opts.ml | 56 + test/Bindings/Ocaml/vmcore.ml | 1420 + test/Bindings/llvm-c/calc.test | 15 + test/Bindings/llvm-c/disassemble.test | 29 + test/Bindings/llvm-c/functions.ll | 31 + test/Bindings/llvm-c/globals.ll | 7 + test/Bindings/llvm-c/lit.local.cfg | 5 + test/Bitcode/2006-12-11-Cast-ConstExpr.ll | 10 + .../2009-06-11-FirstClassAggregateConstant.ll | 12 + test/Bitcode/arm32_neon_vcnt_upgrade.ll | 21 + test/Bitcode/attributes-3.3.ll | 236 + test/Bitcode/attributes-3.3.ll.bc | Bin 0 -> 1592 bytes test/Bitcode/attributes.ll | 241 + test/Bitcode/blockaddress.ll | 45 + test/Bitcode/case-ranges-3.3.ll | 67 + test/Bitcode/case-ranges-3.3.ll.bc | Bin 0 -> 560 bytes test/Bitcode/drop-debug-info.ll | 26 + test/Bitcode/extractelement.ll | 8 + test/Bitcode/flags.ll | 27 + .../Bitcode/function-encoding-rel-operands.ll | 49 + test/Bitcode/invalid.ll | 7 + test/Bitcode/invalid.ll.bc | Bin 0 -> 332 bytes test/Bitcode/metadata-2.ll | 87 + test/Bitcode/metadata.ll | 5 + test/Bitcode/null-type.ll | 4 + test/Bitcode/null-type.ll.bc | Bin 0 -> 312 bytes test/Bitcode/ptest-new.ll | 25 + test/Bitcode/ptest-old.ll | 25 + test/Bitcode/select.ll | 9 + test/Bitcode/shuffle.ll | 31 + test/Bitcode/ssse3_palignr.ll | 82 + test/Bitcode/upgrade-tbaa.ll | 23 + test/BugPoint/crash-narrowfunctiontest.ll | 13 + test/BugPoint/metadata.ll | 42 + test/BugPoint/remove_arguments_test.ll | 18 + test/CMakeLists.txt | 69 + test/CodeGen/AArch64/adc.ll | 54 + test/CodeGen/AArch64/addsub-shifted.ll | 295 + test/CodeGen/AArch64/addsub.ll | 127 + test/CodeGen/AArch64/addsub_ext.ll | 189 + test/CodeGen/AArch64/alloca.ll | 145 + test/CodeGen/AArch64/analyze-branch.ll | 231 + .../AArch64/atomic-ops-not-barriers.ll | 26 + test/CodeGen/AArch64/atomic-ops.ll | 1161 + test/CodeGen/AArch64/basic-pic.ll | 54 + test/CodeGen/AArch64/bitfield-insert-0.ll | 19 + test/CodeGen/AArch64/bitfield-insert.ll | 193 + test/CodeGen/AArch64/bitfield.ll | 218 + test/CodeGen/AArch64/blockaddress.ll | 27 + test/CodeGen/AArch64/bool-loads.ll | 55 + test/CodeGen/AArch64/breg.ll | 17 + test/CodeGen/AArch64/callee-save.ll | 86 + test/CodeGen/AArch64/code-model-large-abs.ll | 61 + test/CodeGen/AArch64/compare-branch.ll | 38 + test/CodeGen/AArch64/complex-copy-noneon.ll | 21 + test/CodeGen/AArch64/cond-sel.ll | 216 + test/CodeGen/AArch64/directcond.ll | 88 + test/CodeGen/AArch64/dp-3source.ll | 163 + test/CodeGen/AArch64/dp1.ll | 152 + test/CodeGen/AArch64/dp2.ll | 169 + test/CodeGen/AArch64/extern-weak.ll | 54 + test/CodeGen/AArch64/extract.ll | 57 + test/CodeGen/AArch64/fastcc-reserved.ll | 58 + test/CodeGen/AArch64/fastcc.ll | 123 + test/CodeGen/AArch64/fcmp.ll | 81 + test/CodeGen/AArch64/fcvt-fixed.ll | 191 + test/CodeGen/AArch64/fcvt-int.ll | 151 + test/CodeGen/AArch64/flags-multiuse.ll | 35 + test/CodeGen/AArch64/floatdp_1source.ll | 138 + test/CodeGen/AArch64/floatdp_2source.ll | 60 + test/CodeGen/AArch64/fp-cond-sel.ll | 26 + test/CodeGen/AArch64/fp-dp3.ll | 137 + test/CodeGen/AArch64/fp128-folding.ll | 17 + test/CodeGen/AArch64/fp128.ll | 279 + test/CodeGen/AArch64/fpimm.ll | 36 + test/CodeGen/AArch64/frameaddr.ll | 20 + test/CodeGen/AArch64/func-argpassing.ll | 197 + test/CodeGen/AArch64/func-calls.ll | 146 + test/CodeGen/AArch64/global-alignment.ll | 69 + test/CodeGen/AArch64/got-abuse.ll | 23 + test/CodeGen/AArch64/i128-align.ll | 29 + test/CodeGen/AArch64/illegal-float-ops.ll | 247 + test/CodeGen/AArch64/init-array.ll | 10 + .../AArch64/inline-asm-constraints-badI.ll | 7 + .../AArch64/inline-asm-constraints-badK.ll | 7 + .../AArch64/inline-asm-constraints-badK2.ll | 7 + .../AArch64/inline-asm-constraints-badL.ll | 7 + .../CodeGen/AArch64/inline-asm-constraints.ll | 137 + test/CodeGen/AArch64/inline-asm-modifiers.ll | 147 + test/CodeGen/AArch64/jump-table.ll | 49 + test/CodeGen/AArch64/large-consts.ll | 13 + test/CodeGen/AArch64/large-frame.ll | 119 + test/CodeGen/AArch64/ldst-regoffset.ll | 352 + test/CodeGen/AArch64/ldst-unscaledimm.ll | 223 + test/CodeGen/AArch64/ldst-unsignedimm.ll | 256 + test/CodeGen/AArch64/lit.local.cfg | 4 + test/CodeGen/AArch64/literal_pools.ll | 103 + test/CodeGen/AArch64/local_vars.ll | 57 + test/CodeGen/AArch64/logical-imm.ll | 84 + test/CodeGen/AArch64/logical_shifted_reg.ll | 224 + test/CodeGen/AArch64/movw-consts.ll | 124 + test/CodeGen/AArch64/movw-shift-encoding.ll | 14 + test/CodeGen/AArch64/neon-2velem-high.ll | 331 + test/CodeGen/AArch64/neon-2velem.ll | 2550 + test/CodeGen/AArch64/neon-3vdiff.ll | 1806 + test/CodeGen/AArch64/neon-aba-abd.ll | 236 + test/CodeGen/AArch64/neon-across.ll | 476 + test/CodeGen/AArch64/neon-add-pairwise.ll | 92 + test/CodeGen/AArch64/neon-add-sub.ll | 237 + test/CodeGen/AArch64/neon-bitcast.ll | 574 + .../AArch64/neon-bitwise-instructions.ll | 594 + test/CodeGen/AArch64/neon-bsl.ll | 222 + .../AArch64/neon-compare-instructions.ll | 1926 + test/CodeGen/AArch64/neon-copy.ll | 615 + test/CodeGen/AArch64/neon-crypto.ll | 149 + test/CodeGen/AArch64/neon-diagnostics.ll | 24 + test/CodeGen/AArch64/neon-extract.ll | 190 + test/CodeGen/AArch64/neon-facge-facgt.ll | 56 + test/CodeGen/AArch64/neon-fma.ll | 112 + test/CodeGen/AArch64/neon-frsqrt-frecp.ll | 54 + test/CodeGen/AArch64/neon-halving-add-sub.ll | 207 + test/CodeGen/AArch64/neon-max-min-pairwise.ll | 310 + test/CodeGen/AArch64/neon-max-min.ll | 310 + test/CodeGen/AArch64/neon-misc-scalar.ll | 60 + test/CodeGen/AArch64/neon-misc.ll | 1799 + test/CodeGen/AArch64/neon-mla-mls.ll | 88 + test/CodeGen/AArch64/neon-mov.ll | 217 + test/CodeGen/AArch64/neon-mul-div.ll | 181 + test/CodeGen/AArch64/neon-perm.ll | 1693 + .../AArch64/neon-rounding-halving-add.ll | 105 + test/CodeGen/AArch64/neon-rounding-shift.ll | 121 + .../AArch64/neon-saturating-add-sub.ll | 241 + .../AArch64/neon-saturating-rounding-shift.ll | 121 + test/CodeGen/AArch64/neon-saturating-shift.ll | 121 + test/CodeGen/AArch64/neon-scalar-abs.ll | 61 + test/CodeGen/AArch64/neon-scalar-add-sub.ll | 50 + .../AArch64/neon-scalar-by-elem-fma.ll | 108 + .../AArch64/neon-scalar-by-elem-mul.ll | 124 + test/CodeGen/AArch64/neon-scalar-compare.ll | 343 + test/CodeGen/AArch64/neon-scalar-copy.ll | 88 + test/CodeGen/AArch64/neon-scalar-cvt.ll | 137 + .../AArch64/neon-scalar-extract-narrow.ll | 104 + test/CodeGen/AArch64/neon-scalar-fabd.ll | 26 + test/CodeGen/AArch64/neon-scalar-fcvt.ll | 255 + .../CodeGen/AArch64/neon-scalar-fp-compare.ll | 328 + test/CodeGen/AArch64/neon-scalar-mul.ll | 143 + test/CodeGen/AArch64/neon-scalar-neg.ll | 61 + test/CodeGen/AArch64/neon-scalar-recip.ll | 116 + .../AArch64/neon-scalar-reduce-pairwise.ll | 247 + .../AArch64/neon-scalar-rounding-shift.ll | 39 + .../AArch64/neon-scalar-saturating-add-sub.ll | 242 + .../neon-scalar-saturating-rounding-shift.ll | 94 + .../AArch64/neon-scalar-saturating-shift.ll | 88 + test/CodeGen/AArch64/neon-scalar-shift-imm.ll | 531 + test/CodeGen/AArch64/neon-scalar-shift.ll | 38 + test/CodeGen/AArch64/neon-shift-left-long.ll | 193 + test/CodeGen/AArch64/neon-shift.ll | 171 + .../AArch64/neon-simd-ldst-multi-elem.ll | 2314 + test/CodeGen/AArch64/neon-simd-ldst-one.ll | 2113 + test/CodeGen/AArch64/neon-simd-ldst.ll | 164 + .../AArch64/neon-simd-post-ldst-multi-elem.ll | 354 + .../AArch64/neon-simd-post-ldst-one.ll | 319 + test/CodeGen/AArch64/neon-simd-shift.ll | 1556 + test/CodeGen/AArch64/neon-simd-tbl.ll | 828 + test/CodeGen/AArch64/neon-simd-vget.ll | 225 + test/CodeGen/AArch64/pic-eh-stubs.ll | 60 + .../AArch64/regress-bitcast-formals.ll | 11 + .../CodeGen/AArch64/regress-f128csel-flags.ll | 27 + test/CodeGen/AArch64/regress-fp128-livein.ll | 17 + test/CodeGen/AArch64/regress-tail-livereg.ll | 19 + test/CodeGen/AArch64/regress-tblgen-chains.ll | 36 + .../AArch64/regress-w29-reserved-with-fp.ll | 52 + .../AArch64/regress-wzr-allocatable.ll | 41 + test/CodeGen/AArch64/returnaddr.ll | 21 + test/CodeGen/AArch64/setcc-takes-i32.ll | 22 + test/CodeGen/AArch64/sibling-call.ll | 97 + test/CodeGen/AArch64/sincos-expansion.ll | 35 + test/CodeGen/AArch64/tail-call.ll | 94 + test/CodeGen/AArch64/tls-dynamic-together.ll | 18 + test/CodeGen/AArch64/tls-dynamics.ll | 121 + test/CodeGen/AArch64/tls-execs.ll | 63 + test/CodeGen/AArch64/tst-br.ll | 48 + test/CodeGen/AArch64/variadic.ll | 199 + test/CodeGen/AArch64/zero-reg.ll | 31 + test/CodeGen/ARM/2006-11-10-CycleInDAG.ll | 20 + test/CodeGen/ARM/2007-01-19-InfiniteLoop.ll | 108 + test/CodeGen/ARM/2007-03-07-CombinerCrash.ll | 21 + test/CodeGen/ARM/2007-03-13-InstrSched.ll | 52 + .../ARM/2007-03-21-JoinIntervalsCrash.ll | 96 + .../ARM/2007-03-27-RegScavengerAssert.ll | 35 + .../ARM/2007-03-30-RegScavengerAssert.ll | 101 + .../ARM/2007-04-02-RegScavengerAssert.ll | 55 + test/CodeGen/ARM/2007-04-03-PEIBug.ll | 12 + .../CodeGen/ARM/2007-04-03-UndefinedSymbol.ll | 99 + test/CodeGen/ARM/2007-04-30-CombinerCrash.ll | 32 + .../ARM/2007-05-03-BadPostIndexedLd.ll | 113 + test/CodeGen/ARM/2007-05-07-tailmerge-1.ll | 65 + test/CodeGen/ARM/2007-05-09-tailmerge-2.ll | 66 + .../ARM/2007-05-14-InlineAsmCstCrash.ll | 6 + .../ARM/2007-05-14-RegScavengerAssert.ll | 30 + test/CodeGen/ARM/2007-05-22-tailmerge-3.ll | 68 + .../ARM/2007-05-23-BadPreIndexedStore.ll | 34 + test/CodeGen/ARM/2007-08-15-ReuseBug.ll | 106 + .../ARM/2008-02-04-LocalRegAllocBug.ll | 19 + test/CodeGen/ARM/2008-02-29-RegAllocLocal.ll | 21 + test/CodeGen/ARM/2008-03-05-SxtInRegBug.ll | 14 + .../ARM/2008-03-07-RegScavengerAssert.ll | 20 + .../CodeGen/ARM/2008-04-04-ScavengerAssert.ll | 63 + .../CodeGen/ARM/2008-04-10-ScavengerAssert.ll | 253 + test/CodeGen/ARM/2008-04-11-PHIofImpDef.ll | 3544 + .../ARM/2008-05-19-LiveIntervalsBug.ll | 55 + .../CodeGen/ARM/2008-05-19-ScavengerAssert.ll | 22 + test/CodeGen/ARM/2008-07-17-Fdiv.ll | 6 + .../ARM/2008-07-24-CodeGenPrepCrash.ll | 9 + test/CodeGen/ARM/2008-08-07-AsmPrintBug.ll | 13 + test/CodeGen/ARM/2008-09-17-CoalescerBug.ll | 17 + .../CodeGen/ARM/2008-11-18-ScavengerAssert.ll | 16 + test/CodeGen/ARM/2009-02-16-SpillerBug.ll | 117 + .../ARM/2009-02-22-SoftenFloatVaArg.ll | 20 + test/CodeGen/ARM/2009-02-27-SpillerBug.ll | 229 + test/CodeGen/ARM/2009-03-07-SpillerBug.ll | 79 + test/CodeGen/ARM/2009-03-09-AddrModeBug.ll | 13 + test/CodeGen/ARM/2009-04-06-AsmModifier.ll | 20 + test/CodeGen/ARM/2009-04-08-AggregateAddr.ll | 18 + test/CodeGen/ARM/2009-04-08-FREM.ll | 9 + test/CodeGen/ARM/2009-04-08-FloatUndef.ll | 11 + .../CodeGen/ARM/2009-04-09-RegScavengerAsm.ll | 14 + test/CodeGen/ARM/2009-05-05-DAGCombineBug.ll | 11 + test/CodeGen/ARM/2009-05-07-RegAllocLocal.ll | 12 + .../ARM/2009-05-11-CodePlacementCrash.ll | 30 + test/CodeGen/ARM/2009-05-18-InlineAsmMem.ll | 9 + test/CodeGen/ARM/2009-06-02-ISelCrash.ll | 62 + test/CodeGen/ARM/2009-06-04-MissingLiveIn.ll | 263 + .../ARM/2009-06-15-RegScavengerAssert.ll | 344 + .../ARM/2009-06-19-RegScavengerAssert.ll | 30 + test/CodeGen/ARM/2009-06-22-CoalescerBug.ll | 43 + .../ARM/2009-06-30-RegScavengerAssert.ll | 122 + .../ARM/2009-06-30-RegScavengerAssert2.ll | 116 + .../ARM/2009-06-30-RegScavengerAssert3.ll | 128 + .../ARM/2009-06-30-RegScavengerAssert4.ll | 128 + .../ARM/2009-06-30-RegScavengerAssert5.ll | 99 + test/CodeGen/ARM/2009-07-01-CommuteBug.ll | 130 + .../ARM/2009-07-09-asm-p-constraint.ll | 7 + test/CodeGen/ARM/2009-07-18-RewriterBug.ll | 1323 + .../CodeGen/ARM/2009-07-22-ScavengerAssert.ll | 94 + .../CodeGen/ARM/2009-07-22-SchedulerAssert.ll | 95 + test/CodeGen/ARM/2009-07-29-VFP3Registers.ll | 108 + .../ARM/2009-08-02-RegScavengerAssert-Neon.ll | 29 + .../ARM/2009-08-04-RegScavengerAssert-2.ll | 33 + .../ARM/2009-08-04-RegScavengerAssert.ll | 25 + .../2009-08-15-RegScavenger-EarlyClobber.ll | 42 + .../ARM/2009-08-15-RegScavengerAssert.ll | 10 + test/CodeGen/ARM/2009-08-21-PostRAKill.ll | 40 + test/CodeGen/ARM/2009-08-21-PostRAKill2.ll | 38 + test/CodeGen/ARM/2009-08-21-PostRAKill3.ll | 33 + test/CodeGen/ARM/2009-08-23-linkerprivate.ll | 8 + test/CodeGen/ARM/2009-08-26-ScalarToVector.ll | 27 + test/CodeGen/ARM/2009-08-27-ScalarToVector.ll | 35 + test/CodeGen/ARM/2009-08-29-ExtractEltf32.ll | 25 + test/CodeGen/ARM/2009-08-29-TooLongSplat.ll | 23 + test/CodeGen/ARM/2009-08-31-LSDA-Name.ll | 102 + test/CodeGen/ARM/2009-08-31-TwoRegShuffle.ll | 9 + test/CodeGen/ARM/2009-09-09-AllOnes.ll | 10 + test/CodeGen/ARM/2009-09-09-fpcmp-ole.ll | 18 + test/CodeGen/ARM/2009-09-10-postdec.ll | 11 + test/CodeGen/ARM/2009-09-13-InvalidSubreg.ll | 61 + .../CodeGen/ARM/2009-09-13-InvalidSuperReg.ll | 41 + .../ARM/2009-09-20-LiveIntervalsBug.ll | 34 + .../ARM/2009-09-21-LiveVariablesBug.ll | 14 + .../ARM/2009-09-22-LiveVariablesBug.ll | 23 + .../ARM/2009-09-23-LiveVariablesBug.ll | 21 + test/CodeGen/ARM/2009-09-24-spill-align.ll | 17 + test/CodeGen/ARM/2009-09-27-CoalescerBug.ll | 24 + test/CodeGen/ARM/2009-09-28-LdStOptiBug.ll | 19 + test/CodeGen/ARM/2009-10-02-NEONSubregsBug.ll | 63 + test/CodeGen/ARM/2009-10-16-Scope.ll | 34 + test/CodeGen/ARM/2009-10-21-InvalidFNeg.ll | 48 + test/CodeGen/ARM/2009-10-27-double-align.ll | 15 + test/CodeGen/ARM/2009-10-30.ll | 17 + test/CodeGen/ARM/2009-11-01-NeonMoves.ll | 40 + test/CodeGen/ARM/2009-11-02-NegativeLane.ll | 21 + .../ARM/2009-11-07-SubRegAsmPrinting.ll | 66 + test/CodeGen/ARM/2009-11-13-CoalescerCrash.ll | 20 + .../CodeGen/ARM/2009-11-13-ScavengerAssert.ll | 42 + .../ARM/2009-11-13-ScavengerAssert2.ll | 123 + .../CodeGen/ARM/2009-11-13-VRRewriterCrash.ll | 113 + .../ARM/2009-11-30-LiveVariablesBug.ll | 41 + test/CodeGen/ARM/2009-12-02-vtrn-undef.ll | 33 + test/CodeGen/ARM/2010-03-04-eabi-fp-spill.ll | 65 + test/CodeGen/ARM/2010-03-04-stm-undef-addr.ll | 54 + test/CodeGen/ARM/2010-03-18-ldm-rtrn.ll | 15 + test/CodeGen/ARM/2010-04-09-NeonSelect.ll | 23 + test/CodeGen/ARM/2010-04-13-v2f64SplitArg.ll | 7 + test/CodeGen/ARM/2010-04-14-SplitVector.ll | 16 + .../ARM/2010-04-15-ScavengerDebugValue.ll | 32 + test/CodeGen/ARM/2010-05-14-IllegalType.ll | 10 + test/CodeGen/ARM/2010-05-17-FastAllocCrash.ll | 105 + .../CodeGen/ARM/2010-05-18-LocalAllocCrash.ll | 36 + test/CodeGen/ARM/2010-05-18-PostIndexBug.ll | 25 + test/CodeGen/ARM/2010-05-19-Shuffles.ll | 21 + test/CodeGen/ARM/2010-05-20-NEONSpillCrash.ll | 45 + test/CodeGen/ARM/2010-05-21-BuildVector.ll | 43 + .../CodeGen/ARM/2010-06-11-vmovdrr-bitcast.ll | 19 + .../CodeGen/ARM/2010-06-21-LdStMultipleBug.ll | 148 + test/CodeGen/ARM/2010-06-21-nondarwin-tc.ll | 146 + .../ARM/2010-06-25-Thumb2ITInvalidIterator.ll | 76 + .../ARM/2010-06-29-PartialRedefFastAlloc.ll | 25 + test/CodeGen/ARM/2010-06-29-SubregImpDefs.ll | 15 + test/CodeGen/ARM/2010-07-26-GlobalMerge.ll | 94 + test/CodeGen/ARM/2010-08-04-EHCrash.ll | 63 + test/CodeGen/ARM/2010-08-04-StackVariable.ll | 129 + test/CodeGen/ARM/2010-09-21-OptCmpBug.ll | 84 + .../ARM/2010-09-29-mc-asm-header-test.ll | 285 + test/CodeGen/ARM/2010-10-25-ifcvt-ldm.ll | 31 + .../ARM/2010-11-15-SpillEarlyClobber.ll | 85 + test/CodeGen/ARM/2010-11-29-PrologueBug.ll | 28 + test/CodeGen/ARM/2010-12-07-PEIBug.ll | 16 + test/CodeGen/ARM/2010-12-08-tpsoft.ll | 46 + test/CodeGen/ARM/2010-12-15-elf-lcomm.ll | 40 + .../ARM/2010-12-17-LocalStackSlotCrash.ll | 15 + .../CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll | 130 + .../CodeGen/ARM/2011-02-04-AntidepMultidef.ll | 128 + test/CodeGen/ARM/2011-02-07-AntidepClobber.ll | 89 + .../CodeGen/ARM/2011-03-10-DAGCombineCrash.ll | 47 + .../CodeGen/ARM/2011-03-15-LdStMultipleBug.ll | 44 + test/CodeGen/ARM/2011-03-23-PeepholeBug.ll | 41 + test/CodeGen/ARM/2011-04-07-schediv.ll | 32 + test/CodeGen/ARM/2011-04-11-MachineLICMBug.ll | 33 + test/CodeGen/ARM/2011-04-12-AlignBug.ll | 11 + test/CodeGen/ARM/2011-04-12-FastRegAlloc.ll | 15 + .../ARM/2011-04-15-AndVFlagPeepholeBug.ll | 22 + .../ARM/2011-04-15-RegisterCmpPeephole.ll | 41 + test/CodeGen/ARM/2011-04-26-SchedTweak.ll | 70 + test/CodeGen/ARM/2011-04-27-IfCvtBug.ll | 59 + .../ARM/2011-05-04-MultipleLandingPadSuccs.ll | 88 + test/CodeGen/ARM/2011-06-09-TailCallByVal.ll | 40 + test/CodeGen/ARM/2011-06-16-TailCallByVal.ll | 25 + .../ARM/2011-06-29-MergeGlobalsAlign.ll | 10 + test/CodeGen/ARM/2011-07-10-GlobalMergeBug.ll | 8 + .../CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll | 127 + .../CodeGen/ARM/2011-08-12-vmovqqqq-pseudo.ll | 12 + test/CodeGen/ARM/2011-08-25-ldmia_ret.ll | 100 + test/CodeGen/ARM/2011-08-29-SchedCycle.ll | 45 + test/CodeGen/ARM/2011-08-29-ldr_pre_imm.ll | 34 + .../ARM/2011-09-09-OddVectorDivision.ll | 23 + test/CodeGen/ARM/2011-09-19-cpsr.ll | 54 + test/CodeGen/ARM/2011-09-28-CMovCombineBug.ll | 30 + .../2011-10-26-ExpandUnalignedLoadCrash.ll | 22 + test/CodeGen/ARM/2011-10-26-memset-inline.ll | 21 + .../ARM/2011-10-26-memset-with-neon.ll | 12 + .../ARM/2011-11-07-PromoteVectorLoadStore.ll | 24 + .../ARM/2011-11-09-BitcastVectorDouble.ll | 15 + .../2011-11-09-IllegalVectorFPIntConvert.ll | 37 + test/CodeGen/ARM/2011-11-14-EarlyClobber.ll | 62 + test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll | 38 + .../ARM/2011-11-29-128bitArithmetics.ll | 333 + test/CodeGen/ARM/2011-11-30-MergeAlignment.ll | 24 + test/CodeGen/ARM/2011-12-14-machine-sink.ll | 46 + test/CodeGen/ARM/2011-12-19-sjlj-clobber.ll | 55 + test/CodeGen/ARM/2012-01-23-PostRA-LICM.ll | 101 + .../ARM/2012-01-24-RegSequenceLiveRange.ll | 72 + test/CodeGen/ARM/2012-01-26-CoalescerBug.ll | 21 + test/CodeGen/ARM/2012-01-26-CopyPropKills.ll | 118 + test/CodeGen/ARM/2012-02-01-CoalescerBug.ll | 26 + test/CodeGen/ARM/2012-03-05-FPSCR-bug.ll | 36 + test/CodeGen/ARM/2012-03-13-DAGCombineBug.ll | 15 + test/CodeGen/ARM/2012-03-26-FoldImmBug.ll | 33 + .../ARM/2012-04-02-TwoAddrInstrCrash.ll | 21 + test/CodeGen/ARM/2012-04-10-DAGCombine.ll | 28 + .../ARM/2012-04-24-SplitEHCriticalEdge.ll | 71 + test/CodeGen/ARM/2012-05-04-vmov.ll | 14 + .../ARM/2012-05-10-PreferVMOVtoVDUP32.ll | 14 + test/CodeGen/ARM/2012-05-29-TailDupBug.ll | 140 + .../CodeGen/ARM/2012-06-12-SchedMemLatency.ll | 39 + .../ARM/2012-08-04-DtripleSpillReload.ll | 172 + .../ARM/2012-08-08-legalize-unaligned.ll | 12 + test/CodeGen/ARM/2012-08-09-neon-extload.ll | 102 + test/CodeGen/ARM/2012-08-13-bfi.ll | 17 + test/CodeGen/ARM/2012-08-23-legalize-vmull.ll | 150 + .../ARM/2012-08-27-CopyPhysRegCrash.ll | 129 + test/CodeGen/ARM/2012-08-30-select.ll | 15 + test/CodeGen/ARM/2012-09-18-ARMv4ISelBug.ll | 11 + .../2012-09-25-InlineAsmScalarToVectorConv.ll | 11 + ...2012-09-25-InlineAsmScalarToVectorConv2.ll | 11 + .../ARM/2012-10-04-AAPCS-byval-align8.ll | 63 + .../ARM/2012-10-04-FixedFrame-vs-byval.ll | 19 + .../ARM/2012-10-04-LDRB_POST_IMM-Crash.ll | 16 + .../2012-10-18-PR14099-ByvalFrameAddress.ll | 29 + test/CodeGen/ARM/2012-11-14-subs_carry.ll | 31 + test/CodeGen/ARM/2013-01-21-PR14992.ll | 24 + test/CodeGen/ARM/2013-02-27-expand-vfma.ll | 31 + .../2013-04-05-Small-ByVal-Structs-PR15293.ll | 73 + .../CodeGen/ARM/2013-04-16-AAPCS-C4-vs-VFP.ll | 95 + .../CodeGen/ARM/2013-04-16-AAPCS-C5-vs-VFP.ll | 61 + .../ARM/2013-04-18-load-overlap-PR14824.ll | 82 + .../CodeGen/ARM/2013-04-21-AAPCS-VA-C.1.cp.ll | 28 + ...013-05-02-AAPCS-ByVal-Structs-C4-C5-VFP.ll | 48 + ...13-05-02-AAPCS-ByVal-Structs-C4-C5-VFP2.ll | 45 + test/CodeGen/ARM/2013-05-05-IfConvertBug.ll | 153 + .../ARM/2013-05-07-ByteLoadSameAddress.ll | 64 + .../ARM/2013-05-13-AAPCS-byval-padding.ll | 31 + .../ARM/2013-05-13-AAPCS-byval-padding2.ll | 25 + .../ARM/2013-05-13-DAGCombiner-undef-mask.ll | 10 + .../ARM/2013-05-31-char-shift-crash.ll | 21 + test/CodeGen/ARM/2013-06-03-ByVal-2Kbytes.ll | 30 + .../ARM/2013-07-29-vector-or-combine.ll | 32 + test/CodeGen/ARM/2013-10-11-select-stalls.ll | 16 + .../ARM/2013-11-08-inline-asm-neon-array.ll | 16 + test/CodeGen/ARM/DbgValueOtherTargets.test | 1 + test/CodeGen/ARM/MergeConsecutiveStores.ll | 98 + test/CodeGen/ARM/PR15053.ll | 13 + test/CodeGen/ARM/a15-SD-dep.ll | 117 + test/CodeGen/ARM/a15-mla.ll | 36 + test/CodeGen/ARM/a15-partial-update.ll | 38 + test/CodeGen/ARM/a15.ll | 6 + test/CodeGen/ARM/addrmode.ll | 16 + test/CodeGen/ARM/addrspacecast.ll | 7 + test/CodeGen/ARM/aliases.ll | 46 + test/CodeGen/ARM/align.ll | 42 + test/CodeGen/ARM/alloc-no-stack-realign.ll | 58 + test/CodeGen/ARM/alloca.ll | 12 + test/CodeGen/ARM/argaddr.ll | 19 + test/CodeGen/ARM/arguments-nosplit-double.ll | 9 + test/CodeGen/ARM/arguments-nosplit-i64.ll | 9 + test/CodeGen/ARM/arguments.ll | 43 + test/CodeGen/ARM/arguments2.ll | 9 + test/CodeGen/ARM/arguments3.ll | 9 + test/CodeGen/ARM/arguments4.ll | 9 + test/CodeGen/ARM/arguments5.ll | 9 + test/CodeGen/ARM/arguments6.ll | 9 + test/CodeGen/ARM/arguments7.ll | 9 + test/CodeGen/ARM/arguments8.ll | 9 + test/CodeGen/ARM/arguments_f64_backfill.ll | 9 + test/CodeGen/ARM/arm-and-tst-peephole.ll | 135 + test/CodeGen/ARM/arm-asm.ll | 7 + test/CodeGen/ARM/arm-frameaddr.ll | 17 + test/CodeGen/ARM/arm-modifier.ll | 73 + test/CodeGen/ARM/arm-negative-stride.ll | 47 + test/CodeGen/ARM/arm-returnaddr.ll | 28 + test/CodeGen/ARM/arm-ttype-target2.ll | 44 + test/CodeGen/ARM/armv4.ll | 13 + test/CodeGen/ARM/atomic-64bit.ll | 322 + test/CodeGen/ARM/atomic-cmp.ll | 15 + test/CodeGen/ARM/atomic-load-store.ll | 71 + test/CodeGen/ARM/atomic-op.ll | 196 + test/CodeGen/ARM/atomic-ops-v8.ll | 1344 + test/CodeGen/ARM/atomicrmw_minmax.ll | 21 + test/CodeGen/ARM/available_externally.ll | 16 + test/CodeGen/ARM/avoid-cpsr-rmw.ll | 116 + test/CodeGen/ARM/bfc.ll | 25 + test/CodeGen/ARM/bfi.ll | 76 + test/CodeGen/ARM/bfx.ll | 53 + test/CodeGen/ARM/bic.ll | 17 + test/CodeGen/ARM/bicZext.ll | 19 + test/CodeGen/ARM/bits.ll | 41 + test/CodeGen/ARM/bswap-inline-asm.ll | 9 + test/CodeGen/ARM/build-attributes-encoding.s | 85 + test/CodeGen/ARM/bx_fold.ll | 31 + test/CodeGen/ARM/byval_load_align.ll | 27 + test/CodeGen/ARM/call-noret-minsize.ll | 27 + test/CodeGen/ARM/call-noret.ll | 31 + test/CodeGen/ARM/call-tc.ll | 181 + test/CodeGen/ARM/call.ll | 36 + test/CodeGen/ARM/call_nolink.ll | 62 + test/CodeGen/ARM/carry.ll | 60 + test/CodeGen/ARM/clz.ll | 10 + test/CodeGen/ARM/cmn.ll | 22 + test/CodeGen/ARM/coalesce-dbgvalue.ll | 111 + test/CodeGen/ARM/coalesce-subregs.ll | 360 + test/CodeGen/ARM/code-placement.ll | 79 + test/CodeGen/ARM/commute-movcc.ll | 63 + test/CodeGen/ARM/compare-call.ll | 20 + test/CodeGen/ARM/constantfp.ll | 68 + test/CodeGen/ARM/constants.ll | 69 + test/CodeGen/ARM/copy-paired-reg.ll | 17 + test/CodeGen/ARM/crash-O0.ll | 28 + test/CodeGen/ARM/crash-greedy-v6.ll | 52 + test/CodeGen/ARM/crash-greedy.ll | 130 + test/CodeGen/ARM/crash-shufflevector.ll | 10 + test/CodeGen/ARM/crash.ll | 94 + test/CodeGen/ARM/cse-call.ll | 31 + test/CodeGen/ARM/cse-libcalls.ll | 30 + test/CodeGen/ARM/ctor_order.ll | 30 + test/CodeGen/ARM/ctors_dtors.ll | 25 + test/CodeGen/ARM/ctz.ll | 11 + .../CodeGen/ARM/dagcombine-anyexttozeroext.ll | 30 + test/CodeGen/ARM/dagcombine-concatvector.ll | 23 + test/CodeGen/ARM/darwin-eabi.ll | 24 + test/CodeGen/ARM/darwin-section-order.ll | 21 + test/CodeGen/ARM/data-in-code-annotations.ll | 42 + test/CodeGen/ARM/debug-info-arg.ll | 68 + test/CodeGen/ARM/debug-info-blocks.ll | 260 + test/CodeGen/ARM/debug-info-branch-folding.ll | 99 + test/CodeGen/ARM/debug-info-d16-reg.ll | 110 + test/CodeGen/ARM/debug-info-qreg.ll | 97 + test/CodeGen/ARM/debug-info-s16-reg.ll | 120 + test/CodeGen/ARM/debug-info-sreg2.ll | 65 + test/CodeGen/ARM/deps-fix.ll | 22 + test/CodeGen/ARM/div.ll | 50 + test/CodeGen/ARM/divmod-eabi.ll | 202 + test/CodeGen/ARM/divmod.ll | 94 + test/CodeGen/ARM/domain-conv-vmovs.ll | 120 + test/CodeGen/ARM/dyn-stackalloc.ll | 56 + test/CodeGen/ARM/eh-dispcont.ll | 89 + test/CodeGen/ARM/eh-resume-darwin.ll | 22 + test/CodeGen/ARM/ehabi-filters.ll | 73 + test/CodeGen/ARM/ehabi-no-landingpad.ll | 18 + test/CodeGen/ARM/ehabi-unwind.ll | 16 + test/CodeGen/ARM/ehabi.ll | 298 + test/CodeGen/ARM/elf-lcomm-align.ll | 15 + test/CodeGen/ARM/emit-big-cst.ll | 18 + test/CodeGen/ARM/extload-knownzero.ll | 26 + test/CodeGen/ARM/extloadi1.ll | 20 + test/CodeGen/ARM/fabs-neon.ll | 17 + test/CodeGen/ARM/fabss.ll | 29 + test/CodeGen/ARM/fadds.ll | 27 + test/CodeGen/ARM/fast-isel-GEP-coalesce.ll | 66 + test/CodeGen/ARM/fast-isel-align.ll | 144 + test/CodeGen/ARM/fast-isel-binary.ll | 117 + test/CodeGen/ARM/fast-isel-br-const.ll | 49 + test/CodeGen/ARM/fast-isel-br-phi.ll | 44 + .../ARM/fast-isel-call-multi-reg-return.ll | 18 + test/CodeGen/ARM/fast-isel-call.ll | 255 + test/CodeGen/ARM/fast-isel-cmp-imm.ll | 251 + test/CodeGen/ARM/fast-isel-conversion.ll | 243 + test/CodeGen/ARM/fast-isel-crash.ll | 22 + test/CodeGen/ARM/fast-isel-crash2.ll | 10 + test/CodeGen/ARM/fast-isel-deadcode.ll | 22 + test/CodeGen/ARM/fast-isel-ext.ll | 137 + test/CodeGen/ARM/fast-isel-fold.ll | 85 + test/CodeGen/ARM/fast-isel-frameaddr.ll | 98 + test/CodeGen/ARM/fast-isel-icmp.ll | 78 + test/CodeGen/ARM/fast-isel-indirectbr.ll | 18 + test/CodeGen/ARM/fast-isel-intrinsic.ll | 264 + test/CodeGen/ARM/fast-isel-ldr-str-arm.ll | 55 + .../ARM/fast-isel-ldr-str-thumb-neg-index.ll | 163 + test/CodeGen/ARM/fast-isel-ldrh-strh-arm.ll | 150 + .../ARM/fast-isel-load-store-verify.ll | 70 + test/CodeGen/ARM/fast-isel-mvn.ll | 108 + test/CodeGen/ARM/fast-isel-pic.ll | 65 + test/CodeGen/ARM/fast-isel-pred.ll | 59 + test/CodeGen/ARM/fast-isel-redefinition.ll | 11 + test/CodeGen/ARM/fast-isel-ret.ll | 58 + test/CodeGen/ARM/fast-isel-select.ll | 102 + test/CodeGen/ARM/fast-isel-shifter.ll | 51 + test/CodeGen/ARM/fast-isel-static.ll | 32 + test/CodeGen/ARM/fast-isel-vararg.ll | 47 + test/CodeGen/ARM/fast-isel.ll | 184 + test/CodeGen/ARM/fast-tail-call.ll | 16 + .../ARM/fastisel-gep-promote-before-add.ll | 18 + test/CodeGen/ARM/fcopysign.ll | 60 + test/CodeGen/ARM/fdivs.ll | 23 + test/CodeGen/ARM/fixunsdfdi.ll | 29 + test/CodeGen/ARM/flag-crash.ll | 27 + test/CodeGen/ARM/floorf.ll | 29 + test/CodeGen/ARM/fmacs.ll | 104 + test/CodeGen/ARM/fmdrr-fmrrd.ll | 13 + test/CodeGen/ARM/fmscs.ll | 35 + test/CodeGen/ARM/fmuls.ll | 36 + test/CodeGen/ARM/fnegs.ll | 61 + test/CodeGen/ARM/fnmacs.ll | 35 + test/CodeGen/ARM/fnmscs.ll | 90 + test/CodeGen/ARM/fnmul.ll | 11 + test/CodeGen/ARM/fnmuls.ll | 21 + test/CodeGen/ARM/fold-const.ll | 14 + test/CodeGen/ARM/fold-stack-adjust.ll | 164 + test/CodeGen/ARM/formal.ll | 8 + test/CodeGen/ARM/fp-arg-shuffle.ll | 11 + test/CodeGen/ARM/fp-fast.ll | 60 + test/CodeGen/ARM/fp.ll | 78 + test/CodeGen/ARM/fp16.ll | 32 + test/CodeGen/ARM/fp_convert.ll | 52 + test/CodeGen/ARM/fparith.ll | 101 + test/CodeGen/ARM/fpcmp-opt.ll | 79 + test/CodeGen/ARM/fpcmp.ll | 71 + test/CodeGen/ARM/fpcmp_ueq.ll | 16 + test/CodeGen/ARM/fpconsts.ll | 33 + test/CodeGen/ARM/fpconv.ll | 102 + test/CodeGen/ARM/fpmem.ll | 41 + test/CodeGen/ARM/fpow.ll | 9 + test/CodeGen/ARM/fpowi.ll | 15 + test/CodeGen/ARM/fptoint.ll | 49 + test/CodeGen/ARM/fsubs.ll | 16 + test/CodeGen/ARM/fusedMAC.ll | 224 + test/CodeGen/ARM/global-merge-addrspace.ll | 12 + test/CodeGen/ARM/global-merge.ll | 74 + test/CodeGen/ARM/globals.ll | 74 + .../CodeGen/ARM/gpr-paired-spill-thumbinst.ll | 30 + test/CodeGen/ARM/gpr-paired-spill.ll | 44 + test/CodeGen/ARM/gv-stubs-crash.ll | 36 + test/CodeGen/ARM/hardfloat_neon.ll | 13 + test/CodeGen/ARM/hello.ll | 14 + test/CodeGen/ARM/hidden-vis-2.ll | 12 + test/CodeGen/ARM/hidden-vis-3.ll | 17 + test/CodeGen/ARM/hidden-vis.ll | 23 + test/CodeGen/ARM/iabs.ll | 34 + test/CodeGen/ARM/ifconv-kills.ll | 30 + test/CodeGen/ARM/ifconv-regmask.ll | 35 + test/CodeGen/ARM/ifcvt1.ll | 21 + test/CodeGen/ARM/ifcvt10.ll | 43 + test/CodeGen/ARM/ifcvt11.ll | 59 + test/CodeGen/ARM/ifcvt12.ll | 15 + test/CodeGen/ARM/ifcvt2.ll | 42 + test/CodeGen/ARM/ifcvt3.ll | 24 + test/CodeGen/ARM/ifcvt4.ll | 40 + test/CodeGen/ARM/ifcvt5.ll | 31 + test/CodeGen/ARM/ifcvt6.ll | 20 + test/CodeGen/ARM/ifcvt7.ll | 32 + test/CodeGen/ARM/ifcvt8.ll | 19 + test/CodeGen/ARM/ifcvt9.ll | 12 + test/CodeGen/ARM/illegal-vector-bitcast.ll | 14 + test/CodeGen/ARM/imm.ll | 16 + test/CodeGen/ARM/indirect-reg-input.ll | 14 + test/CodeGen/ARM/indirectbr-2.ll | 46 + test/CodeGen/ARM/indirectbr-3.ll | 32 + test/CodeGen/ARM/indirectbr.ll | 70 + test/CodeGen/ARM/inlineasm-64bit.ll | 106 + test/CodeGen/ARM/inlineasm-imm-arm.ll | 31 + test/CodeGen/ARM/inlineasm.ll | 11 + test/CodeGen/ARM/inlineasm2.ll | 11 + test/CodeGen/ARM/inlineasm3.ll | 122 + test/CodeGen/ARM/inlineasm4.ll | 17 + test/CodeGen/ARM/insn-sched1.ll | 11 + test/CodeGen/ARM/int-to-fp.ll | 19 + test/CodeGen/ARM/integer_insertelement.ll | 35 + test/CodeGen/ARM/interrupt-attr.ll | 130 + test/CodeGen/ARM/intrinsics-crypto.ll | 57 + test/CodeGen/ARM/intrinsics-v8.ll | 19 + test/CodeGen/ARM/intrinsics.ll | 39 + test/CodeGen/ARM/invoke-donothing-assert.ll | 73 + test/CodeGen/ARM/ispositive.ll | 10 + test/CodeGen/ARM/jumptable-label.ll | 33 + test/CodeGen/ARM/large-stack.ll | 20 + test/CodeGen/ARM/ldm.ll | 46 + test/CodeGen/ARM/ldr.ll | 71 + test/CodeGen/ARM/ldr_ext.ll | 37 + test/CodeGen/ARM/ldr_frame.ll | 31 + test/CodeGen/ARM/ldr_post.ll | 26 + test/CodeGen/ARM/ldr_pre.ll | 24 + test/CodeGen/ARM/ldrd-memoper.ll | 15 + test/CodeGen/ARM/ldrd.ll | 97 + test/CodeGen/ARM/ldst-f32-2-i32.ll | 28 + test/CodeGen/ARM/ldstrex.ll | 139 + test/CodeGen/ARM/lit.local.cfg | 4 + test/CodeGen/ARM/load-address-masked.ll | 14 + test/CodeGen/ARM/load-global.ll | 50 + test/CodeGen/ARM/load.ll | 34 + test/CodeGen/ARM/load_i1_select.ll | 19 + test/CodeGen/ARM/log2_not_readnone.ll | 15 + test/CodeGen/ARM/long-setcc.ll | 17 + test/CodeGen/ARM/long.ll | 90 + test/CodeGen/ARM/longMAC.ll | 44 + test/CodeGen/ARM/long_shift.ll | 47 + test/CodeGen/ARM/lsr-code-insertion.ll | 64 + test/CodeGen/ARM/lsr-icmp-imm.ll | 33 + test/CodeGen/ARM/lsr-scale-addr-mode.ll | 19 + test/CodeGen/ARM/lsr-unfolded-offset.ll | 75 + test/CodeGen/ARM/machine-cse-cmp.ll | 79 + test/CodeGen/ARM/machine-licm.ll | 66 + test/CodeGen/ARM/mem.ll | 14 + test/CodeGen/ARM/memcpy-inline.ll | 115 + test/CodeGen/ARM/memfunc.ll | 32 + test/CodeGen/ARM/memset-inline.ll | 30 + test/CodeGen/ARM/misched-copy-arm.ll | 79 + test/CodeGen/ARM/mls.ll | 28 + test/CodeGen/ARM/movt-movw-global.ll | 39 + test/CodeGen/ARM/movt.ll | 19 + test/CodeGen/ARM/mul.ll | 22 + test/CodeGen/ARM/mul_const.ll | 85 + test/CodeGen/ARM/mulhi.ll | 54 + test/CodeGen/ARM/mult-alt-generic-arm.ll | 323 + test/CodeGen/ARM/mvn.ll | 74 + test/CodeGen/ARM/neon-fma.ll | 22 + test/CodeGen/ARM/neon-spfp.ll | 76 + test/CodeGen/ARM/neon_arith1.ll | 7 + test/CodeGen/ARM/neon_cmp.ll | 15 + test/CodeGen/ARM/neon_div.ll | 48 + test/CodeGen/ARM/neon_fpconv.ll | 42 + test/CodeGen/ARM/neon_ld1.ll | 30 + test/CodeGen/ARM/neon_ld2.ll | 59 + test/CodeGen/ARM/neon_minmax.ll | 81 + test/CodeGen/ARM/neon_shift.ll | 11 + test/CodeGen/ARM/neon_spill.ll | 49 + test/CodeGen/ARM/neon_vabs.ll | 91 + test/CodeGen/ARM/no-fpu.ll | 33 + test/CodeGen/ARM/nop_concat_vectors.ll | 13 + test/CodeGen/ARM/noreturn.ll | 50 + test/CodeGen/ARM/odr_comdat.ll | 16 + test/CodeGen/ARM/opt-shuff-tstore.ll | 19 + test/CodeGen/ARM/optselect-regclass.ll | 23 + test/CodeGen/ARM/pack.ll | 111 + test/CodeGen/ARM/peephole-bitcast.ll | 28 + test/CodeGen/ARM/phi.ll | 23 + test/CodeGen/ARM/pic.ll | 23 + test/CodeGen/ARM/popcnt.ll | 191 + test/CodeGen/ARM/pr13249.ll | 27 + test/CodeGen/ARM/pr3502.ll | 24 + test/CodeGen/ARM/prefetch-thumb.ll | 22 + test/CodeGen/ARM/prefetch.ll | 77 + test/CodeGen/ARM/private.ll | 21 + test/CodeGen/ARM/readcyclecounter.ll | 24 + test/CodeGen/ARM/reg_sequence.ll | 348 + test/CodeGen/ARM/ret0.ll | 5 + test/CodeGen/ARM/ret_arg1.ll | 5 + test/CodeGen/ARM/ret_arg2.ll | 6 + test/CodeGen/ARM/ret_arg3.ll | 5 + test/CodeGen/ARM/ret_arg4.ll | 5 + test/CodeGen/ARM/ret_arg5.ll | 5 + test/CodeGen/ARM/ret_f32_arg2.ll | 6 + test/CodeGen/ARM/ret_f32_arg5.ll | 6 + test/CodeGen/ARM/ret_f64_arg2.ll | 6 + test/CodeGen/ARM/ret_f64_arg_reg_split.ll | 6 + test/CodeGen/ARM/ret_f64_arg_split.ll | 6 + test/CodeGen/ARM/ret_f64_arg_stack.ll | 6 + test/CodeGen/ARM/ret_i128_arg2.ll | 6 + test/CodeGen/ARM/ret_i64_arg2.ll | 6 + test/CodeGen/ARM/ret_i64_arg3.ll | 6 + test/CodeGen/ARM/ret_i64_arg_split.ll | 6 + test/CodeGen/ARM/ret_sret_vector.ll | 12 + test/CodeGen/ARM/ret_void.ll | 6 + test/CodeGen/ARM/returned-ext.ll | 178 + test/CodeGen/ARM/returned-trunc-tail-calls.ll | 111 + test/CodeGen/ARM/rev.ll | 126 + test/CodeGen/ARM/sbfx.ll | 47 + test/CodeGen/ARM/section-name.ll | 25 + test/CodeGen/ARM/section.ll | 6 + test/CodeGen/ARM/select-imm.ll | 114 + test/CodeGen/ARM/select-undef.ll | 7 + test/CodeGen/ARM/select.ll | 140 + test/CodeGen/ARM/select_xform.ll | 224 + test/CodeGen/ARM/setcc-sentinals.ll | 14 + test/CodeGen/ARM/shifter_operand.ll | 75 + test/CodeGen/ARM/shuffle.ll | 18 + test/CodeGen/ARM/sincos.ll | 38 + .../CodeGen/ARM/sjlj-prepare-critical-edge.ll | 67 + test/CodeGen/ARM/smml.ll | 13 + test/CodeGen/ARM/smul.ll | 36 + test/CodeGen/ARM/spill-q.ll | 91 + test/CodeGen/ARM/stack-frame.ll | 13 + .../ARM/stack-protector-bmovpcb_call.ll | 32 + test/CodeGen/ARM/stm.ll | 16 + test/CodeGen/ARM/str_post.ll | 22 + test/CodeGen/ARM/str_pre-2.ll | 14 + test/CodeGen/ARM/str_pre.ll | 18 + test/CodeGen/ARM/str_trunc.ll | 16 + test/CodeGen/ARM/struct-byval-frame-index.ll | 219 + test/CodeGen/ARM/struct_byval.ll | 129 + test/CodeGen/ARM/struct_byval_arm_t1_t2.ll | 1523 + test/CodeGen/ARM/sub-cmp-peephole.ll | 146 + test/CodeGen/ARM/sub.ll | 50 + test/CodeGen/ARM/subreg-remat.ll | 52 + test/CodeGen/ARM/swift-atomics.ll | 45 + test/CodeGen/ARM/swift-vldm.ll | 29 + test/CodeGen/ARM/sxt_rot.ll | 30 + test/CodeGen/ARM/t2-imm.ll | 9 + test/CodeGen/ARM/tail-dup.ll | 40 + test/CodeGen/ARM/tail-opts.ll | 67 + test/CodeGen/ARM/test-sharedidx.ll | 96 + test/CodeGen/ARM/this-return.ll | 105 + test/CodeGen/ARM/thread_pointer.ll | 10 + test/CodeGen/ARM/thumb1-varalloc.ll | 42 + test/CodeGen/ARM/thumb2-it-block.ll | 21 + test/CodeGen/ARM/tls-models.ll | 117 + test/CodeGen/ARM/tls1.ll | 20 + test/CodeGen/ARM/tls2.ll | 27 + test/CodeGen/ARM/tls3.ll | 11 + test/CodeGen/ARM/trap.ll | 57 + test/CodeGen/ARM/trunc_ldr.ll | 24 + test/CodeGen/ARM/truncstore-dag-combine.ll | 18 + test/CodeGen/ARM/tst_teq.ll | 18 + test/CodeGen/ARM/twoaddrinstr.ll | 21 + test/CodeGen/ARM/uint64tof64.ll | 17 + test/CodeGen/ARM/umulo-32.ll | 41 + test/CodeGen/ARM/unaligned_load_store.ll | 77 + .../ARM/unaligned_load_store_vector.ll | 487 + test/CodeGen/ARM/undef-sext.ll | 14 + test/CodeGen/ARM/unord.ll | 14 + test/CodeGen/ARM/unsafe-fsub.ll | 18 + test/CodeGen/ARM/unwind-init.ll | 18 + test/CodeGen/ARM/uxt_rot.ll | 24 + test/CodeGen/ARM/uxtb.ll | 74 + test/CodeGen/ARM/v1-constant-fold.ll | 18 + test/CodeGen/ARM/va_arg.ll | 42 + test/CodeGen/ARM/vaba.ll | 221 + test/CodeGen/ARM/vabd.ll | 207 + test/CodeGen/ARM/vabs.ll | 131 + test/CodeGen/ARM/vadd.ll | 275 + test/CodeGen/ARM/vargs.ll | 12 + test/CodeGen/ARM/vargs_align.ll | 22 + test/CodeGen/ARM/vbits.ll | 547 + test/CodeGen/ARM/vbsl-constant.ll | 115 + test/CodeGen/ARM/vbsl.ll | 202 + test/CodeGen/ARM/vceq.ll | 92 + test/CodeGen/ARM/vcge.ll | 203 + test/CodeGen/ARM/vcgt.ll | 198 + test/CodeGen/ARM/vcnt.ll | 133 + test/CodeGen/ARM/vcombine.ll | 72 + test/CodeGen/ARM/vcvt-cost.ll | 153 + test/CodeGen/ARM/vcvt-v8.ll | 145 + test/CodeGen/ARM/vcvt.ll | 199 + test/CodeGen/ARM/vcvt_combine.ll | 95 + test/CodeGen/ARM/vdiv_combine.ll | 138 + test/CodeGen/ARM/vdup.ll | 333 + test/CodeGen/ARM/vector-DAGCombine.ll | 246 + test/CodeGen/ARM/vector-extend-narrow.ll | 75 + test/CodeGen/ARM/vext.ll | 198 + test/CodeGen/ARM/vfcmp.ll | 139 + test/CodeGen/ARM/vfloatintrinsics.ll | 377 + test/CodeGen/ARM/vfp.ll | 156 + test/CodeGen/ARM/vget_lane.ll | 233 + test/CodeGen/ARM/vhadd.ll | 249 + test/CodeGen/ARM/vhsub.ll | 125 + test/CodeGen/ARM/vicmp.ll | 113 + test/CodeGen/ARM/vld1.ll | 141 + test/CodeGen/ARM/vld2.ll | 155 + test/CodeGen/ARM/vld3.ll | 172 + test/CodeGen/ARM/vld4.ll | 173 + test/CodeGen/ARM/vlddup.ll | 214 + test/CodeGen/ARM/vldlane.ll | 521 + test/CodeGen/ARM/vldm-liveness.ll | 40 + test/CodeGen/ARM/vldm-sched-a9.ll | 71 + test/CodeGen/ARM/vminmax.ll | 293 + test/CodeGen/ARM/vminmaxnm.ll | 88 + test/CodeGen/ARM/vmla.ll | 215 + test/CodeGen/ARM/vmls.ll | 215 + test/CodeGen/ARM/vmov.ll | 400 + test/CodeGen/ARM/vmul.ll | 654 + test/CodeGen/ARM/vneg.ll | 121 + test/CodeGen/ARM/vpadal.ll | 125 + test/CodeGen/ARM/vpadd.ll | 169 + test/CodeGen/ARM/vpminmax.ll | 147 + test/CodeGen/ARM/vqadd.ll | 165 + test/CodeGen/ARM/vqdmul.ll | 288 + test/CodeGen/ARM/vqshl.ll | 531 + test/CodeGen/ARM/vqshrn.ll | 169 + test/CodeGen/ARM/vqsub.ll | 165 + test/CodeGen/ARM/vrec.ll | 119 + test/CodeGen/ARM/vrev.ll | 180 + test/CodeGen/ARM/vsel.ll | 309 + test/CodeGen/ARM/vselect_imax.ll | 119 + test/CodeGen/ARM/vshift.ll | 432 + test/CodeGen/ARM/vshiftins.ll | 155 + test/CodeGen/ARM/vshl.ll | 654 + test/CodeGen/ARM/vshll.ll | 83 + test/CodeGen/ARM/vshrn.ll | 57 + test/CodeGen/ARM/vsra.ll | 341 + test/CodeGen/ARM/vst1.ll | 130 + test/CodeGen/ARM/vst2.ll | 140 + test/CodeGen/ARM/vst3.ll | 140 + test/CodeGen/ARM/vst4.ll | 139 + test/CodeGen/ARM/vstlane.ll | 375 + test/CodeGen/ARM/vsub.ll | 275 + test/CodeGen/ARM/vtbl.ll | 109 + test/CodeGen/ARM/vtrn.ll | 124 + test/CodeGen/ARM/vuzp.ll | 102 + test/CodeGen/ARM/vzip.ll | 102 + test/CodeGen/ARM/warn-stack.ll | 24 + test/CodeGen/ARM/weak.ll | 16 + test/CodeGen/ARM/weak2.ll | 18 + test/CodeGen/ARM/widen-vmovs.ll | 36 + test/CodeGen/ARM/zextload_demandedbits.ll | 35 + test/CodeGen/CPP/2007-06-16-Funcname.ll | 7 + test/CodeGen/CPP/2009-05-01-Long-Double.ll | 13 + test/CodeGen/CPP/2009-05-04-CondBr.ll | 28 + test/CodeGen/CPP/2012-02-05-UnitVarCrash.ll | 6 + test/CodeGen/CPP/lit.local.cfg | 4 + .../2002-04-14-UnexpectedUnsignedType.ll | 13 + .../2002-04-16-StackFrameSizeAlignment.ll | 14 + test/CodeGen/Generic/2003-05-27-phifcmpd.ll | 19 + .../Generic/2003-05-27-useboolinotherbb.ll | 13 + .../Generic/2003-05-27-usefsubasbool.ll | 14 + test/CodeGen/Generic/2003-05-28-ManyArgs.ll | 153 + test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll | 39 + .../Generic/2003-05-30-BadPreselectPhi.ll | 33 + test/CodeGen/Generic/2003-07-06-BadIntCmp.ll | 51 + .../Generic/2003-07-07-BadLongConst.ll | 20 + .../Generic/2003-07-08-BadCastToBool.ll | 34 + .../Generic/2003-07-29-BadConstSbyte.ll | 40 + .../2004-05-09-LiveVarPartialRegister.ll | 13 + .../Generic/2005-01-18-SetUO-InfLoop.ll | 20 + .../CodeGen/Generic/2005-04-09-GlobalInPHI.ll | 20 + .../Generic/2005-10-18-ZeroSizeStackObject.ll | 6 + .../CodeGen/Generic/2005-10-21-longlonggtu.ll | 16 + test/CodeGen/Generic/2005-12-01-Crash.ll | 20 + .../Generic/2005-12-12-ExpandSextInreg.ll | 7 + .../Generic/2006-01-12-BadSetCCFold.ll | 35 + .../2006-01-18-InvalidBranchOpcodeAssert.ll | 15 + .../Generic/2006-02-12-InsertLibcall.ll | 60 + .../Generic/2006-03-01-dagcombineinfloop.ll | 95 + test/CodeGen/Generic/2006-04-26-SetCCAnd.ll | 40 + .../Generic/2006-04-28-Sign-extend-bool.ll | 9 + .../Generic/2006-05-06-GEP-Cast-Sink-Crash.ll | 29 + .../Generic/2006-06-12-LowerSwitchCrash.ll | 10 + .../2006-06-13-ComputeMaskedBitsCrash.ll | 35 + .../Generic/2006-06-28-SimplifySetCCCrash.ll | 279 + test/CodeGen/Generic/2006-07-03-schedulers.ll | 32 + .../Generic/2006-08-30-CoalescerCrash.ll | 112 + .../Generic/2006-09-02-LocalAllocCrash.ll | 117 + .../Generic/2006-09-06-SwitchLowering.ll | 96 + .../CodeGen/Generic/2006-10-27-CondFolding.ll | 21 + test/CodeGen/Generic/2006-10-29-Crash.ll | 22 + .../Generic/2006-11-20-DAGCombineCrash.ll | 41 + .../Generic/2007-01-15-LoadSelectCycle.ll | 12 + test/CodeGen/Generic/2007-02-25-invoke.ll | 16 + .../2007-04-08-MultipleFrameIndices.ll | 11 + .../Generic/2007-04-13-SwitchLowerBadPhi.ll | 24 + test/CodeGen/Generic/2007-04-17-lsr-crash.ll | 35 + .../Generic/2007-04-27-InlineAsm-X-Dest.ll | 8 + .../Generic/2007-04-27-LargeMemObject.ll | 13 + .../2007-04-30-LandingPadBranchFolding.ll | 63 + test/CodeGen/Generic/2007-05-03-EHTypeInfo.ll | 12 + .../Generic/2007-05-15-InfiniteRecursion.ll | 90 + test/CodeGen/Generic/2007-12-17-InvokeAsm.ll | 17 + .../Generic/2007-12-31-UnusedSelector.ll | 35 + .../Generic/2008-01-25-dag-combine-mul.ll | 31 + test/CodeGen/Generic/2008-01-30-LoadCrash.ll | 19 + test/CodeGen/Generic/2008-02-04-Ctlz.ll | 21 + .../Generic/2008-02-04-ExtractSubvector.ll | 14 + .../CodeGen/Generic/2008-02-20-MatchingMem.ll | 10 + test/CodeGen/Generic/2008-02-25-NegateZero.ll | 14 + .../Generic/2008-02-26-NegatableCrash.ll | 50 + .../Generic/2008-08-07-PtrToInt-SmallerInt.ll | 5 + test/CodeGen/Generic/2009-03-17-LSR-APInt.ll | 120 + .../2009-03-29-SoftFloatVectorExtract.ll | 10 + test/CodeGen/Generic/2009-04-10-SinkCrash.ll | 16 + .../Generic/2009-04-28-i128-cmp-crash.ll | 32 + .../Generic/2009-11-16-BadKillsCrash.ll | 77 + .../Generic/2010-07-27-DAGCombineCrash.ll | 6 + test/CodeGen/Generic/2010-11-04-BigByval.ll | 11 + test/CodeGen/Generic/2010-ZeroSizedArg.ll | 17 + .../Generic/2011-01-06-BigNumberCrash.ll | 15 + .../Generic/2011-07-07-ScheduleDAGCrash.ll | 19 + test/CodeGen/Generic/2012-06-08-APIntCrash.ll | 9 + .../Generic/2013-03-20-APFloatCrash.ll | 7 + test/CodeGen/Generic/APIntLoadStore.ll | 2049 + test/CodeGen/Generic/APIntParam.ll | 1537 + test/CodeGen/Generic/APIntSextParam.ll | 1537 + test/CodeGen/Generic/APIntZextParam.ll | 1537 + test/CodeGen/Generic/BasicInstrs.ll | 54 + test/CodeGen/Generic/ConstantExprLowering.ll | 22 + test/CodeGen/Generic/MachineBranchProb.ll | 32 + test/CodeGen/Generic/Makefile | 23 + test/CodeGen/Generic/add-with-overflow-128.ll | 34 + test/CodeGen/Generic/add-with-overflow-24.ll | 42 + test/CodeGen/Generic/add-with-overflow.ll | 41 + test/CodeGen/Generic/addr-label.ll | 81 + test/CodeGen/Generic/annotate.ll | 15 + test/CodeGen/Generic/asm-large-immediate.ll | 10 + test/CodeGen/Generic/badCallArgLRLLVM.ll | 31 + test/CodeGen/Generic/badFoldGEP.ll | 27 + test/CodeGen/Generic/badarg6.ll | 32 + test/CodeGen/Generic/bool-to-double.ll | 6 + test/CodeGen/Generic/builtin-expect.ll | 223 + test/CodeGen/Generic/call-ret0.ll | 10 + test/CodeGen/Generic/call-ret42.ll | 10 + test/CodeGen/Generic/call-void.ll | 11 + test/CodeGen/Generic/call2-ret0.ll | 16 + test/CodeGen/Generic/cast-fp.ll | 33 + test/CodeGen/Generic/constindices.ll | 44 + test/CodeGen/Generic/crash.ll | 65 + test/CodeGen/Generic/dag-combine-crash.ll | 21 + test/CodeGen/Generic/dbg_value.ll | 14 + test/CodeGen/Generic/div-neg-power-2.ll | 7 + test/CodeGen/Generic/donothing.ll | 31 + test/CodeGen/Generic/edge-bundles-blockIDs.ll | 81 + test/CodeGen/Generic/empty-load-store.ll | 18 + test/CodeGen/Generic/exception-handling.ll | 29 + test/CodeGen/Generic/externally_available.ll | 10 + test/CodeGen/Generic/fastcall.ll | 14 + test/CodeGen/Generic/fneg-fabs.ll | 26 + test/CodeGen/Generic/fp-to-int-invalid.ll | 18 + test/CodeGen/Generic/fp_to_int.ll | 81 + test/CodeGen/Generic/fpowi-promote.ll | 11 + test/CodeGen/Generic/fwdtwice.ll | 29 + test/CodeGen/Generic/global-ret0.ll | 8 + test/CodeGen/Generic/hello.ll | 11 + test/CodeGen/Generic/i128-addsub.ll | 39 + test/CodeGen/Generic/i128-arith.ll | 11 + .../CodeGen/Generic/inline-asm-mem-clobber.ll | 21 + .../Generic/inline-asm-special-strings.ll | 6 + test/CodeGen/Generic/intrinsics.ll | 40 + test/CodeGen/Generic/invalid-memcpy.ll | 17 + test/CodeGen/Generic/isunord.ll | 9 + test/CodeGen/Generic/llvm-ct-intrinsics.ll | 62 + ...e-return-values-cross-block-with-invoke.ll | 21 + test/CodeGen/Generic/negintconst.ll | 47 + test/CodeGen/Generic/nested-select.ll | 19 + test/CodeGen/Generic/overflow.ll | 220 + test/CodeGen/Generic/pr12507.ll | 18 + test/CodeGen/Generic/pr2625.ll | 17 + test/CodeGen/Generic/pr3288.ll | 67 + test/CodeGen/Generic/print-add.ll | 18 + test/CodeGen/Generic/print-after.ll | 6 + test/CodeGen/Generic/print-arith-fp.ll | 61 + test/CodeGen/Generic/print-arith-int.ll | 84 + test/CodeGen/Generic/print-int.ll | 13 + test/CodeGen/Generic/print-machineinstrs.ll | 14 + test/CodeGen/Generic/print-mul-exp.ll | 55 + test/CodeGen/Generic/print-mul.ll | 32 + test/CodeGen/Generic/print-shift.ll | 34 + test/CodeGen/Generic/ptr-annotate.ll | 18 + test/CodeGen/Generic/ret0.ll | 5 + test/CodeGen/Generic/ret42.ll | 5 + test/CodeGen/Generic/select-cc.ll | 9 + test/CodeGen/Generic/select.ll | 195 + test/CodeGen/Generic/shift-int64.ll | 12 + test/CodeGen/Generic/stacksave-restore.ll | 14 + test/CodeGen/Generic/stop-after.ll | 10 + test/CodeGen/Generic/storetrunc-fp.ll | 8 + test/CodeGen/Generic/switch-lower-feature.ll | 63 + test/CodeGen/Generic/switch-lower.ll | 348 + test/CodeGen/Generic/trap.ll | 9 + test/CodeGen/Generic/undef-phi.ll | 26 + test/CodeGen/Generic/v-split.ll | 11 + test/CodeGen/Generic/vector-casts.ll | 45 + test/CodeGen/Generic/vector-constantexpr.ll | 7 + .../Generic/vector-identity-shuffle.ll | 17 + test/CodeGen/Generic/vector.ll | 159 + test/CodeGen/Generic/zero-sized-array.ll | 81 + test/CodeGen/Hexagon/BranchPredict.ll | 76 + test/CodeGen/Hexagon/absaddr-store.ll | 46 + test/CodeGen/Hexagon/absimm.ll | 18 + test/CodeGen/Hexagon/adde.ll | 34 + test/CodeGen/Hexagon/always-ext.ll | 45 + test/CodeGen/Hexagon/args.ll | 14 + test/CodeGen/Hexagon/ashift-left-right.ll | 21 + test/CodeGen/Hexagon/block-addr.ll | 64 + test/CodeGen/Hexagon/cext-check.ll | 57 + test/CodeGen/Hexagon/cext-valid-packet1.ll | 18 + test/CodeGen/Hexagon/cext-valid-packet2.ll | 43 + test/CodeGen/Hexagon/cmp-to-genreg.ll | 34 + test/CodeGen/Hexagon/cmp-to-predreg.ll | 43 + test/CodeGen/Hexagon/cmp_pred.ll | 115 + test/CodeGen/Hexagon/cmp_pred2.ll | 87 + test/CodeGen/Hexagon/cmp_pred_reg.ll | 115 + test/CodeGen/Hexagon/cmpb_pred.ll | 89 + test/CodeGen/Hexagon/combine.ll | 17 + test/CodeGen/Hexagon/combine_ir.ll | 45 + test/CodeGen/Hexagon/convertdptoint.ll | 26 + test/CodeGen/Hexagon/convertdptoll.ll | 27 + test/CodeGen/Hexagon/convertsptoint.ll | 26 + test/CodeGen/Hexagon/convertsptoll.ll | 27 + test/CodeGen/Hexagon/ctlz-cttz-ctpop.ll | 34 + test/CodeGen/Hexagon/dadd.ll | 19 + test/CodeGen/Hexagon/dmul.ll | 18 + test/CodeGen/Hexagon/double.ll | 22 + .../Hexagon/doubleconvert-ieee-rnd-near.ll | 26 + test/CodeGen/Hexagon/dsub.ll | 18 + test/CodeGen/Hexagon/dualstore.ll | 17 + test/CodeGen/Hexagon/extload-combine.ll | 80 + test/CodeGen/Hexagon/fadd.ll | 18 + test/CodeGen/Hexagon/fcmp.ll | 37 + test/CodeGen/Hexagon/float.ll | 22 + .../Hexagon/floatconvert-ieee-rnd-near.ll | 22 + test/CodeGen/Hexagon/fmul.ll | 19 + test/CodeGen/Hexagon/frame.ll | 23 + test/CodeGen/Hexagon/fsub.ll | 18 + test/CodeGen/Hexagon/fusedandshift.ll | 16 + test/CodeGen/Hexagon/gp-plus-offset-load.ll | 51 + test/CodeGen/Hexagon/gp-plus-offset-store.ll | 35 + test/CodeGen/Hexagon/gp-rel.ll | 33 + test/CodeGen/Hexagon/hwloop-cleanup.ll | 86 + test/CodeGen/Hexagon/hwloop-const.ll | 27 + test/CodeGen/Hexagon/hwloop-dbg.ll | 64 + test/CodeGen/Hexagon/hwloop-le.ll | 438 + test/CodeGen/Hexagon/hwloop-lt.ll | 438 + test/CodeGen/Hexagon/hwloop-lt1.ll | 32 + test/CodeGen/Hexagon/hwloop-ne.ll | 438 + test/CodeGen/Hexagon/i16_VarArg.ll | 40 + test/CodeGen/Hexagon/i1_VarArg.ll | 44 + test/CodeGen/Hexagon/i8_VarArg.ll | 40 + .../Hexagon/idxload-with-zero-offset.ll | 70 + test/CodeGen/Hexagon/indirect-br.ll | 14 + test/CodeGen/Hexagon/lit.local.cfg | 4 + test/CodeGen/Hexagon/macint.ll | 14 + test/CodeGen/Hexagon/memops.ll | 1364 + test/CodeGen/Hexagon/memops1.ll | 33 + test/CodeGen/Hexagon/memops2.ll | 28 + test/CodeGen/Hexagon/memops3.ll | 28 + test/CodeGen/Hexagon/misaligned-access.ll | 16 + test/CodeGen/Hexagon/mpy.ll | 19 + test/CodeGen/Hexagon/newvaluejump.ll | 33 + test/CodeGen/Hexagon/newvaluejump2.ll | 30 + test/CodeGen/Hexagon/newvaluestore.ll | 22 + test/CodeGen/Hexagon/opt-fabs.ll | 15 + test/CodeGen/Hexagon/opt-fneg.ll | 26 + test/CodeGen/Hexagon/packetize_cond_inst.ll | 32 + test/CodeGen/Hexagon/postinc-load.ll | 29 + test/CodeGen/Hexagon/postinc-store.ll | 29 + test/CodeGen/Hexagon/pred-absolute-store.ll | 19 + test/CodeGen/Hexagon/pred-gp.ll | 28 + test/CodeGen/Hexagon/pred-instrs.ll | 30 + test/CodeGen/Hexagon/predicate-copy.ll | 8 + test/CodeGen/Hexagon/remove_lsr.ll | 76 + test/CodeGen/Hexagon/simpletailcall.ll | 14 + test/CodeGen/Hexagon/split-const32-const64.ll | 26 + test/CodeGen/Hexagon/static.ll | 20 + test/CodeGen/Hexagon/struct_args.ll | 16 + test/CodeGen/Hexagon/struct_args_large.ll | 16 + test/CodeGen/Hexagon/sube.ll | 29 + test/CodeGen/Hexagon/tail-call-trunc.ll | 28 + test/CodeGen/Hexagon/tfr-to-combine.ll | 35 + test/CodeGen/Hexagon/union-1.ll | 19 + test/CodeGen/Hexagon/vaddh.ll | 16 + test/CodeGen/Hexagon/validate-offset.ll | 36 + test/CodeGen/Hexagon/zextloadi1.ll | 25 + test/CodeGen/Inputs/DbgValueOtherTargets.ll | 30 + test/CodeGen/MSP430/2009-05-10-CyclicDAG.ll | 32 + test/CodeGen/MSP430/2009-05-17-Rot.ll | 17 + test/CodeGen/MSP430/2009-05-17-Shift.ll | 15 + test/CodeGen/MSP430/2009-05-19-DoubleSplit.ll | 11 + .../MSP430/2009-08-25-DynamicStackAlloc.ll | 30 + .../CodeGen/MSP430/2009-09-18-AbsoluteAddr.ll | 22 + test/CodeGen/MSP430/2009-10-10-OrImpDef.ll | 14 + .../CodeGen/MSP430/2009-11-05-8BitLibcalls.ll | 22 + .../CodeGen/MSP430/2009-11-08-InvalidResNo.ll | 64 + test/CodeGen/MSP430/2009-11-20-NewNode.ll | 36 + test/CodeGen/MSP430/2009-12-21-FrameAddr.ll | 13 + test/CodeGen/MSP430/2009-12-22-InlineAsm.ll | 29 + test/CodeGen/MSP430/2010-05-01-CombinerAnd.ll | 27 + test/CodeGen/MSP430/AddrMode-bis-rx.ll | 74 + test/CodeGen/MSP430/AddrMode-bis-xr.ll | 81 + test/CodeGen/MSP430/AddrMode-mov-rx.ll | 67 + test/CodeGen/MSP430/AddrMode-mov-xr.ll | 67 + test/CodeGen/MSP430/DbgValueOtherTargets.test | 1 + test/CodeGen/MSP430/Inst16mi.ll | 48 + test/CodeGen/MSP430/Inst16mm.ll | 69 + test/CodeGen/MSP430/Inst16mr.ll | 58 + test/CodeGen/MSP430/Inst16ri.ll | 37 + test/CodeGen/MSP430/Inst16rm.ll | 46 + test/CodeGen/MSP430/Inst16rr.ll | 45 + test/CodeGen/MSP430/Inst8mi.ll | 48 + test/CodeGen/MSP430/Inst8mm.ll | 55 + test/CodeGen/MSP430/Inst8mr.ll | 58 + test/CodeGen/MSP430/Inst8ri.ll | 37 + test/CodeGen/MSP430/Inst8rm.ll | 46 + test/CodeGen/MSP430/Inst8rr.ll | 46 + test/CodeGen/MSP430/bit.ll | 166 + test/CodeGen/MSP430/byval.ll | 26 + test/CodeGen/MSP430/cc_args.ll | 118 + test/CodeGen/MSP430/cc_ret.ll | 61 + test/CodeGen/MSP430/fp.ll | 17 + test/CodeGen/MSP430/indirectbr.ll | 41 + test/CodeGen/MSP430/indirectbr2.ll | 29 + test/CodeGen/MSP430/inline-asm.ll | 26 + test/CodeGen/MSP430/jumptable.ll | 54 + test/CodeGen/MSP430/lit.local.cfg | 4 + .../CodeGen/MSP430/mult-alt-generic-msp430.ll | 323 + test/CodeGen/MSP430/postinc.ll | 114 + test/CodeGen/MSP430/setcc.ll | 114 + test/CodeGen/MSP430/shifts.ll | 51 + .../MSP430/transient-stack-alignment.ll | 17 + test/CodeGen/MSP430/vararg.ll | 50 + test/CodeGen/Mips/2008-06-05-Carry.ll | 22 + test/CodeGen/Mips/2008-07-03-SRet.ll | 18 + test/CodeGen/Mips/2008-07-06-fadd64.ll | 8 + test/CodeGen/Mips/2008-07-07-FPExtend.ll | 8 + test/CodeGen/Mips/2008-07-07-Float2Int.ll | 17 + .../Mips/2008-07-07-IntDoubleConvertions.ll | 34 + .../Mips/2008-07-15-InternalConstant.ll | 23 + test/CodeGen/Mips/2008-07-15-SmallSection.ll | 35 + test/CodeGen/Mips/2008-07-16-SignExtInReg.ll | 18 + test/CodeGen/Mips/2008-07-22-Cstpool.ll | 13 + test/CodeGen/Mips/2008-07-23-fpcmp.ll | 38 + test/CodeGen/Mips/2008-07-29-icmp.ll | 15 + test/CodeGen/Mips/2008-07-31-fcopysign.ll | 18 + test/CodeGen/Mips/2008-08-01-AsmInline.ll | 71 + test/CodeGen/Mips/2008-08-03-ReturnDouble.ll | 18 + test/CodeGen/Mips/2008-08-03-fabs64.ll | 18 + test/CodeGen/Mips/2008-08-04-Bitconvert.ll | 15 + test/CodeGen/Mips/2008-08-06-Alloca.ll | 15 + test/CodeGen/Mips/2008-08-07-CC.ll | 12 + test/CodeGen/Mips/2008-08-07-FPRound.ll | 8 + test/CodeGen/Mips/2008-08-08-bswap.ll | 15 + test/CodeGen/Mips/2008-08-08-ctlz.ll | 10 + test/CodeGen/Mips/2008-10-13-LegalizerBug.ll | 29 + test/CodeGen/Mips/2008-11-10-xint_to_fp.ll | 54 + test/CodeGen/Mips/2009-11-16-CstPoolLoad.ll | 23 + test/CodeGen/Mips/2010-07-20-Switch.ll | 72 + test/CodeGen/Mips/2010-11-09-CountLeading.ll | 33 + test/CodeGen/Mips/2010-11-09-Mul.ll | 15 + .../Mips/2011-05-26-BranchKillsVreg.ll | 43 + test/CodeGen/Mips/2012-12-12-ExpandMemcpy.ll | 11 + test/CodeGen/Mips/2013-11-18-fp64-const0.ll | 31 + test/CodeGen/Mips/DbgValueOtherTargets.test | 1 + test/CodeGen/Mips/addc.ll | 13 + test/CodeGen/Mips/addi.ll | 30 + test/CodeGen/Mips/addressing-mode.ll | 41 + test/CodeGen/Mips/align16.ll | 31 + test/CodeGen/Mips/alloca.ll | 85 + test/CodeGen/Mips/alloca16.ll | 75 + test/CodeGen/Mips/analyzebranch.ll | 44 + test/CodeGen/Mips/and1.ll | 17 + test/CodeGen/Mips/asm-large-immediate.ll | 10 + test/CodeGen/Mips/atomic.ll | 436 + test/CodeGen/Mips/atomicops.ll | 40 + test/CodeGen/Mips/beqzc.ll | 20 + test/CodeGen/Mips/beqzc1.ll | 24 + test/CodeGen/Mips/biggot.ll | 50 + test/CodeGen/Mips/blez_bgez.ll | 36 + test/CodeGen/Mips/blockaddr.ll | 61 + test/CodeGen/Mips/br-jmp.ll | 18 + test/CodeGen/Mips/brconeq.ll | 38 + test/CodeGen/Mips/brconeqk.ll | 22 + test/CodeGen/Mips/brconeqz.ll | 20 + test/CodeGen/Mips/brconge.ll | 37 + test/CodeGen/Mips/brcongt.ll | 25 + test/CodeGen/Mips/brconle.ll | 37 + test/CodeGen/Mips/brconlt.ll | 27 + test/CodeGen/Mips/brconne.ll | 26 + test/CodeGen/Mips/brconnek.ll | 25 + test/CodeGen/Mips/brconnez.ll | 24 + test/CodeGen/Mips/brdelayslot.ll | 185 + test/CodeGen/Mips/brind.ll | 40 + test/CodeGen/Mips/brsize3.ll | 33 + test/CodeGen/Mips/brsize3a.ll | 26 + test/CodeGen/Mips/bswap.ll | 28 + .../Mips/buildpairextractelementf64.ll | 34 + test/CodeGen/Mips/check-noat.ll | 11 + test/CodeGen/Mips/cmov.ll | 198 + test/CodeGen/Mips/cmplarge.ll | 38 + test/CodeGen/Mips/const-mult.ll | 49 + test/CodeGen/Mips/const1.ll | 35 + test/CodeGen/Mips/const4a.ll | 180 + test/CodeGen/Mips/const6.ll | 164 + test/CodeGen/Mips/const6a.ll | 29 + test/CodeGen/Mips/constantfp0.ll | 11 + test/CodeGen/Mips/cprestore.ll | 20 + test/CodeGen/Mips/ctlz.ll | 27 + test/CodeGen/Mips/disable-tail-merge.ll | 33 + test/CodeGen/Mips/div.ll | 18 + test/CodeGen/Mips/div_rem.ll | 21 + test/CodeGen/Mips/divrem.ll | 81 + test/CodeGen/Mips/divu.ll | 18 + test/CodeGen/Mips/divu_remu.ll | 23 + test/CodeGen/Mips/double2int.ll | 8 + test/CodeGen/Mips/dsp-patterns-cmp-vselect.ll | 641 + test/CodeGen/Mips/dsp-patterns.ll | 261 + test/CodeGen/Mips/dsp-r1.ll | 1236 + test/CodeGen/Mips/dsp-r2.ll | 568 + test/CodeGen/Mips/dsp-vec-load-store.ll | 11 + test/CodeGen/Mips/eh-dwarf-cfa.ll | 63 + test/CodeGen/Mips/eh-return32.ll | 85 + test/CodeGen/Mips/eh-return64.ll | 89 + test/CodeGen/Mips/eh.ll | 63 + test/CodeGen/Mips/emit-big-cst.ll | 17 + test/CodeGen/Mips/ex2.ll | 32 + test/CodeGen/Mips/extins.ll | 24 + test/CodeGen/Mips/f16abs.ll | 37 + test/CodeGen/Mips/fabs.ll | 52 + test/CodeGen/Mips/fastcc.ll | 253 + test/CodeGen/Mips/fcopysign-f32-f64.ll | 53 + test/CodeGen/Mips/fcopysign.ll | 59 + test/CodeGen/Mips/fixdfsf.ll | 18 + test/CodeGen/Mips/fmadd1.ll | 88 + test/CodeGen/Mips/fneg.ll | 17 + test/CodeGen/Mips/fp-indexed-ls.ll | 98 + test/CodeGen/Mips/fp-spill-reload.ll | 39 + test/CodeGen/Mips/fp16instrinsmc.ll | 391 + test/CodeGen/Mips/fp16mix.ll | 92 + test/CodeGen/Mips/fp16static.ll | 13 + test/CodeGen/Mips/fpbr.ll | 119 + test/CodeGen/Mips/fpneeded.ll | 149 + test/CodeGen/Mips/fpnotneeded.ll | 77 + test/CodeGen/Mips/fptr2.ll | 20 + test/CodeGen/Mips/frame-address.ll | 17 + test/CodeGen/Mips/frem.ll | 13 + test/CodeGen/Mips/global-address.ll | 46 + test/CodeGen/Mips/global-pointer-reg.ll | 24 + test/CodeGen/Mips/gpreg-lazy-binding.ll | 27 + test/CodeGen/Mips/gprestore.ll | 34 + test/CodeGen/Mips/helloworld.ll | 59 + test/CodeGen/Mips/hf16_1.ll | 256 + test/CodeGen/Mips/hf16call32.ll | 1030 + test/CodeGen/Mips/hf16call32_body.ll | 294 + test/CodeGen/Mips/hf1_body.ll | 21 + test/CodeGen/Mips/hfptrcall.ll | 125 + test/CodeGen/Mips/i32k.ll | 24 + test/CodeGen/Mips/i64arg.ll | 34 + test/CodeGen/Mips/imm.ll | 38 + test/CodeGen/Mips/indirectcall.ll | 8 + test/CodeGen/Mips/init-array.ll | 14 + .../CodeGen/Mips/inlineasm-cnstrnt-bad-I-1.ll | 15 + test/CodeGen/Mips/inlineasm-cnstrnt-bad-J.ll | 16 + test/CodeGen/Mips/inlineasm-cnstrnt-bad-K.ll | 16 + test/CodeGen/Mips/inlineasm-cnstrnt-bad-L.ll | 16 + test/CodeGen/Mips/inlineasm-cnstrnt-bad-N.ll | 17 + test/CodeGen/Mips/inlineasm-cnstrnt-bad-O.ll | 16 + test/CodeGen/Mips/inlineasm-cnstrnt-bad-P.ll | 16 + test/CodeGen/Mips/inlineasm-cnstrnt-reg.ll | 44 + test/CodeGen/Mips/inlineasm-cnstrnt-reg64.ll | 20 + test/CodeGen/Mips/inlineasm-operand-code.ll | 153 + test/CodeGen/Mips/inlineasm64.ll | 17 + test/CodeGen/Mips/inlineasm_constraint.ll | 64 + test/CodeGen/Mips/inlineasmmemop.ll | 63 + test/CodeGen/Mips/int-to-float-conversion.ll | 48 + test/CodeGen/Mips/internalfunc.ll | 52 + test/CodeGen/Mips/jtstat.ll | 71 + test/CodeGen/Mips/largefr1.ll | 74 + test/CodeGen/Mips/largeimm1.ll | 13 + test/CodeGen/Mips/largeimmprinting.ll | 36 + test/CodeGen/Mips/lazy-binding.ll | 41 + test/CodeGen/Mips/lb1.ll | 18 + test/CodeGen/Mips/lbu1.ll | 19 + test/CodeGen/Mips/lh1.ll | 18 + test/CodeGen/Mips/lhu1.ll | 19 + test/CodeGen/Mips/lit.local.cfg | 4 + test/CodeGen/Mips/llcarry.ll | 51 + test/CodeGen/Mips/load-store-left-right.ll | 29 + test/CodeGen/Mips/longbranch.ll | 35 + test/CodeGen/Mips/machineverifier.ll | 21 + test/CodeGen/Mips/madd-msub.ll | 73 + test/CodeGen/Mips/memcpy.ll | 19 + test/CodeGen/Mips/mips16_32_1.ll | 14 + test/CodeGen/Mips/mips16_32_10.ll | 59 + test/CodeGen/Mips/mips16_32_3.ll | 70 + test/CodeGen/Mips/mips16_32_4.ll | 65 + test/CodeGen/Mips/mips16_32_5.ll | 80 + test/CodeGen/Mips/mips16_32_6.ll | 86 + test/CodeGen/Mips/mips16_32_7.ll | 76 + test/CodeGen/Mips/mips16_32_8.ll | 74 + test/CodeGen/Mips/mips16_32_9.ll | 51 + test/CodeGen/Mips/mips16_fpret.ll | 76 + test/CodeGen/Mips/mips16ex.ll | 87 + test/CodeGen/Mips/mips16fpe.ll | 381 + test/CodeGen/Mips/mips64-f128-call.ll | 45 + test/CodeGen/Mips/mips64-f128.ll | 646 + test/CodeGen/Mips/mips64-fp-indexed-ls.ll | 110 + test/CodeGen/Mips/mips64-libcall.ll | 29 + test/CodeGen/Mips/mips64-sret.ll | 16 + test/CodeGen/Mips/mips64countleading.ll | 19 + test/CodeGen/Mips/mips64directive.ll | 11 + test/CodeGen/Mips/mips64ext.ll | 26 + test/CodeGen/Mips/mips64extins.ll | 55 + test/CodeGen/Mips/mips64fpimm0.ll | 7 + test/CodeGen/Mips/mips64fpldst.ll | 58 + test/CodeGen/Mips/mips64imm.ll | 52 + test/CodeGen/Mips/mips64instrs.ll | 157 + test/CodeGen/Mips/mips64intldst.ll | 157 + test/CodeGen/Mips/mips64lea.ll | 12 + .../Mips/mips64load-store-left-right.ll | 73 + test/CodeGen/Mips/mips64muldiv.ll | 49 + test/CodeGen/Mips/mips64shift.ll | 104 + test/CodeGen/Mips/mipslopat.ll | 19 + test/CodeGen/Mips/misha.ll | 69 + test/CodeGen/Mips/mno-ldc1-sdc1.ll | 93 + test/CodeGen/Mips/msa/2r.ll | 257 + test/CodeGen/Mips/msa/2r_vector_scalar.ll | 87 + test/CodeGen/Mips/msa/2rf.ll | 323 + test/CodeGen/Mips/msa/2rf_exup.ll | 82 + test/CodeGen/Mips/msa/2rf_float_int.ll | 90 + test/CodeGen/Mips/msa/2rf_fq.ll | 82 + test/CodeGen/Mips/msa/2rf_int_float.ll | 217 + test/CodeGen/Mips/msa/2rf_tq.ll | 50 + test/CodeGen/Mips/msa/3r-a.ll | 1191 + test/CodeGen/Mips/msa/3r-b.ll | 494 + test/CodeGen/Mips/msa/3r-c.ll | 446 + test/CodeGen/Mips/msa/3r-d.ll | 478 + test/CodeGen/Mips/msa/3r-i.ll | 358 + test/CodeGen/Mips/msa/3r-m.ll | 862 + test/CodeGen/Mips/msa/3r-p.ll | 182 + test/CodeGen/Mips/msa/3r-s.ll | 1353 + test/CodeGen/Mips/msa/3r-v.ll | 105 + test/CodeGen/Mips/msa/3r_4r.ll | 206 + test/CodeGen/Mips/msa/3r_4r_widen.ll | 307 + test/CodeGen/Mips/msa/3r_splat.ll | 94 + test/CodeGen/Mips/msa/3rf.ll | 485 + test/CodeGen/Mips/msa/3rf_4rf.ll | 106 + test/CodeGen/Mips/msa/3rf_4rf_q.ll | 206 + test/CodeGen/Mips/msa/3rf_exdo.ll | 50 + test/CodeGen/Mips/msa/3rf_float_int.ll | 50 + test/CodeGen/Mips/msa/3rf_int_float.ll | 974 + test/CodeGen/Mips/msa/3rf_q.ll | 94 + test/CodeGen/Mips/msa/arithmetic.ll | 726 + test/CodeGen/Mips/msa/arithmetic_float.ll | 456 + test/CodeGen/Mips/msa/basic_operations.ll | 481 + .../Mips/msa/basic_operations_float.ll | 207 + test/CodeGen/Mips/msa/bit.ll | 537 + test/CodeGen/Mips/msa/bitcast.ll | 1210 + test/CodeGen/Mips/msa/bitwise.ll | 1639 + test/CodeGen/Mips/msa/compare.ll | 2079 + test/CodeGen/Mips/msa/compare_float.ll | 663 + test/CodeGen/Mips/msa/elm_copy.ll | 162 + test/CodeGen/Mips/msa/elm_cxcmsa.ll | 168 + test/CodeGen/Mips/msa/elm_insv.ll | 192 + test/CodeGen/Mips/msa/elm_move.ll | 25 + test/CodeGen/Mips/msa/elm_shift_slide.ll | 158 + test/CodeGen/Mips/msa/endian.ll | 107 + test/CodeGen/Mips/msa/frameindex.ll | 85 + test/CodeGen/Mips/msa/i10.ll | 89 + test/CodeGen/Mips/msa/i5-a.ll | 82 + test/CodeGen/Mips/msa/i5-b.ll | 439 + test/CodeGen/Mips/msa/i5-c.ll | 386 + test/CodeGen/Mips/msa/i5-m.ll | 310 + test/CodeGen/Mips/msa/i5-s.ll | 82 + test/CodeGen/Mips/msa/i5_ld_st.ll | 150 + test/CodeGen/Mips/msa/i8.ll | 211 + test/CodeGen/Mips/msa/inline-asm.ll | 34 + .../Mips/msa/llvm-stress-s1704963983.ll | 134 + .../Mips/msa/llvm-stress-s1935737938.ll | 138 + .../msa/llvm-stress-s2090927243-simplified.ll | 31 + .../msa/llvm-stress-s2501752154-simplified.ll | 27 + .../Mips/msa/llvm-stress-s2704903805.ll | 141 + .../Mips/msa/llvm-stress-s3861334421.ll | 149 + .../Mips/msa/llvm-stress-s3926023935.ll | 143 + .../Mips/msa/llvm-stress-s3997499501.ll | 152 + .../msa/llvm-stress-s449609655-simplified.ll | 33 + .../Mips/msa/llvm-stress-s525530439.ll | 139 + .../Mips/msa/llvm-stress-s997348632.ll | 143 + .../Mips/msa/llvm-stress-sz1-s742806235.ll | 23 + test/CodeGen/Mips/msa/shift-dagcombine.ll | 70 + test/CodeGen/Mips/msa/shuffle.ll | 803 + test/CodeGen/Mips/msa/special.ll | 26 + test/CodeGen/Mips/msa/spill.ll | 601 + test/CodeGen/Mips/msa/vec.ll | 946 + test/CodeGen/Mips/msa/vecs10.ll | 47 + test/CodeGen/Mips/mul.ll | 17 + test/CodeGen/Mips/mulll.ll | 21 + test/CodeGen/Mips/mulull.ll | 21 + test/CodeGen/Mips/neg1.ll | 15 + test/CodeGen/Mips/nomips16.ll | 38 + test/CodeGen/Mips/not1.ll | 16 + test/CodeGen/Mips/null.ll | 13 + test/CodeGen/Mips/o32_cc.ll | 369 + test/CodeGen/Mips/o32_cc_byval.ll | 131 + test/CodeGen/Mips/o32_cc_vararg.ll | 270 + test/CodeGen/Mips/optimize-fp-math.ll | 32 + test/CodeGen/Mips/or1.ll | 17 + test/CodeGen/Mips/powif64_16.ll | 26 + test/CodeGen/Mips/private.ll | 20 + test/CodeGen/Mips/ra-allocatable.ll | 283 + test/CodeGen/Mips/rdhwr-directives.ll | 15 + test/CodeGen/Mips/rem.ll | 19 + test/CodeGen/Mips/remat-immed-load.ll | 51 + test/CodeGen/Mips/remu.ll | 18 + test/CodeGen/Mips/return-vector.ll | 244 + test/CodeGen/Mips/return_address.ll | 23 + test/CodeGen/Mips/rotate.ll | 45 + test/CodeGen/Mips/sb1.ll | 20 + test/CodeGen/Mips/sel1c.ll | 21 + test/CodeGen/Mips/sel2c.ll | 21 + test/CodeGen/Mips/selTBteqzCmpi.ll | 26 + test/CodeGen/Mips/selTBtnezCmpi.ll | 26 + test/CodeGen/Mips/selTBtnezSlti.ll | 25 + test/CodeGen/Mips/select.ll | 160 + test/CodeGen/Mips/selectcc.ll | 43 + test/CodeGen/Mips/seleq.ll | 95 + test/CodeGen/Mips/seleqk.ll | 91 + test/CodeGen/Mips/selgek.ll | 94 + test/CodeGen/Mips/selgt.ll | 98 + test/CodeGen/Mips/selle.ll | 96 + test/CodeGen/Mips/selltk.ll | 93 + test/CodeGen/Mips/selne.ll | 97 + test/CodeGen/Mips/selnek.ll | 107 + test/CodeGen/Mips/selpat.ll | 350 + test/CodeGen/Mips/setcc-se.ll | 155 + test/CodeGen/Mips/seteq.ll | 21 + test/CodeGen/Mips/seteqz.ll | 24 + test/CodeGen/Mips/setge.ll | 27 + test/CodeGen/Mips/setgek.ll | 18 + test/CodeGen/Mips/setle.ll | 26 + test/CodeGen/Mips/setlt.ll | 21 + test/CodeGen/Mips/setltk.ll | 20 + test/CodeGen/Mips/setne.ll | 20 + test/CodeGen/Mips/setuge.ll | 26 + test/CodeGen/Mips/setugt.ll | 21 + test/CodeGen/Mips/setule.ll | 26 + test/CodeGen/Mips/setult.ll | 21 + test/CodeGen/Mips/setultk.ll | 20 + test/CodeGen/Mips/sh1.ll | 20 + test/CodeGen/Mips/shift-parts.ll | 29 + test/CodeGen/Mips/simplebr.ll | 37 + test/CodeGen/Mips/sint-fp-store_pattern.ll | 52 + test/CodeGen/Mips/sitofp-selectcc-opt.ll | 22 + test/CodeGen/Mips/sll1.ll | 19 + test/CodeGen/Mips/sll2.ll | 19 + test/CodeGen/Mips/small-section-reserve-gp.ll | 12 + test/CodeGen/Mips/spill-copy-acreg.ll | 41 + test/CodeGen/Mips/sra1.ll | 15 + test/CodeGen/Mips/sra2.ll | 17 + test/CodeGen/Mips/srl1.ll | 18 + test/CodeGen/Mips/srl2.ll | 20 + test/CodeGen/Mips/stack-alignment.ll | 13 + test/CodeGen/Mips/stackcoloring.ll | 39 + test/CodeGen/Mips/stacksize.ll | 9 + test/CodeGen/Mips/stchar.ll | 90 + test/CodeGen/Mips/stldst.ll | 41 + test/CodeGen/Mips/sub1.ll | 15 + test/CodeGen/Mips/sub2.ll | 17 + test/CodeGen/Mips/swzero.ll | 20 + test/CodeGen/Mips/tailcall.ll | 258 + test/CodeGen/Mips/tls-alias.ll | 10 + test/CodeGen/Mips/tls-models.ll | 113 + test/CodeGen/Mips/tls.ll | 77 + test/CodeGen/Mips/tls16.ll | 13 + test/CodeGen/Mips/tls16_2.ll | 15 + test/CodeGen/Mips/tnaked.ll | 29 + test/CodeGen/Mips/trap.ll | 11 + test/CodeGen/Mips/trap1.ll | 13 + test/CodeGen/Mips/uitofp.ll | 12 + test/CodeGen/Mips/ul1.ll | 15 + test/CodeGen/Mips/unalignedload.ll | 31 + test/CodeGen/Mips/vector-load-store.ll | 27 + test/CodeGen/Mips/vector-setcc.ll | 16 + test/CodeGen/Mips/weak.ll | 12 + test/CodeGen/Mips/xor1.ll | 17 + test/CodeGen/Mips/zeroreg.ll | 21 + test/CodeGen/NVPTX/add-128bit.ll | 19 + test/CodeGen/NVPTX/annotations.ll | 53 + test/CodeGen/NVPTX/arithmetic-fp-sm20.ll | 72 + test/CodeGen/NVPTX/arithmetic-int.ll | 293 + test/CodeGen/NVPTX/bug17709.ll | 26 + test/CodeGen/NVPTX/callchain.ll | 10 + test/CodeGen/NVPTX/calling-conv.ll | 30 + test/CodeGen/NVPTX/compare-int.ll | 387 + test/CodeGen/NVPTX/constant-vectors.ll | 6 + test/CodeGen/NVPTX/convert-fp.ll | 144 + test/CodeGen/NVPTX/convert-int-sm20.ll | 64 + test/CodeGen/NVPTX/ctlz.ll | 44 + test/CodeGen/NVPTX/ctpop.ll | 25 + test/CodeGen/NVPTX/cttz.ll | 45 + test/CodeGen/NVPTX/fast-math.ll | 43 + test/CodeGen/NVPTX/fma-disable.ll | 24 + test/CodeGen/NVPTX/fma.ll | 17 + test/CodeGen/NVPTX/fp-literals.ll | 18 + test/CodeGen/NVPTX/generic-to-nvvm.ll | 26 + test/CodeGen/NVPTX/global-ordering.ll | 20 + test/CodeGen/NVPTX/i1-global.ll | 19 + test/CodeGen/NVPTX/i1-int-to-fp.ll | 37 + test/CodeGen/NVPTX/i1-param.ll | 19 + test/CodeGen/NVPTX/i8-param.ll | 23 + test/CodeGen/NVPTX/implicit-def.ll | 9 + test/CodeGen/NVPTX/inline-asm.ll | 9 + test/CodeGen/NVPTX/intrin-nocapture.ll | 21 + test/CodeGen/NVPTX/intrinsic-old.ll | 282 + test/CodeGen/NVPTX/intrinsics.ll | 26 + test/CodeGen/NVPTX/ld-addrspace.ll | 171 + test/CodeGen/NVPTX/ld-generic.ll | 63 + test/CodeGen/NVPTX/ldu-i8.ll | 14 + test/CodeGen/NVPTX/ldu-reg-plus-offset.ll | 21 + test/CodeGen/NVPTX/lit.local.cfg | 3 + test/CodeGen/NVPTX/load-sext-i1.ll | 14 + test/CodeGen/NVPTX/local-stack-frame.ll | 18 + test/CodeGen/NVPTX/module-inline-asm.ll | 10 + test/CodeGen/NVPTX/nvvm-reflect.ll | 34 + test/CodeGen/NVPTX/param-align.ll | 25 + test/CodeGen/NVPTX/pr13291-i1-store.ll | 26 + test/CodeGen/NVPTX/pr16278.ll | 10 + test/CodeGen/NVPTX/pr17529.ll | 38 + test/CodeGen/NVPTX/ptx-version-30.ll | 6 + test/CodeGen/NVPTX/ptx-version-31.ll | 6 + test/CodeGen/NVPTX/refl1.ll | 39 + test/CodeGen/NVPTX/rsqrt.ll | 13 + test/CodeGen/NVPTX/sched1.ll | 31 + test/CodeGen/NVPTX/sched2.ll | 32 + test/CodeGen/NVPTX/sext-in-reg.ll | 111 + test/CodeGen/NVPTX/sext-params.ll | 16 + test/CodeGen/NVPTX/simple-call.ll | 26 + test/CodeGen/NVPTX/sm-version-20.ll | 6 + test/CodeGen/NVPTX/sm-version-21.ll | 6 + test/CodeGen/NVPTX/sm-version-30.ll | 6 + test/CodeGen/NVPTX/sm-version-35.ll | 6 + test/CodeGen/NVPTX/st-addrspace.ll | 177 + test/CodeGen/NVPTX/st-generic.ll | 69 + test/CodeGen/NVPTX/tuple-literal.ll | 5 + test/CodeGen/NVPTX/vec-param-load.ll | 13 + test/CodeGen/NVPTX/vec8.ll | 13 + test/CodeGen/NVPTX/vector-args.ll | 35 + test/CodeGen/NVPTX/vector-compare.ll | 19 + test/CodeGen/NVPTX/vector-loads.ll | 66 + test/CodeGen/NVPTX/vector-select.ll | 16 + test/CodeGen/NVPTX/vector-stores.ll | 30 + test/CodeGen/PowerPC/2004-11-29-ShrCrash.ll | 6 + .../CodeGen/PowerPC/2004-11-30-shift-crash.ll | 7 + .../PowerPC/2004-11-30-shr-var-crash.ll | 9 + .../PowerPC/2004-12-12-ZeroSizeCommon.ll | 4 + .../PowerPC/2005-01-14-SetSelectCrash.ll | 8 + test/CodeGen/PowerPC/2005-01-14-UndefLong.ll | 5 + .../PowerPC/2005-08-12-rlwimi-crash.ll | 13 + .../2005-09-02-LegalizeDuplicatesCalls.ll | 11 + .../PowerPC/2005-10-08-ArithmeticRotate.ll | 11 + .../PowerPC/2005-11-30-vastart-crash.ll | 18 + .../PowerPC/2006-01-11-darwin-fp-argument.ll | 10 + .../PowerPC/2006-01-20-ShiftPartsCrash.ll | 19 + .../PowerPC/2006-04-01-FloatDoubleExtend.ll | 9 + test/CodeGen/PowerPC/2006-04-05-splat-ish.ll | 10 + .../PowerPC/2006-04-19-vmaddfp-crash.ll | 58 + .../PowerPC/2006-05-12-rlwimi-crash.ll | 55 + .../PowerPC/2006-07-07-ComputeMaskedBits.ll | 17 + .../PowerPC/2006-07-19-stwbrx-crash.ll | 11 + test/CodeGen/PowerPC/2006-08-11-RetVector.ll | 8 + .../PowerPC/2006-08-15-SelectionCrash.ll | 30 + test/CodeGen/PowerPC/2006-09-28-shift_64.ll | 25 + test/CodeGen/PowerPC/2006-10-13-Miscompile.ll | 16 + .../PowerPC/2006-10-17-brcc-miscompile.ll | 20 + .../PowerPC/2006-10-17-ppc64-alloca.ll | 7 + .../2006-11-10-DAGCombineMiscompile.ll | 13 + .../PowerPC/2006-11-29-AltivecFPSplat.ll | 10 + .../CodeGen/PowerPC/2006-12-07-LargeAlloca.ll | 24 + .../CodeGen/PowerPC/2006-12-07-SelectCrash.ll | 22 + .../PowerPC/2007-01-04-ArgExtension.ll | 10 + test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll | 26 + test/CodeGen/PowerPC/2007-01-29-lbrx-asm.ll | 7 + .../PowerPC/2007-01-31-InlineAsmAddrMode.ll | 24 + .../CodeGen/PowerPC/2007-02-16-AlignPacked.ll | 4 + .../2007-02-16-InlineAsmNConstraint.ll | 11 + .../PowerPC/2007-02-23-lr-saved-twice.ll | 14 + test/CodeGen/PowerPC/2007-03-24-cntlzd.ll | 12 + .../PowerPC/2007-03-30-SpillerCrash.ll | 1801 + .../2007-04-24-InlineAsm-I-Modifier.ll | 14 + .../2007-04-30-InlineAsmEarlyClobber.ll | 31 + .../2007-05-03-InlineAsm-S-Constraint.ll | 12 + .../2007-05-14-InlineAsmSelectCrash.ll | 25 + .../CodeGen/PowerPC/2007-05-22-tailmerge-3.ll | 67 + .../PowerPC/2007-05-30-dagcombine-miscomp.ll | 14 + test/CodeGen/PowerPC/2007-06-28-BCCISelBug.ll | 85 + .../PowerPC/2007-08-04-CoalescerAssert.ll | 28 + test/CodeGen/PowerPC/2007-09-04-AltivecDST.ll | 15 + .../PowerPC/2007-09-07-LoadStoreIdxForms.ll | 20 + test/CodeGen/PowerPC/2007-09-08-unaligned.ll | 53 + .../PowerPC/2007-09-11-RegCoalescerAssert.ll | 9 + .../PowerPC/2007-09-12-LiveIntervalsAssert.ll | 15 + .../2007-10-16-InlineAsmFrameOffset.ll | 14 + .../PowerPC/2007-10-18-PtrArithmetic.ll | 22 + .../PowerPC/2007-10-21-LocalRegAllocAssert.ll | 27 + .../2007-10-21-LocalRegAllocAssert2.ll | 25 + .../PowerPC/2007-11-04-CoalescerCrash.ll | 148 + .../PowerPC/2007-11-16-landingpad-split.ll | 66 + .../PowerPC/2007-11-19-VectorSplitting.ll | 16 + .../PowerPC/2008-02-05-LiveIntervalsAssert.ll | 67 + .../PowerPC/2008-02-09-LocalRegAllocAssert.ll | 10 + .../PowerPC/2008-03-05-RegScavengerAssert.ll | 18 + .../PowerPC/2008-03-17-RegScavengerCrash.ll | 31 + .../PowerPC/2008-03-18-RegScavengerAssert.ll | 6 + .../PowerPC/2008-03-24-AddressRegImm.ll | 25 + .../PowerPC/2008-03-24-CoalescerBug.ll | 30 + .../PowerPC/2008-03-26-CoalescerBug.ll | 28 + .../PowerPC/2008-04-10-LiveIntervalCrash.ll | 100 + .../PowerPC/2008-04-16-CoalescerBug.ll | 14 + .../PowerPC/2008-04-23-CoalescerCrash.ll | 89 + test/CodeGen/PowerPC/2008-05-01-ppc_fp128.ll | 15 + .../PowerPC/2008-06-19-LegalizerCrash.ll | 6 + .../PowerPC/2008-06-21-F128LoadStore.ll | 10 + .../PowerPC/2008-06-23-LiveVariablesCrash.ll | 25 + .../PowerPC/2008-07-10-SplatMiscompile.ll | 11 + test/CodeGen/PowerPC/2008-07-15-Bswap.ll | 386 + test/CodeGen/PowerPC/2008-07-15-Fabs.ll | 19 + .../PowerPC/2008-07-15-SignExtendInreg.ll | 17 + test/CodeGen/PowerPC/2008-07-17-Fneg.ll | 18 + .../CodeGen/PowerPC/2008-07-24-PPC64-CCBug.ll | 11 + .../PowerPC/2008-09-12-CoalescerBug.ll | 254 + .../PowerPC/2008-10-17-AsmMatchingOperands.ll | 15 + .../PowerPC/2008-10-28-UnprocessedNode.ll | 11 + test/CodeGen/PowerPC/2008-10-28-f128-i32.ll | 33 + .../PowerPC/2008-10-31-PPCF128Libcalls.ll | 44 + .../PowerPC/2008-12-02-LegalizeTypeAssert.ll | 18 + test/CodeGen/PowerPC/2008-12-12-EH.ll | 9 + .../PowerPC/2009-01-16-DeclareISelBug.ll | 12 + test/CodeGen/PowerPC/2009-03-17-LSRBug.ll | 51 + .../PowerPC/2009-05-28-LegalizeBRCC.ll | 15 + .../PowerPC/2009-07-16-InlineAsm-M-Operand.ll | 16 + ...009-08-17-inline-asm-addr-mode-breakage.ll | 25 + .../PowerPC/2009-08-23-linkerprivate.ll | 8 + test/CodeGen/PowerPC/2009-09-18-carrybit.ll | 62 + .../PowerPC/2009-11-15-ProcImpDefsBug.ll | 105 + test/CodeGen/PowerPC/2009-11-25-ImpDefBug.ll | 56 + .../CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll | 20 + test/CodeGen/PowerPC/2010-02-12-saveCR.ll | 41 + .../PowerPC/2010-03-09-indirect-call.ll | 20 + .../PowerPC/2010-04-01-MachineCSEBug.ll | 70 + test/CodeGen/PowerPC/2010-05-03-retaddr1.ll | 25 + .../PowerPC/2010-10-11-Fast-Varargs.ll | 16 + .../PowerPC/2010-12-18-PPCStackRefs.ll | 22 + .../PowerPC/2011-12-05-NoSpillDupCR.ll | 186 + .../PowerPC/2011-12-06-SpillAndRestoreCR.ll | 220 + .../2011-12-08-DemandedBitsMiscompile.ll | 16 + .../PowerPC/2012-09-16-TOC-entry-check.ll | 27 + test/CodeGen/PowerPC/2012-10-11-dynalloc.ll | 18 + test/CodeGen/PowerPC/2012-10-12-bitcast.ll | 20 + .../CodeGen/PowerPC/2012-11-16-mischedcall.ll | 33 + .../CodeGen/PowerPC/2013-05-15-preinc-fold.ll | 33 + test/CodeGen/PowerPC/2013-07-01-PHIElimBug.ll | 28 + test/CodeGen/PowerPC/Atomics-32.ll | 699 + test/CodeGen/PowerPC/Atomics-64.ll | 714 + .../CodeGen/PowerPC/DbgValueOtherTargets.test | 1 + test/CodeGen/PowerPC/Frames-alloca.ll | 30 + test/CodeGen/PowerPC/Frames-large.ll | 55 + test/CodeGen/PowerPC/Frames-leaf.ll | 37 + test/CodeGen/PowerPC/Frames-small.ll | 29 + test/CodeGen/PowerPC/LargeAbsoluteAddr.ll | 17 + test/CodeGen/PowerPC/a2-fp-basic.ll | 33 + test/CodeGen/PowerPC/a2q-stackalign.ll | 23 + test/CodeGen/PowerPC/a2q.ll | 10 + test/CodeGen/PowerPC/addc.ll | 33 + test/CodeGen/PowerPC/addi-reassoc.ll | 19 + test/CodeGen/PowerPC/addrfuncstr.ll | 27 + test/CodeGen/PowerPC/align.ll | 46 + test/CodeGen/PowerPC/allocate-r0.ll | 18 + test/CodeGen/PowerPC/altivec-ord.ll | 17 + test/CodeGen/PowerPC/and-branch.ll | 17 + test/CodeGen/PowerPC/and-elim.ll | 18 + test/CodeGen/PowerPC/and-imm.ll | 14 + test/CodeGen/PowerPC/and_add.ll | 15 + test/CodeGen/PowerPC/and_sext.ll | 28 + test/CodeGen/PowerPC/and_sra.ll | 27 + test/CodeGen/PowerPC/anon_aggr.ll | 189 + test/CodeGen/PowerPC/ashr-neg1.ll | 18 + test/CodeGen/PowerPC/asm-Zy.ll | 14 + test/CodeGen/PowerPC/asm-dialect.ll | 18 + test/CodeGen/PowerPC/asym-regclass-copy.ll | 56 + test/CodeGen/PowerPC/atomic-1.ll | 26 + test/CodeGen/PowerPC/atomic-2.ll | 46 + test/CodeGen/PowerPC/available-externally.ll | 109 + test/CodeGen/PowerPC/bdzlr.ll | 59 + .../CodeGen/PowerPC/big-endian-actual-args.ll | 9 + .../CodeGen/PowerPC/big-endian-call-result.ll | 13 + .../CodeGen/PowerPC/big-endian-formal-args.ll | 13 + test/CodeGen/PowerPC/branch-opt.ll | 71 + test/CodeGen/PowerPC/bswap-load-store.ll | 82 + test/CodeGen/PowerPC/buildvec_canonicalize.ll | 24 + test/CodeGen/PowerPC/bv-pres-v8i1.ll | 39 + test/CodeGen/PowerPC/bv-widen-undef.ll | 23 + test/CodeGen/PowerPC/byval-agg-info.ll | 17 + test/CodeGen/PowerPC/calls.ll | 27 + test/CodeGen/PowerPC/can-lower-ret.ll | 19 + test/CodeGen/PowerPC/cc.ll | 70 + test/CodeGen/PowerPC/cmp-cmp.ll | 13 + test/CodeGen/PowerPC/coalesce-ext.ll | 18 + test/CodeGen/PowerPC/compare-duplicate.ll | 11 + test/CodeGen/PowerPC/compare-simm.ll | 14 + test/CodeGen/PowerPC/complex-return.ll | 55 + test/CodeGen/PowerPC/constants.ll | 52 + test/CodeGen/PowerPC/copysignl.ll | 67 + test/CodeGen/PowerPC/cr-spills.ll | 404 + test/CodeGen/PowerPC/cr1eq-no-extra-moves.ll | 26 + test/CodeGen/PowerPC/cr1eq.ll | 18 + test/CodeGen/PowerPC/cr_spilling.ll | 27 + test/CodeGen/PowerPC/crsave.ll | 62 + test/CodeGen/PowerPC/ctr-cleanup.ll | 25 + test/CodeGen/PowerPC/ctrloop-asm.ll | 38 + test/CodeGen/PowerPC/ctrloop-cpsgn.ll | 28 + test/CodeGen/PowerPC/ctrloop-fp64.ll | 60 + test/CodeGen/PowerPC/ctrloop-i64.ll | 93 + test/CodeGen/PowerPC/ctrloop-large-ec.ll | 23 + test/CodeGen/PowerPC/ctrloop-le.ll | 441 + test/CodeGen/PowerPC/ctrloop-lt.ll | 438 + test/CodeGen/PowerPC/ctrloop-ne.ll | 449 + test/CodeGen/PowerPC/ctrloop-reg.ll | 87 + test/CodeGen/PowerPC/ctrloop-s000.ll | 152 + test/CodeGen/PowerPC/ctrloop-sums.ll | 130 + test/CodeGen/PowerPC/ctrloop-udivti3.ll | 31 + test/CodeGen/PowerPC/ctrloops.ll | 75 + test/CodeGen/PowerPC/cttz.ll | 13 + test/CodeGen/PowerPC/darwin-labels.ll | 6 + test/CodeGen/PowerPC/dbg.ll | 40 + test/CodeGen/PowerPC/dcbt-sched.ll | 22 + test/CodeGen/PowerPC/delete-node.ll | 22 + test/CodeGen/PowerPC/div-2.ll | 30 + test/CodeGen/PowerPC/dyn-alloca-aligned.ll | 35 + test/CodeGen/PowerPC/early-ret.ll | 48 + test/CodeGen/PowerPC/early-ret2.ll | 25 + test/CodeGen/PowerPC/empty-functions.ll | 12 + test/CodeGen/PowerPC/emptystruct.ll | 49 + test/CodeGen/PowerPC/eqv-andc-orc-nor.ll | 93 + test/CodeGen/PowerPC/extsh.ll | 8 + test/CodeGen/PowerPC/fabs.ll | 7 + .../CodeGen/PowerPC/fast-isel-GEP-coalesce.ll | 48 + test/CodeGen/PowerPC/fast-isel-binary.ll | 137 + test/CodeGen/PowerPC/fast-isel-br-const.ll | 43 + test/CodeGen/PowerPC/fast-isel-call.ll | 132 + test/CodeGen/PowerPC/fast-isel-cmp-imm.ll | 289 + .../PowerPC/fast-isel-conversion-p5.ll | 153 + test/CodeGen/PowerPC/fast-isel-conversion.ll | 305 + test/CodeGen/PowerPC/fast-isel-crash.ll | 23 + test/CodeGen/PowerPC/fast-isel-ext.ll | 75 + test/CodeGen/PowerPC/fast-isel-fold.ll | 129 + test/CodeGen/PowerPC/fast-isel-indirectbr.ll | 15 + test/CodeGen/PowerPC/fast-isel-load-store.ll | 202 + .../CodeGen/PowerPC/fast-isel-redefinition.ll | 10 + test/CodeGen/PowerPC/fast-isel-ret.ll | 142 + test/CodeGen/PowerPC/fast-isel-shifter.ll | 50 + .../fastisel-gep-promote-before-add.ll | 17 + test/CodeGen/PowerPC/fcpsgn.ll | 52 + test/CodeGen/PowerPC/float-asmprint.ll | 34 + test/CodeGen/PowerPC/float-to-int.ll | 93 + test/CodeGen/PowerPC/floatPSA.ll | 97 + test/CodeGen/PowerPC/fma.ll | 77 + test/CodeGen/PowerPC/fnabs.ll | 10 + test/CodeGen/PowerPC/fneg.ll | 12 + test/CodeGen/PowerPC/fold-li.ll | 15 + test/CodeGen/PowerPC/fold-zero.ll | 14 + test/CodeGen/PowerPC/fp-branch.ll | 21 + test/CodeGen/PowerPC/fp-int-fp.ll | 27 + test/CodeGen/PowerPC/fp_to_uint.ll | 8 + test/CodeGen/PowerPC/fpcopy.ll | 7 + test/CodeGen/PowerPC/frame-size.ll | 32 + test/CodeGen/PowerPC/frameaddr.ll | 47 + test/CodeGen/PowerPC/frounds.ll | 19 + test/CodeGen/PowerPC/fsel.ll | 137 + test/CodeGen/PowerPC/fsl-e500mc.ll | 22 + test/CodeGen/PowerPC/fsl-e5500.ll | 22 + test/CodeGen/PowerPC/fsqrt.ll | 19 + test/CodeGen/PowerPC/glob-comp-aa-crash.ll | 139 + test/CodeGen/PowerPC/hello-reloc.s | 84 + test/CodeGen/PowerPC/hello.ll | 12 + test/CodeGen/PowerPC/hidden-vis-2.ll | 12 + test/CodeGen/PowerPC/hidden-vis.ll | 9 + test/CodeGen/PowerPC/i128-and-beyond.ll | 8 + test/CodeGen/PowerPC/i32-to-float.ll | 82 + test/CodeGen/PowerPC/i64-to-float.ll | 52 + test/CodeGen/PowerPC/i64_fp.ll | 26 + test/CodeGen/PowerPC/i64_fp_round.ll | 27 + test/CodeGen/PowerPC/iabs.ll | 16 + test/CodeGen/PowerPC/ifcvt.ll | 34 + test/CodeGen/PowerPC/illegal-element-type.ll | 23 + test/CodeGen/PowerPC/in-asm-f64-reg.ll | 11 + test/CodeGen/PowerPC/indirectbr.ll | 71 + test/CodeGen/PowerPC/inlineasm-copy.ll | 21 + test/CodeGen/PowerPC/inlineasm-i64-reg.ll | 108 + test/CodeGen/PowerPC/int-fp-conv-0.ll | 17 + test/CodeGen/PowerPC/int-fp-conv-1.ll | 12 + .../CodeGen/PowerPC/inverted-bool-compares.ll | 13 + test/CodeGen/PowerPC/isel-rc-nox0.ll | 46 + test/CodeGen/PowerPC/isel.ll | 23 + test/CodeGen/PowerPC/ispositive.ll | 10 + test/CodeGen/PowerPC/itofp128.ll | 14 + test/CodeGen/PowerPC/jaggedstructs.ll | 48 + test/CodeGen/PowerPC/lbzux.ll | 45 + test/CodeGen/PowerPC/lha.ll | 8 + test/CodeGen/PowerPC/lit.local.cfg | 4 + test/CodeGen/PowerPC/load-constant-addr.ll | 9 + test/CodeGen/PowerPC/load-shift-combine.ll | 34 + test/CodeGen/PowerPC/long-compare.ll | 9 + test/CodeGen/PowerPC/longdbl-truncate.ll | 9 + test/CodeGen/PowerPC/lsa.ll | 43 + test/CodeGen/PowerPC/lsr-postinc-pos.ll | 32 + test/CodeGen/PowerPC/mask64.ll | 27 + test/CodeGen/PowerPC/mcm-1.ll | 27 + test/CodeGen/PowerPC/mcm-10.ll | 25 + test/CodeGen/PowerPC/mcm-11.ll | 27 + test/CodeGen/PowerPC/mcm-12.ll | 18 + test/CodeGen/PowerPC/mcm-2.ll | 39 + test/CodeGen/PowerPC/mcm-3.ll | 43 + test/CodeGen/PowerPC/mcm-4.ll | 27 + test/CodeGen/PowerPC/mcm-5.ll | 60 + test/CodeGen/PowerPC/mcm-6.ll | 28 + test/CodeGen/PowerPC/mcm-7.ll | 26 + test/CodeGen/PowerPC/mcm-8.ll | 25 + test/CodeGen/PowerPC/mcm-9.ll | 27 + test/CodeGen/PowerPC/mcm-default.ll | 26 + test/CodeGen/PowerPC/mcm-obj-2.ll | 54 + test/CodeGen/PowerPC/mcm-obj.ll | 185 + test/CodeGen/PowerPC/mem-rr-addr-mode.ll | 18 + test/CodeGen/PowerPC/mem_update.ll | 68 + .../PowerPC/misched-inorder-latency.ll | 55 + test/CodeGen/PowerPC/misched.ll | 45 + test/CodeGen/PowerPC/mul-neg-power-2.ll | 8 + test/CodeGen/PowerPC/mul-with-overflow.ll | 15 + test/CodeGen/PowerPC/mulhs.ll | 17 + test/CodeGen/PowerPC/mulli64.ll | 16 + .../PowerPC/mult-alt-generic-powerpc.ll | 321 + .../PowerPC/mult-alt-generic-powerpc64.ll | 321 + test/CodeGen/PowerPC/neg.ll | 7 + test/CodeGen/PowerPC/negctr.ll | 86 + test/CodeGen/PowerPC/no-dead-strip.ll | 8 + test/CodeGen/PowerPC/novrsave.ll | 15 + test/CodeGen/PowerPC/optcmp.ll | 152 + test/CodeGen/PowerPC/or-addressing-mode.ll | 22 + test/CodeGen/PowerPC/popcnt.ll | 40 + test/CodeGen/PowerPC/ppc-prologue.ll | 26 + test/CodeGen/PowerPC/ppc-vaarg-agg.ll | 46 + test/CodeGen/PowerPC/ppc32-vacopy.ll | 24 + test/CodeGen/PowerPC/ppc440-fp-basic.ll | 33 + test/CodeGen/PowerPC/ppc440-msync.ll | 27 + test/CodeGen/PowerPC/ppc64-32bit-addic.ll | 29 + test/CodeGen/PowerPC/ppc64-abi-extend.ll | 97 + .../PowerPC/ppc64-align-long-double.ll | 26 + test/CodeGen/PowerPC/ppc64-calls.ll | 63 + test/CodeGen/PowerPC/ppc64-crash.ll | 14 + test/CodeGen/PowerPC/ppc64-cyclecounter.ll | 15 + test/CodeGen/PowerPC/ppc64-linux-func-size.ll | 22 + test/CodeGen/PowerPC/ppc64-prefetch.ll | 15 + test/CodeGen/PowerPC/ppc64-toc.ll | 68 + test/CodeGen/PowerPC/ppc64-vaarg-int.ll | 20 + test/CodeGen/PowerPC/ppc64-zext.ll | 11 + test/CodeGen/PowerPC/ppcf128-1-opt.ll | 29 + test/CodeGen/PowerPC/ppcf128-1.ll | 92 + test/CodeGen/PowerPC/ppcf128-2.ll | 14 + test/CodeGen/PowerPC/ppcf128-3.ll | 32 + test/CodeGen/PowerPC/ppcf128-4.ll | 10 + test/CodeGen/PowerPC/pr12757.ll | 14 + test/CodeGen/PowerPC/pr13641.ll | 11 + test/CodeGen/PowerPC/pr13891.ll | 27 + test/CodeGen/PowerPC/pr15031.ll | 358 + test/CodeGen/PowerPC/pr15359.ll | 22 + test/CodeGen/PowerPC/pr15630.ll | 16 + test/CodeGen/PowerPC/pr15632.ll | 15 + test/CodeGen/PowerPC/pr16556-2.ll | 41 + test/CodeGen/PowerPC/pr16556.ll | 20 + test/CodeGen/PowerPC/pr16573.ll | 11 + test/CodeGen/PowerPC/pr17168.ll | 521 + test/CodeGen/PowerPC/pr17354.ll | 39 + test/CodeGen/PowerPC/pr3711_widen_bit.ll | 18 + test/CodeGen/PowerPC/private.ll | 24 + test/CodeGen/PowerPC/pwr3-6x.ll | 14 + test/CodeGen/PowerPC/quadint-return.ll | 19 + test/CodeGen/PowerPC/r31.ll | 15 + test/CodeGen/PowerPC/recipest.ll | 229 + test/CodeGen/PowerPC/reg-coalesce-simple.ll | 12 + test/CodeGen/PowerPC/reg-names.ll | 17 + test/CodeGen/PowerPC/reloc-align.ll | 34 + test/CodeGen/PowerPC/remap-crash.ll | 57 + test/CodeGen/PowerPC/remat-imm.ll | 16 + test/CodeGen/PowerPC/retaddr.ll | 15 + test/CodeGen/PowerPC/return-val-i128.ll | 36 + test/CodeGen/PowerPC/rlwimi-and.ll | 43 + test/CodeGen/PowerPC/rlwimi-commute.ll | 34 + test/CodeGen/PowerPC/rlwimi-keep-rsh.ll | 28 + test/CodeGen/PowerPC/rlwimi.ll | 70 + test/CodeGen/PowerPC/rlwimi2.ll | 29 + test/CodeGen/PowerPC/rlwimi3.ll | 26 + test/CodeGen/PowerPC/rlwinm.ll | 61 + test/CodeGen/PowerPC/rlwinm2.ll | 28 + test/CodeGen/PowerPC/rotl-2.ll | 38 + test/CodeGen/PowerPC/rotl-64.ll | 20 + test/CodeGen/PowerPC/rotl.ll | 37 + test/CodeGen/PowerPC/rounding-ops.ll | 84 + test/CodeGen/PowerPC/rs-undef-use.ll | 48 + test/CodeGen/PowerPC/s000-alias-misched.ll | 97 + test/CodeGen/PowerPC/sdag-ppcf128.ll | 15 + test/CodeGen/PowerPC/sections.ll | 8 + test/CodeGen/PowerPC/select-cc.ll | 9 + test/CodeGen/PowerPC/select_lt0.ll | 50 + test/CodeGen/PowerPC/set0-v8i16.ll | 18 + test/CodeGen/PowerPC/setcc_no_zext.ll | 9 + test/CodeGen/PowerPC/seteq-0.ll | 9 + test/CodeGen/PowerPC/shift128.ll | 14 + test/CodeGen/PowerPC/shl_elim.ll | 11 + test/CodeGen/PowerPC/shl_sext.ll | 18 + test/CodeGen/PowerPC/sign_ext_inreg1.ll | 12 + test/CodeGen/PowerPC/sj-ctr-loop.ll | 50 + test/CodeGen/PowerPC/sjlj.ll | 160 + test/CodeGen/PowerPC/small-arguments.ll | 52 + test/CodeGen/PowerPC/spill-nor0.ll | 23 + test/CodeGen/PowerPC/stack-protector.ll | 26 + test/CodeGen/PowerPC/stack-realign.ll | 147 + test/CodeGen/PowerPC/std-unal-fi.ll | 119 + test/CodeGen/PowerPC/stdux-constuse.ll | 47 + test/CodeGen/PowerPC/stfiwx-2.ll | 14 + test/CodeGen/PowerPC/stfiwx.ll | 24 + test/CodeGen/PowerPC/store-load-fwd.ll | 8 + test/CodeGen/PowerPC/store-update.ll | 170 + test/CodeGen/PowerPC/structsinmem.ll | 215 + test/CodeGen/PowerPC/structsinregs.ll | 201 + test/CodeGen/PowerPC/stubs.ll | 22 + test/CodeGen/PowerPC/stwu-gta.ll | 18 + test/CodeGen/PowerPC/stwu8.ll | 24 + test/CodeGen/PowerPC/stwux.ll | 47 + test/CodeGen/PowerPC/sub-bv-types.ll | 17 + test/CodeGen/PowerPC/subc.ll | 25 + test/CodeGen/PowerPC/subsumes-pred-regs.ll | 65 + test/CodeGen/PowerPC/svr4-redzone.ll | 39 + test/CodeGen/PowerPC/tailcall1-64.ll | 11 + test/CodeGen/PowerPC/tailcall1.ll | 11 + test/CodeGen/PowerPC/tailcallpic1.ll | 14 + test/CodeGen/PowerPC/tls-2.ll | 15 + test/CodeGen/PowerPC/tls-gd.ll | 23 + test/CodeGen/PowerPC/tls-ie.ll | 22 + test/CodeGen/PowerPC/tls-ld-2.ll | 24 + test/CodeGen/PowerPC/tls-ld.ll | 24 + test/CodeGen/PowerPC/tls.ll | 21 + test/CodeGen/PowerPC/trampoline.ll | 168 + test/CodeGen/PowerPC/unal-altivec.ll | 52 + test/CodeGen/PowerPC/unal-altivec2.ll | 166 + test/CodeGen/PowerPC/unal4-std.ll | 27 + test/CodeGen/PowerPC/unaligned.ll | 73 + test/CodeGen/PowerPC/unsafe-math.ll | 10 + test/CodeGen/PowerPC/unwind-dw2-g.ll | 35 + test/CodeGen/PowerPC/unwind-dw2.ll | 15 + test/CodeGen/PowerPC/vaddsplat.ll | 149 + test/CodeGen/PowerPC/varargs-struct-float.ll | 23 + test/CodeGen/PowerPC/varargs.ll | 23 + test/CodeGen/PowerPC/vcmp-fold.ll | 22 + test/CodeGen/PowerPC/vec-abi-align.ll | 60 + test/CodeGen/PowerPC/vec_auto_constant.ll | 36 + test/CodeGen/PowerPC/vec_br_cmp.ll | 22 + .../PowerPC/vec_buildvector_loadstore.ll | 37 + test/CodeGen/PowerPC/vec_call.ll | 11 + test/CodeGen/PowerPC/vec_cmp.ll | 527 + test/CodeGen/PowerPC/vec_constants.ll | 86 + test/CodeGen/PowerPC/vec_conv.ll | 57 + test/CodeGen/PowerPC/vec_extload.ll | 77 + test/CodeGen/PowerPC/vec_fmuladd.ll | 56 + test/CodeGen/PowerPC/vec_fneg.ll | 8 + test/CodeGen/PowerPC/vec_insert.ll | 8 + test/CodeGen/PowerPC/vec_misaligned.ll | 37 + test/CodeGen/PowerPC/vec_mul.ll | 46 + test/CodeGen/PowerPC/vec_perf_shuffle.ll | 36 + test/CodeGen/PowerPC/vec_rounding.ll | 172 + test/CodeGen/PowerPC/vec_select.ll | 7 + test/CodeGen/PowerPC/vec_shift.ll | 10 + test/CodeGen/PowerPC/vec_shuffle.ll | 504 + test/CodeGen/PowerPC/vec_splat.ll | 71 + test/CodeGen/PowerPC/vec_splat_constant.ll | 24 + test/CodeGen/PowerPC/vec_sqrt.ll | 71 + test/CodeGen/PowerPC/vec_vrsave.ll | 14 + test/CodeGen/PowerPC/vec_zero.ll | 9 + .../PowerPC/vector-identity-shuffle.ll | 17 + test/CodeGen/PowerPC/vector.ll | 166 + test/CodeGen/PowerPC/vrsave-spill.ll | 19 + test/CodeGen/PowerPC/vrspill.ll | 18 + .../CodeGen/PowerPC/weak_def_can_be_hidden.ll | 38 + test/CodeGen/PowerPC/zero-not-run.ll | 27 + test/CodeGen/R600/128bit-kernel-args.ll | 28 + .../R600/32-bit-local-address-space.ll | 88 + test/CodeGen/R600/64bit-kernel-args.ll | 11 + test/CodeGen/R600/README | 21 + test/CodeGen/R600/add.ll | 56 + test/CodeGen/R600/add_i64.ll | 59 + test/CodeGen/R600/address-space.ll | 31 + test/CodeGen/R600/and.ll | 40 + test/CodeGen/R600/array-ptr-calc-i64.ll | 18 + test/CodeGen/R600/atomic_load_add.ll | 23 + test/CodeGen/R600/atomic_load_sub.ll | 23 + test/CodeGen/R600/bfe_uint.ll | 28 + test/CodeGen/R600/bfi_int.ll | 52 + test/CodeGen/R600/big_alu.ll | 1174 + test/CodeGen/R600/bitcast.ll | 21 + test/CodeGen/R600/build_vector.ll | 34 + test/CodeGen/R600/call_fs.ll | 17 + test/CodeGen/R600/cf_end.ll | 9 + test/CodeGen/R600/combine_vloads.ll | 42 + test/CodeGen/R600/complex-folding.ll | 19 + .../dagcombiner-bug-illegal-vec4-int-to-fp.ll | 36 + .../R600/disconnected-predset-break-bug.ll | 29 + test/CodeGen/R600/dot4-folding.ll | 27 + test/CodeGen/R600/elf.ll | 20 + test/CodeGen/R600/elf.r600.ll | 17 + test/CodeGen/R600/extload.ll | 51 + test/CodeGen/R600/fabs.ll | 54 + test/CodeGen/R600/fadd.ll | 45 + test/CodeGen/R600/fadd64.ll | 13 + test/CodeGen/R600/fcmp-cnd.ll | 14 + test/CodeGen/R600/fcmp-cnde-int-args.ll | 16 + test/CodeGen/R600/fcmp.ll | 38 + test/CodeGen/R600/fcmp64.ll | 79 + test/CodeGen/R600/fconst64.ll | 12 + test/CodeGen/R600/fdiv.ll | 50 + test/CodeGen/R600/fdiv64.ll | 14 + test/CodeGen/R600/fetch-limits.r600.ll | 48 + test/CodeGen/R600/fetch-limits.r700+.ll | 81 + test/CodeGen/R600/floor.ll | 16 + test/CodeGen/R600/fma.ll | 31 + test/CodeGen/R600/fmad.ll | 19 + test/CodeGen/R600/fmax.ll | 17 + test/CodeGen/R600/fmin.ll | 17 + test/CodeGen/R600/fmul.ll | 49 + test/CodeGen/R600/fmul64.ll | 13 + test/CodeGen/R600/fmuladd.ll | 31 + test/CodeGen/R600/fneg-fabs.ll | 55 + test/CodeGen/R600/fneg.ll | 61 + test/CodeGen/R600/fp64_to_sint.ll | 9 + test/CodeGen/R600/fp_to_sint.ll | 31 + test/CodeGen/R600/fp_to_uint.ll | 33 + test/CodeGen/R600/fpext.ll | 9 + test/CodeGen/R600/fptrunc.ll | 9 + test/CodeGen/R600/fsqrt.ll | 24 + test/CodeGen/R600/fsub.ll | 49 + test/CodeGen/R600/fsub64.ll | 13 + test/CodeGen/R600/gep-address-space.ll | 40 + test/CodeGen/R600/i8-to-double-to-float.ll | 11 + .../R600/icmp-select-sete-reverse-args.ll | 18 + test/CodeGen/R600/imm.ll | 23 + test/CodeGen/R600/indirect-addressing-si.ll | 48 + test/CodeGen/R600/insert_vector_elt.ll | 16 + test/CodeGen/R600/jump-address.ll | 52 + test/CodeGen/R600/kcache-fold.ll | 100 + test/CodeGen/R600/kernel-args.ll | 455 + test/CodeGen/R600/lds-oqap-crash.ll | 28 + test/CodeGen/R600/lds-output-queue.ll | 99 + test/CodeGen/R600/lds-size.ll | 26 + .../R600/legalizedag-bug-expand-setcc.ll | 26 + test/CodeGen/R600/lit.local.cfg | 3 + test/CodeGen/R600/literals.ll | 64 + .../CodeGen/R600/llvm.AMDGPU.barrier.local.ll | 24 + test/CodeGen/R600/llvm.AMDGPU.cube.ll | 59 + test/CodeGen/R600/llvm.AMDGPU.imax.ll | 21 + test/CodeGen/R600/llvm.AMDGPU.imin.ll | 21 + test/CodeGen/R600/llvm.AMDGPU.kill.ll | 18 + test/CodeGen/R600/llvm.AMDGPU.mul.ll | 17 + test/CodeGen/R600/llvm.AMDGPU.tex.ll | 42 + test/CodeGen/R600/llvm.AMDGPU.trunc.ll | 16 + test/CodeGen/R600/llvm.AMDGPU.umax.ll | 21 + test/CodeGen/R600/llvm.AMDGPU.umin.ll | 21 + .../R600/llvm.SI.fs.interp.constant.ll | 21 + test/CodeGen/R600/llvm.SI.imageload.ll | 131 + test/CodeGen/R600/llvm.SI.load.dword.ll | 40 + test/CodeGen/R600/llvm.SI.resinfo.ll | 110 + test/CodeGen/R600/llvm.SI.sample-masked.ll | 93 + test/CodeGen/R600/llvm.SI.sample.ll | 157 + test/CodeGen/R600/llvm.SI.sampled.ll | 140 + test/CodeGen/R600/llvm.SI.sendmsg.ll | 21 + test/CodeGen/R600/llvm.SI.tbuffer.store.ll | 44 + test/CodeGen/R600/llvm.SI.tid.ll | 16 + test/CodeGen/R600/llvm.cos.ll | 19 + test/CodeGen/R600/llvm.floor.ll | 54 + test/CodeGen/R600/llvm.pow.ll | 19 + test/CodeGen/R600/llvm.rint.ll | 54 + test/CodeGen/R600/llvm.round.ll | 41 + test/CodeGen/R600/llvm.sin.ll | 19 + test/CodeGen/R600/llvm.sqrt.ll | 54 + test/CodeGen/R600/load-input-fold.ll | 118 + test/CodeGen/R600/load.ll | 698 + test/CodeGen/R600/load.vec.ll | 24 + test/CodeGen/R600/load64.ll | 20 + test/CodeGen/R600/local-memory-two-objects.ll | 58 + test/CodeGen/R600/local-memory.ll | 50 + test/CodeGen/R600/loop-address.ll | 37 + test/CodeGen/R600/lshl.ll | 14 + test/CodeGen/R600/lshr.ll | 14 + test/CodeGen/R600/mad_int24.ll | 20 + test/CodeGen/R600/mad_uint24.ll | 70 + test/CodeGen/R600/max-literals.ll | 67 + test/CodeGen/R600/mul.ll | 42 + test/CodeGen/R600/mul_int24.ll | 19 + test/CodeGen/R600/mul_uint24.ll | 65 + test/CodeGen/R600/mulhu.ll | 16 + test/CodeGen/R600/or.ll | 53 + test/CodeGen/R600/packetizer.ll | 34 + test/CodeGen/R600/parallelandifcollapse.ll | 54 + test/CodeGen/R600/parallelorifcollapse.ll | 61 + test/CodeGen/R600/predicate-dp4.ll | 27 + test/CodeGen/R600/predicates.ll | 104 + test/CodeGen/R600/private-memory.ll | 115 + test/CodeGen/R600/pv-packing.ll | 45 + test/CodeGen/R600/pv.ll | 241 + test/CodeGen/R600/r600-encoding.ll | 25 + test/CodeGen/R600/r600-export-fix.ll | 142 + test/CodeGen/R600/r600cfg.ll | 120 + test/CodeGen/R600/reciprocal.ll | 15 + test/CodeGen/R600/rotr.ll | 37 + test/CodeGen/R600/rv7x0_count3.ll | 41 + .../R600/schedule-fs-loop-nested-if.ll | 82 + test/CodeGen/R600/schedule-fs-loop-nested.ll | 88 + test/CodeGen/R600/schedule-fs-loop.ll | 55 + test/CodeGen/R600/schedule-if-2.ll | 94 + test/CodeGen/R600/schedule-if.ll | 46 + .../R600/schedule-vs-if-nested-loop.ll | 132 + test/CodeGen/R600/sdiv.ll | 21 + test/CodeGen/R600/select.ll | 46 + test/CodeGen/R600/selectcc-cnd.ll | 12 + test/CodeGen/R600/selectcc-cnde-int.ll | 12 + .../R600/selectcc-icmp-select-float.ll | 16 + test/CodeGen/R600/selectcc-opt.ll | 65 + test/CodeGen/R600/set-dx10.ll | 161 + test/CodeGen/R600/setcc.ll | 333 + test/CodeGen/R600/setcc64.ll | 263 + test/CodeGen/R600/seto.ll | 13 + test/CodeGen/R600/setuo.ll | 13 + .../R600/sgpr-copy-duplicate-operand.ll | 18 + test/CodeGen/R600/sgpr-copy.ll | 327 + test/CodeGen/R600/shared-op-cycle.ll | 32 + test/CodeGen/R600/shl.ll | 43 + test/CodeGen/R600/si-annotate-cf-assertion.ll | 23 + test/CodeGen/R600/si-lod-bias.ll | 51 + test/CodeGen/R600/si-sgpr-spill.ll | 692 + test/CodeGen/R600/si-vector-hang.ll | 107 + test/CodeGen/R600/sign_extend.ll | 12 + test/CodeGen/R600/sint_to_fp.ll | 31 + test/CodeGen/R600/sint_to_fp64.ll | 9 + test/CodeGen/R600/sra.ll | 54 + test/CodeGen/R600/srl.ll | 41 + test/CodeGen/R600/store-vector-ptrs.ll | 8 + test/CodeGen/R600/store.ll | 282 + test/CodeGen/R600/store.r600.ll | 22 + test/CodeGen/R600/structurize.ll | 83 + test/CodeGen/R600/structurize1.ll | 62 + test/CodeGen/R600/sub.ll | 40 + test/CodeGen/R600/swizzle-export.ll | 129 + test/CodeGen/R600/tex-clause-antidep.ll | 25 + test/CodeGen/R600/texture-input-merge.ll | 31 + .../trunc-vector-store-assertion-failure.ll | 20 + test/CodeGen/R600/trunc.ll | 40 + test/CodeGen/R600/udiv.ll | 47 + test/CodeGen/R600/uint_to_fp.ll | 46 + test/CodeGen/R600/unaligned-load-store.ll | 17 + test/CodeGen/R600/unsupported-cc.ll | 125 + test/CodeGen/R600/urecip.ll | 12 + test/CodeGen/R600/urem.ll | 34 + test/CodeGen/R600/vertex-fetch-encoding.ll | 25 + test/CodeGen/R600/vselect.ll | 76 + test/CodeGen/R600/vselect64.ll | 15 + test/CodeGen/R600/vtx-fetch-branch.ll | 29 + test/CodeGen/R600/vtx-schedule.ll | 18 + test/CodeGen/R600/wait.ll | 37 + test/CodeGen/R600/work-item-intrinsics.ll | 211 + test/CodeGen/R600/wrong-transalu-pos-fix.ll | 86 + test/CodeGen/R600/xor.ll | 56 + test/CodeGen/R600/zero_extend.ll | 28 + .../SPARC/2006-01-22-BitConvertLegalize.ll | 12 + test/CodeGen/SPARC/2007-05-09-JumpTables.ll | 30 + .../SPARC/2007-07-05-LiveIntervalAssert.ll | 11 + .../2008-10-10-InlineAsmMemoryOperand.ll | 16 + .../SPARC/2008-10-10-InlineAsmRegOperand.ll | 14 + test/CodeGen/SPARC/2009-08-28-PIC.ll | 9 + test/CodeGen/SPARC/2009-08-28-WeakLinkage.ll | 6 + test/CodeGen/SPARC/2011-01-11-CC.ll | 191 + test/CodeGen/SPARC/2011-01-11-Call.ll | 53 + test/CodeGen/SPARC/2011-01-11-FrameAddr.ll | 85 + test/CodeGen/SPARC/2011-01-19-DelaySlot.ll | 183 + test/CodeGen/SPARC/2011-01-21-ByValArgs.ll | 18 + test/CodeGen/SPARC/2011-01-22-SRet.ll | 36 + .../SPARC/2011-12-03-TailDuplication.ll | 25 + .../SPARC/2012-05-01-LowerArguments.ll | 13 + test/CodeGen/SPARC/2013-05-17-CallFrame.ll | 26 + test/CodeGen/SPARC/64abi.ll | 413 + test/CodeGen/SPARC/64bit.ll | 310 + test/CodeGen/SPARC/64cond.ll | 125 + test/CodeGen/SPARC/DbgValueOtherTargets.test | 1 + test/CodeGen/SPARC/basictest.ll | 38 + test/CodeGen/SPARC/blockaddr.ll | 77 + test/CodeGen/SPARC/constpool.ll | 57 + test/CodeGen/SPARC/ctpop.ll | 10 + test/CodeGen/SPARC/exception.ll | 112 + test/CodeGen/SPARC/float.ll | 249 + test/CodeGen/SPARC/fp128.ll | 234 + test/CodeGen/SPARC/globals.ll | 57 + test/CodeGen/SPARC/leafproc.ll | 80 + test/CodeGen/SPARC/lit.local.cfg | 4 + test/CodeGen/SPARC/mult-alt-generic-sparc.ll | 323 + test/CodeGen/SPARC/private.ll | 21 + test/CodeGen/SPARC/rem.ll | 39 + test/CodeGen/SPARC/setjmp.ll | 72 + test/CodeGen/SPARC/tls.ll | 73 + test/CodeGen/SPARC/varargs.ll | 76 + test/CodeGen/SystemZ/Large/branch-range-01.py | 105 + test/CodeGen/SystemZ/Large/branch-range-02.py | 82 + test/CodeGen/SystemZ/Large/branch-range-03.py | 107 + test/CodeGen/SystemZ/Large/branch-range-04.py | 111 + test/CodeGen/SystemZ/Large/branch-range-05.py | 109 + test/CodeGen/SystemZ/Large/branch-range-06.py | 109 + test/CodeGen/SystemZ/Large/branch-range-07.py | 68 + test/CodeGen/SystemZ/Large/branch-range-08.py | 69 + test/CodeGen/SystemZ/Large/branch-range-09.py | 107 + test/CodeGen/SystemZ/Large/branch-range-10.py | 111 + test/CodeGen/SystemZ/Large/branch-range-11.py | 127 + test/CodeGen/SystemZ/Large/branch-range-12.py | 127 + test/CodeGen/SystemZ/Large/lit.local.cfg | 10 + test/CodeGen/SystemZ/Large/spill-01.py | 40 + test/CodeGen/SystemZ/Large/spill-02.py | 73 + test/CodeGen/SystemZ/addr-01.ll | 107 + test/CodeGen/SystemZ/addr-02.ll | 116 + test/CodeGen/SystemZ/addr-03.ll | 48 + test/CodeGen/SystemZ/alias-01.ll | 19 + test/CodeGen/SystemZ/alloca-01.ll | 65 + test/CodeGen/SystemZ/alloca-02.ll | 52 + test/CodeGen/SystemZ/and-01.ll | 175 + test/CodeGen/SystemZ/and-02.ll | 226 + test/CodeGen/SystemZ/and-03.ll | 140 + test/CodeGen/SystemZ/and-04.ll | 183 + test/CodeGen/SystemZ/and-05.ll | 165 + test/CodeGen/SystemZ/and-06.ll | 108 + test/CodeGen/SystemZ/and-07.ll | 39 + test/CodeGen/SystemZ/and-08.ll | 378 + test/CodeGen/SystemZ/args-01.ll | 73 + test/CodeGen/SystemZ/args-02.ll | 75 + test/CodeGen/SystemZ/args-03.ll | 77 + test/CodeGen/SystemZ/args-04.ll | 126 + test/CodeGen/SystemZ/args-05.ll | 47 + test/CodeGen/SystemZ/args-06.ll | 76 + test/CodeGen/SystemZ/asm-01.ll | 61 + test/CodeGen/SystemZ/asm-02.ll | 52 + test/CodeGen/SystemZ/asm-03.ll | 16 + test/CodeGen/SystemZ/asm-04.ll | 16 + test/CodeGen/SystemZ/asm-05.ll | 15 + test/CodeGen/SystemZ/asm-06.ll | 39 + test/CodeGen/SystemZ/asm-07.ll | 39 + test/CodeGen/SystemZ/asm-08.ll | 39 + test/CodeGen/SystemZ/asm-09.ll | 83 + test/CodeGen/SystemZ/asm-10.ll | 30 + test/CodeGen/SystemZ/asm-11.ll | 41 + test/CodeGen/SystemZ/asm-12.ll | 41 + test/CodeGen/SystemZ/asm-13.ll | 41 + test/CodeGen/SystemZ/asm-14.ll | 41 + test/CodeGen/SystemZ/asm-15.ll | 32 + test/CodeGen/SystemZ/asm-16.ll | 32 + test/CodeGen/SystemZ/asm-17.ll | 105 + test/CodeGen/SystemZ/asm-18.ll | 745 + test/CodeGen/SystemZ/atomic-load-01.ll | 13 + test/CodeGen/SystemZ/atomic-load-02.ll | 13 + test/CodeGen/SystemZ/atomic-load-03.ll | 14 + test/CodeGen/SystemZ/atomic-load-04.ll | 14 + test/CodeGen/SystemZ/atomic-store-01.ll | 13 + test/CodeGen/SystemZ/atomic-store-02.ll | 13 + test/CodeGen/SystemZ/atomic-store-03.ll | 16 + test/CodeGen/SystemZ/atomic-store-04.ll | 16 + test/CodeGen/SystemZ/atomicrmw-add-01.ll | 132 + test/CodeGen/SystemZ/atomicrmw-add-02.ll | 132 + test/CodeGen/SystemZ/atomicrmw-add-03.ll | 94 + test/CodeGen/SystemZ/atomicrmw-add-04.ll | 112 + test/CodeGen/SystemZ/atomicrmw-and-01.ll | 133 + test/CodeGen/SystemZ/atomicrmw-and-02.ll | 133 + test/CodeGen/SystemZ/atomicrmw-and-03.ll | 85 + test/CodeGen/SystemZ/atomicrmw-and-04.ll | 171 + test/CodeGen/SystemZ/atomicrmw-minmax-01.ll | 224 + test/CodeGen/SystemZ/atomicrmw-minmax-02.ll | 224 + test/CodeGen/SystemZ/atomicrmw-minmax-03.ll | 172 + test/CodeGen/SystemZ/atomicrmw-minmax-04.ll | 139 + test/CodeGen/SystemZ/atomicrmw-nand-01.ll | 139 + test/CodeGen/SystemZ/atomicrmw-nand-02.ll | 139 + test/CodeGen/SystemZ/atomicrmw-nand-03.ll | 93 + test/CodeGen/SystemZ/atomicrmw-nand-04.ll | 177 + test/CodeGen/SystemZ/atomicrmw-or-01.ll | 132 + test/CodeGen/SystemZ/atomicrmw-or-02.ll | 132 + test/CodeGen/SystemZ/atomicrmw-or-03.ll | 85 + test/CodeGen/SystemZ/atomicrmw-or-04.ll | 158 + test/CodeGen/SystemZ/atomicrmw-sub-01.ll | 132 + test/CodeGen/SystemZ/atomicrmw-sub-02.ll | 132 + test/CodeGen/SystemZ/atomicrmw-sub-03.ll | 94 + test/CodeGen/SystemZ/atomicrmw-sub-04.ll | 112 + test/CodeGen/SystemZ/atomicrmw-xchg-01.ll | 55 + test/CodeGen/SystemZ/atomicrmw-xchg-02.ll | 55 + test/CodeGen/SystemZ/atomicrmw-xchg-03.ll | 122 + test/CodeGen/SystemZ/atomicrmw-xchg-04.ll | 88 + test/CodeGen/SystemZ/atomicrmw-xor-01.ll | 132 + test/CodeGen/SystemZ/atomicrmw-xor-02.ll | 132 + test/CodeGen/SystemZ/atomicrmw-xor-03.ll | 49 + test/CodeGen/SystemZ/atomicrmw-xor-04.ll | 77 + test/CodeGen/SystemZ/branch-01.ll | 14 + test/CodeGen/SystemZ/branch-02.ll | 95 + test/CodeGen/SystemZ/branch-03.ll | 63 + test/CodeGen/SystemZ/branch-04.ll | 218 + test/CodeGen/SystemZ/branch-05.ll | 57 + test/CodeGen/SystemZ/branch-06.ll | 190 + test/CodeGen/SystemZ/branch-07.ll | 157 + test/CodeGen/SystemZ/branch-08.ll | 46 + test/CodeGen/SystemZ/branch-09.ll | 62 + test/CodeGen/SystemZ/branch-10.ll | 62 + test/CodeGen/SystemZ/bswap-01.ll | 24 + test/CodeGen/SystemZ/bswap-02.ll | 176 + test/CodeGen/SystemZ/bswap-03.ll | 176 + test/CodeGen/SystemZ/bswap-04.ll | 99 + test/CodeGen/SystemZ/bswap-05.ll | 99 + test/CodeGen/SystemZ/call-01.ll | 18 + test/CodeGen/SystemZ/call-02.ll | 16 + test/CodeGen/SystemZ/call-03.ll | 125 + test/CodeGen/SystemZ/cmpxchg-01.ll | 55 + test/CodeGen/SystemZ/cmpxchg-02.ll | 55 + test/CodeGen/SystemZ/cmpxchg-03.ll | 131 + test/CodeGen/SystemZ/cmpxchg-04.ll | 98 + test/CodeGen/SystemZ/cond-load-01.ll | 130 + test/CodeGen/SystemZ/cond-load-02.ll | 130 + test/CodeGen/SystemZ/cond-move-01.ll | 48 + test/CodeGen/SystemZ/cond-store-01.ll | 398 + test/CodeGen/SystemZ/cond-store-02.ll | 398 + test/CodeGen/SystemZ/cond-store-03.ll | 322 + test/CodeGen/SystemZ/cond-store-04.ll | 214 + test/CodeGen/SystemZ/cond-store-05.ll | 213 + test/CodeGen/SystemZ/cond-store-06.ll | 213 + test/CodeGen/SystemZ/cond-store-07.ll | 186 + test/CodeGen/SystemZ/cond-store-08.ll | 124 + test/CodeGen/SystemZ/fp-abs-01.ll | 40 + test/CodeGen/SystemZ/fp-abs-02.ll | 43 + test/CodeGen/SystemZ/fp-add-01.ll | 119 + test/CodeGen/SystemZ/fp-add-02.ll | 119 + test/CodeGen/SystemZ/fp-add-03.ll | 20 + test/CodeGen/SystemZ/fp-cmp-01.ll | 319 + test/CodeGen/SystemZ/fp-cmp-02.ll | 175 + test/CodeGen/SystemZ/fp-cmp-03.ll | 36 + test/CodeGen/SystemZ/fp-cmp-04.ll | 348 + test/CodeGen/SystemZ/fp-const-01.ll | 30 + test/CodeGen/SystemZ/fp-const-02.ll | 31 + test/CodeGen/SystemZ/fp-const-03.ll | 14 + test/CodeGen/SystemZ/fp-const-04.ll | 15 + test/CodeGen/SystemZ/fp-const-05.ll | 18 + test/CodeGen/SystemZ/fp-const-06.ll | 14 + test/CodeGen/SystemZ/fp-const-07.ll | 18 + test/CodeGen/SystemZ/fp-const-08.ll | 21 + test/CodeGen/SystemZ/fp-const-09.ll | 20 + test/CodeGen/SystemZ/fp-conv-01.ll | 61 + test/CodeGen/SystemZ/fp-conv-02.ll | 152 + test/CodeGen/SystemZ/fp-conv-03.ll | 170 + test/CodeGen/SystemZ/fp-conv-04.ll | 170 + test/CodeGen/SystemZ/fp-conv-05.ll | 33 + test/CodeGen/SystemZ/fp-conv-06.ll | 37 + test/CodeGen/SystemZ/fp-conv-07.ll | 33 + test/CodeGen/SystemZ/fp-conv-08.ll | 35 + test/CodeGen/SystemZ/fp-conv-09.ll | 33 + test/CodeGen/SystemZ/fp-conv-10.ll | 45 + test/CodeGen/SystemZ/fp-conv-11.ll | 33 + test/CodeGen/SystemZ/fp-conv-12.ll | 44 + test/CodeGen/SystemZ/fp-copysign-01.ll | 128 + test/CodeGen/SystemZ/fp-div-01.ll | 119 + test/CodeGen/SystemZ/fp-div-02.ll | 119 + test/CodeGen/SystemZ/fp-div-03.ll | 20 + test/CodeGen/SystemZ/fp-move-01.ll | 30 + test/CodeGen/SystemZ/fp-move-02.ll | 393 + test/CodeGen/SystemZ/fp-move-03.ll | 110 + test/CodeGen/SystemZ/fp-move-04.ll | 110 + test/CodeGen/SystemZ/fp-move-05.ll | 151 + test/CodeGen/SystemZ/fp-move-06.ll | 110 + test/CodeGen/SystemZ/fp-move-07.ll | 110 + test/CodeGen/SystemZ/fp-move-08.ll | 151 + test/CodeGen/SystemZ/fp-move-09.ll | 62 + test/CodeGen/SystemZ/fp-mul-01.ll | 119 + test/CodeGen/SystemZ/fp-mul-02.ll | 203 + test/CodeGen/SystemZ/fp-mul-03.ll | 119 + test/CodeGen/SystemZ/fp-mul-04.ll | 233 + test/CodeGen/SystemZ/fp-mul-05.ll | 20 + test/CodeGen/SystemZ/fp-mul-06.ll | 102 + test/CodeGen/SystemZ/fp-mul-07.ll | 102 + test/CodeGen/SystemZ/fp-mul-08.ll | 110 + test/CodeGen/SystemZ/fp-mul-09.ll | 110 + test/CodeGen/SystemZ/fp-neg-01.ll | 38 + test/CodeGen/SystemZ/fp-round-01.ll | 150 + test/CodeGen/SystemZ/fp-round-02.ll | 195 + test/CodeGen/SystemZ/fp-sqrt-01.ll | 169 + test/CodeGen/SystemZ/fp-sqrt-02.ll | 169 + test/CodeGen/SystemZ/fp-sqrt-03.ll | 20 + test/CodeGen/SystemZ/fp-sub-01.ll | 119 + test/CodeGen/SystemZ/fp-sub-02.ll | 119 + test/CodeGen/SystemZ/fp-sub-03.ll | 20 + test/CodeGen/SystemZ/frame-01.ll | 126 + test/CodeGen/SystemZ/frame-02.ll | 257 + test/CodeGen/SystemZ/frame-03.ll | 259 + test/CodeGen/SystemZ/frame-04.ll | 187 + test/CodeGen/SystemZ/frame-05.ll | 219 + test/CodeGen/SystemZ/frame-06.ll | 216 + test/CodeGen/SystemZ/frame-07.ll | 249 + test/CodeGen/SystemZ/frame-08.ll | 277 + test/CodeGen/SystemZ/frame-09.ll | 153 + test/CodeGen/SystemZ/frame-10.ll | 14 + test/CodeGen/SystemZ/frame-11.ll | 18 + test/CodeGen/SystemZ/frame-13.ll | 301 + test/CodeGen/SystemZ/frame-14.ll | 326 + test/CodeGen/SystemZ/frame-15.ll | 355 + test/CodeGen/SystemZ/frame-16.ll | 331 + test/CodeGen/SystemZ/frame-17.ll | 177 + test/CodeGen/SystemZ/frame-18.ll | 92 + test/CodeGen/SystemZ/insert-01.ll | 230 + test/CodeGen/SystemZ/insert-02.ll | 230 + test/CodeGen/SystemZ/insert-03.ll | 71 + test/CodeGen/SystemZ/insert-04.ll | 137 + test/CodeGen/SystemZ/insert-05.ll | 224 + test/CodeGen/SystemZ/insert-06.ll | 180 + test/CodeGen/SystemZ/int-abs-01.ll | 83 + test/CodeGen/SystemZ/int-add-01.ll | 131 + test/CodeGen/SystemZ/int-add-02.ll | 175 + test/CodeGen/SystemZ/int-add-03.ll | 180 + test/CodeGen/SystemZ/int-add-04.ll | 180 + test/CodeGen/SystemZ/int-add-05.ll | 140 + test/CodeGen/SystemZ/int-add-06.ll | 93 + test/CodeGen/SystemZ/int-add-07.ll | 131 + test/CodeGen/SystemZ/int-add-08.ll | 144 + test/CodeGen/SystemZ/int-add-09.ll | 56 + test/CodeGen/SystemZ/int-add-10.ll | 165 + test/CodeGen/SystemZ/int-add-11.ll | 295 + test/CodeGen/SystemZ/int-add-12.ll | 294 + test/CodeGen/SystemZ/int-add-13.ll | 39 + test/CodeGen/SystemZ/int-add-14.ll | 67 + test/CodeGen/SystemZ/int-add-15.ll | 67 + test/CodeGen/SystemZ/int-add-16.ll | 93 + test/CodeGen/SystemZ/int-cmp-01.ll | 165 + test/CodeGen/SystemZ/int-cmp-02.ll | 196 + test/CodeGen/SystemZ/int-cmp-03.ll | 174 + test/CodeGen/SystemZ/int-cmp-04.ll | 121 + test/CodeGen/SystemZ/int-cmp-05.ll | 306 + test/CodeGen/SystemZ/int-cmp-06.ll | 356 + test/CodeGen/SystemZ/int-cmp-07.ll | 130 + test/CodeGen/SystemZ/int-cmp-08.ll | 130 + test/CodeGen/SystemZ/int-cmp-09.ll | 222 + test/CodeGen/SystemZ/int-cmp-10.ll | 50 + test/CodeGen/SystemZ/int-cmp-11.ll | 176 + test/CodeGen/SystemZ/int-cmp-12.ll | 61 + test/CodeGen/SystemZ/int-cmp-13.ll | 189 + test/CodeGen/SystemZ/int-cmp-14.ll | 189 + test/CodeGen/SystemZ/int-cmp-15.ll | 241 + test/CodeGen/SystemZ/int-cmp-16.ll | 133 + test/CodeGen/SystemZ/int-cmp-17.ll | 133 + test/CodeGen/SystemZ/int-cmp-18.ll | 133 + test/CodeGen/SystemZ/int-cmp-19.ll | 133 + test/CodeGen/SystemZ/int-cmp-20.ll | 220 + test/CodeGen/SystemZ/int-cmp-21.ll | 220 + test/CodeGen/SystemZ/int-cmp-22.ll | 128 + test/CodeGen/SystemZ/int-cmp-23.ll | 89 + test/CodeGen/SystemZ/int-cmp-24.ll | 55 + test/CodeGen/SystemZ/int-cmp-25.ll | 55 + test/CodeGen/SystemZ/int-cmp-26.ll | 133 + test/CodeGen/SystemZ/int-cmp-27.ll | 133 + test/CodeGen/SystemZ/int-cmp-28.ll | 133 + test/CodeGen/SystemZ/int-cmp-29.ll | 133 + test/CodeGen/SystemZ/int-cmp-30.ll | 225 + test/CodeGen/SystemZ/int-cmp-31.ll | 225 + test/CodeGen/SystemZ/int-cmp-32.ll | 237 + test/CodeGen/SystemZ/int-cmp-33.ll | 139 + test/CodeGen/SystemZ/int-cmp-34.ll | 237 + test/CodeGen/SystemZ/int-cmp-35.ll | 139 + test/CodeGen/SystemZ/int-cmp-36.ll | 121 + test/CodeGen/SystemZ/int-cmp-37.ll | 121 + test/CodeGen/SystemZ/int-cmp-38.ll | 135 + test/CodeGen/SystemZ/int-cmp-39.ll | 121 + test/CodeGen/SystemZ/int-cmp-40.ll | 121 + test/CodeGen/SystemZ/int-cmp-41.ll | 121 + test/CodeGen/SystemZ/int-cmp-42.ll | 121 + test/CodeGen/SystemZ/int-cmp-43.ll | 116 + test/CodeGen/SystemZ/int-cmp-44.ll | 799 + test/CodeGen/SystemZ/int-cmp-45.ll | 115 + test/CodeGen/SystemZ/int-cmp-46.ll | 491 + test/CodeGen/SystemZ/int-cmp-47.ll | 234 + test/CodeGen/SystemZ/int-cmp-48.ll | 245 + test/CodeGen/SystemZ/int-cmp-49.ll | 49 + test/CodeGen/SystemZ/int-const-01.ll | 113 + test/CodeGen/SystemZ/int-const-02.ll | 285 + test/CodeGen/SystemZ/int-const-03.ll | 166 + test/CodeGen/SystemZ/int-const-04.ll | 111 + test/CodeGen/SystemZ/int-const-05.ll | 101 + test/CodeGen/SystemZ/int-const-06.ll | 102 + test/CodeGen/SystemZ/int-conv-01.ll | 199 + test/CodeGen/SystemZ/int-conv-02.ll | 209 + test/CodeGen/SystemZ/int-conv-03.ll | 199 + test/CodeGen/SystemZ/int-conv-04.ll | 208 + test/CodeGen/SystemZ/int-conv-05.ll | 234 + test/CodeGen/SystemZ/int-conv-06.ll | 209 + test/CodeGen/SystemZ/int-conv-07.ll | 199 + test/CodeGen/SystemZ/int-conv-08.ll | 208 + test/CodeGen/SystemZ/int-conv-09.ll | 104 + test/CodeGen/SystemZ/int-conv-10.ll | 113 + test/CodeGen/SystemZ/int-conv-11.ll | 350 + test/CodeGen/SystemZ/int-div-01.ll | 251 + test/CodeGen/SystemZ/int-div-02.ll | 211 + test/CodeGen/SystemZ/int-div-03.ll | 208 + test/CodeGen/SystemZ/int-div-04.ll | 202 + test/CodeGen/SystemZ/int-div-05.ll | 214 + test/CodeGen/SystemZ/int-div-06.ll | 56 + test/CodeGen/SystemZ/int-move-01.ll | 35 + test/CodeGen/SystemZ/int-move-02.ll | 110 + test/CodeGen/SystemZ/int-move-03.ll | 78 + test/CodeGen/SystemZ/int-move-04.ll | 130 + test/CodeGen/SystemZ/int-move-05.ll | 130 + test/CodeGen/SystemZ/int-move-06.ll | 117 + test/CodeGen/SystemZ/int-move-07.ll | 78 + test/CodeGen/SystemZ/int-move-08.ll | 134 + test/CodeGen/SystemZ/int-move-09.ll | 166 + test/CodeGen/SystemZ/int-mul-01.ll | 131 + test/CodeGen/SystemZ/int-mul-02.ll | 174 + test/CodeGen/SystemZ/int-mul-03.ll | 180 + test/CodeGen/SystemZ/int-mul-04.ll | 139 + test/CodeGen/SystemZ/int-mul-05.ll | 159 + test/CodeGen/SystemZ/int-mul-06.ll | 159 + test/CodeGen/SystemZ/int-mul-07.ll | 64 + test/CodeGen/SystemZ/int-mul-08.ll | 268 + test/CodeGen/SystemZ/int-neg-01.ll | 42 + test/CodeGen/SystemZ/int-neg-02.ll | 91 + test/CodeGen/SystemZ/int-sub-01.ll | 175 + test/CodeGen/SystemZ/int-sub-02.ll | 180 + test/CodeGen/SystemZ/int-sub-03.ll | 180 + test/CodeGen/SystemZ/int-sub-04.ll | 140 + test/CodeGen/SystemZ/int-sub-05.ll | 153 + test/CodeGen/SystemZ/int-sub-06.ll | 165 + test/CodeGen/SystemZ/int-sub-07.ll | 131 + test/CodeGen/SystemZ/int-sub-08.ll | 39 + test/CodeGen/SystemZ/int-sub-09.ll | 22 + test/CodeGen/SystemZ/la-01.ll | 95 + test/CodeGen/SystemZ/la-02.ll | 87 + test/CodeGen/SystemZ/la-03.ll | 85 + test/CodeGen/SystemZ/la-04.ll | 18 + test/CodeGen/SystemZ/lit.local.cfg | 4 + test/CodeGen/SystemZ/loop-01.ll | 124 + test/CodeGen/SystemZ/memchr-01.ll | 21 + test/CodeGen/SystemZ/memchr-02.ll | 57 + test/CodeGen/SystemZ/memcmp-01.ll | 221 + test/CodeGen/SystemZ/memcmp-02.ll | 139 + test/CodeGen/SystemZ/memcpy-01.ll | 235 + test/CodeGen/SystemZ/memcpy-02.ll | 392 + test/CodeGen/SystemZ/memset-01.ll | 160 + test/CodeGen/SystemZ/memset-02.ll | 162 + test/CodeGen/SystemZ/memset-03.ll | 382 + test/CodeGen/SystemZ/memset-04.ll | 398 + test/CodeGen/SystemZ/or-01.ll | 175 + test/CodeGen/SystemZ/or-02.ll | 66 + test/CodeGen/SystemZ/or-03.ll | 140 + test/CodeGen/SystemZ/or-04.ll | 182 + test/CodeGen/SystemZ/or-05.ll | 165 + test/CodeGen/SystemZ/or-06.ll | 108 + test/CodeGen/SystemZ/or-07.ll | 39 + test/CodeGen/SystemZ/or-08.ll | 57 + test/CodeGen/SystemZ/prefetch-01.ll | 87 + test/CodeGen/SystemZ/risbg-01.ll | 472 + test/CodeGen/SystemZ/risbg-02.ll | 93 + test/CodeGen/SystemZ/rnsbg-01.ll | 257 + test/CodeGen/SystemZ/rosbg-01.ll | 110 + test/CodeGen/SystemZ/rxsbg-01.ll | 112 + test/CodeGen/SystemZ/setcc-01.ll | 74 + test/CodeGen/SystemZ/setcc-02.ll | 174 + test/CodeGen/SystemZ/shift-01.ll | 114 + test/CodeGen/SystemZ/shift-02.ll | 114 + test/CodeGen/SystemZ/shift-03.ll | 114 + test/CodeGen/SystemZ/shift-04.ll | 189 + test/CodeGen/SystemZ/shift-05.ll | 149 + test/CodeGen/SystemZ/shift-06.ll | 149 + test/CodeGen/SystemZ/shift-07.ll | 149 + test/CodeGen/SystemZ/shift-08.ll | 190 + test/CodeGen/SystemZ/shift-09.ll | 63 + test/CodeGen/SystemZ/shift-10.ll | 78 + test/CodeGen/SystemZ/spill-01.ll | 548 + test/CodeGen/SystemZ/strcmp-01.ll | 70 + test/CodeGen/SystemZ/strcmp-02.ll | 72 + test/CodeGen/SystemZ/strcpy-01.ll | 50 + test/CodeGen/SystemZ/strlen-01.ll | 39 + test/CodeGen/SystemZ/strlen-02.ll | 39 + test/CodeGen/SystemZ/tls-01.ll | 22 + test/CodeGen/SystemZ/unaligned-01.ll | 62 + test/CodeGen/SystemZ/xor-01.ll | 175 + test/CodeGen/SystemZ/xor-02.ll | 40 + test/CodeGen/SystemZ/xor-03.ll | 140 + test/CodeGen/SystemZ/xor-04.ll | 69 + test/CodeGen/SystemZ/xor-05.ll | 165 + test/CodeGen/SystemZ/xor-06.ll | 108 + test/CodeGen/SystemZ/xor-07.ll | 39 + test/CodeGen/SystemZ/xor-08.ll | 57 + .../CodeGen/Thumb/2007-01-31-RegInfoAssert.ll | 16 + .../Thumb/2007-02-02-JoinIntervalsCrash.ll | 27 + .../Thumb/2007-05-05-InvalidPushPop.ll | 41 + .../Thumb/2009-06-18-ThumbCommuteMul.ll | 8 + test/CodeGen/Thumb/2009-07-20-TwoAddrBug.ll | 11 + test/CodeGen/Thumb/2009-07-27-PEIAssert.ll | 26 + .../Thumb/2009-08-12-ConstIslandAssert.ll | 737 + .../CodeGen/Thumb/2009-08-12-RegInfoAssert.ll | 40 + test/CodeGen/Thumb/2009-08-20-ISelBug.ll | 66 + .../Thumb/2009-12-17-pre-regalloc-taildup.ll | 66 + test/CodeGen/Thumb/2010-06-18-SibCallCrash.ll | 8 + test/CodeGen/Thumb/2010-07-01-FuncAlign.ll | 6 + .../CodeGen/Thumb/2010-07-15-debugOrdering.ll | 155 + test/CodeGen/Thumb/2011-05-11-DAGLegalizer.ll | 60 + test/CodeGen/Thumb/2011-06-16-NoGPRs.ll | 24 + test/CodeGen/Thumb/2011-EpilogueBug.ll | 17 + test/CodeGen/Thumb/2012-04-26-M0ISelBug.ll | 12 + test/CodeGen/Thumb/DbgValueOtherTargets.test | 1 + test/CodeGen/Thumb/PR17309.ll | 57 + test/CodeGen/Thumb/asmprinter-bug.ll | 288 + test/CodeGen/Thumb/barrier.ll | 13 + test/CodeGen/Thumb/dyn-stackalloc.ll | 77 + test/CodeGen/Thumb/fpconv.ll | 61 + test/CodeGen/Thumb/fpow.ll | 9 + test/CodeGen/Thumb/frame_thumb.ll | 9 + test/CodeGen/Thumb/iabs.ll | 20 + test/CodeGen/Thumb/inlineasm-imm-thumb.ll | 43 + test/CodeGen/Thumb/inlineasm-thumb.ll | 7 + test/CodeGen/Thumb/ispositive.ll | 11 + test/CodeGen/Thumb/large-stack.ll | 35 + test/CodeGen/Thumb/ldr_ext.ll | 57 + test/CodeGen/Thumb/ldr_frame.ll | 41 + test/CodeGen/Thumb/lit.local.cfg | 4 + test/CodeGen/Thumb/long-setcc.ll | 17 + test/CodeGen/Thumb/long.ll | 76 + test/CodeGen/Thumb/long_shift.ll | 26 + test/CodeGen/Thumb/mul.ll | 22 + test/CodeGen/Thumb/pop.ll | 13 + test/CodeGen/Thumb/push.ll | 10 + test/CodeGen/Thumb/rev.ll | 56 + test/CodeGen/Thumb/select.ll | 82 + .../Thumb/stack-coloring-without-frame-ptr.ll | 29 + test/CodeGen/Thumb/stack-frame.ll | 13 + test/CodeGen/Thumb/thumb-imm.ll | 10 + test/CodeGen/Thumb/trap.ll | 12 + test/CodeGen/Thumb/tst_teq.ll | 17 + test/CodeGen/Thumb/unord.ll | 14 + test/CodeGen/Thumb/vargs.ll | 36 + .../Thumb2/2009-07-17-CrossRegClassCopy.ll | 35 + test/CodeGen/Thumb2/2009-07-21-ISelBug.ll | 36 + test/CodeGen/Thumb2/2009-07-23-CPIslandBug.ll | 22 + test/CodeGen/Thumb2/2009-07-30-PEICrash.ll | 193 + .../CodeGen/Thumb2/2009-08-01-WrongLDRBOpc.ll | 85 + .../CodeGen/Thumb2/2009-08-02-CoalescerBug.ll | 46 + .../Thumb2/2009-08-04-CoalescerAssert.ll | 29 + .../CodeGen/Thumb2/2009-08-04-CoalescerBug.ll | 153 + .../Thumb2/2009-08-04-ScavengerAssert.ll | 508 + .../Thumb2/2009-08-04-SubregLoweringBug.ll | 33 + .../Thumb2/2009-08-04-SubregLoweringBug2.ll | 42 + .../Thumb2/2009-08-04-SubregLoweringBug3.ll | 54 + test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll | 29 + .../CodeGen/Thumb2/2009-08-07-CoalescerBug.ll | 16 + test/CodeGen/Thumb2/2009-08-07-NeonFPBug.ll | 80 + .../Thumb2/2009-08-08-ScavengerAssert.ll | 20 + test/CodeGen/Thumb2/2009-08-10-ISelBug.ll | 15 + test/CodeGen/Thumb2/2009-08-21-PostRAKill4.ll | 26 + .../CodeGen/Thumb2/2009-09-01-PostRAProlog.ll | 106 + test/CodeGen/Thumb2/2009-09-28-ITBlockBug.ll | 152 + .../Thumb2/2009-10-15-ITBlockBranch.ll | 42 + .../Thumb2/2009-11-01-CopyReg2RegBug.ll | 29 + .../Thumb2/2009-11-11-ScavengerAssert.ll | 85 + test/CodeGen/Thumb2/2009-11-13-STRDBug.ll | 20 + test/CodeGen/Thumb2/2009-12-01-LoopIVUsers.ll | 128 + .../Thumb2/2010-01-06-TailDuplicateLabels.ll | 89 + .../Thumb2/2010-01-19-RemovePredicates.ll | 53 + test/CodeGen/Thumb2/2010-02-11-phi-cycle.ll | 76 + test/CodeGen/Thumb2/2010-02-24-BigStack.ll | 15 + .../CodeGen/Thumb2/2010-03-08-addi12-ccout.ll | 266 + .../CodeGen/Thumb2/2010-03-15-AsmCCClobber.ll | 68 + test/CodeGen/Thumb2/2010-04-15-DynAllocBug.ll | 18 + .../CodeGen/Thumb2/2010-04-26-CopyRegCrash.ll | 73 + test/CodeGen/Thumb2/2010-05-24-rsbs.ll | 9 + .../Thumb2/2010-06-14-NEONCoalescer.ll | 42 + .../CodeGen/Thumb2/2010-06-19-ITBlockCrash.ll | 35 + .../CodeGen/Thumb2/2010-06-21-TailMergeBug.ll | 127 + .../Thumb2/2010-08-10-VarSizedAllocaBug.ll | 59 + test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll | 34 + .../Thumb2/2010-12-03-AddSPNarrowing.ll | 11 + .../Thumb2/2011-04-21-FILoweringBug.ll | 23 + .../Thumb2/2011-06-07-TwoAddrEarlyClobber.ll | 34 + .../Thumb2/2011-12-16-T2SizeReduceAssert.ll | 28 + test/CodeGen/Thumb2/2012-01-13-CBNZBug.ll | 103 + .../2013-02-19-tail-call-register-hint.ll | 49 + ...03-02-vduplane-nonconstant-source-index.ll | 14 + ...013-03-06-vector-sext-operand-scalarize.ll | 19 + test/CodeGen/Thumb2/aligned-constants.ll | 26 + test/CodeGen/Thumb2/aligned-spill.ll | 95 + test/CodeGen/Thumb2/bfi.ll | 61 + test/CodeGen/Thumb2/bfx.ll | 28 + test/CodeGen/Thumb2/buildvector-crash.ll | 17 + test/CodeGen/Thumb2/carry.ll | 35 + test/CodeGen/Thumb2/constant-islands.ll | 1400 + test/CodeGen/Thumb2/cortex-fp.ll | 24 + test/CodeGen/Thumb2/crash.ll | 87 + test/CodeGen/Thumb2/cross-rc-coalescing-1.ll | 52 + test/CodeGen/Thumb2/cross-rc-coalescing-2.ll | 73 + test/CodeGen/Thumb2/div.ll | 57 + test/CodeGen/Thumb2/frameless.ll | 6 + test/CodeGen/Thumb2/frameless2.ll | 12 + test/CodeGen/Thumb2/ifcvt-neon.ll | 29 + test/CodeGen/Thumb2/inflate-regs.ll | 49 + test/CodeGen/Thumb2/inlineasm.ll | 9 + test/CodeGen/Thumb2/large-call.ll | 30 + test/CodeGen/Thumb2/large-stack.ll | 39 + test/CodeGen/Thumb2/ldr-str-imm12.ll | 76 + test/CodeGen/Thumb2/lit.local.cfg | 4 + test/CodeGen/Thumb2/longMACt.ll | 44 + test/CodeGen/Thumb2/lsr-deficiency.ll | 36 + test/CodeGen/Thumb2/machine-licm.ll | 120 + test/CodeGen/Thumb2/mul_const.ll | 18 + test/CodeGen/Thumb2/pic-load.ll | 21 + test/CodeGen/Thumb2/tail-call-r9.ll | 14 + test/CodeGen/Thumb2/thumb2-adc.ll | 48 + test/CodeGen/Thumb2/thumb2-add.ll | 83 + test/CodeGen/Thumb2/thumb2-add2.ll | 41 + test/CodeGen/Thumb2/thumb2-add3.ll | 9 + test/CodeGen/Thumb2/thumb2-add4.ll | 46 + test/CodeGen/Thumb2/thumb2-add5.ll | 42 + test/CodeGen/Thumb2/thumb2-add6.ll | 9 + test/CodeGen/Thumb2/thumb2-and.ll | 42 + test/CodeGen/Thumb2/thumb2-and2.ll | 41 + test/CodeGen/Thumb2/thumb2-asr.ll | 8 + test/CodeGen/Thumb2/thumb2-asr2.ll | 8 + test/CodeGen/Thumb2/thumb2-bcc.ll | 23 + test/CodeGen/Thumb2/thumb2-bfc.ll | 32 + test/CodeGen/Thumb2/thumb2-bic.ll | 105 + test/CodeGen/Thumb2/thumb2-branch.ll | 74 + test/CodeGen/Thumb2/thumb2-call-tc.ll | 38 + test/CodeGen/Thumb2/thumb2-call.ll | 27 + test/CodeGen/Thumb2/thumb2-cbnz.ll | 35 + test/CodeGen/Thumb2/thumb2-clz.ll | 10 + test/CodeGen/Thumb2/thumb2-cmn.ll | 85 + test/CodeGen/Thumb2/thumb2-cmn2.ll | 33 + test/CodeGen/Thumb2/thumb2-cmp.ll | 58 + test/CodeGen/Thumb2/thumb2-cmp2.ll | 52 + test/CodeGen/Thumb2/thumb2-eor.ll | 56 + test/CodeGen/Thumb2/thumb2-eor2.ll | 41 + test/CodeGen/Thumb2/thumb2-ifcvt1-tc.ll | 87 + test/CodeGen/Thumb2/thumb2-ifcvt1.ll | 88 + test/CodeGen/Thumb2/thumb2-ifcvt2.ll | 96 + test/CodeGen/Thumb2/thumb2-ifcvt3.ll | 33 + test/CodeGen/Thumb2/thumb2-jtb.ll | 134 + test/CodeGen/Thumb2/thumb2-ldm.ll | 40 + test/CodeGen/Thumb2/thumb2-ldr.ll | 72 + test/CodeGen/Thumb2/thumb2-ldr_ext.ll | 28 + test/CodeGen/Thumb2/thumb2-ldr_post.ll | 12 + test/CodeGen/Thumb2/thumb2-ldr_pre.ll | 28 + test/CodeGen/Thumb2/thumb2-ldrb.ll | 72 + test/CodeGen/Thumb2/thumb2-ldrd.ll | 13 + test/CodeGen/Thumb2/thumb2-ldrh.ll | 71 + test/CodeGen/Thumb2/thumb2-lsl.ll | 8 + test/CodeGen/Thumb2/thumb2-lsl2.ll | 8 + test/CodeGen/Thumb2/thumb2-lsr.ll | 8 + test/CodeGen/Thumb2/thumb2-lsr2.ll | 8 + test/CodeGen/Thumb2/thumb2-lsr3.ll | 19 + test/CodeGen/Thumb2/thumb2-mla.ll | 24 + test/CodeGen/Thumb2/thumb2-mls.ll | 19 + test/CodeGen/Thumb2/thumb2-mov.ll | 266 + test/CodeGen/Thumb2/thumb2-mul.ll | 26 + test/CodeGen/Thumb2/thumb2-mulhi.ll | 23 + test/CodeGen/Thumb2/thumb2-mvn.ll | 33 + test/CodeGen/Thumb2/thumb2-mvn2.ll | 49 + test/CodeGen/Thumb2/thumb2-neg.ll | 8 + test/CodeGen/Thumb2/thumb2-orn.ll | 72 + test/CodeGen/Thumb2/thumb2-orn2.ll | 38 + test/CodeGen/Thumb2/thumb2-orr.ll | 42 + test/CodeGen/Thumb2/thumb2-orr2.ll | 42 + test/CodeGen/Thumb2/thumb2-pack.ll | 120 + test/CodeGen/Thumb2/thumb2-rev.ll | 23 + test/CodeGen/Thumb2/thumb2-rev16.ll | 32 + test/CodeGen/Thumb2/thumb2-ror.ll | 26 + test/CodeGen/Thumb2/thumb2-rsb.ll | 35 + test/CodeGen/Thumb2/thumb2-rsb2.ll | 41 + test/CodeGen/Thumb2/thumb2-sbc.ll | 68 + test/CodeGen/Thumb2/thumb2-select.ll | 115 + test/CodeGen/Thumb2/thumb2-select_xform.ll | 39 + test/CodeGen/Thumb2/thumb2-shifter.ll | 104 + test/CodeGen/Thumb2/thumb2-smla.ll | 15 + test/CodeGen/Thumb2/thumb2-smul.ll | 24 + test/CodeGen/Thumb2/thumb2-spill-q.ll | 91 + test/CodeGen/Thumb2/thumb2-str.ll | 76 + test/CodeGen/Thumb2/thumb2-str_post.ll | 22 + test/CodeGen/Thumb2/thumb2-str_pre.ll | 21 + test/CodeGen/Thumb2/thumb2-strb.ll | 76 + test/CodeGen/Thumb2/thumb2-strh.ll | 76 + test/CodeGen/Thumb2/thumb2-sub.ll | 49 + test/CodeGen/Thumb2/thumb2-sub2.ll | 8 + test/CodeGen/Thumb2/thumb2-sub3.ll | 55 + test/CodeGen/Thumb2/thumb2-sub4.ll | 42 + test/CodeGen/Thumb2/thumb2-sub5.ll | 10 + test/CodeGen/Thumb2/thumb2-sxt-uxt.ll | 29 + test/CodeGen/Thumb2/thumb2-sxt_rot.ll | 31 + test/CodeGen/Thumb2/thumb2-tbb.ll | 59 + test/CodeGen/Thumb2/thumb2-tbh.ll | 84 + test/CodeGen/Thumb2/thumb2-teq.ll | 57 + test/CodeGen/Thumb2/thumb2-teq2.ll | 58 + test/CodeGen/Thumb2/thumb2-tst.ll | 49 + test/CodeGen/Thumb2/thumb2-tst2.ll | 58 + test/CodeGen/Thumb2/thumb2-uxt_rot.ll | 35 + test/CodeGen/Thumb2/thumb2-uxtb.ll | 141 + test/CodeGen/Thumb2/tls1.ll | 20 + test/CodeGen/Thumb2/tls2.ll | 29 + test/CodeGen/Thumb2/v8_IT_1.ll | 17 + test/CodeGen/Thumb2/v8_IT_2.ll | 38 + test/CodeGen/Thumb2/v8_IT_3.ll | 77 + test/CodeGen/Thumb2/v8_IT_4.ll | 45 + test/CodeGen/Thumb2/v8_IT_5.ll | 63 + .../X86/2003-08-03-CallArgLiveRanges.ll | 21 + test/CodeGen/X86/2003-08-23-DeadBlockTest.ll | 12 + test/CodeGen/X86/2003-11-03-GlobalBool.ll | 4 + .../X86/2004-02-13-FrameReturnAddress.ll | 18 + .../X86/2004-02-14-InefficientStackPointer.ll | 5 + test/CodeGen/X86/2004-02-22-Casts.ll | 12 + test/CodeGen/X86/2004-03-30-Select-Max.ll | 9 + test/CodeGen/X86/2004-04-13-FPCMOV-Crash.ll | 7 + .../CodeGen/X86/2004-06-10-StackifierCrash.ll | 6 + .../CodeGen/X86/2004-10-08-SelectSetCCFold.ll | 8 + test/CodeGen/X86/2005-01-17-CycleInDAG.ll | 17 + .../X86/2005-02-14-IllegalAssembler.ll | 5 + .../CodeGen/X86/2005-05-08-FPStackifierPHI.ll | 38 + test/CodeGen/X86/2006-01-19-ISelFoldingBug.ll | 20 + test/CodeGen/X86/2006-03-01-InstrSchedBug.ll | 12 + test/CodeGen/X86/2006-03-02-InstrSchedBug.ll | 13 + .../CodeGen/X86/2006-04-04-CrossBlockCrash.ll | 50 + test/CodeGen/X86/2006-04-27-ISelFoldingBug.ll | 29 + .../X86/2006-05-01-SchedCausingSpills.ll | 77 + test/CodeGen/X86/2006-05-02-InstrSched1.ll | 26 + test/CodeGen/X86/2006-05-02-InstrSched2.ll | 25 + .../X86/2006-05-08-CoalesceSubRegClass.ll | 25 + test/CodeGen/X86/2006-05-08-InstrSched.ll | 25 + test/CodeGen/X86/2006-05-11-InstrSched.ll | 52 + test/CodeGen/X86/2006-05-17-VectorArg.ll | 15 + test/CodeGen/X86/2006-05-22-FPSetEQ.ll | 10 + test/CodeGen/X86/2006-05-25-CycleInDAG.ll | 20 + .../X86/2006-07-10-InlineAsmAConstraint.ll | 8 + .../X86/2006-07-12-InlineAsmQConstraint.ll | 12 + test/CodeGen/X86/2006-07-20-InlineAsm.ll | 23 + .../2006-07-28-AsmPrint-Long-As-Pointer.ll | 5 + test/CodeGen/X86/2006-07-31-SingleRegClass.ll | 11 + test/CodeGen/X86/2006-08-07-CycleInDAG.ll | 31 + test/CodeGen/X86/2006-08-16-CycleInDAG.ll | 23 + test/CodeGen/X86/2006-08-21-ExtraMovInst.ll | 17 + test/CodeGen/X86/2006-09-01-CycleInDAG.ll | 131 + test/CodeGen/X86/2006-10-02-BoolRetCrash.ll | 7 + .../X86/2006-10-07-ScalarSSEMiscompile.ll | 15 + test/CodeGen/X86/2006-10-09-CycleInDAG.ll | 11 + .../X86/2006-10-10-FindModifiedNodeSlotBug.ll | 28 + test/CodeGen/X86/2006-10-12-CycleInDAG.ll | 41 + test/CodeGen/X86/2006-10-13-CycleInDAG.ll | 19 + .../2006-10-19-SwitchUnnecessaryBranching.ll | 29 + test/CodeGen/X86/2006-11-12-CSRetCC.ll | 64 + test/CodeGen/X86/2006-11-17-IllegalMove.ll | 42 + test/CodeGen/X86/2006-11-27-SelectLegalize.ll | 11 + test/CodeGen/X86/2006-12-16-InlineAsmCrash.ll | 30 + test/CodeGen/X86/2006-12-19-IntelSyntax.ll | 86 + test/CodeGen/X86/2007-01-08-InstrSched.ll | 22 + test/CodeGen/X86/2007-01-08-X86-64-Pointer.ll | 22 + test/CodeGen/X86/2007-01-13-StackPtrIndex.ll | 461 + test/CodeGen/X86/2007-01-29-InlineAsm-ir.ll | 7 + test/CodeGen/X86/2007-02-04-OrAddrMode.ll | 29 + test/CodeGen/X86/2007-02-16-BranchFold.ll | 95 + .../X86/2007-02-19-LiveIntervalAssert.ll | 21 + .../X86/2007-02-23-DAGCombine-Miscompile.ll | 17 + test/CodeGen/X86/2007-02-25-FastCCStack.ll | 5 + test/CodeGen/X86/2007-03-01-SpillerCrash.ll | 86 + test/CodeGen/X86/2007-03-15-GEP-Idx-Sink.ll | 73 + test/CodeGen/X86/2007-03-16-InlineAsm.ll | 26 + .../X86/2007-03-18-LiveIntervalAssert.ll | 7 + .../2007-03-24-InlineAsmMultiRegConstraint.ll | 11 + .../X86/2007-03-24-InlineAsmPModifier.ll | 10 + .../X86/2007-03-24-InlineAsmVectorOp.ll | 12 + .../X86/2007-03-24-InlineAsmXConstraint.ll | 14 + test/CodeGen/X86/2007-03-26-CoalescerBug.ll | 49 + test/CodeGen/X86/2007-04-08-InlineAsmCrash.ll | 18 + .../X86/2007-04-11-InlineAsmVectorResult.ll | 21 + .../X86/2007-04-17-LiveIntervalAssert.ll | 42 + test/CodeGen/X86/2007-04-24-Huge-Stack.ll | 21 + test/CodeGen/X86/2007-04-24-VectorCrash.ll | 63 + test/CodeGen/X86/2007-04-25-MMX-PADDQ.ll | 64 + .../X86/2007-04-27-InlineAsm-IntMemInput.ll | 12 + test/CodeGen/X86/2007-05-05-Personality.ll | 34 + test/CodeGen/X86/2007-05-05-VecCastExpand.ll | 21 + .../X86/2007-05-14-LiveIntervalAssert.ll | 27 + test/CodeGen/X86/2007-05-15-maskmovq.ll | 14 + test/CodeGen/X86/2007-05-17-ShuffleISelBug.ll | 24 + .../X86/2007-06-04-X86-64-CtorAsmBugs.ll | 28 + test/CodeGen/X86/2007-06-15-IntToMMX.ll | 19 + test/CodeGen/X86/2007-06-28-X86-64-isel.ll | 16 + test/CodeGen/X86/2007-06-29-DAGCombinerBug.ll | 50 + .../X86/2007-06-29-VecFPConstantCSEBug.ll | 11 + test/CodeGen/X86/2007-07-03-GR64ToVR64.ll | 20 + test/CodeGen/X86/2007-07-10-StackerAssert.ll | 41 + test/CodeGen/X86/2007-07-18-Vector-Extract.ll | 17 + .../X86/2007-08-01-LiveVariablesBug.ll | 10 + .../X86/2007-08-09-IllegalX86-64Asm.ll | 235 + test/CodeGen/X86/2007-08-10-SignExtSubreg.ll | 10 + .../X86/2007-08-13-AppendingLinkage.ll | 12 + test/CodeGen/X86/2007-09-05-InvalidAsm.ll | 50 + test/CodeGen/X86/2007-09-06-ExtWeakAliasee.ll | 13 + test/CodeGen/X86/2007-09-17-ObjcFrameEH.ll | 67 + .../CodeGen/X86/2007-09-18-ShuffleXformBug.ll | 30 + test/CodeGen/X86/2007-09-27-LDIntrinsics.ll | 30 + .../CodeGen/X86/2007-10-04-AvoidEFLAGSCopy.ll | 20 + .../X86/2007-10-12-CoalesceExtSubReg.ll | 34 + test/CodeGen/X86/2007-10-12-SpillerUnfold1.ll | 45 + test/CodeGen/X86/2007-10-12-SpillerUnfold2.ll | 57 + test/CodeGen/X86/2007-10-14-CoalescerCrash.ll | 28 + test/CodeGen/X86/2007-10-15-CoalescerCrash.ll | 400 + test/CodeGen/X86/2007-10-16-CoalescerCrash.ll | 31 + test/CodeGen/X86/2007-10-17-IllegalAsm.ll | 87 + test/CodeGen/X86/2007-10-19-SpillerUnfold.ll | 88 + .../X86/2007-10-28-inlineasm-q-modifier.ll | 11 + test/CodeGen/X86/2007-10-29-ExtendSetCC.ll | 17 + test/CodeGen/X86/2007-10-30-LSRCrash.ll | 48 + .../X86/2007-10-31-extractelement-i64.ll | 82 + test/CodeGen/X86/2007-11-01-ISelCrash.ll | 12 + .../X86/2007-11-03-x86-64-q-constraint.ll | 9 + .../X86/2007-11-04-LiveIntervalCrash.ll | 37 + .../X86/2007-11-04-LiveVariablesBug.ll | 16 + .../X86/2007-11-04-rip-immediate-constant.ll | 13 + test/CodeGen/X86/2007-11-06-InstrSched.ll | 25 + test/CodeGen/X86/2007-11-07-MulBy4.ll | 129 + .../CodeGen/X86/2007-11-30-LoadFolding-Bug.ll | 86 + test/CodeGen/X86/2007-12-16-BURRSchedCrash.ll | 35 + test/CodeGen/X86/2007-12-18-LoadCSEBug.ll | 28 + test/CodeGen/X86/2008-01-08-IllegalCMP.ll | 17 + test/CodeGen/X86/2008-01-08-SchedulerCrash.ll | 40 + test/CodeGen/X86/2008-01-09-LongDoubleSin.ll | 13 + .../X86/2008-01-16-FPStackifierAssert.ll | 35 + .../X86/2008-01-16-InvalidDAGCombineXform.ll | 30 + test/CodeGen/X86/2008-02-05-ISelCrash.ll | 12 + test/CodeGen/X86/2008-02-06-LoadFoldingBug.ll | 20 + test/CodeGen/X86/2008-02-14-BitMiscompile.ll | 8 + test/CodeGen/X86/2008-02-18-TailMergingBug.ll | 220 + .../X86/2008-02-20-InlineAsmClobber.ll | 30 + .../X86/2008-02-22-LocalRegAllocBug.ll | 55 + test/CodeGen/X86/2008-02-25-InlineAsmBug.ll | 33 + .../X86/2008-02-25-X86-64-CoalescerBug.ll | 55 + test/CodeGen/X86/2008-02-26-AsmDirectMemOp.ll | 17 + .../CodeGen/X86/2008-02-27-DeadSlotElimBug.ll | 66 + test/CodeGen/X86/2008-02-27-PEICrash.ll | 33 + test/CodeGen/X86/2008-03-06-frem-fpstack.ll | 7 + test/CodeGen/X86/2008-03-07-APIntBug.ll | 94 + .../CodeGen/X86/2008-03-10-RegAllocInfLoop.ll | 14 + .../X86/2008-03-12-ThreadLocalAlias.ll | 37 + .../X86/2008-03-13-TwoAddrPassCrash.ll | 68 + test/CodeGen/X86/2008-03-14-SpillerCrash.ll | 50 + test/CodeGen/X86/2008-03-19-DAGCombinerBug.ll | 14 + .../X86/2008-03-23-DarwinAsmComments.ll | 49 + test/CodeGen/X86/2008-03-25-TwoAddrPassBug.ll | 24 + .../X86/2008-03-31-SpillerFoldingBug.ll | 40 + test/CodeGen/X86/2008-04-02-unnamedEH.ll | 16 + test/CodeGen/X86/2008-04-08-CoalescerCrash.ll | 19 + test/CodeGen/X86/2008-04-09-BranchFolding.ll | 48 + .../CodeGen/X86/2008-04-15-LiveVariableBug.ll | 50 + test/CodeGen/X86/2008-04-16-CoalescerBug.ll | 33 + test/CodeGen/X86/2008-04-16-ReMatBug.ll | 46 + test/CodeGen/X86/2008-04-17-CoalescerBug.ll | 177 + test/CodeGen/X86/2008-04-24-MemCpyBug.ll | 12 + .../X86/2008-04-24-pblendw-fold-crash.ll | 15 + .../X86/2008-04-26-Asm-Optimize-Imm.ll | 15 + test/CodeGen/X86/2008-04-28-CoalescerBug.ll | 167 + .../CodeGen/X86/2008-04-28-CyclicSchedUnit.ll | 6 + .../X86/2008-05-01-InvalidOrdCompare.ll | 15 + test/CodeGen/X86/2008-05-09-PHIElimBug.ll | 25 + .../X86/2008-05-09-ShuffleLoweringBug.ll | 10 + test/CodeGen/X86/2008-05-12-tailmerge-5.ll | 145 + test/CodeGen/X86/2008-05-21-CoalescerBug.ll | 98 + .../X86/2008-05-22-FoldUnalignedLoad.ll | 17 + test/CodeGen/X86/2008-05-28-CoalescerBug.ll | 10 + .../X86/2008-05-28-LocalRegAllocBug.ll | 32 + .../X86/2008-06-13-NotVolatileLoadStore.ll | 23 + .../X86/2008-06-13-VolatileLoadStore.ll | 22 + test/CodeGen/X86/2008-06-16-SubregsBug.ll | 14 + test/CodeGen/X86/2008-06-18-BadShuffle.ll | 10 + test/CodeGen/X86/2008-06-25-VecISelBug.ll | 9 + .../X86/2008-07-07-DanglingDeadInsts.ll | 99 + .../X86/2008-07-09-ELFSectionAttributes.ll | 13 + test/CodeGen/X86/2008-07-11-SHLBy1.ll | 5 + test/CodeGen/X86/2008-07-16-CoalescerCrash.ll | 34 + test/CodeGen/X86/2008-07-19-movups-spills.ll | 1306 + test/CodeGen/X86/2008-07-22-CombinerCrash.ll | 16 + test/CodeGen/X86/2008-07-23-VSetCC.ll | 32 + test/CodeGen/X86/2008-08-06-CmpStride.ll | 23 + test/CodeGen/X86/2008-08-06-RewriterBug.ll | 40 + .../CodeGen/X86/2008-08-17-UComiCodeGenBug.ll | 9 + test/CodeGen/X86/2008-08-19-SubAndFetch.ll | 12 + test/CodeGen/X86/2008-08-23-64Bit-maskmovq.ll | 29 + test/CodeGen/X86/2008-08-31-EH_RETURN32.ll | 38 + test/CodeGen/X86/2008-08-31-EH_RETURN64.ll | 55 + test/CodeGen/X86/2008-09-05-sinttofp-2xi32.ll | 35 + test/CodeGen/X86/2008-09-09-LinearScanBug.ll | 65 + test/CodeGen/X86/2008-09-11-CoalescerBug.ll | 38 + test/CodeGen/X86/2008-09-11-CoalescerBug2.ll | 45 + test/CodeGen/X86/2008-09-17-inline-asm-1.ll | 30 + test/CodeGen/X86/2008-09-18-inline-asm-2.ll | 48 + test/CodeGen/X86/2008-09-19-RegAllocBug.ll | 22 + test/CodeGen/X86/2008-09-25-sseregparm-1.ll | 19 + test/CodeGen/X86/2008-09-26-FrameAddrBug.ll | 16 + test/CodeGen/X86/2008-09-29-ReMatBug.ll | 85 + test/CodeGen/X86/2008-09-29-VolatileBug.ll | 15 + test/CodeGen/X86/2008-10-06-MMXISelBug.ll | 12 + test/CodeGen/X86/2008-10-06-x87ld-nan-1.ll | 13 + test/CodeGen/X86/2008-10-06-x87ld-nan-2.ll | 18 + test/CodeGen/X86/2008-10-07-SSEISelBug.ll | 22 + test/CodeGen/X86/2008-10-11-CallCrash.ll | 21 + test/CodeGen/X86/2008-10-13-CoalescerBug.ll | 42 + test/CodeGen/X86/2008-10-16-VecUnaryOp.ll | 8 + .../X86/2008-10-17-Asm64bitRConstraint.ll | 9 + test/CodeGen/X86/2008-10-20-AsmDoubleInI32.ll | 11 + test/CodeGen/X86/2008-10-24-FlippedCompare.ll | 17 + test/CodeGen/X86/2008-10-27-CoalescerBug.ll | 52 + test/CodeGen/X86/2008-10-29-ExpandVAARG.ll | 10 + test/CodeGen/X86/2008-11-03-F80VAARG.ll | 17 + test/CodeGen/X86/2008-11-06-testb.ll | 28 + test/CodeGen/X86/2008-11-13-inlineasm-3.ll | 19 + test/CodeGen/X86/2008-11-29-ULT-Sign.ll | 22 + test/CodeGen/X86/2008-12-01-SpillerAssert.ll | 15 + .../2008-12-01-loop-iv-used-outside-loop.ll | 30 + .../X86/2008-12-02-IllegalResultType.ll | 37 + test/CodeGen/X86/2008-12-02-dagcombine-1.ll | 19 + test/CodeGen/X86/2008-12-02-dagcombine-2.ll | 17 + test/CodeGen/X86/2008-12-02-dagcombine-3.ll | 18 + .../CodeGen/X86/2008-12-12-PrivateEHSymbol.ll | 10 + test/CodeGen/X86/2008-12-16-dagcombine-4.ll | 14 + .../CodeGen/X86/2008-12-19-EarlyClobberBug.ll | 38 + test/CodeGen/X86/2008-12-22-dagcombine-5.ll | 14 + test/CodeGen/X86/2008-12-23-crazy-address.ll | 33 + test/CodeGen/X86/2008-12-23-dagcombine-6.ll | 24 + test/CodeGen/X86/2009-01-13-DoubleUpdate.ll | 21 + test/CodeGen/X86/2009-01-16-SchedulerBug.ll | 50 + test/CodeGen/X86/2009-01-16-UIntToFP.ll | 31 + .../X86/2009-01-18-ConstantExprCrash.ll | 36 + test/CodeGen/X86/2009-01-25-NoSSE.ll | 20 + test/CodeGen/X86/2009-01-26-WrongCheck.ll | 16 + test/CodeGen/X86/2009-01-27-NullStrings.ll | 7 + test/CodeGen/X86/2009-01-31-BigShift.ll | 9 + test/CodeGen/X86/2009-01-31-BigShift2.ll | 11 + test/CodeGen/X86/2009-01-31-BigShift3.ll | 31 + test/CodeGen/X86/2009-02-01-LargeMask.ll | 32 + test/CodeGen/X86/2009-02-03-AnalyzedTwice.ll | 30 + test/CodeGen/X86/2009-02-04-sext-i64-gep.ll | 9 + test/CodeGen/X86/2009-02-08-CoalescerBug.ll | 22 + .../X86/2009-02-09-ivs-different-sizes.ll | 33 + .../X86/2009-02-11-codegenprepare-reuse.ll | 35 + test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll | 87 + .../2009-02-12-InlineAsm-nieZ-constraints.ll | 24 + test/CodeGen/X86/2009-02-12-SpillerBug.ll | 29 + .../X86/2009-02-21-ExtWeakInitializer.ll | 20 + test/CodeGen/X86/2009-02-25-CommuteBug.ll | 17 + test/CodeGen/X86/2009-02-26-MachineLICMBug.ll | 57 + test/CodeGen/X86/2009-03-03-BTHang.ll | 37 + .../X86/2009-03-03-BitcastLongDouble.ll | 14 + .../CodeGen/X86/2009-03-05-burr-list-crash.ll | 35 + test/CodeGen/X86/2009-03-07-FPConstSelect.ll | 12 + test/CodeGen/X86/2009-03-09-APIntCrash.ll | 25 + test/CodeGen/X86/2009-03-09-SpillerBug.ll | 18 + test/CodeGen/X86/2009-03-10-CoalescerBug.ll | 28 + test/CodeGen/X86/2009-03-12-CPAlignBug.ll | 37 + test/CodeGen/X86/2009-03-13-PHIElimBug.ll | 36 + test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll | 28 + test/CodeGen/X86/2009-03-23-LinearScanBug.ll | 23 + test/CodeGen/X86/2009-03-23-MultiUseSched.ll | 243 + test/CodeGen/X86/2009-03-23-i80-fp80.ll | 14 + test/CodeGen/X86/2009-03-25-TestBug.ll | 26 + .../CodeGen/X86/2009-03-26-NoImplicitFPBug.ll | 12 + .../X86/2009-04-12-FastIselOverflowCrash.ll | 21 + test/CodeGen/X86/2009-04-12-picrel.ll | 13 + test/CodeGen/X86/2009-04-13-2AddrAssert-2.ll | 15 + test/CodeGen/X86/2009-04-13-2AddrAssert.ll | 16 + test/CodeGen/X86/2009-04-14-IllegalRegs.ll | 35 + test/CodeGen/X86/2009-04-16-SpillerUnfold.ll | 144 + test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll | 30 + test/CodeGen/X86/2009-04-24.ll | 13 + test/CodeGen/X86/2009-04-25-CoalescerBug.ll | 19 + .../CodeGen/X86/2009-04-27-CoalescerAssert.ll | 1457 + .../X86/2009-04-27-LiveIntervalsAssert.ll | 24 + .../X86/2009-04-27-LiveIntervalsAssert2.ll | 23 + .../X86/2009-04-29-IndirectDestOperands.ll | 22 + test/CodeGen/X86/2009-04-29-LinearScanBug.ll | 215 + test/CodeGen/X86/2009-04-29-RegAllocAssert.ll | 117 + test/CodeGen/X86/2009-04-scale.ll | 23 + .../X86/2009-05-08-InlineAsmIOffset.ll | 18 + .../CodeGen/X86/2009-05-11-tailmerge-crash.ll | 23 + .../2009-05-19-SingleElementExtractElement.ll | 16 + .../X86/2009-05-23-available_externally.ll | 22 + .../X86/2009-05-23-dagcombine-shifts.ll | 20 + .../CodeGen/X86/2009-05-28-DAGCombineCrash.ll | 15 + test/CodeGen/X86/2009-05-30-ISelBug.ll | 28 + test/CodeGen/X86/2009-06-02-RewriterBug.ll | 362 + .../X86/2009-06-03-Win64DisableRedZone.ll | 8 + test/CodeGen/X86/2009-06-03-Win64SpillXMM.ll | 10 + test/CodeGen/X86/2009-06-04-VirtualLiveIn.ll | 48 + .../X86/2009-06-05-ScalarToVectorByteMMX.ll | 9 + test/CodeGen/X86/2009-06-05-VZextByteShort.ll | 37 + .../X86/2009-06-05-VariableIndexInsert.ll | 11 + test/CodeGen/X86/2009-06-05-sitofpCrash.ll | 13 + test/CodeGen/X86/2009-06-06-ConcatVectors.ll | 8 + .../X86/2009-06-07-ExpandMMXBitcast.ll | 10 + ...2-x86_64-tail-call-conv-out-of-sync-bug.ll | 15 + .../CodeGen/X86/2009-06-15-not-a-tail-call.ll | 14 + .../X86/2009-06-18-movlp-shuffle-register.ll | 10 + test/CodeGen/X86/2009-07-06-TwoAddrAssert.ll | 137 + test/CodeGen/X86/2009-07-07-SplitICmp.ll | 8 + .../X86/2009-07-09-ExtractBoolFromVector.ll | 11 + test/CodeGen/X86/2009-07-15-CoalescerBug.ll | 958 + test/CodeGen/X86/2009-07-16-CoalescerBug.ll | 210 + .../X86/2009-07-19-AsmExtraOperands.ll | 11 + test/CodeGen/X86/2009-07-20-CoalescerBug.ll | 165 + test/CodeGen/X86/2009-07-20-DAGCombineBug.ll | 29 + .../X86/2009-08-02-mmx-scalar-to-vector.ll | 12 + .../X86/2009-08-06-branchfolder-crash.ll | 140 + test/CodeGen/X86/2009-08-06-inlineasm.ll | 30 + test/CodeGen/X86/2009-08-08-CastError.ll | 11 + test/CodeGen/X86/2009-08-12-badswitch.ll | 176 + .../X86/2009-08-14-Win64MemoryIndirectArg.ll | 57 + .../X86/2009-08-19-LoadNarrowingMiscompile.ll | 15 + .../CodeGen/X86/2009-08-23-SubRegReuseUndo.ll | 69 + test/CodeGen/X86/2009-08-23-linkerprivate.ll | 8 + test/CodeGen/X86/2009-09-10-LoadFoldingBug.ll | 51 + test/CodeGen/X86/2009-09-10-SpillComments.ll | 108 + test/CodeGen/X86/2009-09-16-CoalescerBug.ll | 64 + test/CodeGen/X86/2009-09-19-earlyclobber.ll | 15 + .../X86/2009-09-21-NoSpillLoopCount.ll | 36 + test/CodeGen/X86/2009-09-22-CoalescerBug.ll | 124 + .../X86/2009-09-23-LiveVariablesBug.ll | 91 + .../X86/2009-10-14-LiveVariablesBug.ll | 15 + test/CodeGen/X86/2009-10-16-Scope.ll | 34 + test/CodeGen/X86/2009-10-19-EmergencySpill.ll | 54 + .../X86/2009-10-19-atomic-cmp-eflags.ll | 67 + test/CodeGen/X86/2009-10-25-RewriterBug.ll | 171 + .../X86/2009-11-04-SubregCoalescingBug.ll | 15 + .../X86/2009-11-13-VirtRegRewriterBug.ll | 133 + test/CodeGen/X86/2009-11-16-MachineLICM.ll | 42 + test/CodeGen/X86/2009-11-16-UnfoldMemOpBug.ll | 29 + .../X86/2009-11-17-UpdateTerminator.ll | 52 + test/CodeGen/X86/2009-11-18-TwoAddrKill.ll | 29 + test/CodeGen/X86/2009-11-25-ImpDefBug.ll | 120 + .../CodeGen/X86/2009-12-01-EarlyClobberBug.ll | 41 + test/CodeGen/X86/2009-12-11-TLSNoRedZone.ll | 63 + test/CodeGen/X86/20090313-signext.ll | 19 + test/CodeGen/X86/2010-01-05-ZExt-Shl.ll | 15 + test/CodeGen/X86/2010-01-07-ISelBug.ll | 27 + test/CodeGen/X86/2010-01-07-UAMemFeature.ll | 11 + test/CodeGen/X86/2010-01-08-Atomic64Bug.ll | 22 + test/CodeGen/X86/2010-01-11-ExtraPHIArg.ll | 97 + test/CodeGen/X86/2010-01-13-OptExtBug.ll | 46 + .../X86/2010-01-15-SelectionDAGCycle.ll | 28 + test/CodeGen/X86/2010-01-18-DbgValue.ll | 55 + test/CodeGen/X86/2010-01-19-OptExtBug.ll | 58 + test/CodeGen/X86/2010-02-01-DbgValueCrash.ll | 35 + test/CodeGen/X86/2010-02-01-TaillCallCrash.ll | 12 + test/CodeGen/X86/2010-02-03-DualUndef.ll | 27 + test/CodeGen/X86/2010-02-04-SchedulerBug.ll | 28 + test/CodeGen/X86/2010-02-11-NonTemporal.ll | 22 + .../X86/2010-02-12-CoalescerBug-Impdef.ll | 260 + test/CodeGen/X86/2010-02-15-ImplicitDefBug.ll | 80 + .../X86/2010-02-19-TailCallRetAddrBug.ll | 53 + test/CodeGen/X86/2010-02-23-DAGCombineBug.ll | 18 + test/CodeGen/X86/2010-02-23-DIV8rDefinesAX.ll | 20 + .../X86/2010-02-23-RematImplicitSubreg.ll | 49 + .../X86/2010-02-23-SingleDefPhiJoin.ll | 146 + test/CodeGen/X86/2010-03-04-Mul8Bug.ll | 25 + .../CodeGen/X86/2010-03-05-ConstantFoldCFG.ll | 42 + test/CodeGen/X86/2010-03-05-EFLAGS-Redef.ll | 49 + test/CodeGen/X86/2010-03-17-ISelBug.ll | 67 + .../X86/2010-04-06-SSEDomainFixCrash.ll | 68 + test/CodeGen/X86/2010-04-08-CoalescerBug.ll | 26 + .../X86/2010-04-13-AnalyzeBranchCrash.ll | 42 + test/CodeGen/X86/2010-04-21-CoalescerBug.ll | 15 + test/CodeGen/X86/2010-04-23-mmx-movdq2q.ll | 100 + test/CodeGen/X86/2010-04-29-CoalescerCrash.ll | 142 + .../X86/2010-04-30-LocalAlloc-LandingPad.ll | 140 + .../X86/2010-05-03-CoalescerSubRegClobber.ll | 33 + .../X86/2010-05-05-LocalAllocEarlyClobber.ll | 32 + .../X86/2010-05-06-LocalInlineAsmClobber.ll | 10 + test/CodeGen/X86/2010-05-07-ldconvert.ll | 27 + test/CodeGen/X86/2010-05-10-DAGCombinerBug.ll | 11 + test/CodeGen/X86/2010-05-12-FastAllocKills.ll | 59 + .../CodeGen/X86/2010-05-16-nosseconversion.ll | 12 + test/CodeGen/X86/2010-05-25-DotDebugLoc.ll | 252 + test/CodeGen/X86/2010-05-26-DotDebugLoc.ll | 90 + .../CodeGen/X86/2010-05-26-FP_TO_INT-crash.ll | 16 + test/CodeGen/X86/2010-05-28-Crash.ll | 52 + .../CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll | 60 + .../X86/2010-06-09-FastAllocRegisters.ll | 17 + .../X86/2010-06-14-fast-isel-fs-load.ll | 7 + .../X86/2010-06-15-FastAllocEarlyCLobber.ll | 29 + .../X86/2010-06-24-g-constraint-crash.ll | 15 + .../X86/2010-06-25-CoalescerSubRegDefDead.ll | 39 + test/CodeGen/X86/2010-06-25-asm-RA-crash.ll | 19 + .../X86/2010-06-28-FastAllocTiedOperand.ll | 22 + .../X86/2010-06-28-matched-g-constraint.ll | 11 + test/CodeGen/X86/2010-07-02-UnfoldBug.ll | 99 + test/CodeGen/X86/2010-07-02-asm-alignstack.ll | 31 + test/CodeGen/X86/2010-07-06-DbgCrash.ll | 31 + test/CodeGen/X86/2010-07-06-asm-RIP.ll | 21 + test/CodeGen/X86/2010-07-11-FPStackLoneUse.ll | 28 + .../X86/2010-07-13-indirectXconstraint.ll | 18 + test/CodeGen/X86/2010-07-15-Crash.ll | 12 + test/CodeGen/X86/2010-07-29-SetccSimplify.ll | 14 + .../X86/2010-08-04-MaskedSignedCompare.ll | 36 + test/CodeGen/X86/2010-08-04-MingWCrash.ll | 36 + test/CodeGen/X86/2010-08-04-StackVariable.ll | 129 + .../2010-09-01-RemoveCopyByCommutingDef.ll | 28 + test/CodeGen/X86/2010-09-16-EmptyFilename.ll | 35 + test/CodeGen/X86/2010-09-16-asmcrash.ll | 56 + .../X86/2010-09-17-SideEffectsInChain.ll | 26 + .../X86/2010-09-30-CMOV-JumpTable-PHI.ll | 71 + test/CodeGen/X86/2010-10-08-cmpxchg8b.ll | 26 + test/CodeGen/X86/2010-11-02-DbgParameter.ll | 40 + test/CodeGen/X86/2010-11-09-MOVLPS.ll | 66 + .../CodeGen/X86/2010-11-18-SelectOfExtload.ll | 15 + test/CodeGen/X86/2010-12-02-MC-Set.ll | 27 + .../X86/2011-01-07-LegalizeTypesCrash.ll | 19 + test/CodeGen/X86/2011-01-10-DagCombineHang.ll | 15 + .../X86/2011-01-24-DbgValue-Before-Use.ll | 108 + .../X86/2011-02-04-FastRegallocNoFP.ll | 14 + test/CodeGen/X86/2011-02-12-shuffle.ll | 32 + .../2011-02-21-VirtRegRewriter-KillSubReg.ll | 50 + test/CodeGen/X86/2011-02-23-UnfoldBug.ll | 42 + test/CodeGen/X86/2011-02-27-Fpextend.ll | 7 + test/CodeGen/X86/2011-03-02-DAGCombiner.ll | 51 + test/CodeGen/X86/2011-03-08-Sched-crash.ll | 56 + .../X86/2011-03-09-Physreg-Coalescing.ll | 22 + .../X86/2011-03-30-CreateFixedObjCrash.ll | 10 + test/CodeGen/X86/2011-04-13-SchedCmpJmp.ll | 65 + test/CodeGen/X86/2011-04-19-sclr-bb.ll | 21 + test/CodeGen/X86/2011-05-09-loaduse.ll | 13 + .../X86/2011-05-26-UnreachableBlockElim.ll | 48 + .../X86/2011-05-27-CrossClassCoalescing.ll | 41 + test/CodeGen/X86/2011-06-01-fildll.ll | 15 + test/CodeGen/X86/2011-06-03-x87chain.ll | 49 + test/CodeGen/X86/2011-06-06-fgetsign80bit.ll | 8 + test/CodeGen/X86/2011-06-12-FastAllocSpill.ll | 53 + .../X86/2011-06-14-PreschedRegalias.ll | 18 + test/CodeGen/X86/2011-06-14-mmx-inlineasm.ll | 45 + .../X86/2011-06-19-QuicksortCoalescerBug.ll | 31 + .../2011-07-13-BadFrameIndexDisplacement.ll | 20 + .../X86/2011-08-23-PerformSubCombine128.ll | 18 + test/CodeGen/X86/2011-08-23-Trampoline.ll | 16 + test/CodeGen/X86/2011-08-29-BlockConstant.ll | 34 + test/CodeGen/X86/2011-08-29-InitOrder.ll | 34 + test/CodeGen/X86/2011-09-14-valcoalesce.ll | 195 + test/CodeGen/X86/2011-09-18-sse2cmp.ll | 12 + test/CodeGen/X86/2011-09-21-setcc-bug.ll | 27 + test/CodeGen/X86/2011-10-11-SpillDead.ll | 19 + test/CodeGen/X86/2011-10-11-srl.ll | 11 + test/CodeGen/X86/2011-10-12-MachineCSE.ll | 111 + .../X86/2011-10-18-FastISel-VectorParams.ll | 29 + test/CodeGen/X86/2011-10-19-LegelizeLoad.ll | 27 + test/CodeGen/X86/2011-10-19-widen_vselect.ll | 68 + test/CodeGen/X86/2011-10-21-widen-cmp.ll | 45 + test/CodeGen/X86/2011-10-27-tstore.ll | 16 + test/CodeGen/X86/2011-10-30-padd.ll | 20 + .../X86/2011-11-07-LegalizeBuildVector.ll | 14 + test/CodeGen/X86/2011-11-22-AVX2-Domains.ll | 99 + test/CodeGen/X86/2011-11-30-or.ll | 25 + .../X86/2011-12-06-AVXVectorExtractCombine.ll | 18 + .../X86/2011-12-06-BitcastVectorGlobal.ll | 5 + test/CodeGen/X86/2011-12-08-AVXISelBugs.ll | 80 + test/CodeGen/X86/2011-12-15-vec_shift.ll | 19 + ...011-12-26-extractelement-duplicate-load.ll | 16 + test/CodeGen/X86/2011-12-28-vselecti8.ll | 20 + test/CodeGen/X86/2011-12-8-bitcastintprom.ll | 15 + test/CodeGen/X86/2011-20-21-zext-ui2fp.ll | 19 + .../X86/2012-01-10-UndefExceptionEdge.ll | 151 + test/CodeGen/X86/2012-01-11-split-cv.ll | 12 + test/CodeGen/X86/2012-01-12-extract-sv.ll | 12 + .../X86/2012-01-16-mfence-nosse-flags.ll | 34 + test/CodeGen/X86/2012-01-18-vbitcast.ll | 14 + test/CodeGen/X86/2012-02-12-dagco.ll | 16 + test/CodeGen/X86/2012-02-14-scalar.ll | 13 + test/CodeGen/X86/2012-02-23-mmx-inlineasm.ll | 12 + test/CodeGen/X86/2012-02-29-CoalescerBug.ll | 58 + .../CodeGen/X86/2012-03-15-build_vector_wl.ll | 10 + .../X86/2012-03-20-LargeConstantExpr.ll | 17 + test/CodeGen/X86/2012-03-26-PostRALICMBug.ll | 60 + test/CodeGen/X86/2012-04-09-TwoAddrPassBug.ll | 34 + test/CodeGen/X86/2012-04-26-sdglue.ll | 47 + test/CodeGen/X86/2012-05-17-TwoAddressBug.ll | 16 + test/CodeGen/X86/2012-05-19-CoalescerCrash.ll | 122 + test/CodeGen/X86/2012-05-19-avx2-store.ll | 13 + test/CodeGen/X86/2012-07-10-extload64.ll | 32 + test/CodeGen/X86/2012-07-10-shufnorm.ll | 17 + .../X86/2012-07-15-BuildVectorPromote.ll | 8 + test/CodeGen/X86/2012-07-15-broadcastfold.ll | 23 + test/CodeGen/X86/2012-07-15-tconst_shl.ll | 9 + test/CodeGen/X86/2012-07-15-vshl.ll | 31 + test/CodeGen/X86/2012-07-16-LeaUndef.ll | 16 + test/CodeGen/X86/2012-07-16-fp2ui-i1.ll | 12 + test/CodeGen/X86/2012-07-17-vtrunc.ll | 16 + test/CodeGen/X86/2012-07-23-select_cc.ll | 19 + test/CodeGen/X86/2012-08-07-CmpISelBug.ll | 36 + test/CodeGen/X86/2012-08-16-setcc.ll | 45 + .../CodeGen/X86/2012-08-17-legalizer-crash.ll | 31 + .../CodeGen/X86/2012-08-28-UnsafeMathCrash.ll | 20 + test/CodeGen/X86/2012-09-13-dagco-fneg.ll | 21 + test/CodeGen/X86/2012-09-28-CGPBug.ll | 53 + test/CodeGen/X86/2012-1-10-buildvector.ll | 26 + test/CodeGen/X86/2012-10-02-DAGCycle.ll | 52 + test/CodeGen/X86/2012-10-03-DAGCycle.ll | 31 + test/CodeGen/X86/2012-10-18-crash-dagco.ll | 61 + .../X86/2012-11-28-merge-store-alias.ll | 52 + test/CodeGen/X86/2012-11-30-handlemove-dbg.ll | 50 + test/CodeGen/X86/2012-11-30-misched-dbg.ll | 138 + test/CodeGen/X86/2012-11-30-regpres-dbg.ll | 46 + .../X86/2012-12-06-python27-miscompile.ll | 23 + test/CodeGen/X86/2012-12-1-merge-multiple.ll | 31 + .../CodeGen/X86/2012-12-12-DAGCombineCrash.ll | 46 + test/CodeGen/X86/2012-12-14-v8fp80-crash.ll | 22 + .../CodeGen/X86/2012-12-19-NoImplicitFloat.ll | 17 + test/CodeGen/X86/2013-01-09-DAGCombineBug.ll | 74 + test/CodeGen/X86/2013-02-12-ShuffleToZext.ll | 14 + test/CodeGen/X86/2013-03-13-VEX-DestReg.ll | 28 + .../X86/2013-05-06-ConactVectorCrash.ll | 14 + .../X86/2013-10-14-FastISel-incorrect-vreg.ll | 132 + test/CodeGen/X86/3addr-16bit.ll | 96 + test/CodeGen/X86/3addr-or.ll | 61 + test/CodeGen/X86/3dnow-intrinsics.ll | 297 + test/CodeGen/X86/4char-promote.ll | 18 + test/CodeGen/X86/9601.ll | 12 + test/CodeGen/X86/Atomics-64.ll | 950 + test/CodeGen/X86/DbgValueOtherTargets.test | 2 + test/CodeGen/X86/GC/alloc_loop.ll | 53 + test/CodeGen/X86/GC/argpromotion.ll | 19 + test/CodeGen/X86/GC/badreadproto.ll | 13 + test/CodeGen/X86/GC/badrootproto.ll | 13 + test/CodeGen/X86/GC/badwriteproto.ll | 22 + test/CodeGen/X86/GC/cg-O0.ll | 17 + test/CodeGen/X86/GC/deadargelim.ll | 16 + test/CodeGen/X86/GC/erlang-gc.ll | 25 + test/CodeGen/X86/GC/fat.ll | 10 + test/CodeGen/X86/GC/inline.ll | 23 + test/CodeGen/X86/GC/inline2.ll | 24 + test/CodeGen/X86/GC/lit.local.cfg | 4 + test/CodeGen/X86/GC/lower_gcroot.ll | 11 + test/CodeGen/X86/GC/ocaml-gc-assert.ll | 21 + test/CodeGen/X86/GC/ocaml-gc.ll | 31 + test/CodeGen/X86/GC/outside.ll | 10 + test/CodeGen/X86/MachineSink-CritEdge.ll | 58 + test/CodeGen/X86/MachineSink-DbgValue.ll | 53 + test/CodeGen/X86/MachineSink-PHIUse.ll | 40 + test/CodeGen/X86/MachineSink-eflags.ll | 74 + test/CodeGen/X86/MergeConsecutiveStores.ll | 435 + test/CodeGen/X86/StackColoring-dbg.ll | 35 + test/CodeGen/X86/StackColoring.ll | 431 + test/CodeGen/X86/SwitchLowering.ll | 28 + test/CodeGen/X86/SwizzleShuff.ll | 68 + test/CodeGen/X86/WidenArith.ll | 23 + test/CodeGen/X86/abi-isel.ll | 9660 ++ test/CodeGen/X86/add-of-carry.ll | 46 + test/CodeGen/X86/add.ll | 150 + test/CodeGen/X86/adde-carry.ll | 20 + test/CodeGen/X86/addr-label-difference.ll | 26 + test/CodeGen/X86/aes_intrinsics.ll | 48 + test/CodeGen/X86/alias-error.ll | 5 + test/CodeGen/X86/aliases.ll | 48 + test/CodeGen/X86/aligned-comm.ll | 6 + test/CodeGen/X86/alignment-2.ll | 30 + test/CodeGen/X86/alignment.ll | 43 + test/CodeGen/X86/all-ones-vector.ll | 14 + test/CodeGen/X86/alldiv-divdi3.ll | 17 + test/CodeGen/X86/alloca-align-rounding-32.ll | 20 + test/CodeGen/X86/alloca-align-rounding.ll | 20 + test/CodeGen/X86/allrem-moddi3.ll | 19 + test/CodeGen/X86/and-or-fold.ll | 26 + test/CodeGen/X86/and-su.ll | 53 + test/CodeGen/X86/andimm8.ll | 19 + test/CodeGen/X86/anyext.ll | 18 + test/CodeGen/X86/anyregcc-crash.ll | 17 + test/CodeGen/X86/anyregcc.ll | 348 + test/CodeGen/X86/apm.ll | 35 + test/CodeGen/X86/arg-cast.ll | 18 + test/CodeGen/X86/asm-block-labels.ll | 41 + test/CodeGen/X86/asm-global-imm.ll | 26 + test/CodeGen/X86/asm-indirect-mem.ll | 11 + .../X86/asm-invalid-register-class-crasher.ll | 9 + test/CodeGen/X86/asm-label.ll | 40 + test/CodeGen/X86/asm-label2.ll | 26 + test/CodeGen/X86/asm-modifier-P.ll | 79 + test/CodeGen/X86/asm-modifier.ll | 41 + test/CodeGen/X86/asm-reg-type-mismatch.ll | 31 + .../X86/atom-bypass-slow-division-64.ll | 49 + test/CodeGen/X86/atom-bypass-slow-division.ll | 112 + .../atom-call-reg-indirect-foldedreload32.ll | 74 + .../atom-call-reg-indirect-foldedreload64.ll | 89 + test/CodeGen/X86/atom-call-reg-indirect.ll | 55 + test/CodeGen/X86/atom-fixup-lea1.ll | 38 + test/CodeGen/X86/atom-fixup-lea2.ll | 84 + test/CodeGen/X86/atom-fixup-lea3.ll | 51 + test/CodeGen/X86/atom-lea-addw-bug.ll | 19 + test/CodeGen/X86/atom-lea-sp.ll | 48 + test/CodeGen/X86/atom-pad-short-functions.ll | 103 + test/CodeGen/X86/atom-sched.ll | 33 + test/CodeGen/X86/atom-shuf.ll | 9 + test/CodeGen/X86/atomic-dagsched.ll | 104 + test/CodeGen/X86/atomic-load-store-wide.ll | 19 + test/CodeGen/X86/atomic-load-store.ll | 23 + test/CodeGen/X86/atomic-minmax-i6432.ll | 108 + test/CodeGen/X86/atomic-or.ll | 28 + test/CodeGen/X86/atomic-pointer.ll | 22 + test/CodeGen/X86/atomic16.ll | 250 + test/CodeGen/X86/atomic32.ll | 276 + test/CodeGen/X86/atomic64.ll | 216 + test/CodeGen/X86/atomic6432.ll | 208 + test/CodeGen/X86/atomic8.ll | 250 + test/CodeGen/X86/atomic_add.ll | 202 + test/CodeGen/X86/atomic_op.ll | 138 + test/CodeGen/X86/attribute-sections.ll | 18 + test/CodeGen/X86/avoid-lea-scale2.ll | 10 + test/CodeGen/X86/avoid-loop-align-2.ll | 49 + test/CodeGen/X86/avoid-loop-align.ll | 39 + test/CodeGen/X86/avx-arith.ll | 271 + test/CodeGen/X86/avx-basic.ll | 133 + test/CodeGen/X86/avx-bitcast.ll | 10 + test/CodeGen/X86/avx-blend.ll | 104 + test/CodeGen/X86/avx-brcond.ll | 150 + test/CodeGen/X86/avx-cast.ll | 47 + test/CodeGen/X86/avx-cmp.ll | 150 + test/CodeGen/X86/avx-cvt.ll | 89 + test/CodeGen/X86/avx-fp2int.ll | 19 + test/CodeGen/X86/avx-intel-ocl.ll | 168 + test/CodeGen/X86/avx-intrinsics-x86.ll | 2637 + test/CodeGen/X86/avx-intrinsics-x86_64.ll | 50 + test/CodeGen/X86/avx-load-store.ll | 151 + test/CodeGen/X86/avx-logic.ll | 199 + test/CodeGen/X86/avx-minmax.ll | 65 + test/CodeGen/X86/avx-movdup.ll | 34 + test/CodeGen/X86/avx-select.ll | 22 + test/CodeGen/X86/avx-sext.ll | 199 + test/CodeGen/X86/avx-shift.ll | 148 + test/CodeGen/X86/avx-shuffle-x86_32.ll | 8 + test/CodeGen/X86/avx-shuffle.ll | 299 + test/CodeGen/X86/avx-splat.ll | 103 + test/CodeGen/X86/avx-trunc.ll | 20 + test/CodeGen/X86/avx-unpack.ll | 161 + test/CodeGen/X86/avx-varargs-x86_64.ll | 15 + test/CodeGen/X86/avx-vbroadcast.ll | 143 + test/CodeGen/X86/avx-vextractf128.ll | 122 + test/CodeGen/X86/avx-vinsertf128.ll | 131 + test/CodeGen/X86/avx-vmovddup.ll | 14 + test/CodeGen/X86/avx-vperm2f128.ll | 69 + test/CodeGen/X86/avx-vpermil.ll | 54 + test/CodeGen/X86/avx-vshufp.ll | 157 + test/CodeGen/X86/avx-vzeroupper.ll | 83 + test/CodeGen/X86/avx-win64-args.ll | 18 + test/CodeGen/X86/avx-win64.ll | 47 + test/CodeGen/X86/avx-zext.ll | 41 + test/CodeGen/X86/avx2-arith.ll | 168 + test/CodeGen/X86/avx2-cmp.ll | 58 + test/CodeGen/X86/avx2-conversions.ll | 137 + test/CodeGen/X86/avx2-gather.ll | 18 + test/CodeGen/X86/avx2-intrinsics-x86.ll | 1157 + test/CodeGen/X86/avx2-logic.ll | 95 + test/CodeGen/X86/avx2-nontemporal.ll | 22 + test/CodeGen/X86/avx2-palignr.ll | 57 + test/CodeGen/X86/avx2-phaddsub.ll | 73 + test/CodeGen/X86/avx2-shift.ll | 268 + test/CodeGen/X86/avx2-shuffle.ll | 109 + test/CodeGen/X86/avx2-unpack.ll | 86 + test/CodeGen/X86/avx2-vbroadcast.ll | 357 + test/CodeGen/X86/avx2-vector-shifts.ll | 247 + test/CodeGen/X86/avx2-vperm.ll | 34 + test/CodeGen/X86/avx2-vperm2i128.ll | 47 + test/CodeGen/X86/avx512-arith.ll | 271 + test/CodeGen/X86/avx512-build-vector.ll | 18 + test/CodeGen/X86/avx512-cmp.ll | 27 + test/CodeGen/X86/avx512-cvt.ll | 217 + test/CodeGen/X86/avx512-fma-intrinsics.ll | 97 + test/CodeGen/X86/avx512-fma.ll | 83 + .../X86/avx512-gather-scatter-intrin.ll | 225 + test/CodeGen/X86/avx512-insert-extract.ll | 125 + test/CodeGen/X86/avx512-intrinsics.ll | 374 + test/CodeGen/X86/avx512-mask-op.ll | 57 + test/CodeGen/X86/avx512-mov.ll | 155 + test/CodeGen/X86/avx512-select.ll | 22 + test/CodeGen/X86/avx512-shift.ll | 108 + test/CodeGen/X86/avx512-shuffle.ll | 226 + test/CodeGen/X86/avx512-trunc-ext.ll | 127 + test/CodeGen/X86/avx512-vbroadcast.ll | 53 + test/CodeGen/X86/avx512-vec-cmp.ll | 113 + test/CodeGen/X86/barrier-sse.ll | 11 + test/CodeGen/X86/barrier.ll | 6 + test/CodeGen/X86/basic-promote-integers.ll | 98 + test/CodeGen/X86/bc-extract.ll | 27 + test/CodeGen/X86/bigstructret.ll | 34 + test/CodeGen/X86/bigstructret2.ll | 20 + test/CodeGen/X86/bit-test-shift.ll | 13 + test/CodeGen/X86/bitcast-i256.ll | 11 + test/CodeGen/X86/bitcast-int-to-vector.ll | 10 + test/CodeGen/X86/bitcast.ll | 24 + test/CodeGen/X86/bitcast2.ll | 13 + test/CodeGen/X86/blend-msb.ll | 39 + test/CodeGen/X86/block-placement.ll | 1123 + test/CodeGen/X86/bmi.ll | 345 + test/CodeGen/X86/bool-simplify.ll | 138 + test/CodeGen/X86/bool-zext.ll | 47 + test/CodeGen/X86/br-fold.ll | 20 + test/CodeGen/X86/brcond.ll | 257 + test/CodeGen/X86/break-anti-dependencies.ll | 36 + test/CodeGen/X86/break-avx-dep.ll | 29 + test/CodeGen/X86/break-sse-dep.ll | 62 + test/CodeGen/X86/bss_pagealigned.ll | 21 + test/CodeGen/X86/bswap-inline-asm.ll | 88 + test/CodeGen/X86/bswap-vector.ll | 19 + test/CodeGen/X86/bswap.ll | 154 + test/CodeGen/X86/bt.ll | 533 + test/CodeGen/X86/btq.ll | 35 + test/CodeGen/X86/buildvec-insertvec.ll | 15 + test/CodeGen/X86/byval-align.ll | 59 + test/CodeGen/X86/byval.ll | 17 + test/CodeGen/X86/byval2.ll | 45 + test/CodeGen/X86/byval3.ll | 53 + test/CodeGen/X86/byval4.ll | 59 + test/CodeGen/X86/byval5.ll | 67 + test/CodeGen/X86/byval6.ll | 16 + test/CodeGen/X86/byval7.ll | 21 + test/CodeGen/X86/call-imm.ll | 23 + test/CodeGen/X86/call-push.ll | 45 + test/CodeGen/X86/cas.ll | 73 + test/CodeGen/X86/cfstring.ll | 36 + test/CodeGen/X86/chain_order.ll | 37 + test/CodeGen/X86/change-compare-stride-1.ll | 96 + .../X86/change-compare-stride-trickiness-0.ll | 29 + .../X86/change-compare-stride-trickiness-1.ll | 31 + .../X86/change-compare-stride-trickiness-2.ll | 58 + test/CodeGen/X86/clobber-fi0.ll | 37 + test/CodeGen/X86/clz.ll | 141 + test/CodeGen/X86/cmov-fp.ll | 451 + test/CodeGen/X86/cmov-into-branch.ll | 63 + test/CodeGen/X86/cmov.ll | 157 + test/CodeGen/X86/cmp.ll | 165 + test/CodeGen/X86/cmpxchg16b.ll | 13 + test/CodeGen/X86/coalesce-esp.ll | 36 + test/CodeGen/X86/coalesce-implicitdef.ll | 125 + test/CodeGen/X86/coalescer-commute1.ll | 26 + test/CodeGen/X86/coalescer-commute2.ll | 28 + test/CodeGen/X86/coalescer-commute3.ll | 24 + test/CodeGen/X86/coalescer-commute4.ll | 30 + test/CodeGen/X86/coalescer-commute5.ll | 21 + test/CodeGen/X86/coalescer-cross.ll | 45 + test/CodeGen/X86/coalescer-dce.ll | 80 + test/CodeGen/X86/coalescer-dce2.ll | 118 + test/CodeGen/X86/coalescer-identity.ll | 78 + test/CodeGen/X86/coalescer-remat.ll | 13 + test/CodeGen/X86/code_placement.ll | 136 + test/CodeGen/X86/code_placement_align_all.ll | 22 + test/CodeGen/X86/code_placement_eh.ll | 45 + test/CodeGen/X86/codegen-prepare-cast.ll | 24 + test/CodeGen/X86/codegen-prepare-extload.ll | 21 + test/CodeGen/X86/codegen-prepare.ll | 44 + test/CodeGen/X86/codemodel.ll | 67 + test/CodeGen/X86/coff-feat00.ll | 7 + test/CodeGen/X86/coldcc64.ll | 24 + test/CodeGen/X86/combine-lds.ll | 6 + test/CodeGen/X86/combiner-aa-0.ll | 20 + test/CodeGen/X86/combiner-aa-1.ll | 23 + test/CodeGen/X86/commute-intrinsic.ll | 17 + test/CodeGen/X86/commute-two-addr.ll | 62 + test/CodeGen/X86/compact-unwind.ll | 41 + test/CodeGen/X86/compare-add.ll | 8 + test/CodeGen/X86/compare-inf.ll | 126 + test/CodeGen/X86/compare_folding.ll | 11 + test/CodeGen/X86/compiler_used.ll | 12 + test/CodeGen/X86/complex-asm.ll | 17 + test/CodeGen/X86/complex-fca.ll | 17 + test/CodeGen/X86/conditional-indecrement.ll | 89 + test/CodeGen/X86/constant-pool-remat-0.ll | 23 + test/CodeGen/X86/constant-pool-sharing.ll | 20 + test/CodeGen/X86/constpool.ll | 16 + test/CodeGen/X86/constructor.ll | 27 + .../X86/convert-2-addr-3-addr-inc64.ll | 27 + test/CodeGen/X86/copysign-zero.ll | 14 + test/CodeGen/X86/crash-O0.ll | 31 + test/CodeGen/X86/crash-nosse.ll | 27 + test/CodeGen/X86/crash.ll | 592 + test/CodeGen/X86/critical-edge-split-2.ll | 29 + test/CodeGen/X86/cstring.ll | 4 + test/CodeGen/X86/ctpop-combine.ll | 40 + test/CodeGen/X86/cvtv2f32.ll | 29 + test/CodeGen/X86/dag-rauw-cse.ll | 13 + test/CodeGen/X86/dagcombine-buildvector.ll | 27 + test/CodeGen/X86/dagcombine-cse.ll | 28 + test/CodeGen/X86/dagcombine-shifts.ll | 209 + test/CodeGen/X86/dagcombine-unsafe-math.ll | 56 + test/CodeGen/X86/darwin-bzero.ll | 8 + test/CodeGen/X86/darwin-no-dead-strip.ll | 7 + test/CodeGen/X86/darwin-quote.ll | 15 + test/CodeGen/X86/darwin-stub.ll | 12 + test/CodeGen/X86/discontiguous-loops.ll | 72 + test/CodeGen/X86/div8.ll | 22 + test/CodeGen/X86/divide-by-constant.ll | 94 + test/CodeGen/X86/divrem.ll | 58 + test/CodeGen/X86/dll-linkage.ll | 14 + test/CodeGen/X86/dllexport.ll | 12 + test/CodeGen/X86/dollar-name.ll | 18 + test/CodeGen/X86/dwarf-comp-dir.ll | 19 + test/CodeGen/X86/dyn-stackalloc.ll | 19 + test/CodeGen/X86/dyn_alloca_aligned.ll | 9 + test/CodeGen/X86/dynamic-allocas-VLAs.ll | 231 + test/CodeGen/X86/early-ifcvt-crash.ll | 34 + test/CodeGen/X86/early-ifcvt.ll | 175 + test/CodeGen/X86/eh_frame.ll | 14 + test/CodeGen/X86/emit-big-cst.ll | 17 + test/CodeGen/X86/empty-functions.ll | 25 + test/CodeGen/X86/empty-struct-return-type.ll | 15 + test/CodeGen/X86/epilogue.ll | 13 + test/CodeGen/X86/extend.ll | 18 + test/CodeGen/X86/extended-fma-contraction.ll | 22 + test/CodeGen/X86/extern_weak.ll | 13 + test/CodeGen/X86/extmul128.ll | 14 + test/CodeGen/X86/extmul64.ll | 14 + test/CodeGen/X86/extract-combine.ll | 15 + test/CodeGen/X86/extract-concat.ll | 17 + test/CodeGen/X86/extract-extract.ll | 24 + test/CodeGen/X86/extractelement-from-arg.ll | 7 + test/CodeGen/X86/extractelement-load.ll | 25 + test/CodeGen/X86/extractelement-shuffle.ll | 13 + test/CodeGen/X86/extractps.ll | 27 + test/CodeGen/X86/f16c-intrinsics.ll | 32 + test/CodeGen/X86/fabs.ll | 54 + test/CodeGen/X86/fast-cc-callee-pops.ll | 13 + test/CodeGen/X86/fast-cc-merge-stack-adj.ll | 13 + test/CodeGen/X86/fast-cc-pass-in-regs.ll | 29 + test/CodeGen/X86/fast-isel-agg-constant.ll | 11 + test/CodeGen/X86/fast-isel-args-fail.ll | 23 + test/CodeGen/X86/fast-isel-args.ll | 25 + test/CodeGen/X86/fast-isel-atomic.ll | 15 + .../fast-isel-avoid-unnecessary-pic-base.ll | 24 + test/CodeGen/X86/fast-isel-bail.ll | 14 + test/CodeGen/X86/fast-isel-bc.ll | 23 + test/CodeGen/X86/fast-isel-call.ll | 55 + test/CodeGen/X86/fast-isel-cmp-branch.ll | 34 + test/CodeGen/X86/fast-isel-constant.ll | 24 + test/CodeGen/X86/fast-isel-constpool.ll | 19 + test/CodeGen/X86/fast-isel-divrem-x86-64.ll | 41 + test/CodeGen/X86/fast-isel-divrem.ll | 122 + test/CodeGen/X86/fast-isel-expect.ll | 21 + test/CodeGen/X86/fast-isel-extract.ll | 48 + test/CodeGen/X86/fast-isel-fneg.ll | 20 + test/CodeGen/X86/fast-isel-gep.ll | 138 + test/CodeGen/X86/fast-isel-gv.ll | 26 + test/CodeGen/X86/fast-isel-i1.ll | 41 + test/CodeGen/X86/fast-isel-mem.ll | 46 + test/CodeGen/X86/fast-isel-ret-ext.ll | 38 + test/CodeGen/X86/fast-isel-store.ll | 64 + test/CodeGen/X86/fast-isel-tailcall.ll | 14 + test/CodeGen/X86/fast-isel-tls.ll | 26 + test/CodeGen/X86/fast-isel-x86-64.ll | 306 + test/CodeGen/X86/fast-isel-x86.ll | 62 + test/CodeGen/X86/fast-isel.ll | 127 + test/CodeGen/X86/fastcall-correct-mangling.ll | 14 + test/CodeGen/X86/fastcc-2.ll | 11 + test/CodeGen/X86/fastcc-byval.ll | 24 + test/CodeGen/X86/fastcc-sret.ll | 27 + test/CodeGen/X86/fastcc.ll | 20 + test/CodeGen/X86/fastcc3struct.ll | 16 + .../X86/fastisel-gep-promote-before-add.ll | 37 + test/CodeGen/X86/fdiv.ll | 41 + test/CodeGen/X86/field-extract-use-trunc.ll | 39 + test/CodeGen/X86/fildll.ll | 12 + test/CodeGen/X86/float-asmprint.ll | 40 + test/CodeGen/X86/floor-soft-float.ll | 13 + test/CodeGen/X86/fltused.ll | 21 + test/CodeGen/X86/fltused_function_pointer.ll | 19 + test/CodeGen/X86/fma.ll | 47 + test/CodeGen/X86/fma3-intrinsics.ll | 134 + test/CodeGen/X86/fma4-intrinsics-x86_64.ll | 316 + test/CodeGen/X86/fma_patterns.ll | 212 + test/CodeGen/X86/fma_patterns_wide.ll | 84 + test/CodeGen/X86/fmul-zero.ll | 9 + test/CodeGen/X86/fold-add.ll | 30 + test/CodeGen/X86/fold-and-shift.ll | 77 + test/CodeGen/X86/fold-call-2.ll | 10 + test/CodeGen/X86/fold-call-3.ll | 45 + test/CodeGen/X86/fold-call.ll | 27 + test/CodeGen/X86/fold-imm.ll | 21 + test/CodeGen/X86/fold-load-vec.ll | 39 + test/CodeGen/X86/fold-load.ll | 73 + test/CodeGen/X86/fold-mul-lohi.ll | 31 + test/CodeGen/X86/fold-pcmpeqd-0.ll | 117 + test/CodeGen/X86/fold-pcmpeqd-1.ll | 16 + test/CodeGen/X86/fold-pcmpeqd-2.ll | 98 + test/CodeGen/X86/fold-sext-trunc.ll | 20 + test/CodeGen/X86/fold-vex.ll | 16 + test/CodeGen/X86/fold-xmm-zero.ll | 34 + test/CodeGen/X86/fold-zext-trunc.ll | 23 + test/CodeGen/X86/force-align-stack-alloca.ll | 70 + test/CodeGen/X86/force-align-stack.ll | 21 + test/CodeGen/X86/fp-elim-and-no-fp-elim.ll | 32 + test/CodeGen/X86/fp-elim.ll | 62 + test/CodeGen/X86/fp-fast.ll | 126 + test/CodeGen/X86/fp-immediate-shorten.ll | 10 + test/CodeGen/X86/fp-in-intregs.ll | 22 + test/CodeGen/X86/fp-load-trunc.ll | 61 + test/CodeGen/X86/fp-select-cmp-and.ll | 185 + test/CodeGen/X86/fp-stack-2results.ll | 66 + test/CodeGen/X86/fp-stack-O0-crash.ll | 49 + test/CodeGen/X86/fp-stack-O0.ll | 24 + test/CodeGen/X86/fp-stack-compare-cmov.ll | 12 + test/CodeGen/X86/fp-stack-compare.ll | 14 + test/CodeGen/X86/fp-stack-direct-ret.ll | 11 + test/CodeGen/X86/fp-stack-ret-conv.ll | 17 + test/CodeGen/X86/fp-stack-ret-store.ll | 26 + test/CodeGen/X86/fp-stack-ret.ll | 40 + test/CodeGen/X86/fp-stack-retcopy.ll | 12 + test/CodeGen/X86/fp-stack-set-st1.ll | 7 + test/CodeGen/X86/fp-stack.ll | 25 + test/CodeGen/X86/fp-trunc.ll | 58 + test/CodeGen/X86/fp-une-cmp.ll | 43 + test/CodeGen/X86/fp2sint.ll | 18 + test/CodeGen/X86/fp_constant_op.ll | 46 + test/CodeGen/X86/fp_load_cast_fold.ll | 26 + test/CodeGen/X86/fp_load_fold.ll | 40 + test/CodeGen/X86/frame-base.ll | 22 + test/CodeGen/X86/fsgsbase.ll | 57 + test/CodeGen/X86/fsxor-alignment.ll | 14 + test/CodeGen/X86/full-lsr.ll | 42 + test/CodeGen/X86/ga-offset.ll | 18 + test/CodeGen/X86/gather-addresses.ll | 55 + test/CodeGen/X86/gcc_except_table.ll | 33 + test/CodeGen/X86/ghc-cc.ll | 44 + test/CodeGen/X86/ghc-cc64.ll | 85 + test/CodeGen/X86/global-sections-tls.ll | 14 + test/CodeGen/X86/global-sections.ll | 160 + test/CodeGen/X86/gs-fold.ll | 20 + test/CodeGen/X86/h-register-addressing-32.ll | 74 + test/CodeGen/X86/h-register-addressing-64.ll | 74 + test/CodeGen/X86/h-register-store.ll | 47 + test/CodeGen/X86/h-registers-0.ll | 106 + test/CodeGen/X86/h-registers-1.ll | 48 + test/CodeGen/X86/h-registers-2.ll | 20 + test/CodeGen/X86/h-registers-3.ll | 12 + test/CodeGen/X86/haddsub.ll | 285 + test/CodeGen/X86/handle-move.ll | 74 + test/CodeGen/X86/hidden-vis-2.ll | 10 + test/CodeGen/X86/hidden-vis-3.ll | 19 + test/CodeGen/X86/hidden-vis-4.ll | 12 + test/CodeGen/X86/hidden-vis-pic.ll | 55 + test/CodeGen/X86/hidden-vis.ll | 31 + test/CodeGen/X86/hipe-cc.ll | 77 + test/CodeGen/X86/hipe-cc64.ll | 87 + test/CodeGen/X86/hipe-prologue.ll | 67 + test/CodeGen/X86/hoist-common.ll | 38 + test/CodeGen/X86/hoist-invariant-load.ll | 30 + test/CodeGen/X86/i128-and-beyond.ll | 8 + test/CodeGen/X86/i128-immediate.ll | 5 + test/CodeGen/X86/i128-mul.ll | 46 + test/CodeGen/X86/i128-ret.ll | 10 + test/CodeGen/X86/i128-sdiv.ll | 24 + test/CodeGen/X86/i256-add.ll | 18 + test/CodeGen/X86/i2k.ll | 9 + test/CodeGen/X86/i486-fence-loop.ll | 27 + test/CodeGen/X86/i64-mem-copy.ll | 17 + test/CodeGen/X86/iabs.ll | 20 + test/CodeGen/X86/ident-metadata.ll | 9 + test/CodeGen/X86/illegal-insert.ll | 18 + .../CodeGen/X86/illegal-vector-args-return.ll | 14 + test/CodeGen/X86/imul-lea-2.ll | 19 + test/CodeGen/X86/imul-lea.ll | 12 + test/CodeGen/X86/imul64-lea.ll | 25 + test/CodeGen/X86/inline-asm-2addr.ll | 9 + test/CodeGen/X86/inline-asm-R-constraint.ll | 18 + test/CodeGen/X86/inline-asm-error.ll | 15 + test/CodeGen/X86/inline-asm-flag-clobber.ll | 32 + test/CodeGen/X86/inline-asm-fpstack.ll | 342 + test/CodeGen/X86/inline-asm-h.ll | 12 + test/CodeGen/X86/inline-asm-modifier-n.ll | 8 + test/CodeGen/X86/inline-asm-modifier-q.ll | 12 + test/CodeGen/X86/inline-asm-mrv.ll | 35 + test/CodeGen/X86/inline-asm-out-regs.ll | 40 + test/CodeGen/X86/inline-asm-pic.ll | 10 + test/CodeGen/X86/inline-asm-ptr-cast.ll | 27 + test/CodeGen/X86/inline-asm-q-regs.ll | 37 + test/CodeGen/X86/inline-asm-tied.ll | 30 + test/CodeGen/X86/inline-asm-x-scalar.ll | 24 + test/CodeGen/X86/inline-asm.ll | 61 + test/CodeGen/X86/inlineasm-sched-bug.ll | 13 + test/CodeGen/X86/inreg.ll | 46 + test/CodeGen/X86/ins_subreg_coalesce-1.ll | 30 + test/CodeGen/X86/ins_subreg_coalesce-2.ll | 7 + test/CodeGen/X86/ins_subreg_coalesce-3.ll | 92 + test/CodeGen/X86/insert-positions.ll | 69 + test/CodeGen/X86/insertelement-copytoregs.ll | 12 + test/CodeGen/X86/insertelement-legalize.ll | 10 + test/CodeGen/X86/int-intrinsic.ll | 20 + test/CodeGen/X86/invalid-shift-immediate.ll | 30 + test/CodeGen/X86/isel-optnone.ll | 42 + test/CodeGen/X86/isel-sink.ll | 22 + test/CodeGen/X86/isel-sink2.ll | 17 + test/CodeGen/X86/isel-sink3.ll | 27 + test/CodeGen/X86/isint.ll | 58 + test/CodeGen/X86/isnan.ll | 9 + test/CodeGen/X86/isnan2.ll | 11 + test/CodeGen/X86/ispositive.ll | 9 + test/CodeGen/X86/jump_sign.ll | 307 + test/CodeGen/X86/label-redefinition.ll | 15 + test/CodeGen/X86/large-gep-chain.ll | 25607 +++++ test/CodeGen/X86/large-gep-scale.ll | 12 + test/CodeGen/X86/large-global.ll | 11 + test/CodeGen/X86/ldzero.ll | 43 + test/CodeGen/X86/lea-2.ll | 15 + test/CodeGen/X86/lea-3.ll | 22 + test/CodeGen/X86/lea-4.ll | 21 + test/CodeGen/X86/lea-recursion.ll | 46 + test/CodeGen/X86/lea.ll | 35 + test/CodeGen/X86/leaf-fp-elim.ll | 30 + .../X86/legalize-fmp-oeq-vector-select.ll | 11 + test/CodeGen/X86/legalize-libcalls.ll | 35 + test/CodeGen/X86/legalize-shift-64.ll | 94 + test/CodeGen/X86/legalize-sub-zero-2.ll | 41 + test/CodeGen/X86/legalize-sub-zero.ll | 35 + test/CodeGen/X86/legalizedag_vec.ll | 17 + test/CodeGen/X86/lfence.ll | 8 + test/CodeGen/X86/licm-dominance.ll | 36 + test/CodeGen/X86/licm-nested.ll | 90 + test/CodeGen/X86/licm-symbol.ll | 39 + test/CodeGen/X86/limited-prec.ll | 60 + test/CodeGen/X86/lit.local.cfg | 12 + test/CodeGen/X86/live-out-reg-info.ll | 20 + test/CodeGen/X86/liveness-local-regalloc.ll | 92 + test/CodeGen/X86/load-slice.ll | 139 + test/CodeGen/X86/lock-inst-encoding.ll | 44 + test/CodeGen/X86/log2_not_readnone.ll | 15 + test/CodeGen/X86/long-extend.ll | 18 + test/CodeGen/X86/long-setcc.ll | 31 + test/CodeGen/X86/longlong-deadload.ll | 14 + test/CodeGen/X86/loop-blocks.ll | 214 + test/CodeGen/X86/loop-hoist.ll | 27 + test/CodeGen/X86/loop-strength-reduce-2.ll | 45 + test/CodeGen/X86/loop-strength-reduce-3.ll | 33 + test/CodeGen/X86/loop-strength-reduce.ll | 33 + test/CodeGen/X86/loop-strength-reduce2.ll | 30 + test/CodeGen/X86/loop-strength-reduce4.ll | 63 + test/CodeGen/X86/loop-strength-reduce5.ll | 23 + test/CodeGen/X86/loop-strength-reduce6.ll | 66 + test/CodeGen/X86/loop-strength-reduce7.ll | 44 + test/CodeGen/X86/loop-strength-reduce8.ll | 84 + test/CodeGen/X86/lsr-delayed-fold.ll | 178 + test/CodeGen/X86/lsr-i386.ll | 44 + test/CodeGen/X86/lsr-interesting-step.ll | 51 + test/CodeGen/X86/lsr-loop-exit-cond.ll | 192 + test/CodeGen/X86/lsr-negative-stride.ll | 51 + test/CodeGen/X86/lsr-nonaffine.ll | 30 + test/CodeGen/X86/lsr-normalization.ll | 102 + test/CodeGen/X86/lsr-overflow.ll | 45 + test/CodeGen/X86/lsr-quadratic-expand.ll | 22 + test/CodeGen/X86/lsr-redundant-addressing.ll | 51 + test/CodeGen/X86/lsr-reuse-trunc.ll | 62 + test/CodeGen/X86/lsr-reuse.ll | 752 + test/CodeGen/X86/lsr-sort.ll | 23 + test/CodeGen/X86/lsr-static-addr.ll | 42 + test/CodeGen/X86/lsr-wrap.ll | 37 + test/CodeGen/X86/lzcnt.ll | 62 + test/CodeGen/X86/machine-cp.ll | 36 + test/CodeGen/X86/machine-cse.ll | 159 + test/CodeGen/X86/masked-iv-safe.ll | 276 + test/CodeGen/X86/masked-iv-unsafe.ll | 386 + test/CodeGen/X86/maskmovdqu.ll | 13 + test/CodeGen/X86/mcinst-avx-lowering.ll | 19 + test/CodeGen/X86/mcinst-lowering.ll | 44 + test/CodeGen/X86/mem-promote-integers.ll | 391 + test/CodeGen/X86/membarrier.ll | 12 + test/CodeGen/X86/memcmp.ll | 114 + test/CodeGen/X86/memcpy-2.ll | 195 + test/CodeGen/X86/memcpy.ll | 120 + test/CodeGen/X86/memset-2.ll | 39 + test/CodeGen/X86/memset-3.ll | 12 + .../X86/memset-sse-stack-realignment.ll | 77 + test/CodeGen/X86/memset.ll | 55 + test/CodeGen/X86/memset64-on-x86-32.ll | 12 + test/CodeGen/X86/merge_store.ll | 30 + test/CodeGen/X86/mfence.ll | 8 + test/CodeGen/X86/mingw-alloca.ll | 37 + test/CodeGen/X86/misaligned-memset.ll | 15 + test/CodeGen/X86/misched-balance.ll | 277 + test/CodeGen/X86/misched-copy.ll | 49 + test/CodeGen/X86/misched-crash.ll | 40 + test/CodeGen/X86/misched-fusion.ll | 108 + test/CodeGen/X86/misched-ilp.ll | 25 + test/CodeGen/X86/misched-matmul.ll | 227 + test/CodeGen/X86/misched-matrix.ll | 191 + test/CodeGen/X86/misched-new.ll | 109 + test/CodeGen/X86/mmx-arg-passing.ll | 38 + test/CodeGen/X86/mmx-arg-passing2.ll | 28 + test/CodeGen/X86/mmx-arith.ll | 309 + test/CodeGen/X86/mmx-bitcast-to-i64.ll | 31 + test/CodeGen/X86/mmx-builtins.ll | 1349 + test/CodeGen/X86/mmx-copy-gprs.ll | 17 + test/CodeGen/X86/mmx-emms.ll | 11 + test/CodeGen/X86/mmx-insert-element.ll | 9 + test/CodeGen/X86/mmx-pinsrw.ll | 17 + test/CodeGen/X86/mmx-punpckhdq.ll | 31 + test/CodeGen/X86/mmx-s2v.ll | 15 + test/CodeGen/X86/mmx-shift.ll | 39 + test/CodeGen/X86/mmx-shuffle.ll | 31 + test/CodeGen/X86/movbe.ll | 45 + test/CodeGen/X86/movfs.ll | 8 + test/CodeGen/X86/movgs.ll | 74 + test/CodeGen/X86/movmsk.ll | 126 + test/CodeGen/X86/movntdq-no-avx.ll | 12 + test/CodeGen/X86/ms-inline-asm.ll | 110 + test/CodeGen/X86/mul-legalize.ll | 26 + test/CodeGen/X86/mul-remat.ll | 8 + test/CodeGen/X86/mul-shift-reassoc.ll | 12 + test/CodeGen/X86/mul128.ll | 6 + test/CodeGen/X86/mul64.ll | 6 + test/CodeGen/X86/muloti.ll | 81 + test/CodeGen/X86/mult-alt-generic-i686.ll | 321 + test/CodeGen/X86/mult-alt-generic-x86_64.ll | 321 + test/CodeGen/X86/mult-alt-x86.ll | 358 + test/CodeGen/X86/multiple-loop-post-inc.ll | 308 + .../X86/multiple-return-values-cross-block.ll | 15 + test/CodeGen/X86/mulx32.ll | 22 + test/CodeGen/X86/mulx64.ll | 22 + test/CodeGen/X86/nancvt.ll | 183 + test/CodeGen/X86/narrow-shl-cst.ll | 101 + test/CodeGen/X86/narrow-shl-load.ll | 83 + test/CodeGen/X86/narrow_op-1.ll | 28 + test/CodeGen/X86/neg-shl-add.ll | 17 + test/CodeGen/X86/neg_cmp.ll | 22 + test/CodeGen/X86/neg_fp.ll | 12 + test/CodeGen/X86/negate-add-zero.ll | 1141 + test/CodeGen/X86/negative-sin.ll | 12 + .../X86/negative-stride-fptosi-user.ll | 25 + test/CodeGen/X86/negative-subscript.ll | 10 + test/CodeGen/X86/negative_zero.ll | 8 + test/CodeGen/X86/newline-and-quote.ll | 6 + test/CodeGen/X86/no-cfi.ll | 34 + test/CodeGen/X86/no-cmov.ll | 11 + test/CodeGen/X86/no-compact-unwind.ll | 64 + test/CodeGen/X86/no-elf-compact-unwind.ll | 48 + test/CodeGen/X86/nobt.ll | 70 + test/CodeGen/X86/nocx16.ll | 21 + test/CodeGen/X86/non-lazy-bind.ll | 27 + test/CodeGen/X86/nonconst-static-ev.ll | 9 + test/CodeGen/X86/nonconst-static-iv.ll | 9 + test/CodeGen/X86/nontemporal.ll | 22 + test/CodeGen/X86/norex-subreg.ll | 80 + test/CodeGen/X86/nosse-error1.ll | 36 + test/CodeGen/X86/nosse-error2.ll | 36 + test/CodeGen/X86/nosse-varargs.ll | 46 + test/CodeGen/X86/null-streamer.ll | 11 + test/CodeGen/X86/objc-gc-module-flags.ll | 13 + test/CodeGen/X86/object-size.ll | 55 + test/CodeGen/X86/odr_comdat.ll | 16 + test/CodeGen/X86/opt-ext-uses.ll | 19 + test/CodeGen/X86/opt-shuff-tstore.ll | 39 + test/CodeGen/X86/optimize-max-0.ll | 461 + test/CodeGen/X86/optimize-max-1.ll | 78 + test/CodeGen/X86/optimize-max-2.ll | 32 + test/CodeGen/X86/optimize-max-3.ll | 76 + test/CodeGen/X86/or-address.ll | 90 + test/CodeGen/X86/or-branch.ll | 19 + test/CodeGen/X86/overlap-shift.ll | 19 + test/CodeGen/X86/packed_struct.ll | 34 + test/CodeGen/X86/palignr-2.ll | 28 + test/CodeGen/X86/palignr.ll | 73 + test/CodeGen/X86/pass-three.ll | 16 + test/CodeGen/X86/patchpoint.ll | 100 + test/CodeGen/X86/peep-setb.ll | 82 + test/CodeGen/X86/peep-test-0.ll | 22 + test/CodeGen/X86/peep-test-1.ll | 23 + test/CodeGen/X86/peep-test-2.ll | 19 + test/CodeGen/X86/peep-test-3.ll | 89 + test/CodeGen/X86/peep-test-4.ll | 191 + .../CodeGen/X86/peep-vector-extract-concat.ll | 11 + .../CodeGen/X86/peep-vector-extract-insert.ll | 12 + test/CodeGen/X86/personality.ll | 55 + test/CodeGen/X86/personality_size.ll | 28 + test/CodeGen/X86/phaddsub.ll | 170 + test/CodeGen/X86/phi-bit-propagation.ll | 55 + test/CodeGen/X86/phi-immediate-factoring.ll | 55 + test/CodeGen/X86/phielim-split.ll | 30 + test/CodeGen/X86/phys-reg-local-regalloc.ll | 65 + test/CodeGen/X86/phys_subreg_coalesce-2.ll | 31 + test/CodeGen/X86/phys_subreg_coalesce-3.ll | 40 + test/CodeGen/X86/phys_subreg_coalesce.ll | 26 + test/CodeGen/X86/pic-load-remat.ll | 47 + test/CodeGen/X86/pic.ll | 208 + test/CodeGen/X86/pic_jumptable.ll | 98 + test/CodeGen/X86/pmovext.ll | 45 + test/CodeGen/X86/pmovsx-inreg.ll | 175 + test/CodeGen/X86/pmul.ll | 32 + test/CodeGen/X86/pmulld.ll | 26 + test/CodeGen/X86/pointer-vector.ll | 136 + test/CodeGen/X86/popcnt.ll | 38 + test/CodeGen/X86/postalloc-coalescing.ll | 35 + test/CodeGen/X86/postra-licm.ll | 188 + test/CodeGen/X86/powi.ll | 11 + test/CodeGen/X86/pr10068.ll | 22 + test/CodeGen/X86/pr10420.ll | 67 + test/CodeGen/X86/pr10475.ll | 30 + test/CodeGen/X86/pr10499.ll | 14 + test/CodeGen/X86/pr10523.ll | 18 + test/CodeGen/X86/pr10524.ll | 14 + test/CodeGen/X86/pr10525.ll | 13 + test/CodeGen/X86/pr10526.ll | 13 + test/CodeGen/X86/pr11202.ll | 19 + test/CodeGen/X86/pr11334.ll | 64 + test/CodeGen/X86/pr11415.ll | 23 + test/CodeGen/X86/pr11468.ll | 33 + test/CodeGen/X86/pr11985.ll | 19 + test/CodeGen/X86/pr11998.ll | 18 + test/CodeGen/X86/pr12312.ll | 155 + test/CodeGen/X86/pr12359.ll | 10 + test/CodeGen/X86/pr12360.ll | 46 + test/CodeGen/X86/pr12889.ll | 15 + test/CodeGen/X86/pr13209.ll | 74 + test/CodeGen/X86/pr13220.ll | 20 + test/CodeGen/X86/pr13458.ll | 14 + test/CodeGen/X86/pr13577.ll | 8 + test/CodeGen/X86/pr13859.ll | 28 + test/CodeGen/X86/pr13899.ll | 58 + test/CodeGen/X86/pr14088.ll | 32 + test/CodeGen/X86/pr14090.ll | 70 + test/CodeGen/X86/pr14098.ll | 23 + test/CodeGen/X86/pr14161.ll | 38 + test/CodeGen/X86/pr14204.ll | 15 + test/CodeGen/X86/pr14314.ll | 13 + test/CodeGen/X86/pr14333.ll | 12 + test/CodeGen/X86/pr14562.ll | 15 + test/CodeGen/X86/pr1462.ll | 25 + test/CodeGen/X86/pr1489.ll | 55 + test/CodeGen/X86/pr1505.ll | 12 + test/CodeGen/X86/pr1505b.ll | 79 + test/CodeGen/X86/pr15267.ll | 66 + test/CodeGen/X86/pr15296.ll | 46 + test/CodeGen/X86/pr15309.ll | 15 + test/CodeGen/X86/pr16031.ll | 27 + test/CodeGen/X86/pr16360.ll | 16 + test/CodeGen/X86/pr16807.ll | 18 + test/CodeGen/X86/pr17546.ll | 10 + test/CodeGen/X86/pr17631.ll | 34 + test/CodeGen/X86/pr17764.ll | 10 + test/CodeGen/X86/pr18014.ll | 16 + test/CodeGen/X86/pr18023.ll | 31 + test/CodeGen/X86/pr18054.ll | 10 + test/CodeGen/X86/pr18162.ll | 27 + test/CodeGen/X86/pr2177.ll | 35 + test/CodeGen/X86/pr2182.ll | 31 + test/CodeGen/X86/pr2326.ll | 24 + test/CodeGen/X86/pr2656.ll | 26 + test/CodeGen/X86/pr2659.ll | 45 + test/CodeGen/X86/pr2849.ll | 38 + test/CodeGen/X86/pr2924.ll | 24 + test/CodeGen/X86/pr2982.ll | 26 + test/CodeGen/X86/pr3154.ll | 104 + test/CodeGen/X86/pr3216.ll | 18 + test/CodeGen/X86/pr3241.ll | 29 + test/CodeGen/X86/pr3243.ll | 15 + test/CodeGen/X86/pr3244.ll | 26 + test/CodeGen/X86/pr3250.ll | 17 + test/CodeGen/X86/pr3317.ll | 46 + test/CodeGen/X86/pr3366.ll | 21 + test/CodeGen/X86/pr3457.ll | 16 + test/CodeGen/X86/pr3522.ll | 35 + test/CodeGen/X86/pr5145.ll | 35 + test/CodeGen/X86/pr7882.ll | 17 + test/CodeGen/X86/pr9127.ll | 13 + test/CodeGen/X86/pr9743.ll | 17 + test/CodeGen/X86/pre-ra-sched.ll | 57 + test/CodeGen/X86/prefetch.ll | 27 + test/CodeGen/X86/prefixdata.ll | 17 + test/CodeGen/X86/private-2.ll | 15 + test/CodeGen/X86/private.ll | 22 + test/CodeGen/X86/promote-assert-zext.ll | 22 + test/CodeGen/X86/promote-i16.ll | 21 + test/CodeGen/X86/promote-trunc.ll | 11 + test/CodeGen/X86/promote.ll | 42 + test/CodeGen/X86/psubus.ll | 340 + test/CodeGen/X86/ptr-rotate.ll | 11 + test/CodeGen/X86/ptrtoint-constexpr.ll | 14 + test/CodeGen/X86/rd-mod-wr-eflags.ll | 220 + test/CodeGen/X86/rdrand.ll | 85 + test/CodeGen/X86/rdseed.ll | 48 + test/CodeGen/X86/rdtsc.ll | 8 + test/CodeGen/X86/red-zone.ll | 25 + test/CodeGen/X86/red-zone2.ll | 10 + test/CodeGen/X86/reghinting.ll | 35 + test/CodeGen/X86/regpressure.ll | 115 + test/CodeGen/X86/rem.ll | 37 + test/CodeGen/X86/remat-constant.ll | 15 + test/CodeGen/X86/remat-fold-load.ll | 143 + test/CodeGen/X86/remat-mov-0.ll | 34 + test/CodeGen/X86/remat-phys-dead.ll | 23 + test/CodeGen/X86/remat-scalar-zero.ll | 97 + test/CodeGen/X86/ret-addr.ll | 22 + test/CodeGen/X86/ret-i64-0.ll | 5 + test/CodeGen/X86/ret-mmx.ll | 39 + test/CodeGen/X86/returned-trunc-tail-calls.ll | 97 + test/CodeGen/X86/reverse_branches.ll | 104 + test/CodeGen/X86/rip-rel-address.ll | 14 + test/CodeGen/X86/rip-rel-lea.ll | 16 + test/CodeGen/X86/rodata-relocs.ll | 46 + test/CodeGen/X86/rot16.ll | 85 + test/CodeGen/X86/rot32.ll | 112 + test/CodeGen/X86/rot64.ll | 100 + test/CodeGen/X86/rotate.ll | 100 + test/CodeGen/X86/rotate2.ll | 19 + test/CodeGen/X86/rounding-ops.ll | 132 + test/CodeGen/X86/rtm.ll | 30 + test/CodeGen/X86/sandybridge-loads.ll | 39 + test/CodeGen/X86/scalar-extract.ll | 13 + .../X86/scalar-min-max-fill-operand.ll | 27 + test/CodeGen/X86/scalar_sse_minmax.ll | 44 + test/CodeGen/X86/scalar_widen_div.ll | 195 + test/CodeGen/X86/scalarize-bitcast.ll | 29 + test/CodeGen/X86/scev-interchange.ll | 382 + test/CodeGen/X86/sdiv-exact.ll | 18 + test/CodeGen/X86/segmented-stacks-dynamic.ll | 64 + test/CodeGen/X86/segmented-stacks.ll | 385 + test/CodeGen/X86/select-with-and-or.ll | 72 + test/CodeGen/X86/select.ll | 359 + test/CodeGen/X86/select_const.ll | 16 + test/CodeGen/X86/selectiondag-cse.ll | 69 + test/CodeGen/X86/setcc-narrowing.ll | 18 + test/CodeGen/X86/setcc-sentinals.ll | 13 + test/CodeGen/X86/setcc.ll | 36 + test/CodeGen/X86/setoeq.ll | 21 + test/CodeGen/X86/setuge.ll | 13 + test/CodeGen/X86/sext-i1.ll | 63 + test/CodeGen/X86/sext-load.ll | 30 + test/CodeGen/X86/sext-ret-val.ll | 16 + test/CodeGen/X86/sext-setcc-self.ll | 55 + test/CodeGen/X86/sext-subreg.ll | 17 + test/CodeGen/X86/sext-trunc.ll | 9 + test/CodeGen/X86/sfence.ll | 8 + test/CodeGen/X86/sha.ll | 139 + test/CodeGen/X86/shift-and.ll | 78 + test/CodeGen/X86/shift-bmi2.ll | 181 + test/CodeGen/X86/shift-coalesce.ll | 15 + test/CodeGen/X86/shift-codegen.ll | 38 + test/CodeGen/X86/shift-combine.ll | 19 + test/CodeGen/X86/shift-double.ll | 41 + test/CodeGen/X86/shift-folding.ll | 70 + test/CodeGen/X86/shift-i128.ll | 9 + test/CodeGen/X86/shift-i256.ll | 9 + test/CodeGen/X86/shift-one.ll | 10 + test/CodeGen/X86/shift-pair.ll | 11 + test/CodeGen/X86/shift-parts.ll | 22 + test/CodeGen/X86/shl-anyext.ll | 40 + test/CodeGen/X86/shl-i64.ll | 20 + test/CodeGen/X86/shl_elim.ll | 16 + test/CodeGen/X86/shl_undef.ll | 53 + test/CodeGen/X86/shrink-compare.ll | 91 + test/CodeGen/X86/shrink-fp-const1.ll | 7 + test/CodeGen/X86/shrink-fp-const2.ll | 7 + test/CodeGen/X86/sibcall-2.ll | 52 + test/CodeGen/X86/sibcall-3.ll | 16 + test/CodeGen/X86/sibcall-4.ll | 13 + test/CodeGen/X86/sibcall-5.ll | 60 + test/CodeGen/X86/sibcall-6.ll | 13 + test/CodeGen/X86/sibcall-byval.ll | 31 + test/CodeGen/X86/sibcall.ll | 331 + test/CodeGen/X86/simple-zext.ll | 16 + test/CodeGen/X86/sincos-opt.ll | 68 + test/CodeGen/X86/sincos.ll | 79 + test/CodeGen/X86/sink-hoist.ll | 174 + test/CodeGen/X86/sink-out-of-loop.ll | 54 + test/CodeGen/X86/sjlj.ll | 60 + test/CodeGen/X86/small-byval-memcpy.ll | 20 + test/CodeGen/X86/smul-with-overflow.ll | 83 + test/CodeGen/X86/soft-fp.ll | 27 + test/CodeGen/X86/splat-scalar-load.ll | 17 + test/CodeGen/X86/split-eh-lpad-edges.ll | 38 + test/CodeGen/X86/split-vector-bitcast.ll | 12 + test/CodeGen/X86/split-vector-rem.ll | 15 + test/CodeGen/X86/sqrt-fastmath.ll | 60 + test/CodeGen/X86/sse-align-0.ll | 13 + test/CodeGen/X86/sse-align-1.ll | 10 + test/CodeGen/X86/sse-align-10.ll | 6 + test/CodeGen/X86/sse-align-11.ll | 13 + test/CodeGen/X86/sse-align-12.ll | 57 + test/CodeGen/X86/sse-align-2.ll | 21 + test/CodeGen/X86/sse-align-3.ll | 15 + test/CodeGen/X86/sse-align-4.ll | 10 + test/CodeGen/X86/sse-align-5.ll | 6 + test/CodeGen/X86/sse-align-6.ll | 7 + test/CodeGen/X86/sse-align-7.ll | 8 + test/CodeGen/X86/sse-align-8.ll | 6 + test/CodeGen/X86/sse-align-9.ll | 10 + test/CodeGen/X86/sse-commute.ll | 20 + test/CodeGen/X86/sse-domains.ll | 87 + test/CodeGen/X86/sse-fcopysign.ll | 16 + test/CodeGen/X86/sse-intel-ocl.ll | 93 + test/CodeGen/X86/sse-intrinsics-x86.ll | 308 + test/CodeGen/X86/sse-load-ret.ll | 19 + test/CodeGen/X86/sse-minmax.ll | 955 + test/CodeGen/X86/sse-varargs.ll | 9 + test/CodeGen/X86/sse1.ll | 45 + test/CodeGen/X86/sse2-blend.ll | 57 + test/CodeGen/X86/sse2-intrinsics-x86.ll | 712 + test/CodeGen/X86/sse2-mul.ll | 14 + test/CodeGen/X86/sse2-vector-shifts.ll | 247 + test/CodeGen/X86/sse2.ll | 223 + test/CodeGen/X86/sse3-intrinsics-x86.ll | 57 + test/CodeGen/X86/sse3.ll | 272 + test/CodeGen/X86/sse41-blend.ll | 90 + test/CodeGen/X86/sse41-intrinsics-x86.ll | 326 + test/CodeGen/X86/sse41.ll | 251 + test/CodeGen/X86/sse42-intrinsics-x86.ll | 182 + test/CodeGen/X86/sse42.ll | 39 + test/CodeGen/X86/sse42_64.ll | 21 + test/CodeGen/X86/sse4a.ll | 56 + test/CodeGen/X86/sse_partial_update.ll | 36 + test/CodeGen/X86/sse_reload_fold.ll | 134 + test/CodeGen/X86/ssse3-intrinsics-x86.ll | 120 + test/CodeGen/X86/stack-align-memcpy.ll | 18 + test/CodeGen/X86/stack-align.ll | 51 + test/CodeGen/X86/stack-align2.ll | 25 + test/CodeGen/X86/stack-protector-dbginfo.ll | 97 + .../X86/stack-protector-vreg-to-vreg-copy.ll | 61 + test/CodeGen/X86/stack-protector.ll | 3150 + test/CodeGen/X86/stack-update-frame-opcode.ll | 31 + test/CodeGen/X86/stackmap.ll | 292 + test/CodeGen/X86/stdarg.ll | 21 + test/CodeGen/X86/stdcall-notailcall.ll | 13 + test/CodeGen/X86/stdcall.ll | 24 + test/CodeGen/X86/store-empty-member.ll | 14 + test/CodeGen/X86/store-fp-constant.ll | 22 + test/CodeGen/X86/store-global-address.ll | 10 + test/CodeGen/X86/store-narrow.ll | 168 + test/CodeGen/X86/store_op_load_fold.ll | 30 + test/CodeGen/X86/store_op_load_fold2.ll | 30 + test/CodeGen/X86/stores-merging.ll | 23 + test/CodeGen/X86/storetrunc-fp.ll | 8 + test/CodeGen/X86/stride-nine-with-base-reg.ll | 38 + test/CodeGen/X86/stride-reuse.ll | 31 + test/CodeGen/X86/sub-with-overflow.ll | 59 + test/CodeGen/X86/sub.ll | 11 + test/CodeGen/X86/subreg-to-reg-0.ll | 11 + test/CodeGen/X86/subreg-to-reg-1.ll | 16 + test/CodeGen/X86/subreg-to-reg-2.ll | 25 + test/CodeGen/X86/subreg-to-reg-3.ll | 12 + test/CodeGen/X86/subreg-to-reg-4.ll | 135 + test/CodeGen/X86/subreg-to-reg-6.ll | 29 + test/CodeGen/X86/switch-bt.ll | 101 + test/CodeGen/X86/switch-crit-edge-constant.ll | 54 + test/CodeGen/X86/switch-or.ll | 22 + test/CodeGen/X86/switch-order-weight.ll | 37 + test/CodeGen/X86/switch-zextload.ll | 34 + test/CodeGen/X86/swizzle.ll | 19 + test/CodeGen/X86/tail-call-attrs.ll | 56 + test/CodeGen/X86/tail-call-got.ll | 24 + test/CodeGen/X86/tail-call-legality.ll | 32 + test/CodeGen/X86/tail-dup-addr.ll | 28 + test/CodeGen/X86/tail-opts.ll | 433 + test/CodeGen/X86/tail-threshold.ll | 44 + test/CodeGen/X86/tailcall-64.ll | 245 + test/CodeGen/X86/tailcall-calleesave.ll | 19 + test/CodeGen/X86/tailcall-cgp-dup.ll | 87 + test/CodeGen/X86/tailcall-disable.ll | 40 + test/CodeGen/X86/tailcall-fastisel.ll | 18 + test/CodeGen/X86/tailcall-largecode.ll | 71 + test/CodeGen/X86/tailcall-returndup-void.ll | 37 + test/CodeGen/X86/tailcall-ri64.ll | 24 + test/CodeGen/X86/tailcall-stackalign.ll | 23 + test/CodeGen/X86/tailcall-structret.ll | 7 + test/CodeGen/X86/tailcall.ll | 52 + test/CodeGen/X86/tailcallbyval.ll | 21 + test/CodeGen/X86/tailcallbyval64.ll | 42 + test/CodeGen/X86/tailcallfp.ll | 6 + test/CodeGen/X86/tailcallfp2.ll | 27 + test/CodeGen/X86/tailcallpic1.ll | 13 + test/CodeGen/X86/tailcallpic2.ll | 15 + test/CodeGen/X86/tailcallstack64.ll | 28 + test/CodeGen/X86/targetLoweringGeneric.ll | 38 + test/CodeGen/X86/tbm-intrinsics-x86_64.ll | 43 + test/CodeGen/X86/tbm_patterns.ll | 253 + test/CodeGen/X86/test-nofold.ll | 41 + test/CodeGen/X86/test-shrink-bug.ll | 23 + test/CodeGen/X86/test-shrink.ll | 159 + test/CodeGen/X86/testl-commute.ll | 72 + test/CodeGen/X86/this-return-64.ll | 89 + test/CodeGen/X86/tls-local-dynamic.ll | 59 + test/CodeGen/X86/tls-models.ll | 166 + test/CodeGen/X86/tls-pic.ll | 87 + test/CodeGen/X86/tls-pie.ll | 73 + test/CodeGen/X86/tls.ll | 324 + test/CodeGen/X86/tlv-1.ll | 52 + test/CodeGen/X86/tlv-2.ll | 32 + test/CodeGen/X86/tlv-3.ll | 10 + test/CodeGen/X86/trap.ll | 21 + test/CodeGen/X86/trunc-ext-ld-st.ll | 79 + test/CodeGen/X86/trunc-to-bool.ll | 59 + test/CodeGen/X86/twoaddr-coalesce-2.ll | 16 + test/CodeGen/X86/twoaddr-coalesce.ll | 24 + test/CodeGen/X86/twoaddr-lea.ll | 47 + test/CodeGen/X86/twoaddr-pass-sink.ll | 30 + test/CodeGen/X86/twoaddr-sink-terminator.ll | 43 + test/CodeGen/X86/uint64-to-float.ll | 22 + test/CodeGen/X86/uint_to_fp-2.ll | 33 + test/CodeGen/X86/uint_to_fp.ll | 14 + test/CodeGen/X86/umul-with-carry.ll | 26 + test/CodeGen/X86/umul-with-overflow.ll | 38 + test/CodeGen/X86/unaligned-load.ll | 37 + test/CodeGen/X86/unaligned-spill-folding.ll | 49 + test/CodeGen/X86/undef-label.ll | 19 + test/CodeGen/X86/unknown-location.ll | 36 + test/CodeGen/X86/unreachable-loop-sinking.ll | 30 + test/CodeGen/X86/unwind-init.ll | 36 + test/CodeGen/X86/unwindraise.ll | 247 + test/CodeGen/X86/urem-i8-constant.ll | 6 + test/CodeGen/X86/use-add-flags.ll | 57 + test/CodeGen/X86/utf16-cfstrings.ll | 35 + test/CodeGen/X86/utf8.ll | 4 + test/CodeGen/X86/v-binop-widen.ll | 11 + test/CodeGen/X86/v-binop-widen2.ll | 47 + test/CodeGen/X86/v2f32.ll | 115 + test/CodeGen/X86/v4f32-immediate.ll | 7 + test/CodeGen/X86/v4i32load-crash.ll | 27 + test/CodeGen/X86/v8i1-masks.ll | 39 + test/CodeGen/X86/vaargs.ll | 67 + test/CodeGen/X86/vararg_tailcall.ll | 94 + .../X86/variable-sized-darwin-bzero.ll | 8 + test/CodeGen/X86/variadic-node-pic.ll | 11 + test/CodeGen/X86/vastart-defs-eflags.ll | 23 + test/CodeGen/X86/vec-sign.ll | 30 + test/CodeGen/X86/vec-trunc-store.ll | 15 + test/CodeGen/X86/vec_add.ll | 7 + test/CodeGen/X86/vec_align.ll | 35 + test/CodeGen/X86/vec_align_i256.ll | 14 + test/CodeGen/X86/vec_anyext.ll | 77 + test/CodeGen/X86/vec_call.ll | 13 + test/CodeGen/X86/vec_cast.ll | 56 + test/CodeGen/X86/vec_cast2.ll | 49 + test/CodeGen/X86/vec_clear.ll | 13 + test/CodeGen/X86/vec_compare-2.ll | 30 + test/CodeGen/X86/vec_compare-sse4.ll | 35 + test/CodeGen/X86/vec_compare.ll | 223 + test/CodeGen/X86/vec_ctbits.ll | 18 + test/CodeGen/X86/vec_ext_inreg.ll | 37 + test/CodeGen/X86/vec_extract-sse4.ll | 31 + test/CodeGen/X86/vec_extract.ll | 36 + test/CodeGen/X86/vec_fabs.ll | 38 + test/CodeGen/X86/vec_floor.ll | 182 + test/CodeGen/X86/vec_fneg.ll | 11 + test/CodeGen/X86/vec_fpext.ll | 38 + test/CodeGen/X86/vec_i64.ll | 22 + test/CodeGen/X86/vec_ins_extract-1.ll | 25 + test/CodeGen/X86/vec_ins_extract.ll | 52 + test/CodeGen/X86/vec_insert-2.ll | 42 + test/CodeGen/X86/vec_insert-3.ll | 6 + test/CodeGen/X86/vec_insert-4.ll | 11 + test/CodeGen/X86/vec_insert-5.ll | 67 + test/CodeGen/X86/vec_insert-6.ll | 9 + test/CodeGen/X86/vec_insert-7.ll | 15 + test/CodeGen/X86/vec_insert-8.ll | 15 + test/CodeGen/X86/vec_insert-9.ll | 9 + test/CodeGen/X86/vec_insert.ll | 19 + test/CodeGen/X86/vec_loadsingles.ll | 12 + test/CodeGen/X86/vec_logical.ll | 42 + test/CodeGen/X86/vec_return.ll | 16 + test/CodeGen/X86/vec_round.ll | 22 + test/CodeGen/X86/vec_sdiv_to_shift.ll | 80 + test/CodeGen/X86/vec_set-2.ll | 19 + test/CodeGen/X86/vec_set-3.ll | 17 + test/CodeGen/X86/vec_set-4.ll | 24 + test/CodeGen/X86/vec_set-5.ll | 28 + test/CodeGen/X86/vec_set-6.ll | 12 + test/CodeGen/X86/vec_set-7.ll | 11 + test/CodeGen/X86/vec_set-8.ll | 13 + test/CodeGen/X86/vec_set-9.ll | 14 + test/CodeGen/X86/vec_set-A.ll | 7 + test/CodeGen/X86/vec_set-B.ll | 26 + test/CodeGen/X86/vec_set-C.ll | 8 + test/CodeGen/X86/vec_set-D.ll | 9 + test/CodeGen/X86/vec_set-E.ll | 9 + test/CodeGen/X86/vec_set-F.ll | 19 + test/CodeGen/X86/vec_set-G.ll | 9 + test/CodeGen/X86/vec_set-H.ll | 15 + test/CodeGen/X86/vec_set-I.ll | 13 + test/CodeGen/X86/vec_set-J.ll | 10 + test/CodeGen/X86/vec_set.ll | 15 + test/CodeGen/X86/vec_setcc.ll | 187 + test/CodeGen/X86/vec_sext.ll | 69 + test/CodeGen/X86/vec_shift.ll | 34 + test/CodeGen/X86/vec_shift2.ll | 17 + test/CodeGen/X86/vec_shift3.ll | 26 + test/CodeGen/X86/vec_shift4.ll | 25 + test/CodeGen/X86/vec_shuffle-11.ll | 11 + test/CodeGen/X86/vec_shuffle-14.ll | 70 + test/CodeGen/X86/vec_shuffle-15.ll | 81 + test/CodeGen/X86/vec_shuffle-16.ll | 43 + test/CodeGen/X86/vec_shuffle-17.ll | 16 + test/CodeGen/X86/vec_shuffle-18.ll | 25 + test/CodeGen/X86/vec_shuffle-19.ll | 9 + test/CodeGen/X86/vec_shuffle-20.ll | 8 + test/CodeGen/X86/vec_shuffle-22.ll | 15 + test/CodeGen/X86/vec_shuffle-23.ll | 18 + test/CodeGen/X86/vec_shuffle-24.ll | 18 + test/CodeGen/X86/vec_shuffle-25.ll | 34 + test/CodeGen/X86/vec_shuffle-26.ll | 68 + test/CodeGen/X86/vec_shuffle-27.ll | 38 + test/CodeGen/X86/vec_shuffle-28.ll | 14 + test/CodeGen/X86/vec_shuffle-30.ll | 26 + test/CodeGen/X86/vec_shuffle-31.ll | 8 + test/CodeGen/X86/vec_shuffle-34.ll | 7 + test/CodeGen/X86/vec_shuffle-35.ll | 20 + test/CodeGen/X86/vec_shuffle-36.ll | 16 + test/CodeGen/X86/vec_shuffle-37.ll | 47 + test/CodeGen/X86/vec_shuffle-38.ll | 77 + test/CodeGen/X86/vec_shuffle-39.ll | 86 + test/CodeGen/X86/vec_shuffle.ll | 50 + test/CodeGen/X86/vec_splat-2.ll | 33 + test/CodeGen/X86/vec_splat-3.ll | 230 + test/CodeGen/X86/vec_splat.ll | 34 + test/CodeGen/X86/vec_split.ll | 42 + test/CodeGen/X86/vec_ss_load_fold.ll | 86 + test/CodeGen/X86/vec_udiv_to_shift.ll | 15 + test/CodeGen/X86/vec_uint_to_fp.ll | 11 + test/CodeGen/X86/vec_zero-2.ll | 24 + test/CodeGen/X86/vec_zero.ll | 30 + test/CodeGen/X86/vec_zero_cse.ll | 41 + test/CodeGen/X86/vec_zext.ll | 69 + test/CodeGen/X86/vector-gep.ll | 85 + test/CodeGen/X86/vector-intrinsics.ll | 52 + test/CodeGen/X86/vector-rem.ll | 15 + test/CodeGen/X86/vector-variable-idx.ll | 11 + test/CodeGen/X86/vector-variable-idx2.ll | 26 + test/CodeGen/X86/vector.ll | 156 + test/CodeGen/X86/vfcmp.ll | 15 + test/CodeGen/X86/viabs.ll | 183 + test/CodeGen/X86/visibility.ll | 14 + test/CodeGen/X86/visibility2.ll | 18 + test/CodeGen/X86/volatile.ll | 17 + test/CodeGen/X86/vortex-bug.ll | 21 + test/CodeGen/X86/vselect-minmax.ll | 2788 + test/CodeGen/X86/vshift-1.ll | 79 + test/CodeGen/X86/vshift-2.ll | 78 + test/CodeGen/X86/vshift-3.ll | 67 + test/CodeGen/X86/vshift-4.ll | 85 + test/CodeGen/X86/vshift-5.ll | 56 + test/CodeGen/X86/vshift_scalar.ll | 11 + test/CodeGen/X86/vshift_split.ll | 8 + test/CodeGen/X86/vshift_split2.ll | 11 + test/CodeGen/X86/vsplit-and.ll | 25 + test/CodeGen/X86/warn-stack.ll | 24 + test/CodeGen/X86/weak.ll | 4 + test/CodeGen/X86/weak_def_can_be_hidden.ll | 39 + test/CodeGen/X86/wide-fma-contraction.ll | 29 + test/CodeGen/X86/wide-integer-fold.ll | 12 + test/CodeGen/X86/widen_arith-1.ll | 44 + test/CodeGen/X86/widen_arith-2.ll | 59 + test/CodeGen/X86/widen_arith-3.ll | 50 + test/CodeGen/X86/widen_arith-4.ll | 49 + test/CodeGen/X86/widen_arith-5.ll | 50 + test/CodeGen/X86/widen_arith-6.ll | 49 + test/CodeGen/X86/widen_cast-1.ll | 51 + test/CodeGen/X86/widen_cast-2.ll | 46 + test/CodeGen/X86/widen_cast-3.ll | 17 + test/CodeGen/X86/widen_cast-4.ll | 57 + test/CodeGen/X86/widen_cast-5.ll | 12 + test/CodeGen/X86/widen_cast-6.ll | 10 + test/CodeGen/X86/widen_conv-1.ll | 12 + test/CodeGen/X86/widen_conv-2.ll | 12 + test/CodeGen/X86/widen_conv-3.ll | 11 + test/CodeGen/X86/widen_conv-4.ll | 11 + test/CodeGen/X86/widen_extract-1.ll | 12 + test/CodeGen/X86/widen_load-0.ll | 21 + test/CodeGen/X86/widen_load-1.ll | 51 + test/CodeGen/X86/widen_load-2.ll | 186 + test/CodeGen/X86/widen_shuffle-1.ll | 69 + test/CodeGen/X86/win32_sret.ll | 126 + test/CodeGen/X86/win64_alloca_dynalloca.ll | 124 + test/CodeGen/X86/win64_params.ll | 36 + test/CodeGen/X86/win64_vararg.ll | 113 + test/CodeGen/X86/win_chkstk.ll | 60 + test/CodeGen/X86/win_ftol2.ll | 144 + test/CodeGen/X86/x86-64-and-mask.ll | 49 + test/CodeGen/X86/x86-64-arg.ll | 15 + test/CodeGen/X86/x86-64-asm.ll | 12 + test/CodeGen/X86/x86-64-dead-stack-adjust.ll | 12 + test/CodeGen/X86/x86-64-disp.ll | 14 + test/CodeGen/X86/x86-64-extend-shift.ll | 10 + test/CodeGen/X86/x86-64-frameaddr.ll | 15 + test/CodeGen/X86/x86-64-gv-offset.ll | 14 + test/CodeGen/X86/x86-64-jumps.ll | 45 + test/CodeGen/X86/x86-64-mem.ll | 36 + test/CodeGen/X86/x86-64-pic-1.ll | 10 + test/CodeGen/X86/x86-64-pic-10.ll | 14 + test/CodeGen/X86/x86-64-pic-11.ll | 8 + test/CodeGen/X86/x86-64-pic-2.ll | 11 + test/CodeGen/X86/x86-64-pic-3.ll | 17 + test/CodeGen/X86/x86-64-pic-4.ll | 10 + test/CodeGen/X86/x86-64-pic-5.ll | 11 + test/CodeGen/X86/x86-64-pic-6.ll | 11 + test/CodeGen/X86/x86-64-pic-7.ll | 9 + test/CodeGen/X86/x86-64-pic-8.ll | 10 + test/CodeGen/X86/x86-64-pic-9.ll | 13 + test/CodeGen/X86/x86-64-psub.ll | 220 + test/CodeGen/X86/x86-64-ptr-arg-simple.ll | 29 + test/CodeGen/X86/x86-64-ret0.ll | 8 + test/CodeGen/X86/x86-64-shortint.ll | 14 + test/CodeGen/X86/x86-64-sret-return.ll | 73 + test/CodeGen/X86/x86-64-tls-1.ll | 10 + test/CodeGen/X86/x86-64-varargs.ll | 11 + test/CodeGen/X86/x86-frameaddr.ll | 9 + test/CodeGen/X86/x86-frameaddr2.ll | 9 + test/CodeGen/X86/x86-shifts.ll | 192 + test/CodeGen/X86/x86-store-gv-addr.ll | 10 + test/CodeGen/X86/x86_64-mul-by-const.ll | 9 + test/CodeGen/X86/xmm-r64.ll | 12 + test/CodeGen/X86/xmulo.ll | 50 + test/CodeGen/X86/xop-intrinsics-x86_64.ll | 1025 + test/CodeGen/X86/xor-icmp.ll | 67 + test/CodeGen/X86/xor.ll | 183 + test/CodeGen/X86/xtest.ll | 11 + test/CodeGen/X86/zero-remat.ll | 41 + test/CodeGen/X86/zext-extract_subreg.ll | 57 + test/CodeGen/X86/zext-fold.ll | 41 + test/CodeGen/X86/zext-inreg-0.ll | 69 + test/CodeGen/X86/zext-inreg-1.ll | 18 + test/CodeGen/X86/zext-sext.ll | 58 + test/CodeGen/X86/zext-shl.ll | 25 + test/CodeGen/X86/zext-trunc.ll | 13 + test/CodeGen/XCore/2008-11-17-Shl64.ll | 6 + test/CodeGen/XCore/2009-01-08-Crash.ll | 12 + test/CodeGen/XCore/2009-01-14-Remat-Crash.ll | 18 + test/CodeGen/XCore/2009-03-27-v2f64-param.ll | 6 + test/CodeGen/XCore/2009-07-15-store192.ll | 7 + test/CodeGen/XCore/2010-02-25-LSR-Crash.ll | 26 + .../CodeGen/XCore/2011-01-31-DAGCombineBug.ll | 10 + .../XCore/2011-08-01-DynamicAllocBug.ll | 20 + test/CodeGen/XCore/DbgValueOtherTargets.test | 1 + test/CodeGen/XCore/addsub64.ll | 59 + test/CodeGen/XCore/aliases.ll | 34 + test/CodeGen/XCore/alignment.ll | 9 + test/CodeGen/XCore/ashr.ll | 76 + test/CodeGen/XCore/atomic.ll | 16 + test/CodeGen/XCore/basictest.ll | 6 + test/CodeGen/XCore/bigstructret.ll | 43 + test/CodeGen/XCore/byVal.ll | 73 + test/CodeGen/XCore/constants.ll | 19 + test/CodeGen/XCore/epilogue_prologue.ll | 26 + test/CodeGen/XCore/events.ll | 44 + test/CodeGen/XCore/exception.ll | 129 + test/CodeGen/XCore/float-intrinsics.ll | 171 + test/CodeGen/XCore/fneg.ll | 9 + test/CodeGen/XCore/getid.ll | 10 + test/CodeGen/XCore/globals.ll | 96 + test/CodeGen/XCore/indirectbr.ll | 45 + test/CodeGen/XCore/inline-asm.ll | 32 + test/CodeGen/XCore/ladd_lsub_combine.ll | 67 + test/CodeGen/XCore/licm-ldwcp.ll | 18 + test/CodeGen/XCore/linkage.ll | 38 + test/CodeGen/XCore/lit.local.cfg | 4 + test/CodeGen/XCore/load.ll | 50 + test/CodeGen/XCore/misc-intrinsics.ll | 75 + test/CodeGen/XCore/mkmsk.ll | 11 + test/CodeGen/XCore/mul64.ll | 50 + test/CodeGen/XCore/offset_folding.ll | 42 + test/CodeGen/XCore/private.ll | 21 + test/CodeGen/XCore/ps-intrinsics.ll | 18 + test/CodeGen/XCore/resources.ll | 241 + test/CodeGen/XCore/scavenging.ll | 52 + test/CodeGen/XCore/sext.ll | 32 + test/CodeGen/XCore/shedulingPreference.ll | 25 + test/CodeGen/XCore/sr-intrinsics.ll | 18 + test/CodeGen/XCore/store.ll | 37 + test/CodeGen/XCore/switch.ll | 24 + test/CodeGen/XCore/switch_long.ll | 132 + test/CodeGen/XCore/threads.ll | 145 + test/CodeGen/XCore/tls.ll | 20 + test/CodeGen/XCore/trampoline.ll | 39 + test/CodeGen/XCore/trap.ll | 12 + test/CodeGen/XCore/unaligned_load.ll | 34 + test/CodeGen/XCore/unaligned_store.ll | 20 + test/CodeGen/XCore/unaligned_store_combine.ll | 13 + test/CodeGen/XCore/varargs.ll | 55 + test/CodeGen/XCore/zext.ll | 10 + test/CodeGen/XCore/zextfree.ll | 15 + test/DebugInfo/2009-10-16-Phi.ll | 13 + .../2009-11-03-InsertExtractValue.ll | 23 + .../2009-11-05-DeadGlobalVariable.ll | 28 + .../2009-11-06-NamelessGlobalVariable.ll | 14 + test/DebugInfo/2009-11-10-CurrentFn.ll | 31 + test/DebugInfo/2010-01-05-DbgScope.ll | 25 + test/DebugInfo/2010-01-19-DbgScope.ll | 35 + test/DebugInfo/2010-03-12-llc-crash.ll | 22 + test/DebugInfo/2010-03-19-DbgDeclare.ll | 19 + test/DebugInfo/2010-03-24-MemberFn.ll | 70 + .../2010-03-30-InvalidDbgInfoCrash.ll | 36 + test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll | 96 + test/DebugInfo/2010-04-19-FramePtr.ll | 37 + test/DebugInfo/2010-05-03-DisableFramePtr.ll | 40 + test/DebugInfo/2010-05-03-OriginDIE.ll | 94 + test/DebugInfo/2010-05-10-MultipleCU.ll | 53 + .../DebugInfo/2010-06-29-InlinedFnLocalVar.ll | 55 + test/DebugInfo/2010-07-19-Crash.ll | 30 + test/DebugInfo/2010-10-01-crash.ll | 26 + test/DebugInfo/AArch64/cfi-frame.ll | 58 + test/DebugInfo/AArch64/dwarfdump.ll | 36 + test/DebugInfo/AArch64/eh_frame.s | 48 + .../DebugInfo/AArch64/eh_frame_personality.ll | 46 + test/DebugInfo/AArch64/lit.local.cfg | 4 + test/DebugInfo/AArch64/variable-loc.ll | 101 + test/DebugInfo/ARM/PR16736.ll | 65 + test/DebugInfo/ARM/lit.local.cfg | 4 + test/DebugInfo/ARM/lowerbdgdeclare_vla.ll | 103 + test/DebugInfo/ARM/selectiondag-deadcode.ll | 27 + test/DebugInfo/Inputs/dwarfdump-inl-test.cc | 18 + .../Inputs/dwarfdump-inl-test.elf-x86-64 | Bin 0 -> 9024 bytes test/DebugInfo/Inputs/dwarfdump-inl-test.h | 9 + .../dwarfdump-inl-test.high_pc.elf-x86-64 | Bin 0 -> 7422 bytes test/DebugInfo/Inputs/dwarfdump-pubnames.cc | 32 + .../Inputs/dwarfdump-pubnames.elf-x86-64 | Bin 0 -> 5280 bytes .../Inputs/dwarfdump-test-32bit.elf.c | 14 + .../Inputs/dwarfdump-test-32bit.elf.o | Bin 0 -> 2432 bytes .../dwarfdump-test-loc-list-32bit.elf.cpp | 13 + .../dwarfdump-test-loc-list-32bit.elf.o | Bin 0 -> 2604 bytes test/DebugInfo/Inputs/dwarfdump-test-zlib.cc | 24 + .../Inputs/dwarfdump-test-zlib.elf-x86-64 | Bin 0 -> 9589 bytes test/DebugInfo/Inputs/dwarfdump-test.cc | 23 + .../Inputs/dwarfdump-test.elf-x86-64 | Bin 0 -> 9640 bytes .../dwarfdump-test.elf-x86-64.debuglink | Bin 0 -> 8668 bytes .../Inputs/dwarfdump-test2-helper.cc | 3 + test/DebugInfo/Inputs/dwarfdump-test2-main.cc | 11 + .../Inputs/dwarfdump-test2.elf-x86-64 | Bin 0 -> 9160 bytes test/DebugInfo/Inputs/dwarfdump-test3-decl.h | 7 + test/DebugInfo/Inputs/dwarfdump-test3-decl2.h | 1 + test/DebugInfo/Inputs/dwarfdump-test3.cc | 12 + .../Inputs/dwarfdump-test3.elf-x86-64 space | Bin 0 -> 8944 bytes test/DebugInfo/Inputs/dwarfdump-test4-decl.h | 1 + .../DebugInfo/Inputs/dwarfdump-test4-part1.cc | 8 + .../DebugInfo/Inputs/dwarfdump-test4-part2.cc | 2 + .../Inputs/dwarfdump-test4.elf-x86-64 | Bin 0 -> 9368 bytes test/DebugInfo/Inputs/dwarfdump-type-units.cc | 15 + .../Inputs/dwarfdump-type-units.elf-x86-64 | Bin 0 -> 3928 bytes test/DebugInfo/Inputs/macho-universal | Bin 0 -> 16660 bytes test/DebugInfo/Inputs/macho-universal.cc | 10 + test/DebugInfo/Inputs/test-inline.o | Bin 0 -> 6040 bytes test/DebugInfo/Inputs/test-parameters.o | Bin 0 -> 5792 bytes test/DebugInfo/PowerPC/lit.local.cfg | 3 + test/DebugInfo/PowerPC/tls-fission.ll | 32 + test/DebugInfo/PowerPC/tls.ll | 29 + test/DebugInfo/SystemZ/eh_frame.s | 54 + .../DebugInfo/SystemZ/eh_frame_personality.ll | 45 + test/DebugInfo/SystemZ/eh_frame_personality.s | 67 + test/DebugInfo/SystemZ/lit.local.cfg | 4 + test/DebugInfo/SystemZ/variable-loc.ll | 87 + test/DebugInfo/SystemZ/variable-loc.s | 340 + test/DebugInfo/X86/2010-04-13-PubType.ll | 54 + test/DebugInfo/X86/2010-08-10-DbgConstant.ll | 30 + .../X86/2011-09-26-GlobalVarContext.ll | 51 + test/DebugInfo/X86/2011-12-16-BadStructRef.ll | 172 + test/DebugInfo/X86/DW_AT_byte_size.ll | 48 + .../DebugInfo/X86/DW_AT_location-reference.ll | 112 + test/DebugInfo/X86/DW_AT_object_pointer.ll | 89 + test/DebugInfo/X86/DW_AT_specification.ll | 45 + .../X86/DW_AT_stmt_list_sec_offset.ll | 41 + test/DebugInfo/X86/DW_TAG_friend.ll | 48 + test/DebugInfo/X86/aligned_stack_var.ll | 43 + test/DebugInfo/X86/arguments.ll | 73 + test/DebugInfo/X86/block-capture.ll | 127 + test/DebugInfo/X86/byvalstruct.ll | 127 + test/DebugInfo/X86/coff_relative_names.ll | 41 + test/DebugInfo/X86/concrete_out_of_line.ll | 90 + test/DebugInfo/X86/data_member_location.ll | 44 + test/DebugInfo/X86/dbg-at-specficiation.ll | 21 + test/DebugInfo/X86/dbg-byval-parameter.ll | 52 + test/DebugInfo/X86/dbg-const-int.ll | 37 + test/DebugInfo/X86/dbg-const.ll | 51 + test/DebugInfo/X86/dbg-declare-arg.ll | 127 + test/DebugInfo/X86/dbg-declare.ll | 58 + test/DebugInfo/X86/dbg-file-name.ll | 24 + test/DebugInfo/X86/dbg-i128-const.ll | 34 + .../DebugInfo/X86/dbg-large-unsigned-const.ll | 62 + test/DebugInfo/X86/dbg-merge-loc-entry.ll | 75 + test/DebugInfo/X86/dbg-prolog-end.ll | 59 + test/DebugInfo/X86/dbg-subrange.ll | 37 + test/DebugInfo/X86/dbg-value-dag-combine.ll | 49 + .../X86/dbg-value-inlined-parameter.ll | 91 + test/DebugInfo/X86/dbg-value-isel.ll | 106 + test/DebugInfo/X86/dbg-value-location.ll | 77 + test/DebugInfo/X86/dbg-value-range.ll | 63 + test/DebugInfo/X86/dbg-value-terminator.ll | 133 + test/DebugInfo/X86/dbg_value_direct.ll | 177 + .../X86/debug-info-block-captured-self.ll | 108 + test/DebugInfo/X86/debug-info-blocks.ll | 375 + .../DebugInfo/X86/debug-info-static-member.ll | 256 + test/DebugInfo/X86/debug_frame.ll | 22 + .../X86/dwarf-aranges-no-dwarf-labels.ll | 89 + test/DebugInfo/X86/dwarf-aranges.ll | 87 + test/DebugInfo/X86/dwarf-public-names.ll | 132 + test/DebugInfo/X86/dwarf-pubnames-split.ll | 38 + test/DebugInfo/X86/earlydup-crash.ll | 94 + test/DebugInfo/X86/eh_symbol.ll | 24 + test/DebugInfo/X86/elf-names.ll | 114 + .../DebugInfo/X86/empty-and-one-elem-array.ll | 100 + test/DebugInfo/X86/empty-array.ll | 49 + test/DebugInfo/X86/ending-run.ll | 50 + test/DebugInfo/X86/enum-class.ll | 45 + test/DebugInfo/X86/enum-fwd-decl.ll | 21 + test/DebugInfo/X86/fission-cu.ll | 114 + test/DebugInfo/X86/fission-hash.ll | 16 + test/DebugInfo/X86/fission-ranges.ll | 151 + test/DebugInfo/X86/generate-odr-hash.ll | 196 + test/DebugInfo/X86/gnu-public-names-empty.ll | 19 + test/DebugInfo/X86/gnu-public-names.ll | 219 + test/DebugInfo/X86/instcombine-instrinsics.ll | 102 + test/DebugInfo/X86/line-info.ll | 60 + test/DebugInfo/X86/linkage-name.ll | 56 + test/DebugInfo/X86/lit.local.cfg | 3 + test/DebugInfo/X86/low-pc-cu.ll | 32 + test/DebugInfo/X86/main-file-name.s | 17 + test/DebugInfo/X86/misched-dbg-value.ll | 173 + test/DebugInfo/X86/multiple-aranges.ll | 66 + test/DebugInfo/X86/multiple-at-const-val.ll | 63 + .../X86/nondefault-subrange-array.ll | 52 + test/DebugInfo/X86/objc-fwd-decl.ll | 27 + test/DebugInfo/X86/op_deref.ll | 97 + test/DebugInfo/X86/parameters.ll | 116 + test/DebugInfo/X86/pointer-type-size.ll | 26 + test/DebugInfo/X86/pr11300.ll | 69 + test/DebugInfo/X86/pr12831.ll | 240 + test/DebugInfo/X86/pr13303.ll | 29 + test/DebugInfo/X86/pr9951.ll | 27 + test/DebugInfo/X86/prologue-stack.ll | 36 + test/DebugInfo/X86/ref_addr_relocation.ll | 71 + test/DebugInfo/X86/reference-argument.ll | 103 + test/DebugInfo/X86/rvalue-ref.ll | 41 + .../X86/stmt-list-multiple-compile-units.ll | 74 + test/DebugInfo/X86/stmt-list.ll | 23 + test/DebugInfo/X86/stringpool.ll | 43 + test/DebugInfo/X86/struct-loc.ll | 27 + test/DebugInfo/X86/subrange-type.ll | 40 + test/DebugInfo/X86/subreg.ll | 33 + test/DebugInfo/X86/template.ll | 126 + test/DebugInfo/X86/tls-fission.ll | 32 + test/DebugInfo/X86/tls.ll | 35 + test/DebugInfo/X86/union-template.ll | 60 + test/DebugInfo/X86/vector.ll | 30 + test/DebugInfo/X86/vla.ll | 107 + test/DebugInfo/array.ll | 39 + test/DebugInfo/bug_null_debuginfo.ll | 8 + test/DebugInfo/debuginfofinder-multiple-cu.ll | 41 + test/DebugInfo/debuglineinfo.test | 49 + test/DebugInfo/dwarf-public-names.ll | 129 + .../dwarfdump-debug-frame-simple.test | 28 + .../DebugInfo/dwarfdump-debug-loc-simple.test | 26 + test/DebugInfo/dwarfdump-dump-flags.test | 13 + test/DebugInfo/dwarfdump-inlining.test | 28 + test/DebugInfo/dwarfdump-pubnames.test | 14 + test/DebugInfo/dwarfdump-test.test | 56 + test/DebugInfo/dwarfdump-type-units.test | 32 + test/DebugInfo/dwarfdump-zlib.test | 12 + test/DebugInfo/enum.ll | 80 + test/DebugInfo/global.ll | 39 + test/DebugInfo/inheritance.ll | 154 + test/DebugInfo/inline-debug-info-multiret.ll | 156 + test/DebugInfo/inline-debug-info.ll | 174 + test/DebugInfo/inlined-arguments.ll | 77 + test/DebugInfo/inlined-vars.ll | 56 + test/DebugInfo/llvm-symbolizer.test | 59 + test/DebugInfo/member-order.ll | 66 + test/DebugInfo/member-pointers.ll | 40 + test/DebugInfo/namespace.ll | 252 + test/DebugInfo/template-recursive-void.ll | 65 + test/DebugInfo/tu-composite.ll | 185 + test/DebugInfo/tu-member-pointer.ll | 30 + test/DebugInfo/two-cus-from-same-file.ll | 74 + test/DebugInfo/version.ll | 32 + test/ExecutionEngine/2002-12-16-ArgTest.ll | 38 + .../ExecutionEngine/2003-01-04-ArgumentBug.ll | 14 + test/ExecutionEngine/2003-01-04-LoopTest.ll | 21 + test/ExecutionEngine/2003-01-04-PhiTest.ll | 12 + test/ExecutionEngine/2003-01-09-SARTest.ll | 11 + test/ExecutionEngine/2003-01-10-FUCOM.ll | 10 + .../2003-01-15-AlignmentTest.ll | 18 + .../2003-05-06-LivenessClobber.ll | 20 + .../2003-05-07-ArgumentTest.ll | 12 + .../2003-05-11-PHIRegAllocBug.ll | 15 + test/ExecutionEngine/2003-06-04-bzip2-bug.ll | 19 + test/ExecutionEngine/2003-06-05-PHIBug.ll | 17 + .../2003-08-15-AllocaAssertion.ll | 12 + .../2003-08-21-EnvironmentTest.ll | 22 + .../2003-08-23-RegisterAllocatePhysReg.ll | 35 + ...8-PHINode-ConstantExpr-CondCode-Failure.ll | 24 + .../ExecutionEngine/2005-12-02-TailCallBug.ll | 22 + .../2007-12-10-APIntLoadStore.ll | 19 + .../2008-06-05-APInt-OverAShr.ll | 60 + test/ExecutionEngine/2010-01-15-UndefValue.ll | 8 + .../MCJIT/2002-12-16-ArgTest.ll | 37 + .../MCJIT/2003-01-04-ArgumentBug.ll | 13 + .../MCJIT/2003-01-04-LoopTest.ll | 20 + .../MCJIT/2003-01-04-PhiTest.ll | 12 + .../MCJIT/2003-01-09-SARTest.ll | 11 + .../ExecutionEngine/MCJIT/2003-01-10-FUCOM.ll | 10 + .../MCJIT/2003-01-15-AlignmentTest.ll | 17 + .../MCJIT/2003-05-06-LivenessClobber.ll | 19 + .../MCJIT/2003-05-07-ArgumentTest.ll | 11 + .../MCJIT/2003-05-11-PHIRegAllocBug.ll | 15 + .../MCJIT/2003-06-04-bzip2-bug.ll | 19 + .../MCJIT/2003-06-05-PHIBug.ll | 17 + .../MCJIT/2003-08-15-AllocaAssertion.ll | 11 + .../MCJIT/2003-08-21-EnvironmentTest.ll | 21 + .../2003-08-23-RegisterAllocatePhysReg.ll | 34 + ...8-PHINode-ConstantExpr-CondCode-Failure.ll | 23 + .../MCJIT/2005-12-02-TailCallBug.ll | 22 + .../MCJIT/2007-12-10-APIntLoadStore.ll | 19 + .../MCJIT/2008-06-05-APInt-OverAShr.ll | 60 + .../MCJIT/2010-01-15-UndefValue.ll | 8 + .../MCJIT/2013-04-04-RelocAddend.ll | 25 + .../MCJIT/Inputs/cross-module-b.ll | 7 + .../MCJIT/Inputs/multi-module-b.ll | 7 + .../MCJIT/Inputs/multi-module-c.ll | 4 + .../MCJIT/Inputs/multi-module-eh-b.ll | 30 + test/ExecutionEngine/MCJIT/cross-module-a.ll | 13 + .../MCJIT/cross-module-sm-pic-a.ll | 14 + test/ExecutionEngine/MCJIT/eh-lg-pic.ll | 32 + test/ExecutionEngine/MCJIT/eh-sm-pic.ll | 32 + test/ExecutionEngine/MCJIT/eh.ll | 32 + test/ExecutionEngine/MCJIT/fpbitcast.ll | 21 + test/ExecutionEngine/MCJIT/hello-sm-pic.ll | 12 + test/ExecutionEngine/MCJIT/hello.ll | 11 + test/ExecutionEngine/MCJIT/hello2.ll | 17 + test/ExecutionEngine/MCJIT/lit.local.cfg | 26 + test/ExecutionEngine/MCJIT/multi-module-a.ll | 9 + .../MCJIT/multi-module-eh-a.ll | 35 + .../MCJIT/multi-module-sm-pic-a.ll | 10 + .../MCJIT/non-extern-addend.ll | 12 + test/ExecutionEngine/MCJIT/pr13727.ll | 88 + .../MCJIT/remote/Inputs/cross-module-b.ll | 7 + .../MCJIT/remote/Inputs/multi-module-b.ll | 7 + .../MCJIT/remote/Inputs/multi-module-c.ll | 4 + .../MCJIT/remote/cross-module-a.ll | 13 + .../MCJIT/remote/cross-module-sm-pic-a.ll | 14 + .../MCJIT/remote/lit.local.cfg | 3 + .../MCJIT/remote/multi-module-a.ll | 9 + .../MCJIT/remote/multi-module-sm-pic-a.ll | 10 + .../MCJIT/remote/simpletest-remote.ll | 10 + .../MCJIT/remote/stubs-remote.ll | 37 + .../MCJIT/remote/stubs-sm-pic.ll | 37 + .../remote/test-common-symbols-remote.ll | 88 + .../MCJIT/remote/test-data-align-remote.ll | 15 + .../test-fp-no-external-funcs-remote.ll | 20 + .../remote/test-global-init-nonzero-remote.ll | 34 + .../remote/test-global-init-nonzero-sm-pic.ll | 35 + .../MCJIT/remote/test-ptr-reloc-remote.ll | 15 + .../MCJIT/remote/test-ptr-reloc-sm-pic.ll | 17 + test/ExecutionEngine/MCJIT/simplesttest.ll | 6 + test/ExecutionEngine/MCJIT/simpletest.ll | 11 + test/ExecutionEngine/MCJIT/stubs-sm-pic.ll | 36 + test/ExecutionEngine/MCJIT/stubs.ll | 35 + test/ExecutionEngine/MCJIT/test-arith.ll | 34 + test/ExecutionEngine/MCJIT/test-branch.ll | 12 + .../MCJIT/test-call-no-external-funcs.ll | 14 + test/ExecutionEngine/MCJIT/test-call.ll | 21 + test/ExecutionEngine/MCJIT/test-cast.ll | 109 + .../MCJIT/test-common-symbols-alignment.ll | 32 + .../MCJIT/test-common-symbols.ll | 88 + .../MCJIT/test-constantexpr.ll | 12 + test/ExecutionEngine/MCJIT/test-data-align.ll | 15 + .../MCJIT/test-fp-no-external-funcs.ll | 21 + test/ExecutionEngine/MCJIT/test-fp.ll | 23 + .../MCJIT/test-global-ctors.ll | 22 + .../MCJIT/test-global-init-nonzero-sm-pic.ll | 35 + .../MCJIT/test-global-init-nonzero.ll | 34 + test/ExecutionEngine/MCJIT/test-global.ll | 34 + test/ExecutionEngine/MCJIT/test-loadstore.ll | 31 + test/ExecutionEngine/MCJIT/test-local.ll | 34 + test/ExecutionEngine/MCJIT/test-logical.ll | 18 + test/ExecutionEngine/MCJIT/test-loop.ll | 14 + test/ExecutionEngine/MCJIT/test-phi.ll | 34 + .../MCJIT/test-ptr-reloc-sm-pic.ll | 17 + test/ExecutionEngine/MCJIT/test-ptr-reloc.ll | 16 + test/ExecutionEngine/MCJIT/test-ret.ll | 46 + test/ExecutionEngine/MCJIT/test-return.ll | 8 + test/ExecutionEngine/MCJIT/test-setcond-fp.ll | 24 + .../ExecutionEngine/MCJIT/test-setcond-int.ll | 69 + test/ExecutionEngine/MCJIT/test-shift.ll | 32 + .../RuntimeDyld/Inputs/arm_secdiff_reloc.o | Bin 0 -> 616 bytes .../RuntimeDyld/arm_secdiff_reloc.test | 1 + test/ExecutionEngine/fma3-jit.ll | 18 + test/ExecutionEngine/fpbitcast.ll | 21 + test/ExecutionEngine/hello.ll | 12 + test/ExecutionEngine/hello2.ll | 18 + test/ExecutionEngine/lit.local.cfg | 9 + test/ExecutionEngine/mov64zext32.ll | 18 + test/ExecutionEngine/simplesttest.ll | 6 + test/ExecutionEngine/simpletest.ll | 12 + test/ExecutionEngine/stubs.ll | 36 + test/ExecutionEngine/test-arith.ll | 34 + test/ExecutionEngine/test-branch.ll | 12 + .../test-call-no-external-funcs.ll | 15 + test/ExecutionEngine/test-call.ll | 22 + test/ExecutionEngine/test-cast.ll | 109 + test/ExecutionEngine/test-common-symbols.ll | 89 + test/ExecutionEngine/test-constantexpr.ll | 12 + .../test-fp-no-external-funcs.ll | 22 + test/ExecutionEngine/test-fp.ll | 24 + .../test-global-init-nonzero.ll | 35 + test/ExecutionEngine/test-global.ll | 35 + .../test-interp-vec-arithm_float.ll | 20 + .../test-interp-vec-arithm_int.ll | 37 + test/ExecutionEngine/test-interp-vec-cast.ll | 146 + .../test-interp-vec-insertelement.ll | 41 + .../test-interp-vec-insertextractvalue.ll | 21 + .../test-interp-vec-loadstore.ll | 169 + .../test-interp-vec-logical.ll | 22 + .../ExecutionEngine/test-interp-vec-select.ll | 118 + .../test-interp-vec-setcond-fp.ll | 25 + .../test-interp-vec-setcond-int.ll | 69 + test/ExecutionEngine/test-interp-vec-shift.ll | 32 + .../test-interp-vec-shuffle.ll | 81 + test/ExecutionEngine/test-loadstore.ll | 32 + test/ExecutionEngine/test-local.ll | 35 + test/ExecutionEngine/test-logical.ll | 18 + test/ExecutionEngine/test-loop.ll | 14 + test/ExecutionEngine/test-phi.ll | 34 + test/ExecutionEngine/test-ret.ll | 46 + test/ExecutionEngine/test-return.ll | 8 + test/ExecutionEngine/test-setcond-fp.ll | 24 + test/ExecutionEngine/test-setcond-int.ll | 69 + test/ExecutionEngine/test-shift.ll | 32 + test/Feature/NamedMDNode.ll | 9 + test/Feature/NamedMDNode2.ll | 7 + test/Feature/README.txt | 6 + test/Feature/aliases.ll | 34 + test/Feature/alignment.ll | 16 + test/Feature/attributes.ll | 15 + test/Feature/basictest.ll | 31 + test/Feature/callingconventions.ll | 55 + test/Feature/calltest.ll | 34 + test/Feature/casttest.ll | 12 + test/Feature/cfgstructures.ll | 53 + test/Feature/cold.ll | 9 + test/Feature/const_pv.ll | 8 + test/Feature/constexpr.ll | 80 + test/Feature/constpointer.ll | 31 + test/Feature/escaped_label.ll | 11 + test/Feature/exception.ll | 27 + test/Feature/float.ll | 7 + test/Feature/fold-fpcast.ll | 18 + test/Feature/forwardreftest.ll | 29 + test/Feature/global_pv.ll | 14 + test/Feature/global_section.ll | 10 + test/Feature/globalredefinition3.ll | 4 + test/Feature/globalvars.ll | 18 + test/Feature/indirectcall.ll | 49 + test/Feature/indirectcall2.ll | 22 + test/Feature/inlineasm.ll | 13 + test/Feature/instructions.ll | 24 + test/Feature/intrinsics.ll | 74 + test/Feature/linker_private_linkages.ll | 6 + test/Feature/load_module.ll | 12 + test/Feature/md_on_instruction.ll | 27 + test/Feature/memorymarkers.ll | 36 + test/Feature/metadata.ll | 17 + test/Feature/minsize_attr.ll | 8 + test/Feature/newcasts.ll | 36 + test/Feature/optnone.ll | 12 + test/Feature/packed.ll | 15 + test/Feature/packed_struct.ll | 33 + test/Feature/paramattrs.ll | 24 + test/Feature/ppcld.ll | 26 + test/Feature/prefixdata.ll | 18 + test/Feature/properties.ll | 6 + test/Feature/prototype.ll | 11 + test/Feature/recursivetype.ll | 103 + test/Feature/simplecalltest.ll | 24 + test/Feature/small.ll | 11 + test/Feature/smallest.ll | 4 + test/Feature/sparcld.ll | 24 + test/Feature/terminators.ll | 43 + test/Feature/testalloca.ll | 22 + test/Feature/testconstants.ll | 29 + test/Feature/testlogical.ll | 11 + test/Feature/testtype.ll | 21 + test/Feature/testvarargs.ll | 12 + test/Feature/undefined.ll | 17 + test/Feature/unreachable.ll | 15 + test/Feature/varargs.ll | 29 + test/Feature/varargs_new.ll | 38 + test/Feature/vector-cast-constant-exprs.ll | 37 + test/Feature/weak_constant.ll | 38 + test/Feature/weirdnames.ll | 9 + test/Feature/x86ld.ll | 26 + test/FileCheck/check-a-b-has-b.txt | 5 + test/FileCheck/check-b-a-has-b.txt | 5 + test/FileCheck/check-dag-multi-prefix-2.txt | 7 + test/FileCheck/check-dag-multi-prefix.txt | 27 + test/FileCheck/check-dag-substring-prefix.txt | 7 + test/FileCheck/check-dag-xfails.txt | 85 + test/FileCheck/check-dag.txt | 26 + test/FileCheck/check-label-dag-capture.txt | 11 + test/FileCheck/check-label-dag.txt | 11 + test/FileCheck/check-label.txt | 51 + test/FileCheck/check-multi-prefix-label.txt | 6 + .../check-multiple-prefixes-mixed.txt | 10 + .../check-multiple-prefixes-nomatch.txt | 10 + .../check-multiple-prefixes-substr.txt | 5 + test/FileCheck/check-not-diaginfo.txt | 7 + test/FileCheck/check-prefixes.txt | 9 + .../check-substring-multi-prefix-2.txt | 11 + .../check-substring-multi-prefix.txt | 9 + test/FileCheck/dos-style-eol.txt | 11 + test/FileCheck/first-character-match.txt | 2 + test/FileCheck/line-count-2.txt | 11 + test/FileCheck/line-count.txt | 15 + test/FileCheck/multiple-missing-prefixes.txt | 9 + test/FileCheck/next-no-match.txt | 9 + test/FileCheck/regex-brackets.txt | 7 + test/FileCheck/regex-no-match.txt | 5 + test/FileCheck/separate-multi-prefix.txt | 7 + test/FileCheck/simple-var-capture.txt | 13 + test/FileCheck/two-checks-for-same-match.txt | 8 + test/FileCheck/validate-check-prefix.txt | 9 + test/FileCheck/var-ref-same-line.txt | 16 + .../AddressSanitizer/X86/bug_11395.ll | 73 + .../AddressSanitizer/X86/lit.local.cfg | 4 + .../adaptive_global_redzones.ll | 57 + .../AddressSanitizer/asan-vs-gvn.ll | 56 + .../Instrumentation/AddressSanitizer/basic.ll | 161 + .../AddressSanitizer/coverage.ll | 13 + .../AddressSanitizer/debug_info.ll | 61 + .../different_scale_and_offset.ll | 41 + .../do-not-instrument-internal-globals.ll | 20 + .../do-not-touch-odr-global.ll | 6 + .../do-not-touch-threadlocal.ll | 6 + .../AddressSanitizer/instrument-no-return.ll | 49 + .../AddressSanitizer/instrument_global.ll | 81 + .../instrument_initializer_metadata.ll | 77 + .../instrument_load_then_store.ll | 25 + .../keep-instrumented_functions.ll | 23 + .../AddressSanitizer/lifetime-uar.ll | 33 + .../AddressSanitizer/lifetime.ll | 84 + .../AddressSanitizer/test64.ll | 36 + .../BoundsChecking/many-trap.ll | 16 + test/Instrumentation/BoundsChecking/phi.ll | 52 + .../BoundsChecking/simple-32.ll | 29 + test/Instrumentation/BoundsChecking/simple.ll | 145 + .../DataFlowSanitizer/Inputs/abilist.txt | 8 + .../DataFlowSanitizer/abilist.ll | 75 + .../DataFlowSanitizer/args-unreachable-bb.ll | 30 + .../DataFlowSanitizer/arith.ll | 63 + .../Instrumentation/DataFlowSanitizer/call.ll | 23 + .../DataFlowSanitizer/debug-nonzero-labels.ll | 23 + .../Instrumentation/DataFlowSanitizer/load.ll | 81 + .../DataFlowSanitizer/memset.ll | 11 + .../DataFlowSanitizer/prefix-rename.ll | 14 + .../DataFlowSanitizer/store.ll | 75 + .../MemorySanitizer/X86/vararg.ll | 15 + .../MemorySanitizer/atomics.ll | 189 + .../MemorySanitizer/msan_basic.ll | 803 + .../MemorySanitizer/return_from_main.ll | 18 + .../MemorySanitizer/unreachable.ll | 39 + .../MemorySanitizer/vector_cvt.ll | 66 + .../MemorySanitizer/wrap_indirect_calls.ll | 34 + .../Instrumentation/ThreadSanitizer/atomic.ll | 1987 + .../ThreadSanitizer/no_sanitize_thread.ll | 36 + .../ThreadSanitizer/read_before_write.ll | 32 + .../ThreadSanitizer/read_from_global.ll | 59 + .../ThreadSanitizer/tsan-vs-gvn.ll | 26 + .../ThreadSanitizer/tsan_basic.ll | 55 + .../ThreadSanitizer/vptr_read.ll | 13 + .../ThreadSanitizer/vptr_update.ll | 13 + test/Integer/2007-01-19-TruncSext.ll | 30 + test/Integer/BitPacked.ll | 21 + test/Integer/basictest_bt.ll | 31 + test/Integer/constexpr_bt.ll | 84 + test/Integer/constpointer_bt.ll | 32 + test/Integer/fold-fpcast_bt.ll | 34 + test/Integer/instructions_bt.ll | 26 + test/Integer/newcasts_bt.ll | 28 + test/Integer/packed_bt.ll | 16 + test/Integer/packed_struct_bt.ll | 33 + test/Integer/properties_bt.ll | 7 + test/Integer/undefined_bt.ll | 18 + test/Integer/unreachable_bt.ll | 16 + test/JitListener/lit.local.cfg | 3 + test/JitListener/test-common-symbols.ll | 113 + test/JitListener/test-inline.ll | 212 + test/JitListener/test-parameters.ll | 211 + test/LTO/cfi_endproc.ll | 37 + test/LTO/linkonce_odr_func.ll | 45 + test/LTO/lit.local.cfg | 3 + test/LTO/runtime-library.ll | 27 + test/Linker/2002-07-17-GlobalFail.ll | 8 + test/Linker/2002-07-17-LinkTest2.ll | 10 + test/Linker/2002-08-20-ConstantExpr.ll | 9 + test/Linker/2003-01-30-LinkerRename.ll | 10 + test/Linker/2003-01-30-LinkerTypeRename.ll | 11 + test/Linker/2003-04-23-LinkOnceLost.ll | 11 + test/Linker/2003-04-26-NullPtrLinkProblem.ll | 17 + test/Linker/2003-05-15-TypeProblem.ll | 10 + test/Linker/2003-05-31-LinkerRename.ll | 18 + test/Linker/2003-06-02-TypeResolveProblem.ll | 7 + test/Linker/2003-06-02-TypeResolveProblem2.ll | 7 + test/Linker/2003-08-20-OpaqueTypeResolve.ll | 8 + test/Linker/2003-08-23-GlobalVarLinking.ll | 11 + .../2003-08-23-RecursiveOpaqueTypeResolve.ll | 10 + test/Linker/2003-08-24-InheritPtrSize.ll | 10 + test/Linker/2003-08-28-TypeResolvesGlobal.ll | 12 + test/Linker/2003-08-28-TypeResolvesGlobal2.ll | 18 + test/Linker/2003-08-28-TypeResolvesGlobal3.ll | 15 + test/Linker/2003-10-27-LinkOncePromote.ll | 8 + test/Linker/2003-11-18-TypeResolution.ll | 20 + test/Linker/2004-02-17-WeakStrongLinkage.ll | 7 + test/Linker/2004-05-07-TypeResolution1.ll | 35 + test/Linker/2004-05-07-TypeResolution2.ll | 15 + test/Linker/2004-12-03-DisagreeingType.ll | 10 + test/Linker/2005-02-12-ConstantGlobals-2.ll | 9 + test/Linker/2005-02-12-ConstantGlobals.ll | 9 + .../2005-12-06-AppendingZeroLengthArrays.ll | 11 + test/Linker/2006-01-19-ConstantPacked.ll | 10 + test/Linker/2006-06-15-GlobalVarAlignment.ll | 8 + test/Linker/2008-03-05-AliasReference.ll | 17 + test/Linker/2008-03-05-AliasReference2.ll | 11 + test/Linker/2008-03-07-DroppedSection_a.ll | 12 + test/Linker/2008-03-07-DroppedSection_b.ll | 11 + .../Linker/2008-06-13-LinkOnceRedefinition.ll | 8 + test/Linker/2008-06-26-AddressSpace.ll | 10 + test/Linker/2008-07-06-AliasFnDecl.ll | 14 + test/Linker/2008-07-06-AliasFnDecl2.ll | 13 + test/Linker/2008-07-06-AliasWeakDest.ll | 18 + test/Linker/2008-07-06-AliasWeakDest2.ll | 18 + test/Linker/2009-09-03-mdnode.ll | 30 + test/Linker/2009-09-03-mdnode2.ll | 25 + test/Linker/2011-08-04-DebugLoc.ll | 31 + test/Linker/2011-08-04-DebugLoc2.ll | 28 + test/Linker/2011-08-04-Metadata.ll | 33 + test/Linker/2011-08-04-Metadata2.ll | 33 + test/Linker/2011-08-18-unique-class-type.ll | 40 + test/Linker/2011-08-18-unique-class-type2.ll | 38 + test/Linker/2011-08-18-unique-debug-type.ll | 27 + test/Linker/2011-08-18-unique-debug-type2.ll | 27 + test/Linker/2011-08-22-ResolveAlias.ll | 89 + test/Linker/2011-08-22-ResolveAlias2.ll | 92 + test/Linker/AppendingLinkage.ll | 16 + test/Linker/AppendingLinkage2.ll | 9 + test/Linker/ConstantGlobals1.ll | 10 + test/Linker/ConstantGlobals2.ll | 10 + test/Linker/ConstantGlobals3.ll | 9 + test/Linker/DbgDeclare.ll | 60 + test/Linker/DbgDeclare2.ll | 79 + test/Linker/Inputs/PR11464.a.ll | 3 + test/Linker/Inputs/PR11464.b.ll | 13 + test/Linker/Inputs/PR8300.a.ll | 2 + test/Linker/Inputs/PR8300.b.ll | 9 + test/Linker/Inputs/basiclink.a.ll | 2 + test/Linker/Inputs/basiclink.b.ll | 6 + test/Linker/Inputs/linkage.a.ll | 2 + test/Linker/Inputs/linkage.b.ll | 10 + .../Inputs/type-unique-inheritance-a.ll | 94 + .../Inputs/type-unique-inheritance-b.ll | 81 + test/Linker/Inputs/type-unique-simple2-a.ll | 88 + test/Linker/Inputs/type-unique-simple2-b.ll | 67 + test/Linker/LinkOnce.ll | 8 + test/Linker/PR8300.ll | 1 + test/Linker/available_externally_a.ll | 5 + test/Linker/available_externally_b.ll | 4 + test/Linker/basiclink.ll | 6 + test/Linker/inlineasm.ll | 17 + test/Linker/link-global-to-func.ll | 14 + test/Linker/link-messages.ll | 10 + test/Linker/link-type-names.ll | 10 + test/Linker/linkage.ll | 3 + test/Linker/linkmdnode.ll | 13 + test/Linker/linkmdnode2.ll | 22 + test/Linker/linknamedmdnode.ll | 7 + test/Linker/linknamedmdnode2.ll | 6 + test/Linker/metadata-a.ll | 15 + test/Linker/metadata-b.ll | 9 + test/Linker/module-flags-1-a.ll | 16 + test/Linker/module-flags-1-b.ll | 8 + test/Linker/module-flags-2-a.ll | 10 + test/Linker/module-flags-2-b.ll | 6 + test/Linker/module-flags-3-a.ll | 14 + test/Linker/module-flags-3-b.ll | 8 + test/Linker/module-flags-4-a.ll | 10 + test/Linker/module-flags-4-b.ll | 8 + test/Linker/module-flags-5-a.ll | 9 + test/Linker/module-flags-5-b.ll | 6 + test/Linker/module-flags-6-a.ll | 9 + test/Linker/module-flags-6-b.ll | 6 + test/Linker/module-flags-7-a.ll | 9 + test/Linker/module-flags-7-b.ll | 6 + test/Linker/module-flags-8-a.ll | 14 + test/Linker/module-flags-8-b.ll | 7 + test/Linker/multiple-merged-structs.ll | 2 + test/Linker/partial-type-refinement-link.ll | 20 + test/Linker/partial-type-refinement.ll | 24 + test/Linker/prefixdata.ll | 9 + test/Linker/redefinition.ll | 9 + test/Linker/testlink1.ll | 101 + test/Linker/testlink2.ll | 58 + test/Linker/transitive-lazy-link.ll | 20 + test/Linker/type-unique-inheritance.ll | 1 + test/Linker/type-unique-simple-a.ll | 91 + test/Linker/type-unique-simple-b.ll | 67 + test/Linker/type-unique-simple2.ll | 6 + test/Linker/unnamed-addr-err-a.ll | 4 + test/Linker/unnamed-addr-err-b.ll | 4 + test/Linker/unnamed-addr1-a.ll | 46 + test/Linker/unnamed-addr1-b.ll | 20 + test/Linker/visibility1.ll | 46 + test/Linker/visibility2.ll | 27 + test/Linker/weakextern.ll | 12 + test/MC/AArch64/adrp-relocation.s | 18 + test/MC/AArch64/basic-a64-diagnostics.s | 3713 + test/MC/AArch64/basic-a64-instructions.s | 4819 + test/MC/AArch64/basic-pic.s | 98 + test/MC/AArch64/elf-extern.s | 33 + test/MC/AArch64/elf-globaladdress.ll | 62 + test/MC/AArch64/elf-objdump.s | 5 + test/MC/AArch64/elf-reloc-addend.s | 8 + test/MC/AArch64/elf-reloc-addsubimm.s | 10 + test/MC/AArch64/elf-reloc-condbr.s | 10 + test/MC/AArch64/elf-reloc-ldrlit.s | 16 + test/MC/AArch64/elf-reloc-ldstunsimm.s | 18 + test/MC/AArch64/elf-reloc-movw.s | 42 + test/MC/AArch64/elf-reloc-pcreladdressing.s | 17 + test/MC/AArch64/elf-reloc-tstb.s | 12 + test/MC/AArch64/elf-reloc-uncondbrimm.s | 12 + test/MC/AArch64/gicv3-regs-diagnostics.s | 61 + test/MC/AArch64/gicv3-regs.s | 223 + test/MC/AArch64/inline-asm-modifiers.s | 209 + test/MC/AArch64/jump-table.s | 59 + test/MC/AArch64/lit.local.cfg | 3 + test/MC/AArch64/mapping-across-sections.s | 28 + test/MC/AArch64/mapping-within-section.s | 23 + test/MC/AArch64/neon-2velem.s | 271 + test/MC/AArch64/neon-3vdiff.s | 415 + test/MC/AArch64/neon-aba-abd.s | 78 + test/MC/AArch64/neon-across.s | 101 + test/MC/AArch64/neon-add-pairwise.s | 34 + test/MC/AArch64/neon-add-sub-instructions.s | 68 + test/MC/AArch64/neon-bitwise-instructions.s | 60 + test/MC/AArch64/neon-compare-instructions.s | 405 + test/MC/AArch64/neon-crypto.s | 44 + test/MC/AArch64/neon-diagnostics.s | 7318 ++ test/MC/AArch64/neon-extract.s | 13 + test/MC/AArch64/neon-facge-facgt.s | 41 + test/MC/AArch64/neon-frsqrt-frecp.s | 27 + test/MC/AArch64/neon-halving-add-sub.s | 74 + test/MC/AArch64/neon-max-min-pairwise.s | 110 + test/MC/AArch64/neon-max-min.s | 110 + test/MC/AArch64/neon-mla-mls-instructions.s | 61 + test/MC/AArch64/neon-mov.s | 209 + test/MC/AArch64/neon-mul-div-instructions.s | 86 + test/MC/AArch64/neon-perm.s | 103 + test/MC/AArch64/neon-rounding-halving-add.s | 39 + test/MC/AArch64/neon-rounding-shift.s | 45 + test/MC/AArch64/neon-saturating-add-sub.s | 82 + .../AArch64/neon-saturating-rounding-shift.s | 43 + test/MC/AArch64/neon-saturating-shift.s | 43 + test/MC/AArch64/neon-scalar-abs.s | 35 + test/MC/AArch64/neon-scalar-add-sub.s | 16 + test/MC/AArch64/neon-scalar-by-elem-mla.s | 44 + test/MC/AArch64/neon-scalar-by-elem-mul.s | 37 + .../neon-scalar-by-elem-saturating-mla.s | 46 + .../neon-scalar-by-elem-saturating-mul.s | 58 + test/MC/AArch64/neon-scalar-compare.s | 90 + test/MC/AArch64/neon-scalar-cvt.s | 181 + test/MC/AArch64/neon-scalar-dup.s | 55 + test/MC/AArch64/neon-scalar-extract-narrow.s | 40 + test/MC/AArch64/neon-scalar-fp-compare.s | 103 + test/MC/AArch64/neon-scalar-mul.s | 63 + test/MC/AArch64/neon-scalar-neg.s | 25 + test/MC/AArch64/neon-scalar-recip.s | 53 + test/MC/AArch64/neon-scalar-reduce-pairwise.s | 16 + test/MC/AArch64/neon-scalar-rounding-shift.s | 17 + .../AArch64/neon-scalar-saturating-add-sub.s | 81 + .../neon-scalar-saturating-rounding-shift.s | 28 + .../MC/AArch64/neon-scalar-saturating-shift.s | 29 + test/MC/AArch64/neon-scalar-shift-imm.s | 186 + test/MC/AArch64/neon-scalar-shift.s | 16 + test/MC/AArch64/neon-shift-left-long.s | 37 + test/MC/AArch64/neon-shift.s | 61 + test/MC/AArch64/neon-simd-copy.s | 135 + test/MC/AArch64/neon-simd-ldst-multi-elem.s | 463 + test/MC/AArch64/neon-simd-ldst-one-elem.s | 325 + test/MC/AArch64/neon-simd-misc.s | 646 + .../AArch64/neon-simd-post-ldst-multi-elem.s | 389 + test/MC/AArch64/neon-simd-shift.s | 434 + test/MC/AArch64/neon-tbl.s | 56 + test/MC/AArch64/noneon-diagnostics.s | 28 + test/MC/AArch64/tls-relocs.s | 381 + test/MC/AArch64/trace-regs-diagnostics.s | 156 + test/MC/AArch64/trace-regs.s | 766 + test/MC/ARM/2010-11-30-reloc-movt.s | 41 + .../2013-03-18-Br-to-label-named-like-reg.s | 5 + .../MC/ARM/AlignedBundling/group-bundle-arm.s | 48 + test/MC/ARM/AlignedBundling/lit.local.cfg | 4 + .../AlignedBundling/pad-align-to-bundle-end.s | 41 + test/MC/ARM/align_arm_2_thumb.s | 15 + test/MC/ARM/align_thumb_2_arm.s | 15 + test/MC/ARM/arm-aliases.s | 17 + test/MC/ARM/arm-arithmetic-aliases.s | 130 + test/MC/ARM/arm-it-block.s | 11 + test/MC/ARM/arm-ldrd.s | 57 + test/MC/ARM/arm-memory-instructions.s | 487 + test/MC/ARM/arm-shift-encoding.s | 119 + test/MC/ARM/arm-thumb-cpus-default.s | 13 + test/MC/ARM/arm-thumb-cpus.s | 20 + test/MC/ARM/arm-thumb-trustzone.s | 25 + test/MC/ARM/arm-trustzone.s | 24 + test/MC/ARM/arm_addrmode2.s | 34 + test/MC/ARM/arm_addrmode3.s | 18 + test/MC/ARM/arm_fixups.s | 22 + test/MC/ARM/arm_instructions.s | 86 + test/MC/ARM/arm_word_directive.s | 6 + test/MC/ARM/basic-arm-instructions-v8.s | 59 + test/MC/ARM/basic-arm-instructions.s | 2944 + test/MC/ARM/basic-thumb-instructions.s | 651 + test/MC/ARM/basic-thumb2-instructions-v8.s | 87 + test/MC/ARM/basic-thumb2-instructions.s | 3693 + test/MC/ARM/bracket-darwin.s | 5 + test/MC/ARM/bracket-exprs.s | 15 + test/MC/ARM/crc32-thumb.s | 30 + test/MC/ARM/crc32.s | 30 + test/MC/ARM/cxx-global-constructor.ll | 13 + test/MC/ARM/data-in-code.ll | 178 + test/MC/ARM/deprecated-v8.s | 51 + test/MC/ARM/diagnostics-noneon.s | 7 + test/MC/ARM/diagnostics.s | 467 + test/MC/ARM/directive-cpu.s | 26 + test/MC/ARM/directive-eabi_attribute.s | 56 + test/MC/ARM/directive-fpu-multiple.s | 26 + test/MC/ARM/directive-fpu.s | 26 + test/MC/ARM/dot-req.s | 11 + test/MC/ARM/eh-compact-pr0.s | 104 + test/MC/ARM/eh-compact-pr1.s | 74 + .../ARM/eh-directive-cantunwind-diagnostics.s | 106 + test/MC/ARM/eh-directive-cantunwind.s | 51 + test/MC/ARM/eh-directive-fnend-diagnostics.s | 17 + .../MC/ARM/eh-directive-fnstart-diagnostics.s | 31 + test/MC/ARM/eh-directive-handlerdata.s | 107 + test/MC/ARM/eh-directive-integrated-test.s | 93 + test/MC/ARM/eh-directive-multiple-offsets.s | 168 + test/MC/ARM/eh-directive-pad-diagnostics.s | 39 + test/MC/ARM/eh-directive-pad.s | 226 + .../eh-directive-personality-diagnostics.s | 39 + test/MC/ARM/eh-directive-personality.s | 89 + test/MC/ARM/eh-directive-save-diagnoatics.s | 41 + test/MC/ARM/eh-directive-save.s | 343 + test/MC/ARM/eh-directive-section-comdat.s | 126 + .../ARM/eh-directive-section-multiple-func.s | 128 + test/MC/ARM/eh-directive-section.s | 163 + test/MC/ARM/eh-directive-setfp-diagnostics.s | 87 + test/MC/ARM/eh-directive-setfp.s | 239 + .../eh-directive-text-section-multiple-func.s | 81 + test/MC/ARM/eh-directive-text-section.s | 82 + test/MC/ARM/eh-directive-vsave-diagnostics.s | 41 + test/MC/ARM/eh-directive-vsave.s | 130 + test/MC/ARM/elf-eflags-eabi.s | 14 + test/MC/ARM/elf-jump24-fixup.s | 9 + test/MC/ARM/elf-movt.s | 58 + test/MC/ARM/elf-reloc-01.ll | 67 + test/MC/ARM/elf-reloc-02.ll | 48 + test/MC/ARM/elf-reloc-03.ll | 95 + test/MC/ARM/elf-reloc-condcall.s | 18 + test/MC/ARM/elf-thumbfunc-reloc.ll | 41 + test/MC/ARM/elf-thumbfunc-reloc.s | 24 + test/MC/ARM/elf-thumbfunc.s | 20 + test/MC/ARM/fp-armv8.s | 129 + test/MC/ARM/full_line_comment.s | 8 + test/MC/ARM/hilo-16bit-relocations.s | 20 + test/MC/ARM/idiv.s | 33 + test/MC/ARM/invalid-barrier.s | 28 + test/MC/ARM/invalid-crc32.s | 16 + test/MC/ARM/invalid-fp-armv8.s | 89 + test/MC/ARM/invalid-hint-arm.s | 8 + test/MC/ARM/invalid-hint-thumb.s | 8 + test/MC/ARM/invalid-idiv.s | 28 + test/MC/ARM/invalid-neon-v8.s | 70 + test/MC/ARM/lit.local.cfg | 4 + .../ARM/load-store-acquire-release-v8-thumb.s | 48 + test/MC/ARM/load-store-acquire-release-v8.s | 48 + test/MC/ARM/mapping-within-section.s | 33 + test/MC/ARM/mode-switch.s | 26 + test/MC/ARM/multi-section-mapping.s | 35 + test/MC/ARM/neon-abs-encoding.s | 31 + test/MC/ARM/neon-absdiff-encoding.s | 82 + test/MC/ARM/neon-add-encoding.s | 274 + test/MC/ARM/neon-bitcount-encoding.s | 31 + test/MC/ARM/neon-bitwise-encoding.s | 340 + test/MC/ARM/neon-cmp-encoding.s | 197 + test/MC/ARM/neon-convert-encoding.s | 54 + test/MC/ARM/neon-crypto.s | 51 + test/MC/ARM/neon-dup-encoding.s | 33 + test/MC/ARM/neon-minmax-encoding.s | 124 + test/MC/ARM/neon-mov-encoding.s | 169 + test/MC/ARM/neon-mul-accum-encoding.s | 94 + test/MC/ARM/neon-mul-encoding.s | 168 + test/MC/ARM/neon-neg-encoding.s | 30 + test/MC/ARM/neon-pairwise-encoding.s | 96 + test/MC/ARM/neon-reciprocal-encoding.s | 26 + test/MC/ARM/neon-reverse-encoding.s | 26 + test/MC/ARM/neon-satshift-encoding.s | 150 + test/MC/ARM/neon-shift-encoding.s | 535 + test/MC/ARM/neon-shiftaccum-encoding.s | 209 + test/MC/ARM/neon-shuffle-encoding.s | 136 + test/MC/ARM/neon-sub-encoding.s | 175 + test/MC/ARM/neon-table-encoding.s | 22 + test/MC/ARM/neon-v8.s | 83 + test/MC/ARM/neon-vld-encoding.s | 506 + test/MC/ARM/neon-vst-encoding.s | 285 + test/MC/ARM/neon-vswp.s | 7 + test/MC/ARM/neont2-abs-encoding.s | 33 + test/MC/ARM/neont2-absdiff-encoding.s | 91 + test/MC/ARM/neont2-add-encoding.s | 138 + test/MC/ARM/neont2-bitcount-encoding.s | 38 + test/MC/ARM/neont2-bitwise-encoding.s | 55 + test/MC/ARM/neont2-cmp-encoding.s | 36 + test/MC/ARM/neont2-convert-encoding.s | 40 + test/MC/ARM/neont2-dup-encoding.s | 43 + test/MC/ARM/neont2-minmax-encoding.s | 126 + test/MC/ARM/neont2-mov-encoding.s | 131 + test/MC/ARM/neont2-mul-accum-encoding.s | 100 + test/MC/ARM/neont2-mul-encoding.s | 78 + test/MC/ARM/neont2-neg-encoding.s | 32 + test/MC/ARM/neont2-pairwise-encoding.s | 100 + test/MC/ARM/neont2-reciprocal-encoding.s | 28 + test/MC/ARM/neont2-reverse-encoding.s | 26 + test/MC/ARM/neont2-satshift-encoding.s | 152 + test/MC/ARM/neont2-shift-encoding.s | 162 + test/MC/ARM/neont2-shiftaccum-encoding.s | 212 + test/MC/ARM/neont2-shuffle-encoding.s | 48 + test/MC/ARM/neont2-sub-encoding.s | 46 + test/MC/ARM/neont2-table-encoding.s | 24 + test/MC/ARM/neont2-vld-encoding.s | 111 + test/MC/ARM/neont2-vst-encoding.s | 106 + test/MC/ARM/obsolete-v8.s | 7 + test/MC/ARM/pr11877.s | 6 + test/MC/ARM/relocated-mapping.s | 11 + test/MC/ARM/simple-fp-encoding.s | 397 + test/MC/ARM/single-precision-fp.s | 194 + test/MC/ARM/thumb-diagnostics.s | 220 + test/MC/ARM/thumb-fp-armv8.s | 130 + test/MC/ARM/thumb-hints.s | 64 + test/MC/ARM/thumb-invalid-crypto.txt | 42 + test/MC/ARM/thumb-neon-crypto.s | 35 + test/MC/ARM/thumb-neon-v8.s | 83 + test/MC/ARM/thumb-only-conditionals.s | 54 + test/MC/ARM/thumb-shift-encoding.s | 45 + test/MC/ARM/thumb.s | 51 + test/MC/ARM/thumb2-b.w-encodingT4.s | 12 + test/MC/ARM/thumb2-branches.s | 286 + test/MC/ARM/thumb2-diagnostics.s | 72 + test/MC/ARM/thumb2-ldrd.s | 9 + test/MC/ARM/thumb2-mclass.s | 98 + test/MC/ARM/thumb2-narrow-dp.ll | 807 + test/MC/ARM/thumb2-pldw.s | 7 + test/MC/ARM/v8_IT_manual.s | 6739 ++ test/MC/ARM/vfp4.s | 73 + test/MC/ARM/vpush-vpop.s | 34 + test/MC/ARM/xscale-attributes.ll | 39 + test/MC/AsmParser/align_invalid.s | 10 + test/MC/AsmParser/assignment.s | 11 + test/MC/AsmParser/bad-macro.s | 9 + test/MC/AsmParser/cfi-unfinished-frame.s | 5 + test/MC/AsmParser/cfi-window-save.s | 15 + test/MC/AsmParser/conditional_asm.s | 12 + test/MC/AsmParser/dash-n.s | 7 + test/MC/AsmParser/directive_abort.s | 6 + test/MC/AsmParser/directive_align.s | 16 + test/MC/AsmParser/directive_ascii.s | 41 + test/MC/AsmParser/directive_comm.s | 10 + test/MC/AsmParser/directive_darwin_section.s | 4 + test/MC/AsmParser/directive_desc.s | 8 + test/MC/AsmParser/directive_elf_size.s | 8 + test/MC/AsmParser/directive_file-errors.s | 9 + test/MC/AsmParser/directive_file.s | 9 + test/MC/AsmParser/directive_fill.s | 33 + test/MC/AsmParser/directive_incbin.s | 6 + test/MC/AsmParser/directive_include.s | 9 + test/MC/AsmParser/directive_lcomm.s | 15 + test/MC/AsmParser/directive_line.s | 5 + test/MC/AsmParser/directive_loc.s | 9 + test/MC/AsmParser/directive_lsym.s | 13 + test/MC/AsmParser/directive_org.s | 11 + test/MC/AsmParser/directive_seh.s | 48 + test/MC/AsmParser/directive_set.s | 12 + test/MC/AsmParser/directive_space.s | 16 + .../directive_subsections_via_symbols.s | 6 + test/MC/AsmParser/directive_symbol_attrs.s | 7 + test/MC/AsmParser/directive_tbss.s | 7 + test/MC/AsmParser/directive_tdata.s | 9 + .../MC/AsmParser/directive_thread_init_func.s | 7 + test/MC/AsmParser/directive_tlv.s | 13 + test/MC/AsmParser/directive_values.s | 71 + test/MC/AsmParser/directive_zerofill.s | 14 + test/MC/AsmParser/dollars-in-identifiers.s | 7 + test/MC/AsmParser/dot-symbol.s | 12 + test/MC/AsmParser/equ.s | 9 + test/MC/AsmParser/expr_symbol_modifiers.s | 14 + test/MC/AsmParser/exprs-invalid.s | 14 + test/MC/AsmParser/exprs.s | 79 + test/MC/AsmParser/extern.s | 4 + test/MC/AsmParser/floating-literals.s | 82 + test/MC/AsmParser/hello.s | 28 + test/MC/AsmParser/ifb.s | 67 + test/MC/AsmParser/ifc.s | 65 + test/MC/AsmParser/ifdef.s | 29 + test/MC/AsmParser/ifndef.s | 29 + test/MC/AsmParser/incbin_abcd | 1 + test/MC/AsmParser/labels.s | 56 + test/MC/AsmParser/line_with_hash.s | 15 + test/MC/AsmParser/lit.local.cfg | 4 + test/MC/AsmParser/macro-args.s | 64 + .../MC/AsmParser/macro-def-in-instantiation.s | 13 + test/MC/AsmParser/macro-err1.s | 10 + test/MC/AsmParser/macro-irp.s | 8 + test/MC/AsmParser/macro-irpc.s | 9 + test/MC/AsmParser/macro-rept-err1.s | 6 + test/MC/AsmParser/macro-rept-err2.s | 7 + test/MC/AsmParser/macro-rept.s | 22 + test/MC/AsmParser/macros-darwin.s | 9 + test/MC/AsmParser/macros-parsing.s | 23 + test/MC/AsmParser/macros.s | 93 + test/MC/AsmParser/pr11865.s | 6 + test/MC/AsmParser/purgem.s | 12 + test/MC/AsmParser/rename.s | 14 + test/MC/AsmParser/section.s | 129 + test/MC/AsmParser/section_names.s | 62 + test/MC/AsmParser/secure_log_unique.s | 9 + test/MC/AsmParser/variables-invalid.s | 28 + test/MC/AsmParser/variables.s | 15 + test/MC/COFF/alias.s | 106 + test/MC/COFF/align-nops.s | 54 + test/MC/COFF/basic-coff-64.s | 137 + test/MC/COFF/basic-coff.s | 137 + test/MC/COFF/bss.s | 15 + test/MC/COFF/bss_section.ll | 6 + test/MC/COFF/comm.ll | 13 + test/MC/COFF/diff.s | 32 + test/MC/COFF/eh-frame.s | 14 + test/MC/COFF/feat00.s | 14 + test/MC/COFF/global_ctors_dtors.ll | 39 + test/MC/COFF/linker-options.ll | 21 + test/MC/COFF/linkonce-invalid.s | 40 + test/MC/COFF/linkonce.s | 179 + test/MC/COFF/lit.local.cfg | 4 + test/MC/COFF/lset0.s | 12 + test/MC/COFF/module-asm.ll | 28 + test/MC/COFF/rdata.ll | 6 + test/MC/COFF/relocation-imgrel.s | 29 + test/MC/COFF/secrel-variant.s | 19 + test/MC/COFF/secrel32.s | 10 + test/MC/COFF/section-comdat.s | 188 + test/MC/COFF/section-invalid-flags.s | 8 + test/MC/COFF/section-name-encoding.s | 62 + test/MC/COFF/section.s | 170 + test/MC/COFF/seh-align1.s | 65 + test/MC/COFF/seh-align2.s | 78 + test/MC/COFF/seh-align3.s | 83 + test/MC/COFF/seh-section.s | 37 + test/MC/COFF/seh.s | 159 + test/MC/COFF/simple-fixups.s | 49 + test/MC/COFF/switch-relocations.ll | 37 + test/MC/COFF/symbol-alias.s | 73 + test/MC/COFF/symbol-fragment-offset-64.s | 168 + test/MC/COFF/symbol-fragment-offset.s | 168 + test/MC/COFF/symbol-mangling.ll | 17 + test/MC/COFF/tricky-names.ll | 38 + test/MC/COFF/weak-symbol.ll | 44 + test/MC/COFF/weak.s | 75 + .../AArch64/a64-ignored-fields.txt | 8 + .../AArch64/basic-a64-instructions.txt | 4200 + .../AArch64/basic-a64-undefined.txt | 43 + .../AArch64/basic-a64-unpredictable.txt | 96 + test/MC/Disassembler/AArch64/gicv3-regs.txt | 222 + .../AArch64/ldp-offset-predictable.txt | 7 + .../AArch64/ldp-postind.predictable.txt | 17 + .../AArch64/ldp-preind.predictable.txt | 17 + test/MC/Disassembler/AArch64/lit.local.cfg | 4 + .../AArch64/neon-instructions.txt | 2638 + test/MC/Disassembler/AArch64/trace-regs.txt | 736 + .../ARM/arm-LDREXD-reencoding.txt | 14 + .../ARM/arm-STREXD-reencoding.txt | 14 + test/MC/Disassembler/ARM/arm-tests.txt | 364 + .../Disassembler/ARM/arm-thumb-trustzone.txt | 17 + test/MC/Disassembler/ARM/arm-trustzone.txt | 16 + .../ARM/basic-arm-instructions-v8.txt | 58 + .../ARM/basic-arm-instructions.txt | 2431 + test/MC/Disassembler/ARM/crc32-thumb.txt | 15 + test/MC/Disassembler/ARM/crc32.txt | 15 + test/MC/Disassembler/ARM/fp-armv8.txt | 160 + test/MC/Disassembler/ARM/fp-encoding.txt | 262 + test/MC/Disassembler/ARM/hex-immediates.txt | 5 + .../MC/Disassembler/ARM/invalid-FSTMX-arm.txt | 8 + test/MC/Disassembler/ARM/invalid-IT-CC15.txt | 18 + test/MC/Disassembler/ARM/invalid-armv7.txt | 502 + test/MC/Disassembler/ARM/invalid-armv8.txt | 167 + .../ARM/invalid-because-armv7.txt | 26 + .../ARM/invalid-thumbv7-xfail.txt | 38 + test/MC/Disassembler/ARM/invalid-thumbv7.txt | 407 + test/MC/Disassembler/ARM/invalid-thumbv8.txt | 167 + test/MC/Disassembler/ARM/ldrd-armv4.txt | 15 + test/MC/Disassembler/ARM/lit.local.cfg | 4 + .../load-store-acquire-release-v8-thumb.txt | 33 + .../ARM/load-store-acquire-release-v8.txt | 32 + test/MC/Disassembler/ARM/marked-up-thumb.txt | 7 + .../ARM/memory-arm-instructions.txt | 470 + test/MC/Disassembler/ARM/neon-crypto.txt | 35 + test/MC/Disassembler/ARM/neon-tests.txt | 91 + test/MC/Disassembler/ARM/neon-v8.txt | 71 + test/MC/Disassembler/ARM/neon.txt | 2336 + .../Disassembler/ARM/neont-VLD-reencoding.txt | 77 + .../Disassembler/ARM/neont-VST-reencoding.txt | 77 + test/MC/Disassembler/ARM/neont2.txt | 2051 + test/MC/Disassembler/ARM/thumb-MSR-MClass.txt | 7 + test/MC/Disassembler/ARM/thumb-fp-armv8.txt | 163 + .../MC/Disassembler/ARM/thumb-neon-crypto.txt | 43 + test/MC/Disassembler/ARM/thumb-neon-v8.txt | 71 + test/MC/Disassembler/ARM/thumb-printf.txt | 77 + test/MC/Disassembler/ARM/thumb-tests.txt | 314 + test/MC/Disassembler/ARM/thumb-v8.txt | 28 + test/MC/Disassembler/ARM/thumb1.txt | 527 + test/MC/Disassembler/ARM/thumb2-v8.txt | 40 + test/MC/Disassembler/ARM/thumb2.txt | 2720 + .../ARM/unpredictable-ADC-arm.txt | 17 + .../ARM/unpredictable-ADDREXT3-arm.txt | 16 + .../ARM/unpredictable-AExtI-arm.txt | 62 + .../ARM/unpredictable-AI1cmp-arm.txt | 30 + .../MC/Disassembler/ARM/unpredictable-BFI.txt | 11 + .../ARM/unpredictable-LDR-arm.txt | 22 + .../ARM/unpredictable-LDRD-arm.txt | 13 + .../ARM/unpredictable-LSL-regform.txt | 13 + .../ARM/unpredictable-MRRC2-arm.txt | 13 + .../ARM/unpredictable-MRS-arm.txt | 18 + .../ARM/unpredictable-MUL-arm.txt | 17 + .../ARM/unpredictable-RSC-arm.txt | 11 + .../ARM/unpredictable-SEL-arm.txt | 5 + .../ARM/unpredictable-SHADD16-arm.txt | 7 + .../ARM/unpredictable-SSAT-arm.txt | 13 + .../ARM/unpredictable-STRBrs-arm.txt | 12 + .../ARM/unpredictable-UQADD8-arm.txt | 16 + .../ARM/unpredictable-swp-arm.txt | 26 + .../Disassembler/ARM/unpredictables-thumb.txt | 5 + test/MC/Disassembler/ARM/vfp4.txt | 37 + test/MC/Disassembler/Mips/lit.local.cfg | 4 + test/MC/Disassembler/Mips/micromips.txt | 287 + test/MC/Disassembler/Mips/micromips_le.txt | 287 + test/MC/Disassembler/Mips/mips-dsp.txt | 22 + test/MC/Disassembler/Mips/mips32.txt | 435 + test/MC/Disassembler/Mips/mips32_le.txt | 441 + test/MC/Disassembler/Mips/mips32r2.txt | 447 + test/MC/Disassembler/Mips/mips32r2_le.txt | 447 + test/MC/Disassembler/Mips/mips64.txt | 87 + test/MC/Disassembler/Mips/mips64_le.txt | 84 + test/MC/Disassembler/Mips/mips64r2.txt | 90 + test/MC/Disassembler/Mips/mips64r2_le.txt | 90 + test/MC/Disassembler/SystemZ/insns-pcrel.txt | 1732 + test/MC/Disassembler/SystemZ/insns.txt | 7751 ++ test/MC/Disassembler/SystemZ/invalid-regs.txt | 22 + test/MC/Disassembler/SystemZ/lit.local.cfg | 4 + test/MC/Disassembler/SystemZ/trunc-01.txt | 5 + test/MC/Disassembler/SystemZ/trunc-02.txt | 5 + test/MC/Disassembler/SystemZ/trunc-03.txt | 5 + test/MC/Disassembler/SystemZ/unmapped.txt | 32 + test/MC/Disassembler/X86/hex-immediates.txt | 10 + test/MC/Disassembler/X86/intel-syntax-32.txt | 31 + test/MC/Disassembler/X86/intel-syntax.txt | 154 + test/MC/Disassembler/X86/invalid-VEX-vvvv.txt | 4 + test/MC/Disassembler/X86/invalid-cmp-imm.txt | 10 + test/MC/Disassembler/X86/lit.local.cfg | 4 + test/MC/Disassembler/X86/marked-up.txt | 6 + test/MC/Disassembler/X86/prefixes.txt | 59 + test/MC/Disassembler/X86/simple-tests.txt | 918 + test/MC/Disassembler/X86/truncated-input.txt | 4 + test/MC/Disassembler/X86/x86-32.txt | 698 + test/MC/Disassembler/X86/x86-64.txt | 267 + test/MC/Disassembler/XCore/lit.local.cfg | 3 + test/MC/Disassembler/XCore/xcore.txt | 706 + test/MC/ELF/abs.s | 17 + test/MC/ELF/alias-reloc.s | 55 + test/MC/ELF/alias.s | 102 + test/MC/ELF/align-bss.s | 22 + test/MC/ELF/align-nops.s | 54 + test/MC/ELF/align-size.s | 18 + test/MC/ELF/align-text.s | 23 + test/MC/ELF/align.s | 39 + test/MC/ELF/bad-relocation.s | 7 + test/MC/ELF/bad-section.s | 9 + test/MC/ELF/basic-elf-32.s | 82 + test/MC/ELF/basic-elf-64.s | 80 + test/MC/ELF/bracket-exprs.s | 15 + test/MC/ELF/bracket.s | 8 + test/MC/ELF/bss-large.ll | 13 + test/MC/ELF/bss.ll | 8 + test/MC/ELF/call-abs.s | 22 + test/MC/ELF/cfi-adjust-cfa-offset.s | 53 + test/MC/ELF/cfi-advance-loc2.s | 50 + test/MC/ELF/cfi-def-cfa-offset.s | 52 + test/MC/ELF/cfi-def-cfa-register.s | 47 + test/MC/ELF/cfi-def-cfa.s | 47 + test/MC/ELF/cfi-escape.s | 48 + test/MC/ELF/cfi-offset.s | 47 + test/MC/ELF/cfi-reg.s | 18 + test/MC/ELF/cfi-register.s | 48 + test/MC/ELF/cfi-rel-offset.s | 56 + test/MC/ELF/cfi-rel-offset2.s | 47 + test/MC/ELF/cfi-remember.s | 50 + test/MC/ELF/cfi-restore.s | 48 + test/MC/ELF/cfi-same-value.s | 48 + test/MC/ELF/cfi-sections.s | 55 + test/MC/ELF/cfi-signal-frame.s | 33 + test/MC/ELF/cfi-undefined.s | 48 + test/MC/ELF/cfi-window-save.s | 51 + test/MC/ELF/cfi-zero-addr-delta.s | 54 + test/MC/ELF/cfi.s | 431 + test/MC/ELF/comdat-dup-group-name.s | 41 + test/MC/ELF/comdat-reloc.s | 29 + test/MC/ELF/comdat.s | 92 + test/MC/ELF/common.s | 99 + test/MC/ELF/common2.s | 24 + test/MC/ELF/comp-dir.s | 17 + test/MC/ELF/debug-line.s | 49 + test/MC/ELF/debug-line2.s | 32 + test/MC/ELF/debug-loc.s | 34 + test/MC/ELF/diff.s | 11 + test/MC/ELF/diff2.s | 13 + test/MC/ELF/elf_directive_previous.s | 13 + test/MC/ELF/elf_directive_section.s | 23 + test/MC/ELF/empty-dwarf-lines.s | 23 + test/MC/ELF/empty.s | 89 + test/MC/ELF/entsize.ll | 54 + test/MC/ELF/entsize.s | 84 + test/MC/ELF/fde.s | 28 + test/MC/ELF/file-double.s | 47 + test/MC/ELF/file.s | 25 + test/MC/ELF/gen-dwarf.s | 26 + test/MC/ELF/global-offset.s | 29 + test/MC/ELF/got.s | 20 + test/MC/ELF/ident.s | 24 + test/MC/ELF/invalid-symver.s | 7 + test/MC/ELF/lcomm.s | 23 + test/MC/ELF/leb128.s | 34 + test/MC/ELF/lit.local.cfg | 4 + test/MC/ELF/local-reloc.s | 13 + test/MC/ELF/many-section.s | 93319 ++++++++++++++++ test/MC/ELF/many-sections-2.s | 65281 +++++++++++ test/MC/ELF/merge.s | 34 + test/MC/ELF/n_bytes.s | 30 + test/MC/ELF/no-fixup.s | 13 + test/MC/ELF/noexec.s | 26 + test/MC/ELF/norelocation.s | 26 + test/MC/ELF/org.s | 15 + test/MC/ELF/pic-diff.s | 26 + test/MC/ELF/plt.s | 11 + test/MC/ELF/pr9292.s | 27 + test/MC/ELF/relax-all-flag.s | 19 + test/MC/ELF/relax-arith.s | 111 + test/MC/ELF/relax-crash.s | 11 + test/MC/ELF/relax.s | 33 + test/MC/ELF/relocation-386.s | 130 + test/MC/ELF/relocation-pc.s | 32 + test/MC/ELF/relocation.s | 59 + test/MC/ELF/rename.s | 65 + test/MC/ELF/section-quoting.s | 10 + test/MC/ELF/section.s | 147 + test/MC/ELF/set.s | 36 + test/MC/ELF/sleb.s | 33 + test/MC/ELF/subsection.s | 37 + test/MC/ELF/symbol-names.s | 12 + test/MC/ELF/symref.s | 142 + test/MC/ELF/tls-i386.s | 145 + test/MC/ELF/tls.s | 78 + test/MC/ELF/type.s | 115 + test/MC/ELF/uleb.s | 26 + test/MC/ELF/undef.s | 39 + test/MC/ELF/undef2.s | 18 + test/MC/ELF/version.s | 23 + test/MC/ELF/weak-relocation.s | 14 + test/MC/ELF/weak.s | 30 + test/MC/ELF/weakref-plt.s | 14 + test/MC/ELF/weakref-reloc.s | 44 + test/MC/ELF/weakref.s | 235 + test/MC/ELF/x86_64-reloc-sizetest.s | 13 + test/MC/ELF/zero.s | 23 + test/MC/MachO/ARM/darwin-ARM-reloc.s | 173 + test/MC/MachO/ARM/darwin-Thumb-reloc.s | 139 + test/MC/MachO/ARM/data-in-code.s | 33 + test/MC/MachO/ARM/empty-function-nop.ll | 15 + test/MC/MachO/ARM/lit.local.cfg | 4 + .../MachO/ARM/llvm-objdump-macho-stripped.s | 5 + test/MC/MachO/ARM/llvm-objdump-macho.s | 20 + .../ARM/long-call-branch-island-relocation.s | 43 + test/MC/MachO/ARM/no-subsections-reloc.s | 18 + test/MC/MachO/ARM/nop-armv4-padding.s | 10 + test/MC/MachO/ARM/nop-armv6t2-padding.s | 10 + test/MC/MachO/ARM/nop-thumb-padding.s | 12 + test/MC/MachO/ARM/nop-thumb2-padding.s | 12 + test/MC/MachO/ARM/relax-thumb-ldr-literal.s | 13 + test/MC/MachO/ARM/relax-thumb2-branches.s | 14 + test/MC/MachO/ARM/static-movt-relocs.s | 23 + test/MC/MachO/ARM/thumb-bl-jbits.s | 19 + .../MachO/ARM/thumb2-function-relative-load.s | 13 + test/MC/MachO/ARM/thumb2-movt-fixup.s | 17 + test/MC/MachO/ARM/thumb2-movw-fixup.s | 44 + test/MC/MachO/absolute.s | 158 + test/MC/MachO/absolutize.s | 213 + .../MachO/bad-darwin-x86_64-32-bit-abs-addr.s | 5 + test/MC/MachO/bad-darwin-x86_64-diff-relocs.s | 5 + test/MC/MachO/bad-dollar.s | 5 + test/MC/MachO/bad-indirect-symbols.s | 5 + test/MC/MachO/bad-macro.s | 14 + test/MC/MachO/bss.s | 17 + test/MC/MachO/comm-1.s | 114 + test/MC/MachO/darwin-complex-difference.s | 129 + .../MachO/darwin-x86_64-diff-reloc-assign-2.s | 38 + .../MachO/darwin-x86_64-diff-reloc-assign.s | 27 + test/MC/MachO/darwin-x86_64-diff-relocs.s | 329 + test/MC/MachO/darwin-x86_64-nobase-relocs.s | 58 + test/MC/MachO/darwin-x86_64-reloc-offsets.s | 343 + test/MC/MachO/darwin-x86_64-reloc.s | 405 + test/MC/MachO/data.s | 67 + test/MC/MachO/debug_frame.s | 47 + test/MC/MachO/diff-with-two-sections.s | 64 + test/MC/MachO/direction_labels.s | 95 + test/MC/MachO/empty-dwarf-lines.s | 25 + test/MC/MachO/file.s | 22 + test/MC/MachO/gen-dwarf-cpp.s | 22 + test/MC/MachO/gen-dwarf-macro-cpp.s | 17 + test/MC/MachO/gen-dwarf-producer.s | 8 + test/MC/MachO/gen-dwarf.s | 122 + test/MC/MachO/i386-large-relocations.s | 36 + test/MC/MachO/indirect-symbols.s | 188 + test/MC/MachO/jcc.s | 106 + test/MC/MachO/lcomm-attributes.s | 136 + test/MC/MachO/linker-option-1.s | 21 + test/MC/MachO/linker-option-2.s | 25 + test/MC/MachO/linker-options.ll | 43 + test/MC/MachO/lit.local.cfg | 4 + test/MC/MachO/loc.s | 25 + test/MC/MachO/pcrel-to-other-section.s | 107 + test/MC/MachO/previous.s | 13 + test/MC/MachO/pushsection.s | 16 + test/MC/MachO/relax-jumps.s | 31 + test/MC/MachO/relax-recompute-align.s | 37 + test/MC/MachO/reloc-diff.s | 55 + test/MC/MachO/reloc-pcrel-offset.s | 17 + test/MC/MachO/reloc-pcrel.s | 65 + test/MC/MachO/reloc.s | 292 + test/MC/MachO/section-align-1.s | 87 + test/MC/MachO/section-align-2.s | 137 + test/MC/MachO/section-attributes.s | 7 + test/MC/MachO/section-flags.s | 14 + test/MC/MachO/string-table.s | 100 + test/MC/MachO/symbol-diff.s | 122 + test/MC/MachO/symbol-flags.s | 341 + test/MC/MachO/symbol-indirect.s | 268 + test/MC/MachO/symbols-1.s | 310 + test/MC/MachO/tbss.s | 114 + test/MC/MachO/tdata.s | 106 + test/MC/MachO/temp-labels.s | 33 + test/MC/MachO/thread_init_func.s | 63 + test/MC/MachO/tls.s | 270 + test/MC/MachO/tlv-bss.ll | 33 + test/MC/MachO/tlv-reloc.s | 174 + test/MC/MachO/tlv.s | 110 + test/MC/MachO/values.s | 135 + test/MC/MachO/variable-errors.s | 8 + test/MC/MachO/variable-exprs.s | 446 + test/MC/MachO/weakdef.s | 141 + test/MC/MachO/x86-data-in-code.ll | 108 + test/MC/MachO/x86_32-optimal_nop.s | 257 + test/MC/MachO/x86_32-sections.s | 536 + test/MC/MachO/x86_32-symbols.s | 1041 + test/MC/MachO/x86_64-reloc-arithmetic.s | 21 + test/MC/MachO/x86_64-sections.s | 561 + test/MC/MachO/x86_64-symbols.s | 998 + test/MC/MachO/zerofill-1.s | 121 + test/MC/MachO/zerofill-2.s | 103 + test/MC/MachO/zerofill-3.s | 141 + test/MC/MachO/zerofill-4.s | 35 + test/MC/MachO/zerofill-5.s | 109 + test/MC/MachO/zerofill-sect-align.s | 15 + test/MC/Markup/basic-markup.mc | 16 + test/MC/Markup/lit.local.cfg | 2 + test/MC/Mips/abicalls.ll | 15 + test/MC/Mips/do_switch.ll | 39 + test/MC/Mips/eh-frame.s | 167 + test/MC/Mips/elf-N64.ll | 26 + test/MC/Mips/elf-bigendian.ll | 60 + test/MC/Mips/elf-gprel-32-64.ll | 40 + test/MC/Mips/elf-objdump.s | 11 + test/MC/Mips/elf-reginfo.ll | 34 + test/MC/Mips/elf-relsym.ll | 39 + test/MC/Mips/elf-tls.ll | 40 + test/MC/Mips/elf_basic.s | 41 + test/MC/Mips/elf_eflags.ll | 69 + test/MC/Mips/elf_eflags.s | 5 + test/MC/Mips/elf_st_other.ll | 11 + test/MC/Mips/elf_st_other.s | 13 + test/MC/Mips/expr1.s | 26 + test/MC/Mips/higher_highest.ll | 32 + test/MC/Mips/hilo-addressing.s | 11 + test/MC/Mips/lea_64.ll | 18 + test/MC/Mips/lit.local.cfg | 4 + test/MC/Mips/micromips-alu-instructions.s | 108 + test/MC/Mips/micromips-branch-instructions.s | 65 + test/MC/Mips/micromips-branch16.s | 69 + test/MC/Mips/micromips-expansions.s | 57 + test/MC/Mips/micromips-expressions.s | 35 + test/MC/Mips/micromips-jump-instructions.s | 40 + test/MC/Mips/micromips-jump26.s | 23 + .../Mips/micromips-loadstore-instructions.s | 36 + test/MC/Mips/micromips-loadstore-unaligned.s | 26 + test/MC/Mips/micromips-long-branch.ll | 16437 +++ test/MC/Mips/micromips-movcond-instructions.s | 26 + .../MC/Mips/micromips-multiply-instructions.s | 26 + test/MC/Mips/micromips-relocations.s | 99 + test/MC/Mips/micromips-shift-instructions.s | 36 + test/MC/Mips/micromips-tailr.s | 26 + test/MC/Mips/micromips-trap-instructions.s | 50 + test/MC/Mips/mips-alu-instructions.s | 120 + test/MC/Mips/mips-control-instructions.s | 106 + test/MC/Mips/mips-coprocessor-encodings.s | 38 + test/MC/Mips/mips-dsp-instructions.s | 97 + test/MC/Mips/mips-expansions.s | 48 + test/MC/Mips/mips-fpu-instructions.s | 212 + test/MC/Mips/mips-jump-instructions.s | 148 + test/MC/Mips/mips-memory-instructions.s | 44 + test/MC/Mips/mips-register-names.s | 71 + test/MC/Mips/mips-relocations.s | 40 + test/MC/Mips/mips64-alu-instructions.s | 109 + test/MC/Mips/mips64-instructions.s | 7 + test/MC/Mips/mips64-register-names.s | 70 + test/MC/Mips/mips64extins.ll | 57 + test/MC/Mips/mips64shift.ll | 48 + test/MC/Mips/mips_directives.s | 47 + test/MC/Mips/mips_gprel16.ll | 33 + test/MC/Mips/msa/test_2r.s | 51 + test/MC/Mips/msa/test_2rf.s | 102 + test/MC/Mips/msa/test_3r.s | 732 + test/MC/Mips/msa/test_3rf.s | 252 + test/MC/Mips/msa/test_bit.s | 150 + test/MC/Mips/msa/test_cbranch.s | 78 + test/MC/Mips/msa/test_ctrlregs.s | 105 + test/MC/Mips/msa/test_elm.s | 51 + test/MC/Mips/msa/test_elm_insert.s | 15 + test/MC/Mips/msa/test_elm_insve.s | 18 + test/MC/Mips/msa/test_i10.s | 19 + test/MC/Mips/msa/test_i5.s | 138 + test/MC/Mips/msa/test_i8.s | 36 + test/MC/Mips/msa/test_lsa.s | 18 + test/MC/Mips/msa/test_mi10.s | 30 + test/MC/Mips/msa/test_vec.s | 27 + test/MC/Mips/multi-64bit-func.ll | 23 + test/MC/Mips/nabi-regs.s | 35 + test/MC/Mips/pr11877.s | 6 + test/MC/Mips/r-mips-got-disp.ll | 19 + test/MC/Mips/set-at-directive.s | 131 + test/MC/Mips/sext_64_32.ll | 20 + test/MC/Mips/sym-offset.ll | 26 + test/MC/Mips/xgot.ll | 29 + test/MC/PowerPC/deprecated-p7.s | 12 + test/MC/PowerPC/lit.local.cfg | 3 + test/MC/PowerPC/ppc-llong.s | 28 + test/MC/PowerPC/ppc-machine.s | 14 + test/MC/PowerPC/ppc-nop.s | 12 + test/MC/PowerPC/ppc-word.s | 28 + test/MC/PowerPC/ppc64-encoding-bookII.s | 82 + test/MC/PowerPC/ppc64-encoding-bookIII.s | 107 + test/MC/PowerPC/ppc64-encoding-ext.s | 2227 + test/MC/PowerPC/ppc64-encoding-fp.s | 269 + test/MC/PowerPC/ppc64-encoding-vmx.s | 384 + test/MC/PowerPC/ppc64-encoding.s | 551 + test/MC/PowerPC/ppc64-errors.s | 101 + test/MC/PowerPC/ppc64-fixup-apply.s | 100 + test/MC/PowerPC/ppc64-fixup-explicit.s | 46 + test/MC/PowerPC/ppc64-fixups.s | 448 + test/MC/PowerPC/ppc64-initial-cfa.s | 84 + test/MC/PowerPC/ppc64-operands.s | 115 + test/MC/PowerPC/ppc64-regs.s | 235 + test/MC/PowerPC/ppc64-relocs-01.s | 46 + test/MC/PowerPC/ppc64-tls-relocs-01.s | 22 + test/MC/PowerPC/tls-gd-obj.s | 56 + test/MC/PowerPC/tls-ie-obj.s | 44 + test/MC/PowerPC/tls-ld-obj.s | 61 + test/MC/SystemZ/insn-bad-z196.s | 343 + test/MC/SystemZ/insn-bad.s | 3315 + test/MC/SystemZ/insn-good-z196.s | 916 + test/MC/SystemZ/insn-good.s | 8580 ++ test/MC/SystemZ/lit.local.cfg | 4 + test/MC/SystemZ/regs-bad.s | 267 + test/MC/SystemZ/regs-good.s | 169 + test/MC/SystemZ/tokens.s | 79 + test/MC/X86/2011-09-06-NoNewline.s | 3 + test/MC/X86/3DNow.s | 92 + .../align-mode-argument-error.s | 8 + .../asm-printing-bundle-directives.s | 22 + .../autogen-inst-offset-align-to-end.s | 2899 + .../autogen-inst-offset-padding.s | 2674 + .../bundle-group-too-large-error.s | 17 + .../bundle-lock-option-error.s | 11 + .../X86/AlignedBundling/different-sections.s | 25 + test/MC/X86/AlignedBundling/lit.local.cfg | 4 + .../lock-without-bundle-mode-error.s | 10 + test/MC/X86/AlignedBundling/long-nop-pad.s | 27 + .../AlignedBundling/pad-align-to-bundle-end.s | 33 + .../X86/AlignedBundling/pad-bundle-groups.s | 46 + .../X86/AlignedBundling/relax-at-bundle-end.s | 16 + .../AlignedBundling/relax-in-bundle-group.s | 42 + .../AlignedBundling/single-inst-bundling.s | 47 + .../switch-section-locked-error.s | 16 + .../unlock-without-lock-error.s | 11 + test/MC/X86/address-size.s | 13 + test/MC/X86/avx512-encodings.s | 45 + test/MC/X86/cfi_def_cfa-crash.s | 73 + test/MC/X86/fde-reloc.s | 11 + test/MC/X86/gnux32-dwarf-gen.s | 24 + test/MC/X86/intel-syntax-2.s | 9 + test/MC/X86/intel-syntax-encoding.s | 78 + test/MC/X86/intel-syntax-hex.s | 26 + test/MC/X86/intel-syntax.s | 595 + test/MC/X86/lit.local.cfg | 3 + test/MC/X86/padlock.s | 57 + test/MC/X86/shuffle-comments.s | 271 + test/MC/X86/x86-32-avx.s | 3353 + test/MC/X86/x86-32-coverage.s | 19696 ++++ test/MC/X86/x86-32-fma3.s | 674 + test/MC/X86/x86-32-ms-inline-asm.s | 93 + test/MC/X86/x86-32.s | 1000 + test/MC/X86/x86-64.s | 1390 + test/MC/X86/x86_64-avx-clmul-encoding.s | 42 + test/MC/X86/x86_64-avx-encoding.s | 4243 + test/MC/X86/x86_64-bmi-encoding.s | 202 + test/MC/X86/x86_64-encoding.s | 245 + test/MC/X86/x86_64-fma3-encoding.s | 674 + test/MC/X86/x86_64-fma4-encoding.s | 456 + test/MC/X86/x86_64-hle-encoding.s | 9 + test/MC/X86/x86_64-imm-widths.s | 105 + test/MC/X86/x86_64-rand-encoding.s | 49 + test/MC/X86/x86_64-rtm-encoding.s | 17 + test/MC/X86/x86_64-sse4a.s | 25 + test/MC/X86/x86_64-tbm-encoding.s | 196 + test/MC/X86/x86_64-xop-encoding.s | 584 + test/MC/X86/x86_directives.s | 6 + test/MC/X86/x86_errors.s | 33 + test/MC/X86/x86_long_nop.s | 15 + test/MC/X86/x86_nop.s | 36 + test/MC/X86/x86_operands.s | 58 + test/Makefile | 152 + test/Makefile.tests | 68 + test/Object/ARM/lit.local.cfg | 3 + test/Object/ARM/macho-data-in-code.test | 7 + test/Object/ARM/objdump-thumb.test | 4 + test/Object/ARM/symbol-addr.ll | 12 + test/Object/Inputs/COFF/i386.yaml | 86 + test/Object/Inputs/COFF/x86-64.yaml | 85 + test/Object/Inputs/ELF/BE32.yaml | 6 + test/Object/Inputs/ELF/BE64.yaml | 6 + test/Object/Inputs/ELF/LE32.yaml | 6 + test/Object/Inputs/ELF/LE64.yaml | 6 + test/Object/Inputs/GNU.a | Bin 0 -> 4210 bytes test/Object/Inputs/IsNAN.o | Bin 0 -> 2280 bytes test/Object/Inputs/MacOSX.a | Bin 0 -> 4166 bytes test/Object/Inputs/SVR4.a | Bin 0 -> 4214 bytes test/Object/Inputs/archive-test.a-coff-i386 | Bin 0 -> 658 bytes .../archive-test.a-corrupt-symbol-table | Bin 0 -> 2792 bytes test/Object/Inputs/archive-test.a-empty | 1 + test/Object/Inputs/archive-test.a-gnu-minimal | 2 + .../Inputs/archive-test.a-gnu-no-symtab | 5 + test/Object/Inputs/coff_archive.lib | Bin 0 -> 41196 bytes test/Object/Inputs/coff_archive_short.lib | Bin 0 -> 1336 bytes test/Object/Inputs/corrupt-version.elf-x86_64 | Bin 0 -> 5200 bytes test/Object/Inputs/corrupt.elf-x86-64 | Bin 0 -> 1024 bytes test/Object/Inputs/dext-test.elf-mips64r2 | Bin 0 -> 802 bytes test/Object/Inputs/elf-reloc-no-sym.x86_64 | Bin 0 -> 1768 bytes test/Object/Inputs/elf-versioning-test.i386 | Bin 0 -> 4832 bytes test/Object/Inputs/elf-versioning-test.x86_64 | Bin 0 -> 5200 bytes test/Object/Inputs/elfver.S | 31 + test/Object/Inputs/elfver.script | 10 + test/Object/Inputs/evenlen | 1 + test/Object/Inputs/hello-world.elf-x86-64 | Bin 0 -> 4544 bytes test/Object/Inputs/liblong_filenames.a | Bin 0 -> 10920 bytes test/Object/Inputs/libsimple_archive.a | Bin 0 -> 1596 bytes .../Inputs/macho-data-in-code.macho-thumbv7 | Bin 0 -> 680 bytes .../Inputs/macho-text-sections.macho-x86_64 | Bin 0 -> 268 bytes test/Object/Inputs/macho-text.thumb | Bin 0 -> 156 bytes .../Object/Inputs/macho-universal.x86_64.i386 | Bin 0 -> 16624 bytes test/Object/Inputs/oddlen | 1 + test/Object/Inputs/program-headers.elf-i386 | Bin 0 -> 987 bytes test/Object/Inputs/program-headers.elf-x86-64 | Bin 0 -> 1108 bytes test/Object/Inputs/program-headers.mips | Bin 0 -> 648 bytes test/Object/Inputs/relocations.elf-x86-64 | Bin 0 -> 1032 bytes .../Object/Inputs/shared-object-test.elf-i386 | Bin 0 -> 1848 bytes .../Inputs/shared-object-test.elf-x86-64 | Bin 0 -> 2760 bytes test/Object/Inputs/shared.ll | 33 + .../trivial-executable-test.macho-x86-64 | Bin 0 -> 8512 bytes .../Inputs/trivial-object-test.coff-i386 | Bin 0 -> 346 bytes .../Inputs/trivial-object-test.coff-x86-64 | Bin 0 -> 347 bytes .../Inputs/trivial-object-test.elf-hexagon | Bin 0 -> 800 bytes .../Inputs/trivial-object-test.elf-i386 | Bin 0 -> 716 bytes .../Inputs/trivial-object-test.elf-mips64el | Bin 0 -> 1064 bytes .../Inputs/trivial-object-test.elf-x86-64 | Bin 0 -> 1024 bytes .../Inputs/trivial-object-test.macho-i386 | Bin 0 -> 552 bytes .../Inputs/trivial-object-test.macho-x86-64 | Bin 0 -> 552 bytes .../Inputs/trivial-object-test2.elf-x86-64 | Bin 0 -> 1424 bytes test/Object/Inputs/trivial.ll | 12 + .../Inputs/very_long_bytecode_file_name.bc | Bin 0 -> 1465 bytes .../Inputs/weak-global-symbol.macho-i386 | Bin 0 -> 344 bytes test/Object/Inputs/xpg4.a | Bin 0 -> 4214 bytes test/Object/Mips/feature.test | 13 + test/Object/Mips/lit.local.cfg | 3 + test/Object/X86/lit.local.cfg | 4 + test/Object/X86/macho-text-sections.test | 3 + .../X86/objdump-cfg-invalid-opcode.yaml | 58 + test/Object/X86/objdump-cfg-textatomsize.yaml | 39 + test/Object/X86/objdump-cfg.yaml | 86 + ...bjdump-disassembly-inline-relocations.test | 67 + .../X86/objdump-disassembly-symbolic.test | 48 + test/Object/X86/objdump-trivial-object.test | 54 + test/Object/ar-create.test | 17 + test/Object/archive-delete.test | 30 + test/Object/archive-error-tmp.txt | 9 + test/Object/archive-extract-dir.test | 13 + test/Object/archive-format.test | 22 + test/Object/archive-long-index.test | 40 + test/Object/archive-move.test | 50 + test/Object/archive-replace-pos.test | 30 + test/Object/archive-symtab.test | 59 + test/Object/archive-toc.test | 28 + test/Object/archive-update.test | 37 + test/Object/check_binary_output.ll | 4 + test/Object/coff-archive-short.test | 26 + test/Object/coff-archive.test | 225 + test/Object/corrupt.test | 24 + test/Object/directory.ll | 13 + test/Object/elf-reloc-no-sym.test | 7 + test/Object/extract.ll | 46 + test/Object/lit.local.cfg | 1 + test/Object/nm-archive.test | 35 + test/Object/nm-error.test | 17 + test/Object/nm-shared-object.test | 23 + test/Object/nm-trivial-object.test | 34 + test/Object/nm-universal-binary.test | 6 + test/Object/nm-weak-global-macho.test | 3 + test/Object/obj2yaml.test | 153 + test/Object/objdump-file-header.test | 17 + test/Object/objdump-private-headers.test | 18 + test/Object/objdump-relocations.test | 58 + test/Object/objdump-section-content.test | 24 + test/Object/objdump-sectionheaders.test | 16 + test/Object/objdump-symbol-table.test | 41 + test/Object/readobj-elf-versioning.test | 46 + test/Object/readobj-shared-object.test | 319 + test/Object/readobj.test | 2 + test/Object/relocation-executable.test | 26 + test/Object/simple-archive.test | 12 + test/Object/yaml2obj-elf-bits-endian.test | 16 + test/Object/yaml2obj-elf-file-headers.yaml | 11 + test/Object/yaml2obj-elf-section-basic.yaml | 35 + .../yaml2obj-elf-symbol-LocalGlobalWeak.yaml | 37 + test/Object/yaml2obj-elf-symbol-basic.yaml | 40 + test/Object/yaml2obj-readobj.test | 25 + test/Other/2002-01-31-CallGraph.ll | 13 + test/Other/2002-02-24-InlineBrokePHINodes.ll | 23 + test/Other/2002-03-11-ConstPropCrash.ll | 24 + test/Other/2003-02-19-LoopInfoNestingBug.ll | 29 + .../2004-08-16-PackedConstantInlineStore.ll | 8 + test/Other/2004-08-16-PackedGlobalConstant.ll | 11 + test/Other/2004-08-16-PackedSelect.ll | 13 + test/Other/2004-08-16-PackedSimple.ll | 13 + test/Other/2004-08-20-PackedControlFlow.ll | 22 + test/Other/2006-02-05-PassManager.ll | 5 + ...007-04-24-eliminate-mostly-empty-blocks.ll | 309 + test/Other/2007-06-05-PassID.ll | 11 + test/Other/2007-06-28-PassManager.ll | 7 + test/Other/2007-09-10-PassManager.ll | 32 + test/Other/2008-02-14-PassManager.ll | 5 + test/Other/2008-06-04-FieldSizeInPacked.ll | 14 + test/Other/2008-10-06-RemoveDeadPass.ll | 11 + test/Other/2008-10-15-MissingSpace.ll | 16 + test/Other/2009-03-31-CallGraph.ll | 34 + test/Other/2009-06-05-no-implicit-float.ll | 4 + test/Other/2009-09-14-function-elements.ll | 6 + test/Other/2010-05-06-Printer.ll | 6 + test/Other/FileCheck-space.txt | 9 + test/Other/Inputs/TestProg/TestProg | 3 + test/Other/Inputs/llvm_cov.gcda | Bin 0 -> 296 bytes test/Other/Inputs/llvm_cov.gcno | Bin 0 -> 984 bytes test/Other/ResponseFile.ll | 13 + .../X86/inline-asm-newline-terminator.ll | 6 + test/Other/X86/lit.local.cfg | 4 + test/Other/attribute-comment.ll | 9 + test/Other/can-execute.txt | 20 + test/Other/close-stderr.ll | 13 + .../Other/constant-fold-gep-address-spaces.ll | 235 + test/Other/constant-fold-gep.ll | 470 + test/Other/extract-alias.ll | 49 + test/Other/extract-linkonce.ll | 24 + test/Other/extract-weak-odr.ll | 23 + test/Other/extract.ll | 28 + test/Other/invalid-commandline-option.ll | 3 + test/Other/link-opts.ll | 13 + test/Other/lint.ll | 188 + test/Other/llvm-cov.test | 4 + test/Other/llvm-nm-without-aliases.ll | 25 + test/Other/optimize-options.ll | 8 + test/Other/pipefail.txt | 2 + test/Other/spir_cc.ll | 13 + test/Other/umask.ll | 14 + test/TableGen/2003-08-03-PassCode.td | 7 + test/TableGen/2006-09-18-LargeInt.td | 7 + test/TableGen/2010-03-24-PrematureDefaults.td | 44 + test/TableGen/AnonDefinitionOnDemand.td | 13 + test/TableGen/BitsInitOverflow.td | 5 + test/TableGen/CStyleComment.td | 14 + test/TableGen/Dag.td | 85 + test/TableGen/DefmInherit.td | 39 + test/TableGen/DefmInsideMultiClass.td | 28 + test/TableGen/FieldAccess.td | 16 + test/TableGen/ForeachList.td | 76 + test/TableGen/ForeachLoop.td | 63 + test/TableGen/ForwardRef.td | 16 + test/TableGen/GeneralList.td | 9 + test/TableGen/Include.inc | 4 + test/TableGen/Include.td | 8 + test/TableGen/IntBitInit.td | 6 + test/TableGen/LazyChange.td | 12 + test/TableGen/LetInsideMultiClasses.td | 34 + test/TableGen/ListArgs.td | 12 + test/TableGen/ListArgsSimple.td | 9 + test/TableGen/ListConversion.td | 11 + test/TableGen/ListManip.td | 12 + test/TableGen/ListOfList.td | 13 + test/TableGen/ListSlices.td | 19 + test/TableGen/LoLoL.td | 18 + test/TableGen/MultiClass.td | 30 + test/TableGen/MultiClassDefName.td | 16 + test/TableGen/MultiClassInherit.td | 96 + test/TableGen/MultiPat.td | 121 + test/TableGen/NestedForeach.td | 74 + test/TableGen/Paste.td | 36 + test/TableGen/SetTheory.td | 176 + test/TableGen/SiblingForeach.td | 277 + test/TableGen/Slice.td | 92 + test/TableGen/String.td | 6 + test/TableGen/SuperSubclassSameName.td | 21 + test/TableGen/TargetInstrInfo.td | 148 + test/TableGen/TargetInstrSpec.td | 103 + test/TableGen/TemplateArgRename.td | 18 + test/TableGen/Tree.td | 19 + test/TableGen/TreeNames.td | 18 + test/TableGen/TwoLevelName.td | 46 + test/TableGen/UnsetBitInit.td | 11 + test/TableGen/UnterminatedComment.td | 6 + test/TableGen/cast.td | 96 + test/TableGen/defmclass.td | 50 + test/TableGen/eq.td | 14 + test/TableGen/eqbit.td | 11 + test/TableGen/foreach.td | 39 + test/TableGen/if.td | 89 + test/TableGen/ifbit.td | 11 + test/TableGen/intrinsic-order.td | 36 + test/TableGen/intrinsic-varargs.td | 30 + test/TableGen/lisp.td | 37 + test/TableGen/list-element-bitref.td | 15 + test/TableGen/lit.local.cfg | 1 + test/TableGen/math.td | 19 + test/TableGen/nested-comment.td | 12 + test/TableGen/pr8330.td | 29 + test/TableGen/strconcat.td | 12 + test/TableGen/subst.td | 78 + test/TableGen/subst2.td | 16 + test/TableGen/usevalname.td | 24 + test/TestRunner.sh | 5 + .../ADCE/2002-01-31-UseStuckAround.ll | 11 + test/Transforms/ADCE/2002-05-22-PHITest.ll | 16 + .../ADCE/2002-05-23-ZeroArgPHITest.ll | 32 + .../ADCE/2002-05-28-Crash-distilled.ll | 17 + test/Transforms/ADCE/2002-05-28-Crash.ll | 54 + .../ADCE/2002-07-17-AssertionFailure.ll | 13 + .../ADCE/2002-07-17-PHIAssertion.ll | 48 + test/Transforms/ADCE/2002-07-29-Segfault.ll | 9 + .../ADCE/2003-01-22-PredecessorProblem.ll | 25 + .../ADCE/2003-04-25-PHIPostDominateProblem.ll | 35 + test/Transforms/ADCE/2003-06-11-InvalidCFG.ll | 28 + .../ADCE/2003-06-24-BadSuccessor.ll | 91 + .../ADCE/2003-06-24-BasicFunctionality.ll | 41 + .../ADCE/2003-09-10-UnwindInstFail.ll | 22 + .../ADCE/2003-09-15-InfLoopCrash.ll | 9 + .../2003-11-16-MissingPostDominanceInfo.ll | 18 + .../ADCE/2004-05-04-UnreachableBlock.ll | 16 + .../ADCE/2005-02-17-PHI-Invoke-Crash.ll | 52 + test/Transforms/ADCE/basictest.ll | 19 + test/Transforms/ADCE/basictest1.ll | 97 + test/Transforms/ADCE/basictest2.ll | 97 + test/Transforms/ADCE/dce_pure_call.ll | 8 + test/Transforms/ADCE/dce_pure_invoke.ll | 19 + test/Transforms/ADCE/unreachable-function.ll | 5 + .../2008-02-01-ReturnAttrs.ll | 19 + .../2008-07-02-array-indexing.ll | 25 + .../ArgumentPromotion/2008-09-07-CGUpdate.ll | 12 + .../2008-09-08-CGUpdateSelfEdge.ll | 25 + .../ArgumentPromotion/aggregate-promote.ll | 24 + test/Transforms/ArgumentPromotion/attrs.ll | 25 + .../Transforms/ArgumentPromotion/basictest.ll | 23 + test/Transforms/ArgumentPromotion/byval-2.ll | 26 + test/Transforms/ArgumentPromotion/byval.ll | 25 + .../ArgumentPromotion/callgraph-update.ll | 23 + test/Transforms/ArgumentPromotion/chained.ll | 17 + .../ArgumentPromotion/control-flow.ll | 19 + .../ArgumentPromotion/control-flow2.ll | 22 + test/Transforms/ArgumentPromotion/crash.ll | 61 + test/Transforms/ArgumentPromotion/pr3085.ll | 1944 + .../ArgumentPromotion/reserve-tbaa.ll | 52 + test/Transforms/BBVectorize/X86/cmp-types.ll | 16 + test/Transforms/BBVectorize/X86/loop1.ll | 61 + test/Transforms/BBVectorize/X86/pr15289.ll | 95 + test/Transforms/BBVectorize/X86/sh-rec.ll | 54 + test/Transforms/BBVectorize/X86/sh-rec2.ll | 85 + test/Transforms/BBVectorize/X86/sh-rec3.ll | 170 + test/Transforms/BBVectorize/X86/sh-types.ll | 25 + test/Transforms/BBVectorize/X86/simple-int.ll | 79 + .../BBVectorize/X86/simple-ldstr.ll | 29 + test/Transforms/BBVectorize/X86/simple.ll | 120 + test/Transforms/BBVectorize/X86/vs-cast.ll | 12 + test/Transforms/BBVectorize/X86/wr-aliases.ll | 144 + test/Transforms/BBVectorize/cycle.ll | 112 + test/Transforms/BBVectorize/func-alias.ll | 244 + test/Transforms/BBVectorize/ld1.ll | 41 + test/Transforms/BBVectorize/lit.local.cfg | 4 + test/Transforms/BBVectorize/loop1.ll | 93 + test/Transforms/BBVectorize/mem-op-depth.ll | 22 + test/Transforms/BBVectorize/metadata.ll | 49 + test/Transforms/BBVectorize/no-ldstr-conn.ll | 23 + test/Transforms/BBVectorize/req-depth.ll | 17 + test/Transforms/BBVectorize/search-limit.ll | 46 + test/Transforms/BBVectorize/simple-int.ll | 133 + .../BBVectorize/simple-ldstr-ptrs.ll | 134 + test/Transforms/BBVectorize/simple-ldstr.ll | 170 + test/Transforms/BBVectorize/simple-sel.ll | 59 + test/Transforms/BBVectorize/simple-tst.ll | 18 + test/Transforms/BBVectorize/simple.ll | 199 + test/Transforms/BBVectorize/simple3.ll | 35 + .../BBVectorize/xcore/no-vector-registers.ll | 18 + .../2007-10-19-InlineAsmDirectives.ll | 18 + .../2004-03-13-LoopExtractorCrash.ll | 75 + .../2004-03-14-DominanceProblem.ll | 33 + .../2004-03-14-NoSwitchSupport.ll | 28 + .../CodeExtractor/2004-03-17-MissedLiveIns.ll | 47 + .../2004-03-17-UpdatePHIsOutsideRegion.ll | 23 + .../2004-03-18-InvokeHandling.ll | 198 + .../2004-08-12-BlockExtractPHI.ll | 26 + .../CodeExtractor/2004-11-12-InvokeExtract.ll | 18 + .../CodeGenPrepare/2008-11-24-RAUW-Self.ll | 511 + test/Transforms/CodeGenPrepare/basic.ll | 30 + .../2002-05-03-DivideByZeroException.ll | 15 + .../ConstProp/2002-05-03-NotOperator.ll | 19 + .../ConstProp/2002-09-03-SetCC-Bools.ll | 20 + .../ConstProp/2003-05-12-DivideError.ll | 15 + .../ConstProp/2005-01-28-SetCCGEP.ll | 10 + .../ConstProp/2006-11-30-vector-cast.ll | 10 + .../ConstProp/2006-12-01-TruncBoolBug.ll | 7 + .../ConstProp/2006-12-01-bool-casts.ll | 15 + .../ConstProp/2007-02-05-BitCast.ll | 7 + test/Transforms/ConstProp/2007-02-23-sdiv.ll | 5 + test/Transforms/ConstProp/2007-11-23-cttz.ll | 8 + .../ConstProp/2008-07-07-VectorCompare.ll | 28 + .../2009-06-20-constexpr-zero-lhs.ll | 11 + .../ConstProp/2009-09-01-GEP-Crash.ll | 24 + test/Transforms/ConstProp/basictest.ll | 53 + test/Transforms/ConstProp/bitcast.ll | 10 + test/Transforms/ConstProp/bswap.ll | 41 + test/Transforms/ConstProp/calls.ll | 149 + test/Transforms/ConstProp/constant-expr.ll | 111 + test/Transforms/ConstProp/div-zero.ll | 12 + test/Transforms/ConstProp/extractvalue.ll | 67 + .../Transforms/ConstProp/float-to-ptr-cast.ll | 15 + test/Transforms/ConstProp/insertvalue.ll | 67 + test/Transforms/ConstProp/loads.ll | 221 + test/Transforms/ConstProp/logicaltest.ll | 35 + test/Transforms/ConstProp/overflow-ops.ll | 207 + test/Transforms/ConstProp/phi.ll | 17 + test/Transforms/ConstProp/remtest.ll | 24 + .../ConstantMerge/2002-09-23-CPR-Update.ll | 13 + .../2003-10-28-MergeExternalConstants.ll | 7 + .../ConstantMerge/2011-01-15-EitherOrder.ll | 18 + test/Transforms/ConstantMerge/align.ll | 28 + test/Transforms/ConstantMerge/dont-merge.ll | 44 + .../ConstantMerge/linker-private.ll | 23 + test/Transforms/ConstantMerge/merge-both.ll | 42 + test/Transforms/ConstantMerge/unnamed-addr.ll | 40 + .../2010-09-02-Trunc.ll | 25 + .../2010-09-26-MergeConstantRange.ll | 82 + .../CorrelatedValuePropagation/basic.ll | 201 + .../CorrelatedValuePropagation/crash.ll | 62 + .../CorrelatedValuePropagation/non-null.ll | 103 + .../CorrelatedValuePropagation/range.ll | 167 + .../DeadArgElim/2006-06-27-struct-ret.ll | 11 + .../DeadArgElim/2007-02-07-FuncRename.ll | 11 + .../DeadArgElim/2007-10-18-VarargsReturn.ll | 12 + .../DeadArgElim/2007-12-20-ParamAttrs.ll | 20 + .../2008-01-16-VarargsParamAttrs.ll | 31 + .../DeadArgElim/2008-06-23-DeadAfterLive.ll | 23 + .../DeadArgElim/2009-03-17-MRE-Invoke.ll | 32 + .../DeadArgElim/2010-04-30-DbgInfo.ll | 78 + .../2013-05-17-VarargsAndBlockAddress.ll | 25 + test/Transforms/DeadArgElim/basictest.ll | 36 + test/Transforms/DeadArgElim/canon.ll | 24 + test/Transforms/DeadArgElim/dbginfo.ll | 65 + test/Transforms/DeadArgElim/dead_vaargs.ll | 12 + test/Transforms/DeadArgElim/deadexternal.ll | 52 + test/Transforms/DeadArgElim/deadretval.ll | 18 + test/Transforms/DeadArgElim/deadretval2.ll | 59 + test/Transforms/DeadArgElim/keepalive.ll | 31 + test/Transforms/DeadArgElim/linkage.ll | 21 + test/Transforms/DeadArgElim/multdeadretval.ll | 68 + test/Transforms/DeadArgElim/returned.ll | 55 + .../Transforms/DeadArgElim/variadic_safety.ll | 38 + .../2011-03-25-DSEMiscompile.ll | 23 + .../2011-09-06-EndOfFunction.ll | 23 + .../DeadStoreElimination/2011-09-06-MemCpy.ll | 85 + .../DeadStoreElimination/OverwriteStoreEnd.ll | 95 + .../DeadStoreElimination/PartialStore.ll | 71 + .../Transforms/DeadStoreElimination/atomic.ll | 107 + .../DeadStoreElimination/const-pointers.ll | 39 + test/Transforms/DeadStoreElimination/crash.ll | 74 + .../DeadStoreElimination/dominate.ll | 25 + test/Transforms/DeadStoreElimination/free.ll | 70 + .../DeadStoreElimination/inst-limits.ll | 261 + .../DeadStoreElimination/libcalls.ll | 70 + .../DeadStoreElimination/lifetime.ll | 37 + .../DeadStoreElimination/memintrinsics.ll | 47 + .../DeadStoreElimination/no-targetdata.ll | 15 + .../DeadStoreElimination/pr11390.ll | 38 + .../Transforms/DeadStoreElimination/simple.ll | 326 + test/Transforms/DebugIR/crash.ll | 42 + test/Transforms/DebugIR/exception.ll | 127 + test/Transforms/DebugIR/function.ll | 51 + test/Transforms/DebugIR/simple-addrspace.ll | 13 + test/Transforms/DebugIR/simple.ll | 25 + test/Transforms/DebugIR/struct.ll | 24 + test/Transforms/DebugIR/vector.ll | 93 + test/Transforms/EarlyCSE/basic.ll | 121 + test/Transforms/EarlyCSE/commute.ll | 66 + test/Transforms/EarlyCSE/floatingpoint.ll | 14 + test/Transforms/EarlyCSE/instsimplify-dom.ll | 19 + .../FunctionAttrs/2008-09-03-Mutual.ll | 11 + .../FunctionAttrs/2008-09-03-ReadNone.ll | 24 + .../FunctionAttrs/2008-09-03-ReadOnly.ll | 13 + .../FunctionAttrs/2008-09-13-VolatileRead.ll | 9 + .../FunctionAttrs/2008-12-29-Constant.ll | 8 + .../FunctionAttrs/2009-01-02-LocalStores.ll | 23 + .../FunctionAttrs/2009-01-04-Annotate.ll | 21 + .../FunctionAttrs/2010-10-30-volatile.ll | 10 + test/Transforms/FunctionAttrs/annotate-1.ll | 23 + test/Transforms/FunctionAttrs/atomic.ll | 23 + test/Transforms/FunctionAttrs/nocapture.ll | 180 + test/Transforms/FunctionAttrs/noreturn.ll | 18 + test/Transforms/FunctionAttrs/readattrs.ll | 47 + test/Transforms/GCOVProfiling/linkagename.ll | 29 + test/Transforms/GCOVProfiling/version.ll | 32 + .../GVN/2007-07-25-DominatedLoop.ll | 86 + .../Transforms/GVN/2007-07-25-InfiniteLoop.ll | 14 + test/Transforms/GVN/2007-07-25-Loop.ll | 15 + test/Transforms/GVN/2007-07-25-NestedLoop.ll | 38 + .../GVN/2007-07-25-SinglePredecessor.ll | 29 + .../GVN/2007-07-26-InterlockingLoops.ll | 40 + .../Transforms/GVN/2007-07-26-NonRedundant.ll | 16 + test/Transforms/GVN/2007-07-26-PhiErasure.ll | 28 + test/Transforms/GVN/2007-07-30-PredIDom.ll | 274 + .../Transforms/GVN/2007-07-31-NoDomInherit.ll | 313 + .../Transforms/GVN/2007-07-31-RedundantPhi.ll | 22 + test/Transforms/GVN/2008-02-12-UndefLoad.ll | 20 + test/Transforms/GVN/2008-02-13-NewPHI.ll | 22 + test/Transforms/GVN/2008-07-02-Unreachable.ll | 35 + test/Transforms/GVN/2008-12-09-SelfRemove.ll | 26 + test/Transforms/GVN/2008-12-12-RLE-Crash.ll | 35 + .../GVN/2008-12-14-rle-reanalyze.ll | 18 + .../Transforms/GVN/2008-12-15-CacheVisited.ll | 28 + .../GVN/2009-01-21-SortInvalidation.ll | 55 + .../GVN/2009-01-22-SortInvalidation.ll | 100 + .../Transforms/GVN/2009-02-17-LoadPRECrash.ll | 193 + test/Transforms/GVN/2009-03-10-PREOnVoid.ll | 82 + test/Transforms/GVN/2009-06-17-InvalidPRE.ll | 72 + .../GVN/2009-07-13-MemDepSortFail.ll | 67 + .../GVN/2009-11-12-MemDepMallocBitCast.ll | 15 + .../GVN/2010-03-31-RedundantPHIs.ll | 42 + test/Transforms/GVN/2010-05-08-OneBit.ll | 67 + test/Transforms/GVN/2010-11-13-Simplify.ll | 15 + test/Transforms/GVN/2011-04-27-phioperands.ll | 106 + .../2011-06-01-NonLocalMemdepMiscompile.ll | 61 + .../GVN/2011-07-07-MatchIntrinsicExtract.ll | 85 + test/Transforms/GVN/2011-09-07-TypeIdFor.ll | 81 + test/Transforms/GVN/2012-05-22-PreCrash.ll | 33 + test/Transforms/GVN/MemdepMiscompile.ll | 54 + test/Transforms/GVN/atomic.ll | 80 + test/Transforms/GVN/basic.ll | 10 + test/Transforms/GVN/bitcast-of-call.ll | 12 + test/Transforms/GVN/calls-nonlocal.ll | 49 + test/Transforms/GVN/calls-readonly.ll | 29 + test/Transforms/GVN/commute.ll | 23 + test/Transforms/GVN/cond_br.ll | 55 + test/Transforms/GVN/cond_br2.ll | 140 + test/Transforms/GVN/condprop.ll | 251 + test/Transforms/GVN/crash-no-aa.ll | 15 + test/Transforms/GVN/crash.ll | 201 + test/Transforms/GVN/edge.ll | 60 + test/Transforms/GVN/fpmath.ll | 45 + test/Transforms/GVN/lifetime-simple.ll | 20 + test/Transforms/GVN/load-constant-mem.ll | 13 + test/Transforms/GVN/load-pre-align.ll | 44 + test/Transforms/GVN/load-pre-licm.ll | 39 + test/Transforms/GVN/local-pre.ll | 18 + test/Transforms/GVN/lpre-call-wrap-2.ll | 40 + test/Transforms/GVN/lpre-call-wrap.ll | 55 + test/Transforms/GVN/malloc-load-removal.ll | 56 + test/Transforms/GVN/non-local-offset.ll | 59 + test/Transforms/GVN/nonescaping-malloc.ll | 109 + test/Transforms/GVN/null-aliases-nothing.ll | 20 + .../GVN/phi-translate-partial-alias.ll | 27 + test/Transforms/GVN/phi-translate.ll | 31 + test/Transforms/GVN/pr10820.ll | 18 + test/Transforms/GVN/pr12979.ll | 79 + test/Transforms/GVN/pr14166.ll | 27 + test/Transforms/GVN/pr17732.ll | 30 + test/Transforms/GVN/pr17852.ll | 66 + test/Transforms/GVN/pre-basic-add.ll | 27 + test/Transforms/GVN/pre-compare.ll | 68 + test/Transforms/GVN/pre-load.ll | 391 + test/Transforms/GVN/pre-single-pred.ll | 45 + test/Transforms/GVN/preserve-tbaa.ll | 31 + test/Transforms/GVN/range.ll | 101 + test/Transforms/GVN/readattrs.ll | 17 + test/Transforms/GVN/rle-must-alias.ll | 46 + test/Transforms/GVN/rle-no-phi-translate.ll | 28 + test/Transforms/GVN/rle-nonlocal.ll | 25 + test/Transforms/GVN/rle-phi-translate.ll | 146 + test/Transforms/GVN/rle-semidominated.ll | 20 + test/Transforms/GVN/rle.ll | 689 + test/Transforms/GVN/tbaa.ll | 91 + .../GVN/unreachable_block_infinite_loop.ll | 14 + .../GlobalDCE/2002-07-17-CastRef.ll | 11 + .../GlobalDCE/2002-07-17-ConstantRef.ll | 13 + .../GlobalDCE/2002-08-17-FunctionDGE.ll | 17 + .../GlobalDCE/2002-08-17-WorkListTest.ll | 12 + .../GlobalDCE/2002-09-12-Redeletion.ll | 11 + .../GlobalDCE/2003-07-01-SelfReference.ll | 11 + .../2003-10-09-PreserveWeakGlobals.ll | 6 + .../GlobalDCE/2009-01-05-DeadAliases.ll | 8 + .../GlobalDCE/2009-02-17-AliasUsesAliasee.ll | 4 + .../Transforms/GlobalDCE/basicvariabletest.ll | 5 + .../GlobalDCE/complex-constantexpr.ll | 97 + .../GlobalDCE/externally_available.ll | 10 + test/Transforms/GlobalDCE/indirectbr.ll | 18 + .../GlobalOpt/2004-10-10-CastStoreOnce.ll | 17 + .../2005-06-15-LocalizeConstExprCrash.ll | 10 + test/Transforms/GlobalOpt/2005-09-27-Crash.ll | 27 + .../GlobalOpt/2006-07-07-InlineAsmCrash.ll | 135 + .../2006-11-01-ShrinkGlobalPhiCrash.ll | 33 + test/Transforms/GlobalOpt/2007-04-05-Crash.ll | 34 + test/Transforms/GlobalOpt/2007-05-13-Crash.ll | 74 + .../GlobalOpt/2007-06-04-PackedStruct.ll | 36 + .../GlobalOpt/2007-11-09-GEP-GEP-Crash.ll | 19 + test/Transforms/GlobalOpt/2008-01-03-Crash.ll | 26 + .../GlobalOpt/2008-01-13-OutOfRangeSROA.ll | 16 + .../GlobalOpt/2008-01-29-VolatileGlobal.ll | 9 + .../GlobalOpt/2008-04-26-SROA-Global-Align.ll | 32 + .../GlobalOpt/2008-07-17-addrspace.ll | 28 + .../GlobalOpt/2008-12-16-HeapSRACrash-2.ll | 28 + .../GlobalOpt/2008-12-16-HeapSRACrash.ll | 30 + .../GlobalOpt/2009-01-13-phi-user.ll | 35 + .../GlobalOpt/2009-02-15-BitcastAlias.ll | 10 + .../GlobalOpt/2009-02-15-ResolveAlias.ll | 24 + test/Transforms/GlobalOpt/2009-03-05-dbg.ll | 79 + .../GlobalOpt/2009-03-06-Anonymous.ll | 11 + .../GlobalOpt/2009-03-07-PromotePtrToBool.ll | 17 + .../GlobalOpt/2009-06-01-RecursivePHI.ll | 122 + .../2009-11-16-BrokenPerformHeapAllocSRoA.ll | 26 + ...2009-11-16-MallocSingleStoreToGlobalVar.ll | 30 + .../GlobalOpt/2010-02-25-MallocPromote.ll | 18 + .../GlobalOpt/2010-02-26-MallocSROA.ll | 27 + .../GlobalOpt/2010-10-19-WeakOdr.ll | 16 + .../GlobalOpt/2011-04-09-EmptyGlobalCtors.ll | 5 + .../GlobalOpt/2012-05-11-blockaddress.ll | 16 + test/Transforms/GlobalOpt/alias-resolve.ll | 38 + test/Transforms/GlobalOpt/alias-used.ll | 47 + test/Transforms/GlobalOpt/array-elem-refs.ll | 32 + test/Transforms/GlobalOpt/atexit.ll | 6 + test/Transforms/GlobalOpt/atomic.ll | 25 + test/Transforms/GlobalOpt/basictest.ll | 9 + test/Transforms/GlobalOpt/blockaddress.ll | 20 + .../GlobalOpt/cleanup-pointer-root-users.ll | 49 + test/Transforms/GlobalOpt/compiler-used.ll | 16 + .../GlobalOpt/constantexpr-dangle.ll | 13 + .../GlobalOpt/constantfold-initializers.ll | 56 + test/Transforms/GlobalOpt/crash-2.ll | 19 + test/Transforms/GlobalOpt/crash.ll | 80 + .../GlobalOpt/ctor-list-opt-constexpr.ll | 34 + .../GlobalOpt/ctor-list-opt-inbounds.ll | 23 + test/Transforms/GlobalOpt/ctor-list-opt.ll | 100 + test/Transforms/GlobalOpt/cxx-dtor.ll | 33 + test/Transforms/GlobalOpt/deadfunction.ll | 27 + test/Transforms/GlobalOpt/deadglobal-2.ll | 11 + test/Transforms/GlobalOpt/deadglobal.ll | 25 + .../externally-initialized-global-ctr.ll | 35 + .../Transforms/GlobalOpt/globalsra-partial.ll | 24 + .../GlobalOpt/globalsra-unknown-index.ll | 41 + test/Transforms/GlobalOpt/globalsra.ll | 24 + test/Transforms/GlobalOpt/heap-sra-1.ll | 38 + test/Transforms/GlobalOpt/heap-sra-2.ll | 38 + test/Transforms/GlobalOpt/heap-sra-3.ll | 39 + test/Transforms/GlobalOpt/heap-sra-4.ll | 39 + test/Transforms/GlobalOpt/heap-sra-phi.ll | 43 + test/Transforms/GlobalOpt/integer-bool.ll | 28 + .../GlobalOpt/invariant-nodatalayout.ll | 17 + test/Transforms/GlobalOpt/invariant.ll | 59 + test/Transforms/GlobalOpt/invoke.ll | 27 + test/Transforms/GlobalOpt/iterate.ll | 11 + .../Transforms/GlobalOpt/load-store-global.ll | 38 + test/Transforms/GlobalOpt/malloc-promote-1.ll | 24 + test/Transforms/GlobalOpt/malloc-promote-2.ll | 19 + test/Transforms/GlobalOpt/malloc-promote-3.ll | 18 + test/Transforms/GlobalOpt/memcpy.ll | 13 + test/Transforms/GlobalOpt/memset-null.ll | 29 + test/Transforms/GlobalOpt/memset.ll | 18 + test/Transforms/GlobalOpt/metadata.ll | 26 + test/Transforms/GlobalOpt/phi-select.ll | 31 + .../GlobalOpt/storepointer-compare.ll | 30 + test/Transforms/GlobalOpt/storepointer.ll | 19 + test/Transforms/GlobalOpt/tls.ll | 53 + test/Transforms/GlobalOpt/trivialstore.ll | 19 + test/Transforms/GlobalOpt/undef-init.ll | 17 + test/Transforms/GlobalOpt/unnamed-addr.ll | 68 + .../GlobalOpt/zeroinitializer-gep-load.ll | 11 + .../IPConstantProp/2008-06-09-WeakProp.ll | 15 + .../IPConstantProp/2009-09-24-byval-ptr.ll | 40 + .../IPConstantProp/dangling-block-address.ll | 42 + test/Transforms/IPConstantProp/deadarg.ll | 6 + test/Transforms/IPConstantProp/global.ll | 26 + test/Transforms/IPConstantProp/recursion.ll | 12 + .../IPConstantProp/return-argument.ll | 57 + .../IPConstantProp/return-constant.ll | 30 + .../IPConstantProp/return-constants.ll | 46 + .../IPConstantProp/user-with-multiple-uses.ll | 34 + .../2002-09-09-PointerIndVar.ll | 17 + .../IndVarSimplify/2003-04-16-ExprAnalysis.ll | 17 + .../IndVarSimplify/2003-09-23-NotAtTop.ll | 20 + .../2003-12-10-RemoveInstrCrash.ll | 18 + .../IndVarSimplify/2003-12-15-Crash.ll | 24 + .../2004-03-10-PHIInsertionBug.ll | 26 + .../2004-04-05-InvokeCastCrash.ll | 291 + .../2004-04-07-ScalarEvolutionCrash.ll | 27 + .../IndVarSimplify/2005-02-11-InvokeCrash.ll | 27 + .../2005-02-17-TruncateExprCrash.ll | 67 + .../2005-02-26-ExitValueCompute.ll | 20 + .../2005-06-15-InstMoveCrash.ll | 37 + .../IndVarSimplify/2005-11-18-Crash.ll | 17 + .../2006-03-31-NegativeStride.ll | 22 + .../2006-06-16-Indvar-LCSSA-Crash.ll | 22 + .../IndVarSimplify/2006-09-20-LFTR-Crash.ll | 44 + .../IndVarSimplify/2006-12-10-BitCast.ll | 33 + .../IndVarSimplify/2007-01-06-TripCount.ll | 38 + .../2007-06-06-DeleteDanglesPtr.ll | 117 + .../IndVarSimplify/2007-11-23-BitcastCrash.ll | 20 + .../2008-06-15-SCEVExpanderBug.ll | 17 + .../IndVarSimplify/2008-09-02-IVType.ll | 58 + .../2008-10-03-CouldNotCompute.ll | 32 + .../2008-11-25-APFloatAssert.ll | 11 + .../2009-04-14-shorten_iv_vars.ll | 114 + .../2009-04-15-shorten-iv-vars-2.ll | 160 + .../IndVarSimplify/2009-04-22-IndvarCrash.ll | 35 + .../IndVarSimplify/2009-04-27-Floating.ll | 19 + .../IndVarSimplify/2009-05-24-useafterfree.ll | 41 + .../IndVarSimplify/2011-09-10-widen-nsw.ll | 30 + .../IndVarSimplify/2011-09-19-vectoriv.ll | 16 + .../IndVarSimplify/2011-09-27-hoistsext.ll | 28 + .../IndVarSimplify/2011-10-27-lftrnull.ll | 59 + .../IndVarSimplify/2011-11-01-lftrptr.ll | 140 + .../IndVarSimplify/2011-11-15-multiexit.ll | 40 + .../IndVarSimplify/2011-11-17-selfphi.ll | 29 + .../IndVarSimplify/2012-07-17-lftr-undef.ll | 22 + .../2012-10-19-congruent-constant.ll | 27 + test/Transforms/IndVarSimplify/ada-loops.ll | 92 + .../IndVarSimplify/ashr-tripcount.ll | 107 + test/Transforms/IndVarSimplify/avoid-i0.ll | 126 + .../IndVarSimplify/casted-argument.ll | 50 + test/Transforms/IndVarSimplify/crash.ll | 133 + .../Transforms/IndVarSimplify/dangling-use.ll | 41 + .../IndVarSimplify/divide-pointer.ll | 95 + .../IndVarSimplify/dont-recompute.ll | 69 + test/Transforms/IndVarSimplify/elim-extend.ll | 153 + .../IndVarSimplify/eliminate-comparison.ll | 211 + .../IndVarSimplify/eliminate-max.ll | 52 + .../IndVarSimplify/eliminate-rem.ll | 121 + .../IndVarSimplify/exit_value_tests.ll | 114 + .../IndVarSimplify/floating-point-iv.ll | 92 + test/Transforms/IndVarSimplify/indirectbr.ll | 39 + .../IndVarSimplify/interesting-invoke-use.ll | 61 + .../iterationCount_zext_or_trunc.ll | 25 + test/Transforms/IndVarSimplify/iv-fold.ll | 56 + test/Transforms/IndVarSimplify/iv-sext.ll | 149 + test/Transforms/IndVarSimplify/iv-zext.ll | 33 + .../lftr-address-space-pointers.ll | 69 + .../IndVarSimplify/lftr-extend-const.ll | 44 + .../IndVarSimplify/lftr-other-uses.ll | 36 + .../Transforms/IndVarSimplify/lftr-promote.ll | 38 + test/Transforms/IndVarSimplify/lftr-reuse.ll | 233 + test/Transforms/IndVarSimplify/lftr-zext.ll | 26 + test/Transforms/IndVarSimplify/lftr_simple.ll | 22 + .../IndVarSimplify/loop_evaluate10.ll | 53 + .../IndVarSimplify/loop_evaluate11.ll | 36 + .../IndVarSimplify/loop_evaluate7.ll | 61 + .../IndVarSimplify/loop_evaluate8.ll | 63 + .../IndVarSimplify/loop_evaluate9.ll | 83 + .../IndVarSimplify/loop_evaluate_1.ll | 47 + .../IndVarSimplify/loop_evaluate_2.ll | 28 + .../IndVarSimplify/loop_evaluate_3.ll | 19 + .../IndVarSimplify/loop_evaluate_4.ll | 20 + .../IndVarSimplify/loop_evaluate_5.ll | 32 + .../IndVarSimplify/loop_evaluate_6.ll | 26 + test/Transforms/IndVarSimplify/masked-iv.ll | 26 + .../IndVarSimplify/no-iv-rewrite.ll | 396 + .../phi-uses-value-multiple-times.ll | 38 + .../IndVarSimplify/polynomial-expand.ll | 38 + .../IndVarSimplify/preserve-signed-wrap.ll | 39 + .../promote-iv-to-eliminate-casts.ll | 99 + .../IndVarSimplify/shrunk-constant.ll | 15 + .../IndVarSimplify/signed-trip-count.ll | 30 + .../IndVarSimplify/single-element-range.ll | 27 + test/Transforms/IndVarSimplify/sink-alloca.ll | 56 + .../IndVarSimplify/sink-trapping.ll | 19 + .../IndVarSimplify/tripcount_compute.ll | 162 + .../IndVarSimplify/tripcount_infinite.ll | 38 + .../udiv-invariant-but-traps.ll | 32 + test/Transforms/IndVarSimplify/udiv.ll | 162 + test/Transforms/IndVarSimplify/uglygep.ll | 40 + .../IndVarSimplify/ult-sub-to-eq.ll | 42 + .../IndVarSimplify/variable-stride-ivs-0.ll | 43 + .../IndVarSimplify/variable-stride-ivs-1.ll | 43 + test/Transforms/IndVarSimplify/verify-scev.ll | 421 + test/Transforms/IndVarSimplify/widen-nsw.ll | 29 + .../Inline/2003-09-14-InlineValue.ll | 25 + .../Inline/2003-09-22-PHINodeInlineFail.ll | 22 + .../2003-09-22-PHINodesInExceptionDest.ll | 32 + .../2003-09-22-PHINodesInNormalInvokeDest.ll | 25 + .../2003-10-13-AllocaDominanceProblem.ll | 19 + .../Inline/2004-04-15-InlineDeletesCall.ll | 20 + .../Inline/2004-04-20-InlineLinkOnce.ll | 11 + .../2004-10-17-InlineFunctionWithoutReturn.ll | 11 + .../Inline/2006-01-14-CallGraphUpdate.ll | 25 + .../Inline/2006-07-12-InlinePruneCGUpdate.ll | 840 + .../Inline/2006-11-09-InlineCGUpdate-2.ll | 252 + .../Inline/2006-11-09-InlineCGUpdate.ll | 343 + test/Transforms/Inline/2007-04-15-InlineEH.ll | 53 + .../Inline/2007-06-25-WeakInline.ll | 14 + .../Inline/2007-12-19-InlineNoUnwind.ll | 19 + test/Transforms/Inline/2008-09-02-NoInline.ll | 10 + .../2009-01-08-NoInlineDynamicAlloca.ll | 36 + .../Inline/2009-01-13-RecursiveInlineCrash.ll | 293 + .../Inline/2009-05-07-CallUsingSelfCrash.ll | 20 + test/Transforms/Inline/2010-05-12-ValueMap.ll | 28 + .../Inline/2010-05-31-ByvalTailcall.ll | 24 + test/Transforms/Inline/PR4909.ll | 15 + test/Transforms/Inline/alloca-bonus.ll | 155 + test/Transforms/Inline/alloca-in-scc.ll | 31 + .../Inline/alloca-merge-align-nodl.ll | 88 + test/Transforms/Inline/alloca-merge-align.ll | 122 + test/Transforms/Inline/alloca_test.ll | 23 + test/Transforms/Inline/always-inline.ll | 124 + test/Transforms/Inline/array_merge.ll | 26 + test/Transforms/Inline/attributes.ll | 112 + test/Transforms/Inline/basictest.ll | 92 + test/Transforms/Inline/blockaddress.ll | 27 + test/Transforms/Inline/byval.ll | 129 + test/Transforms/Inline/callgraph-update.ll | 36 + test/Transforms/Inline/casts.ll | 19 + test/Transforms/Inline/cfg_preserve_test.ll | 16 + test/Transforms/Inline/crash.ll | 127 + test/Transforms/Inline/crash2.ll | 29 + test/Transforms/Inline/delete-call.ll | 26 + test/Transforms/Inline/devirtualize-2.ll | 44 + test/Transforms/Inline/devirtualize-3.ll | 79 + test/Transforms/Inline/devirtualize.ll | 182 + test/Transforms/Inline/dynamic_alloca_test.ll | 45 + .../Transforms/Inline/externally_available.ll | 16 + .../Transforms/Inline/gvn-inline-iteration.ll | 23 + test/Transforms/Inline/inline-byval-bonus.ll | 193 + test/Transforms/Inline/inline-invoke-tail.ll | 33 + .../Inline/inline-invoke-with-asm-call.ll | 32 + test/Transforms/Inline/inline-optnone.ll | 52 + test/Transforms/Inline/inline-optsize.ll | 33 + test/Transforms/Inline/inline-tail.ll | 15 + test/Transforms/Inline/inline_cleanup.ll | 213 + test/Transforms/Inline/inline_constprop.ll | 281 + test/Transforms/Inline/inline_dce.ll | 25 + test/Transforms/Inline/inline_invoke.ll | 352 + test/Transforms/Inline/inline_minisize.ll | 232 + test/Transforms/Inline/inline_prune.ll | 45 + .../Transforms/Inline/inline_returns_twice.ll | 84 + test/Transforms/Inline/inline_ssp.ll | 160 + test/Transforms/Inline/invoke-cost.ll | 45 + test/Transforms/Inline/invoke_test-1.ll | 28 + test/Transforms/Inline/invoke_test-2.ll | 36 + test/Transforms/Inline/invoke_test-3.ll | 38 + .../Inline/lifetime-no-datalayout.ll | 23 + test/Transforms/Inline/lifetime.ll | 100 + test/Transforms/Inline/nested-inline.ll | 111 + .../Inline/noinline-recursive-fn.ll | 110 + test/Transforms/Inline/noinline.ll | 18 + test/Transforms/Inline/ptr-diff.ll | 101 + test/Transforms/Inline/recursive.ll | 38 + .../InstCombine/2002-03-11-InstCombineHang.ll | 9 + .../InstCombine/2002-05-14-SubFailure.ll | 11 + .../InstCombine/2002-08-02-CastTest.ll | 11 + .../InstCombine/2002-12-05-MissedConstProp.ll | 13 + .../InstCombine/2003-05-26-CastMiscompile.ll | 8 + .../InstCombine/2003-05-27-ConstExprCrash.ll | 10 + .../2003-06-05-BranchInvertInfLoop.ll | 16 + .../2003-07-21-ExternalConstant.ll | 44 + .../InstCombine/2003-08-12-AllocaNonNull.ll | 21 + .../2003-09-09-VolatileLoadElim.ll | 7 + .../InstCombine/2003-10-29-CallSiteResolve.ll | 18 + .../InstCombine/2003-11-03-VarargsCallBug.ll | 13 + .../2004-01-13-InstCombineInvokePHI.ll | 31 + .../2004-02-23-ShiftShiftOverflow.ll | 15 + .../2004-03-13-InstCombineInfLoop.ll | 13 + ...004-04-04-InstCombineReplaceAllUsesWith.ll | 10 + .../InstCombine/2004-05-07-UnsizedCastLoad.ll | 10 + .../InstCombine/2004-07-27-ConstantExprMul.ll | 9 + .../InstCombine/2004-08-09-RemInfLoop.ll | 9 + .../InstCombine/2004-08-10-BoolSetCC.ll | 8 + .../InstCombine/2004-09-20-BadLoadCombine.ll | 18 + .../InstCombine/2004-09-20-BadLoadCombine2.ll | 25 + .../2004-09-28-BadShiftAndSetCC.ll | 9 + .../InstCombine/2004-11-22-Missed-and-fold.ll | 10 + ...004-11-27-SetCCForCastLargerAndConstant.ll | 192 + .../InstCombine/2004-12-08-RemInfiniteLoop.ll | 7 + .../InstCombine/2005-03-04-ShiftOverflow.ll | 9 + .../InstCombine/2005-04-07-UDivSelectCrash.ll | 8 + .../InstCombine/2005-06-15-DivSelectCrash.ll | 10 + .../InstCombine/2005-06-15-ShiftSetCCCrash.ll | 9 + .../InstCombine/2005-06-16-RangeCrash.ll | 9 + .../2005-06-16-SetCCOrSetCCMiscompile.ll | 14 + .../InstCombine/2005-07-07-DeadPHILoop.ll | 14 + .../2006-02-13-DemandedMiscompile.ll | 10 + .../InstCombine/2006-02-28-Crash.ll | 8 + .../InstCombine/2006-03-30-ExtractElement.ll | 8 + .../2006-04-28-ShiftShiftLongLong.ll | 13 + .../2006-05-04-DemandedBitCrash.ll | 51 + .../InstCombine/2006-09-15-CastToBool.ll | 14 + ...06-10-19-SignedToUnsignedCastAndConst-2.ll | 10 + .../Transforms/InstCombine/2006-10-20-mask.ll | 11 + .../InstCombine/2006-10-26-VectorReassoc.ll | 10 + .../InstCombine/2006-11-10-ashr-miscompile.ll | 9 + .../2006-12-01-BadFPVectorXform.ll | 9 + .../InstCombine/2006-12-05-fp-to-int-ext.ll | 12 + .../2006-12-08-Phi-ICmp-Op-Fold.ll | 51 + .../InstCombine/2006-12-08-Select-ICmp.ll | 42 + .../InstCombine/2006-12-15-Range-Test.ll | 31 + .../InstCombine/2006-12-23-Select-Cmp-Cmp.ll | 30 + .../2007-01-13-ExtCompareMiscompile.ll | 10 + .../InstCombine/2007-01-14-FcmpSelf.ll | 6 + .../InstCombine/2007-01-18-VectorInfLoop.ll | 7 + .../InstCombine/2007-01-27-AndICmp.ll | 8 + .../InstCombine/2007-02-01-LoadSinkAlloca.ll | 45 + .../InstCombine/2007-02-07-PointerCast.ll | 22 + .../InstCombine/2007-02-23-PhiFoldInfLoop.ll | 31 + .../InstCombine/2007-03-13-CompareMerge.ll | 9 + .../2007-03-19-BadTruncChangePR1261.ll | 10 + .../InstCombine/2007-03-21-SignedRangeTest.ll | 7 + .../InstCombine/2007-03-25-BadShiftMask.ll | 29 + .../InstCombine/2007-03-25-DoubleShift.ll | 9 + .../InstCombine/2007-03-26-BadShiftMask.ll | 35 + .../2007-04-08-SingleEltVectorCrash.ll | 7 + .../InstCombine/2007-05-10-icmp-or.ll | 8 + .../InstCombine/2007-05-14-Crash.ll | 18 + .../InstCombine/2007-05-18-CastFoldBug.ll | 10 + .../InstCombine/2007-06-06-AshrSignBit.ll | 22 + .../2007-06-21-DivCompareMiscomp.ll | 9 + .../InstCombine/2007-08-02-InfiniteLoop.ll | 10 + .../InstCombine/2007-09-10-AliasConstFold.ll | 13 + .../InstCombine/2007-09-17-AliasConstFold2.ll | 14 + .../InstCombine/2007-10-10-EliminateMemCpy.ll | 20 + .../InstCombine/2007-10-12-Crash.ll | 38 + .../InstCombine/2007-10-28-stacksave.ll | 47 + .../InstCombine/2007-10-31-RangeCrash.ll | 35 + .../InstCombine/2007-10-31-StringCrash.ll | 21 + .../2007-11-07-OpaqueAlignCrash.ll | 22 + .../InstCombine/2007-11-15-CompareMiscomp.ll | 10 + .../InstCombine/2007-11-22-IcmpCrash.ll | 16 + .../2007-11-25-CompatibleAttributes.ll | 12 + .../2007-12-10-ConstFoldCompare.ll | 9 + .../InstCombine/2007-12-12-GEPScale.ll | 10 + .../InstCombine/2007-12-16-AsmNoUnwind.ll | 7 + .../InstCombine/2007-12-18-AddSelCmpSub.ll | 29 + .../InstCombine/2007-12-28-IcmpSub2.ll | 89 + .../2008-01-06-BitCastAttributes.ll | 30 + .../InstCombine/2008-01-06-CastCrash.ll | 10 + .../InstCombine/2008-01-06-VoidCast.ll | 12 + .../InstCombine/2008-01-13-AndCmpCmp.ll | 9 + .../2008-01-13-NoBitCastAttributes.ll | 15 + .../2008-01-14-VarArgTrampoline.ll | 26 + .../2008-01-21-MismatchedCastAndCompare.ll | 20 + .../InstCombine/2008-01-21-MulTrunc.ll | 17 + .../InstCombine/2008-01-27-FloatSelect.ll | 8 + .../InstCombine/2008-01-29-AddICmp.ll | 20 + .../InstCombine/2008-02-13-MulURem.ll | 10 + .../InstCombine/2008-02-16-SDivOverflow.ll | 14 + .../InstCombine/2008-02-16-SDivOverflow2.ll | 9 + .../InstCombine/2008-02-23-MulSub.ll | 9 + .../InstCombine/2008-02-28-OrFCmpCrash.ll | 16 + .../InstCombine/2008-03-13-IntToPtr.ll | 9 + .../InstCombine/2008-04-22-ByValBitcast.ll | 15 + .../InstCombine/2008-04-28-VolatileStore.ll | 8 + .../2008-04-29-VolatileLoadDontMerge.ll | 25 + .../2008-04-29-VolatileLoadMerge.ll | 21 + .../InstCombine/2008-05-08-LiveStoreDelete.ll | 25 + .../InstCombine/2008-05-08-StrLenSink.ll | 32 + .../InstCombine/2008-05-09-SinkOfInvoke.ll | 37 + .../InstCombine/2008-05-17-InfLoop.ll | 23 + .../InstCombine/2008-05-18-FoldIntToPtr.ll | 13 + .../InstCombine/2008-05-22-IDivVector.ll | 6 + .../InstCombine/2008-05-22-NegValVector.ll | 8 + .../InstCombine/2008-05-23-CompareFold.ll | 11 + .../InstCombine/2008-05-31-AddBool.ll | 9 + .../InstCombine/2008-05-31-Bools.ll | 24 + .../InstCombine/2008-06-05-ashr-crash.ll | 7 + .../InstCombine/2008-06-08-ICmpPHI.ll | 47 + .../2008-06-13-InfiniteLoopStore.ll | 20 + .../2008-06-13-ReadOnlyCallStore.ll | 19 + .../InstCombine/2008-06-19-UncondLoad.ll | 16 + .../InstCombine/2008-06-21-CompareMiscomp.ll | 11 + .../InstCombine/2008-06-24-StackRestore.ll | 39 + .../InstCombine/2008-07-08-AndICmp.ll | 10 + .../InstCombine/2008-07-08-ShiftOneAndOne.ll | 10 + .../InstCombine/2008-07-08-SubAnd.ll | 9 + .../2008-07-08-VolatileLoadMerge.ll | 26 + .../InstCombine/2008-07-09-SubAndError.ll | 9 + .../InstCombine/2008-07-10-CastSextBool.ll | 17 + .../InstCombine/2008-07-10-ICmpBinOp.ll | 19 + .../InstCombine/2008-07-11-RemAnd.ll | 9 + .../InstCombine/2008-07-13-DivZero.ll | 16 + .../Transforms/InstCombine/2008-07-16-fsub.ll | 8 + .../InstCombine/2008-07-16-sse2_storel_dq.ll | 13 + test/Transforms/InstCombine/2008-08-05-And.ll | 23 + .../InstCombine/2008-08-17-ICmpXorSignbit.ll | 41 + .../InstCombine/2008-09-02-VectorCrash.ll | 27 + .../InstCombine/2008-09-29-FoldingOr.ll | 10 + .../InstCombine/2008-10-11-DivCompareFold.ll | 8 + .../2008-10-23-ConstFoldWithoutMask.ll | 8 + .../2008-11-01-SRemDemandedBits.ll | 8 + .../Transforms/InstCombine/2008-11-08-FCmp.ll | 56 + .../InstCombine/2008-11-20-DivMulRem.ll | 67 + .../InstCombine/2008-11-27-IDivVector.ll | 11 + .../InstCombine/2008-11-27-MultiplyIntVec.ll | 11 + .../InstCombine/2008-11-27-UDivNegative.ll | 6 + .../InstCombine/2008-12-17-SRemNegConstVec.ll | 7 + .../InstCombine/2009-01-05-i128-crash.ll | 27 + .../InstCombine/2009-01-08-AlignAlloca.ll | 28 + .../2009-01-16-PointerAddrSpace.ll | 11 + ...2009-01-19-fmod-constant-float-specials.ll | 315 + .../2009-01-19-fmod-constant-float.ll | 75 + .../InstCombine/2009-01-24-EmptyStruct.ll | 18 + .../InstCombine/2009-01-31-InfIterate.ll | 22 + .../InstCombine/2009-01-31-Pressure.ll | 22 + .../InstCombine/2009-02-04-FPBitcast.ll | 12 + .../InstCombine/2009-02-11-NotInitialized.ll | 14 + .../2009-02-20-InstCombine-SROA.ll | 279 + .../InstCombine/2009-02-21-LoadCST.ll | 12 + .../2009-02-25-CrashZeroSizeArray.ll | 38 + .../2009-03-18-vector-ashr-crash.ll | 11 + .../InstCombine/2009-03-20-AShrOverShift.ll | 9 + .../InstCombine/2009-03-24-InfLoop.ll | 9 + .../InstCombine/2009-04-07-MulPromoteToI96.ll | 13 + .../InstCombine/2009-05-23-FCmpToICmp.ll | 9 + .../InstCombine/2009-06-11-StoreAddrSpace.ll | 7 + .../2009-06-16-SRemDemandedBits.ll | 9 + .../InstCombine/2009-07-02-MaskedIntVector.ll | 15 + .../InstCombine/2009-12-17-CmpSelectNull.ll | 16 + .../InstCombine/2010-01-28-NegativeSRem.ll | 19 + .../InstCombine/2010-03-03-ExtElim.ll | 32 + .../InstCombine/2010-05-30-memcpy-Struct.ll | 20 + .../InstCombine/2010-11-01-lshr-mask.ll | 46 + .../InstCombine/2010-11-21-SizeZeroTypeGEP.ll | 17 + .../InstCombine/2010-11-23-Distributed.ll | 23 + .../InstCombine/2011-02-14-InfLoop.ll | 19 + .../2011-03-08-SRemMinusOneBadOpt.ll | 12 + .../InstCombine/2011-05-02-VectorBoolean.ll | 15 + .../InstCombine/2011-05-13-InBoundsGEP.ll | 21 + .../InstCombine/2011-05-28-swapmulsub.ll | 57 + .../InstCombine/2011-06-13-nsw-alloca.ll | 63 + .../InstCombine/2011-09-03-Trampoline.ll | 87 + .../InstCombine/2011-10-07-AlignPromotion.ll | 20 + .../2012-01-11-OpaqueBitcastCrash.ll | 12 + .../Transforms/InstCombine/2012-02-13-FCmp.ll | 35 + .../Transforms/InstCombine/2012-02-28-ICmp.ll | 19 + .../InstCombine/2012-03-10-InstCombine.ll | 35 + .../InstCombine/2012-04-23-Neon-Intrinsics.ll | 72 + .../InstCombine/2012-04-24-vselect.ll | 13 + .../Transforms/InstCombine/2012-04-30-SRem.ll | 12 + .../2012-05-27-Negative-Shift-Crash.ll | 57 + .../InstCombine/2012-05-28-select-hang.ll | 39 + .../InstCombine/2012-06-06-LoadOfPHIs.ll | 162 + .../InstCombine/2012-07-25-LoadPart.ll | 14 + .../InstCombine/2012-07-30-addrsp-bitcast.ll | 10 + .../InstCombine/2012-08-28-udiv_ashl.ll | 57 + .../InstCombine/2012-09-17-ZeroSizedAlloca.ll | 24 + .../2012-09-24-MemcpyFromGlobalCrash.ll | 19 + .../2012-10-25-vector-of-pointers.ll | 51 + .../InstCombine/2012-12-14-simp-vgep.ll | 10 + .../InstCombine/2012-3-15-or-xor-constant.ll | 12 + .../InstCombine/2012-6-7-vselect-bitcast.ll | 11 + ...013-03-05-Combine-BitcastTy-Into-Alloca.ll | 45 + test/Transforms/InstCombine/CPP_min_max.ll | 34 + test/Transforms/InstCombine/ExtractCast.ll | 27 + test/Transforms/InstCombine/IntPtrCast.ll | 10 + test/Transforms/InstCombine/JavaCompare.ll | 14 + .../InstCombine/LandingPadClauses.ll | 233 + test/Transforms/InstCombine/PR7357.ll | 17 + test/Transforms/InstCombine/README.txt | 4 + test/Transforms/InstCombine/abs-1.ll | 41 + test/Transforms/InstCombine/add-shrink.ll | 14 + test/Transforms/InstCombine/add-sitofp.ll | 9 + test/Transforms/InstCombine/add.ll | 301 + test/Transforms/InstCombine/add2.ll | 43 + test/Transforms/InstCombine/add3.ll | 21 + test/Transforms/InstCombine/add4.ll | 79 + test/Transforms/InstCombine/addnegneg.ll | 12 + test/Transforms/InstCombine/addrspacecast.ll | 69 + .../InstCombine/adjust-for-sminmax.ll | 85 + test/Transforms/InstCombine/align-2d-gep.ll | 44 + test/Transforms/InstCombine/align-addr.ll | 97 + test/Transforms/InstCombine/align-external.ll | 29 + test/Transforms/InstCombine/alloca.ll | 131 + test/Transforms/InstCombine/and-compare.ll | 11 + test/Transforms/InstCombine/and-fcmp.ll | 100 + test/Transforms/InstCombine/and-not-or.ll | 34 + test/Transforms/InstCombine/and-or-and.ll | 61 + test/Transforms/InstCombine/and-or-not.ll | 46 + test/Transforms/InstCombine/and-or.ll | 39 + test/Transforms/InstCombine/and-xor-merge.ll | 19 + test/Transforms/InstCombine/and-xor-or.ll | 24 + test/Transforms/InstCombine/and.ll | 255 + test/Transforms/InstCombine/and2.ll | 56 + test/Transforms/InstCombine/apint-add1.ll | 34 + test/Transforms/InstCombine/apint-add2.ll | 46 + .../InstCombine/apint-and-compare.ll | 16 + .../InstCombine/apint-and-or-and.ll | 50 + .../InstCombine/apint-and-xor-merge.ll | 22 + test/Transforms/InstCombine/apint-and1.ll | 57 + test/Transforms/InstCombine/apint-and2.ll | 82 + .../InstCombine/apint-call-cast-target.ll | 20 + .../InstCombine/apint-cast-and-cast.ll | 15 + .../InstCombine/apint-cast-cast-to-and.ll | 8 + test/Transforms/InstCombine/apint-cast.ll | 30 + test/Transforms/InstCombine/apint-div1.ll | 22 + test/Transforms/InstCombine/apint-div2.ll | 22 + test/Transforms/InstCombine/apint-mul1.ll | 11 + test/Transforms/InstCombine/apint-mul2.ll | 12 + test/Transforms/InstCombine/apint-not.ll | 42 + test/Transforms/InstCombine/apint-or1.ll | 36 + test/Transforms/InstCombine/apint-or2.ll | 35 + test/Transforms/InstCombine/apint-rem1.ll | 22 + test/Transforms/InstCombine/apint-rem2.ll | 22 + test/Transforms/InstCombine/apint-select.ll | 45 + .../InstCombine/apint-shift-simplify.ll | 34 + test/Transforms/InstCombine/apint-shift.ll | 251 + .../Transforms/InstCombine/apint-shl-trunc.ll | 25 + test/Transforms/InstCombine/apint-sub.ll | 141 + test/Transforms/InstCombine/apint-xor1.ll | 50 + test/Transforms/InstCombine/apint-xor2.ll | 51 + test/Transforms/InstCombine/apint-zext1.ll | 11 + test/Transforms/InstCombine/apint-zext2.ll | 11 + test/Transforms/InstCombine/ashr-nop.ll | 8 + test/Transforms/InstCombine/atomic.ll | 24 + test/Transforms/InstCombine/badmalloc.ll | 41 + test/Transforms/InstCombine/binop-cast.ll | 9 + test/Transforms/InstCombine/bit-checks.ll | 372 + test/Transforms/InstCombine/bit-tracking.ll | 26 + .../InstCombine/bitcast-alias-function.ll | 229 + .../InstCombine/bitcast-bigendian.ll | 91 + .../InstCombine/bitcast-sext-vector.ll | 11 + test/Transforms/InstCombine/bitcast-store.ll | 21 + .../InstCombine/bitcast-vec-canon.ll | 22 + .../InstCombine/bitcast-vec-uniform.ll | 70 + .../InstCombine/bitcast-vector-fold.ll | 38 + test/Transforms/InstCombine/bitcast.ll | 156 + test/Transforms/InstCombine/bitcount.ll | 19 + test/Transforms/InstCombine/bittest.ll | 30 + test/Transforms/InstCombine/bswap-fold.ll | 71 + test/Transforms/InstCombine/bswap.ll | 74 + .../InstCombine/call-cast-target.ll | 15 + .../Transforms/InstCombine/call-intrinsics.ll | 19 + test/Transforms/InstCombine/call.ll | 278 + test/Transforms/InstCombine/call2.ll | 25 + .../InstCombine/canonicalize_branch.ll | 69 + .../Transforms/InstCombine/cast-mul-select.ll | 41 + test/Transforms/InstCombine/cast-set.ll | 65 + test/Transforms/InstCombine/cast.ll | 955 + test/Transforms/InstCombine/cast_ptr.ll | 108 + test/Transforms/InstCombine/compare-signs.ll | 58 + .../InstCombine/constant-expr-datalayout.ll | 12 + .../constant-fold-address-space-pointer.ll | 232 + .../InstCombine/constant-fold-compare.ll | 8 + .../InstCombine/constant-fold-gep.ll | 92 + test/Transforms/InstCombine/cos-1.ll | 38 + test/Transforms/InstCombine/cos-2.ll | 17 + test/Transforms/InstCombine/crash.ll | 398 + test/Transforms/InstCombine/dce-iterate.ll | 24 + test/Transforms/InstCombine/deadcode.ll | 33 + test/Transforms/InstCombine/debug-line.ll | 28 + test/Transforms/InstCombine/debuginfo.ll | 59 + test/Transforms/InstCombine/devirt.ll | 39 + .../InstCombine/disable-simplify-libcalls.ll | 335 + .../Transforms/InstCombine/div-shift-crash.ll | 101 + test/Transforms/InstCombine/div-shift.ll | 75 + test/Transforms/InstCombine/div.ll | 134 + .../InstCombine/double-float-shrink-1.ll | 346 + .../InstCombine/double-float-shrink-2.ll | 80 + .../InstCombine/enforce-known-alignment.ll | 38 + test/Transforms/InstCombine/err-rep-cold.ll | 77 + test/Transforms/InstCombine/exact.ll | 171 + test/Transforms/InstCombine/exp2-1.ll | 76 + test/Transforms/InstCombine/exp2-2.ll | 17 + test/Transforms/InstCombine/extractvalue.ll | 107 + test/Transforms/InstCombine/fast-math.ll | 479 + test/Transforms/InstCombine/fcmp-select.ll | 53 + test/Transforms/InstCombine/fcmp-special.ll | 155 + test/Transforms/InstCombine/fcmp.ll | 160 + test/Transforms/InstCombine/fdiv.ll | 25 + test/Transforms/InstCombine/ffs-1.ll | 134 + .../InstCombine/float-shrink-compare.ll | 179 + test/Transforms/InstCombine/fmul.ll | 95 + test/Transforms/InstCombine/fneg-ext.ll | 23 + .../InstCombine/fold-bin-operand.ll | 17 + test/Transforms/InstCombine/fold-calls.ll | 19 + .../InstCombine/fold-fops-into-selects.ll | 71 + test/Transforms/InstCombine/fold-phi.ll | 39 + .../Transforms/InstCombine/fold-sqrt-sqrtf.ll | 17 + .../InstCombine/fold-vector-select.ll | 150 + .../InstCombine/fold-vector-zero.ll | 35 + test/Transforms/InstCombine/fp-ret-bitcast.ll | 28 + test/Transforms/InstCombine/fpcast.ll | 46 + test/Transforms/InstCombine/fpextend.ll | 36 + test/Transforms/InstCombine/fprintf-1.ll | 89 + test/Transforms/InstCombine/fputs-1.ll | 43 + test/Transforms/InstCombine/fsub.ll | 23 + test/Transforms/InstCombine/fwrite-1.ll | 57 + test/Transforms/InstCombine/gep-addrspace.ll | 19 + test/Transforms/InstCombine/gepgep.ll | 13 + test/Transforms/InstCombine/getelementptr.ll | 792 + test/Transforms/InstCombine/hoist_instr.ll | 18 + test/Transforms/InstCombine/icmp-logical.ll | 152 + test/Transforms/InstCombine/icmp.ll | 1358 + test/Transforms/InstCombine/idioms.ll | 32 + test/Transforms/InstCombine/intrinsics.ll | 258 + test/Transforms/InstCombine/invariant.ll | 16 + test/Transforms/InstCombine/invoke.ll | 65 + test/Transforms/InstCombine/isascii-1.ll | 32 + test/Transforms/InstCombine/isdigit-1.ll | 48 + test/Transforms/InstCombine/known_align.ll | 27 + test/Transforms/InstCombine/load-cmp.ll | 374 + test/Transforms/InstCombine/load-select.ll | 16 + test/Transforms/InstCombine/load.ll | 98 + test/Transforms/InstCombine/load3.ll | 46 + .../InstCombine/loadstore-alignment.ll | 67 + test/Transforms/InstCombine/logical-select.ll | 68 + test/Transforms/InstCombine/lshr-phi.ll | 35 + .../InstCombine/malloc-free-delete.ll | 146 + test/Transforms/InstCombine/memcmp-1.ll | 72 + test/Transforms/InstCombine/memcmp-2.ll | 17 + test/Transforms/InstCombine/memcpy-1.ll | 17 + test/Transforms/InstCombine/memcpy-2.ll | 17 + .../InstCombine/memcpy-from-global.ll | 146 + test/Transforms/InstCombine/memcpy-to-load.ll | 13 + test/Transforms/InstCombine/memcpy.ll | 27 + test/Transforms/InstCombine/memcpy_chk-1.ll | 60 + test/Transforms/InstCombine/memcpy_chk-2.ll | 24 + test/Transforms/InstCombine/memmove-1.ll | 17 + test/Transforms/InstCombine/memmove-2.ll | 17 + test/Transforms/InstCombine/memmove.ll | 39 + test/Transforms/InstCombine/memmove_chk-1.ll | 60 + test/Transforms/InstCombine/memmove_chk-2.ll | 24 + test/Transforms/InstCombine/memset-1.ll | 17 + test/Transforms/InstCombine/memset-2.ll | 17 + test/Transforms/InstCombine/memset.ll | 14 + test/Transforms/InstCombine/memset2.ll | 15 + test/Transforms/InstCombine/memset_chk-1.ll | 61 + test/Transforms/InstCombine/memset_chk-2.ll | 20 + test/Transforms/InstCombine/merge-icmp.ll | 29 + .../Transforms/InstCombine/mul-masked-bits.ll | 10 + test/Transforms/InstCombine/mul.ll | 183 + .../multi-size-address-space-pointer.ll | 112 + test/Transforms/InstCombine/multi-use-or.ll | 24 + test/Transforms/InstCombine/narrow.ll | 18 + .../Transforms/InstCombine/neon-intrinsics.ll | 25 + test/Transforms/InstCombine/no-negzero.ll | 33 + test/Transforms/InstCombine/not-fcmp.ll | 10 + test/Transforms/InstCombine/not.ll | 54 + test/Transforms/InstCombine/nothrow.ll | 8 + test/Transforms/InstCombine/nsw.ll | 83 + .../InstCombine/obfuscated_splat.ll | 11 + test/Transforms/InstCombine/objsize-64.ll | 39 + .../InstCombine/objsize-address-space.ll | 80 + test/Transforms/InstCombine/objsize.ll | 278 + test/Transforms/InstCombine/odr-linkage.ll | 19 + test/Transforms/InstCombine/onehot_merge.ll | 35 + test/Transforms/InstCombine/or-fcmp.ll | 58 + test/Transforms/InstCombine/or-to-xor.ll | 42 + test/Transforms/InstCombine/or-xor.ll | 94 + test/Transforms/InstCombine/or.ll | 410 + test/Transforms/InstCombine/osx-names.ll | 30 + test/Transforms/InstCombine/overflow.ll | 155 + test/Transforms/InstCombine/phi-merge-gep.ll | 102 + .../InstCombine/phi-select-constexpr.ll | 19 + test/Transforms/InstCombine/phi.ll | 632 + test/Transforms/InstCombine/pow-1.ll | 167 + test/Transforms/InstCombine/pow-2.ll | 14 + test/Transforms/InstCombine/pow-3.ll | 12 + test/Transforms/InstCombine/pr12251.ll | 15 + test/Transforms/InstCombine/pr12338.ll | 24 + test/Transforms/InstCombine/pr17827.ll | 74 + test/Transforms/InstCombine/pr2645-0.ll | 33 + test/Transforms/InstCombine/pr2645-1.ll | 39 + test/Transforms/InstCombine/pr2996.ll | 12 + test/Transforms/InstCombine/pr8547.ll | 26 + .../InstCombine/preserve-sminmax.ll | 32 + test/Transforms/InstCombine/printf-1.ll | 119 + test/Transforms/InstCombine/printf-2.ll | 41 + test/Transforms/InstCombine/ptr-int-cast.ll | 60 + test/Transforms/InstCombine/puts-1.ll | 31 + test/Transforms/InstCombine/rem.ll | 206 + test/Transforms/InstCombine/sdiv-1.ll | 24 + test/Transforms/InstCombine/sdiv-2.ll | 28 + test/Transforms/InstCombine/select-2.ll | 21 + test/Transforms/InstCombine/select-crash.ll | 49 + .../InstCombine/select-extractelement.ll | 102 + .../InstCombine/select-load-call.ll | 15 + test/Transforms/InstCombine/select.ll | 1033 + test/Transforms/InstCombine/set.ll | 171 + .../InstCombine/setcc-strength-reduce.ll | 37 + test/Transforms/InstCombine/sext.ll | 195 + test/Transforms/InstCombine/shift-sra.ll | 78 + test/Transforms/InstCombine/shift.ll | 782 + .../InstCombine/shufflemask-undef.ll | 109 + .../InstCombine/shufflevec-constant.ll | 14 + .../InstCombine/sign-test-and-or.ll | 179 + .../InstCombine/signed-comparison.ll | 28 + test/Transforms/InstCombine/signext.ll | 87 + .../simplify-demanded-bits-pointer.ll | 84 + .../InstCombine/simplify-libcalls.ll | 144 + test/Transforms/InstCombine/sincospi.ll | 91 + .../InstCombine/sink_instruction.ll | 56 + test/Transforms/InstCombine/sitofp.ll | 55 + test/Transforms/InstCombine/sprintf-1.ll | 100 + test/Transforms/InstCombine/sqrt.ll | 54 + .../InstCombine/srem-simplify-bug.ll | 9 + test/Transforms/InstCombine/srem.ll | 8 + test/Transforms/InstCombine/srem1.ll | 18 + .../Transforms/InstCombine/stack-overalign.ll | 29 + .../InstCombine/stacksaverestore.ll | 56 + test/Transforms/InstCombine/store.ll | 120 + test/Transforms/InstCombine/stpcpy-1.ll | 46 + test/Transforms/InstCombine/stpcpy-2.ll | 22 + test/Transforms/InstCombine/stpcpy_chk-1.ll | 96 + test/Transforms/InstCombine/stpcpy_chk-2.ll | 21 + test/Transforms/InstCombine/strcat-1.ll | 38 + test/Transforms/InstCombine/strcat-2.ll | 32 + test/Transforms/InstCombine/strcat-3.ll | 22 + test/Transforms/InstCombine/strchr-1.ll | 65 + test/Transforms/InstCombine/strchr-2.ll | 21 + test/Transforms/InstCombine/strcmp-1.ll | 82 + test/Transforms/InstCombine/strcmp-2.ll | 20 + test/Transforms/InstCombine/strcpy-1.ll | 45 + test/Transforms/InstCombine/strcpy-2.ll | 22 + test/Transforms/InstCombine/strcpy_chk-1.ll | 94 + test/Transforms/InstCombine/strcpy_chk-2.ll | 21 + test/Transforms/InstCombine/strcpy_chk-64.ll | 18 + test/Transforms/InstCombine/strcspn-1.ll | 57 + test/Transforms/InstCombine/strcspn-2.ll | 21 + test/Transforms/InstCombine/strlen-1.ll | 97 + test/Transforms/InstCombine/strlen-2.ll | 18 + test/Transforms/InstCombine/strncat-1.ll | 37 + test/Transforms/InstCombine/strncat-2.ll | 53 + test/Transforms/InstCombine/strncat-3.ll | 22 + test/Transforms/InstCombine/strncmp-1.ll | 99 + test/Transforms/InstCombine/strncmp-2.ll | 20 + test/Transforms/InstCombine/strncpy-1.ll | 95 + test/Transforms/InstCombine/strncpy-2.ll | 22 + test/Transforms/InstCombine/strncpy_chk-1.ll | 66 + test/Transforms/InstCombine/strncpy_chk-2.ll | 21 + test/Transforms/InstCombine/strpbrk-1.ll | 68 + test/Transforms/InstCombine/strpbrk-2.ll | 23 + test/Transforms/InstCombine/strrchr-1.ll | 65 + test/Transforms/InstCombine/strrchr-2.ll | 21 + test/Transforms/InstCombine/strspn-1.ll | 56 + test/Transforms/InstCombine/strstr-1.ll | 65 + test/Transforms/InstCombine/strstr-2.ll | 18 + test/Transforms/InstCombine/strto-1.ll | 82 + .../InstCombine/struct-assign-tbaa.ll | 46 + test/Transforms/InstCombine/sub-xor.ll | 47 + test/Transforms/InstCombine/sub.ll | 394 + test/Transforms/InstCombine/toascii-1.ll | 59 + test/Transforms/InstCombine/trunc.ll | 120 + .../InstCombine/udiv-simplify-bug-0.ll | 14 + .../InstCombine/udiv-simplify-bug-1.ll | 20 + .../udiv_select_to_select_shift.ll | 17 + .../InstCombine/udivrem-change-width.ll | 62 + .../InstCombine/urem-simplify-bug.ll | 32 + test/Transforms/InstCombine/urem.ll | 8 + .../InstCombine/vec_demanded_elts.ll | 212 + .../InstCombine/vec_extract_2elts.ll | 12 + .../Transforms/InstCombine/vec_extract_elt.ll | 20 + .../InstCombine/vec_extract_var_elt.ll | 26 + test/Transforms/InstCombine/vec_insertelt.ll | 8 + test/Transforms/InstCombine/vec_narrow.ll | 10 + .../Transforms/InstCombine/vec_phi_extract.ll | 52 + test/Transforms/InstCombine/vec_sext.ll | 22 + test/Transforms/InstCombine/vec_shuffle.ll | 230 + test/Transforms/InstCombine/vector-casts.ll | 152 + test/Transforms/InstCombine/vector-mul.ll | 408 + test/Transforms/InstCombine/vector-srem.ll | 9 + test/Transforms/InstCombine/vector-type.ll | 15 + test/Transforms/InstCombine/vector_gep1.ll | 42 + test/Transforms/InstCombine/vector_gep2.ll | 11 + test/Transforms/InstCombine/volatile_store.ll | 14 + test/Transforms/InstCombine/weak-symbols.ll | 33 + test/Transforms/InstCombine/win-math.ll | 295 + .../InstCombine/x86-crc32-demanded.ll | 17 + test/Transforms/InstCombine/xor-undef.ll | 6 + test/Transforms/InstCombine/xor.ll | 193 + test/Transforms/InstCombine/xor2.ll | 84 + .../InstCombine/zero-point-zero-add.ll | 15 + .../InstCombine/zeroext-and-reduce.ll | 10 + .../InstCombine/zext-bool-add-sub.ll | 16 + test/Transforms/InstCombine/zext-fold.ll | 12 + test/Transforms/InstCombine/zext-or-icmp.ll | 35 + test/Transforms/InstCombine/zext.ll | 11 + .../InstSimplify/2010-12-20-Boolean.ll | 29 + .../InstSimplify/2010-12-20-Distribute.ll | 62 + .../InstSimplify/2011-01-14-Thread.ll | 9 + .../InstSimplify/2011-02-01-Vector.ll | 8 + .../2011-09-05-InsertExtractValue.ll | 29 + .../InstSimplify/2011-10-27-BinOpCrash.ll | 12 + .../2011-11-23-MaskedBitsCrash.ll | 17 + .../2013-04-19-ConstantFoldingCrash.ll | 9 + test/Transforms/InstSimplify/AndOrXor.ll | 22 + test/Transforms/InstSimplify/call-callconv.ll | 48 + test/Transforms/InstSimplify/call.ll | 166 + test/Transforms/InstSimplify/compare.ll | 741 + test/Transforms/InstSimplify/exact-nsw-nuw.ll | 44 + test/Transforms/InstSimplify/fast-math.ll | 107 + test/Transforms/InstSimplify/fdiv.ll | 17 + .../InstSimplify/floating-point-arithmetic.ll | 35 + test/Transforms/InstSimplify/maxmin.ll | 269 + test/Transforms/InstSimplify/past-the-end.ll | 77 + test/Transforms/InstSimplify/phi.ll | 22 + test/Transforms/InstSimplify/ptr_diff.ll | 78 + test/Transforms/InstSimplify/reassociate.ll | 195 + test/Transforms/InstSimplify/rem.ll | 17 + test/Transforms/InstSimplify/undef.ll | 155 + test/Transforms/InstSimplify/vector_gep.ll | 8 + .../2009-01-05-InternalizeAliases.ll | 10 + test/Transforms/Internalize/apifile | 2 + test/Transforms/Internalize/lists.ll | 50 + test/Transforms/Internalize/used.ll | 20 + .../JumpThreading/2008-11-27-EntryMunge.ll | 13 + .../JumpThreading/2010-08-26-and.ll | 162 + .../2011-04-02-SimplifyDeadBlock.ll | 32 + .../JumpThreading/2011-04-14-InfLoop.ll | 27 + .../2012-07-19-NoSuccessorIndirectBr.ll | 8 + test/Transforms/JumpThreading/and-and-cond.ll | 37 + test/Transforms/JumpThreading/and-cond.ll | 35 + test/Transforms/JumpThreading/basic.ll | 516 + .../JumpThreading/branch-no-const.ll | 21 + test/Transforms/JumpThreading/compare.ll | 30 + test/Transforms/JumpThreading/crash.ll | 566 + .../JumpThreading/degenerate-phi.ll | 24 + test/Transforms/JumpThreading/indirectbr.ll | 94 + test/Transforms/JumpThreading/landing-pad.ll | 203 + test/Transforms/JumpThreading/lvi-load.ll | 49 + .../JumpThreading/no-irreducible-loops.ll | 38 + test/Transforms/JumpThreading/or-undef.ll | 69 + test/Transforms/JumpThreading/phi-eq.ll | 209 + test/Transforms/JumpThreading/pr9331.ll | 50 + test/Transforms/JumpThreading/select.ll | 222 + test/Transforms/JumpThreading/thread-loads.ll | 81 + .../LCSSA/2006-06-03-IncorrectIDFPhis.ll | 21 + .../2006-06-12-MultipleExitsSameBlock.ll | 27 + .../LCSSA/2006-07-09-NoDominator.ll | 24 + .../LCSSA/2006-10-31-UnreachableBlock-2.ll | 145 + .../LCSSA/2006-10-31-UnreachableBlock.ll | 184 + test/Transforms/LCSSA/2007-07-12-LICM-2.ll | 17 + test/Transforms/LCSSA/2007-07-12-LICM-3.ll | 24 + test/Transforms/LCSSA/2007-07-12-LICM.ll | 14 + test/Transforms/LCSSA/basictest.ll | 24 + test/Transforms/LCSSA/indirectbr.ll | 542 + test/Transforms/LCSSA/invoke-dest.ll | 151 + test/Transforms/LCSSA/unreachable-use.ll | 27 + test/Transforms/LCSSA/unused-phis.ll | 38 + .../LICM/2003-02-26-LoopExitNotDominated.ll | 18 + .../LICM/2003-02-27-NestedLoopExitBlocks.ll | 17 + .../2003-02-27-PreheaderExitNodeUpdate.ll | 16 + .../LICM/2003-02-27-PreheaderProblem.ll | 24 + .../LICM/2003-02-27-StoreSinkPHIs.ll | 15 + .../LICM/2003-02-28-PromoteDifferentType.ll | 15 + test/Transforms/LICM/2003-05-02-LoadHoist.ll | 23 + .../LICM/2003-12-11-SinkingToPHI.ll | 16 + .../2004-09-14-AliasAnalysisInvalidate.ll | 19 + .../LICM/2004-11-17-UndefIndexCrash.ll | 20 + .../LICM/2006-09-12-DeadUserOfSunkInstr.ll | 148 + .../LICM/2007-05-22-VolatileSink.ll | 56 + test/Transforms/LICM/2007-07-30-AliasSet.ll | 39 + .../LICM/2007-09-17-PromoteValue.ll | 61 + .../LICM/2007-09-24-PromoteNullValue.ll | 46 + .../LICM/2007-10-01-PromoteSafeValue.ll | 23 + .../LICM/2008-05-20-AliasSetVAArg.ll | 30 + .../LICM/2008-07-22-LoadGlobalConstant.ll | 39 + .../LICM/2009-12-10-LICM-Indbr-Crash.ll | 21 + .../LICM/2011-04-06-HoistMissedASTUpdate.ll | 32 + .../2011-04-06-PromoteResultOfPromotion.ll | 39 + test/Transforms/LICM/2011-04-09-RAUW-AST.ll | 49 + test/Transforms/LICM/2011-07-06-Alignment.ll | 26 + test/Transforms/LICM/Preserve-LCSSA.ll | 25 + test/Transforms/LICM/atomics.ll | 79 + test/Transforms/LICM/basictest.ll | 15 + test/Transforms/LICM/crash.ll | 74 + test/Transforms/LICM/debug-value.ll | 65 + test/Transforms/LICM/hoist-invariant-load.ll | 40 + test/Transforms/LICM/hoisting.ll | 118 + test/Transforms/LICM/no-preheader-test.ll | 20 + test/Transforms/LICM/promote-order.ll | 43 + .../LICM/scalar-promote-memmodel.ll | 37 + test/Transforms/LICM/scalar_promote.ll | 189 + test/Transforms/LICM/sinking.ll | 249 + test/Transforms/LICM/speculate.ll | 189 + test/Transforms/LICM/volatile-alias.ll | 54 + .../LoopDeletion/2007-07-23-InfiniteLoop.ll | 13 + .../Transforms/LoopDeletion/2008-05-06-Phi.ll | 109 + .../LoopDeletion/2011-06-21-phioperands.ll | 182 + test/Transforms/LoopDeletion/dcetest.ll | 36 + .../LoopDeletion/multiple-exit-conditions.ll | 27 + .../Transforms/LoopDeletion/multiple-exits.ll | 26 + .../LoopDeletion/simplify-then-delete.ll | 67 + test/Transforms/LoopIdiom/X86/lit.local.cfg | 4 + test/Transforms/LoopIdiom/X86/popcnt.ll | 140 + .../LoopIdiom/basic-address-space.ll | 91 + test/Transforms/LoopIdiom/basic.ll | 419 + test/Transforms/LoopIdiom/crash.ll | 25 + test/Transforms/LoopIdiom/debug-line.ll | 52 + test/Transforms/LoopIdiom/memset_noidiom.ll | 30 + .../LoopIdiom/non-canonical-loop.ll | 34 + .../Transforms/LoopIdiom/scev-invalidation.ll | 74 + test/Transforms/LoopReroll/basic.ll | 327 + test/Transforms/LoopReroll/nonconst_lb.ll | 152 + test/Transforms/LoopReroll/reduction.ll | 96 + .../LoopRotate/2009-01-25-SingleEntryPhi.ll | 21 + test/Transforms/LoopRotate/PhiRename-1.ll | 95 + .../LoopRotate/PhiSelfRefernce-1.ll | 39 + test/Transforms/LoopRotate/alloca.ll | 33 + test/Transforms/LoopRotate/basic.ll | 61 + test/Transforms/LoopRotate/crash.ll | 155 + test/Transforms/LoopRotate/dbgvalue.ll | 103 + test/Transforms/LoopRotate/indirectbr.ll | 43 + test/Transforms/LoopRotate/multiple-exits.ll | 236 + test/Transforms/LoopRotate/phi-duplicate.ll | 40 + test/Transforms/LoopRotate/pr2639.ll | 38 + test/Transforms/LoopRotate/preserve-scev.ll | 47 + test/Transforms/LoopRotate/simplifylatch.ll | 76 + .../LoopSimplify/2003-04-25-AssertFail.ll | 20 + .../2003-05-12-PreheaderExitOfChild.ll | 42 + .../LoopSimplify/2003-08-15-PreheadersFail.ll | 52 + .../2003-12-10-ExitBlocksProblem.ll | 36 + .../2004-02-05-DominatorInfoCorruption.ll | 14 + .../2004-03-15-IncorrectDomUpdate.ll | 11 + .../2004-04-01-IncorrectDomUpdate.ll | 20 + ...2004-04-12-LoopSimplify-SwitchBackedges.ll | 18 + ...004-04-13-LoopSimplifyUpdateDomFrontier.ll | 18 + .../LoopSimplify/2007-10-28-InvokeCrash.ll | 29 + .../2010-07-15-IncorrectDomFrontierUpdate.ll | 20 + .../2010-12-26-PHIInfiniteLoop.ll | 43 + .../2011-12-14-LandingpadHeader.ll | 45 + .../LoopSimplify/2012-03-20-indirectbr.ll | 41 + test/Transforms/LoopSimplify/basictest.ll | 16 + test/Transforms/LoopSimplify/dup-preds.ll | 46 + test/Transforms/LoopSimplify/hardertest.ll | 15 + .../LoopSimplify/indirectbr-backedge.ll | 35 + test/Transforms/LoopSimplify/indirectbr.ll | 100 + test/Transforms/LoopSimplify/merge-exits.ll | 44 + .../LoopSimplify/phi-node-simplify.ll | 55 + test/Transforms/LoopSimplify/preserve-scev.ll | 138 + .../LoopSimplify/single-backedge.ll | 23 + .../LoopSimplify/unreachable-loop-pred.ll | 20 + .../LoopStrengthReduce/2005-08-15-AddRecIV.ll | 57 + .../2005-08-17-OutOfLoopVariant.ll | 17 + .../2005-09-12-UsesOutOutsideOfLoop.ll | 32 + .../2007-04-23-UseIterator.ll | 71 + .../2008-08-13-CmpStride.ll | 31 + .../LoopStrengthReduce/2008-09-09-Overflow.ll | 48 + ...9-01-13-nonconstant-stride-outside-loop.ll | 39 + .../2009-04-28-no-reduce-mul.ll | 48 + .../2011-07-19-CritEdgeBreakCrash.ll | 52 + .../2011-10-03-CritEdgeMerge.ll | 81 + .../LoopStrengthReduce/2011-10-06-ReusePhi.ll | 53 + .../2011-10-13-SCEVChain.ll | 111 + .../LoopStrengthReduce/2011-10-14-IntPtr.ll | 27 + .../2011-12-19-PostincQuadratic.ll | 39 + .../2012-01-02-nopreheader.ll | 88 + .../2012-01-16-nopreheader.ll | 113 + .../2012-03-15-nopreheader.ll | 155 + .../2012-03-26-constexpr.ll | 49 + .../2012-07-13-ExpandUDiv.ll | 86 + .../2012-07-18-LimitReassociate.ll | 515 + .../LoopStrengthReduce/2013-01-05-IndBr.ll | 44 + .../2013-01-14-ReuseCast.ll | 84 + .../ARM/2012-06-15-lsr-noaddrmode.ll | 97 + .../LoopStrengthReduce/ARM/ivchain-ARM.ll | 369 + .../LoopStrengthReduce/ARM/lit.local.cfg | 4 + .../X86/2008-08-14-ShadowIV.ll | 99 + .../X86/2009-11-10-LSRCrash.ll | 130 + .../X86/2011-07-20-DoubleIV.ll | 43 + .../X86/2011-11-29-postincphi.ll | 36 + .../X86/2011-12-04-loserreg.ll | 93 + .../X86/2012-01-13-phielim.ll | 148 + .../LoopStrengthReduce/X86/ivchain-X86.ll | 300 + .../X86/ivchain-stress-X86.ll | 96 + .../LoopStrengthReduce/X86/lit.local.cfg | 4 + .../LoopStrengthReduce/X86/pr17473.ll | 67 + .../addrec-gep-address-space.ll | 88 + .../LoopStrengthReduce/addrec-gep.ll | 82 + .../LoopStrengthReduce/address-space-loop.ll | 56 + .../LoopStrengthReduce/count-to-zero.ll | 42 + .../Transforms/LoopStrengthReduce/dead-phi.ll | 21 + .../LoopStrengthReduce/different-type-ivs.ll | 25 + .../LoopStrengthReduce/dominate-assert.ll | 113 + .../dont-hoist-simple-loop-constants.ll | 23 + .../dont_insert_redundant_ops.ll | 36 + .../LoopStrengthReduce/dont_reduce_bytes.ll | 22 + .../LoopStrengthReduce/dont_reverse.ll | 21 + .../exit_compare_live_range.ll | 21 + .../hoist-parent-preheader.ll | 32 + .../invariant_value_first.ll | 24 + .../invariant_value_first_arg.ll | 21 + test/Transforms/LoopStrengthReduce/ivchain.ll | 43 + .../lsr-expand-quadratic.ll | 42 + .../LoopStrengthReduce/nested-reduce.ll | 49 + .../LoopStrengthReduce/nonlinear-postinc.ll | 44 + .../LoopStrengthReduce/ops_after_indvar.ll | 26 + .../phi_node_update_multiple_preds.ll | 28 + .../LoopStrengthReduce/post-inc-icmpzero.ll | 90 + test/Transforms/LoopStrengthReduce/pr12018.ll | 38 + test/Transforms/LoopStrengthReduce/pr12048.ll | 38 + test/Transforms/LoopStrengthReduce/pr12691.ll | 34 + test/Transforms/LoopStrengthReduce/pr18165.ll | 88 + test/Transforms/LoopStrengthReduce/pr2537.ll | 21 + test/Transforms/LoopStrengthReduce/pr2570.ll | 287 + test/Transforms/LoopStrengthReduce/pr3086.ll | 29 + test/Transforms/LoopStrengthReduce/pr3399.ll | 32 + test/Transforms/LoopStrengthReduce/pr3571.ll | 27 + .../preserve-gep-loop-variant.ll | 42 + .../quadradic-exit-value.ll | 50 + .../LoopStrengthReduce/related_indvars.ll | 27 + .../LoopStrengthReduce/remove_indvar.ll | 21 + .../scaling_factor_cost_crash.ll | 68 + .../share_code_in_preheader.ll | 27 + .../LoopStrengthReduce/share_ivs.ll | 24 + .../uglygep-address-space.ll | 56 + test/Transforms/LoopStrengthReduce/uglygep.ll | 122 + .../use_postinc_value_outside_loop.ll | 29 + .../var_stride_used_by_compare.ll | 41 + .../LoopStrengthReduce/variable_stride.ll | 18 + .../2004-05-13-DontUnrollTooMuch.ll | 14 + .../2005-03-06-BadLoopInfoUpdate.ll | 22 + .../LoopUnroll/2006-08-24-MultiBlockLoop.ll | 16 + .../LoopUnroll/2007-04-16-PhiUpdate.ll | 17 + .../LoopUnroll/2007-05-05-UnrollMiscomp.ll | 36 + .../LoopUnroll/2007-05-09-UnknownTripCount.ll | 18 + .../Transforms/LoopUnroll/2007-11-05-Crash.ll | 295 + .../LoopUnroll/2011-08-08-PhiUpdate.ll | 103 + .../LoopUnroll/2011-08-09-IVSimplify.ll | 41 + .../LoopUnroll/2011-08-09-PhiUpdate.ll | 62 + .../LoopUnroll/2011-10-01-NoopTrunc.ll | 36 + .../2012-04-09-unroll-indirectbr.ll | 40 + .../LoopUnroll/PowerPC/a2-unrolling.ll | 48 + .../LoopUnroll/PowerPC/lit.local.cfg | 4 + test/Transforms/LoopUnroll/basic.ll | 47 + .../LoopUnroll/partial-unroll-optsize.ll | 35 + test/Transforms/LoopUnroll/pr10813.ll | 29 + test/Transforms/LoopUnroll/pr11361.ll | 42 + test/Transforms/LoopUnroll/pr14167.ll | 44 + test/Transforms/LoopUnroll/runtime-loop.ll | 109 + test/Transforms/LoopUnroll/runtime-loop1.ll | 30 + test/Transforms/LoopUnroll/runtime-loop2.ll | 31 + test/Transforms/LoopUnroll/runtime-loop3.ll | 45 + test/Transforms/LoopUnroll/scevunroll.ll | 210 + .../LoopUnroll/shifted-tripcount.ll | 28 + test/Transforms/LoopUnroll/unloop.ll | 472 + .../LoopUnswitch/2006-06-13-SingleEntryPHI.ll | 35 + .../LoopUnswitch/2006-06-27-DeadSwitchCase.ll | 25 + .../LoopUnswitch/2007-05-09-Unreachable.ll | 28 + test/Transforms/LoopUnswitch/2007-05-09-tl.ll | 95 + .../LoopUnswitch/2007-07-12-ExitDomInfo.ll | 45 + .../LoopUnswitch/2007-07-13-DomInfo.ll | 27 + .../LoopUnswitch/2007-07-18-DomInfo.ll | 66 + .../Transforms/LoopUnswitch/2007-08-01-Dom.ll | 30 + .../LoopUnswitch/2007-08-01-LCSSA.ll | 55 + .../LoopUnswitch/2007-10-04-DomFrontier.ll | 29 + .../LoopUnswitch/2008-06-02-DomInfo.ll | 26 + .../LoopUnswitch/2008-06-17-DomFrontier.ll | 22 + .../LoopUnswitch/2008-11-03-Invariant.ll | 37 + .../LoopUnswitch/2010-11-18-LCSSA.ll | 28 + .../LoopUnswitch/2011-06-02-CritSwitch.ll | 28 + .../LoopUnswitch/2011-09-26-EHCrash.ll | 63 + .../LoopUnswitch/2011-11-18-SimpleSwitch.ll | 95 + .../2011-11-18-TwoSwitches-Threshold.ll | 88 + .../LoopUnswitch/2011-11-18-TwoSwitches.ll | 142 + .../LoopUnswitch/2012-04-02-IndirectBr.ll | 41 + .../2012-04-30-LoopUnswitch-LPad-Crash.ll | 97 + .../Transforms/LoopUnswitch/2012-05-20-Phi.ll | 25 + test/Transforms/LoopUnswitch/basictest.ll | 68 + test/Transforms/LoopUnswitch/crash.ll | 66 + test/Transforms/LoopUnswitch/infinite-loop.ll | 58 + .../LoopUnswitch/preserve-analyses.ll | 129 + .../LoopVectorize/12-12-11-if-conv.ll | 40 + .../LoopVectorize/2012-10-20-infloop.ll | 71 + .../LoopVectorize/2012-10-22-isconsec.ll | 54 + .../LoopVectorize/ARM/arm-unroll.ll | 32 + .../LoopVectorize/ARM/gather-cost.ll | 88 + .../LoopVectorize/ARM/gcc-examples.ll | 60 + .../LoopVectorize/ARM/lit.local.cfg | 4 + .../LoopVectorize/ARM/mul-cast-vect.ll | 114 + .../LoopVectorize/ARM/width-detect.ll | 52 + .../LoopVectorize/X86/already-vectorized.ll | 46 + test/Transforms/LoopVectorize/X86/avx1.ll | 49 + .../X86/constant-vector-operand.ll | 30 + .../LoopVectorize/X86/conversion-cost.ll | 47 + .../LoopVectorize/X86/cost-model.ll | 41 + .../LoopVectorize/X86/gather-cost.ll | 86 + .../LoopVectorize/X86/gcc-examples.ll | 77 + .../illegal-parallel-loop-uniform-write.ll | 56 + .../LoopVectorize/X86/lit.local.cfg | 4 + .../X86/min-trip-count-switch.ll | 24 + .../Transforms/LoopVectorize/X86/no-vector.ll | 22 + .../X86/parallel-loops-after-reg2mem.ll | 49 + .../LoopVectorize/X86/parallel-loops.ll | 111 + test/Transforms/LoopVectorize/X86/rauw-bug.ll | 33 + .../LoopVectorize/X86/reduction-crash.ll | 35 + .../LoopVectorize/X86/small-size.ll | 170 + .../LoopVectorize/X86/struct-store.ll | 27 + .../Transforms/LoopVectorize/X86/tripcount.ll | 39 + .../Transforms/LoopVectorize/X86/unroll-pm.ll | 31 + .../LoopVectorize/X86/unroll-small-loops.ll | 50 + .../LoopVectorize/X86/unroll_selection.ll | 71 + .../X86/vector-scalar-select-cost.ll | 66 + .../X86/vector_ptr_load_store.ll | 150 + .../X86/x86_fp80-vector-store.ll | 29 + .../LoopVectorize/XCore/lit.local.cfg | 3 + .../XCore/no-vector-registers.ll | 23 + test/Transforms/LoopVectorize/align.ll | 33 + test/Transforms/LoopVectorize/bsd_regex.ll | 38 + .../LoopVectorize/bzip_reverse_loops.ll | 66 + test/Transforms/LoopVectorize/calloc.ll | 50 + .../LoopVectorize/cast-induction.ll | 30 + .../Transforms/LoopVectorize/cpp-new-array.ll | 46 + test/Transforms/LoopVectorize/dbg.value.ll | 70 + test/Transforms/LoopVectorize/debugloc.ll | 90 + test/Transforms/LoopVectorize/ee-crash.ll | 35 + test/Transforms/LoopVectorize/flags.ll | 53 + .../LoopVectorize/float-reduction.ll | 25 + test/Transforms/LoopVectorize/funcall.ll | 32 + test/Transforms/LoopVectorize/gcc-examples.ll | 687 + test/Transforms/LoopVectorize/global_alias.ll | 1077 + test/Transforms/LoopVectorize/hoist-loads.ll | 69 + test/Transforms/LoopVectorize/i8-induction.ll | 31 + .../Transforms/LoopVectorize/if-conv-crash.ll | 61 + .../LoopVectorize/if-conversion-edgemasks.ll | 243 + .../LoopVectorize/if-conversion-nest.ll | 48 + .../LoopVectorize/if-conversion-reduction.ll | 38 + .../Transforms/LoopVectorize/if-conversion.ll | 171 + test/Transforms/LoopVectorize/increment.ll | 66 + test/Transforms/LoopVectorize/induction.ll | 110 + .../LoopVectorize/induction_plus.ll | 29 + test/Transforms/LoopVectorize/infiniteloop.ll | 34 + test/Transforms/LoopVectorize/intrinsic.ll | 1092 + test/Transforms/LoopVectorize/lcssa-crash.ll | 40 + test/Transforms/LoopVectorize/lifetime.ll | 96 + test/Transforms/LoopVectorize/memdep.ll | 222 + .../LoopVectorize/metadata-unroll.ll | 41 + .../LoopVectorize/metadata-width.ll | 31 + .../LoopVectorize/minmax_reduction.ll | 885 + .../LoopVectorize/multi-use-reduction-bug.ll | 42 + .../LoopVectorize/multiple-address-spaces.ll | 44 + .../LoopVectorize/no_idiv_reduction.ll | 24 + .../LoopVectorize/no_int_induction.ll | 60 + .../LoopVectorize/no_outside_user.ll | 71 + test/Transforms/LoopVectorize/nofloat.ll | 29 + test/Transforms/LoopVectorize/non-const-n.ll | 38 + test/Transforms/LoopVectorize/nsw-crash.ll | 25 + test/Transforms/LoopVectorize/opt.ll | 28 + test/Transforms/LoopVectorize/phi-hang.ll | 47 + test/Transforms/LoopVectorize/ptr_loops.ll | 74 + test/Transforms/LoopVectorize/read-only.ll | 32 + test/Transforms/LoopVectorize/reduction.ll | 496 + .../LoopVectorize/reverse_induction.ll | 148 + test/Transforms/LoopVectorize/reverse_iter.ll | 45 + .../runtime-check-address-space.ll | 235 + .../runtime-check-readonly-address-space.ll | 142 + .../LoopVectorize/runtime-check-readonly.ll | 36 + .../Transforms/LoopVectorize/runtime-check.ll | 64 + .../Transforms/LoopVectorize/runtime-limit.ll | 84 + test/Transforms/LoopVectorize/safegep.ll | 61 + .../LoopVectorize/same-base-access.ll | 110 + .../Transforms/LoopVectorize/scalar-select.ll | 37 + .../LoopVectorize/scev-exitlim-crash.ll | 114 + .../Transforms/LoopVectorize/simple-unroll.ll | 39 + test/Transforms/LoopVectorize/small-loop.ll | 33 + .../LoopVectorize/start-non-zero.ll | 31 + .../LoopVectorize/store-shuffle-bug.ll | 55 + .../Transforms/LoopVectorize/struct_access.ll | 88 + .../LoopVectorize/undef-inst-bug.ll | 36 + test/Transforms/LoopVectorize/unroll_novec.ll | 39 + .../Transforms/LoopVectorize/value-ptr-bug.ll | 50 + .../LoopVectorize/vectorize-once.ll | 77 + test/Transforms/LoopVectorize/write-only.ll | 26 + test/Transforms/LowerAtomic/atomic-load.ll | 36 + test/Transforms/LowerAtomic/atomic-swap.ll | 23 + test/Transforms/LowerAtomic/barrier.ll | 8 + test/Transforms/LowerExpectIntrinsic/basic.ll | 251 + .../LowerInvoke/2003-12-10-Crash.ll | 22 + .../LowerInvoke/2004-02-29-PHICrash.ll | 15 + .../LowerInvoke/2005-08-03-InvokeWithPHI.ll | 17 + .../2005-08-03-InvokeWithPHIUse.ll | 15 + .../2008-02-14-CritEdgePhiCrash.ll | 14 + test/Transforms/LowerInvoke/basictest.ll | 30 + .../LowerSwitch/2003-05-01-PHIProblem.ll | 15 + .../LowerSwitch/2003-08-23-EmptySwitch.ll | 9 + .../2004-03-13-SwitchIsDefaultCrash.ll | 19 + test/Transforms/LowerSwitch/feature.ll | 140 + .../Mem2Reg/2002-03-28-UninitializedVal.ll | 11 + .../2002-05-01-ShouldNotPromoteThisAlloca.ll | 12 + .../Mem2Reg/2003-04-10-DFNotFound.ll | 10 + .../Mem2Reg/2003-04-18-DeadBlockProblem.ll | 16 + .../2003-04-24-MultipleIdenticalSuccessors.ll | 16 + .../Mem2Reg/2003-06-26-IterativePromote.ll | 16 + .../Mem2Reg/2003-10-05-DeadPHIInsertion.ll | 22 + .../Mem2Reg/2005-06-30-ReadBeforeWrite.ll | 47 + test/Transforms/Mem2Reg/2005-11-28-Crash.ll | 62 + .../Mem2Reg/2007-08-27-VolatileLoadsStores.ll | 47 + test/Transforms/Mem2Reg/ConvertDebugInfo.ll | 52 + test/Transforms/Mem2Reg/ConvertDebugInfo2.ll | 57 + .../Mem2Reg/PromoteMemToRegister.ll | 18 + test/Transforms/Mem2Reg/UndefValuesMerge.ll | 13 + test/Transforms/Mem2Reg/atomic.ll | 12 + test/Transforms/Mem2Reg/crash.ll | 44 + test/Transforms/Mem2Reg/ignore-lifetime.ll | 26 + .../MemCpyOpt/2008-02-24-MultipleUseofSRet.ll | 36 + .../MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll | 22 + .../2011-06-02-CallSlotOverwritten.ll | 36 + test/Transforms/MemCpyOpt/align.ll | 37 + test/Transforms/MemCpyOpt/atomic.ll | 41 + test/Transforms/MemCpyOpt/crash.ll | 58 + test/Transforms/MemCpyOpt/form-memset.ll | 274 + test/Transforms/MemCpyOpt/loadstore-sret.ll | 25 + test/Transforms/MemCpyOpt/memcpy-to-memset.ll | 19 + test/Transforms/MemCpyOpt/memcpy.ll | 193 + test/Transforms/MemCpyOpt/memmove.ll | 40 + test/Transforms/MemCpyOpt/smaller.ll | 28 + test/Transforms/MemCpyOpt/sret.ll | 30 + .../MergeFunc/2011-02-08-RemoveEqual.ll | 276 + .../MergeFunc/2013-01-10-MergeFuncAssert.ll | 36 + test/Transforms/MergeFunc/address-spaces.ll | 35 + test/Transforms/MergeFunc/crash.ll | 46 + test/Transforms/MergeFunc/fold-weak.ll | 17 + .../MergeFunc/inttoptr-address-space.ll | 29 + test/Transforms/MergeFunc/inttoptr.ll | 56 + .../Transforms/MergeFunc/merge-ptr-and-int.ll | 27 + test/Transforms/MergeFunc/phi-speculation1.ll | 30 + test/Transforms/MergeFunc/phi-speculation2.ll | 30 + .../MergeFunc/ptr-int-transitivity-1.ll | 21 + .../MergeFunc/ptr-int-transitivity-2.ll | 25 + .../MergeFunc/ptr-int-transitivity-3.ll | 21 + test/Transforms/MergeFunc/too-small.ll | 14 + test/Transforms/MergeFunc/vector.ll | 72 + .../MergeFunc/vectors-and-arrays.ll | 19 + test/Transforms/MetaRenamer/metarenamer.ll | 96 + test/Transforms/ObjCARC/allocas.ll | 500 + test/Transforms/ObjCARC/apelim.ll | 55 + test/Transforms/ObjCARC/arc-annotations.ll | 83 + test/Transforms/ObjCARC/basic.ll | 3019 + test/Transforms/ObjCARC/cfg-hazards.ll | 435 + test/Transforms/ObjCARC/contract-marker.ll | 27 + .../ObjCARC/contract-storestrong-ivar.ll | 31 + .../ObjCARC/contract-storestrong.ll | 174 + test/Transforms/ObjCARC/contract-testcases.ll | 95 + test/Transforms/ObjCARC/contract.ll | 232 + test/Transforms/ObjCARC/empty-block.ll | 59 + ...e-that-exception-unwind-path-is-visited.ll | 174 + test/Transforms/ObjCARC/escape.ll | 134 + test/Transforms/ObjCARC/expand.ll | 94 + test/Transforms/ObjCARC/gvn.ll | 41 + .../ObjCARC/intrinsic-use-isolated.ll | 16 + test/Transforms/ObjCARC/intrinsic-use.ll | 116 + test/Transforms/ObjCARC/invoke.ll | 224 + .../move-and-form-retain-autorelease.ll | 223 + .../ObjCARC/move-and-merge-autorelease.ll | 108 + test/Transforms/ObjCARC/nested.ll | 825 + test/Transforms/ObjCARC/path-overflow.ll | 2193 + test/Transforms/ObjCARC/pointer-types.ll | 31 + test/Transforms/ObjCARC/post-inlining.ll | 48 + test/Transforms/ObjCARC/pr12270.ll | 21 + .../ObjCARC/retain-block-side-effects.ll | 42 + .../Transforms/ObjCARC/retain-not-declared.ll | 69 + test/Transforms/ObjCARC/rle-s2l.ll | 138 + test/Transforms/ObjCARC/rv.ll | 294 + test/Transforms/ObjCARC/split-backedge.ll | 50 + .../tail-call-invariant-enforcement.ll | 89 + test/Transforms/ObjCARC/weak-contract.ll | 14 + test/Transforms/ObjCARC/weak-copies.ll | 89 + test/Transforms/ObjCARC/weak-dce.ll | 46 + test/Transforms/ObjCARC/weak.ll | 57 + .../2010-03-22-empty-baseclass.ll | 162 + test/Transforms/PhaseOrdering/PR6627.ll | 93 + test/Transforms/PhaseOrdering/basic.ll | 51 + test/Transforms/PhaseOrdering/gdce.ll | 106 + test/Transforms/PhaseOrdering/scev.ll | 64 + .../PruneEH/2003-11-21-PHIUpdate.ll | 15 + test/Transforms/PruneEH/2008-06-02-Weak.ll | 12 + test/Transforms/PruneEH/recursivetest.ll | 20 + test/Transforms/PruneEH/simplenoreturntest.ll | 13 + test/Transforms/PruneEH/simpletest.ll | 19 + .../2002-05-15-AgressiveSubMove.ll | 9 + .../Reassociate/2002-05-15-MissedTree.ll | 9 + .../Reassociate/2002-05-15-SubReassociate.ll | 12 + .../Reassociate/2002-05-15-SubReassociate2.ll | 13 + .../2002-07-09-DominanceProblem.ll | 10 + .../Reassociate/2003-08-12-InfiniteLoop.ll | 9 + .../2005-09-01-ArrayOutOfBounds.ll | 23 + .../2006-04-27-ReassociateVector.ll | 8 + .../Reassociate/2011-01-26-UseAfterFree.ll | 33 + .../Reassociate/2012-05-08-UndefLeak.ll | 85 + .../Reassociate/2012-06-08-InfiniteLoop.ll | 21 + test/Transforms/Reassociate/absorption.ll | 11 + test/Transforms/Reassociate/basictest.ll | 216 + test/Transforms/Reassociate/crash.ll | 174 + test/Transforms/Reassociate/fp-commute.ll | 18 + test/Transforms/Reassociate/inverses.ll | 34 + test/Transforms/Reassociate/looptest.ll | 50 + test/Transforms/Reassociate/mightymul.ll | 35 + test/Transforms/Reassociate/mulfactor.ll | 134 + test/Transforms/Reassociate/multistep.ll | 31 + test/Transforms/Reassociate/negation.ll | 21 + test/Transforms/Reassociate/no-op.ll | 38 + test/Transforms/Reassociate/optional-flags.ll | 29 + test/Transforms/Reassociate/otherops.ll | 28 + test/Transforms/Reassociate/pr12245.ll | 46 + test/Transforms/Reassociate/repeats.ll | 252 + test/Transforms/Reassociate/secondary.ll | 24 + test/Transforms/Reassociate/shift-factor.ll | 12 + test/Transforms/Reassociate/shifttest.ll | 12 + test/Transforms/Reassociate/subtest.ll | 11 + test/Transforms/Reassociate/subtest2.ll | 13 + test/Transforms/Reassociate/xor_reassoc.ll | 193 + test/Transforms/Reg2Mem/crash.ll | 88 + .../SCCP/2002-05-02-MissSecondInst.ll | 8 + .../SCCP/2002-05-20-MissedIncomingValue.ll | 19 + .../SCCP/2002-05-21-InvalidSimplify.ll | 33 + .../SCCP/2002-08-30-GetElementPtrTest.ll | 9 + .../SCCP/2003-06-24-OverdefinedPHIValue.ll | 30 + .../SCCP/2003-08-26-InvokeHandling.ll | 23 + test/Transforms/SCCP/2004-11-16-DeadInvoke.ll | 18 + .../SCCP/2004-12-10-UndefBranchBug.ll | 12 + .../SCCP/2006-10-23-IPSCCP-Crash.ll | 103 + test/Transforms/SCCP/2006-12-04-PackedType.ll | 140 + test/Transforms/SCCP/2006-12-19-UndefBug.ll | 8 + .../Transforms/SCCP/2007-05-16-InvokeCrash.ll | 45 + .../SCCP/2008-01-27-UndefCorrelate.ll | 36 + .../SCCP/2008-04-22-multiple-ret-sccp.ll | 11 + .../SCCP/2008-05-23-UndefCallFold.ll | 14 + .../SCCP/2009-01-14-IPSCCP-Invoke.ll | 26 + .../SCCP/2009-05-27-VectorOperandZero.ll | 10 + test/Transforms/SCCP/apint-array.ll | 23 + test/Transforms/SCCP/apint-basictest.ll | 16 + test/Transforms/SCCP/apint-basictest2.ll | 17 + test/Transforms/SCCP/apint-basictest3.ll | 23 + test/Transforms/SCCP/apint-basictest4.ll | 25 + test/Transforms/SCCP/apint-bigarray.ll | 23 + test/Transforms/SCCP/apint-bigint.ll | 9 + test/Transforms/SCCP/apint-bigint2.ll | 18 + test/Transforms/SCCP/apint-ipsccp1.ll | 24 + test/Transforms/SCCP/apint-ipsccp2.ll | 19 + test/Transforms/SCCP/apint-ipsccp3.ll | 23 + test/Transforms/SCCP/apint-ipsccp4.ll | 49 + test/Transforms/SCCP/apint-load.ll | 36 + test/Transforms/SCCP/apint-phi.ll | 19 + test/Transforms/SCCP/apint-select.ll | 21 + test/Transforms/SCCP/atomic-load-store.ll | 30 + test/Transforms/SCCP/calltest.ll | 21 + test/Transforms/SCCP/crash.ll | 29 + test/Transforms/SCCP/ipsccp-addr-taken.ll | 28 + test/Transforms/SCCP/ipsccp-basic.ll | 229 + test/Transforms/SCCP/loadtest.ll | 34 + test/Transforms/SCCP/logical-nuke.ll | 9 + test/Transforms/SCCP/retvalue-undef.ll | 32 + test/Transforms/SCCP/sccptest.ll | 58 + test/Transforms/SCCP/select.ll | 12 + test/Transforms/SCCP/switch.ll | 13 + test/Transforms/SCCP/undef-resolve.ll | 172 + test/Transforms/SCCP/vector-bitcast.ll | 20 + .../SLPVectorizer/ARM/lit.local.cfg | 3 + test/Transforms/SLPVectorizer/ARM/memory.ll | 20 + test/Transforms/SLPVectorizer/ARM/sroa.ll | 52 + .../SLPVectorizer/R600/lit.local.cfg | 4 + .../Transforms/SLPVectorizer/R600/simplebb.ll | 65 + .../SLPVectorizer/X86/barriercall.ll | 32 + test/Transforms/SLPVectorizer/X86/cast.ll | 38 + test/Transforms/SLPVectorizer/X86/cmp_sel.ll | 32 + .../SLPVectorizer/X86/compare-reduce.ll | 53 + .../SLPVectorizer/X86/crash_7zip.ll | 38 + .../SLPVectorizer/X86/crash_bullet.ll | 128 + .../SLPVectorizer/X86/crash_bullet3.ll | 84 + .../SLPVectorizer/X86/crash_dequeue.ll | 40 + .../SLPVectorizer/X86/crash_flop7.ll | 46 + .../SLPVectorizer/X86/crash_lencod.ll | 91 + .../SLPVectorizer/X86/crash_mandeltext.ll | 107 + .../X86/crash_netbsd_decompress.ll | 41 + .../SLPVectorizer/X86/crash_sim4b1.ll | 113 + .../SLPVectorizer/X86/crash_smallpt.ll | 105 + .../SLPVectorizer/X86/cross_block_slp.ll | 54 + test/Transforms/SLPVectorizer/X86/cse.ll | 219 + .../Transforms/SLPVectorizer/X86/cycle_dup.ll | 64 + .../SLPVectorizer/X86/debug_info.ll | 89 + test/Transforms/SLPVectorizer/X86/diamond.ll | 109 + .../SLPVectorizer/X86/external_user.ll | 96 + test/Transforms/SLPVectorizer/X86/extract.ll | 59 + test/Transforms/SLPVectorizer/X86/flag.ll | 51 + test/Transforms/SLPVectorizer/X86/hoist.ll | 59 + .../SLPVectorizer/X86/horizontal.ll | 417 + .../SLPVectorizer/X86/implicitfloat.ll | 25 + .../SLPVectorizer/X86/in-tree-user.ll | 50 + .../X86/insert-element-build-vector.ll | 197 + .../SLPVectorizer/X86/lit.local.cfg | 4 + .../SLPVectorizer/X86/long_chains.ll | 47 + .../SLPVectorizer/X86/loopinvariant.ll | 69 + .../SLPVectorizer/X86/multi_block.ll | 55 + .../SLPVectorizer/X86/multi_user.ll | 47 + .../Transforms/SLPVectorizer/X86/odd_store.ll | 46 + .../SLPVectorizer/X86/operandorder.ll | 234 + test/Transforms/SLPVectorizer/X86/opt.ll | 30 + test/Transforms/SLPVectorizer/X86/ordering.ll | 81 + test/Transforms/SLPVectorizer/X86/phi.ll | 248 + test/Transforms/SLPVectorizer/X86/phi3.ll | 35 + .../SLPVectorizer/X86/phi_landingpad.ll | 31 + .../SLPVectorizer/X86/phi_overalignedtype.ll | 45 + test/Transforms/SLPVectorizer/X86/pr16571.ll | 22 + test/Transforms/SLPVectorizer/X86/pr16628.ll | 27 + test/Transforms/SLPVectorizer/X86/pr16899.ll | 31 + test/Transforms/SLPVectorizer/X86/pr18060.ll | 47 + .../Transforms/SLPVectorizer/X86/reduction.ll | 47 + .../SLPVectorizer/X86/reduction2.ll | 34 + test/Transforms/SLPVectorizer/X86/rgb_phi.ll | 76 + test/Transforms/SLPVectorizer/X86/saxpy.ll | 61 + .../SLPVectorizer/X86/simple-loop.ll | 100 + test/Transforms/SLPVectorizer/X86/simplebb.ll | 89 + .../Transforms/SLPVectorizer/X86/tiny-tree.ll | 140 + test/Transforms/SLPVectorizer/X86/vector.ll | 14 + .../SLPVectorizer/XCore/lit.local.cfg | 3 + .../XCore/no-vector-registers.ll | 24 + test/Transforms/SROA/alignment.ll | 171 + test/Transforms/SROA/basictest.ll | 1358 + test/Transforms/SROA/big-endian.ll | 114 + test/Transforms/SROA/fca.ll | 49 + test/Transforms/SROA/phi-and-select.ll | 503 + test/Transforms/SROA/vector-conversion.ll | 53 + test/Transforms/SROA/vector-promotion.ll | 423 + test/Transforms/SROA/vectors-of-pointers.ll | 25 + .../SampleProfile/Inputs/branch.prof | 11 + test/Transforms/SampleProfile/branch.ll | 143 + .../ScalarRepl/2003-05-29-ArrayFail.ll | 13 + .../ScalarRepl/2003-09-12-IncorrectPromote.ll | 12 + .../ScalarRepl/2003-10-29-ArrayProblem.ll | 16 + .../2006-11-07-InvalidArrayPromote.ll | 20 + .../ScalarRepl/2007-05-29-MemcpyPreserve.ll | 24 + .../ScalarRepl/2007-11-03-bigendian_apint.ll | 30 + .../ScalarRepl/2008-01-29-PromoteBug.ll | 21 + .../2008-02-28-SubElementExtractCrash.ll | 16 + .../ScalarRepl/2008-06-05-loadstore-agg.ll | 33 + .../ScalarRepl/2008-06-22-LargeArray.ll | 17 + .../2008-08-22-out-of-range-array-promote.ll | 23 + .../ScalarRepl/2008-09-22-vector-gep.ll | 25 + .../2009-02-02-ScalarPromoteOutOfRange.ll | 16 + .../ScalarRepl/2009-02-05-LoadFCA.ll | 20 + .../ScalarRepl/2009-03-04-MemCpyAlign.ll | 19 + .../ScalarRepl/2009-12-11-NeonTypes.ll | 90 + .../ScalarRepl/2010-01-18-SelfCopy.ll | 18 + .../ScalarRepl/2011-05-06-CapturedAlloca.ll | 26 + .../2011-06-08-VectorExtractValue.ll | 75 + .../2011-06-17-VectorPartialMemset.ll | 37 + .../2011-09-22-PHISpeculateInvoke.ll | 40 + .../ScalarRepl/2011-10-11-VectorMemset.ll | 22 + .../ScalarRepl/2011-10-22-VectorCrash.ll | 19 + .../ScalarRepl/2011-11-11-EmptyStruct.ll | 26 + .../Transforms/ScalarRepl/AggregatePromote.ll | 51 + test/Transforms/ScalarRepl/DifferingTypes.ll | 16 + test/Transforms/ScalarRepl/address-space.ll | 35 + test/Transforms/ScalarRepl/arraytest.ll | 11 + test/Transforms/ScalarRepl/badarray.ll | 57 + test/Transforms/ScalarRepl/basictest.ll | 30 + test/Transforms/ScalarRepl/bitfield-sroa.ll | 17 + test/Transforms/ScalarRepl/copy-aggregate.ll | 107 + test/Transforms/ScalarRepl/crash.ll | 286 + .../ScalarRepl/debuginfo-preserved.ll | 65 + test/Transforms/ScalarRepl/inline-vector.ll | 53 + test/Transforms/ScalarRepl/lifetime.ll | 139 + .../ScalarRepl/load-store-aggregate.ll | 31 + test/Transforms/ScalarRepl/memcpy-align.ll | 32 + .../memset-aggregate-byte-leader.ll | 23 + .../Transforms/ScalarRepl/memset-aggregate.ll | 67 + test/Transforms/ScalarRepl/negative-memset.ll | 20 + .../ScalarRepl/nonzero-first-index.ll | 53 + test/Transforms/ScalarRepl/not-a-vector.ll | 20 + .../Transforms/ScalarRepl/only-memcpy-uses.ll | 27 + test/Transforms/ScalarRepl/phi-cycle.ll | 80 + test/Transforms/ScalarRepl/phi-select.ll | 153 + test/Transforms/ScalarRepl/phinodepromote.ll | 34 + test/Transforms/ScalarRepl/select_promote.ll | 18 + test/Transforms/ScalarRepl/sroa-fca.ll | 21 + test/Transforms/ScalarRepl/sroa_two.ll | 13 + test/Transforms/ScalarRepl/union-fp-int.ll | 14 + test/Transforms/ScalarRepl/union-packed.ll | 14 + test/Transforms/ScalarRepl/union-pointer.ll | 74 + test/Transforms/ScalarRepl/vector_memcpy.ll | 30 + test/Transforms/ScalarRepl/vector_promote.ll | 137 + .../vectors-with-mismatched-elements.ll | 27 + test/Transforms/ScalarRepl/volatile.ll | 13 + .../SimplifyCFG/2002-05-21-PHIElimination.ll | 19 + .../SimplifyCFG/2002-09-24-PHIAssertion.ll | 13 + .../SimplifyCFG/2003-03-07-DominateProblem.ll | 17 + .../SimplifyCFG/2003-08-05-InvokeCrash.ll | 16 + .../SimplifyCFG/2003-08-17-BranchFold.ll | 22 + .../2003-08-17-BranchFoldOrdering.ll | 27 + .../SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll | 57 + .../SimplifyCFG/2003-08-17-FoldSwitch.ll | 81 + .../2004-12-10-SimplifyCFGCrash.ll | 40 + .../SimplifyCFG/2005-06-16-PHICrash.ll | 95 + .../SimplifyCFG/2005-08-01-PHIUpdateFail.ll | 71 + .../SimplifyCFG/2005-10-02-InvokeSimplify.ll | 18 + .../2005-12-03-IncorrectPHIFold.ll | 123 + .../SimplifyCFG/2006-02-17-InfiniteUnroll.ll | 27 + .../SimplifyCFG/2006-06-12-InfLoop.ll | 413 + .../SimplifyCFG/2006-08-03-Crash.ll | 96 + .../SimplifyCFG/2006-10-19-UncondDiv.ll | 29 + .../SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll | 131 + .../SimplifyCFG/2007-11-22-InvokeNoUnwind.ll | 16 + .../SimplifyCFG/2007-12-21-Crash.ll | 37 + .../SimplifyCFG/2008-01-02-hoist-fp-add.ll | 27 + .../SimplifyCFG/2008-05-16-PHIBlockMerge.ll | 131 + .../2008-07-13-InfLoopMiscompile.ll | 36 + .../SimplifyCFG/2008-09-08-MultiplePred.ll | 60 + .../2008-09-17-SpeculativeHoist.ll | 18 + ...008-10-03-SpeculativelyExecuteBeforePHI.ll | 36 + .../SimplifyCFG/2008-12-06-SingleEntryPhi.ll | 13 + .../SimplifyCFG/2008-12-16-DCECond.ll | 46 + .../SimplifyCFG/2009-01-18-PHIPropCrash.ll | 30 + ...01-19-UnconditionalTrappingConstantExpr.ll | 41 + .../SimplifyCFG/2009-05-12-externweak.ll | 47 + .../SimplifyCFG/2010-03-30-InvokeCrash.ll | 22 + .../SimplifyCFG/2011-03-08-UnreachableUse.ll | 31 + .../SimplifyCFG/2011-09-05-TrivialLPad.ll | 22 + test/Transforms/SimplifyCFG/BrUnwind.ll | 15 + .../SimplifyCFG/CoveredLookupTable.ll | 48 + test/Transforms/SimplifyCFG/DeadSetCC.ll | 28 + .../Transforms/SimplifyCFG/EmptyBlockMerge.ll | 21 + .../SimplifyCFG/EqualPHIEdgeBlockMerge.ll | 256 + .../ForwardSwitchConditionToPHI.ll | 36 + test/Transforms/SimplifyCFG/HoistCode.ll | 11 + test/Transforms/SimplifyCFG/MagicPointer.ll | 149 + test/Transforms/SimplifyCFG/PHINode.ll | 15 + test/Transforms/SimplifyCFG/PR16069.ll | 28 + test/Transforms/SimplifyCFG/PR9946.ll | 18 + test/Transforms/SimplifyCFG/PhiBlockMerge.ll | 26 + test/Transforms/SimplifyCFG/PhiBlockMerge2.ll | 27 + test/Transforms/SimplifyCFG/PhiEliminate.ll | 27 + test/Transforms/SimplifyCFG/PhiEliminate2.ll | 17 + test/Transforms/SimplifyCFG/PhiEliminate3.ll | 34 + test/Transforms/SimplifyCFG/PhiNoEliminate.ll | 27 + .../SimplifyCFG/SPARC/lit.local.cfg | 4 + .../SPARC/switch_to_lookup_table.ll | 32 + .../Transforms/SimplifyCFG/SpeculativeExec.ll | 87 + .../SimplifyCFG/UncondBranchToReturn.ll | 33 + .../SimplifyCFG/UnreachableEliminate.ll | 73 + test/Transforms/SimplifyCFG/X86/lit.local.cfg | 4 + .../SimplifyCFG/X86/switch_to_lookup_table.ll | 808 + .../SimplifyCFG/attr-noduplicate.ll | 37 + test/Transforms/SimplifyCFG/basictest.ll | 43 + .../SimplifyCFG/branch-cond-merge.ll | 19 + .../SimplifyCFG/branch-cond-prop.ll | 17 + .../Transforms/SimplifyCFG/branch-fold-dbg.ll | 59 + .../SimplifyCFG/branch-fold-test.ll | 17 + test/Transforms/SimplifyCFG/branch-fold.ll | 70 + .../SimplifyCFG/branch-phi-thread.ll | 66 + .../SimplifyCFG/common-dest-folding.ll | 57 + test/Transforms/SimplifyCFG/dbginfo.ll | 71 + .../dce-cond-after-folding-terminator.ll | 52 + test/Transforms/SimplifyCFG/duplicate-phis.ll | 21 + .../SimplifyCFG/hoist-common-code.ll | 18 + test/Transforms/SimplifyCFG/hoist-dbgvalue.ll | 56 + test/Transforms/SimplifyCFG/indirectbr.ll | 251 + test/Transforms/SimplifyCFG/invoke.ll | 139 + test/Transforms/SimplifyCFG/invoke_unwind.ll | 20 + .../SimplifyCFG/iterative-simplify.ll | 100 + test/Transforms/SimplifyCFG/lifetime.ll | 29 + test/Transforms/SimplifyCFG/multiple-phis.ll | 39 + test/Transforms/SimplifyCFG/noreturn-call.ll | 11 + .../SimplifyCFG/phi-undef-loadstore.ll | 115 + .../preserve-branchweights-partial.ll | 37 + .../preserve-branchweights-switch-create.ll | 140 + .../SimplifyCFG/preserve-branchweights.ll | 316 + test/Transforms/SimplifyCFG/return-merge.ll | 19 + test/Transforms/SimplifyCFG/select-gep.ll | 40 + .../SimplifyCFG/sink-common-code.ll | 53 + .../Transforms/SimplifyCFG/speculate-store.ll | 108 + .../SimplifyCFG/speculate-with-offset.ll | 94 + .../SimplifyCFG/switch-masked-bits.ll | 38 + .../SimplifyCFG/switch-on-const-select.ll | 141 + .../SimplifyCFG/switch-simplify-crash.ll | 108 + test/Transforms/SimplifyCFG/switch-to-icmp.ll | 57 + test/Transforms/SimplifyCFG/switch_create.ll | 556 + .../SimplifyCFG/switch_switch_fold.ll | 47 + test/Transforms/SimplifyCFG/switch_thread.ll | 79 + test/Transforms/SimplifyCFG/trap-debugloc.ll | 24 + .../SimplifyCFG/trapping-load-unreachable.ll | 87 + test/Transforms/SimplifyCFG/trivial-throw.ll | 77 + .../SimplifyCFG/two-entry-phi-return.ll | 15 + .../SimplifyCFG/unreachable-blocks.ll | 28 + .../SimplifyCFG/volatile-phioper.ll | 48 + test/Transforms/Sink/basic.ll | 64 + .../StripSymbols/2007-01-15-llvm.used.ll | 20 + .../StripSymbols/2010-06-30-StripDebug.ll | 34 + .../StripSymbols/2010-08-25-crash.ll | 24 + test/Transforms/StripSymbols/block-address.ll | 23 + .../StripSymbols/strip-dead-debug-info.ll | 58 + .../StructurizeCFG/branch-on-argument.ll | 47 + .../StructurizeCFG/loop-multiple-exits.ll | 50 + .../StructurizeCFG/no-branch-to-entry.ll | 31 + test/Transforms/StructurizeCFG/switch.ll | 23 + .../2010-06-26-MultipleReturnValues.ll | 20 + .../TailCallElim/accum_recursion.ll | 74 + test/Transforms/TailCallElim/ackermann.ll | 26 + test/Transforms/TailCallElim/basic.ll | 145 + .../TailCallElim/dont_reorder_load.ll | 64 + test/Transforms/TailCallElim/dup_tail.ll | 26 + test/Transforms/TailCallElim/inf-recursion.ll | 33 + test/Transforms/TailCallElim/reorder_load.ll | 105 + test/Transforms/TailCallElim/setjmp.ll | 29 + .../TailDup/2008-06-11-AvoidDupLoopHeader.ll | 28 + test/Transforms/TailDup/X86/lit.local.cfg | 4 + test/Transforms/TailDup/lit.local.cfg | 3 + test/Unit/lit.cfg | 90 + test/Unit/lit.site.cfg.in | 24 + test/Verifier/2002-04-13-RetTypes.ll | 10 + .../2002-11-05-GetelementptrPointers.ll | 10 + .../2004-05-21-SwitchConstantMismatch.ll | 13 + test/Verifier/2006-07-11-StoreStruct.ll | 13 + test/Verifier/2006-10-15-AddrLabel.ll | 10 + test/Verifier/2006-12-12-IntrinsicDefine.ll | 8 + test/Verifier/2007-12-21-InvokeParamAttrs.ll | 10 + test/Verifier/2008-01-11-VarargAttrs.ll | 10 + test/Verifier/2008-03-01-AllocaSized.ll | 9 + test/Verifier/2008-08-22-MemCpyAlignment.ll | 12 + test/Verifier/2008-11-15-RetVoid.ll | 6 + test/Verifier/2009-05-29-InvokeResult1.ll | 15 + test/Verifier/2009-05-29-InvokeResult2.ll | 16 + test/Verifier/2009-05-29-InvokeResult3.ll | 19 + test/Verifier/2010-08-07-PointerIntrinsic.ll | 22 + test/Verifier/AmbiguousPhi.ll | 9 + test/Verifier/PhiGrouping.ll | 16 + test/Verifier/README.txt | 3 + test/Verifier/SelfReferential.ll | 10 + test/Verifier/aliasing-chain.ll | 6 + ...tcast-address-space-nested-global-cycle.ll | 8 + .../bitcast-address-space-nested-global.ll | 11 + ...onstant-inttoptr-inside-gep-instruction.ll | 10 + ...address-space-through-constant-inttoptr.ll | 11 + .../bitcast-address-space-through-gep-2.ll | 17 + .../bitcast-address-space-through-gep.ll | 13 + .../bitcast-address-space-through-inttoptr.ll | 9 + test/Verifier/bitcast-address-spaces.ll | 9 + test/Verifier/bitcast-alias-address-space.ll | 8 + test/Verifier/bitcast-vector-pointer-as.ll | 9 + test/Verifier/byval-1.ll | 2 + test/Verifier/byval-4.ll | 4 + test/Verifier/cttz-undef-arg.ll | 16 + test/Verifier/dominates.ll | 57 + test/Verifier/fpmath.ll | 31 + test/Verifier/gcread-ptrptr.ll | 13 + test/Verifier/gcroot-alloca.ll | 14 + test/Verifier/gcroot-meta.ll | 16 + test/Verifier/gcroot-ptrptr.ll | 14 + test/Verifier/gcwrite-ptrptr.ll | 13 + test/Verifier/ident-meta1.ll | 12 + test/Verifier/ident-meta2.ll | 13 + test/Verifier/ident-meta3.ll | 10 + test/Verifier/invoke.ll | 79 + .../llvm.compiler_used-invalid-type.ll | 6 + test/Verifier/llvm.used-invalid-init.ll | 6 + test/Verifier/llvm.used-invalid-init2.ll | 7 + test/Verifier/llvm.used-invalid-type.ll | 6 + test/Verifier/llvm.used-invalid-type2.ll | 5 + test/Verifier/llvm.used-ptr-type.ll | 4 + test/Verifier/module-flags-1.ll | 60 + test/Verifier/range-1.ll | 142 + test/Verifier/range-2.ll | 36 + test/Verifier/varargs-intrinsic.ll | 16 + test/YAMLParser/LICENSE.txt | 19 + test/YAMLParser/bool.data | 6 + test/YAMLParser/construct-bool.data | 11 + test/YAMLParser/construct-custom.data | 28 + test/YAMLParser/construct-float.data | 8 + test/YAMLParser/construct-int.data | 8 + test/YAMLParser/construct-map.data | 8 + test/YAMLParser/construct-merge.data | 29 + test/YAMLParser/construct-null.data | 20 + test/YAMLParser/construct-omap.data | 10 + test/YAMLParser/construct-pairs.data | 9 + test/YAMLParser/construct-seq.data | 17 + test/YAMLParser/construct-set.data | 9 + test/YAMLParser/construct-str-ascii.data | 3 + test/YAMLParser/construct-str.data | 3 + test/YAMLParser/construct-timestamp.data | 7 + test/YAMLParser/construct-value.data | 12 + .../duplicate-key.former-loader-error.data | 5 + ...icate-mapping-key.former-loader-error.data | 8 + ...plicate-merge-key.former-loader-error.data | 6 + ...plicate-value-key.former-loader-error.data | 6 + ...lock-scalar-in-simple-key-context-bug.data | 6 + test/YAMLParser/empty-document-bug.data | 2 + test/YAMLParser/float.data | 8 + test/YAMLParser/int.data | 8 + test/YAMLParser/invalid-single-quote-bug.data | 4 + test/YAMLParser/merge.data | 3 + test/YAMLParser/more-floats.data | 3 + test/YAMLParser/negative-float-bug.data | 3 + test/YAMLParser/null.data | 5 + test/YAMLParser/resolver.data | 32 + test/YAMLParser/run-parser-crash-bug.data | 10 + test/YAMLParser/scan-document-end-bug.data | 5 + test/YAMLParser/scan-line-break-bug.data | 5 + .../single-dot-is-not-float-bug.data | 3 + test/YAMLParser/sloppy-indentation.data | 19 + test/YAMLParser/spec-02-01.data | 5 + test/YAMLParser/spec-02-02.data | 5 + test/YAMLParser/spec-02-03.data | 10 + test/YAMLParser/spec-02-04.data | 10 + test/YAMLParser/spec-02-05.data | 5 + test/YAMLParser/spec-02-06.data | 7 + test/YAMLParser/spec-02-07.data | 12 + test/YAMLParser/spec-02-08.data | 12 + test/YAMLParser/spec-02-09.data | 10 + test/YAMLParser/spec-02-10.data | 10 + test/YAMLParser/spec-02-11.data | 11 + test/YAMLParser/spec-02-12.data | 10 + test/YAMLParser/spec-02-13.data | 6 + test/YAMLParser/spec-02-14.data | 6 + test/YAMLParser/spec-02-15.data | 10 + test/YAMLParser/spec-02-16.data | 9 + test/YAMLParser/spec-02-17.data | 16 + test/YAMLParser/spec-02-18.data | 8 + test/YAMLParser/spec-02-19.data | 7 + test/YAMLParser/spec-02-20.data | 8 + test/YAMLParser/spec-02-21.data | 6 + test/YAMLParser/spec-02-22.data | 6 + test/YAMLParser/spec-02-23.data | 15 + test/YAMLParser/spec-02-24.data | 21 + test/YAMLParser/spec-02-25.data | 9 + test/YAMLParser/spec-02-26.data | 9 + test/YAMLParser/spec-02-27.data | 31 + test/YAMLParser/spec-02-28.data | 28 + test/YAMLParser/spec-05-01-utf8.data | 3 + test/YAMLParser/spec-05-02-utf8.data | 7 + test/YAMLParser/spec-05-03.data | 9 + test/YAMLParser/spec-05-04.data | 4 + test/YAMLParser/spec-05-05.data | 3 + test/YAMLParser/spec-05-06.data | 4 + test/YAMLParser/spec-05-07.data | 6 + test/YAMLParser/spec-05-08.data | 4 + test/YAMLParser/spec-05-09.data | 4 + test/YAMLParser/spec-05-10.data | 6 + test/YAMLParser/spec-05-11.data | 5 + test/YAMLParser/spec-05-12.data | 16 + test/YAMLParser/spec-05-13.data | 5 + test/YAMLParser/spec-05-14.data | 9 + test/YAMLParser/spec-05-15.data | 7 + test/YAMLParser/spec-06-01.data | 16 + test/YAMLParser/spec-06-02.data | 5 + test/YAMLParser/spec-06-03.data | 4 + test/YAMLParser/spec-06-04.data | 6 + test/YAMLParser/spec-06-05.data | 8 + test/YAMLParser/spec-06-06.data | 9 + test/YAMLParser/spec-06-07.data | 10 + test/YAMLParser/spec-06-08.data | 4 + test/YAMLParser/spec-07-01.data | 5 + test/YAMLParser/spec-07-02.data | 6 + test/YAMLParser/spec-07-03.data | 7 + test/YAMLParser/spec-07-04.data | 7 + test/YAMLParser/spec-07-05.data | 10 + test/YAMLParser/spec-07-06.data | 7 + test/YAMLParser/spec-07-07a.data | 4 + test/YAMLParser/spec-07-07b.data | 6 + test/YAMLParser/spec-07-08.data | 11 + test/YAMLParser/spec-07-09.data | 13 + test/YAMLParser/spec-07-10.data | 13 + test/YAMLParser/spec-07-11.data | 4 + test/YAMLParser/spec-07-12a.data | 5 + test/YAMLParser/spec-07-12b.data | 6 + test/YAMLParser/spec-07-13.data | 11 + test/YAMLParser/spec-08-01.data | 4 + test/YAMLParser/spec-08-02.data | 4 + test/YAMLParser/spec-08-03.data | 4 + test/YAMLParser/spec-08-04.data | 9 + test/YAMLParser/spec-08-05.data | 7 + test/YAMLParser/spec-08-06.data | 12 + test/YAMLParser/spec-08-07.data | 6 + test/YAMLParser/spec-08-08.data | 15 + test/YAMLParser/spec-08-09.data | 13 + test/YAMLParser/spec-08-10.data | 17 + test/YAMLParser/spec-08-11.data | 4 + test/YAMLParser/spec-08-12.data | 10 + test/YAMLParser/spec-08-13.data | 6 + test/YAMLParser/spec-08-14.data | 7 + test/YAMLParser/spec-08-15.data | 7 + test/YAMLParser/spec-09-01.data | 8 + test/YAMLParser/spec-09-02.data | 14 + test/YAMLParser/spec-09-03.data | 8 + test/YAMLParser/spec-09-04.data | 6 + test/YAMLParser/spec-09-05.data | 10 + test/YAMLParser/spec-09-06.data | 3 + test/YAMLParser/spec-09-07.data | 8 + test/YAMLParser/spec-09-08.data | 3 + test/YAMLParser/spec-09-09.data | 8 + test/YAMLParser/spec-09-10.data | 5 + test/YAMLParser/spec-09-11.data | 7 + test/YAMLParser/spec-09-12.data | 10 + test/YAMLParser/spec-09-13.data | 8 + test/YAMLParser/spec-09-14.data | 21 + test/YAMLParser/spec-09-15.data | 15 + test/YAMLParser/spec-09-16.data | 5 + test/YAMLParser/spec-09-17.data | 5 + test/YAMLParser/spec-09-18.data | 11 + test/YAMLParser/spec-09-19.data | 6 + test/YAMLParser/spec-09-20.data | 13 + test/YAMLParser/spec-09-21.data | 12 + test/YAMLParser/spec-09-22.data | 6 + test/YAMLParser/spec-09-23.data | 13 + test/YAMLParser/spec-09-24.data | 8 + test/YAMLParser/spec-09-25.data | 5 + test/YAMLParser/spec-09-26.data | 10 + test/YAMLParser/spec-09-27.data | 10 + test/YAMLParser/spec-09-28.data | 10 + test/YAMLParser/spec-09-29.data | 6 + test/YAMLParser/spec-09-30.data | 16 + test/YAMLParser/spec-09-31.data | 16 + test/YAMLParser/spec-09-32.data | 16 + test/YAMLParser/spec-09-33.data | 16 + test/YAMLParser/spec-10-01.data | 4 + test/YAMLParser/spec-10-02.data | 10 + test/YAMLParser/spec-10-03.data | 6 + test/YAMLParser/spec-10-04.data | 6 + test/YAMLParser/spec-10-05.data | 9 + test/YAMLParser/spec-10-06.data | 4 + test/YAMLParser/spec-10-07.data | 9 + test/YAMLParser/spec-10-08.data | 13 + test/YAMLParser/spec-10-09.data | 6 + test/YAMLParser/spec-10-10.data | 10 + test/YAMLParser/spec-10-11.data | 9 + test/YAMLParser/spec-10-12.data | 5 + test/YAMLParser/spec-10-13.data | 7 + test/YAMLParser/spec-10-14.data | 6 + test/YAMLParser/spec-10-15.data | 5 + test/YAMLParser/str.data | 3 + test/YAMLParser/timestamp-bugs.data | 8 + test/YAMLParser/timestamp.data | 7 + test/YAMLParser/utf8-implicit.data | 3 + test/YAMLParser/utf8.data | 3 + test/YAMLParser/value.data | 3 + test/YAMLParser/yaml.data | 11 + test/lit.cfg | 351 + test/lit.site.cfg.in | 35 + test/tools/llvm-cov/Inputs/README | 7 + test/tools/llvm-cov/Inputs/test.cpp | 77 + test/tools/llvm-cov/Inputs/test.cpp.gcov | 82 + test/tools/llvm-cov/Inputs/test.gcda | Bin 0 -> 824 bytes test/tools/llvm-cov/Inputs/test.gcno | Bin 0 -> 3112 bytes .../tools/llvm-cov/Inputs/test_read_fail.gcno | Bin 0 -> 111 bytes test/tools/llvm-cov/lit.local.cfg | 1 + test/tools/llvm-cov/llvm-cov.test | 10 + test/tools/llvm-lit/chain.c | 9 + .../llvm-objdump/Inputs/nop.exe.coff-i386 | Bin 0 -> 7680 bytes .../llvm-objdump/Inputs/trivial.obj.elf-i386 | Bin 0 -> 449 bytes .../Inputs/win64-unwind.exe.coff-x86_64 | Bin 0 -> 698 bytes .../Inputs/win64-unwind.exe.coff-x86_64.asm | 53 + .../llvm-objdump/coff-private-headers.test | 9 + .../llvm-objdump/disassembly-show-raw.test | 14 + test/tools/llvm-objdump/lit.local.cfg | 3 + .../tools/llvm-objdump/win64-unwind-data.test | 52 + .../tools/llvm-readobj/Inputs/dynamic-table.c | 7 + .../llvm-readobj/Inputs/dynamic-table.mips | Bin 0 -> 5395 bytes .../llvm-readobj/Inputs/magic.coff-importlib | Bin 0 -> 40 bytes .../llvm-readobj/Inputs/magic.coff-unknown | Bin 0 -> 450 bytes .../llvm-readobj/Inputs/relocs.obj.coff-i386 | Bin 0 -> 305 bytes .../Inputs/relocs.obj.coff-x86_64 | Bin 0 -> 424 bytes .../Inputs/relocs.obj.elf-aarch64 | Bin 0 -> 2832 bytes .../llvm-readobj/Inputs/relocs.obj.elf-arm | Bin 0 -> 2100 bytes .../llvm-readobj/Inputs/relocs.obj.elf-i386 | Bin 0 -> 1120 bytes .../llvm-readobj/Inputs/relocs.obj.elf-mips | Bin 0 -> 1132 bytes .../Inputs/relocs.obj.elf-mips64el | Bin 0 -> 2216 bytes .../llvm-readobj/Inputs/relocs.obj.elf-ppc64 | Bin 0 -> 3792 bytes .../llvm-readobj/Inputs/relocs.obj.elf-x86_64 | Bin 0 -> 1984 bytes .../llvm-readobj/Inputs/relocs.obj.macho-arm | Bin 0 -> 396 bytes .../llvm-readobj/Inputs/relocs.obj.macho-i386 | Bin 0 -> 368 bytes .../Inputs/relocs.obj.macho-x86_64 | Bin 0 -> 460 bytes test/tools/llvm-readobj/Inputs/relocs.py | 1061 + .../llvm-readobj/Inputs/rpath.exe.elf-x86_64 | Bin 0 -> 5632 bytes .../llvm-readobj/Inputs/trivial.exe.coff-i386 | Bin 0 -> 2560 bytes test/tools/llvm-readobj/Inputs/trivial.ll | 19 + .../llvm-readobj/Inputs/trivial.obj.coff-i386 | Bin 0 -> 314 bytes .../Inputs/trivial.obj.coff-x86-64 | Bin 0 -> 319 bytes .../llvm-readobj/Inputs/trivial.obj.elf-i386 | Bin 0 -> 896 bytes .../Inputs/trivial.obj.elf-x86-64 | Bin 0 -> 1256 bytes .../llvm-readobj/Inputs/trivial.obj.macho-arm | Bin 0 -> 908 bytes .../Inputs/trivial.obj.macho-i386 | Bin 0 -> 472 bytes .../llvm-readobj/Inputs/trivial.obj.macho-ppc | Bin 0 -> 844 bytes .../Inputs/trivial.obj.macho-ppc64 | Bin 0 -> 956 bytes .../Inputs/trivial.obj.macho-x86-64 | Bin 0 -> 532 bytes test/tools/llvm-readobj/dynamic.test | 33 + test/tools/llvm-readobj/file-headers.test | 218 + test/tools/llvm-readobj/program-headers.test | 104 + test/tools/llvm-readobj/reloc-types.test | 640 + test/tools/llvm-readobj/relocations.test | 173 + test/tools/llvm-readobj/rpath.test | 4 + test/tools/llvm-readobj/sections-ext.test | 863 + test/tools/llvm-readobj/sections.test | 452 + test/tools/llvm-readobj/symbols.test | 53 + tools/CMakeLists.txt | 79 + tools/LLVMBuild.txt | 24 + tools/Makefile | 75 + tools/bugpoint-passes/CMakeLists.txt | 9 + tools/bugpoint-passes/Makefile | 23 + tools/bugpoint-passes/TestPasses.cpp | 75 + tools/bugpoint-passes/bugpoint.exports | 0 tools/bugpoint/BugDriver.cpp | 247 + tools/bugpoint/BugDriver.h | 332 + tools/bugpoint/CMakeLists.txt | 15 + tools/bugpoint/CrashDebugger.cpp | 670 + tools/bugpoint/ExecutionDriver.cpp | 477 + tools/bugpoint/ExtractFunction.cpp | 412 + tools/bugpoint/FindBugs.cpp | 114 + tools/bugpoint/LLVMBuild.txt | 22 + tools/bugpoint/ListReducer.h | 201 + tools/bugpoint/Makefile | 15 + tools/bugpoint/Miscompilation.cpp | 1124 + tools/bugpoint/OptimizerDriver.cpp | 276 + tools/bugpoint/ToolRunner.cpp | 921 + tools/bugpoint/ToolRunner.h | 198 + tools/bugpoint/bugpoint.cpp | 211 + tools/gold/CMakeLists.txt | 46 + tools/gold/Makefile | 31 + tools/gold/README.txt | 13 + tools/gold/gold-plugin.cpp | 490 + tools/gold/gold.exports | 1 + tools/llc/CMakeLists.txt | 5 + tools/llc/LLVMBuild.txt | 22 + tools/llc/Makefile | 15 + tools/llc/llc.cpp | 383 + tools/lli/CMakeLists.txt | 27 + tools/lli/ChildTarget/CMakeLists.txt | 3 + tools/lli/ChildTarget/ChildTarget.cpp | 242 + tools/lli/ChildTarget/LLVMBuild.txt | 21 + tools/lli/ChildTarget/Makefile | 17 + tools/lli/ChildTarget/Unix/ChildTarget.inc | 166 + tools/lli/ChildTarget/Windows/ChildTarget.inc | 44 + tools/lli/LLVMBuild.txt | 25 + tools/lli/Makefile | 31 + tools/lli/RemoteMemoryManager.cpp | 206 + tools/lli/RemoteMemoryManager.h | 114 + tools/lli/RemoteTarget.cpp | 92 + tools/lli/RemoteTarget.h | 112 + tools/lli/RemoteTargetExternal.cpp | 162 + tools/lli/RemoteTargetExternal.h | 118 + tools/lli/RemoteTargetMessage.h | 45 + tools/lli/Unix/RemoteTargetExternal.inc | 96 + tools/lli/Windows/RemoteTargetExternal.inc | 35 + tools/lli/lli.cpp | 565 + tools/llvm-ar/CMakeLists.txt | 25 + tools/llvm-ar/LLVMBuild.txt | 21 + tools/llvm-ar/Makefile | 18 + tools/llvm-ar/llvm-ar.cpp | 945 + tools/llvm-as/CMakeLists.txt | 5 + tools/llvm-as/LLVMBuild.txt | 22 + tools/llvm-as/Makefile | 17 + tools/llvm-as/llvm-as.cpp | 118 + tools/llvm-bcanalyzer/CMakeLists.txt | 5 + tools/llvm-bcanalyzer/LLVMBuild.txt | 22 + tools/llvm-bcanalyzer/Makefile | 17 + tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp | 635 + tools/llvm-c-test/CMakeLists.txt | 16 + tools/llvm-c-test/Makefile | 29 + tools/llvm-c-test/calc.c | 148 + tools/llvm-c-test/disassemble.c | 88 + tools/llvm-c-test/helpers.c | 40 + tools/llvm-c-test/include-all.c | 33 + tools/llvm-c-test/llvm-c-test.h | 37 + tools/llvm-c-test/main.c | 73 + tools/llvm-c-test/module.c | 116 + tools/llvm-c-test/object.c | 88 + tools/llvm-c-test/targets.c | 30 + tools/llvm-config/BuildVariables.inc.in | 27 + tools/llvm-config/CMakeLists.txt | 31 + tools/llvm-config/Makefile | 67 + tools/llvm-config/llvm-config.cpp | 356 + tools/llvm-cov/CMakeLists.txt | 5 + tools/llvm-cov/LLVMBuild.txt | 22 + tools/llvm-cov/Makefile | 17 + tools/llvm-cov/llvm-cov.cpp | 88 + tools/llvm-diff/CMakeLists.txt | 8 + tools/llvm-diff/DiffConsumer.cpp | 214 + tools/llvm-diff/DiffConsumer.h | 90 + tools/llvm-diff/DiffLog.cpp | 52 + tools/llvm-diff/DiffLog.h | 80 + tools/llvm-diff/DifferenceEngine.cpp | 679 + tools/llvm-diff/DifferenceEngine.h | 91 + tools/llvm-diff/LLVMBuild.txt | 22 + tools/llvm-diff/Makefile | 17 + tools/llvm-diff/llvm-diff.cpp | 96 + tools/llvm-dis/CMakeLists.txt | 5 + tools/llvm-dis/LLVMBuild.txt | 22 + tools/llvm-dis/Makefile | 17 + tools/llvm-dis/llvm-dis.cpp | 190 + tools/llvm-dwarfdump/CMakeLists.txt | 8 + tools/llvm-dwarfdump/LLVMBuild.txt | 22 + tools/llvm-dwarfdump/Makefile | 17 + tools/llvm-dwarfdump/llvm-dwarfdump.cpp | 149 + tools/llvm-extract/CMakeLists.txt | 5 + tools/llvm-extract/LLVMBuild.txt | 22 + tools/llvm-extract/Makefile | 17 + tools/llvm-extract/llvm-extract.cpp | 285 + tools/llvm-jitlistener/CMakeLists.txt | 22 + tools/llvm-jitlistener/LLVMBuild.txt | 22 + tools/llvm-jitlistener/Makefile | 27 + tools/llvm-jitlistener/llvm-jitlistener.cpp | 207 + tools/llvm-link/CMakeLists.txt | 5 + tools/llvm-link/LLVMBuild.txt | 22 + tools/llvm-link/Makefile | 17 + tools/llvm-link/llvm-link.cpp | 130 + tools/llvm-lto/CMakeLists.txt | 6 + tools/llvm-lto/LLVMBuild.txt | 22 + tools/llvm-lto/Makefile | 19 + tools/llvm-lto/llvm-lto.cpp | 187 + tools/llvm-mc/CMakeLists.txt | 6 + tools/llvm-mc/Disassembler.cpp | 215 + tools/llvm-mc/Disassembler.h | 42 + tools/llvm-mc/LLVMBuild.txt | 22 + tools/llvm-mc/Makefile | 17 + tools/llvm-mc/llvm-mc.cpp | 485 + tools/llvm-mcmarkup/CMakeLists.txt | 5 + tools/llvm-mcmarkup/LLVMBuild.txt | 22 + tools/llvm-mcmarkup/Makefile | 17 + tools/llvm-mcmarkup/llvm-mcmarkup.cpp | 225 + tools/llvm-nm/CMakeLists.txt | 5 + tools/llvm-nm/LLVMBuild.txt | 22 + tools/llvm-nm/Makefile | 17 + tools/llvm-nm/llvm-nm.cpp | 701 + tools/llvm-objdump/CMakeLists.txt | 15 + tools/llvm-objdump/COFFDump.cpp | 401 + tools/llvm-objdump/ELFDump.cpp | 94 + tools/llvm-objdump/LLVMBuild.txt | 22 + tools/llvm-objdump/MachODump.cpp | 467 + tools/llvm-objdump/Makefile | 17 + tools/llvm-objdump/llvm-objdump.cpp | 889 + tools/llvm-objdump/llvm-objdump.h | 41 + tools/llvm-readobj/CMakeLists.txt | 14 + tools/llvm-readobj/COFFDumper.cpp | 1114 + tools/llvm-readobj/ELFDumper.cpp | 841 + tools/llvm-readobj/Error.cpp | 62 + tools/llvm-readobj/Error.h | 48 + tools/llvm-readobj/LLVMBuild.txt | 22 + tools/llvm-readobj/MachODumper.cpp | 431 + tools/llvm-readobj/Makefile | 18 + tools/llvm-readobj/ObjDumper.cpp | 33 + tools/llvm-readobj/ObjDumper.h | 61 + tools/llvm-readobj/StreamWriter.cpp | 79 + tools/llvm-readobj/StreamWriter.h | 282 + tools/llvm-readobj/llvm-readobj.cpp | 298 + tools/llvm-readobj/llvm-readobj.h | 46 + tools/llvm-rtdyld/CMakeLists.txt | 5 + tools/llvm-rtdyld/LLVMBuild.txt | 22 + tools/llvm-rtdyld/Makefile | 17 + tools/llvm-rtdyld/llvm-rtdyld.cpp | 258 + tools/llvm-shlib/Makefile | 127 + tools/llvm-size/CMakeLists.txt | 5 + tools/llvm-size/LLVMBuild.txt | 22 + tools/llvm-size/Makefile | 17 + tools/llvm-size/llvm-size.cpp | 311 + tools/llvm-stress/CMakeLists.txt | 5 + tools/llvm-stress/LLVMBuild.txt | 22 + tools/llvm-stress/Makefile | 18 + tools/llvm-stress/llvm-stress.cpp | 721 + tools/llvm-symbolizer/CMakeLists.txt | 14 + tools/llvm-symbolizer/LLVMSymbolize.cpp | 446 + tools/llvm-symbolizer/LLVMSymbolize.h | 126 + tools/llvm-symbolizer/Makefile | 17 + tools/llvm-symbolizer/llvm-symbolizer.cpp | 123 + tools/lto/CMakeLists.txt | 51 + tools/lto/LTODisassembler.cpp | 26 + tools/lto/Makefile | 58 + tools/lto/lto.cpp | 305 + tools/lto/lto.exports | 35 + tools/macho-dump/CMakeLists.txt | 5 + tools/macho-dump/LLVMBuild.txt | 22 + tools/macho-dump/Makefile | 17 + tools/macho-dump/macho-dump.cpp | 415 + tools/msbuild/CMakeLists.txt | 42 + .../Microsoft.Cpp.Win32.LLVM-vs2010.targets | 2 + .../Microsoft.Cpp.Win32.LLVM-vs2012.targets | 3 + ...Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets | 21 + .../msbuild/Microsoft.Cpp.Win32.llvm.props.in | 18 + tools/msbuild/install.bat | 81 + tools/msbuild/toolset-vs2013.targets | 3 + tools/msbuild/toolset-vs2013_xp.targets | 21 + tools/msbuild/uninstall.bat | 50 + tools/obj2yaml/CMakeLists.txt | 7 + tools/obj2yaml/Makefile | 20 + tools/obj2yaml/coff2yaml.cpp | 119 + tools/obj2yaml/obj2yaml.cpp | 54 + tools/obj2yaml/obj2yaml.h | 22 + tools/opt/AnalysisWrappers.cpp | 94 + tools/opt/CMakeLists.txt | 9 + tools/opt/GraphPrinters.cpp | 47 + tools/opt/LLVMBuild.txt | 22 + tools/opt/Makefile | 14 + tools/opt/PrintSCC.cpp | 112 + tools/opt/opt.cpp | 860 + tools/yaml2obj/CMakeLists.txt | 9 + tools/yaml2obj/Makefile | 20 + tools/yaml2obj/yaml2coff.cpp | 288 + tools/yaml2obj/yaml2elf.cpp | 401 + tools/yaml2obj/yaml2obj.cpp | 71 + tools/yaml2obj/yaml2obj.h | 22 + unittests/ADT/APFloatTest.cpp | 2674 + unittests/ADT/APIntTest.cpp | 600 + unittests/ADT/BitVectorTest.cpp | 397 + unittests/ADT/CMakeLists.txt | 52 + unittests/ADT/DAGDeltaAlgorithmTest.cpp | 105 + unittests/ADT/DeltaAlgorithmTest.cpp | 100 + unittests/ADT/DenseMapTest.cpp | 366 + unittests/ADT/DenseSetTest.cpp | 30 + unittests/ADT/FoldingSet.cpp | 39 + unittests/ADT/HashingTest.cpp | 424 + unittests/ADT/ImmutableMapTest.cpp | 50 + unittests/ADT/ImmutableSetTest.cpp | 201 + unittests/ADT/IntEqClassesTest.cpp | 107 + unittests/ADT/IntervalMapTest.cpp | 716 + unittests/ADT/IntrusiveRefCntPtrTest.cpp | 66 + unittests/ADT/Makefile | 23 + unittests/ADT/MapVectorTest.cpp | 55 + unittests/ADT/OptionalTest.cpp | 284 + unittests/ADT/PackedVectorTest.cpp | 115 + unittests/ADT/PointerUnionTest.cpp | 64 + unittests/ADT/SCCIteratorTest.cpp | 346 + unittests/ADT/SmallPtrSetTest.cpp | 127 + unittests/ADT/SmallStringTest.cpp | 196 + unittests/ADT/SmallVectorTest.cpp | 489 + unittests/ADT/SparseBitVectorTest.cpp | 36 + unittests/ADT/SparseMultiSetTest.cpp | 235 + unittests/ADT/SparseSetTest.cpp | 186 + unittests/ADT/StringMapTest.cpp | 223 + unittests/ADT/StringRefTest.cpp | 534 + unittests/ADT/TinyPtrVectorTest.cpp | 448 + unittests/ADT/TripleTest.cpp | 500 + unittests/ADT/TwineTest.cpp | 87 + unittests/ADT/VariadicFunctionTest.cpp | 110 + unittests/ADT/ilistTest.cpp | 98 + unittests/ADT/polymorphic_ptr_test.cpp | 129 + unittests/Analysis/CFGTest.cpp | 376 + unittests/Analysis/CMakeLists.txt | 9 + unittests/Analysis/Makefile | 15 + unittests/Analysis/ScalarEvolutionTest.cpp | 234 + unittests/Bitcode/BitReaderTest.cpp | 65 + unittests/Bitcode/CMakeLists.txt | 8 + unittests/Bitcode/Makefile | 15 + unittests/CMakeLists.txt | 19 + unittests/CodeGen/CMakeLists.txt | 13 + unittests/CodeGen/DIEHashTest.cpp | 517 + unittests/CodeGen/Makefile | 16 + unittests/DebugInfo/CMakeLists.txt | 13 + unittests/DebugInfo/DWARFFormValueTest.cpp | 49 + unittests/DebugInfo/Makefile | 16 + unittests/ExecutionEngine/CMakeLists.txt | 14 + .../ExecutionEngine/ExecutionEngineTest.cpp | 131 + unittests/ExecutionEngine/JIT/CMakeLists.txt | 58 + .../JIT/IntelJITEventListenerTest.cpp | 113 + .../JIT/JITEventListenerTest.cpp | 240 + .../JIT/JITEventListenerTestCommon.h | 207 + .../JIT/JITMemoryManagerTest.cpp | 303 + unittests/ExecutionEngine/JIT/JITTest.cpp | 724 + unittests/ExecutionEngine/JIT/JITTests.def | 4 + unittests/ExecutionEngine/JIT/Makefile | 49 + .../ExecutionEngine/JIT/MultiJITTest.cpp | 181 + .../JIT/OProfileJITEventListenerTest.cpp | 165 + .../ExecutionEngine/MCJIT/CMakeLists.txt | 27 + .../ExecutionEngine/MCJIT/MCJITCAPITest.cpp | 196 + .../MCJIT/MCJITMemoryManagerTest.cpp | 172 + .../MCJIT/MCJITMultipleModuleTest.cpp | 395 + .../MCJIT/MCJITObjectCacheTest.cpp | 242 + unittests/ExecutionEngine/MCJIT/MCJITTest.cpp | 190 + .../MCJIT/MCJITTestAPICommon.h | 91 + .../ExecutionEngine/MCJIT/MCJITTestBase.h | 353 + .../ExecutionEngine/MCJIT/MCJITTests.def | 1 + unittests/ExecutionEngine/MCJIT/Makefile | 18 + unittests/ExecutionEngine/Makefile | 20 + unittests/IR/AttributesTest.cpp | 47 + unittests/IR/CMakeLists.txt | 40 + unittests/IR/ConstantsTest.cpp | 260 + unittests/IR/DominatorTreeTest.cpp | 204 + unittests/IR/IRBuilderTest.cpp | 222 + unittests/IR/InstructionsTest.cpp | 418 + unittests/IR/LegacyPassManagerTest.cpp | 559 + unittests/IR/MDBuilderTest.cpp | 106 + unittests/IR/Makefile | 15 + unittests/IR/MetadataTest.cpp | 152 + unittests/IR/PassManagerTest.cpp | 131 + unittests/IR/PatternMatch.cpp | 265 + unittests/IR/TypeBuilderTest.cpp | 253 + unittests/IR/TypesTest.cpp | 30 + unittests/IR/ValueMapTest.cpp | 294 + unittests/IR/ValueTest.cpp | 86 + unittests/IR/VerifierTest.cpp | 81 + unittests/IR/WaymarkTest.cpp | 57 + unittests/MC/CMakeLists.txt | 11 + unittests/MC/MCAtomTest.cpp | 31 + unittests/MC/Makefile | 15 + unittests/Makefile | 18 + unittests/Makefile.unittest | 62 + unittests/Object/CMakeLists.txt | 7 + unittests/Object/Makefile | 15 + unittests/Object/YAMLTest.cpp | 38 + unittests/Option/CMakeLists.txt | 15 + unittests/Option/Makefile | 23 + unittests/Option/OptionParsingTest.cpp | 205 + unittests/Option/Opts.td | 26 + unittests/Support/AlignOfTest.cpp | 335 + unittests/Support/AllocatorTest.cpp | 150 + unittests/Support/ArrayRecyclerTest.cpp | 109 + unittests/Support/BlockFrequencyTest.cpp | 240 + unittests/Support/CMakeLists.txt | 41 + unittests/Support/Casting.cpp | 230 + unittests/Support/CommandLineTest.cpp | 164 + unittests/Support/CompressionTest.cpp | 74 + unittests/Support/ConstantRangeTest.cpp | 512 + unittests/Support/ConvertUTFTest.cpp | 65 + unittests/Support/DataExtractorTest.cpp | 120 + unittests/Support/EndianTest.cpp | 72 + unittests/Support/ErrorOrTest.cpp | 66 + unittests/Support/FileOutputBufferTest.cpp | 120 + unittests/Support/LeakDetectorTest.cpp | 31 + unittests/Support/LockFileManagerTest.cpp | 48 + unittests/Support/MD5Test.cpp | 60 + unittests/Support/Makefile | 15 + unittests/Support/ManagedStatic.cpp | 62 + unittests/Support/MathExtrasTest.cpp | 191 + unittests/Support/MemoryBufferTest.cpp | 171 + unittests/Support/MemoryTest.cpp | 357 + unittests/Support/Path.cpp | 563 + unittests/Support/ProcessTest.cpp | 70 + unittests/Support/ProgramTest.cpp | 194 + unittests/Support/RegexTest.cpp | 138 + unittests/Support/SourceMgrTest.cpp | 174 + unittests/Support/SwapByteOrderTest.cpp | 128 + unittests/Support/ThreadLocalTest.cpp | 38 + unittests/Support/TimeValueTest.cpp | 39 + unittests/Support/UnicodeTest.cpp | 93 + unittests/Support/ValueHandleTest.cpp | 408 + unittests/Support/YAMLIOTest.cpp | 1644 + unittests/Support/YAMLParserTest.cpp | 219 + .../Support/formatted_raw_ostream_test.cpp | 33 + unittests/Support/raw_ostream_test.cpp | 146 + unittests/Transforms/CMakeLists.txt | 2 + unittests/Transforms/DebugIR/CMakeLists.txt | 7 + unittests/Transforms/DebugIR/DebugIR.cpp | 307 + unittests/Transforms/DebugIR/Makefile | 15 + unittests/Transforms/Makefile | 17 + unittests/Transforms/Utils/CMakeLists.txt | 10 + unittests/Transforms/Utils/Cloning.cpp | 176 + .../Transforms/Utils/IntegerDivision.cpp | 142 + unittests/Transforms/Utils/Local.cpp | 60 + unittests/Transforms/Utils/Makefile | 15 + .../Transforms/Utils/SpecialCaseList.cpp | 232 + utils/DSAclean.py | 32 + utils/DSAextract.py | 111 + utils/FileCheck/CMakeLists.txt | 11 + utils/FileCheck/FileCheck.cpp | 1322 + utils/FileCheck/Makefile | 21 + utils/FileUpdate/CMakeLists.txt | 11 + utils/FileUpdate/FileUpdate.cpp | 87 + utils/FileUpdate/Makefile | 21 + utils/GenLibDeps.pl | 384 + utils/GetRepositoryPath | 27 + utils/GetSourceVersion | 27 + utils/KillTheDoctor/CMakeLists.txt | 5 + utils/KillTheDoctor/KillTheDoctor.cpp | 553 + utils/LLVMBuild.txt | 29 + utils/Makefile | 19 + utils/Misc/mergefunctions.clang.svn.patch | 14 + utils/Misc/zkill | 276 + utils/PerfectShuffle/Makefile | 18 + utils/PerfectShuffle/PerfectShuffle.cpp | 572 + utils/TableGen/AsmMatcherEmitter.cpp | 3081 + utils/TableGen/AsmWriterEmitter.cpp | 1017 + utils/TableGen/AsmWriterInst.cpp | 233 + utils/TableGen/AsmWriterInst.h | 113 + utils/TableGen/CMakeLists.txt | 37 + utils/TableGen/CTagsEmitter.cpp | 99 + utils/TableGen/CallingConvEmitter.cpp | 237 + utils/TableGen/CodeEmitterGen.cpp | 342 + utils/TableGen/CodeGenDAGPatterns.cpp | 3598 + utils/TableGen/CodeGenDAGPatterns.h | 826 + utils/TableGen/CodeGenInstruction.cpp | 637 + utils/TableGen/CodeGenInstruction.h | 341 + utils/TableGen/CodeGenIntrinsics.h | 95 + utils/TableGen/CodeGenMapTable.cpp | 604 + utils/TableGen/CodeGenRegisters.cpp | 2014 + utils/TableGen/CodeGenRegisters.h | 686 + utils/TableGen/CodeGenSchedule.cpp | 1785 + utils/TableGen/CodeGenSchedule.h | 408 + utils/TableGen/CodeGenTarget.cpp | 574 + utils/TableGen/CodeGenTarget.h | 211 + utils/TableGen/DAGISelEmitter.cpp | 173 + utils/TableGen/DAGISelMatcher.cpp | 419 + utils/TableGen/DAGISelMatcher.h | 1147 + utils/TableGen/DAGISelMatcherEmitter.cpp | 823 + utils/TableGen/DAGISelMatcherGen.cpp | 980 + utils/TableGen/DAGISelMatcherOpt.cpp | 517 + utils/TableGen/DFAPacketizerEmitter.cpp | 524 + utils/TableGen/DisassemblerEmitter.cpp | 146 + utils/TableGen/FastISelEmitter.cpp | 880 + utils/TableGen/FixedLenDecoderEmitter.cpp | 2096 + utils/TableGen/InstrInfoEmitter.cpp | 615 + utils/TableGen/IntrinsicEmitter.cpp | 797 + utils/TableGen/LLVMBuild.txt | 22 + utils/TableGen/Makefile | 18 + utils/TableGen/OptParserEmitter.cpp | 286 + utils/TableGen/PseudoLoweringEmitter.cpp | 298 + utils/TableGen/RegisterInfoEmitter.cpp | 1357 + utils/TableGen/SequenceToOffsetTable.h | 142 + utils/TableGen/SetTheory.cpp | 328 + utils/TableGen/SetTheory.h | 142 + utils/TableGen/SubtargetEmitter.cpp | 1570 + utils/TableGen/TGValueTypes.cpp | 128 + utils/TableGen/TableGen.cpp | 182 + utils/TableGen/TableGenBackends.h | 80 + utils/TableGen/X86DisassemblerShared.h | 39 + utils/TableGen/X86DisassemblerTables.cpp | 845 + utils/TableGen/X86DisassemblerTables.h | 284 + utils/TableGen/X86ModRMFilters.cpp | 26 + utils/TableGen/X86ModRMFilters.h | 199 + utils/TableGen/X86RecognizableInstr.cpp | 1486 + utils/TableGen/X86RecognizableInstr.h | 273 + utils/TableGen/tdtags | 453 + utils/Target/ARM/analyze-match-table.py | 61 + utils/UpdateCMakeLists.pl | 118 + utils/bugpoint/RemoteRunSafely.sh | 105 + utils/buildit/GNUmakefile | 132 + utils/buildit/build_llvm | 356 + utils/check-each-file | 150 + utils/clang-parse-diagnostics-file | 96 + utils/codegen-diff | 135 + utils/count/CMakeLists.txt | 3 + utils/count/Makefile | 20 + utils/count/count.c | 50 + utils/countloc.sh | 40 + utils/crosstool/ARM/README | 37 + utils/crosstool/ARM/build-install-linux.sh | 200 + utils/crosstool/create-snapshots.sh | 41 + utils/emacs/README | 27 + utils/emacs/emacs.el | 39 + utils/emacs/llvm-mode.el | 141 + utils/emacs/tablegen-mode.el | 122 + utils/findmisopt | 177 + utils/findoptdiff | 101 + utils/findsym.pl | 33 + utils/fpcmp/Makefile | 16 + utils/fpcmp/fpcmp.cpp | 42 + utils/getsrcs.sh | 34 + utils/git-svn/git-svnrevert | 52 + utils/git-svn/git-svnup | 15 + utils/git/find-rev | 50 + utils/jedit/README | 14 + utils/jedit/tablegen.xml | 39 + utils/kate/README | 12 + utils/kate/llvm.xml | 257 + utils/lint/common_lint.py | 97 + utils/lint/cpp_lint.py | 94 + utils/lint/generic_lint.py | 24 + utils/lint/remove_trailing_whitespace.sh | 6 + utils/lit/MANIFEST.in | 7 + utils/lit/TODO | 166 + utils/lit/examples/README.txt | 7 + utils/lit/examples/many-tests/README.txt | 10 + utils/lit/examples/many-tests/lit.cfg | 23 + utils/lit/lit.py | 5 + .../lit/lit/ExampleTests.ObjDir/lit.site.cfg | 15 + utils/lit/lit/LitConfig.py | 123 + utils/lit/lit/LitTestCase.py | 34 + utils/lit/lit/ProgressBar.py | 291 + utils/lit/lit/ShCommands.py | 85 + utils/lit/lit/ShUtil.py | 355 + utils/lit/lit/Test.py | 190 + utils/lit/lit/TestRunner.py | 508 + utils/lit/lit/TestingConfig.py | 151 + utils/lit/lit/__init__.py | 11 + utils/lit/lit/discovery.py | 255 + utils/lit/lit/formats/__init__.py | 4 + utils/lit/lit/formats/base.py | 118 + utils/lit/lit/formats/googletest.py | 114 + utils/lit/lit/formats/shtest.py | 12 + utils/lit/lit/main.py | 395 + utils/lit/lit/run.py | 277 + utils/lit/lit/util.py | 169 + utils/lit/setup.py | 77 + utils/lit/tests/.coveragerc | 11 + utils/lit/tests/Inputs/discovery/lit.cfg | 14 + .../Inputs/discovery/subdir/lit.local.cfg | 4 + .../Inputs/discovery/subdir/test-three.py | 1 + .../tests/Inputs/discovery/subsuite/lit.cfg | 6 + .../Inputs/discovery/subsuite/test-one.txt | 1 + .../Inputs/discovery/subsuite/test-two.txt | 1 + utils/lit/tests/Inputs/discovery/test-one.txt | 1 + utils/lit/tests/Inputs/discovery/test-two.txt | 1 + .../Inputs/exec-discovery-in-tree/lit.cfg | 9 + .../exec-discovery-in-tree/obj/lit.site.cfg | 4 + .../exec-discovery-in-tree/test-one.txt | 1 + .../tests/Inputs/exec-discovery/lit.site.cfg | 5 + .../googletest-format/DummySubDir/OneTest | 34 + .../tests/Inputs/googletest-format/lit.cfg | 3 + utils/lit/tests/Inputs/progress-bar/lit.cfg | 6 + .../lit/tests/Inputs/progress-bar/test-1.txt | 1 + .../lit/tests/Inputs/progress-bar/test-2.txt | 1 + .../lit/tests/Inputs/progress-bar/test-3.txt | 1 + .../lit/tests/Inputs/progress-bar/test-4.txt | 1 + .../lit/tests/Inputs/shtest-format/argv0.txt | 6 + .../shtest-format/external_shell/fail.txt | 5 + .../external_shell/fail_with_bad_encoding.txt | 5 + .../external_shell/lit.local.cfg | 2 + .../shtest-format/external_shell/pass.txt | 1 + .../external_shell/write-bad-encoding.sh | 3 + utils/lit/tests/Inputs/shtest-format/fail.txt | 2 + utils/lit/tests/Inputs/shtest-format/lit.cfg | 8 + .../Inputs/shtest-format/no-test-line.txt | 1 + utils/lit/tests/Inputs/shtest-format/pass.txt | 1 + .../Inputs/shtest-format/requires-missing.txt | 2 + .../Inputs/shtest-format/requires-present.txt | 2 + .../unsupported_dir/lit.local.cfg | 1 + .../unsupported_dir/some-test.txt | 1 + .../Inputs/shtest-format/xfail-feature.txt | 2 + .../Inputs/shtest-format/xfail-target.txt | 2 + .../lit/tests/Inputs/shtest-format/xfail.txt | 2 + .../lit/tests/Inputs/shtest-format/xpass.txt | 2 + .../lit/tests/Inputs/shtest-shell/error-0.txt | 3 + .../lit/tests/Inputs/shtest-shell/error-1.txt | 3 + .../lit/tests/Inputs/shtest-shell/error-2.txt | 3 + utils/lit/tests/Inputs/shtest-shell/lit.cfg | 6 + .../tests/Inputs/shtest-shell/redirects.txt | 41 + .../Inputs/shtest-shell/sequencing-0.txt | 28 + .../Inputs/shtest-shell/sequencing-1.txt | 2 + .../Inputs/shtest-shell/write-to-stderr.sh | 3 + .../write-to-stdout-and-stderr.sh | 4 + utils/lit/tests/Inputs/test-data/lit.cfg | 44 + utils/lit/tests/Inputs/test-data/metrics.ini | 7 + .../lit/tests/Inputs/unittest-adaptor/lit.cfg | 6 + .../Inputs/unittest-adaptor/test-one.txt | 1 + .../Inputs/unittest-adaptor/test-two.txt | 1 + utils/lit/tests/discovery.py | 97 + utils/lit/tests/googletest-format.py | 20 + utils/lit/tests/lit.cfg | 45 + utils/lit/tests/progress-bar.py | 13 + utils/lit/tests/shell-parsing.py | 3 + utils/lit/tests/shtest-encoding.py | 3 + utils/lit/tests/shtest-format.py | 77 + utils/lit/tests/shtest-shell.py | 33 + utils/lit/tests/test-data.py | 12 + utils/lit/tests/test-output.py | 21 + utils/lit/tests/unittest-adaptor.py | 18 + utils/lit/tests/usage.py | 6 + utils/lit/utils/README.txt | 2 + utils/lit/utils/check-coverage | 50 + utils/lit/utils/check-sdist | 44 + utils/lldbDataFormatters.py | 47 + utils/llvm-build/README.txt | 5 + utils/llvm-build/llvm-build | 6 + utils/llvm-build/llvmbuild/__init__.py | 1 + utils/llvm-build/llvmbuild/componentinfo.py | 475 + utils/llvm-build/llvmbuild/configutil.py | 66 + utils/llvm-build/llvmbuild/main.py | 901 + utils/llvm-build/llvmbuild/util.py | 13 + utils/llvm-compilers-check | 617 + utils/llvm-lit/CMakeLists.txt | 4 + utils/llvm-lit/Makefile | 22 + utils/llvm-lit/llvm-lit.in | 32 + utils/llvm-native-gcc | 249 + utils/llvm-native-gxx | 249 + utils/llvm.grm | 423 + utils/llvm.natvis | 181 + utils/llvmdo | 184 + utils/llvmgrep | 39 + utils/makellvm | 145 + utils/not/CMakeLists.txt | 11 + utils/not/Makefile | 21 + utils/not/not.cpp | 45 + utils/release/export.sh | 83 + utils/release/findRegressions-nightly.py | 130 + utils/release/findRegressions-simple.py | 158 + utils/release/merge.sh | 74 + utils/release/tag.sh | 110 + utils/release/test-release.sh | 637 + utils/sort_includes.py | 87 + utils/test_debuginfo.pl | 78 + utils/testgen/mc-bundling-x86-gen.py | 103 + utils/textmate/README | 8 + .../Syntaxes/TableGen.tmLanguage | 132 + utils/textmate/TableGen.tmbundle/info.plist | 12 + utils/unittest/CMakeLists.txt | 47 + utils/unittest/LLVMBuild.txt | 30 + utils/unittest/Makefile | 13 + utils/unittest/UnitTestMain/Makefile | 32 + utils/unittest/UnitTestMain/TestMain.cpp | 49 + utils/unittest/googletest/LICENSE.TXT | 28 + utils/unittest/googletest/Makefile | 42 + utils/unittest/googletest/README.LLVM | 22 + .../include/gtest/gtest-death-test.h | 283 + .../googletest/include/gtest/gtest-message.h | 230 + .../include/gtest/gtest-param-test.h | 1426 + .../googletest/include/gtest/gtest-printers.h | 796 + .../googletest/include/gtest/gtest-spi.h | 232 + .../include/gtest/gtest-test-part.h | 176 + .../include/gtest/gtest-typed-test.h | 259 + .../unittest/googletest/include/gtest/gtest.h | 2158 + .../include/gtest/gtest_pred_impl.h | 358 + .../googletest/include/gtest/gtest_prod.h | 58 + .../internal/gtest-death-test-internal.h | 306 + .../include/gtest/internal/gtest-filepath.h | 210 + .../include/gtest/internal/gtest-internal.h | 1255 + .../include/gtest/internal/gtest-linked_ptr.h | 233 + .../internal/gtest-param-util-generated.h | 4822 + .../include/gtest/internal/gtest-param-util.h | 619 + .../include/gtest/internal/gtest-port.h | 1780 + .../include/gtest/internal/gtest-string.h | 350 + .../include/gtest/internal/gtest-tuple.h | 968 + .../include/gtest/internal/gtest-type-util.h | 3330 + utils/unittest/googletest/src/gtest-all.cc | 48 + .../googletest/src/gtest-death-test.cc | 1239 + .../unittest/googletest/src/gtest-filepath.cc | 378 + .../googletest/src/gtest-internal-inl.h | 1037 + utils/unittest/googletest/src/gtest-port.cc | 764 + .../unittest/googletest/src/gtest-printers.cc | 356 + .../googletest/src/gtest-test-part.cc | 110 + .../googletest/src/gtest-typed-test.cc | 110 + utils/unittest/googletest/src/gtest.cc | 4876 + utils/valgrind/i386-pc-linux-gnu.supp | 48 + utils/valgrind/x86_64-pc-linux-gnu.supp | 70 + utils/vim/README | 43 + utils/vim/llvm.vim | 109 + utils/vim/tablegen.vim | 54 + utils/vim/vimrc | 228 + utils/wciia.py | 125 + utils/yaml-bench/CMakeLists.txt | 5 + utils/yaml-bench/Makefile | 20 + utils/yaml-bench/YAMLBench.cpp | 217 + 12376 files changed, 2317612 insertions(+) create mode 100644 .arcconfig create mode 100644 .clang-format create mode 100644 .gitignore create mode 100644 CMakeLists.txt create mode 100644 CODE_OWNERS.TXT create mode 100644 CREDITS.TXT create mode 100644 LICENSE.TXT create mode 100644 LLVMBuild.txt create mode 100644 Makefile create mode 100644 Makefile.common create mode 100644 Makefile.config.in create mode 100644 Makefile.rules create mode 100644 README.txt create mode 100755 autoconf/AutoRegen.sh create mode 100644 autoconf/ExportMap.map create mode 100644 autoconf/LICENSE.TXT create mode 100644 autoconf/README.TXT create mode 100755 autoconf/config.guess create mode 100755 autoconf/config.sub create mode 100644 autoconf/configure.ac create mode 100755 autoconf/depcomp create mode 100755 autoconf/install-sh create mode 100644 autoconf/ltmain.sh create mode 100644 autoconf/m4/build_exeext.m4 create mode 100644 autoconf/m4/c_printf_a.m4 create mode 100644 autoconf/m4/check_gnu_make.m4 create mode 100644 autoconf/m4/config_makefile.m4 create mode 100644 autoconf/m4/config_project.m4 create mode 100644 autoconf/m4/cxx_flag_check.m4 create mode 100644 autoconf/m4/find_std_program.m4 create mode 100644 autoconf/m4/func_isinf.m4 create mode 100644 autoconf/m4/func_isnan.m4 create mode 100644 autoconf/m4/func_mmap_file.m4 create mode 100644 autoconf/m4/header_mmap_anonymous.m4 create mode 100644 autoconf/m4/huge_val.m4 create mode 100644 autoconf/m4/libtool.m4 create mode 100644 autoconf/m4/link_options.m4 create mode 100644 autoconf/m4/linux_mixed_64_32.m4 create mode 100644 autoconf/m4/ltdl.m4 create mode 100644 autoconf/m4/need_dev_zero_for_mmap.m4 create mode 100644 autoconf/m4/path_tclsh.m4 create mode 100644 autoconf/m4/rand48.m4 create mode 100644 autoconf/m4/sanity_check.m4 create mode 100644 autoconf/m4/single_cxx_check.m4 create mode 100644 autoconf/m4/visibility_inlines_hidden.m4 create mode 100755 autoconf/missing create mode 100755 autoconf/mkinstalldirs create mode 100644 bindings/LLVMBuild.txt create mode 100644 bindings/Makefile create mode 100644 bindings/README.txt create mode 100644 bindings/ocaml/Makefile create mode 100644 bindings/ocaml/Makefile.ocaml create mode 100644 bindings/ocaml/analysis/Makefile create mode 100644 bindings/ocaml/analysis/analysis_ocaml.c create mode 100644 bindings/ocaml/analysis/llvm_analysis.ml create mode 100644 bindings/ocaml/analysis/llvm_analysis.mli create mode 100644 bindings/ocaml/backends/META.llvm_backend.in create mode 100644 bindings/ocaml/backends/Makefile create mode 100644 bindings/ocaml/backends/Makefile.common create mode 100644 bindings/ocaml/backends/backend_ocaml.c create mode 100644 bindings/ocaml/backends/llvm_backend.ml.in create mode 100644 bindings/ocaml/backends/llvm_backend.mli.in create mode 100644 bindings/ocaml/bitreader/Makefile create mode 100644 bindings/ocaml/bitreader/bitreader_ocaml.c create mode 100644 bindings/ocaml/bitreader/llvm_bitreader.ml create mode 100644 bindings/ocaml/bitreader/llvm_bitreader.mli create mode 100644 bindings/ocaml/bitwriter/Makefile create mode 100644 bindings/ocaml/bitwriter/bitwriter_ocaml.c create mode 100644 bindings/ocaml/bitwriter/llvm_bitwriter.ml create mode 100644 bindings/ocaml/bitwriter/llvm_bitwriter.mli create mode 100644 bindings/ocaml/executionengine/Makefile create mode 100644 bindings/ocaml/executionengine/executionengine_ocaml.c create mode 100644 bindings/ocaml/executionengine/llvm_executionengine.ml create mode 100644 bindings/ocaml/executionengine/llvm_executionengine.mli create mode 100644 bindings/ocaml/irreader/Makefile create mode 100644 bindings/ocaml/irreader/irreader_ocaml.c create mode 100644 bindings/ocaml/irreader/llvm_irreader.ml create mode 100644 bindings/ocaml/irreader/llvm_irreader.mli create mode 100644 bindings/ocaml/linker/Makefile create mode 100644 bindings/ocaml/linker/linker_ocaml.c create mode 100644 bindings/ocaml/linker/llvm_linker.ml create mode 100644 bindings/ocaml/linker/llvm_linker.mli create mode 100644 bindings/ocaml/llvm/META.llvm.in create mode 100644 bindings/ocaml/llvm/Makefile create mode 100644 bindings/ocaml/llvm/llvm.ml create mode 100644 bindings/ocaml/llvm/llvm.mli create mode 100644 bindings/ocaml/llvm/llvm_ocaml.c create mode 100644 bindings/ocaml/target/Makefile create mode 100644 bindings/ocaml/target/llvm_target.ml create mode 100644 bindings/ocaml/target/llvm_target.mli create mode 100644 bindings/ocaml/target/target_ocaml.c create mode 100644 bindings/ocaml/transforms/Makefile create mode 100644 bindings/ocaml/transforms/ipo/Makefile create mode 100644 bindings/ocaml/transforms/ipo/ipo_ocaml.c create mode 100644 bindings/ocaml/transforms/ipo/llvm_ipo.ml create mode 100644 bindings/ocaml/transforms/ipo/llvm_ipo.mli create mode 100644 bindings/ocaml/transforms/passmgr_builder/Makefile create mode 100644 bindings/ocaml/transforms/passmgr_builder/llvm_passmgr_builder.ml create mode 100644 bindings/ocaml/transforms/passmgr_builder/llvm_passmgr_builder.mli create mode 100644 bindings/ocaml/transforms/passmgr_builder/passmgr_builder_ocaml.c create mode 100644 bindings/ocaml/transforms/scalar/Makefile create mode 100644 bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml create mode 100644 bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli create mode 100644 bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c create mode 100644 bindings/ocaml/transforms/vectorize/Makefile create mode 100644 bindings/ocaml/transforms/vectorize/llvm_vectorize.ml create mode 100644 bindings/ocaml/transforms/vectorize/llvm_vectorize.mli create mode 100644 bindings/ocaml/transforms/vectorize/vectorize_ocaml.c create mode 100644 bindings/python/README.txt create mode 100644 bindings/python/llvm/__init__.py create mode 100644 bindings/python/llvm/bit_reader.py create mode 100644 bindings/python/llvm/common.py create mode 100644 bindings/python/llvm/core.py create mode 100644 bindings/python/llvm/disassembler.py create mode 100644 bindings/python/llvm/enumerations.py create mode 100644 bindings/python/llvm/object.py create mode 100644 bindings/python/llvm/tests/__init__.py create mode 100644 bindings/python/llvm/tests/base.py create mode 100644 bindings/python/llvm/tests/test.bc create mode 100644 bindings/python/llvm/tests/test_bitreader.py create mode 100644 bindings/python/llvm/tests/test_core.py create mode 100644 bindings/python/llvm/tests/test_disassembler.py create mode 100644 bindings/python/llvm/tests/test_file create mode 100644 bindings/python/llvm/tests/test_object.py create mode 100644 cmake/README create mode 100755 cmake/config-ix.cmake create mode 100644 cmake/modules/AddLLVM.cmake create mode 100644 cmake/modules/AddLLVMDefinitions.cmake create mode 100644 cmake/modules/CMakeLists.txt create mode 100644 cmake/modules/CheckAtomic.cmake create mode 100644 cmake/modules/ChooseMSVCCRT.cmake create mode 100644 cmake/modules/GetHostTriple.cmake create mode 100644 cmake/modules/GetSVN.cmake create mode 100644 cmake/modules/HandleLLVMOptions.cmake create mode 100644 cmake/modules/LLVM-Config.cmake create mode 100644 cmake/modules/LLVMConfig.cmake.in create mode 100644 cmake/modules/LLVMConfigVersion.cmake.in create mode 100644 cmake/modules/LLVMParseArguments.cmake create mode 100644 cmake/modules/LLVMProcessSources.cmake create mode 100644 cmake/modules/TableGen.cmake create mode 100644 cmake/modules/VersionFromVCS.cmake create mode 100644 cmake/nsis_logo.bmp create mode 100644 cmake/platforms/Android.cmake create mode 100755 configure create mode 100644 docs/AliasAnalysis.rst create mode 100644 docs/Atomics.rst create mode 100644 docs/BitCodeFormat.rst create mode 100644 docs/BranchWeightMetadata.rst create mode 100644 docs/Bugpoint.rst create mode 100644 docs/CMake.rst create mode 100644 docs/CMakeLists.txt create mode 100644 docs/CodeGenerator.rst create mode 100644 docs/CodingStandards.rst create mode 100644 docs/CommandGuide/FileCheck.rst create mode 100644 docs/CommandGuide/bugpoint.rst create mode 100644 docs/CommandGuide/index.rst create mode 100644 docs/CommandGuide/lit.rst create mode 100644 docs/CommandGuide/llc.rst create mode 100644 docs/CommandGuide/lli.rst create mode 100644 docs/CommandGuide/llvm-ar.rst create mode 100644 docs/CommandGuide/llvm-as.rst create mode 100644 docs/CommandGuide/llvm-bcanalyzer.rst create mode 100644 docs/CommandGuide/llvm-build.rst create mode 100644 docs/CommandGuide/llvm-config.rst create mode 100644 docs/CommandGuide/llvm-cov.rst create mode 100644 docs/CommandGuide/llvm-diff.rst create mode 100644 docs/CommandGuide/llvm-dis.rst create mode 100644 docs/CommandGuide/llvm-extract.rst create mode 100644 docs/CommandGuide/llvm-link.rst create mode 100644 docs/CommandGuide/llvm-nm.rst create mode 100644 docs/CommandGuide/llvm-prof.rst create mode 100644 docs/CommandGuide/llvm-readobj.rst create mode 100644 docs/CommandGuide/llvm-stress.rst create mode 100644 docs/CommandGuide/llvm-symbolizer.rst create mode 100644 docs/CommandGuide/opt.rst create mode 100644 docs/CommandGuide/tblgen.rst create mode 100644 docs/CommandLine.rst create mode 100644 docs/CompilerWriterInfo.rst create mode 100644 docs/DebuggingJITedCode.rst create mode 100644 docs/DeveloperPolicy.rst create mode 100644 docs/Dummy.html create mode 100644 docs/ExceptionHandling.rst create mode 100644 docs/ExtendedIntegerResults.txt create mode 100644 docs/ExtendingLLVM.rst create mode 100644 docs/Extensions.rst create mode 100644 docs/FAQ.rst create mode 100644 docs/GarbageCollection.rst create mode 100644 docs/GetElementPtr.rst create mode 100644 docs/GettingStarted.rst create mode 100644 docs/GettingStartedVS.rst create mode 100644 docs/GoldPlugin.rst create mode 100644 docs/HistoricalNotes/2000-11-18-EarlyDesignIdeas.txt create mode 100644 docs/HistoricalNotes/2000-11-18-EarlyDesignIdeasResp.txt create mode 100644 docs/HistoricalNotes/2000-12-06-EncodingIdea.txt create mode 100644 docs/HistoricalNotes/2000-12-06-MeetingSummary.txt create mode 100644 docs/HistoricalNotes/2001-01-31-UniversalIRIdea.txt create mode 100644 docs/HistoricalNotes/2001-02-06-TypeNotationDebate.txt create mode 100644 docs/HistoricalNotes/2001-02-06-TypeNotationDebateResp1.txt create mode 100644 docs/HistoricalNotes/2001-02-06-TypeNotationDebateResp2.txt create mode 100644 docs/HistoricalNotes/2001-02-06-TypeNotationDebateResp4.txt create mode 100644 docs/HistoricalNotes/2001-02-09-AdveComments.txt create mode 100644 docs/HistoricalNotes/2001-02-09-AdveCommentsResponse.txt create mode 100644 docs/HistoricalNotes/2001-02-13-Reference-Memory.txt create mode 100644 docs/HistoricalNotes/2001-02-13-Reference-MemoryResponse.txt create mode 100644 docs/HistoricalNotes/2001-04-16-DynamicCompilation.txt create mode 100644 docs/HistoricalNotes/2001-05-18-ExceptionHandling.txt create mode 100644 docs/HistoricalNotes/2001-05-19-ExceptionResponse.txt create mode 100644 docs/HistoricalNotes/2001-06-01-GCCOptimizations.txt create mode 100644 docs/HistoricalNotes/2001-06-01-GCCOptimizations2.txt create mode 100644 docs/HistoricalNotes/2001-06-20-.NET-Differences.txt create mode 100644 docs/HistoricalNotes/2001-07-06-LoweringIRForCodeGen.txt create mode 100644 docs/HistoricalNotes/2001-09-18-OptimizeExceptions.txt create mode 100644 docs/HistoricalNotes/2002-05-12-InstListChange.txt create mode 100644 docs/HistoricalNotes/2002-06-25-MegaPatchInfo.txt create mode 100644 docs/HistoricalNotes/2003-01-23-CygwinNotes.txt create mode 100644 docs/HistoricalNotes/2003-06-25-Reoptimizer1.txt create mode 100644 docs/HistoricalNotes/2003-06-26-Reoptimizer2.txt create mode 100644 docs/HistoricalNotes/2007-OriginalClangReadme.txt create mode 100644 docs/HowToAddABuilder.rst create mode 100644 docs/HowToBuildOnARM.rst create mode 100644 docs/HowToCrossCompileLLVM.rst create mode 100644 docs/HowToReleaseLLVM.rst create mode 100644 docs/HowToSetUpLLVMStyleRTTI.rst create mode 100644 docs/HowToSubmitABug.rst create mode 100644 docs/HowToUseAttributes.rst create mode 100644 docs/HowToUseInstrMappings.rst create mode 100644 docs/LLVMBuild.rst create mode 100644 docs/LLVMBuild.txt create mode 100644 docs/LangRef.rst create mode 100644 docs/Lexicon.rst create mode 100644 docs/LinkTimeOptimization.rst create mode 100644 docs/MCJIT-creation.png create mode 100644 docs/MCJIT-dyld-load.png create mode 100644 docs/MCJIT-engine-builder.png create mode 100644 docs/MCJIT-load-object.png create mode 100644 docs/MCJIT-load.png create mode 100644 docs/MCJIT-resolve-relocations.png create mode 100644 docs/MCJITDesignAndImplementation.rst create mode 100644 docs/Makefile create mode 100644 docs/Makefile.sphinx create mode 100644 docs/MakefileGuide.rst create mode 100644 docs/MarkedUpDisassembly.rst create mode 100644 docs/NVPTXUsage.rst create mode 100644 docs/Packaging.rst create mode 100644 docs/Passes.rst create mode 100644 docs/Phabricator.rst create mode 100644 docs/ProgrammersManual.rst create mode 100644 docs/Projects.rst create mode 100644 docs/README.txt create mode 100644 docs/ReleaseNotes.rst create mode 100644 docs/ReleaseProcess.rst create mode 100644 docs/SegmentedStacks.rst create mode 100644 docs/SourceLevelDebugging.rst create mode 100644 docs/SphinxQuickstartTemplate.rst create mode 100644 docs/SystemLibrary.rst create mode 100644 docs/TableGen/LangRef.rst create mode 100644 docs/TableGenFundamentals.rst create mode 100644 docs/TestSuiteMakefileGuide.rst create mode 100644 docs/TestingGuide.rst create mode 100644 docs/Vectorizers.rst create mode 100644 docs/WritingAnLLVMBackend.rst create mode 100644 docs/WritingAnLLVMPass.rst create mode 100644 docs/YamlIO.rst create mode 100644 docs/_static/lines.gif create mode 100644 docs/_static/llvm.css create mode 100644 docs/_templates/indexsidebar.html create mode 100644 docs/_templates/layout.html create mode 100644 docs/_themes/llvm-theme/layout.html create mode 100644 docs/_themes/llvm-theme/static/contents.png create mode 100644 docs/_themes/llvm-theme/static/llvm-theme.css create mode 100644 docs/_themes/llvm-theme/static/logo.png create mode 100644 docs/_themes/llvm-theme/static/navigation.png create mode 100644 docs/_themes/llvm-theme/theme.conf create mode 100644 docs/conf.py create mode 100644 docs/doxygen.cfg.in create mode 100644 docs/doxygen.css create mode 100644 docs/doxygen.footer create mode 100644 docs/doxygen.header create mode 100644 docs/doxygen.intro create mode 100644 docs/gcc-loops.png create mode 100644 docs/index.rst create mode 100644 docs/linpack-pc.png create mode 100644 docs/make.bat create mode 100644 docs/re_format.7 create mode 100644 docs/tutorial/LangImpl1.rst create mode 100644 docs/tutorial/LangImpl2.rst create mode 100644 docs/tutorial/LangImpl3.rst create mode 100644 docs/tutorial/LangImpl4.rst create mode 100644 docs/tutorial/LangImpl5-cfg.png create mode 100644 docs/tutorial/LangImpl5.rst create mode 100644 docs/tutorial/LangImpl6.rst create mode 100644 docs/tutorial/LangImpl7.rst create mode 100644 docs/tutorial/LangImpl8.rst create mode 100644 docs/tutorial/OCamlLangImpl1.rst create mode 100644 docs/tutorial/OCamlLangImpl2.rst create mode 100644 docs/tutorial/OCamlLangImpl3.rst create mode 100644 docs/tutorial/OCamlLangImpl4.rst create mode 100644 docs/tutorial/OCamlLangImpl5.rst create mode 100644 docs/tutorial/OCamlLangImpl6.rst create mode 100644 docs/tutorial/OCamlLangImpl7.rst create mode 100644 docs/tutorial/OCamlLangImpl8.rst create mode 100644 docs/tutorial/index.rst create mode 100644 docs/yaml2obj.rst create mode 100644 examples/BrainF/BrainF.cpp create mode 100644 examples/BrainF/BrainF.h create mode 100644 examples/BrainF/BrainFDriver.cpp create mode 100644 examples/BrainF/CMakeLists.txt create mode 100644 examples/BrainF/Makefile create mode 100644 examples/CMakeLists.txt create mode 100644 examples/ExceptionDemo/CMakeLists.txt create mode 100644 examples/ExceptionDemo/ExceptionDemo.cpp create mode 100644 examples/ExceptionDemo/Makefile create mode 100644 examples/Fibonacci/CMakeLists.txt create mode 100644 examples/Fibonacci/Makefile create mode 100644 examples/Fibonacci/fibonacci.cpp create mode 100644 examples/HowToUseJIT/CMakeLists.txt create mode 100644 examples/HowToUseJIT/HowToUseJIT.cpp create mode 100644 examples/HowToUseJIT/Makefile create mode 100644 examples/Kaleidoscope/CMakeLists.txt create mode 100644 examples/Kaleidoscope/Chapter2/CMakeLists.txt create mode 100644 examples/Kaleidoscope/Chapter2/Makefile create mode 100644 examples/Kaleidoscope/Chapter2/toy.cpp create mode 100644 examples/Kaleidoscope/Chapter3/CMakeLists.txt create mode 100644 examples/Kaleidoscope/Chapter3/Makefile create mode 100644 examples/Kaleidoscope/Chapter3/toy.cpp create mode 100644 examples/Kaleidoscope/Chapter4/CMakeLists.txt create mode 100644 examples/Kaleidoscope/Chapter4/Makefile create mode 100644 examples/Kaleidoscope/Chapter4/toy.cpp create mode 100644 examples/Kaleidoscope/Chapter5/CMakeLists.txt create mode 100644 examples/Kaleidoscope/Chapter5/Makefile create mode 100644 examples/Kaleidoscope/Chapter5/toy.cpp create mode 100644 examples/Kaleidoscope/Chapter6/CMakeLists.txt create mode 100644 examples/Kaleidoscope/Chapter6/Makefile create mode 100644 examples/Kaleidoscope/Chapter6/toy.cpp create mode 100644 examples/Kaleidoscope/Chapter7/CMakeLists.txt create mode 100644 examples/Kaleidoscope/Chapter7/Makefile create mode 100644 examples/Kaleidoscope/Chapter7/toy.cpp create mode 100644 examples/Kaleidoscope/MCJIT/README.txt create mode 100644 examples/Kaleidoscope/MCJIT/cached/Makefile create mode 100644 examples/Kaleidoscope/MCJIT/cached/README.txt create mode 100644 examples/Kaleidoscope/MCJIT/cached/genk-timing.py create mode 100644 examples/Kaleidoscope/MCJIT/cached/split-lib.py create mode 100644 examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp create mode 100644 examples/Kaleidoscope/MCJIT/cached/toy.cpp create mode 100644 examples/Kaleidoscope/MCJIT/complete/Makefile create mode 100644 examples/Kaleidoscope/MCJIT/complete/README.txt create mode 100644 examples/Kaleidoscope/MCJIT/complete/genk-timing.py create mode 100644 examples/Kaleidoscope/MCJIT/complete/split-lib.py create mode 100644 examples/Kaleidoscope/MCJIT/complete/toy.cpp create mode 100644 examples/Kaleidoscope/MCJIT/initial/Makefile create mode 100644 examples/Kaleidoscope/MCJIT/initial/README.txt create mode 100644 examples/Kaleidoscope/MCJIT/initial/toy.cpp create mode 100644 examples/Kaleidoscope/MCJIT/lazy/Makefile create mode 100644 examples/Kaleidoscope/MCJIT/lazy/README.txt create mode 100644 examples/Kaleidoscope/MCJIT/lazy/genk-timing.py create mode 100644 examples/Kaleidoscope/MCJIT/lazy/toy-jit.cpp create mode 100644 examples/Kaleidoscope/MCJIT/lazy/toy.cpp create mode 100644 examples/Kaleidoscope/Makefile create mode 100644 examples/LLVMBuild.txt create mode 100644 examples/Makefile create mode 100644 examples/ModuleMaker/CMakeLists.txt create mode 100644 examples/ModuleMaker/Makefile create mode 100644 examples/ModuleMaker/ModuleMaker.cpp create mode 100644 examples/ModuleMaker/README.txt create mode 100644 examples/OCaml-Kaleidoscope/Chapter2/Makefile create mode 100644 examples/OCaml-Kaleidoscope/Chapter2/_tags create mode 100644 examples/OCaml-Kaleidoscope/Chapter2/ast.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter2/lexer.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter2/parser.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter2/token.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter2/toplevel.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter2/toy.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter3/Makefile create mode 100644 examples/OCaml-Kaleidoscope/Chapter3/_tags create mode 100644 examples/OCaml-Kaleidoscope/Chapter3/ast.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter3/codegen.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter3/lexer.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter3/myocamlbuild.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter3/parser.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter3/token.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter3/toplevel.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter3/toy.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter4/Makefile create mode 100644 examples/OCaml-Kaleidoscope/Chapter4/_tags create mode 100644 examples/OCaml-Kaleidoscope/Chapter4/ast.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter4/bindings.c create mode 100644 examples/OCaml-Kaleidoscope/Chapter4/codegen.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter4/lexer.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter4/myocamlbuild.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter4/parser.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter4/token.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter4/toplevel.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter4/toy.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter5/Makefile create mode 100644 examples/OCaml-Kaleidoscope/Chapter5/_tags create mode 100644 examples/OCaml-Kaleidoscope/Chapter5/ast.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter5/bindings.c create mode 100644 examples/OCaml-Kaleidoscope/Chapter5/codegen.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter5/lexer.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter5/myocamlbuild.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter5/parser.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter5/token.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter5/toplevel.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter5/toy.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter6/Makefile create mode 100644 examples/OCaml-Kaleidoscope/Chapter6/_tags create mode 100644 examples/OCaml-Kaleidoscope/Chapter6/ast.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter6/bindings.c create mode 100644 examples/OCaml-Kaleidoscope/Chapter6/codegen.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter6/lexer.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter6/myocamlbuild.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter6/parser.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter6/token.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter6/toplevel.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter6/toy.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter7/Makefile create mode 100644 examples/OCaml-Kaleidoscope/Chapter7/_tags create mode 100644 examples/OCaml-Kaleidoscope/Chapter7/ast.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter7/bindings.c create mode 100644 examples/OCaml-Kaleidoscope/Chapter7/codegen.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter7/lexer.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter7/myocamlbuild.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter7/parser.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter7/token.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter7/toplevel.ml create mode 100644 examples/OCaml-Kaleidoscope/Chapter7/toy.ml create mode 100644 examples/OCaml-Kaleidoscope/Makefile create mode 100644 examples/ParallelJIT/CMakeLists.txt create mode 100644 examples/ParallelJIT/Makefile create mode 100644 examples/ParallelJIT/ParallelJIT.cpp create mode 100644 include/llvm-c/Analysis.h create mode 100644 include/llvm-c/BitReader.h create mode 100644 include/llvm-c/BitWriter.h create mode 100644 include/llvm-c/Core.h create mode 100644 include/llvm-c/Disassembler.h create mode 100644 include/llvm-c/ExecutionEngine.h create mode 100644 include/llvm-c/IRReader.h create mode 100644 include/llvm-c/Initialization.h create mode 100644 include/llvm-c/LinkTimeOptimizer.h create mode 100644 include/llvm-c/Linker.h create mode 100644 include/llvm-c/Object.h create mode 100644 include/llvm-c/Support.h create mode 100644 include/llvm-c/Target.h create mode 100644 include/llvm-c/TargetMachine.h create mode 100644 include/llvm-c/Transforms/IPO.h create mode 100644 include/llvm-c/Transforms/PassManagerBuilder.h create mode 100644 include/llvm-c/Transforms/Scalar.h create mode 100644 include/llvm-c/Transforms/Vectorize.h create mode 100644 include/llvm-c/lto.h create mode 100644 include/llvm/ADT/APFloat.h create mode 100644 include/llvm/ADT/APInt.h create mode 100644 include/llvm/ADT/APSInt.h create mode 100644 include/llvm/ADT/ArrayRef.h create mode 100644 include/llvm/ADT/BitVector.h create mode 100644 include/llvm/ADT/DAGDeltaAlgorithm.h create mode 100644 include/llvm/ADT/DeltaAlgorithm.h create mode 100644 include/llvm/ADT/DenseMap.h create mode 100644 include/llvm/ADT/DenseMapInfo.h create mode 100644 include/llvm/ADT/DenseSet.h create mode 100644 include/llvm/ADT/DepthFirstIterator.h create mode 100644 include/llvm/ADT/EquivalenceClasses.h create mode 100644 include/llvm/ADT/FoldingSet.h create mode 100644 include/llvm/ADT/GraphTraits.h create mode 100644 include/llvm/ADT/Hashing.h create mode 100644 include/llvm/ADT/ImmutableIntervalMap.h create mode 100644 include/llvm/ADT/ImmutableList.h create mode 100644 include/llvm/ADT/ImmutableMap.h create mode 100644 include/llvm/ADT/ImmutableSet.h create mode 100644 include/llvm/ADT/IndexedMap.h create mode 100644 include/llvm/ADT/IntEqClasses.h create mode 100644 include/llvm/ADT/IntervalMap.h create mode 100644 include/llvm/ADT/IntrusiveRefCntPtr.h create mode 100644 include/llvm/ADT/MapVector.h create mode 100644 include/llvm/ADT/None.h create mode 100644 include/llvm/ADT/Optional.h create mode 100644 include/llvm/ADT/OwningPtr.h create mode 100644 include/llvm/ADT/PackedVector.h create mode 100644 include/llvm/ADT/PointerIntPair.h create mode 100644 include/llvm/ADT/PointerUnion.h create mode 100644 include/llvm/ADT/PostOrderIterator.h create mode 100644 include/llvm/ADT/PriorityQueue.h create mode 100644 include/llvm/ADT/SCCIterator.h create mode 100644 include/llvm/ADT/STLExtras.h create mode 100644 include/llvm/ADT/ScopedHashTable.h create mode 100644 include/llvm/ADT/SetOperations.h create mode 100644 include/llvm/ADT/SetVector.h create mode 100644 include/llvm/ADT/SmallBitVector.h create mode 100644 include/llvm/ADT/SmallPtrSet.h create mode 100644 include/llvm/ADT/SmallSet.h create mode 100644 include/llvm/ADT/SmallString.h create mode 100644 include/llvm/ADT/SmallVector.h create mode 100644 include/llvm/ADT/SparseBitVector.h create mode 100644 include/llvm/ADT/SparseMultiSet.h create mode 100644 include/llvm/ADT/SparseSet.h create mode 100644 include/llvm/ADT/Statistic.h create mode 100644 include/llvm/ADT/StringExtras.h create mode 100644 include/llvm/ADT/StringMap.h create mode 100644 include/llvm/ADT/StringRef.h create mode 100644 include/llvm/ADT/StringSet.h create mode 100644 include/llvm/ADT/StringSwitch.h create mode 100644 include/llvm/ADT/TinyPtrVector.h create mode 100644 include/llvm/ADT/Triple.h create mode 100644 include/llvm/ADT/Twine.h create mode 100644 include/llvm/ADT/UniqueVector.h create mode 100644 include/llvm/ADT/ValueMap.h create mode 100644 include/llvm/ADT/VariadicFunction.h create mode 100644 include/llvm/ADT/edit_distance.h create mode 100644 include/llvm/ADT/ilist.h create mode 100644 include/llvm/ADT/ilist_node.h create mode 100644 include/llvm/ADT/polymorphic_ptr.h create mode 100644 include/llvm/Analysis/AliasAnalysis.h create mode 100644 include/llvm/Analysis/AliasSetTracker.h create mode 100644 include/llvm/Analysis/BlockFrequencyImpl.h create mode 100644 include/llvm/Analysis/BlockFrequencyInfo.h create mode 100644 include/llvm/Analysis/BranchProbabilityInfo.h create mode 100644 include/llvm/Analysis/CFG.h create mode 100644 include/llvm/Analysis/CFGPrinter.h create mode 100644 include/llvm/Analysis/CallGraph.h create mode 100644 include/llvm/Analysis/CallGraphSCCPass.h create mode 100644 include/llvm/Analysis/CallPrinter.h create mode 100644 include/llvm/Analysis/CaptureTracking.h create mode 100644 include/llvm/Analysis/CodeMetrics.h create mode 100644 include/llvm/Analysis/ConstantFolding.h create mode 100644 include/llvm/Analysis/ConstantsScanner.h create mode 100644 include/llvm/Analysis/DOTGraphTraitsPass.h create mode 100644 include/llvm/Analysis/DependenceAnalysis.h create mode 100644 include/llvm/Analysis/DomPrinter.h create mode 100644 include/llvm/Analysis/DominanceFrontier.h create mode 100644 include/llvm/Analysis/DominatorInternals.h create mode 100644 include/llvm/Analysis/Dominators.h create mode 100644 include/llvm/Analysis/FindUsedTypes.h create mode 100644 include/llvm/Analysis/IVUsers.h create mode 100644 include/llvm/Analysis/InlineCost.h create mode 100644 include/llvm/Analysis/InstructionSimplify.h create mode 100644 include/llvm/Analysis/Interval.h create mode 100644 include/llvm/Analysis/IntervalIterator.h create mode 100644 include/llvm/Analysis/IntervalPartition.h create mode 100644 include/llvm/Analysis/LazyValueInfo.h create mode 100644 include/llvm/Analysis/LibCallAliasAnalysis.h create mode 100644 include/llvm/Analysis/LibCallSemantics.h create mode 100644 include/llvm/Analysis/Lint.h create mode 100644 include/llvm/Analysis/Loads.h create mode 100644 include/llvm/Analysis/LoopInfo.h create mode 100644 include/llvm/Analysis/LoopInfoImpl.h create mode 100644 include/llvm/Analysis/LoopIterator.h create mode 100644 include/llvm/Analysis/LoopPass.h create mode 100644 include/llvm/Analysis/MemoryBuiltins.h create mode 100644 include/llvm/Analysis/MemoryDependenceAnalysis.h create mode 100644 include/llvm/Analysis/PHITransAddr.h create mode 100644 include/llvm/Analysis/Passes.h create mode 100644 include/llvm/Analysis/PostDominators.h create mode 100644 include/llvm/Analysis/PtrUseVisitor.h create mode 100644 include/llvm/Analysis/RegionInfo.h create mode 100644 include/llvm/Analysis/RegionIterator.h create mode 100644 include/llvm/Analysis/RegionPass.h create mode 100644 include/llvm/Analysis/RegionPrinter.h create mode 100644 include/llvm/Analysis/ScalarEvolution.h create mode 100644 include/llvm/Analysis/ScalarEvolutionExpander.h create mode 100644 include/llvm/Analysis/ScalarEvolutionExpressions.h create mode 100644 include/llvm/Analysis/ScalarEvolutionNormalization.h create mode 100644 include/llvm/Analysis/SparsePropagation.h create mode 100644 include/llvm/Analysis/TargetTransformInfo.h create mode 100644 include/llvm/Analysis/Trace.h create mode 100644 include/llvm/Analysis/ValueTracking.h create mode 100644 include/llvm/Analysis/Verifier.h create mode 100644 include/llvm/Assembly/AssemblyAnnotationWriter.h create mode 100644 include/llvm/Assembly/Parser.h create mode 100644 include/llvm/Assembly/PrintModulePass.h create mode 100644 include/llvm/Assembly/Writer.h create mode 100644 include/llvm/AutoUpgrade.h create mode 100644 include/llvm/Bitcode/BitCodes.h create mode 100644 include/llvm/Bitcode/BitstreamReader.h create mode 100644 include/llvm/Bitcode/BitstreamWriter.h create mode 100644 include/llvm/Bitcode/LLVMBitCodes.h create mode 100644 include/llvm/Bitcode/ReaderWriter.h create mode 100644 include/llvm/CMakeLists.txt create mode 100644 include/llvm/CodeGen/Analysis.h create mode 100644 include/llvm/CodeGen/AsmPrinter.h create mode 100644 include/llvm/CodeGen/CalcSpillWeights.h create mode 100644 include/llvm/CodeGen/CallingConvLower.h create mode 100644 include/llvm/CodeGen/CommandFlags.h create mode 100644 include/llvm/CodeGen/DAGCombine.h create mode 100644 include/llvm/CodeGen/DFAPacketizer.h create mode 100644 include/llvm/CodeGen/EdgeBundles.h create mode 100644 include/llvm/CodeGen/FastISel.h create mode 100644 include/llvm/CodeGen/FunctionLoweringInfo.h create mode 100644 include/llvm/CodeGen/GCMetadata.h create mode 100644 include/llvm/CodeGen/GCMetadataPrinter.h create mode 100644 include/llvm/CodeGen/GCStrategy.h create mode 100644 include/llvm/CodeGen/GCs.h create mode 100644 include/llvm/CodeGen/ISDOpcodes.h create mode 100644 include/llvm/CodeGen/IntrinsicLowering.h create mode 100644 include/llvm/CodeGen/JITCodeEmitter.h create mode 100644 include/llvm/CodeGen/LatencyPriorityQueue.h create mode 100644 include/llvm/CodeGen/LexicalScopes.h create mode 100644 include/llvm/CodeGen/LinkAllAsmWriterComponents.h create mode 100644 include/llvm/CodeGen/LinkAllCodegenComponents.h create mode 100644 include/llvm/CodeGen/LiveInterval.h create mode 100644 include/llvm/CodeGen/LiveIntervalAnalysis.h create mode 100644 include/llvm/CodeGen/LiveIntervalUnion.h create mode 100644 include/llvm/CodeGen/LiveRangeEdit.h create mode 100644 include/llvm/CodeGen/LiveRegMatrix.h create mode 100644 include/llvm/CodeGen/LiveRegUnits.h create mode 100644 include/llvm/CodeGen/LiveStackAnalysis.h create mode 100644 include/llvm/CodeGen/LiveVariables.h create mode 100644 include/llvm/CodeGen/MachORelocation.h create mode 100644 include/llvm/CodeGen/MachineBasicBlock.h create mode 100644 include/llvm/CodeGen/MachineBlockFrequencyInfo.h create mode 100644 include/llvm/CodeGen/MachineBranchProbabilityInfo.h create mode 100644 include/llvm/CodeGen/MachineCodeEmitter.h create mode 100644 include/llvm/CodeGen/MachineCodeInfo.h create mode 100644 include/llvm/CodeGen/MachineConstantPool.h create mode 100644 include/llvm/CodeGen/MachineDominators.h create mode 100644 include/llvm/CodeGen/MachineFrameInfo.h create mode 100644 include/llvm/CodeGen/MachineFunction.h create mode 100644 include/llvm/CodeGen/MachineFunctionAnalysis.h create mode 100644 include/llvm/CodeGen/MachineFunctionPass.h create mode 100644 include/llvm/CodeGen/MachineInstr.h create mode 100644 include/llvm/CodeGen/MachineInstrBuilder.h create mode 100644 include/llvm/CodeGen/MachineInstrBundle.h create mode 100644 include/llvm/CodeGen/MachineJumpTableInfo.h create mode 100644 include/llvm/CodeGen/MachineLoopInfo.h create mode 100644 include/llvm/CodeGen/MachineMemOperand.h create mode 100644 include/llvm/CodeGen/MachineModuleInfo.h create mode 100644 include/llvm/CodeGen/MachineModuleInfoImpls.h create mode 100644 include/llvm/CodeGen/MachineOperand.h create mode 100644 include/llvm/CodeGen/MachinePassRegistry.h create mode 100644 include/llvm/CodeGen/MachinePostDominators.h create mode 100644 include/llvm/CodeGen/MachineRegisterInfo.h create mode 100644 include/llvm/CodeGen/MachineRelocation.h create mode 100644 include/llvm/CodeGen/MachineSSAUpdater.h create mode 100644 include/llvm/CodeGen/MachineScheduler.h create mode 100644 include/llvm/CodeGen/MachineTraceMetrics.h create mode 100644 include/llvm/CodeGen/PBQP/Graph.h create mode 100644 include/llvm/CodeGen/PBQP/HeuristicBase.h create mode 100644 include/llvm/CodeGen/PBQP/HeuristicSolver.h create mode 100644 include/llvm/CodeGen/PBQP/Heuristics/Briggs.h create mode 100644 include/llvm/CodeGen/PBQP/Math.h create mode 100644 include/llvm/CodeGen/PBQP/Solution.h create mode 100644 include/llvm/CodeGen/Passes.h create mode 100644 include/llvm/CodeGen/PseudoSourceValue.h create mode 100644 include/llvm/CodeGen/RegAllocPBQP.h create mode 100644 include/llvm/CodeGen/RegAllocRegistry.h create mode 100644 include/llvm/CodeGen/RegisterClassInfo.h create mode 100644 include/llvm/CodeGen/RegisterPressure.h create mode 100644 include/llvm/CodeGen/RegisterScavenging.h create mode 100644 include/llvm/CodeGen/ResourcePriorityQueue.h create mode 100644 include/llvm/CodeGen/RuntimeLibcalls.h create mode 100644 include/llvm/CodeGen/ScheduleDAG.h create mode 100644 include/llvm/CodeGen/ScheduleDAGInstrs.h create mode 100644 include/llvm/CodeGen/ScheduleDFS.h create mode 100644 include/llvm/CodeGen/ScheduleHazardRecognizer.h create mode 100644 include/llvm/CodeGen/SchedulerRegistry.h create mode 100644 include/llvm/CodeGen/ScoreboardHazardRecognizer.h create mode 100644 include/llvm/CodeGen/SelectionDAG.h create mode 100644 include/llvm/CodeGen/SelectionDAGISel.h create mode 100644 include/llvm/CodeGen/SelectionDAGNodes.h create mode 100644 include/llvm/CodeGen/SlotIndexes.h create mode 100644 include/llvm/CodeGen/StackMaps.h create mode 100644 include/llvm/CodeGen/StackProtector.h create mode 100644 include/llvm/CodeGen/TargetLoweringObjectFileImpl.h create mode 100644 include/llvm/CodeGen/TargetSchedule.h create mode 100644 include/llvm/CodeGen/ValueTypes.h create mode 100644 include/llvm/CodeGen/ValueTypes.td create mode 100644 include/llvm/CodeGen/VirtRegMap.h create mode 100644 include/llvm/Config/AsmParsers.def.in create mode 100644 include/llvm/Config/AsmPrinters.def.in create mode 100644 include/llvm/Config/Disassemblers.def.in create mode 100644 include/llvm/Config/Targets.def.in create mode 100644 include/llvm/Config/config.h.cmake create mode 100644 include/llvm/Config/config.h.in create mode 100644 include/llvm/Config/llvm-config.h.cmake create mode 100644 include/llvm/Config/llvm-config.h.in create mode 100644 include/llvm/DIBuilder.h create mode 100644 include/llvm/DebugInfo.h create mode 100644 include/llvm/DebugInfo/DIContext.h create mode 100644 include/llvm/DebugInfo/DWARFFormValue.h create mode 100644 include/llvm/ExecutionEngine/ExecutionEngine.h create mode 100644 include/llvm/ExecutionEngine/GenericValue.h create mode 100644 include/llvm/ExecutionEngine/Interpreter.h create mode 100644 include/llvm/ExecutionEngine/JIT.h create mode 100644 include/llvm/ExecutionEngine/JITEventListener.h create mode 100644 include/llvm/ExecutionEngine/JITMemoryManager.h create mode 100644 include/llvm/ExecutionEngine/MCJIT.h create mode 100644 include/llvm/ExecutionEngine/OProfileWrapper.h create mode 100644 include/llvm/ExecutionEngine/ObjectBuffer.h create mode 100644 include/llvm/ExecutionEngine/ObjectCache.h create mode 100644 include/llvm/ExecutionEngine/ObjectImage.h create mode 100644 include/llvm/ExecutionEngine/RTDyldMemoryManager.h create mode 100644 include/llvm/ExecutionEngine/RuntimeDyld.h create mode 100644 include/llvm/ExecutionEngine/SectionMemoryManager.h create mode 100644 include/llvm/GVMaterializer.h create mode 100644 include/llvm/IR/Argument.h create mode 100644 include/llvm/IR/Attributes.h create mode 100644 include/llvm/IR/BasicBlock.h create mode 100644 include/llvm/IR/CMakeLists.txt create mode 100644 include/llvm/IR/CallingConv.h create mode 100644 include/llvm/IR/Constant.h create mode 100644 include/llvm/IR/Constants.h create mode 100644 include/llvm/IR/DataLayout.h create mode 100644 include/llvm/IR/DerivedTypes.h create mode 100644 include/llvm/IR/Function.h create mode 100644 include/llvm/IR/GlobalAlias.h create mode 100644 include/llvm/IR/GlobalValue.h create mode 100644 include/llvm/IR/GlobalVariable.h create mode 100644 include/llvm/IR/IRBuilder.h create mode 100644 include/llvm/IR/InlineAsm.h create mode 100644 include/llvm/IR/InstrTypes.h create mode 100644 include/llvm/IR/Instruction.def create mode 100644 include/llvm/IR/Instruction.h create mode 100644 include/llvm/IR/Instructions.h create mode 100644 include/llvm/IR/IntrinsicInst.h create mode 100644 include/llvm/IR/Intrinsics.h create mode 100644 include/llvm/IR/Intrinsics.td create mode 100644 include/llvm/IR/IntrinsicsAArch64.td create mode 100644 include/llvm/IR/IntrinsicsARM.td create mode 100644 include/llvm/IR/IntrinsicsHexagon.td create mode 100644 include/llvm/IR/IntrinsicsMips.td create mode 100644 include/llvm/IR/IntrinsicsNVVM.td create mode 100644 include/llvm/IR/IntrinsicsPowerPC.td create mode 100644 include/llvm/IR/IntrinsicsR600.td create mode 100644 include/llvm/IR/IntrinsicsX86.td create mode 100644 include/llvm/IR/IntrinsicsXCore.td create mode 100644 include/llvm/IR/LLVMContext.h create mode 100644 include/llvm/IR/LegacyPassManager.h create mode 100644 include/llvm/IR/LegacyPassManagers.h create mode 100644 include/llvm/IR/MDBuilder.h create mode 100644 include/llvm/IR/Metadata.h create mode 100644 include/llvm/IR/Module.h create mode 100644 include/llvm/IR/OperandTraits.h create mode 100644 include/llvm/IR/Operator.h create mode 100644 include/llvm/IR/PassManager.h create mode 100644 include/llvm/IR/SymbolTableListTraits.h create mode 100644 include/llvm/IR/Type.h create mode 100644 include/llvm/IR/TypeBuilder.h create mode 100644 include/llvm/IR/TypeFinder.h create mode 100644 include/llvm/IR/Use.h create mode 100644 include/llvm/IR/User.h create mode 100644 include/llvm/IR/Value.h create mode 100644 include/llvm/IR/ValueSymbolTable.h create mode 100644 include/llvm/IRReader/IRReader.h create mode 100644 include/llvm/InitializePasses.h create mode 100644 include/llvm/InstVisitor.h create mode 100644 include/llvm/LTO/LTOCodeGenerator.h create mode 100644 include/llvm/LTO/LTOModule.h create mode 100644 include/llvm/LinkAllIR.h create mode 100644 include/llvm/LinkAllPasses.h create mode 100644 include/llvm/Linker.h create mode 100644 include/llvm/MC/MCAsmBackend.h create mode 100644 include/llvm/MC/MCAsmInfo.h create mode 100644 include/llvm/MC/MCAsmInfoCOFF.h create mode 100644 include/llvm/MC/MCAsmInfoDarwin.h create mode 100644 include/llvm/MC/MCAsmInfoELF.h create mode 100644 include/llvm/MC/MCAsmLayout.h create mode 100644 include/llvm/MC/MCAssembler.h create mode 100644 include/llvm/MC/MCAtom.h create mode 100644 include/llvm/MC/MCCodeEmitter.h create mode 100644 include/llvm/MC/MCCodeGenInfo.h create mode 100644 include/llvm/MC/MCContext.h create mode 100644 include/llvm/MC/MCDirectives.h create mode 100644 include/llvm/MC/MCDisassembler.h create mode 100644 include/llvm/MC/MCDwarf.h create mode 100644 include/llvm/MC/MCELF.h create mode 100644 include/llvm/MC/MCELFObjectWriter.h create mode 100644 include/llvm/MC/MCELFStreamer.h create mode 100644 include/llvm/MC/MCELFSymbolFlags.h create mode 100644 include/llvm/MC/MCExpr.h create mode 100644 include/llvm/MC/MCExternalSymbolizer.h create mode 100644 include/llvm/MC/MCFixedLenDisassembler.h create mode 100644 include/llvm/MC/MCFixup.h create mode 100644 include/llvm/MC/MCFixupKindInfo.h create mode 100644 include/llvm/MC/MCFunction.h create mode 100644 include/llvm/MC/MCInst.h create mode 100644 include/llvm/MC/MCInstBuilder.h create mode 100644 include/llvm/MC/MCInstPrinter.h create mode 100644 include/llvm/MC/MCInstrAnalysis.h create mode 100644 include/llvm/MC/MCInstrDesc.h create mode 100644 include/llvm/MC/MCInstrInfo.h create mode 100644 include/llvm/MC/MCInstrItineraries.h create mode 100644 include/llvm/MC/MCLabel.h create mode 100644 include/llvm/MC/MCMachOSymbolFlags.h create mode 100644 include/llvm/MC/MCMachObjectWriter.h create mode 100644 include/llvm/MC/MCModule.h create mode 100644 include/llvm/MC/MCModuleYAML.h create mode 100644 include/llvm/MC/MCObjectDisassembler.h create mode 100644 include/llvm/MC/MCObjectFileInfo.h create mode 100644 include/llvm/MC/MCObjectStreamer.h create mode 100644 include/llvm/MC/MCObjectSymbolizer.h create mode 100644 include/llvm/MC/MCObjectWriter.h create mode 100644 include/llvm/MC/MCParser/AsmCond.h create mode 100644 include/llvm/MC/MCParser/AsmLexer.h create mode 100644 include/llvm/MC/MCParser/MCAsmLexer.h create mode 100644 include/llvm/MC/MCParser/MCAsmParser.h create mode 100644 include/llvm/MC/MCParser/MCAsmParserExtension.h create mode 100644 include/llvm/MC/MCParser/MCParsedAsmOperand.h create mode 100644 include/llvm/MC/MCRegisterInfo.h create mode 100644 include/llvm/MC/MCRelocationInfo.h create mode 100644 include/llvm/MC/MCSchedule.h create mode 100644 include/llvm/MC/MCSection.h create mode 100644 include/llvm/MC/MCSectionCOFF.h create mode 100644 include/llvm/MC/MCSectionELF.h create mode 100644 include/llvm/MC/MCSectionMachO.h create mode 100644 include/llvm/MC/MCStreamer.h create mode 100644 include/llvm/MC/MCSubtargetInfo.h create mode 100644 include/llvm/MC/MCSymbol.h create mode 100644 include/llvm/MC/MCSymbolizer.h create mode 100644 include/llvm/MC/MCTargetAsmParser.h create mode 100644 include/llvm/MC/MCValue.h create mode 100644 include/llvm/MC/MCWin64EH.h create mode 100644 include/llvm/MC/MCWinCOFFObjectWriter.h create mode 100644 include/llvm/MC/MachineLocation.h create mode 100644 include/llvm/MC/SectionKind.h create mode 100644 include/llvm/MC/SubtargetFeature.h create mode 100644 include/llvm/Object/Archive.h create mode 100644 include/llvm/Object/Binary.h create mode 100644 include/llvm/Object/COFF.h create mode 100644 include/llvm/Object/COFFYAML.h create mode 100644 include/llvm/Object/ELF.h create mode 100644 include/llvm/Object/ELFObjectFile.h create mode 100644 include/llvm/Object/ELFTypes.h create mode 100644 include/llvm/Object/ELFYAML.h create mode 100644 include/llvm/Object/Error.h create mode 100644 include/llvm/Object/MachO.h create mode 100644 include/llvm/Object/MachOUniversal.h create mode 100644 include/llvm/Object/ObjectFile.h create mode 100644 include/llvm/Object/RelocVisitor.h create mode 100644 include/llvm/Object/YAML.h create mode 100644 include/llvm/Option/Arg.h create mode 100644 include/llvm/Option/ArgList.h create mode 100644 include/llvm/Option/OptParser.td create mode 100644 include/llvm/Option/OptSpecifier.h create mode 100644 include/llvm/Option/OptTable.h create mode 100644 include/llvm/Option/Option.h create mode 100644 include/llvm/Pass.h create mode 100644 include/llvm/PassAnalysisSupport.h create mode 100644 include/llvm/PassManager.h create mode 100644 include/llvm/PassRegistry.h create mode 100644 include/llvm/PassSupport.h create mode 100644 include/llvm/Support/AIXDataTypesFix.h create mode 100644 include/llvm/Support/AlignOf.h create mode 100644 include/llvm/Support/Allocator.h create mode 100644 include/llvm/Support/ArrayRecycler.h create mode 100644 include/llvm/Support/Atomic.h create mode 100644 include/llvm/Support/BlockFrequency.h create mode 100644 include/llvm/Support/BranchProbability.h create mode 100644 include/llvm/Support/CBindingWrapping.h create mode 100644 include/llvm/Support/CFG.h create mode 100644 include/llvm/Support/COFF.h create mode 100644 include/llvm/Support/CallSite.h create mode 100644 include/llvm/Support/Capacity.h create mode 100644 include/llvm/Support/Casting.h create mode 100644 include/llvm/Support/CodeGen.h create mode 100644 include/llvm/Support/CommandLine.h create mode 100644 include/llvm/Support/Compiler.h create mode 100644 include/llvm/Support/Compression.h create mode 100644 include/llvm/Support/ConstantFolder.h create mode 100644 include/llvm/Support/ConstantRange.h create mode 100644 include/llvm/Support/ConvertUTF.h create mode 100644 include/llvm/Support/CrashRecoveryContext.h create mode 100644 include/llvm/Support/DOTGraphTraits.h create mode 100644 include/llvm/Support/DataExtractor.h create mode 100644 include/llvm/Support/DataFlow.h create mode 100644 include/llvm/Support/DataStream.h create mode 100644 include/llvm/Support/DataTypes.h.cmake create mode 100644 include/llvm/Support/DataTypes.h.in create mode 100644 include/llvm/Support/Debug.h create mode 100644 include/llvm/Support/DebugLoc.h create mode 100644 include/llvm/Support/Disassembler.h create mode 100644 include/llvm/Support/Dwarf.h create mode 100644 include/llvm/Support/DynamicLibrary.h create mode 100644 include/llvm/Support/ELF.h create mode 100644 include/llvm/Support/Endian.h create mode 100644 include/llvm/Support/Errno.h create mode 100644 include/llvm/Support/ErrorHandling.h create mode 100644 include/llvm/Support/ErrorOr.h create mode 100644 include/llvm/Support/FEnv.h create mode 100644 include/llvm/Support/FileOutputBuffer.h create mode 100644 include/llvm/Support/FileSystem.h create mode 100644 include/llvm/Support/FileUtilities.h create mode 100644 include/llvm/Support/Format.h create mode 100644 include/llvm/Support/FormattedStream.h create mode 100644 include/llvm/Support/GCOV.h create mode 100644 include/llvm/Support/GetElementPtrTypeIterator.h create mode 100644 include/llvm/Support/GraphWriter.h create mode 100644 include/llvm/Support/Host.h create mode 100644 include/llvm/Support/IncludeFile.h create mode 100644 include/llvm/Support/InstIterator.h create mode 100644 include/llvm/Support/LEB128.h create mode 100644 include/llvm/Support/LICENSE.TXT create mode 100644 include/llvm/Support/LeakDetector.h create mode 100644 include/llvm/Support/Locale.h create mode 100644 include/llvm/Support/LockFileManager.h create mode 100644 include/llvm/Support/MD5.h create mode 100644 include/llvm/Support/MachO.h create mode 100644 include/llvm/Support/ManagedStatic.h create mode 100644 include/llvm/Support/MathExtras.h create mode 100644 include/llvm/Support/Memory.h create mode 100644 include/llvm/Support/MemoryBuffer.h create mode 100644 include/llvm/Support/MemoryObject.h create mode 100644 include/llvm/Support/Mutex.h create mode 100644 include/llvm/Support/MutexGuard.h create mode 100644 include/llvm/Support/NoFolder.h create mode 100644 include/llvm/Support/OutputBuffer.h create mode 100644 include/llvm/Support/PassNameParser.h create mode 100644 include/llvm/Support/Path.h create mode 100644 include/llvm/Support/PatternMatch.h create mode 100644 include/llvm/Support/PluginLoader.h create mode 100644 include/llvm/Support/PointerLikeTypeTraits.h create mode 100644 include/llvm/Support/PredIteratorCache.h create mode 100644 include/llvm/Support/PrettyStackTrace.h create mode 100644 include/llvm/Support/Process.h create mode 100644 include/llvm/Support/Program.h create mode 100644 include/llvm/Support/RWMutex.h create mode 100644 include/llvm/Support/Recycler.h create mode 100644 include/llvm/Support/RecyclingAllocator.h create mode 100644 include/llvm/Support/Regex.h create mode 100644 include/llvm/Support/Registry.h create mode 100644 include/llvm/Support/RegistryParser.h create mode 100644 include/llvm/Support/SMLoc.h create mode 100644 include/llvm/Support/SaveAndRestore.h create mode 100644 include/llvm/Support/Signals.h create mode 100644 include/llvm/Support/Solaris.h create mode 100644 include/llvm/Support/SourceMgr.h create mode 100644 include/llvm/Support/StreamableMemoryObject.h create mode 100644 include/llvm/Support/StringPool.h create mode 100644 include/llvm/Support/StringRefMemoryObject.h create mode 100644 include/llvm/Support/SwapByteOrder.h create mode 100644 include/llvm/Support/SystemUtils.h create mode 100644 include/llvm/Support/TargetFolder.h create mode 100644 include/llvm/Support/TargetRegistry.h create mode 100644 include/llvm/Support/TargetSelect.h create mode 100644 include/llvm/Support/ThreadLocal.h create mode 100644 include/llvm/Support/Threading.h create mode 100644 include/llvm/Support/TimeValue.h create mode 100644 include/llvm/Support/Timer.h create mode 100644 include/llvm/Support/ToolOutputFile.h create mode 100644 include/llvm/Support/Unicode.h create mode 100644 include/llvm/Support/UnicodeCharRanges.h create mode 100644 include/llvm/Support/Valgrind.h create mode 100644 include/llvm/Support/ValueHandle.h create mode 100644 include/llvm/Support/Watchdog.h create mode 100644 include/llvm/Support/Win64EH.h create mode 100644 include/llvm/Support/YAMLParser.h create mode 100644 include/llvm/Support/YAMLTraits.h create mode 100644 include/llvm/Support/circular_raw_ostream.h create mode 100644 include/llvm/Support/raw_os_ostream.h create mode 100644 include/llvm/Support/raw_ostream.h create mode 100644 include/llvm/Support/system_error.h create mode 100644 include/llvm/Support/type_traits.h create mode 100644 include/llvm/TableGen/Error.h create mode 100644 include/llvm/TableGen/Main.h create mode 100644 include/llvm/TableGen/Record.h create mode 100644 include/llvm/TableGen/StringMatcher.h create mode 100644 include/llvm/TableGen/StringToOffsetTable.h create mode 100644 include/llvm/TableGen/TableGenBackend.h create mode 100644 include/llvm/Target/CostTable.h create mode 100644 include/llvm/Target/Mangler.h create mode 100644 include/llvm/Target/Target.td create mode 100644 include/llvm/Target/TargetCallingConv.h create mode 100644 include/llvm/Target/TargetCallingConv.td create mode 100644 include/llvm/Target/TargetFrameLowering.h create mode 100644 include/llvm/Target/TargetInstrInfo.h create mode 100644 include/llvm/Target/TargetIntrinsicInfo.h create mode 100644 include/llvm/Target/TargetItinerary.td create mode 100644 include/llvm/Target/TargetJITInfo.h create mode 100644 include/llvm/Target/TargetLibraryInfo.h create mode 100644 include/llvm/Target/TargetLowering.h create mode 100644 include/llvm/Target/TargetLoweringObjectFile.h create mode 100644 include/llvm/Target/TargetMachine.h create mode 100644 include/llvm/Target/TargetOpcodes.h create mode 100644 include/llvm/Target/TargetOptions.h create mode 100644 include/llvm/Target/TargetRegisterInfo.h create mode 100644 include/llvm/Target/TargetSchedule.td create mode 100644 include/llvm/Target/TargetSelectionDAG.td create mode 100644 include/llvm/Target/TargetSelectionDAGInfo.h create mode 100644 include/llvm/Target/TargetSubtargetInfo.h create mode 100644 include/llvm/Transforms/IPO.h create mode 100644 include/llvm/Transforms/IPO/InlinerPass.h create mode 100644 include/llvm/Transforms/IPO/PassManagerBuilder.h create mode 100644 include/llvm/Transforms/Instrumentation.h create mode 100644 include/llvm/Transforms/ObjCARC.h create mode 100644 include/llvm/Transforms/Scalar.h create mode 100644 include/llvm/Transforms/Utils/BasicBlockUtils.h create mode 100644 include/llvm/Transforms/Utils/BuildLibCalls.h create mode 100644 include/llvm/Transforms/Utils/BypassSlowDivision.h create mode 100644 include/llvm/Transforms/Utils/Cloning.h create mode 100644 include/llvm/Transforms/Utils/CmpInstAnalysis.h create mode 100644 include/llvm/Transforms/Utils/CodeExtractor.h create mode 100644 include/llvm/Transforms/Utils/GlobalStatus.h create mode 100644 include/llvm/Transforms/Utils/IntegerDivision.h create mode 100644 include/llvm/Transforms/Utils/Local.h create mode 100644 include/llvm/Transforms/Utils/LoopUtils.h create mode 100644 include/llvm/Transforms/Utils/ModuleUtils.h create mode 100644 include/llvm/Transforms/Utils/PromoteMemToReg.h create mode 100644 include/llvm/Transforms/Utils/SSAUpdater.h create mode 100644 include/llvm/Transforms/Utils/SSAUpdaterImpl.h create mode 100644 include/llvm/Transforms/Utils/SimplifyIndVar.h create mode 100644 include/llvm/Transforms/Utils/SimplifyLibCalls.h create mode 100644 include/llvm/Transforms/Utils/SpecialCaseList.h create mode 100644 include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h create mode 100644 include/llvm/Transforms/Utils/UnrollLoop.h create mode 100644 include/llvm/Transforms/Utils/ValueMapper.h create mode 100644 include/llvm/Transforms/Vectorize.h create mode 100644 lib/Analysis/AliasAnalysis.cpp create mode 100644 lib/Analysis/AliasAnalysisCounter.cpp create mode 100644 lib/Analysis/AliasAnalysisEvaluator.cpp create mode 100644 lib/Analysis/AliasDebugger.cpp create mode 100644 lib/Analysis/AliasSetTracker.cpp create mode 100644 lib/Analysis/Analysis.cpp create mode 100644 lib/Analysis/BasicAliasAnalysis.cpp create mode 100644 lib/Analysis/BlockFrequencyInfo.cpp create mode 100644 lib/Analysis/BranchProbabilityInfo.cpp create mode 100644 lib/Analysis/CFG.cpp create mode 100644 lib/Analysis/CFGPrinter.cpp create mode 100644 lib/Analysis/CMakeLists.txt create mode 100644 lib/Analysis/CaptureTracking.cpp create mode 100644 lib/Analysis/CodeMetrics.cpp create mode 100644 lib/Analysis/ConstantFolding.cpp create mode 100644 lib/Analysis/CostModel.cpp create mode 100644 lib/Analysis/Delinearization.cpp create mode 100644 lib/Analysis/DependenceAnalysis.cpp create mode 100644 lib/Analysis/DomPrinter.cpp create mode 100644 lib/Analysis/DominanceFrontier.cpp create mode 100644 lib/Analysis/IPA/CMakeLists.txt create mode 100644 lib/Analysis/IPA/CallGraph.cpp create mode 100644 lib/Analysis/IPA/CallGraphSCCPass.cpp create mode 100644 lib/Analysis/IPA/CallPrinter.cpp create mode 100644 lib/Analysis/IPA/FindUsedTypes.cpp create mode 100644 lib/Analysis/IPA/GlobalsModRef.cpp create mode 100644 lib/Analysis/IPA/IPA.cpp create mode 100644 lib/Analysis/IPA/InlineCost.cpp create mode 100644 lib/Analysis/IPA/LLVMBuild.txt create mode 100644 lib/Analysis/IPA/Makefile create mode 100644 lib/Analysis/IVUsers.cpp create mode 100644 lib/Analysis/InstCount.cpp create mode 100644 lib/Analysis/InstructionSimplify.cpp create mode 100644 lib/Analysis/Interval.cpp create mode 100644 lib/Analysis/IntervalPartition.cpp create mode 100644 lib/Analysis/LLVMBuild.txt create mode 100644 lib/Analysis/LazyValueInfo.cpp create mode 100644 lib/Analysis/LibCallAliasAnalysis.cpp create mode 100644 lib/Analysis/LibCallSemantics.cpp create mode 100644 lib/Analysis/Lint.cpp create mode 100644 lib/Analysis/Loads.cpp create mode 100644 lib/Analysis/LoopInfo.cpp create mode 100644 lib/Analysis/LoopPass.cpp create mode 100644 lib/Analysis/Makefile create mode 100644 lib/Analysis/MemDepPrinter.cpp create mode 100644 lib/Analysis/MemoryBuiltins.cpp create mode 100644 lib/Analysis/MemoryDependenceAnalysis.cpp create mode 100644 lib/Analysis/ModuleDebugInfoPrinter.cpp create mode 100644 lib/Analysis/NoAliasAnalysis.cpp create mode 100644 lib/Analysis/PHITransAddr.cpp create mode 100644 lib/Analysis/PostDominators.cpp create mode 100644 lib/Analysis/PtrUseVisitor.cpp create mode 100644 lib/Analysis/README.txt create mode 100644 lib/Analysis/RegionInfo.cpp create mode 100644 lib/Analysis/RegionPass.cpp create mode 100644 lib/Analysis/RegionPrinter.cpp create mode 100644 lib/Analysis/ScalarEvolution.cpp create mode 100644 lib/Analysis/ScalarEvolutionAliasAnalysis.cpp create mode 100644 lib/Analysis/ScalarEvolutionExpander.cpp create mode 100644 lib/Analysis/ScalarEvolutionNormalization.cpp create mode 100644 lib/Analysis/SparsePropagation.cpp create mode 100644 lib/Analysis/TargetTransformInfo.cpp create mode 100644 lib/Analysis/Trace.cpp create mode 100644 lib/Analysis/TypeBasedAliasAnalysis.cpp create mode 100644 lib/Analysis/ValueTracking.cpp create mode 100644 lib/AsmParser/CMakeLists.txt create mode 100644 lib/AsmParser/LLLexer.cpp create mode 100644 lib/AsmParser/LLLexer.h create mode 100644 lib/AsmParser/LLParser.cpp create mode 100644 lib/AsmParser/LLParser.h create mode 100644 lib/AsmParser/LLToken.h create mode 100644 lib/AsmParser/LLVMBuild.txt create mode 100644 lib/AsmParser/Makefile create mode 100644 lib/AsmParser/Parser.cpp create mode 100644 lib/Bitcode/CMakeLists.txt create mode 100644 lib/Bitcode/LLVMBuild.txt create mode 100644 lib/Bitcode/Makefile create mode 100644 lib/Bitcode/Reader/BitReader.cpp create mode 100644 lib/Bitcode/Reader/BitcodeReader.cpp create mode 100644 lib/Bitcode/Reader/BitcodeReader.h create mode 100644 lib/Bitcode/Reader/BitstreamReader.cpp create mode 100644 lib/Bitcode/Reader/CMakeLists.txt create mode 100644 lib/Bitcode/Reader/LLVMBuild.txt create mode 100644 lib/Bitcode/Reader/Makefile create mode 100644 lib/Bitcode/Writer/BitWriter.cpp create mode 100644 lib/Bitcode/Writer/BitcodeWriter.cpp create mode 100644 lib/Bitcode/Writer/BitcodeWriterPass.cpp create mode 100644 lib/Bitcode/Writer/CMakeLists.txt create mode 100644 lib/Bitcode/Writer/LLVMBuild.txt create mode 100644 lib/Bitcode/Writer/Makefile create mode 100644 lib/Bitcode/Writer/ValueEnumerator.cpp create mode 100644 lib/Bitcode/Writer/ValueEnumerator.h create mode 100644 lib/CMakeLists.txt create mode 100644 lib/CodeGen/AggressiveAntiDepBreaker.cpp create mode 100644 lib/CodeGen/AggressiveAntiDepBreaker.h create mode 100644 lib/CodeGen/AllocationOrder.cpp create mode 100644 lib/CodeGen/AllocationOrder.h create mode 100644 lib/CodeGen/Analysis.cpp create mode 100644 lib/CodeGen/AntiDepBreaker.h create mode 100644 lib/CodeGen/AsmPrinter/ARMException.cpp create mode 100644 lib/CodeGen/AsmPrinter/AsmPrinter.cpp create mode 100644 lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp create mode 100644 lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp create mode 100644 lib/CodeGen/AsmPrinter/CMakeLists.txt create mode 100644 lib/CodeGen/AsmPrinter/DIE.cpp create mode 100644 lib/CodeGen/AsmPrinter/DIE.h create mode 100644 lib/CodeGen/AsmPrinter/DIEHash.cpp create mode 100644 lib/CodeGen/AsmPrinter/DIEHash.h create mode 100644 lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp create mode 100644 lib/CodeGen/AsmPrinter/DwarfAccelTable.h create mode 100644 lib/CodeGen/AsmPrinter/DwarfCFIException.cpp create mode 100644 lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp create mode 100644 lib/CodeGen/AsmPrinter/DwarfCompileUnit.h create mode 100644 lib/CodeGen/AsmPrinter/DwarfDebug.cpp create mode 100644 lib/CodeGen/AsmPrinter/DwarfDebug.h create mode 100644 lib/CodeGen/AsmPrinter/DwarfException.cpp create mode 100644 lib/CodeGen/AsmPrinter/DwarfException.h create mode 100644 lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp create mode 100644 lib/CodeGen/AsmPrinter/LLVMBuild.txt create mode 100644 lib/CodeGen/AsmPrinter/Makefile create mode 100644 lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp create mode 100644 lib/CodeGen/AsmPrinter/Win64Exception.cpp create mode 100644 lib/CodeGen/BasicTargetTransformInfo.cpp create mode 100644 lib/CodeGen/BranchFolding.cpp create mode 100644 lib/CodeGen/BranchFolding.h create mode 100644 lib/CodeGen/CMakeLists.txt create mode 100644 lib/CodeGen/CalcSpillWeights.cpp create mode 100644 lib/CodeGen/CallingConvLower.cpp create mode 100644 lib/CodeGen/CodeGen.cpp create mode 100644 lib/CodeGen/CriticalAntiDepBreaker.cpp create mode 100644 lib/CodeGen/CriticalAntiDepBreaker.h create mode 100644 lib/CodeGen/DFAPacketizer.cpp create mode 100644 lib/CodeGen/DeadMachineInstructionElim.cpp create mode 100644 lib/CodeGen/DwarfEHPrepare.cpp create mode 100644 lib/CodeGen/EarlyIfConversion.cpp create mode 100644 lib/CodeGen/EdgeBundles.cpp create mode 100644 lib/CodeGen/ErlangGC.cpp create mode 100644 lib/CodeGen/ExecutionDepsFix.cpp create mode 100644 lib/CodeGen/ExpandISelPseudos.cpp create mode 100644 lib/CodeGen/ExpandPostRAPseudos.cpp create mode 100644 lib/CodeGen/GCMetadata.cpp create mode 100644 lib/CodeGen/GCMetadataPrinter.cpp create mode 100644 lib/CodeGen/GCStrategy.cpp create mode 100644 lib/CodeGen/IfConversion.cpp create mode 100644 lib/CodeGen/InlineSpiller.cpp create mode 100644 lib/CodeGen/InterferenceCache.cpp create mode 100644 lib/CodeGen/InterferenceCache.h create mode 100644 lib/CodeGen/IntrinsicLowering.cpp create mode 100644 lib/CodeGen/JITCodeEmitter.cpp create mode 100644 lib/CodeGen/LLVMBuild.txt create mode 100644 lib/CodeGen/LLVMTargetMachine.cpp create mode 100644 lib/CodeGen/LatencyPriorityQueue.cpp create mode 100644 lib/CodeGen/LexicalScopes.cpp create mode 100644 lib/CodeGen/LiveDebugVariables.cpp create mode 100644 lib/CodeGen/LiveDebugVariables.h create mode 100644 lib/CodeGen/LiveInterval.cpp create mode 100644 lib/CodeGen/LiveIntervalAnalysis.cpp create mode 100644 lib/CodeGen/LiveIntervalUnion.cpp create mode 100644 lib/CodeGen/LiveRangeCalc.cpp create mode 100644 lib/CodeGen/LiveRangeCalc.h create mode 100644 lib/CodeGen/LiveRangeEdit.cpp create mode 100644 lib/CodeGen/LiveRegMatrix.cpp create mode 100644 lib/CodeGen/LiveRegUnits.cpp create mode 100644 lib/CodeGen/LiveStackAnalysis.cpp create mode 100644 lib/CodeGen/LiveVariables.cpp create mode 100644 lib/CodeGen/LocalStackSlotAllocation.cpp create mode 100644 lib/CodeGen/MachineBasicBlock.cpp create mode 100644 lib/CodeGen/MachineBlockFrequencyInfo.cpp create mode 100644 lib/CodeGen/MachineBlockPlacement.cpp create mode 100644 lib/CodeGen/MachineBranchProbabilityInfo.cpp create mode 100644 lib/CodeGen/MachineCSE.cpp create mode 100644 lib/CodeGen/MachineCodeEmitter.cpp create mode 100644 lib/CodeGen/MachineCopyPropagation.cpp create mode 100644 lib/CodeGen/MachineDominators.cpp create mode 100644 lib/CodeGen/MachineFunction.cpp create mode 100644 lib/CodeGen/MachineFunctionAnalysis.cpp create mode 100644 lib/CodeGen/MachineFunctionPass.cpp create mode 100644 lib/CodeGen/MachineFunctionPrinterPass.cpp create mode 100644 lib/CodeGen/MachineInstr.cpp create mode 100644 lib/CodeGen/MachineInstrBundle.cpp create mode 100644 lib/CodeGen/MachineLICM.cpp create mode 100644 lib/CodeGen/MachineLoopInfo.cpp create mode 100644 lib/CodeGen/MachineModuleInfo.cpp create mode 100644 lib/CodeGen/MachineModuleInfoImpls.cpp create mode 100644 lib/CodeGen/MachinePassRegistry.cpp create mode 100644 lib/CodeGen/MachinePostDominators.cpp create mode 100644 lib/CodeGen/MachineRegisterInfo.cpp create mode 100644 lib/CodeGen/MachineSSAUpdater.cpp create mode 100644 lib/CodeGen/MachineScheduler.cpp create mode 100644 lib/CodeGen/MachineSink.cpp create mode 100644 lib/CodeGen/MachineTraceMetrics.cpp create mode 100644 lib/CodeGen/MachineVerifier.cpp create mode 100644 lib/CodeGen/Makefile create mode 100644 lib/CodeGen/OcamlGC.cpp create mode 100644 lib/CodeGen/OptimizePHIs.cpp create mode 100644 lib/CodeGen/PHIElimination.cpp create mode 100644 lib/CodeGen/PHIEliminationUtils.cpp create mode 100644 lib/CodeGen/PHIEliminationUtils.h create mode 100644 lib/CodeGen/Passes.cpp create mode 100644 lib/CodeGen/PeepholeOptimizer.cpp create mode 100644 lib/CodeGen/PostRASchedulerList.cpp create mode 100644 lib/CodeGen/ProcessImplicitDefs.cpp create mode 100644 lib/CodeGen/PrologEpilogInserter.cpp create mode 100644 lib/CodeGen/PrologEpilogInserter.h create mode 100644 lib/CodeGen/PseudoSourceValue.cpp create mode 100644 lib/CodeGen/README.txt create mode 100644 lib/CodeGen/RegAllocBase.cpp create mode 100644 lib/CodeGen/RegAllocBase.h create mode 100644 lib/CodeGen/RegAllocBasic.cpp create mode 100644 lib/CodeGen/RegAllocFast.cpp create mode 100644 lib/CodeGen/RegAllocGreedy.cpp create mode 100644 lib/CodeGen/RegAllocPBQP.cpp create mode 100644 lib/CodeGen/RegisterClassInfo.cpp create mode 100644 lib/CodeGen/RegisterCoalescer.cpp create mode 100644 lib/CodeGen/RegisterCoalescer.h create mode 100644 lib/CodeGen/RegisterPressure.cpp create mode 100644 lib/CodeGen/RegisterScavenging.cpp create mode 100644 lib/CodeGen/ScheduleDAG.cpp create mode 100644 lib/CodeGen/ScheduleDAGInstrs.cpp create mode 100644 lib/CodeGen/ScheduleDAGPrinter.cpp create mode 100644 lib/CodeGen/ScoreboardHazardRecognizer.cpp create mode 100644 lib/CodeGen/SelectionDAG/CMakeLists.txt create mode 100644 lib/CodeGen/SelectionDAG/DAGCombiner.cpp create mode 100644 lib/CodeGen/SelectionDAG/FastISel.cpp create mode 100644 lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp create mode 100644 lib/CodeGen/SelectionDAG/InstrEmitter.cpp create mode 100644 lib/CodeGen/SelectionDAG/InstrEmitter.h create mode 100644 lib/CodeGen/SelectionDAG/LLVMBuild.txt create mode 100644 lib/CodeGen/SelectionDAG/LegalizeDAG.cpp create mode 100644 lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp create mode 100644 lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp create mode 100644 lib/CodeGen/SelectionDAG/LegalizeTypes.cpp create mode 100644 lib/CodeGen/SelectionDAG/LegalizeTypes.h create mode 100644 lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp create mode 100644 lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp create mode 100644 lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp create mode 100644 lib/CodeGen/SelectionDAG/Makefile create mode 100644 lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp create mode 100644 lib/CodeGen/SelectionDAG/SDNodeDbgValue.h create mode 100644 lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp create mode 100644 lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp create mode 100644 lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp create mode 100644 lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h create mode 100644 lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp create mode 100644 lib/CodeGen/SelectionDAG/SelectionDAG.cpp create mode 100644 lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp create mode 100644 lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h create mode 100644 lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp create mode 100644 lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp create mode 100644 lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp create mode 100644 lib/CodeGen/SelectionDAG/TargetLowering.cpp create mode 100644 lib/CodeGen/SelectionDAG/TargetSelectionDAGInfo.cpp create mode 100644 lib/CodeGen/ShadowStackGC.cpp create mode 100644 lib/CodeGen/SjLjEHPrepare.cpp create mode 100644 lib/CodeGen/SlotIndexes.cpp create mode 100644 lib/CodeGen/SpillPlacement.cpp create mode 100644 lib/CodeGen/SpillPlacement.h create mode 100644 lib/CodeGen/Spiller.cpp create mode 100644 lib/CodeGen/Spiller.h create mode 100644 lib/CodeGen/SplitKit.cpp create mode 100644 lib/CodeGen/SplitKit.h create mode 100644 lib/CodeGen/StackColoring.cpp create mode 100644 lib/CodeGen/StackMaps.cpp create mode 100644 lib/CodeGen/StackProtector.cpp create mode 100644 lib/CodeGen/StackSlotColoring.cpp create mode 100644 lib/CodeGen/TailDuplication.cpp create mode 100644 lib/CodeGen/TargetFrameLoweringImpl.cpp create mode 100644 lib/CodeGen/TargetInstrInfo.cpp create mode 100644 lib/CodeGen/TargetLoweringBase.cpp create mode 100644 lib/CodeGen/TargetLoweringObjectFileImpl.cpp create mode 100644 lib/CodeGen/TargetOptionsImpl.cpp create mode 100644 lib/CodeGen/TargetRegisterInfo.cpp create mode 100644 lib/CodeGen/TargetSchedule.cpp create mode 100644 lib/CodeGen/TwoAddressInstructionPass.cpp create mode 100644 lib/CodeGen/UnreachableBlockElim.cpp create mode 100644 lib/CodeGen/VirtRegMap.cpp create mode 100644 lib/DebugInfo/CMakeLists.txt create mode 100644 lib/DebugInfo/DIContext.cpp create mode 100644 lib/DebugInfo/DWARFAbbreviationDeclaration.cpp create mode 100644 lib/DebugInfo/DWARFAbbreviationDeclaration.h create mode 100644 lib/DebugInfo/DWARFCompileUnit.cpp create mode 100644 lib/DebugInfo/DWARFCompileUnit.h create mode 100644 lib/DebugInfo/DWARFContext.cpp create mode 100644 lib/DebugInfo/DWARFContext.h create mode 100644 lib/DebugInfo/DWARFDebugAbbrev.cpp create mode 100644 lib/DebugInfo/DWARFDebugAbbrev.h create mode 100644 lib/DebugInfo/DWARFDebugArangeSet.cpp create mode 100644 lib/DebugInfo/DWARFDebugArangeSet.h create mode 100644 lib/DebugInfo/DWARFDebugAranges.cpp create mode 100644 lib/DebugInfo/DWARFDebugAranges.h create mode 100644 lib/DebugInfo/DWARFDebugFrame.cpp create mode 100644 lib/DebugInfo/DWARFDebugFrame.h create mode 100644 lib/DebugInfo/DWARFDebugInfoEntry.cpp create mode 100644 lib/DebugInfo/DWARFDebugInfoEntry.h create mode 100644 lib/DebugInfo/DWARFDebugLine.cpp create mode 100644 lib/DebugInfo/DWARFDebugLine.h create mode 100644 lib/DebugInfo/DWARFDebugLoc.cpp create mode 100644 lib/DebugInfo/DWARFDebugLoc.h create mode 100644 lib/DebugInfo/DWARFDebugRangeList.cpp create mode 100644 lib/DebugInfo/DWARFDebugRangeList.h create mode 100644 lib/DebugInfo/DWARFFormValue.cpp create mode 100644 lib/DebugInfo/DWARFRelocMap.h create mode 100644 lib/DebugInfo/DWARFTypeUnit.cpp create mode 100644 lib/DebugInfo/DWARFTypeUnit.h create mode 100644 lib/DebugInfo/DWARFUnit.cpp create mode 100644 lib/DebugInfo/DWARFUnit.h create mode 100644 lib/DebugInfo/LLVMBuild.txt create mode 100644 lib/DebugInfo/Makefile create mode 100644 lib/ExecutionEngine/CMakeLists.txt create mode 100644 lib/ExecutionEngine/EventListenerCommon.h create mode 100644 lib/ExecutionEngine/ExecutionEngine.cpp create mode 100644 lib/ExecutionEngine/ExecutionEngineBindings.cpp create mode 100644 lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt create mode 100644 lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp create mode 100644 lib/ExecutionEngine/IntelJITEvents/IntelJITEventsWrapper.h create mode 100644 lib/ExecutionEngine/IntelJITEvents/LLVMBuild.txt create mode 100644 lib/ExecutionEngine/IntelJITEvents/Makefile create mode 100644 lib/ExecutionEngine/IntelJITEvents/ittnotify_config.h create mode 100644 lib/ExecutionEngine/IntelJITEvents/ittnotify_types.h create mode 100644 lib/ExecutionEngine/IntelJITEvents/jitprofiling.c create mode 100644 lib/ExecutionEngine/IntelJITEvents/jitprofiling.h create mode 100644 lib/ExecutionEngine/Interpreter/CMakeLists.txt create mode 100644 lib/ExecutionEngine/Interpreter/Execution.cpp create mode 100644 lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp create mode 100644 lib/ExecutionEngine/Interpreter/Interpreter.cpp create mode 100644 lib/ExecutionEngine/Interpreter/Interpreter.h create mode 100644 lib/ExecutionEngine/Interpreter/LLVMBuild.txt create mode 100644 lib/ExecutionEngine/Interpreter/Makefile create mode 100644 lib/ExecutionEngine/JIT/CMakeLists.txt create mode 100644 lib/ExecutionEngine/JIT/JIT.cpp create mode 100644 lib/ExecutionEngine/JIT/JIT.h create mode 100644 lib/ExecutionEngine/JIT/JITEmitter.cpp create mode 100644 lib/ExecutionEngine/JIT/JITMemoryManager.cpp create mode 100644 lib/ExecutionEngine/JIT/LLVMBuild.txt create mode 100644 lib/ExecutionEngine/JIT/Makefile create mode 100644 lib/ExecutionEngine/LLVMBuild.txt create mode 100644 lib/ExecutionEngine/MCJIT/CMakeLists.txt create mode 100644 lib/ExecutionEngine/MCJIT/LLVMBuild.txt create mode 100644 lib/ExecutionEngine/MCJIT/MCJIT.cpp create mode 100644 lib/ExecutionEngine/MCJIT/MCJIT.h create mode 100644 lib/ExecutionEngine/MCJIT/Makefile create mode 100644 lib/ExecutionEngine/MCJIT/SectionMemoryManager.cpp create mode 100644 lib/ExecutionEngine/Makefile create mode 100644 lib/ExecutionEngine/OProfileJIT/CMakeLists.txt create mode 100644 lib/ExecutionEngine/OProfileJIT/LLVMBuild.txt create mode 100644 lib/ExecutionEngine/OProfileJIT/Makefile create mode 100644 lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp create mode 100644 lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp create mode 100644 lib/ExecutionEngine/RTDyldMemoryManager.cpp create mode 100644 lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt create mode 100644 lib/ExecutionEngine/RuntimeDyld/GDBRegistrar.cpp create mode 100644 lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h create mode 100644 lib/ExecutionEngine/RuntimeDyld/LLVMBuild.txt create mode 100644 lib/ExecutionEngine/RuntimeDyld/Makefile create mode 100644 lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h create mode 100644 lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp create mode 100644 lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp create mode 100644 lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h create mode 100644 lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h create mode 100644 lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp create mode 100644 lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h create mode 100644 lib/ExecutionEngine/TargetSelect.cpp create mode 100644 lib/IR/AsmWriter.cpp create mode 100644 lib/IR/AsmWriter.h create mode 100644 lib/IR/AttributeImpl.h create mode 100644 lib/IR/Attributes.cpp create mode 100644 lib/IR/AutoUpgrade.cpp create mode 100644 lib/IR/BasicBlock.cpp create mode 100644 lib/IR/CMakeLists.txt create mode 100644 lib/IR/ConstantFold.cpp create mode 100644 lib/IR/ConstantFold.h create mode 100644 lib/IR/Constants.cpp create mode 100644 lib/IR/ConstantsContext.h create mode 100644 lib/IR/Core.cpp create mode 100644 lib/IR/DIBuilder.cpp create mode 100644 lib/IR/DataLayout.cpp create mode 100644 lib/IR/DebugInfo.cpp create mode 100644 lib/IR/DebugLoc.cpp create mode 100644 lib/IR/Dominators.cpp create mode 100644 lib/IR/Function.cpp create mode 100644 lib/IR/GCOV.cpp create mode 100644 lib/IR/GVMaterializer.cpp create mode 100644 lib/IR/Globals.cpp create mode 100644 lib/IR/IRBuilder.cpp create mode 100644 lib/IR/InlineAsm.cpp create mode 100644 lib/IR/Instruction.cpp create mode 100644 lib/IR/Instructions.cpp create mode 100644 lib/IR/IntrinsicInst.cpp create mode 100644 lib/IR/LLVMBuild.txt create mode 100644 lib/IR/LLVMContext.cpp create mode 100644 lib/IR/LLVMContextImpl.cpp create mode 100644 lib/IR/LLVMContextImpl.h create mode 100644 lib/IR/LeakDetector.cpp create mode 100644 lib/IR/LeaksContext.h create mode 100644 lib/IR/LegacyPassManager.cpp create mode 100644 lib/IR/Makefile create mode 100644 lib/IR/Metadata.cpp create mode 100644 lib/IR/Module.cpp create mode 100644 lib/IR/Pass.cpp create mode 100644 lib/IR/PassManager.cpp create mode 100644 lib/IR/PassRegistry.cpp create mode 100644 lib/IR/PrintModulePass.cpp create mode 100644 lib/IR/SymbolTableListTraitsImpl.h create mode 100644 lib/IR/Type.cpp create mode 100644 lib/IR/TypeFinder.cpp create mode 100644 lib/IR/Use.cpp create mode 100644 lib/IR/User.cpp create mode 100644 lib/IR/Value.cpp create mode 100644 lib/IR/ValueSymbolTable.cpp create mode 100644 lib/IR/ValueTypes.cpp create mode 100644 lib/IR/Verifier.cpp create mode 100644 lib/IRReader/CMakeLists.txt create mode 100644 lib/IRReader/IRReader.cpp create mode 100644 lib/IRReader/LLVMBuild.txt create mode 100644 lib/IRReader/Makefile create mode 100644 lib/LLVMBuild.txt create mode 100644 lib/LTO/CMakeLists.txt create mode 100644 lib/LTO/LLVMBuild.txt create mode 100644 lib/LTO/LTOCodeGenerator.cpp create mode 100644 lib/LTO/LTOModule.cpp create mode 100644 lib/LTO/Makefile create mode 100644 lib/Linker/CMakeLists.txt create mode 100644 lib/Linker/LLVMBuild.txt create mode 100644 lib/Linker/LinkModules.cpp create mode 100644 lib/Linker/Makefile create mode 100644 lib/MC/CMakeLists.txt create mode 100644 lib/MC/ELFObjectWriter.cpp create mode 100644 lib/MC/LLVMBuild.txt create mode 100644 lib/MC/MCAsmBackend.cpp create mode 100644 lib/MC/MCAsmInfo.cpp create mode 100644 lib/MC/MCAsmInfoCOFF.cpp create mode 100644 lib/MC/MCAsmInfoDarwin.cpp create mode 100644 lib/MC/MCAsmInfoELF.cpp create mode 100644 lib/MC/MCAsmStreamer.cpp create mode 100644 lib/MC/MCAssembler.cpp create mode 100644 lib/MC/MCAtom.cpp create mode 100644 lib/MC/MCCodeEmitter.cpp create mode 100644 lib/MC/MCCodeGenInfo.cpp create mode 100644 lib/MC/MCContext.cpp create mode 100644 lib/MC/MCDisassembler.cpp create mode 100644 lib/MC/MCDisassembler/CMakeLists.txt create mode 100644 lib/MC/MCDisassembler/Disassembler.cpp create mode 100644 lib/MC/MCDisassembler/Disassembler.h create mode 100644 lib/MC/MCDisassembler/LLVMBuild.txt create mode 100644 lib/MC/MCDisassembler/Makefile create mode 100644 lib/MC/MCDwarf.cpp create mode 100644 lib/MC/MCELF.cpp create mode 100644 lib/MC/MCELFObjectTargetWriter.cpp create mode 100644 lib/MC/MCELFStreamer.cpp create mode 100644 lib/MC/MCExpr.cpp create mode 100644 lib/MC/MCExternalSymbolizer.cpp create mode 100644 lib/MC/MCFunction.cpp create mode 100644 lib/MC/MCInst.cpp create mode 100644 lib/MC/MCInstPrinter.cpp create mode 100644 lib/MC/MCInstrAnalysis.cpp create mode 100644 lib/MC/MCLabel.cpp create mode 100644 lib/MC/MCMachOStreamer.cpp create mode 100644 lib/MC/MCMachObjectTargetWriter.cpp create mode 100644 lib/MC/MCModule.cpp create mode 100644 lib/MC/MCModuleYAML.cpp create mode 100644 lib/MC/MCNullStreamer.cpp create mode 100644 lib/MC/MCObjectDisassembler.cpp create mode 100644 lib/MC/MCObjectFileInfo.cpp create mode 100644 lib/MC/MCObjectStreamer.cpp create mode 100644 lib/MC/MCObjectSymbolizer.cpp create mode 100644 lib/MC/MCObjectWriter.cpp create mode 100644 lib/MC/MCParser/AsmLexer.cpp create mode 100644 lib/MC/MCParser/AsmParser.cpp create mode 100644 lib/MC/MCParser/CMakeLists.txt create mode 100644 lib/MC/MCParser/COFFAsmParser.cpp create mode 100644 lib/MC/MCParser/DarwinAsmParser.cpp create mode 100644 lib/MC/MCParser/ELFAsmParser.cpp create mode 100644 lib/MC/MCParser/LLVMBuild.txt create mode 100644 lib/MC/MCParser/MCAsmLexer.cpp create mode 100644 lib/MC/MCParser/MCAsmParser.cpp create mode 100644 lib/MC/MCParser/MCAsmParserExtension.cpp create mode 100644 lib/MC/MCParser/MCTargetAsmParser.cpp create mode 100644 lib/MC/MCParser/Makefile create mode 100644 lib/MC/MCPureStreamer.cpp create mode 100644 lib/MC/MCRegisterInfo.cpp create mode 100644 lib/MC/MCRelocationInfo.cpp create mode 100644 lib/MC/MCSection.cpp create mode 100644 lib/MC/MCSectionCOFF.cpp create mode 100644 lib/MC/MCSectionELF.cpp create mode 100644 lib/MC/MCSectionMachO.cpp create mode 100644 lib/MC/MCStreamer.cpp create mode 100644 lib/MC/MCSubtargetInfo.cpp create mode 100644 lib/MC/MCSymbol.cpp create mode 100644 lib/MC/MCSymbolizer.cpp create mode 100644 lib/MC/MCValue.cpp create mode 100644 lib/MC/MCWin64EH.cpp create mode 100644 lib/MC/MachObjectWriter.cpp create mode 100644 lib/MC/Makefile create mode 100644 lib/MC/SubtargetFeature.cpp create mode 100644 lib/MC/WinCOFFObjectWriter.cpp create mode 100644 lib/MC/WinCOFFStreamer.cpp create mode 100644 lib/Makefile create mode 100644 lib/Object/Archive.cpp create mode 100644 lib/Object/Binary.cpp create mode 100644 lib/Object/CMakeLists.txt create mode 100644 lib/Object/COFFObjectFile.cpp create mode 100644 lib/Object/COFFYAML.cpp create mode 100644 lib/Object/ELF.cpp create mode 100644 lib/Object/ELFObjectFile.cpp create mode 100644 lib/Object/ELFYAML.cpp create mode 100644 lib/Object/Error.cpp create mode 100644 lib/Object/LLVMBuild.txt create mode 100644 lib/Object/MachOObjectFile.cpp create mode 100644 lib/Object/MachOUniversal.cpp create mode 100644 lib/Object/Makefile create mode 100644 lib/Object/Object.cpp create mode 100644 lib/Object/ObjectFile.cpp create mode 100644 lib/Object/YAML.cpp create mode 100644 lib/Option/Arg.cpp create mode 100644 lib/Option/ArgList.cpp create mode 100644 lib/Option/CMakeLists.txt create mode 100644 lib/Option/LLVMBuild.txt create mode 100644 lib/Option/Makefile create mode 100644 lib/Option/OptTable.cpp create mode 100644 lib/Option/Option.cpp create mode 100644 lib/Support/APFloat.cpp create mode 100644 lib/Support/APInt.cpp create mode 100644 lib/Support/APSInt.cpp create mode 100644 lib/Support/Allocator.cpp create mode 100644 lib/Support/Atomic.cpp create mode 100644 lib/Support/BlockFrequency.cpp create mode 100644 lib/Support/BranchProbability.cpp create mode 100644 lib/Support/CMakeLists.txt create mode 100644 lib/Support/COPYRIGHT.regex create mode 100644 lib/Support/CommandLine.cpp create mode 100644 lib/Support/Compression.cpp create mode 100644 lib/Support/ConstantRange.cpp create mode 100644 lib/Support/ConvertUTF.c create mode 100644 lib/Support/ConvertUTFWrapper.cpp create mode 100644 lib/Support/CrashRecoveryContext.cpp create mode 100644 lib/Support/DAGDeltaAlgorithm.cpp create mode 100644 lib/Support/DataExtractor.cpp create mode 100644 lib/Support/DataStream.cpp create mode 100644 lib/Support/Debug.cpp create mode 100644 lib/Support/DeltaAlgorithm.cpp create mode 100644 lib/Support/Disassembler.cpp create mode 100644 lib/Support/Dwarf.cpp create mode 100644 lib/Support/DynamicLibrary.cpp create mode 100644 lib/Support/Errno.cpp create mode 100644 lib/Support/ErrorHandling.cpp create mode 100644 lib/Support/FileOutputBuffer.cpp create mode 100644 lib/Support/FileUtilities.cpp create mode 100644 lib/Support/FoldingSet.cpp create mode 100644 lib/Support/FormattedStream.cpp create mode 100644 lib/Support/GraphWriter.cpp create mode 100644 lib/Support/Hashing.cpp create mode 100644 lib/Support/Host.cpp create mode 100644 lib/Support/IncludeFile.cpp create mode 100644 lib/Support/IntEqClasses.cpp create mode 100644 lib/Support/IntervalMap.cpp create mode 100644 lib/Support/IntrusiveRefCntPtr.cpp create mode 100644 lib/Support/IsInf.cpp create mode 100644 lib/Support/IsNAN.cpp create mode 100644 lib/Support/LLVMBuild.txt create mode 100644 lib/Support/Locale.cpp create mode 100644 lib/Support/LockFileManager.cpp create mode 100644 lib/Support/MD5.cpp create mode 100644 lib/Support/Makefile create mode 100644 lib/Support/ManagedStatic.cpp create mode 100644 lib/Support/Memory.cpp create mode 100644 lib/Support/MemoryBuffer.cpp create mode 100644 lib/Support/MemoryObject.cpp create mode 100644 lib/Support/Mutex.cpp create mode 100644 lib/Support/Path.cpp create mode 100644 lib/Support/PluginLoader.cpp create mode 100644 lib/Support/PrettyStackTrace.cpp create mode 100644 lib/Support/Process.cpp create mode 100644 lib/Support/Program.cpp create mode 100644 lib/Support/README.txt.system create mode 100644 lib/Support/RWMutex.cpp create mode 100644 lib/Support/Regex.cpp create mode 100644 lib/Support/SearchForAddressOfSpecialSymbol.cpp create mode 100644 lib/Support/Signals.cpp create mode 100644 lib/Support/SmallPtrSet.cpp create mode 100644 lib/Support/SmallVector.cpp create mode 100644 lib/Support/SourceMgr.cpp create mode 100644 lib/Support/Statistic.cpp create mode 100644 lib/Support/StreamableMemoryObject.cpp create mode 100644 lib/Support/StringExtras.cpp create mode 100644 lib/Support/StringMap.cpp create mode 100644 lib/Support/StringPool.cpp create mode 100644 lib/Support/StringRef.cpp create mode 100644 lib/Support/StringRefMemoryObject.cpp create mode 100644 lib/Support/SystemUtils.cpp create mode 100644 lib/Support/TargetRegistry.cpp create mode 100644 lib/Support/ThreadLocal.cpp create mode 100644 lib/Support/Threading.cpp create mode 100644 lib/Support/TimeValue.cpp create mode 100644 lib/Support/Timer.cpp create mode 100644 lib/Support/ToolOutputFile.cpp create mode 100644 lib/Support/Triple.cpp create mode 100644 lib/Support/Twine.cpp create mode 100644 lib/Support/Unicode.cpp create mode 100644 lib/Support/Unix/Host.inc create mode 100644 lib/Support/Unix/Memory.inc create mode 100644 lib/Support/Unix/Mutex.inc create mode 100644 lib/Support/Unix/Path.inc create mode 100644 lib/Support/Unix/Process.inc create mode 100644 lib/Support/Unix/Program.inc create mode 100644 lib/Support/Unix/README.txt create mode 100644 lib/Support/Unix/RWMutex.inc create mode 100644 lib/Support/Unix/Signals.inc create mode 100644 lib/Support/Unix/ThreadLocal.inc create mode 100644 lib/Support/Unix/TimeValue.inc create mode 100644 lib/Support/Unix/Unix.h create mode 100644 lib/Support/Unix/Watchdog.inc create mode 100644 lib/Support/Unix/system_error.inc create mode 100644 lib/Support/Valgrind.cpp create mode 100644 lib/Support/Watchdog.cpp create mode 100644 lib/Support/Windows/DynamicLibrary.inc create mode 100644 lib/Support/Windows/Host.inc create mode 100644 lib/Support/Windows/Memory.inc create mode 100644 lib/Support/Windows/Mutex.inc create mode 100644 lib/Support/Windows/Path.inc create mode 100644 lib/Support/Windows/Process.inc create mode 100644 lib/Support/Windows/Program.inc create mode 100644 lib/Support/Windows/RWMutex.inc create mode 100644 lib/Support/Windows/Signals.inc create mode 100644 lib/Support/Windows/ThreadLocal.inc create mode 100644 lib/Support/Windows/TimeValue.inc create mode 100644 lib/Support/Windows/Watchdog.inc create mode 100644 lib/Support/Windows/Windows.h create mode 100644 lib/Support/Windows/explicit_symbols.inc create mode 100644 lib/Support/Windows/system_error.inc create mode 100644 lib/Support/YAMLParser.cpp create mode 100644 lib/Support/YAMLTraits.cpp create mode 100644 lib/Support/circular_raw_ostream.cpp create mode 100644 lib/Support/raw_os_ostream.cpp create mode 100644 lib/Support/raw_ostream.cpp create mode 100644 lib/Support/regcclass.h create mode 100644 lib/Support/regcname.h create mode 100644 lib/Support/regcomp.c create mode 100644 lib/Support/regengine.inc create mode 100644 lib/Support/regerror.c create mode 100644 lib/Support/regex2.h create mode 100644 lib/Support/regex_impl.h create mode 100644 lib/Support/regexec.c create mode 100644 lib/Support/regfree.c create mode 100644 lib/Support/regstrlcpy.c create mode 100644 lib/Support/regutils.h create mode 100644 lib/Support/system_error.cpp create mode 100644 lib/TableGen/CMakeLists.txt create mode 100644 lib/TableGen/Error.cpp create mode 100644 lib/TableGen/LLVMBuild.txt create mode 100644 lib/TableGen/Main.cpp create mode 100644 lib/TableGen/Makefile create mode 100644 lib/TableGen/Record.cpp create mode 100644 lib/TableGen/StringMatcher.cpp create mode 100644 lib/TableGen/TGLexer.cpp create mode 100644 lib/TableGen/TGLexer.h create mode 100644 lib/TableGen/TGParser.cpp create mode 100644 lib/TableGen/TGParser.h create mode 100644 lib/TableGen/TableGenBackend.cpp create mode 100644 lib/Target/AArch64/AArch64.h create mode 100644 lib/Target/AArch64/AArch64.td create mode 100644 lib/Target/AArch64/AArch64AsmPrinter.cpp create mode 100644 lib/Target/AArch64/AArch64AsmPrinter.h create mode 100644 lib/Target/AArch64/AArch64BranchFixupPass.cpp create mode 100644 lib/Target/AArch64/AArch64CallingConv.td create mode 100644 lib/Target/AArch64/AArch64FrameLowering.cpp create mode 100644 lib/Target/AArch64/AArch64FrameLowering.h create mode 100644 lib/Target/AArch64/AArch64ISelDAGToDAG.cpp create mode 100644 lib/Target/AArch64/AArch64ISelLowering.cpp create mode 100644 lib/Target/AArch64/AArch64ISelLowering.h create mode 100644 lib/Target/AArch64/AArch64InstrFormats.td create mode 100644 lib/Target/AArch64/AArch64InstrInfo.cpp create mode 100644 lib/Target/AArch64/AArch64InstrInfo.h create mode 100644 lib/Target/AArch64/AArch64InstrInfo.td create mode 100644 lib/Target/AArch64/AArch64InstrNEON.td create mode 100644 lib/Target/AArch64/AArch64MCInstLower.cpp create mode 100644 lib/Target/AArch64/AArch64MachineFunctionInfo.cpp create mode 100644 lib/Target/AArch64/AArch64MachineFunctionInfo.h create mode 100644 lib/Target/AArch64/AArch64RegisterInfo.cpp create mode 100644 lib/Target/AArch64/AArch64RegisterInfo.h create mode 100644 lib/Target/AArch64/AArch64RegisterInfo.td create mode 100644 lib/Target/AArch64/AArch64Schedule.td create mode 100644 lib/Target/AArch64/AArch64SelectionDAGInfo.cpp create mode 100644 lib/Target/AArch64/AArch64SelectionDAGInfo.h create mode 100644 lib/Target/AArch64/AArch64Subtarget.cpp create mode 100644 lib/Target/AArch64/AArch64Subtarget.h create mode 100644 lib/Target/AArch64/AArch64TargetMachine.cpp create mode 100644 lib/Target/AArch64/AArch64TargetMachine.h create mode 100644 lib/Target/AArch64/AArch64TargetObjectFile.cpp create mode 100644 lib/Target/AArch64/AArch64TargetObjectFile.h create mode 100644 lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp create mode 100644 lib/Target/AArch64/AsmParser/CMakeLists.txt create mode 100644 lib/Target/AArch64/AsmParser/LLVMBuild.txt create mode 100644 lib/Target/AArch64/AsmParser/Makefile create mode 100644 lib/Target/AArch64/CMakeLists.txt create mode 100644 lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp create mode 100644 lib/Target/AArch64/Disassembler/CMakeLists.txt create mode 100644 lib/Target/AArch64/Disassembler/LLVMBuild.txt create mode 100644 lib/Target/AArch64/Disassembler/Makefile create mode 100644 lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp create mode 100644 lib/Target/AArch64/InstPrinter/AArch64InstPrinter.h create mode 100644 lib/Target/AArch64/InstPrinter/CMakeLists.txt create mode 100644 lib/Target/AArch64/InstPrinter/LLVMBuild.txt create mode 100644 lib/Target/AArch64/InstPrinter/Makefile create mode 100644 lib/Target/AArch64/LLVMBuild.txt create mode 100644 lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp create mode 100644 lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp create mode 100644 lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp create mode 100644 lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.h create mode 100644 lib/Target/AArch64/MCTargetDesc/AArch64FixupKinds.h create mode 100644 lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp create mode 100644 lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h create mode 100644 lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp create mode 100644 lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.cpp create mode 100644 lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.h create mode 100644 lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp create mode 100644 lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.h create mode 100644 lib/Target/AArch64/MCTargetDesc/CMakeLists.txt create mode 100644 lib/Target/AArch64/MCTargetDesc/LLVMBuild.txt create mode 100644 lib/Target/AArch64/MCTargetDesc/Makefile create mode 100644 lib/Target/AArch64/Makefile create mode 100644 lib/Target/AArch64/README.txt create mode 100644 lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp create mode 100644 lib/Target/AArch64/TargetInfo/CMakeLists.txt create mode 100644 lib/Target/AArch64/TargetInfo/LLVMBuild.txt create mode 100644 lib/Target/AArch64/TargetInfo/Makefile create mode 100644 lib/Target/AArch64/Utils/AArch64BaseInfo.cpp create mode 100644 lib/Target/AArch64/Utils/AArch64BaseInfo.h create mode 100644 lib/Target/AArch64/Utils/CMakeLists.txt create mode 100644 lib/Target/AArch64/Utils/LLVMBuild.txt create mode 100644 lib/Target/AArch64/Utils/Makefile create mode 100644 lib/Target/ARM/A15SDOptimizer.cpp create mode 100644 lib/Target/ARM/ARM.h create mode 100644 lib/Target/ARM/ARM.td create mode 100644 lib/Target/ARM/ARMAsmPrinter.cpp create mode 100644 lib/Target/ARM/ARMAsmPrinter.h create mode 100644 lib/Target/ARM/ARMBaseInstrInfo.cpp create mode 100644 lib/Target/ARM/ARMBaseInstrInfo.h create mode 100644 lib/Target/ARM/ARMBaseRegisterInfo.cpp create mode 100644 lib/Target/ARM/ARMBaseRegisterInfo.h create mode 100644 lib/Target/ARM/ARMBuildAttrs.h create mode 100644 lib/Target/ARM/ARMCallingConv.h create mode 100644 lib/Target/ARM/ARMCallingConv.td create mode 100644 lib/Target/ARM/ARMCodeEmitter.cpp create mode 100644 lib/Target/ARM/ARMConstantIslandPass.cpp create mode 100644 lib/Target/ARM/ARMConstantPoolValue.cpp create mode 100644 lib/Target/ARM/ARMConstantPoolValue.h create mode 100644 lib/Target/ARM/ARMExpandPseudoInsts.cpp create mode 100644 lib/Target/ARM/ARMFPUName.def create mode 100644 lib/Target/ARM/ARMFPUName.h create mode 100644 lib/Target/ARM/ARMFastISel.cpp create mode 100644 lib/Target/ARM/ARMFeatures.h create mode 100644 lib/Target/ARM/ARMFrameLowering.cpp create mode 100644 lib/Target/ARM/ARMFrameLowering.h create mode 100644 lib/Target/ARM/ARMHazardRecognizer.cpp create mode 100644 lib/Target/ARM/ARMHazardRecognizer.h create mode 100644 lib/Target/ARM/ARMISelDAGToDAG.cpp create mode 100644 lib/Target/ARM/ARMISelLowering.cpp create mode 100644 lib/Target/ARM/ARMISelLowering.h create mode 100644 lib/Target/ARM/ARMInstrFormats.td create mode 100644 lib/Target/ARM/ARMInstrInfo.cpp create mode 100644 lib/Target/ARM/ARMInstrInfo.h create mode 100644 lib/Target/ARM/ARMInstrInfo.td create mode 100644 lib/Target/ARM/ARMInstrNEON.td create mode 100644 lib/Target/ARM/ARMInstrThumb.td create mode 100644 lib/Target/ARM/ARMInstrThumb2.td create mode 100644 lib/Target/ARM/ARMInstrVFP.td create mode 100644 lib/Target/ARM/ARMJITInfo.cpp create mode 100644 lib/Target/ARM/ARMJITInfo.h create mode 100644 lib/Target/ARM/ARMLoadStoreOptimizer.cpp create mode 100644 lib/Target/ARM/ARMMCInstLower.cpp create mode 100644 lib/Target/ARM/ARMMachineFunctionInfo.cpp create mode 100644 lib/Target/ARM/ARMMachineFunctionInfo.h create mode 100644 lib/Target/ARM/ARMPerfectShuffle.h create mode 100644 lib/Target/ARM/ARMRegisterInfo.cpp create mode 100644 lib/Target/ARM/ARMRegisterInfo.h create mode 100644 lib/Target/ARM/ARMRegisterInfo.td create mode 100644 lib/Target/ARM/ARMRelocations.h create mode 100644 lib/Target/ARM/ARMSchedule.td create mode 100644 lib/Target/ARM/ARMScheduleA8.td create mode 100644 lib/Target/ARM/ARMScheduleA9.td create mode 100644 lib/Target/ARM/ARMScheduleSwift.td create mode 100644 lib/Target/ARM/ARMScheduleV6.td create mode 100644 lib/Target/ARM/ARMSelectionDAGInfo.cpp create mode 100644 lib/Target/ARM/ARMSelectionDAGInfo.h create mode 100644 lib/Target/ARM/ARMSubtarget.cpp create mode 100644 lib/Target/ARM/ARMSubtarget.h create mode 100644 lib/Target/ARM/ARMTargetMachine.cpp create mode 100644 lib/Target/ARM/ARMTargetMachine.h create mode 100644 lib/Target/ARM/ARMTargetObjectFile.cpp create mode 100644 lib/Target/ARM/ARMTargetObjectFile.h create mode 100644 lib/Target/ARM/ARMTargetTransformInfo.cpp create mode 100644 lib/Target/ARM/AsmParser/ARMAsmParser.cpp create mode 100644 lib/Target/ARM/AsmParser/CMakeLists.txt create mode 100644 lib/Target/ARM/AsmParser/LLVMBuild.txt create mode 100644 lib/Target/ARM/AsmParser/Makefile create mode 100644 lib/Target/ARM/CMakeLists.txt create mode 100644 lib/Target/ARM/Disassembler/ARMDisassembler.cpp create mode 100644 lib/Target/ARM/Disassembler/CMakeLists.txt create mode 100644 lib/Target/ARM/Disassembler/LLVMBuild.txt create mode 100644 lib/Target/ARM/Disassembler/Makefile create mode 100644 lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp create mode 100644 lib/Target/ARM/InstPrinter/ARMInstPrinter.h create mode 100644 lib/Target/ARM/InstPrinter/CMakeLists.txt create mode 100644 lib/Target/ARM/InstPrinter/LLVMBuild.txt create mode 100644 lib/Target/ARM/InstPrinter/Makefile create mode 100644 lib/Target/ARM/LICENSE.TXT create mode 100644 lib/Target/ARM/LLVMBuild.txt create mode 100644 lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h create mode 100644 lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp create mode 100644 lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h create mode 100644 lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp create mode 100644 lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp create mode 100644 lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h create mode 100644 lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp create mode 100644 lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h create mode 100644 lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp create mode 100644 lib/Target/ARM/MCTargetDesc/ARMMCExpr.cpp create mode 100644 lib/Target/ARM/MCTargetDesc/ARMMCExpr.h create mode 100644 lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp create mode 100644 lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h create mode 100644 lib/Target/ARM/MCTargetDesc/ARMMachORelocationInfo.cpp create mode 100644 lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp create mode 100644 lib/Target/ARM/MCTargetDesc/ARMUnwindOp.h create mode 100644 lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.cpp create mode 100644 lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.h create mode 100644 lib/Target/ARM/MCTargetDesc/CMakeLists.txt create mode 100644 lib/Target/ARM/MCTargetDesc/LLVMBuild.txt create mode 100644 lib/Target/ARM/MCTargetDesc/Makefile create mode 100644 lib/Target/ARM/MLxExpansionPass.cpp create mode 100644 lib/Target/ARM/Makefile create mode 100644 lib/Target/ARM/README-Thumb.txt create mode 100644 lib/Target/ARM/README-Thumb2.txt create mode 100644 lib/Target/ARM/README.txt create mode 100644 lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp create mode 100644 lib/Target/ARM/TargetInfo/CMakeLists.txt create mode 100644 lib/Target/ARM/TargetInfo/LLVMBuild.txt create mode 100644 lib/Target/ARM/TargetInfo/Makefile create mode 100644 lib/Target/ARM/Thumb1FrameLowering.cpp create mode 100644 lib/Target/ARM/Thumb1FrameLowering.h create mode 100644 lib/Target/ARM/Thumb1InstrInfo.cpp create mode 100644 lib/Target/ARM/Thumb1InstrInfo.h create mode 100644 lib/Target/ARM/Thumb1RegisterInfo.cpp create mode 100644 lib/Target/ARM/Thumb1RegisterInfo.h create mode 100644 lib/Target/ARM/Thumb2ITBlockPass.cpp create mode 100644 lib/Target/ARM/Thumb2InstrInfo.cpp create mode 100644 lib/Target/ARM/Thumb2InstrInfo.h create mode 100644 lib/Target/ARM/Thumb2RegisterInfo.cpp create mode 100644 lib/Target/ARM/Thumb2RegisterInfo.h create mode 100644 lib/Target/ARM/Thumb2SizeReduction.cpp create mode 100644 lib/Target/CMakeLists.txt create mode 100644 lib/Target/CppBackend/CMakeLists.txt create mode 100644 lib/Target/CppBackend/CPPBackend.cpp create mode 100644 lib/Target/CppBackend/CPPTargetMachine.h create mode 100644 lib/Target/CppBackend/LLVMBuild.txt create mode 100644 lib/Target/CppBackend/Makefile create mode 100644 lib/Target/CppBackend/TargetInfo/CMakeLists.txt create mode 100644 lib/Target/CppBackend/TargetInfo/CppBackendTargetInfo.cpp create mode 100644 lib/Target/CppBackend/TargetInfo/LLVMBuild.txt create mode 100644 lib/Target/CppBackend/TargetInfo/Makefile create mode 100644 lib/Target/Hexagon/CMakeLists.txt create mode 100644 lib/Target/Hexagon/Hexagon.h create mode 100644 lib/Target/Hexagon/Hexagon.td create mode 100644 lib/Target/Hexagon/HexagonAsmPrinter.cpp create mode 100644 lib/Target/Hexagon/HexagonAsmPrinter.h create mode 100644 lib/Target/Hexagon/HexagonCFGOptimizer.cpp create mode 100644 lib/Target/Hexagon/HexagonCallingConv.td create mode 100644 lib/Target/Hexagon/HexagonCallingConvLower.cpp create mode 100644 lib/Target/Hexagon/HexagonCallingConvLower.h create mode 100644 lib/Target/Hexagon/HexagonCopyToCombine.cpp create mode 100644 lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp create mode 100644 lib/Target/Hexagon/HexagonFixupHwLoops.cpp create mode 100644 lib/Target/Hexagon/HexagonFrameLowering.cpp create mode 100644 lib/Target/Hexagon/HexagonFrameLowering.h create mode 100644 lib/Target/Hexagon/HexagonHardwareLoops.cpp create mode 100644 lib/Target/Hexagon/HexagonISelDAGToDAG.cpp create mode 100644 lib/Target/Hexagon/HexagonISelLowering.cpp create mode 100644 lib/Target/Hexagon/HexagonISelLowering.h create mode 100644 lib/Target/Hexagon/HexagonInstrFormats.td create mode 100644 lib/Target/Hexagon/HexagonInstrFormatsV4.td create mode 100644 lib/Target/Hexagon/HexagonInstrInfo.cpp create mode 100644 lib/Target/Hexagon/HexagonInstrInfo.h create mode 100644 lib/Target/Hexagon/HexagonInstrInfo.td create mode 100644 lib/Target/Hexagon/HexagonInstrInfoV3.td create mode 100644 lib/Target/Hexagon/HexagonInstrInfoV4.td create mode 100644 lib/Target/Hexagon/HexagonInstrInfoV5.td create mode 100644 lib/Target/Hexagon/HexagonIntrinsics.td create mode 100644 lib/Target/Hexagon/HexagonIntrinsicsDerived.td create mode 100644 lib/Target/Hexagon/HexagonIntrinsicsV3.td create mode 100644 lib/Target/Hexagon/HexagonIntrinsicsV4.td create mode 100644 lib/Target/Hexagon/HexagonIntrinsicsV5.td create mode 100644 lib/Target/Hexagon/HexagonMCInstLower.cpp create mode 100644 lib/Target/Hexagon/HexagonMachineFunctionInfo.cpp create mode 100644 lib/Target/Hexagon/HexagonMachineFunctionInfo.h create mode 100644 lib/Target/Hexagon/HexagonMachineScheduler.cpp create mode 100644 lib/Target/Hexagon/HexagonMachineScheduler.h create mode 100644 lib/Target/Hexagon/HexagonNewValueJump.cpp create mode 100644 lib/Target/Hexagon/HexagonOperands.td create mode 100644 lib/Target/Hexagon/HexagonPeephole.cpp create mode 100644 lib/Target/Hexagon/HexagonRegisterInfo.cpp create mode 100644 lib/Target/Hexagon/HexagonRegisterInfo.h create mode 100644 lib/Target/Hexagon/HexagonRegisterInfo.td create mode 100644 lib/Target/Hexagon/HexagonRemoveSZExtArgs.cpp create mode 100644 lib/Target/Hexagon/HexagonSchedule.td create mode 100644 lib/Target/Hexagon/HexagonScheduleV4.td create mode 100644 lib/Target/Hexagon/HexagonSelectCCInfo.td create mode 100644 lib/Target/Hexagon/HexagonSelectionDAGInfo.cpp create mode 100644 lib/Target/Hexagon/HexagonSelectionDAGInfo.h create mode 100644 lib/Target/Hexagon/HexagonSplitConst32AndConst64.cpp create mode 100644 lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp create mode 100644 lib/Target/Hexagon/HexagonSubtarget.cpp create mode 100644 lib/Target/Hexagon/HexagonSubtarget.h create mode 100644 lib/Target/Hexagon/HexagonTargetMachine.cpp create mode 100644 lib/Target/Hexagon/HexagonTargetMachine.h create mode 100644 lib/Target/Hexagon/HexagonTargetObjectFile.cpp create mode 100644 lib/Target/Hexagon/HexagonTargetObjectFile.h create mode 100644 lib/Target/Hexagon/HexagonVLIWPacketizer.cpp create mode 100644 lib/Target/Hexagon/HexagonVarargsCallingConvention.h create mode 100644 lib/Target/Hexagon/InstPrinter/CMakeLists.txt create mode 100644 lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp create mode 100644 lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.h create mode 100644 lib/Target/Hexagon/InstPrinter/LLVMBuild.txt create mode 100644 lib/Target/Hexagon/InstPrinter/Makefile create mode 100644 lib/Target/Hexagon/LLVMBuild.txt create mode 100644 lib/Target/Hexagon/MCTargetDesc/CMakeLists.txt create mode 100644 lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h create mode 100644 lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp create mode 100644 lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.h create mode 100644 lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.cpp create mode 100644 lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.h create mode 100644 lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp create mode 100644 lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.h create mode 100644 lib/Target/Hexagon/MCTargetDesc/LLVMBuild.txt create mode 100644 lib/Target/Hexagon/MCTargetDesc/Makefile create mode 100644 lib/Target/Hexagon/Makefile create mode 100644 lib/Target/Hexagon/TargetInfo/CMakeLists.txt create mode 100644 lib/Target/Hexagon/TargetInfo/HexagonTargetInfo.cpp create mode 100644 lib/Target/Hexagon/TargetInfo/LLVMBuild.txt create mode 100644 lib/Target/Hexagon/TargetInfo/Makefile create mode 100644 lib/Target/LLVMBuild.txt create mode 100644 lib/Target/MSP430/CMakeLists.txt create mode 100644 lib/Target/MSP430/InstPrinter/CMakeLists.txt create mode 100644 lib/Target/MSP430/InstPrinter/LLVMBuild.txt create mode 100644 lib/Target/MSP430/InstPrinter/MSP430InstPrinter.cpp create mode 100644 lib/Target/MSP430/InstPrinter/MSP430InstPrinter.h create mode 100644 lib/Target/MSP430/InstPrinter/Makefile create mode 100644 lib/Target/MSP430/LLVMBuild.txt create mode 100644 lib/Target/MSP430/MCTargetDesc/CMakeLists.txt create mode 100644 lib/Target/MSP430/MCTargetDesc/LLVMBuild.txt create mode 100644 lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp create mode 100644 lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.h create mode 100644 lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp create mode 100644 lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.h create mode 100644 lib/Target/MSP430/MCTargetDesc/Makefile create mode 100644 lib/Target/MSP430/MSP430.h create mode 100644 lib/Target/MSP430/MSP430.td create mode 100644 lib/Target/MSP430/MSP430AsmPrinter.cpp create mode 100644 lib/Target/MSP430/MSP430BranchSelector.cpp create mode 100644 lib/Target/MSP430/MSP430CallingConv.td create mode 100644 lib/Target/MSP430/MSP430FrameLowering.cpp create mode 100644 lib/Target/MSP430/MSP430FrameLowering.h create mode 100644 lib/Target/MSP430/MSP430ISelDAGToDAG.cpp create mode 100644 lib/Target/MSP430/MSP430ISelLowering.cpp create mode 100644 lib/Target/MSP430/MSP430ISelLowering.h create mode 100644 lib/Target/MSP430/MSP430InstrFormats.td create mode 100644 lib/Target/MSP430/MSP430InstrInfo.cpp create mode 100644 lib/Target/MSP430/MSP430InstrInfo.h create mode 100644 lib/Target/MSP430/MSP430InstrInfo.td create mode 100644 lib/Target/MSP430/MSP430MCInstLower.cpp create mode 100644 lib/Target/MSP430/MSP430MCInstLower.h create mode 100644 lib/Target/MSP430/MSP430MachineFunctionInfo.cpp create mode 100644 lib/Target/MSP430/MSP430MachineFunctionInfo.h create mode 100644 lib/Target/MSP430/MSP430RegisterInfo.cpp create mode 100644 lib/Target/MSP430/MSP430RegisterInfo.h create mode 100644 lib/Target/MSP430/MSP430RegisterInfo.td create mode 100644 lib/Target/MSP430/MSP430SelectionDAGInfo.cpp create mode 100644 lib/Target/MSP430/MSP430SelectionDAGInfo.h create mode 100644 lib/Target/MSP430/MSP430Subtarget.cpp create mode 100644 lib/Target/MSP430/MSP430Subtarget.h create mode 100644 lib/Target/MSP430/MSP430TargetMachine.cpp create mode 100644 lib/Target/MSP430/MSP430TargetMachine.h create mode 100644 lib/Target/MSP430/Makefile create mode 100644 lib/Target/MSP430/README.txt create mode 100644 lib/Target/MSP430/TargetInfo/CMakeLists.txt create mode 100644 lib/Target/MSP430/TargetInfo/LLVMBuild.txt create mode 100644 lib/Target/MSP430/TargetInfo/MSP430TargetInfo.cpp create mode 100644 lib/Target/MSP430/TargetInfo/Makefile create mode 100644 lib/Target/Makefile create mode 100644 lib/Target/Mangler.cpp create mode 100644 lib/Target/Mips/AsmParser/CMakeLists.txt create mode 100644 lib/Target/Mips/AsmParser/LLVMBuild.txt create mode 100644 lib/Target/Mips/AsmParser/Makefile create mode 100644 lib/Target/Mips/AsmParser/MipsAsmParser.cpp create mode 100644 lib/Target/Mips/CMakeLists.txt create mode 100644 lib/Target/Mips/Disassembler/CMakeLists.txt create mode 100644 lib/Target/Mips/Disassembler/LLVMBuild.txt create mode 100644 lib/Target/Mips/Disassembler/Makefile create mode 100644 lib/Target/Mips/Disassembler/MipsDisassembler.cpp create mode 100644 lib/Target/Mips/InstPrinter/CMakeLists.txt create mode 100644 lib/Target/Mips/InstPrinter/LLVMBuild.txt create mode 100644 lib/Target/Mips/InstPrinter/Makefile create mode 100644 lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp create mode 100644 lib/Target/Mips/InstPrinter/MipsInstPrinter.h create mode 100644 lib/Target/Mips/LLVMBuild.txt create mode 100644 lib/Target/Mips/MCTargetDesc/CMakeLists.txt create mode 100644 lib/Target/Mips/MCTargetDesc/LLVMBuild.txt create mode 100644 lib/Target/Mips/MCTargetDesc/Makefile create mode 100644 lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp create mode 100644 lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h create mode 100644 lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp create mode 100644 lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h create mode 100644 lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp create mode 100644 lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.h create mode 100644 lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp create mode 100644 lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp create mode 100644 lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h create mode 100644 lib/Target/Mips/MCTargetDesc/MipsReginfo.cpp create mode 100644 lib/Target/Mips/MCTargetDesc/MipsReginfo.h create mode 100644 lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp create mode 100644 lib/Target/Mips/MSA.txt create mode 100644 lib/Target/Mips/Makefile create mode 100644 lib/Target/Mips/MicroMipsInstrFormats.td create mode 100644 lib/Target/Mips/MicroMipsInstrInfo.td create mode 100644 lib/Target/Mips/Mips.h create mode 100644 lib/Target/Mips/Mips.td create mode 100644 lib/Target/Mips/Mips16FrameLowering.cpp create mode 100644 lib/Target/Mips/Mips16FrameLowering.h create mode 100644 lib/Target/Mips/Mips16HardFloat.cpp create mode 100644 lib/Target/Mips/Mips16HardFloat.h create mode 100644 lib/Target/Mips/Mips16ISelDAGToDAG.cpp create mode 100644 lib/Target/Mips/Mips16ISelDAGToDAG.h create mode 100644 lib/Target/Mips/Mips16ISelLowering.cpp create mode 100644 lib/Target/Mips/Mips16ISelLowering.h create mode 100644 lib/Target/Mips/Mips16InstrFormats.td create mode 100644 lib/Target/Mips/Mips16InstrInfo.cpp create mode 100644 lib/Target/Mips/Mips16InstrInfo.h create mode 100644 lib/Target/Mips/Mips16InstrInfo.td create mode 100644 lib/Target/Mips/Mips16RegisterInfo.cpp create mode 100644 lib/Target/Mips/Mips16RegisterInfo.h create mode 100644 lib/Target/Mips/Mips64InstrInfo.td create mode 100644 lib/Target/Mips/MipsAnalyzeImmediate.cpp create mode 100644 lib/Target/Mips/MipsAnalyzeImmediate.h create mode 100644 lib/Target/Mips/MipsAsmPrinter.cpp create mode 100644 lib/Target/Mips/MipsAsmPrinter.h create mode 100644 lib/Target/Mips/MipsCallingConv.td create mode 100644 lib/Target/Mips/MipsCodeEmitter.cpp create mode 100644 lib/Target/Mips/MipsCondMov.td create mode 100644 lib/Target/Mips/MipsConstantIslandPass.cpp create mode 100644 lib/Target/Mips/MipsDSPInstrFormats.td create mode 100644 lib/Target/Mips/MipsDSPInstrInfo.td create mode 100644 lib/Target/Mips/MipsDelaySlotFiller.cpp create mode 100644 lib/Target/Mips/MipsFrameLowering.cpp create mode 100644 lib/Target/Mips/MipsFrameLowering.h create mode 100644 lib/Target/Mips/MipsISelDAGToDAG.cpp create mode 100644 lib/Target/Mips/MipsISelDAGToDAG.h create mode 100644 lib/Target/Mips/MipsISelLowering.cpp create mode 100644 lib/Target/Mips/MipsISelLowering.h create mode 100644 lib/Target/Mips/MipsInstrFPU.td create mode 100644 lib/Target/Mips/MipsInstrFormats.td create mode 100644 lib/Target/Mips/MipsInstrInfo.cpp create mode 100644 lib/Target/Mips/MipsInstrInfo.h create mode 100644 lib/Target/Mips/MipsInstrInfo.td create mode 100644 lib/Target/Mips/MipsJITInfo.cpp create mode 100644 lib/Target/Mips/MipsJITInfo.h create mode 100644 lib/Target/Mips/MipsLongBranch.cpp create mode 100644 lib/Target/Mips/MipsMCInstLower.cpp create mode 100644 lib/Target/Mips/MipsMCInstLower.h create mode 100644 lib/Target/Mips/MipsMSAInstrFormats.td create mode 100644 lib/Target/Mips/MipsMSAInstrInfo.td create mode 100644 lib/Target/Mips/MipsMachineFunction.cpp create mode 100644 lib/Target/Mips/MipsMachineFunction.h create mode 100644 lib/Target/Mips/MipsModuleISelDAGToDAG.cpp create mode 100644 lib/Target/Mips/MipsModuleISelDAGToDAG.h create mode 100644 lib/Target/Mips/MipsOs16.cpp create mode 100644 lib/Target/Mips/MipsOs16.h create mode 100644 lib/Target/Mips/MipsRegisterInfo.cpp create mode 100644 lib/Target/Mips/MipsRegisterInfo.h create mode 100644 lib/Target/Mips/MipsRegisterInfo.td create mode 100644 lib/Target/Mips/MipsRelocations.h create mode 100644 lib/Target/Mips/MipsSEFrameLowering.cpp create mode 100644 lib/Target/Mips/MipsSEFrameLowering.h create mode 100644 lib/Target/Mips/MipsSEISelDAGToDAG.cpp create mode 100644 lib/Target/Mips/MipsSEISelDAGToDAG.h create mode 100644 lib/Target/Mips/MipsSEISelLowering.cpp create mode 100644 lib/Target/Mips/MipsSEISelLowering.h create mode 100644 lib/Target/Mips/MipsSEInstrInfo.cpp create mode 100644 lib/Target/Mips/MipsSEInstrInfo.h create mode 100644 lib/Target/Mips/MipsSERegisterInfo.cpp create mode 100644 lib/Target/Mips/MipsSERegisterInfo.h create mode 100644 lib/Target/Mips/MipsSchedule.td create mode 100644 lib/Target/Mips/MipsSelectionDAGInfo.cpp create mode 100644 lib/Target/Mips/MipsSelectionDAGInfo.h create mode 100644 lib/Target/Mips/MipsSubtarget.cpp create mode 100644 lib/Target/Mips/MipsSubtarget.h create mode 100644 lib/Target/Mips/MipsTargetMachine.cpp create mode 100644 lib/Target/Mips/MipsTargetMachine.h create mode 100644 lib/Target/Mips/MipsTargetObjectFile.cpp create mode 100644 lib/Target/Mips/MipsTargetObjectFile.h create mode 100644 lib/Target/Mips/MipsTargetStreamer.h create mode 100644 lib/Target/Mips/TargetInfo/CMakeLists.txt create mode 100644 lib/Target/Mips/TargetInfo/LLVMBuild.txt create mode 100644 lib/Target/Mips/TargetInfo/Makefile create mode 100644 lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp create mode 100644 lib/Target/NVPTX/CMakeLists.txt create mode 100644 lib/Target/NVPTX/InstPrinter/CMakeLists.txt create mode 100644 lib/Target/NVPTX/InstPrinter/LLVMBuild.txt create mode 100644 lib/Target/NVPTX/InstPrinter/Makefile create mode 100644 lib/Target/NVPTX/InstPrinter/NVPTXInstPrinter.cpp create mode 100644 lib/Target/NVPTX/InstPrinter/NVPTXInstPrinter.h create mode 100644 lib/Target/NVPTX/LLVMBuild.txt create mode 100644 lib/Target/NVPTX/MCTargetDesc/CMakeLists.txt create mode 100644 lib/Target/NVPTX/MCTargetDesc/LLVMBuild.txt create mode 100644 lib/Target/NVPTX/MCTargetDesc/Makefile create mode 100644 lib/Target/NVPTX/MCTargetDesc/NVPTXBaseInfo.h create mode 100644 lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp create mode 100644 lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.h create mode 100644 lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.cpp create mode 100644 lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.h create mode 100644 lib/Target/NVPTX/Makefile create mode 100644 lib/Target/NVPTX/ManagedStringPool.h create mode 100644 lib/Target/NVPTX/NVPTX.h create mode 100644 lib/Target/NVPTX/NVPTX.td create mode 100644 lib/Target/NVPTX/NVPTXAllocaHoisting.cpp create mode 100644 lib/Target/NVPTX/NVPTXAllocaHoisting.h create mode 100644 lib/Target/NVPTX/NVPTXAsmPrinter.cpp create mode 100644 lib/Target/NVPTX/NVPTXAsmPrinter.h create mode 100644 lib/Target/NVPTX/NVPTXFrameLowering.cpp create mode 100644 lib/Target/NVPTX/NVPTXFrameLowering.h create mode 100644 lib/Target/NVPTX/NVPTXGenericToNVVM.cpp create mode 100644 lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp create mode 100644 lib/Target/NVPTX/NVPTXISelDAGToDAG.h create mode 100644 lib/Target/NVPTX/NVPTXISelLowering.cpp create mode 100644 lib/Target/NVPTX/NVPTXISelLowering.h create mode 100644 lib/Target/NVPTX/NVPTXInstrFormats.td create mode 100644 lib/Target/NVPTX/NVPTXInstrInfo.cpp create mode 100644 lib/Target/NVPTX/NVPTXInstrInfo.h create mode 100644 lib/Target/NVPTX/NVPTXInstrInfo.td create mode 100644 lib/Target/NVPTX/NVPTXIntrinsics.td create mode 100644 lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp create mode 100644 lib/Target/NVPTX/NVPTXLowerAggrCopies.h create mode 100644 lib/Target/NVPTX/NVPTXMCExpr.cpp create mode 100644 lib/Target/NVPTX/NVPTXMCExpr.h create mode 100644 lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp create mode 100644 lib/Target/NVPTX/NVPTXRegisterInfo.cpp create mode 100644 lib/Target/NVPTX/NVPTXRegisterInfo.h create mode 100644 lib/Target/NVPTX/NVPTXRegisterInfo.td create mode 100644 lib/Target/NVPTX/NVPTXSection.h create mode 100644 lib/Target/NVPTX/NVPTXSplitBBatBar.cpp create mode 100644 lib/Target/NVPTX/NVPTXSplitBBatBar.h create mode 100644 lib/Target/NVPTX/NVPTXSubtarget.cpp create mode 100644 lib/Target/NVPTX/NVPTXSubtarget.h create mode 100644 lib/Target/NVPTX/NVPTXTargetMachine.cpp create mode 100644 lib/Target/NVPTX/NVPTXTargetMachine.h create mode 100644 lib/Target/NVPTX/NVPTXTargetObjectFile.h create mode 100644 lib/Target/NVPTX/NVPTXUtilities.cpp create mode 100644 lib/Target/NVPTX/NVPTXUtilities.h create mode 100644 lib/Target/NVPTX/NVPTXVector.td create mode 100644 lib/Target/NVPTX/NVPTXutil.cpp create mode 100644 lib/Target/NVPTX/NVPTXutil.h create mode 100644 lib/Target/NVPTX/NVVMReflect.cpp create mode 100644 lib/Target/NVPTX/TargetInfo/CMakeLists.txt create mode 100644 lib/Target/NVPTX/TargetInfo/LLVMBuild.txt create mode 100644 lib/Target/NVPTX/TargetInfo/Makefile create mode 100644 lib/Target/NVPTX/TargetInfo/NVPTXTargetInfo.cpp create mode 100644 lib/Target/NVPTX/cl_common_defines.h create mode 100644 lib/Target/PowerPC/AsmParser/CMakeLists.txt create mode 100644 lib/Target/PowerPC/AsmParser/LLVMBuild.txt create mode 100644 lib/Target/PowerPC/AsmParser/Makefile create mode 100644 lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp create mode 100644 lib/Target/PowerPC/CMakeLists.txt create mode 100644 lib/Target/PowerPC/InstPrinter/CMakeLists.txt create mode 100644 lib/Target/PowerPC/InstPrinter/LLVMBuild.txt create mode 100644 lib/Target/PowerPC/InstPrinter/Makefile create mode 100644 lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp create mode 100644 lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h create mode 100644 lib/Target/PowerPC/LLVMBuild.txt create mode 100644 lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt create mode 100644 lib/Target/PowerPC/MCTargetDesc/LLVMBuild.txt create mode 100644 lib/Target/PowerPC/MCTargetDesc/Makefile create mode 100644 lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp create mode 100644 lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp create mode 100644 lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h create mode 100644 lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp create mode 100644 lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h create mode 100644 lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp create mode 100644 lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp create mode 100644 lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.h create mode 100644 lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp create mode 100644 lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h create mode 100644 lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp create mode 100644 lib/Target/PowerPC/MCTargetDesc/PPCPredicates.cpp create mode 100644 lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h create mode 100644 lib/Target/PowerPC/Makefile create mode 100644 lib/Target/PowerPC/PPC.h create mode 100644 lib/Target/PowerPC/PPC.td create mode 100644 lib/Target/PowerPC/PPCAsmPrinter.cpp create mode 100644 lib/Target/PowerPC/PPCBranchSelector.cpp create mode 100644 lib/Target/PowerPC/PPCCTRLoops.cpp create mode 100644 lib/Target/PowerPC/PPCCallingConv.td create mode 100644 lib/Target/PowerPC/PPCCodeEmitter.cpp create mode 100644 lib/Target/PowerPC/PPCFastISel.cpp create mode 100644 lib/Target/PowerPC/PPCFrameLowering.cpp create mode 100644 lib/Target/PowerPC/PPCFrameLowering.h create mode 100644 lib/Target/PowerPC/PPCHazardRecognizers.cpp create mode 100644 lib/Target/PowerPC/PPCHazardRecognizers.h create mode 100644 lib/Target/PowerPC/PPCISelDAGToDAG.cpp create mode 100644 lib/Target/PowerPC/PPCISelLowering.cpp create mode 100644 lib/Target/PowerPC/PPCISelLowering.h create mode 100644 lib/Target/PowerPC/PPCInstr64Bit.td create mode 100644 lib/Target/PowerPC/PPCInstrAltivec.td create mode 100644 lib/Target/PowerPC/PPCInstrBuilder.h create mode 100644 lib/Target/PowerPC/PPCInstrFormats.td create mode 100644 lib/Target/PowerPC/PPCInstrInfo.cpp create mode 100644 lib/Target/PowerPC/PPCInstrInfo.h create mode 100644 lib/Target/PowerPC/PPCInstrInfo.td create mode 100644 lib/Target/PowerPC/PPCJITInfo.cpp create mode 100644 lib/Target/PowerPC/PPCJITInfo.h create mode 100644 lib/Target/PowerPC/PPCMCInstLower.cpp create mode 100644 lib/Target/PowerPC/PPCMachineFunctionInfo.cpp create mode 100644 lib/Target/PowerPC/PPCMachineFunctionInfo.h create mode 100644 lib/Target/PowerPC/PPCPerfectShuffle.h create mode 100644 lib/Target/PowerPC/PPCRegisterInfo.cpp create mode 100644 lib/Target/PowerPC/PPCRegisterInfo.h create mode 100644 lib/Target/PowerPC/PPCRegisterInfo.td create mode 100644 lib/Target/PowerPC/PPCRelocations.h create mode 100644 lib/Target/PowerPC/PPCSchedule.td create mode 100644 lib/Target/PowerPC/PPCSchedule440.td create mode 100644 lib/Target/PowerPC/PPCScheduleA2.td create mode 100644 lib/Target/PowerPC/PPCScheduleE500mc.td create mode 100644 lib/Target/PowerPC/PPCScheduleE5500.td create mode 100644 lib/Target/PowerPC/PPCScheduleG3.td create mode 100644 lib/Target/PowerPC/PPCScheduleG4.td create mode 100644 lib/Target/PowerPC/PPCScheduleG4Plus.td create mode 100644 lib/Target/PowerPC/PPCScheduleG5.td create mode 100644 lib/Target/PowerPC/PPCSelectionDAGInfo.cpp create mode 100644 lib/Target/PowerPC/PPCSelectionDAGInfo.h create mode 100644 lib/Target/PowerPC/PPCSubtarget.cpp create mode 100644 lib/Target/PowerPC/PPCSubtarget.h create mode 100644 lib/Target/PowerPC/PPCTargetMachine.cpp create mode 100644 lib/Target/PowerPC/PPCTargetMachine.h create mode 100644 lib/Target/PowerPC/PPCTargetObjectFile.cpp create mode 100644 lib/Target/PowerPC/PPCTargetObjectFile.h create mode 100644 lib/Target/PowerPC/PPCTargetStreamer.h create mode 100644 lib/Target/PowerPC/PPCTargetTransformInfo.cpp create mode 100644 lib/Target/PowerPC/README.txt create mode 100644 lib/Target/PowerPC/README_ALTIVEC.txt create mode 100644 lib/Target/PowerPC/TargetInfo/CMakeLists.txt create mode 100644 lib/Target/PowerPC/TargetInfo/LLVMBuild.txt create mode 100644 lib/Target/PowerPC/TargetInfo/Makefile create mode 100644 lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp create mode 100644 lib/Target/R600/AMDGPU.h create mode 100644 lib/Target/R600/AMDGPU.td create mode 100644 lib/Target/R600/AMDGPUAsmPrinter.cpp create mode 100644 lib/Target/R600/AMDGPUAsmPrinter.h create mode 100644 lib/Target/R600/AMDGPUCallingConv.td create mode 100644 lib/Target/R600/AMDGPUConvertToISA.cpp create mode 100644 lib/Target/R600/AMDGPUFrameLowering.cpp create mode 100644 lib/Target/R600/AMDGPUFrameLowering.h create mode 100644 lib/Target/R600/AMDGPUISelDAGToDAG.cpp create mode 100644 lib/Target/R600/AMDGPUISelLowering.cpp create mode 100644 lib/Target/R600/AMDGPUISelLowering.h create mode 100644 lib/Target/R600/AMDGPUInstrInfo.cpp create mode 100644 lib/Target/R600/AMDGPUInstrInfo.h create mode 100644 lib/Target/R600/AMDGPUInstrInfo.td create mode 100644 lib/Target/R600/AMDGPUInstructions.td create mode 100644 lib/Target/R600/AMDGPUIntrinsics.td create mode 100644 lib/Target/R600/AMDGPUMCInstLower.cpp create mode 100644 lib/Target/R600/AMDGPUMCInstLower.h create mode 100644 lib/Target/R600/AMDGPUMachineFunction.cpp create mode 100644 lib/Target/R600/AMDGPUMachineFunction.h create mode 100644 lib/Target/R600/AMDGPURegisterInfo.cpp create mode 100644 lib/Target/R600/AMDGPURegisterInfo.h create mode 100644 lib/Target/R600/AMDGPURegisterInfo.td create mode 100644 lib/Target/R600/AMDGPUSubtarget.cpp create mode 100644 lib/Target/R600/AMDGPUSubtarget.h create mode 100644 lib/Target/R600/AMDGPUTargetMachine.cpp create mode 100644 lib/Target/R600/AMDGPUTargetMachine.h create mode 100644 lib/Target/R600/AMDGPUTargetTransformInfo.cpp create mode 100644 lib/Target/R600/AMDILBase.td create mode 100644 lib/Target/R600/AMDILCFGStructurizer.cpp create mode 100644 lib/Target/R600/AMDILISelLowering.cpp create mode 100644 lib/Target/R600/AMDILInstrInfo.td create mode 100644 lib/Target/R600/AMDILIntrinsicInfo.cpp create mode 100644 lib/Target/R600/AMDILIntrinsicInfo.h create mode 100644 lib/Target/R600/AMDILIntrinsics.td create mode 100644 lib/Target/R600/AMDILRegisterInfo.td create mode 100644 lib/Target/R600/CMakeLists.txt create mode 100644 lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp create mode 100644 lib/Target/R600/InstPrinter/AMDGPUInstPrinter.h create mode 100644 lib/Target/R600/InstPrinter/CMakeLists.txt create mode 100644 lib/Target/R600/InstPrinter/LLVMBuild.txt create mode 100644 lib/Target/R600/InstPrinter/Makefile create mode 100644 lib/Target/R600/LLVMBuild.txt create mode 100644 lib/Target/R600/MCTargetDesc/AMDGPUAsmBackend.cpp create mode 100644 lib/Target/R600/MCTargetDesc/AMDGPUELFObjectWriter.cpp create mode 100644 lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp create mode 100644 lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.h create mode 100644 lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.cpp create mode 100644 lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.h create mode 100644 lib/Target/R600/MCTargetDesc/AMDGPUMCTargetDesc.cpp create mode 100644 lib/Target/R600/MCTargetDesc/AMDGPUMCTargetDesc.h create mode 100644 lib/Target/R600/MCTargetDesc/CMakeLists.txt create mode 100644 lib/Target/R600/MCTargetDesc/LLVMBuild.txt create mode 100644 lib/Target/R600/MCTargetDesc/Makefile create mode 100644 lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp create mode 100644 lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp create mode 100644 lib/Target/R600/Makefile create mode 100644 lib/Target/R600/Processors.td create mode 100644 lib/Target/R600/R600ClauseMergePass.cpp create mode 100644 lib/Target/R600/R600ControlFlowFinalizer.cpp create mode 100644 lib/Target/R600/R600Defines.h create mode 100644 lib/Target/R600/R600EmitClauseMarkers.cpp create mode 100644 lib/Target/R600/R600ExpandSpecialInstrs.cpp create mode 100644 lib/Target/R600/R600ISelLowering.cpp create mode 100644 lib/Target/R600/R600ISelLowering.h create mode 100644 lib/Target/R600/R600InstrFormats.td create mode 100644 lib/Target/R600/R600InstrInfo.cpp create mode 100644 lib/Target/R600/R600InstrInfo.h create mode 100644 lib/Target/R600/R600Instructions.td create mode 100644 lib/Target/R600/R600Intrinsics.td create mode 100644 lib/Target/R600/R600MachineFunctionInfo.cpp create mode 100644 lib/Target/R600/R600MachineFunctionInfo.h create mode 100644 lib/Target/R600/R600MachineScheduler.cpp create mode 100644 lib/Target/R600/R600MachineScheduler.h create mode 100644 lib/Target/R600/R600OptimizeVectorRegisters.cpp create mode 100644 lib/Target/R600/R600Packetizer.cpp create mode 100644 lib/Target/R600/R600RegisterInfo.cpp create mode 100644 lib/Target/R600/R600RegisterInfo.h create mode 100644 lib/Target/R600/R600RegisterInfo.td create mode 100644 lib/Target/R600/R600Schedule.td create mode 100644 lib/Target/R600/R600TextureIntrinsicsReplacer.cpp create mode 100644 lib/Target/R600/SIAnnotateControlFlow.cpp create mode 100644 lib/Target/R600/SIDefines.h create mode 100644 lib/Target/R600/SIFixSGPRCopies.cpp create mode 100644 lib/Target/R600/SIISelLowering.cpp create mode 100644 lib/Target/R600/SIISelLowering.h create mode 100644 lib/Target/R600/SIInsertWaits.cpp create mode 100644 lib/Target/R600/SIInstrFormats.td create mode 100644 lib/Target/R600/SIInstrInfo.cpp create mode 100644 lib/Target/R600/SIInstrInfo.h create mode 100644 lib/Target/R600/SIInstrInfo.td create mode 100644 lib/Target/R600/SIInstructions.td create mode 100644 lib/Target/R600/SIIntrinsics.td create mode 100644 lib/Target/R600/SILowerControlFlow.cpp create mode 100644 lib/Target/R600/SIMachineFunctionInfo.cpp create mode 100644 lib/Target/R600/SIMachineFunctionInfo.h create mode 100644 lib/Target/R600/SIRegisterInfo.cpp create mode 100644 lib/Target/R600/SIRegisterInfo.h create mode 100644 lib/Target/R600/SIRegisterInfo.td create mode 100644 lib/Target/R600/SISchedule.td create mode 100644 lib/Target/R600/SITypeRewriter.cpp create mode 100644 lib/Target/R600/TargetInfo/AMDGPUTargetInfo.cpp create mode 100644 lib/Target/R600/TargetInfo/CMakeLists.txt create mode 100644 lib/Target/R600/TargetInfo/LLVMBuild.txt create mode 100644 lib/Target/R600/TargetInfo/Makefile create mode 100644 lib/Target/README.txt create mode 100644 lib/Target/Sparc/CMakeLists.txt create mode 100644 lib/Target/Sparc/DelaySlotFiller.cpp create mode 100644 lib/Target/Sparc/LLVMBuild.txt create mode 100644 lib/Target/Sparc/MCTargetDesc/CMakeLists.txt create mode 100644 lib/Target/Sparc/MCTargetDesc/LLVMBuild.txt create mode 100644 lib/Target/Sparc/MCTargetDesc/Makefile create mode 100644 lib/Target/Sparc/MCTargetDesc/SparcBaseInfo.h create mode 100644 lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp create mode 100644 lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h create mode 100644 lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp create mode 100644 lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.h create mode 100644 lib/Target/Sparc/Makefile create mode 100644 lib/Target/Sparc/README.txt create mode 100644 lib/Target/Sparc/Sparc.h create mode 100644 lib/Target/Sparc/Sparc.td create mode 100644 lib/Target/Sparc/SparcAsmPrinter.cpp create mode 100644 lib/Target/Sparc/SparcCallingConv.td create mode 100644 lib/Target/Sparc/SparcCodeEmitter.cpp create mode 100644 lib/Target/Sparc/SparcFrameLowering.cpp create mode 100644 lib/Target/Sparc/SparcFrameLowering.h create mode 100644 lib/Target/Sparc/SparcISelDAGToDAG.cpp create mode 100644 lib/Target/Sparc/SparcISelLowering.cpp create mode 100644 lib/Target/Sparc/SparcISelLowering.h create mode 100644 lib/Target/Sparc/SparcInstr64Bit.td create mode 100644 lib/Target/Sparc/SparcInstrFormats.td create mode 100644 lib/Target/Sparc/SparcInstrInfo.cpp create mode 100644 lib/Target/Sparc/SparcInstrInfo.h create mode 100644 lib/Target/Sparc/SparcInstrInfo.td create mode 100644 lib/Target/Sparc/SparcJITInfo.cpp create mode 100644 lib/Target/Sparc/SparcJITInfo.h create mode 100644 lib/Target/Sparc/SparcMachineFunctionInfo.cpp create mode 100644 lib/Target/Sparc/SparcMachineFunctionInfo.h create mode 100644 lib/Target/Sparc/SparcRegisterInfo.cpp create mode 100644 lib/Target/Sparc/SparcRegisterInfo.h create mode 100644 lib/Target/Sparc/SparcRegisterInfo.td create mode 100644 lib/Target/Sparc/SparcRelocations.h create mode 100644 lib/Target/Sparc/SparcSelectionDAGInfo.cpp create mode 100644 lib/Target/Sparc/SparcSelectionDAGInfo.h create mode 100644 lib/Target/Sparc/SparcSubtarget.cpp create mode 100644 lib/Target/Sparc/SparcSubtarget.h create mode 100644 lib/Target/Sparc/SparcTargetMachine.cpp create mode 100644 lib/Target/Sparc/SparcTargetMachine.h create mode 100644 lib/Target/Sparc/TargetInfo/CMakeLists.txt create mode 100644 lib/Target/Sparc/TargetInfo/LLVMBuild.txt create mode 100644 lib/Target/Sparc/TargetInfo/Makefile create mode 100644 lib/Target/Sparc/TargetInfo/SparcTargetInfo.cpp create mode 100644 lib/Target/SystemZ/AsmParser/CMakeLists.txt create mode 100644 lib/Target/SystemZ/AsmParser/LLVMBuild.txt create mode 100644 lib/Target/SystemZ/AsmParser/Makefile create mode 100644 lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp create mode 100644 lib/Target/SystemZ/CMakeLists.txt create mode 100644 lib/Target/SystemZ/Disassembler/CMakeLists.txt create mode 100644 lib/Target/SystemZ/Disassembler/LLVMBuild.txt create mode 100644 lib/Target/SystemZ/Disassembler/Makefile create mode 100644 lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp create mode 100644 lib/Target/SystemZ/InstPrinter/CMakeLists.txt create mode 100644 lib/Target/SystemZ/InstPrinter/LLVMBuild.txt create mode 100644 lib/Target/SystemZ/InstPrinter/Makefile create mode 100644 lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.cpp create mode 100644 lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.h create mode 100644 lib/Target/SystemZ/LLVMBuild.txt create mode 100644 lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt create mode 100644 lib/Target/SystemZ/MCTargetDesc/LLVMBuild.txt create mode 100644 lib/Target/SystemZ/MCTargetDesc/Makefile create mode 100644 lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp create mode 100644 lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp create mode 100644 lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h create mode 100644 lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp create mode 100644 lib/Target/SystemZ/MCTargetDesc/SystemZMCFixups.h create mode 100644 lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp create mode 100644 lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp create mode 100644 lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.h create mode 100644 lib/Target/SystemZ/Makefile create mode 100644 lib/Target/SystemZ/README.txt create mode 100644 lib/Target/SystemZ/SystemZ.h create mode 100644 lib/Target/SystemZ/SystemZ.td create mode 100644 lib/Target/SystemZ/SystemZAsmPrinter.cpp create mode 100644 lib/Target/SystemZ/SystemZAsmPrinter.h create mode 100644 lib/Target/SystemZ/SystemZCallingConv.cpp create mode 100644 lib/Target/SystemZ/SystemZCallingConv.h create mode 100644 lib/Target/SystemZ/SystemZCallingConv.td create mode 100644 lib/Target/SystemZ/SystemZConstantPoolValue.cpp create mode 100644 lib/Target/SystemZ/SystemZConstantPoolValue.h create mode 100644 lib/Target/SystemZ/SystemZElimCompare.cpp create mode 100644 lib/Target/SystemZ/SystemZFrameLowering.cpp create mode 100644 lib/Target/SystemZ/SystemZFrameLowering.h create mode 100644 lib/Target/SystemZ/SystemZISelDAGToDAG.cpp create mode 100644 lib/Target/SystemZ/SystemZISelLowering.cpp create mode 100644 lib/Target/SystemZ/SystemZISelLowering.h create mode 100644 lib/Target/SystemZ/SystemZInstrBuilder.h create mode 100644 lib/Target/SystemZ/SystemZInstrFP.td create mode 100644 lib/Target/SystemZ/SystemZInstrFormats.td create mode 100644 lib/Target/SystemZ/SystemZInstrInfo.cpp create mode 100644 lib/Target/SystemZ/SystemZInstrInfo.h create mode 100644 lib/Target/SystemZ/SystemZInstrInfo.td create mode 100644 lib/Target/SystemZ/SystemZLongBranch.cpp create mode 100644 lib/Target/SystemZ/SystemZMCInstLower.cpp create mode 100644 lib/Target/SystemZ/SystemZMCInstLower.h create mode 100644 lib/Target/SystemZ/SystemZMachineFunctionInfo.cpp create mode 100644 lib/Target/SystemZ/SystemZMachineFunctionInfo.h create mode 100644 lib/Target/SystemZ/SystemZOperands.td create mode 100644 lib/Target/SystemZ/SystemZOperators.td create mode 100644 lib/Target/SystemZ/SystemZPatterns.td create mode 100644 lib/Target/SystemZ/SystemZProcessors.td create mode 100644 lib/Target/SystemZ/SystemZRegisterInfo.cpp create mode 100644 lib/Target/SystemZ/SystemZRegisterInfo.h create mode 100644 lib/Target/SystemZ/SystemZRegisterInfo.td create mode 100644 lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp create mode 100644 lib/Target/SystemZ/SystemZSelectionDAGInfo.h create mode 100644 lib/Target/SystemZ/SystemZShortenInst.cpp create mode 100644 lib/Target/SystemZ/SystemZSubtarget.cpp create mode 100644 lib/Target/SystemZ/SystemZSubtarget.h create mode 100644 lib/Target/SystemZ/SystemZTargetMachine.cpp create mode 100644 lib/Target/SystemZ/SystemZTargetMachine.h create mode 100644 lib/Target/SystemZ/TargetInfo/CMakeLists.txt create mode 100644 lib/Target/SystemZ/TargetInfo/LLVMBuild.txt create mode 100644 lib/Target/SystemZ/TargetInfo/Makefile create mode 100644 lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.cpp create mode 100644 lib/Target/Target.cpp create mode 100644 lib/Target/TargetIntrinsicInfo.cpp create mode 100644 lib/Target/TargetJITInfo.cpp create mode 100644 lib/Target/TargetLibraryInfo.cpp create mode 100644 lib/Target/TargetLoweringObjectFile.cpp create mode 100644 lib/Target/TargetMachine.cpp create mode 100644 lib/Target/TargetMachineC.cpp create mode 100644 lib/Target/TargetSubtargetInfo.cpp create mode 100644 lib/Target/X86/AsmParser/CMakeLists.txt create mode 100644 lib/Target/X86/AsmParser/LLVMBuild.txt create mode 100644 lib/Target/X86/AsmParser/Makefile create mode 100644 lib/Target/X86/AsmParser/X86AsmParser.cpp create mode 100644 lib/Target/X86/CMakeLists.txt create mode 100644 lib/Target/X86/Disassembler/CMakeLists.txt create mode 100644 lib/Target/X86/Disassembler/LLVMBuild.txt create mode 100644 lib/Target/X86/Disassembler/Makefile create mode 100644 lib/Target/X86/Disassembler/X86Disassembler.cpp create mode 100644 lib/Target/X86/Disassembler/X86Disassembler.h create mode 100644 lib/Target/X86/Disassembler/X86DisassemblerDecoder.c create mode 100644 lib/Target/X86/Disassembler/X86DisassemblerDecoder.h create mode 100644 lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h create mode 100644 lib/Target/X86/InstPrinter/CMakeLists.txt create mode 100644 lib/Target/X86/InstPrinter/LLVMBuild.txt create mode 100644 lib/Target/X86/InstPrinter/Makefile create mode 100644 lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp create mode 100644 lib/Target/X86/InstPrinter/X86ATTInstPrinter.h create mode 100644 lib/Target/X86/InstPrinter/X86InstComments.cpp create mode 100644 lib/Target/X86/InstPrinter/X86InstComments.h create mode 100644 lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp create mode 100644 lib/Target/X86/InstPrinter/X86IntelInstPrinter.h create mode 100644 lib/Target/X86/LLVMBuild.txt create mode 100644 lib/Target/X86/MCTargetDesc/CMakeLists.txt create mode 100644 lib/Target/X86/MCTargetDesc/LLVMBuild.txt create mode 100644 lib/Target/X86/MCTargetDesc/Makefile create mode 100644 lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp create mode 100644 lib/Target/X86/MCTargetDesc/X86BaseInfo.h create mode 100644 lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp create mode 100644 lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp create mode 100644 lib/Target/X86/MCTargetDesc/X86FixupKinds.h create mode 100644 lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp create mode 100644 lib/Target/X86/MCTargetDesc/X86MCAsmInfo.h create mode 100644 lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp create mode 100644 lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp create mode 100644 lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h create mode 100644 lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp create mode 100644 lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp create mode 100644 lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp create mode 100644 lib/Target/X86/Makefile create mode 100644 lib/Target/X86/README-FPStack.txt create mode 100644 lib/Target/X86/README-MMX.txt create mode 100644 lib/Target/X86/README-SSE.txt create mode 100644 lib/Target/X86/README-UNIMPLEMENTED.txt create mode 100644 lib/Target/X86/README-X86-64.txt create mode 100644 lib/Target/X86/README.txt create mode 100644 lib/Target/X86/TargetInfo/CMakeLists.txt create mode 100644 lib/Target/X86/TargetInfo/LLVMBuild.txt create mode 100644 lib/Target/X86/TargetInfo/Makefile create mode 100644 lib/Target/X86/TargetInfo/X86TargetInfo.cpp create mode 100644 lib/Target/X86/Utils/CMakeLists.txt create mode 100644 lib/Target/X86/Utils/LLVMBuild.txt create mode 100644 lib/Target/X86/Utils/Makefile create mode 100644 lib/Target/X86/Utils/X86ShuffleDecode.cpp create mode 100644 lib/Target/X86/Utils/X86ShuffleDecode.h create mode 100644 lib/Target/X86/X86.h create mode 100644 lib/Target/X86/X86.td create mode 100644 lib/Target/X86/X86AsmPrinter.cpp create mode 100644 lib/Target/X86/X86AsmPrinter.h create mode 100644 lib/Target/X86/X86COFFMachineModuleInfo.cpp create mode 100644 lib/Target/X86/X86COFFMachineModuleInfo.h create mode 100644 lib/Target/X86/X86CallingConv.h create mode 100644 lib/Target/X86/X86CallingConv.td create mode 100644 lib/Target/X86/X86CodeEmitter.cpp create mode 100644 lib/Target/X86/X86CompilationCallback_Win64.asm create mode 100644 lib/Target/X86/X86FastISel.cpp create mode 100644 lib/Target/X86/X86FixupLEAs.cpp create mode 100644 lib/Target/X86/X86FloatingPoint.cpp create mode 100644 lib/Target/X86/X86FrameLowering.cpp create mode 100644 lib/Target/X86/X86FrameLowering.h create mode 100644 lib/Target/X86/X86ISelDAGToDAG.cpp create mode 100644 lib/Target/X86/X86ISelLowering.cpp create mode 100644 lib/Target/X86/X86ISelLowering.h create mode 100644 lib/Target/X86/X86Instr3DNow.td create mode 100644 lib/Target/X86/X86InstrAVX512.td create mode 100644 lib/Target/X86/X86InstrArithmetic.td create mode 100644 lib/Target/X86/X86InstrBuilder.h create mode 100644 lib/Target/X86/X86InstrCMovSetCC.td create mode 100644 lib/Target/X86/X86InstrCompiler.td create mode 100644 lib/Target/X86/X86InstrControl.td create mode 100644 lib/Target/X86/X86InstrExtension.td create mode 100644 lib/Target/X86/X86InstrFMA.td create mode 100644 lib/Target/X86/X86InstrFPStack.td create mode 100644 lib/Target/X86/X86InstrFormats.td create mode 100644 lib/Target/X86/X86InstrFragmentsSIMD.td create mode 100644 lib/Target/X86/X86InstrInfo.cpp create mode 100644 lib/Target/X86/X86InstrInfo.h create mode 100644 lib/Target/X86/X86InstrInfo.td create mode 100644 lib/Target/X86/X86InstrMMX.td create mode 100644 lib/Target/X86/X86InstrSSE.td create mode 100644 lib/Target/X86/X86InstrSVM.td create mode 100644 lib/Target/X86/X86InstrShiftRotate.td create mode 100644 lib/Target/X86/X86InstrSystem.td create mode 100644 lib/Target/X86/X86InstrTSX.td create mode 100644 lib/Target/X86/X86InstrVMX.td create mode 100644 lib/Target/X86/X86InstrXOP.td create mode 100644 lib/Target/X86/X86JITInfo.cpp create mode 100644 lib/Target/X86/X86JITInfo.h create mode 100644 lib/Target/X86/X86MCInstLower.cpp create mode 100644 lib/Target/X86/X86MachineFunctionInfo.cpp create mode 100644 lib/Target/X86/X86MachineFunctionInfo.h create mode 100644 lib/Target/X86/X86PadShortFunction.cpp create mode 100644 lib/Target/X86/X86RegisterInfo.cpp create mode 100644 lib/Target/X86/X86RegisterInfo.h create mode 100644 lib/Target/X86/X86RegisterInfo.td create mode 100644 lib/Target/X86/X86Relocations.h create mode 100644 lib/Target/X86/X86SchedHaswell.td create mode 100644 lib/Target/X86/X86SchedSandyBridge.td create mode 100644 lib/Target/X86/X86Schedule.td create mode 100644 lib/Target/X86/X86ScheduleAtom.td create mode 100644 lib/Target/X86/X86ScheduleSLM.td create mode 100644 lib/Target/X86/X86SelectionDAGInfo.cpp create mode 100644 lib/Target/X86/X86SelectionDAGInfo.h create mode 100644 lib/Target/X86/X86Subtarget.cpp create mode 100644 lib/Target/X86/X86Subtarget.h create mode 100644 lib/Target/X86/X86TargetMachine.cpp create mode 100644 lib/Target/X86/X86TargetMachine.h create mode 100644 lib/Target/X86/X86TargetObjectFile.cpp create mode 100644 lib/Target/X86/X86TargetObjectFile.h create mode 100644 lib/Target/X86/X86TargetTransformInfo.cpp create mode 100644 lib/Target/X86/X86VZeroUpper.cpp create mode 100644 lib/Target/XCore/CMakeLists.txt create mode 100644 lib/Target/XCore/Disassembler/CMakeLists.txt create mode 100644 lib/Target/XCore/Disassembler/LLVMBuild.txt create mode 100644 lib/Target/XCore/Disassembler/Makefile create mode 100644 lib/Target/XCore/Disassembler/XCoreDisassembler.cpp create mode 100644 lib/Target/XCore/InstPrinter/CMakeLists.txt create mode 100644 lib/Target/XCore/InstPrinter/LLVMBuild.txt create mode 100644 lib/Target/XCore/InstPrinter/Makefile create mode 100644 lib/Target/XCore/InstPrinter/XCoreInstPrinter.cpp create mode 100644 lib/Target/XCore/InstPrinter/XCoreInstPrinter.h create mode 100644 lib/Target/XCore/LLVMBuild.txt create mode 100644 lib/Target/XCore/MCTargetDesc/CMakeLists.txt create mode 100644 lib/Target/XCore/MCTargetDesc/LLVMBuild.txt create mode 100644 lib/Target/XCore/MCTargetDesc/Makefile create mode 100644 lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp create mode 100644 lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.h create mode 100644 lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp create mode 100644 lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.h create mode 100644 lib/Target/XCore/Makefile create mode 100644 lib/Target/XCore/README.txt create mode 100644 lib/Target/XCore/TargetInfo/CMakeLists.txt create mode 100644 lib/Target/XCore/TargetInfo/LLVMBuild.txt create mode 100644 lib/Target/XCore/TargetInfo/Makefile create mode 100644 lib/Target/XCore/TargetInfo/XCoreTargetInfo.cpp create mode 100644 lib/Target/XCore/XCore.h create mode 100644 lib/Target/XCore/XCore.td create mode 100644 lib/Target/XCore/XCoreAsmPrinter.cpp create mode 100644 lib/Target/XCore/XCoreCallingConv.td create mode 100644 lib/Target/XCore/XCoreFrameLowering.cpp create mode 100644 lib/Target/XCore/XCoreFrameLowering.h create mode 100644 lib/Target/XCore/XCoreISelDAGToDAG.cpp create mode 100644 lib/Target/XCore/XCoreISelLowering.cpp create mode 100644 lib/Target/XCore/XCoreISelLowering.h create mode 100644 lib/Target/XCore/XCoreInstrFormats.td create mode 100644 lib/Target/XCore/XCoreInstrInfo.cpp create mode 100644 lib/Target/XCore/XCoreInstrInfo.h create mode 100644 lib/Target/XCore/XCoreInstrInfo.td create mode 100644 lib/Target/XCore/XCoreLowerThreadLocal.cpp create mode 100644 lib/Target/XCore/XCoreMCInstLower.cpp create mode 100644 lib/Target/XCore/XCoreMCInstLower.h create mode 100644 lib/Target/XCore/XCoreMachineFunctionInfo.cpp create mode 100644 lib/Target/XCore/XCoreMachineFunctionInfo.h create mode 100644 lib/Target/XCore/XCoreRegisterInfo.cpp create mode 100644 lib/Target/XCore/XCoreRegisterInfo.h create mode 100644 lib/Target/XCore/XCoreRegisterInfo.td create mode 100644 lib/Target/XCore/XCoreSelectionDAGInfo.cpp create mode 100644 lib/Target/XCore/XCoreSelectionDAGInfo.h create mode 100644 lib/Target/XCore/XCoreSubtarget.cpp create mode 100644 lib/Target/XCore/XCoreSubtarget.h create mode 100644 lib/Target/XCore/XCoreTargetMachine.cpp create mode 100644 lib/Target/XCore/XCoreTargetMachine.h create mode 100644 lib/Target/XCore/XCoreTargetObjectFile.cpp create mode 100644 lib/Target/XCore/XCoreTargetObjectFile.h create mode 100644 lib/Target/XCore/XCoreTargetTransformInfo.cpp create mode 100644 lib/Transforms/CMakeLists.txt create mode 100644 lib/Transforms/Hello/CMakeLists.txt create mode 100644 lib/Transforms/Hello/Hello.cpp create mode 100644 lib/Transforms/Hello/Hello.exports create mode 100644 lib/Transforms/Hello/Makefile create mode 100644 lib/Transforms/IPO/ArgumentPromotion.cpp create mode 100644 lib/Transforms/IPO/BarrierNoopPass.cpp create mode 100644 lib/Transforms/IPO/CMakeLists.txt create mode 100644 lib/Transforms/IPO/ConstantMerge.cpp create mode 100644 lib/Transforms/IPO/DeadArgumentElimination.cpp create mode 100644 lib/Transforms/IPO/ExtractGV.cpp create mode 100644 lib/Transforms/IPO/FunctionAttrs.cpp create mode 100644 lib/Transforms/IPO/GlobalDCE.cpp create mode 100644 lib/Transforms/IPO/GlobalOpt.cpp create mode 100644 lib/Transforms/IPO/IPConstantPropagation.cpp create mode 100644 lib/Transforms/IPO/IPO.cpp create mode 100644 lib/Transforms/IPO/InlineAlways.cpp create mode 100644 lib/Transforms/IPO/InlineSimple.cpp create mode 100644 lib/Transforms/IPO/Inliner.cpp create mode 100644 lib/Transforms/IPO/Internalize.cpp create mode 100644 lib/Transforms/IPO/LLVMBuild.txt create mode 100644 lib/Transforms/IPO/LoopExtractor.cpp create mode 100644 lib/Transforms/IPO/Makefile create mode 100644 lib/Transforms/IPO/MergeFunctions.cpp create mode 100644 lib/Transforms/IPO/PartialInlining.cpp create mode 100644 lib/Transforms/IPO/PassManagerBuilder.cpp create mode 100644 lib/Transforms/IPO/PruneEH.cpp create mode 100644 lib/Transforms/IPO/StripDeadPrototypes.cpp create mode 100644 lib/Transforms/IPO/StripSymbols.cpp create mode 100644 lib/Transforms/InstCombine/CMakeLists.txt create mode 100644 lib/Transforms/InstCombine/InstCombine.h create mode 100644 lib/Transforms/InstCombine/InstCombineAddSub.cpp create mode 100644 lib/Transforms/InstCombine/InstCombineAndOrXor.cpp create mode 100644 lib/Transforms/InstCombine/InstCombineCalls.cpp create mode 100644 lib/Transforms/InstCombine/InstCombineCasts.cpp create mode 100644 lib/Transforms/InstCombine/InstCombineCompares.cpp create mode 100644 lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp create mode 100644 lib/Transforms/InstCombine/InstCombineMulDivRem.cpp create mode 100644 lib/Transforms/InstCombine/InstCombinePHI.cpp create mode 100644 lib/Transforms/InstCombine/InstCombineSelect.cpp create mode 100644 lib/Transforms/InstCombine/InstCombineShifts.cpp create mode 100644 lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp create mode 100644 lib/Transforms/InstCombine/InstCombineVectorOps.cpp create mode 100644 lib/Transforms/InstCombine/InstCombineWorklist.h create mode 100644 lib/Transforms/InstCombine/InstructionCombining.cpp create mode 100644 lib/Transforms/InstCombine/LLVMBuild.txt create mode 100644 lib/Transforms/InstCombine/Makefile create mode 100644 lib/Transforms/Instrumentation/AddressSanitizer.cpp create mode 100644 lib/Transforms/Instrumentation/BoundsChecking.cpp create mode 100644 lib/Transforms/Instrumentation/CMakeLists.txt create mode 100644 lib/Transforms/Instrumentation/DataFlowSanitizer.cpp create mode 100644 lib/Transforms/Instrumentation/DebugIR.cpp create mode 100644 lib/Transforms/Instrumentation/DebugIR.h create mode 100644 lib/Transforms/Instrumentation/GCOVProfiling.cpp create mode 100644 lib/Transforms/Instrumentation/Instrumentation.cpp create mode 100644 lib/Transforms/Instrumentation/LLVMBuild.txt create mode 100644 lib/Transforms/Instrumentation/Makefile create mode 100644 lib/Transforms/Instrumentation/MaximumSpanningTree.h create mode 100644 lib/Transforms/Instrumentation/MemorySanitizer.cpp create mode 100644 lib/Transforms/Instrumentation/ThreadSanitizer.cpp create mode 100644 lib/Transforms/LLVMBuild.txt create mode 100644 lib/Transforms/Makefile create mode 100644 lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h create mode 100644 lib/Transforms/ObjCARC/CMakeLists.txt create mode 100644 lib/Transforms/ObjCARC/DependencyAnalysis.cpp create mode 100644 lib/Transforms/ObjCARC/DependencyAnalysis.h create mode 100644 lib/Transforms/ObjCARC/LLVMBuild.txt create mode 100644 lib/Transforms/ObjCARC/Makefile create mode 100644 lib/Transforms/ObjCARC/ObjCARC.cpp create mode 100644 lib/Transforms/ObjCARC/ObjCARC.h create mode 100644 lib/Transforms/ObjCARC/ObjCARCAPElim.cpp create mode 100644 lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp create mode 100644 lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.h create mode 100644 lib/Transforms/ObjCARC/ObjCARCContract.cpp create mode 100644 lib/Transforms/ObjCARC/ObjCARCExpand.cpp create mode 100644 lib/Transforms/ObjCARC/ObjCARCOpts.cpp create mode 100644 lib/Transforms/ObjCARC/ObjCARCUtil.cpp create mode 100644 lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp create mode 100644 lib/Transforms/ObjCARC/ProvenanceAnalysis.h create mode 100644 lib/Transforms/Scalar/ADCE.cpp create mode 100644 lib/Transforms/Scalar/CMakeLists.txt create mode 100644 lib/Transforms/Scalar/CodeGenPrepare.cpp create mode 100644 lib/Transforms/Scalar/ConstantProp.cpp create mode 100644 lib/Transforms/Scalar/CorrelatedValuePropagation.cpp create mode 100644 lib/Transforms/Scalar/DCE.cpp create mode 100644 lib/Transforms/Scalar/DeadStoreElimination.cpp create mode 100644 lib/Transforms/Scalar/EarlyCSE.cpp create mode 100644 lib/Transforms/Scalar/FlattenCFGPass.cpp create mode 100644 lib/Transforms/Scalar/GVN.cpp create mode 100644 lib/Transforms/Scalar/GlobalMerge.cpp create mode 100644 lib/Transforms/Scalar/IndVarSimplify.cpp create mode 100644 lib/Transforms/Scalar/JumpThreading.cpp create mode 100644 lib/Transforms/Scalar/LICM.cpp create mode 100644 lib/Transforms/Scalar/LLVMBuild.txt create mode 100644 lib/Transforms/Scalar/LoopDeletion.cpp create mode 100644 lib/Transforms/Scalar/LoopIdiomRecognize.cpp create mode 100644 lib/Transforms/Scalar/LoopInstSimplify.cpp create mode 100644 lib/Transforms/Scalar/LoopRerollPass.cpp create mode 100644 lib/Transforms/Scalar/LoopRotation.cpp create mode 100644 lib/Transforms/Scalar/LoopStrengthReduce.cpp create mode 100644 lib/Transforms/Scalar/LoopUnrollPass.cpp create mode 100644 lib/Transforms/Scalar/LoopUnswitch.cpp create mode 100644 lib/Transforms/Scalar/LowerAtomic.cpp create mode 100644 lib/Transforms/Scalar/Makefile create mode 100644 lib/Transforms/Scalar/MemCpyOptimizer.cpp create mode 100644 lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp create mode 100644 lib/Transforms/Scalar/Reassociate.cpp create mode 100644 lib/Transforms/Scalar/Reg2Mem.cpp create mode 100644 lib/Transforms/Scalar/SCCP.cpp create mode 100644 lib/Transforms/Scalar/SROA.cpp create mode 100644 lib/Transforms/Scalar/SampleProfile.cpp create mode 100644 lib/Transforms/Scalar/Scalar.cpp create mode 100644 lib/Transforms/Scalar/ScalarReplAggregates.cpp create mode 100644 lib/Transforms/Scalar/SimplifyCFGPass.cpp create mode 100644 lib/Transforms/Scalar/Sink.cpp create mode 100644 lib/Transforms/Scalar/StructurizeCFG.cpp create mode 100644 lib/Transforms/Scalar/TailRecursionElimination.cpp create mode 100644 lib/Transforms/Utils/BasicBlockUtils.cpp create mode 100644 lib/Transforms/Utils/BreakCriticalEdges.cpp create mode 100644 lib/Transforms/Utils/BuildLibCalls.cpp create mode 100644 lib/Transforms/Utils/BypassSlowDivision.cpp create mode 100644 lib/Transforms/Utils/CMakeLists.txt create mode 100644 lib/Transforms/Utils/CloneFunction.cpp create mode 100644 lib/Transforms/Utils/CloneModule.cpp create mode 100644 lib/Transforms/Utils/CmpInstAnalysis.cpp create mode 100644 lib/Transforms/Utils/CodeExtractor.cpp create mode 100644 lib/Transforms/Utils/DemoteRegToStack.cpp create mode 100644 lib/Transforms/Utils/FlattenCFG.cpp create mode 100644 lib/Transforms/Utils/GlobalStatus.cpp create mode 100644 lib/Transforms/Utils/InlineFunction.cpp create mode 100644 lib/Transforms/Utils/InstructionNamer.cpp create mode 100644 lib/Transforms/Utils/IntegerDivision.cpp create mode 100644 lib/Transforms/Utils/LCSSA.cpp create mode 100644 lib/Transforms/Utils/LLVMBuild.txt create mode 100644 lib/Transforms/Utils/Local.cpp create mode 100644 lib/Transforms/Utils/LoopSimplify.cpp create mode 100644 lib/Transforms/Utils/LoopUnroll.cpp create mode 100644 lib/Transforms/Utils/LoopUnrollRuntime.cpp create mode 100644 lib/Transforms/Utils/LowerExpectIntrinsic.cpp create mode 100644 lib/Transforms/Utils/LowerInvoke.cpp create mode 100644 lib/Transforms/Utils/LowerSwitch.cpp create mode 100644 lib/Transforms/Utils/Makefile create mode 100644 lib/Transforms/Utils/Mem2Reg.cpp create mode 100644 lib/Transforms/Utils/MetaRenamer.cpp create mode 100644 lib/Transforms/Utils/ModuleUtils.cpp create mode 100644 lib/Transforms/Utils/PromoteMemoryToRegister.cpp create mode 100644 lib/Transforms/Utils/SSAUpdater.cpp create mode 100644 lib/Transforms/Utils/SimplifyCFG.cpp create mode 100644 lib/Transforms/Utils/SimplifyIndVar.cpp create mode 100644 lib/Transforms/Utils/SimplifyInstructions.cpp create mode 100644 lib/Transforms/Utils/SimplifyLibCalls.cpp create mode 100644 lib/Transforms/Utils/SpecialCaseList.cpp create mode 100644 lib/Transforms/Utils/UnifyFunctionExitNodes.cpp create mode 100644 lib/Transforms/Utils/Utils.cpp create mode 100644 lib/Transforms/Utils/ValueMapper.cpp create mode 100644 lib/Transforms/Vectorize/BBVectorize.cpp create mode 100644 lib/Transforms/Vectorize/CMakeLists.txt create mode 100644 lib/Transforms/Vectorize/LLVMBuild.txt create mode 100644 lib/Transforms/Vectorize/LoopVectorize.cpp create mode 100644 lib/Transforms/Vectorize/Makefile create mode 100644 lib/Transforms/Vectorize/SLPVectorizer.cpp create mode 100644 lib/Transforms/Vectorize/Vectorize.cpp create mode 100644 llvm.spec.in create mode 100644 projects/CMakeLists.txt create mode 100644 projects/Makefile create mode 100644 projects/sample/Makefile create mode 100644 projects/sample/Makefile.common.in create mode 100644 projects/sample/Makefile.llvm.config.in create mode 100644 projects/sample/Makefile.llvm.rules create mode 100755 projects/sample/autoconf/AutoRegen.sh create mode 100644 projects/sample/autoconf/ExportMap.map create mode 100644 projects/sample/autoconf/LICENSE.TXT create mode 100755 projects/sample/autoconf/config.guess create mode 100755 projects/sample/autoconf/config.sub create mode 100644 projects/sample/autoconf/configure.ac create mode 100755 projects/sample/autoconf/install-sh create mode 100644 projects/sample/autoconf/ltmain.sh create mode 100644 projects/sample/autoconf/m4/build_exeext.m4 create mode 100644 projects/sample/autoconf/m4/c_printf_a.m4 create mode 100644 projects/sample/autoconf/m4/check_gnu_make.m4 create mode 100644 projects/sample/autoconf/m4/config_makefile.m4 create mode 100644 projects/sample/autoconf/m4/config_project.m4 create mode 100644 projects/sample/autoconf/m4/cxx_flag_check.m4 create mode 100644 projects/sample/autoconf/m4/find_std_program.m4 create mode 100644 projects/sample/autoconf/m4/func_isinf.m4 create mode 100644 projects/sample/autoconf/m4/func_isnan.m4 create mode 100644 projects/sample/autoconf/m4/func_mmap_file.m4 create mode 100644 projects/sample/autoconf/m4/header_mmap_anonymous.m4 create mode 100644 projects/sample/autoconf/m4/huge_val.m4 create mode 100644 projects/sample/autoconf/m4/libtool.m4 create mode 100644 projects/sample/autoconf/m4/link_options.m4 create mode 100644 projects/sample/autoconf/m4/linux_mixed_64_32.m4 create mode 100644 projects/sample/autoconf/m4/ltdl.m4 create mode 100644 projects/sample/autoconf/m4/need_dev_zero_for_mmap.m4 create mode 100644 projects/sample/autoconf/m4/path_tclsh.m4 create mode 100644 projects/sample/autoconf/m4/rand48.m4 create mode 100644 projects/sample/autoconf/m4/sanity_check.m4 create mode 100644 projects/sample/autoconf/m4/single_cxx_check.m4 create mode 100644 projects/sample/autoconf/m4/visibility_inlines_hidden.m4 create mode 100755 projects/sample/autoconf/mkinstalldirs create mode 100755 projects/sample/configure create mode 100644 projects/sample/docs/index.html create mode 100644 projects/sample/include/sample.h create mode 100644 projects/sample/lib/Makefile create mode 100644 projects/sample/lib/sample/Makefile create mode 100644 projects/sample/lib/sample/sample.c create mode 100644 projects/sample/tools/Makefile create mode 100644 projects/sample/tools/sample/Makefile create mode 100644 projects/sample/tools/sample/main.c create mode 100644 test/.clang-format create mode 100644 test/Analysis/BasicAA/2003-02-26-AccessSizeTest.ll create mode 100644 test/Analysis/BasicAA/2003-03-04-GEPCrash.ll create mode 100644 test/Analysis/BasicAA/2003-04-22-GEPProblem.ll create mode 100644 test/Analysis/BasicAA/2003-04-25-GEPCrash.ll create mode 100644 test/Analysis/BasicAA/2003-05-21-GEP-Problem.ll create mode 100644 test/Analysis/BasicAA/2003-06-01-AliasCrash.ll create mode 100644 test/Analysis/BasicAA/2003-07-03-BasicAACrash.ll create mode 100644 test/Analysis/BasicAA/2003-09-19-LocalArgument.ll create mode 100644 test/Analysis/BasicAA/2003-11-04-SimpleCases.ll create mode 100644 test/Analysis/BasicAA/2003-12-11-ConstExprGEP.ll create mode 100644 test/Analysis/BasicAA/2004-07-28-MustAliasbug.ll create mode 100644 test/Analysis/BasicAA/2006-03-03-BadArraySubscript.ll create mode 100644 test/Analysis/BasicAA/2006-11-03-BasicAAVectorCrash.ll create mode 100644 test/Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll create mode 100644 test/Analysis/BasicAA/2007-08-01-NoAliasAndCalls.ll create mode 100644 test/Analysis/BasicAA/2007-08-01-NoAliasAndGEP.ll create mode 100644 test/Analysis/BasicAA/2007-08-05-GetOverloadedModRef.ll create mode 100644 test/Analysis/BasicAA/2007-10-24-ArgumentsGlobals.ll create mode 100644 test/Analysis/BasicAA/2007-11-05-SizeCrash.ll create mode 100644 test/Analysis/BasicAA/2007-12-08-OutOfBoundsCrash.ll create mode 100644 test/Analysis/BasicAA/2008-04-15-Byval.ll create mode 100644 test/Analysis/BasicAA/2008-06-02-GEPTailCrash.ll create mode 100644 test/Analysis/BasicAA/2008-11-23-NoaliasRet.ll create mode 100644 test/Analysis/BasicAA/2009-03-04-GEPNoalias.ll create mode 100644 test/Analysis/BasicAA/2009-10-13-AtomicModRef.ll create mode 100644 test/Analysis/BasicAA/2009-10-13-GEP-BaseNoAlias.ll create mode 100644 test/Analysis/BasicAA/2010-09-15-GEP-SignedArithmetic.ll create mode 100644 test/Analysis/BasicAA/aligned-overread.ll create mode 100644 test/Analysis/BasicAA/args-rets-allocas-loads.ll create mode 100644 test/Analysis/BasicAA/byval.ll create mode 100644 test/Analysis/BasicAA/cas.ll create mode 100644 test/Analysis/BasicAA/constant-over-index.ll create mode 100644 test/Analysis/BasicAA/dag.ll create mode 100644 test/Analysis/BasicAA/empty.ll create mode 100644 test/Analysis/BasicAA/featuretest.ll create mode 100644 test/Analysis/BasicAA/full-store-partial-alias.ll create mode 100644 test/Analysis/BasicAA/gcsetest.ll create mode 100644 test/Analysis/BasicAA/gep-alias.ll create mode 100644 test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll create mode 100644 test/Analysis/BasicAA/global-size.ll create mode 100644 test/Analysis/BasicAA/intrinsics.ll create mode 100644 test/Analysis/BasicAA/invariant_load.ll create mode 100644 test/Analysis/BasicAA/memset_pattern.ll create mode 100644 test/Analysis/BasicAA/modref.ll create mode 100644 test/Analysis/BasicAA/must-and-partial.ll create mode 100644 test/Analysis/BasicAA/no-escape-call.ll create mode 100644 test/Analysis/BasicAA/noalias-bugs.ll create mode 100644 test/Analysis/BasicAA/noalias-geps.ll create mode 100644 test/Analysis/BasicAA/noalias-param.ll create mode 100644 test/Analysis/BasicAA/nocapture.ll create mode 100644 test/Analysis/BasicAA/phi-aa.ll create mode 100644 test/Analysis/BasicAA/phi-and-select.ll create mode 100644 test/Analysis/BasicAA/phi-spec-order.ll create mode 100644 test/Analysis/BasicAA/phi-speculation.ll create mode 100644 test/Analysis/BasicAA/pure-const-dce.ll create mode 100644 test/Analysis/BasicAA/store-promote.ll create mode 100644 test/Analysis/BasicAA/tailcall-modref.ll create mode 100644 test/Analysis/BasicAA/underlying-value.ll create mode 100644 test/Analysis/BasicAA/unreachable-block.ll create mode 100644 test/Analysis/BlockFrequencyInfo/basic.ll create mode 100644 test/Analysis/BranchProbabilityInfo/basic.ll create mode 100644 test/Analysis/BranchProbabilityInfo/loop.ll create mode 100644 test/Analysis/BranchProbabilityInfo/noreturn.ll create mode 100644 test/Analysis/CallGraph/2008-09-09-DirectCall.ll create mode 100644 test/Analysis/CallGraph/2008-09-09-UsedByGlobal.ll create mode 100644 test/Analysis/CallGraph/do-nothing-intrinsic.ll create mode 100644 test/Analysis/CallGraph/no-intrinsics.ll create mode 100644 test/Analysis/CostModel/ARM/cast.ll create mode 100644 test/Analysis/CostModel/ARM/divrem.ll create mode 100644 test/Analysis/CostModel/ARM/gep.ll create mode 100644 test/Analysis/CostModel/ARM/insertelement.ll create mode 100644 test/Analysis/CostModel/ARM/lit.local.cfg create mode 100644 test/Analysis/CostModel/ARM/select.ll create mode 100644 test/Analysis/CostModel/ARM/shuffle.ll create mode 100644 test/Analysis/CostModel/PowerPC/insert_extract.ll create mode 100644 test/Analysis/CostModel/PowerPC/lit.local.cfg create mode 100644 test/Analysis/CostModel/PowerPC/load_store.ll create mode 100644 test/Analysis/CostModel/X86/arith.ll create mode 100644 test/Analysis/CostModel/X86/cast.ll create mode 100644 test/Analysis/CostModel/X86/cmp.ll create mode 100644 test/Analysis/CostModel/X86/div.ll create mode 100644 test/Analysis/CostModel/X86/gep.ll create mode 100644 test/Analysis/CostModel/X86/i32.ll create mode 100644 test/Analysis/CostModel/X86/insert-extract-at-zero.ll create mode 100644 test/Analysis/CostModel/X86/intrinsic-cost.ll create mode 100644 test/Analysis/CostModel/X86/lit.local.cfg create mode 100644 test/Analysis/CostModel/X86/load_store.ll create mode 100644 test/Analysis/CostModel/X86/loop_v2.ll create mode 100644 test/Analysis/CostModel/X86/reduction.ll create mode 100644 test/Analysis/CostModel/X86/sitofp.ll create mode 100644 test/Analysis/CostModel/X86/testshiftashr.ll create mode 100644 test/Analysis/CostModel/X86/testshiftlshr.ll create mode 100644 test/Analysis/CostModel/X86/testshiftshl.ll create mode 100644 test/Analysis/CostModel/X86/tiny.ll create mode 100644 test/Analysis/CostModel/X86/uitofp.ll create mode 100644 test/Analysis/CostModel/X86/vectorized-loop.ll create mode 100644 test/Analysis/CostModel/no_info.ll create mode 100644 test/Analysis/Delinearization/a.ll create mode 100644 test/Analysis/Delinearization/himeno_1.ll create mode 100644 test/Analysis/Delinearization/himeno_2.ll create mode 100644 test/Analysis/Delinearization/lit.local.cfg create mode 100644 test/Analysis/Delinearization/multidim_ivs_and_integer_offsets_3d.ll create mode 100644 test/Analysis/Delinearization/multidim_ivs_and_integer_offsets_nts_3d.ll create mode 100644 test/Analysis/Delinearization/multidim_ivs_and_parameteric_offsets_3d.ll create mode 100644 test/Analysis/Delinearization/multidim_only_ivs_2d.ll create mode 100644 test/Analysis/Delinearization/multidim_only_ivs_2d_nested.ll create mode 100644 test/Analysis/Delinearization/multidim_only_ivs_3d.ll create mode 100644 test/Analysis/Delinearization/multidim_only_ivs_3d_cast.ll create mode 100644 test/Analysis/DependenceAnalysis/Banerjee.ll create mode 100644 test/Analysis/DependenceAnalysis/Coupled.ll create mode 100644 test/Analysis/DependenceAnalysis/ExactRDIV.ll create mode 100644 test/Analysis/DependenceAnalysis/ExactSIV.ll create mode 100644 test/Analysis/DependenceAnalysis/GCD.ll create mode 100644 test/Analysis/DependenceAnalysis/Invariant.ll create mode 100644 test/Analysis/DependenceAnalysis/Preliminary.ll create mode 100644 test/Analysis/DependenceAnalysis/Propagating.ll create mode 100644 test/Analysis/DependenceAnalysis/Separability.ll create mode 100644 test/Analysis/DependenceAnalysis/StrongSIV.ll create mode 100644 test/Analysis/DependenceAnalysis/SymbolicRDIV.ll create mode 100644 test/Analysis/DependenceAnalysis/SymbolicSIV.ll create mode 100644 test/Analysis/DependenceAnalysis/WeakCrossingSIV.ll create mode 100644 test/Analysis/DependenceAnalysis/WeakZeroDstSIV.ll create mode 100644 test/Analysis/DependenceAnalysis/WeakZeroSrcSIV.ll create mode 100644 test/Analysis/DependenceAnalysis/ZIV.ll create mode 100644 test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll create mode 100644 test/Analysis/Dominators/2007-01-14-BreakCritEdges.ll create mode 100644 test/Analysis/Dominators/2007-07-11-SplitBlock.ll create mode 100644 test/Analysis/Dominators/2007-07-12-SplitBlock.ll create mode 100644 test/Analysis/Dominators/invoke.ll create mode 100644 test/Analysis/GlobalsModRef/2008-09-03-ReadGlobals.ll create mode 100644 test/Analysis/GlobalsModRef/aliastest.ll create mode 100644 test/Analysis/GlobalsModRef/chaining-analysis.ll create mode 100644 test/Analysis/GlobalsModRef/indirect-global.ll create mode 100644 test/Analysis/GlobalsModRef/modreftest.ll create mode 100644 test/Analysis/GlobalsModRef/pr12351.ll create mode 100644 test/Analysis/GlobalsModRef/purecse.ll create mode 100644 test/Analysis/GlobalsModRef/volatile-instrs.ll create mode 100644 test/Analysis/Lint/check-zero-divide.ll create mode 100644 test/Analysis/Lint/lit.local.cfg create mode 100644 test/Analysis/LoopInfo/2003-05-15-NestingProblem.ll create mode 100644 test/Analysis/MemoryDependenceAnalysis/memdep_requires_dominator_tree.ll create mode 100644 test/Analysis/PostDominators/pr1098.ll create mode 100644 test/Analysis/PostDominators/pr6047_a.ll create mode 100644 test/Analysis/PostDominators/pr6047_b.ll create mode 100644 test/Analysis/PostDominators/pr6047_c.ll create mode 100644 test/Analysis/PostDominators/pr6047_d.ll create mode 100644 test/Analysis/RegionInfo/20100809_bb_not_in_domtree.ll create mode 100644 test/Analysis/RegionInfo/block_sort.ll create mode 100644 test/Analysis/RegionInfo/cond_loop.ll create mode 100644 test/Analysis/RegionInfo/condition_complicated.ll create mode 100644 test/Analysis/RegionInfo/condition_complicated_2.ll create mode 100644 test/Analysis/RegionInfo/condition_forward_edge.ll create mode 100644 test/Analysis/RegionInfo/condition_same_exit.ll create mode 100644 test/Analysis/RegionInfo/condition_simple.ll create mode 100644 test/Analysis/RegionInfo/exit_in_condition.ll create mode 100644 test/Analysis/RegionInfo/infinite_loop.ll create mode 100644 test/Analysis/RegionInfo/infinite_loop_2.ll create mode 100644 test/Analysis/RegionInfo/infinite_loop_3.ll create mode 100644 test/Analysis/RegionInfo/infinite_loop_4.ll create mode 100644 test/Analysis/RegionInfo/loop_with_condition.ll create mode 100644 test/Analysis/RegionInfo/loops_1.ll create mode 100644 test/Analysis/RegionInfo/loops_2.ll create mode 100644 test/Analysis/RegionInfo/mix_1.ll create mode 100644 test/Analysis/RegionInfo/multiple_exiting_edge.ll create mode 100644 test/Analysis/RegionInfo/nested_loops.ll create mode 100644 test/Analysis/RegionInfo/next.ll create mode 100644 test/Analysis/RegionInfo/paper.ll create mode 100644 test/Analysis/RegionInfo/two_loops_same_header.ll create mode 100644 test/Analysis/RegionInfo/unreachable_bb.ll create mode 100644 test/Analysis/ScalarEvolution/2007-07-15-NegativeStride.ll create mode 100644 test/Analysis/ScalarEvolution/2007-08-06-MisinterpretBranch.ll create mode 100644 test/Analysis/ScalarEvolution/2007-08-06-Unsigned.ll create mode 100644 test/Analysis/ScalarEvolution/2007-09-27-LargeStepping.ll create mode 100644 test/Analysis/ScalarEvolution/2007-11-14-SignedAddRec.ll create mode 100644 test/Analysis/ScalarEvolution/2007-11-18-OrInstruction.ll create mode 100644 test/Analysis/ScalarEvolution/2008-02-11-ReversedCondition.ll create mode 100644 test/Analysis/ScalarEvolution/2008-02-12-SMAXTripCount.ll create mode 100644 test/Analysis/ScalarEvolution/2008-02-15-UMax.ll create mode 100644 test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll create mode 100644 test/Analysis/ScalarEvolution/2008-06-12-BinomialInt64.ll create mode 100644 test/Analysis/ScalarEvolution/2008-07-12-UnneededSelect1.ll create mode 100644 test/Analysis/ScalarEvolution/2008-07-12-UnneededSelect2.ll create mode 100644 test/Analysis/ScalarEvolution/2008-07-19-InfiniteLoop.ll create mode 100644 test/Analysis/ScalarEvolution/2008-07-19-WrappingIV.ll create mode 100644 test/Analysis/ScalarEvolution/2008-07-29-SGTTripCount.ll create mode 100644 test/Analysis/ScalarEvolution/2008-07-29-SMinExpr.ll create mode 100644 test/Analysis/ScalarEvolution/2008-08-04-IVOverflow.ll create mode 100644 test/Analysis/ScalarEvolution/2008-08-04-LongAddRec.ll create mode 100644 test/Analysis/ScalarEvolution/2008-11-02-QuadraticCrash.ll create mode 100644 test/Analysis/ScalarEvolution/2008-11-15-CubicOOM.ll create mode 100644 test/Analysis/ScalarEvolution/2008-11-18-LessThanOrEqual.ll create mode 100644 test/Analysis/ScalarEvolution/2008-11-18-Stride1.ll create mode 100644 test/Analysis/ScalarEvolution/2008-11-18-Stride2.ll create mode 100644 test/Analysis/ScalarEvolution/2008-12-08-FiniteSGE.ll create mode 100644 test/Analysis/ScalarEvolution/2008-12-11-SMaxOverflow.ll create mode 100644 test/Analysis/ScalarEvolution/2008-12-14-StrideAndSigned.ll create mode 100644 test/Analysis/ScalarEvolution/2008-12-15-DontUseSDiv.ll create mode 100644 test/Analysis/ScalarEvolution/2009-01-02-SignedNegativeStride.ll create mode 100644 test/Analysis/ScalarEvolution/2009-04-22-TruncCast.ll create mode 100644 test/Analysis/ScalarEvolution/2009-05-09-PointerEdgeCount.ll create mode 100644 test/Analysis/ScalarEvolution/2009-07-04-GroupConstantsWidthMismatch.ll create mode 100644 test/Analysis/ScalarEvolution/2010-09-03-RequiredTransitive.ll create mode 100644 test/Analysis/ScalarEvolution/2011-03-09-ExactNoMaxBECount.ll create mode 100644 test/Analysis/ScalarEvolution/2011-04-26-FoldAddRec.ll create mode 100644 test/Analysis/ScalarEvolution/2011-10-04-ConstEvolve.ll create mode 100644 test/Analysis/ScalarEvolution/2012-03-26-LoadConstant.ll create mode 100644 test/Analysis/ScalarEvolution/2012-05-18-LoopPredRecurse.ll create mode 100644 test/Analysis/ScalarEvolution/2012-05-29-MulAddRec.ll create mode 100644 test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll create mode 100644 test/Analysis/ScalarEvolution/and-xor.ll create mode 100644 test/Analysis/ScalarEvolution/avoid-infinite-recursion-0.ll create mode 100644 test/Analysis/ScalarEvolution/avoid-infinite-recursion-1.ll create mode 100644 test/Analysis/ScalarEvolution/avoid-smax-0.ll create mode 100644 test/Analysis/ScalarEvolution/avoid-smax-1.ll create mode 100644 test/Analysis/ScalarEvolution/div-overflow.ll create mode 100644 test/Analysis/ScalarEvolution/do-loop.ll create mode 100644 test/Analysis/ScalarEvolution/fold.ll create mode 100644 test/Analysis/ScalarEvolution/how-far-to-zero.ll create mode 100644 test/Analysis/ScalarEvolution/load.ll create mode 100644 test/Analysis/ScalarEvolution/max-trip-count-address-space.ll create mode 100644 test/Analysis/ScalarEvolution/max-trip-count.ll create mode 100644 test/Analysis/ScalarEvolution/nsw-offset.ll create mode 100644 test/Analysis/ScalarEvolution/nsw.ll create mode 100644 test/Analysis/ScalarEvolution/pointer-sign-bits.ll create mode 100644 test/Analysis/ScalarEvolution/pr3909.ll create mode 100644 test/Analysis/ScalarEvolution/scev-aa.ll create mode 100644 test/Analysis/ScalarEvolution/scev-invalid.ll create mode 100644 test/Analysis/ScalarEvolution/sext-inreg.ll create mode 100644 test/Analysis/ScalarEvolution/sext-iv-0.ll create mode 100644 test/Analysis/ScalarEvolution/sext-iv-1.ll create mode 100644 test/Analysis/ScalarEvolution/sext-iv-2.ll create mode 100644 test/Analysis/ScalarEvolution/sle.ll create mode 100644 test/Analysis/ScalarEvolution/smax.ll create mode 100644 test/Analysis/ScalarEvolution/trip-count.ll create mode 100644 test/Analysis/ScalarEvolution/trip-count10.ll create mode 100644 test/Analysis/ScalarEvolution/trip-count11.ll create mode 100644 test/Analysis/ScalarEvolution/trip-count12.ll create mode 100644 test/Analysis/ScalarEvolution/trip-count2.ll create mode 100644 test/Analysis/ScalarEvolution/trip-count3.ll create mode 100644 test/Analysis/ScalarEvolution/trip-count4.ll create mode 100644 test/Analysis/ScalarEvolution/trip-count5.ll create mode 100644 test/Analysis/ScalarEvolution/trip-count6.ll create mode 100644 test/Analysis/ScalarEvolution/trip-count7.ll create mode 100644 test/Analysis/ScalarEvolution/trip-count8.ll create mode 100644 test/Analysis/ScalarEvolution/trip-count9.ll create mode 100644 test/Analysis/ScalarEvolution/undefined.ll create mode 100644 test/Analysis/ScalarEvolution/unreachable-code.ll create mode 100644 test/Analysis/ScalarEvolution/unsimplified-loop.ll create mode 100644 test/Analysis/ScalarEvolution/xor-and.ll create mode 100644 test/Analysis/ScalarEvolution/zext-signed-addrec.ll create mode 100644 test/Analysis/ScalarEvolution/zext-wrap.ll create mode 100644 test/Analysis/TypeBasedAliasAnalysis/PR17620.ll create mode 100644 test/Analysis/TypeBasedAliasAnalysis/aliastest.ll create mode 100644 test/Analysis/TypeBasedAliasAnalysis/argument-promotion.ll create mode 100644 test/Analysis/TypeBasedAliasAnalysis/dse.ll create mode 100644 test/Analysis/TypeBasedAliasAnalysis/dynamic-indices.ll create mode 100644 test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll create mode 100644 test/Analysis/TypeBasedAliasAnalysis/gvn-nonlocal-type-mismatch.ll create mode 100644 test/Analysis/TypeBasedAliasAnalysis/intrinsics.ll create mode 100644 test/Analysis/TypeBasedAliasAnalysis/licm.ll create mode 100644 test/Analysis/TypeBasedAliasAnalysis/memcpyopt.ll create mode 100644 test/Analysis/TypeBasedAliasAnalysis/placement-tbaa.ll create mode 100644 test/Analysis/TypeBasedAliasAnalysis/precedence.ll create mode 100644 test/Analysis/TypeBasedAliasAnalysis/sink.ll create mode 100644 test/Analysis/TypeBasedAliasAnalysis/tbaa-path.ll create mode 100644 test/Assembler/2002-03-08-NameCollision.ll create mode 100644 test/Assembler/2002-03-08-NameCollision2.ll create mode 100644 test/Assembler/2002-04-07-HexFloatConstants.ll create mode 100644 test/Assembler/2002-04-07-InfConstant.ll create mode 100644 test/Assembler/2002-04-29-NameBinding.ll create mode 100644 test/Assembler/2002-05-02-InvalidForwardRef.ll create mode 100644 test/Assembler/2002-07-14-OpaqueType.ll create mode 100644 test/Assembler/2002-07-25-QuoteInString.ll create mode 100644 test/Assembler/2002-07-25-ReturnPtrFunction.ll create mode 100644 test/Assembler/2002-07-31-SlashInString.ll create mode 100644 test/Assembler/2002-08-15-CastAmbiguity.ll create mode 100644 test/Assembler/2002-08-15-ConstantExprProblem.ll create mode 100644 test/Assembler/2002-08-15-UnresolvedGlobalReference.ll create mode 100644 test/Assembler/2002-08-16-ConstExprInlined.ll create mode 100644 test/Assembler/2002-08-19-BytecodeReader.ll create mode 100644 test/Assembler/2002-08-22-DominanceProblem.ll create mode 100644 test/Assembler/2002-10-08-LargeArrayPerformance.ll create mode 100644 test/Assembler/2002-10-13-ConstantEncodingProblem.ll create mode 100644 test/Assembler/2002-12-15-GlobalResolve.ll create mode 100644 test/Assembler/2003-01-30-UnsignedString.ll create mode 100644 test/Assembler/2003-04-15-ConstantInitAssertion.ll create mode 100644 test/Assembler/2003-04-25-UnresolvedGlobalReference.ll create mode 100644 test/Assembler/2003-05-03-BytecodeReaderProblem.ll create mode 100644 test/Assembler/2003-05-12-MinIntProblem.ll create mode 100644 test/Assembler/2003-05-15-AssemblerProblem.ll create mode 100644 test/Assembler/2003-05-15-SwitchBug.ll create mode 100644 test/Assembler/2003-05-21-ConstantShiftExpr.ll create mode 100644 test/Assembler/2003-05-21-EmptyStructTest.ll create mode 100644 test/Assembler/2003-05-21-MalformedShiftCrash.ll create mode 100644 test/Assembler/2003-05-21-MalformedStructCrash.ll create mode 100644 test/Assembler/2003-08-20-ConstantExprGEP-Fold.ll create mode 100644 test/Assembler/2003-08-21-ConstantExprCast-Fold.ll create mode 100644 test/Assembler/2003-11-05-ConstantExprShift.ll create mode 100644 test/Assembler/2003-11-11-ImplicitRename.ll create mode 100644 test/Assembler/2003-11-12-ConstantExprCast.ll create mode 100644 test/Assembler/2003-11-24-SymbolTableCrash.ll create mode 100644 test/Assembler/2004-01-11-getelementptrfolding.ll create mode 100644 test/Assembler/2004-01-20-MaxLongLong.ll create mode 100644 test/Assembler/2004-02-01-NegativeZero.ll create mode 100644 test/Assembler/2004-02-27-SelfUseAssertError.ll create mode 100644 test/Assembler/2004-03-07-FunctionAddressAlignment.ll create mode 100644 test/Assembler/2004-03-30-UnclosedFunctionCrash.ll create mode 100644 test/Assembler/2004-04-04-GetElementPtrIndexTypes.ll create mode 100644 test/Assembler/2004-06-07-VerifierBug.ll create mode 100644 test/Assembler/2004-10-22-BCWriterUndefBug.ll create mode 100644 test/Assembler/2004-11-28-InvalidTypeCrash.ll create mode 100644 test/Assembler/2005-01-03-FPConstantDisassembly.ll create mode 100644 test/Assembler/2005-01-31-CallingAggregateFunction.ll create mode 100644 test/Assembler/2005-05-05-OpaqueUndefValues.ll create mode 100644 test/Assembler/2005-12-21-ZeroInitVector.ll create mode 100644 test/Assembler/2006-09-28-CrashOnInvalid.ll create mode 100644 test/Assembler/2006-12-09-Cast-To-Bool.ll create mode 100644 test/Assembler/2007-01-02-Undefined-Arg-Type.ll create mode 100644 test/Assembler/2007-01-05-Cmp-ConstExpr.ll create mode 100644 test/Assembler/2007-01-16-CrashOnBadCast.ll create mode 100644 test/Assembler/2007-01-16-CrashOnBadCast2.ll create mode 100644 test/Assembler/2007-03-18-InvalidNumberedVar.ll create mode 100644 test/Assembler/2007-03-19-NegValue.ll create mode 100644 test/Assembler/2007-04-20-AlignedLoad.ll create mode 100644 test/Assembler/2007-04-20-AlignedStore.ll create mode 100644 test/Assembler/2007-04-25-AssemblerFoldExternWeak.ll create mode 100644 test/Assembler/2007-05-21-Escape.ll create mode 100644 test/Assembler/2007-07-19-ParamAttrAmbiguity.ll create mode 100644 test/Assembler/2007-08-06-AliasInvalid.ll create mode 100644 test/Assembler/2007-09-10-AliasFwdRef.ll create mode 100644 test/Assembler/2007-09-29-GC.ll create mode 100644 test/Assembler/2007-11-26-AttributeOverload.ll create mode 100644 test/Assembler/2007-12-11-AddressSpaces.ll create mode 100644 test/Assembler/2008-01-11-VarargAttrs.ll create mode 100644 test/Assembler/2008-02-18-IntPointerCrash.ll create mode 100644 test/Assembler/2008-07-10-APInt.ll create mode 100644 test/Assembler/2008-09-02-FunctionNotes.ll create mode 100644 test/Assembler/2008-09-02-FunctionNotes2.ll create mode 100644 test/Assembler/2008-09-29-RetAttr.ll create mode 100644 test/Assembler/2008-10-14-QuoteInName.ll create mode 100644 test/Assembler/2009-02-01-UnnamedForwardRef.ll create mode 100644 test/Assembler/2009-02-28-CastOpc.ll create mode 100644 test/Assembler/2009-02-28-StripOpaqueName.ll create mode 100644 test/Assembler/2009-03-24-ZextConstantExpr.ll create mode 100644 test/Assembler/2009-04-25-AliasGEP.ll create mode 100644 test/Assembler/2009-07-24-ZeroArgGEP.ll create mode 100644 test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll create mode 100644 test/Assembler/ConstantExprFold.ll create mode 100644 test/Assembler/ConstantExprFoldCast.ll create mode 100644 test/Assembler/ConstantExprNoFold.ll create mode 100644 test/Assembler/MultipleReturnValueType.ll create mode 100644 test/Assembler/aggregate-constant-values.ll create mode 100644 test/Assembler/aggregate-return-single-value.ll create mode 100644 test/Assembler/align-inst-alloca.ll create mode 100644 test/Assembler/align-inst-load.ll create mode 100644 test/Assembler/align-inst-store.ll create mode 100644 test/Assembler/align-inst.ll create mode 100644 test/Assembler/alignstack.ll create mode 100644 test/Assembler/anon-functions.ll create mode 100644 test/Assembler/atomic.ll create mode 100644 test/Assembler/attribute-builtin.ll create mode 100644 test/Assembler/auto_upgrade_intrinsics.ll create mode 100644 test/Assembler/bcwrap.ll create mode 100644 test/Assembler/comment.ll create mode 100644 test/Assembler/externally-initialized.ll create mode 100644 test/Assembler/extractvalue-invalid-idx.ll create mode 100644 test/Assembler/fast-math-flags.ll create mode 100644 test/Assembler/flags.ll create mode 100644 test/Assembler/functionlocal-metadata.ll create mode 100644 test/Assembler/getelementptr.ll create mode 100644 test/Assembler/getelementptr_struct.ll create mode 100644 test/Assembler/getelementptr_vec_idx1.ll create mode 100644 test/Assembler/getelementptr_vec_idx2.ll create mode 100644 test/Assembler/getelementptr_vec_idx3.ll create mode 100644 test/Assembler/getelementptr_vec_struct.ll create mode 100644 test/Assembler/global-addrspace-forwardref.ll create mode 100644 test/Assembler/half-constprop.ll create mode 100644 test/Assembler/half-conv.ll create mode 100644 test/Assembler/half.ll create mode 100644 test/Assembler/huge-array.ll create mode 100644 test/Assembler/insertextractvalue.ll create mode 100644 test/Assembler/insertvalue-invalid-idx.ll create mode 100644 test/Assembler/invalid-fwdref1.ll create mode 100644 test/Assembler/invalid_cast.ll create mode 100644 test/Assembler/invalid_cast2.ll create mode 100644 test/Assembler/metadata.ll create mode 100644 test/Assembler/named-metadata.ll create mode 100644 test/Assembler/numbered-values.ll create mode 100644 test/Assembler/select.ll create mode 100644 test/Assembler/tls-models.ll create mode 100644 test/Assembler/unnamed-addr.ll create mode 100644 test/Assembler/unnamed.ll create mode 100644 test/Assembler/vbool-cmp.ll create mode 100644 test/Assembler/vector-cmp.ll create mode 100644 test/Assembler/vector-select.ll create mode 100644 test/Assembler/vector-shift.ll create mode 100644 test/Assembler/x86mmx.ll create mode 100644 test/Bindings/Ocaml/analysis.ml create mode 100644 test/Bindings/Ocaml/bitreader.ml create mode 100644 test/Bindings/Ocaml/bitwriter.ml create mode 100644 test/Bindings/Ocaml/executionengine.ml create mode 100644 test/Bindings/Ocaml/ext_exc.ml create mode 100644 test/Bindings/Ocaml/ipo_opts.ml create mode 100644 test/Bindings/Ocaml/irreader.ml create mode 100644 test/Bindings/Ocaml/linker.ml create mode 100644 test/Bindings/Ocaml/lit.local.cfg create mode 100644 test/Bindings/Ocaml/passmgr_builder.ml create mode 100644 test/Bindings/Ocaml/scalar_opts.ml create mode 100644 test/Bindings/Ocaml/target.ml create mode 100644 test/Bindings/Ocaml/vectorize_opts.ml create mode 100644 test/Bindings/Ocaml/vmcore.ml create mode 100644 test/Bindings/llvm-c/calc.test create mode 100644 test/Bindings/llvm-c/disassemble.test create mode 100644 test/Bindings/llvm-c/functions.ll create mode 100644 test/Bindings/llvm-c/globals.ll create mode 100644 test/Bindings/llvm-c/lit.local.cfg create mode 100644 test/Bitcode/2006-12-11-Cast-ConstExpr.ll create mode 100644 test/Bitcode/2009-06-11-FirstClassAggregateConstant.ll create mode 100644 test/Bitcode/arm32_neon_vcnt_upgrade.ll create mode 100644 test/Bitcode/attributes-3.3.ll create mode 100644 test/Bitcode/attributes-3.3.ll.bc create mode 100644 test/Bitcode/attributes.ll create mode 100644 test/Bitcode/blockaddress.ll create mode 100644 test/Bitcode/case-ranges-3.3.ll create mode 100644 test/Bitcode/case-ranges-3.3.ll.bc create mode 100644 test/Bitcode/drop-debug-info.ll create mode 100644 test/Bitcode/extractelement.ll create mode 100644 test/Bitcode/flags.ll create mode 100644 test/Bitcode/function-encoding-rel-operands.ll create mode 100644 test/Bitcode/invalid.ll create mode 100644 test/Bitcode/invalid.ll.bc create mode 100644 test/Bitcode/metadata-2.ll create mode 100644 test/Bitcode/metadata.ll create mode 100644 test/Bitcode/null-type.ll create mode 100644 test/Bitcode/null-type.ll.bc create mode 100644 test/Bitcode/ptest-new.ll create mode 100644 test/Bitcode/ptest-old.ll create mode 100644 test/Bitcode/select.ll create mode 100644 test/Bitcode/shuffle.ll create mode 100644 test/Bitcode/ssse3_palignr.ll create mode 100644 test/Bitcode/upgrade-tbaa.ll create mode 100644 test/BugPoint/crash-narrowfunctiontest.ll create mode 100644 test/BugPoint/metadata.ll create mode 100644 test/BugPoint/remove_arguments_test.ll create mode 100644 test/CMakeLists.txt create mode 100644 test/CodeGen/AArch64/adc.ll create mode 100644 test/CodeGen/AArch64/addsub-shifted.ll create mode 100644 test/CodeGen/AArch64/addsub.ll create mode 100644 test/CodeGen/AArch64/addsub_ext.ll create mode 100644 test/CodeGen/AArch64/alloca.ll create mode 100644 test/CodeGen/AArch64/analyze-branch.ll create mode 100644 test/CodeGen/AArch64/atomic-ops-not-barriers.ll create mode 100644 test/CodeGen/AArch64/atomic-ops.ll create mode 100644 test/CodeGen/AArch64/basic-pic.ll create mode 100644 test/CodeGen/AArch64/bitfield-insert-0.ll create mode 100644 test/CodeGen/AArch64/bitfield-insert.ll create mode 100644 test/CodeGen/AArch64/bitfield.ll create mode 100644 test/CodeGen/AArch64/blockaddress.ll create mode 100644 test/CodeGen/AArch64/bool-loads.ll create mode 100644 test/CodeGen/AArch64/breg.ll create mode 100644 test/CodeGen/AArch64/callee-save.ll create mode 100644 test/CodeGen/AArch64/code-model-large-abs.ll create mode 100644 test/CodeGen/AArch64/compare-branch.ll create mode 100644 test/CodeGen/AArch64/complex-copy-noneon.ll create mode 100644 test/CodeGen/AArch64/cond-sel.ll create mode 100644 test/CodeGen/AArch64/directcond.ll create mode 100644 test/CodeGen/AArch64/dp-3source.ll create mode 100644 test/CodeGen/AArch64/dp1.ll create mode 100644 test/CodeGen/AArch64/dp2.ll create mode 100644 test/CodeGen/AArch64/extern-weak.ll create mode 100644 test/CodeGen/AArch64/extract.ll create mode 100644 test/CodeGen/AArch64/fastcc-reserved.ll create mode 100644 test/CodeGen/AArch64/fastcc.ll create mode 100644 test/CodeGen/AArch64/fcmp.ll create mode 100644 test/CodeGen/AArch64/fcvt-fixed.ll create mode 100644 test/CodeGen/AArch64/fcvt-int.ll create mode 100644 test/CodeGen/AArch64/flags-multiuse.ll create mode 100644 test/CodeGen/AArch64/floatdp_1source.ll create mode 100644 test/CodeGen/AArch64/floatdp_2source.ll create mode 100644 test/CodeGen/AArch64/fp-cond-sel.ll create mode 100644 test/CodeGen/AArch64/fp-dp3.ll create mode 100644 test/CodeGen/AArch64/fp128-folding.ll create mode 100644 test/CodeGen/AArch64/fp128.ll create mode 100644 test/CodeGen/AArch64/fpimm.ll create mode 100644 test/CodeGen/AArch64/frameaddr.ll create mode 100644 test/CodeGen/AArch64/func-argpassing.ll create mode 100644 test/CodeGen/AArch64/func-calls.ll create mode 100644 test/CodeGen/AArch64/global-alignment.ll create mode 100644 test/CodeGen/AArch64/got-abuse.ll create mode 100644 test/CodeGen/AArch64/i128-align.ll create mode 100644 test/CodeGen/AArch64/illegal-float-ops.ll create mode 100644 test/CodeGen/AArch64/init-array.ll create mode 100644 test/CodeGen/AArch64/inline-asm-constraints-badI.ll create mode 100644 test/CodeGen/AArch64/inline-asm-constraints-badK.ll create mode 100644 test/CodeGen/AArch64/inline-asm-constraints-badK2.ll create mode 100644 test/CodeGen/AArch64/inline-asm-constraints-badL.ll create mode 100644 test/CodeGen/AArch64/inline-asm-constraints.ll create mode 100644 test/CodeGen/AArch64/inline-asm-modifiers.ll create mode 100644 test/CodeGen/AArch64/jump-table.ll create mode 100644 test/CodeGen/AArch64/large-consts.ll create mode 100644 test/CodeGen/AArch64/large-frame.ll create mode 100644 test/CodeGen/AArch64/ldst-regoffset.ll create mode 100644 test/CodeGen/AArch64/ldst-unscaledimm.ll create mode 100644 test/CodeGen/AArch64/ldst-unsignedimm.ll create mode 100644 test/CodeGen/AArch64/lit.local.cfg create mode 100644 test/CodeGen/AArch64/literal_pools.ll create mode 100644 test/CodeGen/AArch64/local_vars.ll create mode 100644 test/CodeGen/AArch64/logical-imm.ll create mode 100644 test/CodeGen/AArch64/logical_shifted_reg.ll create mode 100644 test/CodeGen/AArch64/movw-consts.ll create mode 100644 test/CodeGen/AArch64/movw-shift-encoding.ll create mode 100644 test/CodeGen/AArch64/neon-2velem-high.ll create mode 100644 test/CodeGen/AArch64/neon-2velem.ll create mode 100644 test/CodeGen/AArch64/neon-3vdiff.ll create mode 100644 test/CodeGen/AArch64/neon-aba-abd.ll create mode 100644 test/CodeGen/AArch64/neon-across.ll create mode 100644 test/CodeGen/AArch64/neon-add-pairwise.ll create mode 100644 test/CodeGen/AArch64/neon-add-sub.ll create mode 100644 test/CodeGen/AArch64/neon-bitcast.ll create mode 100644 test/CodeGen/AArch64/neon-bitwise-instructions.ll create mode 100644 test/CodeGen/AArch64/neon-bsl.ll create mode 100644 test/CodeGen/AArch64/neon-compare-instructions.ll create mode 100644 test/CodeGen/AArch64/neon-copy.ll create mode 100644 test/CodeGen/AArch64/neon-crypto.ll create mode 100644 test/CodeGen/AArch64/neon-diagnostics.ll create mode 100644 test/CodeGen/AArch64/neon-extract.ll create mode 100644 test/CodeGen/AArch64/neon-facge-facgt.ll create mode 100644 test/CodeGen/AArch64/neon-fma.ll create mode 100644 test/CodeGen/AArch64/neon-frsqrt-frecp.ll create mode 100644 test/CodeGen/AArch64/neon-halving-add-sub.ll create mode 100644 test/CodeGen/AArch64/neon-max-min-pairwise.ll create mode 100644 test/CodeGen/AArch64/neon-max-min.ll create mode 100644 test/CodeGen/AArch64/neon-misc-scalar.ll create mode 100644 test/CodeGen/AArch64/neon-misc.ll create mode 100644 test/CodeGen/AArch64/neon-mla-mls.ll create mode 100644 test/CodeGen/AArch64/neon-mov.ll create mode 100644 test/CodeGen/AArch64/neon-mul-div.ll create mode 100644 test/CodeGen/AArch64/neon-perm.ll create mode 100644 test/CodeGen/AArch64/neon-rounding-halving-add.ll create mode 100644 test/CodeGen/AArch64/neon-rounding-shift.ll create mode 100644 test/CodeGen/AArch64/neon-saturating-add-sub.ll create mode 100644 test/CodeGen/AArch64/neon-saturating-rounding-shift.ll create mode 100644 test/CodeGen/AArch64/neon-saturating-shift.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-abs.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-add-sub.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-by-elem-fma.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-by-elem-mul.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-compare.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-copy.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-cvt.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-extract-narrow.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-fabd.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-fcvt.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-fp-compare.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-mul.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-neg.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-recip.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-reduce-pairwise.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-rounding-shift.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-saturating-add-sub.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-saturating-rounding-shift.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-saturating-shift.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-shift-imm.ll create mode 100644 test/CodeGen/AArch64/neon-scalar-shift.ll create mode 100644 test/CodeGen/AArch64/neon-shift-left-long.ll create mode 100644 test/CodeGen/AArch64/neon-shift.ll create mode 100644 test/CodeGen/AArch64/neon-simd-ldst-multi-elem.ll create mode 100644 test/CodeGen/AArch64/neon-simd-ldst-one.ll create mode 100644 test/CodeGen/AArch64/neon-simd-ldst.ll create mode 100644 test/CodeGen/AArch64/neon-simd-post-ldst-multi-elem.ll create mode 100644 test/CodeGen/AArch64/neon-simd-post-ldst-one.ll create mode 100644 test/CodeGen/AArch64/neon-simd-shift.ll create mode 100644 test/CodeGen/AArch64/neon-simd-tbl.ll create mode 100644 test/CodeGen/AArch64/neon-simd-vget.ll create mode 100644 test/CodeGen/AArch64/pic-eh-stubs.ll create mode 100644 test/CodeGen/AArch64/regress-bitcast-formals.ll create mode 100644 test/CodeGen/AArch64/regress-f128csel-flags.ll create mode 100644 test/CodeGen/AArch64/regress-fp128-livein.ll create mode 100644 test/CodeGen/AArch64/regress-tail-livereg.ll create mode 100644 test/CodeGen/AArch64/regress-tblgen-chains.ll create mode 100644 test/CodeGen/AArch64/regress-w29-reserved-with-fp.ll create mode 100644 test/CodeGen/AArch64/regress-wzr-allocatable.ll create mode 100644 test/CodeGen/AArch64/returnaddr.ll create mode 100644 test/CodeGen/AArch64/setcc-takes-i32.ll create mode 100644 test/CodeGen/AArch64/sibling-call.ll create mode 100644 test/CodeGen/AArch64/sincos-expansion.ll create mode 100644 test/CodeGen/AArch64/tail-call.ll create mode 100644 test/CodeGen/AArch64/tls-dynamic-together.ll create mode 100644 test/CodeGen/AArch64/tls-dynamics.ll create mode 100644 test/CodeGen/AArch64/tls-execs.ll create mode 100644 test/CodeGen/AArch64/tst-br.ll create mode 100644 test/CodeGen/AArch64/variadic.ll create mode 100644 test/CodeGen/AArch64/zero-reg.ll create mode 100644 test/CodeGen/ARM/2006-11-10-CycleInDAG.ll create mode 100644 test/CodeGen/ARM/2007-01-19-InfiniteLoop.ll create mode 100644 test/CodeGen/ARM/2007-03-07-CombinerCrash.ll create mode 100644 test/CodeGen/ARM/2007-03-13-InstrSched.ll create mode 100644 test/CodeGen/ARM/2007-03-21-JoinIntervalsCrash.ll create mode 100644 test/CodeGen/ARM/2007-03-27-RegScavengerAssert.ll create mode 100644 test/CodeGen/ARM/2007-03-30-RegScavengerAssert.ll create mode 100644 test/CodeGen/ARM/2007-04-02-RegScavengerAssert.ll create mode 100644 test/CodeGen/ARM/2007-04-03-PEIBug.ll create mode 100644 test/CodeGen/ARM/2007-04-03-UndefinedSymbol.ll create mode 100644 test/CodeGen/ARM/2007-04-30-CombinerCrash.ll create mode 100644 test/CodeGen/ARM/2007-05-03-BadPostIndexedLd.ll create mode 100644 test/CodeGen/ARM/2007-05-07-tailmerge-1.ll create mode 100644 test/CodeGen/ARM/2007-05-09-tailmerge-2.ll create mode 100644 test/CodeGen/ARM/2007-05-14-InlineAsmCstCrash.ll create mode 100644 test/CodeGen/ARM/2007-05-14-RegScavengerAssert.ll create mode 100644 test/CodeGen/ARM/2007-05-22-tailmerge-3.ll create mode 100644 test/CodeGen/ARM/2007-05-23-BadPreIndexedStore.ll create mode 100644 test/CodeGen/ARM/2007-08-15-ReuseBug.ll create mode 100644 test/CodeGen/ARM/2008-02-04-LocalRegAllocBug.ll create mode 100644 test/CodeGen/ARM/2008-02-29-RegAllocLocal.ll create mode 100644 test/CodeGen/ARM/2008-03-05-SxtInRegBug.ll create mode 100644 test/CodeGen/ARM/2008-03-07-RegScavengerAssert.ll create mode 100644 test/CodeGen/ARM/2008-04-04-ScavengerAssert.ll create mode 100644 test/CodeGen/ARM/2008-04-10-ScavengerAssert.ll create mode 100644 test/CodeGen/ARM/2008-04-11-PHIofImpDef.ll create mode 100644 test/CodeGen/ARM/2008-05-19-LiveIntervalsBug.ll create mode 100644 test/CodeGen/ARM/2008-05-19-ScavengerAssert.ll create mode 100644 test/CodeGen/ARM/2008-07-17-Fdiv.ll create mode 100644 test/CodeGen/ARM/2008-07-24-CodeGenPrepCrash.ll create mode 100644 test/CodeGen/ARM/2008-08-07-AsmPrintBug.ll create mode 100644 test/CodeGen/ARM/2008-09-17-CoalescerBug.ll create mode 100644 test/CodeGen/ARM/2008-11-18-ScavengerAssert.ll create mode 100644 test/CodeGen/ARM/2009-02-16-SpillerBug.ll create mode 100644 test/CodeGen/ARM/2009-02-22-SoftenFloatVaArg.ll create mode 100644 test/CodeGen/ARM/2009-02-27-SpillerBug.ll create mode 100644 test/CodeGen/ARM/2009-03-07-SpillerBug.ll create mode 100644 test/CodeGen/ARM/2009-03-09-AddrModeBug.ll create mode 100644 test/CodeGen/ARM/2009-04-06-AsmModifier.ll create mode 100644 test/CodeGen/ARM/2009-04-08-AggregateAddr.ll create mode 100644 test/CodeGen/ARM/2009-04-08-FREM.ll create mode 100644 test/CodeGen/ARM/2009-04-08-FloatUndef.ll create mode 100644 test/CodeGen/ARM/2009-04-09-RegScavengerAsm.ll create mode 100644 test/CodeGen/ARM/2009-05-05-DAGCombineBug.ll create mode 100644 test/CodeGen/ARM/2009-05-07-RegAllocLocal.ll create mode 100644 test/CodeGen/ARM/2009-05-11-CodePlacementCrash.ll create mode 100644 test/CodeGen/ARM/2009-05-18-InlineAsmMem.ll create mode 100644 test/CodeGen/ARM/2009-06-02-ISelCrash.ll create mode 100644 test/CodeGen/ARM/2009-06-04-MissingLiveIn.ll create mode 100644 test/CodeGen/ARM/2009-06-15-RegScavengerAssert.ll create mode 100644 test/CodeGen/ARM/2009-06-19-RegScavengerAssert.ll create mode 100644 test/CodeGen/ARM/2009-06-22-CoalescerBug.ll create mode 100644 test/CodeGen/ARM/2009-06-30-RegScavengerAssert.ll create mode 100644 test/CodeGen/ARM/2009-06-30-RegScavengerAssert2.ll create mode 100644 test/CodeGen/ARM/2009-06-30-RegScavengerAssert3.ll create mode 100644 test/CodeGen/ARM/2009-06-30-RegScavengerAssert4.ll create mode 100644 test/CodeGen/ARM/2009-06-30-RegScavengerAssert5.ll create mode 100644 test/CodeGen/ARM/2009-07-01-CommuteBug.ll create mode 100644 test/CodeGen/ARM/2009-07-09-asm-p-constraint.ll create mode 100644 test/CodeGen/ARM/2009-07-18-RewriterBug.ll create mode 100644 test/CodeGen/ARM/2009-07-22-ScavengerAssert.ll create mode 100644 test/CodeGen/ARM/2009-07-22-SchedulerAssert.ll create mode 100644 test/CodeGen/ARM/2009-07-29-VFP3Registers.ll create mode 100644 test/CodeGen/ARM/2009-08-02-RegScavengerAssert-Neon.ll create mode 100644 test/CodeGen/ARM/2009-08-04-RegScavengerAssert-2.ll create mode 100644 test/CodeGen/ARM/2009-08-04-RegScavengerAssert.ll create mode 100644 test/CodeGen/ARM/2009-08-15-RegScavenger-EarlyClobber.ll create mode 100644 test/CodeGen/ARM/2009-08-15-RegScavengerAssert.ll create mode 100644 test/CodeGen/ARM/2009-08-21-PostRAKill.ll create mode 100644 test/CodeGen/ARM/2009-08-21-PostRAKill2.ll create mode 100644 test/CodeGen/ARM/2009-08-21-PostRAKill3.ll create mode 100644 test/CodeGen/ARM/2009-08-23-linkerprivate.ll create mode 100644 test/CodeGen/ARM/2009-08-26-ScalarToVector.ll create mode 100644 test/CodeGen/ARM/2009-08-27-ScalarToVector.ll create mode 100644 test/CodeGen/ARM/2009-08-29-ExtractEltf32.ll create mode 100644 test/CodeGen/ARM/2009-08-29-TooLongSplat.ll create mode 100644 test/CodeGen/ARM/2009-08-31-LSDA-Name.ll create mode 100644 test/CodeGen/ARM/2009-08-31-TwoRegShuffle.ll create mode 100644 test/CodeGen/ARM/2009-09-09-AllOnes.ll create mode 100644 test/CodeGen/ARM/2009-09-09-fpcmp-ole.ll create mode 100644 test/CodeGen/ARM/2009-09-10-postdec.ll create mode 100644 test/CodeGen/ARM/2009-09-13-InvalidSubreg.ll create mode 100644 test/CodeGen/ARM/2009-09-13-InvalidSuperReg.ll create mode 100644 test/CodeGen/ARM/2009-09-20-LiveIntervalsBug.ll create mode 100644 test/CodeGen/ARM/2009-09-21-LiveVariablesBug.ll create mode 100644 test/CodeGen/ARM/2009-09-22-LiveVariablesBug.ll create mode 100644 test/CodeGen/ARM/2009-09-23-LiveVariablesBug.ll create mode 100644 test/CodeGen/ARM/2009-09-24-spill-align.ll create mode 100644 test/CodeGen/ARM/2009-09-27-CoalescerBug.ll create mode 100644 test/CodeGen/ARM/2009-09-28-LdStOptiBug.ll create mode 100644 test/CodeGen/ARM/2009-10-02-NEONSubregsBug.ll create mode 100644 test/CodeGen/ARM/2009-10-16-Scope.ll create mode 100644 test/CodeGen/ARM/2009-10-21-InvalidFNeg.ll create mode 100644 test/CodeGen/ARM/2009-10-27-double-align.ll create mode 100644 test/CodeGen/ARM/2009-10-30.ll create mode 100644 test/CodeGen/ARM/2009-11-01-NeonMoves.ll create mode 100644 test/CodeGen/ARM/2009-11-02-NegativeLane.ll create mode 100644 test/CodeGen/ARM/2009-11-07-SubRegAsmPrinting.ll create mode 100644 test/CodeGen/ARM/2009-11-13-CoalescerCrash.ll create mode 100644 test/CodeGen/ARM/2009-11-13-ScavengerAssert.ll create mode 100644 test/CodeGen/ARM/2009-11-13-ScavengerAssert2.ll create mode 100644 test/CodeGen/ARM/2009-11-13-VRRewriterCrash.ll create mode 100644 test/CodeGen/ARM/2009-11-30-LiveVariablesBug.ll create mode 100644 test/CodeGen/ARM/2009-12-02-vtrn-undef.ll create mode 100644 test/CodeGen/ARM/2010-03-04-eabi-fp-spill.ll create mode 100644 test/CodeGen/ARM/2010-03-04-stm-undef-addr.ll create mode 100644 test/CodeGen/ARM/2010-03-18-ldm-rtrn.ll create mode 100644 test/CodeGen/ARM/2010-04-09-NeonSelect.ll create mode 100644 test/CodeGen/ARM/2010-04-13-v2f64SplitArg.ll create mode 100644 test/CodeGen/ARM/2010-04-14-SplitVector.ll create mode 100644 test/CodeGen/ARM/2010-04-15-ScavengerDebugValue.ll create mode 100644 test/CodeGen/ARM/2010-05-14-IllegalType.ll create mode 100644 test/CodeGen/ARM/2010-05-17-FastAllocCrash.ll create mode 100644 test/CodeGen/ARM/2010-05-18-LocalAllocCrash.ll create mode 100644 test/CodeGen/ARM/2010-05-18-PostIndexBug.ll create mode 100644 test/CodeGen/ARM/2010-05-19-Shuffles.ll create mode 100644 test/CodeGen/ARM/2010-05-20-NEONSpillCrash.ll create mode 100644 test/CodeGen/ARM/2010-05-21-BuildVector.ll create mode 100644 test/CodeGen/ARM/2010-06-11-vmovdrr-bitcast.ll create mode 100644 test/CodeGen/ARM/2010-06-21-LdStMultipleBug.ll create mode 100644 test/CodeGen/ARM/2010-06-21-nondarwin-tc.ll create mode 100644 test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll create mode 100644 test/CodeGen/ARM/2010-06-29-PartialRedefFastAlloc.ll create mode 100644 test/CodeGen/ARM/2010-06-29-SubregImpDefs.ll create mode 100644 test/CodeGen/ARM/2010-07-26-GlobalMerge.ll create mode 100644 test/CodeGen/ARM/2010-08-04-EHCrash.ll create mode 100644 test/CodeGen/ARM/2010-08-04-StackVariable.ll create mode 100644 test/CodeGen/ARM/2010-09-21-OptCmpBug.ll create mode 100644 test/CodeGen/ARM/2010-09-29-mc-asm-header-test.ll create mode 100644 test/CodeGen/ARM/2010-10-25-ifcvt-ldm.ll create mode 100644 test/CodeGen/ARM/2010-11-15-SpillEarlyClobber.ll create mode 100644 test/CodeGen/ARM/2010-11-29-PrologueBug.ll create mode 100644 test/CodeGen/ARM/2010-12-07-PEIBug.ll create mode 100644 test/CodeGen/ARM/2010-12-08-tpsoft.ll create mode 100644 test/CodeGen/ARM/2010-12-15-elf-lcomm.ll create mode 100644 test/CodeGen/ARM/2010-12-17-LocalStackSlotCrash.ll create mode 100644 test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll create mode 100644 test/CodeGen/ARM/2011-02-04-AntidepMultidef.ll create mode 100644 test/CodeGen/ARM/2011-02-07-AntidepClobber.ll create mode 100644 test/CodeGen/ARM/2011-03-10-DAGCombineCrash.ll create mode 100644 test/CodeGen/ARM/2011-03-15-LdStMultipleBug.ll create mode 100644 test/CodeGen/ARM/2011-03-23-PeepholeBug.ll create mode 100644 test/CodeGen/ARM/2011-04-07-schediv.ll create mode 100644 test/CodeGen/ARM/2011-04-11-MachineLICMBug.ll create mode 100644 test/CodeGen/ARM/2011-04-12-AlignBug.ll create mode 100644 test/CodeGen/ARM/2011-04-12-FastRegAlloc.ll create mode 100644 test/CodeGen/ARM/2011-04-15-AndVFlagPeepholeBug.ll create mode 100644 test/CodeGen/ARM/2011-04-15-RegisterCmpPeephole.ll create mode 100644 test/CodeGen/ARM/2011-04-26-SchedTweak.ll create mode 100644 test/CodeGen/ARM/2011-04-27-IfCvtBug.ll create mode 100644 test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll create mode 100644 test/CodeGen/ARM/2011-06-09-TailCallByVal.ll create mode 100644 test/CodeGen/ARM/2011-06-16-TailCallByVal.ll create mode 100644 test/CodeGen/ARM/2011-06-29-MergeGlobalsAlign.ll create mode 100644 test/CodeGen/ARM/2011-07-10-GlobalMergeBug.ll create mode 100644 test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll create mode 100644 test/CodeGen/ARM/2011-08-12-vmovqqqq-pseudo.ll create mode 100644 test/CodeGen/ARM/2011-08-25-ldmia_ret.ll create mode 100644 test/CodeGen/ARM/2011-08-29-SchedCycle.ll create mode 100644 test/CodeGen/ARM/2011-08-29-ldr_pre_imm.ll create mode 100644 test/CodeGen/ARM/2011-09-09-OddVectorDivision.ll create mode 100644 test/CodeGen/ARM/2011-09-19-cpsr.ll create mode 100644 test/CodeGen/ARM/2011-09-28-CMovCombineBug.ll create mode 100644 test/CodeGen/ARM/2011-10-26-ExpandUnalignedLoadCrash.ll create mode 100644 test/CodeGen/ARM/2011-10-26-memset-inline.ll create mode 100644 test/CodeGen/ARM/2011-10-26-memset-with-neon.ll create mode 100644 test/CodeGen/ARM/2011-11-07-PromoteVectorLoadStore.ll create mode 100644 test/CodeGen/ARM/2011-11-09-BitcastVectorDouble.ll create mode 100644 test/CodeGen/ARM/2011-11-09-IllegalVectorFPIntConvert.ll create mode 100644 test/CodeGen/ARM/2011-11-14-EarlyClobber.ll create mode 100644 test/CodeGen/ARM/2011-11-28-DAGCombineBug.ll create mode 100644 test/CodeGen/ARM/2011-11-29-128bitArithmetics.ll create mode 100644 test/CodeGen/ARM/2011-11-30-MergeAlignment.ll create mode 100644 test/CodeGen/ARM/2011-12-14-machine-sink.ll create mode 100644 test/CodeGen/ARM/2011-12-19-sjlj-clobber.ll create mode 100644 test/CodeGen/ARM/2012-01-23-PostRA-LICM.ll create mode 100644 test/CodeGen/ARM/2012-01-24-RegSequenceLiveRange.ll create mode 100644 test/CodeGen/ARM/2012-01-26-CoalescerBug.ll create mode 100644 test/CodeGen/ARM/2012-01-26-CopyPropKills.ll create mode 100644 test/CodeGen/ARM/2012-02-01-CoalescerBug.ll create mode 100644 test/CodeGen/ARM/2012-03-05-FPSCR-bug.ll create mode 100644 test/CodeGen/ARM/2012-03-13-DAGCombineBug.ll create mode 100644 test/CodeGen/ARM/2012-03-26-FoldImmBug.ll create mode 100644 test/CodeGen/ARM/2012-04-02-TwoAddrInstrCrash.ll create mode 100644 test/CodeGen/ARM/2012-04-10-DAGCombine.ll create mode 100644 test/CodeGen/ARM/2012-04-24-SplitEHCriticalEdge.ll create mode 100644 test/CodeGen/ARM/2012-05-04-vmov.ll create mode 100644 test/CodeGen/ARM/2012-05-10-PreferVMOVtoVDUP32.ll create mode 100644 test/CodeGen/ARM/2012-05-29-TailDupBug.ll create mode 100644 test/CodeGen/ARM/2012-06-12-SchedMemLatency.ll create mode 100644 test/CodeGen/ARM/2012-08-04-DtripleSpillReload.ll create mode 100644 test/CodeGen/ARM/2012-08-08-legalize-unaligned.ll create mode 100644 test/CodeGen/ARM/2012-08-09-neon-extload.ll create mode 100644 test/CodeGen/ARM/2012-08-13-bfi.ll create mode 100644 test/CodeGen/ARM/2012-08-23-legalize-vmull.ll create mode 100644 test/CodeGen/ARM/2012-08-27-CopyPhysRegCrash.ll create mode 100644 test/CodeGen/ARM/2012-08-30-select.ll create mode 100644 test/CodeGen/ARM/2012-09-18-ARMv4ISelBug.ll create mode 100644 test/CodeGen/ARM/2012-09-25-InlineAsmScalarToVectorConv.ll create mode 100644 test/CodeGen/ARM/2012-09-25-InlineAsmScalarToVectorConv2.ll create mode 100644 test/CodeGen/ARM/2012-10-04-AAPCS-byval-align8.ll create mode 100644 test/CodeGen/ARM/2012-10-04-FixedFrame-vs-byval.ll create mode 100644 test/CodeGen/ARM/2012-10-04-LDRB_POST_IMM-Crash.ll create mode 100644 test/CodeGen/ARM/2012-10-18-PR14099-ByvalFrameAddress.ll create mode 100644 test/CodeGen/ARM/2012-11-14-subs_carry.ll create mode 100644 test/CodeGen/ARM/2013-01-21-PR14992.ll create mode 100644 test/CodeGen/ARM/2013-02-27-expand-vfma.ll create mode 100644 test/CodeGen/ARM/2013-04-05-Small-ByVal-Structs-PR15293.ll create mode 100644 test/CodeGen/ARM/2013-04-16-AAPCS-C4-vs-VFP.ll create mode 100644 test/CodeGen/ARM/2013-04-16-AAPCS-C5-vs-VFP.ll create mode 100644 test/CodeGen/ARM/2013-04-18-load-overlap-PR14824.ll create mode 100644 test/CodeGen/ARM/2013-04-21-AAPCS-VA-C.1.cp.ll create mode 100644 test/CodeGen/ARM/2013-05-02-AAPCS-ByVal-Structs-C4-C5-VFP.ll create mode 100644 test/CodeGen/ARM/2013-05-02-AAPCS-ByVal-Structs-C4-C5-VFP2.ll create mode 100644 test/CodeGen/ARM/2013-05-05-IfConvertBug.ll create mode 100644 test/CodeGen/ARM/2013-05-07-ByteLoadSameAddress.ll create mode 100644 test/CodeGen/ARM/2013-05-13-AAPCS-byval-padding.ll create mode 100644 test/CodeGen/ARM/2013-05-13-AAPCS-byval-padding2.ll create mode 100644 test/CodeGen/ARM/2013-05-13-DAGCombiner-undef-mask.ll create mode 100644 test/CodeGen/ARM/2013-05-31-char-shift-crash.ll create mode 100644 test/CodeGen/ARM/2013-06-03-ByVal-2Kbytes.ll create mode 100644 test/CodeGen/ARM/2013-07-29-vector-or-combine.ll create mode 100644 test/CodeGen/ARM/2013-10-11-select-stalls.ll create mode 100644 test/CodeGen/ARM/2013-11-08-inline-asm-neon-array.ll create mode 100644 test/CodeGen/ARM/DbgValueOtherTargets.test create mode 100644 test/CodeGen/ARM/MergeConsecutiveStores.ll create mode 100644 test/CodeGen/ARM/PR15053.ll create mode 100644 test/CodeGen/ARM/a15-SD-dep.ll create mode 100644 test/CodeGen/ARM/a15-mla.ll create mode 100644 test/CodeGen/ARM/a15-partial-update.ll create mode 100644 test/CodeGen/ARM/a15.ll create mode 100644 test/CodeGen/ARM/addrmode.ll create mode 100644 test/CodeGen/ARM/addrspacecast.ll create mode 100644 test/CodeGen/ARM/aliases.ll create mode 100644 test/CodeGen/ARM/align.ll create mode 100644 test/CodeGen/ARM/alloc-no-stack-realign.ll create mode 100644 test/CodeGen/ARM/alloca.ll create mode 100644 test/CodeGen/ARM/argaddr.ll create mode 100644 test/CodeGen/ARM/arguments-nosplit-double.ll create mode 100644 test/CodeGen/ARM/arguments-nosplit-i64.ll create mode 100644 test/CodeGen/ARM/arguments.ll create mode 100644 test/CodeGen/ARM/arguments2.ll create mode 100644 test/CodeGen/ARM/arguments3.ll create mode 100644 test/CodeGen/ARM/arguments4.ll create mode 100644 test/CodeGen/ARM/arguments5.ll create mode 100644 test/CodeGen/ARM/arguments6.ll create mode 100644 test/CodeGen/ARM/arguments7.ll create mode 100644 test/CodeGen/ARM/arguments8.ll create mode 100644 test/CodeGen/ARM/arguments_f64_backfill.ll create mode 100644 test/CodeGen/ARM/arm-and-tst-peephole.ll create mode 100644 test/CodeGen/ARM/arm-asm.ll create mode 100644 test/CodeGen/ARM/arm-frameaddr.ll create mode 100644 test/CodeGen/ARM/arm-modifier.ll create mode 100644 test/CodeGen/ARM/arm-negative-stride.ll create mode 100644 test/CodeGen/ARM/arm-returnaddr.ll create mode 100644 test/CodeGen/ARM/arm-ttype-target2.ll create mode 100644 test/CodeGen/ARM/armv4.ll create mode 100644 test/CodeGen/ARM/atomic-64bit.ll create mode 100644 test/CodeGen/ARM/atomic-cmp.ll create mode 100644 test/CodeGen/ARM/atomic-load-store.ll create mode 100644 test/CodeGen/ARM/atomic-op.ll create mode 100644 test/CodeGen/ARM/atomic-ops-v8.ll create mode 100644 test/CodeGen/ARM/atomicrmw_minmax.ll create mode 100644 test/CodeGen/ARM/available_externally.ll create mode 100644 test/CodeGen/ARM/avoid-cpsr-rmw.ll create mode 100644 test/CodeGen/ARM/bfc.ll create mode 100644 test/CodeGen/ARM/bfi.ll create mode 100644 test/CodeGen/ARM/bfx.ll create mode 100644 test/CodeGen/ARM/bic.ll create mode 100644 test/CodeGen/ARM/bicZext.ll create mode 100644 test/CodeGen/ARM/bits.ll create mode 100644 test/CodeGen/ARM/bswap-inline-asm.ll create mode 100644 test/CodeGen/ARM/build-attributes-encoding.s create mode 100644 test/CodeGen/ARM/bx_fold.ll create mode 100644 test/CodeGen/ARM/byval_load_align.ll create mode 100644 test/CodeGen/ARM/call-noret-minsize.ll create mode 100644 test/CodeGen/ARM/call-noret.ll create mode 100644 test/CodeGen/ARM/call-tc.ll create mode 100644 test/CodeGen/ARM/call.ll create mode 100644 test/CodeGen/ARM/call_nolink.ll create mode 100644 test/CodeGen/ARM/carry.ll create mode 100644 test/CodeGen/ARM/clz.ll create mode 100644 test/CodeGen/ARM/cmn.ll create mode 100644 test/CodeGen/ARM/coalesce-dbgvalue.ll create mode 100644 test/CodeGen/ARM/coalesce-subregs.ll create mode 100644 test/CodeGen/ARM/code-placement.ll create mode 100644 test/CodeGen/ARM/commute-movcc.ll create mode 100644 test/CodeGen/ARM/compare-call.ll create mode 100644 test/CodeGen/ARM/constantfp.ll create mode 100644 test/CodeGen/ARM/constants.ll create mode 100644 test/CodeGen/ARM/copy-paired-reg.ll create mode 100644 test/CodeGen/ARM/crash-O0.ll create mode 100644 test/CodeGen/ARM/crash-greedy-v6.ll create mode 100644 test/CodeGen/ARM/crash-greedy.ll create mode 100644 test/CodeGen/ARM/crash-shufflevector.ll create mode 100644 test/CodeGen/ARM/crash.ll create mode 100644 test/CodeGen/ARM/cse-call.ll create mode 100644 test/CodeGen/ARM/cse-libcalls.ll create mode 100644 test/CodeGen/ARM/ctor_order.ll create mode 100644 test/CodeGen/ARM/ctors_dtors.ll create mode 100644 test/CodeGen/ARM/ctz.ll create mode 100644 test/CodeGen/ARM/dagcombine-anyexttozeroext.ll create mode 100644 test/CodeGen/ARM/dagcombine-concatvector.ll create mode 100644 test/CodeGen/ARM/darwin-eabi.ll create mode 100644 test/CodeGen/ARM/darwin-section-order.ll create mode 100644 test/CodeGen/ARM/data-in-code-annotations.ll create mode 100644 test/CodeGen/ARM/debug-info-arg.ll create mode 100644 test/CodeGen/ARM/debug-info-blocks.ll create mode 100644 test/CodeGen/ARM/debug-info-branch-folding.ll create mode 100644 test/CodeGen/ARM/debug-info-d16-reg.ll create mode 100644 test/CodeGen/ARM/debug-info-qreg.ll create mode 100644 test/CodeGen/ARM/debug-info-s16-reg.ll create mode 100644 test/CodeGen/ARM/debug-info-sreg2.ll create mode 100644 test/CodeGen/ARM/deps-fix.ll create mode 100644 test/CodeGen/ARM/div.ll create mode 100644 test/CodeGen/ARM/divmod-eabi.ll create mode 100644 test/CodeGen/ARM/divmod.ll create mode 100644 test/CodeGen/ARM/domain-conv-vmovs.ll create mode 100644 test/CodeGen/ARM/dyn-stackalloc.ll create mode 100644 test/CodeGen/ARM/eh-dispcont.ll create mode 100644 test/CodeGen/ARM/eh-resume-darwin.ll create mode 100644 test/CodeGen/ARM/ehabi-filters.ll create mode 100644 test/CodeGen/ARM/ehabi-no-landingpad.ll create mode 100644 test/CodeGen/ARM/ehabi-unwind.ll create mode 100644 test/CodeGen/ARM/ehabi.ll create mode 100644 test/CodeGen/ARM/elf-lcomm-align.ll create mode 100644 test/CodeGen/ARM/emit-big-cst.ll create mode 100644 test/CodeGen/ARM/extload-knownzero.ll create mode 100644 test/CodeGen/ARM/extloadi1.ll create mode 100644 test/CodeGen/ARM/fabs-neon.ll create mode 100644 test/CodeGen/ARM/fabss.ll create mode 100644 test/CodeGen/ARM/fadds.ll create mode 100644 test/CodeGen/ARM/fast-isel-GEP-coalesce.ll create mode 100644 test/CodeGen/ARM/fast-isel-align.ll create mode 100644 test/CodeGen/ARM/fast-isel-binary.ll create mode 100644 test/CodeGen/ARM/fast-isel-br-const.ll create mode 100644 test/CodeGen/ARM/fast-isel-br-phi.ll create mode 100644 test/CodeGen/ARM/fast-isel-call-multi-reg-return.ll create mode 100644 test/CodeGen/ARM/fast-isel-call.ll create mode 100644 test/CodeGen/ARM/fast-isel-cmp-imm.ll create mode 100644 test/CodeGen/ARM/fast-isel-conversion.ll create mode 100644 test/CodeGen/ARM/fast-isel-crash.ll create mode 100644 test/CodeGen/ARM/fast-isel-crash2.ll create mode 100644 test/CodeGen/ARM/fast-isel-deadcode.ll create mode 100644 test/CodeGen/ARM/fast-isel-ext.ll create mode 100644 test/CodeGen/ARM/fast-isel-fold.ll create mode 100644 test/CodeGen/ARM/fast-isel-frameaddr.ll create mode 100644 test/CodeGen/ARM/fast-isel-icmp.ll create mode 100644 test/CodeGen/ARM/fast-isel-indirectbr.ll create mode 100644 test/CodeGen/ARM/fast-isel-intrinsic.ll create mode 100644 test/CodeGen/ARM/fast-isel-ldr-str-arm.ll create mode 100644 test/CodeGen/ARM/fast-isel-ldr-str-thumb-neg-index.ll create mode 100644 test/CodeGen/ARM/fast-isel-ldrh-strh-arm.ll create mode 100644 test/CodeGen/ARM/fast-isel-load-store-verify.ll create mode 100644 test/CodeGen/ARM/fast-isel-mvn.ll create mode 100644 test/CodeGen/ARM/fast-isel-pic.ll create mode 100644 test/CodeGen/ARM/fast-isel-pred.ll create mode 100644 test/CodeGen/ARM/fast-isel-redefinition.ll create mode 100644 test/CodeGen/ARM/fast-isel-ret.ll create mode 100644 test/CodeGen/ARM/fast-isel-select.ll create mode 100644 test/CodeGen/ARM/fast-isel-shifter.ll create mode 100644 test/CodeGen/ARM/fast-isel-static.ll create mode 100644 test/CodeGen/ARM/fast-isel-vararg.ll create mode 100644 test/CodeGen/ARM/fast-isel.ll create mode 100644 test/CodeGen/ARM/fast-tail-call.ll create mode 100644 test/CodeGen/ARM/fastisel-gep-promote-before-add.ll create mode 100644 test/CodeGen/ARM/fcopysign.ll create mode 100644 test/CodeGen/ARM/fdivs.ll create mode 100644 test/CodeGen/ARM/fixunsdfdi.ll create mode 100644 test/CodeGen/ARM/flag-crash.ll create mode 100644 test/CodeGen/ARM/floorf.ll create mode 100644 test/CodeGen/ARM/fmacs.ll create mode 100644 test/CodeGen/ARM/fmdrr-fmrrd.ll create mode 100644 test/CodeGen/ARM/fmscs.ll create mode 100644 test/CodeGen/ARM/fmuls.ll create mode 100644 test/CodeGen/ARM/fnegs.ll create mode 100644 test/CodeGen/ARM/fnmacs.ll create mode 100644 test/CodeGen/ARM/fnmscs.ll create mode 100644 test/CodeGen/ARM/fnmul.ll create mode 100644 test/CodeGen/ARM/fnmuls.ll create mode 100644 test/CodeGen/ARM/fold-const.ll create mode 100644 test/CodeGen/ARM/fold-stack-adjust.ll create mode 100644 test/CodeGen/ARM/formal.ll create mode 100644 test/CodeGen/ARM/fp-arg-shuffle.ll create mode 100644 test/CodeGen/ARM/fp-fast.ll create mode 100644 test/CodeGen/ARM/fp.ll create mode 100644 test/CodeGen/ARM/fp16.ll create mode 100644 test/CodeGen/ARM/fp_convert.ll create mode 100644 test/CodeGen/ARM/fparith.ll create mode 100644 test/CodeGen/ARM/fpcmp-opt.ll create mode 100644 test/CodeGen/ARM/fpcmp.ll create mode 100644 test/CodeGen/ARM/fpcmp_ueq.ll create mode 100644 test/CodeGen/ARM/fpconsts.ll create mode 100644 test/CodeGen/ARM/fpconv.ll create mode 100644 test/CodeGen/ARM/fpmem.ll create mode 100644 test/CodeGen/ARM/fpow.ll create mode 100644 test/CodeGen/ARM/fpowi.ll create mode 100644 test/CodeGen/ARM/fptoint.ll create mode 100644 test/CodeGen/ARM/fsubs.ll create mode 100644 test/CodeGen/ARM/fusedMAC.ll create mode 100644 test/CodeGen/ARM/global-merge-addrspace.ll create mode 100644 test/CodeGen/ARM/global-merge.ll create mode 100644 test/CodeGen/ARM/globals.ll create mode 100644 test/CodeGen/ARM/gpr-paired-spill-thumbinst.ll create mode 100644 test/CodeGen/ARM/gpr-paired-spill.ll create mode 100644 test/CodeGen/ARM/gv-stubs-crash.ll create mode 100644 test/CodeGen/ARM/hardfloat_neon.ll create mode 100644 test/CodeGen/ARM/hello.ll create mode 100644 test/CodeGen/ARM/hidden-vis-2.ll create mode 100644 test/CodeGen/ARM/hidden-vis-3.ll create mode 100644 test/CodeGen/ARM/hidden-vis.ll create mode 100644 test/CodeGen/ARM/iabs.ll create mode 100644 test/CodeGen/ARM/ifconv-kills.ll create mode 100644 test/CodeGen/ARM/ifconv-regmask.ll create mode 100644 test/CodeGen/ARM/ifcvt1.ll create mode 100644 test/CodeGen/ARM/ifcvt10.ll create mode 100644 test/CodeGen/ARM/ifcvt11.ll create mode 100644 test/CodeGen/ARM/ifcvt12.ll create mode 100644 test/CodeGen/ARM/ifcvt2.ll create mode 100644 test/CodeGen/ARM/ifcvt3.ll create mode 100644 test/CodeGen/ARM/ifcvt4.ll create mode 100644 test/CodeGen/ARM/ifcvt5.ll create mode 100644 test/CodeGen/ARM/ifcvt6.ll create mode 100644 test/CodeGen/ARM/ifcvt7.ll create mode 100644 test/CodeGen/ARM/ifcvt8.ll create mode 100644 test/CodeGen/ARM/ifcvt9.ll create mode 100644 test/CodeGen/ARM/illegal-vector-bitcast.ll create mode 100644 test/CodeGen/ARM/imm.ll create mode 100644 test/CodeGen/ARM/indirect-reg-input.ll create mode 100644 test/CodeGen/ARM/indirectbr-2.ll create mode 100644 test/CodeGen/ARM/indirectbr-3.ll create mode 100644 test/CodeGen/ARM/indirectbr.ll create mode 100644 test/CodeGen/ARM/inlineasm-64bit.ll create mode 100644 test/CodeGen/ARM/inlineasm-imm-arm.ll create mode 100644 test/CodeGen/ARM/inlineasm.ll create mode 100644 test/CodeGen/ARM/inlineasm2.ll create mode 100644 test/CodeGen/ARM/inlineasm3.ll create mode 100644 test/CodeGen/ARM/inlineasm4.ll create mode 100644 test/CodeGen/ARM/insn-sched1.ll create mode 100644 test/CodeGen/ARM/int-to-fp.ll create mode 100644 test/CodeGen/ARM/integer_insertelement.ll create mode 100644 test/CodeGen/ARM/interrupt-attr.ll create mode 100644 test/CodeGen/ARM/intrinsics-crypto.ll create mode 100644 test/CodeGen/ARM/intrinsics-v8.ll create mode 100644 test/CodeGen/ARM/intrinsics.ll create mode 100644 test/CodeGen/ARM/invoke-donothing-assert.ll create mode 100644 test/CodeGen/ARM/ispositive.ll create mode 100644 test/CodeGen/ARM/jumptable-label.ll create mode 100644 test/CodeGen/ARM/large-stack.ll create mode 100644 test/CodeGen/ARM/ldm.ll create mode 100644 test/CodeGen/ARM/ldr.ll create mode 100644 test/CodeGen/ARM/ldr_ext.ll create mode 100644 test/CodeGen/ARM/ldr_frame.ll create mode 100644 test/CodeGen/ARM/ldr_post.ll create mode 100644 test/CodeGen/ARM/ldr_pre.ll create mode 100644 test/CodeGen/ARM/ldrd-memoper.ll create mode 100644 test/CodeGen/ARM/ldrd.ll create mode 100644 test/CodeGen/ARM/ldst-f32-2-i32.ll create mode 100644 test/CodeGen/ARM/ldstrex.ll create mode 100644 test/CodeGen/ARM/lit.local.cfg create mode 100644 test/CodeGen/ARM/load-address-masked.ll create mode 100644 test/CodeGen/ARM/load-global.ll create mode 100644 test/CodeGen/ARM/load.ll create mode 100644 test/CodeGen/ARM/load_i1_select.ll create mode 100644 test/CodeGen/ARM/log2_not_readnone.ll create mode 100644 test/CodeGen/ARM/long-setcc.ll create mode 100644 test/CodeGen/ARM/long.ll create mode 100644 test/CodeGen/ARM/longMAC.ll create mode 100644 test/CodeGen/ARM/long_shift.ll create mode 100644 test/CodeGen/ARM/lsr-code-insertion.ll create mode 100644 test/CodeGen/ARM/lsr-icmp-imm.ll create mode 100644 test/CodeGen/ARM/lsr-scale-addr-mode.ll create mode 100644 test/CodeGen/ARM/lsr-unfolded-offset.ll create mode 100644 test/CodeGen/ARM/machine-cse-cmp.ll create mode 100644 test/CodeGen/ARM/machine-licm.ll create mode 100644 test/CodeGen/ARM/mem.ll create mode 100644 test/CodeGen/ARM/memcpy-inline.ll create mode 100644 test/CodeGen/ARM/memfunc.ll create mode 100644 test/CodeGen/ARM/memset-inline.ll create mode 100644 test/CodeGen/ARM/misched-copy-arm.ll create mode 100644 test/CodeGen/ARM/mls.ll create mode 100644 test/CodeGen/ARM/movt-movw-global.ll create mode 100644 test/CodeGen/ARM/movt.ll create mode 100644 test/CodeGen/ARM/mul.ll create mode 100644 test/CodeGen/ARM/mul_const.ll create mode 100644 test/CodeGen/ARM/mulhi.ll create mode 100644 test/CodeGen/ARM/mult-alt-generic-arm.ll create mode 100644 test/CodeGen/ARM/mvn.ll create mode 100644 test/CodeGen/ARM/neon-fma.ll create mode 100644 test/CodeGen/ARM/neon-spfp.ll create mode 100644 test/CodeGen/ARM/neon_arith1.ll create mode 100644 test/CodeGen/ARM/neon_cmp.ll create mode 100644 test/CodeGen/ARM/neon_div.ll create mode 100644 test/CodeGen/ARM/neon_fpconv.ll create mode 100644 test/CodeGen/ARM/neon_ld1.ll create mode 100644 test/CodeGen/ARM/neon_ld2.ll create mode 100644 test/CodeGen/ARM/neon_minmax.ll create mode 100644 test/CodeGen/ARM/neon_shift.ll create mode 100644 test/CodeGen/ARM/neon_spill.ll create mode 100644 test/CodeGen/ARM/neon_vabs.ll create mode 100644 test/CodeGen/ARM/no-fpu.ll create mode 100644 test/CodeGen/ARM/nop_concat_vectors.ll create mode 100644 test/CodeGen/ARM/noreturn.ll create mode 100644 test/CodeGen/ARM/odr_comdat.ll create mode 100644 test/CodeGen/ARM/opt-shuff-tstore.ll create mode 100644 test/CodeGen/ARM/optselect-regclass.ll create mode 100644 test/CodeGen/ARM/pack.ll create mode 100644 test/CodeGen/ARM/peephole-bitcast.ll create mode 100644 test/CodeGen/ARM/phi.ll create mode 100644 test/CodeGen/ARM/pic.ll create mode 100644 test/CodeGen/ARM/popcnt.ll create mode 100644 test/CodeGen/ARM/pr13249.ll create mode 100644 test/CodeGen/ARM/pr3502.ll create mode 100644 test/CodeGen/ARM/prefetch-thumb.ll create mode 100644 test/CodeGen/ARM/prefetch.ll create mode 100644 test/CodeGen/ARM/private.ll create mode 100644 test/CodeGen/ARM/readcyclecounter.ll create mode 100644 test/CodeGen/ARM/reg_sequence.ll create mode 100644 test/CodeGen/ARM/ret0.ll create mode 100644 test/CodeGen/ARM/ret_arg1.ll create mode 100644 test/CodeGen/ARM/ret_arg2.ll create mode 100644 test/CodeGen/ARM/ret_arg3.ll create mode 100644 test/CodeGen/ARM/ret_arg4.ll create mode 100644 test/CodeGen/ARM/ret_arg5.ll create mode 100644 test/CodeGen/ARM/ret_f32_arg2.ll create mode 100644 test/CodeGen/ARM/ret_f32_arg5.ll create mode 100644 test/CodeGen/ARM/ret_f64_arg2.ll create mode 100644 test/CodeGen/ARM/ret_f64_arg_reg_split.ll create mode 100644 test/CodeGen/ARM/ret_f64_arg_split.ll create mode 100644 test/CodeGen/ARM/ret_f64_arg_stack.ll create mode 100644 test/CodeGen/ARM/ret_i128_arg2.ll create mode 100644 test/CodeGen/ARM/ret_i64_arg2.ll create mode 100644 test/CodeGen/ARM/ret_i64_arg3.ll create mode 100644 test/CodeGen/ARM/ret_i64_arg_split.ll create mode 100644 test/CodeGen/ARM/ret_sret_vector.ll create mode 100644 test/CodeGen/ARM/ret_void.ll create mode 100644 test/CodeGen/ARM/returned-ext.ll create mode 100644 test/CodeGen/ARM/returned-trunc-tail-calls.ll create mode 100644 test/CodeGen/ARM/rev.ll create mode 100644 test/CodeGen/ARM/sbfx.ll create mode 100644 test/CodeGen/ARM/section-name.ll create mode 100644 test/CodeGen/ARM/section.ll create mode 100644 test/CodeGen/ARM/select-imm.ll create mode 100644 test/CodeGen/ARM/select-undef.ll create mode 100644 test/CodeGen/ARM/select.ll create mode 100644 test/CodeGen/ARM/select_xform.ll create mode 100644 test/CodeGen/ARM/setcc-sentinals.ll create mode 100644 test/CodeGen/ARM/shifter_operand.ll create mode 100644 test/CodeGen/ARM/shuffle.ll create mode 100644 test/CodeGen/ARM/sincos.ll create mode 100644 test/CodeGen/ARM/sjlj-prepare-critical-edge.ll create mode 100644 test/CodeGen/ARM/smml.ll create mode 100644 test/CodeGen/ARM/smul.ll create mode 100644 test/CodeGen/ARM/spill-q.ll create mode 100644 test/CodeGen/ARM/stack-frame.ll create mode 100644 test/CodeGen/ARM/stack-protector-bmovpcb_call.ll create mode 100644 test/CodeGen/ARM/stm.ll create mode 100644 test/CodeGen/ARM/str_post.ll create mode 100644 test/CodeGen/ARM/str_pre-2.ll create mode 100644 test/CodeGen/ARM/str_pre.ll create mode 100644 test/CodeGen/ARM/str_trunc.ll create mode 100644 test/CodeGen/ARM/struct-byval-frame-index.ll create mode 100644 test/CodeGen/ARM/struct_byval.ll create mode 100644 test/CodeGen/ARM/struct_byval_arm_t1_t2.ll create mode 100644 test/CodeGen/ARM/sub-cmp-peephole.ll create mode 100644 test/CodeGen/ARM/sub.ll create mode 100644 test/CodeGen/ARM/subreg-remat.ll create mode 100644 test/CodeGen/ARM/swift-atomics.ll create mode 100644 test/CodeGen/ARM/swift-vldm.ll create mode 100644 test/CodeGen/ARM/sxt_rot.ll create mode 100644 test/CodeGen/ARM/t2-imm.ll create mode 100644 test/CodeGen/ARM/tail-dup.ll create mode 100644 test/CodeGen/ARM/tail-opts.ll create mode 100644 test/CodeGen/ARM/test-sharedidx.ll create mode 100644 test/CodeGen/ARM/this-return.ll create mode 100644 test/CodeGen/ARM/thread_pointer.ll create mode 100644 test/CodeGen/ARM/thumb1-varalloc.ll create mode 100644 test/CodeGen/ARM/thumb2-it-block.ll create mode 100644 test/CodeGen/ARM/tls-models.ll create mode 100644 test/CodeGen/ARM/tls1.ll create mode 100644 test/CodeGen/ARM/tls2.ll create mode 100644 test/CodeGen/ARM/tls3.ll create mode 100644 test/CodeGen/ARM/trap.ll create mode 100644 test/CodeGen/ARM/trunc_ldr.ll create mode 100644 test/CodeGen/ARM/truncstore-dag-combine.ll create mode 100644 test/CodeGen/ARM/tst_teq.ll create mode 100644 test/CodeGen/ARM/twoaddrinstr.ll create mode 100644 test/CodeGen/ARM/uint64tof64.ll create mode 100644 test/CodeGen/ARM/umulo-32.ll create mode 100644 test/CodeGen/ARM/unaligned_load_store.ll create mode 100644 test/CodeGen/ARM/unaligned_load_store_vector.ll create mode 100644 test/CodeGen/ARM/undef-sext.ll create mode 100644 test/CodeGen/ARM/unord.ll create mode 100644 test/CodeGen/ARM/unsafe-fsub.ll create mode 100644 test/CodeGen/ARM/unwind-init.ll create mode 100644 test/CodeGen/ARM/uxt_rot.ll create mode 100644 test/CodeGen/ARM/uxtb.ll create mode 100644 test/CodeGen/ARM/v1-constant-fold.ll create mode 100644 test/CodeGen/ARM/va_arg.ll create mode 100644 test/CodeGen/ARM/vaba.ll create mode 100644 test/CodeGen/ARM/vabd.ll create mode 100644 test/CodeGen/ARM/vabs.ll create mode 100644 test/CodeGen/ARM/vadd.ll create mode 100644 test/CodeGen/ARM/vargs.ll create mode 100644 test/CodeGen/ARM/vargs_align.ll create mode 100644 test/CodeGen/ARM/vbits.ll create mode 100644 test/CodeGen/ARM/vbsl-constant.ll create mode 100644 test/CodeGen/ARM/vbsl.ll create mode 100644 test/CodeGen/ARM/vceq.ll create mode 100644 test/CodeGen/ARM/vcge.ll create mode 100644 test/CodeGen/ARM/vcgt.ll create mode 100644 test/CodeGen/ARM/vcnt.ll create mode 100644 test/CodeGen/ARM/vcombine.ll create mode 100644 test/CodeGen/ARM/vcvt-cost.ll create mode 100644 test/CodeGen/ARM/vcvt-v8.ll create mode 100644 test/CodeGen/ARM/vcvt.ll create mode 100644 test/CodeGen/ARM/vcvt_combine.ll create mode 100644 test/CodeGen/ARM/vdiv_combine.ll create mode 100644 test/CodeGen/ARM/vdup.ll create mode 100644 test/CodeGen/ARM/vector-DAGCombine.ll create mode 100644 test/CodeGen/ARM/vector-extend-narrow.ll create mode 100644 test/CodeGen/ARM/vext.ll create mode 100644 test/CodeGen/ARM/vfcmp.ll create mode 100644 test/CodeGen/ARM/vfloatintrinsics.ll create mode 100644 test/CodeGen/ARM/vfp.ll create mode 100644 test/CodeGen/ARM/vget_lane.ll create mode 100644 test/CodeGen/ARM/vhadd.ll create mode 100644 test/CodeGen/ARM/vhsub.ll create mode 100644 test/CodeGen/ARM/vicmp.ll create mode 100644 test/CodeGen/ARM/vld1.ll create mode 100644 test/CodeGen/ARM/vld2.ll create mode 100644 test/CodeGen/ARM/vld3.ll create mode 100644 test/CodeGen/ARM/vld4.ll create mode 100644 test/CodeGen/ARM/vlddup.ll create mode 100644 test/CodeGen/ARM/vldlane.ll create mode 100644 test/CodeGen/ARM/vldm-liveness.ll create mode 100644 test/CodeGen/ARM/vldm-sched-a9.ll create mode 100644 test/CodeGen/ARM/vminmax.ll create mode 100644 test/CodeGen/ARM/vminmaxnm.ll create mode 100644 test/CodeGen/ARM/vmla.ll create mode 100644 test/CodeGen/ARM/vmls.ll create mode 100644 test/CodeGen/ARM/vmov.ll create mode 100644 test/CodeGen/ARM/vmul.ll create mode 100644 test/CodeGen/ARM/vneg.ll create mode 100644 test/CodeGen/ARM/vpadal.ll create mode 100644 test/CodeGen/ARM/vpadd.ll create mode 100644 test/CodeGen/ARM/vpminmax.ll create mode 100644 test/CodeGen/ARM/vqadd.ll create mode 100644 test/CodeGen/ARM/vqdmul.ll create mode 100644 test/CodeGen/ARM/vqshl.ll create mode 100644 test/CodeGen/ARM/vqshrn.ll create mode 100644 test/CodeGen/ARM/vqsub.ll create mode 100644 test/CodeGen/ARM/vrec.ll create mode 100644 test/CodeGen/ARM/vrev.ll create mode 100644 test/CodeGen/ARM/vsel.ll create mode 100644 test/CodeGen/ARM/vselect_imax.ll create mode 100644 test/CodeGen/ARM/vshift.ll create mode 100644 test/CodeGen/ARM/vshiftins.ll create mode 100644 test/CodeGen/ARM/vshl.ll create mode 100644 test/CodeGen/ARM/vshll.ll create mode 100644 test/CodeGen/ARM/vshrn.ll create mode 100644 test/CodeGen/ARM/vsra.ll create mode 100644 test/CodeGen/ARM/vst1.ll create mode 100644 test/CodeGen/ARM/vst2.ll create mode 100644 test/CodeGen/ARM/vst3.ll create mode 100644 test/CodeGen/ARM/vst4.ll create mode 100644 test/CodeGen/ARM/vstlane.ll create mode 100644 test/CodeGen/ARM/vsub.ll create mode 100644 test/CodeGen/ARM/vtbl.ll create mode 100644 test/CodeGen/ARM/vtrn.ll create mode 100644 test/CodeGen/ARM/vuzp.ll create mode 100644 test/CodeGen/ARM/vzip.ll create mode 100644 test/CodeGen/ARM/warn-stack.ll create mode 100644 test/CodeGen/ARM/weak.ll create mode 100644 test/CodeGen/ARM/weak2.ll create mode 100644 test/CodeGen/ARM/widen-vmovs.ll create mode 100644 test/CodeGen/ARM/zextload_demandedbits.ll create mode 100644 test/CodeGen/CPP/2007-06-16-Funcname.ll create mode 100644 test/CodeGen/CPP/2009-05-01-Long-Double.ll create mode 100644 test/CodeGen/CPP/2009-05-04-CondBr.ll create mode 100644 test/CodeGen/CPP/2012-02-05-UnitVarCrash.ll create mode 100644 test/CodeGen/CPP/lit.local.cfg create mode 100644 test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll create mode 100644 test/CodeGen/Generic/2002-04-16-StackFrameSizeAlignment.ll create mode 100644 test/CodeGen/Generic/2003-05-27-phifcmpd.ll create mode 100644 test/CodeGen/Generic/2003-05-27-useboolinotherbb.ll create mode 100644 test/CodeGen/Generic/2003-05-27-usefsubasbool.ll create mode 100644 test/CodeGen/Generic/2003-05-28-ManyArgs.ll create mode 100644 test/CodeGen/Generic/2003-05-30-BadFoldGEP.ll create mode 100644 test/CodeGen/Generic/2003-05-30-BadPreselectPhi.ll create mode 100644 test/CodeGen/Generic/2003-07-06-BadIntCmp.ll create mode 100644 test/CodeGen/Generic/2003-07-07-BadLongConst.ll create mode 100644 test/CodeGen/Generic/2003-07-08-BadCastToBool.ll create mode 100644 test/CodeGen/Generic/2003-07-29-BadConstSbyte.ll create mode 100644 test/CodeGen/Generic/2004-05-09-LiveVarPartialRegister.ll create mode 100644 test/CodeGen/Generic/2005-01-18-SetUO-InfLoop.ll create mode 100644 test/CodeGen/Generic/2005-04-09-GlobalInPHI.ll create mode 100644 test/CodeGen/Generic/2005-10-18-ZeroSizeStackObject.ll create mode 100644 test/CodeGen/Generic/2005-10-21-longlonggtu.ll create mode 100644 test/CodeGen/Generic/2005-12-01-Crash.ll create mode 100644 test/CodeGen/Generic/2005-12-12-ExpandSextInreg.ll create mode 100644 test/CodeGen/Generic/2006-01-12-BadSetCCFold.ll create mode 100644 test/CodeGen/Generic/2006-01-18-InvalidBranchOpcodeAssert.ll create mode 100644 test/CodeGen/Generic/2006-02-12-InsertLibcall.ll create mode 100644 test/CodeGen/Generic/2006-03-01-dagcombineinfloop.ll create mode 100644 test/CodeGen/Generic/2006-04-26-SetCCAnd.ll create mode 100644 test/CodeGen/Generic/2006-04-28-Sign-extend-bool.ll create mode 100644 test/CodeGen/Generic/2006-05-06-GEP-Cast-Sink-Crash.ll create mode 100644 test/CodeGen/Generic/2006-06-12-LowerSwitchCrash.ll create mode 100644 test/CodeGen/Generic/2006-06-13-ComputeMaskedBitsCrash.ll create mode 100644 test/CodeGen/Generic/2006-06-28-SimplifySetCCCrash.ll create mode 100644 test/CodeGen/Generic/2006-07-03-schedulers.ll create mode 100644 test/CodeGen/Generic/2006-08-30-CoalescerCrash.ll create mode 100644 test/CodeGen/Generic/2006-09-02-LocalAllocCrash.ll create mode 100644 test/CodeGen/Generic/2006-09-06-SwitchLowering.ll create mode 100644 test/CodeGen/Generic/2006-10-27-CondFolding.ll create mode 100644 test/CodeGen/Generic/2006-10-29-Crash.ll create mode 100644 test/CodeGen/Generic/2006-11-20-DAGCombineCrash.ll create mode 100644 test/CodeGen/Generic/2007-01-15-LoadSelectCycle.ll create mode 100644 test/CodeGen/Generic/2007-02-25-invoke.ll create mode 100644 test/CodeGen/Generic/2007-04-08-MultipleFrameIndices.ll create mode 100644 test/CodeGen/Generic/2007-04-13-SwitchLowerBadPhi.ll create mode 100644 test/CodeGen/Generic/2007-04-17-lsr-crash.ll create mode 100644 test/CodeGen/Generic/2007-04-27-InlineAsm-X-Dest.ll create mode 100644 test/CodeGen/Generic/2007-04-27-LargeMemObject.ll create mode 100644 test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll create mode 100644 test/CodeGen/Generic/2007-05-03-EHTypeInfo.ll create mode 100644 test/CodeGen/Generic/2007-05-15-InfiniteRecursion.ll create mode 100644 test/CodeGen/Generic/2007-12-17-InvokeAsm.ll create mode 100644 test/CodeGen/Generic/2007-12-31-UnusedSelector.ll create mode 100644 test/CodeGen/Generic/2008-01-25-dag-combine-mul.ll create mode 100644 test/CodeGen/Generic/2008-01-30-LoadCrash.ll create mode 100644 test/CodeGen/Generic/2008-02-04-Ctlz.ll create mode 100644 test/CodeGen/Generic/2008-02-04-ExtractSubvector.ll create mode 100644 test/CodeGen/Generic/2008-02-20-MatchingMem.ll create mode 100644 test/CodeGen/Generic/2008-02-25-NegateZero.ll create mode 100644 test/CodeGen/Generic/2008-02-26-NegatableCrash.ll create mode 100644 test/CodeGen/Generic/2008-08-07-PtrToInt-SmallerInt.ll create mode 100644 test/CodeGen/Generic/2009-03-17-LSR-APInt.ll create mode 100644 test/CodeGen/Generic/2009-03-29-SoftFloatVectorExtract.ll create mode 100644 test/CodeGen/Generic/2009-04-10-SinkCrash.ll create mode 100644 test/CodeGen/Generic/2009-04-28-i128-cmp-crash.ll create mode 100644 test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll create mode 100644 test/CodeGen/Generic/2010-07-27-DAGCombineCrash.ll create mode 100644 test/CodeGen/Generic/2010-11-04-BigByval.ll create mode 100644 test/CodeGen/Generic/2010-ZeroSizedArg.ll create mode 100644 test/CodeGen/Generic/2011-01-06-BigNumberCrash.ll create mode 100644 test/CodeGen/Generic/2011-07-07-ScheduleDAGCrash.ll create mode 100644 test/CodeGen/Generic/2012-06-08-APIntCrash.ll create mode 100644 test/CodeGen/Generic/2013-03-20-APFloatCrash.ll create mode 100644 test/CodeGen/Generic/APIntLoadStore.ll create mode 100644 test/CodeGen/Generic/APIntParam.ll create mode 100644 test/CodeGen/Generic/APIntSextParam.ll create mode 100644 test/CodeGen/Generic/APIntZextParam.ll create mode 100644 test/CodeGen/Generic/BasicInstrs.ll create mode 100644 test/CodeGen/Generic/ConstantExprLowering.ll create mode 100644 test/CodeGen/Generic/MachineBranchProb.ll create mode 100644 test/CodeGen/Generic/Makefile create mode 100644 test/CodeGen/Generic/add-with-overflow-128.ll create mode 100644 test/CodeGen/Generic/add-with-overflow-24.ll create mode 100644 test/CodeGen/Generic/add-with-overflow.ll create mode 100644 test/CodeGen/Generic/addr-label.ll create mode 100644 test/CodeGen/Generic/annotate.ll create mode 100644 test/CodeGen/Generic/asm-large-immediate.ll create mode 100644 test/CodeGen/Generic/badCallArgLRLLVM.ll create mode 100644 test/CodeGen/Generic/badFoldGEP.ll create mode 100644 test/CodeGen/Generic/badarg6.ll create mode 100644 test/CodeGen/Generic/bool-to-double.ll create mode 100644 test/CodeGen/Generic/builtin-expect.ll create mode 100644 test/CodeGen/Generic/call-ret0.ll create mode 100644 test/CodeGen/Generic/call-ret42.ll create mode 100644 test/CodeGen/Generic/call-void.ll create mode 100644 test/CodeGen/Generic/call2-ret0.ll create mode 100644 test/CodeGen/Generic/cast-fp.ll create mode 100644 test/CodeGen/Generic/constindices.ll create mode 100644 test/CodeGen/Generic/crash.ll create mode 100644 test/CodeGen/Generic/dag-combine-crash.ll create mode 100644 test/CodeGen/Generic/dbg_value.ll create mode 100644 test/CodeGen/Generic/div-neg-power-2.ll create mode 100644 test/CodeGen/Generic/donothing.ll create mode 100644 test/CodeGen/Generic/edge-bundles-blockIDs.ll create mode 100644 test/CodeGen/Generic/empty-load-store.ll create mode 100644 test/CodeGen/Generic/exception-handling.ll create mode 100644 test/CodeGen/Generic/externally_available.ll create mode 100644 test/CodeGen/Generic/fastcall.ll create mode 100644 test/CodeGen/Generic/fneg-fabs.ll create mode 100644 test/CodeGen/Generic/fp-to-int-invalid.ll create mode 100644 test/CodeGen/Generic/fp_to_int.ll create mode 100644 test/CodeGen/Generic/fpowi-promote.ll create mode 100644 test/CodeGen/Generic/fwdtwice.ll create mode 100644 test/CodeGen/Generic/global-ret0.ll create mode 100644 test/CodeGen/Generic/hello.ll create mode 100644 test/CodeGen/Generic/i128-addsub.ll create mode 100644 test/CodeGen/Generic/i128-arith.ll create mode 100644 test/CodeGen/Generic/inline-asm-mem-clobber.ll create mode 100644 test/CodeGen/Generic/inline-asm-special-strings.ll create mode 100644 test/CodeGen/Generic/intrinsics.ll create mode 100644 test/CodeGen/Generic/invalid-memcpy.ll create mode 100644 test/CodeGen/Generic/isunord.ll create mode 100644 test/CodeGen/Generic/llvm-ct-intrinsics.ll create mode 100644 test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll create mode 100644 test/CodeGen/Generic/negintconst.ll create mode 100644 test/CodeGen/Generic/nested-select.ll create mode 100644 test/CodeGen/Generic/overflow.ll create mode 100644 test/CodeGen/Generic/pr12507.ll create mode 100644 test/CodeGen/Generic/pr2625.ll create mode 100644 test/CodeGen/Generic/pr3288.ll create mode 100644 test/CodeGen/Generic/print-add.ll create mode 100644 test/CodeGen/Generic/print-after.ll create mode 100644 test/CodeGen/Generic/print-arith-fp.ll create mode 100644 test/CodeGen/Generic/print-arith-int.ll create mode 100644 test/CodeGen/Generic/print-int.ll create mode 100644 test/CodeGen/Generic/print-machineinstrs.ll create mode 100644 test/CodeGen/Generic/print-mul-exp.ll create mode 100644 test/CodeGen/Generic/print-mul.ll create mode 100644 test/CodeGen/Generic/print-shift.ll create mode 100644 test/CodeGen/Generic/ptr-annotate.ll create mode 100644 test/CodeGen/Generic/ret0.ll create mode 100644 test/CodeGen/Generic/ret42.ll create mode 100644 test/CodeGen/Generic/select-cc.ll create mode 100644 test/CodeGen/Generic/select.ll create mode 100644 test/CodeGen/Generic/shift-int64.ll create mode 100644 test/CodeGen/Generic/stacksave-restore.ll create mode 100644 test/CodeGen/Generic/stop-after.ll create mode 100644 test/CodeGen/Generic/storetrunc-fp.ll create mode 100644 test/CodeGen/Generic/switch-lower-feature.ll create mode 100644 test/CodeGen/Generic/switch-lower.ll create mode 100644 test/CodeGen/Generic/trap.ll create mode 100644 test/CodeGen/Generic/undef-phi.ll create mode 100644 test/CodeGen/Generic/v-split.ll create mode 100644 test/CodeGen/Generic/vector-casts.ll create mode 100644 test/CodeGen/Generic/vector-constantexpr.ll create mode 100644 test/CodeGen/Generic/vector-identity-shuffle.ll create mode 100644 test/CodeGen/Generic/vector.ll create mode 100644 test/CodeGen/Generic/zero-sized-array.ll create mode 100644 test/CodeGen/Hexagon/BranchPredict.ll create mode 100644 test/CodeGen/Hexagon/absaddr-store.ll create mode 100644 test/CodeGen/Hexagon/absimm.ll create mode 100644 test/CodeGen/Hexagon/adde.ll create mode 100644 test/CodeGen/Hexagon/always-ext.ll create mode 100644 test/CodeGen/Hexagon/args.ll create mode 100644 test/CodeGen/Hexagon/ashift-left-right.ll create mode 100644 test/CodeGen/Hexagon/block-addr.ll create mode 100644 test/CodeGen/Hexagon/cext-check.ll create mode 100644 test/CodeGen/Hexagon/cext-valid-packet1.ll create mode 100644 test/CodeGen/Hexagon/cext-valid-packet2.ll create mode 100644 test/CodeGen/Hexagon/cmp-to-genreg.ll create mode 100644 test/CodeGen/Hexagon/cmp-to-predreg.ll create mode 100644 test/CodeGen/Hexagon/cmp_pred.ll create mode 100644 test/CodeGen/Hexagon/cmp_pred2.ll create mode 100644 test/CodeGen/Hexagon/cmp_pred_reg.ll create mode 100644 test/CodeGen/Hexagon/cmpb_pred.ll create mode 100644 test/CodeGen/Hexagon/combine.ll create mode 100644 test/CodeGen/Hexagon/combine_ir.ll create mode 100644 test/CodeGen/Hexagon/convertdptoint.ll create mode 100644 test/CodeGen/Hexagon/convertdptoll.ll create mode 100644 test/CodeGen/Hexagon/convertsptoint.ll create mode 100644 test/CodeGen/Hexagon/convertsptoll.ll create mode 100644 test/CodeGen/Hexagon/ctlz-cttz-ctpop.ll create mode 100644 test/CodeGen/Hexagon/dadd.ll create mode 100644 test/CodeGen/Hexagon/dmul.ll create mode 100644 test/CodeGen/Hexagon/double.ll create mode 100644 test/CodeGen/Hexagon/doubleconvert-ieee-rnd-near.ll create mode 100644 test/CodeGen/Hexagon/dsub.ll create mode 100644 test/CodeGen/Hexagon/dualstore.ll create mode 100644 test/CodeGen/Hexagon/extload-combine.ll create mode 100644 test/CodeGen/Hexagon/fadd.ll create mode 100644 test/CodeGen/Hexagon/fcmp.ll create mode 100644 test/CodeGen/Hexagon/float.ll create mode 100644 test/CodeGen/Hexagon/floatconvert-ieee-rnd-near.ll create mode 100644 test/CodeGen/Hexagon/fmul.ll create mode 100644 test/CodeGen/Hexagon/frame.ll create mode 100644 test/CodeGen/Hexagon/fsub.ll create mode 100644 test/CodeGen/Hexagon/fusedandshift.ll create mode 100644 test/CodeGen/Hexagon/gp-plus-offset-load.ll create mode 100644 test/CodeGen/Hexagon/gp-plus-offset-store.ll create mode 100644 test/CodeGen/Hexagon/gp-rel.ll create mode 100644 test/CodeGen/Hexagon/hwloop-cleanup.ll create mode 100644 test/CodeGen/Hexagon/hwloop-const.ll create mode 100644 test/CodeGen/Hexagon/hwloop-dbg.ll create mode 100644 test/CodeGen/Hexagon/hwloop-le.ll create mode 100644 test/CodeGen/Hexagon/hwloop-lt.ll create mode 100644 test/CodeGen/Hexagon/hwloop-lt1.ll create mode 100644 test/CodeGen/Hexagon/hwloop-ne.ll create mode 100644 test/CodeGen/Hexagon/i16_VarArg.ll create mode 100644 test/CodeGen/Hexagon/i1_VarArg.ll create mode 100644 test/CodeGen/Hexagon/i8_VarArg.ll create mode 100644 test/CodeGen/Hexagon/idxload-with-zero-offset.ll create mode 100644 test/CodeGen/Hexagon/indirect-br.ll create mode 100644 test/CodeGen/Hexagon/lit.local.cfg create mode 100644 test/CodeGen/Hexagon/macint.ll create mode 100644 test/CodeGen/Hexagon/memops.ll create mode 100644 test/CodeGen/Hexagon/memops1.ll create mode 100644 test/CodeGen/Hexagon/memops2.ll create mode 100644 test/CodeGen/Hexagon/memops3.ll create mode 100644 test/CodeGen/Hexagon/misaligned-access.ll create mode 100644 test/CodeGen/Hexagon/mpy.ll create mode 100644 test/CodeGen/Hexagon/newvaluejump.ll create mode 100644 test/CodeGen/Hexagon/newvaluejump2.ll create mode 100644 test/CodeGen/Hexagon/newvaluestore.ll create mode 100644 test/CodeGen/Hexagon/opt-fabs.ll create mode 100644 test/CodeGen/Hexagon/opt-fneg.ll create mode 100644 test/CodeGen/Hexagon/packetize_cond_inst.ll create mode 100644 test/CodeGen/Hexagon/postinc-load.ll create mode 100644 test/CodeGen/Hexagon/postinc-store.ll create mode 100644 test/CodeGen/Hexagon/pred-absolute-store.ll create mode 100644 test/CodeGen/Hexagon/pred-gp.ll create mode 100644 test/CodeGen/Hexagon/pred-instrs.ll create mode 100644 test/CodeGen/Hexagon/predicate-copy.ll create mode 100644 test/CodeGen/Hexagon/remove_lsr.ll create mode 100644 test/CodeGen/Hexagon/simpletailcall.ll create mode 100644 test/CodeGen/Hexagon/split-const32-const64.ll create mode 100644 test/CodeGen/Hexagon/static.ll create mode 100644 test/CodeGen/Hexagon/struct_args.ll create mode 100644 test/CodeGen/Hexagon/struct_args_large.ll create mode 100644 test/CodeGen/Hexagon/sube.ll create mode 100644 test/CodeGen/Hexagon/tail-call-trunc.ll create mode 100644 test/CodeGen/Hexagon/tfr-to-combine.ll create mode 100644 test/CodeGen/Hexagon/union-1.ll create mode 100644 test/CodeGen/Hexagon/vaddh.ll create mode 100644 test/CodeGen/Hexagon/validate-offset.ll create mode 100644 test/CodeGen/Hexagon/zextloadi1.ll create mode 100644 test/CodeGen/Inputs/DbgValueOtherTargets.ll create mode 100644 test/CodeGen/MSP430/2009-05-10-CyclicDAG.ll create mode 100644 test/CodeGen/MSP430/2009-05-17-Rot.ll create mode 100644 test/CodeGen/MSP430/2009-05-17-Shift.ll create mode 100644 test/CodeGen/MSP430/2009-05-19-DoubleSplit.ll create mode 100644 test/CodeGen/MSP430/2009-08-25-DynamicStackAlloc.ll create mode 100644 test/CodeGen/MSP430/2009-09-18-AbsoluteAddr.ll create mode 100644 test/CodeGen/MSP430/2009-10-10-OrImpDef.ll create mode 100644 test/CodeGen/MSP430/2009-11-05-8BitLibcalls.ll create mode 100644 test/CodeGen/MSP430/2009-11-08-InvalidResNo.ll create mode 100644 test/CodeGen/MSP430/2009-11-20-NewNode.ll create mode 100644 test/CodeGen/MSP430/2009-12-21-FrameAddr.ll create mode 100644 test/CodeGen/MSP430/2009-12-22-InlineAsm.ll create mode 100644 test/CodeGen/MSP430/2010-05-01-CombinerAnd.ll create mode 100644 test/CodeGen/MSP430/AddrMode-bis-rx.ll create mode 100644 test/CodeGen/MSP430/AddrMode-bis-xr.ll create mode 100644 test/CodeGen/MSP430/AddrMode-mov-rx.ll create mode 100644 test/CodeGen/MSP430/AddrMode-mov-xr.ll create mode 100644 test/CodeGen/MSP430/DbgValueOtherTargets.test create mode 100644 test/CodeGen/MSP430/Inst16mi.ll create mode 100644 test/CodeGen/MSP430/Inst16mm.ll create mode 100644 test/CodeGen/MSP430/Inst16mr.ll create mode 100644 test/CodeGen/MSP430/Inst16ri.ll create mode 100644 test/CodeGen/MSP430/Inst16rm.ll create mode 100644 test/CodeGen/MSP430/Inst16rr.ll create mode 100644 test/CodeGen/MSP430/Inst8mi.ll create mode 100644 test/CodeGen/MSP430/Inst8mm.ll create mode 100644 test/CodeGen/MSP430/Inst8mr.ll create mode 100644 test/CodeGen/MSP430/Inst8ri.ll create mode 100644 test/CodeGen/MSP430/Inst8rm.ll create mode 100644 test/CodeGen/MSP430/Inst8rr.ll create mode 100644 test/CodeGen/MSP430/bit.ll create mode 100644 test/CodeGen/MSP430/byval.ll create mode 100644 test/CodeGen/MSP430/cc_args.ll create mode 100644 test/CodeGen/MSP430/cc_ret.ll create mode 100644 test/CodeGen/MSP430/fp.ll create mode 100644 test/CodeGen/MSP430/indirectbr.ll create mode 100644 test/CodeGen/MSP430/indirectbr2.ll create mode 100644 test/CodeGen/MSP430/inline-asm.ll create mode 100644 test/CodeGen/MSP430/jumptable.ll create mode 100644 test/CodeGen/MSP430/lit.local.cfg create mode 100644 test/CodeGen/MSP430/mult-alt-generic-msp430.ll create mode 100644 test/CodeGen/MSP430/postinc.ll create mode 100644 test/CodeGen/MSP430/setcc.ll create mode 100644 test/CodeGen/MSP430/shifts.ll create mode 100644 test/CodeGen/MSP430/transient-stack-alignment.ll create mode 100644 test/CodeGen/MSP430/vararg.ll create mode 100644 test/CodeGen/Mips/2008-06-05-Carry.ll create mode 100644 test/CodeGen/Mips/2008-07-03-SRet.ll create mode 100644 test/CodeGen/Mips/2008-07-06-fadd64.ll create mode 100644 test/CodeGen/Mips/2008-07-07-FPExtend.ll create mode 100644 test/CodeGen/Mips/2008-07-07-Float2Int.ll create mode 100644 test/CodeGen/Mips/2008-07-07-IntDoubleConvertions.ll create mode 100644 test/CodeGen/Mips/2008-07-15-InternalConstant.ll create mode 100644 test/CodeGen/Mips/2008-07-15-SmallSection.ll create mode 100644 test/CodeGen/Mips/2008-07-16-SignExtInReg.ll create mode 100644 test/CodeGen/Mips/2008-07-22-Cstpool.ll create mode 100644 test/CodeGen/Mips/2008-07-23-fpcmp.ll create mode 100644 test/CodeGen/Mips/2008-07-29-icmp.ll create mode 100644 test/CodeGen/Mips/2008-07-31-fcopysign.ll create mode 100644 test/CodeGen/Mips/2008-08-01-AsmInline.ll create mode 100644 test/CodeGen/Mips/2008-08-03-ReturnDouble.ll create mode 100644 test/CodeGen/Mips/2008-08-03-fabs64.ll create mode 100644 test/CodeGen/Mips/2008-08-04-Bitconvert.ll create mode 100644 test/CodeGen/Mips/2008-08-06-Alloca.ll create mode 100644 test/CodeGen/Mips/2008-08-07-CC.ll create mode 100644 test/CodeGen/Mips/2008-08-07-FPRound.ll create mode 100644 test/CodeGen/Mips/2008-08-08-bswap.ll create mode 100644 test/CodeGen/Mips/2008-08-08-ctlz.ll create mode 100644 test/CodeGen/Mips/2008-10-13-LegalizerBug.ll create mode 100644 test/CodeGen/Mips/2008-11-10-xint_to_fp.ll create mode 100644 test/CodeGen/Mips/2009-11-16-CstPoolLoad.ll create mode 100644 test/CodeGen/Mips/2010-07-20-Switch.ll create mode 100644 test/CodeGen/Mips/2010-11-09-CountLeading.ll create mode 100644 test/CodeGen/Mips/2010-11-09-Mul.ll create mode 100644 test/CodeGen/Mips/2011-05-26-BranchKillsVreg.ll create mode 100644 test/CodeGen/Mips/2012-12-12-ExpandMemcpy.ll create mode 100644 test/CodeGen/Mips/2013-11-18-fp64-const0.ll create mode 100644 test/CodeGen/Mips/DbgValueOtherTargets.test create mode 100644 test/CodeGen/Mips/addc.ll create mode 100644 test/CodeGen/Mips/addi.ll create mode 100644 test/CodeGen/Mips/addressing-mode.ll create mode 100644 test/CodeGen/Mips/align16.ll create mode 100644 test/CodeGen/Mips/alloca.ll create mode 100644 test/CodeGen/Mips/alloca16.ll create mode 100644 test/CodeGen/Mips/analyzebranch.ll create mode 100644 test/CodeGen/Mips/and1.ll create mode 100644 test/CodeGen/Mips/asm-large-immediate.ll create mode 100644 test/CodeGen/Mips/atomic.ll create mode 100644 test/CodeGen/Mips/atomicops.ll create mode 100644 test/CodeGen/Mips/beqzc.ll create mode 100644 test/CodeGen/Mips/beqzc1.ll create mode 100644 test/CodeGen/Mips/biggot.ll create mode 100644 test/CodeGen/Mips/blez_bgez.ll create mode 100644 test/CodeGen/Mips/blockaddr.ll create mode 100644 test/CodeGen/Mips/br-jmp.ll create mode 100644 test/CodeGen/Mips/brconeq.ll create mode 100644 test/CodeGen/Mips/brconeqk.ll create mode 100644 test/CodeGen/Mips/brconeqz.ll create mode 100644 test/CodeGen/Mips/brconge.ll create mode 100644 test/CodeGen/Mips/brcongt.ll create mode 100644 test/CodeGen/Mips/brconle.ll create mode 100644 test/CodeGen/Mips/brconlt.ll create mode 100644 test/CodeGen/Mips/brconne.ll create mode 100644 test/CodeGen/Mips/brconnek.ll create mode 100644 test/CodeGen/Mips/brconnez.ll create mode 100644 test/CodeGen/Mips/brdelayslot.ll create mode 100644 test/CodeGen/Mips/brind.ll create mode 100644 test/CodeGen/Mips/brsize3.ll create mode 100644 test/CodeGen/Mips/brsize3a.ll create mode 100644 test/CodeGen/Mips/bswap.ll create mode 100644 test/CodeGen/Mips/buildpairextractelementf64.ll create mode 100644 test/CodeGen/Mips/check-noat.ll create mode 100644 test/CodeGen/Mips/cmov.ll create mode 100644 test/CodeGen/Mips/cmplarge.ll create mode 100644 test/CodeGen/Mips/const-mult.ll create mode 100644 test/CodeGen/Mips/const1.ll create mode 100644 test/CodeGen/Mips/const4a.ll create mode 100644 test/CodeGen/Mips/const6.ll create mode 100644 test/CodeGen/Mips/const6a.ll create mode 100644 test/CodeGen/Mips/constantfp0.ll create mode 100644 test/CodeGen/Mips/cprestore.ll create mode 100644 test/CodeGen/Mips/ctlz.ll create mode 100644 test/CodeGen/Mips/disable-tail-merge.ll create mode 100644 test/CodeGen/Mips/div.ll create mode 100644 test/CodeGen/Mips/div_rem.ll create mode 100644 test/CodeGen/Mips/divrem.ll create mode 100644 test/CodeGen/Mips/divu.ll create mode 100644 test/CodeGen/Mips/divu_remu.ll create mode 100644 test/CodeGen/Mips/double2int.ll create mode 100644 test/CodeGen/Mips/dsp-patterns-cmp-vselect.ll create mode 100644 test/CodeGen/Mips/dsp-patterns.ll create mode 100644 test/CodeGen/Mips/dsp-r1.ll create mode 100644 test/CodeGen/Mips/dsp-r2.ll create mode 100644 test/CodeGen/Mips/dsp-vec-load-store.ll create mode 100644 test/CodeGen/Mips/eh-dwarf-cfa.ll create mode 100644 test/CodeGen/Mips/eh-return32.ll create mode 100644 test/CodeGen/Mips/eh-return64.ll create mode 100644 test/CodeGen/Mips/eh.ll create mode 100644 test/CodeGen/Mips/emit-big-cst.ll create mode 100644 test/CodeGen/Mips/ex2.ll create mode 100644 test/CodeGen/Mips/extins.ll create mode 100644 test/CodeGen/Mips/f16abs.ll create mode 100644 test/CodeGen/Mips/fabs.ll create mode 100644 test/CodeGen/Mips/fastcc.ll create mode 100644 test/CodeGen/Mips/fcopysign-f32-f64.ll create mode 100644 test/CodeGen/Mips/fcopysign.ll create mode 100644 test/CodeGen/Mips/fixdfsf.ll create mode 100644 test/CodeGen/Mips/fmadd1.ll create mode 100644 test/CodeGen/Mips/fneg.ll create mode 100644 test/CodeGen/Mips/fp-indexed-ls.ll create mode 100644 test/CodeGen/Mips/fp-spill-reload.ll create mode 100644 test/CodeGen/Mips/fp16instrinsmc.ll create mode 100644 test/CodeGen/Mips/fp16mix.ll create mode 100644 test/CodeGen/Mips/fp16static.ll create mode 100644 test/CodeGen/Mips/fpbr.ll create mode 100644 test/CodeGen/Mips/fpneeded.ll create mode 100644 test/CodeGen/Mips/fpnotneeded.ll create mode 100644 test/CodeGen/Mips/fptr2.ll create mode 100644 test/CodeGen/Mips/frame-address.ll create mode 100644 test/CodeGen/Mips/frem.ll create mode 100644 test/CodeGen/Mips/global-address.ll create mode 100644 test/CodeGen/Mips/global-pointer-reg.ll create mode 100644 test/CodeGen/Mips/gpreg-lazy-binding.ll create mode 100644 test/CodeGen/Mips/gprestore.ll create mode 100644 test/CodeGen/Mips/helloworld.ll create mode 100644 test/CodeGen/Mips/hf16_1.ll create mode 100644 test/CodeGen/Mips/hf16call32.ll create mode 100644 test/CodeGen/Mips/hf16call32_body.ll create mode 100644 test/CodeGen/Mips/hf1_body.ll create mode 100644 test/CodeGen/Mips/hfptrcall.ll create mode 100644 test/CodeGen/Mips/i32k.ll create mode 100644 test/CodeGen/Mips/i64arg.ll create mode 100644 test/CodeGen/Mips/imm.ll create mode 100644 test/CodeGen/Mips/indirectcall.ll create mode 100644 test/CodeGen/Mips/init-array.ll create mode 100644 test/CodeGen/Mips/inlineasm-cnstrnt-bad-I-1.ll create mode 100644 test/CodeGen/Mips/inlineasm-cnstrnt-bad-J.ll create mode 100644 test/CodeGen/Mips/inlineasm-cnstrnt-bad-K.ll create mode 100644 test/CodeGen/Mips/inlineasm-cnstrnt-bad-L.ll create mode 100644 test/CodeGen/Mips/inlineasm-cnstrnt-bad-N.ll create mode 100644 test/CodeGen/Mips/inlineasm-cnstrnt-bad-O.ll create mode 100644 test/CodeGen/Mips/inlineasm-cnstrnt-bad-P.ll create mode 100644 test/CodeGen/Mips/inlineasm-cnstrnt-reg.ll create mode 100644 test/CodeGen/Mips/inlineasm-cnstrnt-reg64.ll create mode 100644 test/CodeGen/Mips/inlineasm-operand-code.ll create mode 100644 test/CodeGen/Mips/inlineasm64.ll create mode 100644 test/CodeGen/Mips/inlineasm_constraint.ll create mode 100644 test/CodeGen/Mips/inlineasmmemop.ll create mode 100644 test/CodeGen/Mips/int-to-float-conversion.ll create mode 100644 test/CodeGen/Mips/internalfunc.ll create mode 100644 test/CodeGen/Mips/jtstat.ll create mode 100644 test/CodeGen/Mips/largefr1.ll create mode 100644 test/CodeGen/Mips/largeimm1.ll create mode 100644 test/CodeGen/Mips/largeimmprinting.ll create mode 100644 test/CodeGen/Mips/lazy-binding.ll create mode 100644 test/CodeGen/Mips/lb1.ll create mode 100644 test/CodeGen/Mips/lbu1.ll create mode 100644 test/CodeGen/Mips/lh1.ll create mode 100644 test/CodeGen/Mips/lhu1.ll create mode 100644 test/CodeGen/Mips/lit.local.cfg create mode 100644 test/CodeGen/Mips/llcarry.ll create mode 100644 test/CodeGen/Mips/load-store-left-right.ll create mode 100644 test/CodeGen/Mips/longbranch.ll create mode 100644 test/CodeGen/Mips/machineverifier.ll create mode 100644 test/CodeGen/Mips/madd-msub.ll create mode 100644 test/CodeGen/Mips/memcpy.ll create mode 100644 test/CodeGen/Mips/mips16_32_1.ll create mode 100644 test/CodeGen/Mips/mips16_32_10.ll create mode 100644 test/CodeGen/Mips/mips16_32_3.ll create mode 100644 test/CodeGen/Mips/mips16_32_4.ll create mode 100644 test/CodeGen/Mips/mips16_32_5.ll create mode 100644 test/CodeGen/Mips/mips16_32_6.ll create mode 100644 test/CodeGen/Mips/mips16_32_7.ll create mode 100644 test/CodeGen/Mips/mips16_32_8.ll create mode 100644 test/CodeGen/Mips/mips16_32_9.ll create mode 100644 test/CodeGen/Mips/mips16_fpret.ll create mode 100644 test/CodeGen/Mips/mips16ex.ll create mode 100644 test/CodeGen/Mips/mips16fpe.ll create mode 100644 test/CodeGen/Mips/mips64-f128-call.ll create mode 100644 test/CodeGen/Mips/mips64-f128.ll create mode 100644 test/CodeGen/Mips/mips64-fp-indexed-ls.ll create mode 100644 test/CodeGen/Mips/mips64-libcall.ll create mode 100644 test/CodeGen/Mips/mips64-sret.ll create mode 100644 test/CodeGen/Mips/mips64countleading.ll create mode 100644 test/CodeGen/Mips/mips64directive.ll create mode 100644 test/CodeGen/Mips/mips64ext.ll create mode 100644 test/CodeGen/Mips/mips64extins.ll create mode 100644 test/CodeGen/Mips/mips64fpimm0.ll create mode 100644 test/CodeGen/Mips/mips64fpldst.ll create mode 100644 test/CodeGen/Mips/mips64imm.ll create mode 100644 test/CodeGen/Mips/mips64instrs.ll create mode 100644 test/CodeGen/Mips/mips64intldst.ll create mode 100644 test/CodeGen/Mips/mips64lea.ll create mode 100644 test/CodeGen/Mips/mips64load-store-left-right.ll create mode 100644 test/CodeGen/Mips/mips64muldiv.ll create mode 100644 test/CodeGen/Mips/mips64shift.ll create mode 100644 test/CodeGen/Mips/mipslopat.ll create mode 100644 test/CodeGen/Mips/misha.ll create mode 100644 test/CodeGen/Mips/mno-ldc1-sdc1.ll create mode 100644 test/CodeGen/Mips/msa/2r.ll create mode 100644 test/CodeGen/Mips/msa/2r_vector_scalar.ll create mode 100644 test/CodeGen/Mips/msa/2rf.ll create mode 100644 test/CodeGen/Mips/msa/2rf_exup.ll create mode 100644 test/CodeGen/Mips/msa/2rf_float_int.ll create mode 100644 test/CodeGen/Mips/msa/2rf_fq.ll create mode 100644 test/CodeGen/Mips/msa/2rf_int_float.ll create mode 100644 test/CodeGen/Mips/msa/2rf_tq.ll create mode 100644 test/CodeGen/Mips/msa/3r-a.ll create mode 100644 test/CodeGen/Mips/msa/3r-b.ll create mode 100644 test/CodeGen/Mips/msa/3r-c.ll create mode 100644 test/CodeGen/Mips/msa/3r-d.ll create mode 100644 test/CodeGen/Mips/msa/3r-i.ll create mode 100644 test/CodeGen/Mips/msa/3r-m.ll create mode 100644 test/CodeGen/Mips/msa/3r-p.ll create mode 100644 test/CodeGen/Mips/msa/3r-s.ll create mode 100644 test/CodeGen/Mips/msa/3r-v.ll create mode 100644 test/CodeGen/Mips/msa/3r_4r.ll create mode 100644 test/CodeGen/Mips/msa/3r_4r_widen.ll create mode 100644 test/CodeGen/Mips/msa/3r_splat.ll create mode 100644 test/CodeGen/Mips/msa/3rf.ll create mode 100644 test/CodeGen/Mips/msa/3rf_4rf.ll create mode 100644 test/CodeGen/Mips/msa/3rf_4rf_q.ll create mode 100644 test/CodeGen/Mips/msa/3rf_exdo.ll create mode 100644 test/CodeGen/Mips/msa/3rf_float_int.ll create mode 100644 test/CodeGen/Mips/msa/3rf_int_float.ll create mode 100644 test/CodeGen/Mips/msa/3rf_q.ll create mode 100644 test/CodeGen/Mips/msa/arithmetic.ll create mode 100644 test/CodeGen/Mips/msa/arithmetic_float.ll create mode 100644 test/CodeGen/Mips/msa/basic_operations.ll create mode 100644 test/CodeGen/Mips/msa/basic_operations_float.ll create mode 100644 test/CodeGen/Mips/msa/bit.ll create mode 100644 test/CodeGen/Mips/msa/bitcast.ll create mode 100644 test/CodeGen/Mips/msa/bitwise.ll create mode 100644 test/CodeGen/Mips/msa/compare.ll create mode 100644 test/CodeGen/Mips/msa/compare_float.ll create mode 100644 test/CodeGen/Mips/msa/elm_copy.ll create mode 100644 test/CodeGen/Mips/msa/elm_cxcmsa.ll create mode 100644 test/CodeGen/Mips/msa/elm_insv.ll create mode 100644 test/CodeGen/Mips/msa/elm_move.ll create mode 100644 test/CodeGen/Mips/msa/elm_shift_slide.ll create mode 100644 test/CodeGen/Mips/msa/endian.ll create mode 100644 test/CodeGen/Mips/msa/frameindex.ll create mode 100644 test/CodeGen/Mips/msa/i10.ll create mode 100644 test/CodeGen/Mips/msa/i5-a.ll create mode 100644 test/CodeGen/Mips/msa/i5-b.ll create mode 100644 test/CodeGen/Mips/msa/i5-c.ll create mode 100644 test/CodeGen/Mips/msa/i5-m.ll create mode 100644 test/CodeGen/Mips/msa/i5-s.ll create mode 100644 test/CodeGen/Mips/msa/i5_ld_st.ll create mode 100644 test/CodeGen/Mips/msa/i8.ll create mode 100644 test/CodeGen/Mips/msa/inline-asm.ll create mode 100644 test/CodeGen/Mips/msa/llvm-stress-s1704963983.ll create mode 100644 test/CodeGen/Mips/msa/llvm-stress-s1935737938.ll create mode 100644 test/CodeGen/Mips/msa/llvm-stress-s2090927243-simplified.ll create mode 100644 test/CodeGen/Mips/msa/llvm-stress-s2501752154-simplified.ll create mode 100644 test/CodeGen/Mips/msa/llvm-stress-s2704903805.ll create mode 100644 test/CodeGen/Mips/msa/llvm-stress-s3861334421.ll create mode 100644 test/CodeGen/Mips/msa/llvm-stress-s3926023935.ll create mode 100644 test/CodeGen/Mips/msa/llvm-stress-s3997499501.ll create mode 100644 test/CodeGen/Mips/msa/llvm-stress-s449609655-simplified.ll create mode 100644 test/CodeGen/Mips/msa/llvm-stress-s525530439.ll create mode 100644 test/CodeGen/Mips/msa/llvm-stress-s997348632.ll create mode 100644 test/CodeGen/Mips/msa/llvm-stress-sz1-s742806235.ll create mode 100644 test/CodeGen/Mips/msa/shift-dagcombine.ll create mode 100644 test/CodeGen/Mips/msa/shuffle.ll create mode 100644 test/CodeGen/Mips/msa/special.ll create mode 100644 test/CodeGen/Mips/msa/spill.ll create mode 100644 test/CodeGen/Mips/msa/vec.ll create mode 100644 test/CodeGen/Mips/msa/vecs10.ll create mode 100644 test/CodeGen/Mips/mul.ll create mode 100644 test/CodeGen/Mips/mulll.ll create mode 100644 test/CodeGen/Mips/mulull.ll create mode 100644 test/CodeGen/Mips/neg1.ll create mode 100644 test/CodeGen/Mips/nomips16.ll create mode 100644 test/CodeGen/Mips/not1.ll create mode 100644 test/CodeGen/Mips/null.ll create mode 100644 test/CodeGen/Mips/o32_cc.ll create mode 100644 test/CodeGen/Mips/o32_cc_byval.ll create mode 100644 test/CodeGen/Mips/o32_cc_vararg.ll create mode 100644 test/CodeGen/Mips/optimize-fp-math.ll create mode 100644 test/CodeGen/Mips/or1.ll create mode 100644 test/CodeGen/Mips/powif64_16.ll create mode 100644 test/CodeGen/Mips/private.ll create mode 100644 test/CodeGen/Mips/ra-allocatable.ll create mode 100644 test/CodeGen/Mips/rdhwr-directives.ll create mode 100644 test/CodeGen/Mips/rem.ll create mode 100644 test/CodeGen/Mips/remat-immed-load.ll create mode 100644 test/CodeGen/Mips/remu.ll create mode 100644 test/CodeGen/Mips/return-vector.ll create mode 100644 test/CodeGen/Mips/return_address.ll create mode 100644 test/CodeGen/Mips/rotate.ll create mode 100644 test/CodeGen/Mips/sb1.ll create mode 100644 test/CodeGen/Mips/sel1c.ll create mode 100644 test/CodeGen/Mips/sel2c.ll create mode 100644 test/CodeGen/Mips/selTBteqzCmpi.ll create mode 100644 test/CodeGen/Mips/selTBtnezCmpi.ll create mode 100644 test/CodeGen/Mips/selTBtnezSlti.ll create mode 100644 test/CodeGen/Mips/select.ll create mode 100644 test/CodeGen/Mips/selectcc.ll create mode 100644 test/CodeGen/Mips/seleq.ll create mode 100644 test/CodeGen/Mips/seleqk.ll create mode 100644 test/CodeGen/Mips/selgek.ll create mode 100644 test/CodeGen/Mips/selgt.ll create mode 100644 test/CodeGen/Mips/selle.ll create mode 100644 test/CodeGen/Mips/selltk.ll create mode 100644 test/CodeGen/Mips/selne.ll create mode 100644 test/CodeGen/Mips/selnek.ll create mode 100644 test/CodeGen/Mips/selpat.ll create mode 100644 test/CodeGen/Mips/setcc-se.ll create mode 100644 test/CodeGen/Mips/seteq.ll create mode 100644 test/CodeGen/Mips/seteqz.ll create mode 100644 test/CodeGen/Mips/setge.ll create mode 100644 test/CodeGen/Mips/setgek.ll create mode 100644 test/CodeGen/Mips/setle.ll create mode 100644 test/CodeGen/Mips/setlt.ll create mode 100644 test/CodeGen/Mips/setltk.ll create mode 100644 test/CodeGen/Mips/setne.ll create mode 100644 test/CodeGen/Mips/setuge.ll create mode 100644 test/CodeGen/Mips/setugt.ll create mode 100644 test/CodeGen/Mips/setule.ll create mode 100644 test/CodeGen/Mips/setult.ll create mode 100644 test/CodeGen/Mips/setultk.ll create mode 100644 test/CodeGen/Mips/sh1.ll create mode 100644 test/CodeGen/Mips/shift-parts.ll create mode 100644 test/CodeGen/Mips/simplebr.ll create mode 100644 test/CodeGen/Mips/sint-fp-store_pattern.ll create mode 100644 test/CodeGen/Mips/sitofp-selectcc-opt.ll create mode 100644 test/CodeGen/Mips/sll1.ll create mode 100644 test/CodeGen/Mips/sll2.ll create mode 100644 test/CodeGen/Mips/small-section-reserve-gp.ll create mode 100644 test/CodeGen/Mips/spill-copy-acreg.ll create mode 100644 test/CodeGen/Mips/sra1.ll create mode 100644 test/CodeGen/Mips/sra2.ll create mode 100644 test/CodeGen/Mips/srl1.ll create mode 100644 test/CodeGen/Mips/srl2.ll create mode 100644 test/CodeGen/Mips/stack-alignment.ll create mode 100644 test/CodeGen/Mips/stackcoloring.ll create mode 100644 test/CodeGen/Mips/stacksize.ll create mode 100644 test/CodeGen/Mips/stchar.ll create mode 100644 test/CodeGen/Mips/stldst.ll create mode 100644 test/CodeGen/Mips/sub1.ll create mode 100644 test/CodeGen/Mips/sub2.ll create mode 100644 test/CodeGen/Mips/swzero.ll create mode 100644 test/CodeGen/Mips/tailcall.ll create mode 100644 test/CodeGen/Mips/tls-alias.ll create mode 100644 test/CodeGen/Mips/tls-models.ll create mode 100644 test/CodeGen/Mips/tls.ll create mode 100644 test/CodeGen/Mips/tls16.ll create mode 100644 test/CodeGen/Mips/tls16_2.ll create mode 100644 test/CodeGen/Mips/tnaked.ll create mode 100644 test/CodeGen/Mips/trap.ll create mode 100644 test/CodeGen/Mips/trap1.ll create mode 100644 test/CodeGen/Mips/uitofp.ll create mode 100644 test/CodeGen/Mips/ul1.ll create mode 100644 test/CodeGen/Mips/unalignedload.ll create mode 100644 test/CodeGen/Mips/vector-load-store.ll create mode 100644 test/CodeGen/Mips/vector-setcc.ll create mode 100644 test/CodeGen/Mips/weak.ll create mode 100644 test/CodeGen/Mips/xor1.ll create mode 100644 test/CodeGen/Mips/zeroreg.ll create mode 100644 test/CodeGen/NVPTX/add-128bit.ll create mode 100644 test/CodeGen/NVPTX/annotations.ll create mode 100644 test/CodeGen/NVPTX/arithmetic-fp-sm20.ll create mode 100644 test/CodeGen/NVPTX/arithmetic-int.ll create mode 100644 test/CodeGen/NVPTX/bug17709.ll create mode 100644 test/CodeGen/NVPTX/callchain.ll create mode 100644 test/CodeGen/NVPTX/calling-conv.ll create mode 100644 test/CodeGen/NVPTX/compare-int.ll create mode 100644 test/CodeGen/NVPTX/constant-vectors.ll create mode 100644 test/CodeGen/NVPTX/convert-fp.ll create mode 100644 test/CodeGen/NVPTX/convert-int-sm20.ll create mode 100644 test/CodeGen/NVPTX/ctlz.ll create mode 100644 test/CodeGen/NVPTX/ctpop.ll create mode 100644 test/CodeGen/NVPTX/cttz.ll create mode 100644 test/CodeGen/NVPTX/fast-math.ll create mode 100644 test/CodeGen/NVPTX/fma-disable.ll create mode 100644 test/CodeGen/NVPTX/fma.ll create mode 100644 test/CodeGen/NVPTX/fp-literals.ll create mode 100644 test/CodeGen/NVPTX/generic-to-nvvm.ll create mode 100644 test/CodeGen/NVPTX/global-ordering.ll create mode 100644 test/CodeGen/NVPTX/i1-global.ll create mode 100644 test/CodeGen/NVPTX/i1-int-to-fp.ll create mode 100644 test/CodeGen/NVPTX/i1-param.ll create mode 100644 test/CodeGen/NVPTX/i8-param.ll create mode 100644 test/CodeGen/NVPTX/implicit-def.ll create mode 100644 test/CodeGen/NVPTX/inline-asm.ll create mode 100644 test/CodeGen/NVPTX/intrin-nocapture.ll create mode 100644 test/CodeGen/NVPTX/intrinsic-old.ll create mode 100644 test/CodeGen/NVPTX/intrinsics.ll create mode 100644 test/CodeGen/NVPTX/ld-addrspace.ll create mode 100644 test/CodeGen/NVPTX/ld-generic.ll create mode 100644 test/CodeGen/NVPTX/ldu-i8.ll create mode 100644 test/CodeGen/NVPTX/ldu-reg-plus-offset.ll create mode 100644 test/CodeGen/NVPTX/lit.local.cfg create mode 100644 test/CodeGen/NVPTX/load-sext-i1.ll create mode 100644 test/CodeGen/NVPTX/local-stack-frame.ll create mode 100644 test/CodeGen/NVPTX/module-inline-asm.ll create mode 100644 test/CodeGen/NVPTX/nvvm-reflect.ll create mode 100644 test/CodeGen/NVPTX/param-align.ll create mode 100644 test/CodeGen/NVPTX/pr13291-i1-store.ll create mode 100644 test/CodeGen/NVPTX/pr16278.ll create mode 100644 test/CodeGen/NVPTX/pr17529.ll create mode 100644 test/CodeGen/NVPTX/ptx-version-30.ll create mode 100644 test/CodeGen/NVPTX/ptx-version-31.ll create mode 100644 test/CodeGen/NVPTX/refl1.ll create mode 100644 test/CodeGen/NVPTX/rsqrt.ll create mode 100644 test/CodeGen/NVPTX/sched1.ll create mode 100644 test/CodeGen/NVPTX/sched2.ll create mode 100644 test/CodeGen/NVPTX/sext-in-reg.ll create mode 100644 test/CodeGen/NVPTX/sext-params.ll create mode 100644 test/CodeGen/NVPTX/simple-call.ll create mode 100644 test/CodeGen/NVPTX/sm-version-20.ll create mode 100644 test/CodeGen/NVPTX/sm-version-21.ll create mode 100644 test/CodeGen/NVPTX/sm-version-30.ll create mode 100644 test/CodeGen/NVPTX/sm-version-35.ll create mode 100644 test/CodeGen/NVPTX/st-addrspace.ll create mode 100644 test/CodeGen/NVPTX/st-generic.ll create mode 100644 test/CodeGen/NVPTX/tuple-literal.ll create mode 100644 test/CodeGen/NVPTX/vec-param-load.ll create mode 100644 test/CodeGen/NVPTX/vec8.ll create mode 100644 test/CodeGen/NVPTX/vector-args.ll create mode 100644 test/CodeGen/NVPTX/vector-compare.ll create mode 100644 test/CodeGen/NVPTX/vector-loads.ll create mode 100644 test/CodeGen/NVPTX/vector-select.ll create mode 100644 test/CodeGen/NVPTX/vector-stores.ll create mode 100644 test/CodeGen/PowerPC/2004-11-29-ShrCrash.ll create mode 100644 test/CodeGen/PowerPC/2004-11-30-shift-crash.ll create mode 100644 test/CodeGen/PowerPC/2004-11-30-shr-var-crash.ll create mode 100644 test/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll create mode 100644 test/CodeGen/PowerPC/2005-01-14-SetSelectCrash.ll create mode 100644 test/CodeGen/PowerPC/2005-01-14-UndefLong.ll create mode 100644 test/CodeGen/PowerPC/2005-08-12-rlwimi-crash.ll create mode 100644 test/CodeGen/PowerPC/2005-09-02-LegalizeDuplicatesCalls.ll create mode 100644 test/CodeGen/PowerPC/2005-10-08-ArithmeticRotate.ll create mode 100644 test/CodeGen/PowerPC/2005-11-30-vastart-crash.ll create mode 100644 test/CodeGen/PowerPC/2006-01-11-darwin-fp-argument.ll create mode 100644 test/CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll create mode 100644 test/CodeGen/PowerPC/2006-04-01-FloatDoubleExtend.ll create mode 100644 test/CodeGen/PowerPC/2006-04-05-splat-ish.ll create mode 100644 test/CodeGen/PowerPC/2006-04-19-vmaddfp-crash.ll create mode 100644 test/CodeGen/PowerPC/2006-05-12-rlwimi-crash.ll create mode 100644 test/CodeGen/PowerPC/2006-07-07-ComputeMaskedBits.ll create mode 100644 test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll create mode 100644 test/CodeGen/PowerPC/2006-08-11-RetVector.ll create mode 100644 test/CodeGen/PowerPC/2006-08-15-SelectionCrash.ll create mode 100644 test/CodeGen/PowerPC/2006-09-28-shift_64.ll create mode 100644 test/CodeGen/PowerPC/2006-10-13-Miscompile.ll create mode 100644 test/CodeGen/PowerPC/2006-10-17-brcc-miscompile.ll create mode 100644 test/CodeGen/PowerPC/2006-10-17-ppc64-alloca.ll create mode 100644 test/CodeGen/PowerPC/2006-11-10-DAGCombineMiscompile.ll create mode 100644 test/CodeGen/PowerPC/2006-11-29-AltivecFPSplat.ll create mode 100644 test/CodeGen/PowerPC/2006-12-07-LargeAlloca.ll create mode 100644 test/CodeGen/PowerPC/2006-12-07-SelectCrash.ll create mode 100644 test/CodeGen/PowerPC/2007-01-04-ArgExtension.ll create mode 100644 test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll create mode 100644 test/CodeGen/PowerPC/2007-01-29-lbrx-asm.ll create mode 100644 test/CodeGen/PowerPC/2007-01-31-InlineAsmAddrMode.ll create mode 100644 test/CodeGen/PowerPC/2007-02-16-AlignPacked.ll create mode 100644 test/CodeGen/PowerPC/2007-02-16-InlineAsmNConstraint.ll create mode 100644 test/CodeGen/PowerPC/2007-02-23-lr-saved-twice.ll create mode 100644 test/CodeGen/PowerPC/2007-03-24-cntlzd.ll create mode 100644 test/CodeGen/PowerPC/2007-03-30-SpillerCrash.ll create mode 100644 test/CodeGen/PowerPC/2007-04-24-InlineAsm-I-Modifier.ll create mode 100644 test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll create mode 100644 test/CodeGen/PowerPC/2007-05-03-InlineAsm-S-Constraint.ll create mode 100644 test/CodeGen/PowerPC/2007-05-14-InlineAsmSelectCrash.ll create mode 100644 test/CodeGen/PowerPC/2007-05-22-tailmerge-3.ll create mode 100644 test/CodeGen/PowerPC/2007-05-30-dagcombine-miscomp.ll create mode 100644 test/CodeGen/PowerPC/2007-06-28-BCCISelBug.ll create mode 100644 test/CodeGen/PowerPC/2007-08-04-CoalescerAssert.ll create mode 100644 test/CodeGen/PowerPC/2007-09-04-AltivecDST.ll create mode 100644 test/CodeGen/PowerPC/2007-09-07-LoadStoreIdxForms.ll create mode 100644 test/CodeGen/PowerPC/2007-09-08-unaligned.ll create mode 100644 test/CodeGen/PowerPC/2007-09-11-RegCoalescerAssert.ll create mode 100644 test/CodeGen/PowerPC/2007-09-12-LiveIntervalsAssert.ll create mode 100644 test/CodeGen/PowerPC/2007-10-16-InlineAsmFrameOffset.ll create mode 100644 test/CodeGen/PowerPC/2007-10-18-PtrArithmetic.ll create mode 100644 test/CodeGen/PowerPC/2007-10-21-LocalRegAllocAssert.ll create mode 100644 test/CodeGen/PowerPC/2007-10-21-LocalRegAllocAssert2.ll create mode 100644 test/CodeGen/PowerPC/2007-11-04-CoalescerCrash.ll create mode 100644 test/CodeGen/PowerPC/2007-11-16-landingpad-split.ll create mode 100644 test/CodeGen/PowerPC/2007-11-19-VectorSplitting.ll create mode 100644 test/CodeGen/PowerPC/2008-02-05-LiveIntervalsAssert.ll create mode 100644 test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll create mode 100644 test/CodeGen/PowerPC/2008-03-05-RegScavengerAssert.ll create mode 100644 test/CodeGen/PowerPC/2008-03-17-RegScavengerCrash.ll create mode 100644 test/CodeGen/PowerPC/2008-03-18-RegScavengerAssert.ll create mode 100644 test/CodeGen/PowerPC/2008-03-24-AddressRegImm.ll create mode 100644 test/CodeGen/PowerPC/2008-03-24-CoalescerBug.ll create mode 100644 test/CodeGen/PowerPC/2008-03-26-CoalescerBug.ll create mode 100644 test/CodeGen/PowerPC/2008-04-10-LiveIntervalCrash.ll create mode 100644 test/CodeGen/PowerPC/2008-04-16-CoalescerBug.ll create mode 100644 test/CodeGen/PowerPC/2008-04-23-CoalescerCrash.ll create mode 100644 test/CodeGen/PowerPC/2008-05-01-ppc_fp128.ll create mode 100644 test/CodeGen/PowerPC/2008-06-19-LegalizerCrash.ll create mode 100644 test/CodeGen/PowerPC/2008-06-21-F128LoadStore.ll create mode 100644 test/CodeGen/PowerPC/2008-06-23-LiveVariablesCrash.ll create mode 100644 test/CodeGen/PowerPC/2008-07-10-SplatMiscompile.ll create mode 100644 test/CodeGen/PowerPC/2008-07-15-Bswap.ll create mode 100644 test/CodeGen/PowerPC/2008-07-15-Fabs.ll create mode 100644 test/CodeGen/PowerPC/2008-07-15-SignExtendInreg.ll create mode 100644 test/CodeGen/PowerPC/2008-07-17-Fneg.ll create mode 100644 test/CodeGen/PowerPC/2008-07-24-PPC64-CCBug.ll create mode 100644 test/CodeGen/PowerPC/2008-09-12-CoalescerBug.ll create mode 100644 test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll create mode 100644 test/CodeGen/PowerPC/2008-10-28-UnprocessedNode.ll create mode 100644 test/CodeGen/PowerPC/2008-10-28-f128-i32.ll create mode 100644 test/CodeGen/PowerPC/2008-10-31-PPCF128Libcalls.ll create mode 100644 test/CodeGen/PowerPC/2008-12-02-LegalizeTypeAssert.ll create mode 100644 test/CodeGen/PowerPC/2008-12-12-EH.ll create mode 100644 test/CodeGen/PowerPC/2009-01-16-DeclareISelBug.ll create mode 100644 test/CodeGen/PowerPC/2009-03-17-LSRBug.ll create mode 100644 test/CodeGen/PowerPC/2009-05-28-LegalizeBRCC.ll create mode 100644 test/CodeGen/PowerPC/2009-07-16-InlineAsm-M-Operand.ll create mode 100644 test/CodeGen/PowerPC/2009-08-17-inline-asm-addr-mode-breakage.ll create mode 100644 test/CodeGen/PowerPC/2009-08-23-linkerprivate.ll create mode 100644 test/CodeGen/PowerPC/2009-09-18-carrybit.ll create mode 100644 test/CodeGen/PowerPC/2009-11-15-ProcImpDefsBug.ll create mode 100644 test/CodeGen/PowerPC/2009-11-25-ImpDefBug.ll create mode 100644 test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll create mode 100644 test/CodeGen/PowerPC/2010-02-12-saveCR.ll create mode 100644 test/CodeGen/PowerPC/2010-03-09-indirect-call.ll create mode 100644 test/CodeGen/PowerPC/2010-04-01-MachineCSEBug.ll create mode 100644 test/CodeGen/PowerPC/2010-05-03-retaddr1.ll create mode 100644 test/CodeGen/PowerPC/2010-10-11-Fast-Varargs.ll create mode 100644 test/CodeGen/PowerPC/2010-12-18-PPCStackRefs.ll create mode 100644 test/CodeGen/PowerPC/2011-12-05-NoSpillDupCR.ll create mode 100644 test/CodeGen/PowerPC/2011-12-06-SpillAndRestoreCR.ll create mode 100644 test/CodeGen/PowerPC/2011-12-08-DemandedBitsMiscompile.ll create mode 100644 test/CodeGen/PowerPC/2012-09-16-TOC-entry-check.ll create mode 100644 test/CodeGen/PowerPC/2012-10-11-dynalloc.ll create mode 100644 test/CodeGen/PowerPC/2012-10-12-bitcast.ll create mode 100644 test/CodeGen/PowerPC/2012-11-16-mischedcall.ll create mode 100644 test/CodeGen/PowerPC/2013-05-15-preinc-fold.ll create mode 100644 test/CodeGen/PowerPC/2013-07-01-PHIElimBug.ll create mode 100644 test/CodeGen/PowerPC/Atomics-32.ll create mode 100644 test/CodeGen/PowerPC/Atomics-64.ll create mode 100644 test/CodeGen/PowerPC/DbgValueOtherTargets.test create mode 100644 test/CodeGen/PowerPC/Frames-alloca.ll create mode 100644 test/CodeGen/PowerPC/Frames-large.ll create mode 100644 test/CodeGen/PowerPC/Frames-leaf.ll create mode 100644 test/CodeGen/PowerPC/Frames-small.ll create mode 100644 test/CodeGen/PowerPC/LargeAbsoluteAddr.ll create mode 100644 test/CodeGen/PowerPC/a2-fp-basic.ll create mode 100644 test/CodeGen/PowerPC/a2q-stackalign.ll create mode 100644 test/CodeGen/PowerPC/a2q.ll create mode 100644 test/CodeGen/PowerPC/addc.ll create mode 100644 test/CodeGen/PowerPC/addi-reassoc.ll create mode 100644 test/CodeGen/PowerPC/addrfuncstr.ll create mode 100644 test/CodeGen/PowerPC/align.ll create mode 100644 test/CodeGen/PowerPC/allocate-r0.ll create mode 100644 test/CodeGen/PowerPC/altivec-ord.ll create mode 100644 test/CodeGen/PowerPC/and-branch.ll create mode 100644 test/CodeGen/PowerPC/and-elim.ll create mode 100644 test/CodeGen/PowerPC/and-imm.ll create mode 100644 test/CodeGen/PowerPC/and_add.ll create mode 100644 test/CodeGen/PowerPC/and_sext.ll create mode 100644 test/CodeGen/PowerPC/and_sra.ll create mode 100644 test/CodeGen/PowerPC/anon_aggr.ll create mode 100644 test/CodeGen/PowerPC/ashr-neg1.ll create mode 100644 test/CodeGen/PowerPC/asm-Zy.ll create mode 100644 test/CodeGen/PowerPC/asm-dialect.ll create mode 100644 test/CodeGen/PowerPC/asym-regclass-copy.ll create mode 100644 test/CodeGen/PowerPC/atomic-1.ll create mode 100644 test/CodeGen/PowerPC/atomic-2.ll create mode 100644 test/CodeGen/PowerPC/available-externally.ll create mode 100644 test/CodeGen/PowerPC/bdzlr.ll create mode 100644 test/CodeGen/PowerPC/big-endian-actual-args.ll create mode 100644 test/CodeGen/PowerPC/big-endian-call-result.ll create mode 100644 test/CodeGen/PowerPC/big-endian-formal-args.ll create mode 100644 test/CodeGen/PowerPC/branch-opt.ll create mode 100644 test/CodeGen/PowerPC/bswap-load-store.ll create mode 100644 test/CodeGen/PowerPC/buildvec_canonicalize.ll create mode 100644 test/CodeGen/PowerPC/bv-pres-v8i1.ll create mode 100644 test/CodeGen/PowerPC/bv-widen-undef.ll create mode 100644 test/CodeGen/PowerPC/byval-agg-info.ll create mode 100644 test/CodeGen/PowerPC/calls.ll create mode 100644 test/CodeGen/PowerPC/can-lower-ret.ll create mode 100644 test/CodeGen/PowerPC/cc.ll create mode 100644 test/CodeGen/PowerPC/cmp-cmp.ll create mode 100644 test/CodeGen/PowerPC/coalesce-ext.ll create mode 100644 test/CodeGen/PowerPC/compare-duplicate.ll create mode 100644 test/CodeGen/PowerPC/compare-simm.ll create mode 100644 test/CodeGen/PowerPC/complex-return.ll create mode 100644 test/CodeGen/PowerPC/constants.ll create mode 100644 test/CodeGen/PowerPC/copysignl.ll create mode 100644 test/CodeGen/PowerPC/cr-spills.ll create mode 100644 test/CodeGen/PowerPC/cr1eq-no-extra-moves.ll create mode 100644 test/CodeGen/PowerPC/cr1eq.ll create mode 100644 test/CodeGen/PowerPC/cr_spilling.ll create mode 100644 test/CodeGen/PowerPC/crsave.ll create mode 100644 test/CodeGen/PowerPC/ctr-cleanup.ll create mode 100644 test/CodeGen/PowerPC/ctrloop-asm.ll create mode 100644 test/CodeGen/PowerPC/ctrloop-cpsgn.ll create mode 100644 test/CodeGen/PowerPC/ctrloop-fp64.ll create mode 100644 test/CodeGen/PowerPC/ctrloop-i64.ll create mode 100644 test/CodeGen/PowerPC/ctrloop-large-ec.ll create mode 100644 test/CodeGen/PowerPC/ctrloop-le.ll create mode 100644 test/CodeGen/PowerPC/ctrloop-lt.ll create mode 100644 test/CodeGen/PowerPC/ctrloop-ne.ll create mode 100644 test/CodeGen/PowerPC/ctrloop-reg.ll create mode 100644 test/CodeGen/PowerPC/ctrloop-s000.ll create mode 100644 test/CodeGen/PowerPC/ctrloop-sums.ll create mode 100644 test/CodeGen/PowerPC/ctrloop-udivti3.ll create mode 100644 test/CodeGen/PowerPC/ctrloops.ll create mode 100644 test/CodeGen/PowerPC/cttz.ll create mode 100644 test/CodeGen/PowerPC/darwin-labels.ll create mode 100644 test/CodeGen/PowerPC/dbg.ll create mode 100644 test/CodeGen/PowerPC/dcbt-sched.ll create mode 100644 test/CodeGen/PowerPC/delete-node.ll create mode 100644 test/CodeGen/PowerPC/div-2.ll create mode 100644 test/CodeGen/PowerPC/dyn-alloca-aligned.ll create mode 100644 test/CodeGen/PowerPC/early-ret.ll create mode 100644 test/CodeGen/PowerPC/early-ret2.ll create mode 100644 test/CodeGen/PowerPC/empty-functions.ll create mode 100644 test/CodeGen/PowerPC/emptystruct.ll create mode 100644 test/CodeGen/PowerPC/eqv-andc-orc-nor.ll create mode 100644 test/CodeGen/PowerPC/extsh.ll create mode 100644 test/CodeGen/PowerPC/fabs.ll create mode 100644 test/CodeGen/PowerPC/fast-isel-GEP-coalesce.ll create mode 100644 test/CodeGen/PowerPC/fast-isel-binary.ll create mode 100644 test/CodeGen/PowerPC/fast-isel-br-const.ll create mode 100644 test/CodeGen/PowerPC/fast-isel-call.ll create mode 100644 test/CodeGen/PowerPC/fast-isel-cmp-imm.ll create mode 100644 test/CodeGen/PowerPC/fast-isel-conversion-p5.ll create mode 100644 test/CodeGen/PowerPC/fast-isel-conversion.ll create mode 100644 test/CodeGen/PowerPC/fast-isel-crash.ll create mode 100644 test/CodeGen/PowerPC/fast-isel-ext.ll create mode 100644 test/CodeGen/PowerPC/fast-isel-fold.ll create mode 100644 test/CodeGen/PowerPC/fast-isel-indirectbr.ll create mode 100644 test/CodeGen/PowerPC/fast-isel-load-store.ll create mode 100644 test/CodeGen/PowerPC/fast-isel-redefinition.ll create mode 100644 test/CodeGen/PowerPC/fast-isel-ret.ll create mode 100644 test/CodeGen/PowerPC/fast-isel-shifter.ll create mode 100644 test/CodeGen/PowerPC/fastisel-gep-promote-before-add.ll create mode 100644 test/CodeGen/PowerPC/fcpsgn.ll create mode 100644 test/CodeGen/PowerPC/float-asmprint.ll create mode 100644 test/CodeGen/PowerPC/float-to-int.ll create mode 100644 test/CodeGen/PowerPC/floatPSA.ll create mode 100644 test/CodeGen/PowerPC/fma.ll create mode 100644 test/CodeGen/PowerPC/fnabs.ll create mode 100644 test/CodeGen/PowerPC/fneg.ll create mode 100644 test/CodeGen/PowerPC/fold-li.ll create mode 100644 test/CodeGen/PowerPC/fold-zero.ll create mode 100644 test/CodeGen/PowerPC/fp-branch.ll create mode 100644 test/CodeGen/PowerPC/fp-int-fp.ll create mode 100644 test/CodeGen/PowerPC/fp_to_uint.ll create mode 100644 test/CodeGen/PowerPC/fpcopy.ll create mode 100644 test/CodeGen/PowerPC/frame-size.ll create mode 100644 test/CodeGen/PowerPC/frameaddr.ll create mode 100644 test/CodeGen/PowerPC/frounds.ll create mode 100644 test/CodeGen/PowerPC/fsel.ll create mode 100644 test/CodeGen/PowerPC/fsl-e500mc.ll create mode 100644 test/CodeGen/PowerPC/fsl-e5500.ll create mode 100644 test/CodeGen/PowerPC/fsqrt.ll create mode 100644 test/CodeGen/PowerPC/glob-comp-aa-crash.ll create mode 100644 test/CodeGen/PowerPC/hello-reloc.s create mode 100644 test/CodeGen/PowerPC/hello.ll create mode 100644 test/CodeGen/PowerPC/hidden-vis-2.ll create mode 100644 test/CodeGen/PowerPC/hidden-vis.ll create mode 100644 test/CodeGen/PowerPC/i128-and-beyond.ll create mode 100644 test/CodeGen/PowerPC/i32-to-float.ll create mode 100644 test/CodeGen/PowerPC/i64-to-float.ll create mode 100644 test/CodeGen/PowerPC/i64_fp.ll create mode 100644 test/CodeGen/PowerPC/i64_fp_round.ll create mode 100644 test/CodeGen/PowerPC/iabs.ll create mode 100644 test/CodeGen/PowerPC/ifcvt.ll create mode 100644 test/CodeGen/PowerPC/illegal-element-type.ll create mode 100644 test/CodeGen/PowerPC/in-asm-f64-reg.ll create mode 100644 test/CodeGen/PowerPC/indirectbr.ll create mode 100644 test/CodeGen/PowerPC/inlineasm-copy.ll create mode 100644 test/CodeGen/PowerPC/inlineasm-i64-reg.ll create mode 100644 test/CodeGen/PowerPC/int-fp-conv-0.ll create mode 100644 test/CodeGen/PowerPC/int-fp-conv-1.ll create mode 100644 test/CodeGen/PowerPC/inverted-bool-compares.ll create mode 100644 test/CodeGen/PowerPC/isel-rc-nox0.ll create mode 100644 test/CodeGen/PowerPC/isel.ll create mode 100644 test/CodeGen/PowerPC/ispositive.ll create mode 100644 test/CodeGen/PowerPC/itofp128.ll create mode 100644 test/CodeGen/PowerPC/jaggedstructs.ll create mode 100644 test/CodeGen/PowerPC/lbzux.ll create mode 100644 test/CodeGen/PowerPC/lha.ll create mode 100644 test/CodeGen/PowerPC/lit.local.cfg create mode 100644 test/CodeGen/PowerPC/load-constant-addr.ll create mode 100644 test/CodeGen/PowerPC/load-shift-combine.ll create mode 100644 test/CodeGen/PowerPC/long-compare.ll create mode 100644 test/CodeGen/PowerPC/longdbl-truncate.ll create mode 100644 test/CodeGen/PowerPC/lsa.ll create mode 100644 test/CodeGen/PowerPC/lsr-postinc-pos.ll create mode 100644 test/CodeGen/PowerPC/mask64.ll create mode 100644 test/CodeGen/PowerPC/mcm-1.ll create mode 100644 test/CodeGen/PowerPC/mcm-10.ll create mode 100644 test/CodeGen/PowerPC/mcm-11.ll create mode 100644 test/CodeGen/PowerPC/mcm-12.ll create mode 100644 test/CodeGen/PowerPC/mcm-2.ll create mode 100644 test/CodeGen/PowerPC/mcm-3.ll create mode 100644 test/CodeGen/PowerPC/mcm-4.ll create mode 100644 test/CodeGen/PowerPC/mcm-5.ll create mode 100644 test/CodeGen/PowerPC/mcm-6.ll create mode 100644 test/CodeGen/PowerPC/mcm-7.ll create mode 100644 test/CodeGen/PowerPC/mcm-8.ll create mode 100644 test/CodeGen/PowerPC/mcm-9.ll create mode 100644 test/CodeGen/PowerPC/mcm-default.ll create mode 100644 test/CodeGen/PowerPC/mcm-obj-2.ll create mode 100644 test/CodeGen/PowerPC/mcm-obj.ll create mode 100644 test/CodeGen/PowerPC/mem-rr-addr-mode.ll create mode 100644 test/CodeGen/PowerPC/mem_update.ll create mode 100644 test/CodeGen/PowerPC/misched-inorder-latency.ll create mode 100644 test/CodeGen/PowerPC/misched.ll create mode 100644 test/CodeGen/PowerPC/mul-neg-power-2.ll create mode 100644 test/CodeGen/PowerPC/mul-with-overflow.ll create mode 100644 test/CodeGen/PowerPC/mulhs.ll create mode 100644 test/CodeGen/PowerPC/mulli64.ll create mode 100644 test/CodeGen/PowerPC/mult-alt-generic-powerpc.ll create mode 100644 test/CodeGen/PowerPC/mult-alt-generic-powerpc64.ll create mode 100644 test/CodeGen/PowerPC/neg.ll create mode 100644 test/CodeGen/PowerPC/negctr.ll create mode 100644 test/CodeGen/PowerPC/no-dead-strip.ll create mode 100644 test/CodeGen/PowerPC/novrsave.ll create mode 100644 test/CodeGen/PowerPC/optcmp.ll create mode 100644 test/CodeGen/PowerPC/or-addressing-mode.ll create mode 100644 test/CodeGen/PowerPC/popcnt.ll create mode 100644 test/CodeGen/PowerPC/ppc-prologue.ll create mode 100644 test/CodeGen/PowerPC/ppc-vaarg-agg.ll create mode 100644 test/CodeGen/PowerPC/ppc32-vacopy.ll create mode 100644 test/CodeGen/PowerPC/ppc440-fp-basic.ll create mode 100644 test/CodeGen/PowerPC/ppc440-msync.ll create mode 100644 test/CodeGen/PowerPC/ppc64-32bit-addic.ll create mode 100644 test/CodeGen/PowerPC/ppc64-abi-extend.ll create mode 100644 test/CodeGen/PowerPC/ppc64-align-long-double.ll create mode 100644 test/CodeGen/PowerPC/ppc64-calls.ll create mode 100644 test/CodeGen/PowerPC/ppc64-crash.ll create mode 100644 test/CodeGen/PowerPC/ppc64-cyclecounter.ll create mode 100644 test/CodeGen/PowerPC/ppc64-linux-func-size.ll create mode 100644 test/CodeGen/PowerPC/ppc64-prefetch.ll create mode 100644 test/CodeGen/PowerPC/ppc64-toc.ll create mode 100644 test/CodeGen/PowerPC/ppc64-vaarg-int.ll create mode 100644 test/CodeGen/PowerPC/ppc64-zext.ll create mode 100644 test/CodeGen/PowerPC/ppcf128-1-opt.ll create mode 100644 test/CodeGen/PowerPC/ppcf128-1.ll create mode 100644 test/CodeGen/PowerPC/ppcf128-2.ll create mode 100644 test/CodeGen/PowerPC/ppcf128-3.ll create mode 100644 test/CodeGen/PowerPC/ppcf128-4.ll create mode 100644 test/CodeGen/PowerPC/pr12757.ll create mode 100644 test/CodeGen/PowerPC/pr13641.ll create mode 100644 test/CodeGen/PowerPC/pr13891.ll create mode 100644 test/CodeGen/PowerPC/pr15031.ll create mode 100644 test/CodeGen/PowerPC/pr15359.ll create mode 100644 test/CodeGen/PowerPC/pr15630.ll create mode 100644 test/CodeGen/PowerPC/pr15632.ll create mode 100644 test/CodeGen/PowerPC/pr16556-2.ll create mode 100644 test/CodeGen/PowerPC/pr16556.ll create mode 100644 test/CodeGen/PowerPC/pr16573.ll create mode 100644 test/CodeGen/PowerPC/pr17168.ll create mode 100644 test/CodeGen/PowerPC/pr17354.ll create mode 100644 test/CodeGen/PowerPC/pr3711_widen_bit.ll create mode 100644 test/CodeGen/PowerPC/private.ll create mode 100644 test/CodeGen/PowerPC/pwr3-6x.ll create mode 100644 test/CodeGen/PowerPC/quadint-return.ll create mode 100644 test/CodeGen/PowerPC/r31.ll create mode 100644 test/CodeGen/PowerPC/recipest.ll create mode 100644 test/CodeGen/PowerPC/reg-coalesce-simple.ll create mode 100644 test/CodeGen/PowerPC/reg-names.ll create mode 100644 test/CodeGen/PowerPC/reloc-align.ll create mode 100644 test/CodeGen/PowerPC/remap-crash.ll create mode 100644 test/CodeGen/PowerPC/remat-imm.ll create mode 100644 test/CodeGen/PowerPC/retaddr.ll create mode 100644 test/CodeGen/PowerPC/return-val-i128.ll create mode 100644 test/CodeGen/PowerPC/rlwimi-and.ll create mode 100644 test/CodeGen/PowerPC/rlwimi-commute.ll create mode 100644 test/CodeGen/PowerPC/rlwimi-keep-rsh.ll create mode 100644 test/CodeGen/PowerPC/rlwimi.ll create mode 100644 test/CodeGen/PowerPC/rlwimi2.ll create mode 100644 test/CodeGen/PowerPC/rlwimi3.ll create mode 100644 test/CodeGen/PowerPC/rlwinm.ll create mode 100644 test/CodeGen/PowerPC/rlwinm2.ll create mode 100644 test/CodeGen/PowerPC/rotl-2.ll create mode 100644 test/CodeGen/PowerPC/rotl-64.ll create mode 100644 test/CodeGen/PowerPC/rotl.ll create mode 100644 test/CodeGen/PowerPC/rounding-ops.ll create mode 100644 test/CodeGen/PowerPC/rs-undef-use.ll create mode 100644 test/CodeGen/PowerPC/s000-alias-misched.ll create mode 100644 test/CodeGen/PowerPC/sdag-ppcf128.ll create mode 100644 test/CodeGen/PowerPC/sections.ll create mode 100644 test/CodeGen/PowerPC/select-cc.ll create mode 100644 test/CodeGen/PowerPC/select_lt0.ll create mode 100644 test/CodeGen/PowerPC/set0-v8i16.ll create mode 100644 test/CodeGen/PowerPC/setcc_no_zext.ll create mode 100644 test/CodeGen/PowerPC/seteq-0.ll create mode 100644 test/CodeGen/PowerPC/shift128.ll create mode 100644 test/CodeGen/PowerPC/shl_elim.ll create mode 100644 test/CodeGen/PowerPC/shl_sext.ll create mode 100644 test/CodeGen/PowerPC/sign_ext_inreg1.ll create mode 100644 test/CodeGen/PowerPC/sj-ctr-loop.ll create mode 100644 test/CodeGen/PowerPC/sjlj.ll create mode 100644 test/CodeGen/PowerPC/small-arguments.ll create mode 100644 test/CodeGen/PowerPC/spill-nor0.ll create mode 100644 test/CodeGen/PowerPC/stack-protector.ll create mode 100644 test/CodeGen/PowerPC/stack-realign.ll create mode 100644 test/CodeGen/PowerPC/std-unal-fi.ll create mode 100644 test/CodeGen/PowerPC/stdux-constuse.ll create mode 100644 test/CodeGen/PowerPC/stfiwx-2.ll create mode 100644 test/CodeGen/PowerPC/stfiwx.ll create mode 100644 test/CodeGen/PowerPC/store-load-fwd.ll create mode 100644 test/CodeGen/PowerPC/store-update.ll create mode 100644 test/CodeGen/PowerPC/structsinmem.ll create mode 100644 test/CodeGen/PowerPC/structsinregs.ll create mode 100644 test/CodeGen/PowerPC/stubs.ll create mode 100644 test/CodeGen/PowerPC/stwu-gta.ll create mode 100644 test/CodeGen/PowerPC/stwu8.ll create mode 100644 test/CodeGen/PowerPC/stwux.ll create mode 100644 test/CodeGen/PowerPC/sub-bv-types.ll create mode 100644 test/CodeGen/PowerPC/subc.ll create mode 100644 test/CodeGen/PowerPC/subsumes-pred-regs.ll create mode 100644 test/CodeGen/PowerPC/svr4-redzone.ll create mode 100644 test/CodeGen/PowerPC/tailcall1-64.ll create mode 100644 test/CodeGen/PowerPC/tailcall1.ll create mode 100644 test/CodeGen/PowerPC/tailcallpic1.ll create mode 100644 test/CodeGen/PowerPC/tls-2.ll create mode 100644 test/CodeGen/PowerPC/tls-gd.ll create mode 100644 test/CodeGen/PowerPC/tls-ie.ll create mode 100644 test/CodeGen/PowerPC/tls-ld-2.ll create mode 100644 test/CodeGen/PowerPC/tls-ld.ll create mode 100644 test/CodeGen/PowerPC/tls.ll create mode 100644 test/CodeGen/PowerPC/trampoline.ll create mode 100644 test/CodeGen/PowerPC/unal-altivec.ll create mode 100644 test/CodeGen/PowerPC/unal-altivec2.ll create mode 100644 test/CodeGen/PowerPC/unal4-std.ll create mode 100644 test/CodeGen/PowerPC/unaligned.ll create mode 100644 test/CodeGen/PowerPC/unsafe-math.ll create mode 100644 test/CodeGen/PowerPC/unwind-dw2-g.ll create mode 100644 test/CodeGen/PowerPC/unwind-dw2.ll create mode 100644 test/CodeGen/PowerPC/vaddsplat.ll create mode 100644 test/CodeGen/PowerPC/varargs-struct-float.ll create mode 100644 test/CodeGen/PowerPC/varargs.ll create mode 100644 test/CodeGen/PowerPC/vcmp-fold.ll create mode 100644 test/CodeGen/PowerPC/vec-abi-align.ll create mode 100644 test/CodeGen/PowerPC/vec_auto_constant.ll create mode 100644 test/CodeGen/PowerPC/vec_br_cmp.ll create mode 100644 test/CodeGen/PowerPC/vec_buildvector_loadstore.ll create mode 100644 test/CodeGen/PowerPC/vec_call.ll create mode 100644 test/CodeGen/PowerPC/vec_cmp.ll create mode 100644 test/CodeGen/PowerPC/vec_constants.ll create mode 100644 test/CodeGen/PowerPC/vec_conv.ll create mode 100644 test/CodeGen/PowerPC/vec_extload.ll create mode 100644 test/CodeGen/PowerPC/vec_fmuladd.ll create mode 100644 test/CodeGen/PowerPC/vec_fneg.ll create mode 100644 test/CodeGen/PowerPC/vec_insert.ll create mode 100644 test/CodeGen/PowerPC/vec_misaligned.ll create mode 100644 test/CodeGen/PowerPC/vec_mul.ll create mode 100644 test/CodeGen/PowerPC/vec_perf_shuffle.ll create mode 100644 test/CodeGen/PowerPC/vec_rounding.ll create mode 100644 test/CodeGen/PowerPC/vec_select.ll create mode 100644 test/CodeGen/PowerPC/vec_shift.ll create mode 100644 test/CodeGen/PowerPC/vec_shuffle.ll create mode 100644 test/CodeGen/PowerPC/vec_splat.ll create mode 100644 test/CodeGen/PowerPC/vec_splat_constant.ll create mode 100644 test/CodeGen/PowerPC/vec_sqrt.ll create mode 100644 test/CodeGen/PowerPC/vec_vrsave.ll create mode 100644 test/CodeGen/PowerPC/vec_zero.ll create mode 100644 test/CodeGen/PowerPC/vector-identity-shuffle.ll create mode 100644 test/CodeGen/PowerPC/vector.ll create mode 100644 test/CodeGen/PowerPC/vrsave-spill.ll create mode 100644 test/CodeGen/PowerPC/vrspill.ll create mode 100644 test/CodeGen/PowerPC/weak_def_can_be_hidden.ll create mode 100644 test/CodeGen/PowerPC/zero-not-run.ll create mode 100644 test/CodeGen/R600/128bit-kernel-args.ll create mode 100644 test/CodeGen/R600/32-bit-local-address-space.ll create mode 100644 test/CodeGen/R600/64bit-kernel-args.ll create mode 100644 test/CodeGen/R600/README create mode 100644 test/CodeGen/R600/add.ll create mode 100644 test/CodeGen/R600/add_i64.ll create mode 100644 test/CodeGen/R600/address-space.ll create mode 100644 test/CodeGen/R600/and.ll create mode 100644 test/CodeGen/R600/array-ptr-calc-i64.ll create mode 100644 test/CodeGen/R600/atomic_load_add.ll create mode 100644 test/CodeGen/R600/atomic_load_sub.ll create mode 100644 test/CodeGen/R600/bfe_uint.ll create mode 100644 test/CodeGen/R600/bfi_int.ll create mode 100644 test/CodeGen/R600/big_alu.ll create mode 100644 test/CodeGen/R600/bitcast.ll create mode 100644 test/CodeGen/R600/build_vector.ll create mode 100644 test/CodeGen/R600/call_fs.ll create mode 100644 test/CodeGen/R600/cf_end.ll create mode 100644 test/CodeGen/R600/combine_vloads.ll create mode 100644 test/CodeGen/R600/complex-folding.ll create mode 100644 test/CodeGen/R600/dagcombiner-bug-illegal-vec4-int-to-fp.ll create mode 100644 test/CodeGen/R600/disconnected-predset-break-bug.ll create mode 100644 test/CodeGen/R600/dot4-folding.ll create mode 100644 test/CodeGen/R600/elf.ll create mode 100644 test/CodeGen/R600/elf.r600.ll create mode 100644 test/CodeGen/R600/extload.ll create mode 100644 test/CodeGen/R600/fabs.ll create mode 100644 test/CodeGen/R600/fadd.ll create mode 100644 test/CodeGen/R600/fadd64.ll create mode 100644 test/CodeGen/R600/fcmp-cnd.ll create mode 100644 test/CodeGen/R600/fcmp-cnde-int-args.ll create mode 100644 test/CodeGen/R600/fcmp.ll create mode 100644 test/CodeGen/R600/fcmp64.ll create mode 100644 test/CodeGen/R600/fconst64.ll create mode 100644 test/CodeGen/R600/fdiv.ll create mode 100644 test/CodeGen/R600/fdiv64.ll create mode 100644 test/CodeGen/R600/fetch-limits.r600.ll create mode 100644 test/CodeGen/R600/fetch-limits.r700+.ll create mode 100644 test/CodeGen/R600/floor.ll create mode 100644 test/CodeGen/R600/fma.ll create mode 100644 test/CodeGen/R600/fmad.ll create mode 100644 test/CodeGen/R600/fmax.ll create mode 100644 test/CodeGen/R600/fmin.ll create mode 100644 test/CodeGen/R600/fmul.ll create mode 100644 test/CodeGen/R600/fmul64.ll create mode 100644 test/CodeGen/R600/fmuladd.ll create mode 100644 test/CodeGen/R600/fneg-fabs.ll create mode 100644 test/CodeGen/R600/fneg.ll create mode 100644 test/CodeGen/R600/fp64_to_sint.ll create mode 100644 test/CodeGen/R600/fp_to_sint.ll create mode 100644 test/CodeGen/R600/fp_to_uint.ll create mode 100644 test/CodeGen/R600/fpext.ll create mode 100644 test/CodeGen/R600/fptrunc.ll create mode 100644 test/CodeGen/R600/fsqrt.ll create mode 100644 test/CodeGen/R600/fsub.ll create mode 100644 test/CodeGen/R600/fsub64.ll create mode 100644 test/CodeGen/R600/gep-address-space.ll create mode 100644 test/CodeGen/R600/i8-to-double-to-float.ll create mode 100644 test/CodeGen/R600/icmp-select-sete-reverse-args.ll create mode 100644 test/CodeGen/R600/imm.ll create mode 100644 test/CodeGen/R600/indirect-addressing-si.ll create mode 100644 test/CodeGen/R600/insert_vector_elt.ll create mode 100644 test/CodeGen/R600/jump-address.ll create mode 100644 test/CodeGen/R600/kcache-fold.ll create mode 100644 test/CodeGen/R600/kernel-args.ll create mode 100644 test/CodeGen/R600/lds-oqap-crash.ll create mode 100644 test/CodeGen/R600/lds-output-queue.ll create mode 100644 test/CodeGen/R600/lds-size.ll create mode 100644 test/CodeGen/R600/legalizedag-bug-expand-setcc.ll create mode 100644 test/CodeGen/R600/lit.local.cfg create mode 100644 test/CodeGen/R600/literals.ll create mode 100644 test/CodeGen/R600/llvm.AMDGPU.barrier.local.ll create mode 100644 test/CodeGen/R600/llvm.AMDGPU.cube.ll create mode 100644 test/CodeGen/R600/llvm.AMDGPU.imax.ll create mode 100644 test/CodeGen/R600/llvm.AMDGPU.imin.ll create mode 100644 test/CodeGen/R600/llvm.AMDGPU.kill.ll create mode 100644 test/CodeGen/R600/llvm.AMDGPU.mul.ll create mode 100644 test/CodeGen/R600/llvm.AMDGPU.tex.ll create mode 100644 test/CodeGen/R600/llvm.AMDGPU.trunc.ll create mode 100644 test/CodeGen/R600/llvm.AMDGPU.umax.ll create mode 100644 test/CodeGen/R600/llvm.AMDGPU.umin.ll create mode 100644 test/CodeGen/R600/llvm.SI.fs.interp.constant.ll create mode 100644 test/CodeGen/R600/llvm.SI.imageload.ll create mode 100644 test/CodeGen/R600/llvm.SI.load.dword.ll create mode 100644 test/CodeGen/R600/llvm.SI.resinfo.ll create mode 100644 test/CodeGen/R600/llvm.SI.sample-masked.ll create mode 100644 test/CodeGen/R600/llvm.SI.sample.ll create mode 100644 test/CodeGen/R600/llvm.SI.sampled.ll create mode 100644 test/CodeGen/R600/llvm.SI.sendmsg.ll create mode 100644 test/CodeGen/R600/llvm.SI.tbuffer.store.ll create mode 100644 test/CodeGen/R600/llvm.SI.tid.ll create mode 100644 test/CodeGen/R600/llvm.cos.ll create mode 100644 test/CodeGen/R600/llvm.floor.ll create mode 100644 test/CodeGen/R600/llvm.pow.ll create mode 100644 test/CodeGen/R600/llvm.rint.ll create mode 100644 test/CodeGen/R600/llvm.round.ll create mode 100644 test/CodeGen/R600/llvm.sin.ll create mode 100644 test/CodeGen/R600/llvm.sqrt.ll create mode 100644 test/CodeGen/R600/load-input-fold.ll create mode 100644 test/CodeGen/R600/load.ll create mode 100644 test/CodeGen/R600/load.vec.ll create mode 100644 test/CodeGen/R600/load64.ll create mode 100644 test/CodeGen/R600/local-memory-two-objects.ll create mode 100644 test/CodeGen/R600/local-memory.ll create mode 100644 test/CodeGen/R600/loop-address.ll create mode 100644 test/CodeGen/R600/lshl.ll create mode 100644 test/CodeGen/R600/lshr.ll create mode 100644 test/CodeGen/R600/mad_int24.ll create mode 100644 test/CodeGen/R600/mad_uint24.ll create mode 100644 test/CodeGen/R600/max-literals.ll create mode 100644 test/CodeGen/R600/mul.ll create mode 100644 test/CodeGen/R600/mul_int24.ll create mode 100644 test/CodeGen/R600/mul_uint24.ll create mode 100644 test/CodeGen/R600/mulhu.ll create mode 100644 test/CodeGen/R600/or.ll create mode 100644 test/CodeGen/R600/packetizer.ll create mode 100644 test/CodeGen/R600/parallelandifcollapse.ll create mode 100644 test/CodeGen/R600/parallelorifcollapse.ll create mode 100644 test/CodeGen/R600/predicate-dp4.ll create mode 100644 test/CodeGen/R600/predicates.ll create mode 100644 test/CodeGen/R600/private-memory.ll create mode 100644 test/CodeGen/R600/pv-packing.ll create mode 100644 test/CodeGen/R600/pv.ll create mode 100644 test/CodeGen/R600/r600-encoding.ll create mode 100644 test/CodeGen/R600/r600-export-fix.ll create mode 100644 test/CodeGen/R600/r600cfg.ll create mode 100644 test/CodeGen/R600/reciprocal.ll create mode 100644 test/CodeGen/R600/rotr.ll create mode 100644 test/CodeGen/R600/rv7x0_count3.ll create mode 100644 test/CodeGen/R600/schedule-fs-loop-nested-if.ll create mode 100644 test/CodeGen/R600/schedule-fs-loop-nested.ll create mode 100644 test/CodeGen/R600/schedule-fs-loop.ll create mode 100644 test/CodeGen/R600/schedule-if-2.ll create mode 100644 test/CodeGen/R600/schedule-if.ll create mode 100644 test/CodeGen/R600/schedule-vs-if-nested-loop.ll create mode 100644 test/CodeGen/R600/sdiv.ll create mode 100644 test/CodeGen/R600/select.ll create mode 100644 test/CodeGen/R600/selectcc-cnd.ll create mode 100644 test/CodeGen/R600/selectcc-cnde-int.ll create mode 100644 test/CodeGen/R600/selectcc-icmp-select-float.ll create mode 100644 test/CodeGen/R600/selectcc-opt.ll create mode 100644 test/CodeGen/R600/set-dx10.ll create mode 100644 test/CodeGen/R600/setcc.ll create mode 100644 test/CodeGen/R600/setcc64.ll create mode 100644 test/CodeGen/R600/seto.ll create mode 100644 test/CodeGen/R600/setuo.ll create mode 100644 test/CodeGen/R600/sgpr-copy-duplicate-operand.ll create mode 100644 test/CodeGen/R600/sgpr-copy.ll create mode 100644 test/CodeGen/R600/shared-op-cycle.ll create mode 100644 test/CodeGen/R600/shl.ll create mode 100644 test/CodeGen/R600/si-annotate-cf-assertion.ll create mode 100644 test/CodeGen/R600/si-lod-bias.ll create mode 100644 test/CodeGen/R600/si-sgpr-spill.ll create mode 100644 test/CodeGen/R600/si-vector-hang.ll create mode 100644 test/CodeGen/R600/sign_extend.ll create mode 100644 test/CodeGen/R600/sint_to_fp.ll create mode 100644 test/CodeGen/R600/sint_to_fp64.ll create mode 100644 test/CodeGen/R600/sra.ll create mode 100644 test/CodeGen/R600/srl.ll create mode 100644 test/CodeGen/R600/store-vector-ptrs.ll create mode 100644 test/CodeGen/R600/store.ll create mode 100644 test/CodeGen/R600/store.r600.ll create mode 100644 test/CodeGen/R600/structurize.ll create mode 100644 test/CodeGen/R600/structurize1.ll create mode 100644 test/CodeGen/R600/sub.ll create mode 100644 test/CodeGen/R600/swizzle-export.ll create mode 100644 test/CodeGen/R600/tex-clause-antidep.ll create mode 100644 test/CodeGen/R600/texture-input-merge.ll create mode 100644 test/CodeGen/R600/trunc-vector-store-assertion-failure.ll create mode 100644 test/CodeGen/R600/trunc.ll create mode 100644 test/CodeGen/R600/udiv.ll create mode 100644 test/CodeGen/R600/uint_to_fp.ll create mode 100644 test/CodeGen/R600/unaligned-load-store.ll create mode 100644 test/CodeGen/R600/unsupported-cc.ll create mode 100644 test/CodeGen/R600/urecip.ll create mode 100644 test/CodeGen/R600/urem.ll create mode 100644 test/CodeGen/R600/vertex-fetch-encoding.ll create mode 100644 test/CodeGen/R600/vselect.ll create mode 100644 test/CodeGen/R600/vselect64.ll create mode 100644 test/CodeGen/R600/vtx-fetch-branch.ll create mode 100644 test/CodeGen/R600/vtx-schedule.ll create mode 100644 test/CodeGen/R600/wait.ll create mode 100644 test/CodeGen/R600/work-item-intrinsics.ll create mode 100644 test/CodeGen/R600/wrong-transalu-pos-fix.ll create mode 100644 test/CodeGen/R600/xor.ll create mode 100644 test/CodeGen/R600/zero_extend.ll create mode 100644 test/CodeGen/SPARC/2006-01-22-BitConvertLegalize.ll create mode 100644 test/CodeGen/SPARC/2007-05-09-JumpTables.ll create mode 100644 test/CodeGen/SPARC/2007-07-05-LiveIntervalAssert.ll create mode 100644 test/CodeGen/SPARC/2008-10-10-InlineAsmMemoryOperand.ll create mode 100644 test/CodeGen/SPARC/2008-10-10-InlineAsmRegOperand.ll create mode 100644 test/CodeGen/SPARC/2009-08-28-PIC.ll create mode 100644 test/CodeGen/SPARC/2009-08-28-WeakLinkage.ll create mode 100644 test/CodeGen/SPARC/2011-01-11-CC.ll create mode 100644 test/CodeGen/SPARC/2011-01-11-Call.ll create mode 100644 test/CodeGen/SPARC/2011-01-11-FrameAddr.ll create mode 100644 test/CodeGen/SPARC/2011-01-19-DelaySlot.ll create mode 100644 test/CodeGen/SPARC/2011-01-21-ByValArgs.ll create mode 100644 test/CodeGen/SPARC/2011-01-22-SRet.ll create mode 100644 test/CodeGen/SPARC/2011-12-03-TailDuplication.ll create mode 100644 test/CodeGen/SPARC/2012-05-01-LowerArguments.ll create mode 100644 test/CodeGen/SPARC/2013-05-17-CallFrame.ll create mode 100644 test/CodeGen/SPARC/64abi.ll create mode 100644 test/CodeGen/SPARC/64bit.ll create mode 100644 test/CodeGen/SPARC/64cond.ll create mode 100644 test/CodeGen/SPARC/DbgValueOtherTargets.test create mode 100644 test/CodeGen/SPARC/basictest.ll create mode 100644 test/CodeGen/SPARC/blockaddr.ll create mode 100644 test/CodeGen/SPARC/constpool.ll create mode 100644 test/CodeGen/SPARC/ctpop.ll create mode 100644 test/CodeGen/SPARC/exception.ll create mode 100644 test/CodeGen/SPARC/float.ll create mode 100644 test/CodeGen/SPARC/fp128.ll create mode 100644 test/CodeGen/SPARC/globals.ll create mode 100644 test/CodeGen/SPARC/leafproc.ll create mode 100644 test/CodeGen/SPARC/lit.local.cfg create mode 100644 test/CodeGen/SPARC/mult-alt-generic-sparc.ll create mode 100644 test/CodeGen/SPARC/private.ll create mode 100644 test/CodeGen/SPARC/rem.ll create mode 100644 test/CodeGen/SPARC/setjmp.ll create mode 100644 test/CodeGen/SPARC/tls.ll create mode 100644 test/CodeGen/SPARC/varargs.ll create mode 100644 test/CodeGen/SystemZ/Large/branch-range-01.py create mode 100644 test/CodeGen/SystemZ/Large/branch-range-02.py create mode 100644 test/CodeGen/SystemZ/Large/branch-range-03.py create mode 100644 test/CodeGen/SystemZ/Large/branch-range-04.py create mode 100644 test/CodeGen/SystemZ/Large/branch-range-05.py create mode 100644 test/CodeGen/SystemZ/Large/branch-range-06.py create mode 100644 test/CodeGen/SystemZ/Large/branch-range-07.py create mode 100644 test/CodeGen/SystemZ/Large/branch-range-08.py create mode 100644 test/CodeGen/SystemZ/Large/branch-range-09.py create mode 100644 test/CodeGen/SystemZ/Large/branch-range-10.py create mode 100644 test/CodeGen/SystemZ/Large/branch-range-11.py create mode 100644 test/CodeGen/SystemZ/Large/branch-range-12.py create mode 100644 test/CodeGen/SystemZ/Large/lit.local.cfg create mode 100644 test/CodeGen/SystemZ/Large/spill-01.py create mode 100644 test/CodeGen/SystemZ/Large/spill-02.py create mode 100644 test/CodeGen/SystemZ/addr-01.ll create mode 100644 test/CodeGen/SystemZ/addr-02.ll create mode 100644 test/CodeGen/SystemZ/addr-03.ll create mode 100644 test/CodeGen/SystemZ/alias-01.ll create mode 100644 test/CodeGen/SystemZ/alloca-01.ll create mode 100644 test/CodeGen/SystemZ/alloca-02.ll create mode 100644 test/CodeGen/SystemZ/and-01.ll create mode 100644 test/CodeGen/SystemZ/and-02.ll create mode 100644 test/CodeGen/SystemZ/and-03.ll create mode 100644 test/CodeGen/SystemZ/and-04.ll create mode 100644 test/CodeGen/SystemZ/and-05.ll create mode 100644 test/CodeGen/SystemZ/and-06.ll create mode 100644 test/CodeGen/SystemZ/and-07.ll create mode 100644 test/CodeGen/SystemZ/and-08.ll create mode 100644 test/CodeGen/SystemZ/args-01.ll create mode 100644 test/CodeGen/SystemZ/args-02.ll create mode 100644 test/CodeGen/SystemZ/args-03.ll create mode 100644 test/CodeGen/SystemZ/args-04.ll create mode 100644 test/CodeGen/SystemZ/args-05.ll create mode 100644 test/CodeGen/SystemZ/args-06.ll create mode 100644 test/CodeGen/SystemZ/asm-01.ll create mode 100644 test/CodeGen/SystemZ/asm-02.ll create mode 100644 test/CodeGen/SystemZ/asm-03.ll create mode 100644 test/CodeGen/SystemZ/asm-04.ll create mode 100644 test/CodeGen/SystemZ/asm-05.ll create mode 100644 test/CodeGen/SystemZ/asm-06.ll create mode 100644 test/CodeGen/SystemZ/asm-07.ll create mode 100644 test/CodeGen/SystemZ/asm-08.ll create mode 100644 test/CodeGen/SystemZ/asm-09.ll create mode 100644 test/CodeGen/SystemZ/asm-10.ll create mode 100644 test/CodeGen/SystemZ/asm-11.ll create mode 100644 test/CodeGen/SystemZ/asm-12.ll create mode 100644 test/CodeGen/SystemZ/asm-13.ll create mode 100644 test/CodeGen/SystemZ/asm-14.ll create mode 100644 test/CodeGen/SystemZ/asm-15.ll create mode 100644 test/CodeGen/SystemZ/asm-16.ll create mode 100644 test/CodeGen/SystemZ/asm-17.ll create mode 100644 test/CodeGen/SystemZ/asm-18.ll create mode 100644 test/CodeGen/SystemZ/atomic-load-01.ll create mode 100644 test/CodeGen/SystemZ/atomic-load-02.ll create mode 100644 test/CodeGen/SystemZ/atomic-load-03.ll create mode 100644 test/CodeGen/SystemZ/atomic-load-04.ll create mode 100644 test/CodeGen/SystemZ/atomic-store-01.ll create mode 100644 test/CodeGen/SystemZ/atomic-store-02.ll create mode 100644 test/CodeGen/SystemZ/atomic-store-03.ll create mode 100644 test/CodeGen/SystemZ/atomic-store-04.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-add-01.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-add-02.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-add-03.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-add-04.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-and-01.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-and-02.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-and-03.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-and-04.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-minmax-01.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-minmax-02.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-minmax-03.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-minmax-04.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-nand-01.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-nand-02.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-nand-03.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-nand-04.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-or-01.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-or-02.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-or-03.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-or-04.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-sub-01.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-sub-02.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-sub-03.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-sub-04.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-xchg-01.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-xchg-02.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-xchg-03.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-xchg-04.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-xor-01.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-xor-02.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-xor-03.ll create mode 100644 test/CodeGen/SystemZ/atomicrmw-xor-04.ll create mode 100644 test/CodeGen/SystemZ/branch-01.ll create mode 100644 test/CodeGen/SystemZ/branch-02.ll create mode 100644 test/CodeGen/SystemZ/branch-03.ll create mode 100644 test/CodeGen/SystemZ/branch-04.ll create mode 100644 test/CodeGen/SystemZ/branch-05.ll create mode 100644 test/CodeGen/SystemZ/branch-06.ll create mode 100644 test/CodeGen/SystemZ/branch-07.ll create mode 100644 test/CodeGen/SystemZ/branch-08.ll create mode 100644 test/CodeGen/SystemZ/branch-09.ll create mode 100644 test/CodeGen/SystemZ/branch-10.ll create mode 100644 test/CodeGen/SystemZ/bswap-01.ll create mode 100644 test/CodeGen/SystemZ/bswap-02.ll create mode 100644 test/CodeGen/SystemZ/bswap-03.ll create mode 100644 test/CodeGen/SystemZ/bswap-04.ll create mode 100644 test/CodeGen/SystemZ/bswap-05.ll create mode 100644 test/CodeGen/SystemZ/call-01.ll create mode 100644 test/CodeGen/SystemZ/call-02.ll create mode 100644 test/CodeGen/SystemZ/call-03.ll create mode 100644 test/CodeGen/SystemZ/cmpxchg-01.ll create mode 100644 test/CodeGen/SystemZ/cmpxchg-02.ll create mode 100644 test/CodeGen/SystemZ/cmpxchg-03.ll create mode 100644 test/CodeGen/SystemZ/cmpxchg-04.ll create mode 100644 test/CodeGen/SystemZ/cond-load-01.ll create mode 100644 test/CodeGen/SystemZ/cond-load-02.ll create mode 100644 test/CodeGen/SystemZ/cond-move-01.ll create mode 100644 test/CodeGen/SystemZ/cond-store-01.ll create mode 100644 test/CodeGen/SystemZ/cond-store-02.ll create mode 100644 test/CodeGen/SystemZ/cond-store-03.ll create mode 100644 test/CodeGen/SystemZ/cond-store-04.ll create mode 100644 test/CodeGen/SystemZ/cond-store-05.ll create mode 100644 test/CodeGen/SystemZ/cond-store-06.ll create mode 100644 test/CodeGen/SystemZ/cond-store-07.ll create mode 100644 test/CodeGen/SystemZ/cond-store-08.ll create mode 100644 test/CodeGen/SystemZ/fp-abs-01.ll create mode 100644 test/CodeGen/SystemZ/fp-abs-02.ll create mode 100644 test/CodeGen/SystemZ/fp-add-01.ll create mode 100644 test/CodeGen/SystemZ/fp-add-02.ll create mode 100644 test/CodeGen/SystemZ/fp-add-03.ll create mode 100644 test/CodeGen/SystemZ/fp-cmp-01.ll create mode 100644 test/CodeGen/SystemZ/fp-cmp-02.ll create mode 100644 test/CodeGen/SystemZ/fp-cmp-03.ll create mode 100644 test/CodeGen/SystemZ/fp-cmp-04.ll create mode 100644 test/CodeGen/SystemZ/fp-const-01.ll create mode 100644 test/CodeGen/SystemZ/fp-const-02.ll create mode 100644 test/CodeGen/SystemZ/fp-const-03.ll create mode 100644 test/CodeGen/SystemZ/fp-const-04.ll create mode 100644 test/CodeGen/SystemZ/fp-const-05.ll create mode 100644 test/CodeGen/SystemZ/fp-const-06.ll create mode 100644 test/CodeGen/SystemZ/fp-const-07.ll create mode 100644 test/CodeGen/SystemZ/fp-const-08.ll create mode 100644 test/CodeGen/SystemZ/fp-const-09.ll create mode 100644 test/CodeGen/SystemZ/fp-conv-01.ll create mode 100644 test/CodeGen/SystemZ/fp-conv-02.ll create mode 100644 test/CodeGen/SystemZ/fp-conv-03.ll create mode 100644 test/CodeGen/SystemZ/fp-conv-04.ll create mode 100644 test/CodeGen/SystemZ/fp-conv-05.ll create mode 100644 test/CodeGen/SystemZ/fp-conv-06.ll create mode 100644 test/CodeGen/SystemZ/fp-conv-07.ll create mode 100644 test/CodeGen/SystemZ/fp-conv-08.ll create mode 100644 test/CodeGen/SystemZ/fp-conv-09.ll create mode 100644 test/CodeGen/SystemZ/fp-conv-10.ll create mode 100644 test/CodeGen/SystemZ/fp-conv-11.ll create mode 100644 test/CodeGen/SystemZ/fp-conv-12.ll create mode 100644 test/CodeGen/SystemZ/fp-copysign-01.ll create mode 100644 test/CodeGen/SystemZ/fp-div-01.ll create mode 100644 test/CodeGen/SystemZ/fp-div-02.ll create mode 100644 test/CodeGen/SystemZ/fp-div-03.ll create mode 100644 test/CodeGen/SystemZ/fp-move-01.ll create mode 100644 test/CodeGen/SystemZ/fp-move-02.ll create mode 100644 test/CodeGen/SystemZ/fp-move-03.ll create mode 100644 test/CodeGen/SystemZ/fp-move-04.ll create mode 100644 test/CodeGen/SystemZ/fp-move-05.ll create mode 100644 test/CodeGen/SystemZ/fp-move-06.ll create mode 100644 test/CodeGen/SystemZ/fp-move-07.ll create mode 100644 test/CodeGen/SystemZ/fp-move-08.ll create mode 100644 test/CodeGen/SystemZ/fp-move-09.ll create mode 100644 test/CodeGen/SystemZ/fp-mul-01.ll create mode 100644 test/CodeGen/SystemZ/fp-mul-02.ll create mode 100644 test/CodeGen/SystemZ/fp-mul-03.ll create mode 100644 test/CodeGen/SystemZ/fp-mul-04.ll create mode 100644 test/CodeGen/SystemZ/fp-mul-05.ll create mode 100644 test/CodeGen/SystemZ/fp-mul-06.ll create mode 100644 test/CodeGen/SystemZ/fp-mul-07.ll create mode 100644 test/CodeGen/SystemZ/fp-mul-08.ll create mode 100644 test/CodeGen/SystemZ/fp-mul-09.ll create mode 100644 test/CodeGen/SystemZ/fp-neg-01.ll create mode 100644 test/CodeGen/SystemZ/fp-round-01.ll create mode 100644 test/CodeGen/SystemZ/fp-round-02.ll create mode 100644 test/CodeGen/SystemZ/fp-sqrt-01.ll create mode 100644 test/CodeGen/SystemZ/fp-sqrt-02.ll create mode 100644 test/CodeGen/SystemZ/fp-sqrt-03.ll create mode 100644 test/CodeGen/SystemZ/fp-sub-01.ll create mode 100644 test/CodeGen/SystemZ/fp-sub-02.ll create mode 100644 test/CodeGen/SystemZ/fp-sub-03.ll create mode 100644 test/CodeGen/SystemZ/frame-01.ll create mode 100644 test/CodeGen/SystemZ/frame-02.ll create mode 100644 test/CodeGen/SystemZ/frame-03.ll create mode 100644 test/CodeGen/SystemZ/frame-04.ll create mode 100644 test/CodeGen/SystemZ/frame-05.ll create mode 100644 test/CodeGen/SystemZ/frame-06.ll create mode 100644 test/CodeGen/SystemZ/frame-07.ll create mode 100644 test/CodeGen/SystemZ/frame-08.ll create mode 100644 test/CodeGen/SystemZ/frame-09.ll create mode 100644 test/CodeGen/SystemZ/frame-10.ll create mode 100644 test/CodeGen/SystemZ/frame-11.ll create mode 100644 test/CodeGen/SystemZ/frame-13.ll create mode 100644 test/CodeGen/SystemZ/frame-14.ll create mode 100644 test/CodeGen/SystemZ/frame-15.ll create mode 100644 test/CodeGen/SystemZ/frame-16.ll create mode 100644 test/CodeGen/SystemZ/frame-17.ll create mode 100644 test/CodeGen/SystemZ/frame-18.ll create mode 100644 test/CodeGen/SystemZ/insert-01.ll create mode 100644 test/CodeGen/SystemZ/insert-02.ll create mode 100644 test/CodeGen/SystemZ/insert-03.ll create mode 100644 test/CodeGen/SystemZ/insert-04.ll create mode 100644 test/CodeGen/SystemZ/insert-05.ll create mode 100644 test/CodeGen/SystemZ/insert-06.ll create mode 100644 test/CodeGen/SystemZ/int-abs-01.ll create mode 100644 test/CodeGen/SystemZ/int-add-01.ll create mode 100644 test/CodeGen/SystemZ/int-add-02.ll create mode 100644 test/CodeGen/SystemZ/int-add-03.ll create mode 100644 test/CodeGen/SystemZ/int-add-04.ll create mode 100644 test/CodeGen/SystemZ/int-add-05.ll create mode 100644 test/CodeGen/SystemZ/int-add-06.ll create mode 100644 test/CodeGen/SystemZ/int-add-07.ll create mode 100644 test/CodeGen/SystemZ/int-add-08.ll create mode 100644 test/CodeGen/SystemZ/int-add-09.ll create mode 100644 test/CodeGen/SystemZ/int-add-10.ll create mode 100644 test/CodeGen/SystemZ/int-add-11.ll create mode 100644 test/CodeGen/SystemZ/int-add-12.ll create mode 100644 test/CodeGen/SystemZ/int-add-13.ll create mode 100644 test/CodeGen/SystemZ/int-add-14.ll create mode 100644 test/CodeGen/SystemZ/int-add-15.ll create mode 100644 test/CodeGen/SystemZ/int-add-16.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-01.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-02.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-03.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-04.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-05.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-06.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-07.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-08.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-09.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-10.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-11.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-12.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-13.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-14.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-15.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-16.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-17.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-18.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-19.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-20.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-21.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-22.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-23.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-24.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-25.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-26.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-27.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-28.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-29.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-30.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-31.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-32.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-33.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-34.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-35.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-36.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-37.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-38.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-39.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-40.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-41.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-42.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-43.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-44.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-45.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-46.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-47.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-48.ll create mode 100644 test/CodeGen/SystemZ/int-cmp-49.ll create mode 100644 test/CodeGen/SystemZ/int-const-01.ll create mode 100644 test/CodeGen/SystemZ/int-const-02.ll create mode 100644 test/CodeGen/SystemZ/int-const-03.ll create mode 100644 test/CodeGen/SystemZ/int-const-04.ll create mode 100644 test/CodeGen/SystemZ/int-const-05.ll create mode 100644 test/CodeGen/SystemZ/int-const-06.ll create mode 100644 test/CodeGen/SystemZ/int-conv-01.ll create mode 100644 test/CodeGen/SystemZ/int-conv-02.ll create mode 100644 test/CodeGen/SystemZ/int-conv-03.ll create mode 100644 test/CodeGen/SystemZ/int-conv-04.ll create mode 100644 test/CodeGen/SystemZ/int-conv-05.ll create mode 100644 test/CodeGen/SystemZ/int-conv-06.ll create mode 100644 test/CodeGen/SystemZ/int-conv-07.ll create mode 100644 test/CodeGen/SystemZ/int-conv-08.ll create mode 100644 test/CodeGen/SystemZ/int-conv-09.ll create mode 100644 test/CodeGen/SystemZ/int-conv-10.ll create mode 100644 test/CodeGen/SystemZ/int-conv-11.ll create mode 100644 test/CodeGen/SystemZ/int-div-01.ll create mode 100644 test/CodeGen/SystemZ/int-div-02.ll create mode 100644 test/CodeGen/SystemZ/int-div-03.ll create mode 100644 test/CodeGen/SystemZ/int-div-04.ll create mode 100644 test/CodeGen/SystemZ/int-div-05.ll create mode 100644 test/CodeGen/SystemZ/int-div-06.ll create mode 100644 test/CodeGen/SystemZ/int-move-01.ll create mode 100644 test/CodeGen/SystemZ/int-move-02.ll create mode 100644 test/CodeGen/SystemZ/int-move-03.ll create mode 100644 test/CodeGen/SystemZ/int-move-04.ll create mode 100644 test/CodeGen/SystemZ/int-move-05.ll create mode 100644 test/CodeGen/SystemZ/int-move-06.ll create mode 100644 test/CodeGen/SystemZ/int-move-07.ll create mode 100644 test/CodeGen/SystemZ/int-move-08.ll create mode 100644 test/CodeGen/SystemZ/int-move-09.ll create mode 100644 test/CodeGen/SystemZ/int-mul-01.ll create mode 100644 test/CodeGen/SystemZ/int-mul-02.ll create mode 100644 test/CodeGen/SystemZ/int-mul-03.ll create mode 100644 test/CodeGen/SystemZ/int-mul-04.ll create mode 100644 test/CodeGen/SystemZ/int-mul-05.ll create mode 100644 test/CodeGen/SystemZ/int-mul-06.ll create mode 100644 test/CodeGen/SystemZ/int-mul-07.ll create mode 100644 test/CodeGen/SystemZ/int-mul-08.ll create mode 100644 test/CodeGen/SystemZ/int-neg-01.ll create mode 100644 test/CodeGen/SystemZ/int-neg-02.ll create mode 100644 test/CodeGen/SystemZ/int-sub-01.ll create mode 100644 test/CodeGen/SystemZ/int-sub-02.ll create mode 100644 test/CodeGen/SystemZ/int-sub-03.ll create mode 100644 test/CodeGen/SystemZ/int-sub-04.ll create mode 100644 test/CodeGen/SystemZ/int-sub-05.ll create mode 100644 test/CodeGen/SystemZ/int-sub-06.ll create mode 100644 test/CodeGen/SystemZ/int-sub-07.ll create mode 100644 test/CodeGen/SystemZ/int-sub-08.ll create mode 100644 test/CodeGen/SystemZ/int-sub-09.ll create mode 100644 test/CodeGen/SystemZ/la-01.ll create mode 100644 test/CodeGen/SystemZ/la-02.ll create mode 100644 test/CodeGen/SystemZ/la-03.ll create mode 100644 test/CodeGen/SystemZ/la-04.ll create mode 100644 test/CodeGen/SystemZ/lit.local.cfg create mode 100644 test/CodeGen/SystemZ/loop-01.ll create mode 100644 test/CodeGen/SystemZ/memchr-01.ll create mode 100644 test/CodeGen/SystemZ/memchr-02.ll create mode 100644 test/CodeGen/SystemZ/memcmp-01.ll create mode 100644 test/CodeGen/SystemZ/memcmp-02.ll create mode 100644 test/CodeGen/SystemZ/memcpy-01.ll create mode 100644 test/CodeGen/SystemZ/memcpy-02.ll create mode 100644 test/CodeGen/SystemZ/memset-01.ll create mode 100644 test/CodeGen/SystemZ/memset-02.ll create mode 100644 test/CodeGen/SystemZ/memset-03.ll create mode 100644 test/CodeGen/SystemZ/memset-04.ll create mode 100644 test/CodeGen/SystemZ/or-01.ll create mode 100644 test/CodeGen/SystemZ/or-02.ll create mode 100644 test/CodeGen/SystemZ/or-03.ll create mode 100644 test/CodeGen/SystemZ/or-04.ll create mode 100644 test/CodeGen/SystemZ/or-05.ll create mode 100644 test/CodeGen/SystemZ/or-06.ll create mode 100644 test/CodeGen/SystemZ/or-07.ll create mode 100644 test/CodeGen/SystemZ/or-08.ll create mode 100644 test/CodeGen/SystemZ/prefetch-01.ll create mode 100644 test/CodeGen/SystemZ/risbg-01.ll create mode 100644 test/CodeGen/SystemZ/risbg-02.ll create mode 100644 test/CodeGen/SystemZ/rnsbg-01.ll create mode 100644 test/CodeGen/SystemZ/rosbg-01.ll create mode 100644 test/CodeGen/SystemZ/rxsbg-01.ll create mode 100644 test/CodeGen/SystemZ/setcc-01.ll create mode 100644 test/CodeGen/SystemZ/setcc-02.ll create mode 100644 test/CodeGen/SystemZ/shift-01.ll create mode 100644 test/CodeGen/SystemZ/shift-02.ll create mode 100644 test/CodeGen/SystemZ/shift-03.ll create mode 100644 test/CodeGen/SystemZ/shift-04.ll create mode 100644 test/CodeGen/SystemZ/shift-05.ll create mode 100644 test/CodeGen/SystemZ/shift-06.ll create mode 100644 test/CodeGen/SystemZ/shift-07.ll create mode 100644 test/CodeGen/SystemZ/shift-08.ll create mode 100644 test/CodeGen/SystemZ/shift-09.ll create mode 100644 test/CodeGen/SystemZ/shift-10.ll create mode 100644 test/CodeGen/SystemZ/spill-01.ll create mode 100644 test/CodeGen/SystemZ/strcmp-01.ll create mode 100644 test/CodeGen/SystemZ/strcmp-02.ll create mode 100644 test/CodeGen/SystemZ/strcpy-01.ll create mode 100644 test/CodeGen/SystemZ/strlen-01.ll create mode 100644 test/CodeGen/SystemZ/strlen-02.ll create mode 100644 test/CodeGen/SystemZ/tls-01.ll create mode 100644 test/CodeGen/SystemZ/unaligned-01.ll create mode 100644 test/CodeGen/SystemZ/xor-01.ll create mode 100644 test/CodeGen/SystemZ/xor-02.ll create mode 100644 test/CodeGen/SystemZ/xor-03.ll create mode 100644 test/CodeGen/SystemZ/xor-04.ll create mode 100644 test/CodeGen/SystemZ/xor-05.ll create mode 100644 test/CodeGen/SystemZ/xor-06.ll create mode 100644 test/CodeGen/SystemZ/xor-07.ll create mode 100644 test/CodeGen/SystemZ/xor-08.ll create mode 100644 test/CodeGen/Thumb/2007-01-31-RegInfoAssert.ll create mode 100644 test/CodeGen/Thumb/2007-02-02-JoinIntervalsCrash.ll create mode 100644 test/CodeGen/Thumb/2007-05-05-InvalidPushPop.ll create mode 100644 test/CodeGen/Thumb/2009-06-18-ThumbCommuteMul.ll create mode 100644 test/CodeGen/Thumb/2009-07-20-TwoAddrBug.ll create mode 100644 test/CodeGen/Thumb/2009-07-27-PEIAssert.ll create mode 100644 test/CodeGen/Thumb/2009-08-12-ConstIslandAssert.ll create mode 100644 test/CodeGen/Thumb/2009-08-12-RegInfoAssert.ll create mode 100644 test/CodeGen/Thumb/2009-08-20-ISelBug.ll create mode 100644 test/CodeGen/Thumb/2009-12-17-pre-regalloc-taildup.ll create mode 100644 test/CodeGen/Thumb/2010-06-18-SibCallCrash.ll create mode 100644 test/CodeGen/Thumb/2010-07-01-FuncAlign.ll create mode 100644 test/CodeGen/Thumb/2010-07-15-debugOrdering.ll create mode 100644 test/CodeGen/Thumb/2011-05-11-DAGLegalizer.ll create mode 100644 test/CodeGen/Thumb/2011-06-16-NoGPRs.ll create mode 100644 test/CodeGen/Thumb/2011-EpilogueBug.ll create mode 100644 test/CodeGen/Thumb/2012-04-26-M0ISelBug.ll create mode 100644 test/CodeGen/Thumb/DbgValueOtherTargets.test create mode 100644 test/CodeGen/Thumb/PR17309.ll create mode 100644 test/CodeGen/Thumb/asmprinter-bug.ll create mode 100644 test/CodeGen/Thumb/barrier.ll create mode 100644 test/CodeGen/Thumb/dyn-stackalloc.ll create mode 100644 test/CodeGen/Thumb/fpconv.ll create mode 100644 test/CodeGen/Thumb/fpow.ll create mode 100644 test/CodeGen/Thumb/frame_thumb.ll create mode 100644 test/CodeGen/Thumb/iabs.ll create mode 100644 test/CodeGen/Thumb/inlineasm-imm-thumb.ll create mode 100644 test/CodeGen/Thumb/inlineasm-thumb.ll create mode 100644 test/CodeGen/Thumb/ispositive.ll create mode 100644 test/CodeGen/Thumb/large-stack.ll create mode 100644 test/CodeGen/Thumb/ldr_ext.ll create mode 100644 test/CodeGen/Thumb/ldr_frame.ll create mode 100644 test/CodeGen/Thumb/lit.local.cfg create mode 100644 test/CodeGen/Thumb/long-setcc.ll create mode 100644 test/CodeGen/Thumb/long.ll create mode 100644 test/CodeGen/Thumb/long_shift.ll create mode 100644 test/CodeGen/Thumb/mul.ll create mode 100644 test/CodeGen/Thumb/pop.ll create mode 100644 test/CodeGen/Thumb/push.ll create mode 100644 test/CodeGen/Thumb/rev.ll create mode 100644 test/CodeGen/Thumb/select.ll create mode 100644 test/CodeGen/Thumb/stack-coloring-without-frame-ptr.ll create mode 100644 test/CodeGen/Thumb/stack-frame.ll create mode 100644 test/CodeGen/Thumb/thumb-imm.ll create mode 100644 test/CodeGen/Thumb/trap.ll create mode 100644 test/CodeGen/Thumb/tst_teq.ll create mode 100644 test/CodeGen/Thumb/unord.ll create mode 100644 test/CodeGen/Thumb/vargs.ll create mode 100644 test/CodeGen/Thumb2/2009-07-17-CrossRegClassCopy.ll create mode 100644 test/CodeGen/Thumb2/2009-07-21-ISelBug.ll create mode 100644 test/CodeGen/Thumb2/2009-07-23-CPIslandBug.ll create mode 100644 test/CodeGen/Thumb2/2009-07-30-PEICrash.ll create mode 100644 test/CodeGen/Thumb2/2009-08-01-WrongLDRBOpc.ll create mode 100644 test/CodeGen/Thumb2/2009-08-02-CoalescerBug.ll create mode 100644 test/CodeGen/Thumb2/2009-08-04-CoalescerAssert.ll create mode 100644 test/CodeGen/Thumb2/2009-08-04-CoalescerBug.ll create mode 100644 test/CodeGen/Thumb2/2009-08-04-ScavengerAssert.ll create mode 100644 test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug.ll create mode 100644 test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug2.ll create mode 100644 test/CodeGen/Thumb2/2009-08-04-SubregLoweringBug3.ll create mode 100644 test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll create mode 100644 test/CodeGen/Thumb2/2009-08-07-CoalescerBug.ll create mode 100644 test/CodeGen/Thumb2/2009-08-07-NeonFPBug.ll create mode 100644 test/CodeGen/Thumb2/2009-08-08-ScavengerAssert.ll create mode 100644 test/CodeGen/Thumb2/2009-08-10-ISelBug.ll create mode 100644 test/CodeGen/Thumb2/2009-08-21-PostRAKill4.ll create mode 100644 test/CodeGen/Thumb2/2009-09-01-PostRAProlog.ll create mode 100644 test/CodeGen/Thumb2/2009-09-28-ITBlockBug.ll create mode 100644 test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll create mode 100644 test/CodeGen/Thumb2/2009-11-01-CopyReg2RegBug.ll create mode 100644 test/CodeGen/Thumb2/2009-11-11-ScavengerAssert.ll create mode 100644 test/CodeGen/Thumb2/2009-11-13-STRDBug.ll create mode 100644 test/CodeGen/Thumb2/2009-12-01-LoopIVUsers.ll create mode 100644 test/CodeGen/Thumb2/2010-01-06-TailDuplicateLabels.ll create mode 100644 test/CodeGen/Thumb2/2010-01-19-RemovePredicates.ll create mode 100644 test/CodeGen/Thumb2/2010-02-11-phi-cycle.ll create mode 100644 test/CodeGen/Thumb2/2010-02-24-BigStack.ll create mode 100644 test/CodeGen/Thumb2/2010-03-08-addi12-ccout.ll create mode 100644 test/CodeGen/Thumb2/2010-03-15-AsmCCClobber.ll create mode 100644 test/CodeGen/Thumb2/2010-04-15-DynAllocBug.ll create mode 100644 test/CodeGen/Thumb2/2010-04-26-CopyRegCrash.ll create mode 100644 test/CodeGen/Thumb2/2010-05-24-rsbs.ll create mode 100644 test/CodeGen/Thumb2/2010-06-14-NEONCoalescer.ll create mode 100644 test/CodeGen/Thumb2/2010-06-19-ITBlockCrash.ll create mode 100644 test/CodeGen/Thumb2/2010-06-21-TailMergeBug.ll create mode 100644 test/CodeGen/Thumb2/2010-08-10-VarSizedAllocaBug.ll create mode 100644 test/CodeGen/Thumb2/2010-11-22-EpilogueBug.ll create mode 100644 test/CodeGen/Thumb2/2010-12-03-AddSPNarrowing.ll create mode 100644 test/CodeGen/Thumb2/2011-04-21-FILoweringBug.ll create mode 100644 test/CodeGen/Thumb2/2011-06-07-TwoAddrEarlyClobber.ll create mode 100644 test/CodeGen/Thumb2/2011-12-16-T2SizeReduceAssert.ll create mode 100644 test/CodeGen/Thumb2/2012-01-13-CBNZBug.ll create mode 100644 test/CodeGen/Thumb2/2013-02-19-tail-call-register-hint.ll create mode 100644 test/CodeGen/Thumb2/2013-03-02-vduplane-nonconstant-source-index.ll create mode 100644 test/CodeGen/Thumb2/2013-03-06-vector-sext-operand-scalarize.ll create mode 100644 test/CodeGen/Thumb2/aligned-constants.ll create mode 100644 test/CodeGen/Thumb2/aligned-spill.ll create mode 100644 test/CodeGen/Thumb2/bfi.ll create mode 100644 test/CodeGen/Thumb2/bfx.ll create mode 100644 test/CodeGen/Thumb2/buildvector-crash.ll create mode 100644 test/CodeGen/Thumb2/carry.ll create mode 100644 test/CodeGen/Thumb2/constant-islands.ll create mode 100644 test/CodeGen/Thumb2/cortex-fp.ll create mode 100644 test/CodeGen/Thumb2/crash.ll create mode 100644 test/CodeGen/Thumb2/cross-rc-coalescing-1.ll create mode 100644 test/CodeGen/Thumb2/cross-rc-coalescing-2.ll create mode 100644 test/CodeGen/Thumb2/div.ll create mode 100644 test/CodeGen/Thumb2/frameless.ll create mode 100644 test/CodeGen/Thumb2/frameless2.ll create mode 100644 test/CodeGen/Thumb2/ifcvt-neon.ll create mode 100644 test/CodeGen/Thumb2/inflate-regs.ll create mode 100644 test/CodeGen/Thumb2/inlineasm.ll create mode 100644 test/CodeGen/Thumb2/large-call.ll create mode 100644 test/CodeGen/Thumb2/large-stack.ll create mode 100644 test/CodeGen/Thumb2/ldr-str-imm12.ll create mode 100644 test/CodeGen/Thumb2/lit.local.cfg create mode 100644 test/CodeGen/Thumb2/longMACt.ll create mode 100644 test/CodeGen/Thumb2/lsr-deficiency.ll create mode 100644 test/CodeGen/Thumb2/machine-licm.ll create mode 100644 test/CodeGen/Thumb2/mul_const.ll create mode 100644 test/CodeGen/Thumb2/pic-load.ll create mode 100644 test/CodeGen/Thumb2/tail-call-r9.ll create mode 100644 test/CodeGen/Thumb2/thumb2-adc.ll create mode 100644 test/CodeGen/Thumb2/thumb2-add.ll create mode 100644 test/CodeGen/Thumb2/thumb2-add2.ll create mode 100644 test/CodeGen/Thumb2/thumb2-add3.ll create mode 100644 test/CodeGen/Thumb2/thumb2-add4.ll create mode 100644 test/CodeGen/Thumb2/thumb2-add5.ll create mode 100644 test/CodeGen/Thumb2/thumb2-add6.ll create mode 100644 test/CodeGen/Thumb2/thumb2-and.ll create mode 100644 test/CodeGen/Thumb2/thumb2-and2.ll create mode 100644 test/CodeGen/Thumb2/thumb2-asr.ll create mode 100644 test/CodeGen/Thumb2/thumb2-asr2.ll create mode 100644 test/CodeGen/Thumb2/thumb2-bcc.ll create mode 100644 test/CodeGen/Thumb2/thumb2-bfc.ll create mode 100644 test/CodeGen/Thumb2/thumb2-bic.ll create mode 100644 test/CodeGen/Thumb2/thumb2-branch.ll create mode 100644 test/CodeGen/Thumb2/thumb2-call-tc.ll create mode 100644 test/CodeGen/Thumb2/thumb2-call.ll create mode 100644 test/CodeGen/Thumb2/thumb2-cbnz.ll create mode 100644 test/CodeGen/Thumb2/thumb2-clz.ll create mode 100644 test/CodeGen/Thumb2/thumb2-cmn.ll create mode 100644 test/CodeGen/Thumb2/thumb2-cmn2.ll create mode 100644 test/CodeGen/Thumb2/thumb2-cmp.ll create mode 100644 test/CodeGen/Thumb2/thumb2-cmp2.ll create mode 100644 test/CodeGen/Thumb2/thumb2-eor.ll create mode 100644 test/CodeGen/Thumb2/thumb2-eor2.ll create mode 100644 test/CodeGen/Thumb2/thumb2-ifcvt1-tc.ll create mode 100644 test/CodeGen/Thumb2/thumb2-ifcvt1.ll create mode 100644 test/CodeGen/Thumb2/thumb2-ifcvt2.ll create mode 100644 test/CodeGen/Thumb2/thumb2-ifcvt3.ll create mode 100644 test/CodeGen/Thumb2/thumb2-jtb.ll create mode 100644 test/CodeGen/Thumb2/thumb2-ldm.ll create mode 100644 test/CodeGen/Thumb2/thumb2-ldr.ll create mode 100644 test/CodeGen/Thumb2/thumb2-ldr_ext.ll create mode 100644 test/CodeGen/Thumb2/thumb2-ldr_post.ll create mode 100644 test/CodeGen/Thumb2/thumb2-ldr_pre.ll create mode 100644 test/CodeGen/Thumb2/thumb2-ldrb.ll create mode 100644 test/CodeGen/Thumb2/thumb2-ldrd.ll create mode 100644 test/CodeGen/Thumb2/thumb2-ldrh.ll create mode 100644 test/CodeGen/Thumb2/thumb2-lsl.ll create mode 100644 test/CodeGen/Thumb2/thumb2-lsl2.ll create mode 100644 test/CodeGen/Thumb2/thumb2-lsr.ll create mode 100644 test/CodeGen/Thumb2/thumb2-lsr2.ll create mode 100644 test/CodeGen/Thumb2/thumb2-lsr3.ll create mode 100644 test/CodeGen/Thumb2/thumb2-mla.ll create mode 100644 test/CodeGen/Thumb2/thumb2-mls.ll create mode 100644 test/CodeGen/Thumb2/thumb2-mov.ll create mode 100644 test/CodeGen/Thumb2/thumb2-mul.ll create mode 100644 test/CodeGen/Thumb2/thumb2-mulhi.ll create mode 100644 test/CodeGen/Thumb2/thumb2-mvn.ll create mode 100644 test/CodeGen/Thumb2/thumb2-mvn2.ll create mode 100644 test/CodeGen/Thumb2/thumb2-neg.ll create mode 100644 test/CodeGen/Thumb2/thumb2-orn.ll create mode 100644 test/CodeGen/Thumb2/thumb2-orn2.ll create mode 100644 test/CodeGen/Thumb2/thumb2-orr.ll create mode 100644 test/CodeGen/Thumb2/thumb2-orr2.ll create mode 100644 test/CodeGen/Thumb2/thumb2-pack.ll create mode 100644 test/CodeGen/Thumb2/thumb2-rev.ll create mode 100644 test/CodeGen/Thumb2/thumb2-rev16.ll create mode 100644 test/CodeGen/Thumb2/thumb2-ror.ll create mode 100644 test/CodeGen/Thumb2/thumb2-rsb.ll create mode 100644 test/CodeGen/Thumb2/thumb2-rsb2.ll create mode 100644 test/CodeGen/Thumb2/thumb2-sbc.ll create mode 100644 test/CodeGen/Thumb2/thumb2-select.ll create mode 100644 test/CodeGen/Thumb2/thumb2-select_xform.ll create mode 100644 test/CodeGen/Thumb2/thumb2-shifter.ll create mode 100644 test/CodeGen/Thumb2/thumb2-smla.ll create mode 100644 test/CodeGen/Thumb2/thumb2-smul.ll create mode 100644 test/CodeGen/Thumb2/thumb2-spill-q.ll create mode 100644 test/CodeGen/Thumb2/thumb2-str.ll create mode 100644 test/CodeGen/Thumb2/thumb2-str_post.ll create mode 100644 test/CodeGen/Thumb2/thumb2-str_pre.ll create mode 100644 test/CodeGen/Thumb2/thumb2-strb.ll create mode 100644 test/CodeGen/Thumb2/thumb2-strh.ll create mode 100644 test/CodeGen/Thumb2/thumb2-sub.ll create mode 100644 test/CodeGen/Thumb2/thumb2-sub2.ll create mode 100644 test/CodeGen/Thumb2/thumb2-sub3.ll create mode 100644 test/CodeGen/Thumb2/thumb2-sub4.ll create mode 100644 test/CodeGen/Thumb2/thumb2-sub5.ll create mode 100644 test/CodeGen/Thumb2/thumb2-sxt-uxt.ll create mode 100644 test/CodeGen/Thumb2/thumb2-sxt_rot.ll create mode 100644 test/CodeGen/Thumb2/thumb2-tbb.ll create mode 100644 test/CodeGen/Thumb2/thumb2-tbh.ll create mode 100644 test/CodeGen/Thumb2/thumb2-teq.ll create mode 100644 test/CodeGen/Thumb2/thumb2-teq2.ll create mode 100644 test/CodeGen/Thumb2/thumb2-tst.ll create mode 100644 test/CodeGen/Thumb2/thumb2-tst2.ll create mode 100644 test/CodeGen/Thumb2/thumb2-uxt_rot.ll create mode 100644 test/CodeGen/Thumb2/thumb2-uxtb.ll create mode 100644 test/CodeGen/Thumb2/tls1.ll create mode 100644 test/CodeGen/Thumb2/tls2.ll create mode 100644 test/CodeGen/Thumb2/v8_IT_1.ll create mode 100644 test/CodeGen/Thumb2/v8_IT_2.ll create mode 100644 test/CodeGen/Thumb2/v8_IT_3.ll create mode 100644 test/CodeGen/Thumb2/v8_IT_4.ll create mode 100644 test/CodeGen/Thumb2/v8_IT_5.ll create mode 100644 test/CodeGen/X86/2003-08-03-CallArgLiveRanges.ll create mode 100644 test/CodeGen/X86/2003-08-23-DeadBlockTest.ll create mode 100644 test/CodeGen/X86/2003-11-03-GlobalBool.ll create mode 100644 test/CodeGen/X86/2004-02-13-FrameReturnAddress.ll create mode 100644 test/CodeGen/X86/2004-02-14-InefficientStackPointer.ll create mode 100644 test/CodeGen/X86/2004-02-22-Casts.ll create mode 100644 test/CodeGen/X86/2004-03-30-Select-Max.ll create mode 100644 test/CodeGen/X86/2004-04-13-FPCMOV-Crash.ll create mode 100644 test/CodeGen/X86/2004-06-10-StackifierCrash.ll create mode 100644 test/CodeGen/X86/2004-10-08-SelectSetCCFold.ll create mode 100644 test/CodeGen/X86/2005-01-17-CycleInDAG.ll create mode 100644 test/CodeGen/X86/2005-02-14-IllegalAssembler.ll create mode 100644 test/CodeGen/X86/2005-05-08-FPStackifierPHI.ll create mode 100644 test/CodeGen/X86/2006-01-19-ISelFoldingBug.ll create mode 100644 test/CodeGen/X86/2006-03-01-InstrSchedBug.ll create mode 100644 test/CodeGen/X86/2006-03-02-InstrSchedBug.ll create mode 100644 test/CodeGen/X86/2006-04-04-CrossBlockCrash.ll create mode 100644 test/CodeGen/X86/2006-04-27-ISelFoldingBug.ll create mode 100644 test/CodeGen/X86/2006-05-01-SchedCausingSpills.ll create mode 100644 test/CodeGen/X86/2006-05-02-InstrSched1.ll create mode 100644 test/CodeGen/X86/2006-05-02-InstrSched2.ll create mode 100644 test/CodeGen/X86/2006-05-08-CoalesceSubRegClass.ll create mode 100644 test/CodeGen/X86/2006-05-08-InstrSched.ll create mode 100644 test/CodeGen/X86/2006-05-11-InstrSched.ll create mode 100644 test/CodeGen/X86/2006-05-17-VectorArg.ll create mode 100644 test/CodeGen/X86/2006-05-22-FPSetEQ.ll create mode 100644 test/CodeGen/X86/2006-05-25-CycleInDAG.ll create mode 100644 test/CodeGen/X86/2006-07-10-InlineAsmAConstraint.ll create mode 100644 test/CodeGen/X86/2006-07-12-InlineAsmQConstraint.ll create mode 100644 test/CodeGen/X86/2006-07-20-InlineAsm.ll create mode 100644 test/CodeGen/X86/2006-07-28-AsmPrint-Long-As-Pointer.ll create mode 100644 test/CodeGen/X86/2006-07-31-SingleRegClass.ll create mode 100644 test/CodeGen/X86/2006-08-07-CycleInDAG.ll create mode 100644 test/CodeGen/X86/2006-08-16-CycleInDAG.ll create mode 100644 test/CodeGen/X86/2006-08-21-ExtraMovInst.ll create mode 100644 test/CodeGen/X86/2006-09-01-CycleInDAG.ll create mode 100644 test/CodeGen/X86/2006-10-02-BoolRetCrash.ll create mode 100644 test/CodeGen/X86/2006-10-07-ScalarSSEMiscompile.ll create mode 100644 test/CodeGen/X86/2006-10-09-CycleInDAG.ll create mode 100644 test/CodeGen/X86/2006-10-10-FindModifiedNodeSlotBug.ll create mode 100644 test/CodeGen/X86/2006-10-12-CycleInDAG.ll create mode 100644 test/CodeGen/X86/2006-10-13-CycleInDAG.ll create mode 100644 test/CodeGen/X86/2006-10-19-SwitchUnnecessaryBranching.ll create mode 100644 test/CodeGen/X86/2006-11-12-CSRetCC.ll create mode 100644 test/CodeGen/X86/2006-11-17-IllegalMove.ll create mode 100644 test/CodeGen/X86/2006-11-27-SelectLegalize.ll create mode 100644 test/CodeGen/X86/2006-12-16-InlineAsmCrash.ll create mode 100644 test/CodeGen/X86/2006-12-19-IntelSyntax.ll create mode 100644 test/CodeGen/X86/2007-01-08-InstrSched.ll create mode 100644 test/CodeGen/X86/2007-01-08-X86-64-Pointer.ll create mode 100644 test/CodeGen/X86/2007-01-13-StackPtrIndex.ll create mode 100644 test/CodeGen/X86/2007-01-29-InlineAsm-ir.ll create mode 100644 test/CodeGen/X86/2007-02-04-OrAddrMode.ll create mode 100644 test/CodeGen/X86/2007-02-16-BranchFold.ll create mode 100644 test/CodeGen/X86/2007-02-19-LiveIntervalAssert.ll create mode 100644 test/CodeGen/X86/2007-02-23-DAGCombine-Miscompile.ll create mode 100644 test/CodeGen/X86/2007-02-25-FastCCStack.ll create mode 100644 test/CodeGen/X86/2007-03-01-SpillerCrash.ll create mode 100644 test/CodeGen/X86/2007-03-15-GEP-Idx-Sink.ll create mode 100644 test/CodeGen/X86/2007-03-16-InlineAsm.ll create mode 100644 test/CodeGen/X86/2007-03-18-LiveIntervalAssert.ll create mode 100644 test/CodeGen/X86/2007-03-24-InlineAsmMultiRegConstraint.ll create mode 100644 test/CodeGen/X86/2007-03-24-InlineAsmPModifier.ll create mode 100644 test/CodeGen/X86/2007-03-24-InlineAsmVectorOp.ll create mode 100644 test/CodeGen/X86/2007-03-24-InlineAsmXConstraint.ll create mode 100644 test/CodeGen/X86/2007-03-26-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2007-04-08-InlineAsmCrash.ll create mode 100644 test/CodeGen/X86/2007-04-11-InlineAsmVectorResult.ll create mode 100644 test/CodeGen/X86/2007-04-17-LiveIntervalAssert.ll create mode 100644 test/CodeGen/X86/2007-04-24-Huge-Stack.ll create mode 100644 test/CodeGen/X86/2007-04-24-VectorCrash.ll create mode 100644 test/CodeGen/X86/2007-04-25-MMX-PADDQ.ll create mode 100644 test/CodeGen/X86/2007-04-27-InlineAsm-IntMemInput.ll create mode 100644 test/CodeGen/X86/2007-05-05-Personality.ll create mode 100644 test/CodeGen/X86/2007-05-05-VecCastExpand.ll create mode 100644 test/CodeGen/X86/2007-05-14-LiveIntervalAssert.ll create mode 100644 test/CodeGen/X86/2007-05-15-maskmovq.ll create mode 100644 test/CodeGen/X86/2007-05-17-ShuffleISelBug.ll create mode 100644 test/CodeGen/X86/2007-06-04-X86-64-CtorAsmBugs.ll create mode 100644 test/CodeGen/X86/2007-06-15-IntToMMX.ll create mode 100644 test/CodeGen/X86/2007-06-28-X86-64-isel.ll create mode 100644 test/CodeGen/X86/2007-06-29-DAGCombinerBug.ll create mode 100644 test/CodeGen/X86/2007-06-29-VecFPConstantCSEBug.ll create mode 100644 test/CodeGen/X86/2007-07-03-GR64ToVR64.ll create mode 100644 test/CodeGen/X86/2007-07-10-StackerAssert.ll create mode 100644 test/CodeGen/X86/2007-07-18-Vector-Extract.ll create mode 100644 test/CodeGen/X86/2007-08-01-LiveVariablesBug.ll create mode 100644 test/CodeGen/X86/2007-08-09-IllegalX86-64Asm.ll create mode 100644 test/CodeGen/X86/2007-08-10-SignExtSubreg.ll create mode 100644 test/CodeGen/X86/2007-08-13-AppendingLinkage.ll create mode 100644 test/CodeGen/X86/2007-09-05-InvalidAsm.ll create mode 100644 test/CodeGen/X86/2007-09-06-ExtWeakAliasee.ll create mode 100644 test/CodeGen/X86/2007-09-17-ObjcFrameEH.ll create mode 100644 test/CodeGen/X86/2007-09-18-ShuffleXformBug.ll create mode 100644 test/CodeGen/X86/2007-09-27-LDIntrinsics.ll create mode 100644 test/CodeGen/X86/2007-10-04-AvoidEFLAGSCopy.ll create mode 100644 test/CodeGen/X86/2007-10-12-CoalesceExtSubReg.ll create mode 100644 test/CodeGen/X86/2007-10-12-SpillerUnfold1.ll create mode 100644 test/CodeGen/X86/2007-10-12-SpillerUnfold2.ll create mode 100644 test/CodeGen/X86/2007-10-14-CoalescerCrash.ll create mode 100644 test/CodeGen/X86/2007-10-15-CoalescerCrash.ll create mode 100644 test/CodeGen/X86/2007-10-16-CoalescerCrash.ll create mode 100644 test/CodeGen/X86/2007-10-17-IllegalAsm.ll create mode 100644 test/CodeGen/X86/2007-10-19-SpillerUnfold.ll create mode 100644 test/CodeGen/X86/2007-10-28-inlineasm-q-modifier.ll create mode 100644 test/CodeGen/X86/2007-10-29-ExtendSetCC.ll create mode 100644 test/CodeGen/X86/2007-10-30-LSRCrash.ll create mode 100644 test/CodeGen/X86/2007-10-31-extractelement-i64.ll create mode 100644 test/CodeGen/X86/2007-11-01-ISelCrash.ll create mode 100644 test/CodeGen/X86/2007-11-03-x86-64-q-constraint.ll create mode 100644 test/CodeGen/X86/2007-11-04-LiveIntervalCrash.ll create mode 100644 test/CodeGen/X86/2007-11-04-LiveVariablesBug.ll create mode 100644 test/CodeGen/X86/2007-11-04-rip-immediate-constant.ll create mode 100644 test/CodeGen/X86/2007-11-06-InstrSched.ll create mode 100644 test/CodeGen/X86/2007-11-07-MulBy4.ll create mode 100644 test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll create mode 100644 test/CodeGen/X86/2007-12-16-BURRSchedCrash.ll create mode 100644 test/CodeGen/X86/2007-12-18-LoadCSEBug.ll create mode 100644 test/CodeGen/X86/2008-01-08-IllegalCMP.ll create mode 100644 test/CodeGen/X86/2008-01-08-SchedulerCrash.ll create mode 100644 test/CodeGen/X86/2008-01-09-LongDoubleSin.ll create mode 100644 test/CodeGen/X86/2008-01-16-FPStackifierAssert.ll create mode 100644 test/CodeGen/X86/2008-01-16-InvalidDAGCombineXform.ll create mode 100644 test/CodeGen/X86/2008-02-05-ISelCrash.ll create mode 100644 test/CodeGen/X86/2008-02-06-LoadFoldingBug.ll create mode 100644 test/CodeGen/X86/2008-02-14-BitMiscompile.ll create mode 100644 test/CodeGen/X86/2008-02-18-TailMergingBug.ll create mode 100644 test/CodeGen/X86/2008-02-20-InlineAsmClobber.ll create mode 100644 test/CodeGen/X86/2008-02-22-LocalRegAllocBug.ll create mode 100644 test/CodeGen/X86/2008-02-25-InlineAsmBug.ll create mode 100644 test/CodeGen/X86/2008-02-25-X86-64-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2008-02-26-AsmDirectMemOp.ll create mode 100644 test/CodeGen/X86/2008-02-27-DeadSlotElimBug.ll create mode 100644 test/CodeGen/X86/2008-02-27-PEICrash.ll create mode 100644 test/CodeGen/X86/2008-03-06-frem-fpstack.ll create mode 100644 test/CodeGen/X86/2008-03-07-APIntBug.ll create mode 100644 test/CodeGen/X86/2008-03-10-RegAllocInfLoop.ll create mode 100644 test/CodeGen/X86/2008-03-12-ThreadLocalAlias.ll create mode 100644 test/CodeGen/X86/2008-03-13-TwoAddrPassCrash.ll create mode 100644 test/CodeGen/X86/2008-03-14-SpillerCrash.ll create mode 100644 test/CodeGen/X86/2008-03-19-DAGCombinerBug.ll create mode 100644 test/CodeGen/X86/2008-03-23-DarwinAsmComments.ll create mode 100644 test/CodeGen/X86/2008-03-25-TwoAddrPassBug.ll create mode 100644 test/CodeGen/X86/2008-03-31-SpillerFoldingBug.ll create mode 100644 test/CodeGen/X86/2008-04-02-unnamedEH.ll create mode 100644 test/CodeGen/X86/2008-04-08-CoalescerCrash.ll create mode 100644 test/CodeGen/X86/2008-04-09-BranchFolding.ll create mode 100644 test/CodeGen/X86/2008-04-15-LiveVariableBug.ll create mode 100644 test/CodeGen/X86/2008-04-16-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2008-04-16-ReMatBug.ll create mode 100644 test/CodeGen/X86/2008-04-17-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2008-04-24-MemCpyBug.ll create mode 100644 test/CodeGen/X86/2008-04-24-pblendw-fold-crash.ll create mode 100644 test/CodeGen/X86/2008-04-26-Asm-Optimize-Imm.ll create mode 100644 test/CodeGen/X86/2008-04-28-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2008-04-28-CyclicSchedUnit.ll create mode 100644 test/CodeGen/X86/2008-05-01-InvalidOrdCompare.ll create mode 100644 test/CodeGen/X86/2008-05-09-PHIElimBug.ll create mode 100644 test/CodeGen/X86/2008-05-09-ShuffleLoweringBug.ll create mode 100644 test/CodeGen/X86/2008-05-12-tailmerge-5.ll create mode 100644 test/CodeGen/X86/2008-05-21-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll create mode 100644 test/CodeGen/X86/2008-05-28-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2008-05-28-LocalRegAllocBug.ll create mode 100644 test/CodeGen/X86/2008-06-13-NotVolatileLoadStore.ll create mode 100644 test/CodeGen/X86/2008-06-13-VolatileLoadStore.ll create mode 100644 test/CodeGen/X86/2008-06-16-SubregsBug.ll create mode 100644 test/CodeGen/X86/2008-06-18-BadShuffle.ll create mode 100644 test/CodeGen/X86/2008-06-25-VecISelBug.ll create mode 100644 test/CodeGen/X86/2008-07-07-DanglingDeadInsts.ll create mode 100644 test/CodeGen/X86/2008-07-09-ELFSectionAttributes.ll create mode 100644 test/CodeGen/X86/2008-07-11-SHLBy1.ll create mode 100644 test/CodeGen/X86/2008-07-16-CoalescerCrash.ll create mode 100644 test/CodeGen/X86/2008-07-19-movups-spills.ll create mode 100644 test/CodeGen/X86/2008-07-22-CombinerCrash.ll create mode 100644 test/CodeGen/X86/2008-07-23-VSetCC.ll create mode 100644 test/CodeGen/X86/2008-08-06-CmpStride.ll create mode 100644 test/CodeGen/X86/2008-08-06-RewriterBug.ll create mode 100644 test/CodeGen/X86/2008-08-17-UComiCodeGenBug.ll create mode 100644 test/CodeGen/X86/2008-08-19-SubAndFetch.ll create mode 100644 test/CodeGen/X86/2008-08-23-64Bit-maskmovq.ll create mode 100644 test/CodeGen/X86/2008-08-31-EH_RETURN32.ll create mode 100644 test/CodeGen/X86/2008-08-31-EH_RETURN64.ll create mode 100644 test/CodeGen/X86/2008-09-05-sinttofp-2xi32.ll create mode 100644 test/CodeGen/X86/2008-09-09-LinearScanBug.ll create mode 100644 test/CodeGen/X86/2008-09-11-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2008-09-11-CoalescerBug2.ll create mode 100644 test/CodeGen/X86/2008-09-17-inline-asm-1.ll create mode 100644 test/CodeGen/X86/2008-09-18-inline-asm-2.ll create mode 100644 test/CodeGen/X86/2008-09-19-RegAllocBug.ll create mode 100644 test/CodeGen/X86/2008-09-25-sseregparm-1.ll create mode 100644 test/CodeGen/X86/2008-09-26-FrameAddrBug.ll create mode 100644 test/CodeGen/X86/2008-09-29-ReMatBug.ll create mode 100644 test/CodeGen/X86/2008-09-29-VolatileBug.ll create mode 100644 test/CodeGen/X86/2008-10-06-MMXISelBug.ll create mode 100644 test/CodeGen/X86/2008-10-06-x87ld-nan-1.ll create mode 100644 test/CodeGen/X86/2008-10-06-x87ld-nan-2.ll create mode 100644 test/CodeGen/X86/2008-10-07-SSEISelBug.ll create mode 100644 test/CodeGen/X86/2008-10-11-CallCrash.ll create mode 100644 test/CodeGen/X86/2008-10-13-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2008-10-16-VecUnaryOp.ll create mode 100644 test/CodeGen/X86/2008-10-17-Asm64bitRConstraint.ll create mode 100644 test/CodeGen/X86/2008-10-20-AsmDoubleInI32.ll create mode 100644 test/CodeGen/X86/2008-10-24-FlippedCompare.ll create mode 100644 test/CodeGen/X86/2008-10-27-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2008-10-29-ExpandVAARG.ll create mode 100644 test/CodeGen/X86/2008-11-03-F80VAARG.ll create mode 100644 test/CodeGen/X86/2008-11-06-testb.ll create mode 100644 test/CodeGen/X86/2008-11-13-inlineasm-3.ll create mode 100644 test/CodeGen/X86/2008-11-29-ULT-Sign.ll create mode 100644 test/CodeGen/X86/2008-12-01-SpillerAssert.ll create mode 100644 test/CodeGen/X86/2008-12-01-loop-iv-used-outside-loop.ll create mode 100644 test/CodeGen/X86/2008-12-02-IllegalResultType.ll create mode 100644 test/CodeGen/X86/2008-12-02-dagcombine-1.ll create mode 100644 test/CodeGen/X86/2008-12-02-dagcombine-2.ll create mode 100644 test/CodeGen/X86/2008-12-02-dagcombine-3.ll create mode 100644 test/CodeGen/X86/2008-12-12-PrivateEHSymbol.ll create mode 100644 test/CodeGen/X86/2008-12-16-dagcombine-4.ll create mode 100644 test/CodeGen/X86/2008-12-19-EarlyClobberBug.ll create mode 100644 test/CodeGen/X86/2008-12-22-dagcombine-5.ll create mode 100644 test/CodeGen/X86/2008-12-23-crazy-address.ll create mode 100644 test/CodeGen/X86/2008-12-23-dagcombine-6.ll create mode 100644 test/CodeGen/X86/2009-01-13-DoubleUpdate.ll create mode 100644 test/CodeGen/X86/2009-01-16-SchedulerBug.ll create mode 100644 test/CodeGen/X86/2009-01-16-UIntToFP.ll create mode 100644 test/CodeGen/X86/2009-01-18-ConstantExprCrash.ll create mode 100644 test/CodeGen/X86/2009-01-25-NoSSE.ll create mode 100644 test/CodeGen/X86/2009-01-26-WrongCheck.ll create mode 100644 test/CodeGen/X86/2009-01-27-NullStrings.ll create mode 100644 test/CodeGen/X86/2009-01-31-BigShift.ll create mode 100644 test/CodeGen/X86/2009-01-31-BigShift2.ll create mode 100644 test/CodeGen/X86/2009-01-31-BigShift3.ll create mode 100644 test/CodeGen/X86/2009-02-01-LargeMask.ll create mode 100644 test/CodeGen/X86/2009-02-03-AnalyzedTwice.ll create mode 100644 test/CodeGen/X86/2009-02-04-sext-i64-gep.ll create mode 100644 test/CodeGen/X86/2009-02-08-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2009-02-09-ivs-different-sizes.ll create mode 100644 test/CodeGen/X86/2009-02-11-codegenprepare-reuse.ll create mode 100644 test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll create mode 100644 test/CodeGen/X86/2009-02-12-InlineAsm-nieZ-constraints.ll create mode 100644 test/CodeGen/X86/2009-02-12-SpillerBug.ll create mode 100644 test/CodeGen/X86/2009-02-21-ExtWeakInitializer.ll create mode 100644 test/CodeGen/X86/2009-02-25-CommuteBug.ll create mode 100644 test/CodeGen/X86/2009-02-26-MachineLICMBug.ll create mode 100644 test/CodeGen/X86/2009-03-03-BTHang.ll create mode 100644 test/CodeGen/X86/2009-03-03-BitcastLongDouble.ll create mode 100644 test/CodeGen/X86/2009-03-05-burr-list-crash.ll create mode 100644 test/CodeGen/X86/2009-03-07-FPConstSelect.ll create mode 100644 test/CodeGen/X86/2009-03-09-APIntCrash.ll create mode 100644 test/CodeGen/X86/2009-03-09-SpillerBug.ll create mode 100644 test/CodeGen/X86/2009-03-10-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2009-03-12-CPAlignBug.ll create mode 100644 test/CodeGen/X86/2009-03-13-PHIElimBug.ll create mode 100644 test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll create mode 100644 test/CodeGen/X86/2009-03-23-LinearScanBug.ll create mode 100644 test/CodeGen/X86/2009-03-23-MultiUseSched.ll create mode 100644 test/CodeGen/X86/2009-03-23-i80-fp80.ll create mode 100644 test/CodeGen/X86/2009-03-25-TestBug.ll create mode 100644 test/CodeGen/X86/2009-03-26-NoImplicitFPBug.ll create mode 100644 test/CodeGen/X86/2009-04-12-FastIselOverflowCrash.ll create mode 100644 test/CodeGen/X86/2009-04-12-picrel.ll create mode 100644 test/CodeGen/X86/2009-04-13-2AddrAssert-2.ll create mode 100644 test/CodeGen/X86/2009-04-13-2AddrAssert.ll create mode 100644 test/CodeGen/X86/2009-04-14-IllegalRegs.ll create mode 100644 test/CodeGen/X86/2009-04-16-SpillerUnfold.ll create mode 100644 test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll create mode 100644 test/CodeGen/X86/2009-04-24.ll create mode 100644 test/CodeGen/X86/2009-04-25-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2009-04-27-CoalescerAssert.ll create mode 100644 test/CodeGen/X86/2009-04-27-LiveIntervalsAssert.ll create mode 100644 test/CodeGen/X86/2009-04-27-LiveIntervalsAssert2.ll create mode 100644 test/CodeGen/X86/2009-04-29-IndirectDestOperands.ll create mode 100644 test/CodeGen/X86/2009-04-29-LinearScanBug.ll create mode 100644 test/CodeGen/X86/2009-04-29-RegAllocAssert.ll create mode 100644 test/CodeGen/X86/2009-04-scale.ll create mode 100644 test/CodeGen/X86/2009-05-08-InlineAsmIOffset.ll create mode 100644 test/CodeGen/X86/2009-05-11-tailmerge-crash.ll create mode 100644 test/CodeGen/X86/2009-05-19-SingleElementExtractElement.ll create mode 100644 test/CodeGen/X86/2009-05-23-available_externally.ll create mode 100644 test/CodeGen/X86/2009-05-23-dagcombine-shifts.ll create mode 100644 test/CodeGen/X86/2009-05-28-DAGCombineCrash.ll create mode 100644 test/CodeGen/X86/2009-05-30-ISelBug.ll create mode 100644 test/CodeGen/X86/2009-06-02-RewriterBug.ll create mode 100644 test/CodeGen/X86/2009-06-03-Win64DisableRedZone.ll create mode 100644 test/CodeGen/X86/2009-06-03-Win64SpillXMM.ll create mode 100644 test/CodeGen/X86/2009-06-04-VirtualLiveIn.ll create mode 100644 test/CodeGen/X86/2009-06-05-ScalarToVectorByteMMX.ll create mode 100644 test/CodeGen/X86/2009-06-05-VZextByteShort.ll create mode 100644 test/CodeGen/X86/2009-06-05-VariableIndexInsert.ll create mode 100644 test/CodeGen/X86/2009-06-05-sitofpCrash.ll create mode 100644 test/CodeGen/X86/2009-06-06-ConcatVectors.ll create mode 100644 test/CodeGen/X86/2009-06-07-ExpandMMXBitcast.ll create mode 100644 test/CodeGen/X86/2009-06-12-x86_64-tail-call-conv-out-of-sync-bug.ll create mode 100644 test/CodeGen/X86/2009-06-15-not-a-tail-call.ll create mode 100644 test/CodeGen/X86/2009-06-18-movlp-shuffle-register.ll create mode 100644 test/CodeGen/X86/2009-07-06-TwoAddrAssert.ll create mode 100644 test/CodeGen/X86/2009-07-07-SplitICmp.ll create mode 100644 test/CodeGen/X86/2009-07-09-ExtractBoolFromVector.ll create mode 100644 test/CodeGen/X86/2009-07-15-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2009-07-16-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2009-07-19-AsmExtraOperands.ll create mode 100644 test/CodeGen/X86/2009-07-20-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2009-07-20-DAGCombineBug.ll create mode 100644 test/CodeGen/X86/2009-08-02-mmx-scalar-to-vector.ll create mode 100644 test/CodeGen/X86/2009-08-06-branchfolder-crash.ll create mode 100644 test/CodeGen/X86/2009-08-06-inlineasm.ll create mode 100644 test/CodeGen/X86/2009-08-08-CastError.ll create mode 100644 test/CodeGen/X86/2009-08-12-badswitch.ll create mode 100644 test/CodeGen/X86/2009-08-14-Win64MemoryIndirectArg.ll create mode 100644 test/CodeGen/X86/2009-08-19-LoadNarrowingMiscompile.ll create mode 100644 test/CodeGen/X86/2009-08-23-SubRegReuseUndo.ll create mode 100644 test/CodeGen/X86/2009-08-23-linkerprivate.ll create mode 100644 test/CodeGen/X86/2009-09-10-LoadFoldingBug.ll create mode 100644 test/CodeGen/X86/2009-09-10-SpillComments.ll create mode 100644 test/CodeGen/X86/2009-09-16-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2009-09-19-earlyclobber.ll create mode 100644 test/CodeGen/X86/2009-09-21-NoSpillLoopCount.ll create mode 100644 test/CodeGen/X86/2009-09-22-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2009-09-23-LiveVariablesBug.ll create mode 100644 test/CodeGen/X86/2009-10-14-LiveVariablesBug.ll create mode 100644 test/CodeGen/X86/2009-10-16-Scope.ll create mode 100644 test/CodeGen/X86/2009-10-19-EmergencySpill.ll create mode 100644 test/CodeGen/X86/2009-10-19-atomic-cmp-eflags.ll create mode 100644 test/CodeGen/X86/2009-10-25-RewriterBug.ll create mode 100644 test/CodeGen/X86/2009-11-04-SubregCoalescingBug.ll create mode 100644 test/CodeGen/X86/2009-11-13-VirtRegRewriterBug.ll create mode 100644 test/CodeGen/X86/2009-11-16-MachineLICM.ll create mode 100644 test/CodeGen/X86/2009-11-16-UnfoldMemOpBug.ll create mode 100644 test/CodeGen/X86/2009-11-17-UpdateTerminator.ll create mode 100644 test/CodeGen/X86/2009-11-18-TwoAddrKill.ll create mode 100644 test/CodeGen/X86/2009-11-25-ImpDefBug.ll create mode 100644 test/CodeGen/X86/2009-12-01-EarlyClobberBug.ll create mode 100644 test/CodeGen/X86/2009-12-11-TLSNoRedZone.ll create mode 100644 test/CodeGen/X86/20090313-signext.ll create mode 100644 test/CodeGen/X86/2010-01-05-ZExt-Shl.ll create mode 100644 test/CodeGen/X86/2010-01-07-ISelBug.ll create mode 100644 test/CodeGen/X86/2010-01-07-UAMemFeature.ll create mode 100644 test/CodeGen/X86/2010-01-08-Atomic64Bug.ll create mode 100644 test/CodeGen/X86/2010-01-11-ExtraPHIArg.ll create mode 100644 test/CodeGen/X86/2010-01-13-OptExtBug.ll create mode 100644 test/CodeGen/X86/2010-01-15-SelectionDAGCycle.ll create mode 100644 test/CodeGen/X86/2010-01-18-DbgValue.ll create mode 100644 test/CodeGen/X86/2010-01-19-OptExtBug.ll create mode 100644 test/CodeGen/X86/2010-02-01-DbgValueCrash.ll create mode 100644 test/CodeGen/X86/2010-02-01-TaillCallCrash.ll create mode 100644 test/CodeGen/X86/2010-02-03-DualUndef.ll create mode 100644 test/CodeGen/X86/2010-02-04-SchedulerBug.ll create mode 100644 test/CodeGen/X86/2010-02-11-NonTemporal.ll create mode 100644 test/CodeGen/X86/2010-02-12-CoalescerBug-Impdef.ll create mode 100644 test/CodeGen/X86/2010-02-15-ImplicitDefBug.ll create mode 100644 test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.ll create mode 100644 test/CodeGen/X86/2010-02-23-DAGCombineBug.ll create mode 100644 test/CodeGen/X86/2010-02-23-DIV8rDefinesAX.ll create mode 100644 test/CodeGen/X86/2010-02-23-RematImplicitSubreg.ll create mode 100644 test/CodeGen/X86/2010-02-23-SingleDefPhiJoin.ll create mode 100644 test/CodeGen/X86/2010-03-04-Mul8Bug.ll create mode 100644 test/CodeGen/X86/2010-03-05-ConstantFoldCFG.ll create mode 100644 test/CodeGen/X86/2010-03-05-EFLAGS-Redef.ll create mode 100644 test/CodeGen/X86/2010-03-17-ISelBug.ll create mode 100644 test/CodeGen/X86/2010-04-06-SSEDomainFixCrash.ll create mode 100644 test/CodeGen/X86/2010-04-08-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2010-04-13-AnalyzeBranchCrash.ll create mode 100644 test/CodeGen/X86/2010-04-21-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2010-04-23-mmx-movdq2q.ll create mode 100644 test/CodeGen/X86/2010-04-29-CoalescerCrash.ll create mode 100644 test/CodeGen/X86/2010-04-30-LocalAlloc-LandingPad.ll create mode 100644 test/CodeGen/X86/2010-05-03-CoalescerSubRegClobber.ll create mode 100644 test/CodeGen/X86/2010-05-05-LocalAllocEarlyClobber.ll create mode 100644 test/CodeGen/X86/2010-05-06-LocalInlineAsmClobber.ll create mode 100644 test/CodeGen/X86/2010-05-07-ldconvert.ll create mode 100644 test/CodeGen/X86/2010-05-10-DAGCombinerBug.ll create mode 100644 test/CodeGen/X86/2010-05-12-FastAllocKills.ll create mode 100644 test/CodeGen/X86/2010-05-16-nosseconversion.ll create mode 100644 test/CodeGen/X86/2010-05-25-DotDebugLoc.ll create mode 100644 test/CodeGen/X86/2010-05-26-DotDebugLoc.ll create mode 100644 test/CodeGen/X86/2010-05-26-FP_TO_INT-crash.ll create mode 100644 test/CodeGen/X86/2010-05-28-Crash.ll create mode 100644 test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll create mode 100644 test/CodeGen/X86/2010-06-09-FastAllocRegisters.ll create mode 100644 test/CodeGen/X86/2010-06-14-fast-isel-fs-load.ll create mode 100644 test/CodeGen/X86/2010-06-15-FastAllocEarlyCLobber.ll create mode 100644 test/CodeGen/X86/2010-06-24-g-constraint-crash.ll create mode 100644 test/CodeGen/X86/2010-06-25-CoalescerSubRegDefDead.ll create mode 100644 test/CodeGen/X86/2010-06-25-asm-RA-crash.ll create mode 100644 test/CodeGen/X86/2010-06-28-FastAllocTiedOperand.ll create mode 100644 test/CodeGen/X86/2010-06-28-matched-g-constraint.ll create mode 100644 test/CodeGen/X86/2010-07-02-UnfoldBug.ll create mode 100644 test/CodeGen/X86/2010-07-02-asm-alignstack.ll create mode 100644 test/CodeGen/X86/2010-07-06-DbgCrash.ll create mode 100644 test/CodeGen/X86/2010-07-06-asm-RIP.ll create mode 100644 test/CodeGen/X86/2010-07-11-FPStackLoneUse.ll create mode 100644 test/CodeGen/X86/2010-07-13-indirectXconstraint.ll create mode 100644 test/CodeGen/X86/2010-07-15-Crash.ll create mode 100644 test/CodeGen/X86/2010-07-29-SetccSimplify.ll create mode 100644 test/CodeGen/X86/2010-08-04-MaskedSignedCompare.ll create mode 100644 test/CodeGen/X86/2010-08-04-MingWCrash.ll create mode 100644 test/CodeGen/X86/2010-08-04-StackVariable.ll create mode 100644 test/CodeGen/X86/2010-09-01-RemoveCopyByCommutingDef.ll create mode 100644 test/CodeGen/X86/2010-09-16-EmptyFilename.ll create mode 100644 test/CodeGen/X86/2010-09-16-asmcrash.ll create mode 100644 test/CodeGen/X86/2010-09-17-SideEffectsInChain.ll create mode 100644 test/CodeGen/X86/2010-09-30-CMOV-JumpTable-PHI.ll create mode 100644 test/CodeGen/X86/2010-10-08-cmpxchg8b.ll create mode 100644 test/CodeGen/X86/2010-11-02-DbgParameter.ll create mode 100644 test/CodeGen/X86/2010-11-09-MOVLPS.ll create mode 100644 test/CodeGen/X86/2010-11-18-SelectOfExtload.ll create mode 100644 test/CodeGen/X86/2010-12-02-MC-Set.ll create mode 100644 test/CodeGen/X86/2011-01-07-LegalizeTypesCrash.ll create mode 100644 test/CodeGen/X86/2011-01-10-DagCombineHang.ll create mode 100644 test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll create mode 100644 test/CodeGen/X86/2011-02-04-FastRegallocNoFP.ll create mode 100644 test/CodeGen/X86/2011-02-12-shuffle.ll create mode 100644 test/CodeGen/X86/2011-02-21-VirtRegRewriter-KillSubReg.ll create mode 100644 test/CodeGen/X86/2011-02-23-UnfoldBug.ll create mode 100644 test/CodeGen/X86/2011-02-27-Fpextend.ll create mode 100644 test/CodeGen/X86/2011-03-02-DAGCombiner.ll create mode 100644 test/CodeGen/X86/2011-03-08-Sched-crash.ll create mode 100644 test/CodeGen/X86/2011-03-09-Physreg-Coalescing.ll create mode 100644 test/CodeGen/X86/2011-03-30-CreateFixedObjCrash.ll create mode 100644 test/CodeGen/X86/2011-04-13-SchedCmpJmp.ll create mode 100644 test/CodeGen/X86/2011-04-19-sclr-bb.ll create mode 100644 test/CodeGen/X86/2011-05-09-loaduse.ll create mode 100644 test/CodeGen/X86/2011-05-26-UnreachableBlockElim.ll create mode 100644 test/CodeGen/X86/2011-05-27-CrossClassCoalescing.ll create mode 100644 test/CodeGen/X86/2011-06-01-fildll.ll create mode 100644 test/CodeGen/X86/2011-06-03-x87chain.ll create mode 100644 test/CodeGen/X86/2011-06-06-fgetsign80bit.ll create mode 100644 test/CodeGen/X86/2011-06-12-FastAllocSpill.ll create mode 100644 test/CodeGen/X86/2011-06-14-PreschedRegalias.ll create mode 100644 test/CodeGen/X86/2011-06-14-mmx-inlineasm.ll create mode 100644 test/CodeGen/X86/2011-06-19-QuicksortCoalescerBug.ll create mode 100644 test/CodeGen/X86/2011-07-13-BadFrameIndexDisplacement.ll create mode 100644 test/CodeGen/X86/2011-08-23-PerformSubCombine128.ll create mode 100644 test/CodeGen/X86/2011-08-23-Trampoline.ll create mode 100644 test/CodeGen/X86/2011-08-29-BlockConstant.ll create mode 100644 test/CodeGen/X86/2011-08-29-InitOrder.ll create mode 100644 test/CodeGen/X86/2011-09-14-valcoalesce.ll create mode 100644 test/CodeGen/X86/2011-09-18-sse2cmp.ll create mode 100644 test/CodeGen/X86/2011-09-21-setcc-bug.ll create mode 100644 test/CodeGen/X86/2011-10-11-SpillDead.ll create mode 100644 test/CodeGen/X86/2011-10-11-srl.ll create mode 100644 test/CodeGen/X86/2011-10-12-MachineCSE.ll create mode 100644 test/CodeGen/X86/2011-10-18-FastISel-VectorParams.ll create mode 100644 test/CodeGen/X86/2011-10-19-LegelizeLoad.ll create mode 100644 test/CodeGen/X86/2011-10-19-widen_vselect.ll create mode 100644 test/CodeGen/X86/2011-10-21-widen-cmp.ll create mode 100644 test/CodeGen/X86/2011-10-27-tstore.ll create mode 100644 test/CodeGen/X86/2011-10-30-padd.ll create mode 100644 test/CodeGen/X86/2011-11-07-LegalizeBuildVector.ll create mode 100644 test/CodeGen/X86/2011-11-22-AVX2-Domains.ll create mode 100644 test/CodeGen/X86/2011-11-30-or.ll create mode 100644 test/CodeGen/X86/2011-12-06-AVXVectorExtractCombine.ll create mode 100644 test/CodeGen/X86/2011-12-06-BitcastVectorGlobal.ll create mode 100644 test/CodeGen/X86/2011-12-08-AVXISelBugs.ll create mode 100644 test/CodeGen/X86/2011-12-15-vec_shift.ll create mode 100644 test/CodeGen/X86/2011-12-26-extractelement-duplicate-load.ll create mode 100644 test/CodeGen/X86/2011-12-28-vselecti8.ll create mode 100644 test/CodeGen/X86/2011-12-8-bitcastintprom.ll create mode 100644 test/CodeGen/X86/2011-20-21-zext-ui2fp.ll create mode 100644 test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll create mode 100644 test/CodeGen/X86/2012-01-11-split-cv.ll create mode 100644 test/CodeGen/X86/2012-01-12-extract-sv.ll create mode 100644 test/CodeGen/X86/2012-01-16-mfence-nosse-flags.ll create mode 100644 test/CodeGen/X86/2012-01-18-vbitcast.ll create mode 100644 test/CodeGen/X86/2012-02-12-dagco.ll create mode 100644 test/CodeGen/X86/2012-02-14-scalar.ll create mode 100644 test/CodeGen/X86/2012-02-23-mmx-inlineasm.ll create mode 100644 test/CodeGen/X86/2012-02-29-CoalescerBug.ll create mode 100644 test/CodeGen/X86/2012-03-15-build_vector_wl.ll create mode 100644 test/CodeGen/X86/2012-03-20-LargeConstantExpr.ll create mode 100644 test/CodeGen/X86/2012-03-26-PostRALICMBug.ll create mode 100644 test/CodeGen/X86/2012-04-09-TwoAddrPassBug.ll create mode 100644 test/CodeGen/X86/2012-04-26-sdglue.ll create mode 100644 test/CodeGen/X86/2012-05-17-TwoAddressBug.ll create mode 100644 test/CodeGen/X86/2012-05-19-CoalescerCrash.ll create mode 100644 test/CodeGen/X86/2012-05-19-avx2-store.ll create mode 100644 test/CodeGen/X86/2012-07-10-extload64.ll create mode 100644 test/CodeGen/X86/2012-07-10-shufnorm.ll create mode 100644 test/CodeGen/X86/2012-07-15-BuildVectorPromote.ll create mode 100644 test/CodeGen/X86/2012-07-15-broadcastfold.ll create mode 100644 test/CodeGen/X86/2012-07-15-tconst_shl.ll create mode 100644 test/CodeGen/X86/2012-07-15-vshl.ll create mode 100644 test/CodeGen/X86/2012-07-16-LeaUndef.ll create mode 100644 test/CodeGen/X86/2012-07-16-fp2ui-i1.ll create mode 100644 test/CodeGen/X86/2012-07-17-vtrunc.ll create mode 100644 test/CodeGen/X86/2012-07-23-select_cc.ll create mode 100644 test/CodeGen/X86/2012-08-07-CmpISelBug.ll create mode 100644 test/CodeGen/X86/2012-08-16-setcc.ll create mode 100644 test/CodeGen/X86/2012-08-17-legalizer-crash.ll create mode 100644 test/CodeGen/X86/2012-08-28-UnsafeMathCrash.ll create mode 100644 test/CodeGen/X86/2012-09-13-dagco-fneg.ll create mode 100644 test/CodeGen/X86/2012-09-28-CGPBug.ll create mode 100644 test/CodeGen/X86/2012-1-10-buildvector.ll create mode 100644 test/CodeGen/X86/2012-10-02-DAGCycle.ll create mode 100644 test/CodeGen/X86/2012-10-03-DAGCycle.ll create mode 100644 test/CodeGen/X86/2012-10-18-crash-dagco.ll create mode 100644 test/CodeGen/X86/2012-11-28-merge-store-alias.ll create mode 100644 test/CodeGen/X86/2012-11-30-handlemove-dbg.ll create mode 100644 test/CodeGen/X86/2012-11-30-misched-dbg.ll create mode 100644 test/CodeGen/X86/2012-11-30-regpres-dbg.ll create mode 100644 test/CodeGen/X86/2012-12-06-python27-miscompile.ll create mode 100644 test/CodeGen/X86/2012-12-1-merge-multiple.ll create mode 100644 test/CodeGen/X86/2012-12-12-DAGCombineCrash.ll create mode 100644 test/CodeGen/X86/2012-12-14-v8fp80-crash.ll create mode 100644 test/CodeGen/X86/2012-12-19-NoImplicitFloat.ll create mode 100644 test/CodeGen/X86/2013-01-09-DAGCombineBug.ll create mode 100644 test/CodeGen/X86/2013-02-12-ShuffleToZext.ll create mode 100644 test/CodeGen/X86/2013-03-13-VEX-DestReg.ll create mode 100644 test/CodeGen/X86/2013-05-06-ConactVectorCrash.ll create mode 100644 test/CodeGen/X86/2013-10-14-FastISel-incorrect-vreg.ll create mode 100644 test/CodeGen/X86/3addr-16bit.ll create mode 100644 test/CodeGen/X86/3addr-or.ll create mode 100644 test/CodeGen/X86/3dnow-intrinsics.ll create mode 100644 test/CodeGen/X86/4char-promote.ll create mode 100644 test/CodeGen/X86/9601.ll create mode 100644 test/CodeGen/X86/Atomics-64.ll create mode 100644 test/CodeGen/X86/DbgValueOtherTargets.test create mode 100644 test/CodeGen/X86/GC/alloc_loop.ll create mode 100644 test/CodeGen/X86/GC/argpromotion.ll create mode 100644 test/CodeGen/X86/GC/badreadproto.ll create mode 100644 test/CodeGen/X86/GC/badrootproto.ll create mode 100644 test/CodeGen/X86/GC/badwriteproto.ll create mode 100644 test/CodeGen/X86/GC/cg-O0.ll create mode 100644 test/CodeGen/X86/GC/deadargelim.ll create mode 100644 test/CodeGen/X86/GC/erlang-gc.ll create mode 100644 test/CodeGen/X86/GC/fat.ll create mode 100644 test/CodeGen/X86/GC/inline.ll create mode 100644 test/CodeGen/X86/GC/inline2.ll create mode 100644 test/CodeGen/X86/GC/lit.local.cfg create mode 100644 test/CodeGen/X86/GC/lower_gcroot.ll create mode 100644 test/CodeGen/X86/GC/ocaml-gc-assert.ll create mode 100644 test/CodeGen/X86/GC/ocaml-gc.ll create mode 100644 test/CodeGen/X86/GC/outside.ll create mode 100644 test/CodeGen/X86/MachineSink-CritEdge.ll create mode 100644 test/CodeGen/X86/MachineSink-DbgValue.ll create mode 100644 test/CodeGen/X86/MachineSink-PHIUse.ll create mode 100644 test/CodeGen/X86/MachineSink-eflags.ll create mode 100644 test/CodeGen/X86/MergeConsecutiveStores.ll create mode 100644 test/CodeGen/X86/StackColoring-dbg.ll create mode 100644 test/CodeGen/X86/StackColoring.ll create mode 100644 test/CodeGen/X86/SwitchLowering.ll create mode 100644 test/CodeGen/X86/SwizzleShuff.ll create mode 100644 test/CodeGen/X86/WidenArith.ll create mode 100644 test/CodeGen/X86/abi-isel.ll create mode 100644 test/CodeGen/X86/add-of-carry.ll create mode 100644 test/CodeGen/X86/add.ll create mode 100644 test/CodeGen/X86/adde-carry.ll create mode 100644 test/CodeGen/X86/addr-label-difference.ll create mode 100644 test/CodeGen/X86/aes_intrinsics.ll create mode 100644 test/CodeGen/X86/alias-error.ll create mode 100644 test/CodeGen/X86/aliases.ll create mode 100644 test/CodeGen/X86/aligned-comm.ll create mode 100644 test/CodeGen/X86/alignment-2.ll create mode 100644 test/CodeGen/X86/alignment.ll create mode 100644 test/CodeGen/X86/all-ones-vector.ll create mode 100644 test/CodeGen/X86/alldiv-divdi3.ll create mode 100644 test/CodeGen/X86/alloca-align-rounding-32.ll create mode 100644 test/CodeGen/X86/alloca-align-rounding.ll create mode 100644 test/CodeGen/X86/allrem-moddi3.ll create mode 100644 test/CodeGen/X86/and-or-fold.ll create mode 100644 test/CodeGen/X86/and-su.ll create mode 100644 test/CodeGen/X86/andimm8.ll create mode 100644 test/CodeGen/X86/anyext.ll create mode 100644 test/CodeGen/X86/anyregcc-crash.ll create mode 100644 test/CodeGen/X86/anyregcc.ll create mode 100644 test/CodeGen/X86/apm.ll create mode 100644 test/CodeGen/X86/arg-cast.ll create mode 100644 test/CodeGen/X86/asm-block-labels.ll create mode 100644 test/CodeGen/X86/asm-global-imm.ll create mode 100644 test/CodeGen/X86/asm-indirect-mem.ll create mode 100644 test/CodeGen/X86/asm-invalid-register-class-crasher.ll create mode 100644 test/CodeGen/X86/asm-label.ll create mode 100644 test/CodeGen/X86/asm-label2.ll create mode 100644 test/CodeGen/X86/asm-modifier-P.ll create mode 100644 test/CodeGen/X86/asm-modifier.ll create mode 100644 test/CodeGen/X86/asm-reg-type-mismatch.ll create mode 100644 test/CodeGen/X86/atom-bypass-slow-division-64.ll create mode 100644 test/CodeGen/X86/atom-bypass-slow-division.ll create mode 100644 test/CodeGen/X86/atom-call-reg-indirect-foldedreload32.ll create mode 100644 test/CodeGen/X86/atom-call-reg-indirect-foldedreload64.ll create mode 100644 test/CodeGen/X86/atom-call-reg-indirect.ll create mode 100644 test/CodeGen/X86/atom-fixup-lea1.ll create mode 100644 test/CodeGen/X86/atom-fixup-lea2.ll create mode 100644 test/CodeGen/X86/atom-fixup-lea3.ll create mode 100644 test/CodeGen/X86/atom-lea-addw-bug.ll create mode 100644 test/CodeGen/X86/atom-lea-sp.ll create mode 100644 test/CodeGen/X86/atom-pad-short-functions.ll create mode 100644 test/CodeGen/X86/atom-sched.ll create mode 100644 test/CodeGen/X86/atom-shuf.ll create mode 100644 test/CodeGen/X86/atomic-dagsched.ll create mode 100644 test/CodeGen/X86/atomic-load-store-wide.ll create mode 100644 test/CodeGen/X86/atomic-load-store.ll create mode 100644 test/CodeGen/X86/atomic-minmax-i6432.ll create mode 100644 test/CodeGen/X86/atomic-or.ll create mode 100644 test/CodeGen/X86/atomic-pointer.ll create mode 100644 test/CodeGen/X86/atomic16.ll create mode 100644 test/CodeGen/X86/atomic32.ll create mode 100644 test/CodeGen/X86/atomic64.ll create mode 100644 test/CodeGen/X86/atomic6432.ll create mode 100644 test/CodeGen/X86/atomic8.ll create mode 100644 test/CodeGen/X86/atomic_add.ll create mode 100644 test/CodeGen/X86/atomic_op.ll create mode 100644 test/CodeGen/X86/attribute-sections.ll create mode 100644 test/CodeGen/X86/avoid-lea-scale2.ll create mode 100644 test/CodeGen/X86/avoid-loop-align-2.ll create mode 100644 test/CodeGen/X86/avoid-loop-align.ll create mode 100644 test/CodeGen/X86/avx-arith.ll create mode 100644 test/CodeGen/X86/avx-basic.ll create mode 100644 test/CodeGen/X86/avx-bitcast.ll create mode 100644 test/CodeGen/X86/avx-blend.ll create mode 100644 test/CodeGen/X86/avx-brcond.ll create mode 100644 test/CodeGen/X86/avx-cast.ll create mode 100644 test/CodeGen/X86/avx-cmp.ll create mode 100644 test/CodeGen/X86/avx-cvt.ll create mode 100644 test/CodeGen/X86/avx-fp2int.ll create mode 100644 test/CodeGen/X86/avx-intel-ocl.ll create mode 100644 test/CodeGen/X86/avx-intrinsics-x86.ll create mode 100644 test/CodeGen/X86/avx-intrinsics-x86_64.ll create mode 100644 test/CodeGen/X86/avx-load-store.ll create mode 100644 test/CodeGen/X86/avx-logic.ll create mode 100644 test/CodeGen/X86/avx-minmax.ll create mode 100644 test/CodeGen/X86/avx-movdup.ll create mode 100644 test/CodeGen/X86/avx-select.ll create mode 100644 test/CodeGen/X86/avx-sext.ll create mode 100644 test/CodeGen/X86/avx-shift.ll create mode 100644 test/CodeGen/X86/avx-shuffle-x86_32.ll create mode 100644 test/CodeGen/X86/avx-shuffle.ll create mode 100644 test/CodeGen/X86/avx-splat.ll create mode 100644 test/CodeGen/X86/avx-trunc.ll create mode 100644 test/CodeGen/X86/avx-unpack.ll create mode 100644 test/CodeGen/X86/avx-varargs-x86_64.ll create mode 100644 test/CodeGen/X86/avx-vbroadcast.ll create mode 100644 test/CodeGen/X86/avx-vextractf128.ll create mode 100644 test/CodeGen/X86/avx-vinsertf128.ll create mode 100644 test/CodeGen/X86/avx-vmovddup.ll create mode 100644 test/CodeGen/X86/avx-vperm2f128.ll create mode 100644 test/CodeGen/X86/avx-vpermil.ll create mode 100644 test/CodeGen/X86/avx-vshufp.ll create mode 100644 test/CodeGen/X86/avx-vzeroupper.ll create mode 100644 test/CodeGen/X86/avx-win64-args.ll create mode 100644 test/CodeGen/X86/avx-win64.ll create mode 100644 test/CodeGen/X86/avx-zext.ll create mode 100644 test/CodeGen/X86/avx2-arith.ll create mode 100644 test/CodeGen/X86/avx2-cmp.ll create mode 100644 test/CodeGen/X86/avx2-conversions.ll create mode 100644 test/CodeGen/X86/avx2-gather.ll create mode 100644 test/CodeGen/X86/avx2-intrinsics-x86.ll create mode 100644 test/CodeGen/X86/avx2-logic.ll create mode 100644 test/CodeGen/X86/avx2-nontemporal.ll create mode 100644 test/CodeGen/X86/avx2-palignr.ll create mode 100644 test/CodeGen/X86/avx2-phaddsub.ll create mode 100644 test/CodeGen/X86/avx2-shift.ll create mode 100644 test/CodeGen/X86/avx2-shuffle.ll create mode 100644 test/CodeGen/X86/avx2-unpack.ll create mode 100644 test/CodeGen/X86/avx2-vbroadcast.ll create mode 100644 test/CodeGen/X86/avx2-vector-shifts.ll create mode 100644 test/CodeGen/X86/avx2-vperm.ll create mode 100644 test/CodeGen/X86/avx2-vperm2i128.ll create mode 100644 test/CodeGen/X86/avx512-arith.ll create mode 100644 test/CodeGen/X86/avx512-build-vector.ll create mode 100644 test/CodeGen/X86/avx512-cmp.ll create mode 100644 test/CodeGen/X86/avx512-cvt.ll create mode 100644 test/CodeGen/X86/avx512-fma-intrinsics.ll create mode 100644 test/CodeGen/X86/avx512-fma.ll create mode 100644 test/CodeGen/X86/avx512-gather-scatter-intrin.ll create mode 100644 test/CodeGen/X86/avx512-insert-extract.ll create mode 100644 test/CodeGen/X86/avx512-intrinsics.ll create mode 100644 test/CodeGen/X86/avx512-mask-op.ll create mode 100644 test/CodeGen/X86/avx512-mov.ll create mode 100644 test/CodeGen/X86/avx512-select.ll create mode 100644 test/CodeGen/X86/avx512-shift.ll create mode 100644 test/CodeGen/X86/avx512-shuffle.ll create mode 100644 test/CodeGen/X86/avx512-trunc-ext.ll create mode 100644 test/CodeGen/X86/avx512-vbroadcast.ll create mode 100644 test/CodeGen/X86/avx512-vec-cmp.ll create mode 100644 test/CodeGen/X86/barrier-sse.ll create mode 100644 test/CodeGen/X86/barrier.ll create mode 100644 test/CodeGen/X86/basic-promote-integers.ll create mode 100644 test/CodeGen/X86/bc-extract.ll create mode 100644 test/CodeGen/X86/bigstructret.ll create mode 100644 test/CodeGen/X86/bigstructret2.ll create mode 100644 test/CodeGen/X86/bit-test-shift.ll create mode 100644 test/CodeGen/X86/bitcast-i256.ll create mode 100644 test/CodeGen/X86/bitcast-int-to-vector.ll create mode 100644 test/CodeGen/X86/bitcast.ll create mode 100644 test/CodeGen/X86/bitcast2.ll create mode 100644 test/CodeGen/X86/blend-msb.ll create mode 100644 test/CodeGen/X86/block-placement.ll create mode 100644 test/CodeGen/X86/bmi.ll create mode 100644 test/CodeGen/X86/bool-simplify.ll create mode 100644 test/CodeGen/X86/bool-zext.ll create mode 100644 test/CodeGen/X86/br-fold.ll create mode 100644 test/CodeGen/X86/brcond.ll create mode 100644 test/CodeGen/X86/break-anti-dependencies.ll create mode 100644 test/CodeGen/X86/break-avx-dep.ll create mode 100644 test/CodeGen/X86/break-sse-dep.ll create mode 100644 test/CodeGen/X86/bss_pagealigned.ll create mode 100644 test/CodeGen/X86/bswap-inline-asm.ll create mode 100644 test/CodeGen/X86/bswap-vector.ll create mode 100644 test/CodeGen/X86/bswap.ll create mode 100644 test/CodeGen/X86/bt.ll create mode 100644 test/CodeGen/X86/btq.ll create mode 100644 test/CodeGen/X86/buildvec-insertvec.ll create mode 100644 test/CodeGen/X86/byval-align.ll create mode 100644 test/CodeGen/X86/byval.ll create mode 100644 test/CodeGen/X86/byval2.ll create mode 100644 test/CodeGen/X86/byval3.ll create mode 100644 test/CodeGen/X86/byval4.ll create mode 100644 test/CodeGen/X86/byval5.ll create mode 100644 test/CodeGen/X86/byval6.ll create mode 100644 test/CodeGen/X86/byval7.ll create mode 100644 test/CodeGen/X86/call-imm.ll create mode 100644 test/CodeGen/X86/call-push.ll create mode 100644 test/CodeGen/X86/cas.ll create mode 100644 test/CodeGen/X86/cfstring.ll create mode 100644 test/CodeGen/X86/chain_order.ll create mode 100644 test/CodeGen/X86/change-compare-stride-1.ll create mode 100644 test/CodeGen/X86/change-compare-stride-trickiness-0.ll create mode 100644 test/CodeGen/X86/change-compare-stride-trickiness-1.ll create mode 100644 test/CodeGen/X86/change-compare-stride-trickiness-2.ll create mode 100644 test/CodeGen/X86/clobber-fi0.ll create mode 100644 test/CodeGen/X86/clz.ll create mode 100644 test/CodeGen/X86/cmov-fp.ll create mode 100644 test/CodeGen/X86/cmov-into-branch.ll create mode 100644 test/CodeGen/X86/cmov.ll create mode 100644 test/CodeGen/X86/cmp.ll create mode 100644 test/CodeGen/X86/cmpxchg16b.ll create mode 100644 test/CodeGen/X86/coalesce-esp.ll create mode 100644 test/CodeGen/X86/coalesce-implicitdef.ll create mode 100644 test/CodeGen/X86/coalescer-commute1.ll create mode 100644 test/CodeGen/X86/coalescer-commute2.ll create mode 100644 test/CodeGen/X86/coalescer-commute3.ll create mode 100644 test/CodeGen/X86/coalescer-commute4.ll create mode 100644 test/CodeGen/X86/coalescer-commute5.ll create mode 100644 test/CodeGen/X86/coalescer-cross.ll create mode 100644 test/CodeGen/X86/coalescer-dce.ll create mode 100644 test/CodeGen/X86/coalescer-dce2.ll create mode 100644 test/CodeGen/X86/coalescer-identity.ll create mode 100644 test/CodeGen/X86/coalescer-remat.ll create mode 100644 test/CodeGen/X86/code_placement.ll create mode 100644 test/CodeGen/X86/code_placement_align_all.ll create mode 100644 test/CodeGen/X86/code_placement_eh.ll create mode 100644 test/CodeGen/X86/codegen-prepare-cast.ll create mode 100644 test/CodeGen/X86/codegen-prepare-extload.ll create mode 100644 test/CodeGen/X86/codegen-prepare.ll create mode 100644 test/CodeGen/X86/codemodel.ll create mode 100644 test/CodeGen/X86/coff-feat00.ll create mode 100644 test/CodeGen/X86/coldcc64.ll create mode 100644 test/CodeGen/X86/combine-lds.ll create mode 100644 test/CodeGen/X86/combiner-aa-0.ll create mode 100644 test/CodeGen/X86/combiner-aa-1.ll create mode 100644 test/CodeGen/X86/commute-intrinsic.ll create mode 100644 test/CodeGen/X86/commute-two-addr.ll create mode 100644 test/CodeGen/X86/compact-unwind.ll create mode 100644 test/CodeGen/X86/compare-add.ll create mode 100644 test/CodeGen/X86/compare-inf.ll create mode 100644 test/CodeGen/X86/compare_folding.ll create mode 100644 test/CodeGen/X86/compiler_used.ll create mode 100644 test/CodeGen/X86/complex-asm.ll create mode 100644 test/CodeGen/X86/complex-fca.ll create mode 100644 test/CodeGen/X86/conditional-indecrement.ll create mode 100644 test/CodeGen/X86/constant-pool-remat-0.ll create mode 100644 test/CodeGen/X86/constant-pool-sharing.ll create mode 100644 test/CodeGen/X86/constpool.ll create mode 100644 test/CodeGen/X86/constructor.ll create mode 100644 test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll create mode 100644 test/CodeGen/X86/copysign-zero.ll create mode 100644 test/CodeGen/X86/crash-O0.ll create mode 100644 test/CodeGen/X86/crash-nosse.ll create mode 100644 test/CodeGen/X86/crash.ll create mode 100644 test/CodeGen/X86/critical-edge-split-2.ll create mode 100644 test/CodeGen/X86/cstring.ll create mode 100644 test/CodeGen/X86/ctpop-combine.ll create mode 100644 test/CodeGen/X86/cvtv2f32.ll create mode 100644 test/CodeGen/X86/dag-rauw-cse.ll create mode 100644 test/CodeGen/X86/dagcombine-buildvector.ll create mode 100644 test/CodeGen/X86/dagcombine-cse.ll create mode 100644 test/CodeGen/X86/dagcombine-shifts.ll create mode 100644 test/CodeGen/X86/dagcombine-unsafe-math.ll create mode 100644 test/CodeGen/X86/darwin-bzero.ll create mode 100644 test/CodeGen/X86/darwin-no-dead-strip.ll create mode 100644 test/CodeGen/X86/darwin-quote.ll create mode 100644 test/CodeGen/X86/darwin-stub.ll create mode 100644 test/CodeGen/X86/discontiguous-loops.ll create mode 100644 test/CodeGen/X86/div8.ll create mode 100644 test/CodeGen/X86/divide-by-constant.ll create mode 100644 test/CodeGen/X86/divrem.ll create mode 100644 test/CodeGen/X86/dll-linkage.ll create mode 100644 test/CodeGen/X86/dllexport.ll create mode 100644 test/CodeGen/X86/dollar-name.ll create mode 100644 test/CodeGen/X86/dwarf-comp-dir.ll create mode 100644 test/CodeGen/X86/dyn-stackalloc.ll create mode 100644 test/CodeGen/X86/dyn_alloca_aligned.ll create mode 100644 test/CodeGen/X86/dynamic-allocas-VLAs.ll create mode 100644 test/CodeGen/X86/early-ifcvt-crash.ll create mode 100644 test/CodeGen/X86/early-ifcvt.ll create mode 100644 test/CodeGen/X86/eh_frame.ll create mode 100644 test/CodeGen/X86/emit-big-cst.ll create mode 100644 test/CodeGen/X86/empty-functions.ll create mode 100644 test/CodeGen/X86/empty-struct-return-type.ll create mode 100644 test/CodeGen/X86/epilogue.ll create mode 100644 test/CodeGen/X86/extend.ll create mode 100644 test/CodeGen/X86/extended-fma-contraction.ll create mode 100644 test/CodeGen/X86/extern_weak.ll create mode 100644 test/CodeGen/X86/extmul128.ll create mode 100644 test/CodeGen/X86/extmul64.ll create mode 100644 test/CodeGen/X86/extract-combine.ll create mode 100644 test/CodeGen/X86/extract-concat.ll create mode 100644 test/CodeGen/X86/extract-extract.ll create mode 100644 test/CodeGen/X86/extractelement-from-arg.ll create mode 100644 test/CodeGen/X86/extractelement-load.ll create mode 100644 test/CodeGen/X86/extractelement-shuffle.ll create mode 100644 test/CodeGen/X86/extractps.ll create mode 100644 test/CodeGen/X86/f16c-intrinsics.ll create mode 100644 test/CodeGen/X86/fabs.ll create mode 100644 test/CodeGen/X86/fast-cc-callee-pops.ll create mode 100644 test/CodeGen/X86/fast-cc-merge-stack-adj.ll create mode 100644 test/CodeGen/X86/fast-cc-pass-in-regs.ll create mode 100644 test/CodeGen/X86/fast-isel-agg-constant.ll create mode 100644 test/CodeGen/X86/fast-isel-args-fail.ll create mode 100644 test/CodeGen/X86/fast-isel-args.ll create mode 100644 test/CodeGen/X86/fast-isel-atomic.ll create mode 100644 test/CodeGen/X86/fast-isel-avoid-unnecessary-pic-base.ll create mode 100644 test/CodeGen/X86/fast-isel-bail.ll create mode 100644 test/CodeGen/X86/fast-isel-bc.ll create mode 100644 test/CodeGen/X86/fast-isel-call.ll create mode 100644 test/CodeGen/X86/fast-isel-cmp-branch.ll create mode 100644 test/CodeGen/X86/fast-isel-constant.ll create mode 100644 test/CodeGen/X86/fast-isel-constpool.ll create mode 100644 test/CodeGen/X86/fast-isel-divrem-x86-64.ll create mode 100644 test/CodeGen/X86/fast-isel-divrem.ll create mode 100644 test/CodeGen/X86/fast-isel-expect.ll create mode 100644 test/CodeGen/X86/fast-isel-extract.ll create mode 100644 test/CodeGen/X86/fast-isel-fneg.ll create mode 100644 test/CodeGen/X86/fast-isel-gep.ll create mode 100644 test/CodeGen/X86/fast-isel-gv.ll create mode 100644 test/CodeGen/X86/fast-isel-i1.ll create mode 100644 test/CodeGen/X86/fast-isel-mem.ll create mode 100644 test/CodeGen/X86/fast-isel-ret-ext.ll create mode 100644 test/CodeGen/X86/fast-isel-store.ll create mode 100644 test/CodeGen/X86/fast-isel-tailcall.ll create mode 100644 test/CodeGen/X86/fast-isel-tls.ll create mode 100644 test/CodeGen/X86/fast-isel-x86-64.ll create mode 100644 test/CodeGen/X86/fast-isel-x86.ll create mode 100644 test/CodeGen/X86/fast-isel.ll create mode 100644 test/CodeGen/X86/fastcall-correct-mangling.ll create mode 100644 test/CodeGen/X86/fastcc-2.ll create mode 100644 test/CodeGen/X86/fastcc-byval.ll create mode 100644 test/CodeGen/X86/fastcc-sret.ll create mode 100644 test/CodeGen/X86/fastcc.ll create mode 100644 test/CodeGen/X86/fastcc3struct.ll create mode 100644 test/CodeGen/X86/fastisel-gep-promote-before-add.ll create mode 100644 test/CodeGen/X86/fdiv.ll create mode 100644 test/CodeGen/X86/field-extract-use-trunc.ll create mode 100644 test/CodeGen/X86/fildll.ll create mode 100644 test/CodeGen/X86/float-asmprint.ll create mode 100644 test/CodeGen/X86/floor-soft-float.ll create mode 100644 test/CodeGen/X86/fltused.ll create mode 100644 test/CodeGen/X86/fltused_function_pointer.ll create mode 100644 test/CodeGen/X86/fma.ll create mode 100644 test/CodeGen/X86/fma3-intrinsics.ll create mode 100644 test/CodeGen/X86/fma4-intrinsics-x86_64.ll create mode 100644 test/CodeGen/X86/fma_patterns.ll create mode 100644 test/CodeGen/X86/fma_patterns_wide.ll create mode 100644 test/CodeGen/X86/fmul-zero.ll create mode 100644 test/CodeGen/X86/fold-add.ll create mode 100644 test/CodeGen/X86/fold-and-shift.ll create mode 100644 test/CodeGen/X86/fold-call-2.ll create mode 100644 test/CodeGen/X86/fold-call-3.ll create mode 100644 test/CodeGen/X86/fold-call.ll create mode 100644 test/CodeGen/X86/fold-imm.ll create mode 100644 test/CodeGen/X86/fold-load-vec.ll create mode 100644 test/CodeGen/X86/fold-load.ll create mode 100644 test/CodeGen/X86/fold-mul-lohi.ll create mode 100644 test/CodeGen/X86/fold-pcmpeqd-0.ll create mode 100644 test/CodeGen/X86/fold-pcmpeqd-1.ll create mode 100644 test/CodeGen/X86/fold-pcmpeqd-2.ll create mode 100644 test/CodeGen/X86/fold-sext-trunc.ll create mode 100644 test/CodeGen/X86/fold-vex.ll create mode 100644 test/CodeGen/X86/fold-xmm-zero.ll create mode 100644 test/CodeGen/X86/fold-zext-trunc.ll create mode 100644 test/CodeGen/X86/force-align-stack-alloca.ll create mode 100644 test/CodeGen/X86/force-align-stack.ll create mode 100644 test/CodeGen/X86/fp-elim-and-no-fp-elim.ll create mode 100644 test/CodeGen/X86/fp-elim.ll create mode 100644 test/CodeGen/X86/fp-fast.ll create mode 100644 test/CodeGen/X86/fp-immediate-shorten.ll create mode 100644 test/CodeGen/X86/fp-in-intregs.ll create mode 100644 test/CodeGen/X86/fp-load-trunc.ll create mode 100644 test/CodeGen/X86/fp-select-cmp-and.ll create mode 100644 test/CodeGen/X86/fp-stack-2results.ll create mode 100644 test/CodeGen/X86/fp-stack-O0-crash.ll create mode 100644 test/CodeGen/X86/fp-stack-O0.ll create mode 100644 test/CodeGen/X86/fp-stack-compare-cmov.ll create mode 100644 test/CodeGen/X86/fp-stack-compare.ll create mode 100644 test/CodeGen/X86/fp-stack-direct-ret.ll create mode 100644 test/CodeGen/X86/fp-stack-ret-conv.ll create mode 100644 test/CodeGen/X86/fp-stack-ret-store.ll create mode 100644 test/CodeGen/X86/fp-stack-ret.ll create mode 100644 test/CodeGen/X86/fp-stack-retcopy.ll create mode 100644 test/CodeGen/X86/fp-stack-set-st1.ll create mode 100644 test/CodeGen/X86/fp-stack.ll create mode 100644 test/CodeGen/X86/fp-trunc.ll create mode 100644 test/CodeGen/X86/fp-une-cmp.ll create mode 100644 test/CodeGen/X86/fp2sint.ll create mode 100644 test/CodeGen/X86/fp_constant_op.ll create mode 100644 test/CodeGen/X86/fp_load_cast_fold.ll create mode 100644 test/CodeGen/X86/fp_load_fold.ll create mode 100644 test/CodeGen/X86/frame-base.ll create mode 100644 test/CodeGen/X86/fsgsbase.ll create mode 100644 test/CodeGen/X86/fsxor-alignment.ll create mode 100644 test/CodeGen/X86/full-lsr.ll create mode 100644 test/CodeGen/X86/ga-offset.ll create mode 100644 test/CodeGen/X86/gather-addresses.ll create mode 100644 test/CodeGen/X86/gcc_except_table.ll create mode 100644 test/CodeGen/X86/ghc-cc.ll create mode 100644 test/CodeGen/X86/ghc-cc64.ll create mode 100644 test/CodeGen/X86/global-sections-tls.ll create mode 100644 test/CodeGen/X86/global-sections.ll create mode 100644 test/CodeGen/X86/gs-fold.ll create mode 100644 test/CodeGen/X86/h-register-addressing-32.ll create mode 100644 test/CodeGen/X86/h-register-addressing-64.ll create mode 100644 test/CodeGen/X86/h-register-store.ll create mode 100644 test/CodeGen/X86/h-registers-0.ll create mode 100644 test/CodeGen/X86/h-registers-1.ll create mode 100644 test/CodeGen/X86/h-registers-2.ll create mode 100644 test/CodeGen/X86/h-registers-3.ll create mode 100644 test/CodeGen/X86/haddsub.ll create mode 100644 test/CodeGen/X86/handle-move.ll create mode 100644 test/CodeGen/X86/hidden-vis-2.ll create mode 100644 test/CodeGen/X86/hidden-vis-3.ll create mode 100644 test/CodeGen/X86/hidden-vis-4.ll create mode 100644 test/CodeGen/X86/hidden-vis-pic.ll create mode 100644 test/CodeGen/X86/hidden-vis.ll create mode 100644 test/CodeGen/X86/hipe-cc.ll create mode 100644 test/CodeGen/X86/hipe-cc64.ll create mode 100644 test/CodeGen/X86/hipe-prologue.ll create mode 100644 test/CodeGen/X86/hoist-common.ll create mode 100644 test/CodeGen/X86/hoist-invariant-load.ll create mode 100644 test/CodeGen/X86/i128-and-beyond.ll create mode 100644 test/CodeGen/X86/i128-immediate.ll create mode 100644 test/CodeGen/X86/i128-mul.ll create mode 100644 test/CodeGen/X86/i128-ret.ll create mode 100644 test/CodeGen/X86/i128-sdiv.ll create mode 100644 test/CodeGen/X86/i256-add.ll create mode 100644 test/CodeGen/X86/i2k.ll create mode 100644 test/CodeGen/X86/i486-fence-loop.ll create mode 100644 test/CodeGen/X86/i64-mem-copy.ll create mode 100644 test/CodeGen/X86/iabs.ll create mode 100644 test/CodeGen/X86/ident-metadata.ll create mode 100644 test/CodeGen/X86/illegal-insert.ll create mode 100644 test/CodeGen/X86/illegal-vector-args-return.ll create mode 100644 test/CodeGen/X86/imul-lea-2.ll create mode 100644 test/CodeGen/X86/imul-lea.ll create mode 100644 test/CodeGen/X86/imul64-lea.ll create mode 100644 test/CodeGen/X86/inline-asm-2addr.ll create mode 100644 test/CodeGen/X86/inline-asm-R-constraint.ll create mode 100644 test/CodeGen/X86/inline-asm-error.ll create mode 100644 test/CodeGen/X86/inline-asm-flag-clobber.ll create mode 100644 test/CodeGen/X86/inline-asm-fpstack.ll create mode 100644 test/CodeGen/X86/inline-asm-h.ll create mode 100644 test/CodeGen/X86/inline-asm-modifier-n.ll create mode 100644 test/CodeGen/X86/inline-asm-modifier-q.ll create mode 100644 test/CodeGen/X86/inline-asm-mrv.ll create mode 100644 test/CodeGen/X86/inline-asm-out-regs.ll create mode 100644 test/CodeGen/X86/inline-asm-pic.ll create mode 100644 test/CodeGen/X86/inline-asm-ptr-cast.ll create mode 100644 test/CodeGen/X86/inline-asm-q-regs.ll create mode 100644 test/CodeGen/X86/inline-asm-tied.ll create mode 100644 test/CodeGen/X86/inline-asm-x-scalar.ll create mode 100644 test/CodeGen/X86/inline-asm.ll create mode 100644 test/CodeGen/X86/inlineasm-sched-bug.ll create mode 100644 test/CodeGen/X86/inreg.ll create mode 100644 test/CodeGen/X86/ins_subreg_coalesce-1.ll create mode 100644 test/CodeGen/X86/ins_subreg_coalesce-2.ll create mode 100644 test/CodeGen/X86/ins_subreg_coalesce-3.ll create mode 100644 test/CodeGen/X86/insert-positions.ll create mode 100644 test/CodeGen/X86/insertelement-copytoregs.ll create mode 100644 test/CodeGen/X86/insertelement-legalize.ll create mode 100644 test/CodeGen/X86/int-intrinsic.ll create mode 100644 test/CodeGen/X86/invalid-shift-immediate.ll create mode 100644 test/CodeGen/X86/isel-optnone.ll create mode 100644 test/CodeGen/X86/isel-sink.ll create mode 100644 test/CodeGen/X86/isel-sink2.ll create mode 100644 test/CodeGen/X86/isel-sink3.ll create mode 100644 test/CodeGen/X86/isint.ll create mode 100644 test/CodeGen/X86/isnan.ll create mode 100644 test/CodeGen/X86/isnan2.ll create mode 100644 test/CodeGen/X86/ispositive.ll create mode 100644 test/CodeGen/X86/jump_sign.ll create mode 100644 test/CodeGen/X86/label-redefinition.ll create mode 100644 test/CodeGen/X86/large-gep-chain.ll create mode 100644 test/CodeGen/X86/large-gep-scale.ll create mode 100644 test/CodeGen/X86/large-global.ll create mode 100644 test/CodeGen/X86/ldzero.ll create mode 100644 test/CodeGen/X86/lea-2.ll create mode 100644 test/CodeGen/X86/lea-3.ll create mode 100644 test/CodeGen/X86/lea-4.ll create mode 100644 test/CodeGen/X86/lea-recursion.ll create mode 100644 test/CodeGen/X86/lea.ll create mode 100644 test/CodeGen/X86/leaf-fp-elim.ll create mode 100644 test/CodeGen/X86/legalize-fmp-oeq-vector-select.ll create mode 100644 test/CodeGen/X86/legalize-libcalls.ll create mode 100644 test/CodeGen/X86/legalize-shift-64.ll create mode 100644 test/CodeGen/X86/legalize-sub-zero-2.ll create mode 100644 test/CodeGen/X86/legalize-sub-zero.ll create mode 100644 test/CodeGen/X86/legalizedag_vec.ll create mode 100644 test/CodeGen/X86/lfence.ll create mode 100644 test/CodeGen/X86/licm-dominance.ll create mode 100644 test/CodeGen/X86/licm-nested.ll create mode 100644 test/CodeGen/X86/licm-symbol.ll create mode 100644 test/CodeGen/X86/limited-prec.ll create mode 100644 test/CodeGen/X86/lit.local.cfg create mode 100644 test/CodeGen/X86/live-out-reg-info.ll create mode 100644 test/CodeGen/X86/liveness-local-regalloc.ll create mode 100644 test/CodeGen/X86/load-slice.ll create mode 100644 test/CodeGen/X86/lock-inst-encoding.ll create mode 100644 test/CodeGen/X86/log2_not_readnone.ll create mode 100644 test/CodeGen/X86/long-extend.ll create mode 100644 test/CodeGen/X86/long-setcc.ll create mode 100644 test/CodeGen/X86/longlong-deadload.ll create mode 100644 test/CodeGen/X86/loop-blocks.ll create mode 100644 test/CodeGen/X86/loop-hoist.ll create mode 100644 test/CodeGen/X86/loop-strength-reduce-2.ll create mode 100644 test/CodeGen/X86/loop-strength-reduce-3.ll create mode 100644 test/CodeGen/X86/loop-strength-reduce.ll create mode 100644 test/CodeGen/X86/loop-strength-reduce2.ll create mode 100644 test/CodeGen/X86/loop-strength-reduce4.ll create mode 100644 test/CodeGen/X86/loop-strength-reduce5.ll create mode 100644 test/CodeGen/X86/loop-strength-reduce6.ll create mode 100644 test/CodeGen/X86/loop-strength-reduce7.ll create mode 100644 test/CodeGen/X86/loop-strength-reduce8.ll create mode 100644 test/CodeGen/X86/lsr-delayed-fold.ll create mode 100644 test/CodeGen/X86/lsr-i386.ll create mode 100644 test/CodeGen/X86/lsr-interesting-step.ll create mode 100644 test/CodeGen/X86/lsr-loop-exit-cond.ll create mode 100644 test/CodeGen/X86/lsr-negative-stride.ll create mode 100644 test/CodeGen/X86/lsr-nonaffine.ll create mode 100644 test/CodeGen/X86/lsr-normalization.ll create mode 100644 test/CodeGen/X86/lsr-overflow.ll create mode 100644 test/CodeGen/X86/lsr-quadratic-expand.ll create mode 100644 test/CodeGen/X86/lsr-redundant-addressing.ll create mode 100644 test/CodeGen/X86/lsr-reuse-trunc.ll create mode 100644 test/CodeGen/X86/lsr-reuse.ll create mode 100644 test/CodeGen/X86/lsr-sort.ll create mode 100644 test/CodeGen/X86/lsr-static-addr.ll create mode 100644 test/CodeGen/X86/lsr-wrap.ll create mode 100644 test/CodeGen/X86/lzcnt.ll create mode 100644 test/CodeGen/X86/machine-cp.ll create mode 100644 test/CodeGen/X86/machine-cse.ll create mode 100644 test/CodeGen/X86/masked-iv-safe.ll create mode 100644 test/CodeGen/X86/masked-iv-unsafe.ll create mode 100644 test/CodeGen/X86/maskmovdqu.ll create mode 100644 test/CodeGen/X86/mcinst-avx-lowering.ll create mode 100644 test/CodeGen/X86/mcinst-lowering.ll create mode 100644 test/CodeGen/X86/mem-promote-integers.ll create mode 100644 test/CodeGen/X86/membarrier.ll create mode 100644 test/CodeGen/X86/memcmp.ll create mode 100644 test/CodeGen/X86/memcpy-2.ll create mode 100644 test/CodeGen/X86/memcpy.ll create mode 100644 test/CodeGen/X86/memset-2.ll create mode 100644 test/CodeGen/X86/memset-3.ll create mode 100644 test/CodeGen/X86/memset-sse-stack-realignment.ll create mode 100644 test/CodeGen/X86/memset.ll create mode 100644 test/CodeGen/X86/memset64-on-x86-32.ll create mode 100644 test/CodeGen/X86/merge_store.ll create mode 100644 test/CodeGen/X86/mfence.ll create mode 100644 test/CodeGen/X86/mingw-alloca.ll create mode 100644 test/CodeGen/X86/misaligned-memset.ll create mode 100644 test/CodeGen/X86/misched-balance.ll create mode 100644 test/CodeGen/X86/misched-copy.ll create mode 100644 test/CodeGen/X86/misched-crash.ll create mode 100644 test/CodeGen/X86/misched-fusion.ll create mode 100644 test/CodeGen/X86/misched-ilp.ll create mode 100644 test/CodeGen/X86/misched-matmul.ll create mode 100644 test/CodeGen/X86/misched-matrix.ll create mode 100644 test/CodeGen/X86/misched-new.ll create mode 100644 test/CodeGen/X86/mmx-arg-passing.ll create mode 100644 test/CodeGen/X86/mmx-arg-passing2.ll create mode 100644 test/CodeGen/X86/mmx-arith.ll create mode 100644 test/CodeGen/X86/mmx-bitcast-to-i64.ll create mode 100644 test/CodeGen/X86/mmx-builtins.ll create mode 100644 test/CodeGen/X86/mmx-copy-gprs.ll create mode 100644 test/CodeGen/X86/mmx-emms.ll create mode 100644 test/CodeGen/X86/mmx-insert-element.ll create mode 100644 test/CodeGen/X86/mmx-pinsrw.ll create mode 100644 test/CodeGen/X86/mmx-punpckhdq.ll create mode 100644 test/CodeGen/X86/mmx-s2v.ll create mode 100644 test/CodeGen/X86/mmx-shift.ll create mode 100644 test/CodeGen/X86/mmx-shuffle.ll create mode 100644 test/CodeGen/X86/movbe.ll create mode 100644 test/CodeGen/X86/movfs.ll create mode 100644 test/CodeGen/X86/movgs.ll create mode 100644 test/CodeGen/X86/movmsk.ll create mode 100644 test/CodeGen/X86/movntdq-no-avx.ll create mode 100644 test/CodeGen/X86/ms-inline-asm.ll create mode 100644 test/CodeGen/X86/mul-legalize.ll create mode 100644 test/CodeGen/X86/mul-remat.ll create mode 100644 test/CodeGen/X86/mul-shift-reassoc.ll create mode 100644 test/CodeGen/X86/mul128.ll create mode 100644 test/CodeGen/X86/mul64.ll create mode 100644 test/CodeGen/X86/muloti.ll create mode 100644 test/CodeGen/X86/mult-alt-generic-i686.ll create mode 100644 test/CodeGen/X86/mult-alt-generic-x86_64.ll create mode 100644 test/CodeGen/X86/mult-alt-x86.ll create mode 100644 test/CodeGen/X86/multiple-loop-post-inc.ll create mode 100644 test/CodeGen/X86/multiple-return-values-cross-block.ll create mode 100644 test/CodeGen/X86/mulx32.ll create mode 100644 test/CodeGen/X86/mulx64.ll create mode 100644 test/CodeGen/X86/nancvt.ll create mode 100644 test/CodeGen/X86/narrow-shl-cst.ll create mode 100644 test/CodeGen/X86/narrow-shl-load.ll create mode 100644 test/CodeGen/X86/narrow_op-1.ll create mode 100644 test/CodeGen/X86/neg-shl-add.ll create mode 100644 test/CodeGen/X86/neg_cmp.ll create mode 100644 test/CodeGen/X86/neg_fp.ll create mode 100644 test/CodeGen/X86/negate-add-zero.ll create mode 100644 test/CodeGen/X86/negative-sin.ll create mode 100644 test/CodeGen/X86/negative-stride-fptosi-user.ll create mode 100644 test/CodeGen/X86/negative-subscript.ll create mode 100644 test/CodeGen/X86/negative_zero.ll create mode 100644 test/CodeGen/X86/newline-and-quote.ll create mode 100644 test/CodeGen/X86/no-cfi.ll create mode 100644 test/CodeGen/X86/no-cmov.ll create mode 100644 test/CodeGen/X86/no-compact-unwind.ll create mode 100644 test/CodeGen/X86/no-elf-compact-unwind.ll create mode 100644 test/CodeGen/X86/nobt.ll create mode 100644 test/CodeGen/X86/nocx16.ll create mode 100644 test/CodeGen/X86/non-lazy-bind.ll create mode 100644 test/CodeGen/X86/nonconst-static-ev.ll create mode 100644 test/CodeGen/X86/nonconst-static-iv.ll create mode 100644 test/CodeGen/X86/nontemporal.ll create mode 100644 test/CodeGen/X86/norex-subreg.ll create mode 100644 test/CodeGen/X86/nosse-error1.ll create mode 100644 test/CodeGen/X86/nosse-error2.ll create mode 100644 test/CodeGen/X86/nosse-varargs.ll create mode 100644 test/CodeGen/X86/null-streamer.ll create mode 100644 test/CodeGen/X86/objc-gc-module-flags.ll create mode 100644 test/CodeGen/X86/object-size.ll create mode 100644 test/CodeGen/X86/odr_comdat.ll create mode 100644 test/CodeGen/X86/opt-ext-uses.ll create mode 100644 test/CodeGen/X86/opt-shuff-tstore.ll create mode 100644 test/CodeGen/X86/optimize-max-0.ll create mode 100644 test/CodeGen/X86/optimize-max-1.ll create mode 100644 test/CodeGen/X86/optimize-max-2.ll create mode 100644 test/CodeGen/X86/optimize-max-3.ll create mode 100644 test/CodeGen/X86/or-address.ll create mode 100644 test/CodeGen/X86/or-branch.ll create mode 100644 test/CodeGen/X86/overlap-shift.ll create mode 100644 test/CodeGen/X86/packed_struct.ll create mode 100644 test/CodeGen/X86/palignr-2.ll create mode 100644 test/CodeGen/X86/palignr.ll create mode 100644 test/CodeGen/X86/pass-three.ll create mode 100644 test/CodeGen/X86/patchpoint.ll create mode 100644 test/CodeGen/X86/peep-setb.ll create mode 100644 test/CodeGen/X86/peep-test-0.ll create mode 100644 test/CodeGen/X86/peep-test-1.ll create mode 100644 test/CodeGen/X86/peep-test-2.ll create mode 100644 test/CodeGen/X86/peep-test-3.ll create mode 100644 test/CodeGen/X86/peep-test-4.ll create mode 100644 test/CodeGen/X86/peep-vector-extract-concat.ll create mode 100644 test/CodeGen/X86/peep-vector-extract-insert.ll create mode 100644 test/CodeGen/X86/personality.ll create mode 100644 test/CodeGen/X86/personality_size.ll create mode 100644 test/CodeGen/X86/phaddsub.ll create mode 100644 test/CodeGen/X86/phi-bit-propagation.ll create mode 100644 test/CodeGen/X86/phi-immediate-factoring.ll create mode 100644 test/CodeGen/X86/phielim-split.ll create mode 100644 test/CodeGen/X86/phys-reg-local-regalloc.ll create mode 100644 test/CodeGen/X86/phys_subreg_coalesce-2.ll create mode 100644 test/CodeGen/X86/phys_subreg_coalesce-3.ll create mode 100644 test/CodeGen/X86/phys_subreg_coalesce.ll create mode 100644 test/CodeGen/X86/pic-load-remat.ll create mode 100644 test/CodeGen/X86/pic.ll create mode 100644 test/CodeGen/X86/pic_jumptable.ll create mode 100644 test/CodeGen/X86/pmovext.ll create mode 100644 test/CodeGen/X86/pmovsx-inreg.ll create mode 100644 test/CodeGen/X86/pmul.ll create mode 100644 test/CodeGen/X86/pmulld.ll create mode 100644 test/CodeGen/X86/pointer-vector.ll create mode 100644 test/CodeGen/X86/popcnt.ll create mode 100644 test/CodeGen/X86/postalloc-coalescing.ll create mode 100644 test/CodeGen/X86/postra-licm.ll create mode 100644 test/CodeGen/X86/powi.ll create mode 100644 test/CodeGen/X86/pr10068.ll create mode 100644 test/CodeGen/X86/pr10420.ll create mode 100644 test/CodeGen/X86/pr10475.ll create mode 100644 test/CodeGen/X86/pr10499.ll create mode 100644 test/CodeGen/X86/pr10523.ll create mode 100644 test/CodeGen/X86/pr10524.ll create mode 100644 test/CodeGen/X86/pr10525.ll create mode 100644 test/CodeGen/X86/pr10526.ll create mode 100644 test/CodeGen/X86/pr11202.ll create mode 100644 test/CodeGen/X86/pr11334.ll create mode 100644 test/CodeGen/X86/pr11415.ll create mode 100644 test/CodeGen/X86/pr11468.ll create mode 100644 test/CodeGen/X86/pr11985.ll create mode 100644 test/CodeGen/X86/pr11998.ll create mode 100644 test/CodeGen/X86/pr12312.ll create mode 100644 test/CodeGen/X86/pr12359.ll create mode 100644 test/CodeGen/X86/pr12360.ll create mode 100644 test/CodeGen/X86/pr12889.ll create mode 100644 test/CodeGen/X86/pr13209.ll create mode 100644 test/CodeGen/X86/pr13220.ll create mode 100644 test/CodeGen/X86/pr13458.ll create mode 100644 test/CodeGen/X86/pr13577.ll create mode 100644 test/CodeGen/X86/pr13859.ll create mode 100644 test/CodeGen/X86/pr13899.ll create mode 100644 test/CodeGen/X86/pr14088.ll create mode 100644 test/CodeGen/X86/pr14090.ll create mode 100644 test/CodeGen/X86/pr14098.ll create mode 100644 test/CodeGen/X86/pr14161.ll create mode 100644 test/CodeGen/X86/pr14204.ll create mode 100644 test/CodeGen/X86/pr14314.ll create mode 100644 test/CodeGen/X86/pr14333.ll create mode 100644 test/CodeGen/X86/pr14562.ll create mode 100644 test/CodeGen/X86/pr1462.ll create mode 100644 test/CodeGen/X86/pr1489.ll create mode 100644 test/CodeGen/X86/pr1505.ll create mode 100644 test/CodeGen/X86/pr1505b.ll create mode 100644 test/CodeGen/X86/pr15267.ll create mode 100644 test/CodeGen/X86/pr15296.ll create mode 100644 test/CodeGen/X86/pr15309.ll create mode 100644 test/CodeGen/X86/pr16031.ll create mode 100644 test/CodeGen/X86/pr16360.ll create mode 100644 test/CodeGen/X86/pr16807.ll create mode 100644 test/CodeGen/X86/pr17546.ll create mode 100644 test/CodeGen/X86/pr17631.ll create mode 100644 test/CodeGen/X86/pr17764.ll create mode 100644 test/CodeGen/X86/pr18014.ll create mode 100644 test/CodeGen/X86/pr18023.ll create mode 100644 test/CodeGen/X86/pr18054.ll create mode 100644 test/CodeGen/X86/pr18162.ll create mode 100644 test/CodeGen/X86/pr2177.ll create mode 100644 test/CodeGen/X86/pr2182.ll create mode 100644 test/CodeGen/X86/pr2326.ll create mode 100644 test/CodeGen/X86/pr2656.ll create mode 100644 test/CodeGen/X86/pr2659.ll create mode 100644 test/CodeGen/X86/pr2849.ll create mode 100644 test/CodeGen/X86/pr2924.ll create mode 100644 test/CodeGen/X86/pr2982.ll create mode 100644 test/CodeGen/X86/pr3154.ll create mode 100644 test/CodeGen/X86/pr3216.ll create mode 100644 test/CodeGen/X86/pr3241.ll create mode 100644 test/CodeGen/X86/pr3243.ll create mode 100644 test/CodeGen/X86/pr3244.ll create mode 100644 test/CodeGen/X86/pr3250.ll create mode 100644 test/CodeGen/X86/pr3317.ll create mode 100644 test/CodeGen/X86/pr3366.ll create mode 100644 test/CodeGen/X86/pr3457.ll create mode 100644 test/CodeGen/X86/pr3522.ll create mode 100644 test/CodeGen/X86/pr5145.ll create mode 100644 test/CodeGen/X86/pr7882.ll create mode 100644 test/CodeGen/X86/pr9127.ll create mode 100644 test/CodeGen/X86/pr9743.ll create mode 100644 test/CodeGen/X86/pre-ra-sched.ll create mode 100644 test/CodeGen/X86/prefetch.ll create mode 100644 test/CodeGen/X86/prefixdata.ll create mode 100644 test/CodeGen/X86/private-2.ll create mode 100644 test/CodeGen/X86/private.ll create mode 100644 test/CodeGen/X86/promote-assert-zext.ll create mode 100644 test/CodeGen/X86/promote-i16.ll create mode 100644 test/CodeGen/X86/promote-trunc.ll create mode 100644 test/CodeGen/X86/promote.ll create mode 100644 test/CodeGen/X86/psubus.ll create mode 100644 test/CodeGen/X86/ptr-rotate.ll create mode 100644 test/CodeGen/X86/ptrtoint-constexpr.ll create mode 100644 test/CodeGen/X86/rd-mod-wr-eflags.ll create mode 100644 test/CodeGen/X86/rdrand.ll create mode 100644 test/CodeGen/X86/rdseed.ll create mode 100644 test/CodeGen/X86/rdtsc.ll create mode 100644 test/CodeGen/X86/red-zone.ll create mode 100644 test/CodeGen/X86/red-zone2.ll create mode 100644 test/CodeGen/X86/reghinting.ll create mode 100644 test/CodeGen/X86/regpressure.ll create mode 100644 test/CodeGen/X86/rem.ll create mode 100644 test/CodeGen/X86/remat-constant.ll create mode 100644 test/CodeGen/X86/remat-fold-load.ll create mode 100644 test/CodeGen/X86/remat-mov-0.ll create mode 100644 test/CodeGen/X86/remat-phys-dead.ll create mode 100644 test/CodeGen/X86/remat-scalar-zero.ll create mode 100644 test/CodeGen/X86/ret-addr.ll create mode 100644 test/CodeGen/X86/ret-i64-0.ll create mode 100644 test/CodeGen/X86/ret-mmx.ll create mode 100644 test/CodeGen/X86/returned-trunc-tail-calls.ll create mode 100644 test/CodeGen/X86/reverse_branches.ll create mode 100644 test/CodeGen/X86/rip-rel-address.ll create mode 100644 test/CodeGen/X86/rip-rel-lea.ll create mode 100644 test/CodeGen/X86/rodata-relocs.ll create mode 100644 test/CodeGen/X86/rot16.ll create mode 100644 test/CodeGen/X86/rot32.ll create mode 100644 test/CodeGen/X86/rot64.ll create mode 100644 test/CodeGen/X86/rotate.ll create mode 100644 test/CodeGen/X86/rotate2.ll create mode 100644 test/CodeGen/X86/rounding-ops.ll create mode 100644 test/CodeGen/X86/rtm.ll create mode 100644 test/CodeGen/X86/sandybridge-loads.ll create mode 100644 test/CodeGen/X86/scalar-extract.ll create mode 100644 test/CodeGen/X86/scalar-min-max-fill-operand.ll create mode 100644 test/CodeGen/X86/scalar_sse_minmax.ll create mode 100644 test/CodeGen/X86/scalar_widen_div.ll create mode 100644 test/CodeGen/X86/scalarize-bitcast.ll create mode 100644 test/CodeGen/X86/scev-interchange.ll create mode 100644 test/CodeGen/X86/sdiv-exact.ll create mode 100644 test/CodeGen/X86/segmented-stacks-dynamic.ll create mode 100644 test/CodeGen/X86/segmented-stacks.ll create mode 100644 test/CodeGen/X86/select-with-and-or.ll create mode 100644 test/CodeGen/X86/select.ll create mode 100644 test/CodeGen/X86/select_const.ll create mode 100644 test/CodeGen/X86/selectiondag-cse.ll create mode 100644 test/CodeGen/X86/setcc-narrowing.ll create mode 100644 test/CodeGen/X86/setcc-sentinals.ll create mode 100644 test/CodeGen/X86/setcc.ll create mode 100644 test/CodeGen/X86/setoeq.ll create mode 100644 test/CodeGen/X86/setuge.ll create mode 100644 test/CodeGen/X86/sext-i1.ll create mode 100644 test/CodeGen/X86/sext-load.ll create mode 100644 test/CodeGen/X86/sext-ret-val.ll create mode 100644 test/CodeGen/X86/sext-setcc-self.ll create mode 100644 test/CodeGen/X86/sext-subreg.ll create mode 100644 test/CodeGen/X86/sext-trunc.ll create mode 100644 test/CodeGen/X86/sfence.ll create mode 100644 test/CodeGen/X86/sha.ll create mode 100644 test/CodeGen/X86/shift-and.ll create mode 100644 test/CodeGen/X86/shift-bmi2.ll create mode 100644 test/CodeGen/X86/shift-coalesce.ll create mode 100644 test/CodeGen/X86/shift-codegen.ll create mode 100644 test/CodeGen/X86/shift-combine.ll create mode 100644 test/CodeGen/X86/shift-double.ll create mode 100644 test/CodeGen/X86/shift-folding.ll create mode 100644 test/CodeGen/X86/shift-i128.ll create mode 100644 test/CodeGen/X86/shift-i256.ll create mode 100644 test/CodeGen/X86/shift-one.ll create mode 100644 test/CodeGen/X86/shift-pair.ll create mode 100644 test/CodeGen/X86/shift-parts.ll create mode 100644 test/CodeGen/X86/shl-anyext.ll create mode 100644 test/CodeGen/X86/shl-i64.ll create mode 100644 test/CodeGen/X86/shl_elim.ll create mode 100644 test/CodeGen/X86/shl_undef.ll create mode 100644 test/CodeGen/X86/shrink-compare.ll create mode 100644 test/CodeGen/X86/shrink-fp-const1.ll create mode 100644 test/CodeGen/X86/shrink-fp-const2.ll create mode 100644 test/CodeGen/X86/sibcall-2.ll create mode 100644 test/CodeGen/X86/sibcall-3.ll create mode 100644 test/CodeGen/X86/sibcall-4.ll create mode 100644 test/CodeGen/X86/sibcall-5.ll create mode 100644 test/CodeGen/X86/sibcall-6.ll create mode 100644 test/CodeGen/X86/sibcall-byval.ll create mode 100644 test/CodeGen/X86/sibcall.ll create mode 100644 test/CodeGen/X86/simple-zext.ll create mode 100644 test/CodeGen/X86/sincos-opt.ll create mode 100644 test/CodeGen/X86/sincos.ll create mode 100644 test/CodeGen/X86/sink-hoist.ll create mode 100644 test/CodeGen/X86/sink-out-of-loop.ll create mode 100644 test/CodeGen/X86/sjlj.ll create mode 100644 test/CodeGen/X86/small-byval-memcpy.ll create mode 100644 test/CodeGen/X86/smul-with-overflow.ll create mode 100644 test/CodeGen/X86/soft-fp.ll create mode 100644 test/CodeGen/X86/splat-scalar-load.ll create mode 100644 test/CodeGen/X86/split-eh-lpad-edges.ll create mode 100644 test/CodeGen/X86/split-vector-bitcast.ll create mode 100644 test/CodeGen/X86/split-vector-rem.ll create mode 100644 test/CodeGen/X86/sqrt-fastmath.ll create mode 100644 test/CodeGen/X86/sse-align-0.ll create mode 100644 test/CodeGen/X86/sse-align-1.ll create mode 100644 test/CodeGen/X86/sse-align-10.ll create mode 100644 test/CodeGen/X86/sse-align-11.ll create mode 100644 test/CodeGen/X86/sse-align-12.ll create mode 100644 test/CodeGen/X86/sse-align-2.ll create mode 100644 test/CodeGen/X86/sse-align-3.ll create mode 100644 test/CodeGen/X86/sse-align-4.ll create mode 100644 test/CodeGen/X86/sse-align-5.ll create mode 100644 test/CodeGen/X86/sse-align-6.ll create mode 100644 test/CodeGen/X86/sse-align-7.ll create mode 100644 test/CodeGen/X86/sse-align-8.ll create mode 100644 test/CodeGen/X86/sse-align-9.ll create mode 100644 test/CodeGen/X86/sse-commute.ll create mode 100644 test/CodeGen/X86/sse-domains.ll create mode 100644 test/CodeGen/X86/sse-fcopysign.ll create mode 100644 test/CodeGen/X86/sse-intel-ocl.ll create mode 100644 test/CodeGen/X86/sse-intrinsics-x86.ll create mode 100644 test/CodeGen/X86/sse-load-ret.ll create mode 100644 test/CodeGen/X86/sse-minmax.ll create mode 100644 test/CodeGen/X86/sse-varargs.ll create mode 100644 test/CodeGen/X86/sse1.ll create mode 100644 test/CodeGen/X86/sse2-blend.ll create mode 100644 test/CodeGen/X86/sse2-intrinsics-x86.ll create mode 100644 test/CodeGen/X86/sse2-mul.ll create mode 100644 test/CodeGen/X86/sse2-vector-shifts.ll create mode 100644 test/CodeGen/X86/sse2.ll create mode 100644 test/CodeGen/X86/sse3-intrinsics-x86.ll create mode 100644 test/CodeGen/X86/sse3.ll create mode 100644 test/CodeGen/X86/sse41-blend.ll create mode 100644 test/CodeGen/X86/sse41-intrinsics-x86.ll create mode 100644 test/CodeGen/X86/sse41.ll create mode 100644 test/CodeGen/X86/sse42-intrinsics-x86.ll create mode 100644 test/CodeGen/X86/sse42.ll create mode 100644 test/CodeGen/X86/sse42_64.ll create mode 100644 test/CodeGen/X86/sse4a.ll create mode 100644 test/CodeGen/X86/sse_partial_update.ll create mode 100644 test/CodeGen/X86/sse_reload_fold.ll create mode 100644 test/CodeGen/X86/ssse3-intrinsics-x86.ll create mode 100644 test/CodeGen/X86/stack-align-memcpy.ll create mode 100644 test/CodeGen/X86/stack-align.ll create mode 100644 test/CodeGen/X86/stack-align2.ll create mode 100644 test/CodeGen/X86/stack-protector-dbginfo.ll create mode 100644 test/CodeGen/X86/stack-protector-vreg-to-vreg-copy.ll create mode 100644 test/CodeGen/X86/stack-protector.ll create mode 100644 test/CodeGen/X86/stack-update-frame-opcode.ll create mode 100644 test/CodeGen/X86/stackmap.ll create mode 100644 test/CodeGen/X86/stdarg.ll create mode 100644 test/CodeGen/X86/stdcall-notailcall.ll create mode 100644 test/CodeGen/X86/stdcall.ll create mode 100644 test/CodeGen/X86/store-empty-member.ll create mode 100644 test/CodeGen/X86/store-fp-constant.ll create mode 100644 test/CodeGen/X86/store-global-address.ll create mode 100644 test/CodeGen/X86/store-narrow.ll create mode 100644 test/CodeGen/X86/store_op_load_fold.ll create mode 100644 test/CodeGen/X86/store_op_load_fold2.ll create mode 100644 test/CodeGen/X86/stores-merging.ll create mode 100644 test/CodeGen/X86/storetrunc-fp.ll create mode 100644 test/CodeGen/X86/stride-nine-with-base-reg.ll create mode 100644 test/CodeGen/X86/stride-reuse.ll create mode 100644 test/CodeGen/X86/sub-with-overflow.ll create mode 100644 test/CodeGen/X86/sub.ll create mode 100644 test/CodeGen/X86/subreg-to-reg-0.ll create mode 100644 test/CodeGen/X86/subreg-to-reg-1.ll create mode 100644 test/CodeGen/X86/subreg-to-reg-2.ll create mode 100644 test/CodeGen/X86/subreg-to-reg-3.ll create mode 100644 test/CodeGen/X86/subreg-to-reg-4.ll create mode 100644 test/CodeGen/X86/subreg-to-reg-6.ll create mode 100644 test/CodeGen/X86/switch-bt.ll create mode 100644 test/CodeGen/X86/switch-crit-edge-constant.ll create mode 100644 test/CodeGen/X86/switch-or.ll create mode 100644 test/CodeGen/X86/switch-order-weight.ll create mode 100644 test/CodeGen/X86/switch-zextload.ll create mode 100644 test/CodeGen/X86/swizzle.ll create mode 100644 test/CodeGen/X86/tail-call-attrs.ll create mode 100644 test/CodeGen/X86/tail-call-got.ll create mode 100644 test/CodeGen/X86/tail-call-legality.ll create mode 100644 test/CodeGen/X86/tail-dup-addr.ll create mode 100644 test/CodeGen/X86/tail-opts.ll create mode 100644 test/CodeGen/X86/tail-threshold.ll create mode 100644 test/CodeGen/X86/tailcall-64.ll create mode 100644 test/CodeGen/X86/tailcall-calleesave.ll create mode 100644 test/CodeGen/X86/tailcall-cgp-dup.ll create mode 100644 test/CodeGen/X86/tailcall-disable.ll create mode 100644 test/CodeGen/X86/tailcall-fastisel.ll create mode 100644 test/CodeGen/X86/tailcall-largecode.ll create mode 100644 test/CodeGen/X86/tailcall-returndup-void.ll create mode 100644 test/CodeGen/X86/tailcall-ri64.ll create mode 100644 test/CodeGen/X86/tailcall-stackalign.ll create mode 100644 test/CodeGen/X86/tailcall-structret.ll create mode 100644 test/CodeGen/X86/tailcall.ll create mode 100644 test/CodeGen/X86/tailcallbyval.ll create mode 100644 test/CodeGen/X86/tailcallbyval64.ll create mode 100644 test/CodeGen/X86/tailcallfp.ll create mode 100644 test/CodeGen/X86/tailcallfp2.ll create mode 100644 test/CodeGen/X86/tailcallpic1.ll create mode 100644 test/CodeGen/X86/tailcallpic2.ll create mode 100644 test/CodeGen/X86/tailcallstack64.ll create mode 100644 test/CodeGen/X86/targetLoweringGeneric.ll create mode 100644 test/CodeGen/X86/tbm-intrinsics-x86_64.ll create mode 100644 test/CodeGen/X86/tbm_patterns.ll create mode 100644 test/CodeGen/X86/test-nofold.ll create mode 100644 test/CodeGen/X86/test-shrink-bug.ll create mode 100644 test/CodeGen/X86/test-shrink.ll create mode 100644 test/CodeGen/X86/testl-commute.ll create mode 100644 test/CodeGen/X86/this-return-64.ll create mode 100644 test/CodeGen/X86/tls-local-dynamic.ll create mode 100644 test/CodeGen/X86/tls-models.ll create mode 100644 test/CodeGen/X86/tls-pic.ll create mode 100644 test/CodeGen/X86/tls-pie.ll create mode 100644 test/CodeGen/X86/tls.ll create mode 100644 test/CodeGen/X86/tlv-1.ll create mode 100644 test/CodeGen/X86/tlv-2.ll create mode 100644 test/CodeGen/X86/tlv-3.ll create mode 100644 test/CodeGen/X86/trap.ll create mode 100644 test/CodeGen/X86/trunc-ext-ld-st.ll create mode 100644 test/CodeGen/X86/trunc-to-bool.ll create mode 100644 test/CodeGen/X86/twoaddr-coalesce-2.ll create mode 100644 test/CodeGen/X86/twoaddr-coalesce.ll create mode 100644 test/CodeGen/X86/twoaddr-lea.ll create mode 100644 test/CodeGen/X86/twoaddr-pass-sink.ll create mode 100644 test/CodeGen/X86/twoaddr-sink-terminator.ll create mode 100644 test/CodeGen/X86/uint64-to-float.ll create mode 100644 test/CodeGen/X86/uint_to_fp-2.ll create mode 100644 test/CodeGen/X86/uint_to_fp.ll create mode 100644 test/CodeGen/X86/umul-with-carry.ll create mode 100644 test/CodeGen/X86/umul-with-overflow.ll create mode 100644 test/CodeGen/X86/unaligned-load.ll create mode 100644 test/CodeGen/X86/unaligned-spill-folding.ll create mode 100644 test/CodeGen/X86/undef-label.ll create mode 100644 test/CodeGen/X86/unknown-location.ll create mode 100644 test/CodeGen/X86/unreachable-loop-sinking.ll create mode 100644 test/CodeGen/X86/unwind-init.ll create mode 100644 test/CodeGen/X86/unwindraise.ll create mode 100644 test/CodeGen/X86/urem-i8-constant.ll create mode 100644 test/CodeGen/X86/use-add-flags.ll create mode 100644 test/CodeGen/X86/utf16-cfstrings.ll create mode 100644 test/CodeGen/X86/utf8.ll create mode 100644 test/CodeGen/X86/v-binop-widen.ll create mode 100644 test/CodeGen/X86/v-binop-widen2.ll create mode 100644 test/CodeGen/X86/v2f32.ll create mode 100644 test/CodeGen/X86/v4f32-immediate.ll create mode 100644 test/CodeGen/X86/v4i32load-crash.ll create mode 100644 test/CodeGen/X86/v8i1-masks.ll create mode 100644 test/CodeGen/X86/vaargs.ll create mode 100644 test/CodeGen/X86/vararg_tailcall.ll create mode 100644 test/CodeGen/X86/variable-sized-darwin-bzero.ll create mode 100644 test/CodeGen/X86/variadic-node-pic.ll create mode 100644 test/CodeGen/X86/vastart-defs-eflags.ll create mode 100644 test/CodeGen/X86/vec-sign.ll create mode 100644 test/CodeGen/X86/vec-trunc-store.ll create mode 100644 test/CodeGen/X86/vec_add.ll create mode 100644 test/CodeGen/X86/vec_align.ll create mode 100644 test/CodeGen/X86/vec_align_i256.ll create mode 100644 test/CodeGen/X86/vec_anyext.ll create mode 100644 test/CodeGen/X86/vec_call.ll create mode 100644 test/CodeGen/X86/vec_cast.ll create mode 100644 test/CodeGen/X86/vec_cast2.ll create mode 100644 test/CodeGen/X86/vec_clear.ll create mode 100644 test/CodeGen/X86/vec_compare-2.ll create mode 100644 test/CodeGen/X86/vec_compare-sse4.ll create mode 100644 test/CodeGen/X86/vec_compare.ll create mode 100644 test/CodeGen/X86/vec_ctbits.ll create mode 100644 test/CodeGen/X86/vec_ext_inreg.ll create mode 100644 test/CodeGen/X86/vec_extract-sse4.ll create mode 100644 test/CodeGen/X86/vec_extract.ll create mode 100644 test/CodeGen/X86/vec_fabs.ll create mode 100644 test/CodeGen/X86/vec_floor.ll create mode 100644 test/CodeGen/X86/vec_fneg.ll create mode 100644 test/CodeGen/X86/vec_fpext.ll create mode 100644 test/CodeGen/X86/vec_i64.ll create mode 100644 test/CodeGen/X86/vec_ins_extract-1.ll create mode 100644 test/CodeGen/X86/vec_ins_extract.ll create mode 100644 test/CodeGen/X86/vec_insert-2.ll create mode 100644 test/CodeGen/X86/vec_insert-3.ll create mode 100644 test/CodeGen/X86/vec_insert-4.ll create mode 100644 test/CodeGen/X86/vec_insert-5.ll create mode 100644 test/CodeGen/X86/vec_insert-6.ll create mode 100644 test/CodeGen/X86/vec_insert-7.ll create mode 100644 test/CodeGen/X86/vec_insert-8.ll create mode 100644 test/CodeGen/X86/vec_insert-9.ll create mode 100644 test/CodeGen/X86/vec_insert.ll create mode 100644 test/CodeGen/X86/vec_loadsingles.ll create mode 100644 test/CodeGen/X86/vec_logical.ll create mode 100644 test/CodeGen/X86/vec_return.ll create mode 100644 test/CodeGen/X86/vec_round.ll create mode 100644 test/CodeGen/X86/vec_sdiv_to_shift.ll create mode 100644 test/CodeGen/X86/vec_set-2.ll create mode 100644 test/CodeGen/X86/vec_set-3.ll create mode 100644 test/CodeGen/X86/vec_set-4.ll create mode 100644 test/CodeGen/X86/vec_set-5.ll create mode 100644 test/CodeGen/X86/vec_set-6.ll create mode 100644 test/CodeGen/X86/vec_set-7.ll create mode 100644 test/CodeGen/X86/vec_set-8.ll create mode 100644 test/CodeGen/X86/vec_set-9.ll create mode 100644 test/CodeGen/X86/vec_set-A.ll create mode 100644 test/CodeGen/X86/vec_set-B.ll create mode 100644 test/CodeGen/X86/vec_set-C.ll create mode 100644 test/CodeGen/X86/vec_set-D.ll create mode 100644 test/CodeGen/X86/vec_set-E.ll create mode 100644 test/CodeGen/X86/vec_set-F.ll create mode 100644 test/CodeGen/X86/vec_set-G.ll create mode 100644 test/CodeGen/X86/vec_set-H.ll create mode 100644 test/CodeGen/X86/vec_set-I.ll create mode 100644 test/CodeGen/X86/vec_set-J.ll create mode 100644 test/CodeGen/X86/vec_set.ll create mode 100644 test/CodeGen/X86/vec_setcc.ll create mode 100644 test/CodeGen/X86/vec_sext.ll create mode 100644 test/CodeGen/X86/vec_shift.ll create mode 100644 test/CodeGen/X86/vec_shift2.ll create mode 100644 test/CodeGen/X86/vec_shift3.ll create mode 100644 test/CodeGen/X86/vec_shift4.ll create mode 100644 test/CodeGen/X86/vec_shuffle-11.ll create mode 100644 test/CodeGen/X86/vec_shuffle-14.ll create mode 100644 test/CodeGen/X86/vec_shuffle-15.ll create mode 100644 test/CodeGen/X86/vec_shuffle-16.ll create mode 100644 test/CodeGen/X86/vec_shuffle-17.ll create mode 100644 test/CodeGen/X86/vec_shuffle-18.ll create mode 100644 test/CodeGen/X86/vec_shuffle-19.ll create mode 100644 test/CodeGen/X86/vec_shuffle-20.ll create mode 100644 test/CodeGen/X86/vec_shuffle-22.ll create mode 100644 test/CodeGen/X86/vec_shuffle-23.ll create mode 100644 test/CodeGen/X86/vec_shuffle-24.ll create mode 100644 test/CodeGen/X86/vec_shuffle-25.ll create mode 100644 test/CodeGen/X86/vec_shuffle-26.ll create mode 100644 test/CodeGen/X86/vec_shuffle-27.ll create mode 100644 test/CodeGen/X86/vec_shuffle-28.ll create mode 100644 test/CodeGen/X86/vec_shuffle-30.ll create mode 100644 test/CodeGen/X86/vec_shuffle-31.ll create mode 100644 test/CodeGen/X86/vec_shuffle-34.ll create mode 100644 test/CodeGen/X86/vec_shuffle-35.ll create mode 100644 test/CodeGen/X86/vec_shuffle-36.ll create mode 100644 test/CodeGen/X86/vec_shuffle-37.ll create mode 100644 test/CodeGen/X86/vec_shuffle-38.ll create mode 100644 test/CodeGen/X86/vec_shuffle-39.ll create mode 100644 test/CodeGen/X86/vec_shuffle.ll create mode 100644 test/CodeGen/X86/vec_splat-2.ll create mode 100644 test/CodeGen/X86/vec_splat-3.ll create mode 100644 test/CodeGen/X86/vec_splat.ll create mode 100644 test/CodeGen/X86/vec_split.ll create mode 100644 test/CodeGen/X86/vec_ss_load_fold.ll create mode 100644 test/CodeGen/X86/vec_udiv_to_shift.ll create mode 100644 test/CodeGen/X86/vec_uint_to_fp.ll create mode 100644 test/CodeGen/X86/vec_zero-2.ll create mode 100644 test/CodeGen/X86/vec_zero.ll create mode 100644 test/CodeGen/X86/vec_zero_cse.ll create mode 100644 test/CodeGen/X86/vec_zext.ll create mode 100644 test/CodeGen/X86/vector-gep.ll create mode 100644 test/CodeGen/X86/vector-intrinsics.ll create mode 100644 test/CodeGen/X86/vector-rem.ll create mode 100644 test/CodeGen/X86/vector-variable-idx.ll create mode 100644 test/CodeGen/X86/vector-variable-idx2.ll create mode 100644 test/CodeGen/X86/vector.ll create mode 100644 test/CodeGen/X86/vfcmp.ll create mode 100644 test/CodeGen/X86/viabs.ll create mode 100644 test/CodeGen/X86/visibility.ll create mode 100644 test/CodeGen/X86/visibility2.ll create mode 100644 test/CodeGen/X86/volatile.ll create mode 100644 test/CodeGen/X86/vortex-bug.ll create mode 100644 test/CodeGen/X86/vselect-minmax.ll create mode 100644 test/CodeGen/X86/vshift-1.ll create mode 100644 test/CodeGen/X86/vshift-2.ll create mode 100644 test/CodeGen/X86/vshift-3.ll create mode 100644 test/CodeGen/X86/vshift-4.ll create mode 100644 test/CodeGen/X86/vshift-5.ll create mode 100644 test/CodeGen/X86/vshift_scalar.ll create mode 100644 test/CodeGen/X86/vshift_split.ll create mode 100644 test/CodeGen/X86/vshift_split2.ll create mode 100644 test/CodeGen/X86/vsplit-and.ll create mode 100644 test/CodeGen/X86/warn-stack.ll create mode 100644 test/CodeGen/X86/weak.ll create mode 100644 test/CodeGen/X86/weak_def_can_be_hidden.ll create mode 100644 test/CodeGen/X86/wide-fma-contraction.ll create mode 100644 test/CodeGen/X86/wide-integer-fold.ll create mode 100644 test/CodeGen/X86/widen_arith-1.ll create mode 100644 test/CodeGen/X86/widen_arith-2.ll create mode 100644 test/CodeGen/X86/widen_arith-3.ll create mode 100644 test/CodeGen/X86/widen_arith-4.ll create mode 100644 test/CodeGen/X86/widen_arith-5.ll create mode 100644 test/CodeGen/X86/widen_arith-6.ll create mode 100644 test/CodeGen/X86/widen_cast-1.ll create mode 100644 test/CodeGen/X86/widen_cast-2.ll create mode 100644 test/CodeGen/X86/widen_cast-3.ll create mode 100644 test/CodeGen/X86/widen_cast-4.ll create mode 100644 test/CodeGen/X86/widen_cast-5.ll create mode 100644 test/CodeGen/X86/widen_cast-6.ll create mode 100644 test/CodeGen/X86/widen_conv-1.ll create mode 100644 test/CodeGen/X86/widen_conv-2.ll create mode 100644 test/CodeGen/X86/widen_conv-3.ll create mode 100644 test/CodeGen/X86/widen_conv-4.ll create mode 100644 test/CodeGen/X86/widen_extract-1.ll create mode 100644 test/CodeGen/X86/widen_load-0.ll create mode 100644 test/CodeGen/X86/widen_load-1.ll create mode 100644 test/CodeGen/X86/widen_load-2.ll create mode 100644 test/CodeGen/X86/widen_shuffle-1.ll create mode 100644 test/CodeGen/X86/win32_sret.ll create mode 100644 test/CodeGen/X86/win64_alloca_dynalloca.ll create mode 100644 test/CodeGen/X86/win64_params.ll create mode 100644 test/CodeGen/X86/win64_vararg.ll create mode 100644 test/CodeGen/X86/win_chkstk.ll create mode 100644 test/CodeGen/X86/win_ftol2.ll create mode 100644 test/CodeGen/X86/x86-64-and-mask.ll create mode 100644 test/CodeGen/X86/x86-64-arg.ll create mode 100644 test/CodeGen/X86/x86-64-asm.ll create mode 100644 test/CodeGen/X86/x86-64-dead-stack-adjust.ll create mode 100644 test/CodeGen/X86/x86-64-disp.ll create mode 100644 test/CodeGen/X86/x86-64-extend-shift.ll create mode 100644 test/CodeGen/X86/x86-64-frameaddr.ll create mode 100644 test/CodeGen/X86/x86-64-gv-offset.ll create mode 100644 test/CodeGen/X86/x86-64-jumps.ll create mode 100644 test/CodeGen/X86/x86-64-mem.ll create mode 100644 test/CodeGen/X86/x86-64-pic-1.ll create mode 100644 test/CodeGen/X86/x86-64-pic-10.ll create mode 100644 test/CodeGen/X86/x86-64-pic-11.ll create mode 100644 test/CodeGen/X86/x86-64-pic-2.ll create mode 100644 test/CodeGen/X86/x86-64-pic-3.ll create mode 100644 test/CodeGen/X86/x86-64-pic-4.ll create mode 100644 test/CodeGen/X86/x86-64-pic-5.ll create mode 100644 test/CodeGen/X86/x86-64-pic-6.ll create mode 100644 test/CodeGen/X86/x86-64-pic-7.ll create mode 100644 test/CodeGen/X86/x86-64-pic-8.ll create mode 100644 test/CodeGen/X86/x86-64-pic-9.ll create mode 100644 test/CodeGen/X86/x86-64-psub.ll create mode 100644 test/CodeGen/X86/x86-64-ptr-arg-simple.ll create mode 100644 test/CodeGen/X86/x86-64-ret0.ll create mode 100644 test/CodeGen/X86/x86-64-shortint.ll create mode 100644 test/CodeGen/X86/x86-64-sret-return.ll create mode 100644 test/CodeGen/X86/x86-64-tls-1.ll create mode 100644 test/CodeGen/X86/x86-64-varargs.ll create mode 100644 test/CodeGen/X86/x86-frameaddr.ll create mode 100644 test/CodeGen/X86/x86-frameaddr2.ll create mode 100644 test/CodeGen/X86/x86-shifts.ll create mode 100644 test/CodeGen/X86/x86-store-gv-addr.ll create mode 100644 test/CodeGen/X86/x86_64-mul-by-const.ll create mode 100644 test/CodeGen/X86/xmm-r64.ll create mode 100644 test/CodeGen/X86/xmulo.ll create mode 100644 test/CodeGen/X86/xop-intrinsics-x86_64.ll create mode 100644 test/CodeGen/X86/xor-icmp.ll create mode 100644 test/CodeGen/X86/xor.ll create mode 100644 test/CodeGen/X86/xtest.ll create mode 100644 test/CodeGen/X86/zero-remat.ll create mode 100644 test/CodeGen/X86/zext-extract_subreg.ll create mode 100644 test/CodeGen/X86/zext-fold.ll create mode 100644 test/CodeGen/X86/zext-inreg-0.ll create mode 100644 test/CodeGen/X86/zext-inreg-1.ll create mode 100644 test/CodeGen/X86/zext-sext.ll create mode 100644 test/CodeGen/X86/zext-shl.ll create mode 100644 test/CodeGen/X86/zext-trunc.ll create mode 100644 test/CodeGen/XCore/2008-11-17-Shl64.ll create mode 100644 test/CodeGen/XCore/2009-01-08-Crash.ll create mode 100644 test/CodeGen/XCore/2009-01-14-Remat-Crash.ll create mode 100644 test/CodeGen/XCore/2009-03-27-v2f64-param.ll create mode 100644 test/CodeGen/XCore/2009-07-15-store192.ll create mode 100644 test/CodeGen/XCore/2010-02-25-LSR-Crash.ll create mode 100644 test/CodeGen/XCore/2011-01-31-DAGCombineBug.ll create mode 100644 test/CodeGen/XCore/2011-08-01-DynamicAllocBug.ll create mode 100644 test/CodeGen/XCore/DbgValueOtherTargets.test create mode 100644 test/CodeGen/XCore/addsub64.ll create mode 100644 test/CodeGen/XCore/aliases.ll create mode 100644 test/CodeGen/XCore/alignment.ll create mode 100644 test/CodeGen/XCore/ashr.ll create mode 100644 test/CodeGen/XCore/atomic.ll create mode 100644 test/CodeGen/XCore/basictest.ll create mode 100644 test/CodeGen/XCore/bigstructret.ll create mode 100644 test/CodeGen/XCore/byVal.ll create mode 100644 test/CodeGen/XCore/constants.ll create mode 100644 test/CodeGen/XCore/epilogue_prologue.ll create mode 100644 test/CodeGen/XCore/events.ll create mode 100644 test/CodeGen/XCore/exception.ll create mode 100644 test/CodeGen/XCore/float-intrinsics.ll create mode 100644 test/CodeGen/XCore/fneg.ll create mode 100644 test/CodeGen/XCore/getid.ll create mode 100644 test/CodeGen/XCore/globals.ll create mode 100644 test/CodeGen/XCore/indirectbr.ll create mode 100644 test/CodeGen/XCore/inline-asm.ll create mode 100644 test/CodeGen/XCore/ladd_lsub_combine.ll create mode 100644 test/CodeGen/XCore/licm-ldwcp.ll create mode 100644 test/CodeGen/XCore/linkage.ll create mode 100644 test/CodeGen/XCore/lit.local.cfg create mode 100644 test/CodeGen/XCore/load.ll create mode 100644 test/CodeGen/XCore/misc-intrinsics.ll create mode 100644 test/CodeGen/XCore/mkmsk.ll create mode 100644 test/CodeGen/XCore/mul64.ll create mode 100644 test/CodeGen/XCore/offset_folding.ll create mode 100644 test/CodeGen/XCore/private.ll create mode 100644 test/CodeGen/XCore/ps-intrinsics.ll create mode 100644 test/CodeGen/XCore/resources.ll create mode 100644 test/CodeGen/XCore/scavenging.ll create mode 100644 test/CodeGen/XCore/sext.ll create mode 100644 test/CodeGen/XCore/shedulingPreference.ll create mode 100644 test/CodeGen/XCore/sr-intrinsics.ll create mode 100644 test/CodeGen/XCore/store.ll create mode 100644 test/CodeGen/XCore/switch.ll create mode 100644 test/CodeGen/XCore/switch_long.ll create mode 100644 test/CodeGen/XCore/threads.ll create mode 100644 test/CodeGen/XCore/tls.ll create mode 100644 test/CodeGen/XCore/trampoline.ll create mode 100644 test/CodeGen/XCore/trap.ll create mode 100644 test/CodeGen/XCore/unaligned_load.ll create mode 100644 test/CodeGen/XCore/unaligned_store.ll create mode 100644 test/CodeGen/XCore/unaligned_store_combine.ll create mode 100644 test/CodeGen/XCore/varargs.ll create mode 100644 test/CodeGen/XCore/zext.ll create mode 100644 test/CodeGen/XCore/zextfree.ll create mode 100644 test/DebugInfo/2009-10-16-Phi.ll create mode 100644 test/DebugInfo/2009-11-03-InsertExtractValue.ll create mode 100644 test/DebugInfo/2009-11-05-DeadGlobalVariable.ll create mode 100644 test/DebugInfo/2009-11-06-NamelessGlobalVariable.ll create mode 100644 test/DebugInfo/2009-11-10-CurrentFn.ll create mode 100644 test/DebugInfo/2010-01-05-DbgScope.ll create mode 100644 test/DebugInfo/2010-01-19-DbgScope.ll create mode 100644 test/DebugInfo/2010-03-12-llc-crash.ll create mode 100644 test/DebugInfo/2010-03-19-DbgDeclare.ll create mode 100644 test/DebugInfo/2010-03-24-MemberFn.ll create mode 100644 test/DebugInfo/2010-03-30-InvalidDbgInfoCrash.ll create mode 100644 test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll create mode 100644 test/DebugInfo/2010-04-19-FramePtr.ll create mode 100644 test/DebugInfo/2010-05-03-DisableFramePtr.ll create mode 100644 test/DebugInfo/2010-05-03-OriginDIE.ll create mode 100644 test/DebugInfo/2010-05-10-MultipleCU.ll create mode 100644 test/DebugInfo/2010-06-29-InlinedFnLocalVar.ll create mode 100644 test/DebugInfo/2010-07-19-Crash.ll create mode 100644 test/DebugInfo/2010-10-01-crash.ll create mode 100644 test/DebugInfo/AArch64/cfi-frame.ll create mode 100644 test/DebugInfo/AArch64/dwarfdump.ll create mode 100644 test/DebugInfo/AArch64/eh_frame.s create mode 100644 test/DebugInfo/AArch64/eh_frame_personality.ll create mode 100644 test/DebugInfo/AArch64/lit.local.cfg create mode 100644 test/DebugInfo/AArch64/variable-loc.ll create mode 100644 test/DebugInfo/ARM/PR16736.ll create mode 100644 test/DebugInfo/ARM/lit.local.cfg create mode 100644 test/DebugInfo/ARM/lowerbdgdeclare_vla.ll create mode 100644 test/DebugInfo/ARM/selectiondag-deadcode.ll create mode 100644 test/DebugInfo/Inputs/dwarfdump-inl-test.cc create mode 100755 test/DebugInfo/Inputs/dwarfdump-inl-test.elf-x86-64 create mode 100644 test/DebugInfo/Inputs/dwarfdump-inl-test.h create mode 100755 test/DebugInfo/Inputs/dwarfdump-inl-test.high_pc.elf-x86-64 create mode 100644 test/DebugInfo/Inputs/dwarfdump-pubnames.cc create mode 100644 test/DebugInfo/Inputs/dwarfdump-pubnames.elf-x86-64 create mode 100644 test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.c create mode 100644 test/DebugInfo/Inputs/dwarfdump-test-32bit.elf.o create mode 100644 test/DebugInfo/Inputs/dwarfdump-test-loc-list-32bit.elf.cpp create mode 100644 test/DebugInfo/Inputs/dwarfdump-test-loc-list-32bit.elf.o create mode 100644 test/DebugInfo/Inputs/dwarfdump-test-zlib.cc create mode 100755 test/DebugInfo/Inputs/dwarfdump-test-zlib.elf-x86-64 create mode 100644 test/DebugInfo/Inputs/dwarfdump-test.cc create mode 100755 test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64 create mode 100755 test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64.debuglink create mode 100644 test/DebugInfo/Inputs/dwarfdump-test2-helper.cc create mode 100644 test/DebugInfo/Inputs/dwarfdump-test2-main.cc create mode 100755 test/DebugInfo/Inputs/dwarfdump-test2.elf-x86-64 create mode 100644 test/DebugInfo/Inputs/dwarfdump-test3-decl.h create mode 100644 test/DebugInfo/Inputs/dwarfdump-test3-decl2.h create mode 100644 test/DebugInfo/Inputs/dwarfdump-test3.cc create mode 100755 test/DebugInfo/Inputs/dwarfdump-test3.elf-x86-64 space create mode 100644 test/DebugInfo/Inputs/dwarfdump-test4-decl.h create mode 100644 test/DebugInfo/Inputs/dwarfdump-test4-part1.cc create mode 100644 test/DebugInfo/Inputs/dwarfdump-test4-part2.cc create mode 100755 test/DebugInfo/Inputs/dwarfdump-test4.elf-x86-64 create mode 100644 test/DebugInfo/Inputs/dwarfdump-type-units.cc create mode 100644 test/DebugInfo/Inputs/dwarfdump-type-units.elf-x86-64 create mode 100755 test/DebugInfo/Inputs/macho-universal create mode 100644 test/DebugInfo/Inputs/macho-universal.cc create mode 100644 test/DebugInfo/Inputs/test-inline.o create mode 100644 test/DebugInfo/Inputs/test-parameters.o create mode 100644 test/DebugInfo/PowerPC/lit.local.cfg create mode 100644 test/DebugInfo/PowerPC/tls-fission.ll create mode 100644 test/DebugInfo/PowerPC/tls.ll create mode 100644 test/DebugInfo/SystemZ/eh_frame.s create mode 100644 test/DebugInfo/SystemZ/eh_frame_personality.ll create mode 100644 test/DebugInfo/SystemZ/eh_frame_personality.s create mode 100644 test/DebugInfo/SystemZ/lit.local.cfg create mode 100644 test/DebugInfo/SystemZ/variable-loc.ll create mode 100644 test/DebugInfo/SystemZ/variable-loc.s create mode 100644 test/DebugInfo/X86/2010-04-13-PubType.ll create mode 100644 test/DebugInfo/X86/2010-08-10-DbgConstant.ll create mode 100644 test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll create mode 100644 test/DebugInfo/X86/2011-12-16-BadStructRef.ll create mode 100644 test/DebugInfo/X86/DW_AT_byte_size.ll create mode 100644 test/DebugInfo/X86/DW_AT_location-reference.ll create mode 100644 test/DebugInfo/X86/DW_AT_object_pointer.ll create mode 100644 test/DebugInfo/X86/DW_AT_specification.ll create mode 100644 test/DebugInfo/X86/DW_AT_stmt_list_sec_offset.ll create mode 100644 test/DebugInfo/X86/DW_TAG_friend.ll create mode 100644 test/DebugInfo/X86/aligned_stack_var.ll create mode 100644 test/DebugInfo/X86/arguments.ll create mode 100644 test/DebugInfo/X86/block-capture.ll create mode 100644 test/DebugInfo/X86/byvalstruct.ll create mode 100644 test/DebugInfo/X86/coff_relative_names.ll create mode 100644 test/DebugInfo/X86/concrete_out_of_line.ll create mode 100644 test/DebugInfo/X86/data_member_location.ll create mode 100644 test/DebugInfo/X86/dbg-at-specficiation.ll create mode 100644 test/DebugInfo/X86/dbg-byval-parameter.ll create mode 100644 test/DebugInfo/X86/dbg-const-int.ll create mode 100644 test/DebugInfo/X86/dbg-const.ll create mode 100644 test/DebugInfo/X86/dbg-declare-arg.ll create mode 100644 test/DebugInfo/X86/dbg-declare.ll create mode 100644 test/DebugInfo/X86/dbg-file-name.ll create mode 100644 test/DebugInfo/X86/dbg-i128-const.ll create mode 100644 test/DebugInfo/X86/dbg-large-unsigned-const.ll create mode 100644 test/DebugInfo/X86/dbg-merge-loc-entry.ll create mode 100644 test/DebugInfo/X86/dbg-prolog-end.ll create mode 100644 test/DebugInfo/X86/dbg-subrange.ll create mode 100644 test/DebugInfo/X86/dbg-value-dag-combine.ll create mode 100644 test/DebugInfo/X86/dbg-value-inlined-parameter.ll create mode 100644 test/DebugInfo/X86/dbg-value-isel.ll create mode 100644 test/DebugInfo/X86/dbg-value-location.ll create mode 100644 test/DebugInfo/X86/dbg-value-range.ll create mode 100644 test/DebugInfo/X86/dbg-value-terminator.ll create mode 100644 test/DebugInfo/X86/dbg_value_direct.ll create mode 100644 test/DebugInfo/X86/debug-info-block-captured-self.ll create mode 100644 test/DebugInfo/X86/debug-info-blocks.ll create mode 100644 test/DebugInfo/X86/debug-info-static-member.ll create mode 100644 test/DebugInfo/X86/debug_frame.ll create mode 100644 test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll create mode 100644 test/DebugInfo/X86/dwarf-aranges.ll create mode 100644 test/DebugInfo/X86/dwarf-public-names.ll create mode 100644 test/DebugInfo/X86/dwarf-pubnames-split.ll create mode 100644 test/DebugInfo/X86/earlydup-crash.ll create mode 100644 test/DebugInfo/X86/eh_symbol.ll create mode 100644 test/DebugInfo/X86/elf-names.ll create mode 100644 test/DebugInfo/X86/empty-and-one-elem-array.ll create mode 100644 test/DebugInfo/X86/empty-array.ll create mode 100644 test/DebugInfo/X86/ending-run.ll create mode 100644 test/DebugInfo/X86/enum-class.ll create mode 100644 test/DebugInfo/X86/enum-fwd-decl.ll create mode 100644 test/DebugInfo/X86/fission-cu.ll create mode 100644 test/DebugInfo/X86/fission-hash.ll create mode 100644 test/DebugInfo/X86/fission-ranges.ll create mode 100644 test/DebugInfo/X86/generate-odr-hash.ll create mode 100644 test/DebugInfo/X86/gnu-public-names-empty.ll create mode 100644 test/DebugInfo/X86/gnu-public-names.ll create mode 100644 test/DebugInfo/X86/instcombine-instrinsics.ll create mode 100644 test/DebugInfo/X86/line-info.ll create mode 100644 test/DebugInfo/X86/linkage-name.ll create mode 100644 test/DebugInfo/X86/lit.local.cfg create mode 100644 test/DebugInfo/X86/low-pc-cu.ll create mode 100644 test/DebugInfo/X86/main-file-name.s create mode 100644 test/DebugInfo/X86/misched-dbg-value.ll create mode 100644 test/DebugInfo/X86/multiple-aranges.ll create mode 100644 test/DebugInfo/X86/multiple-at-const-val.ll create mode 100644 test/DebugInfo/X86/nondefault-subrange-array.ll create mode 100644 test/DebugInfo/X86/objc-fwd-decl.ll create mode 100644 test/DebugInfo/X86/op_deref.ll create mode 100644 test/DebugInfo/X86/parameters.ll create mode 100644 test/DebugInfo/X86/pointer-type-size.ll create mode 100644 test/DebugInfo/X86/pr11300.ll create mode 100644 test/DebugInfo/X86/pr12831.ll create mode 100644 test/DebugInfo/X86/pr13303.ll create mode 100644 test/DebugInfo/X86/pr9951.ll create mode 100644 test/DebugInfo/X86/prologue-stack.ll create mode 100644 test/DebugInfo/X86/ref_addr_relocation.ll create mode 100644 test/DebugInfo/X86/reference-argument.ll create mode 100644 test/DebugInfo/X86/rvalue-ref.ll create mode 100644 test/DebugInfo/X86/stmt-list-multiple-compile-units.ll create mode 100644 test/DebugInfo/X86/stmt-list.ll create mode 100644 test/DebugInfo/X86/stringpool.ll create mode 100644 test/DebugInfo/X86/struct-loc.ll create mode 100644 test/DebugInfo/X86/subrange-type.ll create mode 100644 test/DebugInfo/X86/subreg.ll create mode 100644 test/DebugInfo/X86/template.ll create mode 100644 test/DebugInfo/X86/tls-fission.ll create mode 100644 test/DebugInfo/X86/tls.ll create mode 100644 test/DebugInfo/X86/union-template.ll create mode 100644 test/DebugInfo/X86/vector.ll create mode 100644 test/DebugInfo/X86/vla.ll create mode 100644 test/DebugInfo/array.ll create mode 100644 test/DebugInfo/bug_null_debuginfo.ll create mode 100644 test/DebugInfo/debuginfofinder-multiple-cu.ll create mode 100644 test/DebugInfo/debuglineinfo.test create mode 100644 test/DebugInfo/dwarf-public-names.ll create mode 100644 test/DebugInfo/dwarfdump-debug-frame-simple.test create mode 100644 test/DebugInfo/dwarfdump-debug-loc-simple.test create mode 100644 test/DebugInfo/dwarfdump-dump-flags.test create mode 100644 test/DebugInfo/dwarfdump-inlining.test create mode 100644 test/DebugInfo/dwarfdump-pubnames.test create mode 100644 test/DebugInfo/dwarfdump-test.test create mode 100644 test/DebugInfo/dwarfdump-type-units.test create mode 100644 test/DebugInfo/dwarfdump-zlib.test create mode 100644 test/DebugInfo/enum.ll create mode 100644 test/DebugInfo/global.ll create mode 100644 test/DebugInfo/inheritance.ll create mode 100644 test/DebugInfo/inline-debug-info-multiret.ll create mode 100644 test/DebugInfo/inline-debug-info.ll create mode 100644 test/DebugInfo/inlined-arguments.ll create mode 100644 test/DebugInfo/inlined-vars.ll create mode 100644 test/DebugInfo/llvm-symbolizer.test create mode 100644 test/DebugInfo/member-order.ll create mode 100644 test/DebugInfo/member-pointers.ll create mode 100644 test/DebugInfo/namespace.ll create mode 100644 test/DebugInfo/template-recursive-void.ll create mode 100644 test/DebugInfo/tu-composite.ll create mode 100644 test/DebugInfo/tu-member-pointer.ll create mode 100644 test/DebugInfo/two-cus-from-same-file.ll create mode 100644 test/DebugInfo/version.ll create mode 100644 test/ExecutionEngine/2002-12-16-ArgTest.ll create mode 100644 test/ExecutionEngine/2003-01-04-ArgumentBug.ll create mode 100644 test/ExecutionEngine/2003-01-04-LoopTest.ll create mode 100644 test/ExecutionEngine/2003-01-04-PhiTest.ll create mode 100644 test/ExecutionEngine/2003-01-09-SARTest.ll create mode 100644 test/ExecutionEngine/2003-01-10-FUCOM.ll create mode 100644 test/ExecutionEngine/2003-01-15-AlignmentTest.ll create mode 100644 test/ExecutionEngine/2003-05-06-LivenessClobber.ll create mode 100644 test/ExecutionEngine/2003-05-07-ArgumentTest.ll create mode 100644 test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll create mode 100644 test/ExecutionEngine/2003-06-04-bzip2-bug.ll create mode 100644 test/ExecutionEngine/2003-06-05-PHIBug.ll create mode 100644 test/ExecutionEngine/2003-08-15-AllocaAssertion.ll create mode 100644 test/ExecutionEngine/2003-08-21-EnvironmentTest.ll create mode 100644 test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll create mode 100644 test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll create mode 100644 test/ExecutionEngine/2005-12-02-TailCallBug.ll create mode 100644 test/ExecutionEngine/2007-12-10-APIntLoadStore.ll create mode 100644 test/ExecutionEngine/2008-06-05-APInt-OverAShr.ll create mode 100644 test/ExecutionEngine/2010-01-15-UndefValue.ll create mode 100644 test/ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-01-04-ArgumentBug.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-01-04-LoopTest.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-01-04-PhiTest.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-01-09-SARTest.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-01-10-FUCOM.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-01-15-AlignmentTest.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-05-06-LivenessClobber.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-05-07-ArgumentTest.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-05-11-PHIRegAllocBug.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-06-04-bzip2-bug.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-06-05-PHIBug.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-08-15-AllocaAssertion.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-08-21-EnvironmentTest.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-08-23-RegisterAllocatePhysReg.ll create mode 100644 test/ExecutionEngine/MCJIT/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll create mode 100644 test/ExecutionEngine/MCJIT/2005-12-02-TailCallBug.ll create mode 100644 test/ExecutionEngine/MCJIT/2007-12-10-APIntLoadStore.ll create mode 100644 test/ExecutionEngine/MCJIT/2008-06-05-APInt-OverAShr.ll create mode 100644 test/ExecutionEngine/MCJIT/2010-01-15-UndefValue.ll create mode 100644 test/ExecutionEngine/MCJIT/2013-04-04-RelocAddend.ll create mode 100644 test/ExecutionEngine/MCJIT/Inputs/cross-module-b.ll create mode 100644 test/ExecutionEngine/MCJIT/Inputs/multi-module-b.ll create mode 100644 test/ExecutionEngine/MCJIT/Inputs/multi-module-c.ll create mode 100644 test/ExecutionEngine/MCJIT/Inputs/multi-module-eh-b.ll create mode 100644 test/ExecutionEngine/MCJIT/cross-module-a.ll create mode 100644 test/ExecutionEngine/MCJIT/cross-module-sm-pic-a.ll create mode 100644 test/ExecutionEngine/MCJIT/eh-lg-pic.ll create mode 100644 test/ExecutionEngine/MCJIT/eh-sm-pic.ll create mode 100644 test/ExecutionEngine/MCJIT/eh.ll create mode 100644 test/ExecutionEngine/MCJIT/fpbitcast.ll create mode 100644 test/ExecutionEngine/MCJIT/hello-sm-pic.ll create mode 100644 test/ExecutionEngine/MCJIT/hello.ll create mode 100644 test/ExecutionEngine/MCJIT/hello2.ll create mode 100644 test/ExecutionEngine/MCJIT/lit.local.cfg create mode 100644 test/ExecutionEngine/MCJIT/multi-module-a.ll create mode 100644 test/ExecutionEngine/MCJIT/multi-module-eh-a.ll create mode 100644 test/ExecutionEngine/MCJIT/multi-module-sm-pic-a.ll create mode 100644 test/ExecutionEngine/MCJIT/non-extern-addend.ll create mode 100644 test/ExecutionEngine/MCJIT/pr13727.ll create mode 100644 test/ExecutionEngine/MCJIT/remote/Inputs/cross-module-b.ll create mode 100644 test/ExecutionEngine/MCJIT/remote/Inputs/multi-module-b.ll create mode 100644 test/ExecutionEngine/MCJIT/remote/Inputs/multi-module-c.ll create mode 100644 test/ExecutionEngine/MCJIT/remote/cross-module-a.ll create mode 100644 test/ExecutionEngine/MCJIT/remote/cross-module-sm-pic-a.ll create mode 100644 test/ExecutionEngine/MCJIT/remote/lit.local.cfg create mode 100644 test/ExecutionEngine/MCJIT/remote/multi-module-a.ll create mode 100644 test/ExecutionEngine/MCJIT/remote/multi-module-sm-pic-a.ll create mode 100644 test/ExecutionEngine/MCJIT/remote/simpletest-remote.ll create mode 100644 test/ExecutionEngine/MCJIT/remote/stubs-remote.ll create mode 100644 test/ExecutionEngine/MCJIT/remote/stubs-sm-pic.ll create mode 100644 test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll create mode 100644 test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll create mode 100644 test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll create mode 100644 test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll create mode 100644 test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-sm-pic.ll create mode 100644 test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll create mode 100644 test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-sm-pic.ll create mode 100644 test/ExecutionEngine/MCJIT/simplesttest.ll create mode 100644 test/ExecutionEngine/MCJIT/simpletest.ll create mode 100644 test/ExecutionEngine/MCJIT/stubs-sm-pic.ll create mode 100644 test/ExecutionEngine/MCJIT/stubs.ll create mode 100644 test/ExecutionEngine/MCJIT/test-arith.ll create mode 100644 test/ExecutionEngine/MCJIT/test-branch.ll create mode 100644 test/ExecutionEngine/MCJIT/test-call-no-external-funcs.ll create mode 100644 test/ExecutionEngine/MCJIT/test-call.ll create mode 100644 test/ExecutionEngine/MCJIT/test-cast.ll create mode 100644 test/ExecutionEngine/MCJIT/test-common-symbols-alignment.ll create mode 100644 test/ExecutionEngine/MCJIT/test-common-symbols.ll create mode 100644 test/ExecutionEngine/MCJIT/test-constantexpr.ll create mode 100644 test/ExecutionEngine/MCJIT/test-data-align.ll create mode 100644 test/ExecutionEngine/MCJIT/test-fp-no-external-funcs.ll create mode 100644 test/ExecutionEngine/MCJIT/test-fp.ll create mode 100644 test/ExecutionEngine/MCJIT/test-global-ctors.ll create mode 100644 test/ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll create mode 100644 test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll create mode 100644 test/ExecutionEngine/MCJIT/test-global.ll create mode 100644 test/ExecutionEngine/MCJIT/test-loadstore.ll create mode 100644 test/ExecutionEngine/MCJIT/test-local.ll create mode 100644 test/ExecutionEngine/MCJIT/test-logical.ll create mode 100644 test/ExecutionEngine/MCJIT/test-loop.ll create mode 100644 test/ExecutionEngine/MCJIT/test-phi.ll create mode 100644 test/ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll create mode 100644 test/ExecutionEngine/MCJIT/test-ptr-reloc.ll create mode 100644 test/ExecutionEngine/MCJIT/test-ret.ll create mode 100644 test/ExecutionEngine/MCJIT/test-return.ll create mode 100644 test/ExecutionEngine/MCJIT/test-setcond-fp.ll create mode 100644 test/ExecutionEngine/MCJIT/test-setcond-int.ll create mode 100644 test/ExecutionEngine/MCJIT/test-shift.ll create mode 100644 test/ExecutionEngine/RuntimeDyld/Inputs/arm_secdiff_reloc.o create mode 100644 test/ExecutionEngine/RuntimeDyld/arm_secdiff_reloc.test create mode 100644 test/ExecutionEngine/fma3-jit.ll create mode 100644 test/ExecutionEngine/fpbitcast.ll create mode 100644 test/ExecutionEngine/hello.ll create mode 100644 test/ExecutionEngine/hello2.ll create mode 100644 test/ExecutionEngine/lit.local.cfg create mode 100644 test/ExecutionEngine/mov64zext32.ll create mode 100644 test/ExecutionEngine/simplesttest.ll create mode 100644 test/ExecutionEngine/simpletest.ll create mode 100644 test/ExecutionEngine/stubs.ll create mode 100644 test/ExecutionEngine/test-arith.ll create mode 100644 test/ExecutionEngine/test-branch.ll create mode 100644 test/ExecutionEngine/test-call-no-external-funcs.ll create mode 100644 test/ExecutionEngine/test-call.ll create mode 100644 test/ExecutionEngine/test-cast.ll create mode 100644 test/ExecutionEngine/test-common-symbols.ll create mode 100644 test/ExecutionEngine/test-constantexpr.ll create mode 100644 test/ExecutionEngine/test-fp-no-external-funcs.ll create mode 100644 test/ExecutionEngine/test-fp.ll create mode 100644 test/ExecutionEngine/test-global-init-nonzero.ll create mode 100644 test/ExecutionEngine/test-global.ll create mode 100644 test/ExecutionEngine/test-interp-vec-arithm_float.ll create mode 100644 test/ExecutionEngine/test-interp-vec-arithm_int.ll create mode 100644 test/ExecutionEngine/test-interp-vec-cast.ll create mode 100644 test/ExecutionEngine/test-interp-vec-insertelement.ll create mode 100644 test/ExecutionEngine/test-interp-vec-insertextractvalue.ll create mode 100644 test/ExecutionEngine/test-interp-vec-loadstore.ll create mode 100644 test/ExecutionEngine/test-interp-vec-logical.ll create mode 100644 test/ExecutionEngine/test-interp-vec-select.ll create mode 100644 test/ExecutionEngine/test-interp-vec-setcond-fp.ll create mode 100644 test/ExecutionEngine/test-interp-vec-setcond-int.ll create mode 100644 test/ExecutionEngine/test-interp-vec-shift.ll create mode 100644 test/ExecutionEngine/test-interp-vec-shuffle.ll create mode 100644 test/ExecutionEngine/test-loadstore.ll create mode 100644 test/ExecutionEngine/test-local.ll create mode 100644 test/ExecutionEngine/test-logical.ll create mode 100644 test/ExecutionEngine/test-loop.ll create mode 100644 test/ExecutionEngine/test-phi.ll create mode 100644 test/ExecutionEngine/test-ret.ll create mode 100644 test/ExecutionEngine/test-return.ll create mode 100644 test/ExecutionEngine/test-setcond-fp.ll create mode 100644 test/ExecutionEngine/test-setcond-int.ll create mode 100644 test/ExecutionEngine/test-shift.ll create mode 100644 test/Feature/NamedMDNode.ll create mode 100644 test/Feature/NamedMDNode2.ll create mode 100644 test/Feature/README.txt create mode 100644 test/Feature/aliases.ll create mode 100644 test/Feature/alignment.ll create mode 100644 test/Feature/attributes.ll create mode 100644 test/Feature/basictest.ll create mode 100644 test/Feature/callingconventions.ll create mode 100644 test/Feature/calltest.ll create mode 100644 test/Feature/casttest.ll create mode 100644 test/Feature/cfgstructures.ll create mode 100644 test/Feature/cold.ll create mode 100644 test/Feature/const_pv.ll create mode 100644 test/Feature/constexpr.ll create mode 100644 test/Feature/constpointer.ll create mode 100644 test/Feature/escaped_label.ll create mode 100644 test/Feature/exception.ll create mode 100644 test/Feature/float.ll create mode 100644 test/Feature/fold-fpcast.ll create mode 100644 test/Feature/forwardreftest.ll create mode 100644 test/Feature/global_pv.ll create mode 100644 test/Feature/global_section.ll create mode 100644 test/Feature/globalredefinition3.ll create mode 100644 test/Feature/globalvars.ll create mode 100644 test/Feature/indirectcall.ll create mode 100644 test/Feature/indirectcall2.ll create mode 100644 test/Feature/inlineasm.ll create mode 100644 test/Feature/instructions.ll create mode 100644 test/Feature/intrinsics.ll create mode 100644 test/Feature/linker_private_linkages.ll create mode 100644 test/Feature/load_module.ll create mode 100644 test/Feature/md_on_instruction.ll create mode 100644 test/Feature/memorymarkers.ll create mode 100644 test/Feature/metadata.ll create mode 100644 test/Feature/minsize_attr.ll create mode 100644 test/Feature/newcasts.ll create mode 100644 test/Feature/optnone.ll create mode 100644 test/Feature/packed.ll create mode 100644 test/Feature/packed_struct.ll create mode 100644 test/Feature/paramattrs.ll create mode 100644 test/Feature/ppcld.ll create mode 100644 test/Feature/prefixdata.ll create mode 100644 test/Feature/properties.ll create mode 100644 test/Feature/prototype.ll create mode 100644 test/Feature/recursivetype.ll create mode 100644 test/Feature/simplecalltest.ll create mode 100644 test/Feature/small.ll create mode 100644 test/Feature/smallest.ll create mode 100644 test/Feature/sparcld.ll create mode 100644 test/Feature/terminators.ll create mode 100644 test/Feature/testalloca.ll create mode 100644 test/Feature/testconstants.ll create mode 100644 test/Feature/testlogical.ll create mode 100644 test/Feature/testtype.ll create mode 100644 test/Feature/testvarargs.ll create mode 100644 test/Feature/undefined.ll create mode 100644 test/Feature/unreachable.ll create mode 100644 test/Feature/varargs.ll create mode 100644 test/Feature/varargs_new.ll create mode 100644 test/Feature/vector-cast-constant-exprs.ll create mode 100644 test/Feature/weak_constant.ll create mode 100644 test/Feature/weirdnames.ll create mode 100644 test/Feature/x86ld.ll create mode 100644 test/FileCheck/check-a-b-has-b.txt create mode 100644 test/FileCheck/check-b-a-has-b.txt create mode 100644 test/FileCheck/check-dag-multi-prefix-2.txt create mode 100644 test/FileCheck/check-dag-multi-prefix.txt create mode 100644 test/FileCheck/check-dag-substring-prefix.txt create mode 100644 test/FileCheck/check-dag-xfails.txt create mode 100644 test/FileCheck/check-dag.txt create mode 100644 test/FileCheck/check-label-dag-capture.txt create mode 100644 test/FileCheck/check-label-dag.txt create mode 100644 test/FileCheck/check-label.txt create mode 100644 test/FileCheck/check-multi-prefix-label.txt create mode 100644 test/FileCheck/check-multiple-prefixes-mixed.txt create mode 100644 test/FileCheck/check-multiple-prefixes-nomatch.txt create mode 100644 test/FileCheck/check-multiple-prefixes-substr.txt create mode 100644 test/FileCheck/check-not-diaginfo.txt create mode 100644 test/FileCheck/check-prefixes.txt create mode 100644 test/FileCheck/check-substring-multi-prefix-2.txt create mode 100644 test/FileCheck/check-substring-multi-prefix.txt create mode 100644 test/FileCheck/dos-style-eol.txt create mode 100644 test/FileCheck/first-character-match.txt create mode 100644 test/FileCheck/line-count-2.txt create mode 100644 test/FileCheck/line-count.txt create mode 100644 test/FileCheck/multiple-missing-prefixes.txt create mode 100644 test/FileCheck/next-no-match.txt create mode 100644 test/FileCheck/regex-brackets.txt create mode 100644 test/FileCheck/regex-no-match.txt create mode 100644 test/FileCheck/separate-multi-prefix.txt create mode 100644 test/FileCheck/simple-var-capture.txt create mode 100644 test/FileCheck/two-checks-for-same-match.txt create mode 100644 test/FileCheck/validate-check-prefix.txt create mode 100644 test/FileCheck/var-ref-same-line.txt create mode 100644 test/Instrumentation/AddressSanitizer/X86/bug_11395.ll create mode 100644 test/Instrumentation/AddressSanitizer/X86/lit.local.cfg create mode 100644 test/Instrumentation/AddressSanitizer/adaptive_global_redzones.ll create mode 100644 test/Instrumentation/AddressSanitizer/asan-vs-gvn.ll create mode 100644 test/Instrumentation/AddressSanitizer/basic.ll create mode 100644 test/Instrumentation/AddressSanitizer/coverage.ll create mode 100644 test/Instrumentation/AddressSanitizer/debug_info.ll create mode 100644 test/Instrumentation/AddressSanitizer/different_scale_and_offset.ll create mode 100644 test/Instrumentation/AddressSanitizer/do-not-instrument-internal-globals.ll create mode 100644 test/Instrumentation/AddressSanitizer/do-not-touch-odr-global.ll create mode 100644 test/Instrumentation/AddressSanitizer/do-not-touch-threadlocal.ll create mode 100644 test/Instrumentation/AddressSanitizer/instrument-no-return.ll create mode 100644 test/Instrumentation/AddressSanitizer/instrument_global.ll create mode 100644 test/Instrumentation/AddressSanitizer/instrument_initializer_metadata.ll create mode 100644 test/Instrumentation/AddressSanitizer/instrument_load_then_store.ll create mode 100644 test/Instrumentation/AddressSanitizer/keep-instrumented_functions.ll create mode 100644 test/Instrumentation/AddressSanitizer/lifetime-uar.ll create mode 100644 test/Instrumentation/AddressSanitizer/lifetime.ll create mode 100644 test/Instrumentation/AddressSanitizer/test64.ll create mode 100644 test/Instrumentation/BoundsChecking/many-trap.ll create mode 100644 test/Instrumentation/BoundsChecking/phi.ll create mode 100644 test/Instrumentation/BoundsChecking/simple-32.ll create mode 100644 test/Instrumentation/BoundsChecking/simple.ll create mode 100644 test/Instrumentation/DataFlowSanitizer/Inputs/abilist.txt create mode 100644 test/Instrumentation/DataFlowSanitizer/abilist.ll create mode 100644 test/Instrumentation/DataFlowSanitizer/args-unreachable-bb.ll create mode 100644 test/Instrumentation/DataFlowSanitizer/arith.ll create mode 100644 test/Instrumentation/DataFlowSanitizer/call.ll create mode 100644 test/Instrumentation/DataFlowSanitizer/debug-nonzero-labels.ll create mode 100644 test/Instrumentation/DataFlowSanitizer/load.ll create mode 100644 test/Instrumentation/DataFlowSanitizer/memset.ll create mode 100644 test/Instrumentation/DataFlowSanitizer/prefix-rename.ll create mode 100644 test/Instrumentation/DataFlowSanitizer/store.ll create mode 100644 test/Instrumentation/MemorySanitizer/X86/vararg.ll create mode 100644 test/Instrumentation/MemorySanitizer/atomics.ll create mode 100644 test/Instrumentation/MemorySanitizer/msan_basic.ll create mode 100644 test/Instrumentation/MemorySanitizer/return_from_main.ll create mode 100644 test/Instrumentation/MemorySanitizer/unreachable.ll create mode 100644 test/Instrumentation/MemorySanitizer/vector_cvt.ll create mode 100644 test/Instrumentation/MemorySanitizer/wrap_indirect_calls.ll create mode 100644 test/Instrumentation/ThreadSanitizer/atomic.ll create mode 100644 test/Instrumentation/ThreadSanitizer/no_sanitize_thread.ll create mode 100644 test/Instrumentation/ThreadSanitizer/read_before_write.ll create mode 100644 test/Instrumentation/ThreadSanitizer/read_from_global.ll create mode 100644 test/Instrumentation/ThreadSanitizer/tsan-vs-gvn.ll create mode 100644 test/Instrumentation/ThreadSanitizer/tsan_basic.ll create mode 100644 test/Instrumentation/ThreadSanitizer/vptr_read.ll create mode 100644 test/Instrumentation/ThreadSanitizer/vptr_update.ll create mode 100644 test/Integer/2007-01-19-TruncSext.ll create mode 100644 test/Integer/BitPacked.ll create mode 100644 test/Integer/basictest_bt.ll create mode 100644 test/Integer/constexpr_bt.ll create mode 100644 test/Integer/constpointer_bt.ll create mode 100644 test/Integer/fold-fpcast_bt.ll create mode 100644 test/Integer/instructions_bt.ll create mode 100644 test/Integer/newcasts_bt.ll create mode 100644 test/Integer/packed_bt.ll create mode 100644 test/Integer/packed_struct_bt.ll create mode 100644 test/Integer/properties_bt.ll create mode 100644 test/Integer/undefined_bt.ll create mode 100644 test/Integer/unreachable_bt.ll create mode 100644 test/JitListener/lit.local.cfg create mode 100644 test/JitListener/test-common-symbols.ll create mode 100644 test/JitListener/test-inline.ll create mode 100644 test/JitListener/test-parameters.ll create mode 100644 test/LTO/cfi_endproc.ll create mode 100644 test/LTO/linkonce_odr_func.ll create mode 100644 test/LTO/lit.local.cfg create mode 100644 test/LTO/runtime-library.ll create mode 100644 test/Linker/2002-07-17-GlobalFail.ll create mode 100644 test/Linker/2002-07-17-LinkTest2.ll create mode 100644 test/Linker/2002-08-20-ConstantExpr.ll create mode 100644 test/Linker/2003-01-30-LinkerRename.ll create mode 100644 test/Linker/2003-01-30-LinkerTypeRename.ll create mode 100644 test/Linker/2003-04-23-LinkOnceLost.ll create mode 100644 test/Linker/2003-04-26-NullPtrLinkProblem.ll create mode 100644 test/Linker/2003-05-15-TypeProblem.ll create mode 100644 test/Linker/2003-05-31-LinkerRename.ll create mode 100644 test/Linker/2003-06-02-TypeResolveProblem.ll create mode 100644 test/Linker/2003-06-02-TypeResolveProblem2.ll create mode 100644 test/Linker/2003-08-20-OpaqueTypeResolve.ll create mode 100644 test/Linker/2003-08-23-GlobalVarLinking.ll create mode 100644 test/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll create mode 100644 test/Linker/2003-08-24-InheritPtrSize.ll create mode 100644 test/Linker/2003-08-28-TypeResolvesGlobal.ll create mode 100644 test/Linker/2003-08-28-TypeResolvesGlobal2.ll create mode 100644 test/Linker/2003-08-28-TypeResolvesGlobal3.ll create mode 100644 test/Linker/2003-10-27-LinkOncePromote.ll create mode 100644 test/Linker/2003-11-18-TypeResolution.ll create mode 100644 test/Linker/2004-02-17-WeakStrongLinkage.ll create mode 100644 test/Linker/2004-05-07-TypeResolution1.ll create mode 100644 test/Linker/2004-05-07-TypeResolution2.ll create mode 100644 test/Linker/2004-12-03-DisagreeingType.ll create mode 100644 test/Linker/2005-02-12-ConstantGlobals-2.ll create mode 100644 test/Linker/2005-02-12-ConstantGlobals.ll create mode 100644 test/Linker/2005-12-06-AppendingZeroLengthArrays.ll create mode 100644 test/Linker/2006-01-19-ConstantPacked.ll create mode 100644 test/Linker/2006-06-15-GlobalVarAlignment.ll create mode 100644 test/Linker/2008-03-05-AliasReference.ll create mode 100644 test/Linker/2008-03-05-AliasReference2.ll create mode 100644 test/Linker/2008-03-07-DroppedSection_a.ll create mode 100644 test/Linker/2008-03-07-DroppedSection_b.ll create mode 100644 test/Linker/2008-06-13-LinkOnceRedefinition.ll create mode 100644 test/Linker/2008-06-26-AddressSpace.ll create mode 100644 test/Linker/2008-07-06-AliasFnDecl.ll create mode 100644 test/Linker/2008-07-06-AliasFnDecl2.ll create mode 100644 test/Linker/2008-07-06-AliasWeakDest.ll create mode 100644 test/Linker/2008-07-06-AliasWeakDest2.ll create mode 100644 test/Linker/2009-09-03-mdnode.ll create mode 100644 test/Linker/2009-09-03-mdnode2.ll create mode 100644 test/Linker/2011-08-04-DebugLoc.ll create mode 100644 test/Linker/2011-08-04-DebugLoc2.ll create mode 100644 test/Linker/2011-08-04-Metadata.ll create mode 100644 test/Linker/2011-08-04-Metadata2.ll create mode 100644 test/Linker/2011-08-18-unique-class-type.ll create mode 100644 test/Linker/2011-08-18-unique-class-type2.ll create mode 100644 test/Linker/2011-08-18-unique-debug-type.ll create mode 100644 test/Linker/2011-08-18-unique-debug-type2.ll create mode 100644 test/Linker/2011-08-22-ResolveAlias.ll create mode 100644 test/Linker/2011-08-22-ResolveAlias2.ll create mode 100644 test/Linker/AppendingLinkage.ll create mode 100644 test/Linker/AppendingLinkage2.ll create mode 100644 test/Linker/ConstantGlobals1.ll create mode 100644 test/Linker/ConstantGlobals2.ll create mode 100644 test/Linker/ConstantGlobals3.ll create mode 100644 test/Linker/DbgDeclare.ll create mode 100644 test/Linker/DbgDeclare2.ll create mode 100644 test/Linker/Inputs/PR11464.a.ll create mode 100644 test/Linker/Inputs/PR11464.b.ll create mode 100644 test/Linker/Inputs/PR8300.a.ll create mode 100644 test/Linker/Inputs/PR8300.b.ll create mode 100644 test/Linker/Inputs/basiclink.a.ll create mode 100644 test/Linker/Inputs/basiclink.b.ll create mode 100644 test/Linker/Inputs/linkage.a.ll create mode 100644 test/Linker/Inputs/linkage.b.ll create mode 100644 test/Linker/Inputs/type-unique-inheritance-a.ll create mode 100644 test/Linker/Inputs/type-unique-inheritance-b.ll create mode 100644 test/Linker/Inputs/type-unique-simple2-a.ll create mode 100644 test/Linker/Inputs/type-unique-simple2-b.ll create mode 100644 test/Linker/LinkOnce.ll create mode 100644 test/Linker/PR8300.ll create mode 100644 test/Linker/available_externally_a.ll create mode 100644 test/Linker/available_externally_b.ll create mode 100644 test/Linker/basiclink.ll create mode 100644 test/Linker/inlineasm.ll create mode 100644 test/Linker/link-global-to-func.ll create mode 100644 test/Linker/link-messages.ll create mode 100644 test/Linker/link-type-names.ll create mode 100644 test/Linker/linkage.ll create mode 100644 test/Linker/linkmdnode.ll create mode 100644 test/Linker/linkmdnode2.ll create mode 100644 test/Linker/linknamedmdnode.ll create mode 100644 test/Linker/linknamedmdnode2.ll create mode 100644 test/Linker/metadata-a.ll create mode 100644 test/Linker/metadata-b.ll create mode 100644 test/Linker/module-flags-1-a.ll create mode 100644 test/Linker/module-flags-1-b.ll create mode 100644 test/Linker/module-flags-2-a.ll create mode 100644 test/Linker/module-flags-2-b.ll create mode 100644 test/Linker/module-flags-3-a.ll create mode 100644 test/Linker/module-flags-3-b.ll create mode 100644 test/Linker/module-flags-4-a.ll create mode 100644 test/Linker/module-flags-4-b.ll create mode 100644 test/Linker/module-flags-5-a.ll create mode 100644 test/Linker/module-flags-5-b.ll create mode 100644 test/Linker/module-flags-6-a.ll create mode 100644 test/Linker/module-flags-6-b.ll create mode 100644 test/Linker/module-flags-7-a.ll create mode 100644 test/Linker/module-flags-7-b.ll create mode 100644 test/Linker/module-flags-8-a.ll create mode 100644 test/Linker/module-flags-8-b.ll create mode 100644 test/Linker/multiple-merged-structs.ll create mode 100644 test/Linker/partial-type-refinement-link.ll create mode 100644 test/Linker/partial-type-refinement.ll create mode 100644 test/Linker/prefixdata.ll create mode 100644 test/Linker/redefinition.ll create mode 100644 test/Linker/testlink1.ll create mode 100644 test/Linker/testlink2.ll create mode 100644 test/Linker/transitive-lazy-link.ll create mode 100644 test/Linker/type-unique-inheritance.ll create mode 100644 test/Linker/type-unique-simple-a.ll create mode 100644 test/Linker/type-unique-simple-b.ll create mode 100644 test/Linker/type-unique-simple2.ll create mode 100644 test/Linker/unnamed-addr-err-a.ll create mode 100644 test/Linker/unnamed-addr-err-b.ll create mode 100644 test/Linker/unnamed-addr1-a.ll create mode 100644 test/Linker/unnamed-addr1-b.ll create mode 100644 test/Linker/visibility1.ll create mode 100644 test/Linker/visibility2.ll create mode 100644 test/Linker/weakextern.ll create mode 100644 test/MC/AArch64/adrp-relocation.s create mode 100644 test/MC/AArch64/basic-a64-diagnostics.s create mode 100644 test/MC/AArch64/basic-a64-instructions.s create mode 100644 test/MC/AArch64/basic-pic.s create mode 100644 test/MC/AArch64/elf-extern.s create mode 100644 test/MC/AArch64/elf-globaladdress.ll create mode 100644 test/MC/AArch64/elf-objdump.s create mode 100644 test/MC/AArch64/elf-reloc-addend.s create mode 100644 test/MC/AArch64/elf-reloc-addsubimm.s create mode 100644 test/MC/AArch64/elf-reloc-condbr.s create mode 100644 test/MC/AArch64/elf-reloc-ldrlit.s create mode 100644 test/MC/AArch64/elf-reloc-ldstunsimm.s create mode 100644 test/MC/AArch64/elf-reloc-movw.s create mode 100644 test/MC/AArch64/elf-reloc-pcreladdressing.s create mode 100644 test/MC/AArch64/elf-reloc-tstb.s create mode 100644 test/MC/AArch64/elf-reloc-uncondbrimm.s create mode 100644 test/MC/AArch64/gicv3-regs-diagnostics.s create mode 100644 test/MC/AArch64/gicv3-regs.s create mode 100644 test/MC/AArch64/inline-asm-modifiers.s create mode 100644 test/MC/AArch64/jump-table.s create mode 100644 test/MC/AArch64/lit.local.cfg create mode 100644 test/MC/AArch64/mapping-across-sections.s create mode 100644 test/MC/AArch64/mapping-within-section.s create mode 100644 test/MC/AArch64/neon-2velem.s create mode 100644 test/MC/AArch64/neon-3vdiff.s create mode 100644 test/MC/AArch64/neon-aba-abd.s create mode 100644 test/MC/AArch64/neon-across.s create mode 100644 test/MC/AArch64/neon-add-pairwise.s create mode 100644 test/MC/AArch64/neon-add-sub-instructions.s create mode 100644 test/MC/AArch64/neon-bitwise-instructions.s create mode 100644 test/MC/AArch64/neon-compare-instructions.s create mode 100644 test/MC/AArch64/neon-crypto.s create mode 100644 test/MC/AArch64/neon-diagnostics.s create mode 100644 test/MC/AArch64/neon-extract.s create mode 100644 test/MC/AArch64/neon-facge-facgt.s create mode 100644 test/MC/AArch64/neon-frsqrt-frecp.s create mode 100644 test/MC/AArch64/neon-halving-add-sub.s create mode 100644 test/MC/AArch64/neon-max-min-pairwise.s create mode 100644 test/MC/AArch64/neon-max-min.s create mode 100644 test/MC/AArch64/neon-mla-mls-instructions.s create mode 100644 test/MC/AArch64/neon-mov.s create mode 100644 test/MC/AArch64/neon-mul-div-instructions.s create mode 100644 test/MC/AArch64/neon-perm.s create mode 100644 test/MC/AArch64/neon-rounding-halving-add.s create mode 100644 test/MC/AArch64/neon-rounding-shift.s create mode 100644 test/MC/AArch64/neon-saturating-add-sub.s create mode 100644 test/MC/AArch64/neon-saturating-rounding-shift.s create mode 100644 test/MC/AArch64/neon-saturating-shift.s create mode 100644 test/MC/AArch64/neon-scalar-abs.s create mode 100644 test/MC/AArch64/neon-scalar-add-sub.s create mode 100644 test/MC/AArch64/neon-scalar-by-elem-mla.s create mode 100644 test/MC/AArch64/neon-scalar-by-elem-mul.s create mode 100644 test/MC/AArch64/neon-scalar-by-elem-saturating-mla.s create mode 100644 test/MC/AArch64/neon-scalar-by-elem-saturating-mul.s create mode 100644 test/MC/AArch64/neon-scalar-compare.s create mode 100644 test/MC/AArch64/neon-scalar-cvt.s create mode 100644 test/MC/AArch64/neon-scalar-dup.s create mode 100644 test/MC/AArch64/neon-scalar-extract-narrow.s create mode 100644 test/MC/AArch64/neon-scalar-fp-compare.s create mode 100644 test/MC/AArch64/neon-scalar-mul.s create mode 100644 test/MC/AArch64/neon-scalar-neg.s create mode 100644 test/MC/AArch64/neon-scalar-recip.s create mode 100644 test/MC/AArch64/neon-scalar-reduce-pairwise.s create mode 100644 test/MC/AArch64/neon-scalar-rounding-shift.s create mode 100644 test/MC/AArch64/neon-scalar-saturating-add-sub.s create mode 100644 test/MC/AArch64/neon-scalar-saturating-rounding-shift.s create mode 100644 test/MC/AArch64/neon-scalar-saturating-shift.s create mode 100644 test/MC/AArch64/neon-scalar-shift-imm.s create mode 100644 test/MC/AArch64/neon-scalar-shift.s create mode 100644 test/MC/AArch64/neon-shift-left-long.s create mode 100644 test/MC/AArch64/neon-shift.s create mode 100644 test/MC/AArch64/neon-simd-copy.s create mode 100644 test/MC/AArch64/neon-simd-ldst-multi-elem.s create mode 100644 test/MC/AArch64/neon-simd-ldst-one-elem.s create mode 100644 test/MC/AArch64/neon-simd-misc.s create mode 100644 test/MC/AArch64/neon-simd-post-ldst-multi-elem.s create mode 100644 test/MC/AArch64/neon-simd-shift.s create mode 100644 test/MC/AArch64/neon-tbl.s create mode 100644 test/MC/AArch64/noneon-diagnostics.s create mode 100644 test/MC/AArch64/tls-relocs.s create mode 100644 test/MC/AArch64/trace-regs-diagnostics.s create mode 100644 test/MC/AArch64/trace-regs.s create mode 100644 test/MC/ARM/2010-11-30-reloc-movt.s create mode 100644 test/MC/ARM/2013-03-18-Br-to-label-named-like-reg.s create mode 100644 test/MC/ARM/AlignedBundling/group-bundle-arm.s create mode 100644 test/MC/ARM/AlignedBundling/lit.local.cfg create mode 100644 test/MC/ARM/AlignedBundling/pad-align-to-bundle-end.s create mode 100644 test/MC/ARM/align_arm_2_thumb.s create mode 100644 test/MC/ARM/align_thumb_2_arm.s create mode 100644 test/MC/ARM/arm-aliases.s create mode 100644 test/MC/ARM/arm-arithmetic-aliases.s create mode 100644 test/MC/ARM/arm-it-block.s create mode 100644 test/MC/ARM/arm-ldrd.s create mode 100644 test/MC/ARM/arm-memory-instructions.s create mode 100644 test/MC/ARM/arm-shift-encoding.s create mode 100644 test/MC/ARM/arm-thumb-cpus-default.s create mode 100644 test/MC/ARM/arm-thumb-cpus.s create mode 100644 test/MC/ARM/arm-thumb-trustzone.s create mode 100644 test/MC/ARM/arm-trustzone.s create mode 100644 test/MC/ARM/arm_addrmode2.s create mode 100644 test/MC/ARM/arm_addrmode3.s create mode 100644 test/MC/ARM/arm_fixups.s create mode 100644 test/MC/ARM/arm_instructions.s create mode 100644 test/MC/ARM/arm_word_directive.s create mode 100644 test/MC/ARM/basic-arm-instructions-v8.s create mode 100644 test/MC/ARM/basic-arm-instructions.s create mode 100644 test/MC/ARM/basic-thumb-instructions.s create mode 100644 test/MC/ARM/basic-thumb2-instructions-v8.s create mode 100644 test/MC/ARM/basic-thumb2-instructions.s create mode 100644 test/MC/ARM/bracket-darwin.s create mode 100644 test/MC/ARM/bracket-exprs.s create mode 100644 test/MC/ARM/crc32-thumb.s create mode 100644 test/MC/ARM/crc32.s create mode 100644 test/MC/ARM/cxx-global-constructor.ll create mode 100644 test/MC/ARM/data-in-code.ll create mode 100644 test/MC/ARM/deprecated-v8.s create mode 100644 test/MC/ARM/diagnostics-noneon.s create mode 100644 test/MC/ARM/diagnostics.s create mode 100644 test/MC/ARM/directive-cpu.s create mode 100644 test/MC/ARM/directive-eabi_attribute.s create mode 100644 test/MC/ARM/directive-fpu-multiple.s create mode 100644 test/MC/ARM/directive-fpu.s create mode 100644 test/MC/ARM/dot-req.s create mode 100644 test/MC/ARM/eh-compact-pr0.s create mode 100644 test/MC/ARM/eh-compact-pr1.s create mode 100644 test/MC/ARM/eh-directive-cantunwind-diagnostics.s create mode 100644 test/MC/ARM/eh-directive-cantunwind.s create mode 100644 test/MC/ARM/eh-directive-fnend-diagnostics.s create mode 100644 test/MC/ARM/eh-directive-fnstart-diagnostics.s create mode 100644 test/MC/ARM/eh-directive-handlerdata.s create mode 100644 test/MC/ARM/eh-directive-integrated-test.s create mode 100644 test/MC/ARM/eh-directive-multiple-offsets.s create mode 100644 test/MC/ARM/eh-directive-pad-diagnostics.s create mode 100644 test/MC/ARM/eh-directive-pad.s create mode 100644 test/MC/ARM/eh-directive-personality-diagnostics.s create mode 100644 test/MC/ARM/eh-directive-personality.s create mode 100644 test/MC/ARM/eh-directive-save-diagnoatics.s create mode 100644 test/MC/ARM/eh-directive-save.s create mode 100644 test/MC/ARM/eh-directive-section-comdat.s create mode 100644 test/MC/ARM/eh-directive-section-multiple-func.s create mode 100644 test/MC/ARM/eh-directive-section.s create mode 100644 test/MC/ARM/eh-directive-setfp-diagnostics.s create mode 100644 test/MC/ARM/eh-directive-setfp.s create mode 100644 test/MC/ARM/eh-directive-text-section-multiple-func.s create mode 100644 test/MC/ARM/eh-directive-text-section.s create mode 100644 test/MC/ARM/eh-directive-vsave-diagnostics.s create mode 100644 test/MC/ARM/eh-directive-vsave.s create mode 100644 test/MC/ARM/elf-eflags-eabi.s create mode 100644 test/MC/ARM/elf-jump24-fixup.s create mode 100644 test/MC/ARM/elf-movt.s create mode 100644 test/MC/ARM/elf-reloc-01.ll create mode 100644 test/MC/ARM/elf-reloc-02.ll create mode 100644 test/MC/ARM/elf-reloc-03.ll create mode 100644 test/MC/ARM/elf-reloc-condcall.s create mode 100644 test/MC/ARM/elf-thumbfunc-reloc.ll create mode 100644 test/MC/ARM/elf-thumbfunc-reloc.s create mode 100644 test/MC/ARM/elf-thumbfunc.s create mode 100644 test/MC/ARM/fp-armv8.s create mode 100644 test/MC/ARM/full_line_comment.s create mode 100644 test/MC/ARM/hilo-16bit-relocations.s create mode 100644 test/MC/ARM/idiv.s create mode 100644 test/MC/ARM/invalid-barrier.s create mode 100644 test/MC/ARM/invalid-crc32.s create mode 100644 test/MC/ARM/invalid-fp-armv8.s create mode 100644 test/MC/ARM/invalid-hint-arm.s create mode 100644 test/MC/ARM/invalid-hint-thumb.s create mode 100644 test/MC/ARM/invalid-idiv.s create mode 100644 test/MC/ARM/invalid-neon-v8.s create mode 100644 test/MC/ARM/lit.local.cfg create mode 100644 test/MC/ARM/load-store-acquire-release-v8-thumb.s create mode 100644 test/MC/ARM/load-store-acquire-release-v8.s create mode 100644 test/MC/ARM/mapping-within-section.s create mode 100644 test/MC/ARM/mode-switch.s create mode 100644 test/MC/ARM/multi-section-mapping.s create mode 100644 test/MC/ARM/neon-abs-encoding.s create mode 100644 test/MC/ARM/neon-absdiff-encoding.s create mode 100644 test/MC/ARM/neon-add-encoding.s create mode 100644 test/MC/ARM/neon-bitcount-encoding.s create mode 100644 test/MC/ARM/neon-bitwise-encoding.s create mode 100644 test/MC/ARM/neon-cmp-encoding.s create mode 100644 test/MC/ARM/neon-convert-encoding.s create mode 100644 test/MC/ARM/neon-crypto.s create mode 100644 test/MC/ARM/neon-dup-encoding.s create mode 100644 test/MC/ARM/neon-minmax-encoding.s create mode 100644 test/MC/ARM/neon-mov-encoding.s create mode 100644 test/MC/ARM/neon-mul-accum-encoding.s create mode 100644 test/MC/ARM/neon-mul-encoding.s create mode 100644 test/MC/ARM/neon-neg-encoding.s create mode 100644 test/MC/ARM/neon-pairwise-encoding.s create mode 100644 test/MC/ARM/neon-reciprocal-encoding.s create mode 100644 test/MC/ARM/neon-reverse-encoding.s create mode 100644 test/MC/ARM/neon-satshift-encoding.s create mode 100644 test/MC/ARM/neon-shift-encoding.s create mode 100644 test/MC/ARM/neon-shiftaccum-encoding.s create mode 100644 test/MC/ARM/neon-shuffle-encoding.s create mode 100644 test/MC/ARM/neon-sub-encoding.s create mode 100644 test/MC/ARM/neon-table-encoding.s create mode 100644 test/MC/ARM/neon-v8.s create mode 100644 test/MC/ARM/neon-vld-encoding.s create mode 100644 test/MC/ARM/neon-vst-encoding.s create mode 100644 test/MC/ARM/neon-vswp.s create mode 100644 test/MC/ARM/neont2-abs-encoding.s create mode 100644 test/MC/ARM/neont2-absdiff-encoding.s create mode 100644 test/MC/ARM/neont2-add-encoding.s create mode 100644 test/MC/ARM/neont2-bitcount-encoding.s create mode 100644 test/MC/ARM/neont2-bitwise-encoding.s create mode 100644 test/MC/ARM/neont2-cmp-encoding.s create mode 100644 test/MC/ARM/neont2-convert-encoding.s create mode 100644 test/MC/ARM/neont2-dup-encoding.s create mode 100644 test/MC/ARM/neont2-minmax-encoding.s create mode 100644 test/MC/ARM/neont2-mov-encoding.s create mode 100644 test/MC/ARM/neont2-mul-accum-encoding.s create mode 100644 test/MC/ARM/neont2-mul-encoding.s create mode 100644 test/MC/ARM/neont2-neg-encoding.s create mode 100644 test/MC/ARM/neont2-pairwise-encoding.s create mode 100644 test/MC/ARM/neont2-reciprocal-encoding.s create mode 100644 test/MC/ARM/neont2-reverse-encoding.s create mode 100644 test/MC/ARM/neont2-satshift-encoding.s create mode 100644 test/MC/ARM/neont2-shift-encoding.s create mode 100644 test/MC/ARM/neont2-shiftaccum-encoding.s create mode 100644 test/MC/ARM/neont2-shuffle-encoding.s create mode 100644 test/MC/ARM/neont2-sub-encoding.s create mode 100644 test/MC/ARM/neont2-table-encoding.s create mode 100644 test/MC/ARM/neont2-vld-encoding.s create mode 100644 test/MC/ARM/neont2-vst-encoding.s create mode 100644 test/MC/ARM/obsolete-v8.s create mode 100644 test/MC/ARM/pr11877.s create mode 100644 test/MC/ARM/relocated-mapping.s create mode 100644 test/MC/ARM/simple-fp-encoding.s create mode 100644 test/MC/ARM/single-precision-fp.s create mode 100644 test/MC/ARM/thumb-diagnostics.s create mode 100644 test/MC/ARM/thumb-fp-armv8.s create mode 100644 test/MC/ARM/thumb-hints.s create mode 100644 test/MC/ARM/thumb-invalid-crypto.txt create mode 100644 test/MC/ARM/thumb-neon-crypto.s create mode 100644 test/MC/ARM/thumb-neon-v8.s create mode 100644 test/MC/ARM/thumb-only-conditionals.s create mode 100644 test/MC/ARM/thumb-shift-encoding.s create mode 100644 test/MC/ARM/thumb.s create mode 100644 test/MC/ARM/thumb2-b.w-encodingT4.s create mode 100644 test/MC/ARM/thumb2-branches.s create mode 100644 test/MC/ARM/thumb2-diagnostics.s create mode 100644 test/MC/ARM/thumb2-ldrd.s create mode 100644 test/MC/ARM/thumb2-mclass.s create mode 100644 test/MC/ARM/thumb2-narrow-dp.ll create mode 100644 test/MC/ARM/thumb2-pldw.s create mode 100644 test/MC/ARM/v8_IT_manual.s create mode 100644 test/MC/ARM/vfp4.s create mode 100644 test/MC/ARM/vpush-vpop.s create mode 100644 test/MC/ARM/xscale-attributes.ll create mode 100644 test/MC/AsmParser/align_invalid.s create mode 100644 test/MC/AsmParser/assignment.s create mode 100644 test/MC/AsmParser/bad-macro.s create mode 100644 test/MC/AsmParser/cfi-unfinished-frame.s create mode 100644 test/MC/AsmParser/cfi-window-save.s create mode 100644 test/MC/AsmParser/conditional_asm.s create mode 100644 test/MC/AsmParser/dash-n.s create mode 100644 test/MC/AsmParser/directive_abort.s create mode 100644 test/MC/AsmParser/directive_align.s create mode 100644 test/MC/AsmParser/directive_ascii.s create mode 100644 test/MC/AsmParser/directive_comm.s create mode 100644 test/MC/AsmParser/directive_darwin_section.s create mode 100644 test/MC/AsmParser/directive_desc.s create mode 100644 test/MC/AsmParser/directive_elf_size.s create mode 100644 test/MC/AsmParser/directive_file-errors.s create mode 100644 test/MC/AsmParser/directive_file.s create mode 100644 test/MC/AsmParser/directive_fill.s create mode 100644 test/MC/AsmParser/directive_incbin.s create mode 100644 test/MC/AsmParser/directive_include.s create mode 100644 test/MC/AsmParser/directive_lcomm.s create mode 100644 test/MC/AsmParser/directive_line.s create mode 100644 test/MC/AsmParser/directive_loc.s create mode 100644 test/MC/AsmParser/directive_lsym.s create mode 100644 test/MC/AsmParser/directive_org.s create mode 100644 test/MC/AsmParser/directive_seh.s create mode 100644 test/MC/AsmParser/directive_set.s create mode 100644 test/MC/AsmParser/directive_space.s create mode 100644 test/MC/AsmParser/directive_subsections_via_symbols.s create mode 100644 test/MC/AsmParser/directive_symbol_attrs.s create mode 100644 test/MC/AsmParser/directive_tbss.s create mode 100644 test/MC/AsmParser/directive_tdata.s create mode 100644 test/MC/AsmParser/directive_thread_init_func.s create mode 100644 test/MC/AsmParser/directive_tlv.s create mode 100644 test/MC/AsmParser/directive_values.s create mode 100644 test/MC/AsmParser/directive_zerofill.s create mode 100644 test/MC/AsmParser/dollars-in-identifiers.s create mode 100644 test/MC/AsmParser/dot-symbol.s create mode 100644 test/MC/AsmParser/equ.s create mode 100644 test/MC/AsmParser/expr_symbol_modifiers.s create mode 100644 test/MC/AsmParser/exprs-invalid.s create mode 100644 test/MC/AsmParser/exprs.s create mode 100644 test/MC/AsmParser/extern.s create mode 100644 test/MC/AsmParser/floating-literals.s create mode 100644 test/MC/AsmParser/hello.s create mode 100644 test/MC/AsmParser/ifb.s create mode 100644 test/MC/AsmParser/ifc.s create mode 100644 test/MC/AsmParser/ifdef.s create mode 100644 test/MC/AsmParser/ifndef.s create mode 100644 test/MC/AsmParser/incbin_abcd create mode 100644 test/MC/AsmParser/labels.s create mode 100644 test/MC/AsmParser/line_with_hash.s create mode 100644 test/MC/AsmParser/lit.local.cfg create mode 100644 test/MC/AsmParser/macro-args.s create mode 100644 test/MC/AsmParser/macro-def-in-instantiation.s create mode 100644 test/MC/AsmParser/macro-err1.s create mode 100644 test/MC/AsmParser/macro-irp.s create mode 100644 test/MC/AsmParser/macro-irpc.s create mode 100644 test/MC/AsmParser/macro-rept-err1.s create mode 100644 test/MC/AsmParser/macro-rept-err2.s create mode 100644 test/MC/AsmParser/macro-rept.s create mode 100644 test/MC/AsmParser/macros-darwin.s create mode 100644 test/MC/AsmParser/macros-parsing.s create mode 100644 test/MC/AsmParser/macros.s create mode 100644 test/MC/AsmParser/pr11865.s create mode 100644 test/MC/AsmParser/purgem.s create mode 100644 test/MC/AsmParser/rename.s create mode 100644 test/MC/AsmParser/section.s create mode 100644 test/MC/AsmParser/section_names.s create mode 100644 test/MC/AsmParser/secure_log_unique.s create mode 100644 test/MC/AsmParser/variables-invalid.s create mode 100644 test/MC/AsmParser/variables.s create mode 100644 test/MC/COFF/alias.s create mode 100644 test/MC/COFF/align-nops.s create mode 100644 test/MC/COFF/basic-coff-64.s create mode 100644 test/MC/COFF/basic-coff.s create mode 100644 test/MC/COFF/bss.s create mode 100644 test/MC/COFF/bss_section.ll create mode 100644 test/MC/COFF/comm.ll create mode 100644 test/MC/COFF/diff.s create mode 100644 test/MC/COFF/eh-frame.s create mode 100644 test/MC/COFF/feat00.s create mode 100644 test/MC/COFF/global_ctors_dtors.ll create mode 100755 test/MC/COFF/linker-options.ll create mode 100644 test/MC/COFF/linkonce-invalid.s create mode 100644 test/MC/COFF/linkonce.s create mode 100644 test/MC/COFF/lit.local.cfg create mode 100755 test/MC/COFF/lset0.s create mode 100644 test/MC/COFF/module-asm.ll create mode 100644 test/MC/COFF/rdata.ll create mode 100644 test/MC/COFF/relocation-imgrel.s create mode 100644 test/MC/COFF/secrel-variant.s create mode 100644 test/MC/COFF/secrel32.s create mode 100644 test/MC/COFF/section-comdat.s create mode 100644 test/MC/COFF/section-invalid-flags.s create mode 100644 test/MC/COFF/section-name-encoding.s create mode 100644 test/MC/COFF/section.s create mode 100644 test/MC/COFF/seh-align1.s create mode 100644 test/MC/COFF/seh-align2.s create mode 100644 test/MC/COFF/seh-align3.s create mode 100644 test/MC/COFF/seh-section.s create mode 100644 test/MC/COFF/seh.s create mode 100644 test/MC/COFF/simple-fixups.s create mode 100644 test/MC/COFF/switch-relocations.ll create mode 100644 test/MC/COFF/symbol-alias.s create mode 100644 test/MC/COFF/symbol-fragment-offset-64.s create mode 100644 test/MC/COFF/symbol-fragment-offset.s create mode 100644 test/MC/COFF/symbol-mangling.ll create mode 100644 test/MC/COFF/tricky-names.ll create mode 100644 test/MC/COFF/weak-symbol.ll create mode 100644 test/MC/COFF/weak.s create mode 100644 test/MC/Disassembler/AArch64/a64-ignored-fields.txt create mode 100644 test/MC/Disassembler/AArch64/basic-a64-instructions.txt create mode 100644 test/MC/Disassembler/AArch64/basic-a64-undefined.txt create mode 100644 test/MC/Disassembler/AArch64/basic-a64-unpredictable.txt create mode 100644 test/MC/Disassembler/AArch64/gicv3-regs.txt create mode 100644 test/MC/Disassembler/AArch64/ldp-offset-predictable.txt create mode 100644 test/MC/Disassembler/AArch64/ldp-postind.predictable.txt create mode 100644 test/MC/Disassembler/AArch64/ldp-preind.predictable.txt create mode 100644 test/MC/Disassembler/AArch64/lit.local.cfg create mode 100644 test/MC/Disassembler/AArch64/neon-instructions.txt create mode 100644 test/MC/Disassembler/AArch64/trace-regs.txt create mode 100644 test/MC/Disassembler/ARM/arm-LDREXD-reencoding.txt create mode 100644 test/MC/Disassembler/ARM/arm-STREXD-reencoding.txt create mode 100644 test/MC/Disassembler/ARM/arm-tests.txt create mode 100644 test/MC/Disassembler/ARM/arm-thumb-trustzone.txt create mode 100644 test/MC/Disassembler/ARM/arm-trustzone.txt create mode 100644 test/MC/Disassembler/ARM/basic-arm-instructions-v8.txt create mode 100644 test/MC/Disassembler/ARM/basic-arm-instructions.txt create mode 100644 test/MC/Disassembler/ARM/crc32-thumb.txt create mode 100644 test/MC/Disassembler/ARM/crc32.txt create mode 100644 test/MC/Disassembler/ARM/fp-armv8.txt create mode 100644 test/MC/Disassembler/ARM/fp-encoding.txt create mode 100644 test/MC/Disassembler/ARM/hex-immediates.txt create mode 100644 test/MC/Disassembler/ARM/invalid-FSTMX-arm.txt create mode 100644 test/MC/Disassembler/ARM/invalid-IT-CC15.txt create mode 100644 test/MC/Disassembler/ARM/invalid-armv7.txt create mode 100644 test/MC/Disassembler/ARM/invalid-armv8.txt create mode 100644 test/MC/Disassembler/ARM/invalid-because-armv7.txt create mode 100644 test/MC/Disassembler/ARM/invalid-thumbv7-xfail.txt create mode 100644 test/MC/Disassembler/ARM/invalid-thumbv7.txt create mode 100644 test/MC/Disassembler/ARM/invalid-thumbv8.txt create mode 100644 test/MC/Disassembler/ARM/ldrd-armv4.txt create mode 100644 test/MC/Disassembler/ARM/lit.local.cfg create mode 100644 test/MC/Disassembler/ARM/load-store-acquire-release-v8-thumb.txt create mode 100644 test/MC/Disassembler/ARM/load-store-acquire-release-v8.txt create mode 100644 test/MC/Disassembler/ARM/marked-up-thumb.txt create mode 100644 test/MC/Disassembler/ARM/memory-arm-instructions.txt create mode 100644 test/MC/Disassembler/ARM/neon-crypto.txt create mode 100644 test/MC/Disassembler/ARM/neon-tests.txt create mode 100644 test/MC/Disassembler/ARM/neon-v8.txt create mode 100644 test/MC/Disassembler/ARM/neon.txt create mode 100644 test/MC/Disassembler/ARM/neont-VLD-reencoding.txt create mode 100644 test/MC/Disassembler/ARM/neont-VST-reencoding.txt create mode 100644 test/MC/Disassembler/ARM/neont2.txt create mode 100644 test/MC/Disassembler/ARM/thumb-MSR-MClass.txt create mode 100644 test/MC/Disassembler/ARM/thumb-fp-armv8.txt create mode 100644 test/MC/Disassembler/ARM/thumb-neon-crypto.txt create mode 100644 test/MC/Disassembler/ARM/thumb-neon-v8.txt create mode 100644 test/MC/Disassembler/ARM/thumb-printf.txt create mode 100644 test/MC/Disassembler/ARM/thumb-tests.txt create mode 100644 test/MC/Disassembler/ARM/thumb-v8.txt create mode 100644 test/MC/Disassembler/ARM/thumb1.txt create mode 100644 test/MC/Disassembler/ARM/thumb2-v8.txt create mode 100644 test/MC/Disassembler/ARM/thumb2.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-ADC-arm.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-ADDREXT3-arm.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-AExtI-arm.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-AI1cmp-arm.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-BFI.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-LDR-arm.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-LDRD-arm.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-LSL-regform.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-MRRC2-arm.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-MRS-arm.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-MUL-arm.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-RSC-arm.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-SEL-arm.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-SHADD16-arm.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-SSAT-arm.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-STRBrs-arm.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-UQADD8-arm.txt create mode 100644 test/MC/Disassembler/ARM/unpredictable-swp-arm.txt create mode 100644 test/MC/Disassembler/ARM/unpredictables-thumb.txt create mode 100644 test/MC/Disassembler/ARM/vfp4.txt create mode 100644 test/MC/Disassembler/Mips/lit.local.cfg create mode 100644 test/MC/Disassembler/Mips/micromips.txt create mode 100644 test/MC/Disassembler/Mips/micromips_le.txt create mode 100644 test/MC/Disassembler/Mips/mips-dsp.txt create mode 100644 test/MC/Disassembler/Mips/mips32.txt create mode 100644 test/MC/Disassembler/Mips/mips32_le.txt create mode 100644 test/MC/Disassembler/Mips/mips32r2.txt create mode 100644 test/MC/Disassembler/Mips/mips32r2_le.txt create mode 100644 test/MC/Disassembler/Mips/mips64.txt create mode 100644 test/MC/Disassembler/Mips/mips64_le.txt create mode 100644 test/MC/Disassembler/Mips/mips64r2.txt create mode 100644 test/MC/Disassembler/Mips/mips64r2_le.txt create mode 100644 test/MC/Disassembler/SystemZ/insns-pcrel.txt create mode 100644 test/MC/Disassembler/SystemZ/insns.txt create mode 100644 test/MC/Disassembler/SystemZ/invalid-regs.txt create mode 100644 test/MC/Disassembler/SystemZ/lit.local.cfg create mode 100644 test/MC/Disassembler/SystemZ/trunc-01.txt create mode 100644 test/MC/Disassembler/SystemZ/trunc-02.txt create mode 100644 test/MC/Disassembler/SystemZ/trunc-03.txt create mode 100644 test/MC/Disassembler/SystemZ/unmapped.txt create mode 100644 test/MC/Disassembler/X86/hex-immediates.txt create mode 100644 test/MC/Disassembler/X86/intel-syntax-32.txt create mode 100644 test/MC/Disassembler/X86/intel-syntax.txt create mode 100644 test/MC/Disassembler/X86/invalid-VEX-vvvv.txt create mode 100644 test/MC/Disassembler/X86/invalid-cmp-imm.txt create mode 100644 test/MC/Disassembler/X86/lit.local.cfg create mode 100644 test/MC/Disassembler/X86/marked-up.txt create mode 100644 test/MC/Disassembler/X86/prefixes.txt create mode 100644 test/MC/Disassembler/X86/simple-tests.txt create mode 100644 test/MC/Disassembler/X86/truncated-input.txt create mode 100644 test/MC/Disassembler/X86/x86-32.txt create mode 100644 test/MC/Disassembler/X86/x86-64.txt create mode 100644 test/MC/Disassembler/XCore/lit.local.cfg create mode 100644 test/MC/Disassembler/XCore/xcore.txt create mode 100644 test/MC/ELF/abs.s create mode 100644 test/MC/ELF/alias-reloc.s create mode 100644 test/MC/ELF/alias.s create mode 100644 test/MC/ELF/align-bss.s create mode 100644 test/MC/ELF/align-nops.s create mode 100644 test/MC/ELF/align-size.s create mode 100644 test/MC/ELF/align-text.s create mode 100644 test/MC/ELF/align.s create mode 100644 test/MC/ELF/bad-relocation.s create mode 100644 test/MC/ELF/bad-section.s create mode 100644 test/MC/ELF/basic-elf-32.s create mode 100644 test/MC/ELF/basic-elf-64.s create mode 100644 test/MC/ELF/bracket-exprs.s create mode 100644 test/MC/ELF/bracket.s create mode 100644 test/MC/ELF/bss-large.ll create mode 100644 test/MC/ELF/bss.ll create mode 100644 test/MC/ELF/call-abs.s create mode 100644 test/MC/ELF/cfi-adjust-cfa-offset.s create mode 100644 test/MC/ELF/cfi-advance-loc2.s create mode 100644 test/MC/ELF/cfi-def-cfa-offset.s create mode 100644 test/MC/ELF/cfi-def-cfa-register.s create mode 100644 test/MC/ELF/cfi-def-cfa.s create mode 100644 test/MC/ELF/cfi-escape.s create mode 100644 test/MC/ELF/cfi-offset.s create mode 100644 test/MC/ELF/cfi-reg.s create mode 100644 test/MC/ELF/cfi-register.s create mode 100644 test/MC/ELF/cfi-rel-offset.s create mode 100644 test/MC/ELF/cfi-rel-offset2.s create mode 100644 test/MC/ELF/cfi-remember.s create mode 100644 test/MC/ELF/cfi-restore.s create mode 100644 test/MC/ELF/cfi-same-value.s create mode 100644 test/MC/ELF/cfi-sections.s create mode 100644 test/MC/ELF/cfi-signal-frame.s create mode 100644 test/MC/ELF/cfi-undefined.s create mode 100644 test/MC/ELF/cfi-window-save.s create mode 100644 test/MC/ELF/cfi-zero-addr-delta.s create mode 100644 test/MC/ELF/cfi.s create mode 100644 test/MC/ELF/comdat-dup-group-name.s create mode 100644 test/MC/ELF/comdat-reloc.s create mode 100644 test/MC/ELF/comdat.s create mode 100644 test/MC/ELF/common.s create mode 100644 test/MC/ELF/common2.s create mode 100644 test/MC/ELF/comp-dir.s create mode 100644 test/MC/ELF/debug-line.s create mode 100644 test/MC/ELF/debug-line2.s create mode 100644 test/MC/ELF/debug-loc.s create mode 100644 test/MC/ELF/diff.s create mode 100644 test/MC/ELF/diff2.s create mode 100644 test/MC/ELF/elf_directive_previous.s create mode 100644 test/MC/ELF/elf_directive_section.s create mode 100644 test/MC/ELF/empty-dwarf-lines.s create mode 100644 test/MC/ELF/empty.s create mode 100644 test/MC/ELF/entsize.ll create mode 100644 test/MC/ELF/entsize.s create mode 100644 test/MC/ELF/fde.s create mode 100644 test/MC/ELF/file-double.s create mode 100644 test/MC/ELF/file.s create mode 100644 test/MC/ELF/gen-dwarf.s create mode 100644 test/MC/ELF/global-offset.s create mode 100644 test/MC/ELF/got.s create mode 100644 test/MC/ELF/ident.s create mode 100644 test/MC/ELF/invalid-symver.s create mode 100644 test/MC/ELF/lcomm.s create mode 100644 test/MC/ELF/leb128.s create mode 100644 test/MC/ELF/lit.local.cfg create mode 100644 test/MC/ELF/local-reloc.s create mode 100644 test/MC/ELF/many-section.s create mode 100644 test/MC/ELF/many-sections-2.s create mode 100644 test/MC/ELF/merge.s create mode 100644 test/MC/ELF/n_bytes.s create mode 100644 test/MC/ELF/no-fixup.s create mode 100644 test/MC/ELF/noexec.s create mode 100644 test/MC/ELF/norelocation.s create mode 100644 test/MC/ELF/org.s create mode 100644 test/MC/ELF/pic-diff.s create mode 100644 test/MC/ELF/plt.s create mode 100644 test/MC/ELF/pr9292.s create mode 100644 test/MC/ELF/relax-all-flag.s create mode 100644 test/MC/ELF/relax-arith.s create mode 100644 test/MC/ELF/relax-crash.s create mode 100644 test/MC/ELF/relax.s create mode 100644 test/MC/ELF/relocation-386.s create mode 100644 test/MC/ELF/relocation-pc.s create mode 100644 test/MC/ELF/relocation.s create mode 100644 test/MC/ELF/rename.s create mode 100644 test/MC/ELF/section-quoting.s create mode 100644 test/MC/ELF/section.s create mode 100644 test/MC/ELF/set.s create mode 100644 test/MC/ELF/sleb.s create mode 100644 test/MC/ELF/subsection.s create mode 100644 test/MC/ELF/symbol-names.s create mode 100644 test/MC/ELF/symref.s create mode 100644 test/MC/ELF/tls-i386.s create mode 100644 test/MC/ELF/tls.s create mode 100644 test/MC/ELF/type.s create mode 100644 test/MC/ELF/uleb.s create mode 100644 test/MC/ELF/undef.s create mode 100644 test/MC/ELF/undef2.s create mode 100644 test/MC/ELF/version.s create mode 100644 test/MC/ELF/weak-relocation.s create mode 100644 test/MC/ELF/weak.s create mode 100644 test/MC/ELF/weakref-plt.s create mode 100644 test/MC/ELF/weakref-reloc.s create mode 100644 test/MC/ELF/weakref.s create mode 100644 test/MC/ELF/x86_64-reloc-sizetest.s create mode 100644 test/MC/ELF/zero.s create mode 100644 test/MC/MachO/ARM/darwin-ARM-reloc.s create mode 100644 test/MC/MachO/ARM/darwin-Thumb-reloc.s create mode 100644 test/MC/MachO/ARM/data-in-code.s create mode 100644 test/MC/MachO/ARM/empty-function-nop.ll create mode 100644 test/MC/MachO/ARM/lit.local.cfg create mode 100644 test/MC/MachO/ARM/llvm-objdump-macho-stripped.s create mode 100644 test/MC/MachO/ARM/llvm-objdump-macho.s create mode 100644 test/MC/MachO/ARM/long-call-branch-island-relocation.s create mode 100644 test/MC/MachO/ARM/no-subsections-reloc.s create mode 100644 test/MC/MachO/ARM/nop-armv4-padding.s create mode 100644 test/MC/MachO/ARM/nop-armv6t2-padding.s create mode 100644 test/MC/MachO/ARM/nop-thumb-padding.s create mode 100644 test/MC/MachO/ARM/nop-thumb2-padding.s create mode 100644 test/MC/MachO/ARM/relax-thumb-ldr-literal.s create mode 100644 test/MC/MachO/ARM/relax-thumb2-branches.s create mode 100644 test/MC/MachO/ARM/static-movt-relocs.s create mode 100644 test/MC/MachO/ARM/thumb-bl-jbits.s create mode 100644 test/MC/MachO/ARM/thumb2-function-relative-load.s create mode 100644 test/MC/MachO/ARM/thumb2-movt-fixup.s create mode 100644 test/MC/MachO/ARM/thumb2-movw-fixup.s create mode 100644 test/MC/MachO/absolute.s create mode 100644 test/MC/MachO/absolutize.s create mode 100644 test/MC/MachO/bad-darwin-x86_64-32-bit-abs-addr.s create mode 100644 test/MC/MachO/bad-darwin-x86_64-diff-relocs.s create mode 100644 test/MC/MachO/bad-dollar.s create mode 100644 test/MC/MachO/bad-indirect-symbols.s create mode 100644 test/MC/MachO/bad-macro.s create mode 100644 test/MC/MachO/bss.s create mode 100644 test/MC/MachO/comm-1.s create mode 100644 test/MC/MachO/darwin-complex-difference.s create mode 100644 test/MC/MachO/darwin-x86_64-diff-reloc-assign-2.s create mode 100644 test/MC/MachO/darwin-x86_64-diff-reloc-assign.s create mode 100644 test/MC/MachO/darwin-x86_64-diff-relocs.s create mode 100644 test/MC/MachO/darwin-x86_64-nobase-relocs.s create mode 100644 test/MC/MachO/darwin-x86_64-reloc-offsets.s create mode 100644 test/MC/MachO/darwin-x86_64-reloc.s create mode 100644 test/MC/MachO/data.s create mode 100644 test/MC/MachO/debug_frame.s create mode 100644 test/MC/MachO/diff-with-two-sections.s create mode 100644 test/MC/MachO/direction_labels.s create mode 100644 test/MC/MachO/empty-dwarf-lines.s create mode 100644 test/MC/MachO/file.s create mode 100644 test/MC/MachO/gen-dwarf-cpp.s create mode 100644 test/MC/MachO/gen-dwarf-macro-cpp.s create mode 100644 test/MC/MachO/gen-dwarf-producer.s create mode 100644 test/MC/MachO/gen-dwarf.s create mode 100644 test/MC/MachO/i386-large-relocations.s create mode 100644 test/MC/MachO/indirect-symbols.s create mode 100644 test/MC/MachO/jcc.s create mode 100644 test/MC/MachO/lcomm-attributes.s create mode 100644 test/MC/MachO/linker-option-1.s create mode 100644 test/MC/MachO/linker-option-2.s create mode 100644 test/MC/MachO/linker-options.ll create mode 100644 test/MC/MachO/lit.local.cfg create mode 100644 test/MC/MachO/loc.s create mode 100644 test/MC/MachO/pcrel-to-other-section.s create mode 100644 test/MC/MachO/previous.s create mode 100644 test/MC/MachO/pushsection.s create mode 100644 test/MC/MachO/relax-jumps.s create mode 100644 test/MC/MachO/relax-recompute-align.s create mode 100644 test/MC/MachO/reloc-diff.s create mode 100644 test/MC/MachO/reloc-pcrel-offset.s create mode 100644 test/MC/MachO/reloc-pcrel.s create mode 100644 test/MC/MachO/reloc.s create mode 100644 test/MC/MachO/section-align-1.s create mode 100644 test/MC/MachO/section-align-2.s create mode 100644 test/MC/MachO/section-attributes.s create mode 100644 test/MC/MachO/section-flags.s create mode 100644 test/MC/MachO/string-table.s create mode 100644 test/MC/MachO/symbol-diff.s create mode 100644 test/MC/MachO/symbol-flags.s create mode 100644 test/MC/MachO/symbol-indirect.s create mode 100644 test/MC/MachO/symbols-1.s create mode 100644 test/MC/MachO/tbss.s create mode 100644 test/MC/MachO/tdata.s create mode 100644 test/MC/MachO/temp-labels.s create mode 100644 test/MC/MachO/thread_init_func.s create mode 100644 test/MC/MachO/tls.s create mode 100644 test/MC/MachO/tlv-bss.ll create mode 100644 test/MC/MachO/tlv-reloc.s create mode 100644 test/MC/MachO/tlv.s create mode 100644 test/MC/MachO/values.s create mode 100644 test/MC/MachO/variable-errors.s create mode 100644 test/MC/MachO/variable-exprs.s create mode 100644 test/MC/MachO/weakdef.s create mode 100644 test/MC/MachO/x86-data-in-code.ll create mode 100644 test/MC/MachO/x86_32-optimal_nop.s create mode 100644 test/MC/MachO/x86_32-sections.s create mode 100644 test/MC/MachO/x86_32-symbols.s create mode 100644 test/MC/MachO/x86_64-reloc-arithmetic.s create mode 100644 test/MC/MachO/x86_64-sections.s create mode 100644 test/MC/MachO/x86_64-symbols.s create mode 100644 test/MC/MachO/zerofill-1.s create mode 100644 test/MC/MachO/zerofill-2.s create mode 100644 test/MC/MachO/zerofill-3.s create mode 100644 test/MC/MachO/zerofill-4.s create mode 100644 test/MC/MachO/zerofill-5.s create mode 100644 test/MC/MachO/zerofill-sect-align.s create mode 100644 test/MC/Markup/basic-markup.mc create mode 100644 test/MC/Markup/lit.local.cfg create mode 100644 test/MC/Mips/abicalls.ll create mode 100644 test/MC/Mips/do_switch.ll create mode 100644 test/MC/Mips/eh-frame.s create mode 100644 test/MC/Mips/elf-N64.ll create mode 100644 test/MC/Mips/elf-bigendian.ll create mode 100644 test/MC/Mips/elf-gprel-32-64.ll create mode 100644 test/MC/Mips/elf-objdump.s create mode 100644 test/MC/Mips/elf-reginfo.ll create mode 100644 test/MC/Mips/elf-relsym.ll create mode 100644 test/MC/Mips/elf-tls.ll create mode 100644 test/MC/Mips/elf_basic.s create mode 100644 test/MC/Mips/elf_eflags.ll create mode 100644 test/MC/Mips/elf_eflags.s create mode 100644 test/MC/Mips/elf_st_other.ll create mode 100644 test/MC/Mips/elf_st_other.s create mode 100644 test/MC/Mips/expr1.s create mode 100644 test/MC/Mips/higher_highest.ll create mode 100644 test/MC/Mips/hilo-addressing.s create mode 100644 test/MC/Mips/lea_64.ll create mode 100644 test/MC/Mips/lit.local.cfg create mode 100644 test/MC/Mips/micromips-alu-instructions.s create mode 100644 test/MC/Mips/micromips-branch-instructions.s create mode 100644 test/MC/Mips/micromips-branch16.s create mode 100644 test/MC/Mips/micromips-expansions.s create mode 100644 test/MC/Mips/micromips-expressions.s create mode 100644 test/MC/Mips/micromips-jump-instructions.s create mode 100644 test/MC/Mips/micromips-jump26.s create mode 100644 test/MC/Mips/micromips-loadstore-instructions.s create mode 100644 test/MC/Mips/micromips-loadstore-unaligned.s create mode 100644 test/MC/Mips/micromips-long-branch.ll create mode 100644 test/MC/Mips/micromips-movcond-instructions.s create mode 100644 test/MC/Mips/micromips-multiply-instructions.s create mode 100644 test/MC/Mips/micromips-relocations.s create mode 100644 test/MC/Mips/micromips-shift-instructions.s create mode 100644 test/MC/Mips/micromips-tailr.s create mode 100644 test/MC/Mips/micromips-trap-instructions.s create mode 100644 test/MC/Mips/mips-alu-instructions.s create mode 100644 test/MC/Mips/mips-control-instructions.s create mode 100644 test/MC/Mips/mips-coprocessor-encodings.s create mode 100644 test/MC/Mips/mips-dsp-instructions.s create mode 100644 test/MC/Mips/mips-expansions.s create mode 100644 test/MC/Mips/mips-fpu-instructions.s create mode 100644 test/MC/Mips/mips-jump-instructions.s create mode 100644 test/MC/Mips/mips-memory-instructions.s create mode 100644 test/MC/Mips/mips-register-names.s create mode 100644 test/MC/Mips/mips-relocations.s create mode 100644 test/MC/Mips/mips64-alu-instructions.s create mode 100644 test/MC/Mips/mips64-instructions.s create mode 100644 test/MC/Mips/mips64-register-names.s create mode 100644 test/MC/Mips/mips64extins.ll create mode 100644 test/MC/Mips/mips64shift.ll create mode 100644 test/MC/Mips/mips_directives.s create mode 100644 test/MC/Mips/mips_gprel16.ll create mode 100644 test/MC/Mips/msa/test_2r.s create mode 100644 test/MC/Mips/msa/test_2rf.s create mode 100644 test/MC/Mips/msa/test_3r.s create mode 100644 test/MC/Mips/msa/test_3rf.s create mode 100644 test/MC/Mips/msa/test_bit.s create mode 100644 test/MC/Mips/msa/test_cbranch.s create mode 100644 test/MC/Mips/msa/test_ctrlregs.s create mode 100644 test/MC/Mips/msa/test_elm.s create mode 100644 test/MC/Mips/msa/test_elm_insert.s create mode 100644 test/MC/Mips/msa/test_elm_insve.s create mode 100644 test/MC/Mips/msa/test_i10.s create mode 100644 test/MC/Mips/msa/test_i5.s create mode 100644 test/MC/Mips/msa/test_i8.s create mode 100644 test/MC/Mips/msa/test_lsa.s create mode 100644 test/MC/Mips/msa/test_mi10.s create mode 100644 test/MC/Mips/msa/test_vec.s create mode 100644 test/MC/Mips/multi-64bit-func.ll create mode 100644 test/MC/Mips/nabi-regs.s create mode 100644 test/MC/Mips/pr11877.s create mode 100644 test/MC/Mips/r-mips-got-disp.ll create mode 100644 test/MC/Mips/set-at-directive.s create mode 100644 test/MC/Mips/sext_64_32.ll create mode 100644 test/MC/Mips/sym-offset.ll create mode 100644 test/MC/Mips/xgot.ll create mode 100644 test/MC/PowerPC/deprecated-p7.s create mode 100644 test/MC/PowerPC/lit.local.cfg create mode 100644 test/MC/PowerPC/ppc-llong.s create mode 100644 test/MC/PowerPC/ppc-machine.s create mode 100644 test/MC/PowerPC/ppc-nop.s create mode 100644 test/MC/PowerPC/ppc-word.s create mode 100644 test/MC/PowerPC/ppc64-encoding-bookII.s create mode 100644 test/MC/PowerPC/ppc64-encoding-bookIII.s create mode 100644 test/MC/PowerPC/ppc64-encoding-ext.s create mode 100644 test/MC/PowerPC/ppc64-encoding-fp.s create mode 100644 test/MC/PowerPC/ppc64-encoding-vmx.s create mode 100644 test/MC/PowerPC/ppc64-encoding.s create mode 100644 test/MC/PowerPC/ppc64-errors.s create mode 100644 test/MC/PowerPC/ppc64-fixup-apply.s create mode 100644 test/MC/PowerPC/ppc64-fixup-explicit.s create mode 100644 test/MC/PowerPC/ppc64-fixups.s create mode 100644 test/MC/PowerPC/ppc64-initial-cfa.s create mode 100644 test/MC/PowerPC/ppc64-operands.s create mode 100644 test/MC/PowerPC/ppc64-regs.s create mode 100644 test/MC/PowerPC/ppc64-relocs-01.s create mode 100644 test/MC/PowerPC/ppc64-tls-relocs-01.s create mode 100644 test/MC/PowerPC/tls-gd-obj.s create mode 100644 test/MC/PowerPC/tls-ie-obj.s create mode 100644 test/MC/PowerPC/tls-ld-obj.s create mode 100644 test/MC/SystemZ/insn-bad-z196.s create mode 100644 test/MC/SystemZ/insn-bad.s create mode 100644 test/MC/SystemZ/insn-good-z196.s create mode 100644 test/MC/SystemZ/insn-good.s create mode 100644 test/MC/SystemZ/lit.local.cfg create mode 100644 test/MC/SystemZ/regs-bad.s create mode 100644 test/MC/SystemZ/regs-good.s create mode 100644 test/MC/SystemZ/tokens.s create mode 100644 test/MC/X86/2011-09-06-NoNewline.s create mode 100644 test/MC/X86/3DNow.s create mode 100644 test/MC/X86/AlignedBundling/align-mode-argument-error.s create mode 100644 test/MC/X86/AlignedBundling/asm-printing-bundle-directives.s create mode 100644 test/MC/X86/AlignedBundling/autogen-inst-offset-align-to-end.s create mode 100644 test/MC/X86/AlignedBundling/autogen-inst-offset-padding.s create mode 100644 test/MC/X86/AlignedBundling/bundle-group-too-large-error.s create mode 100644 test/MC/X86/AlignedBundling/bundle-lock-option-error.s create mode 100644 test/MC/X86/AlignedBundling/different-sections.s create mode 100644 test/MC/X86/AlignedBundling/lit.local.cfg create mode 100644 test/MC/X86/AlignedBundling/lock-without-bundle-mode-error.s create mode 100644 test/MC/X86/AlignedBundling/long-nop-pad.s create mode 100644 test/MC/X86/AlignedBundling/pad-align-to-bundle-end.s create mode 100644 test/MC/X86/AlignedBundling/pad-bundle-groups.s create mode 100644 test/MC/X86/AlignedBundling/relax-at-bundle-end.s create mode 100644 test/MC/X86/AlignedBundling/relax-in-bundle-group.s create mode 100644 test/MC/X86/AlignedBundling/single-inst-bundling.s create mode 100644 test/MC/X86/AlignedBundling/switch-section-locked-error.s create mode 100644 test/MC/X86/AlignedBundling/unlock-without-lock-error.s create mode 100644 test/MC/X86/address-size.s create mode 100644 test/MC/X86/avx512-encodings.s create mode 100644 test/MC/X86/cfi_def_cfa-crash.s create mode 100644 test/MC/X86/fde-reloc.s create mode 100644 test/MC/X86/gnux32-dwarf-gen.s create mode 100644 test/MC/X86/intel-syntax-2.s create mode 100644 test/MC/X86/intel-syntax-encoding.s create mode 100644 test/MC/X86/intel-syntax-hex.s create mode 100644 test/MC/X86/intel-syntax.s create mode 100644 test/MC/X86/lit.local.cfg create mode 100644 test/MC/X86/padlock.s create mode 100644 test/MC/X86/shuffle-comments.s create mode 100644 test/MC/X86/x86-32-avx.s create mode 100644 test/MC/X86/x86-32-coverage.s create mode 100644 test/MC/X86/x86-32-fma3.s create mode 100644 test/MC/X86/x86-32-ms-inline-asm.s create mode 100644 test/MC/X86/x86-32.s create mode 100644 test/MC/X86/x86-64.s create mode 100644 test/MC/X86/x86_64-avx-clmul-encoding.s create mode 100644 test/MC/X86/x86_64-avx-encoding.s create mode 100644 test/MC/X86/x86_64-bmi-encoding.s create mode 100644 test/MC/X86/x86_64-encoding.s create mode 100644 test/MC/X86/x86_64-fma3-encoding.s create mode 100644 test/MC/X86/x86_64-fma4-encoding.s create mode 100644 test/MC/X86/x86_64-hle-encoding.s create mode 100644 test/MC/X86/x86_64-imm-widths.s create mode 100644 test/MC/X86/x86_64-rand-encoding.s create mode 100644 test/MC/X86/x86_64-rtm-encoding.s create mode 100644 test/MC/X86/x86_64-sse4a.s create mode 100644 test/MC/X86/x86_64-tbm-encoding.s create mode 100644 test/MC/X86/x86_64-xop-encoding.s create mode 100644 test/MC/X86/x86_directives.s create mode 100644 test/MC/X86/x86_errors.s create mode 100644 test/MC/X86/x86_long_nop.s create mode 100644 test/MC/X86/x86_nop.s create mode 100644 test/MC/X86/x86_operands.s create mode 100644 test/Makefile create mode 100644 test/Makefile.tests create mode 100644 test/Object/ARM/lit.local.cfg create mode 100644 test/Object/ARM/macho-data-in-code.test create mode 100644 test/Object/ARM/objdump-thumb.test create mode 100644 test/Object/ARM/symbol-addr.ll create mode 100644 test/Object/Inputs/COFF/i386.yaml create mode 100644 test/Object/Inputs/COFF/x86-64.yaml create mode 100644 test/Object/Inputs/ELF/BE32.yaml create mode 100644 test/Object/Inputs/ELF/BE64.yaml create mode 100644 test/Object/Inputs/ELF/LE32.yaml create mode 100644 test/Object/Inputs/ELF/LE64.yaml create mode 100644 test/Object/Inputs/GNU.a create mode 100644 test/Object/Inputs/IsNAN.o create mode 100644 test/Object/Inputs/MacOSX.a create mode 100644 test/Object/Inputs/SVR4.a create mode 100644 test/Object/Inputs/archive-test.a-coff-i386 create mode 100644 test/Object/Inputs/archive-test.a-corrupt-symbol-table create mode 100644 test/Object/Inputs/archive-test.a-empty create mode 100644 test/Object/Inputs/archive-test.a-gnu-minimal create mode 100644 test/Object/Inputs/archive-test.a-gnu-no-symtab create mode 100644 test/Object/Inputs/coff_archive.lib create mode 100644 test/Object/Inputs/coff_archive_short.lib create mode 100644 test/Object/Inputs/corrupt-version.elf-x86_64 create mode 100644 test/Object/Inputs/corrupt.elf-x86-64 create mode 100644 test/Object/Inputs/dext-test.elf-mips64r2 create mode 100755 test/Object/Inputs/elf-reloc-no-sym.x86_64 create mode 100755 test/Object/Inputs/elf-versioning-test.i386 create mode 100755 test/Object/Inputs/elf-versioning-test.x86_64 create mode 100644 test/Object/Inputs/elfver.S create mode 100644 test/Object/Inputs/elfver.script create mode 100644 test/Object/Inputs/evenlen create mode 100755 test/Object/Inputs/hello-world.elf-x86-64 create mode 100644 test/Object/Inputs/liblong_filenames.a create mode 100644 test/Object/Inputs/libsimple_archive.a create mode 100644 test/Object/Inputs/macho-data-in-code.macho-thumbv7 create mode 100644 test/Object/Inputs/macho-text-sections.macho-x86_64 create mode 100644 test/Object/Inputs/macho-text.thumb create mode 100755 test/Object/Inputs/macho-universal.x86_64.i386 create mode 100644 test/Object/Inputs/oddlen create mode 100644 test/Object/Inputs/program-headers.elf-i386 create mode 100644 test/Object/Inputs/program-headers.elf-x86-64 create mode 100755 test/Object/Inputs/program-headers.mips create mode 100644 test/Object/Inputs/relocations.elf-x86-64 create mode 100644 test/Object/Inputs/shared-object-test.elf-i386 create mode 100644 test/Object/Inputs/shared-object-test.elf-x86-64 create mode 100644 test/Object/Inputs/shared.ll create mode 100755 test/Object/Inputs/trivial-executable-test.macho-x86-64 create mode 100644 test/Object/Inputs/trivial-object-test.coff-i386 create mode 100644 test/Object/Inputs/trivial-object-test.coff-x86-64 create mode 100644 test/Object/Inputs/trivial-object-test.elf-hexagon create mode 100644 test/Object/Inputs/trivial-object-test.elf-i386 create mode 100644 test/Object/Inputs/trivial-object-test.elf-mips64el create mode 100644 test/Object/Inputs/trivial-object-test.elf-x86-64 create mode 100644 test/Object/Inputs/trivial-object-test.macho-i386 create mode 100644 test/Object/Inputs/trivial-object-test.macho-x86-64 create mode 100644 test/Object/Inputs/trivial-object-test2.elf-x86-64 create mode 100644 test/Object/Inputs/trivial.ll create mode 100644 test/Object/Inputs/very_long_bytecode_file_name.bc create mode 100644 test/Object/Inputs/weak-global-symbol.macho-i386 create mode 100644 test/Object/Inputs/xpg4.a create mode 100644 test/Object/Mips/feature.test create mode 100644 test/Object/Mips/lit.local.cfg create mode 100644 test/Object/X86/lit.local.cfg create mode 100644 test/Object/X86/macho-text-sections.test create mode 100644 test/Object/X86/objdump-cfg-invalid-opcode.yaml create mode 100644 test/Object/X86/objdump-cfg-textatomsize.yaml create mode 100644 test/Object/X86/objdump-cfg.yaml create mode 100644 test/Object/X86/objdump-disassembly-inline-relocations.test create mode 100644 test/Object/X86/objdump-disassembly-symbolic.test create mode 100644 test/Object/X86/objdump-trivial-object.test create mode 100644 test/Object/ar-create.test create mode 100644 test/Object/archive-delete.test create mode 100644 test/Object/archive-error-tmp.txt create mode 100644 test/Object/archive-extract-dir.test create mode 100644 test/Object/archive-format.test create mode 100644 test/Object/archive-long-index.test create mode 100644 test/Object/archive-move.test create mode 100644 test/Object/archive-replace-pos.test create mode 100644 test/Object/archive-symtab.test create mode 100644 test/Object/archive-toc.test create mode 100644 test/Object/archive-update.test create mode 100644 test/Object/check_binary_output.ll create mode 100644 test/Object/coff-archive-short.test create mode 100644 test/Object/coff-archive.test create mode 100644 test/Object/corrupt.test create mode 100644 test/Object/directory.ll create mode 100644 test/Object/elf-reloc-no-sym.test create mode 100644 test/Object/extract.ll create mode 100644 test/Object/lit.local.cfg create mode 100644 test/Object/nm-archive.test create mode 100644 test/Object/nm-error.test create mode 100644 test/Object/nm-shared-object.test create mode 100644 test/Object/nm-trivial-object.test create mode 100644 test/Object/nm-universal-binary.test create mode 100644 test/Object/nm-weak-global-macho.test create mode 100644 test/Object/obj2yaml.test create mode 100644 test/Object/objdump-file-header.test create mode 100644 test/Object/objdump-private-headers.test create mode 100644 test/Object/objdump-relocations.test create mode 100644 test/Object/objdump-section-content.test create mode 100644 test/Object/objdump-sectionheaders.test create mode 100644 test/Object/objdump-symbol-table.test create mode 100644 test/Object/readobj-elf-versioning.test create mode 100644 test/Object/readobj-shared-object.test create mode 100644 test/Object/readobj.test create mode 100644 test/Object/relocation-executable.test create mode 100644 test/Object/simple-archive.test create mode 100644 test/Object/yaml2obj-elf-bits-endian.test create mode 100644 test/Object/yaml2obj-elf-file-headers.yaml create mode 100644 test/Object/yaml2obj-elf-section-basic.yaml create mode 100644 test/Object/yaml2obj-elf-symbol-LocalGlobalWeak.yaml create mode 100644 test/Object/yaml2obj-elf-symbol-basic.yaml create mode 100644 test/Object/yaml2obj-readobj.test create mode 100644 test/Other/2002-01-31-CallGraph.ll create mode 100644 test/Other/2002-02-24-InlineBrokePHINodes.ll create mode 100644 test/Other/2002-03-11-ConstPropCrash.ll create mode 100644 test/Other/2003-02-19-LoopInfoNestingBug.ll create mode 100644 test/Other/2004-08-16-PackedConstantInlineStore.ll create mode 100644 test/Other/2004-08-16-PackedGlobalConstant.ll create mode 100644 test/Other/2004-08-16-PackedSelect.ll create mode 100644 test/Other/2004-08-16-PackedSimple.ll create mode 100644 test/Other/2004-08-20-PackedControlFlow.ll create mode 100644 test/Other/2006-02-05-PassManager.ll create mode 100644 test/Other/2007-04-24-eliminate-mostly-empty-blocks.ll create mode 100644 test/Other/2007-06-05-PassID.ll create mode 100644 test/Other/2007-06-28-PassManager.ll create mode 100644 test/Other/2007-09-10-PassManager.ll create mode 100644 test/Other/2008-02-14-PassManager.ll create mode 100644 test/Other/2008-06-04-FieldSizeInPacked.ll create mode 100644 test/Other/2008-10-06-RemoveDeadPass.ll create mode 100644 test/Other/2008-10-15-MissingSpace.ll create mode 100644 test/Other/2009-03-31-CallGraph.ll create mode 100644 test/Other/2009-06-05-no-implicit-float.ll create mode 100644 test/Other/2009-09-14-function-elements.ll create mode 100644 test/Other/2010-05-06-Printer.ll create mode 100644 test/Other/FileCheck-space.txt create mode 100755 test/Other/Inputs/TestProg/TestProg create mode 100644 test/Other/Inputs/llvm_cov.gcda create mode 100644 test/Other/Inputs/llvm_cov.gcno create mode 100644 test/Other/ResponseFile.ll create mode 100644 test/Other/X86/inline-asm-newline-terminator.ll create mode 100644 test/Other/X86/lit.local.cfg create mode 100644 test/Other/attribute-comment.ll create mode 100644 test/Other/can-execute.txt create mode 100644 test/Other/close-stderr.ll create mode 100644 test/Other/constant-fold-gep-address-spaces.ll create mode 100644 test/Other/constant-fold-gep.ll create mode 100644 test/Other/extract-alias.ll create mode 100644 test/Other/extract-linkonce.ll create mode 100644 test/Other/extract-weak-odr.ll create mode 100644 test/Other/extract.ll create mode 100644 test/Other/invalid-commandline-option.ll create mode 100644 test/Other/link-opts.ll create mode 100644 test/Other/lint.ll create mode 100644 test/Other/llvm-cov.test create mode 100644 test/Other/llvm-nm-without-aliases.ll create mode 100644 test/Other/optimize-options.ll create mode 100644 test/Other/pipefail.txt create mode 100644 test/Other/spir_cc.ll create mode 100644 test/Other/umask.ll create mode 100644 test/TableGen/2003-08-03-PassCode.td create mode 100644 test/TableGen/2006-09-18-LargeInt.td create mode 100644 test/TableGen/2010-03-24-PrematureDefaults.td create mode 100644 test/TableGen/AnonDefinitionOnDemand.td create mode 100644 test/TableGen/BitsInitOverflow.td create mode 100644 test/TableGen/CStyleComment.td create mode 100644 test/TableGen/Dag.td create mode 100644 test/TableGen/DefmInherit.td create mode 100644 test/TableGen/DefmInsideMultiClass.td create mode 100644 test/TableGen/FieldAccess.td create mode 100644 test/TableGen/ForeachList.td create mode 100644 test/TableGen/ForeachLoop.td create mode 100644 test/TableGen/ForwardRef.td create mode 100644 test/TableGen/GeneralList.td create mode 100644 test/TableGen/Include.inc create mode 100644 test/TableGen/Include.td create mode 100644 test/TableGen/IntBitInit.td create mode 100644 test/TableGen/LazyChange.td create mode 100644 test/TableGen/LetInsideMultiClasses.td create mode 100644 test/TableGen/ListArgs.td create mode 100644 test/TableGen/ListArgsSimple.td create mode 100644 test/TableGen/ListConversion.td create mode 100644 test/TableGen/ListManip.td create mode 100644 test/TableGen/ListOfList.td create mode 100644 test/TableGen/ListSlices.td create mode 100644 test/TableGen/LoLoL.td create mode 100644 test/TableGen/MultiClass.td create mode 100644 test/TableGen/MultiClassDefName.td create mode 100644 test/TableGen/MultiClassInherit.td create mode 100644 test/TableGen/MultiPat.td create mode 100644 test/TableGen/NestedForeach.td create mode 100644 test/TableGen/Paste.td create mode 100644 test/TableGen/SetTheory.td create mode 100644 test/TableGen/SiblingForeach.td create mode 100644 test/TableGen/Slice.td create mode 100644 test/TableGen/String.td create mode 100644 test/TableGen/SuperSubclassSameName.td create mode 100644 test/TableGen/TargetInstrInfo.td create mode 100644 test/TableGen/TargetInstrSpec.td create mode 100644 test/TableGen/TemplateArgRename.td create mode 100644 test/TableGen/Tree.td create mode 100644 test/TableGen/TreeNames.td create mode 100644 test/TableGen/TwoLevelName.td create mode 100644 test/TableGen/UnsetBitInit.td create mode 100644 test/TableGen/UnterminatedComment.td create mode 100644 test/TableGen/cast.td create mode 100644 test/TableGen/defmclass.td create mode 100644 test/TableGen/eq.td create mode 100644 test/TableGen/eqbit.td create mode 100644 test/TableGen/foreach.td create mode 100644 test/TableGen/if.td create mode 100644 test/TableGen/ifbit.td create mode 100644 test/TableGen/intrinsic-order.td create mode 100644 test/TableGen/intrinsic-varargs.td create mode 100644 test/TableGen/lisp.td create mode 100644 test/TableGen/list-element-bitref.td create mode 100644 test/TableGen/lit.local.cfg create mode 100644 test/TableGen/math.td create mode 100644 test/TableGen/nested-comment.td create mode 100644 test/TableGen/pr8330.td create mode 100644 test/TableGen/strconcat.td create mode 100644 test/TableGen/subst.td create mode 100644 test/TableGen/subst2.td create mode 100644 test/TableGen/usevalname.td create mode 100755 test/TestRunner.sh create mode 100644 test/Transforms/ADCE/2002-01-31-UseStuckAround.ll create mode 100644 test/Transforms/ADCE/2002-05-22-PHITest.ll create mode 100644 test/Transforms/ADCE/2002-05-23-ZeroArgPHITest.ll create mode 100644 test/Transforms/ADCE/2002-05-28-Crash-distilled.ll create mode 100644 test/Transforms/ADCE/2002-05-28-Crash.ll create mode 100644 test/Transforms/ADCE/2002-07-17-AssertionFailure.ll create mode 100644 test/Transforms/ADCE/2002-07-17-PHIAssertion.ll create mode 100644 test/Transforms/ADCE/2002-07-29-Segfault.ll create mode 100644 test/Transforms/ADCE/2003-01-22-PredecessorProblem.ll create mode 100644 test/Transforms/ADCE/2003-04-25-PHIPostDominateProblem.ll create mode 100644 test/Transforms/ADCE/2003-06-11-InvalidCFG.ll create mode 100644 test/Transforms/ADCE/2003-06-24-BadSuccessor.ll create mode 100644 test/Transforms/ADCE/2003-06-24-BasicFunctionality.ll create mode 100644 test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll create mode 100644 test/Transforms/ADCE/2003-09-15-InfLoopCrash.ll create mode 100644 test/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll create mode 100644 test/Transforms/ADCE/2004-05-04-UnreachableBlock.ll create mode 100644 test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll create mode 100644 test/Transforms/ADCE/basictest.ll create mode 100644 test/Transforms/ADCE/basictest1.ll create mode 100644 test/Transforms/ADCE/basictest2.ll create mode 100644 test/Transforms/ADCE/dce_pure_call.ll create mode 100644 test/Transforms/ADCE/dce_pure_invoke.ll create mode 100644 test/Transforms/ADCE/unreachable-function.ll create mode 100644 test/Transforms/ArgumentPromotion/2008-02-01-ReturnAttrs.ll create mode 100644 test/Transforms/ArgumentPromotion/2008-07-02-array-indexing.ll create mode 100644 test/Transforms/ArgumentPromotion/2008-09-07-CGUpdate.ll create mode 100644 test/Transforms/ArgumentPromotion/2008-09-08-CGUpdateSelfEdge.ll create mode 100644 test/Transforms/ArgumentPromotion/aggregate-promote.ll create mode 100644 test/Transforms/ArgumentPromotion/attrs.ll create mode 100644 test/Transforms/ArgumentPromotion/basictest.ll create mode 100644 test/Transforms/ArgumentPromotion/byval-2.ll create mode 100644 test/Transforms/ArgumentPromotion/byval.ll create mode 100644 test/Transforms/ArgumentPromotion/callgraph-update.ll create mode 100644 test/Transforms/ArgumentPromotion/chained.ll create mode 100644 test/Transforms/ArgumentPromotion/control-flow.ll create mode 100644 test/Transforms/ArgumentPromotion/control-flow2.ll create mode 100644 test/Transforms/ArgumentPromotion/crash.ll create mode 100644 test/Transforms/ArgumentPromotion/pr3085.ll create mode 100644 test/Transforms/ArgumentPromotion/reserve-tbaa.ll create mode 100644 test/Transforms/BBVectorize/X86/cmp-types.ll create mode 100644 test/Transforms/BBVectorize/X86/loop1.ll create mode 100644 test/Transforms/BBVectorize/X86/pr15289.ll create mode 100644 test/Transforms/BBVectorize/X86/sh-rec.ll create mode 100644 test/Transforms/BBVectorize/X86/sh-rec2.ll create mode 100644 test/Transforms/BBVectorize/X86/sh-rec3.ll create mode 100644 test/Transforms/BBVectorize/X86/sh-types.ll create mode 100644 test/Transforms/BBVectorize/X86/simple-int.ll create mode 100644 test/Transforms/BBVectorize/X86/simple-ldstr.ll create mode 100644 test/Transforms/BBVectorize/X86/simple.ll create mode 100644 test/Transforms/BBVectorize/X86/vs-cast.ll create mode 100644 test/Transforms/BBVectorize/X86/wr-aliases.ll create mode 100644 test/Transforms/BBVectorize/cycle.ll create mode 100644 test/Transforms/BBVectorize/func-alias.ll create mode 100644 test/Transforms/BBVectorize/ld1.ll create mode 100644 test/Transforms/BBVectorize/lit.local.cfg create mode 100644 test/Transforms/BBVectorize/loop1.ll create mode 100644 test/Transforms/BBVectorize/mem-op-depth.ll create mode 100644 test/Transforms/BBVectorize/metadata.ll create mode 100644 test/Transforms/BBVectorize/no-ldstr-conn.ll create mode 100644 test/Transforms/BBVectorize/req-depth.ll create mode 100644 test/Transforms/BBVectorize/search-limit.ll create mode 100644 test/Transforms/BBVectorize/simple-int.ll create mode 100644 test/Transforms/BBVectorize/simple-ldstr-ptrs.ll create mode 100644 test/Transforms/BBVectorize/simple-ldstr.ll create mode 100644 test/Transforms/BBVectorize/simple-sel.ll create mode 100644 test/Transforms/BBVectorize/simple-tst.ll create mode 100644 test/Transforms/BBVectorize/simple.ll create mode 100644 test/Transforms/BBVectorize/simple3.ll create mode 100644 test/Transforms/BBVectorize/xcore/no-vector-registers.ll create mode 100644 test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll create mode 100644 test/Transforms/CodeExtractor/2004-03-13-LoopExtractorCrash.ll create mode 100644 test/Transforms/CodeExtractor/2004-03-14-DominanceProblem.ll create mode 100644 test/Transforms/CodeExtractor/2004-03-14-NoSwitchSupport.ll create mode 100644 test/Transforms/CodeExtractor/2004-03-17-MissedLiveIns.ll create mode 100644 test/Transforms/CodeExtractor/2004-03-17-UpdatePHIsOutsideRegion.ll create mode 100644 test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll create mode 100644 test/Transforms/CodeExtractor/2004-08-12-BlockExtractPHI.ll create mode 100644 test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll create mode 100644 test/Transforms/CodeGenPrepare/2008-11-24-RAUW-Self.ll create mode 100644 test/Transforms/CodeGenPrepare/basic.ll create mode 100644 test/Transforms/ConstProp/2002-05-03-DivideByZeroException.ll create mode 100644 test/Transforms/ConstProp/2002-05-03-NotOperator.ll create mode 100644 test/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll create mode 100644 test/Transforms/ConstProp/2003-05-12-DivideError.ll create mode 100644 test/Transforms/ConstProp/2005-01-28-SetCCGEP.ll create mode 100644 test/Transforms/ConstProp/2006-11-30-vector-cast.ll create mode 100644 test/Transforms/ConstProp/2006-12-01-TruncBoolBug.ll create mode 100644 test/Transforms/ConstProp/2006-12-01-bool-casts.ll create mode 100644 test/Transforms/ConstProp/2007-02-05-BitCast.ll create mode 100644 test/Transforms/ConstProp/2007-02-23-sdiv.ll create mode 100644 test/Transforms/ConstProp/2007-11-23-cttz.ll create mode 100644 test/Transforms/ConstProp/2008-07-07-VectorCompare.ll create mode 100644 test/Transforms/ConstProp/2009-06-20-constexpr-zero-lhs.ll create mode 100644 test/Transforms/ConstProp/2009-09-01-GEP-Crash.ll create mode 100644 test/Transforms/ConstProp/basictest.ll create mode 100644 test/Transforms/ConstProp/bitcast.ll create mode 100644 test/Transforms/ConstProp/bswap.ll create mode 100644 test/Transforms/ConstProp/calls.ll create mode 100644 test/Transforms/ConstProp/constant-expr.ll create mode 100644 test/Transforms/ConstProp/div-zero.ll create mode 100644 test/Transforms/ConstProp/extractvalue.ll create mode 100644 test/Transforms/ConstProp/float-to-ptr-cast.ll create mode 100644 test/Transforms/ConstProp/insertvalue.ll create mode 100644 test/Transforms/ConstProp/loads.ll create mode 100644 test/Transforms/ConstProp/logicaltest.ll create mode 100644 test/Transforms/ConstProp/overflow-ops.ll create mode 100644 test/Transforms/ConstProp/phi.ll create mode 100644 test/Transforms/ConstProp/remtest.ll create mode 100644 test/Transforms/ConstantMerge/2002-09-23-CPR-Update.ll create mode 100644 test/Transforms/ConstantMerge/2003-10-28-MergeExternalConstants.ll create mode 100644 test/Transforms/ConstantMerge/2011-01-15-EitherOrder.ll create mode 100644 test/Transforms/ConstantMerge/align.ll create mode 100644 test/Transforms/ConstantMerge/dont-merge.ll create mode 100644 test/Transforms/ConstantMerge/linker-private.ll create mode 100644 test/Transforms/ConstantMerge/merge-both.ll create mode 100644 test/Transforms/ConstantMerge/unnamed-addr.ll create mode 100644 test/Transforms/CorrelatedValuePropagation/2010-09-02-Trunc.ll create mode 100644 test/Transforms/CorrelatedValuePropagation/2010-09-26-MergeConstantRange.ll create mode 100644 test/Transforms/CorrelatedValuePropagation/basic.ll create mode 100644 test/Transforms/CorrelatedValuePropagation/crash.ll create mode 100644 test/Transforms/CorrelatedValuePropagation/non-null.ll create mode 100644 test/Transforms/CorrelatedValuePropagation/range.ll create mode 100644 test/Transforms/DeadArgElim/2006-06-27-struct-ret.ll create mode 100644 test/Transforms/DeadArgElim/2007-02-07-FuncRename.ll create mode 100644 test/Transforms/DeadArgElim/2007-10-18-VarargsReturn.ll create mode 100644 test/Transforms/DeadArgElim/2007-12-20-ParamAttrs.ll create mode 100644 test/Transforms/DeadArgElim/2008-01-16-VarargsParamAttrs.ll create mode 100644 test/Transforms/DeadArgElim/2008-06-23-DeadAfterLive.ll create mode 100644 test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll create mode 100644 test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll create mode 100644 test/Transforms/DeadArgElim/2013-05-17-VarargsAndBlockAddress.ll create mode 100644 test/Transforms/DeadArgElim/basictest.ll create mode 100644 test/Transforms/DeadArgElim/canon.ll create mode 100644 test/Transforms/DeadArgElim/dbginfo.ll create mode 100644 test/Transforms/DeadArgElim/dead_vaargs.ll create mode 100644 test/Transforms/DeadArgElim/deadexternal.ll create mode 100644 test/Transforms/DeadArgElim/deadretval.ll create mode 100644 test/Transforms/DeadArgElim/deadretval2.ll create mode 100644 test/Transforms/DeadArgElim/keepalive.ll create mode 100644 test/Transforms/DeadArgElim/linkage.ll create mode 100644 test/Transforms/DeadArgElim/multdeadretval.ll create mode 100644 test/Transforms/DeadArgElim/returned.ll create mode 100644 test/Transforms/DeadArgElim/variadic_safety.ll create mode 100644 test/Transforms/DeadStoreElimination/2011-03-25-DSEMiscompile.ll create mode 100644 test/Transforms/DeadStoreElimination/2011-09-06-EndOfFunction.ll create mode 100644 test/Transforms/DeadStoreElimination/2011-09-06-MemCpy.ll create mode 100644 test/Transforms/DeadStoreElimination/OverwriteStoreEnd.ll create mode 100644 test/Transforms/DeadStoreElimination/PartialStore.ll create mode 100644 test/Transforms/DeadStoreElimination/atomic.ll create mode 100644 test/Transforms/DeadStoreElimination/const-pointers.ll create mode 100644 test/Transforms/DeadStoreElimination/crash.ll create mode 100644 test/Transforms/DeadStoreElimination/dominate.ll create mode 100644 test/Transforms/DeadStoreElimination/free.ll create mode 100644 test/Transforms/DeadStoreElimination/inst-limits.ll create mode 100644 test/Transforms/DeadStoreElimination/libcalls.ll create mode 100644 test/Transforms/DeadStoreElimination/lifetime.ll create mode 100644 test/Transforms/DeadStoreElimination/memintrinsics.ll create mode 100644 test/Transforms/DeadStoreElimination/no-targetdata.ll create mode 100644 test/Transforms/DeadStoreElimination/pr11390.ll create mode 100644 test/Transforms/DeadStoreElimination/simple.ll create mode 100644 test/Transforms/DebugIR/crash.ll create mode 100644 test/Transforms/DebugIR/exception.ll create mode 100644 test/Transforms/DebugIR/function.ll create mode 100644 test/Transforms/DebugIR/simple-addrspace.ll create mode 100644 test/Transforms/DebugIR/simple.ll create mode 100644 test/Transforms/DebugIR/struct.ll create mode 100644 test/Transforms/DebugIR/vector.ll create mode 100644 test/Transforms/EarlyCSE/basic.ll create mode 100644 test/Transforms/EarlyCSE/commute.ll create mode 100644 test/Transforms/EarlyCSE/floatingpoint.ll create mode 100644 test/Transforms/EarlyCSE/instsimplify-dom.ll create mode 100644 test/Transforms/FunctionAttrs/2008-09-03-Mutual.ll create mode 100644 test/Transforms/FunctionAttrs/2008-09-03-ReadNone.ll create mode 100644 test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll create mode 100644 test/Transforms/FunctionAttrs/2008-09-13-VolatileRead.ll create mode 100644 test/Transforms/FunctionAttrs/2008-12-29-Constant.ll create mode 100644 test/Transforms/FunctionAttrs/2009-01-02-LocalStores.ll create mode 100644 test/Transforms/FunctionAttrs/2009-01-04-Annotate.ll create mode 100644 test/Transforms/FunctionAttrs/2010-10-30-volatile.ll create mode 100644 test/Transforms/FunctionAttrs/annotate-1.ll create mode 100644 test/Transforms/FunctionAttrs/atomic.ll create mode 100644 test/Transforms/FunctionAttrs/nocapture.ll create mode 100644 test/Transforms/FunctionAttrs/noreturn.ll create mode 100644 test/Transforms/FunctionAttrs/readattrs.ll create mode 100644 test/Transforms/GCOVProfiling/linkagename.ll create mode 100644 test/Transforms/GCOVProfiling/version.ll create mode 100644 test/Transforms/GVN/2007-07-25-DominatedLoop.ll create mode 100644 test/Transforms/GVN/2007-07-25-InfiniteLoop.ll create mode 100644 test/Transforms/GVN/2007-07-25-Loop.ll create mode 100644 test/Transforms/GVN/2007-07-25-NestedLoop.ll create mode 100644 test/Transforms/GVN/2007-07-25-SinglePredecessor.ll create mode 100644 test/Transforms/GVN/2007-07-26-InterlockingLoops.ll create mode 100644 test/Transforms/GVN/2007-07-26-NonRedundant.ll create mode 100644 test/Transforms/GVN/2007-07-26-PhiErasure.ll create mode 100644 test/Transforms/GVN/2007-07-30-PredIDom.ll create mode 100644 test/Transforms/GVN/2007-07-31-NoDomInherit.ll create mode 100644 test/Transforms/GVN/2007-07-31-RedundantPhi.ll create mode 100644 test/Transforms/GVN/2008-02-12-UndefLoad.ll create mode 100644 test/Transforms/GVN/2008-02-13-NewPHI.ll create mode 100644 test/Transforms/GVN/2008-07-02-Unreachable.ll create mode 100644 test/Transforms/GVN/2008-12-09-SelfRemove.ll create mode 100644 test/Transforms/GVN/2008-12-12-RLE-Crash.ll create mode 100644 test/Transforms/GVN/2008-12-14-rle-reanalyze.ll create mode 100644 test/Transforms/GVN/2008-12-15-CacheVisited.ll create mode 100644 test/Transforms/GVN/2009-01-21-SortInvalidation.ll create mode 100644 test/Transforms/GVN/2009-01-22-SortInvalidation.ll create mode 100644 test/Transforms/GVN/2009-02-17-LoadPRECrash.ll create mode 100644 test/Transforms/GVN/2009-03-10-PREOnVoid.ll create mode 100644 test/Transforms/GVN/2009-06-17-InvalidPRE.ll create mode 100644 test/Transforms/GVN/2009-07-13-MemDepSortFail.ll create mode 100644 test/Transforms/GVN/2009-11-12-MemDepMallocBitCast.ll create mode 100644 test/Transforms/GVN/2010-03-31-RedundantPHIs.ll create mode 100644 test/Transforms/GVN/2010-05-08-OneBit.ll create mode 100644 test/Transforms/GVN/2010-11-13-Simplify.ll create mode 100644 test/Transforms/GVN/2011-04-27-phioperands.ll create mode 100644 test/Transforms/GVN/2011-06-01-NonLocalMemdepMiscompile.ll create mode 100644 test/Transforms/GVN/2011-07-07-MatchIntrinsicExtract.ll create mode 100644 test/Transforms/GVN/2011-09-07-TypeIdFor.ll create mode 100644 test/Transforms/GVN/2012-05-22-PreCrash.ll create mode 100644 test/Transforms/GVN/MemdepMiscompile.ll create mode 100644 test/Transforms/GVN/atomic.ll create mode 100644 test/Transforms/GVN/basic.ll create mode 100644 test/Transforms/GVN/bitcast-of-call.ll create mode 100644 test/Transforms/GVN/calls-nonlocal.ll create mode 100644 test/Transforms/GVN/calls-readonly.ll create mode 100644 test/Transforms/GVN/commute.ll create mode 100644 test/Transforms/GVN/cond_br.ll create mode 100644 test/Transforms/GVN/cond_br2.ll create mode 100644 test/Transforms/GVN/condprop.ll create mode 100644 test/Transforms/GVN/crash-no-aa.ll create mode 100644 test/Transforms/GVN/crash.ll create mode 100644 test/Transforms/GVN/edge.ll create mode 100644 test/Transforms/GVN/fpmath.ll create mode 100644 test/Transforms/GVN/lifetime-simple.ll create mode 100644 test/Transforms/GVN/load-constant-mem.ll create mode 100644 test/Transforms/GVN/load-pre-align.ll create mode 100644 test/Transforms/GVN/load-pre-licm.ll create mode 100644 test/Transforms/GVN/local-pre.ll create mode 100644 test/Transforms/GVN/lpre-call-wrap-2.ll create mode 100644 test/Transforms/GVN/lpre-call-wrap.ll create mode 100644 test/Transforms/GVN/malloc-load-removal.ll create mode 100644 test/Transforms/GVN/non-local-offset.ll create mode 100644 test/Transforms/GVN/nonescaping-malloc.ll create mode 100644 test/Transforms/GVN/null-aliases-nothing.ll create mode 100644 test/Transforms/GVN/phi-translate-partial-alias.ll create mode 100644 test/Transforms/GVN/phi-translate.ll create mode 100644 test/Transforms/GVN/pr10820.ll create mode 100644 test/Transforms/GVN/pr12979.ll create mode 100644 test/Transforms/GVN/pr14166.ll create mode 100644 test/Transforms/GVN/pr17732.ll create mode 100644 test/Transforms/GVN/pr17852.ll create mode 100644 test/Transforms/GVN/pre-basic-add.ll create mode 100644 test/Transforms/GVN/pre-compare.ll create mode 100644 test/Transforms/GVN/pre-load.ll create mode 100644 test/Transforms/GVN/pre-single-pred.ll create mode 100644 test/Transforms/GVN/preserve-tbaa.ll create mode 100644 test/Transforms/GVN/range.ll create mode 100644 test/Transforms/GVN/readattrs.ll create mode 100644 test/Transforms/GVN/rle-must-alias.ll create mode 100644 test/Transforms/GVN/rle-no-phi-translate.ll create mode 100644 test/Transforms/GVN/rle-nonlocal.ll create mode 100644 test/Transforms/GVN/rle-phi-translate.ll create mode 100644 test/Transforms/GVN/rle-semidominated.ll create mode 100644 test/Transforms/GVN/rle.ll create mode 100644 test/Transforms/GVN/tbaa.ll create mode 100644 test/Transforms/GVN/unreachable_block_infinite_loop.ll create mode 100644 test/Transforms/GlobalDCE/2002-07-17-CastRef.ll create mode 100644 test/Transforms/GlobalDCE/2002-07-17-ConstantRef.ll create mode 100644 test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll create mode 100644 test/Transforms/GlobalDCE/2002-08-17-WorkListTest.ll create mode 100644 test/Transforms/GlobalDCE/2002-09-12-Redeletion.ll create mode 100644 test/Transforms/GlobalDCE/2003-07-01-SelfReference.ll create mode 100644 test/Transforms/GlobalDCE/2003-10-09-PreserveWeakGlobals.ll create mode 100644 test/Transforms/GlobalDCE/2009-01-05-DeadAliases.ll create mode 100644 test/Transforms/GlobalDCE/2009-02-17-AliasUsesAliasee.ll create mode 100644 test/Transforms/GlobalDCE/basicvariabletest.ll create mode 100644 test/Transforms/GlobalDCE/complex-constantexpr.ll create mode 100644 test/Transforms/GlobalDCE/externally_available.ll create mode 100644 test/Transforms/GlobalDCE/indirectbr.ll create mode 100644 test/Transforms/GlobalOpt/2004-10-10-CastStoreOnce.ll create mode 100644 test/Transforms/GlobalOpt/2005-06-15-LocalizeConstExprCrash.ll create mode 100644 test/Transforms/GlobalOpt/2005-09-27-Crash.ll create mode 100644 test/Transforms/GlobalOpt/2006-07-07-InlineAsmCrash.ll create mode 100644 test/Transforms/GlobalOpt/2006-11-01-ShrinkGlobalPhiCrash.ll create mode 100644 test/Transforms/GlobalOpt/2007-04-05-Crash.ll create mode 100644 test/Transforms/GlobalOpt/2007-05-13-Crash.ll create mode 100644 test/Transforms/GlobalOpt/2007-06-04-PackedStruct.ll create mode 100644 test/Transforms/GlobalOpt/2007-11-09-GEP-GEP-Crash.ll create mode 100644 test/Transforms/GlobalOpt/2008-01-03-Crash.ll create mode 100644 test/Transforms/GlobalOpt/2008-01-13-OutOfRangeSROA.ll create mode 100644 test/Transforms/GlobalOpt/2008-01-29-VolatileGlobal.ll create mode 100644 test/Transforms/GlobalOpt/2008-04-26-SROA-Global-Align.ll create mode 100644 test/Transforms/GlobalOpt/2008-07-17-addrspace.ll create mode 100644 test/Transforms/GlobalOpt/2008-12-16-HeapSRACrash-2.ll create mode 100644 test/Transforms/GlobalOpt/2008-12-16-HeapSRACrash.ll create mode 100644 test/Transforms/GlobalOpt/2009-01-13-phi-user.ll create mode 100644 test/Transforms/GlobalOpt/2009-02-15-BitcastAlias.ll create mode 100644 test/Transforms/GlobalOpt/2009-02-15-ResolveAlias.ll create mode 100644 test/Transforms/GlobalOpt/2009-03-05-dbg.ll create mode 100644 test/Transforms/GlobalOpt/2009-03-06-Anonymous.ll create mode 100644 test/Transforms/GlobalOpt/2009-03-07-PromotePtrToBool.ll create mode 100644 test/Transforms/GlobalOpt/2009-06-01-RecursivePHI.ll create mode 100644 test/Transforms/GlobalOpt/2009-11-16-BrokenPerformHeapAllocSRoA.ll create mode 100644 test/Transforms/GlobalOpt/2009-11-16-MallocSingleStoreToGlobalVar.ll create mode 100644 test/Transforms/GlobalOpt/2010-02-25-MallocPromote.ll create mode 100644 test/Transforms/GlobalOpt/2010-02-26-MallocSROA.ll create mode 100644 test/Transforms/GlobalOpt/2010-10-19-WeakOdr.ll create mode 100644 test/Transforms/GlobalOpt/2011-04-09-EmptyGlobalCtors.ll create mode 100644 test/Transforms/GlobalOpt/2012-05-11-blockaddress.ll create mode 100644 test/Transforms/GlobalOpt/alias-resolve.ll create mode 100644 test/Transforms/GlobalOpt/alias-used.ll create mode 100644 test/Transforms/GlobalOpt/array-elem-refs.ll create mode 100644 test/Transforms/GlobalOpt/atexit.ll create mode 100644 test/Transforms/GlobalOpt/atomic.ll create mode 100644 test/Transforms/GlobalOpt/basictest.ll create mode 100644 test/Transforms/GlobalOpt/blockaddress.ll create mode 100644 test/Transforms/GlobalOpt/cleanup-pointer-root-users.ll create mode 100644 test/Transforms/GlobalOpt/compiler-used.ll create mode 100644 test/Transforms/GlobalOpt/constantexpr-dangle.ll create mode 100644 test/Transforms/GlobalOpt/constantfold-initializers.ll create mode 100644 test/Transforms/GlobalOpt/crash-2.ll create mode 100644 test/Transforms/GlobalOpt/crash.ll create mode 100644 test/Transforms/GlobalOpt/ctor-list-opt-constexpr.ll create mode 100644 test/Transforms/GlobalOpt/ctor-list-opt-inbounds.ll create mode 100644 test/Transforms/GlobalOpt/ctor-list-opt.ll create mode 100644 test/Transforms/GlobalOpt/cxx-dtor.ll create mode 100644 test/Transforms/GlobalOpt/deadfunction.ll create mode 100644 test/Transforms/GlobalOpt/deadglobal-2.ll create mode 100644 test/Transforms/GlobalOpt/deadglobal.ll create mode 100644 test/Transforms/GlobalOpt/externally-initialized-global-ctr.ll create mode 100644 test/Transforms/GlobalOpt/globalsra-partial.ll create mode 100644 test/Transforms/GlobalOpt/globalsra-unknown-index.ll create mode 100644 test/Transforms/GlobalOpt/globalsra.ll create mode 100644 test/Transforms/GlobalOpt/heap-sra-1.ll create mode 100644 test/Transforms/GlobalOpt/heap-sra-2.ll create mode 100644 test/Transforms/GlobalOpt/heap-sra-3.ll create mode 100644 test/Transforms/GlobalOpt/heap-sra-4.ll create mode 100644 test/Transforms/GlobalOpt/heap-sra-phi.ll create mode 100644 test/Transforms/GlobalOpt/integer-bool.ll create mode 100644 test/Transforms/GlobalOpt/invariant-nodatalayout.ll create mode 100644 test/Transforms/GlobalOpt/invariant.ll create mode 100644 test/Transforms/GlobalOpt/invoke.ll create mode 100644 test/Transforms/GlobalOpt/iterate.ll create mode 100644 test/Transforms/GlobalOpt/load-store-global.ll create mode 100644 test/Transforms/GlobalOpt/malloc-promote-1.ll create mode 100644 test/Transforms/GlobalOpt/malloc-promote-2.ll create mode 100644 test/Transforms/GlobalOpt/malloc-promote-3.ll create mode 100644 test/Transforms/GlobalOpt/memcpy.ll create mode 100644 test/Transforms/GlobalOpt/memset-null.ll create mode 100644 test/Transforms/GlobalOpt/memset.ll create mode 100644 test/Transforms/GlobalOpt/metadata.ll create mode 100644 test/Transforms/GlobalOpt/phi-select.ll create mode 100644 test/Transforms/GlobalOpt/storepointer-compare.ll create mode 100644 test/Transforms/GlobalOpt/storepointer.ll create mode 100644 test/Transforms/GlobalOpt/tls.ll create mode 100644 test/Transforms/GlobalOpt/trivialstore.ll create mode 100644 test/Transforms/GlobalOpt/undef-init.ll create mode 100644 test/Transforms/GlobalOpt/unnamed-addr.ll create mode 100644 test/Transforms/GlobalOpt/zeroinitializer-gep-load.ll create mode 100644 test/Transforms/IPConstantProp/2008-06-09-WeakProp.ll create mode 100644 test/Transforms/IPConstantProp/2009-09-24-byval-ptr.ll create mode 100644 test/Transforms/IPConstantProp/dangling-block-address.ll create mode 100644 test/Transforms/IPConstantProp/deadarg.ll create mode 100644 test/Transforms/IPConstantProp/global.ll create mode 100644 test/Transforms/IPConstantProp/recursion.ll create mode 100644 test/Transforms/IPConstantProp/return-argument.ll create mode 100644 test/Transforms/IPConstantProp/return-constant.ll create mode 100644 test/Transforms/IPConstantProp/return-constants.ll create mode 100644 test/Transforms/IPConstantProp/user-with-multiple-uses.ll create mode 100644 test/Transforms/IndVarSimplify/2002-09-09-PointerIndVar.ll create mode 100644 test/Transforms/IndVarSimplify/2003-04-16-ExprAnalysis.ll create mode 100644 test/Transforms/IndVarSimplify/2003-09-23-NotAtTop.ll create mode 100644 test/Transforms/IndVarSimplify/2003-12-10-RemoveInstrCrash.ll create mode 100644 test/Transforms/IndVarSimplify/2003-12-15-Crash.ll create mode 100644 test/Transforms/IndVarSimplify/2004-03-10-PHIInsertionBug.ll create mode 100644 test/Transforms/IndVarSimplify/2004-04-05-InvokeCastCrash.ll create mode 100644 test/Transforms/IndVarSimplify/2004-04-07-ScalarEvolutionCrash.ll create mode 100644 test/Transforms/IndVarSimplify/2005-02-11-InvokeCrash.ll create mode 100644 test/Transforms/IndVarSimplify/2005-02-17-TruncateExprCrash.ll create mode 100644 test/Transforms/IndVarSimplify/2005-02-26-ExitValueCompute.ll create mode 100644 test/Transforms/IndVarSimplify/2005-06-15-InstMoveCrash.ll create mode 100644 test/Transforms/IndVarSimplify/2005-11-18-Crash.ll create mode 100644 test/Transforms/IndVarSimplify/2006-03-31-NegativeStride.ll create mode 100644 test/Transforms/IndVarSimplify/2006-06-16-Indvar-LCSSA-Crash.ll create mode 100644 test/Transforms/IndVarSimplify/2006-09-20-LFTR-Crash.ll create mode 100644 test/Transforms/IndVarSimplify/2006-12-10-BitCast.ll create mode 100644 test/Transforms/IndVarSimplify/2007-01-06-TripCount.ll create mode 100644 test/Transforms/IndVarSimplify/2007-06-06-DeleteDanglesPtr.ll create mode 100644 test/Transforms/IndVarSimplify/2007-11-23-BitcastCrash.ll create mode 100644 test/Transforms/IndVarSimplify/2008-06-15-SCEVExpanderBug.ll create mode 100644 test/Transforms/IndVarSimplify/2008-09-02-IVType.ll create mode 100644 test/Transforms/IndVarSimplify/2008-10-03-CouldNotCompute.ll create mode 100644 test/Transforms/IndVarSimplify/2008-11-25-APFloatAssert.ll create mode 100644 test/Transforms/IndVarSimplify/2009-04-14-shorten_iv_vars.ll create mode 100644 test/Transforms/IndVarSimplify/2009-04-15-shorten-iv-vars-2.ll create mode 100644 test/Transforms/IndVarSimplify/2009-04-22-IndvarCrash.ll create mode 100644 test/Transforms/IndVarSimplify/2009-04-27-Floating.ll create mode 100644 test/Transforms/IndVarSimplify/2009-05-24-useafterfree.ll create mode 100644 test/Transforms/IndVarSimplify/2011-09-10-widen-nsw.ll create mode 100644 test/Transforms/IndVarSimplify/2011-09-19-vectoriv.ll create mode 100644 test/Transforms/IndVarSimplify/2011-09-27-hoistsext.ll create mode 100644 test/Transforms/IndVarSimplify/2011-10-27-lftrnull.ll create mode 100644 test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll create mode 100644 test/Transforms/IndVarSimplify/2011-11-15-multiexit.ll create mode 100644 test/Transforms/IndVarSimplify/2011-11-17-selfphi.ll create mode 100644 test/Transforms/IndVarSimplify/2012-07-17-lftr-undef.ll create mode 100644 test/Transforms/IndVarSimplify/2012-10-19-congruent-constant.ll create mode 100644 test/Transforms/IndVarSimplify/ada-loops.ll create mode 100644 test/Transforms/IndVarSimplify/ashr-tripcount.ll create mode 100644 test/Transforms/IndVarSimplify/avoid-i0.ll create mode 100644 test/Transforms/IndVarSimplify/casted-argument.ll create mode 100644 test/Transforms/IndVarSimplify/crash.ll create mode 100644 test/Transforms/IndVarSimplify/dangling-use.ll create mode 100644 test/Transforms/IndVarSimplify/divide-pointer.ll create mode 100644 test/Transforms/IndVarSimplify/dont-recompute.ll create mode 100644 test/Transforms/IndVarSimplify/elim-extend.ll create mode 100644 test/Transforms/IndVarSimplify/eliminate-comparison.ll create mode 100644 test/Transforms/IndVarSimplify/eliminate-max.ll create mode 100644 test/Transforms/IndVarSimplify/eliminate-rem.ll create mode 100644 test/Transforms/IndVarSimplify/exit_value_tests.ll create mode 100644 test/Transforms/IndVarSimplify/floating-point-iv.ll create mode 100644 test/Transforms/IndVarSimplify/indirectbr.ll create mode 100644 test/Transforms/IndVarSimplify/interesting-invoke-use.ll create mode 100644 test/Transforms/IndVarSimplify/iterationCount_zext_or_trunc.ll create mode 100644 test/Transforms/IndVarSimplify/iv-fold.ll create mode 100644 test/Transforms/IndVarSimplify/iv-sext.ll create mode 100644 test/Transforms/IndVarSimplify/iv-zext.ll create mode 100644 test/Transforms/IndVarSimplify/lftr-address-space-pointers.ll create mode 100644 test/Transforms/IndVarSimplify/lftr-extend-const.ll create mode 100644 test/Transforms/IndVarSimplify/lftr-other-uses.ll create mode 100644 test/Transforms/IndVarSimplify/lftr-promote.ll create mode 100644 test/Transforms/IndVarSimplify/lftr-reuse.ll create mode 100644 test/Transforms/IndVarSimplify/lftr-zext.ll create mode 100644 test/Transforms/IndVarSimplify/lftr_simple.ll create mode 100644 test/Transforms/IndVarSimplify/loop_evaluate10.ll create mode 100644 test/Transforms/IndVarSimplify/loop_evaluate11.ll create mode 100644 test/Transforms/IndVarSimplify/loop_evaluate7.ll create mode 100644 test/Transforms/IndVarSimplify/loop_evaluate8.ll create mode 100644 test/Transforms/IndVarSimplify/loop_evaluate9.ll create mode 100644 test/Transforms/IndVarSimplify/loop_evaluate_1.ll create mode 100644 test/Transforms/IndVarSimplify/loop_evaluate_2.ll create mode 100644 test/Transforms/IndVarSimplify/loop_evaluate_3.ll create mode 100644 test/Transforms/IndVarSimplify/loop_evaluate_4.ll create mode 100644 test/Transforms/IndVarSimplify/loop_evaluate_5.ll create mode 100644 test/Transforms/IndVarSimplify/loop_evaluate_6.ll create mode 100644 test/Transforms/IndVarSimplify/masked-iv.ll create mode 100644 test/Transforms/IndVarSimplify/no-iv-rewrite.ll create mode 100644 test/Transforms/IndVarSimplify/phi-uses-value-multiple-times.ll create mode 100644 test/Transforms/IndVarSimplify/polynomial-expand.ll create mode 100644 test/Transforms/IndVarSimplify/preserve-signed-wrap.ll create mode 100644 test/Transforms/IndVarSimplify/promote-iv-to-eliminate-casts.ll create mode 100644 test/Transforms/IndVarSimplify/shrunk-constant.ll create mode 100644 test/Transforms/IndVarSimplify/signed-trip-count.ll create mode 100644 test/Transforms/IndVarSimplify/single-element-range.ll create mode 100644 test/Transforms/IndVarSimplify/sink-alloca.ll create mode 100644 test/Transforms/IndVarSimplify/sink-trapping.ll create mode 100644 test/Transforms/IndVarSimplify/tripcount_compute.ll create mode 100644 test/Transforms/IndVarSimplify/tripcount_infinite.ll create mode 100644 test/Transforms/IndVarSimplify/udiv-invariant-but-traps.ll create mode 100644 test/Transforms/IndVarSimplify/udiv.ll create mode 100644 test/Transforms/IndVarSimplify/uglygep.ll create mode 100644 test/Transforms/IndVarSimplify/ult-sub-to-eq.ll create mode 100644 test/Transforms/IndVarSimplify/variable-stride-ivs-0.ll create mode 100644 test/Transforms/IndVarSimplify/variable-stride-ivs-1.ll create mode 100644 test/Transforms/IndVarSimplify/verify-scev.ll create mode 100644 test/Transforms/IndVarSimplify/widen-nsw.ll create mode 100644 test/Transforms/Inline/2003-09-14-InlineValue.ll create mode 100644 test/Transforms/Inline/2003-09-22-PHINodeInlineFail.ll create mode 100644 test/Transforms/Inline/2003-09-22-PHINodesInExceptionDest.ll create mode 100644 test/Transforms/Inline/2003-09-22-PHINodesInNormalInvokeDest.ll create mode 100644 test/Transforms/Inline/2003-10-13-AllocaDominanceProblem.ll create mode 100644 test/Transforms/Inline/2004-04-15-InlineDeletesCall.ll create mode 100644 test/Transforms/Inline/2004-04-20-InlineLinkOnce.ll create mode 100644 test/Transforms/Inline/2004-10-17-InlineFunctionWithoutReturn.ll create mode 100644 test/Transforms/Inline/2006-01-14-CallGraphUpdate.ll create mode 100644 test/Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll create mode 100644 test/Transforms/Inline/2006-11-09-InlineCGUpdate-2.ll create mode 100644 test/Transforms/Inline/2006-11-09-InlineCGUpdate.ll create mode 100644 test/Transforms/Inline/2007-04-15-InlineEH.ll create mode 100644 test/Transforms/Inline/2007-06-25-WeakInline.ll create mode 100644 test/Transforms/Inline/2007-12-19-InlineNoUnwind.ll create mode 100644 test/Transforms/Inline/2008-09-02-NoInline.ll create mode 100644 test/Transforms/Inline/2009-01-08-NoInlineDynamicAlloca.ll create mode 100644 test/Transforms/Inline/2009-01-13-RecursiveInlineCrash.ll create mode 100644 test/Transforms/Inline/2009-05-07-CallUsingSelfCrash.ll create mode 100644 test/Transforms/Inline/2010-05-12-ValueMap.ll create mode 100644 test/Transforms/Inline/2010-05-31-ByvalTailcall.ll create mode 100644 test/Transforms/Inline/PR4909.ll create mode 100644 test/Transforms/Inline/alloca-bonus.ll create mode 100644 test/Transforms/Inline/alloca-in-scc.ll create mode 100644 test/Transforms/Inline/alloca-merge-align-nodl.ll create mode 100644 test/Transforms/Inline/alloca-merge-align.ll create mode 100644 test/Transforms/Inline/alloca_test.ll create mode 100644 test/Transforms/Inline/always-inline.ll create mode 100644 test/Transforms/Inline/array_merge.ll create mode 100644 test/Transforms/Inline/attributes.ll create mode 100644 test/Transforms/Inline/basictest.ll create mode 100644 test/Transforms/Inline/blockaddress.ll create mode 100644 test/Transforms/Inline/byval.ll create mode 100644 test/Transforms/Inline/callgraph-update.ll create mode 100644 test/Transforms/Inline/casts.ll create mode 100644 test/Transforms/Inline/cfg_preserve_test.ll create mode 100644 test/Transforms/Inline/crash.ll create mode 100644 test/Transforms/Inline/crash2.ll create mode 100644 test/Transforms/Inline/delete-call.ll create mode 100644 test/Transforms/Inline/devirtualize-2.ll create mode 100644 test/Transforms/Inline/devirtualize-3.ll create mode 100644 test/Transforms/Inline/devirtualize.ll create mode 100644 test/Transforms/Inline/dynamic_alloca_test.ll create mode 100644 test/Transforms/Inline/externally_available.ll create mode 100644 test/Transforms/Inline/gvn-inline-iteration.ll create mode 100644 test/Transforms/Inline/inline-byval-bonus.ll create mode 100644 test/Transforms/Inline/inline-invoke-tail.ll create mode 100644 test/Transforms/Inline/inline-invoke-with-asm-call.ll create mode 100644 test/Transforms/Inline/inline-optnone.ll create mode 100644 test/Transforms/Inline/inline-optsize.ll create mode 100644 test/Transforms/Inline/inline-tail.ll create mode 100644 test/Transforms/Inline/inline_cleanup.ll create mode 100644 test/Transforms/Inline/inline_constprop.ll create mode 100644 test/Transforms/Inline/inline_dce.ll create mode 100644 test/Transforms/Inline/inline_invoke.ll create mode 100644 test/Transforms/Inline/inline_minisize.ll create mode 100644 test/Transforms/Inline/inline_prune.ll create mode 100644 test/Transforms/Inline/inline_returns_twice.ll create mode 100644 test/Transforms/Inline/inline_ssp.ll create mode 100644 test/Transforms/Inline/invoke-cost.ll create mode 100644 test/Transforms/Inline/invoke_test-1.ll create mode 100644 test/Transforms/Inline/invoke_test-2.ll create mode 100644 test/Transforms/Inline/invoke_test-3.ll create mode 100644 test/Transforms/Inline/lifetime-no-datalayout.ll create mode 100644 test/Transforms/Inline/lifetime.ll create mode 100644 test/Transforms/Inline/nested-inline.ll create mode 100644 test/Transforms/Inline/noinline-recursive-fn.ll create mode 100644 test/Transforms/Inline/noinline.ll create mode 100644 test/Transforms/Inline/ptr-diff.ll create mode 100644 test/Transforms/Inline/recursive.ll create mode 100644 test/Transforms/InstCombine/2002-03-11-InstCombineHang.ll create mode 100644 test/Transforms/InstCombine/2002-05-14-SubFailure.ll create mode 100644 test/Transforms/InstCombine/2002-08-02-CastTest.ll create mode 100644 test/Transforms/InstCombine/2002-12-05-MissedConstProp.ll create mode 100644 test/Transforms/InstCombine/2003-05-26-CastMiscompile.ll create mode 100644 test/Transforms/InstCombine/2003-05-27-ConstExprCrash.ll create mode 100644 test/Transforms/InstCombine/2003-06-05-BranchInvertInfLoop.ll create mode 100644 test/Transforms/InstCombine/2003-07-21-ExternalConstant.ll create mode 100644 test/Transforms/InstCombine/2003-08-12-AllocaNonNull.ll create mode 100644 test/Transforms/InstCombine/2003-09-09-VolatileLoadElim.ll create mode 100644 test/Transforms/InstCombine/2003-10-29-CallSiteResolve.ll create mode 100644 test/Transforms/InstCombine/2003-11-03-VarargsCallBug.ll create mode 100644 test/Transforms/InstCombine/2004-01-13-InstCombineInvokePHI.ll create mode 100644 test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll create mode 100644 test/Transforms/InstCombine/2004-03-13-InstCombineInfLoop.ll create mode 100644 test/Transforms/InstCombine/2004-04-04-InstCombineReplaceAllUsesWith.ll create mode 100644 test/Transforms/InstCombine/2004-05-07-UnsizedCastLoad.ll create mode 100644 test/Transforms/InstCombine/2004-07-27-ConstantExprMul.ll create mode 100644 test/Transforms/InstCombine/2004-08-09-RemInfLoop.ll create mode 100644 test/Transforms/InstCombine/2004-08-10-BoolSetCC.ll create mode 100644 test/Transforms/InstCombine/2004-09-20-BadLoadCombine.ll create mode 100644 test/Transforms/InstCombine/2004-09-20-BadLoadCombine2.ll create mode 100644 test/Transforms/InstCombine/2004-09-28-BadShiftAndSetCC.ll create mode 100644 test/Transforms/InstCombine/2004-11-22-Missed-and-fold.ll create mode 100644 test/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll create mode 100644 test/Transforms/InstCombine/2004-12-08-RemInfiniteLoop.ll create mode 100644 test/Transforms/InstCombine/2005-03-04-ShiftOverflow.ll create mode 100644 test/Transforms/InstCombine/2005-04-07-UDivSelectCrash.ll create mode 100644 test/Transforms/InstCombine/2005-06-15-DivSelectCrash.ll create mode 100644 test/Transforms/InstCombine/2005-06-15-ShiftSetCCCrash.ll create mode 100644 test/Transforms/InstCombine/2005-06-16-RangeCrash.ll create mode 100644 test/Transforms/InstCombine/2005-06-16-SetCCOrSetCCMiscompile.ll create mode 100644 test/Transforms/InstCombine/2005-07-07-DeadPHILoop.ll create mode 100644 test/Transforms/InstCombine/2006-02-13-DemandedMiscompile.ll create mode 100644 test/Transforms/InstCombine/2006-02-28-Crash.ll create mode 100644 test/Transforms/InstCombine/2006-03-30-ExtractElement.ll create mode 100644 test/Transforms/InstCombine/2006-04-28-ShiftShiftLongLong.ll create mode 100644 test/Transforms/InstCombine/2006-05-04-DemandedBitCrash.ll create mode 100644 test/Transforms/InstCombine/2006-09-15-CastToBool.ll create mode 100644 test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll create mode 100644 test/Transforms/InstCombine/2006-10-20-mask.ll create mode 100644 test/Transforms/InstCombine/2006-10-26-VectorReassoc.ll create mode 100644 test/Transforms/InstCombine/2006-11-10-ashr-miscompile.ll create mode 100644 test/Transforms/InstCombine/2006-12-01-BadFPVectorXform.ll create mode 100644 test/Transforms/InstCombine/2006-12-05-fp-to-int-ext.ll create mode 100644 test/Transforms/InstCombine/2006-12-08-Phi-ICmp-Op-Fold.ll create mode 100644 test/Transforms/InstCombine/2006-12-08-Select-ICmp.ll create mode 100644 test/Transforms/InstCombine/2006-12-15-Range-Test.ll create mode 100644 test/Transforms/InstCombine/2006-12-23-Select-Cmp-Cmp.ll create mode 100644 test/Transforms/InstCombine/2007-01-13-ExtCompareMiscompile.ll create mode 100644 test/Transforms/InstCombine/2007-01-14-FcmpSelf.ll create mode 100644 test/Transforms/InstCombine/2007-01-18-VectorInfLoop.ll create mode 100644 test/Transforms/InstCombine/2007-01-27-AndICmp.ll create mode 100644 test/Transforms/InstCombine/2007-02-01-LoadSinkAlloca.ll create mode 100644 test/Transforms/InstCombine/2007-02-07-PointerCast.ll create mode 100644 test/Transforms/InstCombine/2007-02-23-PhiFoldInfLoop.ll create mode 100644 test/Transforms/InstCombine/2007-03-13-CompareMerge.ll create mode 100644 test/Transforms/InstCombine/2007-03-19-BadTruncChangePR1261.ll create mode 100644 test/Transforms/InstCombine/2007-03-21-SignedRangeTest.ll create mode 100644 test/Transforms/InstCombine/2007-03-25-BadShiftMask.ll create mode 100644 test/Transforms/InstCombine/2007-03-25-DoubleShift.ll create mode 100644 test/Transforms/InstCombine/2007-03-26-BadShiftMask.ll create mode 100644 test/Transforms/InstCombine/2007-04-08-SingleEltVectorCrash.ll create mode 100644 test/Transforms/InstCombine/2007-05-10-icmp-or.ll create mode 100644 test/Transforms/InstCombine/2007-05-14-Crash.ll create mode 100644 test/Transforms/InstCombine/2007-05-18-CastFoldBug.ll create mode 100644 test/Transforms/InstCombine/2007-06-06-AshrSignBit.ll create mode 100644 test/Transforms/InstCombine/2007-06-21-DivCompareMiscomp.ll create mode 100644 test/Transforms/InstCombine/2007-08-02-InfiniteLoop.ll create mode 100644 test/Transforms/InstCombine/2007-09-10-AliasConstFold.ll create mode 100644 test/Transforms/InstCombine/2007-09-17-AliasConstFold2.ll create mode 100644 test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll create mode 100644 test/Transforms/InstCombine/2007-10-12-Crash.ll create mode 100644 test/Transforms/InstCombine/2007-10-28-stacksave.ll create mode 100644 test/Transforms/InstCombine/2007-10-31-RangeCrash.ll create mode 100644 test/Transforms/InstCombine/2007-10-31-StringCrash.ll create mode 100644 test/Transforms/InstCombine/2007-11-07-OpaqueAlignCrash.ll create mode 100644 test/Transforms/InstCombine/2007-11-15-CompareMiscomp.ll create mode 100644 test/Transforms/InstCombine/2007-11-22-IcmpCrash.ll create mode 100644 test/Transforms/InstCombine/2007-11-25-CompatibleAttributes.ll create mode 100644 test/Transforms/InstCombine/2007-12-10-ConstFoldCompare.ll create mode 100644 test/Transforms/InstCombine/2007-12-12-GEPScale.ll create mode 100644 test/Transforms/InstCombine/2007-12-16-AsmNoUnwind.ll create mode 100644 test/Transforms/InstCombine/2007-12-18-AddSelCmpSub.ll create mode 100644 test/Transforms/InstCombine/2007-12-28-IcmpSub2.ll create mode 100644 test/Transforms/InstCombine/2008-01-06-BitCastAttributes.ll create mode 100644 test/Transforms/InstCombine/2008-01-06-CastCrash.ll create mode 100644 test/Transforms/InstCombine/2008-01-06-VoidCast.ll create mode 100644 test/Transforms/InstCombine/2008-01-13-AndCmpCmp.ll create mode 100644 test/Transforms/InstCombine/2008-01-13-NoBitCastAttributes.ll create mode 100644 test/Transforms/InstCombine/2008-01-14-VarArgTrampoline.ll create mode 100644 test/Transforms/InstCombine/2008-01-21-MismatchedCastAndCompare.ll create mode 100644 test/Transforms/InstCombine/2008-01-21-MulTrunc.ll create mode 100644 test/Transforms/InstCombine/2008-01-27-FloatSelect.ll create mode 100644 test/Transforms/InstCombine/2008-01-29-AddICmp.ll create mode 100644 test/Transforms/InstCombine/2008-02-13-MulURem.ll create mode 100644 test/Transforms/InstCombine/2008-02-16-SDivOverflow.ll create mode 100644 test/Transforms/InstCombine/2008-02-16-SDivOverflow2.ll create mode 100644 test/Transforms/InstCombine/2008-02-23-MulSub.ll create mode 100644 test/Transforms/InstCombine/2008-02-28-OrFCmpCrash.ll create mode 100644 test/Transforms/InstCombine/2008-03-13-IntToPtr.ll create mode 100644 test/Transforms/InstCombine/2008-04-22-ByValBitcast.ll create mode 100644 test/Transforms/InstCombine/2008-04-28-VolatileStore.ll create mode 100644 test/Transforms/InstCombine/2008-04-29-VolatileLoadDontMerge.ll create mode 100644 test/Transforms/InstCombine/2008-04-29-VolatileLoadMerge.ll create mode 100644 test/Transforms/InstCombine/2008-05-08-LiveStoreDelete.ll create mode 100644 test/Transforms/InstCombine/2008-05-08-StrLenSink.ll create mode 100644 test/Transforms/InstCombine/2008-05-09-SinkOfInvoke.ll create mode 100644 test/Transforms/InstCombine/2008-05-17-InfLoop.ll create mode 100644 test/Transforms/InstCombine/2008-05-18-FoldIntToPtr.ll create mode 100644 test/Transforms/InstCombine/2008-05-22-IDivVector.ll create mode 100644 test/Transforms/InstCombine/2008-05-22-NegValVector.ll create mode 100644 test/Transforms/InstCombine/2008-05-23-CompareFold.ll create mode 100644 test/Transforms/InstCombine/2008-05-31-AddBool.ll create mode 100644 test/Transforms/InstCombine/2008-05-31-Bools.ll create mode 100644 test/Transforms/InstCombine/2008-06-05-ashr-crash.ll create mode 100644 test/Transforms/InstCombine/2008-06-08-ICmpPHI.ll create mode 100644 test/Transforms/InstCombine/2008-06-13-InfiniteLoopStore.ll create mode 100644 test/Transforms/InstCombine/2008-06-13-ReadOnlyCallStore.ll create mode 100644 test/Transforms/InstCombine/2008-06-19-UncondLoad.ll create mode 100644 test/Transforms/InstCombine/2008-06-21-CompareMiscomp.ll create mode 100644 test/Transforms/InstCombine/2008-06-24-StackRestore.ll create mode 100644 test/Transforms/InstCombine/2008-07-08-AndICmp.ll create mode 100644 test/Transforms/InstCombine/2008-07-08-ShiftOneAndOne.ll create mode 100644 test/Transforms/InstCombine/2008-07-08-SubAnd.ll create mode 100644 test/Transforms/InstCombine/2008-07-08-VolatileLoadMerge.ll create mode 100644 test/Transforms/InstCombine/2008-07-09-SubAndError.ll create mode 100644 test/Transforms/InstCombine/2008-07-10-CastSextBool.ll create mode 100644 test/Transforms/InstCombine/2008-07-10-ICmpBinOp.ll create mode 100644 test/Transforms/InstCombine/2008-07-11-RemAnd.ll create mode 100644 test/Transforms/InstCombine/2008-07-13-DivZero.ll create mode 100644 test/Transforms/InstCombine/2008-07-16-fsub.ll create mode 100644 test/Transforms/InstCombine/2008-07-16-sse2_storel_dq.ll create mode 100644 test/Transforms/InstCombine/2008-08-05-And.ll create mode 100644 test/Transforms/InstCombine/2008-08-17-ICmpXorSignbit.ll create mode 100644 test/Transforms/InstCombine/2008-09-02-VectorCrash.ll create mode 100644 test/Transforms/InstCombine/2008-09-29-FoldingOr.ll create mode 100644 test/Transforms/InstCombine/2008-10-11-DivCompareFold.ll create mode 100644 test/Transforms/InstCombine/2008-10-23-ConstFoldWithoutMask.ll create mode 100644 test/Transforms/InstCombine/2008-11-01-SRemDemandedBits.ll create mode 100644 test/Transforms/InstCombine/2008-11-08-FCmp.ll create mode 100644 test/Transforms/InstCombine/2008-11-20-DivMulRem.ll create mode 100644 test/Transforms/InstCombine/2008-11-27-IDivVector.ll create mode 100644 test/Transforms/InstCombine/2008-11-27-MultiplyIntVec.ll create mode 100644 test/Transforms/InstCombine/2008-11-27-UDivNegative.ll create mode 100644 test/Transforms/InstCombine/2008-12-17-SRemNegConstVec.ll create mode 100644 test/Transforms/InstCombine/2009-01-05-i128-crash.ll create mode 100644 test/Transforms/InstCombine/2009-01-08-AlignAlloca.ll create mode 100644 test/Transforms/InstCombine/2009-01-16-PointerAddrSpace.ll create mode 100644 test/Transforms/InstCombine/2009-01-19-fmod-constant-float-specials.ll create mode 100644 test/Transforms/InstCombine/2009-01-19-fmod-constant-float.ll create mode 100644 test/Transforms/InstCombine/2009-01-24-EmptyStruct.ll create mode 100644 test/Transforms/InstCombine/2009-01-31-InfIterate.ll create mode 100644 test/Transforms/InstCombine/2009-01-31-Pressure.ll create mode 100644 test/Transforms/InstCombine/2009-02-04-FPBitcast.ll create mode 100644 test/Transforms/InstCombine/2009-02-11-NotInitialized.ll create mode 100644 test/Transforms/InstCombine/2009-02-20-InstCombine-SROA.ll create mode 100644 test/Transforms/InstCombine/2009-02-21-LoadCST.ll create mode 100644 test/Transforms/InstCombine/2009-02-25-CrashZeroSizeArray.ll create mode 100644 test/Transforms/InstCombine/2009-03-18-vector-ashr-crash.ll create mode 100644 test/Transforms/InstCombine/2009-03-20-AShrOverShift.ll create mode 100644 test/Transforms/InstCombine/2009-03-24-InfLoop.ll create mode 100644 test/Transforms/InstCombine/2009-04-07-MulPromoteToI96.ll create mode 100644 test/Transforms/InstCombine/2009-05-23-FCmpToICmp.ll create mode 100644 test/Transforms/InstCombine/2009-06-11-StoreAddrSpace.ll create mode 100644 test/Transforms/InstCombine/2009-06-16-SRemDemandedBits.ll create mode 100644 test/Transforms/InstCombine/2009-07-02-MaskedIntVector.ll create mode 100644 test/Transforms/InstCombine/2009-12-17-CmpSelectNull.ll create mode 100644 test/Transforms/InstCombine/2010-01-28-NegativeSRem.ll create mode 100644 test/Transforms/InstCombine/2010-03-03-ExtElim.ll create mode 100644 test/Transforms/InstCombine/2010-05-30-memcpy-Struct.ll create mode 100644 test/Transforms/InstCombine/2010-11-01-lshr-mask.ll create mode 100644 test/Transforms/InstCombine/2010-11-21-SizeZeroTypeGEP.ll create mode 100644 test/Transforms/InstCombine/2010-11-23-Distributed.ll create mode 100644 test/Transforms/InstCombine/2011-02-14-InfLoop.ll create mode 100644 test/Transforms/InstCombine/2011-03-08-SRemMinusOneBadOpt.ll create mode 100644 test/Transforms/InstCombine/2011-05-02-VectorBoolean.ll create mode 100644 test/Transforms/InstCombine/2011-05-13-InBoundsGEP.ll create mode 100644 test/Transforms/InstCombine/2011-05-28-swapmulsub.ll create mode 100644 test/Transforms/InstCombine/2011-06-13-nsw-alloca.ll create mode 100644 test/Transforms/InstCombine/2011-09-03-Trampoline.ll create mode 100644 test/Transforms/InstCombine/2011-10-07-AlignPromotion.ll create mode 100644 test/Transforms/InstCombine/2012-01-11-OpaqueBitcastCrash.ll create mode 100644 test/Transforms/InstCombine/2012-02-13-FCmp.ll create mode 100644 test/Transforms/InstCombine/2012-02-28-ICmp.ll create mode 100644 test/Transforms/InstCombine/2012-03-10-InstCombine.ll create mode 100644 test/Transforms/InstCombine/2012-04-23-Neon-Intrinsics.ll create mode 100644 test/Transforms/InstCombine/2012-04-24-vselect.ll create mode 100644 test/Transforms/InstCombine/2012-04-30-SRem.ll create mode 100644 test/Transforms/InstCombine/2012-05-27-Negative-Shift-Crash.ll create mode 100644 test/Transforms/InstCombine/2012-05-28-select-hang.ll create mode 100644 test/Transforms/InstCombine/2012-06-06-LoadOfPHIs.ll create mode 100644 test/Transforms/InstCombine/2012-07-25-LoadPart.ll create mode 100644 test/Transforms/InstCombine/2012-07-30-addrsp-bitcast.ll create mode 100644 test/Transforms/InstCombine/2012-08-28-udiv_ashl.ll create mode 100644 test/Transforms/InstCombine/2012-09-17-ZeroSizedAlloca.ll create mode 100644 test/Transforms/InstCombine/2012-09-24-MemcpyFromGlobalCrash.ll create mode 100644 test/Transforms/InstCombine/2012-10-25-vector-of-pointers.ll create mode 100644 test/Transforms/InstCombine/2012-12-14-simp-vgep.ll create mode 100644 test/Transforms/InstCombine/2012-3-15-or-xor-constant.ll create mode 100644 test/Transforms/InstCombine/2012-6-7-vselect-bitcast.ll create mode 100644 test/Transforms/InstCombine/2013-03-05-Combine-BitcastTy-Into-Alloca.ll create mode 100644 test/Transforms/InstCombine/CPP_min_max.ll create mode 100644 test/Transforms/InstCombine/ExtractCast.ll create mode 100644 test/Transforms/InstCombine/IntPtrCast.ll create mode 100644 test/Transforms/InstCombine/JavaCompare.ll create mode 100644 test/Transforms/InstCombine/LandingPadClauses.ll create mode 100644 test/Transforms/InstCombine/PR7357.ll create mode 100644 test/Transforms/InstCombine/README.txt create mode 100644 test/Transforms/InstCombine/abs-1.ll create mode 100644 test/Transforms/InstCombine/add-shrink.ll create mode 100644 test/Transforms/InstCombine/add-sitofp.ll create mode 100644 test/Transforms/InstCombine/add.ll create mode 100644 test/Transforms/InstCombine/add2.ll create mode 100644 test/Transforms/InstCombine/add3.ll create mode 100644 test/Transforms/InstCombine/add4.ll create mode 100644 test/Transforms/InstCombine/addnegneg.ll create mode 100644 test/Transforms/InstCombine/addrspacecast.ll create mode 100644 test/Transforms/InstCombine/adjust-for-sminmax.ll create mode 100644 test/Transforms/InstCombine/align-2d-gep.ll create mode 100644 test/Transforms/InstCombine/align-addr.ll create mode 100644 test/Transforms/InstCombine/align-external.ll create mode 100644 test/Transforms/InstCombine/alloca.ll create mode 100644 test/Transforms/InstCombine/and-compare.ll create mode 100644 test/Transforms/InstCombine/and-fcmp.ll create mode 100644 test/Transforms/InstCombine/and-not-or.ll create mode 100644 test/Transforms/InstCombine/and-or-and.ll create mode 100644 test/Transforms/InstCombine/and-or-not.ll create mode 100644 test/Transforms/InstCombine/and-or.ll create mode 100644 test/Transforms/InstCombine/and-xor-merge.ll create mode 100644 test/Transforms/InstCombine/and-xor-or.ll create mode 100644 test/Transforms/InstCombine/and.ll create mode 100644 test/Transforms/InstCombine/and2.ll create mode 100644 test/Transforms/InstCombine/apint-add1.ll create mode 100644 test/Transforms/InstCombine/apint-add2.ll create mode 100644 test/Transforms/InstCombine/apint-and-compare.ll create mode 100644 test/Transforms/InstCombine/apint-and-or-and.ll create mode 100644 test/Transforms/InstCombine/apint-and-xor-merge.ll create mode 100644 test/Transforms/InstCombine/apint-and1.ll create mode 100644 test/Transforms/InstCombine/apint-and2.ll create mode 100644 test/Transforms/InstCombine/apint-call-cast-target.ll create mode 100644 test/Transforms/InstCombine/apint-cast-and-cast.ll create mode 100644 test/Transforms/InstCombine/apint-cast-cast-to-and.ll create mode 100644 test/Transforms/InstCombine/apint-cast.ll create mode 100644 test/Transforms/InstCombine/apint-div1.ll create mode 100644 test/Transforms/InstCombine/apint-div2.ll create mode 100644 test/Transforms/InstCombine/apint-mul1.ll create mode 100644 test/Transforms/InstCombine/apint-mul2.ll create mode 100644 test/Transforms/InstCombine/apint-not.ll create mode 100644 test/Transforms/InstCombine/apint-or1.ll create mode 100644 test/Transforms/InstCombine/apint-or2.ll create mode 100644 test/Transforms/InstCombine/apint-rem1.ll create mode 100644 test/Transforms/InstCombine/apint-rem2.ll create mode 100644 test/Transforms/InstCombine/apint-select.ll create mode 100644 test/Transforms/InstCombine/apint-shift-simplify.ll create mode 100644 test/Transforms/InstCombine/apint-shift.ll create mode 100644 test/Transforms/InstCombine/apint-shl-trunc.ll create mode 100644 test/Transforms/InstCombine/apint-sub.ll create mode 100644 test/Transforms/InstCombine/apint-xor1.ll create mode 100644 test/Transforms/InstCombine/apint-xor2.ll create mode 100644 test/Transforms/InstCombine/apint-zext1.ll create mode 100644 test/Transforms/InstCombine/apint-zext2.ll create mode 100644 test/Transforms/InstCombine/ashr-nop.ll create mode 100644 test/Transforms/InstCombine/atomic.ll create mode 100644 test/Transforms/InstCombine/badmalloc.ll create mode 100644 test/Transforms/InstCombine/binop-cast.ll create mode 100644 test/Transforms/InstCombine/bit-checks.ll create mode 100644 test/Transforms/InstCombine/bit-tracking.ll create mode 100644 test/Transforms/InstCombine/bitcast-alias-function.ll create mode 100644 test/Transforms/InstCombine/bitcast-bigendian.ll create mode 100644 test/Transforms/InstCombine/bitcast-sext-vector.ll create mode 100644 test/Transforms/InstCombine/bitcast-store.ll create mode 100644 test/Transforms/InstCombine/bitcast-vec-canon.ll create mode 100644 test/Transforms/InstCombine/bitcast-vec-uniform.ll create mode 100644 test/Transforms/InstCombine/bitcast-vector-fold.ll create mode 100644 test/Transforms/InstCombine/bitcast.ll create mode 100644 test/Transforms/InstCombine/bitcount.ll create mode 100644 test/Transforms/InstCombine/bittest.ll create mode 100644 test/Transforms/InstCombine/bswap-fold.ll create mode 100644 test/Transforms/InstCombine/bswap.ll create mode 100644 test/Transforms/InstCombine/call-cast-target.ll create mode 100644 test/Transforms/InstCombine/call-intrinsics.ll create mode 100644 test/Transforms/InstCombine/call.ll create mode 100644 test/Transforms/InstCombine/call2.ll create mode 100644 test/Transforms/InstCombine/canonicalize_branch.ll create mode 100644 test/Transforms/InstCombine/cast-mul-select.ll create mode 100644 test/Transforms/InstCombine/cast-set.ll create mode 100644 test/Transforms/InstCombine/cast.ll create mode 100644 test/Transforms/InstCombine/cast_ptr.ll create mode 100644 test/Transforms/InstCombine/compare-signs.ll create mode 100644 test/Transforms/InstCombine/constant-expr-datalayout.ll create mode 100644 test/Transforms/InstCombine/constant-fold-address-space-pointer.ll create mode 100644 test/Transforms/InstCombine/constant-fold-compare.ll create mode 100644 test/Transforms/InstCombine/constant-fold-gep.ll create mode 100644 test/Transforms/InstCombine/cos-1.ll create mode 100644 test/Transforms/InstCombine/cos-2.ll create mode 100644 test/Transforms/InstCombine/crash.ll create mode 100644 test/Transforms/InstCombine/dce-iterate.ll create mode 100644 test/Transforms/InstCombine/deadcode.ll create mode 100644 test/Transforms/InstCombine/debug-line.ll create mode 100644 test/Transforms/InstCombine/debuginfo.ll create mode 100644 test/Transforms/InstCombine/devirt.ll create mode 100644 test/Transforms/InstCombine/disable-simplify-libcalls.ll create mode 100644 test/Transforms/InstCombine/div-shift-crash.ll create mode 100644 test/Transforms/InstCombine/div-shift.ll create mode 100644 test/Transforms/InstCombine/div.ll create mode 100644 test/Transforms/InstCombine/double-float-shrink-1.ll create mode 100644 test/Transforms/InstCombine/double-float-shrink-2.ll create mode 100644 test/Transforms/InstCombine/enforce-known-alignment.ll create mode 100644 test/Transforms/InstCombine/err-rep-cold.ll create mode 100644 test/Transforms/InstCombine/exact.ll create mode 100644 test/Transforms/InstCombine/exp2-1.ll create mode 100644 test/Transforms/InstCombine/exp2-2.ll create mode 100644 test/Transforms/InstCombine/extractvalue.ll create mode 100644 test/Transforms/InstCombine/fast-math.ll create mode 100644 test/Transforms/InstCombine/fcmp-select.ll create mode 100644 test/Transforms/InstCombine/fcmp-special.ll create mode 100644 test/Transforms/InstCombine/fcmp.ll create mode 100644 test/Transforms/InstCombine/fdiv.ll create mode 100644 test/Transforms/InstCombine/ffs-1.ll create mode 100644 test/Transforms/InstCombine/float-shrink-compare.ll create mode 100644 test/Transforms/InstCombine/fmul.ll create mode 100644 test/Transforms/InstCombine/fneg-ext.ll create mode 100644 test/Transforms/InstCombine/fold-bin-operand.ll create mode 100644 test/Transforms/InstCombine/fold-calls.ll create mode 100644 test/Transforms/InstCombine/fold-fops-into-selects.ll create mode 100644 test/Transforms/InstCombine/fold-phi.ll create mode 100644 test/Transforms/InstCombine/fold-sqrt-sqrtf.ll create mode 100644 test/Transforms/InstCombine/fold-vector-select.ll create mode 100644 test/Transforms/InstCombine/fold-vector-zero.ll create mode 100644 test/Transforms/InstCombine/fp-ret-bitcast.ll create mode 100644 test/Transforms/InstCombine/fpcast.ll create mode 100644 test/Transforms/InstCombine/fpextend.ll create mode 100644 test/Transforms/InstCombine/fprintf-1.ll create mode 100644 test/Transforms/InstCombine/fputs-1.ll create mode 100644 test/Transforms/InstCombine/fsub.ll create mode 100644 test/Transforms/InstCombine/fwrite-1.ll create mode 100644 test/Transforms/InstCombine/gep-addrspace.ll create mode 100644 test/Transforms/InstCombine/gepgep.ll create mode 100644 test/Transforms/InstCombine/getelementptr.ll create mode 100644 test/Transforms/InstCombine/hoist_instr.ll create mode 100644 test/Transforms/InstCombine/icmp-logical.ll create mode 100644 test/Transforms/InstCombine/icmp.ll create mode 100644 test/Transforms/InstCombine/idioms.ll create mode 100644 test/Transforms/InstCombine/intrinsics.ll create mode 100644 test/Transforms/InstCombine/invariant.ll create mode 100644 test/Transforms/InstCombine/invoke.ll create mode 100644 test/Transforms/InstCombine/isascii-1.ll create mode 100644 test/Transforms/InstCombine/isdigit-1.ll create mode 100644 test/Transforms/InstCombine/known_align.ll create mode 100644 test/Transforms/InstCombine/load-cmp.ll create mode 100644 test/Transforms/InstCombine/load-select.ll create mode 100644 test/Transforms/InstCombine/load.ll create mode 100644 test/Transforms/InstCombine/load3.ll create mode 100644 test/Transforms/InstCombine/loadstore-alignment.ll create mode 100644 test/Transforms/InstCombine/logical-select.ll create mode 100644 test/Transforms/InstCombine/lshr-phi.ll create mode 100644 test/Transforms/InstCombine/malloc-free-delete.ll create mode 100644 test/Transforms/InstCombine/memcmp-1.ll create mode 100644 test/Transforms/InstCombine/memcmp-2.ll create mode 100644 test/Transforms/InstCombine/memcpy-1.ll create mode 100644 test/Transforms/InstCombine/memcpy-2.ll create mode 100644 test/Transforms/InstCombine/memcpy-from-global.ll create mode 100644 test/Transforms/InstCombine/memcpy-to-load.ll create mode 100644 test/Transforms/InstCombine/memcpy.ll create mode 100644 test/Transforms/InstCombine/memcpy_chk-1.ll create mode 100644 test/Transforms/InstCombine/memcpy_chk-2.ll create mode 100644 test/Transforms/InstCombine/memmove-1.ll create mode 100644 test/Transforms/InstCombine/memmove-2.ll create mode 100644 test/Transforms/InstCombine/memmove.ll create mode 100644 test/Transforms/InstCombine/memmove_chk-1.ll create mode 100644 test/Transforms/InstCombine/memmove_chk-2.ll create mode 100644 test/Transforms/InstCombine/memset-1.ll create mode 100644 test/Transforms/InstCombine/memset-2.ll create mode 100644 test/Transforms/InstCombine/memset.ll create mode 100644 test/Transforms/InstCombine/memset2.ll create mode 100644 test/Transforms/InstCombine/memset_chk-1.ll create mode 100644 test/Transforms/InstCombine/memset_chk-2.ll create mode 100644 test/Transforms/InstCombine/merge-icmp.ll create mode 100644 test/Transforms/InstCombine/mul-masked-bits.ll create mode 100644 test/Transforms/InstCombine/mul.ll create mode 100644 test/Transforms/InstCombine/multi-size-address-space-pointer.ll create mode 100644 test/Transforms/InstCombine/multi-use-or.ll create mode 100644 test/Transforms/InstCombine/narrow.ll create mode 100644 test/Transforms/InstCombine/neon-intrinsics.ll create mode 100644 test/Transforms/InstCombine/no-negzero.ll create mode 100644 test/Transforms/InstCombine/not-fcmp.ll create mode 100644 test/Transforms/InstCombine/not.ll create mode 100644 test/Transforms/InstCombine/nothrow.ll create mode 100644 test/Transforms/InstCombine/nsw.ll create mode 100644 test/Transforms/InstCombine/obfuscated_splat.ll create mode 100644 test/Transforms/InstCombine/objsize-64.ll create mode 100644 test/Transforms/InstCombine/objsize-address-space.ll create mode 100644 test/Transforms/InstCombine/objsize.ll create mode 100644 test/Transforms/InstCombine/odr-linkage.ll create mode 100644 test/Transforms/InstCombine/onehot_merge.ll create mode 100644 test/Transforms/InstCombine/or-fcmp.ll create mode 100644 test/Transforms/InstCombine/or-to-xor.ll create mode 100644 test/Transforms/InstCombine/or-xor.ll create mode 100644 test/Transforms/InstCombine/or.ll create mode 100644 test/Transforms/InstCombine/osx-names.ll create mode 100644 test/Transforms/InstCombine/overflow.ll create mode 100644 test/Transforms/InstCombine/phi-merge-gep.ll create mode 100644 test/Transforms/InstCombine/phi-select-constexpr.ll create mode 100644 test/Transforms/InstCombine/phi.ll create mode 100644 test/Transforms/InstCombine/pow-1.ll create mode 100644 test/Transforms/InstCombine/pow-2.ll create mode 100644 test/Transforms/InstCombine/pow-3.ll create mode 100644 test/Transforms/InstCombine/pr12251.ll create mode 100644 test/Transforms/InstCombine/pr12338.ll create mode 100644 test/Transforms/InstCombine/pr17827.ll create mode 100644 test/Transforms/InstCombine/pr2645-0.ll create mode 100644 test/Transforms/InstCombine/pr2645-1.ll create mode 100644 test/Transforms/InstCombine/pr2996.ll create mode 100644 test/Transforms/InstCombine/pr8547.ll create mode 100644 test/Transforms/InstCombine/preserve-sminmax.ll create mode 100644 test/Transforms/InstCombine/printf-1.ll create mode 100644 test/Transforms/InstCombine/printf-2.ll create mode 100644 test/Transforms/InstCombine/ptr-int-cast.ll create mode 100644 test/Transforms/InstCombine/puts-1.ll create mode 100644 test/Transforms/InstCombine/rem.ll create mode 100644 test/Transforms/InstCombine/sdiv-1.ll create mode 100644 test/Transforms/InstCombine/sdiv-2.ll create mode 100644 test/Transforms/InstCombine/select-2.ll create mode 100644 test/Transforms/InstCombine/select-crash.ll create mode 100644 test/Transforms/InstCombine/select-extractelement.ll create mode 100644 test/Transforms/InstCombine/select-load-call.ll create mode 100644 test/Transforms/InstCombine/select.ll create mode 100644 test/Transforms/InstCombine/set.ll create mode 100644 test/Transforms/InstCombine/setcc-strength-reduce.ll create mode 100644 test/Transforms/InstCombine/sext.ll create mode 100644 test/Transforms/InstCombine/shift-sra.ll create mode 100644 test/Transforms/InstCombine/shift.ll create mode 100644 test/Transforms/InstCombine/shufflemask-undef.ll create mode 100644 test/Transforms/InstCombine/shufflevec-constant.ll create mode 100644 test/Transforms/InstCombine/sign-test-and-or.ll create mode 100644 test/Transforms/InstCombine/signed-comparison.ll create mode 100644 test/Transforms/InstCombine/signext.ll create mode 100644 test/Transforms/InstCombine/simplify-demanded-bits-pointer.ll create mode 100644 test/Transforms/InstCombine/simplify-libcalls.ll create mode 100644 test/Transforms/InstCombine/sincospi.ll create mode 100644 test/Transforms/InstCombine/sink_instruction.ll create mode 100644 test/Transforms/InstCombine/sitofp.ll create mode 100644 test/Transforms/InstCombine/sprintf-1.ll create mode 100644 test/Transforms/InstCombine/sqrt.ll create mode 100644 test/Transforms/InstCombine/srem-simplify-bug.ll create mode 100644 test/Transforms/InstCombine/srem.ll create mode 100644 test/Transforms/InstCombine/srem1.ll create mode 100644 test/Transforms/InstCombine/stack-overalign.ll create mode 100644 test/Transforms/InstCombine/stacksaverestore.ll create mode 100644 test/Transforms/InstCombine/store.ll create mode 100644 test/Transforms/InstCombine/stpcpy-1.ll create mode 100644 test/Transforms/InstCombine/stpcpy-2.ll create mode 100644 test/Transforms/InstCombine/stpcpy_chk-1.ll create mode 100644 test/Transforms/InstCombine/stpcpy_chk-2.ll create mode 100644 test/Transforms/InstCombine/strcat-1.ll create mode 100644 test/Transforms/InstCombine/strcat-2.ll create mode 100644 test/Transforms/InstCombine/strcat-3.ll create mode 100644 test/Transforms/InstCombine/strchr-1.ll create mode 100644 test/Transforms/InstCombine/strchr-2.ll create mode 100644 test/Transforms/InstCombine/strcmp-1.ll create mode 100644 test/Transforms/InstCombine/strcmp-2.ll create mode 100644 test/Transforms/InstCombine/strcpy-1.ll create mode 100644 test/Transforms/InstCombine/strcpy-2.ll create mode 100644 test/Transforms/InstCombine/strcpy_chk-1.ll create mode 100644 test/Transforms/InstCombine/strcpy_chk-2.ll create mode 100644 test/Transforms/InstCombine/strcpy_chk-64.ll create mode 100644 test/Transforms/InstCombine/strcspn-1.ll create mode 100644 test/Transforms/InstCombine/strcspn-2.ll create mode 100644 test/Transforms/InstCombine/strlen-1.ll create mode 100644 test/Transforms/InstCombine/strlen-2.ll create mode 100644 test/Transforms/InstCombine/strncat-1.ll create mode 100644 test/Transforms/InstCombine/strncat-2.ll create mode 100644 test/Transforms/InstCombine/strncat-3.ll create mode 100644 test/Transforms/InstCombine/strncmp-1.ll create mode 100644 test/Transforms/InstCombine/strncmp-2.ll create mode 100644 test/Transforms/InstCombine/strncpy-1.ll create mode 100644 test/Transforms/InstCombine/strncpy-2.ll create mode 100644 test/Transforms/InstCombine/strncpy_chk-1.ll create mode 100644 test/Transforms/InstCombine/strncpy_chk-2.ll create mode 100644 test/Transforms/InstCombine/strpbrk-1.ll create mode 100644 test/Transforms/InstCombine/strpbrk-2.ll create mode 100644 test/Transforms/InstCombine/strrchr-1.ll create mode 100644 test/Transforms/InstCombine/strrchr-2.ll create mode 100644 test/Transforms/InstCombine/strspn-1.ll create mode 100644 test/Transforms/InstCombine/strstr-1.ll create mode 100644 test/Transforms/InstCombine/strstr-2.ll create mode 100644 test/Transforms/InstCombine/strto-1.ll create mode 100644 test/Transforms/InstCombine/struct-assign-tbaa.ll create mode 100644 test/Transforms/InstCombine/sub-xor.ll create mode 100644 test/Transforms/InstCombine/sub.ll create mode 100644 test/Transforms/InstCombine/toascii-1.ll create mode 100644 test/Transforms/InstCombine/trunc.ll create mode 100644 test/Transforms/InstCombine/udiv-simplify-bug-0.ll create mode 100644 test/Transforms/InstCombine/udiv-simplify-bug-1.ll create mode 100644 test/Transforms/InstCombine/udiv_select_to_select_shift.ll create mode 100644 test/Transforms/InstCombine/udivrem-change-width.ll create mode 100644 test/Transforms/InstCombine/urem-simplify-bug.ll create mode 100644 test/Transforms/InstCombine/urem.ll create mode 100644 test/Transforms/InstCombine/vec_demanded_elts.ll create mode 100644 test/Transforms/InstCombine/vec_extract_2elts.ll create mode 100644 test/Transforms/InstCombine/vec_extract_elt.ll create mode 100644 test/Transforms/InstCombine/vec_extract_var_elt.ll create mode 100644 test/Transforms/InstCombine/vec_insertelt.ll create mode 100644 test/Transforms/InstCombine/vec_narrow.ll create mode 100644 test/Transforms/InstCombine/vec_phi_extract.ll create mode 100644 test/Transforms/InstCombine/vec_sext.ll create mode 100644 test/Transforms/InstCombine/vec_shuffle.ll create mode 100644 test/Transforms/InstCombine/vector-casts.ll create mode 100644 test/Transforms/InstCombine/vector-mul.ll create mode 100644 test/Transforms/InstCombine/vector-srem.ll create mode 100644 test/Transforms/InstCombine/vector-type.ll create mode 100644 test/Transforms/InstCombine/vector_gep1.ll create mode 100644 test/Transforms/InstCombine/vector_gep2.ll create mode 100644 test/Transforms/InstCombine/volatile_store.ll create mode 100644 test/Transforms/InstCombine/weak-symbols.ll create mode 100644 test/Transforms/InstCombine/win-math.ll create mode 100644 test/Transforms/InstCombine/x86-crc32-demanded.ll create mode 100644 test/Transforms/InstCombine/xor-undef.ll create mode 100644 test/Transforms/InstCombine/xor.ll create mode 100644 test/Transforms/InstCombine/xor2.ll create mode 100644 test/Transforms/InstCombine/zero-point-zero-add.ll create mode 100644 test/Transforms/InstCombine/zeroext-and-reduce.ll create mode 100644 test/Transforms/InstCombine/zext-bool-add-sub.ll create mode 100644 test/Transforms/InstCombine/zext-fold.ll create mode 100644 test/Transforms/InstCombine/zext-or-icmp.ll create mode 100644 test/Transforms/InstCombine/zext.ll create mode 100644 test/Transforms/InstSimplify/2010-12-20-Boolean.ll create mode 100644 test/Transforms/InstSimplify/2010-12-20-Distribute.ll create mode 100644 test/Transforms/InstSimplify/2011-01-14-Thread.ll create mode 100644 test/Transforms/InstSimplify/2011-02-01-Vector.ll create mode 100644 test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll create mode 100644 test/Transforms/InstSimplify/2011-10-27-BinOpCrash.ll create mode 100644 test/Transforms/InstSimplify/2011-11-23-MaskedBitsCrash.ll create mode 100644 test/Transforms/InstSimplify/2013-04-19-ConstantFoldingCrash.ll create mode 100644 test/Transforms/InstSimplify/AndOrXor.ll create mode 100644 test/Transforms/InstSimplify/call-callconv.ll create mode 100644 test/Transforms/InstSimplify/call.ll create mode 100644 test/Transforms/InstSimplify/compare.ll create mode 100644 test/Transforms/InstSimplify/exact-nsw-nuw.ll create mode 100644 test/Transforms/InstSimplify/fast-math.ll create mode 100644 test/Transforms/InstSimplify/fdiv.ll create mode 100644 test/Transforms/InstSimplify/floating-point-arithmetic.ll create mode 100644 test/Transforms/InstSimplify/maxmin.ll create mode 100644 test/Transforms/InstSimplify/past-the-end.ll create mode 100644 test/Transforms/InstSimplify/phi.ll create mode 100644 test/Transforms/InstSimplify/ptr_diff.ll create mode 100644 test/Transforms/InstSimplify/reassociate.ll create mode 100644 test/Transforms/InstSimplify/rem.ll create mode 100644 test/Transforms/InstSimplify/undef.ll create mode 100644 test/Transforms/InstSimplify/vector_gep.ll create mode 100644 test/Transforms/Internalize/2009-01-05-InternalizeAliases.ll create mode 100644 test/Transforms/Internalize/apifile create mode 100644 test/Transforms/Internalize/lists.ll create mode 100644 test/Transforms/Internalize/used.ll create mode 100644 test/Transforms/JumpThreading/2008-11-27-EntryMunge.ll create mode 100644 test/Transforms/JumpThreading/2010-08-26-and.ll create mode 100644 test/Transforms/JumpThreading/2011-04-02-SimplifyDeadBlock.ll create mode 100644 test/Transforms/JumpThreading/2011-04-14-InfLoop.ll create mode 100644 test/Transforms/JumpThreading/2012-07-19-NoSuccessorIndirectBr.ll create mode 100644 test/Transforms/JumpThreading/and-and-cond.ll create mode 100644 test/Transforms/JumpThreading/and-cond.ll create mode 100644 test/Transforms/JumpThreading/basic.ll create mode 100644 test/Transforms/JumpThreading/branch-no-const.ll create mode 100644 test/Transforms/JumpThreading/compare.ll create mode 100644 test/Transforms/JumpThreading/crash.ll create mode 100644 test/Transforms/JumpThreading/degenerate-phi.ll create mode 100644 test/Transforms/JumpThreading/indirectbr.ll create mode 100644 test/Transforms/JumpThreading/landing-pad.ll create mode 100644 test/Transforms/JumpThreading/lvi-load.ll create mode 100644 test/Transforms/JumpThreading/no-irreducible-loops.ll create mode 100644 test/Transforms/JumpThreading/or-undef.ll create mode 100644 test/Transforms/JumpThreading/phi-eq.ll create mode 100644 test/Transforms/JumpThreading/pr9331.ll create mode 100644 test/Transforms/JumpThreading/select.ll create mode 100644 test/Transforms/JumpThreading/thread-loads.ll create mode 100644 test/Transforms/LCSSA/2006-06-03-IncorrectIDFPhis.ll create mode 100644 test/Transforms/LCSSA/2006-06-12-MultipleExitsSameBlock.ll create mode 100644 test/Transforms/LCSSA/2006-07-09-NoDominator.ll create mode 100644 test/Transforms/LCSSA/2006-10-31-UnreachableBlock-2.ll create mode 100644 test/Transforms/LCSSA/2006-10-31-UnreachableBlock.ll create mode 100644 test/Transforms/LCSSA/2007-07-12-LICM-2.ll create mode 100644 test/Transforms/LCSSA/2007-07-12-LICM-3.ll create mode 100644 test/Transforms/LCSSA/2007-07-12-LICM.ll create mode 100644 test/Transforms/LCSSA/basictest.ll create mode 100644 test/Transforms/LCSSA/indirectbr.ll create mode 100644 test/Transforms/LCSSA/invoke-dest.ll create mode 100644 test/Transforms/LCSSA/unreachable-use.ll create mode 100644 test/Transforms/LCSSA/unused-phis.ll create mode 100644 test/Transforms/LICM/2003-02-26-LoopExitNotDominated.ll create mode 100644 test/Transforms/LICM/2003-02-27-NestedLoopExitBlocks.ll create mode 100644 test/Transforms/LICM/2003-02-27-PreheaderExitNodeUpdate.ll create mode 100644 test/Transforms/LICM/2003-02-27-PreheaderProblem.ll create mode 100644 test/Transforms/LICM/2003-02-27-StoreSinkPHIs.ll create mode 100644 test/Transforms/LICM/2003-02-28-PromoteDifferentType.ll create mode 100644 test/Transforms/LICM/2003-05-02-LoadHoist.ll create mode 100644 test/Transforms/LICM/2003-12-11-SinkingToPHI.ll create mode 100644 test/Transforms/LICM/2004-09-14-AliasAnalysisInvalidate.ll create mode 100644 test/Transforms/LICM/2004-11-17-UndefIndexCrash.ll create mode 100644 test/Transforms/LICM/2006-09-12-DeadUserOfSunkInstr.ll create mode 100644 test/Transforms/LICM/2007-05-22-VolatileSink.ll create mode 100644 test/Transforms/LICM/2007-07-30-AliasSet.ll create mode 100644 test/Transforms/LICM/2007-09-17-PromoteValue.ll create mode 100644 test/Transforms/LICM/2007-09-24-PromoteNullValue.ll create mode 100644 test/Transforms/LICM/2007-10-01-PromoteSafeValue.ll create mode 100644 test/Transforms/LICM/2008-05-20-AliasSetVAArg.ll create mode 100644 test/Transforms/LICM/2008-07-22-LoadGlobalConstant.ll create mode 100644 test/Transforms/LICM/2009-12-10-LICM-Indbr-Crash.ll create mode 100644 test/Transforms/LICM/2011-04-06-HoistMissedASTUpdate.ll create mode 100644 test/Transforms/LICM/2011-04-06-PromoteResultOfPromotion.ll create mode 100644 test/Transforms/LICM/2011-04-09-RAUW-AST.ll create mode 100644 test/Transforms/LICM/2011-07-06-Alignment.ll create mode 100644 test/Transforms/LICM/Preserve-LCSSA.ll create mode 100644 test/Transforms/LICM/atomics.ll create mode 100644 test/Transforms/LICM/basictest.ll create mode 100644 test/Transforms/LICM/crash.ll create mode 100644 test/Transforms/LICM/debug-value.ll create mode 100644 test/Transforms/LICM/hoist-invariant-load.ll create mode 100644 test/Transforms/LICM/hoisting.ll create mode 100644 test/Transforms/LICM/no-preheader-test.ll create mode 100644 test/Transforms/LICM/promote-order.ll create mode 100644 test/Transforms/LICM/scalar-promote-memmodel.ll create mode 100644 test/Transforms/LICM/scalar_promote.ll create mode 100644 test/Transforms/LICM/sinking.ll create mode 100644 test/Transforms/LICM/speculate.ll create mode 100644 test/Transforms/LICM/volatile-alias.ll create mode 100644 test/Transforms/LoopDeletion/2007-07-23-InfiniteLoop.ll create mode 100644 test/Transforms/LoopDeletion/2008-05-06-Phi.ll create mode 100644 test/Transforms/LoopDeletion/2011-06-21-phioperands.ll create mode 100644 test/Transforms/LoopDeletion/dcetest.ll create mode 100644 test/Transforms/LoopDeletion/multiple-exit-conditions.ll create mode 100644 test/Transforms/LoopDeletion/multiple-exits.ll create mode 100644 test/Transforms/LoopDeletion/simplify-then-delete.ll create mode 100644 test/Transforms/LoopIdiom/X86/lit.local.cfg create mode 100644 test/Transforms/LoopIdiom/X86/popcnt.ll create mode 100644 test/Transforms/LoopIdiom/basic-address-space.ll create mode 100644 test/Transforms/LoopIdiom/basic.ll create mode 100644 test/Transforms/LoopIdiom/crash.ll create mode 100644 test/Transforms/LoopIdiom/debug-line.ll create mode 100644 test/Transforms/LoopIdiom/memset_noidiom.ll create mode 100644 test/Transforms/LoopIdiom/non-canonical-loop.ll create mode 100644 test/Transforms/LoopIdiom/scev-invalidation.ll create mode 100644 test/Transforms/LoopReroll/basic.ll create mode 100644 test/Transforms/LoopReroll/nonconst_lb.ll create mode 100644 test/Transforms/LoopReroll/reduction.ll create mode 100644 test/Transforms/LoopRotate/2009-01-25-SingleEntryPhi.ll create mode 100644 test/Transforms/LoopRotate/PhiRename-1.ll create mode 100644 test/Transforms/LoopRotate/PhiSelfRefernce-1.ll create mode 100644 test/Transforms/LoopRotate/alloca.ll create mode 100644 test/Transforms/LoopRotate/basic.ll create mode 100644 test/Transforms/LoopRotate/crash.ll create mode 100644 test/Transforms/LoopRotate/dbgvalue.ll create mode 100644 test/Transforms/LoopRotate/indirectbr.ll create mode 100644 test/Transforms/LoopRotate/multiple-exits.ll create mode 100644 test/Transforms/LoopRotate/phi-duplicate.ll create mode 100644 test/Transforms/LoopRotate/pr2639.ll create mode 100644 test/Transforms/LoopRotate/preserve-scev.ll create mode 100644 test/Transforms/LoopRotate/simplifylatch.ll create mode 100644 test/Transforms/LoopSimplify/2003-04-25-AssertFail.ll create mode 100644 test/Transforms/LoopSimplify/2003-05-12-PreheaderExitOfChild.ll create mode 100644 test/Transforms/LoopSimplify/2003-08-15-PreheadersFail.ll create mode 100644 test/Transforms/LoopSimplify/2003-12-10-ExitBlocksProblem.ll create mode 100644 test/Transforms/LoopSimplify/2004-02-05-DominatorInfoCorruption.ll create mode 100644 test/Transforms/LoopSimplify/2004-03-15-IncorrectDomUpdate.ll create mode 100644 test/Transforms/LoopSimplify/2004-04-01-IncorrectDomUpdate.ll create mode 100644 test/Transforms/LoopSimplify/2004-04-12-LoopSimplify-SwitchBackedges.ll create mode 100644 test/Transforms/LoopSimplify/2004-04-13-LoopSimplifyUpdateDomFrontier.ll create mode 100644 test/Transforms/LoopSimplify/2007-10-28-InvokeCrash.ll create mode 100644 test/Transforms/LoopSimplify/2010-07-15-IncorrectDomFrontierUpdate.ll create mode 100644 test/Transforms/LoopSimplify/2010-12-26-PHIInfiniteLoop.ll create mode 100644 test/Transforms/LoopSimplify/2011-12-14-LandingpadHeader.ll create mode 100644 test/Transforms/LoopSimplify/2012-03-20-indirectbr.ll create mode 100644 test/Transforms/LoopSimplify/basictest.ll create mode 100644 test/Transforms/LoopSimplify/dup-preds.ll create mode 100644 test/Transforms/LoopSimplify/hardertest.ll create mode 100644 test/Transforms/LoopSimplify/indirectbr-backedge.ll create mode 100644 test/Transforms/LoopSimplify/indirectbr.ll create mode 100644 test/Transforms/LoopSimplify/merge-exits.ll create mode 100644 test/Transforms/LoopSimplify/phi-node-simplify.ll create mode 100644 test/Transforms/LoopSimplify/preserve-scev.ll create mode 100644 test/Transforms/LoopSimplify/single-backedge.ll create mode 100644 test/Transforms/LoopSimplify/unreachable-loop-pred.ll create mode 100644 test/Transforms/LoopStrengthReduce/2005-08-15-AddRecIV.ll create mode 100644 test/Transforms/LoopStrengthReduce/2005-08-17-OutOfLoopVariant.ll create mode 100644 test/Transforms/LoopStrengthReduce/2005-09-12-UsesOutOutsideOfLoop.ll create mode 100644 test/Transforms/LoopStrengthReduce/2007-04-23-UseIterator.ll create mode 100644 test/Transforms/LoopStrengthReduce/2008-08-13-CmpStride.ll create mode 100644 test/Transforms/LoopStrengthReduce/2008-09-09-Overflow.ll create mode 100644 test/Transforms/LoopStrengthReduce/2009-01-13-nonconstant-stride-outside-loop.ll create mode 100644 test/Transforms/LoopStrengthReduce/2009-04-28-no-reduce-mul.ll create mode 100644 test/Transforms/LoopStrengthReduce/2011-07-19-CritEdgeBreakCrash.ll create mode 100644 test/Transforms/LoopStrengthReduce/2011-10-03-CritEdgeMerge.ll create mode 100644 test/Transforms/LoopStrengthReduce/2011-10-06-ReusePhi.ll create mode 100644 test/Transforms/LoopStrengthReduce/2011-10-13-SCEVChain.ll create mode 100644 test/Transforms/LoopStrengthReduce/2011-10-14-IntPtr.ll create mode 100644 test/Transforms/LoopStrengthReduce/2011-12-19-PostincQuadratic.ll create mode 100644 test/Transforms/LoopStrengthReduce/2012-01-02-nopreheader.ll create mode 100644 test/Transforms/LoopStrengthReduce/2012-01-16-nopreheader.ll create mode 100644 test/Transforms/LoopStrengthReduce/2012-03-15-nopreheader.ll create mode 100644 test/Transforms/LoopStrengthReduce/2012-03-26-constexpr.ll create mode 100644 test/Transforms/LoopStrengthReduce/2012-07-13-ExpandUDiv.ll create mode 100644 test/Transforms/LoopStrengthReduce/2012-07-18-LimitReassociate.ll create mode 100644 test/Transforms/LoopStrengthReduce/2013-01-05-IndBr.ll create mode 100644 test/Transforms/LoopStrengthReduce/2013-01-14-ReuseCast.ll create mode 100644 test/Transforms/LoopStrengthReduce/ARM/2012-06-15-lsr-noaddrmode.ll create mode 100644 test/Transforms/LoopStrengthReduce/ARM/ivchain-ARM.ll create mode 100644 test/Transforms/LoopStrengthReduce/ARM/lit.local.cfg create mode 100644 test/Transforms/LoopStrengthReduce/X86/2008-08-14-ShadowIV.ll create mode 100644 test/Transforms/LoopStrengthReduce/X86/2009-11-10-LSRCrash.ll create mode 100644 test/Transforms/LoopStrengthReduce/X86/2011-07-20-DoubleIV.ll create mode 100644 test/Transforms/LoopStrengthReduce/X86/2011-11-29-postincphi.ll create mode 100644 test/Transforms/LoopStrengthReduce/X86/2011-12-04-loserreg.ll create mode 100644 test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll create mode 100644 test/Transforms/LoopStrengthReduce/X86/ivchain-X86.ll create mode 100644 test/Transforms/LoopStrengthReduce/X86/ivchain-stress-X86.ll create mode 100644 test/Transforms/LoopStrengthReduce/X86/lit.local.cfg create mode 100644 test/Transforms/LoopStrengthReduce/X86/pr17473.ll create mode 100644 test/Transforms/LoopStrengthReduce/addrec-gep-address-space.ll create mode 100644 test/Transforms/LoopStrengthReduce/addrec-gep.ll create mode 100644 test/Transforms/LoopStrengthReduce/address-space-loop.ll create mode 100644 test/Transforms/LoopStrengthReduce/count-to-zero.ll create mode 100644 test/Transforms/LoopStrengthReduce/dead-phi.ll create mode 100644 test/Transforms/LoopStrengthReduce/different-type-ivs.ll create mode 100644 test/Transforms/LoopStrengthReduce/dominate-assert.ll create mode 100644 test/Transforms/LoopStrengthReduce/dont-hoist-simple-loop-constants.ll create mode 100644 test/Transforms/LoopStrengthReduce/dont_insert_redundant_ops.ll create mode 100644 test/Transforms/LoopStrengthReduce/dont_reduce_bytes.ll create mode 100644 test/Transforms/LoopStrengthReduce/dont_reverse.ll create mode 100644 test/Transforms/LoopStrengthReduce/exit_compare_live_range.ll create mode 100644 test/Transforms/LoopStrengthReduce/hoist-parent-preheader.ll create mode 100644 test/Transforms/LoopStrengthReduce/invariant_value_first.ll create mode 100644 test/Transforms/LoopStrengthReduce/invariant_value_first_arg.ll create mode 100644 test/Transforms/LoopStrengthReduce/ivchain.ll create mode 100644 test/Transforms/LoopStrengthReduce/lsr-expand-quadratic.ll create mode 100644 test/Transforms/LoopStrengthReduce/nested-reduce.ll create mode 100644 test/Transforms/LoopStrengthReduce/nonlinear-postinc.ll create mode 100644 test/Transforms/LoopStrengthReduce/ops_after_indvar.ll create mode 100644 test/Transforms/LoopStrengthReduce/phi_node_update_multiple_preds.ll create mode 100644 test/Transforms/LoopStrengthReduce/post-inc-icmpzero.ll create mode 100644 test/Transforms/LoopStrengthReduce/pr12018.ll create mode 100644 test/Transforms/LoopStrengthReduce/pr12048.ll create mode 100644 test/Transforms/LoopStrengthReduce/pr12691.ll create mode 100644 test/Transforms/LoopStrengthReduce/pr18165.ll create mode 100644 test/Transforms/LoopStrengthReduce/pr2537.ll create mode 100644 test/Transforms/LoopStrengthReduce/pr2570.ll create mode 100644 test/Transforms/LoopStrengthReduce/pr3086.ll create mode 100644 test/Transforms/LoopStrengthReduce/pr3399.ll create mode 100644 test/Transforms/LoopStrengthReduce/pr3571.ll create mode 100644 test/Transforms/LoopStrengthReduce/preserve-gep-loop-variant.ll create mode 100644 test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll create mode 100644 test/Transforms/LoopStrengthReduce/related_indvars.ll create mode 100644 test/Transforms/LoopStrengthReduce/remove_indvar.ll create mode 100644 test/Transforms/LoopStrengthReduce/scaling_factor_cost_crash.ll create mode 100644 test/Transforms/LoopStrengthReduce/share_code_in_preheader.ll create mode 100644 test/Transforms/LoopStrengthReduce/share_ivs.ll create mode 100644 test/Transforms/LoopStrengthReduce/uglygep-address-space.ll create mode 100644 test/Transforms/LoopStrengthReduce/uglygep.ll create mode 100644 test/Transforms/LoopStrengthReduce/use_postinc_value_outside_loop.ll create mode 100644 test/Transforms/LoopStrengthReduce/var_stride_used_by_compare.ll create mode 100644 test/Transforms/LoopStrengthReduce/variable_stride.ll create mode 100644 test/Transforms/LoopUnroll/2004-05-13-DontUnrollTooMuch.ll create mode 100644 test/Transforms/LoopUnroll/2005-03-06-BadLoopInfoUpdate.ll create mode 100644 test/Transforms/LoopUnroll/2006-08-24-MultiBlockLoop.ll create mode 100644 test/Transforms/LoopUnroll/2007-04-16-PhiUpdate.ll create mode 100644 test/Transforms/LoopUnroll/2007-05-05-UnrollMiscomp.ll create mode 100644 test/Transforms/LoopUnroll/2007-05-09-UnknownTripCount.ll create mode 100644 test/Transforms/LoopUnroll/2007-11-05-Crash.ll create mode 100644 test/Transforms/LoopUnroll/2011-08-08-PhiUpdate.ll create mode 100644 test/Transforms/LoopUnroll/2011-08-09-IVSimplify.ll create mode 100644 test/Transforms/LoopUnroll/2011-08-09-PhiUpdate.ll create mode 100644 test/Transforms/LoopUnroll/2011-10-01-NoopTrunc.ll create mode 100644 test/Transforms/LoopUnroll/2012-04-09-unroll-indirectbr.ll create mode 100644 test/Transforms/LoopUnroll/PowerPC/a2-unrolling.ll create mode 100644 test/Transforms/LoopUnroll/PowerPC/lit.local.cfg create mode 100644 test/Transforms/LoopUnroll/basic.ll create mode 100644 test/Transforms/LoopUnroll/partial-unroll-optsize.ll create mode 100644 test/Transforms/LoopUnroll/pr10813.ll create mode 100644 test/Transforms/LoopUnroll/pr11361.ll create mode 100644 test/Transforms/LoopUnroll/pr14167.ll create mode 100644 test/Transforms/LoopUnroll/runtime-loop.ll create mode 100644 test/Transforms/LoopUnroll/runtime-loop1.ll create mode 100644 test/Transforms/LoopUnroll/runtime-loop2.ll create mode 100644 test/Transforms/LoopUnroll/runtime-loop3.ll create mode 100644 test/Transforms/LoopUnroll/scevunroll.ll create mode 100644 test/Transforms/LoopUnroll/shifted-tripcount.ll create mode 100644 test/Transforms/LoopUnroll/unloop.ll create mode 100644 test/Transforms/LoopUnswitch/2006-06-13-SingleEntryPHI.ll create mode 100644 test/Transforms/LoopUnswitch/2006-06-27-DeadSwitchCase.ll create mode 100644 test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll create mode 100644 test/Transforms/LoopUnswitch/2007-05-09-tl.ll create mode 100644 test/Transforms/LoopUnswitch/2007-07-12-ExitDomInfo.ll create mode 100644 test/Transforms/LoopUnswitch/2007-07-13-DomInfo.ll create mode 100644 test/Transforms/LoopUnswitch/2007-07-18-DomInfo.ll create mode 100644 test/Transforms/LoopUnswitch/2007-08-01-Dom.ll create mode 100644 test/Transforms/LoopUnswitch/2007-08-01-LCSSA.ll create mode 100644 test/Transforms/LoopUnswitch/2007-10-04-DomFrontier.ll create mode 100644 test/Transforms/LoopUnswitch/2008-06-02-DomInfo.ll create mode 100644 test/Transforms/LoopUnswitch/2008-06-17-DomFrontier.ll create mode 100644 test/Transforms/LoopUnswitch/2008-11-03-Invariant.ll create mode 100644 test/Transforms/LoopUnswitch/2010-11-18-LCSSA.ll create mode 100644 test/Transforms/LoopUnswitch/2011-06-02-CritSwitch.ll create mode 100644 test/Transforms/LoopUnswitch/2011-09-26-EHCrash.ll create mode 100644 test/Transforms/LoopUnswitch/2011-11-18-SimpleSwitch.ll create mode 100644 test/Transforms/LoopUnswitch/2011-11-18-TwoSwitches-Threshold.ll create mode 100644 test/Transforms/LoopUnswitch/2011-11-18-TwoSwitches.ll create mode 100644 test/Transforms/LoopUnswitch/2012-04-02-IndirectBr.ll create mode 100644 test/Transforms/LoopUnswitch/2012-04-30-LoopUnswitch-LPad-Crash.ll create mode 100644 test/Transforms/LoopUnswitch/2012-05-20-Phi.ll create mode 100644 test/Transforms/LoopUnswitch/basictest.ll create mode 100644 test/Transforms/LoopUnswitch/crash.ll create mode 100644 test/Transforms/LoopUnswitch/infinite-loop.ll create mode 100644 test/Transforms/LoopUnswitch/preserve-analyses.ll create mode 100644 test/Transforms/LoopVectorize/12-12-11-if-conv.ll create mode 100644 test/Transforms/LoopVectorize/2012-10-20-infloop.ll create mode 100644 test/Transforms/LoopVectorize/2012-10-22-isconsec.ll create mode 100644 test/Transforms/LoopVectorize/ARM/arm-unroll.ll create mode 100644 test/Transforms/LoopVectorize/ARM/gather-cost.ll create mode 100644 test/Transforms/LoopVectorize/ARM/gcc-examples.ll create mode 100644 test/Transforms/LoopVectorize/ARM/lit.local.cfg create mode 100644 test/Transforms/LoopVectorize/ARM/mul-cast-vect.ll create mode 100644 test/Transforms/LoopVectorize/ARM/width-detect.ll create mode 100644 test/Transforms/LoopVectorize/X86/already-vectorized.ll create mode 100644 test/Transforms/LoopVectorize/X86/avx1.ll create mode 100644 test/Transforms/LoopVectorize/X86/constant-vector-operand.ll create mode 100644 test/Transforms/LoopVectorize/X86/conversion-cost.ll create mode 100644 test/Transforms/LoopVectorize/X86/cost-model.ll create mode 100644 test/Transforms/LoopVectorize/X86/gather-cost.ll create mode 100644 test/Transforms/LoopVectorize/X86/gcc-examples.ll create mode 100644 test/Transforms/LoopVectorize/X86/illegal-parallel-loop-uniform-write.ll create mode 100644 test/Transforms/LoopVectorize/X86/lit.local.cfg create mode 100644 test/Transforms/LoopVectorize/X86/min-trip-count-switch.ll create mode 100644 test/Transforms/LoopVectorize/X86/no-vector.ll create mode 100644 test/Transforms/LoopVectorize/X86/parallel-loops-after-reg2mem.ll create mode 100644 test/Transforms/LoopVectorize/X86/parallel-loops.ll create mode 100644 test/Transforms/LoopVectorize/X86/rauw-bug.ll create mode 100644 test/Transforms/LoopVectorize/X86/reduction-crash.ll create mode 100644 test/Transforms/LoopVectorize/X86/small-size.ll create mode 100644 test/Transforms/LoopVectorize/X86/struct-store.ll create mode 100644 test/Transforms/LoopVectorize/X86/tripcount.ll create mode 100644 test/Transforms/LoopVectorize/X86/unroll-pm.ll create mode 100644 test/Transforms/LoopVectorize/X86/unroll-small-loops.ll create mode 100644 test/Transforms/LoopVectorize/X86/unroll_selection.ll create mode 100644 test/Transforms/LoopVectorize/X86/vector-scalar-select-cost.ll create mode 100644 test/Transforms/LoopVectorize/X86/vector_ptr_load_store.ll create mode 100644 test/Transforms/LoopVectorize/X86/x86_fp80-vector-store.ll create mode 100644 test/Transforms/LoopVectorize/XCore/lit.local.cfg create mode 100644 test/Transforms/LoopVectorize/XCore/no-vector-registers.ll create mode 100644 test/Transforms/LoopVectorize/align.ll create mode 100644 test/Transforms/LoopVectorize/bsd_regex.ll create mode 100644 test/Transforms/LoopVectorize/bzip_reverse_loops.ll create mode 100644 test/Transforms/LoopVectorize/calloc.ll create mode 100644 test/Transforms/LoopVectorize/cast-induction.ll create mode 100644 test/Transforms/LoopVectorize/cpp-new-array.ll create mode 100644 test/Transforms/LoopVectorize/dbg.value.ll create mode 100644 test/Transforms/LoopVectorize/debugloc.ll create mode 100644 test/Transforms/LoopVectorize/ee-crash.ll create mode 100644 test/Transforms/LoopVectorize/flags.ll create mode 100644 test/Transforms/LoopVectorize/float-reduction.ll create mode 100644 test/Transforms/LoopVectorize/funcall.ll create mode 100644 test/Transforms/LoopVectorize/gcc-examples.ll create mode 100644 test/Transforms/LoopVectorize/global_alias.ll create mode 100644 test/Transforms/LoopVectorize/hoist-loads.ll create mode 100644 test/Transforms/LoopVectorize/i8-induction.ll create mode 100644 test/Transforms/LoopVectorize/if-conv-crash.ll create mode 100644 test/Transforms/LoopVectorize/if-conversion-edgemasks.ll create mode 100644 test/Transforms/LoopVectorize/if-conversion-nest.ll create mode 100644 test/Transforms/LoopVectorize/if-conversion-reduction.ll create mode 100644 test/Transforms/LoopVectorize/if-conversion.ll create mode 100644 test/Transforms/LoopVectorize/increment.ll create mode 100644 test/Transforms/LoopVectorize/induction.ll create mode 100644 test/Transforms/LoopVectorize/induction_plus.ll create mode 100644 test/Transforms/LoopVectorize/infiniteloop.ll create mode 100644 test/Transforms/LoopVectorize/intrinsic.ll create mode 100644 test/Transforms/LoopVectorize/lcssa-crash.ll create mode 100644 test/Transforms/LoopVectorize/lifetime.ll create mode 100644 test/Transforms/LoopVectorize/memdep.ll create mode 100644 test/Transforms/LoopVectorize/metadata-unroll.ll create mode 100644 test/Transforms/LoopVectorize/metadata-width.ll create mode 100644 test/Transforms/LoopVectorize/minmax_reduction.ll create mode 100644 test/Transforms/LoopVectorize/multi-use-reduction-bug.ll create mode 100644 test/Transforms/LoopVectorize/multiple-address-spaces.ll create mode 100644 test/Transforms/LoopVectorize/no_idiv_reduction.ll create mode 100644 test/Transforms/LoopVectorize/no_int_induction.ll create mode 100644 test/Transforms/LoopVectorize/no_outside_user.ll create mode 100644 test/Transforms/LoopVectorize/nofloat.ll create mode 100644 test/Transforms/LoopVectorize/non-const-n.ll create mode 100644 test/Transforms/LoopVectorize/nsw-crash.ll create mode 100644 test/Transforms/LoopVectorize/opt.ll create mode 100644 test/Transforms/LoopVectorize/phi-hang.ll create mode 100644 test/Transforms/LoopVectorize/ptr_loops.ll create mode 100644 test/Transforms/LoopVectorize/read-only.ll create mode 100644 test/Transforms/LoopVectorize/reduction.ll create mode 100644 test/Transforms/LoopVectorize/reverse_induction.ll create mode 100644 test/Transforms/LoopVectorize/reverse_iter.ll create mode 100644 test/Transforms/LoopVectorize/runtime-check-address-space.ll create mode 100644 test/Transforms/LoopVectorize/runtime-check-readonly-address-space.ll create mode 100644 test/Transforms/LoopVectorize/runtime-check-readonly.ll create mode 100644 test/Transforms/LoopVectorize/runtime-check.ll create mode 100644 test/Transforms/LoopVectorize/runtime-limit.ll create mode 100644 test/Transforms/LoopVectorize/safegep.ll create mode 100644 test/Transforms/LoopVectorize/same-base-access.ll create mode 100644 test/Transforms/LoopVectorize/scalar-select.ll create mode 100644 test/Transforms/LoopVectorize/scev-exitlim-crash.ll create mode 100644 test/Transforms/LoopVectorize/simple-unroll.ll create mode 100644 test/Transforms/LoopVectorize/small-loop.ll create mode 100644 test/Transforms/LoopVectorize/start-non-zero.ll create mode 100644 test/Transforms/LoopVectorize/store-shuffle-bug.ll create mode 100644 test/Transforms/LoopVectorize/struct_access.ll create mode 100644 test/Transforms/LoopVectorize/undef-inst-bug.ll create mode 100644 test/Transforms/LoopVectorize/unroll_novec.ll create mode 100644 test/Transforms/LoopVectorize/value-ptr-bug.ll create mode 100644 test/Transforms/LoopVectorize/vectorize-once.ll create mode 100644 test/Transforms/LoopVectorize/write-only.ll create mode 100644 test/Transforms/LowerAtomic/atomic-load.ll create mode 100644 test/Transforms/LowerAtomic/atomic-swap.ll create mode 100644 test/Transforms/LowerAtomic/barrier.ll create mode 100644 test/Transforms/LowerExpectIntrinsic/basic.ll create mode 100644 test/Transforms/LowerInvoke/2003-12-10-Crash.ll create mode 100644 test/Transforms/LowerInvoke/2004-02-29-PHICrash.ll create mode 100644 test/Transforms/LowerInvoke/2005-08-03-InvokeWithPHI.ll create mode 100644 test/Transforms/LowerInvoke/2005-08-03-InvokeWithPHIUse.ll create mode 100644 test/Transforms/LowerInvoke/2008-02-14-CritEdgePhiCrash.ll create mode 100644 test/Transforms/LowerInvoke/basictest.ll create mode 100644 test/Transforms/LowerSwitch/2003-05-01-PHIProblem.ll create mode 100644 test/Transforms/LowerSwitch/2003-08-23-EmptySwitch.ll create mode 100644 test/Transforms/LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll create mode 100644 test/Transforms/LowerSwitch/feature.ll create mode 100644 test/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll create mode 100644 test/Transforms/Mem2Reg/2002-05-01-ShouldNotPromoteThisAlloca.ll create mode 100644 test/Transforms/Mem2Reg/2003-04-10-DFNotFound.ll create mode 100644 test/Transforms/Mem2Reg/2003-04-18-DeadBlockProblem.ll create mode 100644 test/Transforms/Mem2Reg/2003-04-24-MultipleIdenticalSuccessors.ll create mode 100644 test/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll create mode 100644 test/Transforms/Mem2Reg/2003-10-05-DeadPHIInsertion.ll create mode 100644 test/Transforms/Mem2Reg/2005-06-30-ReadBeforeWrite.ll create mode 100644 test/Transforms/Mem2Reg/2005-11-28-Crash.ll create mode 100644 test/Transforms/Mem2Reg/2007-08-27-VolatileLoadsStores.ll create mode 100644 test/Transforms/Mem2Reg/ConvertDebugInfo.ll create mode 100644 test/Transforms/Mem2Reg/ConvertDebugInfo2.ll create mode 100644 test/Transforms/Mem2Reg/PromoteMemToRegister.ll create mode 100644 test/Transforms/Mem2Reg/UndefValuesMerge.ll create mode 100644 test/Transforms/Mem2Reg/atomic.ll create mode 100644 test/Transforms/Mem2Reg/crash.ll create mode 100644 test/Transforms/Mem2Reg/ignore-lifetime.ll create mode 100644 test/Transforms/MemCpyOpt/2008-02-24-MultipleUseofSRet.ll create mode 100644 test/Transforms/MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll create mode 100644 test/Transforms/MemCpyOpt/2011-06-02-CallSlotOverwritten.ll create mode 100644 test/Transforms/MemCpyOpt/align.ll create mode 100644 test/Transforms/MemCpyOpt/atomic.ll create mode 100644 test/Transforms/MemCpyOpt/crash.ll create mode 100644 test/Transforms/MemCpyOpt/form-memset.ll create mode 100644 test/Transforms/MemCpyOpt/loadstore-sret.ll create mode 100644 test/Transforms/MemCpyOpt/memcpy-to-memset.ll create mode 100644 test/Transforms/MemCpyOpt/memcpy.ll create mode 100644 test/Transforms/MemCpyOpt/memmove.ll create mode 100644 test/Transforms/MemCpyOpt/smaller.ll create mode 100644 test/Transforms/MemCpyOpt/sret.ll create mode 100644 test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll create mode 100644 test/Transforms/MergeFunc/2013-01-10-MergeFuncAssert.ll create mode 100644 test/Transforms/MergeFunc/address-spaces.ll create mode 100644 test/Transforms/MergeFunc/crash.ll create mode 100644 test/Transforms/MergeFunc/fold-weak.ll create mode 100644 test/Transforms/MergeFunc/inttoptr-address-space.ll create mode 100644 test/Transforms/MergeFunc/inttoptr.ll create mode 100644 test/Transforms/MergeFunc/merge-ptr-and-int.ll create mode 100644 test/Transforms/MergeFunc/phi-speculation1.ll create mode 100644 test/Transforms/MergeFunc/phi-speculation2.ll create mode 100644 test/Transforms/MergeFunc/ptr-int-transitivity-1.ll create mode 100644 test/Transforms/MergeFunc/ptr-int-transitivity-2.ll create mode 100644 test/Transforms/MergeFunc/ptr-int-transitivity-3.ll create mode 100644 test/Transforms/MergeFunc/too-small.ll create mode 100644 test/Transforms/MergeFunc/vector.ll create mode 100644 test/Transforms/MergeFunc/vectors-and-arrays.ll create mode 100644 test/Transforms/MetaRenamer/metarenamer.ll create mode 100644 test/Transforms/ObjCARC/allocas.ll create mode 100644 test/Transforms/ObjCARC/apelim.ll create mode 100644 test/Transforms/ObjCARC/arc-annotations.ll create mode 100644 test/Transforms/ObjCARC/basic.ll create mode 100644 test/Transforms/ObjCARC/cfg-hazards.ll create mode 100644 test/Transforms/ObjCARC/contract-marker.ll create mode 100644 test/Transforms/ObjCARC/contract-storestrong-ivar.ll create mode 100644 test/Transforms/ObjCARC/contract-storestrong.ll create mode 100644 test/Transforms/ObjCARC/contract-testcases.ll create mode 100644 test/Transforms/ObjCARC/contract.ll create mode 100644 test/Transforms/ObjCARC/empty-block.ll create mode 100644 test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll create mode 100644 test/Transforms/ObjCARC/escape.ll create mode 100644 test/Transforms/ObjCARC/expand.ll create mode 100644 test/Transforms/ObjCARC/gvn.ll create mode 100644 test/Transforms/ObjCARC/intrinsic-use-isolated.ll create mode 100644 test/Transforms/ObjCARC/intrinsic-use.ll create mode 100644 test/Transforms/ObjCARC/invoke.ll create mode 100644 test/Transforms/ObjCARC/move-and-form-retain-autorelease.ll create mode 100644 test/Transforms/ObjCARC/move-and-merge-autorelease.ll create mode 100644 test/Transforms/ObjCARC/nested.ll create mode 100644 test/Transforms/ObjCARC/path-overflow.ll create mode 100644 test/Transforms/ObjCARC/pointer-types.ll create mode 100644 test/Transforms/ObjCARC/post-inlining.ll create mode 100644 test/Transforms/ObjCARC/pr12270.ll create mode 100644 test/Transforms/ObjCARC/retain-block-side-effects.ll create mode 100644 test/Transforms/ObjCARC/retain-not-declared.ll create mode 100644 test/Transforms/ObjCARC/rle-s2l.ll create mode 100644 test/Transforms/ObjCARC/rv.ll create mode 100644 test/Transforms/ObjCARC/split-backedge.ll create mode 100644 test/Transforms/ObjCARC/tail-call-invariant-enforcement.ll create mode 100644 test/Transforms/ObjCARC/weak-contract.ll create mode 100644 test/Transforms/ObjCARC/weak-copies.ll create mode 100644 test/Transforms/ObjCARC/weak-dce.ll create mode 100644 test/Transforms/ObjCARC/weak.ll create mode 100644 test/Transforms/PhaseOrdering/2010-03-22-empty-baseclass.ll create mode 100644 test/Transforms/PhaseOrdering/PR6627.ll create mode 100644 test/Transforms/PhaseOrdering/basic.ll create mode 100644 test/Transforms/PhaseOrdering/gdce.ll create mode 100644 test/Transforms/PhaseOrdering/scev.ll create mode 100644 test/Transforms/PruneEH/2003-11-21-PHIUpdate.ll create mode 100644 test/Transforms/PruneEH/2008-06-02-Weak.ll create mode 100644 test/Transforms/PruneEH/recursivetest.ll create mode 100644 test/Transforms/PruneEH/simplenoreturntest.ll create mode 100644 test/Transforms/PruneEH/simpletest.ll create mode 100644 test/Transforms/Reassociate/2002-05-15-AgressiveSubMove.ll create mode 100644 test/Transforms/Reassociate/2002-05-15-MissedTree.ll create mode 100644 test/Transforms/Reassociate/2002-05-15-SubReassociate.ll create mode 100644 test/Transforms/Reassociate/2002-05-15-SubReassociate2.ll create mode 100644 test/Transforms/Reassociate/2002-07-09-DominanceProblem.ll create mode 100644 test/Transforms/Reassociate/2003-08-12-InfiniteLoop.ll create mode 100644 test/Transforms/Reassociate/2005-09-01-ArrayOutOfBounds.ll create mode 100644 test/Transforms/Reassociate/2006-04-27-ReassociateVector.ll create mode 100644 test/Transforms/Reassociate/2011-01-26-UseAfterFree.ll create mode 100644 test/Transforms/Reassociate/2012-05-08-UndefLeak.ll create mode 100644 test/Transforms/Reassociate/2012-06-08-InfiniteLoop.ll create mode 100644 test/Transforms/Reassociate/absorption.ll create mode 100644 test/Transforms/Reassociate/basictest.ll create mode 100644 test/Transforms/Reassociate/crash.ll create mode 100644 test/Transforms/Reassociate/fp-commute.ll create mode 100644 test/Transforms/Reassociate/inverses.ll create mode 100644 test/Transforms/Reassociate/looptest.ll create mode 100644 test/Transforms/Reassociate/mightymul.ll create mode 100644 test/Transforms/Reassociate/mulfactor.ll create mode 100644 test/Transforms/Reassociate/multistep.ll create mode 100644 test/Transforms/Reassociate/negation.ll create mode 100644 test/Transforms/Reassociate/no-op.ll create mode 100644 test/Transforms/Reassociate/optional-flags.ll create mode 100644 test/Transforms/Reassociate/otherops.ll create mode 100644 test/Transforms/Reassociate/pr12245.ll create mode 100644 test/Transforms/Reassociate/repeats.ll create mode 100644 test/Transforms/Reassociate/secondary.ll create mode 100644 test/Transforms/Reassociate/shift-factor.ll create mode 100644 test/Transforms/Reassociate/shifttest.ll create mode 100644 test/Transforms/Reassociate/subtest.ll create mode 100644 test/Transforms/Reassociate/subtest2.ll create mode 100644 test/Transforms/Reassociate/xor_reassoc.ll create mode 100644 test/Transforms/Reg2Mem/crash.ll create mode 100644 test/Transforms/SCCP/2002-05-02-MissSecondInst.ll create mode 100644 test/Transforms/SCCP/2002-05-20-MissedIncomingValue.ll create mode 100644 test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll create mode 100644 test/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll create mode 100644 test/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll create mode 100644 test/Transforms/SCCP/2003-08-26-InvokeHandling.ll create mode 100644 test/Transforms/SCCP/2004-11-16-DeadInvoke.ll create mode 100644 test/Transforms/SCCP/2004-12-10-UndefBranchBug.ll create mode 100644 test/Transforms/SCCP/2006-10-23-IPSCCP-Crash.ll create mode 100644 test/Transforms/SCCP/2006-12-04-PackedType.ll create mode 100644 test/Transforms/SCCP/2006-12-19-UndefBug.ll create mode 100644 test/Transforms/SCCP/2007-05-16-InvokeCrash.ll create mode 100644 test/Transforms/SCCP/2008-01-27-UndefCorrelate.ll create mode 100644 test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll create mode 100644 test/Transforms/SCCP/2008-05-23-UndefCallFold.ll create mode 100644 test/Transforms/SCCP/2009-01-14-IPSCCP-Invoke.ll create mode 100644 test/Transforms/SCCP/2009-05-27-VectorOperandZero.ll create mode 100644 test/Transforms/SCCP/apint-array.ll create mode 100644 test/Transforms/SCCP/apint-basictest.ll create mode 100644 test/Transforms/SCCP/apint-basictest2.ll create mode 100644 test/Transforms/SCCP/apint-basictest3.ll create mode 100644 test/Transforms/SCCP/apint-basictest4.ll create mode 100644 test/Transforms/SCCP/apint-bigarray.ll create mode 100644 test/Transforms/SCCP/apint-bigint.ll create mode 100644 test/Transforms/SCCP/apint-bigint2.ll create mode 100644 test/Transforms/SCCP/apint-ipsccp1.ll create mode 100644 test/Transforms/SCCP/apint-ipsccp2.ll create mode 100644 test/Transforms/SCCP/apint-ipsccp3.ll create mode 100644 test/Transforms/SCCP/apint-ipsccp4.ll create mode 100644 test/Transforms/SCCP/apint-load.ll create mode 100644 test/Transforms/SCCP/apint-phi.ll create mode 100644 test/Transforms/SCCP/apint-select.ll create mode 100644 test/Transforms/SCCP/atomic-load-store.ll create mode 100644 test/Transforms/SCCP/calltest.ll create mode 100644 test/Transforms/SCCP/crash.ll create mode 100644 test/Transforms/SCCP/ipsccp-addr-taken.ll create mode 100644 test/Transforms/SCCP/ipsccp-basic.ll create mode 100644 test/Transforms/SCCP/loadtest.ll create mode 100644 test/Transforms/SCCP/logical-nuke.ll create mode 100644 test/Transforms/SCCP/retvalue-undef.ll create mode 100644 test/Transforms/SCCP/sccptest.ll create mode 100644 test/Transforms/SCCP/select.ll create mode 100644 test/Transforms/SCCP/switch.ll create mode 100644 test/Transforms/SCCP/undef-resolve.ll create mode 100644 test/Transforms/SCCP/vector-bitcast.ll create mode 100644 test/Transforms/SLPVectorizer/ARM/lit.local.cfg create mode 100644 test/Transforms/SLPVectorizer/ARM/memory.ll create mode 100644 test/Transforms/SLPVectorizer/ARM/sroa.ll create mode 100644 test/Transforms/SLPVectorizer/R600/lit.local.cfg create mode 100644 test/Transforms/SLPVectorizer/R600/simplebb.ll create mode 100644 test/Transforms/SLPVectorizer/X86/barriercall.ll create mode 100644 test/Transforms/SLPVectorizer/X86/cast.ll create mode 100644 test/Transforms/SLPVectorizer/X86/cmp_sel.ll create mode 100644 test/Transforms/SLPVectorizer/X86/compare-reduce.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_7zip.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_bullet.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_bullet3.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_dequeue.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_flop7.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_lencod.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_mandeltext.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_netbsd_decompress.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_sim4b1.ll create mode 100644 test/Transforms/SLPVectorizer/X86/crash_smallpt.ll create mode 100644 test/Transforms/SLPVectorizer/X86/cross_block_slp.ll create mode 100644 test/Transforms/SLPVectorizer/X86/cse.ll create mode 100644 test/Transforms/SLPVectorizer/X86/cycle_dup.ll create mode 100644 test/Transforms/SLPVectorizer/X86/debug_info.ll create mode 100644 test/Transforms/SLPVectorizer/X86/diamond.ll create mode 100644 test/Transforms/SLPVectorizer/X86/external_user.ll create mode 100644 test/Transforms/SLPVectorizer/X86/extract.ll create mode 100644 test/Transforms/SLPVectorizer/X86/flag.ll create mode 100644 test/Transforms/SLPVectorizer/X86/hoist.ll create mode 100644 test/Transforms/SLPVectorizer/X86/horizontal.ll create mode 100644 test/Transforms/SLPVectorizer/X86/implicitfloat.ll create mode 100644 test/Transforms/SLPVectorizer/X86/in-tree-user.ll create mode 100644 test/Transforms/SLPVectorizer/X86/insert-element-build-vector.ll create mode 100644 test/Transforms/SLPVectorizer/X86/lit.local.cfg create mode 100644 test/Transforms/SLPVectorizer/X86/long_chains.ll create mode 100644 test/Transforms/SLPVectorizer/X86/loopinvariant.ll create mode 100644 test/Transforms/SLPVectorizer/X86/multi_block.ll create mode 100644 test/Transforms/SLPVectorizer/X86/multi_user.ll create mode 100644 test/Transforms/SLPVectorizer/X86/odd_store.ll create mode 100644 test/Transforms/SLPVectorizer/X86/operandorder.ll create mode 100644 test/Transforms/SLPVectorizer/X86/opt.ll create mode 100644 test/Transforms/SLPVectorizer/X86/ordering.ll create mode 100644 test/Transforms/SLPVectorizer/X86/phi.ll create mode 100644 test/Transforms/SLPVectorizer/X86/phi3.ll create mode 100644 test/Transforms/SLPVectorizer/X86/phi_landingpad.ll create mode 100644 test/Transforms/SLPVectorizer/X86/phi_overalignedtype.ll create mode 100644 test/Transforms/SLPVectorizer/X86/pr16571.ll create mode 100644 test/Transforms/SLPVectorizer/X86/pr16628.ll create mode 100644 test/Transforms/SLPVectorizer/X86/pr16899.ll create mode 100644 test/Transforms/SLPVectorizer/X86/pr18060.ll create mode 100644 test/Transforms/SLPVectorizer/X86/reduction.ll create mode 100644 test/Transforms/SLPVectorizer/X86/reduction2.ll create mode 100644 test/Transforms/SLPVectorizer/X86/rgb_phi.ll create mode 100644 test/Transforms/SLPVectorizer/X86/saxpy.ll create mode 100644 test/Transforms/SLPVectorizer/X86/simple-loop.ll create mode 100644 test/Transforms/SLPVectorizer/X86/simplebb.ll create mode 100644 test/Transforms/SLPVectorizer/X86/tiny-tree.ll create mode 100644 test/Transforms/SLPVectorizer/X86/vector.ll create mode 100644 test/Transforms/SLPVectorizer/XCore/lit.local.cfg create mode 100644 test/Transforms/SLPVectorizer/XCore/no-vector-registers.ll create mode 100644 test/Transforms/SROA/alignment.ll create mode 100644 test/Transforms/SROA/basictest.ll create mode 100644 test/Transforms/SROA/big-endian.ll create mode 100644 test/Transforms/SROA/fca.ll create mode 100644 test/Transforms/SROA/phi-and-select.ll create mode 100644 test/Transforms/SROA/vector-conversion.ll create mode 100644 test/Transforms/SROA/vector-promotion.ll create mode 100644 test/Transforms/SROA/vectors-of-pointers.ll create mode 100644 test/Transforms/SampleProfile/Inputs/branch.prof create mode 100644 test/Transforms/SampleProfile/branch.ll create mode 100644 test/Transforms/ScalarRepl/2003-05-29-ArrayFail.ll create mode 100644 test/Transforms/ScalarRepl/2003-09-12-IncorrectPromote.ll create mode 100644 test/Transforms/ScalarRepl/2003-10-29-ArrayProblem.ll create mode 100644 test/Transforms/ScalarRepl/2006-11-07-InvalidArrayPromote.ll create mode 100644 test/Transforms/ScalarRepl/2007-05-29-MemcpyPreserve.ll create mode 100644 test/Transforms/ScalarRepl/2007-11-03-bigendian_apint.ll create mode 100644 test/Transforms/ScalarRepl/2008-01-29-PromoteBug.ll create mode 100644 test/Transforms/ScalarRepl/2008-02-28-SubElementExtractCrash.ll create mode 100644 test/Transforms/ScalarRepl/2008-06-05-loadstore-agg.ll create mode 100644 test/Transforms/ScalarRepl/2008-06-22-LargeArray.ll create mode 100644 test/Transforms/ScalarRepl/2008-08-22-out-of-range-array-promote.ll create mode 100644 test/Transforms/ScalarRepl/2008-09-22-vector-gep.ll create mode 100644 test/Transforms/ScalarRepl/2009-02-02-ScalarPromoteOutOfRange.ll create mode 100644 test/Transforms/ScalarRepl/2009-02-05-LoadFCA.ll create mode 100644 test/Transforms/ScalarRepl/2009-03-04-MemCpyAlign.ll create mode 100644 test/Transforms/ScalarRepl/2009-12-11-NeonTypes.ll create mode 100644 test/Transforms/ScalarRepl/2010-01-18-SelfCopy.ll create mode 100644 test/Transforms/ScalarRepl/2011-05-06-CapturedAlloca.ll create mode 100644 test/Transforms/ScalarRepl/2011-06-08-VectorExtractValue.ll create mode 100644 test/Transforms/ScalarRepl/2011-06-17-VectorPartialMemset.ll create mode 100644 test/Transforms/ScalarRepl/2011-09-22-PHISpeculateInvoke.ll create mode 100644 test/Transforms/ScalarRepl/2011-10-11-VectorMemset.ll create mode 100644 test/Transforms/ScalarRepl/2011-10-22-VectorCrash.ll create mode 100644 test/Transforms/ScalarRepl/2011-11-11-EmptyStruct.ll create mode 100644 test/Transforms/ScalarRepl/AggregatePromote.ll create mode 100644 test/Transforms/ScalarRepl/DifferingTypes.ll create mode 100644 test/Transforms/ScalarRepl/address-space.ll create mode 100644 test/Transforms/ScalarRepl/arraytest.ll create mode 100644 test/Transforms/ScalarRepl/badarray.ll create mode 100644 test/Transforms/ScalarRepl/basictest.ll create mode 100644 test/Transforms/ScalarRepl/bitfield-sroa.ll create mode 100644 test/Transforms/ScalarRepl/copy-aggregate.ll create mode 100644 test/Transforms/ScalarRepl/crash.ll create mode 100644 test/Transforms/ScalarRepl/debuginfo-preserved.ll create mode 100644 test/Transforms/ScalarRepl/inline-vector.ll create mode 100644 test/Transforms/ScalarRepl/lifetime.ll create mode 100644 test/Transforms/ScalarRepl/load-store-aggregate.ll create mode 100644 test/Transforms/ScalarRepl/memcpy-align.ll create mode 100644 test/Transforms/ScalarRepl/memset-aggregate-byte-leader.ll create mode 100644 test/Transforms/ScalarRepl/memset-aggregate.ll create mode 100644 test/Transforms/ScalarRepl/negative-memset.ll create mode 100644 test/Transforms/ScalarRepl/nonzero-first-index.ll create mode 100644 test/Transforms/ScalarRepl/not-a-vector.ll create mode 100644 test/Transforms/ScalarRepl/only-memcpy-uses.ll create mode 100644 test/Transforms/ScalarRepl/phi-cycle.ll create mode 100644 test/Transforms/ScalarRepl/phi-select.ll create mode 100644 test/Transforms/ScalarRepl/phinodepromote.ll create mode 100644 test/Transforms/ScalarRepl/select_promote.ll create mode 100644 test/Transforms/ScalarRepl/sroa-fca.ll create mode 100644 test/Transforms/ScalarRepl/sroa_two.ll create mode 100644 test/Transforms/ScalarRepl/union-fp-int.ll create mode 100644 test/Transforms/ScalarRepl/union-packed.ll create mode 100644 test/Transforms/ScalarRepl/union-pointer.ll create mode 100644 test/Transforms/ScalarRepl/vector_memcpy.ll create mode 100644 test/Transforms/ScalarRepl/vector_promote.ll create mode 100644 test/Transforms/ScalarRepl/vectors-with-mismatched-elements.ll create mode 100644 test/Transforms/ScalarRepl/volatile.ll create mode 100644 test/Transforms/SimplifyCFG/2002-05-21-PHIElimination.ll create mode 100644 test/Transforms/SimplifyCFG/2002-09-24-PHIAssertion.ll create mode 100644 test/Transforms/SimplifyCFG/2003-03-07-DominateProblem.ll create mode 100644 test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll create mode 100644 test/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll create mode 100644 test/Transforms/SimplifyCFG/2003-08-17-BranchFoldOrdering.ll create mode 100644 test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch-dbg.ll create mode 100644 test/Transforms/SimplifyCFG/2003-08-17-FoldSwitch.ll create mode 100644 test/Transforms/SimplifyCFG/2004-12-10-SimplifyCFGCrash.ll create mode 100644 test/Transforms/SimplifyCFG/2005-06-16-PHICrash.ll create mode 100644 test/Transforms/SimplifyCFG/2005-08-01-PHIUpdateFail.ll create mode 100644 test/Transforms/SimplifyCFG/2005-10-02-InvokeSimplify.ll create mode 100644 test/Transforms/SimplifyCFG/2005-12-03-IncorrectPHIFold.ll create mode 100644 test/Transforms/SimplifyCFG/2006-02-17-InfiniteUnroll.ll create mode 100644 test/Transforms/SimplifyCFG/2006-06-12-InfLoop.ll create mode 100644 test/Transforms/SimplifyCFG/2006-08-03-Crash.ll create mode 100644 test/Transforms/SimplifyCFG/2006-10-19-UncondDiv.ll create mode 100644 test/Transforms/SimplifyCFG/2006-12-08-Ptr-ICmp-Branch.ll create mode 100644 test/Transforms/SimplifyCFG/2007-11-22-InvokeNoUnwind.ll create mode 100644 test/Transforms/SimplifyCFG/2007-12-21-Crash.ll create mode 100644 test/Transforms/SimplifyCFG/2008-01-02-hoist-fp-add.ll create mode 100644 test/Transforms/SimplifyCFG/2008-05-16-PHIBlockMerge.ll create mode 100644 test/Transforms/SimplifyCFG/2008-07-13-InfLoopMiscompile.ll create mode 100644 test/Transforms/SimplifyCFG/2008-09-08-MultiplePred.ll create mode 100644 test/Transforms/SimplifyCFG/2008-09-17-SpeculativeHoist.ll create mode 100644 test/Transforms/SimplifyCFG/2008-10-03-SpeculativelyExecuteBeforePHI.ll create mode 100644 test/Transforms/SimplifyCFG/2008-12-06-SingleEntryPhi.ll create mode 100644 test/Transforms/SimplifyCFG/2008-12-16-DCECond.ll create mode 100644 test/Transforms/SimplifyCFG/2009-01-18-PHIPropCrash.ll create mode 100644 test/Transforms/SimplifyCFG/2009-01-19-UnconditionalTrappingConstantExpr.ll create mode 100644 test/Transforms/SimplifyCFG/2009-05-12-externweak.ll create mode 100644 test/Transforms/SimplifyCFG/2010-03-30-InvokeCrash.ll create mode 100644 test/Transforms/SimplifyCFG/2011-03-08-UnreachableUse.ll create mode 100644 test/Transforms/SimplifyCFG/2011-09-05-TrivialLPad.ll create mode 100644 test/Transforms/SimplifyCFG/BrUnwind.ll create mode 100644 test/Transforms/SimplifyCFG/CoveredLookupTable.ll create mode 100644 test/Transforms/SimplifyCFG/DeadSetCC.ll create mode 100644 test/Transforms/SimplifyCFG/EmptyBlockMerge.ll create mode 100644 test/Transforms/SimplifyCFG/EqualPHIEdgeBlockMerge.ll create mode 100644 test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll create mode 100644 test/Transforms/SimplifyCFG/HoistCode.ll create mode 100644 test/Transforms/SimplifyCFG/MagicPointer.ll create mode 100644 test/Transforms/SimplifyCFG/PHINode.ll create mode 100644 test/Transforms/SimplifyCFG/PR16069.ll create mode 100644 test/Transforms/SimplifyCFG/PR9946.ll create mode 100644 test/Transforms/SimplifyCFG/PhiBlockMerge.ll create mode 100644 test/Transforms/SimplifyCFG/PhiBlockMerge2.ll create mode 100644 test/Transforms/SimplifyCFG/PhiEliminate.ll create mode 100644 test/Transforms/SimplifyCFG/PhiEliminate2.ll create mode 100644 test/Transforms/SimplifyCFG/PhiEliminate3.ll create mode 100644 test/Transforms/SimplifyCFG/PhiNoEliminate.ll create mode 100644 test/Transforms/SimplifyCFG/SPARC/lit.local.cfg create mode 100644 test/Transforms/SimplifyCFG/SPARC/switch_to_lookup_table.ll create mode 100644 test/Transforms/SimplifyCFG/SpeculativeExec.ll create mode 100644 test/Transforms/SimplifyCFG/UncondBranchToReturn.ll create mode 100644 test/Transforms/SimplifyCFG/UnreachableEliminate.ll create mode 100644 test/Transforms/SimplifyCFG/X86/lit.local.cfg create mode 100644 test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll create mode 100644 test/Transforms/SimplifyCFG/attr-noduplicate.ll create mode 100644 test/Transforms/SimplifyCFG/basictest.ll create mode 100644 test/Transforms/SimplifyCFG/branch-cond-merge.ll create mode 100644 test/Transforms/SimplifyCFG/branch-cond-prop.ll create mode 100644 test/Transforms/SimplifyCFG/branch-fold-dbg.ll create mode 100644 test/Transforms/SimplifyCFG/branch-fold-test.ll create mode 100644 test/Transforms/SimplifyCFG/branch-fold.ll create mode 100644 test/Transforms/SimplifyCFG/branch-phi-thread.ll create mode 100644 test/Transforms/SimplifyCFG/common-dest-folding.ll create mode 100644 test/Transforms/SimplifyCFG/dbginfo.ll create mode 100644 test/Transforms/SimplifyCFG/dce-cond-after-folding-terminator.ll create mode 100644 test/Transforms/SimplifyCFG/duplicate-phis.ll create mode 100644 test/Transforms/SimplifyCFG/hoist-common-code.ll create mode 100644 test/Transforms/SimplifyCFG/hoist-dbgvalue.ll create mode 100644 test/Transforms/SimplifyCFG/indirectbr.ll create mode 100644 test/Transforms/SimplifyCFG/invoke.ll create mode 100644 test/Transforms/SimplifyCFG/invoke_unwind.ll create mode 100644 test/Transforms/SimplifyCFG/iterative-simplify.ll create mode 100644 test/Transforms/SimplifyCFG/lifetime.ll create mode 100644 test/Transforms/SimplifyCFG/multiple-phis.ll create mode 100644 test/Transforms/SimplifyCFG/noreturn-call.ll create mode 100644 test/Transforms/SimplifyCFG/phi-undef-loadstore.ll create mode 100644 test/Transforms/SimplifyCFG/preserve-branchweights-partial.ll create mode 100644 test/Transforms/SimplifyCFG/preserve-branchweights-switch-create.ll create mode 100644 test/Transforms/SimplifyCFG/preserve-branchweights.ll create mode 100644 test/Transforms/SimplifyCFG/return-merge.ll create mode 100644 test/Transforms/SimplifyCFG/select-gep.ll create mode 100644 test/Transforms/SimplifyCFG/sink-common-code.ll create mode 100644 test/Transforms/SimplifyCFG/speculate-store.ll create mode 100644 test/Transforms/SimplifyCFG/speculate-with-offset.ll create mode 100644 test/Transforms/SimplifyCFG/switch-masked-bits.ll create mode 100644 test/Transforms/SimplifyCFG/switch-on-const-select.ll create mode 100644 test/Transforms/SimplifyCFG/switch-simplify-crash.ll create mode 100644 test/Transforms/SimplifyCFG/switch-to-icmp.ll create mode 100644 test/Transforms/SimplifyCFG/switch_create.ll create mode 100644 test/Transforms/SimplifyCFG/switch_switch_fold.ll create mode 100644 test/Transforms/SimplifyCFG/switch_thread.ll create mode 100644 test/Transforms/SimplifyCFG/trap-debugloc.ll create mode 100644 test/Transforms/SimplifyCFG/trapping-load-unreachable.ll create mode 100644 test/Transforms/SimplifyCFG/trivial-throw.ll create mode 100644 test/Transforms/SimplifyCFG/two-entry-phi-return.ll create mode 100644 test/Transforms/SimplifyCFG/unreachable-blocks.ll create mode 100644 test/Transforms/SimplifyCFG/volatile-phioper.ll create mode 100644 test/Transforms/Sink/basic.ll create mode 100644 test/Transforms/StripSymbols/2007-01-15-llvm.used.ll create mode 100644 test/Transforms/StripSymbols/2010-06-30-StripDebug.ll create mode 100644 test/Transforms/StripSymbols/2010-08-25-crash.ll create mode 100644 test/Transforms/StripSymbols/block-address.ll create mode 100644 test/Transforms/StripSymbols/strip-dead-debug-info.ll create mode 100644 test/Transforms/StructurizeCFG/branch-on-argument.ll create mode 100644 test/Transforms/StructurizeCFG/loop-multiple-exits.ll create mode 100644 test/Transforms/StructurizeCFG/no-branch-to-entry.ll create mode 100644 test/Transforms/StructurizeCFG/switch.ll create mode 100644 test/Transforms/TailCallElim/2010-06-26-MultipleReturnValues.ll create mode 100644 test/Transforms/TailCallElim/accum_recursion.ll create mode 100644 test/Transforms/TailCallElim/ackermann.ll create mode 100644 test/Transforms/TailCallElim/basic.ll create mode 100644 test/Transforms/TailCallElim/dont_reorder_load.ll create mode 100644 test/Transforms/TailCallElim/dup_tail.ll create mode 100644 test/Transforms/TailCallElim/inf-recursion.ll create mode 100644 test/Transforms/TailCallElim/reorder_load.ll create mode 100644 test/Transforms/TailCallElim/setjmp.ll create mode 100644 test/Transforms/TailDup/2008-06-11-AvoidDupLoopHeader.ll create mode 100644 test/Transforms/TailDup/X86/lit.local.cfg create mode 100644 test/Transforms/TailDup/lit.local.cfg create mode 100644 test/Unit/lit.cfg create mode 100644 test/Unit/lit.site.cfg.in create mode 100644 test/Verifier/2002-04-13-RetTypes.ll create mode 100644 test/Verifier/2002-11-05-GetelementptrPointers.ll create mode 100644 test/Verifier/2004-05-21-SwitchConstantMismatch.ll create mode 100644 test/Verifier/2006-07-11-StoreStruct.ll create mode 100644 test/Verifier/2006-10-15-AddrLabel.ll create mode 100644 test/Verifier/2006-12-12-IntrinsicDefine.ll create mode 100644 test/Verifier/2007-12-21-InvokeParamAttrs.ll create mode 100644 test/Verifier/2008-01-11-VarargAttrs.ll create mode 100644 test/Verifier/2008-03-01-AllocaSized.ll create mode 100644 test/Verifier/2008-08-22-MemCpyAlignment.ll create mode 100644 test/Verifier/2008-11-15-RetVoid.ll create mode 100644 test/Verifier/2009-05-29-InvokeResult1.ll create mode 100644 test/Verifier/2009-05-29-InvokeResult2.ll create mode 100644 test/Verifier/2009-05-29-InvokeResult3.ll create mode 100644 test/Verifier/2010-08-07-PointerIntrinsic.ll create mode 100644 test/Verifier/AmbiguousPhi.ll create mode 100644 test/Verifier/PhiGrouping.ll create mode 100644 test/Verifier/README.txt create mode 100644 test/Verifier/SelfReferential.ll create mode 100644 test/Verifier/aliasing-chain.ll create mode 100644 test/Verifier/bitcast-address-space-nested-global-cycle.ll create mode 100644 test/Verifier/bitcast-address-space-nested-global.ll create mode 100644 test/Verifier/bitcast-address-space-through-constant-inttoptr-inside-gep-instruction.ll create mode 100644 test/Verifier/bitcast-address-space-through-constant-inttoptr.ll create mode 100644 test/Verifier/bitcast-address-space-through-gep-2.ll create mode 100644 test/Verifier/bitcast-address-space-through-gep.ll create mode 100644 test/Verifier/bitcast-address-space-through-inttoptr.ll create mode 100644 test/Verifier/bitcast-address-spaces.ll create mode 100644 test/Verifier/bitcast-alias-address-space.ll create mode 100644 test/Verifier/bitcast-vector-pointer-as.ll create mode 100644 test/Verifier/byval-1.ll create mode 100644 test/Verifier/byval-4.ll create mode 100644 test/Verifier/cttz-undef-arg.ll create mode 100644 test/Verifier/dominates.ll create mode 100644 test/Verifier/fpmath.ll create mode 100644 test/Verifier/gcread-ptrptr.ll create mode 100644 test/Verifier/gcroot-alloca.ll create mode 100644 test/Verifier/gcroot-meta.ll create mode 100644 test/Verifier/gcroot-ptrptr.ll create mode 100644 test/Verifier/gcwrite-ptrptr.ll create mode 100644 test/Verifier/ident-meta1.ll create mode 100644 test/Verifier/ident-meta2.ll create mode 100644 test/Verifier/ident-meta3.ll create mode 100644 test/Verifier/invoke.ll create mode 100644 test/Verifier/llvm.compiler_used-invalid-type.ll create mode 100644 test/Verifier/llvm.used-invalid-init.ll create mode 100644 test/Verifier/llvm.used-invalid-init2.ll create mode 100644 test/Verifier/llvm.used-invalid-type.ll create mode 100644 test/Verifier/llvm.used-invalid-type2.ll create mode 100644 test/Verifier/llvm.used-ptr-type.ll create mode 100644 test/Verifier/module-flags-1.ll create mode 100644 test/Verifier/range-1.ll create mode 100644 test/Verifier/range-2.ll create mode 100644 test/Verifier/varargs-intrinsic.ll create mode 100644 test/YAMLParser/LICENSE.txt create mode 100644 test/YAMLParser/bool.data create mode 100644 test/YAMLParser/construct-bool.data create mode 100644 test/YAMLParser/construct-custom.data create mode 100644 test/YAMLParser/construct-float.data create mode 100644 test/YAMLParser/construct-int.data create mode 100644 test/YAMLParser/construct-map.data create mode 100644 test/YAMLParser/construct-merge.data create mode 100644 test/YAMLParser/construct-null.data create mode 100644 test/YAMLParser/construct-omap.data create mode 100644 test/YAMLParser/construct-pairs.data create mode 100644 test/YAMLParser/construct-seq.data create mode 100644 test/YAMLParser/construct-set.data create mode 100644 test/YAMLParser/construct-str-ascii.data create mode 100644 test/YAMLParser/construct-str.data create mode 100644 test/YAMLParser/construct-timestamp.data create mode 100644 test/YAMLParser/construct-value.data create mode 100644 test/YAMLParser/duplicate-key.former-loader-error.data create mode 100644 test/YAMLParser/duplicate-mapping-key.former-loader-error.data create mode 100644 test/YAMLParser/duplicate-merge-key.former-loader-error.data create mode 100644 test/YAMLParser/duplicate-value-key.former-loader-error.data create mode 100644 test/YAMLParser/emit-block-scalar-in-simple-key-context-bug.data create mode 100644 test/YAMLParser/empty-document-bug.data create mode 100644 test/YAMLParser/float.data create mode 100644 test/YAMLParser/int.data create mode 100644 test/YAMLParser/invalid-single-quote-bug.data create mode 100644 test/YAMLParser/merge.data create mode 100644 test/YAMLParser/more-floats.data create mode 100644 test/YAMLParser/negative-float-bug.data create mode 100644 test/YAMLParser/null.data create mode 100644 test/YAMLParser/resolver.data create mode 100644 test/YAMLParser/run-parser-crash-bug.data create mode 100644 test/YAMLParser/scan-document-end-bug.data create mode 100644 test/YAMLParser/scan-line-break-bug.data create mode 100644 test/YAMLParser/single-dot-is-not-float-bug.data create mode 100644 test/YAMLParser/sloppy-indentation.data create mode 100644 test/YAMLParser/spec-02-01.data create mode 100644 test/YAMLParser/spec-02-02.data create mode 100644 test/YAMLParser/spec-02-03.data create mode 100644 test/YAMLParser/spec-02-04.data create mode 100644 test/YAMLParser/spec-02-05.data create mode 100644 test/YAMLParser/spec-02-06.data create mode 100644 test/YAMLParser/spec-02-07.data create mode 100644 test/YAMLParser/spec-02-08.data create mode 100644 test/YAMLParser/spec-02-09.data create mode 100644 test/YAMLParser/spec-02-10.data create mode 100644 test/YAMLParser/spec-02-11.data create mode 100644 test/YAMLParser/spec-02-12.data create mode 100644 test/YAMLParser/spec-02-13.data create mode 100644 test/YAMLParser/spec-02-14.data create mode 100644 test/YAMLParser/spec-02-15.data create mode 100644 test/YAMLParser/spec-02-16.data create mode 100644 test/YAMLParser/spec-02-17.data create mode 100644 test/YAMLParser/spec-02-18.data create mode 100644 test/YAMLParser/spec-02-19.data create mode 100644 test/YAMLParser/spec-02-20.data create mode 100644 test/YAMLParser/spec-02-21.data create mode 100644 test/YAMLParser/spec-02-22.data create mode 100644 test/YAMLParser/spec-02-23.data create mode 100644 test/YAMLParser/spec-02-24.data create mode 100644 test/YAMLParser/spec-02-25.data create mode 100644 test/YAMLParser/spec-02-26.data create mode 100644 test/YAMLParser/spec-02-27.data create mode 100644 test/YAMLParser/spec-02-28.data create mode 100644 test/YAMLParser/spec-05-01-utf8.data create mode 100644 test/YAMLParser/spec-05-02-utf8.data create mode 100644 test/YAMLParser/spec-05-03.data create mode 100644 test/YAMLParser/spec-05-04.data create mode 100644 test/YAMLParser/spec-05-05.data create mode 100644 test/YAMLParser/spec-05-06.data create mode 100644 test/YAMLParser/spec-05-07.data create mode 100644 test/YAMLParser/spec-05-08.data create mode 100644 test/YAMLParser/spec-05-09.data create mode 100644 test/YAMLParser/spec-05-10.data create mode 100644 test/YAMLParser/spec-05-11.data create mode 100644 test/YAMLParser/spec-05-12.data create mode 100644 test/YAMLParser/spec-05-13.data create mode 100644 test/YAMLParser/spec-05-14.data create mode 100644 test/YAMLParser/spec-05-15.data create mode 100644 test/YAMLParser/spec-06-01.data create mode 100644 test/YAMLParser/spec-06-02.data create mode 100644 test/YAMLParser/spec-06-03.data create mode 100644 test/YAMLParser/spec-06-04.data create mode 100644 test/YAMLParser/spec-06-05.data create mode 100644 test/YAMLParser/spec-06-06.data create mode 100644 test/YAMLParser/spec-06-07.data create mode 100644 test/YAMLParser/spec-06-08.data create mode 100644 test/YAMLParser/spec-07-01.data create mode 100644 test/YAMLParser/spec-07-02.data create mode 100644 test/YAMLParser/spec-07-03.data create mode 100644 test/YAMLParser/spec-07-04.data create mode 100644 test/YAMLParser/spec-07-05.data create mode 100644 test/YAMLParser/spec-07-06.data create mode 100644 test/YAMLParser/spec-07-07a.data create mode 100644 test/YAMLParser/spec-07-07b.data create mode 100644 test/YAMLParser/spec-07-08.data create mode 100644 test/YAMLParser/spec-07-09.data create mode 100644 test/YAMLParser/spec-07-10.data create mode 100644 test/YAMLParser/spec-07-11.data create mode 100644 test/YAMLParser/spec-07-12a.data create mode 100644 test/YAMLParser/spec-07-12b.data create mode 100644 test/YAMLParser/spec-07-13.data create mode 100644 test/YAMLParser/spec-08-01.data create mode 100644 test/YAMLParser/spec-08-02.data create mode 100644 test/YAMLParser/spec-08-03.data create mode 100644 test/YAMLParser/spec-08-04.data create mode 100644 test/YAMLParser/spec-08-05.data create mode 100644 test/YAMLParser/spec-08-06.data create mode 100644 test/YAMLParser/spec-08-07.data create mode 100644 test/YAMLParser/spec-08-08.data create mode 100644 test/YAMLParser/spec-08-09.data create mode 100644 test/YAMLParser/spec-08-10.data create mode 100644 test/YAMLParser/spec-08-11.data create mode 100644 test/YAMLParser/spec-08-12.data create mode 100644 test/YAMLParser/spec-08-13.data create mode 100644 test/YAMLParser/spec-08-14.data create mode 100644 test/YAMLParser/spec-08-15.data create mode 100644 test/YAMLParser/spec-09-01.data create mode 100644 test/YAMLParser/spec-09-02.data create mode 100644 test/YAMLParser/spec-09-03.data create mode 100644 test/YAMLParser/spec-09-04.data create mode 100644 test/YAMLParser/spec-09-05.data create mode 100644 test/YAMLParser/spec-09-06.data create mode 100644 test/YAMLParser/spec-09-07.data create mode 100644 test/YAMLParser/spec-09-08.data create mode 100644 test/YAMLParser/spec-09-09.data create mode 100644 test/YAMLParser/spec-09-10.data create mode 100644 test/YAMLParser/spec-09-11.data create mode 100644 test/YAMLParser/spec-09-12.data create mode 100644 test/YAMLParser/spec-09-13.data create mode 100644 test/YAMLParser/spec-09-14.data create mode 100644 test/YAMLParser/spec-09-15.data create mode 100644 test/YAMLParser/spec-09-16.data create mode 100644 test/YAMLParser/spec-09-17.data create mode 100644 test/YAMLParser/spec-09-18.data create mode 100644 test/YAMLParser/spec-09-19.data create mode 100644 test/YAMLParser/spec-09-20.data create mode 100644 test/YAMLParser/spec-09-21.data create mode 100644 test/YAMLParser/spec-09-22.data create mode 100644 test/YAMLParser/spec-09-23.data create mode 100644 test/YAMLParser/spec-09-24.data create mode 100644 test/YAMLParser/spec-09-25.data create mode 100644 test/YAMLParser/spec-09-26.data create mode 100644 test/YAMLParser/spec-09-27.data create mode 100644 test/YAMLParser/spec-09-28.data create mode 100644 test/YAMLParser/spec-09-29.data create mode 100644 test/YAMLParser/spec-09-30.data create mode 100644 test/YAMLParser/spec-09-31.data create mode 100644 test/YAMLParser/spec-09-32.data create mode 100644 test/YAMLParser/spec-09-33.data create mode 100644 test/YAMLParser/spec-10-01.data create mode 100644 test/YAMLParser/spec-10-02.data create mode 100644 test/YAMLParser/spec-10-03.data create mode 100644 test/YAMLParser/spec-10-04.data create mode 100644 test/YAMLParser/spec-10-05.data create mode 100644 test/YAMLParser/spec-10-06.data create mode 100644 test/YAMLParser/spec-10-07.data create mode 100644 test/YAMLParser/spec-10-08.data create mode 100644 test/YAMLParser/spec-10-09.data create mode 100644 test/YAMLParser/spec-10-10.data create mode 100644 test/YAMLParser/spec-10-11.data create mode 100644 test/YAMLParser/spec-10-12.data create mode 100644 test/YAMLParser/spec-10-13.data create mode 100644 test/YAMLParser/spec-10-14.data create mode 100644 test/YAMLParser/spec-10-15.data create mode 100644 test/YAMLParser/str.data create mode 100644 test/YAMLParser/timestamp-bugs.data create mode 100644 test/YAMLParser/timestamp.data create mode 100644 test/YAMLParser/utf8-implicit.data create mode 100644 test/YAMLParser/utf8.data create mode 100644 test/YAMLParser/value.data create mode 100644 test/YAMLParser/yaml.data create mode 100644 test/lit.cfg create mode 100644 test/lit.site.cfg.in create mode 100644 test/tools/llvm-cov/Inputs/README create mode 100644 test/tools/llvm-cov/Inputs/test.cpp create mode 100644 test/tools/llvm-cov/Inputs/test.cpp.gcov create mode 100644 test/tools/llvm-cov/Inputs/test.gcda create mode 100644 test/tools/llvm-cov/Inputs/test.gcno create mode 100644 test/tools/llvm-cov/Inputs/test_read_fail.gcno create mode 100644 test/tools/llvm-cov/lit.local.cfg create mode 100644 test/tools/llvm-cov/llvm-cov.test create mode 100644 test/tools/llvm-lit/chain.c create mode 100644 test/tools/llvm-objdump/Inputs/nop.exe.coff-i386 create mode 100644 test/tools/llvm-objdump/Inputs/trivial.obj.elf-i386 create mode 100644 test/tools/llvm-objdump/Inputs/win64-unwind.exe.coff-x86_64 create mode 100644 test/tools/llvm-objdump/Inputs/win64-unwind.exe.coff-x86_64.asm create mode 100644 test/tools/llvm-objdump/coff-private-headers.test create mode 100644 test/tools/llvm-objdump/disassembly-show-raw.test create mode 100644 test/tools/llvm-objdump/lit.local.cfg create mode 100644 test/tools/llvm-objdump/win64-unwind-data.test create mode 100644 test/tools/llvm-readobj/Inputs/dynamic-table.c create mode 100644 test/tools/llvm-readobj/Inputs/dynamic-table.mips create mode 100644 test/tools/llvm-readobj/Inputs/magic.coff-importlib create mode 100644 test/tools/llvm-readobj/Inputs/magic.coff-unknown create mode 100644 test/tools/llvm-readobj/Inputs/relocs.obj.coff-i386 create mode 100644 test/tools/llvm-readobj/Inputs/relocs.obj.coff-x86_64 create mode 100644 test/tools/llvm-readobj/Inputs/relocs.obj.elf-aarch64 create mode 100644 test/tools/llvm-readobj/Inputs/relocs.obj.elf-arm create mode 100644 test/tools/llvm-readobj/Inputs/relocs.obj.elf-i386 create mode 100644 test/tools/llvm-readobj/Inputs/relocs.obj.elf-mips create mode 100644 test/tools/llvm-readobj/Inputs/relocs.obj.elf-mips64el create mode 100644 test/tools/llvm-readobj/Inputs/relocs.obj.elf-ppc64 create mode 100644 test/tools/llvm-readobj/Inputs/relocs.obj.elf-x86_64 create mode 100644 test/tools/llvm-readobj/Inputs/relocs.obj.macho-arm create mode 100644 test/tools/llvm-readobj/Inputs/relocs.obj.macho-i386 create mode 100644 test/tools/llvm-readobj/Inputs/relocs.obj.macho-x86_64 create mode 100644 test/tools/llvm-readobj/Inputs/relocs.py create mode 100644 test/tools/llvm-readobj/Inputs/rpath.exe.elf-x86_64 create mode 100644 test/tools/llvm-readobj/Inputs/trivial.exe.coff-i386 create mode 100644 test/tools/llvm-readobj/Inputs/trivial.ll create mode 100644 test/tools/llvm-readobj/Inputs/trivial.obj.coff-i386 create mode 100644 test/tools/llvm-readobj/Inputs/trivial.obj.coff-x86-64 create mode 100644 test/tools/llvm-readobj/Inputs/trivial.obj.elf-i386 create mode 100644 test/tools/llvm-readobj/Inputs/trivial.obj.elf-x86-64 create mode 100644 test/tools/llvm-readobj/Inputs/trivial.obj.macho-arm create mode 100644 test/tools/llvm-readobj/Inputs/trivial.obj.macho-i386 create mode 100644 test/tools/llvm-readobj/Inputs/trivial.obj.macho-ppc create mode 100644 test/tools/llvm-readobj/Inputs/trivial.obj.macho-ppc64 create mode 100644 test/tools/llvm-readobj/Inputs/trivial.obj.macho-x86-64 create mode 100644 test/tools/llvm-readobj/dynamic.test create mode 100644 test/tools/llvm-readobj/file-headers.test create mode 100644 test/tools/llvm-readobj/program-headers.test create mode 100644 test/tools/llvm-readobj/reloc-types.test create mode 100644 test/tools/llvm-readobj/relocations.test create mode 100644 test/tools/llvm-readobj/rpath.test create mode 100644 test/tools/llvm-readobj/sections-ext.test create mode 100644 test/tools/llvm-readobj/sections.test create mode 100644 test/tools/llvm-readobj/symbols.test create mode 100644 tools/CMakeLists.txt create mode 100644 tools/LLVMBuild.txt create mode 100644 tools/Makefile create mode 100644 tools/bugpoint-passes/CMakeLists.txt create mode 100644 tools/bugpoint-passes/Makefile create mode 100644 tools/bugpoint-passes/TestPasses.cpp create mode 100644 tools/bugpoint-passes/bugpoint.exports create mode 100644 tools/bugpoint/BugDriver.cpp create mode 100644 tools/bugpoint/BugDriver.h create mode 100644 tools/bugpoint/CMakeLists.txt create mode 100644 tools/bugpoint/CrashDebugger.cpp create mode 100644 tools/bugpoint/ExecutionDriver.cpp create mode 100644 tools/bugpoint/ExtractFunction.cpp create mode 100644 tools/bugpoint/FindBugs.cpp create mode 100644 tools/bugpoint/LLVMBuild.txt create mode 100644 tools/bugpoint/ListReducer.h create mode 100644 tools/bugpoint/Makefile create mode 100644 tools/bugpoint/Miscompilation.cpp create mode 100644 tools/bugpoint/OptimizerDriver.cpp create mode 100644 tools/bugpoint/ToolRunner.cpp create mode 100644 tools/bugpoint/ToolRunner.h create mode 100644 tools/bugpoint/bugpoint.cpp create mode 100644 tools/gold/CMakeLists.txt create mode 100644 tools/gold/Makefile create mode 100644 tools/gold/README.txt create mode 100644 tools/gold/gold-plugin.cpp create mode 100644 tools/gold/gold.exports create mode 100644 tools/llc/CMakeLists.txt create mode 100644 tools/llc/LLVMBuild.txt create mode 100644 tools/llc/Makefile create mode 100644 tools/llc/llc.cpp create mode 100644 tools/lli/CMakeLists.txt create mode 100644 tools/lli/ChildTarget/CMakeLists.txt create mode 100644 tools/lli/ChildTarget/ChildTarget.cpp create mode 100644 tools/lli/ChildTarget/LLVMBuild.txt create mode 100644 tools/lli/ChildTarget/Makefile create mode 100644 tools/lli/ChildTarget/Unix/ChildTarget.inc create mode 100644 tools/lli/ChildTarget/Windows/ChildTarget.inc create mode 100644 tools/lli/LLVMBuild.txt create mode 100644 tools/lli/Makefile create mode 100644 tools/lli/RemoteMemoryManager.cpp create mode 100644 tools/lli/RemoteMemoryManager.h create mode 100644 tools/lli/RemoteTarget.cpp create mode 100644 tools/lli/RemoteTarget.h create mode 100644 tools/lli/RemoteTargetExternal.cpp create mode 100644 tools/lli/RemoteTargetExternal.h create mode 100644 tools/lli/RemoteTargetMessage.h create mode 100644 tools/lli/Unix/RemoteTargetExternal.inc create mode 100644 tools/lli/Windows/RemoteTargetExternal.inc create mode 100644 tools/lli/lli.cpp create mode 100644 tools/llvm-ar/CMakeLists.txt create mode 100644 tools/llvm-ar/LLVMBuild.txt create mode 100644 tools/llvm-ar/Makefile create mode 100644 tools/llvm-ar/llvm-ar.cpp create mode 100644 tools/llvm-as/CMakeLists.txt create mode 100644 tools/llvm-as/LLVMBuild.txt create mode 100644 tools/llvm-as/Makefile create mode 100644 tools/llvm-as/llvm-as.cpp create mode 100644 tools/llvm-bcanalyzer/CMakeLists.txt create mode 100644 tools/llvm-bcanalyzer/LLVMBuild.txt create mode 100644 tools/llvm-bcanalyzer/Makefile create mode 100644 tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp create mode 100644 tools/llvm-c-test/CMakeLists.txt create mode 100644 tools/llvm-c-test/Makefile create mode 100644 tools/llvm-c-test/calc.c create mode 100644 tools/llvm-c-test/disassemble.c create mode 100644 tools/llvm-c-test/helpers.c create mode 100644 tools/llvm-c-test/include-all.c create mode 100644 tools/llvm-c-test/llvm-c-test.h create mode 100644 tools/llvm-c-test/main.c create mode 100644 tools/llvm-c-test/module.c create mode 100644 tools/llvm-c-test/object.c create mode 100644 tools/llvm-c-test/targets.c create mode 100644 tools/llvm-config/BuildVariables.inc.in create mode 100644 tools/llvm-config/CMakeLists.txt create mode 100644 tools/llvm-config/Makefile create mode 100644 tools/llvm-config/llvm-config.cpp create mode 100644 tools/llvm-cov/CMakeLists.txt create mode 100644 tools/llvm-cov/LLVMBuild.txt create mode 100644 tools/llvm-cov/Makefile create mode 100644 tools/llvm-cov/llvm-cov.cpp create mode 100644 tools/llvm-diff/CMakeLists.txt create mode 100644 tools/llvm-diff/DiffConsumer.cpp create mode 100644 tools/llvm-diff/DiffConsumer.h create mode 100644 tools/llvm-diff/DiffLog.cpp create mode 100644 tools/llvm-diff/DiffLog.h create mode 100644 tools/llvm-diff/DifferenceEngine.cpp create mode 100644 tools/llvm-diff/DifferenceEngine.h create mode 100644 tools/llvm-diff/LLVMBuild.txt create mode 100644 tools/llvm-diff/Makefile create mode 100644 tools/llvm-diff/llvm-diff.cpp create mode 100644 tools/llvm-dis/CMakeLists.txt create mode 100644 tools/llvm-dis/LLVMBuild.txt create mode 100644 tools/llvm-dis/Makefile create mode 100644 tools/llvm-dis/llvm-dis.cpp create mode 100644 tools/llvm-dwarfdump/CMakeLists.txt create mode 100644 tools/llvm-dwarfdump/LLVMBuild.txt create mode 100644 tools/llvm-dwarfdump/Makefile create mode 100644 tools/llvm-dwarfdump/llvm-dwarfdump.cpp create mode 100644 tools/llvm-extract/CMakeLists.txt create mode 100644 tools/llvm-extract/LLVMBuild.txt create mode 100644 tools/llvm-extract/Makefile create mode 100644 tools/llvm-extract/llvm-extract.cpp create mode 100644 tools/llvm-jitlistener/CMakeLists.txt create mode 100644 tools/llvm-jitlistener/LLVMBuild.txt create mode 100644 tools/llvm-jitlistener/Makefile create mode 100644 tools/llvm-jitlistener/llvm-jitlistener.cpp create mode 100644 tools/llvm-link/CMakeLists.txt create mode 100644 tools/llvm-link/LLVMBuild.txt create mode 100644 tools/llvm-link/Makefile create mode 100644 tools/llvm-link/llvm-link.cpp create mode 100644 tools/llvm-lto/CMakeLists.txt create mode 100644 tools/llvm-lto/LLVMBuild.txt create mode 100644 tools/llvm-lto/Makefile create mode 100644 tools/llvm-lto/llvm-lto.cpp create mode 100644 tools/llvm-mc/CMakeLists.txt create mode 100644 tools/llvm-mc/Disassembler.cpp create mode 100644 tools/llvm-mc/Disassembler.h create mode 100644 tools/llvm-mc/LLVMBuild.txt create mode 100644 tools/llvm-mc/Makefile create mode 100644 tools/llvm-mc/llvm-mc.cpp create mode 100644 tools/llvm-mcmarkup/CMakeLists.txt create mode 100644 tools/llvm-mcmarkup/LLVMBuild.txt create mode 100644 tools/llvm-mcmarkup/Makefile create mode 100644 tools/llvm-mcmarkup/llvm-mcmarkup.cpp create mode 100644 tools/llvm-nm/CMakeLists.txt create mode 100644 tools/llvm-nm/LLVMBuild.txt create mode 100644 tools/llvm-nm/Makefile create mode 100644 tools/llvm-nm/llvm-nm.cpp create mode 100644 tools/llvm-objdump/CMakeLists.txt create mode 100644 tools/llvm-objdump/COFFDump.cpp create mode 100644 tools/llvm-objdump/ELFDump.cpp create mode 100644 tools/llvm-objdump/LLVMBuild.txt create mode 100644 tools/llvm-objdump/MachODump.cpp create mode 100644 tools/llvm-objdump/Makefile create mode 100644 tools/llvm-objdump/llvm-objdump.cpp create mode 100644 tools/llvm-objdump/llvm-objdump.h create mode 100644 tools/llvm-readobj/CMakeLists.txt create mode 100644 tools/llvm-readobj/COFFDumper.cpp create mode 100644 tools/llvm-readobj/ELFDumper.cpp create mode 100644 tools/llvm-readobj/Error.cpp create mode 100644 tools/llvm-readobj/Error.h create mode 100644 tools/llvm-readobj/LLVMBuild.txt create mode 100644 tools/llvm-readobj/MachODumper.cpp create mode 100644 tools/llvm-readobj/Makefile create mode 100644 tools/llvm-readobj/ObjDumper.cpp create mode 100644 tools/llvm-readobj/ObjDumper.h create mode 100644 tools/llvm-readobj/StreamWriter.cpp create mode 100644 tools/llvm-readobj/StreamWriter.h create mode 100644 tools/llvm-readobj/llvm-readobj.cpp create mode 100644 tools/llvm-readobj/llvm-readobj.h create mode 100644 tools/llvm-rtdyld/CMakeLists.txt create mode 100644 tools/llvm-rtdyld/LLVMBuild.txt create mode 100644 tools/llvm-rtdyld/Makefile create mode 100644 tools/llvm-rtdyld/llvm-rtdyld.cpp create mode 100644 tools/llvm-shlib/Makefile create mode 100644 tools/llvm-size/CMakeLists.txt create mode 100644 tools/llvm-size/LLVMBuild.txt create mode 100644 tools/llvm-size/Makefile create mode 100644 tools/llvm-size/llvm-size.cpp create mode 100644 tools/llvm-stress/CMakeLists.txt create mode 100644 tools/llvm-stress/LLVMBuild.txt create mode 100644 tools/llvm-stress/Makefile create mode 100644 tools/llvm-stress/llvm-stress.cpp create mode 100644 tools/llvm-symbolizer/CMakeLists.txt create mode 100644 tools/llvm-symbolizer/LLVMSymbolize.cpp create mode 100644 tools/llvm-symbolizer/LLVMSymbolize.h create mode 100644 tools/llvm-symbolizer/Makefile create mode 100644 tools/llvm-symbolizer/llvm-symbolizer.cpp create mode 100644 tools/lto/CMakeLists.txt create mode 100644 tools/lto/LTODisassembler.cpp create mode 100644 tools/lto/Makefile create mode 100644 tools/lto/lto.cpp create mode 100644 tools/lto/lto.exports create mode 100644 tools/macho-dump/CMakeLists.txt create mode 100644 tools/macho-dump/LLVMBuild.txt create mode 100644 tools/macho-dump/Makefile create mode 100644 tools/macho-dump/macho-dump.cpp create mode 100644 tools/msbuild/CMakeLists.txt create mode 100644 tools/msbuild/Microsoft.Cpp.Win32.LLVM-vs2010.targets create mode 100644 tools/msbuild/Microsoft.Cpp.Win32.LLVM-vs2012.targets create mode 100644 tools/msbuild/Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets create mode 100644 tools/msbuild/Microsoft.Cpp.Win32.llvm.props.in create mode 100644 tools/msbuild/install.bat create mode 100644 tools/msbuild/toolset-vs2013.targets create mode 100644 tools/msbuild/toolset-vs2013_xp.targets create mode 100644 tools/msbuild/uninstall.bat create mode 100644 tools/obj2yaml/CMakeLists.txt create mode 100644 tools/obj2yaml/Makefile create mode 100644 tools/obj2yaml/coff2yaml.cpp create mode 100644 tools/obj2yaml/obj2yaml.cpp create mode 100644 tools/obj2yaml/obj2yaml.h create mode 100644 tools/opt/AnalysisWrappers.cpp create mode 100644 tools/opt/CMakeLists.txt create mode 100644 tools/opt/GraphPrinters.cpp create mode 100644 tools/opt/LLVMBuild.txt create mode 100644 tools/opt/Makefile create mode 100644 tools/opt/PrintSCC.cpp create mode 100644 tools/opt/opt.cpp create mode 100644 tools/yaml2obj/CMakeLists.txt create mode 100644 tools/yaml2obj/Makefile create mode 100644 tools/yaml2obj/yaml2coff.cpp create mode 100644 tools/yaml2obj/yaml2elf.cpp create mode 100644 tools/yaml2obj/yaml2obj.cpp create mode 100644 tools/yaml2obj/yaml2obj.h create mode 100644 unittests/ADT/APFloatTest.cpp create mode 100644 unittests/ADT/APIntTest.cpp create mode 100644 unittests/ADT/BitVectorTest.cpp create mode 100644 unittests/ADT/CMakeLists.txt create mode 100644 unittests/ADT/DAGDeltaAlgorithmTest.cpp create mode 100644 unittests/ADT/DeltaAlgorithmTest.cpp create mode 100644 unittests/ADT/DenseMapTest.cpp create mode 100644 unittests/ADT/DenseSetTest.cpp create mode 100644 unittests/ADT/FoldingSet.cpp create mode 100644 unittests/ADT/HashingTest.cpp create mode 100644 unittests/ADT/ImmutableMapTest.cpp create mode 100644 unittests/ADT/ImmutableSetTest.cpp create mode 100644 unittests/ADT/IntEqClassesTest.cpp create mode 100644 unittests/ADT/IntervalMapTest.cpp create mode 100644 unittests/ADT/IntrusiveRefCntPtrTest.cpp create mode 100644 unittests/ADT/Makefile create mode 100644 unittests/ADT/MapVectorTest.cpp create mode 100644 unittests/ADT/OptionalTest.cpp create mode 100644 unittests/ADT/PackedVectorTest.cpp create mode 100644 unittests/ADT/PointerUnionTest.cpp create mode 100644 unittests/ADT/SCCIteratorTest.cpp create mode 100644 unittests/ADT/SmallPtrSetTest.cpp create mode 100644 unittests/ADT/SmallStringTest.cpp create mode 100644 unittests/ADT/SmallVectorTest.cpp create mode 100644 unittests/ADT/SparseBitVectorTest.cpp create mode 100644 unittests/ADT/SparseMultiSetTest.cpp create mode 100644 unittests/ADT/SparseSetTest.cpp create mode 100644 unittests/ADT/StringMapTest.cpp create mode 100644 unittests/ADT/StringRefTest.cpp create mode 100644 unittests/ADT/TinyPtrVectorTest.cpp create mode 100644 unittests/ADT/TripleTest.cpp create mode 100644 unittests/ADT/TwineTest.cpp create mode 100644 unittests/ADT/VariadicFunctionTest.cpp create mode 100644 unittests/ADT/ilistTest.cpp create mode 100644 unittests/ADT/polymorphic_ptr_test.cpp create mode 100644 unittests/Analysis/CFGTest.cpp create mode 100644 unittests/Analysis/CMakeLists.txt create mode 100644 unittests/Analysis/Makefile create mode 100644 unittests/Analysis/ScalarEvolutionTest.cpp create mode 100644 unittests/Bitcode/BitReaderTest.cpp create mode 100644 unittests/Bitcode/CMakeLists.txt create mode 100644 unittests/Bitcode/Makefile create mode 100644 unittests/CMakeLists.txt create mode 100644 unittests/CodeGen/CMakeLists.txt create mode 100644 unittests/CodeGen/DIEHashTest.cpp create mode 100644 unittests/CodeGen/Makefile create mode 100644 unittests/DebugInfo/CMakeLists.txt create mode 100644 unittests/DebugInfo/DWARFFormValueTest.cpp create mode 100644 unittests/DebugInfo/Makefile create mode 100644 unittests/ExecutionEngine/CMakeLists.txt create mode 100644 unittests/ExecutionEngine/ExecutionEngineTest.cpp create mode 100644 unittests/ExecutionEngine/JIT/CMakeLists.txt create mode 100644 unittests/ExecutionEngine/JIT/IntelJITEventListenerTest.cpp create mode 100644 unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp create mode 100644 unittests/ExecutionEngine/JIT/JITEventListenerTestCommon.h create mode 100644 unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp create mode 100644 unittests/ExecutionEngine/JIT/JITTest.cpp create mode 100644 unittests/ExecutionEngine/JIT/JITTests.def create mode 100644 unittests/ExecutionEngine/JIT/Makefile create mode 100644 unittests/ExecutionEngine/JIT/MultiJITTest.cpp create mode 100644 unittests/ExecutionEngine/JIT/OProfileJITEventListenerTest.cpp create mode 100644 unittests/ExecutionEngine/MCJIT/CMakeLists.txt create mode 100644 unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp create mode 100644 unittests/ExecutionEngine/MCJIT/MCJITMemoryManagerTest.cpp create mode 100644 unittests/ExecutionEngine/MCJIT/MCJITMultipleModuleTest.cpp create mode 100644 unittests/ExecutionEngine/MCJIT/MCJITObjectCacheTest.cpp create mode 100644 unittests/ExecutionEngine/MCJIT/MCJITTest.cpp create mode 100644 unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h create mode 100644 unittests/ExecutionEngine/MCJIT/MCJITTestBase.h create mode 100644 unittests/ExecutionEngine/MCJIT/MCJITTests.def create mode 100644 unittests/ExecutionEngine/MCJIT/Makefile create mode 100644 unittests/ExecutionEngine/Makefile create mode 100644 unittests/IR/AttributesTest.cpp create mode 100644 unittests/IR/CMakeLists.txt create mode 100644 unittests/IR/ConstantsTest.cpp create mode 100644 unittests/IR/DominatorTreeTest.cpp create mode 100644 unittests/IR/IRBuilderTest.cpp create mode 100644 unittests/IR/InstructionsTest.cpp create mode 100644 unittests/IR/LegacyPassManagerTest.cpp create mode 100644 unittests/IR/MDBuilderTest.cpp create mode 100644 unittests/IR/Makefile create mode 100644 unittests/IR/MetadataTest.cpp create mode 100644 unittests/IR/PassManagerTest.cpp create mode 100644 unittests/IR/PatternMatch.cpp create mode 100644 unittests/IR/TypeBuilderTest.cpp create mode 100644 unittests/IR/TypesTest.cpp create mode 100644 unittests/IR/ValueMapTest.cpp create mode 100644 unittests/IR/ValueTest.cpp create mode 100644 unittests/IR/VerifierTest.cpp create mode 100644 unittests/IR/WaymarkTest.cpp create mode 100644 unittests/MC/CMakeLists.txt create mode 100644 unittests/MC/MCAtomTest.cpp create mode 100644 unittests/MC/Makefile create mode 100644 unittests/Makefile create mode 100644 unittests/Makefile.unittest create mode 100644 unittests/Object/CMakeLists.txt create mode 100644 unittests/Object/Makefile create mode 100644 unittests/Object/YAMLTest.cpp create mode 100644 unittests/Option/CMakeLists.txt create mode 100644 unittests/Option/Makefile create mode 100644 unittests/Option/OptionParsingTest.cpp create mode 100644 unittests/Option/Opts.td create mode 100644 unittests/Support/AlignOfTest.cpp create mode 100644 unittests/Support/AllocatorTest.cpp create mode 100644 unittests/Support/ArrayRecyclerTest.cpp create mode 100644 unittests/Support/BlockFrequencyTest.cpp create mode 100644 unittests/Support/CMakeLists.txt create mode 100644 unittests/Support/Casting.cpp create mode 100644 unittests/Support/CommandLineTest.cpp create mode 100644 unittests/Support/CompressionTest.cpp create mode 100644 unittests/Support/ConstantRangeTest.cpp create mode 100644 unittests/Support/ConvertUTFTest.cpp create mode 100644 unittests/Support/DataExtractorTest.cpp create mode 100644 unittests/Support/EndianTest.cpp create mode 100644 unittests/Support/ErrorOrTest.cpp create mode 100644 unittests/Support/FileOutputBufferTest.cpp create mode 100644 unittests/Support/LeakDetectorTest.cpp create mode 100644 unittests/Support/LockFileManagerTest.cpp create mode 100644 unittests/Support/MD5Test.cpp create mode 100644 unittests/Support/Makefile create mode 100644 unittests/Support/ManagedStatic.cpp create mode 100644 unittests/Support/MathExtrasTest.cpp create mode 100644 unittests/Support/MemoryBufferTest.cpp create mode 100644 unittests/Support/MemoryTest.cpp create mode 100644 unittests/Support/Path.cpp create mode 100644 unittests/Support/ProcessTest.cpp create mode 100644 unittests/Support/ProgramTest.cpp create mode 100644 unittests/Support/RegexTest.cpp create mode 100644 unittests/Support/SourceMgrTest.cpp create mode 100644 unittests/Support/SwapByteOrderTest.cpp create mode 100644 unittests/Support/ThreadLocalTest.cpp create mode 100644 unittests/Support/TimeValueTest.cpp create mode 100644 unittests/Support/UnicodeTest.cpp create mode 100644 unittests/Support/ValueHandleTest.cpp create mode 100644 unittests/Support/YAMLIOTest.cpp create mode 100644 unittests/Support/YAMLParserTest.cpp create mode 100644 unittests/Support/formatted_raw_ostream_test.cpp create mode 100644 unittests/Support/raw_ostream_test.cpp create mode 100644 unittests/Transforms/CMakeLists.txt create mode 100644 unittests/Transforms/DebugIR/CMakeLists.txt create mode 100644 unittests/Transforms/DebugIR/DebugIR.cpp create mode 100644 unittests/Transforms/DebugIR/Makefile create mode 100644 unittests/Transforms/Makefile create mode 100644 unittests/Transforms/Utils/CMakeLists.txt create mode 100644 unittests/Transforms/Utils/Cloning.cpp create mode 100644 unittests/Transforms/Utils/IntegerDivision.cpp create mode 100644 unittests/Transforms/Utils/Local.cpp create mode 100644 unittests/Transforms/Utils/Makefile create mode 100644 unittests/Transforms/Utils/SpecialCaseList.cpp create mode 100755 utils/DSAclean.py create mode 100644 utils/DSAextract.py create mode 100644 utils/FileCheck/CMakeLists.txt create mode 100644 utils/FileCheck/FileCheck.cpp create mode 100644 utils/FileCheck/Makefile create mode 100644 utils/FileUpdate/CMakeLists.txt create mode 100644 utils/FileUpdate/FileUpdate.cpp create mode 100644 utils/FileUpdate/Makefile create mode 100755 utils/GenLibDeps.pl create mode 100755 utils/GetRepositoryPath create mode 100755 utils/GetSourceVersion create mode 100644 utils/KillTheDoctor/CMakeLists.txt create mode 100644 utils/KillTheDoctor/KillTheDoctor.cpp create mode 100644 utils/LLVMBuild.txt create mode 100644 utils/Makefile create mode 100644 utils/Misc/mergefunctions.clang.svn.patch create mode 100755 utils/Misc/zkill create mode 100644 utils/PerfectShuffle/Makefile create mode 100644 utils/PerfectShuffle/PerfectShuffle.cpp create mode 100644 utils/TableGen/AsmMatcherEmitter.cpp create mode 100644 utils/TableGen/AsmWriterEmitter.cpp create mode 100644 utils/TableGen/AsmWriterInst.cpp create mode 100644 utils/TableGen/AsmWriterInst.h create mode 100644 utils/TableGen/CMakeLists.txt create mode 100644 utils/TableGen/CTagsEmitter.cpp create mode 100644 utils/TableGen/CallingConvEmitter.cpp create mode 100644 utils/TableGen/CodeEmitterGen.cpp create mode 100644 utils/TableGen/CodeGenDAGPatterns.cpp create mode 100644 utils/TableGen/CodeGenDAGPatterns.h create mode 100644 utils/TableGen/CodeGenInstruction.cpp create mode 100644 utils/TableGen/CodeGenInstruction.h create mode 100644 utils/TableGen/CodeGenIntrinsics.h create mode 100644 utils/TableGen/CodeGenMapTable.cpp create mode 100644 utils/TableGen/CodeGenRegisters.cpp create mode 100644 utils/TableGen/CodeGenRegisters.h create mode 100644 utils/TableGen/CodeGenSchedule.cpp create mode 100644 utils/TableGen/CodeGenSchedule.h create mode 100644 utils/TableGen/CodeGenTarget.cpp create mode 100644 utils/TableGen/CodeGenTarget.h create mode 100644 utils/TableGen/DAGISelEmitter.cpp create mode 100644 utils/TableGen/DAGISelMatcher.cpp create mode 100644 utils/TableGen/DAGISelMatcher.h create mode 100644 utils/TableGen/DAGISelMatcherEmitter.cpp create mode 100644 utils/TableGen/DAGISelMatcherGen.cpp create mode 100644 utils/TableGen/DAGISelMatcherOpt.cpp create mode 100644 utils/TableGen/DFAPacketizerEmitter.cpp create mode 100644 utils/TableGen/DisassemblerEmitter.cpp create mode 100644 utils/TableGen/FastISelEmitter.cpp create mode 100644 utils/TableGen/FixedLenDecoderEmitter.cpp create mode 100644 utils/TableGen/InstrInfoEmitter.cpp create mode 100644 utils/TableGen/IntrinsicEmitter.cpp create mode 100644 utils/TableGen/LLVMBuild.txt create mode 100644 utils/TableGen/Makefile create mode 100644 utils/TableGen/OptParserEmitter.cpp create mode 100644 utils/TableGen/PseudoLoweringEmitter.cpp create mode 100644 utils/TableGen/RegisterInfoEmitter.cpp create mode 100644 utils/TableGen/SequenceToOffsetTable.h create mode 100644 utils/TableGen/SetTheory.cpp create mode 100644 utils/TableGen/SetTheory.h create mode 100644 utils/TableGen/SubtargetEmitter.cpp create mode 100644 utils/TableGen/TGValueTypes.cpp create mode 100644 utils/TableGen/TableGen.cpp create mode 100644 utils/TableGen/TableGenBackends.h create mode 100644 utils/TableGen/X86DisassemblerShared.h create mode 100644 utils/TableGen/X86DisassemblerTables.cpp create mode 100644 utils/TableGen/X86DisassemblerTables.h create mode 100644 utils/TableGen/X86ModRMFilters.cpp create mode 100644 utils/TableGen/X86ModRMFilters.h create mode 100644 utils/TableGen/X86RecognizableInstr.cpp create mode 100644 utils/TableGen/X86RecognizableInstr.h create mode 100644 utils/TableGen/tdtags create mode 100644 utils/Target/ARM/analyze-match-table.py create mode 100755 utils/UpdateCMakeLists.pl create mode 100644 utils/bugpoint/RemoteRunSafely.sh create mode 100644 utils/buildit/GNUmakefile create mode 100755 utils/buildit/build_llvm create mode 100755 utils/check-each-file create mode 100755 utils/clang-parse-diagnostics-file create mode 100755 utils/codegen-diff create mode 100644 utils/count/CMakeLists.txt create mode 100644 utils/count/Makefile create mode 100644 utils/count/count.c create mode 100755 utils/countloc.sh create mode 100644 utils/crosstool/ARM/README create mode 100755 utils/crosstool/ARM/build-install-linux.sh create mode 100755 utils/crosstool/create-snapshots.sh create mode 100644 utils/emacs/README create mode 100644 utils/emacs/emacs.el create mode 100644 utils/emacs/llvm-mode.el create mode 100644 utils/emacs/tablegen-mode.el create mode 100755 utils/findmisopt create mode 100755 utils/findoptdiff create mode 100755 utils/findsym.pl create mode 100644 utils/fpcmp/Makefile create mode 100644 utils/fpcmp/fpcmp.cpp create mode 100755 utils/getsrcs.sh create mode 100755 utils/git-svn/git-svnrevert create mode 100755 utils/git-svn/git-svnup create mode 100755 utils/git/find-rev create mode 100644 utils/jedit/README create mode 100644 utils/jedit/tablegen.xml create mode 100644 utils/kate/README create mode 100644 utils/kate/llvm.xml create mode 100644 utils/lint/common_lint.py create mode 100755 utils/lint/cpp_lint.py create mode 100755 utils/lint/generic_lint.py create mode 100755 utils/lint/remove_trailing_whitespace.sh create mode 100644 utils/lit/MANIFEST.in create mode 100644 utils/lit/TODO create mode 100644 utils/lit/examples/README.txt create mode 100644 utils/lit/examples/many-tests/README.txt create mode 100644 utils/lit/examples/many-tests/lit.cfg create mode 100755 utils/lit/lit.py create mode 100644 utils/lit/lit/ExampleTests.ObjDir/lit.site.cfg create mode 100644 utils/lit/lit/LitConfig.py create mode 100644 utils/lit/lit/LitTestCase.py create mode 100644 utils/lit/lit/ProgressBar.py create mode 100644 utils/lit/lit/ShCommands.py create mode 100644 utils/lit/lit/ShUtil.py create mode 100644 utils/lit/lit/Test.py create mode 100644 utils/lit/lit/TestRunner.py create mode 100644 utils/lit/lit/TestingConfig.py create mode 100644 utils/lit/lit/__init__.py create mode 100644 utils/lit/lit/discovery.py create mode 100644 utils/lit/lit/formats/__init__.py create mode 100644 utils/lit/lit/formats/base.py create mode 100644 utils/lit/lit/formats/googletest.py create mode 100644 utils/lit/lit/formats/shtest.py create mode 100755 utils/lit/lit/main.py create mode 100644 utils/lit/lit/run.py create mode 100644 utils/lit/lit/util.py create mode 100644 utils/lit/setup.py create mode 100644 utils/lit/tests/.coveragerc create mode 100644 utils/lit/tests/Inputs/discovery/lit.cfg create mode 100644 utils/lit/tests/Inputs/discovery/subdir/lit.local.cfg create mode 100644 utils/lit/tests/Inputs/discovery/subdir/test-three.py create mode 100644 utils/lit/tests/Inputs/discovery/subsuite/lit.cfg create mode 100644 utils/lit/tests/Inputs/discovery/subsuite/test-one.txt create mode 100644 utils/lit/tests/Inputs/discovery/subsuite/test-two.txt create mode 100644 utils/lit/tests/Inputs/discovery/test-one.txt create mode 100644 utils/lit/tests/Inputs/discovery/test-two.txt create mode 100644 utils/lit/tests/Inputs/exec-discovery-in-tree/lit.cfg create mode 100644 utils/lit/tests/Inputs/exec-discovery-in-tree/obj/lit.site.cfg create mode 100644 utils/lit/tests/Inputs/exec-discovery-in-tree/test-one.txt create mode 100644 utils/lit/tests/Inputs/exec-discovery/lit.site.cfg create mode 100755 utils/lit/tests/Inputs/googletest-format/DummySubDir/OneTest create mode 100644 utils/lit/tests/Inputs/googletest-format/lit.cfg create mode 100644 utils/lit/tests/Inputs/progress-bar/lit.cfg create mode 100644 utils/lit/tests/Inputs/progress-bar/test-1.txt create mode 100644 utils/lit/tests/Inputs/progress-bar/test-2.txt create mode 100644 utils/lit/tests/Inputs/progress-bar/test-3.txt create mode 100644 utils/lit/tests/Inputs/progress-bar/test-4.txt create mode 100644 utils/lit/tests/Inputs/shtest-format/argv0.txt create mode 100644 utils/lit/tests/Inputs/shtest-format/external_shell/fail.txt create mode 100644 utils/lit/tests/Inputs/shtest-format/external_shell/fail_with_bad_encoding.txt create mode 100644 utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg create mode 100644 utils/lit/tests/Inputs/shtest-format/external_shell/pass.txt create mode 100755 utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.sh create mode 100644 utils/lit/tests/Inputs/shtest-format/fail.txt create mode 100644 utils/lit/tests/Inputs/shtest-format/lit.cfg create mode 100644 utils/lit/tests/Inputs/shtest-format/no-test-line.txt create mode 100644 utils/lit/tests/Inputs/shtest-format/pass.txt create mode 100644 utils/lit/tests/Inputs/shtest-format/requires-missing.txt create mode 100644 utils/lit/tests/Inputs/shtest-format/requires-present.txt create mode 100644 utils/lit/tests/Inputs/shtest-format/unsupported_dir/lit.local.cfg create mode 100644 utils/lit/tests/Inputs/shtest-format/unsupported_dir/some-test.txt create mode 100644 utils/lit/tests/Inputs/shtest-format/xfail-feature.txt create mode 100644 utils/lit/tests/Inputs/shtest-format/xfail-target.txt create mode 100644 utils/lit/tests/Inputs/shtest-format/xfail.txt create mode 100644 utils/lit/tests/Inputs/shtest-format/xpass.txt create mode 100644 utils/lit/tests/Inputs/shtest-shell/error-0.txt create mode 100644 utils/lit/tests/Inputs/shtest-shell/error-1.txt create mode 100644 utils/lit/tests/Inputs/shtest-shell/error-2.txt create mode 100644 utils/lit/tests/Inputs/shtest-shell/lit.cfg create mode 100644 utils/lit/tests/Inputs/shtest-shell/redirects.txt create mode 100644 utils/lit/tests/Inputs/shtest-shell/sequencing-0.txt create mode 100644 utils/lit/tests/Inputs/shtest-shell/sequencing-1.txt create mode 100755 utils/lit/tests/Inputs/shtest-shell/write-to-stderr.sh create mode 100755 utils/lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.sh create mode 100644 utils/lit/tests/Inputs/test-data/lit.cfg create mode 100644 utils/lit/tests/Inputs/test-data/metrics.ini create mode 100644 utils/lit/tests/Inputs/unittest-adaptor/lit.cfg create mode 100644 utils/lit/tests/Inputs/unittest-adaptor/test-one.txt create mode 100644 utils/lit/tests/Inputs/unittest-adaptor/test-two.txt create mode 100644 utils/lit/tests/discovery.py create mode 100644 utils/lit/tests/googletest-format.py create mode 100644 utils/lit/tests/lit.cfg create mode 100644 utils/lit/tests/progress-bar.py create mode 100644 utils/lit/tests/shell-parsing.py create mode 100644 utils/lit/tests/shtest-encoding.py create mode 100644 utils/lit/tests/shtest-format.py create mode 100644 utils/lit/tests/shtest-shell.py create mode 100644 utils/lit/tests/test-data.py create mode 100644 utils/lit/tests/test-output.py create mode 100644 utils/lit/tests/unittest-adaptor.py create mode 100644 utils/lit/tests/usage.py create mode 100644 utils/lit/utils/README.txt create mode 100755 utils/lit/utils/check-coverage create mode 100755 utils/lit/utils/check-sdist create mode 100644 utils/lldbDataFormatters.py create mode 100644 utils/llvm-build/README.txt create mode 100755 utils/llvm-build/llvm-build create mode 100644 utils/llvm-build/llvmbuild/__init__.py create mode 100644 utils/llvm-build/llvmbuild/componentinfo.py create mode 100644 utils/llvm-build/llvmbuild/configutil.py create mode 100644 utils/llvm-build/llvmbuild/main.py create mode 100644 utils/llvm-build/llvmbuild/util.py create mode 100755 utils/llvm-compilers-check create mode 100644 utils/llvm-lit/CMakeLists.txt create mode 100644 utils/llvm-lit/Makefile create mode 100755 utils/llvm-lit/llvm-lit.in create mode 100755 utils/llvm-native-gcc create mode 100755 utils/llvm-native-gxx create mode 100644 utils/llvm.grm create mode 100644 utils/llvm.natvis create mode 100755 utils/llvmdo create mode 100755 utils/llvmgrep create mode 100755 utils/makellvm create mode 100644 utils/not/CMakeLists.txt create mode 100644 utils/not/Makefile create mode 100644 utils/not/not.cpp create mode 100755 utils/release/export.sh create mode 100755 utils/release/findRegressions-nightly.py create mode 100755 utils/release/findRegressions-simple.py create mode 100755 utils/release/merge.sh create mode 100755 utils/release/tag.sh create mode 100755 utils/release/test-release.sh create mode 100755 utils/sort_includes.py create mode 100755 utils/test_debuginfo.pl create mode 100644 utils/testgen/mc-bundling-x86-gen.py create mode 100644 utils/textmate/README create mode 100644 utils/textmate/TableGen.tmbundle/Syntaxes/TableGen.tmLanguage create mode 100644 utils/textmate/TableGen.tmbundle/info.plist create mode 100644 utils/unittest/CMakeLists.txt create mode 100644 utils/unittest/LLVMBuild.txt create mode 100644 utils/unittest/Makefile create mode 100644 utils/unittest/UnitTestMain/Makefile create mode 100644 utils/unittest/UnitTestMain/TestMain.cpp create mode 100644 utils/unittest/googletest/LICENSE.TXT create mode 100644 utils/unittest/googletest/Makefile create mode 100644 utils/unittest/googletest/README.LLVM create mode 100644 utils/unittest/googletest/include/gtest/gtest-death-test.h create mode 100644 utils/unittest/googletest/include/gtest/gtest-message.h create mode 100644 utils/unittest/googletest/include/gtest/gtest-param-test.h create mode 100644 utils/unittest/googletest/include/gtest/gtest-printers.h create mode 100644 utils/unittest/googletest/include/gtest/gtest-spi.h create mode 100644 utils/unittest/googletest/include/gtest/gtest-test-part.h create mode 100644 utils/unittest/googletest/include/gtest/gtest-typed-test.h create mode 100644 utils/unittest/googletest/include/gtest/gtest.h create mode 100644 utils/unittest/googletest/include/gtest/gtest_pred_impl.h create mode 100644 utils/unittest/googletest/include/gtest/gtest_prod.h create mode 100644 utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h create mode 100644 utils/unittest/googletest/include/gtest/internal/gtest-filepath.h create mode 100644 utils/unittest/googletest/include/gtest/internal/gtest-internal.h create mode 100644 utils/unittest/googletest/include/gtest/internal/gtest-linked_ptr.h create mode 100644 utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h create mode 100644 utils/unittest/googletest/include/gtest/internal/gtest-param-util.h create mode 100644 utils/unittest/googletest/include/gtest/internal/gtest-port.h create mode 100644 utils/unittest/googletest/include/gtest/internal/gtest-string.h create mode 100644 utils/unittest/googletest/include/gtest/internal/gtest-tuple.h create mode 100644 utils/unittest/googletest/include/gtest/internal/gtest-type-util.h create mode 100644 utils/unittest/googletest/src/gtest-all.cc create mode 100644 utils/unittest/googletest/src/gtest-death-test.cc create mode 100644 utils/unittest/googletest/src/gtest-filepath.cc create mode 100644 utils/unittest/googletest/src/gtest-internal-inl.h create mode 100644 utils/unittest/googletest/src/gtest-port.cc create mode 100644 utils/unittest/googletest/src/gtest-printers.cc create mode 100644 utils/unittest/googletest/src/gtest-test-part.cc create mode 100644 utils/unittest/googletest/src/gtest-typed-test.cc create mode 100644 utils/unittest/googletest/src/gtest.cc create mode 100644 utils/valgrind/i386-pc-linux-gnu.supp create mode 100644 utils/valgrind/x86_64-pc-linux-gnu.supp create mode 100644 utils/vim/README create mode 100644 utils/vim/llvm.vim create mode 100644 utils/vim/tablegen.vim create mode 100644 utils/vim/vimrc create mode 100755 utils/wciia.py create mode 100644 utils/yaml-bench/CMakeLists.txt create mode 100644 utils/yaml-bench/Makefile create mode 100644 utils/yaml-bench/YAMLBench.cpp diff --git a/.arcconfig b/.arcconfig new file mode 100644 index 00000000..4711195a --- /dev/null +++ b/.arcconfig @@ -0,0 +1,4 @@ +{ + "project_id" : "llvm", + "conduit_uri" : "http://llvm-reviews.chandlerc.com/" +} diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..9b3aa8b7 --- /dev/null +++ b/.clang-format @@ -0,0 +1 @@ +BasedOnStyle: LLVM diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..24628309 --- /dev/null +++ b/.gitignore @@ -0,0 +1,48 @@ +#==============================================================================# +# This file specifies intentionally untracked files that git should ignore. +# See: http://www.kernel.org/pub/software/scm/git/docs/gitignore.html +# +# This file is intentionally different from the output of `git svn show-ignore`, +# as most of those are useless. +#==============================================================================# + +#==============================================================================# +# File extensions to be ignored anywhere in the tree. +#==============================================================================# +# Temp files created by most text editors. +*~ +# Merge files created by git. +*.orig +# Byte compiled python modules. +*.pyc +# vim swap files +.*.swp +.sw? + +#==============================================================================# +# Explicit files to ignore (only matches one). +#==============================================================================# +.gitusers +autom4te.cache +cscope.files +cscope.out +autoconf/aclocal.m4 +autoconf/autom4te.cache +compile_commands.json + +#==============================================================================# +# Directories to ignore (do not add trailing '/'s, they skip symlinks). +#==============================================================================# +# External projects that are tracked independently. +projects/* +!projects/sample +!projects/CMakeLists.txt +!projects/Makefile +# Clang, which is tracked independently. +tools/clang +# LLDB, which is tracked independently. +tools/lldb +# lld, which is tracked independently. +tools/lld +# Sphinx build tree, if building in-source dir. +docs/_build diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..bd0f846f --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,532 @@ +# See docs/CMake.html for instructions about how to build LLVM with CMake. + +project(LLVM) +cmake_minimum_required(VERSION 2.8) + +# Add path for custom modules +set(CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} + "${CMAKE_CURRENT_SOURCE_DIR}/cmake" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" + ) + +set(LLVM_VERSION_MAJOR 3) +set(LLVM_VERSION_MINOR 4) +set(LLVM_VERSION_PATCH 1) + +if (NOT PACKAGE_VERSION) + set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}") +endif() + +option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF) + +option(LLVM_USE_FOLDERS "Enable solution folders in Visual Studio. Disable for Express versions." ON) +if ( LLVM_USE_FOLDERS ) + set_property(GLOBAL PROPERTY USE_FOLDERS ON) +endif() + +include(VersionFromVCS) + +option(LLVM_APPEND_VC_REV + "Append the version control system revision id to LLVM version" OFF) + +if( LLVM_APPEND_VC_REV ) + add_version_info_from_vcs(PACKAGE_VERSION) +endif() + +set(PACKAGE_NAME LLVM) +set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") +set(PACKAGE_BUGREPORT "http://llvm.org/bugs/") + +# Configure CPack. +set(CPACK_PACKAGE_INSTALL_DIRECTORY "LLVM") +set(CPACK_PACKAGE_VENDOR "LLVM") +set(CPACK_PACKAGE_VERSION_MAJOR ${LLVM_VERSION_MAJOR}) +set(CPACK_PACKAGE_VERSION_MINOR ${LLVM_VERSION_MINOR}) +set(CPACK_PACKAGE_VERSION_PATCH ${LLVM_VERSION_PATCH}) +set(CPACK_PACKAGE_VERSION ${PACKAGE_VERSION}) +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.TXT") +if(WIN32 AND NOT UNIX) + set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "LLVM") + set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\cmake\\\\nsis_logo.bmp") + set(CPACK_NSIS_MODIFY_PATH "ON") + set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON") + set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS + "ExecWait '$INSTDIR/tools/msbuild/install.bat'") + set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS + "ExecWait '$INSTDIR/tools/msbuild/uninstall.bat'") +endif() +include(CPack) + +# Sanity check our source directory to make sure that we are not trying to +# generate an in-tree build (unless on MSVC_IDE, where it is ok), and to make +# sure that we don't have any stray generated files lying around in the tree +# (which would end up getting picked up by header search, instead of the correct +# versions). +if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE ) + message(FATAL_ERROR "In-source builds are not allowed. +CMake would overwrite the makefiles distributed with LLVM. +Please create a directory and run cmake from there, passing the path +to this source directory as the last argument. +This process created the file `CMakeCache.txt' and the directory `CMakeFiles'. +Please delete them.") +endif() +if( NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR ) + file(GLOB_RECURSE + tablegenned_files_on_include_dir + "${CMAKE_CURRENT_SOURCE_DIR}/include/llvm/*.gen") + file(GLOB_RECURSE + tablegenned_files_on_lib_dir + "${CMAKE_CURRENT_SOURCE_DIR}/lib/Target/*.inc") + if( tablegenned_files_on_include_dir OR tablegenned_files_on_lib_dir) + message(FATAL_ERROR "Apparently there is a previous in-source build, +probably as the result of running `configure' and `make' on +${CMAKE_CURRENT_SOURCE_DIR}. +This may cause problems. The suspicious files are: +${tablegenned_files_on_lib_dir} +${tablegenned_files_on_include_dir} +Please clean the source directory.") + endif() +endif() + +string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) + +set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}) +set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR}/include) +set(LLVM_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) +set(LLVM_TOOLS_BINARY_DIR ${LLVM_BINARY_DIR}/bin) +set(LLVM_EXAMPLES_BINARY_DIR ${LLVM_BINARY_DIR}/examples) +set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" ) + +set(LLVM_ALL_TARGETS + AArch64 + ARM + CppBackend + Hexagon + Mips + MSP430 + NVPTX + PowerPC + R600 + Sparc + SystemZ + X86 + XCore + ) + +# List of targets with JIT support: +set(LLVM_TARGETS_WITH_JIT X86 PowerPC AArch64 ARM Mips SystemZ) + +set(LLVM_TARGETS_TO_BUILD "all" + CACHE STRING "Semicolon-separated list of targets to build, or \"all\".") + +set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD "" + CACHE STRING "Semicolon-separated list of experimental targets to build.") + +option(BUILD_SHARED_LIBS + "Build all libraries as shared libraries instead of static" OFF) + +option(LLVM_ENABLE_CBE_PRINTF_A "Set to ON if CBE is enabled for printf %a output" ON) +if(LLVM_ENABLE_CBE_PRINTF_A) + set(ENABLE_CBE_PRINTF_A 1) +endif() + +option(LLVM_ENABLE_TIMESTAMPS "Enable embedding timestamp information in build" ON) +if(LLVM_ENABLE_TIMESTAMPS) + set(ENABLE_TIMESTAMPS 1) +endif() + +option(LLVM_ENABLE_BACKTRACES "Enable embedding backtraces on crash." ON) +if(LLVM_ENABLE_BACKTRACES) + set(ENABLE_BACKTRACES 1) +endif() + +option(LLVM_ENABLE_CRASH_OVERRIDES "Enable crash overrides." ON) +if(LLVM_ENABLE_CRASH_OVERRIDES) + set(ENABLE_CRASH_OVERRIDES 1) +endif() + +option(LLVM_ENABLE_FFI "Use libffi to call external functions from the interpreter" OFF) +set(FFI_LIBRARY_DIR "" CACHE PATH "Additional directory, where CMake should search for libffi.so") +set(FFI_INCLUDE_DIR "" CACHE PATH "Additional directory, where CMake should search for ffi.h or ffi/ffi.h") + +set(LLVM_TARGET_ARCH "host" + CACHE STRING "Set target to use for LLVM JIT or use \"host\" for automatic detection.") + +option(LLVM_ENABLE_TERMINFO "Use terminfo database if available." ON) + +option(LLVM_ENABLE_THREADS "Use threads if available." ON) + +option(LLVM_ENABLE_ZLIB "Use zlib for compression/decompression if available." ON) + +if( LLVM_TARGETS_TO_BUILD STREQUAL "all" ) + set( LLVM_TARGETS_TO_BUILD ${LLVM_ALL_TARGETS} ) +endif() + +set(LLVM_TARGETS_TO_BUILD + ${LLVM_TARGETS_TO_BUILD} + ${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD}) +list(REMOVE_DUPLICATES LLVM_TARGETS_TO_BUILD) + +set(llvm_builded_incs_dir ${LLVM_BINARY_DIR}/include/llvm) + +include(AddLLVMDefinitions) + +option(LLVM_ENABLE_PIC "Build Position-Independent Code" ON) + +# MSVC has a gazillion warnings with this. +if( MSVC ) + option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." OFF) +else( MSVC ) + option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON) +endif() + +option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON) +option(LLVM_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF) + +if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" ) + option(LLVM_ENABLE_ASSERTIONS "Enable assertions" OFF) +else() + option(LLVM_ENABLE_ASSERTIONS "Enable assertions" ON) +endif() + +option(LLVM_USE_INTEL_JITEVENTS + "Use Intel JIT API to inform Intel(R) VTune(TM) Amplifier XE 2011 about JIT code" + OFF) + +if( LLVM_USE_INTEL_JITEVENTS ) + # Verify we are on a supported platform + if( NOT CMAKE_SYSTEM_NAME MATCHES "Windows" AND NOT CMAKE_SYSTEM_NAME MATCHES "Linux" ) + message(FATAL_ERROR + "Intel JIT API support is available on Linux and Windows only.") + endif() +endif( LLVM_USE_INTEL_JITEVENTS ) + +option(LLVM_USE_OPROFILE + "Use opagent JIT interface to inform OProfile about JIT code" OFF) + +# If enabled, verify we are on a platform that supports oprofile. +if( LLVM_USE_OPROFILE ) + if( NOT CMAKE_SYSTEM_NAME MATCHES "Linux" ) + message(FATAL_ERROR "OProfile support is available on Linux only.") + endif( NOT CMAKE_SYSTEM_NAME MATCHES "Linux" ) +endif( LLVM_USE_OPROFILE ) + +set(LLVM_USE_SANITIZER "" CACHE STRING + "Define the sanitizer used to build binaries and tests.") + +option(LLVM_USE_SPLIT_DWARF + "Use -gsplit-dwarf when compiling llvm." OFF) + +# Define an option controlling whether we should build for 32-bit on 64-bit +# platforms, where supported. +if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) + # TODO: support other platforms and toolchains. + option(LLVM_BUILD_32_BITS "Build 32 bits executables and libraries." OFF) +endif() + +# Define the default arguments to use with 'lit', and an option for the user to +# override. +set(LIT_ARGS_DEFAULT "-sv") +if (MSVC OR XCODE) + set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar") +endif() +set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit") + +# On Win32 hosts, provide an option to specify the path to the GnuWin32 tools. +if( WIN32 AND NOT CYGWIN ) + set(LLVM_LIT_TOOLS_DIR "" CACHE PATH "Path to GnuWin32 tools") +endif() + +# Define options to control the inclusion and default build behavior for +# components which may not strictly be necessary (tools, examples, and tests). +# +# This is primarily to support building smaller or faster project files. +option(LLVM_INCLUDE_TOOLS "Generate build targets for the LLVM tools." ON) +option(LLVM_BUILD_TOOLS + "Build the LLVM tools. If OFF, just generate build targets." ON) + +option(LLVM_BUILD_RUNTIME + "Build the LLVM runtime libraries." ON) +option(LLVM_BUILD_EXAMPLES + "Build the LLVM example programs. If OFF, just generate build targets." OFF) +option(LLVM_INCLUDE_EXAMPLES "Generate build targets for the LLVM examples" ON) + +option(LLVM_BUILD_TESTS + "Build LLVM unit tests. If OFF, just generate build targets." OFF) +option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON) + +option (LLVM_BUILD_DOCS "Build the llvm documentation." OFF) +option (LLVM_INCLUDE_DOCS "Generate build targets for llvm documentation." ON) +option (LLVM_ENABLE_DOXYGEN "Use doxygen to generate llvm documentation." OFF) + +# All options referred to from HandleLLVMOptions have to be specified +# BEFORE this include, otherwise options will not be correctly set on +# first cmake run +include(config-ix) + +# By default, we target the host, but this can be overridden at CMake +# invocation time. +set(LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_HOST_TRIPLE}" CACHE STRING + "Default target for which LLVM will generate code." ) +set(TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}") + +include(HandleLLVMOptions) + +# Verify that we can find a Python 2 interpreter. Python 3 is unsupported. +set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5) +include(FindPythonInterp) +if( NOT PYTHONINTERP_FOUND ) + message(FATAL_ERROR +"Unable to find Python interpreter, required for builds and testing. + +Please install Python or specify the PYTHON_EXECUTABLE CMake variable.") +endif() + +###### +# LLVMBuild Integration +# +# We use llvm-build to generate all the data required by the CMake based +# build system in one swoop: +# +# - We generate a file (a CMake fragment) in the object root which contains +# all the definitions that are required by CMake. +# +# - We generate the library table used by llvm-config. +# +# - We generate the dependencies for the CMake fragment, so that we will +# automatically reconfigure outselves. + +set(LLVMBUILDTOOL "${LLVM_MAIN_SRC_DIR}/utils/llvm-build/llvm-build") +set(LLVMCONFIGLIBRARYDEPENDENCIESINC + "${LLVM_BINARY_DIR}/tools/llvm-config/LibraryDependencies.inc") +set(LLVMBUILDCMAKEFRAG + "${LLVM_BINARY_DIR}/LLVMBuild.cmake") + +# Create the list of optional components that are enabled +if (LLVM_USE_INTEL_JITEVENTS) + set(LLVMOPTIONALCOMPONENTS IntelJITEvents) +endif (LLVM_USE_INTEL_JITEVENTS) +if (LLVM_USE_OPROFILE) + set(LLVMOPTIONALCOMPONENTS ${LLVMOPTIONALCOMPONENTS} OProfileJIT) +endif (LLVM_USE_OPROFILE) + +message(STATUS "Constructing LLVMBuild project information") +execute_process( + COMMAND ${PYTHON_EXECUTABLE} ${LLVMBUILDTOOL} + --native-target "${LLVM_NATIVE_ARCH}" + --enable-targets "${LLVM_TARGETS_TO_BUILD}" + --enable-optional-components "${LLVMOPTIONALCOMPONENTS}" + --write-library-table ${LLVMCONFIGLIBRARYDEPENDENCIESINC} + --write-cmake-fragment ${LLVMBUILDCMAKEFRAG} + OUTPUT_VARIABLE LLVMBUILDOUTPUT + ERROR_VARIABLE LLVMBUILDERRORS + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE LLVMBUILDRESULT) + +# On Win32, CMake doesn't properly handle piping the default output/error +# streams into the GUI console. So, we explicitly catch and report them. +if( NOT "${LLVMBUILDOUTPUT}" STREQUAL "") + message(STATUS "llvm-build output: ${LLVMBUILDOUTPUT}") +endif() +if( NOT "${LLVMBUILDRESULT}" STREQUAL "0" ) + message(FATAL_ERROR + "Unexpected failure executing llvm-build: ${LLVMBUILDERRORS}") +endif() + +# Include the generated CMake fragment. This will define properties from the +# LLVMBuild files in a format which is easy to consume from CMake, and will add +# the dependencies so that CMake will reconfigure properly when the LLVMBuild +# files change. +include(${LLVMBUILDCMAKEFRAG}) + +###### + +# Configure all of the various header file fragments LLVM uses which depend on +# configuration variables. +set(LLVM_ENUM_TARGETS "") +set(LLVM_ENUM_ASM_PRINTERS "") +set(LLVM_ENUM_ASM_PARSERS "") +set(LLVM_ENUM_DISASSEMBLERS "") +foreach(t ${LLVM_TARGETS_TO_BUILD}) + set( td ${LLVM_MAIN_SRC_DIR}/lib/Target/${t} ) + + list(FIND LLVM_ALL_TARGETS ${t} idx) + list(FIND LLVM_EXPERIMENTAL_TARGETS_TO_BUILD ${t} idy) + if( idx LESS 0 AND idy LESS 0 ) + message(FATAL_ERROR "The target `${t}' does not exist. + It should be one of\n${LLVM_ALL_TARGETS}") + else() + set(LLVM_ENUM_TARGETS "${LLVM_ENUM_TARGETS}LLVM_TARGET(${t})\n") + endif() + + file(GLOB asmp_file "${td}/*AsmPrinter.cpp") + if( asmp_file ) + set(LLVM_ENUM_ASM_PRINTERS + "${LLVM_ENUM_ASM_PRINTERS}LLVM_ASM_PRINTER(${t})\n") + endif() + if( EXISTS ${td}/AsmParser/CMakeLists.txt ) + set(LLVM_ENUM_ASM_PARSERS + "${LLVM_ENUM_ASM_PARSERS}LLVM_ASM_PARSER(${t})\n") + endif() + if( EXISTS ${td}/Disassembler/CMakeLists.txt ) + set(LLVM_ENUM_DISASSEMBLERS + "${LLVM_ENUM_DISASSEMBLERS}LLVM_DISASSEMBLER(${t})\n") + endif() +endforeach(t) + +# Produce the target definition files, which provide a way for clients to easily +# include various classes of targets. +configure_file( + ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/AsmPrinters.def.in + ${LLVM_BINARY_DIR}/include/llvm/Config/AsmPrinters.def + ) +configure_file( + ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/AsmParsers.def.in + ${LLVM_BINARY_DIR}/include/llvm/Config/AsmParsers.def + ) +configure_file( + ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/Disassemblers.def.in + ${LLVM_BINARY_DIR}/include/llvm/Config/Disassemblers.def + ) +configure_file( + ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/Targets.def.in + ${LLVM_BINARY_DIR}/include/llvm/Config/Targets.def + ) + +# Configure the three LLVM configuration header files. +configure_file( + ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/config.h.cmake + ${LLVM_BINARY_DIR}/include/llvm/Config/config.h) +configure_file( + ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/llvm-config.h.cmake + ${LLVM_BINARY_DIR}/include/llvm/Config/llvm-config.h) +configure_file( + ${LLVM_MAIN_INCLUDE_DIR}/llvm/Support/DataTypes.h.cmake + ${LLVM_BINARY_DIR}/include/llvm/Support/DataTypes.h) + +set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR} ) +set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib ) +set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib ) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +include_directories( ${LLVM_BINARY_DIR}/include ${LLVM_MAIN_INCLUDE_DIR}) + +if( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD ) + # On FreeBSD, /usr/local/* is not used by default. In order to build LLVM + # with libxml2, iconv.h, etc., we must add /usr/local paths. + include_directories("/usr/local/include") + link_directories("/usr/local/lib") +endif( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD ) + +if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS ) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include llvm/Support/Solaris.h") +endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS ) + +# Make sure we don't get -rdynamic in every binary. For those that need it, +# use set_target_properties(target PROPERTIES ENABLE_EXPORTS 1) +set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") + +include(AddLLVM) +include(TableGen) + +if( MINGW ) + # People report that -O3 is unreliable on MinGW. The traditional + # build also uses -O2 for that reason: + llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2") +endif() + +# Put this before tblgen. Else we have a circular dependence. +add_subdirectory(lib/Support) +add_subdirectory(lib/TableGen) + +add_subdirectory(utils/TableGen) + +add_subdirectory(include/llvm) + +add_subdirectory(lib) + +add_subdirectory(utils/FileCheck) +add_subdirectory(utils/FileUpdate) +add_subdirectory(utils/count) +add_subdirectory(utils/not) +add_subdirectory(utils/llvm-lit) +add_subdirectory(utils/yaml-bench) + +add_subdirectory(projects) + +if( LLVM_INCLUDE_TOOLS ) + add_subdirectory(tools) +endif() + +if( LLVM_INCLUDE_EXAMPLES ) + add_subdirectory(examples) +endif() + +if( LLVM_INCLUDE_TESTS ) + add_subdirectory(test) + add_subdirectory(utils/unittest) + add_subdirectory(unittests) + if (MSVC) + # This utility is used to prevent crashing tests from calling Dr. Watson on + # Windows. + add_subdirectory(utils/KillTheDoctor) + endif() + + # Add a global check rule now that all subdirectories have been traversed + # and we know the total set of lit testsuites. + get_property(LLVM_LIT_TESTSUITES GLOBAL PROPERTY LLVM_LIT_TESTSUITES) + get_property(LLVM_LIT_PARAMS GLOBAL PROPERTY LLVM_LIT_PARAMS) + get_property(LLVM_LIT_DEPENDS GLOBAL PROPERTY LLVM_LIT_DEPENDS) + get_property(LLVM_LIT_EXTRA_ARGS GLOBAL PROPERTY LLVM_LIT_EXTRA_ARGS) + add_lit_target(check-all + "Running all regression tests" + ${LLVM_LIT_TESTSUITES} + PARAMS ${LLVM_LIT_PARAMS} + DEPENDS ${LLVM_LIT_DEPENDS} + ARGS ${LLVM_LIT_EXTRA_ARGS} + ) +endif() + +if (LLVM_INCLUDE_DOCS) + add_subdirectory(docs) +endif() + +add_subdirectory(cmake/modules) + +if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + install(DIRECTORY include/ + DESTINATION include + FILES_MATCHING + PATTERN "*.def" + PATTERN "*.h" + PATTERN "*.td" + PATTERN "*.inc" + PATTERN "LICENSE.TXT" + PATTERN ".svn" EXCLUDE + ) + + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ + DESTINATION include + FILES_MATCHING + PATTERN "*.def" + PATTERN "*.h" + PATTERN "*.gen" + PATTERN "*.inc" + # Exclude include/llvm/CMakeFiles/intrinsics_gen.dir, matched by "*.def" + PATTERN "CMakeFiles" EXCLUDE + PATTERN ".svn" EXCLUDE + ) +endif() + +# Workaround for MSVS10 to avoid the Dialog Hell +# FIXME: This could be removed with future version of CMake. +if(MSVC_VERSION EQUAL 1600) + set(LLVM_SLN_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/LLVM.sln") + if( EXISTS "${LLVM_SLN_FILENAME}" ) + file(APPEND "${LLVM_SLN_FILENAME}" "\n# This should be regenerated!\n") + endif() +endif() + diff --git a/CODE_OWNERS.TXT b/CODE_OWNERS.TXT new file mode 100644 index 00000000..cffb91b6 --- /dev/null +++ b/CODE_OWNERS.TXT @@ -0,0 +1,151 @@ +This file is a list of the people responsible for ensuring that patches for a +particular part of LLVM are reviewed, either by themself or by someone else. +They are also the gatekeepers for their part of LLVM, with the final word on +what goes in or not. + +The list is sorted by surname and formatted to allow easy grepping and +beautification by scripts. The fields are: name (N), email (E), web-address +(W), PGP key ID and fingerprint (P), description (D), and snail-mail address +(S). + +N: Joe Abbey +E: jabbey@arxan.com +D: LLVM Bitcode (lib/Bitcode/* include/llvm/Bitcode/*) + +N: Owen Anderson +E: resistor@mac.com +D: SelectionDAG (lib/CodeGen/SelectionDAG/*) + +N: Rafael Avila de Espindola +E: rafael.espindola@gmail.com +D: Gold plugin (tools/gold/*) + +N: Chandler Carruth +E: chandlerc@gmail.com +E: chandlerc@google.com +D: Config, ADT, Support, inlining & related passes, SROA/mem2reg & related passes, CMake, library layering + +N: Evan Cheng +E: evan.cheng@apple.com +D: ARM target, parts of code generator not covered by someone else + +N: Eric Christopher +E: echristo@gmail.com +D: Debug Information, autotools/configure/make build, inline assembly + +N: Greg Clayton +D: LLDB + +N: Peter Collingbourne +D: libclc + +N: Anshuman Dasgupta +E: adasgupt@codeaurora.org +D: Hexagon Backend + +N: Hal Finkel +E: hfinkel@anl.gov +D: BBVectorize and the PowerPC target + +N: Venkatraman Govindaraju +E: venkatra@cs.wisc.edu +D: Sparc Backend (lib/Target/Sparc/*) + +N: Tobias Grosser +D: Polly + +N: James Grosbach +E: grosbach@apple.com +D: MC layer + +N: Howard Hinnant +D: libc++ + +N: Justin Holewinski +E: jholewinski@nvidia.com +D: NVPTX Target (lib/Target/NVPTX/*) + +N: Andy Kaylor +E: andrew.kaylor@intel.com +D: MCJIT, RuntimeDyld and JIT event listeners + +N: Galina Kistanova +E: gkistanova@gmail.com +D: LLVM Buildbot + +N: Anton Korobeynikov +E: anton@korobeynikov.info +D: Exception handling, Windows codegen, ARM EABI + +N: Benjamin Kramer +E: benny.kra@gmail.com +D: DWARF Parser + +N: Sergei Larin +E: slarin@codeaurora.org +D: VLIW Instruction Scheduling, Packetization + +N: Chris Lattner +E: sabre@nondot.org +W: http://nondot.org/~sabre/ +D: Everything not covered by someone else + +N: Tim Northover +E: Tim.Northover@arm.com +D: AArch64 backend + +N: Jakob Olesen +D: Register allocators and TableGen + +N: Richard Osborne +E: richard@xmos.com +D: XCore Backend + +N: Chad Rosier +E: mcrosier@codeaurora.org +D: Fast-Isel + +N: Nadav Rotem +E: nrotem@apple.com +D: X86 Backend, Loop Vectorizer + +N: Daniel Sanders +E: daniel.sanders@imgtec.com +D: MIPS Backend (lib/Target/Mips/*) + +N: Richard Sandiford +E: rsandifo@linux.vnet.ibm.com +D: SystemZ Backend + +N: Duncan Sands +E: baldrick@free.fr +D: DragonEgg + +N: Kostya Serebryany +E: kcc@google.com +D: AddressSanitizer, ThreadSanitizer (LLVM parts) + +N: Michael Spencer +E: bigcheesegs@gmail.com +D: Windows parts of Support, Object, ar, nm, objdump, ranlib, size + +N: Tom Stellard +E: thomas.stellard@amd.com +E: mesa-dev@lists.freedesktop.org +D: R600 Backend + +N: Evgeniy Stepanov +E: eugenis@google.com +D: MemorySanitizer (LLVM part) + +N: Andrew Trick +E: atrick@apple.com +D: IndVar Simplify, Loop Strength Reduction, Instruction Scheduling + +N: Bill Wendling +E: isanbard@gmail.com +D: libLTO, IR Linker + +N: Peter Zotov +E: whitequark@whitequark.org +D: OCaml bindings diff --git a/CREDITS.TXT b/CREDITS.TXT new file mode 100644 index 00000000..3c1dcb07 --- /dev/null +++ b/CREDITS.TXT @@ -0,0 +1,445 @@ +This file is a partial list of people who have contributed to the LLVM +project. If you have contributed a patch or made some other contribution to +LLVM, please submit a patch to this file to add yourself, and it will be +done! + +The list is sorted by surname and formatted to allow easy grepping and +beautification by scripts. The fields are: name (N), email (E), web-address +(W), PGP key ID and fingerprint (P), description (D), snail-mail address +(S), and (I) IRC handle. + + +N: Vikram Adve +E: vadve@cs.uiuc.edu +W: http://www.cs.uiuc.edu/~vadve/ +D: The Sparc64 backend, provider of much wisdom, and motivator for LLVM + +N: Owen Anderson +E: resistor@mac.com +D: LCSSA pass and related LoopUnswitch work +D: GVNPRE pass, DataLayout refactoring, random improvements + +N: Henrik Bach +D: MingW Win32 API portability layer + +N: Aaron Ballman +E: aaron@aaronballman.com +D: __declspec attributes, Windows support, general bug fixing + +N: Nate Begeman +E: natebegeman@mac.com +D: PowerPC backend developer +D: Target-independent code generator and analysis improvements + +N: Daniel Berlin +E: dberlin@dberlin.org +D: ET-Forest implementation. +D: Sparse bitmap + +N: David Blaikie +E: dblaikie@gmail.com +D: General bug fixing/fit & finish, mostly in Clang + +N: Neil Booth +E: neil@daikokuya.co.uk +D: APFloat implementation. + +N: Misha Brukman +E: brukman+llvm@uiuc.edu +W: http://misha.brukman.net +D: Portions of X86 and Sparc JIT compilers, PowerPC backend +D: Incremental bitcode loader + +N: Cameron Buschardt +E: buschard@uiuc.edu +D: The `mem2reg' pass - promotes values stored in memory to registers + +N: Brendon Cahoon +E: bcahoon@codeaurora.org +D: Loop unrolling with run-time trip counts. + +N: Chandler Carruth +E: chandlerc@gmail.com +E: chandlerc@google.com +D: Hashing algorithms and interfaces +D: Inline cost analysis +D: Machine block placement pass +D: SROA + +N: Casey Carter +E: ccarter@uiuc.edu +D: Fixes to the Reassociation pass, various improvement patches + +N: Evan Cheng +E: evan.cheng@apple.com +D: ARM and X86 backends +D: Instruction scheduler improvements +D: Register allocator improvements +D: Loop optimizer improvements +D: Target-independent code generator improvements + +N: Dan Villiom Podlaski Christiansen +E: danchr@gmail.com +E: danchr@cs.au.dk +W: http://villiom.dk +D: LLVM Makefile improvements +D: Clang diagnostic & driver tweaks +S: Aarhus, Denmark + +N: Jeff Cohen +E: jeffc@jolt-lang.org +W: http://jolt-lang.org +D: Native Win32 API portability layer + +N: John T. Criswell +E: criswell@uiuc.edu +D: Original Autoconf support, documentation improvements, bug fixes + +N: Anshuman Dasgupta +E: adasgupt@codeaurora.org +D: Deterministic finite automaton based infrastructure for VLIW packetization + +N: Stefanus Du Toit +E: stefanus.du.toit@intel.com +D: Bug fixes and minor improvements + +N: Rafael Avila de Espindola +E: rafael.espindola@gmail.com +D: The ARM backend + +N: Alkis Evlogimenos +E: alkis@evlogimenos.com +D: Linear scan register allocator, many codegen improvements, Java frontend + +N: Hal Finkel +E: hfinkel@anl.gov +D: Basic-block autovectorization, PowerPC backend improvements + +N: Ryan Flynn +E: pizza@parseerror.com +D: Miscellaneous bug fixes + +N: Brian Gaeke +E: gaeke@uiuc.edu +W: http://www.students.uiuc.edu/~gaeke/ +D: Portions of X86 static and JIT compilers; initial SparcV8 backend +D: Dynamic trace optimizer +D: FreeBSD/X86 compatibility fixes, the llvm-nm tool + +N: Nicolas Geoffray +E: nicolas.geoffray@lip6.fr +W: http://www-src.lip6.fr/homepages/Nicolas.Geoffray/ +D: PPC backend fixes for Linux + +N: Louis Gerbarg +D: Portions of the PowerPC backend + +N: Saem Ghani +E: saemghani@gmail.com +D: Callgraph class cleanups + +N: Mikhail Glushenkov +E: foldr@codedgers.com +D: Author of llvmc2 + +N: Dan Gohman +E: dan433584@gmail.com +D: Miscellaneous bug fixes + +N: David Goodwin +E: david@goodwinz.net +D: Thumb-2 code generator + +N: David Greene +E: greened@obbligato.org +D: Miscellaneous bug fixes +D: Register allocation refactoring + +N: Gabor Greif +E: ggreif@gmail.com +D: Improvements for space efficiency + +N: James Grosbach +E: grosbach@apple.com +D: SjLj exception handling support +D: General fixes and improvements for the ARM back-end +D: MCJIT +D: ARM integrated assembler and assembly parser + +N: Lang Hames +E: lhames@gmail.com +D: PBQP-based register allocator + +N: Gordon Henriksen +E: gordonhenriksen@mac.com +D: Pluggable GC support +D: C interface +D: Ocaml bindings + +N: Raul Fernandes Herbster +E: raul@dsc.ufcg.edu.br +D: JIT support for ARM + +N: Paolo Invernizzi +E: arathorn@fastwebnet.it +D: Visual C++ compatibility fixes + +N: Patrick Jenkins +E: patjenk@wam.umd.edu +D: Nightly Tester + +N: Dale Johannesen +E: dalej@apple.com +D: ARM constant islands improvements +D: Tail merging improvements +D: Rewrite X87 back end +D: Use APFloat for floating point constants widely throughout compiler +D: Implement X87 long double + +N: Brad Jones +E: kungfoomaster@nondot.org +D: Support for packed types + +N: Rod Kay +E: rkay@auroraux.org +D: Author of LLVM Ada bindings + +N: Eric Kidd +W: http://randomhacks.net/ +D: llvm-config script + +N: Anton Korobeynikov +E: asl@math.spbu.ru +D: Mingw32 fixes, cross-compiling support, stdcall/fastcall calling conv. +D: x86/linux PIC codegen, aliases, regparm/visibility attributes +D: Switch lowering refactoring + +N: Sumant Kowshik +E: kowshik@uiuc.edu +D: Author of the original C backend + +N: Benjamin Kramer +E: benny.kra@gmail.com +D: Miscellaneous bug fixes + +N: Sundeep Kushwaha +E: sundeepk@codeaurora.org +D: Implemented DFA-based target independent VLIW packetizer + +N: Christopher Lamb +E: christopher.lamb@gmail.com +D: aligned load/store support, parts of noalias and restrict support +D: vreg subreg infrastructure, X86 codegen improvements based on subregs +D: address spaces + +N: Jim Laskey +E: jlaskey@apple.com +D: Improvements to the PPC backend, instruction scheduling +D: Debug and Dwarf implementation +D: Auto upgrade mangler +D: llvm-gcc4 svn wrangler + +N: Chris Lattner +E: sabre@nondot.org +W: http://nondot.org/~sabre/ +D: Primary architect of LLVM + +N: Tanya Lattner (Tanya Brethour) +E: tonic@nondot.org +W: http://nondot.org/~tonic/ +D: The initial llvm-ar tool, converted regression testsuite to dejagnu +D: Modulo scheduling in the SparcV9 backend +D: Release manager (1.7+) + +N: Sylvestre Ledru +E: sylvestre@debian.org +W: http://sylvestre.ledru.info/ +W: http://llvm.org/apt/ +D: Debian and Ubuntu packaging +D: Continous integration with jenkins + +N: Andrew Lenharth +E: alenhar2@cs.uiuc.edu +W: http://www.lenharth.org/~andrewl/ +D: Alpha backend +D: Sampling based profiling + +N: Nick Lewycky +E: nicholas@mxc.ca +D: PredicateSimplifier pass + +N: Tony Linthicum, et. al. +E: tlinth@codeaurora.org +D: Backend for Qualcomm's Hexagon VLIW processor. + +N: Bruno Cardoso Lopes +E: bruno.cardoso@gmail.com +W: http://www.brunocardoso.org +D: The Mips backend + +N: Duraid Madina +E: duraid@octopus.com.au +W: http://kinoko.c.u-tokyo.ac.jp/~duraid/ +D: IA64 backend, BigBlock register allocator + +N: John McCall +E: rjmccall@apple.com +D: Clang semantic analysis and IR generation + +N: Michael McCracken +E: michael.mccracken@gmail.com +D: Line number support for llvmgcc + +N: Vladimir Merzliakov +E: wanderer@rsu.ru +D: Test suite fixes for FreeBSD + +N: Scott Michel +E: scottm@aero.org +D: Added STI Cell SPU backend. + +N: Kai Nacke +E: kai@redstar.de +D: Support for implicit TLS model used with MS VC runtime +D: Dumping of Win64 EH structures + +N: Takumi Nakamura +E: geek4civic@gmail.com +E: chapuni@hf.rim.or.jp +D: Cygwin and MinGW support. +D: Win32 tweaks. +S: Yokohama, Japan + +N: Edward O'Callaghan +E: eocallaghan@auroraux.org +W: http://www.auroraux.org +D: Add Clang support with various other improvements to utils/NewNightlyTest.pl +D: Fix and maintain Solaris & AuroraUX support for llvm, various build warnings +D: and error clean ups. + +N: Morten Ofstad +E: morten@hue.no +D: Visual C++ compatibility fixes + +N: Jakob Stoklund Olesen +E: stoklund@2pi.dk +D: Machine code verifier +D: Blackfin backend +D: Fast register allocator +D: Greedy register allocator + +N: Richard Osborne +E: richard@xmos.com +D: XCore backend + +N: Devang Patel +E: dpatel@apple.com +D: LTO tool, PassManager rewrite, Loop Pass Manager, Loop Rotate +D: GCC PCH Integration (llvm-gcc), llvm-gcc improvements +D: Optimizer improvements, Loop Index Split + +N: Wesley Peck +E: peckw@wesleypeck.com +W: http://wesleypeck.com/ +D: MicroBlaze backend + +N: Francois Pichet +E: pichet2000@gmail.com +D: MSVC support + +N: Vladimir Prus +W: http://vladimir_prus.blogspot.com +E: ghost@cs.msu.su +D: Made inst_iterator behave like a proper iterator, LowerConstantExprs pass + +N: Kalle Raiskila +E: kalle.rasikila@nokia.com +D: Some bugfixes to CellSPU + +N: Xerxes Ranby +E: xerxes@zafena.se +D: Cmake dependency chain and various bug fixes + +N: Alex Rosenberg +E: alexr@leftfield.org +I: arosenberg +D: ARM calling conventions rewrite, hard float support + +N: Chad Rosier +E: mcrosier@codeaurora.org +D: ARM fast-isel improvements +D: Performance monitoring + +N: Nadav Rotem +E: nrotem@apple.com +D: X86 code generation improvements, Loop Vectorizer. + +N: Roman Samoilov +E: roman@codedgers.com +D: MSIL backend + +N: Duncan Sands +E: baldrick@free.fr +I: baldrick +D: Ada support in llvm-gcc +D: Dragonegg plugin +D: Exception handling improvements +D: Type legalizer rewrite + +N: Ruchira Sasanka +E: sasanka@uiuc.edu +D: Graph coloring register allocator for the Sparc64 backend + +N: Arnold Schwaighofer +E: arnold.schwaighofer@gmail.com +D: Tail call optimization for the x86 backend + +N: Shantonu Sen +E: ssen@apple.com +D: Miscellaneous bug fixes + +N: Anand Shukla +E: ashukla@cs.uiuc.edu +D: The `paths' pass + +N: Michael J. Spencer +E: bigcheesegs@gmail.com +D: Shepherding Windows COFF support into MC. +D: Lots of Windows stuff. + +N: Reid Spencer +E: rspencer@reidspencer.com +W: http://reidspencer.com/ +D: Lots of stuff, see: http://wiki.llvm.org/index.php/User:Reid + +N: Alp Toker +E: alp@nuanti.com +W: http://atoker.com/ +D: C++ frontend next generation standards implementation + +N: Craig Topper +E: craig.topper@gmail.com +D: X86 codegen and disassembler improvements. AVX2 support. + +N: Edwin Torok +E: edwintorok@gmail.com +D: Miscellaneous bug fixes + +N: Adam Treat +E: manyoso@yahoo.com +D: C++ bugs filed, and C++ front-end bug fixes. + +N: Lauro Ramos Venancio +E: lauro.venancio@indt.org.br +D: ARM backend improvements +D: Thread Local Storage implementation + +N: Bill Wendling +I: wendling +E: isanbard@gmail.com +D: Release manager, IR Linker, LTO +D: Bunches of stuff + +N: Bob Wilson +E: bob.wilson@acm.org +D: Advanced SIMD (NEON) support in the ARM backend. diff --git a/LICENSE.TXT b/LICENSE.TXT new file mode 100644 index 00000000..66d6647f --- /dev/null +++ b/LICENSE.TXT @@ -0,0 +1,71 @@ +============================================================================== +LLVM Release License +============================================================================== +University of Illinois/NCSA +Open Source License + +Copyright (c) 2003-2013 University of Illinois at Urbana-Champaign. +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== +Copyrights and Licenses for Third Party Software Distributed with LLVM: +============================================================================== +The LLVM software contains code written by third parties. Such software will +have its own individual LICENSE.TXT file in the directory in which it appears. +This file will describe the copyrights, license, and restrictions which apply +to that code. + +The disclaimer of warranty in the University of Illinois Open Source License +applies to all code in the LLVM Distribution, and nothing in any of the +other licenses gives permission to use the names of the LLVM Team or the +University of Illinois to endorse or promote products derived from this +Software. + +The following pieces of software have additional or alternate copyrights, +licenses, and/or restrictions: + +Program Directory +------- --------- +Autoconf llvm/autoconf + llvm/projects/ModuleMaker/autoconf + llvm/projects/sample/autoconf +Google Test llvm/utils/unittest/googletest +OpenBSD regex llvm/lib/Support/{reg*, COPYRIGHT.regex} +pyyaml tests llvm/test/YAMLParser/{*.data, LICENSE.TXT} +ARM contributions llvm/lib/Target/ARM/LICENSE.TXT +md5 contributions llvm/lib/Support/MD5.cpp llvm/include/llvm/Support/MD5.h diff --git a/LLVMBuild.txt b/LLVMBuild.txt new file mode 100644 index 00000000..9cee3030 --- /dev/null +++ b/LLVMBuild.txt @@ -0,0 +1,24 @@ +;===- ./LLVMBuild.txt ------------------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[common] +subdirectories = bindings docs examples lib projects tools utils + +[component_0] +type = Group +name = Miscellaneous +parent = $ROOT diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..e3672b76 --- /dev/null +++ b/Makefile @@ -0,0 +1,285 @@ +#===- ./Makefile -------------------------------------------*- Makefile -*--===# +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# + +LEVEL := . + +# Top-Level LLVM Build Stages: +# 1. Build lib/Support and lib/TableGen, which are used by utils (tblgen). +# 2. Build utils, which is used by IR. +# 3. Build IR, which builds the Intrinsics.inc file used by libs. +# 4. Build libs, which are needed by llvm-config. +# 5. Build llvm-config, which determines inter-lib dependencies for tools. +# 6. Build tools and docs. +# +# When cross-compiling, there are some things (tablegen) that need to +# be build for the build system first. + +# If "RC_ProjectName" exists in the environment, and its value is +# "llvmCore", then this is an "Apple-style" build; search for +# "Apple-style" in the comments for more info. Anything else is a +# normal build. +ifneq ($(findstring llvmCore, $(RC_ProjectName)),llvmCore) # Normal build (not "Apple-style"). + +ifeq ($(BUILD_DIRS_ONLY),1) + DIRS := lib/Support lib/TableGen utils tools/llvm-config + OPTIONAL_DIRS := tools/clang/utils/TableGen +else + DIRS := lib/Support lib/TableGen utils lib/IR lib tools/llvm-shlib \ + tools/llvm-config tools docs unittests + OPTIONAL_DIRS := projects bindings +endif + +ifeq ($(BUILD_EXAMPLES),1) + OPTIONAL_DIRS += examples +endif + +EXTRA_DIST := test unittests llvm.spec include win32 Xcode + +include $(LEVEL)/Makefile.config + +ifneq ($(ENABLE_SHARED),1) + DIRS := $(filter-out tools/llvm-shlib, $(DIRS)) +endif + +ifneq ($(ENABLE_DOCS),1) + DIRS := $(filter-out docs, $(DIRS)) +endif + +ifeq ($(MAKECMDGOALS),libs-only) + DIRS := $(filter-out tools docs, $(DIRS)) + OPTIONAL_DIRS := +endif + +ifeq ($(MAKECMDGOALS),install-libs) + DIRS := $(filter-out tools docs, $(DIRS)) + OPTIONAL_DIRS := $(filter bindings, $(OPTIONAL_DIRS)) +endif + +ifeq ($(MAKECMDGOALS),tools-only) + DIRS := $(filter-out docs, $(DIRS)) + OPTIONAL_DIRS := +endif + +ifeq ($(MAKECMDGOALS),install-clang) + DIRS := tools/clang/tools/driver tools/clang/lib/Headers \ + tools/clang/tools/libclang \ + tools/clang/tools/c-index-test \ + tools/clang/include/clang-c \ + tools/clang/runtime tools/clang/docs \ + tools/lto + OPTIONAL_DIRS := + NO_INSTALL = 1 +endif + +ifeq ($(MAKECMDGOALS),clang-only) + DIRS := $(filter-out tools docs unittests, $(DIRS)) \ + tools/clang tools/lto + OPTIONAL_DIRS := +endif + +ifeq ($(MAKECMDGOALS),unittests) + DIRS := $(filter-out tools docs, $(DIRS)) utils unittests + OPTIONAL_DIRS := +endif + +# Use NO_INSTALL define of the Makefile of each directory for deciding +# if the directory is installed or not +ifeq ($(MAKECMDGOALS),install) + OPTIONAL_DIRS := $(filter bindings, $(OPTIONAL_DIRS)) +endif + +# Don't build unittests when ONLY_TOOLS is set. +ifneq ($(ONLY_TOOLS),) + DIRS := $(filter-out unittests, $(DIRS)) +endif + +# If we're cross-compiling, build the build-hosted tools first +ifeq ($(LLVM_CROSS_COMPILING),1) +all:: cross-compile-build-tools + +clean:: + $(Verb) rm -rf BuildTools + +cross-compile-build-tools: + $(Verb) if [ ! -f BuildTools/Makefile ]; then \ + $(MKDIR) BuildTools; \ + cd BuildTools ; \ + unset CFLAGS ; \ + unset CXXFLAGS ; \ + unset SDKROOT ; \ + unset UNIVERSAL_SDK_PATH ; \ + $(PROJ_SRC_DIR)/configure --build=$(BUILD_TRIPLE) \ + --host=$(BUILD_TRIPLE) --target=$(BUILD_TRIPLE) \ + --disable-polly ; \ + cd .. ; \ + fi; \ + ($(MAKE) -C BuildTools \ + BUILD_DIRS_ONLY=1 \ + UNIVERSAL= \ + UNIVERSAL_SDK_PATH= \ + SDKROOT= \ + TARGET_NATIVE_ARCH="$(TARGET_NATIVE_ARCH)" \ + TARGETS_TO_BUILD="$(TARGETS_TO_BUILD)" \ + ENABLE_OPTIMIZED=$(ENABLE_OPTIMIZED) \ + ENABLE_PROFILING=$(ENABLE_PROFILING) \ + ENABLE_COVERAGE=$(ENABLE_COVERAGE) \ + DISABLE_ASSERTIONS=$(DISABLE_ASSERTIONS) \ + ENABLE_EXPENSIVE_CHECKS=$(ENABLE_EXPENSIVE_CHECKS) \ + ENABLE_LIBCPP=$(ENABLE_LIBCPP) \ + CFLAGS= \ + CXXFLAGS= \ + ) || exit 1; +endif + +# Include the main makefile machinery. +include $(LLVM_SRC_ROOT)/Makefile.rules + +# Specify options to pass to configure script when we're +# running the dist-check target +DIST_CHECK_CONFIG_OPTIONS = --with-llvmgccdir=$(LLVMGCCDIR) + +.PHONY: debug-opt-prof +debug-opt-prof: + $(Echo) Building Debug Version + $(Verb) $(MAKE) + $(Echo) + $(Echo) Building Optimized Version + $(Echo) + $(Verb) $(MAKE) ENABLE_OPTIMIZED=1 + $(Echo) + $(Echo) Building Profiling Version + $(Echo) + $(Verb) $(MAKE) ENABLE_PROFILING=1 + +dist-hook:: + $(Echo) Eliminating files constructed by configure + $(Verb) $(RM) -f \ + $(TopDistDir)/include/llvm/Config/config.h \ + $(TopDistDir)/include/llvm/Support/DataTypes.h + +clang-only: all +tools-only: all +libs-only: all +install-clang: install +install-libs: install + +# If SHOW_DIAGNOSTICS is enabled, clear the diagnostics file first. +ifeq ($(SHOW_DIAGNOSTICS),1) +clean-diagnostics: + $(Verb) rm -f $(LLVM_OBJ_ROOT)/$(BuildMode)/diags +.PHONY: clean-diagnostics + +all-local:: clean-diagnostics +endif + +#------------------------------------------------------------------------ +# Make sure the generated files are up-to-date. This must be kept in +# sync with the AC_CONFIG_HEADER and AC_CONFIG_FILE invocations in +# autoconf/configure.ac. +# Note that Makefile.config is covered by its own separate rule +# in Makefile.rules where it can be reused by sub-projects. +#------------------------------------------------------------------------ +FilesToConfig := \ + bindings/ocaml/llvm/META.llvm \ + docs/doxygen.cfg \ + llvm.spec \ + include/llvm/Config/config.h \ + include/llvm/Config/llvm-config.h \ + include/llvm/Config/Targets.def \ + include/llvm/Config/AsmPrinters.def \ + include/llvm/Config/AsmParsers.def \ + include/llvm/Config/Disassemblers.def \ + include/llvm/Support/DataTypes.h +FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig)) + +all-local:: $(FilesToConfigPATH) +$(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/% : $(LLVM_SRC_ROOT)/%.in + $(Echo) Regenerating $* + $(Verb) cd $(LLVM_OBJ_ROOT) && $(ConfigStatusScript) $* +.PRECIOUS: $(FilesToConfigPATH) + +# NOTE: This needs to remain as the last target definition in this file so +# that it gets executed last. +ifneq ($(BUILD_DIRS_ONLY),1) +all:: + $(Echo) '*****' Completed $(BuildMode) Build +ifneq ($(ENABLE_OPTIMIZED),1) + $(Echo) '*****' Note: Debug build can be 10 times slower than an + $(Echo) '*****' optimized build. Use 'make ENABLE_OPTIMIZED=1' to + $(Echo) '*****' make an optimized build. Alternatively you can + $(Echo) '*****' configure with --enable-optimized. +ifeq ($(SHOW_DIAGNOSTICS),1) + $(Verb) if test -s $(LLVM_OBJ_ROOT)/$(BuildMode)/diags; then \ + $(LLVM_SRC_ROOT)/utils/clang-parse-diagnostics-file -a \ + $(LLVM_OBJ_ROOT)/$(BuildMode)/diags; \ + fi +endif +endif +endif + +check-llvm2cpp: + $(Verb)$(MAKE) check TESTSUITE=Feature RUNLLVM2CPP=1 + +srpm: $(LLVM_OBJ_ROOT)/llvm.spec + rpmbuild -bs $(LLVM_OBJ_ROOT)/llvm.spec + +rpm: $(LLVM_OBJ_ROOT)/llvm.spec + rpmbuild -bb --target $(TARGET_TRIPLE) $(LLVM_OBJ_ROOT)/llvm.spec + +show-footprint: + $(Verb) du -sk $(LibDir) + $(Verb) du -sk $(ToolDir) + $(Verb) du -sk $(ExmplDir) + $(Verb) du -sk $(ObjDir) + +build-for-llvm-top: + $(Verb) if test ! -f ./config.status ; then \ + ./configure --prefix="$(LLVM_TOP)/install" \ + --with-llvm-gcc="$(LLVM_TOP)/llvm-gcc" ; \ + fi + $(Verb) $(MAKE) tools-only + +SVN = svn +SVN-UPDATE-OPTIONS = +AWK = awk + +# Multiline variable defining a recursive function for finding svn repos rooted at +# a given path. svnup() requires one argument: the root to search from. +define SUB_SVN_DIRS +svnup() { + dirs=`svn status --no-ignore $$1 | awk '/^(I|\?) / {print $$2}' | LC_ALL=C xargs svn info 2>/dev/null | awk '/^Path:\ / {print $$2}'`; + if [ "$$dirs" = "" ]; then + return; + fi; + for f in $$dirs; do + echo $$f; + svnup $$f; + done +} +endef +export SUB_SVN_DIRS + +update: + $(SVN) $(SVN-UPDATE-OPTIONS) update $(LLVM_SRC_ROOT) + @eval $$SUB_SVN_DIRS; $(SVN) status --no-ignore $(LLVM_SRC_ROOT) | svnup $(LLVM_SRC_ROOT) | xargs $(SVN) $(SVN-UPDATE-OPTIONS) update + +happiness: update all check-all + +.PHONY: srpm rpm update happiness + +# declare all targets at this level to be serial: + +.NOTPARALLEL: + +else # Building "Apple-style." +# In an Apple-style build, once configuration is done, lines marked +# "Apple-style" are removed with sed! Please don't remove these! +# Look for the string "Apple-style" in utils/buildit/build_llvm. +include $(shell find . -name GNUmakefile) # Building "Apple-style." +endif # Building "Apple-style." diff --git a/Makefile.common b/Makefile.common new file mode 100644 index 00000000..a157abae --- /dev/null +++ b/Makefile.common @@ -0,0 +1,69 @@ +#===-- Makefile.common - Common make rules for LLVM --------*- Makefile -*--===# +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# +# +# This file is included by all of the LLVM makefiles. This file defines common +# rules to do things like compile a .cpp file or generate dependency info. +# These are platform dependent, so this is the file used to specify these +# system dependent operations. +# +# The following functionality can be set by setting incoming variables. +# The variable $(LEVEL) *must* be set: +# +# 1. LEVEL - The level of the current subdirectory from the top of the +# source directory. This level should be expressed as a path, for +# example, ../.. for two levels deep. +# +# 2. DIRS - A list of subdirectories to be built. Fake targets are set up +# so that each of the targets "all", "install", and "clean" each build +# the subdirectories before the local target. DIRS are guaranteed to be +# built in order. +# +# 3. PARALLEL_DIRS - A list of subdirectories to be built, but that may be +# built in any order. All DIRS are built in order before PARALLEL_DIRS are +# built, which are then built in any order. +# +# 4. SOURCES - If specified, this sets the source code filenames. If this +# is not set, it defaults to be all of the .cpp, .c, .y, and .l files +# in the current directory. +# +# 5. SourceDir - If specified, this specifies a directory that the source files +# are in, if they are not in the current directory. This should include a +# trailing / character. +# +# 6. LLVM_SRC_ROOT - If specified, points to the top of the LLVM source tree. +# +# 8. PROJ_SRC_DIR - The directory which contains the current set of Makefiles +# and usually the source code too (unless SourceDir is set). +# +# 9. PROJ_SRC_ROOT - The root directory of the source code being compiled. +# +# 10. PROJ_OBJ_DIR - The directory where object code should be placed. +# +# 11. PROJ_OBJ_ROOT - The root directory for where object code should be +# placed. +# +# For building, +# LLVM, LLVM_SRC_ROOT = PROJ_SRC_ROOT +# +#===-----------------------------------------------------------------------==== + +# +# Configuration file to set paths specific to local installation of LLVM +# +ifndef LLVM_OBJ_ROOT +include $(LEVEL)/Makefile.config +else +include $(LLVM_OBJ_ROOT)/Makefile.config +endif + +# +# Include all of the build rules used for making LLVM +# +include $(LLVM_SRC_ROOT)/Makefile.rules + diff --git a/Makefile.config.in b/Makefile.config.in new file mode 100644 index 00000000..00c6d965 --- /dev/null +++ b/Makefile.config.in @@ -0,0 +1,412 @@ +#===-- Makefile.config - Local configuration for LLVM ------*- Makefile -*--===# +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# +# +# This file is included by Makefile.common. It defines paths and other +# values specific to a particular installation of LLVM. +# +#===------------------------------------------------------------------------===# + +# Define LLVM specific info and directories based on the autoconf variables +LLVMPackageName := @PACKAGE_TARNAME@ +LLVMVersion := @PACKAGE_VERSION@ +LLVM_VERSION_MAJOR := @LLVM_VERSION_MAJOR@ +LLVM_VERSION_MINOR := @LLVM_VERSION_MINOR@ +LLVM_VERSION_PATCH := @LLVM_VERSION_PATCH@ +LLVM_VERSION_SUFFIX := @LLVM_VERSION_SUFFIX@ +LLVM_CONFIGTIME := @LLVM_CONFIGTIME@ + +########################################################################### +# Directory Configuration +# This section of the Makefile determines what is where. To be +# specific, there are several locations that need to be defined: +# +# o LLVM_SRC_ROOT : The root directory of the LLVM source code. +# o LLVM_OBJ_ROOT : The root directory containing the built LLVM code. +# +# o PROJ_SRC_DIR : The directory containing the code to build. +# o PROJ_SRC_ROOT : The root directory of the code to build. +# +# o PROJ_OBJ_DIR : The directory in which compiled code will be placed. +# o PROJ_OBJ_ROOT : The root directory in which compiled code is placed. +# +########################################################################### + +PWD := @BINPWD@ +# Set the project name to LLVM if its not defined +ifndef PROJECT_NAME +PROJECT_NAME := $(LLVMPackageName) +endif + +# The macro below is expanded when 'realpath' is not built-in. +# Built-in 'realpath' is available on GNU Make 3.81. +realpath = $(shell cd $(1); $(PWD)) + +PROJ_OBJ_DIR := $(call realpath, .) +PROJ_OBJ_ROOT := $(call realpath, $(PROJ_OBJ_DIR)/$(LEVEL)) + +CLANG_SRC_ROOT := @CLANG_SRC_ROOT@ + +ifeq ($(PROJECT_NAME),$(LLVMPackageName)) +LLVM_SRC_ROOT := $(call realpath, @abs_top_srcdir@) +LLVM_OBJ_ROOT := $(call realpath, @abs_top_builddir@) +PROJ_SRC_ROOT := $(LLVM_SRC_ROOT) +PROJ_SRC_DIR := $(LLVM_SRC_ROOT)$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)) + +ifneq ($(CLANG_SRC_ROOT),) + CLANG_SRC_ROOT:= $(call realpath, $(CLANG_SRC_ROOT)) + PROJ_SRC_DIR := $(patsubst $(LLVM_SRC_ROOT)/tools/clang%,$(CLANG_SRC_ROOT)%,$(PROJ_SRC_DIR)) +endif + +prefix := @prefix@ +PROJ_prefix := $(prefix) +program_prefix := @program_prefix@ +PROJ_VERSION := $(LLVMVersion) +else +ifndef PROJ_SRC_ROOT +$(error Projects must define PROJ_SRC_ROOT) +endif +ifndef PROJ_OBJ_ROOT +$(error Projects must define PROJ_OBJ_ROOT) +endif +ifndef PROJ_INSTALL_ROOT +$(error Projects must define PROJ_INSTALL_ROOT) +endif +ifndef LLVM_SRC_ROOT +$(error Projects must define LLVM_SRC_ROOT) +endif +ifndef LLVM_OBJ_ROOT +$(error Projects must define LLVM_OBJ_ROOT) +endif +PROJ_SRC_DIR := $(call realpath, $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))) +prefix := $(PROJ_INSTALL_ROOT) +PROJ_prefix := $(prefix) +ifndef PROJ_VERSION +PROJ_VERSION := 1.0 +endif +endif + +INTERNAL_PREFIX := @INTERNAL_PREFIX@ +ifneq ($(INTERNAL_PREFIX),) +PROJ_internal_prefix := $(INTERNAL_PREFIX) +else +PROJ_internal_prefix := $(prefix) +endif + +PROJ_bindir := $(PROJ_prefix)/bin +PROJ_libdir := $(PROJ_prefix)/lib +PROJ_datadir := $(PROJ_prefix)/share +PROJ_docsdir := $(PROJ_prefix)/docs/llvm +PROJ_etcdir := $(PROJ_prefix)/etc/llvm +PROJ_includedir := $(PROJ_prefix)/include +PROJ_infodir := $(PROJ_prefix)/info +PROJ_mandir := $(PROJ_prefix)/share/man + +# Determine if we're on a unix type operating system +LLVM_ON_UNIX:=@LLVM_ON_UNIX@ +LLVM_ON_WIN32:=@LLVM_ON_WIN32@ + +# Host operating system for which LLVM will be run. +OS=@OS@ +HOST_OS=@HOST_OS@ +# Target operating system for which LLVM will compile for. +TARGET_OS=@TARGET_OS@ + +# Host hardware architecture +HOST_ARCH=@HOST_ARCH@ +# Target hardware architecture +ARCH=@ARCH@ +TARGET_NATIVE_ARCH := $(ARCH) + +# Indicates, whether we're cross-compiling LLVM or not +LLVM_CROSS_COMPILING=@LLVM_CROSS_COMPILING@ + +# Executable file extension for build platform (mainly for +# tablegen call if we're cross-compiling). +BUILD_EXEEXT=@BUILD_EXEEXT@ + +# Compilers for the build platflorm (mainly for tablegen +# call if we're cross-compiling). +BUILD_CC=@BUILD_CC@ +BUILD_CXX=@BUILD_CXX@ + +# Triple for configuring build tools when cross-compiling +BUILD_TRIPLE=@build@ + +# Target triple (cpu-vendor-os) which LLVM is compiled for +HOST_TRIPLE=@host@ + +# Target triple (cpu-vendor-os) for which we should generate code +TARGET_TRIPLE=@target@ + +# Extra options to compile LLVM with +EXTRA_OPTIONS=@EXTRA_OPTIONS@ + +# Extra options to link LLVM with +EXTRA_LD_OPTIONS=@EXTRA_LD_OPTIONS@ + +# Endian-ness of the target +ENDIAN=@ENDIAN@ + +# Path to the C++ compiler to use. This is an optional setting, which defaults +# to whatever your gmake defaults to. +CXX = @CXX@ + +# Path to the CC binary, which use used by testcases for native builds. +CC := @CC@ + +# C/C++ preprocessor flags. +CPPFLAGS += @CPPFLAGS@ + +# C compiler flags. +CFLAGS += @CFLAGS@ + +# C++ compiler flags. +CXXFLAGS += @CXXFLAGS@ + +# Linker flags. +LDFLAGS += @LDFLAGS@ + +# Path to the library archiver program. +AR_PATH = @AR@ +AR = @AR@ + +# Path to the nm program +NM_PATH = @NM@ + +# The pathnames of the programs we require to build +CMP := @CMP@ +CP := @CP@ +DATE := @DATE@ +FIND := @FIND@ +GREP := @GREP@ +INSTALL := @INSTALL@ +MKDIR := $(LLVM_SRC_ROOT)/autoconf/mkinstalldirs +MV := @MV@ +RANLIB := @RANLIB@ +RM := @RM@ +SED := @SED@ +TAR := @TAR@ +PYTHON := @PYTHON@ + +# Paths to miscellaneous programs we hope are present but might not be +BZIP2 := @BZIP2@ +CAT := @CAT@ +DOT := @DOT@ +DOXYGEN := @DOXYGEN@ +GROFF := @GROFF@ +GZIPBIN := @GZIPBIN@ +OCAMLC := @OCAMLC@ +OCAMLOPT := @OCAMLOPT@ +OCAMLDEP := @OCAMLDEP@ +OCAMLDOC := @OCAMLDOC@ +GAS := @GAS@ +POD2HTML := @POD2HTML@ +POD2MAN := @POD2MAN@ +PDFROFF := @PDFROFF@ +ZIP := @ZIP@ + +HAVE_PTHREAD := @HAVE_PTHREAD@ + +LIBS := @LIBS@ + +# Targets that we should build +TARGETS_TO_BUILD=@TARGETS_TO_BUILD@ + +# Path to directory where object files should be stored during a build. +# Set OBJ_ROOT to "." if you do not want to use a separate place for +# object files. +OBJ_ROOT := . + +# What to pass as rpath flag to g++ +RPATH := @RPATH@ + +# What to pass as -rdynamic flag to g++ +RDYNAMIC := @RDYNAMIC@ + +# These are options that can either be enabled here, or can be enabled on the +# make command line (ie, make ENABLE_PROFILING=1): + +# When ENABLE_LIBCPP is enabled, LLVM uses libc++ by default to build. +#ENABLE_LIBCPP = 0 +ENABLE_LIBCPP = @ENABLE_LIBCPP@ + +# When ENABLE_CXX11 is enabled, LLVM uses c++11 mode by default to build. +ENABLE_CXX11 = @ENABLE_CXX11@ + +# When ENABLE_SPLIT_DWARF is enabled, LLVM uses -gfission to build in debug mode. +ENABLE_SPLIT_DWARF = @ENABLE_SPLIT_DWARF@ + +# When ENABLE_CLANG_ARCMT is enabled, clang will have ARCMigrationTool. +ENABLE_CLANG_ARCMT = @ENABLE_CLANG_ARCMT@ + +# When ENABLE_CLANG_REWRITER is enabled, clang will have Rewriter. +ENABLE_CLANG_REWRITER = @ENABLE_CLANG_REWRITER@ + +# When ENABLE_CLANG_STATIC_ANALYZER is enabled, clang will have StaticAnalyzer. +ENABLE_CLANG_STATIC_ANALYZER = @ENABLE_CLANG_STATIC_ANALYZER@ + +# When ENABLE_WERROR is enabled, we'll pass -Werror on the command line +ENABLE_WERROR = @ENABLE_WERROR@ + +# When ENABLE_OPTIMIZED is enabled, LLVM code is optimized and output is put +# into the "Release" directories. Otherwise, LLVM code is not optimized and +# output is put in the "Debug" directories. +#ENABLE_OPTIMIZED = 1 +@ENABLE_OPTIMIZED@ + +# When ENABLE_PROFILING is enabled, profile instrumentation is done +# and output is put into the "+Profile" directories, where +# is either Debug or Release depending on how other build +# flags are set. Otherwise, output is put in the +# directories. +#ENABLE_PROFILING = 1 +@ENABLE_PROFILING@ + +# When DISABLE_ASSERTIONS is enabled, builds of all of the LLVM code will +# exclude assertion checks, otherwise they are included. +#DISABLE_ASSERTIONS = 1 +@DISABLE_ASSERTIONS@ + +# When ENABLE_EXPENSIVE_CHECKS is enabled, builds of all of the LLVM +# code will include expensive checks, otherwise they are excluded. +#ENABLE_EXPENSIVE_CHECKS = 0 +@ENABLE_EXPENSIVE_CHECKS@ + +# When DEBUG_RUNTIME is enabled, the runtime libraries will retain debug +# symbols. +#DEBUG_RUNTIME = 1 +@DEBUG_RUNTIME@ + +# When DEBUG_SYMBOLS is enabled, the compiler libraries will retain debug +# symbols. +#DEBUG_SYMBOLS = 1 +@DEBUG_SYMBOLS@ + +# When KEEP_SYMBOLS is enabled, installed executables will never have their +# symbols stripped. +#KEEP_SYMBOLS = 1 +@KEEP_SYMBOLS@ + +# The compiler flags to use for optimized builds. +OPTIMIZE_OPTION := @OPTIMIZE_OPTION@ + +# When ENABLE_PROFILING is enabled, the llvm source base is built with profile +# information to allow gprof to be used to get execution frequencies. +#ENABLE_PROFILING = 1 + +# When ENABLE_DOCS is disabled, docs/ will not be built. +ENABLE_DOCS = @ENABLE_DOCS@ + +# When ENABLE_DOXYGEN is enabled, the doxygen documentation will be built +ENABLE_DOXYGEN = @ENABLE_DOXYGEN@ + +# Do we want to enable threads? +ENABLE_THREADS := @LLVM_ENABLE_THREADS@ + +# Do we want to enable zlib? +ENABLE_ZLIB := @LLVM_ENABLE_ZLIB@ + +# Do we want to build with position independent code? +ENABLE_PIC := @ENABLE_PIC@ + +# Do we want to build a shared library and link the tools with it? +ENABLE_SHARED := @ENABLE_SHARED@ + +# Do we want to link the stdc++ into a shared library? (Cygming) +ENABLE_EMBED_STDCXX := @ENABLE_EMBED_STDCXX@ + +# Use -fvisibility-inlines-hidden? +ENABLE_VISIBILITY_INLINES_HIDDEN := @ENABLE_VISIBILITY_INLINES_HIDDEN@ + +# Do we want to allow timestamping information into builds? +ENABLE_TIMESTAMPS := @ENABLE_TIMESTAMPS@ + +# This option tells the Makefiles to produce verbose output. +# It essentially prints the commands that make is executing +#VERBOSE = 1 + +# Enable JIT for this platform +TARGET_HAS_JIT = @TARGET_HAS_JIT@ + +# Environment variable to set to change the runtime shared library search path. +SHLIBPATH_VAR = @SHLIBPATH_VAR@ + +# Shared library extension for host platform. +SHLIBEXT = @SHLIBEXT@ + +# Executable file extension for host platform. +EXEEXT = @EXEEXT@ + +# Things we just assume are "there" +ECHO := echo + +# Get the options for causing archives to link all their content instead of +# just missing symbols, and the inverse of that. This is used for certain LLVM +# tools that permit loadable modules. It ensures that the LLVM symbols will be +# available to those loadable modules. +LINKALL := @LINKALL@ +NOLINKALL := @NOLINKALL@ + +# Get the value of HUGE_VAL_SANITY which will be either "yes" or "no" depending +# on the check. +HUGE_VAL_SANITY = @HUGE_VAL_SANITY@ + +# Bindings that we should build +BINDINGS_TO_BUILD := @BINDINGS_TO_BUILD@ +ALL_BINDINGS := @ALL_BINDINGS@ +OCAML_LIBDIR := @OCAML_LIBDIR@ + +# When compiling under Mingw/Cygwin, executables such as tblgen +# expect Windows paths, whereas the build system uses Unix paths. +# The function SYSPATH transforms Unix paths into Windows paths. +ifneq (,$(findstring -mno-cygwin, $(CXX))) + SYSPATH = $(shell echo $(1) | cygpath -m -f -) +else + SYSPATH = $(1) +endif + +# Location of the plugin header file for gold. +BINUTILS_INCDIR := @BINUTILS_INCDIR@ + +# Optional flags supported by the compiler +# -Wno-missing-field-initializers +NO_MISSING_FIELD_INITIALIZERS = @NO_MISSING_FIELD_INITIALIZERS@ +# -Wno-variadic-macros +NO_VARIADIC_MACROS = @NO_VARIADIC_MACROS@ +# -Wcovered-switch-default +COVERED_SWITCH_DEFAULT = @COVERED_SWITCH_DEFAULT@ +# -Wno-uninitialized +NO_UNINITIALIZED = @NO_UNINITIALIZED@ +# -Wno-maybe-uninitialized +NO_MAYBE_UNINITIALIZED = @NO_MAYBE_UNINITIALIZED@ + +# Was polly found in tools/polly? +LLVM_HAS_POLLY = @LLVM_HAS_POLLY@ +# Flags supported by the linker. +# bfd ld / gold --version-script=file +HAVE_LINK_VERSION_SCRIPT = @HAVE_LINK_VERSION_SCRIPT@ + +# Flags to control using libxml2 +LIBXML2_LIBS := @LIBXML2_LIBS@ +LIBXML2_INC := @LIBXML2_INC@ + +# Flags to control building support for Intel JIT Events API +USE_INTEL_JITEVENTS := @USE_INTEL_JITEVENTS@ +INTEL_JITEVENTS_INCDIR := @INTEL_JITEVENTS_INCDIR@ +INTEL_JITEVENTS_LIBDIR := @INTEL_JITEVENTS_LIBDIR@ + +# Flags to control building support for OProfile JIT API +USE_OPROFILE := @USE_OPROFILE@ + +ifeq ($(USE_INTEL_JITEVENTS), 1) + OPTIONAL_COMPONENTS += IntelJITEvents +endif +ifeq ($(USE_OPROFILE), 1) + OPTIONAL_COMPONENTS += OProfileJIT +endif diff --git a/Makefile.rules b/Makefile.rules new file mode 100644 index 00000000..210abdaf --- /dev/null +++ b/Makefile.rules @@ -0,0 +1,2122 @@ +#===-- Makefile.rules - Common make rules for LLVM ---------*- Makefile -*--===# +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# +# +# This file is included by all of the LLVM makefiles. For details on how to use +# it properly, please see the document MakefileGuide.html in the docs directory. +# +#===-----------------------------------------------------------------------====# + +################################################################################ +# TARGETS: Define standard targets that can be invoked +################################################################################ + +#-------------------------------------------------------------------- +# Define the various target sets +#-------------------------------------------------------------------- +RecursiveTargets := all clean clean-all install uninstall install-bytecode \ + unitcheck +LocalTargets := all-local clean-local clean-all-local check-local \ + install-local printvars uninstall-local \ + install-bytecode-local +TopLevelTargets := check dist dist-check dist-clean dist-gzip dist-bzip2 \ + dist-zip unittests +UserTargets := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets) +InternalTargets := preconditions distdir dist-hook + +################################################################################ +# INITIALIZATION: Basic things the makefile needs +################################################################################ + +#-------------------------------------------------------------------- +# Set the VPATH so that we can find source files. +#-------------------------------------------------------------------- +VPATH=$(PROJ_SRC_DIR) + +#-------------------------------------------------------------------- +# Reset the list of suffixes we know how to build. +#-------------------------------------------------------------------- +.SUFFIXES: +.SUFFIXES: .c .cpp .cc .h .hpp .o .a .td .ps .dot .m .mm +.SUFFIXES: $(SHLIBEXT) $(SUFFIXES) + +#-------------------------------------------------------------------- +# Mark all of these targets as phony to avoid implicit rule search +#-------------------------------------------------------------------- +.PHONY: $(UserTargets) $(InternalTargets) + +#-------------------------------------------------------------------- +# Make sure all the user-target rules are double colon rules and +# they are defined first. +#-------------------------------------------------------------------- + +$(UserTargets):: + +#------------------------------------------------------------------------ +# LLVMBuild Integration +#------------------------------------------------------------------------ +# +# We use llvm-build to generate all the data required by the Makefile based +# build system in one swoop: +# +# - We generate a file (a Makefile fragment) in the object root which contains +# all the definitions that are required by Makefiles across the entire +# project. +# +# - We generate the library table used by llvm-config. +# +# - We generate the dependencies for the Makefile fragment, so that we will +# automatically reconfigure outselves. + +# The path to the llvm-build tool itself. +LLVMBuildTool := $(PROJ_SRC_ROOT)/utils/llvm-build/llvm-build + +# The files we are going to generate using llvm-build. +LLVMBuildMakeFrag := $(PROJ_OBJ_ROOT)/Makefile.llvmbuild +LLVMConfigLibraryDependenciesInc := \ + $(PROJ_OBJ_ROOT)/tools/llvm-config/LibraryDependencies.inc + +# This is for temporary backwards compatibility. +ifndef TARGET_NATIVE_ARCH +TARGET_NATIVE_ARCH := $(ARCH) +endif + +# The rule to create the LLVMBuild Makefile fragment as well as the llvm-config +# library table. +# +# Note that this target gets its real dependencies generated for us by +# llvm-build. +# +# We include a dependency on this Makefile to ensure that changes to the +# generation command get picked up. +$(LLVMBuildMakeFrag): $(PROJ_SRC_ROOT)/Makefile.rules \ + $(PROJ_OBJ_ROOT)/Makefile.config + $(Echo) Constructing LLVMBuild project information. + $(Verb)$(PYTHON) $(LLVMBuildTool) \ + --native-target "$(TARGET_NATIVE_ARCH)" \ + --enable-targets "$(TARGETS_TO_BUILD)" \ + --enable-optional-components "$(OPTIONAL_COMPONENTS)" \ + --write-library-table $(LLVMConfigLibraryDependenciesInc) \ + --write-make-fragment $(LLVMBuildMakeFrag) + +# For completeness, let Make know how the extra files are generated. +$(LLVMConfigLibraryDependenciesInc): $(LLVMBuildMakeFrag) + +# Include the generated Makefile fragment. +# +# We currently only include the dependencies for the fragment itself if we are +# at the top-level. Otherwise, recursive invocations would ends up doing +# substantially more redundant stat'ing. +# +# This means that we won't properly regenerate things for developers used to +# building from a subdirectory, but that is always somewhat unreliable. +ifeq ($(LEVEL),.) +LLVMBUILD_INCLUDE_DEPENDENCIES := 1 + +# Clean the generated makefile fragment at the top-level. +clean-local:: + -$(Verb) $(RM) -f $(LLVMBuildMakeFrag) +endif +-include $(LLVMBuildMakeFrag) + +################################################################################ +# PRECONDITIONS: that which must be built/checked first +################################################################################ + +SrcMakefiles := $(filter %Makefile %Makefile.tests,\ + $(wildcard $(PROJ_SRC_DIR)/Makefile*)) +ObjMakefiles := $(subst $(PROJ_SRC_DIR),$(PROJ_OBJ_DIR),$(SrcMakefiles)) +ConfigureScript := $(PROJ_SRC_ROOT)/configure +ConfigStatusScript := $(PROJ_OBJ_ROOT)/config.status +MakefileConfigIn := $(strip $(wildcard $(PROJ_SRC_ROOT)/Makefile.config.in)) +MakefileCommonIn := $(strip $(wildcard $(PROJ_SRC_ROOT)/Makefile.common.in)) +MakefileConfig := $(PROJ_OBJ_ROOT)/Makefile.config +MakefileCommon := $(PROJ_OBJ_ROOT)/Makefile.common +PreConditions := $(ConfigStatusScript) $(ObjMakefiles) +ifneq ($(MakefileCommonIn),) +PreConditions += $(MakefileCommon) +endif + +ifneq ($(MakefileConfigIn),) +PreConditions += $(MakefileConfig) +endif + +preconditions: $(PreConditions) + +#------------------------------------------------------------------------ +# Make sure the BUILT_SOURCES are built first +#------------------------------------------------------------------------ +$(filter-out clean clean-local,$(UserTargets)):: $(BUILT_SOURCES) + +clean-all-local:: +ifneq ($(strip $(BUILT_SOURCES)),) + -$(Verb) $(RM) -f $(BUILT_SOURCES) +endif + +ifneq ($(PROJ_OBJ_ROOT),$(PROJ_SRC_ROOT)) +spotless: + $(Verb) if test -x config.status ; then \ + $(EchoCmd) Wiping out $(PROJ_OBJ_ROOT) ; \ + $(MKDIR) .spotless.save ; \ + $(MV) config.status .spotless.save ; \ + $(MV) mklib .spotless.save ; \ + $(MV) projects .spotless.save ; \ + $(RM) -rf * ; \ + $(MV) .spotless.save/config.status . ; \ + $(MV) .spotless.save/mklib . ; \ + $(MV) .spotless.save/projects . ; \ + $(RM) -rf .spotless.save ; \ + $(EchoCmd) Rebuilding configuration of $(PROJ_OBJ_ROOT) ; \ + $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \ + $(ConfigStatusScript) ; \ + else \ + $(EchoCmd) "make spotless" can only be run from $(PROJ_OBJ_ROOT); \ + fi +else +spotless: + $(EchoCmd) "spotless target not supported for objdir == srcdir" +endif + +$(BUILT_SOURCES) : $(ObjMakefiles) + +#------------------------------------------------------------------------ +# Make sure we're not using a stale configuration +#------------------------------------------------------------------------ +reconfigure: + $(Echo) Reconfiguring $(PROJ_OBJ_ROOT) + $(Verb) cd $(PROJ_OBJ_ROOT) && \ + $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \ + $(ConfigStatusScript) + +.PRECIOUS: $(ConfigStatusScript) +$(ConfigStatusScript): $(ConfigureScript) + $(Echo) Reconfiguring with $< + $(Verb) cd $(PROJ_OBJ_ROOT) && \ + $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \ + $(ConfigStatusScript) + +#------------------------------------------------------------------------ +# Make sure the configuration makefile is up to date +#------------------------------------------------------------------------ +ifneq ($(MakefileConfigIn),) +$(MakefileConfig): $(MakefileConfigIn) $(ConfigStatusScript) + $(Echo) Regenerating $@ + $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ConfigStatusScript) Makefile.config +endif + +ifneq ($(MakefileCommonIn),) +$(MakefileCommon): $(MakefileCommonIn) $(ConfigStatusScript) + $(Echo) Regenerating $@ + $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ConfigStatusScript) Makefile.common +endif + +#------------------------------------------------------------------------ +# If the Makefile in the source tree has been updated, copy it over into the +# build tree. But, only do this if the source and object makefiles differ +#------------------------------------------------------------------------ +ifndef PROJ_MAKEFILE +PROJ_MAKEFILE := $(PROJ_SRC_DIR)/Makefile +endif + +ifneq ($(PROJ_OBJ_DIR),$(PROJ_SRC_DIR)) + +Makefile: $(PROJ_MAKEFILE) $(ExtraMakefiles) + $(Echo) "Updating Makefile" + $(Verb) $(MKDIR) $(@D) + $(Verb) $(CP) -f $< $@ + +# Copy the Makefile.* files unless we're in the root directory which avoids +# the copying of Makefile.config.in or other things that should be explicitly +# taken care of. +$(PROJ_OBJ_DIR)/Makefile% : $(PROJ_MAKEFILE)% + @case '$?' in \ + *Makefile.rules) ;; \ + *.in) ;; \ + *) $(EchoCmd) "Updating $(@F)" ; \ + $(MKDIR) $(@D) ; \ + $(CP) -f $< $@ ;; \ + esac + +endif + +#------------------------------------------------------------------------ +# Set up the basic dependencies +#------------------------------------------------------------------------ +$(UserTargets):: $(PreConditions) + +all:: all-local +clean:: clean-local +clean-all:: clean-local clean-all-local +install:: install-local +uninstall:: uninstall-local +install-local:: all-local +install-bytecode:: install-bytecode-local + +############################################################################### +# VARIABLES: Set up various variables based on configuration data +############################################################################### + +# Variable for if this make is for a "cleaning" target +ifneq ($(strip $(filter clean clean-local dist-clean,$(MAKECMDGOALS))),) + IS_CLEANING_TARGET=1 +endif + +#-------------------------------------------------------------------- +# Variables derived from configuration we are building +#-------------------------------------------------------------------- + +CPP.Defines := +ifeq ($(ENABLE_OPTIMIZED),1) + BuildMode := Release + # Don't use -fomit-frame-pointer on Darwin or FreeBSD. + ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin Darwin DragonFly FreeBSD GNU/kFreeBSD)) + OmitFramePointer := -fomit-frame-pointer + endif + + CXX.Flags += $(OPTIMIZE_OPTION) $(OmitFramePointer) + C.Flags += $(OPTIMIZE_OPTION) $(OmitFramePointer) + LD.Flags += $(OPTIMIZE_OPTION) + ifdef DEBUG_SYMBOLS + BuildMode := $(BuildMode)+Debug + CXX.Flags += -g + C.Flags += -g + KEEP_SYMBOLS := 1 + endif +else + ifdef NO_DEBUG_SYMBOLS + BuildMode := Unoptimized + CXX.Flags += + C.Flags += + KEEP_SYMBOLS := 1 + else + BuildMode := Debug + ifeq ($(ENABLE_SPLIT_DWARF), 1) + CXX.Flags += -gsplit-dwarf + C.Flags += -gsplit-dwarf + else + CXX.Flags += -g + C.Flags += -g + endif + KEEP_SYMBOLS := 1 + endif +endif + +ifeq ($(ENABLE_LIBCPP),1) + CXX.Flags += -stdlib=libc++ + LD.Flags += -stdlib=libc++ +endif + +ifeq ($(ENABLE_CXX11),1) + CXX.Flags += -std=c++11 +endif + +ifeq ($(ENABLE_WERROR),1) + CXX.Flags += -Werror + C.Flags += -Werror +endif + +ifeq ($(ENABLE_PROFILING),1) + BuildMode := $(BuildMode)+Profile + CXX.Flags := $(filter-out -fomit-frame-pointer,$(CXX.Flags)) -pg -g + C.Flags := $(filter-out -fomit-frame-pointer,$(C.Flags)) -pg -g + LD.Flags := $(filter-out -fomit-frame-pointer,$(LD.Flags)) -pg + KEEP_SYMBOLS := 1 +endif + +ifeq ($(ENABLE_VISIBILITY_INLINES_HIDDEN),1) + CXX.Flags += -fvisibility-inlines-hidden +endif + +ifdef ENABLE_EXPENSIVE_CHECKS + # GNU libstdc++ uses RTTI if you define _GLIBCXX_DEBUG, which we did above. + # See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40160 + REQUIRES_RTTI := 1 +endif + +# IF REQUIRES_EH=1 is specified then don't disable exceptions +ifndef REQUIRES_EH + CXX.Flags += -fno-exceptions +else + # If the library requires EH, it also requires RTTI. + REQUIRES_RTTI := 1 +endif + +ifdef REQUIRES_FRAME_POINTER + CXX.Flags := $(filter-out -fomit-frame-pointer,$(CXX.Flags)) + C.Flags := $(filter-out -fomit-frame-pointer,$(C.Flags)) + LD.Flags := $(filter-out -fomit-frame-pointer,$(LD.Flags)) +endif + +# If REQUIRES_RTTI=1 is specified then don't disable run-time type id. +ifneq ($(REQUIRES_RTTI), 1) + CXX.Flags += -fno-rtti +endif + +ifeq ($(ENABLE_COVERAGE),1) + BuildMode := $(BuildMode)+Coverage + CXX.Flags += -ftest-coverage -fprofile-arcs + C.Flags += -ftest-coverage -fprofile-arcs +endif + +# If DISABLE_ASSERTIONS=1 is specified (make command line or configured), +# then disable assertions by defining the appropriate preprocessor symbols. +ifeq ($(DISABLE_ASSERTIONS),1) + CPP.Defines += -DNDEBUG +else + BuildMode := $(BuildMode)+Asserts + CPP.Defines += -D_DEBUG +endif + +# If ENABLE_EXPENSIVE_CHECKS=1 is specified (make command line or +# configured), then enable expensive checks by defining the +# appropriate preprocessor symbols. +ifeq ($(ENABLE_EXPENSIVE_CHECKS),1) + BuildMode := $(BuildMode)+Checks + CPP.Defines += -D_GLIBCXX_DEBUG -DXDEBUG +endif + +# LOADABLE_MODULE implies several other things so we force them to be +# defined/on. +ifdef LOADABLE_MODULE + SHARED_LIBRARY := 1 + LINK_LIBS_IN_SHARED := 1 +endif + +ifdef SHARED_LIBRARY + ENABLE_PIC := 1 + PIC_FLAG = "(PIC)" +endif + +ifeq ($(ENABLE_PIC),1) + ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) + # Nothing. Win32 defaults to PIC and warns when given -fPIC + else + ifeq ($(HOST_OS),Darwin) + # Common symbols not allowed in dylib files + CXX.Flags += -fno-common + C.Flags += -fno-common + else + # Linux and others; pass -fPIC + CXX.Flags += -fPIC + C.Flags += -fPIC + endif + endif +else + ifeq ($(HOST_OS),Darwin) + CXX.Flags += -mdynamic-no-pic + C.Flags += -mdynamic-no-pic + endif +endif + +# Support makefile variable to disable any kind of timestamp/non-deterministic +# info from being used in the build. +ifeq ($(ENABLE_TIMESTAMPS),1) + DOTDIR_TIMESTAMP_COMMAND := $(DATE) +else + DOTDIR_TIMESTAMP_COMMAND := echo 'Created.' +endif + +ifeq ($(HOST_OS),MingW) + # Work around PR4957 + CPP.Defines += -D__NO_CTYPE_INLINE + ifeq ($(LLVM_CROSS_COMPILING),1) + # Work around http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525016 + ifdef TOOLNAME + LD.Flags += -Wl,--allow-multiple-definition + endif + endif +endif + +CXX.Flags += -Woverloaded-virtual +CPP.BaseFlags += $(CPP.Defines) +AR.Flags := cru + +# Make Floating point IEEE compliant on Alpha. +ifeq ($(ARCH),Alpha) + CXX.Flags += -mieee + CPP.BaseFlags += -mieee +ifeq ($(ENABLE_PIC),0) + CXX.Flags += -fPIC + CPP.BaseFlags += -fPIC +endif + + LD.Flags += -Wl,--no-relax +endif + +# GNU ld/PECOFF accepts but ignores them below; +# --version-script +# --export-dynamic +# --rpath +# FIXME: autoconf should be aware of them. +ifneq (,$(filter $(HOST_OS),Cygwin MingW)) + HAVE_LINK_VERSION_SCRIPT := 0 + RPATH := + RDYNAMIC := -Wl,--export-all-symbols +endif + +#-------------------------------------------------------------------- +# Directory locations +#-------------------------------------------------------------------- +TargetMode := +ifeq ($(LLVM_CROSS_COMPILING),1) + BuildLLVMToolDir := $(LLVM_OBJ_ROOT)/BuildTools/$(BuildMode)/bin +endif + +ObjRootDir := $(PROJ_OBJ_DIR)/$(BuildMode) +ObjDir := $(ObjRootDir) +LibDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib +ToolDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/bin +ExmplDir := $(PROJ_OBJ_ROOT)/$(BuildMode)/examples +LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib +LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/bin +LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/examples + +#-------------------------------------------------------------------- +# Locations of shared libraries +#-------------------------------------------------------------------- + +SharedPrefix := lib +SharedLibDir := $(LibDir) +LLVMSharedLibDir := $(LLVMLibDir) + +# Win32.DLL prefers to be located on the "PATH" of binaries. +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) + SharedLibDir := $(ToolDir) + LLVMSharedLibDir := $(LLVMToolDir) + + ifeq ($(HOST_OS),Cygwin) + SharedPrefix := cyg + else + SharedPrefix := + endif +endif + +#-------------------------------------------------------------------- +# Full Paths To Compiled Tools and Utilities +#-------------------------------------------------------------------- +EchoCmd := $(ECHO) llvm[$(MAKELEVEL)]: +ifdef BUILD_DIRS_ONLY +EchoCmd := $(EchoCmd) "(build tools)": +endif + +Echo := @$(EchoCmd) +ifndef LLVMAS +LLVMAS := $(LLVMToolDir)/llvm-as$(EXEEXT) +endif +ifndef LLVM_TBLGEN + ifeq ($(LLVM_CROSS_COMPILING),1) + LLVM_TBLGEN := $(BuildLLVMToolDir)/llvm-tblgen$(BUILD_EXEEXT) + else + LLVM_TBLGEN := $(LLVMToolDir)/llvm-tblgen$(EXEEXT) + endif +endif +ifeq ($(LLVM_CROSS_COMPILING),1) + LLVM_CONFIG := $(BuildLLVMToolDir)/llvm-config$(BUILD_EXEEXT) +else + LLVM_CONFIG := $(LLVMToolDir)/llvm-config$(EXEEXT) +endif +ifndef LLVMDIS +LLVMDIS := $(LLVMToolDir)/llvm-dis$(EXEEXT) +endif +ifndef LLI +LLI := $(LLVMToolDir)/lli$(EXEEXT) +endif +ifndef LLC +LLC := $(LLVMToolDir)/llc$(EXEEXT) +endif +ifndef LOPT +LOPT := $(LLVMToolDir)/opt$(EXEEXT) +endif +ifndef LBUGPOINT +LBUGPOINT := $(LLVMToolDir)/bugpoint$(EXEEXT) +endif +ifndef LLVMLINK +LLVMLINK := $(LLVMToolDir)/llvm-link$(EXEEXT) +endif + +#-------------------------------------------------------------------- +# Adjust to user's request +#-------------------------------------------------------------------- + +ifeq ($(HOST_OS),Darwin) + ifdef MACOSX_DEPLOYMENT_TARGET + DARWIN_VERSION := $(MACOSX_DEPLOYMENT_TARGET) + else + DARWIN_VERSION := `sw_vers -productVersion` + endif + # Strip a number like 10.4.7 to 10.4 + DARWIN_VERSION := $(shell echo $(DARWIN_VERSION)| sed -E 's/(10.[0-9]+).*/\1/') + # Get "4" out of 10.4 for later pieces in the makefile. + DARWIN_MAJVERS := $(shell echo $(DARWIN_VERSION)| sed -E 's/10.([0-9]+).*/\1/') + + LoadableModuleOptions := -Wl,-flat_namespace -Wl,-undefined,suppress + SharedLinkOptions := -dynamiclib + ifdef DEPLOYMENT_TARGET + SharedLinkOptions += $(DEPLOYMENT_TARGET) + else + ifneq ($(ARCH),ARM) + SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION) + endif + endif +else + SharedLinkOptions=-shared +endif + +ifeq ($(TARGET_OS),Darwin) + ifdef DEPLOYMENT_TARGET + TargetCommonOpts += $(DEPLOYMENT_TARGET) + else + ifneq ($(ARCH),ARM) + TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION) + endif + endif +endif + +ifdef SHARED_LIBRARY +ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +ifneq ($(HOST_OS),Darwin) + LD.Flags += $(RPATH) -Wl,'$$ORIGIN' +endif +endif +endif + +ifdef TOOL_VERBOSE + C.Flags += -v + CXX.Flags += -v + LD.Flags += -v + VERBOSE := 1 +endif + +# Adjust settings for verbose mode +ifndef VERBOSE + Verb := @ + AR.Flags += >/dev/null 2>/dev/null + ConfigureScriptFLAGS += >$(PROJ_OBJ_DIR)/configure.out 2>&1 +else + ConfigureScriptFLAGS := +endif + +# By default, strip symbol information from executable +ifndef KEEP_SYMBOLS + Strip := $(PLATFORMSTRIPOPTS) + StripWarnMsg := "(without symbols)" + Install.StripFlag += -s +endif + +# Adjust linker flags for building an executable +ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) + ifndef TOOL_NO_EXPORTS + LD.Flags += $(RDYNAMIC) + endif + ifneq ($(HOST_OS), Darwin) + ifdef TOOLNAME + LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' + endif + else + ifneq ($(DARWIN_MAJVERS),4) + LD.Flags += $(RPATH) -Wl,@executable_path/../lib + endif + ifeq ($(RC_XBS),YES) + TempFile := $(shell mkdir -p ${OBJROOT}/dSYMs ; mktemp ${OBJROOT}/dSYMs/llvm-lto.XXXXXX) + LD.Flags += -Wl,-object_path_lto -Wl,$(TempFile) + endif + endif +endif + + +#---------------------------------------------------------- +# Options To Invoke Tools +#---------------------------------------------------------- + +ifdef EXTRA_LD_OPTIONS +LD.Flags += $(EXTRA_LD_OPTIONS) +endif + +ifndef NO_PEDANTIC +CompileCommonOpts += -pedantic -Wno-long-long +endif +CompileCommonOpts += -Wall -W -Wno-unused-parameter -Wwrite-strings \ + $(EXTRA_OPTIONS) $(COVERED_SWITCH_DEFAULT) \ + $(NO_UNINITIALIZED) $(NO_MAYBE_UNINITIALIZED) \ + $(NO_MISSING_FIELD_INITIALIZERS) +# Enable cast-qual for C++; the workaround is to use const_cast. +CXX.Flags += -Wcast-qual + +ifeq ($(HOST_OS),HP-UX) + CompileCommonOpts := -D_REENTRANT -D_HPUX_SOURCE +endif + +# If we are building a universal binary on Mac OS/X, pass extra options. This +# is useful to people that want to link the LLVM libraries into their universal +# apps. +# +# The following can be optionally specified: +# UNIVERSAL_SDK_PATH variable can be specified as a path to the SDK to use. +# For Mac OS/X 10.4 Intel machines, the traditional one is: +# UNIVERSAL_SDK_PATH=/Developer/SDKs/MacOSX10.4u.sdk/ +# UNIVERSAL_ARCH can be optionally specified to be a list of architectures +# to build for, e.g. UNIVERSAL_ARCH="i386 ppc ppc64". This defaults to +# i386/ppc only. +ifdef UNIVERSAL + ifndef UNIVERSAL_ARCH + UNIVERSAL_ARCH := i386 ppc + endif + UNIVERSAL_ARCH_OPTIONS := $(UNIVERSAL_ARCH:%=-arch %) + TargetCommonOpts += $(UNIVERSAL_ARCH_OPTIONS) + ifdef UNIVERSAL_SDK_PATH + TargetCommonOpts += -isysroot $(UNIVERSAL_SDK_PATH) + endif + + # Building universal cannot compute dependencies automatically. + DISABLE_AUTO_DEPENDENCIES=1 +else + ifeq ($(TARGET_OS),Darwin) + ifeq ($(ARCH),x86_64) + TargetCommonOpts = -m64 + else + ifeq ($(ARCH),x86) + TargetCommonOpts = -m32 + endif + endif + endif +endif + +ifeq ($(HOST_OS),SunOS) +CPP.BaseFlags += -include llvm/Support/Solaris.h +endif + +ifeq ($(HOST_OS),AuroraUX) +CPP.BaseFlags += -include llvm/Support/Solaris.h +endif # !HOST_OS - AuroraUX. + +# On Windows, SharedLibDir != LibDir. The order is important. +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) + LD.Flags += -L$(SharedLibDir) -L$(LibDir) -L$(LLVMToolDir) -L$(LLVMLibDir) +else + LD.Flags += -L$(LibDir) -L$(LLVMLibDir) +endif + +CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS +# All -I flags should go here, so that they don't confuse llvm-config. +CPP.Flags += $(sort -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \ + $(patsubst %,-I%/include,\ + $(PROJ_OBJ_ROOT) $(PROJ_SRC_ROOT) \ + $(LLVM_OBJ_ROOT) $(LLVM_SRC_ROOT))) \ + $(CPP.BaseFlags) + +ifeq ($(INCLUDE_BUILD_DIR),1) + CPP.Flags += -I$(ObjDir) +endif + +# SHOW_DIAGNOSTICS support. +ifeq ($(SHOW_DIAGNOSTICS),1) + Compile.Wrapper := env CC_LOG_DIAGNOSTICS=1 \ + CC_LOG_DIAGNOSTICS_FILE="$(LLVM_OBJ_ROOT)/$(BuildMode)/diags" +else + Compile.Wrapper := +endif + +Compile.C = $(Compile.Wrapper) \ + $(CC) $(CPP.Flags) $(C.Flags) $(CFLAGS) $(CPPFLAGS) \ + $(TargetCommonOpts) $(CompileCommonOpts) -c +Compile.CXX = $(Compile.Wrapper) \ + $(CXX) $(CPP.Flags) $(CXX.Flags) $(CXXFLAGS) $(CPPFLAGS) \ + $(TargetCommonOpts) $(CompileCommonOpts) -c +Preprocess.CXX= $(Compile.Wrapper) \ + $(CXX) $(CPP.Flags) $(TargetCommonOpts) $(CPPFLAGS) \ + $(CompileCommonOpts) $(CXX.Flags) -E +Link = $(Compile.Wrapper) \ + $(CXX) $(CXXFLAGS) $(LD.Flags) $(LDFLAGS) \ + $(TargetCommonOpts) $(Strip) + +Preprocess.C = $(CC) $(CPP.Flags) $(C.Flags) $(CPPFLAGS) \ + $(TargetCommonOpts) $(CompileCommonOpts) -E + +ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755 +ScriptInstall = $(INSTALL) -m 0755 +DataInstall = $(INSTALL) -m 0644 + +# When compiling under Mingw/Cygwin, the tblgen tool expects Windows +# paths. In this case, the SYSPATH function (defined in +# Makefile.config) transforms Unix paths into Windows paths. +TableGen.Flags= -I $(call SYSPATH, $(PROJ_SRC_DIR)) \ + -I $(call SYSPATH, $(LLVM_SRC_ROOT)/include) \ + -I $(call SYSPATH, $(PROJ_SRC_ROOT)/include) \ + -I $(call SYSPATH, $(PROJ_SRC_ROOT)/lib/Target) +LLVMTableGen = $(LLVM_TBLGEN) $(TableGen.Flags) + +Archive = $(AR) $(AR.Flags) +ifdef RANLIB +Ranlib = $(RANLIB) +else +Ranlib = ranlib +endif + +AliasTool = ln -sf + +#---------------------------------------------------------- +# Get the list of source files and compute object file +# names from them. +#---------------------------------------------------------- + +ifndef SOURCES + Sources := $(notdir $(wildcard $(PROJ_SRC_DIR)/*.cpp \ + $(PROJ_SRC_DIR)/*.cc $(PROJ_SRC_DIR)/*.c)) +else + Sources := $(SOURCES) +endif + +ifdef BUILT_SOURCES +Sources += $(filter %.cpp %.c %.cc,$(BUILT_SOURCES)) +endif + +BaseNameSources := $(sort $(basename $(Sources))) +SourceDirs := $(sort $(dir $(Sources))) + +ObjectsO := $(BaseNameSources:%=$(ObjDir)/%.o) +ObjectDirs := $(SourceDirs:%=$(ObjDir)/%) + +#---------------------------------------------------------- +# For Mingw MSYS bash and Python/w32: +# +# $(ECHOPATH) prints DOSish pathstring. +# ex) $(ECHOPATH) /include/sys/types.h +# --> C:/mingw/include/sys/types.h +# built-in "echo" does not transform path to DOSish path. +# +# FIXME: It would not be needed when MSYS's python +# were provided. +#---------------------------------------------------------- + +ifeq (-mingw32,$(findstring -mingw32,$(BUILD_TRIPLE))) + ECHOPATH := $(Verb)$(PYTHON) -u -c "import sys;print ' '.join(sys.argv[1:])" +else + ECHOPATH := $(Verb)$(ECHO) +endif + +############################################################################### +# DIRECTORIES: Handle recursive descent of directory structure +############################################################################### + +#--------------------------------------------------------- +# Provide rules to make install dirs. This must be early +# in the file so they get built before dependencies +#--------------------------------------------------------- + +$(DESTDIR)$(PROJ_bindir) $(DESTDIR)$(PROJ_libdir) $(DESTDIR)$(PROJ_includedir) $(DESTDIR)$(PROJ_etcdir):: + $(Verb) $(MKDIR) $@ + +# To create other directories, as needed, and timestamp their creation +%/.dir: + $(Verb) $(MKDIR) $* > /dev/null + $(Verb) $(DOTDIR_TIMESTAMP_COMMAND) > $@ + +.PRECIOUS: $(LibDir)/.dir $(ToolDir)/.dir $(ExmplDir)/.dir +.PRECIOUS: $(LLVMLibDir)/.dir $(LLVMToolDir)/.dir $(LLVMExmplDir)/.dir + +#--------------------------------------------------------- +# Collect the object directories (as there may be more +# than one if the source code is spread across +# subdirectories). +#--------------------------------------------------------- + +OBJECT_DIRS := $(ObjDir)/.dir $(ObjectDirs:%=%/.dir) +.PRECIOUS: $(OBJECT_DIRS) + +#--------------------------------------------------------- +# Handle the DIRS options for sequential construction +#--------------------------------------------------------- + +SubDirs := +ifdef DIRS +SubDirs += $(DIRS) + +ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) +$(RecursiveTargets):: + $(Verb) for dir in $(DIRS); do \ + if ([ ! -f $$dir/Makefile ] || \ + command test $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ); then \ + $(MKDIR) $$dir; \ + $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \ + fi; \ + ($(MAKE) -C $$dir $@ ) || exit 1; \ + done +else +$(RecursiveTargets):: + $(Verb) for dir in $(DIRS); do \ + ($(MAKE) -C $$dir $@ ) || exit 1; \ + done +endif + +endif + +#--------------------------------------------------------- +# Handle the EXPERIMENTAL_DIRS options ensuring success +# after each directory is built. +#--------------------------------------------------------- +ifdef EXPERIMENTAL_DIRS +$(RecursiveTargets):: + $(Verb) for dir in $(EXPERIMENTAL_DIRS); do \ + if ([ ! -f $$dir/Makefile ] || \ + command test $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ); then \ + $(MKDIR) $$dir; \ + $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \ + fi; \ + ($(MAKE) -C $$dir $@ ) || exit 0; \ + done +endif + +#----------------------------------------------------------- +# Handle the OPTIONAL_PARALLEL_DIRS options for optional parallel construction +#----------------------------------------------------------- +ifdef OPTIONAL_PARALLEL_DIRS + PARALLEL_DIRS += $(foreach T,$(OPTIONAL_PARALLEL_DIRS),$(shell test -d $(PROJ_SRC_DIR)/$(T) -o -f $(T)/Makefile && echo "$(T)")) +endif + +#----------------------------------------------------------- +# Handle the PARALLEL_DIRS options for parallel construction +#----------------------------------------------------------- +ifdef PARALLEL_DIRS + +SubDirs += $(PARALLEL_DIRS) + +# Unfortunately, this list must be maintained if new recursive targets are added +all :: $(addsuffix /.makeall ,$(PARALLEL_DIRS)) +clean :: $(addsuffix /.makeclean ,$(PARALLEL_DIRS)) +clean-all:: $(addsuffix /.makeclean-all,$(PARALLEL_DIRS)) +install :: $(addsuffix /.makeinstall ,$(PARALLEL_DIRS)) +uninstall:: $(addsuffix /.makeuninstall,$(PARALLEL_DIRS)) +install-bytecode :: $(addsuffix /.makeinstall-bytecode,$(PARALLEL_DIRS)) +unitcheck:: $(addsuffix /.makeunitcheck,$(PARALLEL_DIRS)) + +ParallelTargets := $(foreach T,$(RecursiveTargets),%/.make$(T)) + +$(ParallelTargets) : + $(Verb) \ + SD=$(PROJ_SRC_DIR)/$(@D); \ + DD=$(@D); \ + if [ ! -f $$SD/Makefile ]; then \ + SD=$(@D); \ + DD=$(notdir $(@D)); \ + fi; \ + if ([ ! -f $$DD/Makefile ] || \ + command test $$DD/Makefile -ot \ + $$SD/Makefile ); then \ + $(MKDIR) $$DD; \ + $(CP) $$SD/Makefile $$DD/Makefile; \ + fi; \ + $(MAKE) -C $$DD $(subst $(@D)/.make,,$@) +endif + +#--------------------------------------------------------- +# Handle the OPTIONAL_DIRS options for directores that may +# or may not exist. +#--------------------------------------------------------- +ifdef OPTIONAL_DIRS + +SubDirs += $(OPTIONAL_DIRS) + +ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) +$(RecursiveTargets):: + $(Verb) for dir in $(OPTIONAL_DIRS); do \ + if [ -d $(PROJ_SRC_DIR)/$$dir ]; then\ + if ([ ! -f $$dir/Makefile ] || \ + command test $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ); then \ + $(MKDIR) $$dir; \ + $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \ + fi; \ + ($(MAKE) -C$$dir $@ ) || exit 1; \ + fi \ + done +else +$(RecursiveTargets):: + $(Verb) for dir in $(OPTIONAL_DIRS); do \ + if [ -d $(PROJ_SRC_DIR)/$$dir ]; then\ + ($(MAKE) -C$$dir $@ ) || exit 1; \ + fi \ + done +endif +endif + +#--------------------------------------------------------- +# Handle the CONFIG_FILES options +#--------------------------------------------------------- +ifdef CONFIG_FILES + +ifdef NO_INSTALL +install-local:: + $(Echo) Install circumvented with NO_INSTALL +uninstall-local:: + $(Echo) UnInstall circumvented with NO_INSTALL +else +install-local:: $(DESTDIR)$(PROJ_etcdir) $(CONFIG_FILES) + $(Echo) Installing Configuration Files To $(DESTDIR)$(PROJ_etcdir) + $(Verb)for file in $(CONFIG_FILES); do \ + if test -f $(PROJ_OBJ_DIR)/$${file} ; then \ + $(DataInstall) $(PROJ_OBJ_DIR)/$${file} $(DESTDIR)$(PROJ_etcdir) ; \ + elif test -f $(PROJ_SRC_DIR)/$${file} ; then \ + $(DataInstall) $(PROJ_SRC_DIR)/$${file} $(DESTDIR)$(PROJ_etcdir) ; \ + else \ + $(ECHO) Error: cannot find config file $${file}. ; \ + fi \ + done + +uninstall-local:: + $(Echo) Uninstalling Configuration Files From $(DESTDIR)$(PROJ_etcdir) + $(Verb)for file in $(CONFIG_FILES); do \ + $(RM) -f $(DESTDIR)$(PROJ_etcdir)/$${file} ; \ + done +endif + +endif + +############################################################################### +# Set up variables for building libraries +############################################################################### + +#--------------------------------------------------------- +# Define various command line options pertaining to the +# libraries needed when linking. There are "Proj" libs +# (defined by the user's project) and "LLVM" libs (defined +# by the LLVM project). +#--------------------------------------------------------- + +ifdef USEDLIBS +ProjLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(USEDLIBS))) +ProjLibsOptions := $(patsubst %.o, $(LibDir)/%.o, $(ProjLibsOptions)) +ProjUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(USEDLIBS))) +ProjLibsPaths := $(addprefix $(LibDir)/,$(ProjUsedLibs)) +endif + +ifdef LLVMLIBS +LLVMLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(LLVMLIBS))) +LLVMLibsOptions := $(patsubst %.o, $(LLVMLibDir)/%.o, $(LLVMLibsOptions)) +LLVMUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(LLVMLIBS))) +LLVMLibsPaths := $(addprefix $(LLVMLibDir)/,$(LLVMUsedLibs)) +endif + +# Loadable module for Win32 requires all symbols resolved for linking. +# Then all symbols in LLVM.dll will be available. +ifeq ($(ENABLE_SHARED),1) + ifdef LOADABLE_MODULE + ifneq (,$(filter $(HOST_OS),Cygwin MingW)) + LINK_COMPONENTS += all + endif + endif +endif + +ifndef IS_CLEANING_TARGET +ifdef LINK_COMPONENTS + +# If LLVM_CONFIG doesn't exist, build it. This can happen if you do a make +# clean in tools, then do a make in tools (instead of at the top level). +$(LLVM_CONFIG): + @echo "*** llvm-config doesn't exist - rebuilding it." + @$(MAKE) -C $(PROJ_OBJ_ROOT)/tools/llvm-config + +$(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT): $(LLVM_CONFIG) + +ifeq ($(ENABLE_SHARED), 1) +# We can take the "auto-import" feature to get rid of using dllimport. +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +LLVMLibsOptions += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc \ + -L $(SharedLibDir) +endif +LLVMLibsOptions += -lLLVM-$(LLVMVersion) +LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)LLVM-$(LLVMVersion)$(SHLIBEXT) +else + +ifndef NO_LLVM_CONFIG +LLVMConfigLibs := $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS) || echo Error) +ifeq ($(LLVMConfigLibs),Error) +$(error llvm-config --libs failed) +endif +LLVMLibsOptions += $(LLVMConfigLibs) +LLVMConfigLibfiles := $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS) || echo Error) +ifeq ($(LLVMConfigLibfiles),Error) +$(error llvm-config --libfiles failed) +endif +LLVMLibsPaths += $(LLVM_CONFIG) $(LLVMConfigLibfiles) +endif + +endif +endif +endif + +# Set up the library exports file. +ifdef EXPORTED_SYMBOL_FILE + +# First, set up the native export file, which may differ from the source +# export file. + +ifeq ($(HOST_OS),Darwin) +# Darwin convention prefixes symbols with underscores. +NativeExportsFile := $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE)).sed +$(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir + $(Verb) sed -e 's/^/_/' < $< > $@ +clean-local:: + -$(Verb) $(RM) -f $(NativeExportsFile) +else +ifeq ($(HAVE_LINK_VERSION_SCRIPT),1) +# Gold and BFD ld require a version script rather than a plain list. +NativeExportsFile := $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE)).map +$(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir + $(Verb) echo "{" > $@ + $(Verb) grep -q '[[:alnum:]_]' $< && echo " global:" >> $@ || : + $(Verb) sed -e 's/$$/;/' -e 's/^/ /' < $< >> $@ +ifneq ($(HOST_OS),OpenBSD) + $(Verb) echo " local: *;" >> $@ +endif + $(Verb) echo "};" >> $@ +clean-local:: + -$(Verb) $(RM) -f $(NativeExportsFile) +else +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +# GNU ld Win32 accepts .DEF files that contain "DATA" entries. +NativeExportsFile := $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE:.exports=.def)) +$(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir + $(Echo) Generating $(notdir $@) + $(Verb) $(ECHO) "EXPORTS" > $@ + $(Verb) $(CAT) $< >> $@ +clean-local:: + -$(Verb) $(RM) -f $(NativeExportsFile) +else +# Default behavior: just use the exports file verbatim. +NativeExportsFile := $(EXPORTED_SYMBOL_FILE) +endif +endif +endif + +# Now add the linker command-line options to use the native export file. + +# Darwin +ifeq ($(HOST_OS),Darwin) +LLVMLibsOptions += -Wl,-exported_symbols_list,$(NativeExportsFile) +endif + +# gold, bfd ld, etc. +ifeq ($(HAVE_LINK_VERSION_SCRIPT),1) +LLVMLibsOptions += -Wl,--version-script,$(NativeExportsFile) +endif + +# Windows +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +# LLVMLibsOptions is invalidated at processing tools/llvm-shlib. +SharedLinkOptions += $(NativeExportsFile) +endif + +endif + +############################################################################### +# Library Build Rules: Four ways to build a library +############################################################################### + +# if we're building a library ... +ifdef LIBRARYNAME + +# Make sure there isn't any extraneous whitespace on the LIBRARYNAME option +LIBRARYNAME := $(strip $(LIBRARYNAME)) +LIBRARYALIASNAME := $(strip $(LIBRARYALIASNAME)) +ifdef LOADABLE_MODULE +BaseLibName.A := $(LIBRARYNAME).a +BaseLibName.SO := $(LIBRARYNAME)$(SHLIBEXT) +BaseAliasName.SO := $(LIBRARYALIASNAME)$(SHLIBEXT) +else +BaseLibName.A := lib$(LIBRARYNAME).a +BaseLibName.SO := $(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT) +BaseAliasName.SO := $(SharedPrefix)$(LIBRARYALIASNAME)$(SHLIBEXT) +endif +LibName.A := $(LibDir)/$(BaseLibName.A) +LibName.SO := $(SharedLibDir)/$(BaseLibName.SO) +AliasName.SO := $(SharedLibDir)/$(BaseAliasName.SO) +LibName.O := $(LibDir)/$(LIBRARYNAME).o + +#--------------------------------------------------------- +# Shared Library Targets: +# If the user asked for a shared library to be built +# with the SHARED_LIBRARY variable, then we provide +# targets for building them. +#--------------------------------------------------------- +ifdef SHARED_LIBRARY + +all-local:: $(LibName.SO) + +ifdef EXPORTED_SYMBOL_FILE +$(LibName.SO): $(NativeExportsFile) +endif + +ifdef LINK_LIBS_IN_SHARED +ifdef LOADABLE_MODULE +SharedLibKindMessage := "Loadable Module" +SharedLinkOptions := $(LoadableModuleOptions) $(SharedLinkOptions) +else +SharedLibKindMessage := "Shared Library" +endif +$(LibName.SO): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) $(SharedLibDir)/.dir + $(Echo) Linking $(BuildMode) $(SharedLibKindMessage) \ + $(notdir $@) + $(Verb) $(Link) $(SharedLinkOptions) -o $@ $(ObjectsO) \ + $(ProjLibsOptions) $(LLVMLibsOptions) $(LIBS) +else +$(LibName.SO): $(ObjectsO) $(SharedLibDir)/.dir + $(Echo) Linking $(BuildMode) Shared Library $(notdir $@) + $(Verb) $(Link) $(SharedLinkOptions) -o $@ $(ObjectsO) +endif + +clean-local:: +ifneq ($(strip $(LibName.SO)),) + -$(Verb) $(RM) -f $(LibName.SO) +endif + +ifdef NO_INSTALL +install-local:: + $(Echo) Install circumvented with NO_INSTALL +uninstall-local:: + $(Echo) Uninstall circumvented with NO_INSTALL +else + +# Win32.DLL prefers to be located on the "PATH" of binaries. +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +DestSharedLibDir := $(DESTDIR)$(PROJ_bindir) +else +DestSharedLibDir := $(DESTDIR)$(PROJ_libdir) +endif +DestSharedLib := $(DestSharedLibDir)/$(BaseLibName.SO) +DestSharedAlias := $(DestSharedLibDir)/$(BaseAliasName.SO) + +install-local:: $(DestSharedLib) + +$(DestSharedLib): $(LibName.SO) $(DestSharedLibDir) + $(Echo) Installing $(BuildMode) Shared Library $(DestSharedLib) + $(Verb) $(INSTALL) $(LibName.SO) $(DestSharedLib) +ifdef SHARED_ALIAS + $(Echo) Creating alias from $(DestSharedLib) to $(DestSharedAlias) + $(Verb) $(AliasTool) $(DestSharedLib) $(DestSharedAlias) +endif + +uninstall-local:: + $(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib) + -$(Verb) $(RM) -f $(DestSharedLib) +endif +endif + +#--------------------------------------------------------- +# Library Targets: +# If neither BUILD_ARCHIVE or LOADABLE_MODULE are specified, default to +# building an archive. +#--------------------------------------------------------- +ifndef NO_BUILD_ARCHIVE +ifndef BUILD_ARCHIVE +ifndef LOADABLE_MODULE +BUILD_ARCHIVE = 1 +endif +endif +endif + +#--------------------------------------------------------- +# Archive Library Targets: +# If the user wanted a regular archive library built, +# then we provide targets for building them. +#--------------------------------------------------------- +ifdef BUILD_ARCHIVE + +all-local:: $(LibName.A) + +$(LibName.A): $(ObjectsO) $(LibDir)/.dir + $(Echo) Building $(BuildMode) Archive Library $(notdir $@) + -$(Verb) $(RM) -f $@ + $(Verb) $(Archive) $@ $(ObjectsO) + $(Verb) $(Ranlib) $@ + +clean-local:: +ifneq ($(strip $(LibName.A)),) + -$(Verb) $(RM) -f $(LibName.A) +endif + +ifdef NO_INSTALL +install-local:: + $(Echo) Install circumvented with NO_INSTALL +uninstall-local:: + $(Echo) Uninstall circumvented with NO_INSTALL +else +ifdef NO_INSTALL_ARCHIVES +install-local:: + $(Echo) Install circumvented with NO_INSTALL +uninstall-local:: + $(Echo) Uninstall circumvented with NO_INSTALL +else +DestArchiveLib := $(DESTDIR)$(PROJ_libdir)/lib$(LIBRARYNAME).a + +install-local:: $(DestArchiveLib) + +$(DestArchiveLib): $(LibName.A) $(DESTDIR)$(PROJ_libdir) + $(Echo) Installing $(BuildMode) Archive Library $(DestArchiveLib) + $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_libdir) + $(Verb) $(INSTALL) $(LibName.A) $(DestArchiveLib) + +uninstall-local:: + $(Echo) Uninstalling $(BuildMode) Archive Library $(DestArchiveLib) + -$(Verb) $(RM) -f $(DestArchiveLib) +endif +endif +endif + +# endif LIBRARYNAME +endif + +############################################################################### +# Tool Build Rules: Build executable tool based on TOOLNAME option +############################################################################### + +ifdef TOOLNAME + +#--------------------------------------------------------- +# Set up variables for building a tool. +#--------------------------------------------------------- +TOOLEXENAME := $(strip $(TOOLNAME))$(EXEEXT) +ifdef EXAMPLE_TOOL +ToolBuildPath := $(ExmplDir)/$(TOOLEXENAME) +else +ToolBuildPath := $(ToolDir)/$(TOOLEXENAME) +endif + +# TOOLALIAS is a name to symlink (or copy) the tool to. +ifdef TOOLALIAS +ifdef EXAMPLE_TOOL +ToolAliasBuildPath := $(ExmplDir)/$(strip $(TOOLALIAS))$(EXEEXT) +else +ToolAliasBuildPath := $(ToolDir)/$(strip $(TOOLALIAS))$(EXEEXT) +endif +endif + +#--------------------------------------------------------- +# Prune Exports +#--------------------------------------------------------- + +# If the tool opts in with TOOL_NO_EXPORTS, optimize startup time of the app by +# not exporting all of the weak symbols from the binary. This reduces dyld +# startup time by 4x on darwin in some cases. +ifdef TOOL_NO_EXPORTS +ifeq ($(HOST_OS),Darwin) + +# Tiger tools don't support this. +ifneq ($(DARWIN_MAJVERS),4) +LD.Flags += -Wl,-exported_symbol,_main +endif +endif + +ifeq ($(HOST_OS), $(filter $(HOST_OS), DragonFly Linux NetBSD FreeBSD GNU/kFreeBSD GNU)) +ifneq ($(ARCH), Mips) + LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map +endif +endif +endif + +#--------------------------------------------------------- +# Tool Order File Support +#--------------------------------------------------------- + +ifeq ($(HOST_OS),Darwin) +ifdef TOOL_ORDER_FILE + +LD.Flags += -Wl,-order_file,$(TOOL_ORDER_FILE) + +endif +endif + +#--------------------------------------------------------- +# Tool Version Info Support +#--------------------------------------------------------- + +ifeq ($(HOST_OS),Darwin) +ifdef TOOL_INFO_PLIST + +LD.Flags += -Wl,-sectcreate,__TEXT,__info_plist,$(ObjDir)/$(TOOL_INFO_PLIST) + +$(ToolBuildPath): $(ObjDir)/$(TOOL_INFO_PLIST) + +$(ObjDir)/$(TOOL_INFO_PLIST): $(PROJ_SRC_DIR)/$(TOOL_INFO_PLIST).in $(ObjDir)/.dir + $(Echo) "Creating $(TOOLNAME) '$(TOOL_INFO_PLIST)' file..." + $(Verb)sed -e "s#@TOOL_INFO_UTI@#$(TOOL_INFO_UTI)#g" \ + -e "s#@TOOL_INFO_NAME@#$(TOOL_INFO_NAME)#g" \ + -e "s#@TOOL_INFO_VERSION@#$(TOOL_INFO_VERSION)#g" \ + -e "s#@TOOL_INFO_BUILD_VERSION@#$(TOOL_INFO_BUILD_VERSION)#g" \ + $< > $@ + +endif +endif + +#--------------------------------------------------------- +# Provide targets for building the tools +#--------------------------------------------------------- +all-local:: $(ToolBuildPath) $(ToolAliasBuildPath) + +clean-local:: +ifneq ($(strip $(ToolBuildPath)),) + -$(Verb) $(RM) -f $(ToolBuildPath) +endif +ifneq ($(strip $(ToolAliasBuildPath)),) + -$(Verb) $(RM) -f $(ToolAliasBuildPath) +endif + +ifdef EXAMPLE_TOOL +$(ToolBuildPath): $(ExmplDir)/.dir +else +$(ToolBuildPath): $(ToolDir)/.dir +endif + +ifdef CODESIGN_TOOLS +TOOL_CODESIGN_IDENTITY ?= - + +$(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) + $(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg) + $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \ + $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS) + $(Echo) ======= Finished Linking $(BuildMode) Executable $(TOOLNAME) \ + $(StripWarnMsg) + $(Echo) ======= Code-Signing $(BuildMode) Executable $(TOOLNAME) + $(Verb) codesign -s $(TOOL_CODESIGN_IDENTITY) $@ +else +$(ToolBuildPath): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) + $(Echo) Linking $(BuildMode) executable $(TOOLNAME) $(StripWarnMsg) + $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \ + $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) $(LIBS) + $(Echo) ======= Finished Linking $(BuildMode) Executable $(TOOLNAME) \ + $(StripWarnMsg) +endif + +ifneq ($(strip $(ToolAliasBuildPath)),) +$(ToolAliasBuildPath): $(ToolBuildPath) + $(Echo) Creating $(BuildMode) Alias $(TOOLALIAS) $(StripWarnMsg) + $(Verb) $(RM) -f $(ToolAliasBuildPath) + $(Verb) $(AliasTool) $(notdir $(ToolBuildPath)) $(ToolAliasBuildPath) + $(Echo) ======= Finished Creating $(BuildMode) Alias $(TOOLALIAS) \ + $(StripWarnMsg) +endif + +ifdef NO_INSTALL +install-local:: + $(Echo) Install circumvented with NO_INSTALL +uninstall-local:: + $(Echo) Uninstall circumvented with NO_INSTALL +else + +ifdef INTERNAL_TOOL +ToolBinDir = $(DESTDIR)$(PROJ_internal_prefix)/bin +else +ToolBinDir = $(DESTDIR)$(PROJ_bindir) +endif +DestTool = $(ToolBinDir)/$(program_prefix)$(TOOLEXENAME) + +install-local:: $(DestTool) + +$(DestTool): $(ToolBuildPath) + $(Echo) Installing $(BuildMode) $(DestTool) + $(Verb) $(MKDIR) $(ToolBinDir) + $(Verb) $(ProgInstall) $(ToolBuildPath) $(DestTool) + +uninstall-local:: + $(Echo) Uninstalling $(BuildMode) $(DestTool) + -$(Verb) $(RM) -f $(DestTool) + +# TOOLALIAS install. +ifdef TOOLALIAS +DestToolAlias = $(ToolBinDir)/$(program_prefix)$(TOOLALIAS)$(EXEEXT) + +install-local:: $(DestToolAlias) + +$(DestToolAlias): $(DestTool) + $(Echo) Installing $(BuildMode) $(DestToolAlias) + $(Verb) $(RM) -f $(DestToolAlias) + $(Verb) $(AliasTool) $(notdir $(DestTool)) $(DestToolAlias) + +uninstall-local:: + $(Echo) Uninstalling $(BuildMode) $(DestToolAlias) + -$(Verb) $(RM) -f $(DestToolAlias) +endif + +endif +endif + +############################################################################### +# Object Build Rules: Build object files based on sources +############################################################################### + +# FIXME: This should be checking for "if not GCC or ICC", not for "if HP-UX" +ifeq ($(HOST_OS),HP-UX) + DISABLE_AUTO_DEPENDENCIES=1 +endif + +COMPILE_DEPS = $(OBJECT_DIRS) $(BUILT_SOURCES) $(PROJ_MAKEFILE) + +# Provide rule sets for when dependency generation is enabled +ifndef DISABLE_AUTO_DEPENDENCIES + +#--------------------------------------------------------- +# Create .o files in the ObjDir directory from the .cpp and .c files... +#--------------------------------------------------------- + +DEPEND_OPTIONS = -MMD -MP -MF "$(ObjDir)/$*.d.tmp" \ + -MT "$(ObjDir)/$*.o" -MT "$(ObjDir)/$*.d" + +# If the build succeeded, move the dependency file over, otherwise +# remove it. +DEPEND_MOVEFILE = then $(MV) -f "$(ObjDir)/$*.d.tmp" "$(ObjDir)/$*.d"; \ + else $(RM) "$(ObjDir)/$*.d.tmp"; exit 1; fi + +$(ObjDir)/%.o: %.cpp $(COMPILE_DEPS) + $(Echo) "Compiling $*.cpp for $(BuildMode) build" $(PIC_FLAG) + $(Verb) if $(Compile.CXX) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ + $(DEPEND_MOVEFILE) + +$(ObjDir)/%.o: %.mm $(COMPILE_DEPS) + $(Echo) "Compiling $*.mm for $(BuildMode) build" $(PIC_FLAG) + $(Verb) if $(Compile.CXX) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ + $(DEPEND_MOVEFILE) + +$(ObjDir)/%.o: %.cc $(COMPILE_DEPS) + $(Echo) "Compiling $*.cc for $(BuildMode) build" $(PIC_FLAG) + $(Verb) if $(Compile.CXX) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ + $(DEPEND_MOVEFILE) + +$(ObjDir)/%.o: %.c $(COMPILE_DEPS) + $(Echo) "Compiling $*.c for $(BuildMode) build" $(PIC_FLAG) + $(Verb) if $(Compile.C) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ + $(DEPEND_MOVEFILE) + +$(ObjDir)/%.o: %.m $(COMPILE_DEPS) + $(Echo) "Compiling $*.m for $(BuildMode) build" $(PIC_FLAG) + $(Verb) if $(Compile.C) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ + $(DEPEND_MOVEFILE) + +# Provide alternate rule sets if dependencies are disabled +else + +$(ObjDir)/%.o: %.cpp $(COMPILE_DEPS) + $(Echo) "Compiling $*.cpp for $(BuildMode) build" $(PIC_FLAG) + $(Compile.CXX) $< -o $@ + +$(ObjDir)/%.o: %.mm $(COMPILE_DEPS) + $(Echo) "Compiling $*.mm for $(BuildMode) build" $(PIC_FLAG) + $(Compile.CXX) $< -o $@ + +$(ObjDir)/%.o: %.cc $(COMPILE_DEPS) + $(Echo) "Compiling $*.cc for $(BuildMode) build" $(PIC_FLAG) + $(Compile.CXX) $< -o $@ + +$(ObjDir)/%.o: %.c $(COMPILE_DEPS) + $(Echo) "Compiling $*.c for $(BuildMode) build" $(PIC_FLAG) + $(Compile.C) $< -o $@ + +$(ObjDir)/%.o: %.m $(COMPILE_DEPS) + $(Echo) "Compiling $*.m for $(BuildMode) build" $(PIC_FLAG) + $(Compile.C) $< -o $@ +endif + + +## Rules for building preprocessed (.i/.ii) outputs. +$(BuildMode)/%.ii: %.cpp $(COMPILE_DEPS) + $(Echo) "Compiling $*.cpp for $(BuildMode) build to .ii file" + $(Verb) $(Preprocess.CXX) $< -o $@ + +$(BuildMode)/%.ii: %.mm $(COMPILE_DEPS) + $(Echo) "Compiling $*.mm for $(BuildMode) build to .ii file" + $(Verb) $(Preprocess.CXX) $< -o $@ + +$(BuildMode)/%.ii: %.cc $(COMPILE_DEPS) + $(Echo) "Compiling $*.cc for $(BuildMode) build to .ii file" + $(Verb) $(Preprocess.CXX) $< -o $@ + +$(BuildMode)/%.i: %.c $(COMPILE_DEPS) + $(Echo) "Compiling $*.c for $(BuildMode) build to .i file" + $(Verb) $(Preprocess.C) $< -o $@ + +$(BuildMode)/%.i: %.m $(COMPILE_DEPS) + $(Echo) "Compiling $*.m for $(BuildMode) build to .i file" + $(Verb) $(Preprocess.C) $< -o $@ + + +$(ObjDir)/%.s: %.cpp $(COMPILE_DEPS) + $(Echo) "Compiling $*.cpp to asm for $(BuildMode) build" $(PIC_FLAG) + $(Compile.CXX) $< -o $@ -S + +$(ObjDir)/%.s: %.mm $(COMPILE_DEPS) + $(Echo) "Compiling $*.mm to asm for $(BuildMode) build" $(PIC_FLAG) + $(Compile.CXX) $< -o $@ -S + +$(ObjDir)/%.s: %.cc $(COMPILE_DEPS) + $(Echo) "Compiling $*.cc to asm for $(BuildMode) build" $(PIC_FLAG) + $(Compile.CXX) $< -o $@ -S + +$(ObjDir)/%.s: %.c $(COMPILE_DEPS) + $(Echo) "Compiling $*.c to asm for $(BuildMode) build" $(PIC_FLAG) + $(Compile.C) $< -o $@ -S + +$(ObjDir)/%.s: %.m $(COMPILE_DEPS) + $(Echo) "Compiling $*.m to asm for $(BuildMode) build" $(PIC_FLAG) + $(Compile.C) $< -o $@ -S + +############################################################################### +# TABLEGEN: Provide rules for running tblgen to produce *.inc files +############################################################################### + +ifdef TARGET +TABLEGEN_INC_FILES_COMMON = 1 +endif + +ifdef TABLEGEN_INC_FILES_COMMON + +INCFiles := $(filter %.inc,$(BUILT_SOURCES)) +INCTMPFiles := $(INCFiles:%=$(ObjDir)/%.tmp) +.PRECIOUS: $(INCTMPFiles) $(INCFiles) + +# INCFiles rule: All of the tblgen generated files are emitted to +# $(ObjDir)/%.inc.tmp, instead of emitting them directly to %.inc. This allows +# us to only "touch" the real file if the contents of it change. IOW, if +# tblgen is modified, all of the .inc.tmp files are regenerated, but no +# dependencies of the .inc files are, unless the contents of the .inc file +# changes. +$(INCFiles) : %.inc : $(ObjDir)/%.inc.tmp + $(Verb) $(CMP) -s $@ $< || $(CP) $< $@ + +endif # TABLEGEN_INC_FILES_COMMON + +ifdef TARGET + +TDFiles := $(strip $(wildcard $(PROJ_SRC_DIR)/*.td) \ + $(LLVM_SRC_ROOT)/include/llvm/Target/Target.td \ + $(LLVM_SRC_ROOT)/include/llvm/Target/TargetCallingConv.td \ + $(LLVM_SRC_ROOT)/include/llvm/Target/TargetSchedule.td \ + $(LLVM_SRC_ROOT)/include/llvm/Target/TargetSelectionDAG.td \ + $(LLVM_SRC_ROOT)/include/llvm/CodeGen/ValueTypes.td) \ + $(wildcard $(LLVM_SRC_ROOT)/include/llvm/IR/Intrinsics*.td) + +# All .inc.tmp files depend on the .td files. +$(INCTMPFiles) : $(TDFiles) + +$(TARGET:%=$(ObjDir)/%GenRegisterInfo.inc.tmp): \ +$(ObjDir)/%GenRegisterInfo.inc.tmp : %.td $(ObjDir)/.dir $(LLVM_TBLGEN) + $(Echo) "Building $( $@ +else +%.ps: %.dot + $(Echo) "Cannot build $@: The program dot is not installed" +endif + +# This rules ensures that header files that are removed still have a rule for +# which they can be "generated." This allows make to ignore them and +# reproduce the dependency lists. +%.h:: ; +%.hpp:: ; + +# Define clean-local to clean the current directory. Note that this uses a +# very conservative approach ensuring that empty variables do not cause +# errors or disastrous removal. +clean-local:: +ifneq ($(strip $(ObjRootDir)),) + -$(Verb) $(RM) -rf $(ObjRootDir) +endif +ifneq ($(strip $(SHLIBEXT)),) # Extra paranoia - make real sure SHLIBEXT is set + -$(Verb) $(RM) -f *$(SHLIBEXT) +endif + +clean-all-local:: + -$(Verb) $(RM) -rf Debug Release Profile + + +############################################################################### +# DEPENDENCIES: Include the dependency files if we should +############################################################################### +ifndef DISABLE_AUTO_DEPENDENCIES + +# If its not one of the cleaning targets +ifndef IS_CLEANING_TARGET + +# Get the list of dependency files +DependSourceFiles := $(basename $(filter %.cpp %.c %.cc %.m %.mm, $(Sources))) +DependFiles := $(DependSourceFiles:%=$(PROJ_OBJ_DIR)/$(BuildMode)/%.d) + +-include $(DependFiles) "" + +endif + +endif + +############################################################################### +# CHECK: Running the test suite +############################################################################### + +check:: all + $(Verb) if test -d "$(PROJ_OBJ_ROOT)/test" ; then \ + if test -f "$(PROJ_OBJ_ROOT)/test/Makefile" ; then \ + $(EchoCmd) Running test suite ; \ + $(MAKE) -C $(PROJ_OBJ_ROOT)/test check-local \ + TESTSUITE=$(TESTSUITE) ; \ + else \ + $(EchoCmd) No Makefile in test directory ; \ + fi ; \ + else \ + $(EchoCmd) No test directory ; \ + fi + +# An alias dating from when both lit and DejaGNU test runners were used. +check-lit:: check + +check-all:: + $(Verb) if test -d "$(PROJ_OBJ_ROOT)/test" ; then \ + if test -f "$(PROJ_OBJ_ROOT)/test/Makefile" ; then \ + $(EchoCmd) Running test suite ; \ + $(MAKE) -C $(PROJ_OBJ_ROOT)/test check-local-all ; \ + else \ + $(EchoCmd) No Makefile in test directory ; \ + fi ; \ + else \ + $(EchoCmd) No test directory ; \ + fi + +############################################################################### +# UNITTESTS: Running the unittests test suite +############################################################################### + +unittests:: + $(Verb) if test -d "$(PROJ_OBJ_ROOT)/unittests" ; then \ + if test -f "$(PROJ_OBJ_ROOT)/unittests/Makefile" ; then \ + $(EchoCmd) Running unittests test suite ; \ + $(MAKE) -C $(PROJ_OBJ_ROOT)/unittests unitcheck; \ + else \ + $(EchoCmd) No Makefile in unittests directory ; \ + fi ; \ + else \ + $(EchoCmd) No unittests directory ; \ + fi + +############################################################################### +# DISTRIBUTION: Handle construction of a distribution tarball +############################################################################### + +#------------------------------------------------------------------------ +# Define distribution related variables +#------------------------------------------------------------------------ +DistName := $(PROJECT_NAME)-$(PROJ_VERSION) +DistDir := $(PROJ_OBJ_ROOT)/$(DistName) +TopDistDir := $(PROJ_OBJ_ROOT)/$(DistName) +DistTarGZip := $(PROJ_OBJ_ROOT)/$(DistName).tar.gz +DistZip := $(PROJ_OBJ_ROOT)/$(DistName).zip +DistTarBZ2 := $(PROJ_OBJ_ROOT)/$(DistName).tar.bz2 +DistAlways := CREDITS.TXT LICENSE.TXT README.txt README AUTHORS COPYING \ + ChangeLog INSTALL NEWS Makefile Makefile.common Makefile.rules \ + Makefile.config.in configure autoconf +DistOther := $(notdir $(wildcard \ + $(PROJ_SRC_DIR)/*.h \ + $(PROJ_SRC_DIR)/*.td \ + $(PROJ_SRC_DIR)/*.def \ + $(PROJ_SRC_DIR)/*.ll \ + $(PROJ_SRC_DIR)/*.in)) +DistSubDirs := $(SubDirs) +DistSources = $(Sources) $(EXTRA_DIST) +DistFiles = $(DistAlways) $(DistSources) $(DistOther) + +#------------------------------------------------------------------------ +# We MUST build distribution with OBJ_DIR != SRC_DIR +#------------------------------------------------------------------------ +ifeq ($(PROJ_SRC_DIR),$(PROJ_OBJ_DIR)) +dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip :: + $(Echo) ERROR: Target $@ only available with OBJ_DIR != SRC_DIR + +else + +#------------------------------------------------------------------------ +# Prevent attempt to run dist targets from anywhere but the top level +#------------------------------------------------------------------------ +ifneq ($(LEVEL),.) +dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip :: + $(Echo) ERROR: You must run $@ from $(PROJ_OBJ_ROOT) +else + +#------------------------------------------------------------------------ +# Provide the top level targets +#------------------------------------------------------------------------ + +dist-gzip:: $(DistTarGZip) + +$(DistTarGZip) : $(TopDistDir)/.makedistdir + $(Echo) Packing gzipped distribution tar file. + $(Verb) cd $(PROJ_OBJ_ROOT) ; $(TAR) chf - "$(DistName)" | \ + $(GZIP) -c > "$(DistTarGZip)" + +dist-bzip2:: $(DistTarBZ2) + +$(DistTarBZ2) : $(TopDistDir)/.makedistdir + $(Echo) Packing bzipped distribution tar file. + $(Verb) cd $(PROJ_OBJ_ROOT) ; $(TAR) chf - $(DistName) | \ + $(BZIP2) -c >$(DistTarBZ2) + +dist-zip:: $(DistZip) + +$(DistZip) : $(TopDistDir)/.makedistdir + $(Echo) Packing zipped distribution file. + $(Verb) rm -f $(DistZip) + $(Verb) cd $(PROJ_OBJ_ROOT) ; $(ZIP) -rq $(DistZip) $(DistName) + +dist :: $(DistTarGZip) $(DistTarBZ2) $(DistZip) + $(Echo) ===== DISTRIBUTION PACKAGING SUCCESSFUL ===== + +DistCheckDir := $(PROJ_OBJ_ROOT)/_distcheckdir + +dist-check:: $(DistTarGZip) + $(Echo) Checking distribution tar file. + $(Verb) if test -d $(DistCheckDir) ; then \ + $(RM) -rf $(DistCheckDir) ; \ + fi + $(Verb) $(MKDIR) $(DistCheckDir) + $(Verb) cd $(DistCheckDir) && \ + $(MKDIR) $(DistCheckDir)/build && \ + $(MKDIR) $(DistCheckDir)/install && \ + gunzip -c $(DistTarGZip) | $(TAR) xf - && \ + cd build && \ + ../$(DistName)/configure --prefix="$(DistCheckDir)/install" \ + --srcdir=../$(DistName) $(DIST_CHECK_CONFIG_OPTIONS) && \ + $(MAKE) all && \ + $(MAKE) check && \ + $(MAKE) unittests && \ + $(MAKE) install && \ + $(MAKE) uninstall && \ + $(MAKE) dist-clean && \ + $(EchoCmd) ===== $(DistTarGZip) Ready For Distribution ===== + +dist-clean:: + $(Echo) Cleaning distribution files + -$(Verb) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) \ + $(DistCheckDir) + +endif + +#------------------------------------------------------------------------ +# Provide the recursive distdir target for building the distribution directory +#------------------------------------------------------------------------ +distdir: $(DistDir)/.makedistdir +$(DistDir)/.makedistdir: $(DistSources) + $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \ + if test -d "$(DistDir)" ; then \ + find $(DistDir) -type d ! -perm -200 -exec chmod u+w {} ';' || \ + exit 1 ; \ + fi ; \ + $(EchoCmd) Removing old $(DistDir) ; \ + $(RM) -rf $(DistDir); \ + $(EchoCmd) Making 'all' to verify build ; \ + $(MAKE) ENABLE_OPTIMIZED=1 all ; \ + fi + $(Echo) Building Distribution Directory $(DistDir) + $(Verb) $(MKDIR) $(DistDir) + $(Verb) srcdirstrip=`echo "$(PROJ_SRC_DIR)" | sed 's|.|.|g'`; \ + srcrootstrip=`echo "$(PROJ_SRC_ROOT)" | sed 's|.|.|g'`; \ + for file in $(DistFiles) ; do \ + case "$$file" in \ + $(PROJ_SRC_DIR)/*) \ + file=`echo "$$file" | sed "s#^$$srcdirstrip/##"` \ + ;; \ + $(PROJ_SRC_ROOT)/*) \ + file=`echo "$$file" | \ + sed "s#^$$srcrootstrip/##"` \ + ;; \ + esac; \ + if test -f "$(PROJ_SRC_DIR)/$$file" || \ + test -d "$(PROJ_SRC_DIR)/$$file" ; then \ + from_dir="$(PROJ_SRC_DIR)" ; \ + elif test -f "$$file" || test -d "$$file" ; then \ + from_dir=. ; \ + fi ; \ + to_dir=`echo "$$file" | sed -e 's#/[^/]*$$##'` ; \ + if test "$$to_dir" != "$$file" && test "$$to_dir" != "."; then \ + to_dir="$(DistDir)/$$dir"; \ + $(MKDIR) "$$to_dir" ; \ + else \ + to_dir="$(DistDir)"; \ + fi; \ + mid_dir=`echo "$$file" | sed -n -e 's#^\(.*\)/[^/]*$$#\1#p'`; \ + if test -n "$$mid_dir" ; then \ + $(MKDIR) "$$to_dir/$$mid_dir" || exit 1; \ + fi ; \ + if test -d "$$from_dir/$$file"; then \ + if test -d "$(PROJ_SRC_DIR)/$$file" && \ + test "$$from_dir" != "$(PROJ_SRC_DIR)" ; then \ + cd $(PROJ_SRC_DIR) ; \ + $(TAR) cf - $$file --exclude .svn --exclude CVS | \ + ( cd $$to_dir ; $(TAR) xf - ) ; \ + cd $(PROJ_OBJ_DIR) ; \ + else \ + cd $$from_dir ; \ + $(TAR) cf - $$file --exclude .svn --exclude CVS | \ + ( cd $$to_dir ; $(TAR) xf - ) ; \ + cd $(PROJ_OBJ_DIR) ; \ + fi; \ + elif test -f "$$from_dir/$$file" ; then \ + $(CP) -p "$$from_dir/$$file" "$(DistDir)/$$file" || exit 1; \ + elif test -L "$$from_dir/$$file" ; then \ + $(CP) -pd "$$from_dir/$$file" $(DistDir)/$$file || exit 1; \ + elif echo "$(DistAlways)" | grep -v "$$file" >/dev/null ; then \ + $(EchoCmd) "===== WARNING: Distribution Source " \ + "$$from_dir/$$file Not Found!" ; \ + elif test "$(Verb)" != '@' ; then \ + $(EchoCmd) "Skipping non-existent $$from_dir/$$file" ; \ + fi; \ + done + $(Verb) for subdir in $(DistSubDirs) ; do \ + if test "$$subdir" \!= "." ; then \ + new_distdir="$(DistDir)/$$subdir" ; \ + test -d "$$new_distdir" || $(MKDIR) "$$new_distdir" || exit 1; \ + ( cd $$subdir && $(MAKE) ENABLE_OPTIMIZED=1 \ + DistDir="$$new_distdir" distdir ) || exit 1; \ + fi; \ + done + $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \ + $(EchoCmd) Eliminating CVS/.svn directories from distribution ; \ + $(RM) -rf `find $(TopDistDir) -type d \( -name CVS -o \ + -name .svn \) -print` ;\ + $(MAKE) dist-hook ; \ + $(FIND) $(TopDistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; \ + -o ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; \ + -o ! -type d ! -perm -400 -exec chmod a+r {} \; \ + -o ! -type d ! -perm -444 -exec \ + $(SHELL) $(INSTALL_SH) -c -m a+r {} {} \; \ + || chmod -R a+r $(DistDir) ; \ + fi + +# This is invoked by distdir target, define it as a no-op to avoid errors if not +# defined by user. +dist-hook:: + +endif + +############################################################################### +# TOP LEVEL - targets only to apply at the top level directory +############################################################################### + +ifeq ($(LEVEL),.) + +#------------------------------------------------------------------------ +# Install support for the project's include files: +#------------------------------------------------------------------------ +ifdef NO_INSTALL +install-local:: + $(Echo) Install circumvented with NO_INSTALL +uninstall-local:: + $(Echo) Uninstall circumvented with NO_INSTALL +else +install-local:: + $(Echo) Installing include files + $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_includedir) + $(Verb) if test -d "$(PROJ_SRC_ROOT)/include" ; then \ + cd $(PROJ_SRC_ROOT)/include && \ + for hdr in `find . -type f \ + '(' -name LICENSE.TXT \ + -o -name '*.def' \ + -o -name '*.h' \ + -o -name '*.inc' \ + -o -name '*.td' \ + ')' -print | grep -v CVS | \ + grep -v .svn` ; do \ + instdir=`dirname "$(DESTDIR)$(PROJ_includedir)/$$hdr"` ; \ + if test \! -d "$$instdir" ; then \ + $(EchoCmd) Making install directory $$instdir ; \ + $(MKDIR) $$instdir ;\ + fi ; \ + $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \ + done ; \ + fi +ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) + $(Verb) if test -d "$(PROJ_OBJ_ROOT)/include" ; then \ + cd $(PROJ_OBJ_ROOT)/include && \ + for hdr in `find . -type f \ + '(' -name LICENSE.TXT \ + -o -name '*.def' \ + -o -name '*.h' \ + -o -name '*.inc' \ + -o -name '*.td' \ + ')' -print | grep -v CVS | \ + grep -v .svn` ; do \ + instdir=`dirname "$(DESTDIR)$(PROJ_includedir)/$$hdr"` ; \ + if test \! -d "$$instdir" ; then \ + $(EchoCmd) Making install directory $$instdir ; \ + $(MKDIR) $$instdir ;\ + fi ; \ + $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \ + done ; \ + fi +endif + +uninstall-local:: + $(Echo) Uninstalling include files + $(Verb) if [ -d "$(PROJ_SRC_ROOT)/include" ] ; then \ + cd $(PROJ_SRC_ROOT)/include && \ + $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f \ + '!' '(' -name '*~' -o -name '.#*' \ + -o -name '*.in' ')' -print ')' | \ + grep -v CVS | sed 's#^#$(DESTDIR)$(PROJ_includedir)/#'` ; \ + cd $(PROJ_SRC_ROOT)/include && \ + $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f -name '*.in' \ + -print ')' | sed 's#\.in$$##;s#^#$(DESTDIR)$(PROJ_includedir)/#'` ; \ + fi +endif +endif + +check-line-length: + @echo searching for overlength lines in files: $(Sources) + @echo + @echo + egrep -n '.{81}' $(Sources) /dev/null + +check-for-tabs: + @echo searching for tabs in files: $(Sources) + @echo + @echo + egrep -n ' ' $(Sources) /dev/null + +check-footprint: + @ls -l $(LibDir) | awk '\ + BEGIN { sum = 0; } \ + { sum += $$5; } \ + END { printf("Libraries: %6.3f MBytes\n", sum/(1024.0*1024.0)); }' + @ls -l $(ToolDir) | awk '\ + BEGIN { sum = 0; } \ + { sum += $$5; } \ + END { printf("Programs: %6.3f MBytes\n", sum/(1024.0*1024.0)); }' +#------------------------------------------------------------------------ +# Print out the directories used for building +#------------------------------------------------------------------------ +printvars:: + $(Echo) "BuildMode : " '$(BuildMode)' + $(Echo) "PROJ_SRC_ROOT: " '$(PROJ_SRC_ROOT)' + $(Echo) "PROJ_SRC_DIR : " '$(PROJ_SRC_DIR)' + $(Echo) "PROJ_OBJ_ROOT: " '$(PROJ_OBJ_ROOT)' + $(Echo) "PROJ_OBJ_DIR : " '$(PROJ_OBJ_DIR)' + $(Echo) "LLVM_SRC_ROOT: " '$(LLVM_SRC_ROOT)' + $(Echo) "LLVM_OBJ_ROOT: " '$(LLVM_OBJ_ROOT)' + $(Echo) "PROJ_prefix : " '$(PROJ_prefix)' + $(Echo) "PROJ_internal_prefix : " '$(PROJ_internal_prefix)' + $(Echo) "PROJ_bindir : " '$(PROJ_bindir)' + $(Echo) "PROJ_libdir : " '$(PROJ_libdir)' + $(Echo) "PROJ_etcdir : " '$(PROJ_etcdir)' + $(Echo) "PROJ_includedir : " '$(PROJ_includedir)' + $(Echo) "UserTargets : " '$(UserTargets)' + $(Echo) "ObjMakefiles : " '$(ObjMakefiles)' + $(Echo) "SrcMakefiles : " '$(SrcMakefiles)' + $(Echo) "ObjDir : " '$(ObjDir)' + $(Echo) "LibDir : " '$(LibDir)' + $(Echo) "ToolDir : " '$(ToolDir)' + $(Echo) "ExmplDir : " '$(ExmplDir)' + $(Echo) "Sources : " '$(Sources)' + $(Echo) "TDFiles : " '$(TDFiles)' + $(Echo) "INCFiles : " '$(INCFiles)' + $(Echo) "INCTMPFiles : " '$(INCTMPFiles)' + $(Echo) "PreConditions: " '$(PreConditions)' + $(Echo) "Compile.CXX : " '$(Compile.CXX)' + $(Echo) "Compile.C : " '$(Compile.C)' + $(Echo) "Archive : " '$(Archive)' + $(Echo) "YaccFiles : " '$(YaccFiles)' + $(Echo) "LexFiles : " '$(LexFiles)' + $(Echo) "Module : " '$(Module)' + $(Echo) "FilesToConfig: " '$(FilesToConfigPATH)' + $(Echo) "SubDirs : " '$(SubDirs)' + $(Echo) "ProjLibsPaths: " '$(ProjLibsPaths)' + $(Echo) "ProjLibsOptions: " '$(ProjLibsOptions)' + +### +# Debugging + +# General debugging rule, use 'make dbg-print-XXX' to print the +# definition, value and origin of XXX. +make-print-%: + $(error PRINT: $(value $*) = "$($*)" (from $(origin $*))) diff --git a/README.txt b/README.txt new file mode 100644 index 00000000..e957a4dc --- /dev/null +++ b/README.txt @@ -0,0 +1,18 @@ +Low Level Virtual Machine (LLVM) +================================ + +This directory and its subdirectories contain source code for the Low Level +Virtual Machine, a toolkit for the construction of highly optimized compilers, +optimizers, and runtime environments. + +LLVM is open source software. You may freely distribute it under the terms of +the license agreement found in LICENSE.txt. + +Please see the documentation provided in docs/ for further +assistance with LLVM, and in particular docs/GettingStarted.rst for getting +started with LLVM and docs/README.txt for an overview of LLVM's +documentation setup. + +If you're writing a package for LLVM, see docs/Packaging.rst for our +suggestions. + diff --git a/autoconf/AutoRegen.sh b/autoconf/AutoRegen.sh new file mode 100755 index 00000000..cbca7387 --- /dev/null +++ b/autoconf/AutoRegen.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +die() { + echo "$@" 1>&2 + exit 1 +} + +clean() { + echo $1 | sed -e 's/\\//g' +} + +### NOTE: ############################################################ +### These variables specify the tool versions we want to use. +### Periods should be escaped with backslash for use by grep. +### +### If you update these, please also update docs/GettingStarted.rst +want_autoconf_version='2\.60' +want_autoheader_version=$want_autoconf_version +want_aclocal_version='1\.9\.6' +want_libtool_version='1\.5\.22' +### END NOTE ######################################################### + +outfile=configure +configfile=configure.ac + +want_autoconf_version_clean=$(clean $want_autoconf_version) +want_autoheader_version_clean=$(clean $want_autoheader_version) +want_aclocal_version_clean=$(clean $want_aclocal_version) +want_libtool_version_clean=$(clean $want_libtool_version) + +test -d autoconf && test -f autoconf/$configfile && cd autoconf +test -f $configfile || die "Can't find 'autoconf' dir; please cd into it first" +autoconf --version | grep $want_autoconf_version > /dev/null +test $? -eq 0 || die "Your autoconf was not detected as being $want_autoconf_version_clean" +aclocal --version | grep '^aclocal.*'$want_aclocal_version > /dev/null +test $? -eq 0 || die "Your aclocal was not detected as being $want_aclocal_version_clean" +autoheader --version | grep '^autoheader.*'$want_autoheader_version > /dev/null +test $? -eq 0 || die "Your autoheader was not detected as being $want_autoheader_version_clean" +libtool --version | grep $want_libtool_version > /dev/null +test $? -eq 0 || die "Your libtool was not detected as being $want_libtool_version_clean" +echo "" +echo "### NOTE: ############################################################" +echo "### If you get *any* warnings from autoconf below you MUST fix the" +echo "### scripts in the m4 directory because there are future forward" +echo "### compatibility or platform support issues at risk. Please do NOT" +echo "### commit any configure script that was generated with warnings" +echo "### present. You should get just three 'Regenerating..' lines." +echo "######################################################################" +echo "" +echo "Regenerating aclocal.m4 with aclocal $want_aclocal_version_clean" +cwd=`pwd` +aclocal --force -I $cwd/m4 || die "aclocal failed" +echo "Regenerating configure with autoconf $want_autoconf_version_clean" +autoconf --force --warnings=all -o ../$outfile $configfile || die "autoconf failed" +cd .. +echo "Regenerating config.h.in with autoheader $want_autoheader_version_clean" +autoheader --warnings=all -I autoconf -I autoconf/m4 autoconf/$configfile || die "autoheader failed" +exit 0 diff --git a/autoconf/ExportMap.map b/autoconf/ExportMap.map new file mode 100644 index 00000000..17b185fe --- /dev/null +++ b/autoconf/ExportMap.map @@ -0,0 +1,7 @@ +{ + global: main; + __progname; + environ; + + local: *; +}; diff --git a/autoconf/LICENSE.TXT b/autoconf/LICENSE.TXT new file mode 100644 index 00000000..72fdd39e --- /dev/null +++ b/autoconf/LICENSE.TXT @@ -0,0 +1,24 @@ +------------------------------------------------------------------------------ +Autoconf Files +------------------------------------------------------------------------------ +All autoconf files are licensed under the LLVM license with the following +additions: + +llvm/autoconf/install-sh: + This script is licensed under the LLVM license, with the following + additional copyrights and restrictions: + + Copyright 1991 by the Massachusetts Institute of Technology + + Permission to use, copy, modify, distribute, and sell this software and its + documentation for any purpose is hereby granted without fee, provided that + the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation, and that the name of M.I.T. not be used in advertising or + publicity pertaining to distribution of the software without specific, + written prior permission. M.I.T. makes no representations about the + suitability of this software for any purpose. It is provided "as is" + without express or implied warranty. + +Please see the source files for additional copyrights. + diff --git a/autoconf/README.TXT b/autoconf/README.TXT new file mode 100644 index 00000000..3dabdf7b --- /dev/null +++ b/autoconf/README.TXT @@ -0,0 +1,49 @@ +Upgrading Libtool +=============================================================================== + +If you are in the mood to upgrade libtool, you must do the following: + + 1. Get the new version of libtool and put it in + 2. configure/build/install libtool with --prefix= + 3. Copy /ltdl.m4 to llvm/autoconf/m4 + 4. Copy /share/aclocal/libtool.m4 to llvm/autoconf/m4/libtool.m4 + 5. Copy /share/libtool/ltmain.sh to llvm/autoconf/ltmain.sh + 6. Copy /share/libtool/libltdl/ltdl.c to llvm/lib/System + 7. Copy /share/libtool/libltdl/ltdl.h to llvm/lib/System + 8. Edit the ltdl.h file to #include "llvm/Config/config.h" at the very top. You + might also need to resolve some compiler warnings (typically about + comparison of signed vs. unsigned values). But, you won't find out about + those until you build LLVM (step 13). + 9. Edit the llvm/autoconf/m4/libtool.m4 file so that: + a) in AC_PROB_LIBTOOL macro, the value of LIBTOOL is set to + $(top_builddir)/mklib, not $(top_builddir)/libtool + b) in AC_LIBTOOL_SETUP macro, the variable default_ofile is set to + "mklib" instead of "libtool" + c) s/AC_ENABLE_SHARED_DEFAULT/enable_shared_default/g + d) s/AC_ENABLE_STATIC_DEFAULT/enable_static_default/g + e) s/AC_ENABLE_FAST_INSTALL_DEFAULT/enable_fast_install_default/g +10. Run "autoupdate libtool.m4 ltdl.m4" in the llvm/autoconf/m4 directory. + This should correctly update the macro definitions in the libtool m4 + files to match the version of autoconf that LLVM uses. This converts + AC_HELP_STRING to AS_HELP_STRING and AC_TRY_LINK to AC_LINK_IFELSE, amongst + other things. You may need to manually adjust the files. +11. Run AutoRegen.sh to get the new macros into configure script +12. If there are any warnings from AutoRegen.sh, go to step 9. +13. Rebuild LLVM, making sure it reconfigures +14. Test the JIT which uses libltdl +15. If it all works, only THEN commit the changes. + +Upgrading autoconf +=============================================================================== + +If you are in the mood to upgrade autoconf, you should: + + 1. Consider not upgrading. + 2. No really, this is a hassle, you don't want to do it. + 3. Get the new version of autoconf and put it in + 4. configure/build/install autoconf with --prefix= + 5. Run autoupdate on all the m4 macros in llvm/autoconf/m4 + 6. Run autoupdate on llvm/autoconf/configure.ac + 7. Regenerate configure script with AutoRegen.sh + 8. If there are any warnings from AutoRegen.sh, fix them and go to step 7. + 9. Test, test, test. diff --git a/autoconf/config.guess b/autoconf/config.guess new file mode 100755 index 00000000..370da42d --- /dev/null +++ b/autoconf/config.guess @@ -0,0 +1,1523 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. + +timestamp='2011-08-20' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free +Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/autoconf/config.sub b/autoconf/config.sub new file mode 100755 index 00000000..a8d85281 --- /dev/null +++ b/autoconf/config.sub @@ -0,0 +1,1768 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. + +timestamp='2011-11-02' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted GNU ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free +Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | aarch64 \ + | be32 | be64 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fido | fr30 | frv \ + | hexagon \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 \ + | ns16k | ns32k \ + | open8 \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | picochip) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | aarch64-* \ + | avr-* | avr32-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hexagon-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze) + basic_machine=microblaze-xilinx + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/autoconf/configure.ac b/autoconf/configure.ac new file mode 100644 index 00000000..7b4bae7e --- /dev/null +++ b/autoconf/configure.ac @@ -0,0 +1,1995 @@ +dnl === configure.ac --------------------------------------------------------=== +dnl The LLVM Compiler Infrastructure +dnl +dnl This file is distributed under the University of Illinois Open Source +dnl License. See LICENSE.TXT for details. +dnl +dnl===-----------------------------------------------------------------------=== +dnl This is the LLVM configuration script. It is processed by the autoconf +dnl program to produce a script named configure. This script contains the +dnl configuration checks that LLVM needs in order to support multiple platforms. +dnl This file is composed of 10 sections per the recommended organization of +dnl autoconf input defined in the autoconf documentation. As this file evolves, +dnl please keep the various types of checks within their sections. The sections +dnl are as follows: +dnl +dnl SECTION 1: Initialization & Setup +dnl SECTION 2: Architecture, target, and host checks +dnl SECTION 3: Command line arguments for the configure script. +dnl SECTION 4: Check for programs we need and that they are the right version +dnl SECTION 5: Check for libraries +dnl SECTION 6: Check for header files +dnl SECTION 7: Check for types and structures +dnl SECTION 8: Check for specific functions needed +dnl SECTION 9: Additional checks, variables, etc. +dnl SECTION 10: Specify the output files and generate it +dnl +dnl===-----------------------------------------------------------------------=== +dnl=== +dnl=== SECTION 1: Initialization & Setup +dnl=== +dnl===-----------------------------------------------------------------------=== +dnl Initialize autoconf and define the package name, version number and +dnl address for reporting bugs. + +AC_INIT([LLVM],[3.4.1],[http://llvm.org/bugs/]) + +LLVM_VERSION_MAJOR=3 +LLVM_VERSION_MINOR=4 +LLVM_VERSION_PATCH=1 +LLVM_VERSION_SUFFIX= + +AC_DEFINE_UNQUOTED([LLVM_VERSION_MAJOR], $LLVM_VERSION_MAJOR, [Major version of the LLVM API]) +AC_DEFINE_UNQUOTED([LLVM_VERSION_MINOR], $LLVM_VERSION_MINOR, [Minor version of the LLVM API]) +AC_DEFINE_UNQUOTED([LLVM_VERSION_PATCH], $LLVM_VERSION_PATCH, [Patch version of the LLVM API]) + +AC_SUBST([LLVM_VERSION_MAJOR]) +AC_SUBST([LLVM_VERSION_MINOR]) +AC_SUBST([LLVM_VERSION_PATCH]) +AC_SUBST([LLVM_VERSION_SUFFIX]) + +dnl Provide a copyright substitution and ensure the copyright notice is included +dnl in the output of --version option of the generated configure script. +AC_SUBST(LLVM_COPYRIGHT,["Copyright (c) 2003-2013 University of Illinois at Urbana-Champaign."]) +AC_COPYRIGHT([Copyright (c) 2003-2013 University of Illinois at Urbana-Champaign.]) + +dnl Indicate that we require autoconf 2.60 or later. +AC_PREREQ(2.60) + +dnl Verify that the source directory is valid. This makes sure that we are +dnl configuring LLVM and not some other package (it validates --srcdir argument) +AC_CONFIG_SRCDIR([lib/IR/Module.cpp]) + +dnl Place all of the extra autoconf files into the config subdirectory. Tell +dnl various tools where the m4 autoconf macros are. +AC_CONFIG_AUX_DIR([autoconf]) + +dnl Quit if the source directory has already been configured. +dnl NOTE: This relies upon undocumented autoconf behavior. +if test ${srcdir} != "." ; then + if test -f ${srcdir}/include/llvm/Config/config.h ; then + AC_MSG_ERROR([Already configured in ${srcdir}]) + fi +fi + +dnl Default to empty (i.e. assigning the null string to) CFLAGS and CXXFLAGS, +dnl instead of the autoconf default (for example, '-g -O2' for CC=gcc). +: ${CFLAGS=} +: ${CXXFLAGS=} + +dnl We need to check for the compiler up here to avoid anything else +dnl starting with a different one. +AC_PROG_CC(clang llvm-gcc gcc) +AC_PROG_CXX(clang++ llvm-g++ g++) +AC_PROG_CPP + +dnl If CXX is Clang, check that it can find and parse C++ standard library +dnl headers. +if test "$CXX" = "clang++" ; then + AC_MSG_CHECKING([whether clang works]) + AC_LANG_PUSH([C++]) + dnl Note that space between 'include' and '(' is required. There's a broken + dnl regex in aclocal that otherwise will think that we call m4's include + dnl builtin. + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include +#if __has_include () +#include +#endif +#if __has_include () +#include +#endif +]])], +[ + AC_MSG_RESULT([yes]) +], +[ + AC_MSG_RESULT([no]) + AC_MSG_ERROR([Selected compiler could not find or parse C++ standard library headers. Rerun with CC=c-compiler CXX=c++-compiler ./configure ...]) +]) + AC_LANG_POP([C++]) +fi + +dnl Configure all of the projects present in our source tree. While we could +dnl just AC_CONFIG_SUBDIRS on the set of directories in projects that have a +dnl configure script, that usage of the AC_CONFIG_SUBDIRS macro is deprecated. +dnl Instead we match on the known projects. + +dnl +dnl One tricky part of doing this is that some projects depend upon other +dnl projects. For example, several projects rely upon the LLVM test suite. +dnl We want to configure those projects first so that their object trees are +dnl created before running the configure scripts of projects that depend upon +dnl them. +dnl + +dnl Several projects use llvm-gcc, so configure that first +if test -d ${srcdir}/projects/llvm-gcc ; then + AC_CONFIG_SUBDIRS([projects/llvm-gcc]) +fi + +dnl Several projects use the LLVM test suite, so configure it next. +if test -d ${srcdir}/projects/test-suite ; then + AC_CONFIG_SUBDIRS([projects/test-suite]) +fi + +dnl llvm-test is the old name of the test-suite, kept here for backwards +dnl compatibility +if test -d ${srcdir}/projects/llvm-test ; then + AC_CONFIG_SUBDIRS([projects/llvm-test]) +fi + +dnl Some projects use poolalloc; configure that next +if test -d ${srcdir}/projects/poolalloc ; then + AC_CONFIG_SUBDIRS([projects/poolalloc]) +fi + +if test -d ${srcdir}/projects/llvm-poolalloc ; then + AC_CONFIG_SUBDIRS([projects/llvm-poolalloc]) +fi + +dnl Check for all other projects +for i in `ls ${srcdir}/projects` +do + if test -d ${srcdir}/projects/${i} ; then + case ${i} in + sample) AC_CONFIG_SUBDIRS([projects/sample]) ;; + privbracket) AC_CONFIG_SUBDIRS([projects/privbracket]) ;; + llvm-stacker) AC_CONFIG_SUBDIRS([projects/llvm-stacker]) ;; + llvm-reopt) AC_CONFIG_SUBDIRS([projects/llvm-reopt]);; + llvm-java) AC_CONFIG_SUBDIRS([projects/llvm-java]) ;; + llvm-tv) AC_CONFIG_SUBDIRS([projects/llvm-tv]) ;; + safecode) AC_CONFIG_SUBDIRS([projects/safecode]) ;; + llvm-kernel) AC_CONFIG_SUBDIRS([projects/llvm-kernel]) ;; + compiler-rt) ;; + llvm-gcc) ;; + test-suite) ;; + llvm-test) ;; + poolalloc) ;; + llvm-poolalloc) ;; + *) + AC_MSG_WARN([Unknown project (${i}) won't be configured automatically]) + ;; + esac + fi +done + +dnl Disable the build of polly, even if it is checked out into tools/polly. +AC_ARG_ENABLE(polly, + AS_HELP_STRING([--enable-polly], + [Use polly if available (default is YES)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(ENABLE_POLLY,[1]) ;; + no) AC_SUBST(ENABLE_POLLY,[0]) ;; + default) AC_SUBST(ENABLE_POLLY,[1]) ;; + *) AC_MSG_ERROR([Invalid setting for --enable-polly. Use "yes" or "no"]) ;; +esac + + +dnl Check if polly is checked out into tools/polly and configure it if +dnl available. +if (test -d ${srcdir}/tools/polly) && (test $ENABLE_POLLY -eq 1) ; then + AC_SUBST(LLVM_HAS_POLLY,1) + AC_CONFIG_SUBDIRS([tools/polly]) +fi + +dnl===-----------------------------------------------------------------------=== +dnl=== +dnl=== SECTION 2: Architecture, target, and host checks +dnl=== +dnl===-----------------------------------------------------------------------=== + +dnl Check the target for which we're compiling and the host that will do the +dnl compilations. This will tell us which LLVM compiler will be used for +dnl compiling SSA into object code. This needs to be done early because +dnl following tests depend on it. +AC_CANONICAL_TARGET + +dnl Determine the platform type and cache its value. This helps us configure +dnl the System library to the correct build platform. +AC_CACHE_CHECK([type of operating system we're going to host on], + [llvm_cv_os_type], +[case $host in + *-*-aix*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="AIX" + llvm_cv_platform_type="Unix" ;; + *-*-irix*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="IRIX" + llvm_cv_platform_type="Unix" ;; + *-*-cygwin*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="Cygwin" + llvm_cv_platform_type="Unix" ;; + *-*-darwin*) + llvm_cv_link_all_option="-Wl,-all_load" + llvm_cv_no_link_all_option="-Wl,-noall_load" + llvm_cv_os_type="Darwin" + llvm_cv_platform_type="Unix" ;; + *-*-minix*) + llvm_cv_link_all_option="-Wl,-all_load" + llvm_cv_no_link_all_option="-Wl,-noall_load" + llvm_cv_os_type="Minix" + llvm_cv_platform_type="Unix" ;; + *-*-freebsd*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="FreeBSD" + llvm_cv_platform_type="Unix" ;; + *-*-kfreebsd-gnu) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="GNU/kFreeBSD" + llvm_cv_platform_type="Unix" ;; + *-*-openbsd*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="OpenBSD" + llvm_cv_platform_type="Unix" ;; + *-*-netbsd*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="NetBSD" + llvm_cv_platform_type="Unix" ;; + *-*-dragonfly*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="DragonFly" + llvm_cv_platform_type="Unix" ;; + *-*-hpux*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="HP-UX" + llvm_cv_platform_type="Unix" ;; + *-*-interix*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="Interix" + llvm_cv_platform_type="Unix" ;; + *-*-linux*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="Linux" + llvm_cv_platform_type="Unix" ;; + *-*-gnu*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="GNU" + llvm_cv_platform_type="Unix" ;; + *-*-solaris*) + llvm_cv_link_all_option="-Wl,-z,allextract" + llvm_cv_no_link_all_option="-Wl,-z,defaultextract" + llvm_cv_os_type="SunOS" + llvm_cv_platform_type="Unix" ;; + *-*-auroraux*) + llvm_cv_link_all_option="-Wl,-z,allextract" + llvm_cv_link_all_option="-Wl,-z,defaultextract" + llvm_cv_os_type="AuroraUX" + llvm_cv_platform_type="Unix" ;; + *-*-win32*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="Win32" + llvm_cv_platform_type="Win32" ;; + *-*-mingw*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="MingW" + llvm_cv_platform_type="Win32" ;; + *-*-haiku*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="Haiku" + llvm_cv_platform_type="Unix" ;; + *-unknown-eabi*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="Freestanding" + llvm_cv_platform_type="Unix" ;; + *-unknown-elf*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="Freestanding" + llvm_cv_platform_type="Unix" ;; + *) + llvm_cv_link_all_option="" + llvm_cv_no_link_all_option="" + llvm_cv_os_type="Unknown" + llvm_cv_platform_type="Unknown" ;; +esac]) + +AC_CACHE_CHECK([type of operating system we're going to target], + [llvm_cv_target_os_type], +[case $target in + *-*-aix*) + llvm_cv_target_os_type="AIX" ;; + *-*-irix*) + llvm_cv_target_os_type="IRIX" ;; + *-*-cygwin*) + llvm_cv_target_os_type="Cygwin" ;; + *-*-darwin*) + llvm_cv_target_os_type="Darwin" ;; + *-*-minix*) + llvm_cv_target_os_type="Minix" ;; + *-*-freebsd*) + llvm_cv_target_os_type="FreeBSD" ;; + *-*-kfreebsd-gnu) + llvm_cv_target_os_type="GNU/kFreeBSD" ;; + *-*-openbsd*) + llvm_cv_target_os_type="OpenBSD" ;; + *-*-netbsd*) + llvm_cv_target_os_type="NetBSD" ;; + *-*-dragonfly*) + llvm_cv_target_os_type="DragonFly" ;; + *-*-hpux*) + llvm_cv_target_os_type="HP-UX" ;; + *-*-interix*) + llvm_cv_target_os_type="Interix" ;; + *-*-linux*) + llvm_cv_target_os_type="Linux" ;; + *-*-gnu*) + llvm_cv_target_os_type="GNU" ;; + *-*-solaris*) + llvm_cv_target_os_type="SunOS" ;; + *-*-auroraux*) + llvm_cv_target_os_type="AuroraUX" ;; + *-*-win32*) + llvm_cv_target_os_type="Win32" ;; + *-*-mingw*) + llvm_cv_target_os_type="MingW" ;; + *-*-haiku*) + llvm_cv_target_os_type="Haiku" ;; + *-*-rtems*) + llvm_cv_target_os_type="RTEMS" ;; + *-*-nacl*) + llvm_cv_target_os_type="NativeClient" ;; + *-unknown-eabi*) + llvm_cv_target_os_type="Freestanding" ;; + *) + llvm_cv_target_os_type="Unknown" ;; +esac]) + +dnl Make sure we aren't attempting to configure for an unknown system +if test "$llvm_cv_os_type" = "Unknown" ; then + AC_MSG_ERROR([Operating system is unknown, configure can't continue]) +fi + +dnl Set the "OS" Makefile variable based on the platform type so the +dnl makefile can configure itself to specific build hosts +AC_SUBST(OS,$llvm_cv_os_type) +AC_SUBST(HOST_OS,$llvm_cv_os_type) +AC_SUBST(TARGET_OS,$llvm_cv_target_os_type) + +dnl Set the LINKALL and NOLINKALL Makefile variables based on the platform +AC_SUBST(LINKALL,$llvm_cv_link_all_option) +AC_SUBST(NOLINKALL,$llvm_cv_no_link_all_option) + +dnl Set the "LLVM_ON_*" variables based on llvm_cv_platform_type +dnl This is used by lib/Support to determine the basic kind of implementation +dnl to use. +case $llvm_cv_platform_type in + Unix) + AC_DEFINE([LLVM_ON_UNIX],[1],[Define if this is Unixish platform]) + AC_SUBST(LLVM_ON_UNIX,[1]) + AC_SUBST(LLVM_ON_WIN32,[0]) + ;; + Win32) + AC_DEFINE([LLVM_ON_WIN32],[1],[Define if this is Win32ish platform]) + AC_SUBST(LLVM_ON_UNIX,[0]) + AC_SUBST(LLVM_ON_WIN32,[1]) + ;; +esac + +dnl Determine what our target architecture is and configure accordingly. +dnl This will allow Makefiles to make a distinction between the hardware and +dnl the OS. +AC_CACHE_CHECK([target architecture],[llvm_cv_target_arch], +[case $target in + i?86-*) llvm_cv_target_arch="x86" ;; + amd64-* | x86_64-*) llvm_cv_target_arch="x86_64" ;; + sparc*-*) llvm_cv_target_arch="Sparc" ;; + powerpc*-*) llvm_cv_target_arch="PowerPC" ;; + arm*-*) llvm_cv_target_arch="ARM" ;; + aarch64*-*) llvm_cv_target_arch="AArch64" ;; + mips-* | mips64-*) llvm_cv_target_arch="Mips" ;; + mipsel-* | mips64el-*) llvm_cv_target_arch="Mips" ;; + xcore-*) llvm_cv_target_arch="XCore" ;; + msp430-*) llvm_cv_target_arch="MSP430" ;; + hexagon-*) llvm_cv_target_arch="Hexagon" ;; + nvptx-*) llvm_cv_target_arch="NVPTX" ;; + s390x-*) llvm_cv_target_arch="SystemZ" ;; + *) llvm_cv_target_arch="Unknown" ;; +esac]) + +if test "$llvm_cv_target_arch" = "Unknown" ; then + AC_MSG_WARN([Configuring LLVM for an unknown target archicture]) +fi + +dnl Determine the LLVM native architecture for the target +case "$llvm_cv_target_arch" in + x86) LLVM_NATIVE_ARCH="X86" ;; + x86_64) LLVM_NATIVE_ARCH="X86" ;; + *) LLVM_NATIVE_ARCH="$llvm_cv_target_arch" ;; +esac + +dnl Define a substitution, ARCH, for the target architecture +AC_SUBST(ARCH,$llvm_cv_target_arch) + +dnl Determine what our host architecture. +dnl This will allow MCJIT regress tests runs only for supported +dnl platforms. +case $host in + i?86-*) host_arch="x86" ;; + amd64-* | x86_64-*) host_arch="x86_64" ;; + sparc*-*) host_arch="Sparc" ;; + powerpc*-*) host_arch="PowerPC" ;; + arm*-*) host_arch="ARM" ;; + aarch64*-*) host_arch="AArch64" ;; + mips-* | mips64-*) host_arch="Mips" ;; + mipsel-* | mips64el-*) host_arch="Mips" ;; + xcore-*) host_arch="XCore" ;; + msp430-*) host_arch="MSP430" ;; + hexagon-*) host_arch="Hexagon" ;; + s390x-*) host_arch="SystemZ" ;; + *) host_arch="Unknown" ;; +esac + +if test "$host_arch" = "Unknown" ; then + AC_MSG_WARN([Configuring LLVM for an unknown host archicture]) +fi + +AC_SUBST(HOST_ARCH,$host_arch) + +dnl Check for the endianness of the target +AC_C_BIGENDIAN(AC_SUBST([ENDIAN],[big]),AC_SUBST([ENDIAN],[little])) + +dnl Check for build platform executable suffix if we're cross-compiling +if test "$cross_compiling" = yes; then + AC_SUBST(LLVM_CROSS_COMPILING, [1]) + AC_BUILD_EXEEXT + ac_build_prefix=${build_alias}- + AC_CHECK_PROG(BUILD_CXX, ${ac_build_prefix}g++, ${ac_build_prefix}g++) + if test -z "$BUILD_CXX"; then + AC_CHECK_PROG(BUILD_CXX, g++, g++) + if test -z "$BUILD_CXX"; then + AC_CHECK_PROG(BUILD_CXX, c++, c++, , , /usr/ucb/c++) + fi + fi +else + AC_SUBST(LLVM_CROSS_COMPILING, [0]) +fi + +dnl Check to see if there's a .svn or .git directory indicating that this +dnl build is being done from a checkout. This sets up several defaults for +dnl the command line switches. When we build with a checkout directory, +dnl we get a debug with assertions turned on. Without, we assume a source +dnl release and we get an optimized build without assertions. +dnl See --enable-optimized and --enable-assertions below +if test -d ".svn" -o -d "${srcdir}/.svn" -o -d ".git" -o -d "${srcdir}/.git"; then + cvsbuild="yes" + optimize="no" + AC_SUBST(CVSBUILD,[[CVSBUILD=1]]) +else + cvsbuild="no" + optimize="yes" +fi + +dnl===-----------------------------------------------------------------------=== +dnl=== +dnl=== SECTION 3: Command line arguments for the configure script. +dnl=== +dnl===-----------------------------------------------------------------------=== + +dnl --enable-libcpp : check whether or not to use libc++ on the command line +AC_ARG_ENABLE(libcpp, + AS_HELP_STRING([--enable-libcpp], + [Use libc++ if available (default is NO)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(ENABLE_LIBCPP,[1]) ;; + no) AC_SUBST(ENABLE_LIBCPP,[0]) ;; + default) AC_SUBST(ENABLE_LIBCPP,[0]);; + *) AC_MSG_ERROR([Invalid setting for --enable-libcpp. Use "yes" or "no"]) ;; +esac + +dnl --enable-cxx11 : check whether or not to use -std=c++11 on the command line +AC_ARG_ENABLE(cxx11, + AS_HELP_STRING([--enable-cxx11], + [Use c++11 if available (default is NO)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(ENABLE_CXX11,[1]) ;; + no) AC_SUBST(ENABLE_CXX11,[0]) ;; + default) AC_SUBST(ENABLE_CXX11,[0]);; + *) AC_MSG_ERROR([Invalid setting for --enable-cxx11. Use "yes" or "no"]) ;; +esac + +dnl --enable-fission : check whether or not to use -gsplit-dwarf on the command +dnl line +AC_ARG_ENABLE(split-dwarf, + AS_HELP_STRING([--enable-split-dwarf], + [Use split-dwarf if available (default is NO)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(ENABLE_SPLIT_DWARF,[1]) ;; + no) AC_SUBST(ENABLE_SPLIT_DWARF,[0]) ;; + default) AC_SUBST(ENABLE_SPLIT_DWARF,[0]);; + *) AC_MSG_ERROR([Invalid setting for --enable-split-dwarf. Use "yes" or "no"]) ;; +esac + +dnl --enable-clang-arcmt: check whether to enable clang arcmt +clang_arcmt="yes" +AC_ARG_ENABLE(clang-arcmt, + AS_HELP_STRING([--enable-clang-arcmt], + [Enable building of clang ARCMT (default is YES)]), + clang_arcmt="$enableval", + enableval="yes") +case "$enableval" in + yes) AC_SUBST(ENABLE_CLANG_ARCMT,[1]) ;; + no) AC_SUBST(ENABLE_CLANG_ARCMT,[0]) ;; + default) AC_SUBST(ENABLE_CLANG_ARCMT,[1]);; + *) AC_MSG_ERROR([Invalid setting for --enable-clang-arcmt. Use "yes" or "no"]) ;; +esac + +dnl --enable-clang-static-analyzer: check whether to enable static-analyzer +clang_static_analyzer="yes" +AC_ARG_ENABLE(clang-static-analyzer, + AS_HELP_STRING([--enable-clang-static-analyzer], + [Enable building of clang Static Analyzer (default is YES)]), + clang_static_analyzer="$enableval", + enableval="yes") +case "$enableval" in + yes) AC_SUBST(ENABLE_CLANG_STATIC_ANALYZER,[1]) ;; + no) + if test ${clang_arcmt} != "no" ; then + AC_MSG_ERROR([Cannot enable clang ARC Migration Tool while disabling static analyzer.]) + fi + AC_SUBST(ENABLE_CLANG_STATIC_ANALYZER,[0]) + ;; + default) AC_SUBST(ENABLE_CLANG_STATIC_ANALYZER,[1]);; + *) AC_MSG_ERROR([Invalid setting for --enable-clang-static-analyzer. Use "yes" or "no"]) ;; +esac + +dnl --enable-clang-rewriter: check whether to enable clang rewriter +AC_ARG_ENABLE(clang-rewriter, + AS_HELP_STRING([--enable-clang-rewriter], + [Enable building of clang rewriter (default is YES)]),, + enableval="yes") +case "$enableval" in + yes) AC_SUBST(ENABLE_CLANG_REWRITER,[1]) ;; + no) + if test ${clang_arcmt} != "no" ; then + AC_MSG_ERROR([Cannot enable clang ARC Migration Tool while disabling rewriter.]) + fi + if test ${clang_static_analyzer} != "no" ; then + AC_MSG_ERROR([Cannot enable clang static analyzer while disabling rewriter.]) + fi + AC_SUBST(ENABLE_CLANG_REWRITER,[0]) + ;; + default) AC_SUBST(ENABLE_CLANG_REWRITER,[1]);; + *) AC_MSG_ERROR([Invalid setting for --enable-clang-rewriter. Use "yes" or "no"]) ;; +esac + +dnl --enable-optimized : check whether they want to do an optimized build: +AC_ARG_ENABLE(optimized, AS_HELP_STRING( + --enable-optimized,[Compile with optimizations enabled (default is NO)]),,enableval=$optimize) +if test ${enableval} = "no" ; then + AC_SUBST(ENABLE_OPTIMIZED,[[]]) +else + AC_SUBST(ENABLE_OPTIMIZED,[[ENABLE_OPTIMIZED=1]]) +fi + +dnl --enable-profiling : check whether they want to do a profile build: +AC_ARG_ENABLE(profiling, AS_HELP_STRING( + --enable-profiling,[Compile with profiling enabled (default is NO)]),,enableval="no") +if test ${enableval} = "no" ; then + AC_SUBST(ENABLE_PROFILING,[[]]) +else + AC_SUBST(ENABLE_PROFILING,[[ENABLE_PROFILING=1]]) +fi + +dnl --enable-assertions : check whether they want to turn on assertions or not: +AC_ARG_ENABLE(assertions,AS_HELP_STRING( + --enable-assertions,[Compile with assertion checks enabled (default is YES)]),, enableval="yes") +if test ${enableval} = "yes" ; then + AC_SUBST(DISABLE_ASSERTIONS,[[]]) +else + AC_SUBST(DISABLE_ASSERTIONS,[[DISABLE_ASSERTIONS=1]]) +fi + +dnl --enable-werror : check whether we want Werror on by default +AC_ARG_ENABLE(werror,AS_HELP_STRING( + --enable-werror,[Compile with -Werror enabled (default is NO)]),, enableval="no") +case "$enableval" in + yes) AC_SUBST(ENABLE_WERROR,[1]) ;; + no) AC_SUBST(ENABLE_WERROR,[0]) ;; + default) AC_SUBST(ENABLE_WERROR,[0]);; + *) AC_MSG_ERROR([Invalid setting for --enable-werror. Use "yes" or "no"]) ;; +esac + +dnl --enable-expensive-checks : check whether they want to turn on expensive debug checks: +AC_ARG_ENABLE(expensive-checks,AS_HELP_STRING( + --enable-expensive-checks,[Compile with expensive debug checks enabled (default is NO)]),, enableval="no") +if test ${enableval} = "yes" ; then + AC_SUBST(ENABLE_EXPENSIVE_CHECKS,[[ENABLE_EXPENSIVE_CHECKS=1]]) + AC_SUBST(EXPENSIVE_CHECKS,[[yes]]) +else + AC_SUBST(ENABLE_EXPENSIVE_CHECKS,[[]]) + AC_SUBST(EXPENSIVE_CHECKS,[[no]]) +fi + +dnl --enable-debug-runtime : should runtime libraries have debug symbols? +AC_ARG_ENABLE(debug-runtime, + AS_HELP_STRING(--enable-debug-runtime,[Build runtime libs with debug symbols (default is NO)]),,enableval=no) +if test ${enableval} = "no" ; then + AC_SUBST(DEBUG_RUNTIME,[[]]) +else + AC_SUBST(DEBUG_RUNTIME,[[DEBUG_RUNTIME=1]]) +fi + +dnl --enable-debug-symbols : should even optimized compiler libraries +dnl have debug symbols? +AC_ARG_ENABLE(debug-symbols, + AS_HELP_STRING(--enable-debug-symbols,[Build compiler with debug symbols (default is NO if optimization is on and YES if it's off)]),,enableval=no) +if test ${enableval} = "no" ; then + AC_SUBST(DEBUG_SYMBOLS,[[]]) +else + AC_SUBST(DEBUG_SYMBOLS,[[DEBUG_SYMBOLS=1]]) +fi + +dnl --enable-keep-symbols : do not strip installed executables +AC_ARG_ENABLE(keep-symbols, + AS_HELP_STRING(--enable-keep-symbols,[Do not strip installed executables)]),,enableval=no) +if test ${enableval} = "no" ; then + AC_SUBST(KEEP_SYMBOLS,[[]]) +else + AC_SUBST(KEEP_SYMBOLS,[[KEEP_SYMBOLS=1]]) +fi + +dnl --enable-jit: check whether they want to enable the jit +AC_ARG_ENABLE(jit, + AS_HELP_STRING(--enable-jit, + [Enable Just In Time Compiling (default is YES)]),, + enableval=default) +if test ${enableval} = "no" +then + AC_SUBST(JIT,[[]]) +else + case "$llvm_cv_target_arch" in + x86) AC_SUBST(TARGET_HAS_JIT,1) ;; + Sparc) AC_SUBST(TARGET_HAS_JIT,0) ;; + PowerPC) AC_SUBST(TARGET_HAS_JIT,1) ;; + x86_64) AC_SUBST(TARGET_HAS_JIT,1) ;; + ARM) AC_SUBST(TARGET_HAS_JIT,1) ;; + AArch64) AC_SUBST(TARGET_HAS_JIT,0) ;; + Mips) AC_SUBST(TARGET_HAS_JIT,1) ;; + XCore) AC_SUBST(TARGET_HAS_JIT,0) ;; + MSP430) AC_SUBST(TARGET_HAS_JIT,0) ;; + Hexagon) AC_SUBST(TARGET_HAS_JIT,0) ;; + NVPTX) AC_SUBST(TARGET_HAS_JIT,0) ;; + SystemZ) AC_SUBST(TARGET_HAS_JIT,1) ;; + *) AC_SUBST(TARGET_HAS_JIT,0) ;; + esac +fi + +dnl Allow enablement of building and installing docs +AC_ARG_ENABLE(docs, + AS_HELP_STRING([--enable-docs], + [Build documents (default is YES)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(ENABLE_DOCS,[1]) ;; + no) AC_SUBST(ENABLE_DOCS,[0]) ;; + default) AC_SUBST(ENABLE_DOCS,[1]) ;; + *) AC_MSG_ERROR([Invalid setting for --enable-docs. Use "yes" or "no"]) ;; +esac + +dnl Allow enablement of doxygen generated documentation +AC_ARG_ENABLE(doxygen, + AS_HELP_STRING([--enable-doxygen], + [Build doxygen documentation (default is NO)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(ENABLE_DOXYGEN,[1]) ;; + no) AC_SUBST(ENABLE_DOXYGEN,[0]) ;; + default) AC_SUBST(ENABLE_DOXYGEN,[0]) ;; + *) AC_MSG_ERROR([Invalid setting for --enable-doxygen. Use "yes" or "no"]) ;; +esac + +dnl Allow disablement of threads +AC_ARG_ENABLE(threads, + AS_HELP_STRING([--enable-threads], + [Use threads if available (default is YES)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(LLVM_ENABLE_THREADS,[1]) ;; + no) AC_SUBST(LLVM_ENABLE_THREADS,[0]) ;; + default) AC_SUBST(LLVM_ENABLE_THREADS,[1]) ;; + *) AC_MSG_ERROR([Invalid setting for --enable-threads. Use "yes" or "no"]) ;; +esac +AC_DEFINE_UNQUOTED([LLVM_ENABLE_THREADS],$LLVM_ENABLE_THREADS, + [Define if threads enabled]) + +dnl Allow disablement of pthread.h +AC_ARG_ENABLE(pthreads, + AS_HELP_STRING([--enable-pthreads], + [Use pthreads if available (default is YES)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(ENABLE_PTHREADS,[1]) ;; + no) AC_SUBST(ENABLE_PTHREADS,[0]) ;; + default) AC_SUBST(ENABLE_PTHREADS,[1]) ;; + *) AC_MSG_ERROR([Invalid setting for --enable-pthreads. Use "yes" or "no"]) ;; +esac + +dnl Allow disablement of zlib +AC_ARG_ENABLE(zlib, + AS_HELP_STRING([--enable-zlib], + [Use zlib for compression/decompression if + available (default is YES)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(LLVM_ENABLE_ZLIB,[1]) ;; + no) AC_SUBST(LLVM_ENABLE_ZLIB,[0]) ;; + default) AC_SUBST(LLVM_ENABLE_ZLIB,[1]) ;; + *) AC_MSG_ERROR([Invalid setting for --enable-zlib. Use "yes" or "no"]) ;; +esac +AC_DEFINE_UNQUOTED([LLVM_ENABLE_ZLIB],$LLVM_ENABLE_ZLIB, + [Define if zlib is enabled]) + +dnl Allow building without position independent code +AC_ARG_ENABLE(pic, + AS_HELP_STRING([--enable-pic], + [Build LLVM with Position Independent Code (default is YES)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(ENABLE_PIC,[1]) ;; + no) AC_SUBST(ENABLE_PIC,[0]) ;; + default) AC_SUBST(ENABLE_PIC,[1]) ;; + *) AC_MSG_ERROR([Invalid setting for --enable-pic. Use "yes" or "no"]) ;; +esac +AC_DEFINE_UNQUOTED([ENABLE_PIC],$ENABLE_PIC, + [Define if position independent code is enabled]) + +dnl Allow building a shared library and linking tools against it. +AC_ARG_ENABLE(shared, + AS_HELP_STRING([--enable-shared], + [Build a shared library and link tools against it (default is NO)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(ENABLE_SHARED,[1]) ;; + no) AC_SUBST(ENABLE_SHARED,[0]) ;; + default) AC_SUBST(ENABLE_SHARED,[0]) ;; + *) AC_MSG_ERROR([Invalid setting for --enable-shared. Use "yes" or "no"]) ;; +esac + +dnl Allow libstdc++ is embedded in LLVM.dll. +AC_ARG_ENABLE(embed-stdcxx, + AS_HELP_STRING([--enable-embed-stdcxx], + [Build a shared library with embedded libstdc++ for Win32 DLL (default is NO)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(ENABLE_EMBED_STDCXX,[1]) ;; + no) AC_SUBST(ENABLE_EMBED_STDCXX,[0]) ;; + default) AC_SUBST(ENABLE_EMBED_STDCXX,[0]) ;; + *) AC_MSG_ERROR([Invalid setting for --enable-embed-stdcxx. Use "yes" or "no"]) ;; +esac + +dnl Enable embedding timestamp information into build. +AC_ARG_ENABLE(timestamps, + AS_HELP_STRING([--enable-timestamps], + [Enable embedding timestamp information in build (default is YES)]),, + enableval=default) +case "$enableval" in + yes) AC_SUBST(ENABLE_TIMESTAMPS,[1]) ;; + no) AC_SUBST(ENABLE_TIMESTAMPS,[0]) ;; + default) AC_SUBST(ENABLE_TIMESTAMPS,[1]) ;; + *) AC_MSG_ERROR([Invalid setting for --enable-timestamps. Use "yes" or "no"]) ;; +esac +AC_DEFINE_UNQUOTED([ENABLE_TIMESTAMPS],$ENABLE_TIMESTAMPS, + [Define if timestamp information (e.g., __DATE__) is allowed]) + +dnl Enable support for showing backtraces. +AC_ARG_ENABLE(backtraces, AS_HELP_STRING( + [--enable-backtraces], + [Enable embedding backtraces on crash (default is YES)]), + [case "$enableval" in + yes) llvm_cv_enable_backtraces="yes" ;; + no) llvm_cv_enable_backtraces="no" ;; + *) AC_MSG_ERROR([Invalid setting for --enable-backtraces. Use "yes" or "no"]) ;; + esac], + llvm_cv_enable_backtraces="yes") +if test "$llvm_cv_enable_backtraces" = "yes" ; then + AC_DEFINE([ENABLE_BACKTRACES],[1], + [Define if you want backtraces on crash]) +fi + +dnl Enable installing platform specific signal handling overrides, for improved +dnl CrashRecovery support or interaction with crash reporting software. This +dnl support may be inappropriate for some clients embedding LLVM as a library. +AC_ARG_ENABLE(crash-overrides, AS_HELP_STRING( + [--enable-crash-overrides], + [Enable crash handling overrides (default is YES)]), + [case "$enableval" in + yes) llvm_cv_enable_crash_overrides="yes" ;; + no) llvm_cv_enable_crash_overrides="no" ;; + *) AC_MSG_ERROR([Invalid setting for --enable-crash-overrides. Use "yes" or "no"]) ;; + esac], + llvm_cv_enable_crash_overrides="yes") +if test "$llvm_cv_enable_crash_overrides" = "yes" ; then + AC_DEFINE([ENABLE_CRASH_OVERRIDES],[1], + [Define to enable crash handling overrides]) +fi + +dnl Allow specific targets to be specified for building (or not) +TARGETS_TO_BUILD="" +AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets], + [Build specific host targets: all or target1,target2,... Valid targets are: + host, x86, x86_64, sparc, powerpc, arm, aarch64, mips, hexagon, + xcore, msp430, nvptx, systemz, r600, and cpp (default=all)]),, + enableval=all) +if test "$enableval" = host-only ; then + enableval=host +fi +case "$enableval" in + all) TARGETS_TO_BUILD="X86 Sparc PowerPC AArch64 ARM Mips XCore MSP430 CppBackend NVPTX Hexagon SystemZ R600" ;; + *)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do + case "$a_target" in + x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; + x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; + sparc) TARGETS_TO_BUILD="Sparc $TARGETS_TO_BUILD" ;; + powerpc) TARGETS_TO_BUILD="PowerPC $TARGETS_TO_BUILD" ;; + aarch64) TARGETS_TO_BUILD="AArch64 $TARGETS_TO_BUILD" ;; + arm) TARGETS_TO_BUILD="ARM $TARGETS_TO_BUILD" ;; + mips) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; + mipsel) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; + mips64) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; + mips64el) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; + xcore) TARGETS_TO_BUILD="XCore $TARGETS_TO_BUILD" ;; + msp430) TARGETS_TO_BUILD="MSP430 $TARGETS_TO_BUILD" ;; + cpp) TARGETS_TO_BUILD="CppBackend $TARGETS_TO_BUILD" ;; + hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;; + nvptx) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;; + systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; + r600) TARGETS_TO_BUILD="R600 $TARGETS_TO_BUILD" ;; + host) case "$llvm_cv_target_arch" in + x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; + x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; + Sparc) TARGETS_TO_BUILD="Sparc $TARGETS_TO_BUILD" ;; + PowerPC) TARGETS_TO_BUILD="PowerPC $TARGETS_TO_BUILD" ;; + AArch64) TARGETS_TO_BUILD="AArch64 $TARGETS_TO_BUILD" ;; + ARM) TARGETS_TO_BUILD="ARM $TARGETS_TO_BUILD" ;; + Mips) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; + XCore) TARGETS_TO_BUILD="XCore $TARGETS_TO_BUILD" ;; + MSP430) TARGETS_TO_BUILD="MSP430 $TARGETS_TO_BUILD" ;; + Hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;; + NVPTX) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;; + SystemZ) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; + *) AC_MSG_ERROR([Can not set target to build]) ;; + esac ;; + *) AC_MSG_ERROR([Unrecognized target $a_target]) ;; + esac + done + ;; +esac + +AC_ARG_ENABLE([experimental-targets],AS_HELP_STRING([--enable-experimental-targets], + [Build experimental host targets: disable or target1,target2,... + (default=disable)]),, + enableval=disable) + +if test ${enableval} != "disable" +then + TARGETS_TO_BUILD="$enableval $TARGETS_TO_BUILD" +fi + +AC_SUBST(TARGETS_TO_BUILD,$TARGETS_TO_BUILD) + +dnl Determine whether we are building LLVM support for the native architecture. +dnl If so, define LLVM_NATIVE_ARCH to that LLVM target. +for a_target in $TARGETS_TO_BUILD; do + if test "$a_target" = "$LLVM_NATIVE_ARCH"; then + AC_DEFINE_UNQUOTED(LLVM_NATIVE_ARCH, $LLVM_NATIVE_ARCH, + [LLVM architecture name for the native architecture, if available]) + LLVM_NATIVE_TARGET="LLVMInitialize${LLVM_NATIVE_ARCH}Target" + LLVM_NATIVE_TARGETINFO="LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo" + LLVM_NATIVE_TARGETMC="LLVMInitialize${LLVM_NATIVE_ARCH}TargetMC" + LLVM_NATIVE_ASMPRINTER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter" + if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/Makefile ; then + LLVM_NATIVE_ASMPARSER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser" + fi + if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/Disassembler/Makefile ; then + LLVM_NATIVE_DISASSEMBLER="LLVMInitialize${LLVM_NATIVE_ARCH}Disassembler" + fi + AC_DEFINE_UNQUOTED(LLVM_NATIVE_TARGET, $LLVM_NATIVE_TARGET, + [LLVM name for the native Target init function, if available]) + AC_DEFINE_UNQUOTED(LLVM_NATIVE_TARGETINFO, $LLVM_NATIVE_TARGETINFO, + [LLVM name for the native TargetInfo init function, if available]) + AC_DEFINE_UNQUOTED(LLVM_NATIVE_TARGETMC, $LLVM_NATIVE_TARGETMC, + [LLVM name for the native target MC init function, if available]) + AC_DEFINE_UNQUOTED(LLVM_NATIVE_ASMPRINTER, $LLVM_NATIVE_ASMPRINTER, + [LLVM name for the native AsmPrinter init function, if available]) + if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/Makefile ; then + AC_DEFINE_UNQUOTED(LLVM_NATIVE_ASMPARSER, $LLVM_NATIVE_ASMPARSER, + [LLVM name for the native AsmParser init function, if available]) + fi + if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/Disassembler/Makefile ; then + AC_DEFINE_UNQUOTED(LLVM_NATIVE_DISASSEMBLER, $LLVM_NATIVE_DISASSEMBLER, + [LLVM name for the native Disassembler init function, if available]) + fi + fi +done + +dnl Build the LLVM_TARGET and LLVM_... macros for Targets.def and the individual +dnl target feature def files. +LLVM_ENUM_TARGETS="" +LLVM_ENUM_ASM_PRINTERS="" +LLVM_ENUM_ASM_PARSERS="" +LLVM_ENUM_DISASSEMBLERS="" +for target_to_build in $TARGETS_TO_BUILD; do + LLVM_ENUM_TARGETS="LLVM_TARGET($target_to_build) $LLVM_ENUM_TARGETS" + if test -f ${srcdir}/lib/Target/${target_to_build}/*AsmPrinter.cpp ; then + LLVM_ENUM_ASM_PRINTERS="LLVM_ASM_PRINTER($target_to_build) $LLVM_ENUM_ASM_PRINTERS"; + fi + if test -f ${srcdir}/lib/Target/${target_to_build}/AsmParser/Makefile ; then + LLVM_ENUM_ASM_PARSERS="LLVM_ASM_PARSER($target_to_build) $LLVM_ENUM_ASM_PARSERS"; + fi + if test -f ${srcdir}/lib/Target/${target_to_build}/Disassembler/Makefile ; then + LLVM_ENUM_DISASSEMBLERS="LLVM_DISASSEMBLER($target_to_build) $LLVM_ENUM_DISASSEMBLERS"; + fi +done +AC_SUBST(LLVM_ENUM_TARGETS) +AC_SUBST(LLVM_ENUM_ASM_PRINTERS) +AC_SUBST(LLVM_ENUM_ASM_PARSERS) +AC_SUBST(LLVM_ENUM_DISASSEMBLERS) + +dnl Override the option to use for optimized builds. +AC_ARG_WITH(optimize-option, + AS_HELP_STRING([--with-optimize-option], + [Select the compiler options to use for optimized builds]),, + withval=default) +AC_MSG_CHECKING([optimization flags]) +case "$withval" in + default) + case "$llvm_cv_os_type" in + FreeBSD) optimize_option=-O2 ;; + MingW) optimize_option=-O2 ;; + *) optimize_option=-O3 ;; + esac ;; + *) optimize_option="$withval" ;; +esac +AC_SUBST(OPTIMIZE_OPTION,$optimize_option) +AC_MSG_RESULT([$optimize_option]) + +dnl Specify extra build options +AC_ARG_WITH(extra-options, + AS_HELP_STRING([--with-extra-options], + [Specify additional options to compile LLVM with]),, + withval=default) +case "$withval" in + default) EXTRA_OPTIONS= ;; + *) EXTRA_OPTIONS=$withval ;; +esac +AC_SUBST(EXTRA_OPTIONS,$EXTRA_OPTIONS) + +dnl Specify extra linker build options +AC_ARG_WITH(extra-ld-options, + AS_HELP_STRING([--with-extra-ld-options], + [Specify additional options to link LLVM with]),, + withval=default) +case "$withval" in + default) EXTRA_LD_OPTIONS= ;; + *) EXTRA_LD_OPTIONS=$withval ;; +esac +AC_SUBST(EXTRA_LD_OPTIONS,$EXTRA_LD_OPTIONS) + +dnl Allow specific bindings to be specified for building (or not) +AC_ARG_ENABLE([bindings],AS_HELP_STRING([--enable-bindings], + [Build specific language bindings: all,auto,none,{binding-name} (default=auto)]),, + enableval=default) +BINDINGS_TO_BUILD="" +case "$enableval" in + yes | default | auto) BINDINGS_TO_BUILD="auto" ;; + all ) BINDINGS_TO_BUILD="ocaml" ;; + none | no) BINDINGS_TO_BUILD="" ;; + *)for a_binding in `echo $enableval|sed -e 's/,/ /g' ` ; do + case "$a_binding" in + ocaml) BINDINGS_TO_BUILD="ocaml $BINDINGS_TO_BUILD" ;; + *) AC_MSG_ERROR([Unrecognized binding $a_binding]) ;; + esac + done + ;; +esac + +dnl Allow the ocaml libdir to be overridden. This could go in a configure +dnl script for bindings/ocaml/configure, except that its auto value depends on +dnl OCAMLC, which is found here to support tests. +AC_ARG_WITH([ocaml-libdir], + [AS_HELP_STRING([--with-ocaml-libdir], + [Specify install location for ocaml bindings (default is stdlib)])], + [], + [withval=auto]) +case "$withval" in + auto) with_ocaml_libdir="$withval" ;; + /* | [[A-Za-z]]:[[\\/]]*) with_ocaml_libdir="$withval" ;; + *) AC_MSG_ERROR([Invalid path for --with-ocaml-libdir. Provide full path]) ;; +esac + +AC_ARG_WITH(clang-srcdir, + AS_HELP_STRING([--with-clang-srcdir], + [Directory to the out-of-tree Clang source]),, + withval="-") +case "$withval" in + -) clang_src_root="" ;; + /* | [[A-Za-z]]:[[\\/]]*) clang_src_root="$withval" ;; + *) clang_src_root="$ac_pwd/$withval" ;; +esac +AC_SUBST(CLANG_SRC_ROOT,[$clang_src_root]) + +AC_ARG_WITH(clang-resource-dir, + AS_HELP_STRING([--with-clang-resource-dir], + [Relative directory from the Clang binary for resource files]),, + withval="") +AC_DEFINE_UNQUOTED(CLANG_RESOURCE_DIR,"$withval", + [Relative directory for resource files]) + +AC_ARG_WITH(c-include-dirs, + AS_HELP_STRING([--with-c-include-dirs], + [Colon separated list of directories clang will search for headers]),, + withval="") +AC_DEFINE_UNQUOTED(C_INCLUDE_DIRS,"$withval", + [Directories clang will search for headers]) + +# Clang normally uses the system c++ headers and libraries. With this option, +# clang will use the ones provided by a gcc installation instead. This option should +# be passed the same value that was used with --prefix when configuring gcc. +AC_ARG_WITH(gcc-toolchain, + AS_HELP_STRING([--with-gcc-toolchain], + [Directory where gcc is installed.]),, + withval="") +AC_DEFINE_UNQUOTED(GCC_INSTALL_PREFIX,"$withval", + [Directory where gcc is installed.]) + +AC_ARG_WITH(default-sysroot, + AS_HELP_STRING([--with-default-sysroot], + [Add --sysroot= to all compiler invocations.]),, + withval="") +AC_DEFINE_UNQUOTED(DEFAULT_SYSROOT,"$withval", + [Default to all compiler invocations for --sysroot=.]) + +dnl Allow linking of LLVM with GPLv3 binutils code. +AC_ARG_WITH(binutils-include, + AS_HELP_STRING([--with-binutils-include], + [Specify path to binutils/include/ containing plugin-api.h file for gold plugin.]),, + withval=default) +case "$withval" in + default) WITH_BINUTILS_INCDIR=default ;; + /* | [[A-Za-z]]:[[\\/]]*) WITH_BINUTILS_INCDIR=$withval ;; + *) AC_MSG_ERROR([Invalid path for --with-binutils-include. Provide full path]) ;; +esac +if test "x$WITH_BINUTILS_INCDIR" != xdefault ; then + AC_SUBST(BINUTILS_INCDIR,$WITH_BINUTILS_INCDIR) + if test ! -f "$WITH_BINUTILS_INCDIR/plugin-api.h"; then + echo "$WITH_BINUTILS_INCDIR/plugin-api.h" + AC_MSG_ERROR([Invalid path to directory containing plugin-api.h.]); + fi +fi + +dnl Specify the URL where bug reports should be submitted. +AC_ARG_WITH(bug-report-url, + AS_HELP_STRING([--with-bug-report-url], + [Specify the URL where bug reports should be submitted (default=http://llvm.org/bugs/)]),, + withval="http://llvm.org/bugs/") +AC_DEFINE_UNQUOTED(BUG_REPORT_URL,"$withval", + [Bug report URL.]) + +dnl --enable-terminfo: check whether the user wants to control use of terminfo: +AC_ARG_ENABLE(terminfo,AS_HELP_STRING( + [--enable-terminfo], + [Query the terminfo database if available (default is YES)]), + [case "$enableval" in + yes) llvm_cv_enable_terminfo="yes" ;; + no) llvm_cv_enable_terminfo="no" ;; + *) AC_MSG_ERROR([Invalid setting for --enable-terminfo. Use "yes" or "no"]) ;; + esac], + llvm_cv_enable_terminfo="yes") + +dnl --enable-libffi : check whether the user wants to turn off libffi: +AC_ARG_ENABLE(libffi,AS_HELP_STRING( + --enable-libffi,[Check for the presence of libffi (default is NO)]), + [case "$enableval" in + yes) llvm_cv_enable_libffi="yes" ;; + no) llvm_cv_enable_libffi="no" ;; + *) AC_MSG_ERROR([Invalid setting for --enable-libffi. Use "yes" or "no"]) ;; + esac], + llvm_cv_enable_libffi=no) + +AC_ARG_WITH(internal-prefix, + AS_HELP_STRING([--with-internal-prefix], + [Installation directory for internal files]),, + withval="") +AC_SUBST(INTERNAL_PREFIX,[$withval]) + +dnl===-----------------------------------------------------------------------=== +dnl=== +dnl=== SECTION 4: Check for programs we need and that they are the right version +dnl=== +dnl===-----------------------------------------------------------------------=== + +AC_PROG_NM +AC_SUBST(NM) + +dnl Check for the tools that the makefiles require +AC_CHECK_GNU_MAKE +AC_PROG_LN_S +AC_PATH_PROG(CMP, [cmp], [cmp]) +AC_PATH_PROG(CP, [cp], [cp]) +AC_PATH_PROG(DATE, [date], [date]) +AC_PATH_PROG(FIND, [find], [find]) +AC_PATH_PROG(GREP, [grep], [grep]) +AC_PATH_PROG(MKDIR,[mkdir],[mkdir]) +AC_PATH_PROG(MV, [mv], [mv]) +AC_PROG_RANLIB +AC_CHECK_TOOL(AR, ar, false) +AC_PATH_PROG(RM, [rm], [rm]) +AC_PATH_PROG(SED, [sed], [sed]) +AC_PATH_PROG(TAR, [tar], [gtar]) +AC_PATH_PROG(BINPWD,[pwd], [pwd]) + +dnl Looking for misc. graph plotting software +AC_PATH_PROG(GRAPHVIZ, [Graphviz], [echo Graphviz]) +if test "$GRAPHVIZ" != "echo Graphviz" ; then + AC_DEFINE([HAVE_GRAPHVIZ],[1],[Define if the Graphviz program is available]) + dnl If we're targeting for mingw we should emit windows paths, not msys + if test "$llvm_cv_os_type" = "MingW" ; then + GRAPHVIZ=`echo $GRAPHVIZ | sed 's/^\/\([[A-Za-z]]\)\//\1:\//' ` + fi + AC_DEFINE_UNQUOTED([LLVM_PATH_GRAPHVIZ],"$GRAPHVIZ${EXEEXT}", + [Define to path to Graphviz program if found or 'echo Graphviz' otherwise]) +fi +AC_PATH_PROG(DOT, [dot], [echo dot]) +if test "$DOT" != "echo dot" ; then + AC_DEFINE([HAVE_DOT],[1],[Define if the dot program is available]) + dnl If we're targeting for mingw we should emit windows paths, not msys + if test "$llvm_cv_os_type" = "MingW" ; then + DOT=`echo $DOT | sed 's/^\/\([[A-Za-z]]\)\//\1:\//' ` + fi + AC_DEFINE_UNQUOTED([LLVM_PATH_DOT],"$DOT${EXEEXT}", + [Define to path to dot program if found or 'echo dot' otherwise]) +fi +AC_PATH_PROG(FDP, [fdp], [echo fdp]) +if test "$FDP" != "echo fdp" ; then + AC_DEFINE([HAVE_FDP],[1],[Define if the neat program is available]) + dnl If we're targeting for mingw we should emit windows paths, not msys + if test "$llvm_cv_os_type" = "MingW" ; then + FDP=`echo $FDP | sed 's/^\/\([[A-Za-z]]\)\//\1:\//' ` + fi + AC_DEFINE_UNQUOTED([LLVM_PATH_FDP],"$FDP${EXEEXT}", + [Define to path to fdp program if found or 'echo fdp' otherwise]) +fi +AC_PATH_PROG(NEATO, [neato], [echo neato]) +if test "$NEATO" != "echo neato" ; then + AC_DEFINE([HAVE_NEATO],[1],[Define if the neat program is available]) + dnl If we're targeting for mingw we should emit windows paths, not msys + if test "$llvm_cv_os_type" = "MingW" ; then + NEATO=`echo $NEATO | sed 's/^\/\([[A-Za-z]]\)\//\1:\//' ` + fi + AC_DEFINE_UNQUOTED([LLVM_PATH_NEATO],"$NEATO${EXEEXT}", + [Define to path to neato program if found or 'echo neato' otherwise]) +fi +AC_PATH_PROG(TWOPI, [twopi], [echo twopi]) +if test "$TWOPI" != "echo twopi" ; then + AC_DEFINE([HAVE_TWOPI],[1],[Define if the neat program is available]) + dnl If we're targeting for mingw we should emit windows paths, not msys + if test "$llvm_cv_os_type" = "MingW" ; then + TWOPI=`echo $TWOPI | sed 's/^\/\([[A-Za-z]]\)\//\1:\//' ` + fi + AC_DEFINE_UNQUOTED([LLVM_PATH_TWOPI],"$TWOPI${EXEEXT}", + [Define to path to twopi program if found or 'echo twopi' otherwise]) +fi +AC_PATH_PROG(CIRCO, [circo], [echo circo]) +if test "$CIRCO" != "echo circo" ; then + AC_DEFINE([HAVE_CIRCO],[1],[Define if the neat program is available]) + dnl If we're targeting for mingw we should emit windows paths, not msys + if test "$llvm_cv_os_type" = "MingW" ; then + CIRCO=`echo $CIRCO | sed 's/^\/\([[A-Za-z]]\)\//\1:\//' ` + fi + AC_DEFINE_UNQUOTED([LLVM_PATH_CIRCO],"$CIRCO${EXEEXT}", + [Define to path to circo program if found or 'echo circo' otherwise]) +fi +AC_PATH_PROGS(GV, [gv gsview32], [echo gv]) +if test "$GV" != "echo gv" ; then + AC_DEFINE([HAVE_GV],[1],[Define if the gv program is available]) + dnl If we're targeting for mingw we should emit windows paths, not msys + if test "$llvm_cv_os_type" = "MingW" ; then + GV=`echo $GV | sed 's/^\/\([[A-Za-z]]\)\//\1:\//' ` + fi + AC_DEFINE_UNQUOTED([LLVM_PATH_GV],"$GV${EXEEXT}", + [Define to path to gv program if found or 'echo gv' otherwise]) +fi +AC_PATH_PROG(DOTTY, [dotty], [echo dotty]) +if test "$DOTTY" != "echo dotty" ; then + AC_DEFINE([HAVE_DOTTY],[1],[Define if the dotty program is available]) + dnl If we're targeting for mingw we should emit windows paths, not msys + if test "$llvm_cv_os_type" = "MingW" ; then + DOTTY=`echo $DOTTY | sed 's/^\/\([[A-Za-z]]\)\//\1:\//' ` + fi + AC_DEFINE_UNQUOTED([LLVM_PATH_DOTTY],"$DOTTY${EXEEXT}", + [Define to path to dotty program if found or 'echo dotty' otherwise]) +fi +AC_PATH_PROGS(XDOT, [xdot xdot.py], [echo xdot]) +if test "$XDOT" != "echo xdot" ; then + AC_DEFINE([HAVE_XDOT],[1],[Define if the xdot program is available]) + dnl If we're targeting for mingw we should emit windows paths, not msys + if test "$llvm_cv_os_type" = "MingW" ; then + XDOT=`echo $XDOT | sed 's/^\/\([[A-Za-z]]\)\//\1:\//' ` + fi + AC_DEFINE_UNQUOTED([LLVM_PATH_XDOT],"$XDOT${EXEEXT}", + [Define to path to xdot program if found or 'echo xdot' otherwise]) +fi + +dnl Find the install program +AC_PROG_INSTALL +dnl Prepend src dir to install path dir if it's a relative path +dnl This is a hack for installs that take place in something other +dnl than the top level. +case "$INSTALL" in + [[\\/$]]* | ?:[[\\/]]* ) ;; + *) INSTALL="\\\$(TOPSRCDIR)/$INSTALL" ;; +esac + +dnl Checks for documentation and testing tools that we can do without. If these +dnl are not found then they are set to "true" which always succeeds but does +dnl nothing. This just lets the build output show that we could have done +dnl something if the tool was available. +AC_PATH_PROG(BZIP2, [bzip2]) +AC_PATH_PROG(CAT, [cat]) +AC_PATH_PROG(DOXYGEN, [doxygen]) +AC_PATH_PROG(GROFF, [groff]) +AC_PATH_PROG(GZIPBIN, [gzip]) +AC_PATH_PROG(PDFROFF, [pdfroff]) +AC_PATH_PROG(ZIP, [zip]) +AC_PATH_PROGS(OCAMLC, [ocamlc]) +AC_PATH_PROGS(OCAMLOPT, [ocamlopt]) +AC_PATH_PROGS(OCAMLDEP, [ocamldep]) +AC_PATH_PROGS(OCAMLDOC, [ocamldoc]) +AC_PATH_PROGS(GAS, [gas as]) + +dnl Get the version of the linker in use. +AC_LINK_GET_VERSION + +dnl Determine whether the linker supports the -R option. +AC_LINK_USE_R + +dnl Determine whether the compiler supports the -rdynamic option. +AC_LINK_EXPORT_DYNAMIC + +dnl Determine whether the linker supports the --version-script option. +AC_LINK_VERSION_SCRIPT + +dnl Check for libtool and the library that has dlopen function (which must come +dnl before the AC_PROG_LIBTOOL check in order to enable dlopening libraries with +dnl libtool). +AC_LIBTOOL_DLOPEN +AC_LIB_LTDL + +AC_MSG_CHECKING([tool compatibility]) + +dnl Ensure that compilation tools are GCC or a GNU compatible compiler such as +dnl ICC; we use GCC specific options in the makefiles so the compiler needs +dnl to support those options. +dnl "icc" emits gcc signatures +dnl "icc -no-gcc" emits no gcc signature BUT is still compatible +ICC=no +IXX=no +case $CC in + icc*|icpc*) + ICC=yes + IXX=yes + ;; + *) + ;; +esac + +if test "$GCC" != "yes" && test "$ICC" != "yes" +then + AC_MSG_ERROR([gcc|icc required but not found]) +fi + +dnl Ensure that compilation tools are compatible with GCC extensions +if test "$GXX" != "yes" && test "$IXX" != "yes" +then + AC_MSG_ERROR([g++|clang++|icc required but not found]) +fi + +dnl Verify that GCC is version 3.0 or higher +if test "$GCC" = "yes" +then + AC_COMPILE_IFELSE( +[ + AC_LANG_SOURCE([[ + #if !defined(__GNUC__) || __GNUC__ < 3 + #error Unsupported GCC version + #endif + ]]) +], +[], [AC_MSG_ERROR([gcc 3.x required, but you have a lower version])]) +fi + +dnl Check for GNU Make. We use its extensions, so don't build without it +if test -z "$llvm_cv_gnu_make_command" +then + AC_MSG_ERROR([GNU Make required but not found]) +fi + +dnl Tool compatibility is okay if we make it here. +AC_MSG_RESULT([ok]) + +dnl Check optional compiler flags. +AC_MSG_CHECKING([optional compiler flags]) +CXX_FLAG_CHECK(NO_VARIADIC_MACROS, [-Wno-variadic-macros]) +CXX_FLAG_CHECK(NO_MISSING_FIELD_INITIALIZERS, [-Wno-missing-field-initializers]) +CXX_FLAG_CHECK(COVERED_SWITCH_DEFAULT, [-Wcovered-switch-default]) + +dnl GCC's potential uninitialized use analysis is weak and presents lots of +dnl false positives, so disable it. +NO_UNINITIALIZED= +NO_MAYBE_UNINITIALIZED= +if test "$GXX" = "yes" +then + CXX_FLAG_CHECK(NO_MAYBE_UNINITIALIZED, [-Wno-maybe-uninitialized]) + dnl gcc 4.7 introduced -Wmaybe-uninitialized to distinguish cases which are + dnl known to be uninitialized from cases which might be uninitialized. We + dnl still want to catch the first kind of errors. + if test -z "$NO_MAYBE_UNINITIALIZED" + then + CXX_FLAG_CHECK(NO_UNINITIALIZED, [-Wno-uninitialized]) + fi +fi +AC_MSG_RESULT([$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS $COVERED_SWITCH_DEFAULT $NO_UNINITIALIZED $NO_MAYBE_UNINITIALIZED]) + +AC_ARG_WITH([python], + [AS_HELP_STRING([--with-python], [path to python])], + [PYTHON="$withval"]) + +if test -n "$PYTHON" && test -x "$PYTHON" ; then + AC_MSG_CHECKING([for python]) + AC_MSG_RESULT([user defined: $with_python]) +else + if test -n "$PYTHON" ; then + AC_MSG_WARN([specified python ($PYTHON) is not usable, searching path]) + fi + + AC_PATH_PROG([PYTHON], [python python2 python26], + [AC_MSG_RESULT([not found]) + AC_MSG_ERROR([could not find python 2.5 or higher])]) +fi + +AC_MSG_CHECKING([for python >= 2.5]) +ac_python_version=`$PYTHON -V 2>&1 | cut -d' ' -f2` +ac_python_version_major=`echo $ac_python_version | cut -d'.' -f1` +ac_python_version_minor=`echo $ac_python_version | cut -d'.' -f2` +ac_python_version_patch=`echo $ac_python_version | cut -d'.' -f3` +if test "$ac_python_version_major" -gt "2" || \ + (test "$ac_python_version_major" -eq "2" && \ + test "$ac_python_version_minor" -ge "5") ; then + AC_MSG_RESULT([$PYTHON ($ac_python_version)]) +else + AC_MSG_RESULT([not found]) + AC_MSG_FAILURE([found python $ac_python_version ($PYTHON); required >= 2.5]) +fi + +dnl===-----------------------------------------------------------------------=== +dnl=== +dnl=== SECTION 5: Check for libraries +dnl=== +dnl===-----------------------------------------------------------------------=== + +AC_CHECK_LIB(m,sin) +if test "$llvm_cv_os_type" = "MingW" ; then + AC_CHECK_LIB(imagehlp, main) + AC_CHECK_LIB(psapi, main) + AC_CHECK_LIB(shell32, main) +fi + +dnl dlopen() is required for plugin support. +AC_SEARCH_LIBS(dlopen,dl,AC_DEFINE([HAVE_DLOPEN],[1], + [Define if dlopen() is available on this platform.]), + AC_MSG_WARN([dlopen() not found - disabling plugin support])) + +dnl Search for the clock_gettime() function. Note that we rely on the POSIX +dnl macros to detect whether clock_gettime is available, this just finds the +dnl right libraries to link with. +AC_SEARCH_LIBS(clock_gettime,rt) + +dnl The curses library is optional; used for querying terminal info +if test "$llvm_cv_enable_terminfo" = "yes" ; then + dnl We need the has_color functionality in curses for it to be useful. + AC_SEARCH_LIBS(setupterm,tinfo terminfo curses ncurses ncursesw, + AC_DEFINE([HAVE_TERMINFO],[1], + [Define if the setupterm() function is supported this platform.])) +fi + +dnl libffi is optional; used to call external functions from the interpreter +if test "$llvm_cv_enable_libffi" = "yes" ; then + AC_SEARCH_LIBS(ffi_call,ffi,AC_DEFINE([HAVE_FFI_CALL],[1], + [Define if libffi is available on this platform.]), + AC_MSG_ERROR([libffi not found - configure without --enable-libffi to compile without it])) +fi + +dnl mallinfo is optional; the code can compile (minus features) without it +AC_SEARCH_LIBS(mallinfo,malloc,AC_DEFINE([HAVE_MALLINFO],[1], + [Define if mallinfo() is available on this platform.])) + +dnl pthread locking functions are optional - but llvm will not be thread-safe +dnl without locks. +if test "$LLVM_ENABLE_THREADS" -eq 1 && test "$ENABLE_PTHREADS" -eq 1 ; then + AC_CHECK_LIB(pthread, pthread_mutex_init) + AC_SEARCH_LIBS(pthread_mutex_lock,pthread, + AC_DEFINE([HAVE_PTHREAD_MUTEX_LOCK],[1], + [Have pthread_mutex_lock])) + AC_SEARCH_LIBS(pthread_rwlock_init,pthread, + AC_DEFINE([HAVE_PTHREAD_RWLOCK_INIT],[1], + [Have pthread_rwlock_init])) + AC_SEARCH_LIBS(pthread_getspecific,pthread, + AC_DEFINE([HAVE_PTHREAD_GETSPECIFIC],[1], + [Have pthread_getspecific])) +fi + +dnl zlib is optional; used for compression/uncompression +if test "$LLVM_ENABLE_ZLIB" -eq 1 ; then + AC_CHECK_LIB(z, compress2) +fi + +dnl Allow extra x86-disassembler library +AC_ARG_WITH(udis86, + AS_HELP_STRING([--with-udis86=], + [Use udis86 external x86 disassembler library]), + [ + AC_SUBST(USE_UDIS86, [1]) + case "$withval" in + /usr/lib|yes) ;; + *) LDFLAGS="$LDFLAGS -L${withval}" ;; + esac + AC_CHECK_LIB(udis86, ud_init, [], [ + echo "Error! You need to have libudis86 around." + exit -1 + ]) + ], + AC_SUBST(USE_UDIS86, [0])) +AC_DEFINE_UNQUOTED([USE_UDIS86],$USE_UDIS86, + [Define if use udis86 library]) + +dnl Allow OProfile support for JIT output. +AC_ARG_WITH(oprofile, + AS_HELP_STRING([--with-oprofile=], + [Tell OProfile >= 0.9.4 how to symbolize JIT output]), + [ + AC_SUBST(USE_OPROFILE, [1]) + case "$withval" in + /usr|yes) llvm_cv_oppath=/usr/lib/oprofile ;; + no) llvm_cv_oppath= + AC_SUBST(USE_OPROFILE, [0]) ;; + *) llvm_cv_oppath="${withval}/lib/oprofile" + CPPFLAGS="-I${withval}/include";; + esac + case $llvm_cv_os_type in + Linux) + if test -n "$llvm_cv_oppath" ; then + LIBS="$LIBS -lopagent -L${llvm_cv_oppath} -Wl,-rpath,${llvm_cv_oppath}" + dnl Work around http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=537744: + dnl libbfd is not included properly in libopagent in some Debian + dnl versions. If libbfd isn't found at all, we assume opagent works + dnl anyway. + AC_SEARCH_LIBS(bfd_init, bfd, [], []) + AC_SEARCH_LIBS(op_open_agent, opagent, [], [ + echo "Error! You need to have libopagent around." + exit -1 + ]) + AC_CHECK_HEADER([opagent.h], [], [ + echo "Error! You need to have opagent.h around." + exit -1 + ]) + fi ;; + *) + AC_MSG_ERROR([OProfile support is available on Linux only.]) ;; + esac + ], + [ + AC_SUBST(USE_OPROFILE, [0]) + ]) +AC_DEFINE_UNQUOTED([LLVM_USE_OPROFILE],$USE_OPROFILE, + [Define if we have the oprofile JIT-support library]) + +dnl Enable support for Intel JIT Events API. +AC_ARG_WITH(intel-jitevents, + AS_HELP_STRING([--with-intel-jitevents Notify Intel JIT profiling API of generated code]), + [ + case "$withval" in + yes) AC_SUBST(USE_INTEL_JITEVENTS,[1]);; + no) AC_SUBST(USE_INTEL_JITEVENTS,[0]);; + *) AC_MSG_ERROR([Invalid setting for --with-intel-jitevents. Use "yes" or "no"]);; + esac + + case $llvm_cv_os_type in + Linux|Win32|Cygwin|MingW) ;; + *) AC_MSG_ERROR([Intel JIT API support is available on Linux and Windows only.]);; + esac + + case "$llvm_cv_target_arch" in + x86|x86_64) ;; + *) AC_MSG_ERROR([Target architecture $llvm_cv_target_arch does not support Intel JIT Events API.]);; + esac + ], + [ + AC_SUBST(USE_INTEL_JITEVENTS, [0]) + ]) +AC_DEFINE_UNQUOTED([LLVM_USE_INTEL_JITEVENTS],$USE_INTEL_JITEVENTS, + [Define if we have the Intel JIT API runtime support library]) + +dnl Check for libxml2 +dnl Right now we're just checking for the existence, we could also check for a +dnl particular version via --version on xml2-config +AC_CHECK_PROGS(XML2CONFIG, xml2-config) + +AC_MSG_CHECKING(for libxml2 includes) +if test "x$XML2CONFIG" = "x"; then + AC_MSG_RESULT(xml2-config not found) +else + LIBXML2_INC=`$XML2CONFIG --cflags` + AC_MSG_RESULT($LIBXML2_INC) + AC_CHECK_LIB(xml2, xmlReadFile,[AC_DEFINE([CLANG_HAVE_LIBXML],1,[Define if we have libxml2]) + LIBXML2_LIBS="-lxml2"]) +fi +AC_SUBST(LIBXML2_LIBS) +AC_SUBST(LIBXML2_INC) + +dnl===-----------------------------------------------------------------------=== +dnl=== +dnl=== SECTION 6: Check for header files +dnl=== +dnl===-----------------------------------------------------------------------=== + +dnl First, use autoconf provided macros for specific headers that we need +dnl We don't check for ancient stuff or things that are guaranteed to be there +dnl by the C++ standard. We always use the versions of C headers. +dnl Generally we're looking for POSIX headers. +AC_HEADER_DIRENT +AC_HEADER_MMAP_ANONYMOUS +AC_HEADER_STAT +AC_HEADER_SYS_WAIT +AC_HEADER_TIME + +AC_LANG_PUSH([C++]) +AC_CHECK_HEADERS([cxxabi.h]) +AC_LANG_POP([C++]) +AC_CHECK_HEADERS([dlfcn.h execinfo.h fcntl.h inttypes.h link.h]) +AC_CHECK_HEADERS([malloc.h setjmp.h signal.h stdint.h termios.h unistd.h]) +AC_CHECK_HEADERS([utime.h]) +AC_CHECK_HEADERS([sys/mman.h sys/param.h sys/resource.h sys/time.h sys/uio.h]) +AC_CHECK_HEADERS([sys/ioctl.h malloc/malloc.h mach/mach.h]) +AC_CHECK_HEADERS([valgrind/valgrind.h]) +AC_CHECK_HEADERS([fenv.h]) +AC_CHECK_DECLS([FE_ALL_EXCEPT, FE_INEXACT], [], [], [[#include ]]) +if test "$LLVM_ENABLE_THREADS" -eq 1 && test "$ENABLE_PTHREADS" -eq 1 ; then + AC_CHECK_HEADERS(pthread.h, + AC_SUBST(HAVE_PTHREAD, 1), + AC_SUBST(HAVE_PTHREAD, 0)) +else + AC_SUBST(HAVE_PTHREAD, 0) +fi +if test "$LLVM_ENABLE_ZLIB" -eq 1 ; then + AC_CHECK_HEADERS(zlib.h, + AC_SUBST(HAVE_LIBZ, 1), + AC_SUBST(HAVE_LIBZ, 0)) +else + AC_SUBST(HAVE_LIBZ, 0) +fi + +dnl Try to find ffi.h. +if test "$llvm_cv_enable_libffi" = "yes" ; then + AC_CHECK_HEADERS([ffi.h ffi/ffi.h]) +fi + +dnl Try to find Darwin specific crash reporting libraries. +AC_CHECK_HEADERS([CrashReporterClient.h]) + +dnl Try to find Darwin specific crash reporting global. +AC_MSG_CHECKING([__crashreporter_info__]) +AC_LINK_IFELSE( +[ + AC_LANG_SOURCE([[ + extern const char *__crashreporter_info__; + int main() { + __crashreporter_info__ = "test"; + return 0; + } + ]]) +], +[ + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_CRASHREPORTER_INFO], [1], [can use __crashreporter_info__]) +], +[ + AC_MSG_RESULT([no]) + AC_DEFINE([HAVE_CRASHREPORTER_INFO], [0], [can use __crashreporter_info__]) +]) + +dnl===-----------------------------------------------------------------------=== +dnl=== +dnl=== SECTION 7: Check for types and structures +dnl=== +dnl===-----------------------------------------------------------------------=== + +AC_HUGE_VAL_CHECK +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_DEFINE_UNQUOTED([RETSIGTYPE],[void],[Define as the return type of signal handlers (`int' or `void').]) +AC_STRUCT_TM +AC_CHECK_TYPES([int64_t],,AC_MSG_ERROR([Type int64_t required but not found])) +AC_CHECK_TYPES([uint64_t],, + AC_CHECK_TYPES([u_int64_t],, + AC_MSG_ERROR([Type uint64_t or u_int64_t required but not found]))) + +dnl===-----------------------------------------------------------------------=== +dnl=== +dnl=== SECTION 8: Check for specific functions needed +dnl=== +dnl===-----------------------------------------------------------------------=== + +AC_CHECK_FUNCS([backtrace ceilf floorf roundf rintf nearbyintf getcwd ]) +AC_CHECK_FUNCS([powf fmodf strtof round ]) +AC_CHECK_FUNCS([log log2 log10 exp exp2]) +AC_CHECK_FUNCS([getpagesize getrusage getrlimit setrlimit gettimeofday ]) +AC_CHECK_FUNCS([isatty mkdtemp mkstemp ]) +AC_CHECK_FUNCS([mktemp posix_spawn pread realpath sbrk setrlimit ]) +AC_CHECK_FUNCS([strerror strerror_r setenv arc4random ]) +AC_CHECK_FUNCS([strtoll strtoq sysconf malloc_zone_statistics ]) +AC_CHECK_FUNCS([setjmp longjmp sigsetjmp siglongjmp writev]) +AC_CHECK_FUNCS([futimes futimens]) +AC_C_PRINTF_A +AC_FUNC_RAND48 + +dnl Check the declaration "Secure API" on Windows environments. +AC_CHECK_DECLS([strerror_s]) + +dnl Check symbols in libgcc.a for JIT on Mingw. +if test "$llvm_cv_os_type" = "MingW" ; then + AC_CHECK_LIB(gcc,_alloca,AC_DEFINE([HAVE__ALLOCA],[1],[Have host's _alloca])) + AC_CHECK_LIB(gcc,__alloca,AC_DEFINE([HAVE___ALLOCA],[1],[Have host's __alloca])) + AC_CHECK_LIB(gcc,__chkstk,AC_DEFINE([HAVE___CHKSTK],[1],[Have host's __chkstk])) + AC_CHECK_LIB(gcc,___chkstk,AC_DEFINE([HAVE____CHKSTK],[1],[Have host's ___chkstk])) + + AC_CHECK_LIB(gcc,__ashldi3,AC_DEFINE([HAVE___ASHLDI3],[1],[Have host's __ashldi3])) + AC_CHECK_LIB(gcc,__ashrdi3,AC_DEFINE([HAVE___ASHRDI3],[1],[Have host's __ashrdi3])) + AC_CHECK_LIB(gcc,__divdi3,AC_DEFINE([HAVE___DIVDI3],[1],[Have host's __divdi3])) + AC_CHECK_LIB(gcc,__fixdfdi,AC_DEFINE([HAVE___FIXDFDI],[1],[Have host's __fixdfdi])) + AC_CHECK_LIB(gcc,__fixsfdi,AC_DEFINE([HAVE___FIXSFDI],[1],[Have host's __fixsfdi])) + AC_CHECK_LIB(gcc,__floatdidf,AC_DEFINE([HAVE___FLOATDIDF],[1],[Have host's __floatdidf])) + AC_CHECK_LIB(gcc,__lshrdi3,AC_DEFINE([HAVE___LSHRDI3],[1],[Have host's __lshrdi3])) + AC_CHECK_LIB(gcc,__moddi3,AC_DEFINE([HAVE___MODDI3],[1],[Have host's __moddi3])) + AC_CHECK_LIB(gcc,__udivdi3,AC_DEFINE([HAVE___UDIVDI3],[1],[Have host's __udivdi3])) + AC_CHECK_LIB(gcc,__umoddi3,AC_DEFINE([HAVE___UMODDI3],[1],[Have host's __umoddi3])) + + AC_CHECK_LIB(gcc,__main,AC_DEFINE([HAVE___MAIN],[1],[Have host's __main])) + AC_CHECK_LIB(gcc,__cmpdi2,AC_DEFINE([HAVE___CMPDI2],[1],[Have host's __cmpdi2])) +fi + +dnl Check Win32 API EnumerateLoadedModules. +if test "$llvm_cv_os_type" = "MingW" ; then + AC_MSG_CHECKING([whether EnumerateLoadedModules() accepts new decl]) + AC_COMPILE_IFELSE( +[ + AC_LANG_SOURCE([[ + #include + #include + extern void foo(PENUMLOADED_MODULES_CALLBACK); + extern void foo(BOOL(CALLBACK*)(PCSTR,ULONG_PTR,ULONG,PVOID)); + ]]) +], +[ + AC_MSG_RESULT([yes]) + llvm_cv_win32_elmcb_pcstr="PCSTR" +], +[ + AC_MSG_RESULT([no]) + llvm_cv_win32_elmcb_pcstr="PSTR" +]) + AC_DEFINE_UNQUOTED([WIN32_ELMCB_PCSTR],$llvm_cv_win32_elmcb_pcstr,[Type of 1st arg on ELM Callback]) +fi + +dnl Check for variations in the Standard C++ library and STL. These macros are +dnl provided by LLVM in the autoconf/m4 directory. +AC_FUNC_ISNAN +AC_FUNC_ISINF + +dnl Check for mmap support.We also need to know if /dev/zero is required to +dnl be opened for allocating RWX memory. +dnl Make sure we aren't attempting to configure for an unknown system +if test "$llvm_cv_platform_type" = "Unix" ; then + AC_FUNC_MMAP + AC_FUNC_MMAP_FILE + AC_NEED_DEV_ZERO_FOR_MMAP + + if test "$ac_cv_func_mmap_fixed_mapped" = "no" + then + AC_MSG_WARN([mmap() of a fixed address required but not supported]) + fi + if test "$ac_cv_func_mmap_file" = "no" + then + AC_MSG_WARN([mmap() of files required but not found]) + fi +fi + +dnl atomic builtins are required for threading support. +AC_MSG_CHECKING(for GCC atomic builtins) +dnl Since we'll be using these atomic builtins in C++ files we should test +dnl the C++ compiler. +AC_LANG_PUSH([C++]) +AC_LINK_IFELSE( +[ + AC_LANG_SOURCE([[ + int main() { + volatile unsigned long val = 1; + __sync_synchronize(); + __sync_val_compare_and_swap(&val, 1, 0); + __sync_add_and_fetch(&val, 1); + __sync_sub_and_fetch(&val, 1); + return 0; + } + ]]) +], +[ + AC_MSG_RESULT([yes]) + AC_DEFINE([LLVM_HAS_ATOMICS], [1], [Has gcc/MSVC atomic intrinsics]) +], +[ + AC_MSG_RESULT([no]) + AC_DEFINE([LLVM_HAS_ATOMICS], [0], [Has gcc/MSVC atomic intrinsics]) + AC_MSG_WARN([LLVM will be built thread-unsafe because atomic builtins are missing]) +]) +AC_LANG_POP([C++]) + +dnl===-----------------------------------------------------------------------=== +dnl=== +dnl=== SECTION 9: Additional checks, variables, etc. +dnl=== +dnl===-----------------------------------------------------------------------=== + +dnl Handle 32-bit linux systems running a 64-bit kernel. +dnl This has to come after section 4 because it invokes the compiler. +if test "$llvm_cv_os_type" = "Linux" -a "$llvm_cv_target_arch" = "x86_64" ; then + AC_IS_LINUX_MIXED + if test "$llvm_cv_linux_mixed" = "yes"; then + llvm_cv_target_arch="x86" + ARCH="x86" + fi +fi + +dnl Check whether __dso_handle is present +AC_CHECK_FUNCS([__dso_handle]) + +dnl Propagate the shared library extension that the libltdl checks did to +dnl the Makefiles so we can use it there too +AC_SUBST(SHLIBEXT,$libltdl_cv_shlibext) + +dnl Propagate the run-time library path variable that the libltdl +dnl checks found to the Makefiles so we can use it there too +AC_SUBST(SHLIBPATH_VAR,$libltdl_cv_shlibpath_var) + +dnl Translate the various configuration directories and other basic +dnl information into substitutions that will end up in Makefile.config.in +dnl that these configured values can be used by the makefiles +if test "${prefix}" = "NONE" ; then + prefix="/usr/local" +fi +eval LLVM_PREFIX="${prefix}"; +eval LLVM_BINDIR="${prefix}/bin"; +eval LLVM_DATADIR="${prefix}/share/llvm"; +eval LLVM_DOCSDIR="${prefix}/share/doc/llvm"; +eval LLVM_ETCDIR="${prefix}/etc/llvm"; +eval LLVM_INCLUDEDIR="${prefix}/include"; +eval LLVM_INFODIR="${prefix}/info"; +eval LLVM_MANDIR="${prefix}/man"; +LLVM_CONFIGTIME=`date` +AC_SUBST(LLVM_PREFIX) +AC_SUBST(LLVM_BINDIR) +AC_SUBST(LLVM_DATADIR) +AC_SUBST(LLVM_DOCSDIR) +AC_SUBST(LLVM_ETCDIR) +AC_SUBST(LLVM_INCLUDEDIR) +AC_SUBST(LLVM_INFODIR) +AC_SUBST(LLVM_MANDIR) +AC_SUBST(LLVM_CONFIGTIME) + +dnl Disable embedding timestamps in the build directory, with ENABLE_TIMESTAMPS. +if test "${ENABLE_TIMESTAMPS}" = "0"; then + LLVM_CONFIGTIME="(timestamp not enabled)" +fi + +dnl Place the various directories into the config.h file as #defines so that we +dnl can know about the installation paths within LLVM. +AC_DEFINE_UNQUOTED(LLVM_PREFIX,"$LLVM_PREFIX", + [Installation prefix directory]) +AC_DEFINE_UNQUOTED(LLVM_BINDIR, "$LLVM_BINDIR", + [Installation directory for binary executables]) +AC_DEFINE_UNQUOTED(LLVM_DATADIR, "$LLVM_DATADIR", + [Installation directory for data files]) +AC_DEFINE_UNQUOTED(LLVM_DOCSDIR, "$LLVM_DOCSDIR", + [Installation directory for documentation]) +AC_DEFINE_UNQUOTED(LLVM_ETCDIR, "$LLVM_ETCDIR", + [Installation directory for config files]) +AC_DEFINE_UNQUOTED(LLVM_INCLUDEDIR, "$LLVM_INCLUDEDIR", + [Installation directory for include files]) +AC_DEFINE_UNQUOTED(LLVM_INFODIR, "$LLVM_INFODIR", + [Installation directory for .info files]) +AC_DEFINE_UNQUOTED(LLVM_MANDIR, "$LLVM_MANDIR", + [Installation directory for man pages]) +AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME", + [Time at which LLVM was configured]) +AC_DEFINE_UNQUOTED(LLVM_HOST_TRIPLE, "$host", + [Host triple LLVM will be executed on]) +AC_DEFINE_UNQUOTED(LLVM_DEFAULT_TARGET_TRIPLE, "$target", + [Target triple LLVM will generate code for by default]) + +dnl Determine which bindings to build. +if test "$BINDINGS_TO_BUILD" = auto ; then + BINDINGS_TO_BUILD="" + if test "x$OCAMLC" != x -a "x$OCAMLDEP" != x ; then + BINDINGS_TO_BUILD="ocaml $BINDINGS_TO_BUILD" + fi +fi +AC_SUBST(BINDINGS_TO_BUILD,$BINDINGS_TO_BUILD) + +dnl This isn't really configurey, but it avoids having to repeat the list in +dnl other files. +AC_SUBST(ALL_BINDINGS,ocaml) + +dnl Do any work necessary to ensure that bindings have what they need. +binding_prereqs_failed=0 +for a_binding in $BINDINGS_TO_BUILD ; do + case "$a_binding" in + ocaml) + if test "x$OCAMLC" = x ; then + AC_MSG_WARN([--enable-bindings=ocaml specified, but ocamlc not found. Try configure OCAMLC=/path/to/ocamlc]) + binding_prereqs_failed=1 + fi + if test "x$OCAMLDEP" = x ; then + AC_MSG_WARN([--enable-bindings=ocaml specified, but ocamldep not found. Try configure OCAMLDEP=/path/to/ocamldep]) + binding_prereqs_failed=1 + fi + if test "x$OCAMLOPT" = x ; then + AC_MSG_WARN([--enable-bindings=ocaml specified, but ocamlopt not found. Try configure OCAMLOPT=/path/to/ocamlopt]) + dnl ocamlopt is optional! + fi + if test "x$with_ocaml_libdir" != xauto ; then + AC_SUBST(OCAML_LIBDIR,$with_ocaml_libdir) + else + ocaml_stdlib="`"$OCAMLC" -where`" + if test "$LLVM_PREFIX" '<' "$ocaml_stdlib" -a "$ocaml_stdlib" '<' "$LLVM_PREFIX~" + then + # ocaml stdlib is beneath our prefix; use stdlib + AC_SUBST(OCAML_LIBDIR,$ocaml_stdlib) + else + # ocaml stdlib is outside our prefix; use libdir/ocaml + AC_SUBST(OCAML_LIBDIR,${prefix}/lib/ocaml) + fi + fi + ;; + esac +done +if test "$binding_prereqs_failed" = 1 ; then + AC_MSG_ERROR([Prequisites for bindings not satisfied. Fix them or use configure --disable-bindings.]) +fi + +dnl Determine whether the compiler supports -fvisibility-inlines-hidden. +AC_CXX_USE_VISIBILITY_INLINES_HIDDEN + +dnl Determine linker rpath flag +if test "$llvm_cv_link_use_r" = "yes" ; then + RPATH="-Wl,-R" +else + RPATH="-Wl,-rpath" +fi +AC_SUBST(RPATH) + +dnl Determine linker rdynamic flag +if test "$llvm_cv_link_use_export_dynamic" = "yes" ; then + RDYNAMIC="-rdynamic" +else + RDYNAMIC="" +fi +AC_SUBST(RDYNAMIC) + +dnl===-----------------------------------------------------------------------=== +dnl=== +dnl=== SECTION 10: Specify the output files and generate it +dnl=== +dnl===-----------------------------------------------------------------------=== + +dnl Configure header files +dnl WARNING: dnl If you add or remove any of the following config headers, then +dnl you MUST also update Makefile so that the variable FilesToConfig +dnl contains the same list of files as AC_CONFIG_HEADERS below. This ensures the +dnl files can be updated automatically when their *.in sources change. +AC_CONFIG_HEADERS([include/llvm/Config/config.h include/llvm/Config/llvm-config.h]) +AH_TOP([#ifndef CONFIG_H +#define CONFIG_H]) +AH_BOTTOM([#endif]) + +AC_CONFIG_FILES([include/llvm/Config/Targets.def]) +AC_CONFIG_FILES([include/llvm/Config/AsmPrinters.def]) +AC_CONFIG_FILES([include/llvm/Config/AsmParsers.def]) +AC_CONFIG_FILES([include/llvm/Config/Disassemblers.def]) +AC_CONFIG_HEADERS([include/llvm/Support/DataTypes.h]) + +dnl Configure the makefile's configuration data +AC_CONFIG_FILES([Makefile.config]) + +dnl Configure the RPM spec file for LLVM +AC_CONFIG_FILES([llvm.spec]) + +dnl Configure doxygen's configuration file +AC_CONFIG_FILES([docs/doxygen.cfg]) + +dnl Configure clang, if present +if test "${clang_src_root}" = ""; then + clang_src_root="$srcdir/tools/clang" +fi +if test -f ${clang_src_root}/README.txt; then + dnl Use variables to stay under 80 columns. + configh="include/clang/Config/config.h" + doxy="docs/doxygen.cfg" + AC_CONFIG_HEADERS([tools/clang/${configh}:${clang_src_root}/${configh}.in]) + AC_CONFIG_FILES([tools/clang/${doxy}:${clang_src_root}/${doxy}.in]) +fi + +dnl OCaml findlib META file +AC_CONFIG_FILES([bindings/ocaml/llvm/META.llvm]) + +dnl Add --program-prefix value to Makefile.rules. Already an ARG variable. +test "x$program_prefix" = "xNONE" && program_prefix="" +AC_SUBST([program_prefix]) + + +dnl Do special configuration of Makefiles +AC_CONFIG_COMMANDS([setup],,[llvm_src="${srcdir}"]) +AC_CONFIG_MAKEFILE(Makefile) +AC_CONFIG_MAKEFILE(Makefile.common) +AC_CONFIG_MAKEFILE(examples/Makefile) +AC_CONFIG_MAKEFILE(lib/Makefile) +AC_CONFIG_MAKEFILE(test/Makefile) +AC_CONFIG_MAKEFILE(test/Makefile.tests) +AC_CONFIG_MAKEFILE(unittests/Makefile) +AC_CONFIG_MAKEFILE(tools/Makefile) +AC_CONFIG_MAKEFILE(utils/Makefile) +AC_CONFIG_MAKEFILE(projects/Makefile) +AC_CONFIG_MAKEFILE(bindings/Makefile) +AC_CONFIG_MAKEFILE(bindings/ocaml/Makefile.ocaml) + +dnl Finally, crank out the output +AC_OUTPUT diff --git a/autoconf/depcomp b/autoconf/depcomp new file mode 100755 index 00000000..11e2d3bf --- /dev/null +++ b/autoconf/depcomp @@ -0,0 +1,522 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2004-05-31.23 + +# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputing dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit 0 + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit 0 + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + stat=$? + + if test -f "$tmpdepfile"; then : + else + stripped=`echo "$stripped" | sed 's,^.*/,,'` + tmpdepfile="$stripped.u" + fi + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + outname="$stripped.o" + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # Dependencies are output in .lo.d with libtool 1.4. + # With libtool 1.5 they are output both in $dir.libs/$base.o.d + # and in $dir.libs/$base.o.d and $dir$base.o.d. We process the + # latter, because the former will be cleaned when $dir.libs is + # erased. + tmpdepfile1="$dir.libs/$base.lo.d" + tmpdepfile2="$dir$base.o.d" + tmpdepfile3="$dir.libs/$base.d" + "$@" -Wc,-MD + else + tmpdepfile1="$dir$base.o.d" + tmpdepfile2="$dir$base.d" + tmpdepfile3="$dir$base.d" + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + if test -f "$tmpdepfile1"; then + tmpdepfile="$tmpdepfile1" + elif test -f "$tmpdepfile2"; then + tmpdepfile="$tmpdepfile2" + else + tmpdepfile="$tmpdepfile3" + fi + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/autoconf/install-sh b/autoconf/install-sh new file mode 100755 index 00000000..dd97db7a --- /dev/null +++ b/autoconf/install-sh @@ -0,0 +1,322 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2004-09-10.20 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +chmodcmd="$chmodprog 0755" +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= +dstarg= +no_target_directory= + +usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: +-c (ignored) +-d create directories instead of installing files. +-g GROUP $chgrpprog installed files to GROUP. +-m MODE $chmodprog installed files to MODE. +-o USER $chownprog installed files to USER. +-s $stripprog installed files. +-t DIRECTORY install into DIRECTORY. +-T report an error if DSTFILE is a directory. +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test -n "$1"; do + case $1 in + -c) shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit 0;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; + + --version) echo "$0 $scriptversion"; exit 0;; + + *) # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + test -n "$dir_arg$dstarg" && break + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done + break;; + esac +done + +if test -z "$1"; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src + src= + + if test -d "$dst"; then + mkdircmd=: + chmodcmd= + else + mkdircmd=$mkdirprog + fi + else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dstarg: Is a directory" >&2 + exit 1 + fi + dst=$dst/`basename "$src"` + fi + fi + + # This sed command emulates the dirname command. + dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + + # Make sure that the destination directory exists. + + # Skip lots of stat calls in the usual case. + if test ! -d "$dstdir"; then + defaultIFS=' + ' + IFS="${IFS-$defaultIFS}" + + oIFS=$IFS + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + IFS=$oIFS + + pathcomp= + + while test $# -ne 0 ; do + pathcomp=$pathcomp$1 + shift + if test ! -d "$pathcomp"; then + $mkdirprog "$pathcomp" + # mkdir can fail with a `File exist' error in case several + # install-sh are creating the directory concurrently. This + # is OK. + test -d "$pathcomp" || exit + fi + pathcomp=$pathcomp/ + done + fi + + if test -n "$dir_arg"; then + $doit $mkdircmd "$dst" \ + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } + + else + dstfile=`basename "$dst"` + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + trap '(exit $?); exit' 1 2 13 15 + + # Copy the file name to the temp name. + $doit $cpprog "$src" "$dsttmp" && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dstdir/$dstfile"; then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + || { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + } + } + fi || { (exit 1); exit; } +done + +# The final little trick to "correctly" pass the exit status to the exit trap. +{ + (exit 0); exit +} + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/autoconf/ltmain.sh b/autoconf/ltmain.sh new file mode 100644 index 00000000..21ace012 --- /dev/null +++ b/autoconf/ltmain.sh @@ -0,0 +1,6863 @@ +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +basename="s,^.*/,,g" + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION=1.5.22 +TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes. +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +duplicate_deps=no +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" + +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $mkdir "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ + $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | \ + $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $echo $win32_libid_type +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case "$@ " in + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit $EXIT_FAILURE +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" + $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 + exit $EXIT_FAILURE + fi +} + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + my_status="" + + $show "${rm}r $my_gentop" + $run ${rm}r "$my_gentop" + $show "$mkdir $my_gentop" + $run $mkdir "$my_gentop" + my_status=$? + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then + exit $my_status + fi + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xdir="$my_gentop/$my_xlib" + + $show "${rm}r $my_xdir" + $run ${rm}r "$my_xdir" + $show "$mkdir $my_xdir" + $run $mkdir "$my_xdir" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status + fi + case $host in + *-darwin*) + $show "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + if test -z "$run"; then + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` + if test -n "$darwin_arches"; then + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + $show "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we have a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + lipo -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + ${rm}r unfat-$$ + cd "$darwin_orig_dir" + else + cd "$darwin_orig_dir" + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + fi # $run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + func_extract_archives_result="$my_oldobjs" +} +# End of Shell function definitions +##################################### + +# Darwin sucks +eval std_shrext=\"$shrext_cmds\" + +disable_libs=no + +# Parse our command line options once, thoroughly. +while test "$#" -gt 0 +do + arg="$1" + shift + + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + execute_dlfiles) + execute_dlfiles="$execute_dlfiles $arg" + ;; + tag) + tagname="$arg" + preserve_args="${preserve_args}=$arg" + + # Check whether tagname contains only valid characters + case $tagname in + *[!-_A-Za-z0-9,/]*) + $echo "$progname: invalid tag name: $tagname" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $tagname in + CC) + # Don't test for the "default" C tag, as we know, it's there, but + # not specially marked. + ;; + *) + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then + taglist="$taglist $tagname" + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" + else + $echo "$progname: ignoring unknown tag $tagname" 1>&2 + fi + ;; + esac + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case $arg in + --help) + show_help=yes + ;; + + --version) + $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" + $echo + $echo "Copyright (C) 2005 Free Software Foundation, Inc." + $echo "This is free software; see the source for copying conditions. There is NO" + $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + exit $? + ;; + + --config) + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath + # Now print the configurations for the tags. + for tagname in $taglist; do + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" + done + exit $? + ;; + + --debug) + $echo "$progname: enabling shell trace mode" + set -x + preserve_args="$preserve_args $arg" + ;; + + --dry-run | -n) + run=: + ;; + + --features) + $echo "host: $host" + if test "$build_libtool_libs" = yes; then + $echo "enable shared libraries" + else + $echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + $echo "enable static libraries" + else + $echo "disable static libraries" + fi + exit $? + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --preserve-dup-deps) duplicate_deps="yes" ;; + + --quiet | --silent) + show=: + preserve_args="$preserve_args $arg" + ;; + + --tag) + prevopt="--tag" + prev=tag + preserve_args="$preserve_args --tag" + ;; + --tag=*) + set tag "$optarg" ${1+"$@"} + shift + prev=tag + preserve_args="$preserve_args --tag" + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE +fi + +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 + $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 + case $nonopt in + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) + mode=link + for arg + do + case $arg in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case $mode in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + if test -n "$libobj" ; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit $EXIT_FAILURE + fi + arg_mode=target + continue + ;; + + -static | -prefer-pic | -prefer-non-pic) + later="$later $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" + done + IFS="$save_ifs" + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + + # Add the arguments to base_compile. + base_compile="$base_compile $lastarg" + continue + ;; + + * ) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + case $lastarg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, and some SunOS ksh mistreat backslash-escaping + # in scan sets (worked around with variable expansion), + # and furthermore cannot handle '|' '&' '(' ')' in scan sets + # at all, so we specify them separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + lastarg="\"$lastarg\"" + ;; + esac + + base_compile="$base_compile $lastarg" + done # for arg + + case $arg_mode in + arg) + $echo "$modename: you must specify an argument for -Xcompile" + exit $EXIT_FAILURE + ;; + target) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit $EXIT_FAILURE + ;; + *) + # Get the name of the library object. + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSifmso]' + case $libobj in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.ii) xform=ii ;; + *.class) xform=class ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.f90) xform=f90 ;; + *.for) xform=for ;; + *.java) xform=java ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case $libobj in + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *) + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -static) + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` + case $qlibobj in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qlibobj="\"$qlibobj\"" ;; + esac + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir= + else + xdir=$xdir/ + fi + lobj=${xdir}$objdir/$objname + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + $run $rm $removelist + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $run ln "$progpath" "$lockfile" 2>/dev/null; do + $show "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $echo "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + $echo "$srcfile" > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` + case $qsrcfile in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qsrcfile="\"$qsrcfile\"" ;; + esac + + $run $rm "$libobj" "${libobj}T" + + # Create a libtool object file (analogous to a ".la" file), + # but don't create it if we're doing a dry run. + test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + $show "$mv $output_obj $lobj" + if $run $mv $output_obj $lobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the PIC object to the libtool object file. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the non-PIC object the libtool object file. + # Only append if the libtool object file exists. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + else + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + fi + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$finalize_command @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit $EXIT_FAILURE + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat $save_arg` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + done + else + $echo "$modename: link input file \`$save_arg' does not exist" + exit $EXIT_FAILURE + fi + arg=$save_arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + prev= + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: more than one -exported-symbols argument is not allowed" + exit $EXIT_FAILURE + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + notinst_path="$notinst_path $dir" + fi + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs -framework System" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | -*-*-bitrig*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + -model) + compile_command="$compile_command $arg" + compiler_flags="$compiler_flags $arg" + finalize_command="$finalize_command $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m* pass through architecture-specific compiler args for GCC + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -pg pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ + -t[45]*|-txscale*|@*) + + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + # The PATH hackery in wrapper scripts is required on Windows + # in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -static) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done # argument parsing loop + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + # Create the object directory. + if test ! -d "$output_objdir"; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $exit_status + fi + fi + + # Determine the type of output + case $output in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + case $host in + *cygwin* | *mingw* | *pw32*) + # don't eliminate duplications in $postdeps and $predeps + duplicate_compiler_generated_deps=yes + ;; + *) + duplicate_compiler_generated_deps=$duplicate_deps + ;; + esac + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if test "X$duplicate_deps" = "Xyes" ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + for pass in $passes; do + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if (${SED} -e '2q' $lib | + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + library_names= + old_library= + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + if eval $echo \"$deplib\" 2>/dev/null \ + | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $echo + $echo "*** Warning: Trying to link with static lib archive $deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because the file extensions .$libext of this argument makes me believe" + $echo "*** that it is just a static archive that I should not used here." + else + $echo + $echo "*** Warning: Linking the shared library $output against the" + $echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + if test "$found" = yes || test -f "$lib"; then : + else + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 + exit $EXIT_FAILURE + fi + + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit $EXIT_FAILURE + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + abs_ladir="$ladir" + fi + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + $echo "$modename: warning: library \`$lib' was moved." 1>&2 + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *" $absdir "*) ;; + *) temp_rpath="$temp_rpath $absdir" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes ; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + # This is a shared library + + # Warn about portability, can't link against -module's on + # some systems (darwin) + if test "$shouldnotlink" = yes && test "$pass" = link ; then + $echo + if test "$linkmode" = prog; then + $echo "*** Warning: Linking the executable $output against the loadable module" + else + $echo "*** Warning: Linking the shared library $output against the loadable module" + fi + $echo "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + realname="$2" + shift; shift + libname=`eval \\$echo \"$libname_spec\"` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw*) + major=`expr $current - $age` + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + soname=`$echo $soroot | ${SED} -e 's/^.*\///'` + newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + $show "extracting exported symbol list from \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$extract_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + $show "generating import library for \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$old_archive_from_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a module then we can not link against + # it, someone is ignoring the new warnings I added + if /usr/bin/file -L $add 2> /dev/null | + $EGREP ": [^:]* bundle" >/dev/null ; then + $echo "** Warning, lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $echo + $echo "** And there doesn't seem to be a static archive available" + $echo "** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit $EXIT_FAILURE + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && \ + test "$hardcode_minus_L" != yes && \ + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $echo + $echo "*** Warning: This system can not link to static lib archive $lib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $echo "*** But as you try to build a module library, libtool will still create " + $echo "*** a static module, that should work as long as the dlopening application" + $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$deplib" && dir="." + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + fi + ;; + esac + if grep "^installed=no" $deplib > /dev/null; then + path="$absdir/$objdir" + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="$absdir" + fi + depdepl= + case $host in + *-*-darwin*) + # we do not want to link against static libs, + # but need to link against shared + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$path/$depdepl" ; then + depdepl="$path/$depdepl" + fi + # do not add paths which are already there + case " $newlib_search_path " in + *" $path "*) ;; + *) newlib_search_path="$newlib_search_path $path";; + esac + fi + path="" + ;; + *) + path="-L$path" + ;; + esac + ;; + -l*) + case $host in + *-*-darwin*) + # Again, we only want to link against shared libraries + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` + for tmp in $newlib_search_path ; do + if test -f "$tmp/lib$tmp_libs.dylib" ; then + eval depdepl="$tmp/lib$tmp_libs.dylib" + break + fi + done + path="" + ;; + *) continue ;; + esac + ;; + *) continue ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + case " $deplibs " in + *" $depdepl "*) ;; + *) deplibs="$depdepl $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 + fi + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 + exit $EXIT_FAILURE + else + $echo + $echo "*** Warning: Linking the shared library $output against the non-libtool" + $echo "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + if test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test "$#" -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$2" + number_minor="$3" + number_revision="$4" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + current=`expr $number_major + $number_minor - 1` + age="$number_minor" + revision="$number_minor" + ;; + esac + ;; + no) + current="$2" + revision="$3" + age="$4" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test "$age" -gt "$current"; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + + irix | nonstopux) + major=`expr $current - $age + 1` + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=.`expr $current - $age` + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + major=`expr $current - $age` + versuffix="-$major" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + fi + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$echo "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + if test -n "$removelist"; then + $show "${rm}r $removelist" + $run ${rm}r $removelist + fi + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + for path in $notinst_path; do + lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` + deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` + done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $rm conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null \ + | grep " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for file magic test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a file magic. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name=`expr $a_deplib : '-l\(.*\)'` + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval \\$echo \"$libname_spec\"` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval $echo \"$potent_lib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a regex pattern. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ + -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` + done + fi + if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ + | grep . >/dev/null; then + $echo + if test "X$deplibs_check_method" = "Xnone"; then + $echo "*** Warning: inter-library dependencies are not supported in this platform." + else + $echo "*** Warning: inter-library dependencies are not known to be supported." + fi + $echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $echo + $echo "*** Warning: libtool could not satisfy all declared inter-library" + $echo "*** dependencies of module $libname. Therefore, libtool will create" + $echo "*** a static module, that should work as long as the dlopening" + $echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $echo "*** The inter-library dependencies that have been dropped here will be" + $echo "*** automatically added whenever a program is linked with this library" + $echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $echo + $echo "*** Since this library must not contain undefined symbols," + $echo "*** because either the platform does not support them or" + $echo "*** it was explicitly requested with -no-undefined," + $echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + realname="$2" + shift; shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + if len=`expr "X$cmd" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + $show "$cmd" + $run eval "$cmd" || exit $? + skipped_export=false + else + # The command line is too long to execute in one step. + $show "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex"; then + $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise. + $echo "creating reloadable object files..." + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$echo "X$output" | $Xsed -e "$basename"` + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + delfiles= + last_robj= + k=1 + output=$output_objdir/$output_la-${k}.$objext + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + eval test_cmds=\"$reload_cmds $objlist $last_robj\" + if test "X$objlist" = X || + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; }; then + objlist="$objlist $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + k=`expr $k + 1` + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + len=1 + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + + if ${skipped_export-false}; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + libobjs=$output + # Append the command to create the export file. + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" + fi + + # Set up a command to remove the reloadable object files + # after they are used. + i=0 + while test "$i" -lt "$k" + do + i=`expr $i + 1` + delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" + done + + $echo "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + + # Append the command to remove the reloadable object files + # to the just-reset $cmds. + eval cmds=\"\$cmds~\$rm $delfiles\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case $output in + *.lo) + if test -n "$objs$old_deplibs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit $EXIT_FAILURE + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $run $rm $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $run eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + esac + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." + fi + fi + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + if test "$tagname" = CXX ; then + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + fi + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi + + if test -n "$dlsyms"; then + case $dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" + + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" + + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" + + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define lt_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" + + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $run $rm $export_symbols + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + else + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` + $run eval '$echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -z "$run"; then + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $mv "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if grep -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + grep -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' + else + $echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi + + $echo >> "$output_objdir/$dlsyms" "\ + +#undef lt_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define lt_ptr void * +#else +# define lt_ptr char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +" + + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ +const struct { +" + ;; + esac + + + $echo >> "$output_objdir/$dlsyms" "\ + const char *name; + lt_ptr address; +} +lt_preloaded_symbols[] = +{\ +" + + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" + + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + fi + + pic_flag_for_symtable= + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + else + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + fi + ;; + * ) + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + ;; + esac + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi + + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + exit_status=$? + + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi + + exit $exit_status + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run eval "$link_command" || exit $? + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + + $show "$link_command" + $run eval "$link_command" || exit $? + + # Now create the wrapper script. + $show "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + fi + + # Quote $echo for shipping. + if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + esac + qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + output_name=`basename $output` + output_path=`dirname $output` + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $rm $cwrappersource $cwrapper + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + cat > $cwrappersource <> $cwrappersource<<"EOF" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#endif + +const char *program_name = NULL; + +void * xmalloc (size_t num); +char * xstrdup (const char *string); +const char * base_name (const char *name); +char * find_executable(const char *wrapper); +int check_executable(const char *path); +char * strendzap(char *str, const char *pat); +void lt_fatal (const char *message, ...); + +int +main (int argc, char *argv[]) +{ + char **newargz; + int i; + + program_name = (char *) xstrdup (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); + newargz = XMALLOC(char *, argc+2); +EOF + + cat >> $cwrappersource <> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); + /* we know the script has the same name, without the .exe */ + /* so make sure newargz[1] doesn't end in .exe */ + strendzap(newargz[1],".exe"); + for (i = 1; i < argc; i++) + newargz[i+1] = xstrdup(argv[i]); + newargz[argc+1] = NULL; + + for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" + return 127; +} + +void * +xmalloc (size_t num) +{ + void * p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL +; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char)name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable(const char * path) +{ + struct stat st; + + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ +char * +find_executable (const char* wrapper) +{ + int has_slash = 0; + const char* p; + const char* p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char* concat_name; + + DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char* path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char* q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR(*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + return NULL; +} + +char * +strendzap(char *str, const char *pat) +{ + size_t len, patlen; + + assert(str != NULL); + assert(pat != NULL); + + len = strlen(str); + patlen = strlen(pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp(str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char * mode, + const char * message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} +EOF + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variable: + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$echo are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + echo=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$echo works! + : + else + # Restart under the correct shell, and then maybe \$echo will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $echo >> $output "\ + + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $echo >> $output "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $mkdir \"\$progdir\" + else + $rm \"\$progdir/\$file\" + fi" + + $echo >> $output "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $echo \"\$relink_command_output\" >&2 + $rm \"\$progdir/\$file\" + exit $EXIT_FAILURE + fi + fi + + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + $echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $echo >> $output "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $echo >> $output "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $echo >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $echo >> $output "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2*) + $echo >> $output "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $echo >> $output "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + exit $EXIT_FAILURE + fi + else + # The program doesn't exist. + \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$echo \"This script is just a wrapper for \$program.\" 1>&2 + $echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit $EXIT_FAILURE + fi +fi\ +" + chmod +x $output + fi + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "copying selected object files to avoid basename conflicts..." + + if test -z "$gentop"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status + fi + fi + + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + counter=`expr $counter + 1` + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + $run ln "$obj" "$gentop/$newobj" || + $run cp "$obj" "$gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + + eval cmds=\"$old_archive_cmds\" + + if len=`expr "X$cmds" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + $echo "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + for obj in $save_oldobjs + do + oldobjs="$objlist $obj" + objlist="$objlist $obj" + eval test_cmds=\"$old_archive_cmds\" + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + eval cmd=\"$cmd\" + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + + # Only create the output if not a dry run. + if test -z "$run"; then + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlprefiles="$newdlprefiles $libdir/$name" + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $rm $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $echo > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $echo >> $output "\ +relink_command=\"$relink_command\"" + fi + done + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + ;; + esac + exit $EXIT_SUCCESS + ;; + + # libtool install mode + install) + modename="$modename: install" + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $echo "X$nonopt" | grep shtool > /dev/null; then + # Aesthetically quote it. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) prev=$arg ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test "$#" -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + library_names= + old_library= + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + if test "$inst_prefix_dir" = "$destdir"; then + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + exit $EXIT_FAILURE + fi + fi + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run eval "$striplib $destdir/$realname" || exit $? + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + if test "$linkname" != "$realname"; then + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + cmds=$postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run eval "$install_prog $instname $destdir/$name" || exit $? + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + + $show "$install_prog $staticobj $staticdest" + $run eval "$install_prog \$staticobj \$staticdest" || exit $? + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + file=`$echo $file|${SED} 's,.exe$,,'` + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin*|*mingw*) + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; + esac + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then + notinst_deplibs= + relink_command= + + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + # Check the variables that should have been set. + if test -z "$notinst_deplibs"; then + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 + exit $EXIT_FAILURE + fi + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + relink_command= + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir=`func_mktempdir` + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue + fi + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + fi + else + # Install the binary that we compiled earlier. + file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` + ;; + esac + ;; + esac + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + if test -n "$stripme" && test -n "$old_striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + + # Do each command in the postinstall commands. + cmds=$old_postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + cmds=$finish_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && exit $EXIT_SUCCESS + + $echo "X----------------------------------------------------------------------" | $Xsed + $echo "Libraries have been installed in:" + for libdir in $libdirs; do + $echo " $libdir" + done + $echo + $echo "If you ever happen to want to link against installed libraries" + $echo "in a given directory, LIBDIR, you must either use libtool, and" + $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + $echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + $echo " during execution" + fi + if test -n "$runpath_var"; then + $echo " - add LIBDIR to the \`$runpath_var' environment variable" + $echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $echo " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $echo " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $echo + $echo "See any operating system documentation about shared libraries for" + $echo "more information, such as the ld(1) and ld.so(8) manual pages." + $echo "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit $EXIT_FAILURE + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + if test "${save_LC_ALL+set}" = set; then + LC_ALL="$save_LC_ALL"; export LC_ALL + fi + if test "${save_LANG+set}" = set; then + LANG="$save_LANG"; export LANG + fi + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + fi + $echo "$cmd$args" + exit $EXIT_SUCCESS + fi + ;; + + # libtool clean and uninstall mode + clean | uninstall) + modename="$modename: $mode" + rm="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) rm="$rm $arg"; rmforce=yes ;; + -*) rm="$rm $arg" ;; + *) files="$files $arg" ;; + esac + done + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$file"; then + dir=. + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if (test -L "$file") >/dev/null 2>&1 \ + || (test -h "$file") >/dev/null 2>&1 \ + || test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + cmds=$postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + cmds=$old_postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" \ + && test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" \ + && test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + $show "$rm $rmfiles" + $run $rm $rmfiles || exit_status=1 + done + objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + $show "rmdir $dir" + $run rmdir $dir >/dev/null 2>&1 + fi + done + + exit $exit_status + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi +fi # test -z "$show_help" + +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit $EXIT_FAILURE +fi + +# We need to display help for each of the modes. +case $mode in +"") $echo \ +"Usage: $modename [OPTION]... [MODE-ARG]... + +Provide generalized library-building support services. + + --config show all configuration variables + --debug enable verbose shell tracing +-n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + --version print version information + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for +a more detailed description of MODE. + +Report bugs to ." + exit $EXIT_SUCCESS + ;; + +clean) + $echo \ +"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + +compile) + $echo \ +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -static always build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + +execute) + $echo \ +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + +finish) + $echo \ +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + +install) + $echo \ +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -static do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + +uninstall) + $echo \ +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; +esac + +$echo +$echo "Try \`$modename --help' for more information about other modes." + +exit $? + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +disable_libs=shared +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +disable_libs=static +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/autoconf/m4/build_exeext.m4 b/autoconf/m4/build_exeext.m4 new file mode 100644 index 00000000..1bdecc1b --- /dev/null +++ b/autoconf/m4/build_exeext.m4 @@ -0,0 +1,42 @@ +# Check for the extension used for executables on build platform. +# This is necessary for cross-compiling where the build platform +# may differ from the host platform. +AC_DEFUN([AC_BUILD_EXEEXT], +[ +AC_MSG_CHECKING([for executable suffix on build platform]) +AC_CACHE_VAL(ac_cv_build_exeext, +[if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + ac_cv_build_exeext=.exe +else + ac_build_prefix=${build_alias}- + + AC_CHECK_PROG(BUILD_CC, ${ac_build_prefix}gcc, ${ac_build_prefix}gcc) + if test -z "$BUILD_CC"; then + AC_CHECK_PROG(BUILD_CC, gcc, gcc) + if test -z "$BUILD_CC"; then + AC_CHECK_PROG(BUILD_CC, cc, cc, , , /usr/ucb/cc) + fi + fi + test -z "$BUILD_CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) + ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AS_MESSAGE_LOG_FD' + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_build_exeext= + if AC_TRY_EVAL(ac_build_link); then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj | *.dSYM) ;; + *) ac_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + AC_MSG_ERROR([installation or configuration problem: compiler cannot create executables.]) + fi + rm -f conftest* + test x"${ac_cv_build_exeext}" = x && ac_cv_build_exeext=blank +fi]) +BUILD_EXEEXT="" +test x"${ac_cv_build_exeext}" != xblank && BUILD_EXEEXT=${ac_cv_build_exeext} +AC_MSG_RESULT(${ac_cv_build_exeext}) +ac_build_exeext=$BUILD_EXEEXT +AC_SUBST(BUILD_EXEEXT)]) diff --git a/autoconf/m4/c_printf_a.m4 b/autoconf/m4/c_printf_a.m4 new file mode 100644 index 00000000..61bac8c9 --- /dev/null +++ b/autoconf/m4/c_printf_a.m4 @@ -0,0 +1,31 @@ +# +# Determine if the printf() functions have the %a format character. +# This is modified from: +# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html +AC_DEFUN([AC_C_PRINTF_A], +[AC_CACHE_CHECK([if printf has the %a format character],[llvm_cv_c_printf_a], +[AC_LANG_PUSH([C]) + AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[ +#include +#include +]],[[ +volatile double A, B; +char Buffer[100]; +A = 1; +A /= 10.0; +sprintf(Buffer, "%a", A); +B = atof(Buffer); +if (A != B) + return (1); +if (A != 0x1.999999999999ap-4) + return (1); +return (0);]])], + llvm_cv_c_printf_a=yes, + llvmac_cv_c_printf_a=no, + llvmac_cv_c_printf_a=no) + AC_LANG_POP([C])]) + if test "$llvm_cv_c_printf_a" = "yes"; then + AC_DEFINE([HAVE_PRINTF_A],[1],[Define to have the %a format string]) + fi +]) diff --git a/autoconf/m4/check_gnu_make.m4 b/autoconf/m4/check_gnu_make.m4 new file mode 100644 index 00000000..7355e1c8 --- /dev/null +++ b/autoconf/m4/check_gnu_make.m4 @@ -0,0 +1,26 @@ +# +# Check for GNU Make. This is originally from +# http://www.gnu.org/software/ac-archive/htmldoc/check_gnu_make.html +# +AC_DEFUN([AC_CHECK_GNU_MAKE], +[AC_CACHE_CHECK([for GNU make],[llvm_cv_gnu_make_command], +dnl Search all the common names for GNU make +[llvm_cv_gnu_make_command='' + for a in "$MAKE" make gmake gnumake ; do + if test -z "$a" ; then continue ; fi ; + if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) + then + llvm_cv_gnu_make_command=$a ; + break; + fi + done]) +dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, +dnl '#' otherwise + if test "x$llvm_cv_gnu_make_command" != "x" ; then + ifGNUmake='' ; + else + ifGNUmake='#' ; + AC_MSG_RESULT("Not found"); + fi + AC_SUBST(ifGNUmake) +]) diff --git a/autoconf/m4/config_makefile.m4 b/autoconf/m4/config_makefile.m4 new file mode 100644 index 00000000..b1eaffdc --- /dev/null +++ b/autoconf/m4/config_makefile.m4 @@ -0,0 +1,9 @@ +# +# Configure a Makefile without clobbering it if it exists and is not out of +# date. This macro is unique to LLVM. +# +AC_DEFUN([AC_CONFIG_MAKEFILE], +[AC_CONFIG_COMMANDS($1, + [${llvm_src}/autoconf/mkinstalldirs `dirname $1` + ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/$1 $1]) +]) diff --git a/autoconf/m4/config_project.m4 b/autoconf/m4/config_project.m4 new file mode 100644 index 00000000..eea7faf1 --- /dev/null +++ b/autoconf/m4/config_project.m4 @@ -0,0 +1,14 @@ +# +# Provide the arguments and other processing needed for an LLVM project +# +AC_DEFUN([LLVM_CONFIG_PROJECT], + [AC_ARG_WITH([llvmsrc], + AS_HELP_STRING([--with-llvmsrc],[Location of LLVM Source Code]), + [llvm_src="$withval"],[llvm_src="]$1["]) + AC_SUBST(LLVM_SRC,$llvm_src) + AC_ARG_WITH([llvmobj], + AS_HELP_STRING([--with-llvmobj],[Location of LLVM Object Code]), + [llvm_obj="$withval"],[llvm_obj="]$2["]) + AC_SUBST(LLVM_OBJ,$llvm_obj) + AC_CONFIG_COMMANDS([setup],,[llvm_src="${LLVM_SRC}"]) +]) diff --git a/autoconf/m4/cxx_flag_check.m4 b/autoconf/m4/cxx_flag_check.m4 new file mode 100644 index 00000000..4b097445 --- /dev/null +++ b/autoconf/m4/cxx_flag_check.m4 @@ -0,0 +1,2 @@ +AC_DEFUN([CXX_FLAG_CHECK], + [AC_SUBST($1, `$CXX -Werror patsubst($2, [^-Wno-], [-W]) -fsyntax-only -xc /dev/null 2>/dev/null && echo $2`)]) diff --git a/autoconf/m4/find_std_program.m4 b/autoconf/m4/find_std_program.m4 new file mode 100644 index 00000000..c789df8e --- /dev/null +++ b/autoconf/m4/find_std_program.m4 @@ -0,0 +1,118 @@ +dnl Check for a standard program that has a bin, include and lib directory +dnl +dnl Parameters: +dnl $1 - prefix directory to check +dnl $2 - program name to check +dnl $3 - header file to check +dnl $4 - library file to check +AC_DEFUN([CHECK_STD_PROGRAM], +[m4_define([allcapsname],translit($2,a-z,A-Z)) +if test -n "$1" -a -d "$1" -a -n "$2" -a -d "$1/bin" -a -x "$1/bin/$2" ; then + AC_SUBST([USE_]allcapsname(),["USE_]allcapsname()[ = 1"]) + AC_SUBST(allcapsname(),[$1/bin/$2]) + AC_SUBST(allcapsname()[_BIN],[$1/bin]) + AC_SUBST(allcapsname()[_DIR],[$1]) + if test -n "$3" -a -d "$1/include" -a -f "$1/include/$3" ; then + AC_SUBST(allcapsname()[_INC],[$1/include]) + fi + if test -n "$4" -a -d "$1/lib" -a -f "$1/lib/$4" ; then + AC_SUBST(allcapsname()[_LIB],[$1/lib]) + fi +fi +]) + +dnl Find a program via --with options, in the path, or well known places +dnl +dnl Parameters: +dnl $1 - program's executable name +dnl $2 - header file name to check (optional) +dnl $3 - library file name to check (optional) +dnl $4 - alternate (long) name for the program +AC_DEFUN([FIND_STD_PROGRAM], +[m4_define([allcapsname],translit($1,a-z,A-Z)) +m4_define([stdprog_long_name],ifelse($4,,translit($1,[ !@#$%^&*()-+={}[]:;"',./?],[-]),translit($4,[ !@#$%^&*()-+={}[]:;"',./?],[-]))) +AC_MSG_CHECKING([for ]stdprog_long_name()[ bin/lib/include locations]) +AC_ARG_WITH($1, + AS_HELP_STRING([--with-]stdprog_long_name()[=DIR], + [Specify that the ]stdprog_long_name()[ install prefix is DIR]), + $1[pfxdir=$withval],$1[pfxdir=nada]) +AC_ARG_WITH($1[-bin], + AS_HELP_STRING([--with-]stdprog_long_name()[-bin=DIR], + [Specify that the ]stdprog_long_name()[ binary is in DIR]), + $1[bindir=$withval],$1[bindir=nada]) +AC_ARG_WITH($1[-lib], + AS_HELP_STRING([--with-]stdprog_long_name()[-lib=DIR], + [Specify that ]stdprog_long_name()[ libraries are in DIR]), + $1[libdir=$withval],$1[libdir=nada]) +AC_ARG_WITH($1[-inc], + AS_HELP_STRING([--with-]stdprog_long_name()[-inc=DIR], + [Specify that the ]stdprog_long_name()[ includes are in DIR]), + $1[incdir=$withval],$1[incdir=nada]) +eval pfxval=\$\{$1pfxdir\} +eval binval=\$\{$1bindir\} +eval incval=\$\{$1incdir\} +eval libval=\$\{$1libdir\} +if test "${pfxval}" != "nada" ; then + CHECK_STD_PROGRAM(${pfxval},$1,$2,$3) +elif test "${binval}" != "nada" ; then + if test "${libval}" != "nada" ; then + if test "${incval}" != "nada" ; then + if test -d "${binval}" ; then + if test -d "${incval}" ; then + if test -d "${libval}" ; then + AC_SUBST(allcapsname(),${binval}/$1) + AC_SUBST(allcapsname()[_BIN],${binval}) + AC_SUBST(allcapsname()[_INC],${incval}) + AC_SUBST(allcapsname()[_LIB],${libval}) + AC_SUBST([USE_]allcapsname(),["USE_]allcapsname()[ = 1"]) + AC_MSG_RESULT([found via --with options]) + else + AC_MSG_RESULT([failed]) + AC_MSG_ERROR([The --with-]$1[-libdir value must be a directory]) + fi + else + AC_MSG_RESULT([failed]) + AC_MSG_ERROR([The --with-]$1[-incdir value must be a directory]) + fi + else + AC_MSG_RESULT([failed]) + AC_MSG_ERROR([The --with-]$1[-bindir value must be a directory]) + fi + else + AC_MSG_RESULT([failed]) + AC_MSG_ERROR([The --with-]$1[-incdir option must be specified]) + fi + else + AC_MSG_RESULT([failed]) + AC_MSG_ERROR([The --with-]$1[-libdir option must be specified]) + fi +else + tmppfxdir=`which $1 2>&1` + if test -n "$tmppfxdir" -a -d "${tmppfxdir%*$1}" -a \ + -d "${tmppfxdir%*$1}/.." ; then + tmppfxdir=`cd "${tmppfxdir%*$1}/.." ; pwd` + CHECK_STD_PROGRAM($tmppfxdir,$1,$2,$3) + AC_MSG_RESULT([found in PATH at ]$tmppfxdir) + else + checkresult="yes" + eval checkval=\$\{"USE_"allcapsname()\} + CHECK_STD_PROGRAM([/usr],$1,$2,$3) + if test -z "${checkval}" ; then + CHECK_STD_PROGRAM([/usr/local],$1,$2,$3) + if test -z "${checkval}" ; then + CHECK_STD_PROGRAM([/sw],$1,$2,$3) + if test -z "${checkval}" ; then + CHECK_STD_PROGRAM([/opt],$1,$2,$3) + if test -z "${checkval}" ; then + CHECK_STD_PROGRAM([/],$1,$2,$3) + if test -z "${checkval}" ; then + checkresult="no" + fi + fi + fi + fi + fi + AC_MSG_RESULT($checkresult) + fi +fi +]) diff --git a/autoconf/m4/func_isinf.m4 b/autoconf/m4/func_isinf.m4 new file mode 100644 index 00000000..40dc48b2 --- /dev/null +++ b/autoconf/m4/func_isinf.m4 @@ -0,0 +1,42 @@ +dnl +dnl This function determins if the isinf function isavailable on this +dnl platform. +dnl + +AC_DEFUN([AC_FUNC_ISINF],[ + +AC_SINGLE_CXX_CHECK([ac_cv_func_isinf_in_math_h], + [isinf], [], + [float f; isinf(f);]) +if test "$ac_cv_func_isinf_in_math_h" = "yes" ; then + AC_DEFINE([HAVE_ISINF_IN_MATH_H], [1], + [Set to 1 if the isinf function is found in ]) +fi + +AC_SINGLE_CXX_CHECK([ac_cv_func_isinf_in_cmath], + [isinf], [], + [float f; isinf(f);]) +if test "$ac_cv_func_isinf_in_cmath" = "yes" ; then + AC_DEFINE([HAVE_ISINF_IN_CMATH], [1], + [Set to 1 if the isinf function is found in ]) +fi + +AC_SINGLE_CXX_CHECK([ac_cv_func_std_isinf_in_cmath], + [std::isinf], [], + [float f; std::isinf(f);]) +if test "$ac_cv_func_std_isinf_in_cmath" = "yes" ; then + AC_DEFINE([HAVE_STD_ISINF_IN_CMATH], [1], + [Set to 1 if the std::isinf function is found in ]) +fi + +AC_SINGLE_CXX_CHECK([ac_cv_func_finite_in_ieeefp_h], + [finite], [], + [float f; finite(f);]) +if test "$ac_cv_func_finite_in_ieeefp_h" = "yes" ; then + AC_DEFINE([HAVE_FINITE_IN_IEEEFP_H], [1], + [Set to 1 if the finite function is found in ]) +fi + +]) + + diff --git a/autoconf/m4/func_isnan.m4 b/autoconf/m4/func_isnan.m4 new file mode 100644 index 00000000..eb5ca0da --- /dev/null +++ b/autoconf/m4/func_isnan.m4 @@ -0,0 +1,27 @@ +# +# This function determines if the isnan function is available on this +# platform. +# +AC_DEFUN([AC_FUNC_ISNAN],[ +AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_math_h], + [isnan], [], + [float f; isnan(f);]) + +if test "$ac_cv_func_isnan_in_math_h" = "yes" ; then + AC_DEFINE([HAVE_ISNAN_IN_MATH_H],1,[Set to 1 if the isnan function is found in ]) +fi + +AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_cmath], + [isnan], [], + [float f; isnan(f);]) +if test "$ac_cv_func_isnan_in_cmath" = "yes" ; then + AC_DEFINE([HAVE_ISNAN_IN_CMATH],1,[Set to 1 if the isnan function is found in ]) +fi + +AC_SINGLE_CXX_CHECK([ac_cv_func_std_isnan_in_cmath], + [std::isnan], [], + [float f; std::isnan(f);]) +if test "$ac_cv_func_std_isnan_in_cmath" = "yes" ; then + AC_DEFINE([HAVE_STD_ISNAN_IN_CMATH],1,[Set to 1 if the std::isnan function is found in ]) +fi +]) diff --git a/autoconf/m4/func_mmap_file.m4 b/autoconf/m4/func_mmap_file.m4 new file mode 100644 index 00000000..372c87fb --- /dev/null +++ b/autoconf/m4/func_mmap_file.m4 @@ -0,0 +1,26 @@ +# +# Check for the ability to mmap a file. +# +AC_DEFUN([AC_FUNC_MMAP_FILE], +[AC_CACHE_CHECK(for mmap of files, +ac_cv_func_mmap_file, +[ AC_LANG_PUSH([C]) + AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[ +#include +#include +#include +]],[[ + int fd; + fd = creat ("foo",0777); + fd = (int) mmap (0, 1, PROT_READ, MAP_SHARED, fd, 0); + unlink ("foo"); + return (fd != (int) MAP_FAILED);]])], + [ac_cv_func_mmap_file=yes],[ac_cv_func_mmap_file=no],[ac_cv_func_mmap_file=no]) + AC_LANG_POP([C]) +]) +if test "$ac_cv_func_mmap_file" = yes; then + AC_DEFINE([HAVE_MMAP_FILE],[],[Define if mmap() can map files into memory]) + AC_SUBST(MMAP_FILE,[yes]) +fi +]) diff --git a/autoconf/m4/header_mmap_anonymous.m4 b/autoconf/m4/header_mmap_anonymous.m4 new file mode 100644 index 00000000..2270d295 --- /dev/null +++ b/autoconf/m4/header_mmap_anonymous.m4 @@ -0,0 +1,21 @@ +# +# Check for anonymous mmap macros. This is modified from +# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_slist.html +# +AC_DEFUN([AC_HEADER_MMAP_ANONYMOUS], +[AC_CACHE_CHECK(for MAP_ANONYMOUS vs. MAP_ANON, +ac_cv_header_mmap_anon, +[ AC_LANG_PUSH([C]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include +#include +#include ]], + [[mmap (0, 1, PROT_READ, MAP_ANONYMOUS, -1, 0); return (0);]])], + ac_cv_header_mmap_anon=yes, + ac_cv_header_mmap_anon=no) + AC_LANG_POP([C]) +]) +if test "$ac_cv_header_mmap_anon" = yes; then + AC_DEFINE([HAVE_MMAP_ANONYMOUS],[1],[Define if mmap() uses MAP_ANONYMOUS to map anonymous pages, or undefine if it uses MAP_ANON]) +fi +]) diff --git a/autoconf/m4/huge_val.m4 b/autoconf/m4/huge_val.m4 new file mode 100644 index 00000000..d224d7cb --- /dev/null +++ b/autoconf/m4/huge_val.m4 @@ -0,0 +1,18 @@ +# +# This function determins if the HUGE_VAL macro is compilable with the +# -pedantic switch or not. XCode < 2.4.1 doesn't get it right. +# +AC_DEFUN([AC_HUGE_VAL_CHECK],[ + AC_CACHE_CHECK([for HUGE_VAL sanity], [ac_cv_huge_val_sanity],[ + AC_LANG_PUSH([C++]) + ac_save_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -pedantic" + AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[double x = HUGE_VAL; return x != x;]])], + [ac_cv_huge_val_sanity=yes],[ac_cv_huge_val_sanity=no], + [ac_cv_huge_val_sanity=yes]) + CXXFLAGS=$ac_save_CXXFLAGS + AC_LANG_POP([C++]) + ]) + AC_SUBST(HUGE_VAL_SANITY,$ac_cv_huge_val_sanity) +]) diff --git a/autoconf/m4/libtool.m4 b/autoconf/m4/libtool.m4 new file mode 100644 index 00000000..385d00b4 --- /dev/null +++ b/autoconf/m4/libtool.m4 @@ -0,0 +1,6389 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 +## Free Software Foundation, Inc. +## Originally by Gordon Matzigkeit , 1996 +## +## This file is free software; the Free Software Foundation gives +## unlimited permission to copy and/or distribute it, with or without +## modifications, as long as this notice is preserved. + +# serial 48 AC_PROG_LIBTOOL + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/mklib' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.60)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl + +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] + +# Same as above, but do not quote variable references. +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=mklib +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd* | bitrig*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + AC_PATH_MAGIC + fi + ;; +esac + +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock],[avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic],[try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP + + +# _LT_AC_SYS_COMPILER +# ------------------- +AC_DEFUN([_LT_AC_SYS_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_AC_SYS_COMPILER + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_DEFUN([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_LINKER_BOILERPLATE + + +# _LT_AC_SYS_LIBPATH_AIX +# ---------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_AC_SHELL_INIT + + +# _LT_AC_PROG_ECHO_BACKSLASH +# -------------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[_LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +])])# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock],[avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*|ppc64le-*linux*|powerpc64le-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +])# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $rm conftest* +]) + +if test x"[$]$2" = xyes; then + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +])# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +])# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly* | bitrig*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +])# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# ------------------ +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_DLFCN + + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# --------------------------------------------------------------------- +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +}] +EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_AC_TRY_DLOPEN_SELF + + +# AC_LIBTOOL_DLOPEN_SELF +# ---------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +])# AC_LIBTOOL_DLOPEN_SELF + + +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* +]) +])# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +])# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) +fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +])# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_MSG_CHECKING([dynamic linker characteristics]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='.dylib' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1.*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd* | bitrig*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER + + +# _LT_AC_TAGCONFIG +# ---------------- +AC_DEFUN([_LT_AC_TAGCONFIG], +[AC_ARG_WITH([tags], + [AS_HELP_STRING([--with-tags@<:@=TAGS@:>@],[include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name "$tagname" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +])# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 DLLs +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([enable_shared_default], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([shared], + AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],[build shared libraries @<:@default=enable_shared_default@:>@]), + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]enable_shared_default) +])# AC_ENABLE_SHARED + + +# AC_DISABLE_SHARED +# ----------------- +# set the default shared flag to --disable-shared +AC_DEFUN([AC_DISABLE_SHARED], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no) +])# AC_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([enable_static_default], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([static], + AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],[build static libraries @<:@default=enable_static_default@:>@]), + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]enable_static_default) +])# AC_ENABLE_STATIC + + +# AC_DISABLE_STATIC +# ----------------- +# set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no) +])# AC_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_FAST_INSTALL], +[define([enable_Fast_install_default], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([fast-install], + AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],[optimize for fast installation @<:@default=enable_Fast_install_default@:>@]), + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]enable_Fast_install_default) +])# AC_ENABLE_FAST_INSTALL + + +# AC_DISABLE_FAST_INSTALL +# ----------------------- +# set the default to --disable-fast-install +AC_DEFUN([AC_DISABLE_FAST_INSTALL], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no) +])# AC_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +AC_DEFUN([AC_LIBTOOL_PICMODE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default) +])# AC_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +])]) + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognise shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="ifelse([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +])# AC_PATH_TOOL_PREFIX + + +# AC_PATH_MAGIC +# ------------- +# find a file program which can recognise a shared library +AC_DEFUN([AC_PATH_MAGIC], +[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# AC_PATH_MAGIC + + +# AC_PROG_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld],[assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix3*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown +])# AC_DEPLIBS_CHECK_METHOD + + +# AC_PROG_NM +# ---------- +# find the pathname to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +])# AC_PROG_NM + + +# AC_CHECK_LIBM +# ------------- +# check for math library +AC_DEFUN([AC_CHECK_LIBM], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +])# AC_CHECK_LIBM + + +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +# (note the single quotes!). If your package is not flat and you're not +# using automake, define top_builddir and top_srcdir appropriately in +# the Makefiles. +AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_CONVENIENCE + + +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl installable library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, lt_dlinit, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_INSTALLABLE + + +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +AC_DEFUN([AC_LIBTOOL_CXX], +[AC_REQUIRE([_LT_AC_LANG_CXX]) +])# AC_LIBTOOL_CXX + + +# _LT_AC_LANG_CXX +# --------------- +AC_DEFUN([_LT_AC_LANG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +])# _LT_AC_LANG_CXX + +# _LT_AC_PROG_CXXCPP +# ------------------ +AC_DEFUN([_LT_AC_PROG_CXXCPP], +[ +AC_REQUIRE([AC_PROG_CXX]) +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +fi +])# _LT_AC_PROG_CXXCPP + +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +AC_DEFUN([AC_LIBTOOL_F77], +[AC_REQUIRE([_LT_AC_LANG_F77]) +])# AC_LIBTOOL_F77 + + +# _LT_AC_LANG_F77 +# --------------- +AC_DEFUN([_LT_AC_LANG_F77], +[AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +])# _LT_AC_LANG_F77 + + +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +AC_DEFUN([AC_LIBTOOL_GCJ], +[AC_REQUIRE([_LT_AC_LANG_GCJ]) +])# AC_LIBTOOL_GCJ + + +# _LT_AC_LANG_GCJ +# --------------- +AC_DEFUN([_LT_AC_LANG_GCJ], +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +])# _LT_AC_LANG_GCJ + + +# AC_LIBTOOL_RC +# ------------- +# enable support for Windows resource files +AC_DEFUN([AC_LIBTOOL_RC], +[AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +])# AC_LIBTOOL_RC + + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +AC_DEFUN([_LT_AC_LANG_C_CONFIG], +[lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF + +# Report which library types will actually be built +AC_MSG_CHECKING([if libtool supports shared libraries]) +AC_MSG_RESULT([$can_build_shared]) + +AC_MSG_CHECKING([whether to build shared libraries]) +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +AC_MSG_RESULT([$enable_shared]) + +AC_MSG_CHECKING([whether to build static libraries]) +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +AC_MSG_RESULT([$enable_static]) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_C_CONFIG + + +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +[AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +_LT_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[[12]].*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + ;; + *) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd* | bitrig*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_TAGVAR(LD, $1)="$LD" + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +])# AC_LIBTOOL_LANG_CXX_CONFIG + +# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) +# ------------------------------------ +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" +ifelse([$1], [], +[#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) + +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" + +# Set to yes if exported symbols are required. +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) + +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) + +__EOF__ + +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi +])# AC_LIBTOOL_CONFIG + + +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + + +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDGIRSTW]]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + interix3*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) +]) + + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_AC_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + bsdi[[45]]*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1.*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + openbsd* | bitrig*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +])# AC_LIBTOOL_PROG_LD_SHLIBS + + +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + + +# old names +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) + +# This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL]) + +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +AC_DEFUN([LT_AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_MSG_RESULT([$SED]) +]) diff --git a/autoconf/m4/link_options.m4 b/autoconf/m4/link_options.m4 new file mode 100644 index 00000000..b58d6174 --- /dev/null +++ b/autoconf/m4/link_options.m4 @@ -0,0 +1,109 @@ +# +# Get the linker version string. +# +# This macro is specific to LLVM. +# +AC_DEFUN([AC_LINK_GET_VERSION], + [AC_CACHE_CHECK([for linker version],[llvm_cv_link_version], + [ + version_string="$(ld -v 2>&1 | head -1)" + + # Check for ld64. + if (echo "$version_string" | grep -q "ld64"); then + llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)\( (.*)\)\{0,1\}#\1#") + else + llvm_cv_link_version=$(echo "$version_string" | sed -e "s#[^0-9]*\([0-9.]*\).*#\1#") + fi + ]) + AC_DEFINE_UNQUOTED([HOST_LINK_VERSION],"$llvm_cv_link_version", + [Linker version detected at compile time.]) +]) + +# +# Determine if the system can handle the -R option being passed to the linker. +# +# This macro is specific to LLVM. +# +AC_DEFUN([AC_LINK_USE_R], +[AC_CACHE_CHECK([for compiler -Wl,-R option],[llvm_cv_link_use_r], +[ AC_LANG_PUSH([C]) + oldcflags="$CFLAGS" + CFLAGS="$CFLAGS -Wl,-R." + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])], + [llvm_cv_link_use_r=yes],[llvm_cv_link_use_r=no]) + CFLAGS="$oldcflags" + AC_LANG_POP([C]) +]) +if test "$llvm_cv_link_use_r" = yes ; then + AC_DEFINE([HAVE_LINK_R],[1],[Define if you can use -Wl,-R. to pass -R. to the linker, in order to add the current directory to the dynamic linker search path.]) + fi +]) + +# +# Determine if the system can handle the -rdynamic option being passed +# to the compiler. +# +# This macro is specific to LLVM. +# +AC_DEFUN([AC_LINK_EXPORT_DYNAMIC], +[AC_CACHE_CHECK([for compiler -rdynamic option], + [llvm_cv_link_use_export_dynamic], +[ AC_LANG_PUSH([C]) + oldcflags="$CFLAGS" + CFLAGS="$CFLAGS -rdynamic" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])], + [llvm_cv_link_use_export_dynamic=yes],[llvm_cv_link_use_export_dynamic=no]) + CFLAGS="$oldcflags" + AC_LANG_POP([C]) +]) +if test "$llvm_cv_link_use_export_dynamic" = yes ; then + AC_DEFINE([HAVE_LINK_EXPORT_DYNAMIC],[1],[Define if you can use -rdynamic.]) + fi +]) + +# +# Determine if the system can handle the --version-script option being +# passed to the linker. +# +# This macro is specific to LLVM. +# +AC_DEFUN([AC_LINK_VERSION_SCRIPT], +[AC_CACHE_CHECK([for compiler -Wl,--version-script option], + [llvm_cv_link_use_version_script], +[ AC_LANG_PUSH([C]) + oldcflags="$CFLAGS" + + # The following code is from the autoconf manual, + # "11.13: Limitations of Usual Tools". + # Create a temporary directory $tmp in $TMPDIR (default /tmp). + # Use mktemp if possible; otherwise fall back on mkdir, + # with $RANDOM to make collisions less likely. + : ${TMPDIR=/tmp} + { + tmp=` + (umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null + ` && + test -n "$tmp" && test -d "$tmp" + } || { + tmp=$TMPDIR/foo$$-$RANDOM + (umask 077 && mkdir "$tmp") + } || exit $? + + echo "{" > "$tmp/export.map" + echo " global: main;" >> "$tmp/export.map" + echo " local: *;" >> "$tmp/export.map" + echo "};" >> "$tmp/export.map" + + CFLAGS="$CFLAGS -Wl,--version-script=$tmp/export.map" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])], + [llvm_cv_link_use_version_script=yes],[llvm_cv_link_use_version_script=no]) + rm "$tmp/export.map" + rmdir "$tmp" + CFLAGS="$oldcflags" + AC_LANG_POP([C]) +]) +if test "$llvm_cv_link_use_version_script" = yes ; then + AC_SUBST(HAVE_LINK_VERSION_SCRIPT,1) + fi +]) + diff --git a/autoconf/m4/linux_mixed_64_32.m4 b/autoconf/m4/linux_mixed_64_32.m4 new file mode 100644 index 00000000..123491f8 --- /dev/null +++ b/autoconf/m4/linux_mixed_64_32.m4 @@ -0,0 +1,17 @@ +# +# Some Linux machines run a 64-bit kernel with a 32-bit userspace. 'uname -m' +# shows these as x86_64. Ask the system 'gcc' what it thinks. +# +AC_DEFUN([AC_IS_LINUX_MIXED], +[AC_CACHE_CHECK(for 32-bit userspace on 64-bit system,llvm_cv_linux_mixed, +[ AC_LANG_PUSH([C]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#ifndef __x86_64__ + error: Not x86-64 even if uname says so! + #endif + ]])], + [llvm_cv_linux_mixed=no], + [llvm_cv_linux_mixed=yes]) + AC_LANG_POP([C]) +]) +]) diff --git a/autoconf/m4/ltdl.m4 b/autoconf/m4/ltdl.m4 new file mode 100644 index 00000000..b3302fa6 --- /dev/null +++ b/autoconf/m4/ltdl.m4 @@ -0,0 +1,397 @@ +## ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*- +## Copyright (C) 1999-2000 Free Software Foundation, Inc. +## +## This file is free software; the Free Software Foundation gives +## unlimited permission to copy and/or distribute it, with or without +## modifications, as long as this notice is preserved. + +# serial 7 AC_LIB_LTDL + +# AC_WITH_LTDL +# ------------ +# Clients of libltdl can use this macro to allow the installer to +# choose between a shipped copy of the ltdl sources or a preinstalled +# version of the library. +AC_DEFUN([AC_WITH_LTDL], +[AC_REQUIRE([AC_LIB_LTDL]) +AC_SUBST([LIBLTDL]) +AC_SUBST([INCLTDL]) + +# Unless the user asks us to check, assume no installed ltdl exists. +use_installed_libltdl=no + +AC_ARG_WITH([included_ltdl], + [ --with-included-ltdl use the GNU ltdl sources included here]) + +if test "x$with_included_ltdl" != xyes; then + # We are not being forced to use the included libltdl sources, so + # decide whether there is a useful installed version we can use. + AC_CHECK_HEADER([ltdl.h], + [AC_CHECK_LIB([ltdl], [lt_dlcaller_register], + [with_included_ltdl=no], + [with_included_ltdl=yes]) + ]) +fi + +if test "x$enable_ltdl_install" != xyes; then + # If the user did not specify an installable libltdl, then default + # to a convenience lib. + AC_LIBLTDL_CONVENIENCE +fi + +if test "x$with_included_ltdl" = xno; then + # If the included ltdl is not to be used. then Use the + # preinstalled libltdl we found. + AC_DEFINE([HAVE_LTDL], [1], + [Define this if a modern libltdl is already installed]) + LIBLTDL=-lltdl +fi + +# Report our decision... +AC_MSG_CHECKING([whether to use included libltdl]) +AC_MSG_RESULT([$with_included_ltdl]) + +AC_CONFIG_SUBDIRS([libltdl]) +])# AC_WITH_LTDL + + +# AC_LIB_LTDL +# ----------- +# Perform all the checks necessary for compilation of the ltdl objects +# -- including compiler checks and header checks. +AC_DEFUN([AC_LIB_LTDL], +[AC_PREREQ(2.60) +AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_C_CONST]) +AC_REQUIRE([AC_HEADER_STDC]) +AC_REQUIRE([AC_HEADER_DIRENT]) +AC_REQUIRE([_LT_AC_CHECK_DLFCN]) +AC_REQUIRE([AC_LTDL_ENABLE_INSTALL]) +AC_REQUIRE([AC_LTDL_SHLIBEXT]) +AC_REQUIRE([AC_LTDL_SYSSEARCHPATH]) +AC_REQUIRE([AC_LTDL_OBJDIR]) +AC_REQUIRE([AC_LTDL_DLPREOPEN]) +AC_REQUIRE([AC_LTDL_DLLIB]) +AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) +AC_REQUIRE([AC_LTDL_DLSYM_USCORE]) +AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS]) +AC_REQUIRE([AC_LTDL_FUNC_ARGZ]) + +AC_CHECK_HEADERS([errno.h malloc.h memory.h unistd.h]) +AC_CHECK_HEADERS([mach-o/dyld.h]) + +AC_CHECK_FUNCS([closedir opendir readdir]) +])# AC_LIB_LTDL + + +# AC_LTDL_ENABLE_INSTALL +# ---------------------- +AC_DEFUN([AC_LTDL_ENABLE_INSTALL], +[AC_ARG_ENABLE([ltdl-install], + [AS_HELP_STRING([--enable-ltdl-install],[install libltdl])]) + +AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) +AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno) +])# AC_LTDL_ENABLE_INSTALL + + +# AC_LTDL_SYS_DLOPEN_DEPLIBS +# -------------------------- +AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_CACHE_CHECK([whether deplibs are loaded by dlopen], + [libltdl_cv_sys_dlopen_deplibs], + [# PORTME does your system automatically load deplibs for dlopen? + # or its logical equivalent (e.g. shl_load for HP-UX < 11) + # For now, we just catch OSes we know something about -- in the + # future, we'll try test this programmatically. + libltdl_cv_sys_dlopen_deplibs=unknown + case "$host_os" in + aix3*|aix4.1.*|aix4.2.*) + # Unknown whether this is true for these versions of AIX, but + # we want this `case' here to explicitly catch those versions. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + aix[[45]]*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + darwin*) + # Assuming the user has installed a libdl from somewhere, this is true + # If you are looking for one http://www.opendarwin.org/projects/dlcompat + libltdl_cv_sys_dlopen_deplibs=yes + ;; + gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) + # GNU and its variants, using gnu ld.so (Glibc) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + hpux10*|hpux11*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + interix*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + irix[[12345]]*|irix6.[[01]]*) + # Catch all versions of IRIX before 6.2, and indicate that we don't + # know how it worked for any of those versions. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + irix*) + # The case above catches anything before 6.2, and it's known that + # at 6.2 and later dlopen does load deplibs. + libltdl_cv_sys_dlopen_deplibs=yes + ;; + netbsd*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + openbsd*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + osf[[1234]]*) + # dlopen did load deplibs (at least at 4.x), but until the 5.x series, + # it did *not* use an RPATH in a shared library to find objects the + # library depends on, so we explicitly say `no'. + libltdl_cv_sys_dlopen_deplibs=no + ;; + osf5.0|osf5.0a|osf5.1) + # dlopen *does* load deplibs and with the right loader patch applied + # it even uses RPATH in a shared library to search for shared objects + # that the library depends on, but there's no easy way to know if that + # patch is installed. Since this is the case, all we can really + # say is unknown -- it depends on the patch being installed. If + # it is, this changes to `yes'. Without it, it would be `no'. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + osf*) + # the two cases above should catch all versions of osf <= 5.1. Read + # the comments above for what we know about them. + # At > 5.1, deplibs are loaded *and* any RPATH in a shared library + # is used to find them so we can finally say `yes'. + libltdl_cv_sys_dlopen_deplibs=yes + ;; + solaris*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + esac + ]) +if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then + AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1], + [Define if the OS needs help to load dependent libraries for dlopen().]) +fi +])# AC_LTDL_SYS_DLOPEN_DEPLIBS + + +# AC_LTDL_SHLIBEXT +# ---------------- +AC_DEFUN([AC_LTDL_SHLIBEXT], +[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) +AC_CACHE_CHECK([which extension is used for loadable modules], + [libltdl_cv_shlibext], +[ +module=yes +eval libltdl_cv_shlibext=$shrext_cmds + ]) +if test -n "$libltdl_cv_shlibext"; then + AC_DEFINE_UNQUOTED([LTDL_SHLIB_EXT], ["$libltdl_cv_shlibext"], + [Define to the extension used for shared libraries, say, ".so".]) +fi +])# AC_LTDL_SHLIBEXT + +# AC_LTDL_SYSSEARCHPATH +# --------------------- +AC_DEFUN([AC_LTDL_SYSSEARCHPATH], +[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) +AC_CACHE_CHECK([for the default library search path], + [libltdl_cv_sys_search_path], + [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"]) +if test -n "$libltdl_cv_sys_search_path"; then + sys_search_path= + for dir in $libltdl_cv_sys_search_path; do + if test -z "$sys_search_path"; then + sys_search_path="$dir" + else + sys_search_path="$sys_search_path$PATH_SEPARATOR$dir" + fi + done + AC_DEFINE_UNQUOTED([LTDL_SYSSEARCHPATH], ["$sys_search_path"], + [Define to the system default library search path.]) +fi +])# AC_LTDL_SYSSEARCHPATH + + +# AC_LTDL_OBJDIR +# -------------- +AC_DEFUN([AC_LTDL_OBJDIR], +[AC_CACHE_CHECK([for objdir], + [libltdl_cv_objdir], + [libltdl_cv_objdir="$objdir" + if test -n "$objdir"; then + : + else + rm -f .libs 2>/dev/null + mkdir .libs 2>/dev/null + if test -d .libs; then + libltdl_cv_objdir=.libs + else + # MS-DOS does not allow filenames that begin with a dot. + libltdl_cv_objdir=_libs + fi + rmdir .libs 2>/dev/null + fi + ]) +AC_DEFINE_UNQUOTED([LTDL_OBJDIR], ["$libltdl_cv_objdir/"], + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# AC_LTDL_OBJDIR + + +# AC_LTDL_DLPREOPEN +# ----------------- +AC_DEFUN([AC_LTDL_DLPREOPEN], +[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) +AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], + [libltdl_cv_preloaded_symbols], + [if test -n "$lt_cv_sys_global_symbol_pipe"; then + libltdl_cv_preloaded_symbols=yes + else + libltdl_cv_preloaded_symbols=no + fi + ]) +if test x"$libltdl_cv_preloaded_symbols" = xyes; then + AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1], + [Define if libtool can extract symbol lists from object files.]) +fi +])# AC_LTDL_DLPREOPEN + + +# AC_LTDL_DLLIB +# ------------- +AC_DEFUN([AC_LTDL_DLLIB], +[LIBADD_DL= +AC_SUBST(LIBADD_DL) +AC_LANG_PUSH([C]) + +AC_CHECK_FUNC([shl_load], + [AC_DEFINE([HAVE_SHL_LOAD], [1], + [Define if you have the shl_load function.])], + [AC_CHECK_LIB([dld], [shl_load], + [AC_DEFINE([HAVE_SHL_LOAD], [1], + [Define if you have the shl_load function.]) + LIBADD_DL="$LIBADD_DL -ldld"], + [AC_CHECK_LIB([dl], [dlopen], + [AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) + LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes"], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H +# include +#endif + ]], [[dlopen(0, 0);]])],[AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes"],[AC_CHECK_LIB([svld], [dlopen], + [AC_DEFINE([HAVE_LIBDL], [1], + [Define if you have the libdl library or equivalent.]) + LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes"], + [AC_CHECK_LIB([dld], [dld_link], + [AC_DEFINE([HAVE_DLD], [1], + [Define if you have the GNU dld library.]) + LIBADD_DL="$LIBADD_DL -ldld"], + [AC_CHECK_FUNC([_dyld_func_lookup], + [AC_DEFINE([HAVE_DYLD], [1], + [Define if you have the _dyld_func_lookup function.])]) + ]) + ]) + ]) + ]) + ]) +]) + +if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes +then + lt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBADD_DL" + AC_CHECK_FUNCS([dlerror]) + LIBS="$lt_save_LIBS" +fi +AC_LANG_POP +])# AC_LTDL_DLLIB + + +# AC_LTDL_SYMBOL_USCORE +# --------------------- +# does the compiler prefix global symbols with an underscore? +AC_DEFUN([AC_LTDL_SYMBOL_USCORE], +[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) +AC_CACHE_CHECK([for _ prefix in compiled symbols], + [ac_cv_sys_symbol_underscore], + [ac_cv_sys_symbol_underscore=no + cat > conftest.$ac_ext < $ac_nlist) && test -s "$ac_nlist"; then + # See whether the symbols have a leading underscore. + if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then + ac_cv_sys_symbol_underscore=yes + else + if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then + : + else + echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD + fi + fi + else + echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.c >&AS_MESSAGE_LOG_FD + fi + rm -rf conftest* + ]) +])# AC_LTDL_SYMBOL_USCORE + + +# AC_LTDL_DLSYM_USCORE +# -------------------- +AC_DEFUN([AC_LTDL_DLSYM_USCORE], +[AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) +if test x"$ac_cv_sys_symbol_underscore" = xyes; then + if test x"$libltdl_cv_func_dlopen" = xyes || + test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then + AC_CACHE_CHECK([whether we have to add an underscore for dlsym], + [libltdl_cv_need_uscore], + [libltdl_cv_need_uscore=unknown + save_LIBS="$LIBS" + LIBS="$LIBS $LIBADD_DL" + _LT_AC_TRY_DLOPEN_SELF( + [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes], + [], [libltdl_cv_need_uscore=cross]) + LIBS="$save_LIBS" + ]) + fi +fi + +if test x"$libltdl_cv_need_uscore" = xyes; then + AC_DEFINE([NEED_USCORE], [1], + [Define if dlsym() requires a leading underscore in symbol names.]) +fi +])# AC_LTDL_DLSYM_USCORE + +# AC_LTDL_FUNC_ARGZ +# ----------------- +AC_DEFUN([AC_LTDL_FUNC_ARGZ], +[AC_CHECK_HEADERS([argz.h]) + +AC_CHECK_TYPES([error_t], + [], + [AC_DEFINE([error_t], [int], + [Define to a type to use for `error_t' if it is not otherwise available.])], + [#if HAVE_ARGZ_H +# include +#endif]) + +AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify]) +])# AC_LTDL_FUNC_ARGZ diff --git a/autoconf/m4/need_dev_zero_for_mmap.m4 b/autoconf/m4/need_dev_zero_for_mmap.m4 new file mode 100644 index 00000000..57b32283 --- /dev/null +++ b/autoconf/m4/need_dev_zero_for_mmap.m4 @@ -0,0 +1,17 @@ +# +# When allocating RWX memory, check whether we need to use /dev/zero +# as the file descriptor or not. +# +AC_DEFUN([AC_NEED_DEV_ZERO_FOR_MMAP], +[AC_CACHE_CHECK([if /dev/zero is needed for mmap], +ac_cv_need_dev_zero_for_mmap, +[if test "$llvm_cv_os_type" = "Interix" ; then + ac_cv_need_dev_zero_for_mmap=yes + else + ac_cv_need_dev_zero_for_mmap=no + fi +]) +if test "$ac_cv_need_dev_zero_for_mmap" = yes; then + AC_DEFINE([NEED_DEV_ZERO_FOR_MMAP],[1], + [Define if /dev/zero should be used when mapping RWX memory, or undefine if its not necessary]) +fi]) diff --git a/autoconf/m4/path_tclsh.m4 b/autoconf/m4/path_tclsh.m4 new file mode 100644 index 00000000..85433de7 --- /dev/null +++ b/autoconf/m4/path_tclsh.m4 @@ -0,0 +1,39 @@ +dnl This macro checks for tclsh which is required to run dejagnu. On some +dnl platforms (notably FreeBSD), tclsh is named tclshX.Y - this handles +dnl that for us so we can get the latest installed tclsh version. +dnl +AC_DEFUN([DJ_AC_PATH_TCLSH], [ +no_itcl=true +AC_MSG_CHECKING(for the tclsh program in tclinclude directory) +AC_ARG_WITH(tclinclude, + AS_HELP_STRING([--with-tclinclude], + [directory where tcl headers are]), + [with_tclinclude=${withval}],[with_tclinclude='']) +AC_CACHE_VAL(ac_cv_path_tclsh,[ +dnl first check to see if --with-itclinclude was specified +if test x"${with_tclinclude}" != x ; then + if test -f ${with_tclinclude}/tclsh ; then + ac_cv_path_tclsh=`(cd ${with_tclinclude}; pwd)` + elif test -f ${with_tclinclude}/src/tclsh ; then + ac_cv_path_tclsh=`(cd ${with_tclinclude}/src; pwd)` + else + AC_MSG_ERROR([${with_tclinclude} directory doesn't contain tclsh]) + fi +fi]) + +dnl see if one is installed +if test x"${ac_cv_path_tclsh}" = x ; then + AC_MSG_RESULT(none) + AC_PATH_PROGS([TCLSH],[tclsh8.4 tclsh8.4.8 tclsh8.4.7 tclsh8.4.6 tclsh8.4.5 tclsh8.4.4 tclsh8.4.3 tclsh8.4.2 tclsh8.4.1 tclsh8.4.0 tclsh8.3 tclsh8.3.5 tclsh8.3.4 tclsh8.3.3 tclsh8.3.2 tclsh8.3.1 tclsh8.3.0 tclsh]) + if test x"${TCLSH}" = x ; then + ac_cv_path_tclsh=''; + else + ac_cv_path_tclsh="${TCLSH}"; + fi +else + AC_MSG_RESULT(${ac_cv_path_tclsh}) + TCLSH="${ac_cv_path_tclsh}" + AC_SUBST(TCLSH) +fi +]) + diff --git a/autoconf/m4/rand48.m4 b/autoconf/m4/rand48.m4 new file mode 100644 index 00000000..76f08faa --- /dev/null +++ b/autoconf/m4/rand48.m4 @@ -0,0 +1,12 @@ +# +# This function determins if the srand48,drand48,lrand48 functions are +# available on this platform. +# +AC_DEFUN([AC_FUNC_RAND48],[ +AC_SINGLE_CXX_CHECK([ac_cv_func_rand48], + [srand48/lrand48/drand48], [], + [srand48(0);lrand48();drand48();]) +if test "$ac_cv_func_rand48" = "yes" ; then +AC_DEFINE([HAVE_RAND48],1,[Define to 1 if srand48/lrand48/drand48 exist in ]) +fi +]) diff --git a/autoconf/m4/sanity_check.m4 b/autoconf/m4/sanity_check.m4 new file mode 100644 index 00000000..639fccca --- /dev/null +++ b/autoconf/m4/sanity_check.m4 @@ -0,0 +1,31 @@ +dnl Check a program for version sanity. The test runs a program, passes it an +dnl argument to make it print out some identification string, and filters that +dnl output with a regular expression. If the output is non-empty, the program +dnl passes the sanity check. +dnl $1 - Name or full path of the program to run +dnl $2 - Argument to pass to print out identification string +dnl $3 - grep RE to match identification string +dnl $4 - set to 1 to make errors only a warning +AC_DEFUN([CHECK_PROGRAM_SANITY], +[ +AC_MSG_CHECKING([sanity for program ]$1) +sanity="0" +sanity_path=`which $1 2>/dev/null` +if test "$?" -eq 0 -a -x "$sanity_path" ; then + sanity=`$1 $2 2>&1 | grep "$3"` + if test -z "$sanity" ; then + AC_MSG_RESULT([no]) + sanity="0" + if test "$4" -eq 1 ; then + AC_MSG_WARN([Program ]$1[ failed to pass sanity check.]) + else + AC_MSG_ERROR([Program ]$1[ failed to pass sanity check.]) + fi + else + AC_MSG_RESULT([yes]) + sanity="1" + fi +else + AC_MSG_RESULT([not found]) +fi +]) diff --git a/autoconf/m4/single_cxx_check.m4 b/autoconf/m4/single_cxx_check.m4 new file mode 100644 index 00000000..cb473264 --- /dev/null +++ b/autoconf/m4/single_cxx_check.m4 @@ -0,0 +1,16 @@ +dnl +dnl AC_SINGLE_CXX_CHECK(CACHEVAR, FUNCTION, HEADER, PROGRAM) +dnl $1, $2, $3, $4, + +AC_DEFUN([AC_SINGLE_CXX_CHECK], +[ + AC_CACHE_CHECK([for $2 in $3], [$1], + [ + AC_LANG_PUSH([C++]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]][$3], [$4])], + [$1][[=yes]], + [$1][[=no]]) + AC_LANG_POP([C++]) + ]) +]) + diff --git a/autoconf/m4/visibility_inlines_hidden.m4 b/autoconf/m4/visibility_inlines_hidden.m4 new file mode 100644 index 00000000..b1cc42aa --- /dev/null +++ b/autoconf/m4/visibility_inlines_hidden.m4 @@ -0,0 +1,24 @@ +# +# Determine if the compiler accepts -fvisibility-inlines-hidden +# +# This macro is specific to LLVM. +# +AC_DEFUN([AC_CXX_USE_VISIBILITY_INLINES_HIDDEN], +[AC_CACHE_CHECK([for compiler -fvisibility-inlines-hidden option], + [llvm_cv_cxx_visibility_inlines_hidden], +[ AC_LANG_PUSH([C++]) + oldcxxflags="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -O0 -fvisibility-inlines-hidden -Werror" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [template struct X { void __attribute__((noinline)) f() {} };], + [X().f();])], + [llvm_cv_cxx_visibility_inlines_hidden=yes],[llvm_cv_cxx_visibility_inlines_hidden=no]) + CXXFLAGS="$oldcxxflags" + AC_LANG_POP([C++]) +]) +if test "$llvm_cv_cxx_visibility_inlines_hidden" = yes ; then + AC_SUBST([ENABLE_VISIBILITY_INLINES_HIDDEN],[1]) +else + AC_SUBST([ENABLE_VISIBILITY_INLINES_HIDDEN],[0]) +fi +]) diff --git a/autoconf/missing b/autoconf/missing new file mode 100755 index 00000000..64b5f901 --- /dev/null +++ b/autoconf/missing @@ -0,0 +1,353 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2004-09-07.08 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case "$1" in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to ." + exit 0 + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit 0 + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case "$1" in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case "$1" in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case "$f" in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if [ ! -f y.tab.h ]; then + echo >y.tab.h + fi + if [ ! -f y.tab.c ]; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` + fi + if [ -f "$file" ]; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + fi + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/autoconf/mkinstalldirs b/autoconf/mkinstalldirs new file mode 100755 index 00000000..1ee2d580 --- /dev/null +++ b/autoconf/mkinstalldirs @@ -0,0 +1,150 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy + +scriptversion=2004-02-15.20 + +# Original author: Noah Friedman +# Created: 1993-05-16 +# Public domain. +# +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +errstatus=0 +dirmode="" + +usage="\ +Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... + +Create each directory DIR (with mode MODE, if specified), including all +leading file name components. + +Report bugs to ." + +# process command line arguments +while test $# -gt 0 ; do + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" + exit 0 + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --version) + echo "$0 $scriptversion" + exit 0 + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac +done + +for file +do + if test -d "$file"; then + shift + else + break + fi +done + +case $# in + 0) exit 0 ;; +esac + +# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and +# mkdir -p a/c at the same time, both will detect that a is missing, +# one will create a, then the other will try to create a and die with +# a "File exists" error. This is a problem when calling mkinstalldirs +# from a parallel make. We use --version in the probe to restrict +# ourselves to GNU mkdir, which is thread-safe. +case $dirmode in + '') + if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + test -d ./-p && rmdir ./-p + test -d ./--version && rmdir ./--version + fi + ;; + *) + if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && + test ! -d ./--version; then + # echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + else + # Clean up after NextStep and OpenStep mkdir. + for d in ./-m ./-p ./--version "./$dirmode"; + do + test -d $d && rmdir $d + done + fi + ;; +esac + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case $pathcomp in + -*) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + # echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + # echo "chmod $dirmode $pathcomp" + lasterr="" + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/bindings/LLVMBuild.txt b/bindings/LLVMBuild.txt new file mode 100644 index 00000000..241ac096 --- /dev/null +++ b/bindings/LLVMBuild.txt @@ -0,0 +1,21 @@ +;===- ./bindings/LLVMBuild.txt ---------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Group +name = Bindings +parent = $ROOT diff --git a/bindings/Makefile b/bindings/Makefile new file mode 100644 index 00000000..c545b288 --- /dev/null +++ b/bindings/Makefile @@ -0,0 +1,16 @@ +##===- bindings/Makefile -----------------------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +LEVEL := .. + +include $(LEVEL)/Makefile.config + +PARALLEL_DIRS = $(BINDINGS_TO_BUILD) + +include $(LEVEL)/Makefile.common diff --git a/bindings/README.txt b/bindings/README.txt new file mode 100644 index 00000000..7693cb2c --- /dev/null +++ b/bindings/README.txt @@ -0,0 +1,3 @@ +This directory contains bindings for the LLVM compiler infrastructure to allow +programs written in languages other than C or C++ to take advantage of the LLVM +infrastructure--for instance, a self-hosted compiler front-end. diff --git a/bindings/ocaml/Makefile b/bindings/ocaml/Makefile new file mode 100644 index 00000000..44562fe8 --- /dev/null +++ b/bindings/ocaml/Makefile @@ -0,0 +1,20 @@ +##===- bindings/ocaml/Makefile -----------------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../.. +DIRS = llvm bitreader bitwriter irreader analysis target executionengine \ + transforms linker backends +ExtraMakefiles = $(PROJ_OBJ_DIR)/Makefile.ocaml + +ocamldoc: + $(Verb) for i in $(DIRS) ; do \ + $(MAKE) -C $$i ocamldoc; \ + done + +include $(LEVEL)/Makefile.common diff --git a/bindings/ocaml/Makefile.ocaml b/bindings/ocaml/Makefile.ocaml new file mode 100644 index 00000000..f8ed841d --- /dev/null +++ b/bindings/ocaml/Makefile.ocaml @@ -0,0 +1,491 @@ +##===- bindings/ocaml/Makefile.ocaml -----------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +# +# An OCaml library is a unique project type in the context of LLVM, so rules are +# here rather than in Makefile.rules. +# +# Reference materials on installing OCaml libraries: +# +# https://fedoraproject.org/wiki/Packaging/OCaml +# http://pkg-ocaml-maint.alioth.debian.org/ocaml_packaging_policy.txt +# +##===----------------------------------------------------------------------===## + +include $(LEVEL)/Makefile.config + +# CFLAGS needs to be set before Makefile.rules is included. +CXX.Flags += -I"$(shell $(OCAMLC) -where)" +C.Flags += -I"$(shell $(OCAMLC) -where)" + +ifeq ($(ENABLE_SHARED),1) +LINK_COMPONENTS := all +endif + +include $(LEVEL)/Makefile.common + +# Intentionally ignore PROJ_prefix here. We want the ocaml stdlib. However, the +# user can override this with OCAML_LIBDIR or configure --with-ocaml-libdir=. +PROJ_libocamldir := $(DESTDIR)$(OCAML_LIBDIR) +OcamlDir := $(LibDir)/ocaml + +# Info from llvm-config and similar +ifndef IS_CLEANING_TARGET +ifdef UsedComponents +UsedLibs = $(shell $(LLVM_CONFIG) --libs $(UsedComponents)) +UsedLibNames = $(shell $(LLVM_CONFIG) --libnames $(UsedComponents)) +endif +endif + +# How do we link OCaml executables with LLVM? +# 1) If this is a --enable-shared build, build stub libraries. This also allows +# to use LLVM from toplevels. +# 2) If this is a --disable-shared build, embed ocamlc options for building +# a custom runtime and a static executable. It is not possible to use LLVM +# from toplevels. +ifneq ($(ObjectsO),) +ifeq ($(ENABLE_SHARED),1) +OCAMLSTUBS := 1 +endif +endif + +# Tools +OCAMLCFLAGS += -I $(ObjDir) -I $(OcamlDir) +ifndef IS_CLEANING_TARGET +ifneq ($(ObjectsO),) +OCAMLAFLAGS += $(patsubst %,-cclib %, \ + $(filter-out -L$(LibDir),-l$(LIBRARYNAME) \ + $(shell $(LLVM_CONFIG) --ldflags)) \ + $(UsedLibs)) +else +OCAMLAFLAGS += $(patsubst %,-cclib %, \ + $(filter-out -L$(LibDir),$(shell $(LLVM_CONFIG) --ldflags)) \ + $(UsedLibs)) +endif +endif + +# -g was introduced in 3.10.0. +#ifneq ($(ENABLE_OPTIMIZED),1) +# OCAMLDEBUGFLAG := -g +#endif + +Compile.CMI := $(strip $(OCAMLC) -c $(OCAMLCFLAGS) $(OCAMLDEBUGFLAG) -o) +Compile.CMO := $(strip $(OCAMLC) -c $(OCAMLCFLAGS) $(OCAMLDEBUGFLAG) -o) +Compile.CMX := $(strip $(OCAMLOPT) -c $(OCAMLCFLAGS) $(OCAMLDEBUGFLAG) -o) + +ifdef OCAMLSTUBS +# Avoid the need for LD_LIBRARY_PATH +ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +ifneq ($(HOST_OS),Darwin) +OCAMLRPATH := $(RPATH) -Wl,'$(SharedLibDir)' +endif +endif +endif + +ifdef OCAMLSTUBS +Archive.CMA := $(strip $(OCAMLC) -a -dllib -l$(LIBRARYNAME) $(OCAMLDEBUGFLAG) \ + -o) +else +Archive.CMA := $(strip $(OCAMLC) -a -custom $(OCAMLAFLAGS) $(OCAMLDEBUGFLAG) \ + -o) +endif + +ifdef OCAMLSTUBS +Archive.CMXA := $(strip $(OCAMLOPT) -a $(patsubst %,-cclib %, \ + $(LLVMLibsOptions) -l$(LIBRARYNAME) \ + -L$(SharedLibDir) $(OCAMLRPATH)) \ + $(OCAMLDEBUGFLAG) -o) +else +Archive.CMXA := $(strip $(OCAMLOPT) -a $(OCAMLAFLAGS) $(OCAMLDEBUGFLAG) -o) +endif + +ifdef OCAMLOPT +Archive.EXE := $(strip $(OCAMLOPT) -cc $(CXX) $(OCAMLCFLAGS) $(UsedOcamlLibs:%=%.cmxa) $(OCAMLDEBUGFLAG) -o) +else +Archive.EXE := $(strip $(OCAMLC) -cc $(CXX) $(OCAMLCFLAGS) $(OCAMLDEBUGFLAG:%=%.cma) -o) +endif + +# Source files +ifndef OcamlSources1 +OcamlSources1 := $(sort $(wildcard $(PROJ_SRC_DIR)/*.ml)) +endif + +ifndef OcamlHeaders1 +OcamlHeaders1 := $(sort $(wildcard $(PROJ_SRC_DIR)/*.mli)) +endif + +OcamlSources2 := $(filter-out $(ExcludeSources),$(OcamlSources1)) +OcamlHeaders2 := $(filter-out $(ExcludeHeaders),$(OcamlHeaders1)) + +OcamlSources := $(OcamlSources2:$(PROJ_SRC_DIR)/%=$(ObjDir)/%) +OcamlHeaders := $(OcamlHeaders2:$(PROJ_SRC_DIR)/%=$(ObjDir)/%) + +# Intermediate files +ObjectsCMI := $(OcamlSources:%.ml=%.cmi) +ObjectsCMO := $(OcamlSources:%.ml=%.cmo) +ObjectsCMX := $(OcamlSources:%.ml=%.cmx) + +ifdef LIBRARYNAME +LibraryCMA := $(ObjDir)/$(LIBRARYNAME).cma +LibraryCMXA := $(ObjDir)/$(LIBRARYNAME).cmxa +endif + +ifdef TOOLNAME +ToolEXE := $(ObjDir)/$(TOOLNAME)$(EXEEXT) +endif + +# Output files +# The .cmo files are the only intermediates; all others are to be installed. +OutputsCMI := $(ObjectsCMI:$(ObjDir)/%.cmi=$(OcamlDir)/%.cmi) +OutputsCMX := $(ObjectsCMX:$(ObjDir)/%.cmx=$(OcamlDir)/%.cmx) +OutputLibs := $(UsedLibNames:%=$(OcamlDir)/%) + +ifdef LIBRARYNAME +LibraryA := $(OcamlDir)/lib$(LIBRARYNAME).a +OutputCMA := $(LibraryCMA:$(ObjDir)/%.cma=$(OcamlDir)/%.cma) +OutputCMXA := $(LibraryCMXA:$(ObjDir)/%.cmxa=$(OcamlDir)/%.cmxa) +endif + +ifdef OCAMLSTUBS +SharedLib := $(OcamlDir)/dll$(LIBRARYNAME)$(SHLIBEXT) +endif + +ifdef TOOLNAME +ifdef EXAMPLE_TOOL +OutputEXE := $(ExmplDir)/$(strip $(TOOLNAME))$(EXEEXT) +else +OutputEXE := $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT) +endif +endif + +# Installation targets +DestLibs := $(UsedLibNames:%=$(PROJ_libocamldir)/%) + +ifdef LIBRARYNAME +DestA := $(PROJ_libocamldir)/lib$(LIBRARYNAME).a +DestCMA := $(PROJ_libocamldir)/$(LIBRARYNAME).cma +DestCMXA := $(PROJ_libocamldir)/$(LIBRARYNAME).cmxa +endif + +ifdef OCAMLSTUBS +DestSharedLib := $(PROJ_libocamldir)/dll$(LIBRARYNAME)$(SHLIBEXT) +endif + +##===- Dependencies -------------------------------------------------------===## +# Copy the sources into the intermediate directory because older ocamlc doesn't +# support -o except when linking (outputs are placed next to inputs). + +$(ObjDir)/%.mli: $(PROJ_SRC_DIR)/%.mli $(ObjDir)/.dir + $(Verb) $(CP) -f $< $@ + +$(ObjDir)/%.ml: $(PROJ_SRC_DIR)/%.ml $(ObjDir)/.dir + $(Verb) $(CP) -f $< $@ + +$(ObjectsCMI): $(UsedOcamlInterfaces:%=$(OcamlDir)/%.cmi) + +ifdef LIBRARYNAME +$(ObjDir)/$(LIBRARYNAME).ocamldep: $(OcamlSources) $(OcamlHeaders) \ + $(OcamlDir)/.dir $(ObjDir)/.dir + $(Verb) $(OCAMLDEP) $(OCAMLCFLAGS) $(OcamlSources) $(OcamlHeaders) > $@ + +-include $(ObjDir)/$(LIBRARYNAME).ocamldep +endif + +ifdef TOOLNAME +$(ObjDir)/$(TOOLNAME).ocamldep: $(OcamlSources) $(OcamlHeaders) \ + $(OcamlDir)/.dir $(ObjDir)/.dir + $(Verb) $(OCAMLDEP) $(OCAMLCFLAGS) $(OcamlSources) $(OcamlHeaders) > $@ + +-include $(ObjDir)/$(TOOLNAME).ocamldep +endif + +##===- Build static library from C sources --------------------------------===## + +ifdef LibraryA +all-local:: $(LibraryA) +clean-local:: clean-a +install-local:: install-a +uninstall-local:: uninstall-a + +$(LibraryA): $(ObjectsO) $(OcamlDir)/.dir + $(Echo) "Building $(BuildMode) $(notdir $@)" + -$(Verb) $(RM) -f $@ + $(Verb) $(Archive) $@ $(ObjectsO) + $(Verb) $(Ranlib) $@ + +clean-a:: + -$(Verb) $(RM) -f $(LibraryA) + +install-a:: $(LibraryA) + $(Echo) "Installing $(BuildMode) $(DestA)" + $(Verb) $(MKDIR) $(PROJ_libocamldir) + $(Verb) $(INSTALL) $(LibraryA) $(DestA) + $(Verb) + +uninstall-a:: + $(Echo) "Uninstalling $(DestA)" + -$(Verb) $(RM) -f $(DestA) +endif + + +##===- Build stub library from C sources ----------------------------------===## + +ifdef SharedLib +all-local:: $(SharedLib) +clean-local:: clean-shared +install-local:: install-shared +uninstall-local:: uninstall-shared + +$(SharedLib): $(ObjectsO) $(OcamlDir)/.dir + $(Echo) "Building $(BuildMode) $(notdir $@)" + $(Verb) $(Link) $(SharedLinkOptions) $(OCAMLRPATH) $(LLVMLibsOptions) \ + -o $@ $(ObjectsO) + +clean-shared:: + -$(Verb) $(RM) -f $(SharedLib) + +install-shared:: $(SharedLib) + $(Echo) "Installing $(BuildMode) $(DestSharedLib)" + $(Verb) $(MKDIR) $(PROJ_libocamldir) + $(Verb) $(INSTALL) $(SharedLib) $(DestSharedLib) + $(Verb) + +uninstall-shared:: + $(Echo) "Uninstalling $(DestSharedLib)" + -$(Verb) $(RM) -f $(DestSharedLib) +endif + + +##===- Deposit dependent libraries adjacent to Ocaml libs -----------------===## + +all-local:: build-deplibs +clean-local:: clean-deplibs +install-local:: install-deplibs +uninstall-local:: uninstall-deplibs + +build-deplibs: $(OutputLibs) + +$(OcamlDir)/%.a: $(LibDir)/%.a + $(Verb) ln -sf $< $@ + +$(OcamlDir)/%.o: $(LibDir)/%.o + $(Verb) ln -sf $< $@ + +clean-deplibs: + $(Verb) $(RM) -f $(OutputLibs) + +install-deplibs: + $(Verb) $(MKDIR) $(PROJ_libocamldir) + $(Verb) for i in $(DestLibs:$(PROJ_libocamldir)/%=%); do \ + ln -sf "$(PROJ_libdir)/$$i" "$(PROJ_libocamldir)/$$i"; \ + done + +uninstall-deplibs: + $(Verb) $(RM) -f $(DestLibs) + + +##===- Build ocaml interfaces (.mli's -> .cmi's) --------------------------===## + +ifneq ($(OcamlHeaders),) +all-local:: build-cmis +clean-local:: clean-cmis +install-local:: install-cmis +uninstall-local:: uninstall-cmis + +build-cmis: $(OutputsCMI) + +$(OcamlDir)/%.cmi: $(ObjDir)/%.cmi $(OcamlDir)/.dir + $(Verb) $(CP) -f $< $@ + +$(ObjDir)/%.cmi: $(ObjDir)/%.mli $(ObjDir)/.dir + $(Echo) "Compiling $(notdir $<) for $(BuildMode) build" + $(Verb) $(Compile.CMI) $@ $< + +clean-cmis:: + -$(Verb) $(RM) -f $(OutputsCMI) + +# Also install the .mli's (headers) as documentation. +install-cmis: $(OutputsCMI) $(OcamlHeaders) + $(Verb) $(MKDIR) $(PROJ_libocamldir) + $(Verb) for i in $(OcamlHeaders:$(ObjDir)/%=%); do \ + $(EchoCmd) "Installing $(BuildMode) $(PROJ_libocamldir)/$$i"; \ + $(DataInstall) $(ObjDir)/$$i "$(PROJ_libocamldir)/$$i"; \ + done + $(Verb) for i in $(OutputsCMI:$(OcamlDir)/%=%); do \ + $(EchoCmd) "Installing $(BuildMode) $(PROJ_libocamldir)/$$i"; \ + $(DataInstall) $(OcamlDir)/$$i "$(PROJ_libocamldir)/$$i"; \ + done + +uninstall-cmis:: + $(Verb) for i in $(OutputsCMI:$(OcamlDir)/%=%); do \ + $(EchoCmd) "Uninstalling $(PROJ_libocamldir)/$$i"; \ + $(RM) -f "$(PROJ_libocamldir)/$$i"; \ + done + $(Verb) for i in $(OcamlHeaders:$(ObjDir)/%=%); do \ + $(EchoCmd) "Uninstalling $(PROJ_libocamldir)/$$i"; \ + $(RM) -f "$(PROJ_libocamldir)/$$i"; \ + done +endif + + +##===- Build ocaml bytecode archive (.ml's -> .cmo's -> .cma) -------------===## + +$(ObjDir)/%.cmo: $(ObjDir)/%.ml + $(Echo) "Compiling $(notdir $<) for $(BuildMode) build" + $(Verb) $(Compile.CMO) $@ $< + +ifdef LIBRARYNAME +all-local:: $(OutputCMA) +clean-local:: clean-cma +install-local:: install-cma +uninstall-local:: uninstall-cma + +$(OutputCMA): $(LibraryCMA) $(OcamlDir)/.dir + $(Verb) $(CP) -f $< $@ + +$(LibraryCMA): $(ObjectsCMO) $(OcamlDir)/.dir + $(Echo) "Archiving $(notdir $@) for $(BuildMode) build" + $(Verb) $(Archive.CMA) $@ $(ObjectsCMO) + +clean-cma:: + $(Verb) $(RM) -f $(OutputCMA) $(UsedLibNames:%=$(OcamlDir)/%) + +install-cma:: $(OutputCMA) + $(Echo) "Installing $(BuildMode) $(DestCMA)" + $(Verb) $(MKDIR) $(PROJ_libocamldir) + $(Verb) $(DataInstall) $(OutputCMA) "$(DestCMA)" + +uninstall-cma:: + $(Echo) "Uninstalling $(DestCMA)" + -$(Verb) $(RM) -f $(DestCMA) +endif + +##===- Build optimized ocaml archive (.ml's -> .cmx's -> .cmxa, .a) -------===## + +# The ocamlopt compiler is supported on a set of targets disjoint from LLVM's. +# If unavailable, 'configure' will not define OCAMLOPT in Makefile.config. +ifdef OCAMLOPT + +$(OcamlDir)/%.cmx: $(ObjDir)/%.cmx + $(Verb) $(CP) -f $< $@ + +$(ObjDir)/%.cmx: $(ObjDir)/%.ml + $(Echo) "Compiling optimized $(notdir $<) for $(BuildMode) build" + $(Verb) $(Compile.CMX) $@ $< + +ifdef LIBRARYNAME +all-local:: $(OutputCMXA) $(OutputsCMX) +clean-local:: clean-cmxa +install-local:: install-cmxa +uninstall-local:: uninstall-cmxa + +$(OutputCMXA): $(LibraryCMXA) + $(Verb) $(CP) -f $< $@ + $(Verb) $(CP) -f $(<:.cmxa=.a) $(@:.cmxa=.a) + +$(LibraryCMXA): $(ObjectsCMX) + $(Echo) "Archiving $(notdir $@) for $(BuildMode) build" + $(Verb) $(Archive.CMXA) $@ $(ObjectsCMX) + $(Verb) $(RM) -f $(@:.cmxa=.o) + +clean-cmxa:: + $(Verb) $(RM) -f $(OutputCMXA) $(OutputCMXA:.cmxa=.a) $(OutputsCMX) + +install-cmxa:: $(OutputCMXA) $(OutputsCMX) + $(Verb) $(MKDIR) $(PROJ_libocamldir) + $(Echo) "Installing $(BuildMode) $(DestCMXA)" + $(Verb) $(DataInstall) $(OutputCMXA) $(DestCMXA) + $(Echo) "Installing $(BuildMode) $(DestCMXA:.cmxa=.a)" + $(Verb) $(DataInstall) $(OutputCMXA:.cmxa=.a) $(DestCMXA:.cmxa=.a) + $(Verb) for i in $(OutputsCMX:$(OcamlDir)/%=%); do \ + $(EchoCmd) "Installing $(BuildMode) $(PROJ_libocamldir)/$$i"; \ + $(DataInstall) $(OcamlDir)/$$i "$(PROJ_libocamldir)/$$i"; \ + done + +uninstall-cmxa:: + $(Echo) "Uninstalling $(DestCMXA)" + $(Verb) $(RM) -f $(DestCMXA) + $(Echo) "Uninstalling $(DestCMXA:.cmxa=.a)" + $(Verb) $(RM) -f $(DestCMXA:.cmxa=.a) + $(Verb) for i in $(OutputsCMX:$(OcamlDir)/%=%); do \ + $(EchoCmd) "Uninstalling $(PROJ_libocamldir)/$$i"; \ + $(RM) -f $(PROJ_libocamldir)/$$i; \ + done +endif +endif + +##===- Build executables --------------------------------------------------===## + +ifdef TOOLNAME +all-local:: $(OutputEXE) +clean-local:: clean-exe + +$(OutputEXE): $(ToolEXE) $(OcamlDir)/.dir + $(Verb) $(CP) -f $< $@ + +ifndef OCAMLOPT +$(ToolEXE): $(ObjectsCMO) $(OcamlDir)/.dir + $(Echo) "Archiving $(notdir $@) for $(BuildMode) build" + $(Verb) $(Archive.EXE) $@ $(ObjectsCMO) +else +$(ToolEXE): $(ObjectsCMX) $(OcamlDir)/.dir + $(Echo) "Archiving $(notdir $@) for $(BuildMode) build" + $(Verb) $(Archive.EXE) $@ $(ObjectsCMX) +endif +endif + +##===- Generate documentation ---------------------------------------------===## + +$(ObjDir)/$(LIBRARYNAME).odoc: $(ObjectsCMI) + $(Echo) "Documenting $(notdir $@)" + $(Verb) $(OCAMLDOC) -I $(ObjDir) -I $(OcamlDir) -dump $@ $(OcamlHeaders) + +ocamldoc: $(ObjDir)/$(LIBRARYNAME).odoc + +##===- Debugging gunk -----------------------------------------------------===## +printvars:: printcamlvars + +printcamlvars:: + $(Echo) "LLVM_CONFIG : " '$(LLVM_CONFIG)' + $(Echo) "OCAMLCFLAGS : " '$(OCAMLCFLAGS)' + $(Echo) "OCAMLAFLAGS : " '$(OCAMLAFLAGS)' + $(Echo) "OCAMLC : " '$(OCAMLC)' + $(Echo) "OCAMLOPT : " '$(OCAMLOPT)' + $(Echo) "OCAMLDEP : " '$(OCAMLDEP)' + $(Echo) "Compile.CMI : " '$(Compile.CMI)' + $(Echo) "Compile.CMO : " '$(Compile.CMO)' + $(Echo) "Archive.CMA : " '$(Archive.CMA)' + $(Echo) "Compile.CMX : " '$(Compile.CMX)' + $(Echo) "Archive.CMXA : " '$(Archive.CMXA)' + $(Echo) "CAML_LIBDIR : " '$(CAML_LIBDIR)' + $(Echo) "LibraryCMA : " '$(LibraryCMA)' + $(Echo) "LibraryCMXA : " '$(LibraryCMXA)' + $(Echo) "SharedLib : " '$(SharedLib)' + $(Echo) "OcamlSources1: " '$(OcamlSources1)' + $(Echo) "OcamlSources2: " '$(OcamlSources2)' + $(Echo) "OcamlSources : " '$(OcamlSources)' + $(Echo) "OcamlHeaders1: " '$(OcamlHeaders1)' + $(Echo) "OcamlHeaders2: " '$(OcamlHeaders2)' + $(Echo) "OcamlHeaders : " '$(OcamlHeaders)' + $(Echo) "ObjectsCMI : " '$(ObjectsCMI)' + $(Echo) "ObjectsCMO : " '$(ObjectsCMO)' + $(Echo) "ObjectsCMX : " '$(ObjectsCMX)' + $(Echo) "OCAML_LIBDIR : " '$(OCAML_LIBDIR)' + $(Echo) "DestA : " '$(DestA)' + $(Echo) "DestCMA : " '$(DestCMA)' + $(Echo) "DestCMXA : " '$(DestCMXA)' + $(Echo) "DestSharedLib: " '$(DestSharedLib)' + $(Echo) "UsedLibs : " '$(UsedLibs)' + $(Echo) "UsedLibNames : " '$(UsedLibNames)' + +.PHONY: printcamlvars build-cmis \ + clean-a clean-cmis clean-cma clean-cmxa \ + install-a install-cmis install-cma install-cmxa \ + install-exe \ + uninstall-a uninstall-cmis uninstall-cma uninstall-cmxa \ + uninstall-exe diff --git a/bindings/ocaml/analysis/Makefile b/bindings/ocaml/analysis/Makefile new file mode 100644 index 00000000..cbfcb246 --- /dev/null +++ b/bindings/ocaml/analysis/Makefile @@ -0,0 +1,19 @@ +##===- bindings/ocaml/analysis/Makefile --------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +# +# This is the makefile for the Objective Caml Llvm_analysis interface. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../../.. +LIBRARYNAME := llvm_analysis +UsedComponents := analysis +UsedOcamlInterfaces := llvm + +include ../Makefile.ocaml diff --git a/bindings/ocaml/analysis/analysis_ocaml.c b/bindings/ocaml/analysis/analysis_ocaml.c new file mode 100644 index 00000000..91be2d3f --- /dev/null +++ b/bindings/ocaml/analysis/analysis_ocaml.c @@ -0,0 +1,72 @@ +/*===-- analysis_ocaml.c - LLVM OCaml Glue ----------------------*- C++ -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This file glues LLVM's OCaml interface to its C interface. These functions *| +|* are by and large transparent wrappers to the corresponding C functions. *| +|* *| +|* Note that these functions intentionally take liberties with the CAMLparamX *| +|* macros, since most of the parameters are not GC heap objects. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#include "llvm-c/Analysis.h" +#include "caml/alloc.h" +#include "caml/mlvalues.h" +#include "caml/memory.h" + + +/* Llvm.llmodule -> string option */ +CAMLprim value llvm_verify_module(LLVMModuleRef M) { + CAMLparam0(); + CAMLlocal2(String, Option); + + char *Message; + int Result = LLVMVerifyModule(M, LLVMReturnStatusAction, &Message); + + if (0 == Result) { + Option = Val_int(0); + } else { + Option = alloc(1, 0); + String = copy_string(Message); + Store_field(Option, 0, String); + } + + LLVMDisposeMessage(Message); + + CAMLreturn(Option); +} + +/* Llvm.llvalue -> bool */ +CAMLprim value llvm_verify_function(LLVMValueRef Fn) { + return Val_bool(LLVMVerifyFunction(Fn, LLVMReturnStatusAction) == 0); +} + +/* Llvm.llmodule -> unit */ +CAMLprim value llvm_assert_valid_module(LLVMModuleRef M) { + LLVMVerifyModule(M, LLVMAbortProcessAction, 0); + return Val_unit; +} + +/* Llvm.llvalue -> unit */ +CAMLprim value llvm_assert_valid_function(LLVMValueRef Fn) { + LLVMVerifyFunction(Fn, LLVMAbortProcessAction); + return Val_unit; +} + +/* Llvm.llvalue -> unit */ +CAMLprim value llvm_view_function_cfg(LLVMValueRef Fn) { + LLVMViewFunctionCFG(Fn); + return Val_unit; +} + +/* Llvm.llvalue -> unit */ +CAMLprim value llvm_view_function_cfg_only(LLVMValueRef Fn) { + LLVMViewFunctionCFGOnly(Fn); + return Val_unit; +} diff --git a/bindings/ocaml/analysis/llvm_analysis.ml b/bindings/ocaml/analysis/llvm_analysis.ml new file mode 100644 index 00000000..21088ab6 --- /dev/null +++ b/bindings/ocaml/analysis/llvm_analysis.ml @@ -0,0 +1,22 @@ +(*===-- llvm_analysis.ml - LLVM OCaml Interface -----------------*- C++ -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + + +external verify_module : Llvm.llmodule -> string option = "llvm_verify_module" + +external verify_function : Llvm.llvalue -> bool = "llvm_verify_function" + +external assert_valid_module : Llvm.llmodule -> unit + = "llvm_assert_valid_module" + +external assert_valid_function : Llvm.llvalue -> unit + = "llvm_assert_valid_function" +external view_function_cfg : Llvm.llvalue -> unit = "llvm_view_function_cfg" +external view_function_cfg_only : Llvm.llvalue -> unit + = "llvm_view_function_cfg_only" diff --git a/bindings/ocaml/analysis/llvm_analysis.mli b/bindings/ocaml/analysis/llvm_analysis.mli new file mode 100644 index 00000000..1a0af02b --- /dev/null +++ b/bindings/ocaml/analysis/llvm_analysis.mli @@ -0,0 +1,46 @@ +(*===-- llvm_analysis.mli - LLVM OCaml Interface ----------------*- C++ -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +(** Intermediate representation analysis. + + This interface provides an OCaml API for LLVM IR analyses, the classes in + the Analysis library. *) + +(** [verify_module m] returns [None] if the module [m] is valid, and + [Some reason] if it is invalid. [reason] is a string containing a + human-readable validation report. See [llvm::verifyModule]. *) +external verify_module : Llvm.llmodule -> string option = "llvm_verify_module" + +(** [verify_function f] returns [None] if the function [f] is valid, and + [Some reason] if it is invalid. [reason] is a string containing a + human-readable validation report. See [llvm::verifyFunction]. *) +external verify_function : Llvm.llvalue -> bool = "llvm_verify_function" + +(** [verify_module m] returns if the module [m] is valid, but prints a + validation report to [stderr] and aborts the program if it is invalid. See + [llvm::verifyModule]. *) +external assert_valid_module : Llvm.llmodule -> unit + = "llvm_assert_valid_module" + +(** [verify_function f] returns if the function [f] is valid, but prints a + validation report to [stderr] and aborts the program if it is invalid. See + [llvm::verifyFunction]. *) +external assert_valid_function : Llvm.llvalue -> unit + = "llvm_assert_valid_function" + +(** [view_function_cfg f] opens up a ghostscript window displaying the CFG of + the current function with the code for each basic block inside. + See [llvm::Function::viewCFG]. *) +external view_function_cfg : Llvm.llvalue -> unit = "llvm_view_function_cfg" + +(** [view_function_cfg_only f] works just like [view_function_cfg], but does not + include the contents of basic blocks into the nodes. + See [llvm::Function::viewCFGOnly]. *) +external view_function_cfg_only : Llvm.llvalue -> unit + = "llvm_view_function_cfg_only" diff --git a/bindings/ocaml/backends/META.llvm_backend.in b/bindings/ocaml/backends/META.llvm_backend.in new file mode 100644 index 00000000..0d4a6d68 --- /dev/null +++ b/bindings/ocaml/backends/META.llvm_backend.in @@ -0,0 +1,8 @@ +name = "llvm_@TARGET@" +version = "@PACKAGE_VERSION@" +description = "@TARGET@ Backend for LLVM" +requires = "llvm" +archive(byte) = "llvm_@TARGET@.cma" +archive(native) = "llvm_@TARGET@.cmxa" +directory = "." +linkopts = "-ccopt -lstdc++" \ No newline at end of file diff --git a/bindings/ocaml/backends/Makefile b/bindings/ocaml/backends/Makefile new file mode 100644 index 00000000..ff39212c --- /dev/null +++ b/bindings/ocaml/backends/Makefile @@ -0,0 +1,61 @@ +##===- bindings/ocaml/backends/Makefile --------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +# +# This is the master makefile for backend-specific bindings. It works by +# creating a stub makefile for each configured target, e.g. Makefile.ARM, and +# invoking it to compile the corresponding library, e.g. Llvm_ARM. +# +# This scheme allows to keep changes to Makefile.ocaml minimal. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../../.. +ExtraMakefiles = $(PROJ_OBJ_DIR)/Makefile.common + +include $(LEVEL)/Makefile.config +include $(LEVEL)/Makefile.common + +all-local:: all-backends +clean-local:: clean-backends +install-local:: install-backends +uninstall-local:: uninstall-backends + +stubs: + $(Verb) for i in $(TARGETS_TO_BUILD); do \ + $(ECHO) "TARGET := $$i" > Makefile.$$i; \ + $(ECHO) "include Makefile.common" >> Makefile.$$i; \ + done + +all-backends: stubs + $(Verb) for i in $(TARGETS_TO_BUILD); do \ + $(MAKE) -f Makefile.$$i all; \ + done + +clean-backends: stubs + $(Verb) for i in $(TARGETS_TO_BUILD); do \ + $(MAKE) -f Makefile.$$i clean; \ + $(RM) -f Makefile.$$i; \ + done + +install-backends: stubs + $(Verb) for i in $(TARGETS_TO_BUILD); do \ + $(MAKE) -f Makefile.$$i install; \ + done + +uninstall-backends: stubs + $(Verb) for i in $(TARGETS_TO_BUILD); do \ + $(MAKE) -f Makefile.$$i uninstall; \ + done + +ocamldoc: stubs + $(Verb) for i in $(TARGETS_TO_BUILD); do \ + $(MAKE) -f Makefile.$$i ocamldoc; \ + done + +.PHONY: all-backends clean-backends install-backends uninstall-backends ocamldoc diff --git a/bindings/ocaml/backends/Makefile.common b/bindings/ocaml/backends/Makefile.common new file mode 100644 index 00000000..be65dd0f --- /dev/null +++ b/bindings/ocaml/backends/Makefile.common @@ -0,0 +1,65 @@ +##===- bindings/ocaml/backends/Makefile.common -------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +# +# This is the slave makefile for backend-specific bindings. This makefile should +# be included after defining TARGET. It will then substitute @TARGET@ for +# the value of TARGET in various *.in files and build an OCaml library in +# a regular way. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../../.. +LIBRARYNAME := llvm_$(TARGET) +UsedComponents := $(TARGET) +UsedOcamlInterfaces := llvm + +include $(LEVEL)/Makefile.config + +SOURCES := $(TARGET)_ocaml.c +OcamlHeaders1 := $(PROJ_SRC_DIR)/llvm_$(TARGET).mli +OcamlSources1 := $(PROJ_SRC_DIR)/llvm_$(TARGET).ml + +include ../Makefile.ocaml + +$(ObjDir)/llvm_$(TARGET).ml: $(PROJ_SRC_DIR)/llvm_backend.ml.in $(ObjDir)/.dir + $(Verb) $(SED) -e 's/@TARGET@/$(TARGET)/' $< > $@ + +$(ObjDir)/llvm_$(TARGET).mli: $(PROJ_SRC_DIR)/llvm_backend.mli.in $(ObjDir)/.dir + $(Verb) $(SED) -e 's/@TARGET@/$(TARGET)/' $< > $@ + +$(ObjDir)/$(TARGET)_ocaml.o: $(PROJ_SRC_DIR)/backend_ocaml.c $(ObjDir)/.dir + $(Echo) "Compiling $*.c for $(BuildMode) build" $(PIC_FLAG) + $(Verb) $(Compile.C) -DTARGET=$(TARGET) $< -o $@ + + +##===- OCamlFind Package --------------------------------------------------===## + +all-local:: copy-meta +install-local:: install-meta +uninstall-local:: uninstall-meta + +DestMETA := $(PROJ_libocamldir)/META.llvm_$(TARGET) + +# Easy way of generating META in the objdir +copy-meta: $(OcamlDir)/META.llvm_$(TARGET) + +$(OcamlDir)/META.llvm_$(TARGET): META.llvm_backend.in + $(Verb) $(SED) -e 's/@TARGET@/$(TARGET)/' \ + -e 's/@PACKAGE_VERSION@/$(LLVMVersion)/' $< > $@ + +install-meta:: $(OcamlDir)/META.llvm_$(TARGET) + $(Echo) "Install $(BuildMode) $(DestMETA)" + $(Verb) $(MKDIR) $(PROJ_libocamldir) + $(Verb) $(DataInstall) $< "$(DestMETA)" + +uninstall-meta:: + $(Echo) "Uninstalling $(DestMETA)" + -$(Verb) $(RM) -f "$(DestMETA)" + +.PHONY: copy-meta install-meta uninstall-meta diff --git a/bindings/ocaml/backends/backend_ocaml.c b/bindings/ocaml/backends/backend_ocaml.c new file mode 100644 index 00000000..2d4ba852 --- /dev/null +++ b/bindings/ocaml/backends/backend_ocaml.c @@ -0,0 +1,37 @@ +/*===-- backend_ocaml.c - LLVM OCaml Glue -----------------------*- C++ -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This file glues LLVM's OCaml interface to its C interface. These functions *| +|* are by and large transparent wrappers to the corresponding C functions. *| +|* *| +|* Note that these functions intentionally take liberties with the CAMLparamX *| +|* macros, since most of the parameters are not GC heap objects. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#include "llvm-c/Target.h" +#include "caml/alloc.h" +#include "caml/memory.h" + +// TODO: Figure out how to call these only for targets which support them. +// LLVMInitialize ## target ## AsmPrinter(); +// LLVMInitialize ## target ## AsmParser(); +// LLVMInitialize ## target ## Disassembler(); + +#define INITIALIZER1(target) \ + CAMLprim value llvm_initialize_ ## target(value Unit) { \ + LLVMInitialize ## target ## TargetInfo(); \ + LLVMInitialize ## target ## Target(); \ + LLVMInitialize ## target ## TargetMC(); \ + return Val_unit; \ + } + +#define INITIALIZER(target) INITIALIZER1(target) + +INITIALIZER(TARGET) diff --git a/bindings/ocaml/backends/llvm_backend.ml.in b/bindings/ocaml/backends/llvm_backend.ml.in new file mode 100644 index 00000000..bd1e5860 --- /dev/null +++ b/bindings/ocaml/backends/llvm_backend.ml.in @@ -0,0 +1,10 @@ +(*===-- llvm_backend.ml.in - LLVM OCaml Interface -------------*- OCaml -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +external initialize : unit -> unit = "llvm_initialize_@TARGET@" diff --git a/bindings/ocaml/backends/llvm_backend.mli.in b/bindings/ocaml/backends/llvm_backend.mli.in new file mode 100644 index 00000000..9506789a --- /dev/null +++ b/bindings/ocaml/backends/llvm_backend.mli.in @@ -0,0 +1,19 @@ +(*===-- llvm_backend.mli.in - LLVM OCaml Interface ------------*- OCaml -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +(** @TARGET@ Initialization. + + This interface provides an OCaml API for initialization of + the @TARGET@ LLVM target. By referencing this module, you will cause + OCaml to load or link in the LLVM libraries corresponding to the target. + By calling [initialize], you will register components of this target + in the target registry, which is necessary in order to emit assembly, + object files, and so on. *) + +external initialize : unit -> unit = "llvm_initialize_@TARGET@" \ No newline at end of file diff --git a/bindings/ocaml/bitreader/Makefile b/bindings/ocaml/bitreader/Makefile new file mode 100644 index 00000000..a1c7de89 --- /dev/null +++ b/bindings/ocaml/bitreader/Makefile @@ -0,0 +1,19 @@ +##===- bindings/ocaml/bitreader/Makefile -------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +# +# This is the makefile for the Objective Caml Llvm_bitreader interface. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../../.. +LIBRARYNAME := llvm_bitreader +UsedComponents := bitreader +UsedOcamlInterfaces := llvm + +include ../Makefile.ocaml diff --git a/bindings/ocaml/bitreader/bitreader_ocaml.c b/bindings/ocaml/bitreader/bitreader_ocaml.c new file mode 100644 index 00000000..0264e731 --- /dev/null +++ b/bindings/ocaml/bitreader/bitreader_ocaml.c @@ -0,0 +1,73 @@ +/*===-- bitwriter_ocaml.c - LLVM OCaml Glue ---------------------*- C++ -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This file glues LLVM's OCaml interface to its C interface. These functions *| +|* are by and large transparent wrappers to the corresponding C functions. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#include "llvm-c/BitReader.h" +#include "caml/alloc.h" +#include "caml/fail.h" +#include "caml/memory.h" + + +/* Can't use the recommended caml_named_value mechanism for backwards + compatibility reasons. This is largely equivalent. */ +static value llvm_bitreader_error_exn; + +CAMLprim value llvm_register_bitreader_exns(value Error) { + llvm_bitreader_error_exn = Field(Error, 0); + register_global_root(&llvm_bitreader_error_exn); + return Val_unit; +} + +static void llvm_raise(value Prototype, char *Message) { + CAMLparam1(Prototype); + CAMLlocal1(CamlMessage); + + CamlMessage = copy_string(Message); + LLVMDisposeMessage(Message); + + raise_with_arg(Prototype, CamlMessage); + abort(); /* NOTREACHED */ +#ifdef CAMLnoreturn + CAMLnoreturn; /* Silences warnings, but is missing in some versions. */ +#endif +} + + +/*===-- Modules -----------------------------------------------------------===*/ + +/* Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule */ +CAMLprim value llvm_get_module(LLVMContextRef C, LLVMMemoryBufferRef MemBuf) { + CAMLparam0(); + CAMLlocal2(Variant, MessageVal); + char *Message; + + LLVMModuleRef M; + if (LLVMGetBitcodeModuleInContext(C, MemBuf, &M, &Message)) + llvm_raise(llvm_bitreader_error_exn, Message); + + CAMLreturn((value) M); +} + +/* Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule */ +CAMLprim value llvm_parse_bitcode(LLVMContextRef C, + LLVMMemoryBufferRef MemBuf) { + CAMLparam0(); + CAMLlocal2(Variant, MessageVal); + LLVMModuleRef M; + char *Message; + + if (LLVMParseBitcodeInContext(C, MemBuf, &M, &Message)) + llvm_raise(llvm_bitreader_error_exn, Message); + + CAMLreturn((value) M); +} diff --git a/bindings/ocaml/bitreader/llvm_bitreader.ml b/bindings/ocaml/bitreader/llvm_bitreader.ml new file mode 100644 index 00000000..865208c1 --- /dev/null +++ b/bindings/ocaml/bitreader/llvm_bitreader.ml @@ -0,0 +1,20 @@ +(*===-- llvm_bitreader.ml - LLVM OCaml Interface ----------------*- C++ -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + + +exception Error of string + +external register_exns : exn -> unit = "llvm_register_bitreader_exns" +let _ = register_exns (Error "") + +external get_module : Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule + = "llvm_get_module" + +external parse_bitcode : Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule + = "llvm_parse_bitcode" diff --git a/bindings/ocaml/bitreader/llvm_bitreader.mli b/bindings/ocaml/bitreader/llvm_bitreader.mli new file mode 100644 index 00000000..ff377b9b --- /dev/null +++ b/bindings/ocaml/bitreader/llvm_bitreader.mli @@ -0,0 +1,28 @@ +(*===-- llvm_bitreader.mli - LLVM OCaml Interface ---------------*- C++ -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +(** Bitcode reader. + + This interface provides an OCaml API for the LLVM bitcode reader, the + classes in the Bitreader library. *) + +exception Error of string + +(** [get_module context mb] reads the bitcode for a new module [m] from the + memory buffer [mb] in the context [context]. Returns [m] if successful, or + raises [Error msg] otherwise, where [msg] is a description of the error + encountered. See the function [llvm::getBitcodeModule]. *) +val get_module : Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule + + +(** [parse_bitcode context mb] parses the bitcode for a new module [m] from the + memory buffer [mb] in the context [context]. Returns [m] if successful, or + raises [Error msg] otherwise, where [msg] is a description of the error + encountered. See the function [llvm::ParseBitcodeFile]. *) +val parse_bitcode : Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule diff --git a/bindings/ocaml/bitwriter/Makefile b/bindings/ocaml/bitwriter/Makefile new file mode 100644 index 00000000..cec0a59c --- /dev/null +++ b/bindings/ocaml/bitwriter/Makefile @@ -0,0 +1,19 @@ +##===- bindings/ocaml/bitwriter/Makefile -------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +# +# This is the makefile for the Objective Caml Llvm_bitwriter interface. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../../.. +LIBRARYNAME := llvm_bitwriter +UsedComponents := bitwriter +UsedOcamlInterfaces := llvm + +include ../Makefile.ocaml diff --git a/bindings/ocaml/bitwriter/bitwriter_ocaml.c b/bindings/ocaml/bitwriter/bitwriter_ocaml.c new file mode 100644 index 00000000..a47f7003 --- /dev/null +++ b/bindings/ocaml/bitwriter/bitwriter_ocaml.c @@ -0,0 +1,45 @@ +/*===-- bitwriter_ocaml.c - LLVM OCaml Glue ---------------------*- C++ -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This file glues LLVM's OCaml interface to its C interface. These functions *| +|* are by and large transparent wrappers to the corresponding C functions. *| +|* *| +|* Note that these functions intentionally take liberties with the CAMLparamX *| +|* macros, since most of the parameters are not GC heap objects. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#include "llvm-c/BitWriter.h" +#include "llvm-c/Core.h" +#include "caml/alloc.h" +#include "caml/mlvalues.h" +#include "caml/memory.h" + +/*===-- Modules -----------------------------------------------------------===*/ + +/* Llvm.llmodule -> string -> bool */ +CAMLprim value llvm_write_bitcode_file(value M, value Path) { + int res = LLVMWriteBitcodeToFile((LLVMModuleRef) M, String_val(Path)); + return Val_bool(res == 0); +} + +/* ?unbuffered:bool -> Llvm.llmodule -> Unix.file_descr -> bool */ +CAMLprim value llvm_write_bitcode_to_fd(value U, value M, value FD) { + int Unbuffered; + int res; + + if (U == Val_int(0)) { + Unbuffered = 0; + } else { + Unbuffered = Bool_val(Field(U,0)); + } + + res = LLVMWriteBitcodeToFD((LLVMModuleRef) M, Int_val(FD), 0, Unbuffered); + return Val_bool(res == 0); +} diff --git a/bindings/ocaml/bitwriter/llvm_bitwriter.ml b/bindings/ocaml/bitwriter/llvm_bitwriter.ml new file mode 100644 index 00000000..fac85538 --- /dev/null +++ b/bindings/ocaml/bitwriter/llvm_bitwriter.ml @@ -0,0 +1,25 @@ +(*===-- llvm_bitwriter.ml - LLVM OCaml Interface ----------------*- C++ -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------=== + * + * This interface provides an OCaml API for the LLVM intermediate + * representation, the classes in the VMCore library. + * + *===----------------------------------------------------------------------===*) + + +(* Writes the bitcode for module the given path. Returns true if successful. *) +external write_bitcode_file : Llvm.llmodule -> string -> bool + = "llvm_write_bitcode_file" + +external write_bitcode_to_fd : ?unbuffered:bool -> Llvm.llmodule + -> Unix.file_descr -> bool + = "llvm_write_bitcode_to_fd" + +let output_bitcode ?unbuffered channel m = + write_bitcode_to_fd ?unbuffered m (Unix.descr_of_out_channel channel) diff --git a/bindings/ocaml/bitwriter/llvm_bitwriter.mli b/bindings/ocaml/bitwriter/llvm_bitwriter.mli new file mode 100644 index 00000000..bb3e3b89 --- /dev/null +++ b/bindings/ocaml/bitwriter/llvm_bitwriter.mli @@ -0,0 +1,30 @@ +(*===-- llvm_bitwriter.mli - LLVM OCaml Interface ---------------*- C++ -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +(** Bitcode writer. + + This interface provides an OCaml API for the LLVM bitcode writer, the + classes in the Bitwriter library. *) + +(** [write_bitcode_file m path] writes the bitcode for module [m] to the file at + [path]. Returns [true] if successful, [false] otherwise. *) +external write_bitcode_file : Llvm.llmodule -> string -> bool + = "llvm_write_bitcode_file" + +(** [write_bitcode_to_fd ~unbuffered fd m] writes the bitcode for module + [m] to the channel [c]. If [unbuffered] is [true], after every write the fd + will be flushed. Returns [true] if successful, [false] otherwise. *) +external write_bitcode_to_fd : ?unbuffered:bool -> Llvm.llmodule + -> Unix.file_descr -> bool + = "llvm_write_bitcode_to_fd" + +(** [output_bitcode ~unbuffered c m] writes the bitcode for module [m] + to the channel [c]. If [unbuffered] is [true], after every write the fd + will be flushed. Returns [true] if successful, [false] otherwise. *) +val output_bitcode : ?unbuffered:bool -> out_channel -> Llvm.llmodule -> bool diff --git a/bindings/ocaml/executionengine/Makefile b/bindings/ocaml/executionengine/Makefile new file mode 100644 index 00000000..5fa3f220 --- /dev/null +++ b/bindings/ocaml/executionengine/Makefile @@ -0,0 +1,19 @@ +##===- bindings/ocaml/executionengine/Makefile --------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +# +# This is the makefile for the Objective Caml Llvm_executionengine interface. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../../.. +LIBRARYNAME := llvm_executionengine +UsedComponents := executionengine jit interpreter native +UsedOcamlInterfaces := llvm llvm_target + +include ../Makefile.ocaml diff --git a/bindings/ocaml/executionengine/executionengine_ocaml.c b/bindings/ocaml/executionengine/executionengine_ocaml.c new file mode 100644 index 00000000..4b44a910 --- /dev/null +++ b/bindings/ocaml/executionengine/executionengine_ocaml.c @@ -0,0 +1,341 @@ +/*===-- executionengine_ocaml.c - LLVM OCaml Glue ---------------*- C++ -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This file glues LLVM's OCaml interface to its C interface. These functions *| +|* are by and large transparent wrappers to the corresponding C functions. *| +|* *| +|* Note that these functions intentionally take liberties with the CAMLparamX *| +|* macros, since most of the parameters are not GC heap objects. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#include "llvm-c/ExecutionEngine.h" +#include "llvm-c/Target.h" +#include "caml/alloc.h" +#include "caml/custom.h" +#include "caml/fail.h" +#include "caml/memory.h" +#include +#include + +/* Force the LLVM interpreter and JIT to be linked in. */ +void llvm_initialize(void) { + LLVMLinkInInterpreter(); + LLVMLinkInJIT(); +} + +/* unit -> bool */ +CAMLprim value llvm_initialize_native_target(value Unit) { + return Val_bool(LLVMInitializeNativeTarget()); +} + +/* Can't use the recommended caml_named_value mechanism for backwards + compatibility reasons. This is largely equivalent. */ +static value llvm_ee_error_exn; + +CAMLprim value llvm_register_ee_exns(value Error) { + llvm_ee_error_exn = Field(Error, 0); + register_global_root(&llvm_ee_error_exn); + return Val_unit; +} + +static void llvm_raise(value Prototype, char *Message) { + CAMLparam1(Prototype); + CAMLlocal1(CamlMessage); + + CamlMessage = copy_string(Message); + LLVMDisposeMessage(Message); + + raise_with_arg(Prototype, CamlMessage); + abort(); /* NOTREACHED */ +#ifdef CAMLnoreturn + CAMLnoreturn; /* Silences warnings, but is missing in some versions. */ +#endif +} + + +/*--... Operations on generic values .......................................--*/ + +#define Genericvalue_val(v) (*(LLVMGenericValueRef *)(Data_custom_val(v))) + +static void llvm_finalize_generic_value(value GenVal) { + LLVMDisposeGenericValue(Genericvalue_val(GenVal)); +} + +static struct custom_operations generic_value_ops = { + (char *) "LLVMGenericValue", + llvm_finalize_generic_value, + custom_compare_default, + custom_hash_default, + custom_serialize_default, + custom_deserialize_default +#ifdef custom_compare_ext_default + , custom_compare_ext_default +#endif +}; + +static value alloc_generic_value(LLVMGenericValueRef Ref) { + value Val = alloc_custom(&generic_value_ops, sizeof(LLVMGenericValueRef), 0, 1); + Genericvalue_val(Val) = Ref; + return Val; +} + +/* Llvm.lltype -> float -> t */ +CAMLprim value llvm_genericvalue_of_float(LLVMTypeRef Ty, value N) { + CAMLparam1(N); + CAMLreturn(alloc_generic_value( + LLVMCreateGenericValueOfFloat(Ty, Double_val(N)))); +} + +/* 'a -> t */ +CAMLprim value llvm_genericvalue_of_pointer(value V) { + CAMLparam1(V); + CAMLreturn(alloc_generic_value(LLVMCreateGenericValueOfPointer(Op_val(V)))); +} + +/* Llvm.lltype -> int -> t */ +CAMLprim value llvm_genericvalue_of_int(LLVMTypeRef Ty, value Int) { + return alloc_generic_value(LLVMCreateGenericValueOfInt(Ty, Int_val(Int), 1)); +} + +/* Llvm.lltype -> int32 -> t */ +CAMLprim value llvm_genericvalue_of_int32(LLVMTypeRef Ty, value Int32) { + CAMLparam1(Int32); + CAMLreturn(alloc_generic_value( + LLVMCreateGenericValueOfInt(Ty, Int32_val(Int32), 1))); +} + +/* Llvm.lltype -> nativeint -> t */ +CAMLprim value llvm_genericvalue_of_nativeint(LLVMTypeRef Ty, value NatInt) { + CAMLparam1(NatInt); + CAMLreturn(alloc_generic_value( + LLVMCreateGenericValueOfInt(Ty, Nativeint_val(NatInt), 1))); +} + +/* Llvm.lltype -> int64 -> t */ +CAMLprim value llvm_genericvalue_of_int64(LLVMTypeRef Ty, value Int64) { + CAMLparam1(Int64); + CAMLreturn(alloc_generic_value( + LLVMCreateGenericValueOfInt(Ty, Int64_val(Int64), 1))); +} + +/* Llvm.lltype -> t -> float */ +CAMLprim value llvm_genericvalue_as_float(LLVMTypeRef Ty, value GenVal) { + CAMLparam1(GenVal); + CAMLreturn(copy_double( + LLVMGenericValueToFloat(Ty, Genericvalue_val(GenVal)))); +} + +/* t -> 'a */ +CAMLprim value llvm_genericvalue_as_pointer(value GenVal) { + return Val_op(LLVMGenericValueToPointer(Genericvalue_val(GenVal))); +} + +/* t -> int */ +CAMLprim value llvm_genericvalue_as_int(value GenVal) { + assert(LLVMGenericValueIntWidth(Genericvalue_val(GenVal)) <= 8 * sizeof(value) + && "Generic value too wide to treat as an int!"); + return Val_int(LLVMGenericValueToInt(Genericvalue_val(GenVal), 1)); +} + +/* t -> int32 */ +CAMLprim value llvm_genericvalue_as_int32(value GenVal) { + CAMLparam1(GenVal); + assert(LLVMGenericValueIntWidth(Genericvalue_val(GenVal)) <= 32 + && "Generic value too wide to treat as an int32!"); + CAMLreturn(copy_int32(LLVMGenericValueToInt(Genericvalue_val(GenVal), 1))); +} + +/* t -> int64 */ +CAMLprim value llvm_genericvalue_as_int64(value GenVal) { + CAMLparam1(GenVal); + assert(LLVMGenericValueIntWidth(Genericvalue_val(GenVal)) <= 64 + && "Generic value too wide to treat as an int64!"); + CAMLreturn(copy_int64(LLVMGenericValueToInt(Genericvalue_val(GenVal), 1))); +} + +/* t -> nativeint */ +CAMLprim value llvm_genericvalue_as_nativeint(value GenVal) { + CAMLparam1(GenVal); + assert(LLVMGenericValueIntWidth(Genericvalue_val(GenVal)) <= 8 * sizeof(value) + && "Generic value too wide to treat as a nativeint!"); + CAMLreturn(copy_nativeint(LLVMGenericValueToInt(Genericvalue_val(GenVal),1))); +} + + +/*--... Operations on execution engines ....................................--*/ + +/* llmodule -> ExecutionEngine.t */ +CAMLprim LLVMExecutionEngineRef llvm_ee_create(LLVMModuleRef M) { + LLVMExecutionEngineRef Interp; + char *Error; + if (LLVMCreateExecutionEngineForModule(&Interp, M, &Error)) + llvm_raise(llvm_ee_error_exn, Error); + return Interp; +} + +/* llmodule -> ExecutionEngine.t */ +CAMLprim LLVMExecutionEngineRef +llvm_ee_create_interpreter(LLVMModuleRef M) { + LLVMExecutionEngineRef Interp; + char *Error; + if (LLVMCreateInterpreterForModule(&Interp, M, &Error)) + llvm_raise(llvm_ee_error_exn, Error); + return Interp; +} + +/* llmodule -> int -> ExecutionEngine.t */ +CAMLprim LLVMExecutionEngineRef +llvm_ee_create_jit(LLVMModuleRef M, value OptLevel) { + LLVMExecutionEngineRef JIT; + char *Error; + if (LLVMCreateJITCompilerForModule(&JIT, M, Int_val(OptLevel), &Error)) + llvm_raise(llvm_ee_error_exn, Error); + return JIT; +} + +/* ExecutionEngine.t -> unit */ +CAMLprim value llvm_ee_dispose(LLVMExecutionEngineRef EE) { + LLVMDisposeExecutionEngine(EE); + return Val_unit; +} + +/* llmodule -> ExecutionEngine.t -> unit */ +CAMLprim value llvm_ee_add_module(LLVMModuleRef M, LLVMExecutionEngineRef EE) { + LLVMAddModule(EE, M); + return Val_unit; +} + +/* llmodule -> ExecutionEngine.t -> llmodule */ +CAMLprim LLVMModuleRef llvm_ee_remove_module(LLVMModuleRef M, + LLVMExecutionEngineRef EE) { + LLVMModuleRef RemovedModule; + char *Error; + if (LLVMRemoveModule(EE, M, &RemovedModule, &Error)) + llvm_raise(llvm_ee_error_exn, Error); + return RemovedModule; +} + +/* string -> ExecutionEngine.t -> llvalue option */ +CAMLprim value llvm_ee_find_function(value Name, LLVMExecutionEngineRef EE) { + CAMLparam1(Name); + CAMLlocal1(Option); + LLVMValueRef Found; + if (LLVMFindFunction(EE, String_val(Name), &Found)) + CAMLreturn(Val_unit); + Option = alloc(1, 0); + Field(Option, 0) = Val_op(Found); + CAMLreturn(Option); +} + +/* llvalue -> GenericValue.t array -> ExecutionEngine.t -> GenericValue.t */ +CAMLprim value llvm_ee_run_function(LLVMValueRef F, value Args, + LLVMExecutionEngineRef EE) { + unsigned NumArgs; + LLVMGenericValueRef Result, *GVArgs; + unsigned I; + + NumArgs = Wosize_val(Args); + GVArgs = (LLVMGenericValueRef*) malloc(NumArgs * sizeof(LLVMGenericValueRef)); + for (I = 0; I != NumArgs; ++I) + GVArgs[I] = Genericvalue_val(Field(Args, I)); + + Result = LLVMRunFunction(EE, F, NumArgs, GVArgs); + + free(GVArgs); + return alloc_generic_value(Result); +} + +/* ExecutionEngine.t -> unit */ +CAMLprim value llvm_ee_run_static_ctors(LLVMExecutionEngineRef EE) { + LLVMRunStaticConstructors(EE); + return Val_unit; +} + +/* ExecutionEngine.t -> unit */ +CAMLprim value llvm_ee_run_static_dtors(LLVMExecutionEngineRef EE) { + LLVMRunStaticDestructors(EE); + return Val_unit; +} + +/* llvalue -> string array -> (string * string) array -> ExecutionEngine.t -> + int */ +CAMLprim value llvm_ee_run_function_as_main(LLVMValueRef F, + value Args, value Env, + LLVMExecutionEngineRef EE) { + CAMLparam2(Args, Env); + int I, NumArgs, NumEnv, EnvSize, Result; + const char **CArgs, **CEnv; + char *CEnvBuf, *Pos; + + NumArgs = Wosize_val(Args); + NumEnv = Wosize_val(Env); + + /* Build the environment. */ + CArgs = (const char **) malloc(NumArgs * sizeof(char*)); + for (I = 0; I != NumArgs; ++I) + CArgs[I] = String_val(Field(Args, I)); + + /* Compute the size of the environment string buffer. */ + for (I = 0, EnvSize = 0; I != NumEnv; ++I) { + EnvSize += strlen(String_val(Field(Field(Env, I), 0))) + 1; + EnvSize += strlen(String_val(Field(Field(Env, I), 1))) + 1; + } + + /* Build the environment. */ + CEnv = (const char **) malloc((NumEnv + 1) * sizeof(char*)); + CEnvBuf = (char*) malloc(EnvSize); + Pos = CEnvBuf; + for (I = 0; I != NumEnv; ++I) { + char *Name = String_val(Field(Field(Env, I), 0)), + *Value = String_val(Field(Field(Env, I), 1)); + int NameLen = strlen(Name), + ValueLen = strlen(Value); + + CEnv[I] = Pos; + memcpy(Pos, Name, NameLen); + Pos += NameLen; + *Pos++ = '='; + memcpy(Pos, Value, ValueLen); + Pos += ValueLen; + *Pos++ = '\0'; + } + CEnv[NumEnv] = NULL; + + Result = LLVMRunFunctionAsMain(EE, F, NumArgs, CArgs, CEnv); + + free(CArgs); + free(CEnv); + free(CEnvBuf); + + CAMLreturn(Val_int(Result)); +} + +/* llvalue -> ExecutionEngine.t -> unit */ +CAMLprim value llvm_ee_free_machine_code(LLVMValueRef F, + LLVMExecutionEngineRef EE) { + LLVMFreeMachineCodeForFunction(EE, F); + return Val_unit; +} + +extern value llvm_alloc_data_layout(LLVMTargetDataRef TargetData); + +/* ExecutionEngine.t -> Llvm_target.DataLayout.t */ +CAMLprim value llvm_ee_get_data_layout(LLVMExecutionEngineRef EE) { + value DataLayout; + LLVMTargetDataRef OrigDataLayout; + OrigDataLayout = LLVMGetExecutionEngineTargetData(EE); + + char* TargetDataCStr; + TargetDataCStr = LLVMCopyStringRepOfTargetData(OrigDataLayout); + DataLayout = llvm_alloc_data_layout(LLVMCreateTargetData(TargetDataCStr)); + LLVMDisposeMessage(TargetDataCStr); + + return DataLayout; +} diff --git a/bindings/ocaml/executionengine/llvm_executionengine.ml b/bindings/ocaml/executionengine/llvm_executionengine.ml new file mode 100644 index 00000000..a738df76 --- /dev/null +++ b/bindings/ocaml/executionengine/llvm_executionengine.ml @@ -0,0 +1,111 @@ +(*===-- llvm_executionengine.ml - LLVM OCaml Interface ----------*- C++ -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + + +exception Error of string + +external register_exns: exn -> unit + = "llvm_register_ee_exns" + + +module GenericValue = struct + type t + + external of_float: Llvm.lltype -> float -> t + = "llvm_genericvalue_of_float" + external of_pointer: 'a -> t + = "llvm_genericvalue_of_pointer" + external of_int32: Llvm.lltype -> int32 -> t + = "llvm_genericvalue_of_int32" + external of_int: Llvm.lltype -> int -> t + = "llvm_genericvalue_of_int" + external of_nativeint: Llvm.lltype -> nativeint -> t + = "llvm_genericvalue_of_nativeint" + external of_int64: Llvm.lltype -> int64 -> t + = "llvm_genericvalue_of_int64" + + external as_float: Llvm.lltype -> t -> float + = "llvm_genericvalue_as_float" + external as_pointer: t -> 'a + = "llvm_genericvalue_as_pointer" + external as_int32: t -> int32 + = "llvm_genericvalue_as_int32" + external as_int: t -> int + = "llvm_genericvalue_as_int" + external as_nativeint: t -> nativeint + = "llvm_genericvalue_as_nativeint" + external as_int64: t -> int64 + = "llvm_genericvalue_as_int64" +end + + +module ExecutionEngine = struct + type t + + (* FIXME: Ocaml is not running this setup code unless we use 'val' in the + interface, which causes the emission of a stub for each function; + using 'external' in the module allows direct calls into + ocaml_executionengine.c. This is hardly fatal, but it is unnecessary + overhead on top of the two stubs that are already invoked for each + call into LLVM. *) + let _ = register_exns (Error "") + + external create: Llvm.llmodule -> t + = "llvm_ee_create" + external create_interpreter: Llvm.llmodule -> t + = "llvm_ee_create_interpreter" + external create_jit: Llvm.llmodule -> int -> t + = "llvm_ee_create_jit" + external dispose: t -> unit + = "llvm_ee_dispose" + external add_module: Llvm.llmodule -> t -> unit + = "llvm_ee_add_module" + external remove_module: Llvm.llmodule -> t -> Llvm.llmodule + = "llvm_ee_remove_module" + external find_function: string -> t -> Llvm.llvalue option + = "llvm_ee_find_function" + external run_function: Llvm.llvalue -> GenericValue.t array -> t -> + GenericValue.t + = "llvm_ee_run_function" + external run_static_ctors: t -> unit + = "llvm_ee_run_static_ctors" + external run_static_dtors: t -> unit + = "llvm_ee_run_static_dtors" + external run_function_as_main: Llvm.llvalue -> string array -> + (string * string) array -> t -> int + = "llvm_ee_run_function_as_main" + external free_machine_code: Llvm.llvalue -> t -> unit + = "llvm_ee_free_machine_code" + + external data_layout : t -> Llvm_target.DataLayout.t + = "llvm_ee_get_data_layout" + + (* The following are not bound. Patches are welcome. + + add_global_mapping: llvalue -> llgenericvalue -> t -> unit + clear_all_global_mappings: t -> unit + update_global_mapping: llvalue -> llgenericvalue -> t -> unit + get_pointer_to_global_if_available: llvalue -> t -> llgenericvalue + get_pointer_to_global: llvalue -> t -> llgenericvalue + get_pointer_to_function: llvalue -> t -> llgenericvalue + get_pointer_to_function_or_stub: llvalue -> t -> llgenericvalue + get_global_value_at_address: llgenericvalue -> t -> llvalue option + store_value_to_memory: llgenericvalue -> llgenericvalue -> lltype -> unit + initialize_memory: llvalue -> llgenericvalue -> t -> unit + recompile_and_relink_function: llvalue -> t -> llgenericvalue + get_or_emit_global_variable: llvalue -> t -> llgenericvalue + disable_lazy_compilation: t -> unit + lazy_compilation_enabled: t -> bool + install_lazy_function_creator: (string -> llgenericvalue) -> t -> unit + + *) +end + +external initialize_native_target : unit -> bool + = "llvm_initialize_native_target" diff --git a/bindings/ocaml/executionengine/llvm_executionengine.mli b/bindings/ocaml/executionengine/llvm_executionengine.mli new file mode 100644 index 00000000..16f08930 --- /dev/null +++ b/bindings/ocaml/executionengine/llvm_executionengine.mli @@ -0,0 +1,154 @@ +(*===-- llvm_executionengine.mli - LLVM OCaml Interface ---------*- C++ -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +(** JIT Interpreter. + + This interface provides an OCaml API for LLVM execution engine (JIT/ + interpreter), the classes in the ExecutionEngine library. *) + +exception Error of string + +module GenericValue: sig + (** [GenericValue.t] is a boxed union type used to portably pass arguments to + and receive values from the execution engine. It supports only a limited + selection of types; for more complex argument types, it is necessary to + generate a stub function by hand or to pass parameters by reference. + See the struct [llvm::GenericValue]. *) + type t + + (** [of_float fpty n] boxes the float [n] in a float-valued generic value + according to the floating point type [fpty]. See the fields + [llvm::GenericValue::DoubleVal] and [llvm::GenericValue::FloatVal]. *) + val of_float : Llvm.lltype -> float -> t + + (** [of_pointer v] boxes the pointer value [v] in a generic value. See the + field [llvm::GenericValue::PointerVal]. *) + val of_pointer : 'a -> t + + (** [of_int32 n w] boxes the int32 [i] in a generic value with the bitwidth + [w]. See the field [llvm::GenericValue::IntVal]. *) + val of_int32 : Llvm.lltype -> int32 -> t + + (** [of_int n w] boxes the int [i] in a generic value with the bitwidth + [w]. See the field [llvm::GenericValue::IntVal]. *) + val of_int : Llvm.lltype -> int -> t + + (** [of_natint n w] boxes the native int [i] in a generic value with the + bitwidth [w]. See the field [llvm::GenericValue::IntVal]. *) + val of_nativeint : Llvm.lltype -> nativeint -> t + + (** [of_int64 n w] boxes the int64 [i] in a generic value with the bitwidth + [w]. See the field [llvm::GenericValue::IntVal]. *) + val of_int64 : Llvm.lltype -> int64 -> t + + (** [as_float fpty gv] unboxes the floating point-valued generic value [gv] of + floating point type [fpty]. See the fields [llvm::GenericValue::DoubleVal] + and [llvm::GenericValue::FloatVal]. *) + val as_float : Llvm.lltype -> t -> float + + (** [as_pointer gv] unboxes the pointer-valued generic value [gv]. See the + field [llvm::GenericValue::PointerVal]. *) + val as_pointer : t -> 'a + + (** [as_int32 gv] unboxes the integer-valued generic value [gv] as an [int32]. + Is invalid if [gv] has a bitwidth greater than 32 bits. See the field + [llvm::GenericValue::IntVal]. *) + val as_int32 : t -> int32 + + (** [as_int gv] unboxes the integer-valued generic value [gv] as an [int]. + Is invalid if [gv] has a bitwidth greater than the host bit width (but the + most significant bit may be lost). See the field + [llvm::GenericValue::IntVal]. *) + val as_int : t -> int + + (** [as_natint gv] unboxes the integer-valued generic value [gv] as a + [nativeint]. Is invalid if [gv] has a bitwidth greater than + [nativeint]. See the field [llvm::GenericValue::IntVal]. *) + val as_nativeint : t -> nativeint + + (** [as_int64 gv] returns the integer-valued generic value [gv] as an [int64]. + Is invalid if [gv] has a bitwidth greater than [int64]. See the field + [llvm::GenericValue::IntVal]. *) + val as_int64 : t -> int64 +end + + +module ExecutionEngine: sig + (** An execution engine is either a JIT compiler or an interpreter, capable of + directly loading an LLVM module and executing its functions without first + invoking a static compiler and generating a native executable. *) + type t + + (** [create m] creates a new execution engine, taking ownership of the + module [m] if successful. Creates a JIT if possible, else falls back to an + interpreter. Raises [Error msg] if an error occurrs. The execution engine + is not garbage collected and must be destroyed with [dispose ee]. + See the function [llvm::EngineBuilder::create]. *) + val create : Llvm.llmodule -> t + + (** [create_interpreter m] creates a new interpreter, taking ownership of the + module [m] if successful. Raises [Error msg] if an error occurrs. The + execution engine is not garbage collected and must be destroyed with + [dispose ee]. + See the function [llvm::EngineBuilder::create]. *) + val create_interpreter : Llvm.llmodule -> t + + (** [create_jit m optlevel] creates a new JIT (just-in-time compiler), taking + ownership of the module [m] if successful with the desired optimization + level [optlevel]. Raises [Error msg] if an error occurrs. The execution + engine is not garbage collected and must be destroyed with [dispose ee]. + See the function [llvm::EngineBuilder::create]. *) + val create_jit : Llvm.llmodule -> int -> t + + (** [dispose ee] releases the memory used by the execution engine and must be + invoked to avoid memory leaks. *) + val dispose : t -> unit + + (** [add_module m ee] adds the module [m] to the execution engine [ee]. *) + val add_module : Llvm.llmodule -> t -> unit + + (** [remove_module m ee] removes the module [m] from the execution engine + [ee], disposing of [m] and the module referenced by [mp]. Raises + [Error msg] if an error occurs. *) + val remove_module : Llvm.llmodule -> t -> Llvm.llmodule + + (** [find_function n ee] finds the function named [n] defined in any of the + modules owned by the execution engine [ee]. Returns [None] if the function + is not found and [Some f] otherwise. *) + val find_function : string -> t -> Llvm.llvalue option + + (** [run_function f args ee] synchronously executes the function [f] with the + arguments [args], which must be compatible with the parameter types. *) + val run_function : Llvm.llvalue -> GenericValue.t array -> t -> + GenericValue.t + + (** [run_static_ctors ee] executes the static constructors of each module in + the execution engine [ee]. *) + val run_static_ctors : t -> unit + + (** [run_static_dtors ee] executes the static destructors of each module in + the execution engine [ee]. *) + val run_static_dtors : t -> unit + + (** [run_function_as_main f args env ee] executes the function [f] as a main + function, passing it [argv] and [argc] according to the string array + [args], and [envp] as specified by the array [env]. Returns the integer + return value of the function. *) + val run_function_as_main : Llvm.llvalue -> string array -> + (string * string) array -> t -> int + + (** [free_machine_code f ee] releases the memory in the execution engine [ee] + used to store the machine code for the function [f]. *) + val free_machine_code : Llvm.llvalue -> t -> unit + + (** [data_layout ee] is the data layout of the execution engine [ee]. *) + val data_layout : t -> Llvm_target.DataLayout.t +end + +val initialize_native_target : unit -> bool diff --git a/bindings/ocaml/irreader/Makefile b/bindings/ocaml/irreader/Makefile new file mode 100644 index 00000000..7665999b --- /dev/null +++ b/bindings/ocaml/irreader/Makefile @@ -0,0 +1,19 @@ +##===- bindings/ocaml/irreader/Makefile --------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +# +# This is the makefile for the Objective Caml Llvm_irreader interface. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../../.. +LIBRARYNAME := llvm_irreader +UsedComponents := irreader +UsedOcamlInterfaces := llvm + +include ../Makefile.ocaml diff --git a/bindings/ocaml/irreader/irreader_ocaml.c b/bindings/ocaml/irreader/irreader_ocaml.c new file mode 100644 index 00000000..30c10c7b --- /dev/null +++ b/bindings/ocaml/irreader/irreader_ocaml.c @@ -0,0 +1,59 @@ +/*===-- irreader_ocaml.c - LLVM OCaml Glue ----------------------*- C++ -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This file glues LLVM's OCaml interface to its C interface. These functions *| +|* are by and large transparent wrappers to the corresponding C functions. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#include "llvm-c/IRReader.h" +#include "caml/alloc.h" +#include "caml/fail.h" +#include "caml/memory.h" + +/* Can't use the recommended caml_named_value mechanism for backwards + compatibility reasons. This is largely equivalent. */ +static value llvm_irreader_error_exn; + +CAMLprim value llvm_register_irreader_exns(value Error) { + llvm_irreader_error_exn = Field(Error, 0); + register_global_root(&llvm_irreader_error_exn); + return Val_unit; +} + +static void llvm_raise(value Prototype, char *Message) { + CAMLparam1(Prototype); + CAMLlocal1(CamlMessage); + + CamlMessage = copy_string(Message); + LLVMDisposeMessage(Message); + + raise_with_arg(Prototype, CamlMessage); + abort(); /* NOTREACHED */ +#ifdef CAMLnoreturn + CAMLnoreturn; /* Silences warnings, but is missing in some versions. */ +#endif +} + + +/*===-- Modules -----------------------------------------------------------===*/ + +/* Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule */ +CAMLprim value llvm_parse_ir(LLVMContextRef C, + LLVMMemoryBufferRef MemBuf) { + CAMLparam0(); + CAMLlocal2(Variant, MessageVal); + LLVMModuleRef M; + char *Message; + + if (LLVMParseIRInContext(C, MemBuf, &M, &Message)) + llvm_raise(llvm_irreader_error_exn, Message); + + CAMLreturn((value) M); +} diff --git a/bindings/ocaml/irreader/llvm_irreader.ml b/bindings/ocaml/irreader/llvm_irreader.ml new file mode 100644 index 00000000..455b1fae --- /dev/null +++ b/bindings/ocaml/irreader/llvm_irreader.ml @@ -0,0 +1,17 @@ +(*===-- llvm_irreader.ml - LLVM OCaml Interface ---------------*- OCaml -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + + +exception Error of string + +external register_exns : exn -> unit = "llvm_register_irreader_exns" +let _ = register_exns (Error "") + +external parse_ir : Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule + = "llvm_parse_ir" diff --git a/bindings/ocaml/irreader/llvm_irreader.mli b/bindings/ocaml/irreader/llvm_irreader.mli new file mode 100644 index 00000000..2b114737 --- /dev/null +++ b/bindings/ocaml/irreader/llvm_irreader.mli @@ -0,0 +1,21 @@ +(*===-- llvm_irreader.mli - LLVM OCaml Interface --------------*- OCaml -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +(** IR reader. + + This interface provides an OCaml API for the LLVM assembly reader, the + classes in the IRReader library. *) + +exception Error of string + +(** [parse_ir context mb] parses the IR for a new module [m] from the + memory buffer [mb] in the context [context]. Returns [m] if successful, or + raises [Error msg] otherwise, where [msg] is a description of the error + encountered. See the function [llvm::ParseIR]. *) +val parse_ir : Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule diff --git a/bindings/ocaml/linker/Makefile b/bindings/ocaml/linker/Makefile new file mode 100644 index 00000000..ca1c96c9 --- /dev/null +++ b/bindings/ocaml/linker/Makefile @@ -0,0 +1,19 @@ +##===- bindings/ocaml/linker/Makefile ----------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +# +# This is the makefile for the Objective Caml Llvm_target interface. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../../.. +LIBRARYNAME := llvm_linker +UsedComponents := linker +UsedOcamlInterfaces := llvm + +include ../Makefile.ocaml diff --git a/bindings/ocaml/linker/linker_ocaml.c b/bindings/ocaml/linker/linker_ocaml.c new file mode 100644 index 00000000..2491e3b8 --- /dev/null +++ b/bindings/ocaml/linker/linker_ocaml.c @@ -0,0 +1,54 @@ +/*===-- linker_ocaml.c - LLVM Ocaml Glue ------------------------*- C++ -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This file glues LLVM's OCaml interface to its C interface. These functions *| +|* are by and large transparent wrappers to the corresponding C functions. *| +|* *| +|* Note that these functions intentionally take liberties with the CAMLparamX *| +|* macros, since most of the parameters are not GC heap objects. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#include "llvm-c/Linker.h" +#include "caml/alloc.h" +#include "caml/memory.h" +#include "caml/fail.h" + +static value llvm_linker_error_exn; + +CAMLprim value llvm_register_linker_exns(value Error) { + llvm_linker_error_exn = Field(Error, 0); + register_global_root(&llvm_linker_error_exn); + return Val_unit; +} + +static void llvm_raise(value Prototype, char *Message) { + CAMLparam1(Prototype); + CAMLlocal1(CamlMessage); + + CamlMessage = copy_string(Message); + LLVMDisposeMessage(Message); + + raise_with_arg(Prototype, CamlMessage); + abort(); /* NOTREACHED */ +#ifdef CAMLnoreturn + CAMLnoreturn; /* Silences warnings, but is missing in some versions. */ +#endif +} + +/* llmodule -> llmodule -> Mode.t -> unit + raises Error msg on error */ +CAMLprim value llvm_link_modules(LLVMModuleRef Dst, LLVMModuleRef Src, value Mode) { + char* Message; + + if (LLVMLinkModules(Dst, Src, Int_val(Mode), &Message)) + llvm_raise(llvm_linker_error_exn, Message); + + return Val_unit; +} diff --git a/bindings/ocaml/linker/llvm_linker.ml b/bindings/ocaml/linker/llvm_linker.ml new file mode 100644 index 00000000..2b73e2e9 --- /dev/null +++ b/bindings/ocaml/linker/llvm_linker.ml @@ -0,0 +1,22 @@ +(*===-- llvm_linker.ml - LLVM OCaml Interface ------------------*- OCaml -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +exception Error of string + +external register_exns : exn -> unit = "llvm_register_linker_exns" +let _ = register_exns (Error "") + +module Mode = struct + type t = + | DestroySource + | PreserveSource +end + +external link_modules : Llvm.llmodule -> Llvm.llmodule -> Mode.t -> unit + = "llvm_link_modules" \ No newline at end of file diff --git a/bindings/ocaml/linker/llvm_linker.mli b/bindings/ocaml/linker/llvm_linker.mli new file mode 100644 index 00000000..4def7a8c --- /dev/null +++ b/bindings/ocaml/linker/llvm_linker.mli @@ -0,0 +1,26 @@ +(*===-- llvm_linker.mli - LLVM OCaml Interface -----------------*- OCaml -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +(** Linker. + + This interface provides an OCaml API for LLVM bitcode linker, + the classes in the Linker library. *) + +exception Error of string + +(** Linking mode. *) +module Mode : sig + type t = + | DestroySource + | PreserveSource +end + +(** [link_modules dst src mode] links [src] into [dst], raising [Error] + if the linking fails. *) +val link_modules : Llvm.llmodule -> Llvm.llmodule -> Mode.t -> unit \ No newline at end of file diff --git a/bindings/ocaml/llvm/META.llvm.in b/bindings/ocaml/llvm/META.llvm.in new file mode 100644 index 00000000..c241ea51 --- /dev/null +++ b/bindings/ocaml/llvm/META.llvm.in @@ -0,0 +1,95 @@ +name = "llvm" +version = "@PACKAGE_VERSION@" +description = "LLVM OCaml bindings" +archive(byte) = "llvm.cma" +archive(native) = "llvm.cmxa" +directory = "." +linkopts = "-ccopt -lstdc++" + +package "analysis" ( + requires = "llvm" + version = "@PACKAGE_VERSION@" + description = "Intermediate representation analysis for LLVM" + archive(byte) = "llvm_analysis.cma" + archive(native) = "llvm_analysis.cmxa" +) + +package "bitreader" ( + requires = "llvm" + version = "@PACKAGE_VERSION@" + description = "Bitcode reader for LLVM" + archive(byte) = "llvm_bitreader.cma" + archive(native) = "llvm_bitreader.cmxa" +) + +package "bitwriter" ( + requires = "llvm,unix" + version = "@PACKAGE_VERSION@" + description = "Bitcode writer for LLVM" + archive(byte) = "llvm_bitwriter.cma" + archive(native) = "llvm_bitwriter.cmxa" +) + +package "executionengine" ( + requires = "llvm,llvm.target" + version = "@PACKAGE_VERSION@" + description = "JIT and Interpreter for LLVM" + archive(byte) = "llvm_executionengine.cma" + archive(native) = "llvm_executionengine.cmxa" +) + +package "ipo" ( + requires = "llvm" + version = "@PACKAGE_VERSION@" + description = "IPO Transforms for LLVM" + archive(byte) = "llvm_ipo.cma" + archive(native) = "llvm_ipo.cmxa" +) + +package "irreader" ( + requires = "llvm" + version = "@PACKAGE_VERSION@" + description = "IR assembly reader for LLVM" + archive(byte) = "llvm_irreader.cma" + archive(native) = "llvm_irreader.cmxa" +) + +package "scalar_opts" ( + requires = "llvm" + version = "@PACKAGE_VERSION@" + description = "Scalar Transforms for LLVM" + archive(byte) = "llvm_scalar_opts.cma" + archive(native) = "llvm_scalar_opts.cmxa" +) + +package "vectorize" ( + requires = "llvm" + version = "@PACKAGE_VERSION@" + description = "Vector Transforms for LLVM" + archive(byte) = "llvm_vectorize.cma" + archive(native) = "llvm_vectorize.cmxa" +) + +package "passmgr_builder" ( + requires = "llvm" + version = "@PACKAGE_VERSION@" + description = "Pass Manager Builder for LLVM" + archive(byte) = "llvm_passmgr_builder.cma" + archive(native) = "llvm_passmgr_builder.cmxa" +) + +package "target" ( + requires = "llvm" + version = "@PACKAGE_VERSION@" + description = "Target Information for LLVM" + archive(byte) = "llvm_target.cma" + archive(native) = "llvm_target.cmxa" +) + +package "linker" ( + requires = "llvm" + version = "@PACKAGE_VERSION@" + description = "Intermediate Representation Linker for LLVM" + archive(byte) = "llvm_linker.cma" + archive(native) = "llvm_linker.cmxa" +) diff --git a/bindings/ocaml/llvm/Makefile b/bindings/ocaml/llvm/Makefile new file mode 100644 index 00000000..850f564a --- /dev/null +++ b/bindings/ocaml/llvm/Makefile @@ -0,0 +1,42 @@ +##===- bindings/ocaml/llvm/Makefile ------------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +# +# This is the makefile for the Objective Caml Llvm interface. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../../.. +LIBRARYNAME := llvm +UsedComponents := core +UsedOcamlLibs := llvm + +include ../Makefile.ocaml + +all-local:: copy-meta +install-local:: install-meta +uninstall-local:: uninstall-meta + +DestMETA := $(PROJ_libocamldir)/META.llvm + +# Easy way of generating META in the objdir +copy-meta: $(OcamlDir)/META.llvm + +$(OcamlDir)/META.llvm: META.llvm + $(Verb) $(CP) -f $< $@ + +install-meta:: $(OcamlDir)/META.llvm + $(Echo) "Install $(BuildMode) $(DestMETA)" + $(Verb) $(MKDIR) $(PROJ_libocamldir) + $(Verb) $(DataInstall) $< "$(DestMETA)" + +uninstall-meta:: + $(Echo) "Uninstalling $(DestMETA)" + -$(Verb) $(RM) -f "$(DestMETA)" + +.PHONY: copy-meta install-meta uninstall-meta diff --git a/bindings/ocaml/llvm/llvm.ml b/bindings/ocaml/llvm/llvm.ml new file mode 100644 index 00000000..d36f360b --- /dev/null +++ b/bindings/ocaml/llvm/llvm.ml @@ -0,0 +1,1279 @@ +(*===-- llvm/llvm.ml - LLVM Ocaml Interface --------------------------------===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + + +type llcontext +type llmodule +type lltype +type llvalue +type lluse +type llbasicblock +type llbuilder +type llmemorybuffer + +module TypeKind = struct + type t = + | Void + | Half + | Float + | Double + | X86fp80 + | Fp128 + | Ppc_fp128 + | Label + | Integer + | Function + | Struct + | Array + | Pointer + | Vector + | Metadata + | X86_mmx +end + +module Linkage = struct + type t = + | External + | Available_externally + | Link_once + | Link_once_odr + | Link_once_odr_auto_hide + | Weak + | Weak_odr + | Appending + | Internal + | Private + | Dllimport + | Dllexport + | External_weak + | Ghost + | Common + | Linker_private + | Linker_private_weak +end + +module Visibility = struct + type t = + | Default + | Hidden + | Protected +end + +module CallConv = struct + let c = 0 + let fast = 8 + let cold = 9 + let x86_stdcall = 64 + let x86_fastcall = 65 +end + +module Attribute = struct + type t = + | Zext + | Sext + | Noreturn + | Inreg + | Structret + | Nounwind + | Noalias + | Byval + | Nest + | Readnone + | Readonly + | Noinline + | Alwaysinline + | Optsize + | Ssp + | Sspreq + | Alignment of int + | Nocapture + | Noredzone + | Noimplicitfloat + | Naked + | Inlinehint + | Stackalignment of int + | ReturnsTwice + | UWTable + | NonLazyBind +end + +module Icmp = struct + type t = + | Eq + | Ne + | Ugt + | Uge + | Ult + | Ule + | Sgt + | Sge + | Slt + | Sle +end + +module Fcmp = struct + type t = + | False + | Oeq + | Ogt + | Oge + | Olt + | Ole + | One + | Ord + | Uno + | Ueq + | Ugt + | Uge + | Ult + | Ule + | Une + | True +end + +module Opcode = struct + type t = + | Invalid (* not an instruction *) + (* Terminator Instructions *) + | Ret + | Br + | Switch + | IndirectBr + | Invoke + | Invalid2 + | Unreachable + (* Standard Binary Operators *) + | Add + | FAdd + | Sub + | FSub + | Mul + | FMul + | UDiv + | SDiv + | FDiv + | URem + | SRem + | FRem + (* Logical Operators *) + | Shl + | LShr + | AShr + | And + | Or + | Xor + (* Memory Operators *) + | Alloca + | Load + | Store + | GetElementPtr + (* Cast Operators *) + | Trunc + | ZExt + | SExt + | FPToUI + | FPToSI + | UIToFP + | SIToFP + | FPTrunc + | FPExt + | PtrToInt + | IntToPtr + | BitCast + (* Other Operators *) + | ICmp + | FCmp + | PHI + | Call + | Select + | UserOp1 + | UserOp2 + | VAArg + | ExtractElement + | InsertElement + | ShuffleVector + | ExtractValue + | InsertValue + | Fence + | AtomicCmpXchg + | AtomicRMW + | Resume + | LandingPad +end + +module LandingPadClauseTy = struct + type t = + | Catch + | Filter +end + +module ThreadLocalMode = struct + type t = + | None + | GeneralDynamic + | LocalDynamic + | InitialExec + | LocalExec +end + +module AtomicOrdering = struct + type t = + | NotAtomic + | Unordered + | Monotonic + | Invalid + | Acquire + | Release + | AcqiureRelease + | SequentiallyConsistent +end + +module AtomicRMWBinOp = struct + type t = + | Xchg + | Add + | Sub + | And + | Nand + | Or + | Xor + | Max + | Min + | UMax + | UMin +end + +module ValueKind = struct + type t = + | NullValue + | Argument + | BasicBlock + | InlineAsm + | MDNode + | MDString + | BlockAddress + | ConstantAggregateZero + | ConstantArray + | ConstantDataArray + | ConstantDataVector + | ConstantExpr + | ConstantFP + | ConstantInt + | ConstantPointerNull + | ConstantStruct + | ConstantVector + | Function + | GlobalAlias + | GlobalVariable + | UndefValue + | Instruction of Opcode.t +end + +exception IoError of string + +external register_exns : exn -> unit = "llvm_register_core_exns" +let _ = register_exns (IoError "") + +external install_fatal_error_handler : (string -> unit) -> unit + = "llvm_install_fatal_error_handler" +external reset_fatal_error_handler : unit -> unit + = "llvm_reset_fatal_error_handler" +external enable_pretty_stacktrace : unit -> unit + = "llvm_enable_pretty_stacktrace" + +type ('a, 'b) llpos = +| At_end of 'a +| Before of 'b + +type ('a, 'b) llrev_pos = +| At_start of 'a +| After of 'b + +(*===-- Contexts ----------------------------------------------------------===*) +external create_context : unit -> llcontext = "llvm_create_context" +external dispose_context : llcontext -> unit = "llvm_dispose_context" +external global_context : unit -> llcontext = "llvm_global_context" +external mdkind_id : llcontext -> string -> int = "llvm_mdkind_id" + +(*===-- Modules -----------------------------------------------------------===*) +external create_module : llcontext -> string -> llmodule = "llvm_create_module" +external dispose_module : llmodule -> unit = "llvm_dispose_module" +external target_triple: llmodule -> string + = "llvm_target_triple" +external set_target_triple: string -> llmodule -> unit + = "llvm_set_target_triple" +external data_layout: llmodule -> string + = "llvm_data_layout" +external set_data_layout: string -> llmodule -> unit + = "llvm_set_data_layout" +external dump_module : llmodule -> unit = "llvm_dump_module" +external print_module : string -> llmodule -> unit = "llvm_print_module" +external string_of_llmodule : llmodule -> string = "llvm_string_of_llmodule" +external set_module_inline_asm : llmodule -> string -> unit + = "llvm_set_module_inline_asm" +external module_context : llmodule -> llcontext = "LLVMGetModuleContext" + +(*===-- Types -------------------------------------------------------------===*) +external classify_type : lltype -> TypeKind.t = "llvm_classify_type" +external type_context : lltype -> llcontext = "llvm_type_context" +external type_is_sized : lltype -> bool = "llvm_type_is_sized" +external dump_type : lltype -> unit = "llvm_dump_type" +external string_of_lltype : lltype -> string = "llvm_string_of_lltype" + +(*--... Operations on integer types ........................................--*) +external i1_type : llcontext -> lltype = "llvm_i1_type" +external i8_type : llcontext -> lltype = "llvm_i8_type" +external i16_type : llcontext -> lltype = "llvm_i16_type" +external i32_type : llcontext -> lltype = "llvm_i32_type" +external i64_type : llcontext -> lltype = "llvm_i64_type" + +external integer_type : llcontext -> int -> lltype = "llvm_integer_type" +external integer_bitwidth : lltype -> int = "llvm_integer_bitwidth" + +(*--... Operations on real types ...........................................--*) +external float_type : llcontext -> lltype = "llvm_float_type" +external double_type : llcontext -> lltype = "llvm_double_type" +external x86fp80_type : llcontext -> lltype = "llvm_x86fp80_type" +external fp128_type : llcontext -> lltype = "llvm_fp128_type" +external ppc_fp128_type : llcontext -> lltype = "llvm_ppc_fp128_type" + +(*--... Operations on function types .......................................--*) +external function_type : lltype -> lltype array -> lltype = "llvm_function_type" +external var_arg_function_type : lltype -> lltype array -> lltype + = "llvm_var_arg_function_type" +external is_var_arg : lltype -> bool = "llvm_is_var_arg" +external return_type : lltype -> lltype = "LLVMGetReturnType" +external param_types : lltype -> lltype array = "llvm_param_types" + +(*--... Operations on struct types .........................................--*) +external struct_type : llcontext -> lltype array -> lltype = "llvm_struct_type" +external packed_struct_type : llcontext -> lltype array -> lltype + = "llvm_packed_struct_type" +external struct_name : lltype -> string option = "llvm_struct_name" +external named_struct_type : llcontext -> string -> lltype = + "llvm_named_struct_type" +external struct_set_body : lltype -> lltype array -> bool -> unit = + "llvm_struct_set_body" +external struct_element_types : lltype -> lltype array + = "llvm_struct_element_types" +external is_packed : lltype -> bool = "llvm_is_packed" +external is_opaque : lltype -> bool = "llvm_is_opaque" + +(*--... Operations on pointer, vector, and array types .....................--*) +external array_type : lltype -> int -> lltype = "llvm_array_type" +external pointer_type : lltype -> lltype = "llvm_pointer_type" +external qualified_pointer_type : lltype -> int -> lltype + = "llvm_qualified_pointer_type" +external vector_type : lltype -> int -> lltype = "llvm_vector_type" + +external element_type : lltype -> lltype = "LLVMGetElementType" +external array_length : lltype -> int = "llvm_array_length" +external address_space : lltype -> int = "llvm_address_space" +external vector_size : lltype -> int = "llvm_vector_size" + +(*--... Operations on other types ..........................................--*) +external void_type : llcontext -> lltype = "llvm_void_type" +external label_type : llcontext -> lltype = "llvm_label_type" +external x86_mmx_type : llcontext -> lltype = "llvm_x86_mmx_type" +external type_by_name : llmodule -> string -> lltype option = "llvm_type_by_name" + +external classify_value : llvalue -> ValueKind.t = "llvm_classify_value" +(*===-- Values ------------------------------------------------------------===*) +external type_of : llvalue -> lltype = "llvm_type_of" +external value_name : llvalue -> string = "llvm_value_name" +external set_value_name : string -> llvalue -> unit = "llvm_set_value_name" +external dump_value : llvalue -> unit = "llvm_dump_value" +external string_of_llvalue : llvalue -> string = "llvm_string_of_llvalue" +external replace_all_uses_with : llvalue -> llvalue -> unit + = "llvm_replace_all_uses_with" + +(*--... Operations on uses .................................................--*) +external use_begin : llvalue -> lluse option = "llvm_use_begin" +external use_succ : lluse -> lluse option = "llvm_use_succ" +external user : lluse -> llvalue = "llvm_user" +external used_value : lluse -> llvalue = "llvm_used_value" + +let iter_uses f v = + let rec aux = function + | None -> () + | Some u -> + f u; + aux (use_succ u) + in + aux (use_begin v) + +let fold_left_uses f init v = + let rec aux init u = + match u with + | None -> init + | Some u -> aux (f init u) (use_succ u) + in + aux init (use_begin v) + +let fold_right_uses f v init = + let rec aux u init = + match u with + | None -> init + | Some u -> f u (aux (use_succ u) init) + in + aux (use_begin v) init + + +(*--... Operations on users ................................................--*) +external operand : llvalue -> int -> llvalue = "llvm_operand" +external set_operand : llvalue -> int -> llvalue -> unit = "llvm_set_operand" +external num_operands : llvalue -> int = "llvm_num_operands" + +(*--... Operations on constants of (mostly) any type .......................--*) +external is_constant : llvalue -> bool = "llvm_is_constant" +external const_null : lltype -> llvalue = "LLVMConstNull" +external const_all_ones : (*int|vec*)lltype -> llvalue = "LLVMConstAllOnes" +external const_pointer_null : lltype -> llvalue = "LLVMConstPointerNull" +external undef : lltype -> llvalue = "LLVMGetUndef" +external is_null : llvalue -> bool = "llvm_is_null" +external is_undef : llvalue -> bool = "llvm_is_undef" +external constexpr_opcode : llvalue -> Opcode.t = "llvm_constexpr_get_opcode" + +(*--... Operations on instructions .........................................--*) +external has_metadata : llvalue -> bool = "llvm_has_metadata" +external metadata : llvalue -> int -> llvalue option = "llvm_metadata" +external set_metadata : llvalue -> int -> llvalue -> unit = "llvm_set_metadata" +external clear_metadata : llvalue -> int -> unit = "llvm_clear_metadata" + +(*--... Operations on metadata .......,.....................................--*) +external mdstring : llcontext -> string -> llvalue = "llvm_mdstring" +external mdnode : llcontext -> llvalue array -> llvalue = "llvm_mdnode" +external get_mdstring : llvalue -> string option = "llvm_get_mdstring" +external get_named_metadata : llmodule -> string -> llvalue array + = "llvm_get_namedmd" +external add_named_metadata_operand : llmodule -> string -> llvalue -> unit + = "llvm_append_namedmd" + +(*--... Operations on scalar constants .....................................--*) +external const_int : lltype -> int -> llvalue = "llvm_const_int" +external const_of_int64 : lltype -> Int64.t -> bool -> llvalue + = "llvm_const_of_int64" +external int64_of_const : llvalue -> Int64.t option + = "llvm_int64_of_const" +external const_int_of_string : lltype -> string -> int -> llvalue + = "llvm_const_int_of_string" +external const_float : lltype -> float -> llvalue = "llvm_const_float" +external const_float_of_string : lltype -> string -> llvalue + = "llvm_const_float_of_string" + +(*--... Operations on composite constants ..................................--*) +external const_string : llcontext -> string -> llvalue = "llvm_const_string" +external const_stringz : llcontext -> string -> llvalue = "llvm_const_stringz" +external const_array : lltype -> llvalue array -> llvalue = "llvm_const_array" +external const_struct : llcontext -> llvalue array -> llvalue + = "llvm_const_struct" +external const_named_struct : lltype -> llvalue array -> llvalue + = "llvm_const_named_struct" +external const_packed_struct : llcontext -> llvalue array -> llvalue + = "llvm_const_packed_struct" +external const_vector : llvalue array -> llvalue = "llvm_const_vector" + +(*--... Constant expressions ...............................................--*) +external align_of : lltype -> llvalue = "LLVMAlignOf" +external size_of : lltype -> llvalue = "LLVMSizeOf" +external const_neg : llvalue -> llvalue = "LLVMConstNeg" +external const_nsw_neg : llvalue -> llvalue = "LLVMConstNSWNeg" +external const_nuw_neg : llvalue -> llvalue = "LLVMConstNUWNeg" +external const_fneg : llvalue -> llvalue = "LLVMConstFNeg" +external const_not : llvalue -> llvalue = "LLVMConstNot" +external const_add : llvalue -> llvalue -> llvalue = "LLVMConstAdd" +external const_nsw_add : llvalue -> llvalue -> llvalue = "LLVMConstNSWAdd" +external const_nuw_add : llvalue -> llvalue -> llvalue = "LLVMConstNUWAdd" +external const_fadd : llvalue -> llvalue -> llvalue = "LLVMConstFAdd" +external const_sub : llvalue -> llvalue -> llvalue = "LLVMConstSub" +external const_nsw_sub : llvalue -> llvalue -> llvalue = "LLVMConstNSWSub" +external const_nuw_sub : llvalue -> llvalue -> llvalue = "LLVMConstNUWSub" +external const_fsub : llvalue -> llvalue -> llvalue = "LLVMConstFSub" +external const_mul : llvalue -> llvalue -> llvalue = "LLVMConstMul" +external const_nsw_mul : llvalue -> llvalue -> llvalue = "LLVMConstNSWMul" +external const_nuw_mul : llvalue -> llvalue -> llvalue = "LLVMConstNUWMul" +external const_fmul : llvalue -> llvalue -> llvalue = "LLVMConstFMul" +external const_udiv : llvalue -> llvalue -> llvalue = "LLVMConstUDiv" +external const_sdiv : llvalue -> llvalue -> llvalue = "LLVMConstSDiv" +external const_exact_sdiv : llvalue -> llvalue -> llvalue = "LLVMConstExactSDiv" +external const_fdiv : llvalue -> llvalue -> llvalue = "LLVMConstFDiv" +external const_urem : llvalue -> llvalue -> llvalue = "LLVMConstURem" +external const_srem : llvalue -> llvalue -> llvalue = "LLVMConstSRem" +external const_frem : llvalue -> llvalue -> llvalue = "LLVMConstFRem" +external const_and : llvalue -> llvalue -> llvalue = "LLVMConstAnd" +external const_or : llvalue -> llvalue -> llvalue = "LLVMConstOr" +external const_xor : llvalue -> llvalue -> llvalue = "LLVMConstXor" +external const_icmp : Icmp.t -> llvalue -> llvalue -> llvalue + = "llvm_const_icmp" +external const_fcmp : Fcmp.t -> llvalue -> llvalue -> llvalue + = "llvm_const_fcmp" +external const_shl : llvalue -> llvalue -> llvalue = "LLVMConstShl" +external const_lshr : llvalue -> llvalue -> llvalue = "LLVMConstLShr" +external const_ashr : llvalue -> llvalue -> llvalue = "LLVMConstAShr" +external const_gep : llvalue -> llvalue array -> llvalue = "llvm_const_gep" +external const_in_bounds_gep : llvalue -> llvalue array -> llvalue + = "llvm_const_in_bounds_gep" +external const_trunc : llvalue -> lltype -> llvalue = "LLVMConstTrunc" +external const_sext : llvalue -> lltype -> llvalue = "LLVMConstSExt" +external const_zext : llvalue -> lltype -> llvalue = "LLVMConstZExt" +external const_fptrunc : llvalue -> lltype -> llvalue = "LLVMConstFPTrunc" +external const_fpext : llvalue -> lltype -> llvalue = "LLVMConstFPExt" +external const_uitofp : llvalue -> lltype -> llvalue = "LLVMConstUIToFP" +external const_sitofp : llvalue -> lltype -> llvalue = "LLVMConstSIToFP" +external const_fptoui : llvalue -> lltype -> llvalue = "LLVMConstFPToUI" +external const_fptosi : llvalue -> lltype -> llvalue = "LLVMConstFPToSI" +external const_ptrtoint : llvalue -> lltype -> llvalue = "LLVMConstPtrToInt" +external const_inttoptr : llvalue -> lltype -> llvalue = "LLVMConstIntToPtr" +external const_bitcast : llvalue -> lltype -> llvalue = "LLVMConstBitCast" +external const_zext_or_bitcast : llvalue -> lltype -> llvalue + = "LLVMConstZExtOrBitCast" +external const_sext_or_bitcast : llvalue -> lltype -> llvalue + = "LLVMConstSExtOrBitCast" +external const_trunc_or_bitcast : llvalue -> lltype -> llvalue + = "LLVMConstTruncOrBitCast" +external const_pointercast : llvalue -> lltype -> llvalue + = "LLVMConstPointerCast" +external const_intcast : llvalue -> lltype -> is_signed:bool -> llvalue + = "llvm_const_intcast" +external const_fpcast : llvalue -> lltype -> llvalue = "LLVMConstFPCast" +external const_select : llvalue -> llvalue -> llvalue -> llvalue + = "LLVMConstSelect" +external const_extractelement : llvalue -> llvalue -> llvalue + = "LLVMConstExtractElement" +external const_insertelement : llvalue -> llvalue -> llvalue -> llvalue + = "LLVMConstInsertElement" +external const_shufflevector : llvalue -> llvalue -> llvalue -> llvalue + = "LLVMConstShuffleVector" +external const_extractvalue : llvalue -> int array -> llvalue + = "llvm_const_extractvalue" +external const_insertvalue : llvalue -> llvalue -> int array -> llvalue + = "llvm_const_insertvalue" +external const_inline_asm : lltype -> string -> string -> bool -> bool -> + llvalue + = "llvm_const_inline_asm" +external block_address : llvalue -> llbasicblock -> llvalue = "LLVMBlockAddress" + +(*--... Operations on global variables, functions, and aliases (globals) ...--*) +external global_parent : llvalue -> llmodule = "LLVMGetGlobalParent" +external is_declaration : llvalue -> bool = "llvm_is_declaration" +external linkage : llvalue -> Linkage.t = "llvm_linkage" +external set_linkage : Linkage.t -> llvalue -> unit = "llvm_set_linkage" +external section : llvalue -> string = "llvm_section" +external set_section : string -> llvalue -> unit = "llvm_set_section" +external visibility : llvalue -> Visibility.t = "llvm_visibility" +external set_visibility : Visibility.t -> llvalue -> unit = "llvm_set_visibility" +external alignment : llvalue -> int = "llvm_alignment" +external set_alignment : int -> llvalue -> unit = "llvm_set_alignment" +external is_global_constant : llvalue -> bool = "llvm_is_global_constant" +external set_global_constant : bool -> llvalue -> unit + = "llvm_set_global_constant" + +(*--... Operations on global variables .....................................--*) +external declare_global : lltype -> string -> llmodule -> llvalue + = "llvm_declare_global" +external declare_qualified_global : lltype -> string -> int -> llmodule -> + llvalue + = "llvm_declare_qualified_global" +external define_global : string -> llvalue -> llmodule -> llvalue + = "llvm_define_global" +external define_qualified_global : string -> llvalue -> int -> llmodule -> + llvalue + = "llvm_define_qualified_global" +external lookup_global : string -> llmodule -> llvalue option + = "llvm_lookup_global" +external delete_global : llvalue -> unit = "llvm_delete_global" +external global_initializer : llvalue -> llvalue = "LLVMGetInitializer" +external set_initializer : llvalue -> llvalue -> unit = "llvm_set_initializer" +external remove_initializer : llvalue -> unit = "llvm_remove_initializer" +external is_thread_local : llvalue -> bool = "llvm_is_thread_local" +external set_thread_local : bool -> llvalue -> unit = "llvm_set_thread_local" +external thread_local_mode : llvalue -> ThreadLocalMode.t + = "llvm_thread_local_mode" +external set_thread_local_mode : ThreadLocalMode.t -> llvalue -> unit + = "llvm_set_thread_local_mode" +external is_externally_initialized : llvalue -> bool + = "llvm_is_externally_initialized" +external set_externally_initialized : bool -> llvalue -> unit + = "llvm_set_externally_initialized" +external global_begin : llmodule -> (llmodule, llvalue) llpos + = "llvm_global_begin" +external global_succ : llvalue -> (llmodule, llvalue) llpos + = "llvm_global_succ" +external global_end : llmodule -> (llmodule, llvalue) llrev_pos + = "llvm_global_end" +external global_pred : llvalue -> (llmodule, llvalue) llrev_pos + = "llvm_global_pred" + +let rec iter_global_range f i e = + if i = e then () else + match i with + | At_end _ -> raise (Invalid_argument "Invalid global variable range.") + | Before bb -> + f bb; + iter_global_range f (global_succ bb) e + +let iter_globals f m = + iter_global_range f (global_begin m) (At_end m) + +let rec fold_left_global_range f init i e = + if i = e then init else + match i with + | At_end _ -> raise (Invalid_argument "Invalid global variable range.") + | Before bb -> fold_left_global_range f (f init bb) (global_succ bb) e + +let fold_left_globals f init m = + fold_left_global_range f init (global_begin m) (At_end m) + +let rec rev_iter_global_range f i e = + if i = e then () else + match i with + | At_start _ -> raise (Invalid_argument "Invalid global variable range.") + | After bb -> + f bb; + rev_iter_global_range f (global_pred bb) e + +let rev_iter_globals f m = + rev_iter_global_range f (global_end m) (At_start m) + +let rec fold_right_global_range f i e init = + if i = e then init else + match i with + | At_start _ -> raise (Invalid_argument "Invalid global variable range.") + | After bb -> fold_right_global_range f (global_pred bb) e (f bb init) + +let fold_right_globals f m init = + fold_right_global_range f (global_end m) (At_start m) init + +(*--... Operations on aliases ..............................................--*) +external add_alias : llmodule -> lltype -> llvalue -> string -> llvalue + = "llvm_add_alias" + +(*--... Operations on functions ............................................--*) +external declare_function : string -> lltype -> llmodule -> llvalue + = "llvm_declare_function" +external define_function : string -> lltype -> llmodule -> llvalue + = "llvm_define_function" +external lookup_function : string -> llmodule -> llvalue option + = "llvm_lookup_function" +external delete_function : llvalue -> unit = "llvm_delete_function" +external is_intrinsic : llvalue -> bool = "llvm_is_intrinsic" +external function_call_conv : llvalue -> int = "llvm_function_call_conv" +external set_function_call_conv : int -> llvalue -> unit + = "llvm_set_function_call_conv" +external gc : llvalue -> string option = "llvm_gc" +external set_gc : string option -> llvalue -> unit = "llvm_set_gc" +external function_begin : llmodule -> (llmodule, llvalue) llpos + = "llvm_function_begin" +external function_succ : llvalue -> (llmodule, llvalue) llpos + = "llvm_function_succ" +external function_end : llmodule -> (llmodule, llvalue) llrev_pos + = "llvm_function_end" +external function_pred : llvalue -> (llmodule, llvalue) llrev_pos + = "llvm_function_pred" + +let rec iter_function_range f i e = + if i = e then () else + match i with + | At_end _ -> raise (Invalid_argument "Invalid function range.") + | Before fn -> + f fn; + iter_function_range f (function_succ fn) e + +let iter_functions f m = + iter_function_range f (function_begin m) (At_end m) + +let rec fold_left_function_range f init i e = + if i = e then init else + match i with + | At_end _ -> raise (Invalid_argument "Invalid function range.") + | Before fn -> fold_left_function_range f (f init fn) (function_succ fn) e + +let fold_left_functions f init m = + fold_left_function_range f init (function_begin m) (At_end m) + +let rec rev_iter_function_range f i e = + if i = e then () else + match i with + | At_start _ -> raise (Invalid_argument "Invalid function range.") + | After fn -> + f fn; + rev_iter_function_range f (function_pred fn) e + +let rev_iter_functions f m = + rev_iter_function_range f (function_end m) (At_start m) + +let rec fold_right_function_range f i e init = + if i = e then init else + match i with + | At_start _ -> raise (Invalid_argument "Invalid function range.") + | After fn -> fold_right_function_range f (function_pred fn) e (f fn init) + +let fold_right_functions f m init = + fold_right_function_range f (function_end m) (At_start m) init + +external llvm_add_function_attr : llvalue -> int32 -> unit + = "llvm_add_function_attr" +external llvm_remove_function_attr : llvalue -> int32 -> unit + = "llvm_remove_function_attr" +external llvm_function_attr : llvalue -> int32 = "llvm_function_attr" + +let pack_attr (attr:Attribute.t) : int32 = + match attr with + Attribute.Zext -> Int32.shift_left 1l 0 + | Attribute.Sext -> Int32.shift_left 1l 1 + | Attribute.Noreturn -> Int32.shift_left 1l 2 + | Attribute.Inreg -> Int32.shift_left 1l 3 + | Attribute.Structret -> Int32.shift_left 1l 4 + | Attribute.Nounwind -> Int32.shift_left 1l 5 + | Attribute.Noalias -> Int32.shift_left 1l 6 + | Attribute.Byval -> Int32.shift_left 1l 7 + | Attribute.Nest -> Int32.shift_left 1l 8 + | Attribute.Readnone -> Int32.shift_left 1l 9 + | Attribute.Readonly -> Int32.shift_left 1l 10 + | Attribute.Noinline -> Int32.shift_left 1l 11 + | Attribute.Alwaysinline -> Int32.shift_left 1l 12 + | Attribute.Optsize -> Int32.shift_left 1l 13 + | Attribute.Ssp -> Int32.shift_left 1l 14 + | Attribute.Sspreq -> Int32.shift_left 1l 15 + | Attribute.Alignment n -> Int32.shift_left (Int32.of_int n) 16 + | Attribute.Nocapture -> Int32.shift_left 1l 21 + | Attribute.Noredzone -> Int32.shift_left 1l 22 + | Attribute.Noimplicitfloat -> Int32.shift_left 1l 23 + | Attribute.Naked -> Int32.shift_left 1l 24 + | Attribute.Inlinehint -> Int32.shift_left 1l 25 + | Attribute.Stackalignment n -> Int32.shift_left (Int32.of_int n) 26 + | Attribute.ReturnsTwice -> Int32.shift_left 1l 29 + | Attribute.UWTable -> Int32.shift_left 1l 30 + | Attribute.NonLazyBind -> Int32.shift_left 1l 31 + +let unpack_attr (a : int32) : Attribute.t list = + let l = ref [] in + let check attr = + Int32.logand (pack_attr attr) a in + let checkattr attr = + if (check attr) <> 0l then begin + l := attr :: !l + end + in + checkattr Attribute.Zext; + checkattr Attribute.Sext; + checkattr Attribute.Noreturn; + checkattr Attribute.Inreg; + checkattr Attribute.Structret; + checkattr Attribute.Nounwind; + checkattr Attribute.Noalias; + checkattr Attribute.Byval; + checkattr Attribute.Nest; + checkattr Attribute.Readnone; + checkattr Attribute.Readonly; + checkattr Attribute.Noinline; + checkattr Attribute.Alwaysinline; + checkattr Attribute.Optsize; + checkattr Attribute.Ssp; + checkattr Attribute.Sspreq; + let align = Int32.logand (Int32.shift_right_logical a 16) 31l in + if align <> 0l then + l := Attribute.Alignment (Int32.to_int align) :: !l; + checkattr Attribute.Nocapture; + checkattr Attribute.Noredzone; + checkattr Attribute.Noimplicitfloat; + checkattr Attribute.Naked; + checkattr Attribute.Inlinehint; + let stackalign = Int32.logand (Int32.shift_right_logical a 26) 7l in + if stackalign <> 0l then + l := Attribute.Stackalignment (Int32.to_int stackalign) :: !l; + checkattr Attribute.ReturnsTwice; + checkattr Attribute.UWTable; + checkattr Attribute.NonLazyBind; + !l;; + +let add_function_attr llval attr = + llvm_add_function_attr llval (pack_attr attr) + +external add_target_dependent_function_attr + : llvalue -> string -> string -> unit + = "llvm_add_target_dependent_function_attr" + +let remove_function_attr llval attr = + llvm_remove_function_attr llval (pack_attr attr) + +let function_attr f = unpack_attr (llvm_function_attr f) + +(*--... Operations on params ...............................................--*) +external params : llvalue -> llvalue array = "llvm_params" +external param : llvalue -> int -> llvalue = "llvm_param" +external llvm_param_attr : llvalue -> int32 = "llvm_param_attr" +let param_attr p = unpack_attr (llvm_param_attr p) +external param_parent : llvalue -> llvalue = "LLVMGetParamParent" +external param_begin : llvalue -> (llvalue, llvalue) llpos = "llvm_param_begin" +external param_succ : llvalue -> (llvalue, llvalue) llpos = "llvm_param_succ" +external param_end : llvalue -> (llvalue, llvalue) llrev_pos = "llvm_param_end" +external param_pred : llvalue -> (llvalue, llvalue) llrev_pos ="llvm_param_pred" + +let rec iter_param_range f i e = + if i = e then () else + match i with + | At_end _ -> raise (Invalid_argument "Invalid parameter range.") + | Before p -> + f p; + iter_param_range f (param_succ p) e + +let iter_params f fn = + iter_param_range f (param_begin fn) (At_end fn) + +let rec fold_left_param_range f init i e = + if i = e then init else + match i with + | At_end _ -> raise (Invalid_argument "Invalid parameter range.") + | Before p -> fold_left_param_range f (f init p) (param_succ p) e + +let fold_left_params f init fn = + fold_left_param_range f init (param_begin fn) (At_end fn) + +let rec rev_iter_param_range f i e = + if i = e then () else + match i with + | At_start _ -> raise (Invalid_argument "Invalid parameter range.") + | After p -> + f p; + rev_iter_param_range f (param_pred p) e + +let rev_iter_params f fn = + rev_iter_param_range f (param_end fn) (At_start fn) + +let rec fold_right_param_range f init i e = + if i = e then init else + match i with + | At_start _ -> raise (Invalid_argument "Invalid parameter range.") + | After p -> fold_right_param_range f (f p init) (param_pred p) e + +let fold_right_params f fn init = + fold_right_param_range f init (param_end fn) (At_start fn) + +external llvm_add_param_attr : llvalue -> int32 -> unit + = "llvm_add_param_attr" +external llvm_remove_param_attr : llvalue -> int32 -> unit + = "llvm_remove_param_attr" + +let add_param_attr llval attr = + llvm_add_param_attr llval (pack_attr attr) + +let remove_param_attr llval attr = + llvm_remove_param_attr llval (pack_attr attr) + +external set_param_alignment : llvalue -> int -> unit + = "llvm_set_param_alignment" + +(*--... Operations on basic blocks .........................................--*) +external value_of_block : llbasicblock -> llvalue = "LLVMBasicBlockAsValue" +external value_is_block : llvalue -> bool = "llvm_value_is_block" +external block_of_value : llvalue -> llbasicblock = "LLVMValueAsBasicBlock" +external block_parent : llbasicblock -> llvalue = "LLVMGetBasicBlockParent" +external basic_blocks : llvalue -> llbasicblock array = "llvm_basic_blocks" +external entry_block : llvalue -> llbasicblock = "LLVMGetEntryBasicBlock" +external delete_block : llbasicblock -> unit = "llvm_delete_block" +external remove_block : llbasicblock -> unit = "llvm_remove_block" +external move_block_before : llbasicblock -> llbasicblock -> unit + = "llvm_move_block_before" +external move_block_after : llbasicblock -> llbasicblock -> unit + = "llvm_move_block_after" +external append_block : llcontext -> string -> llvalue -> llbasicblock + = "llvm_append_block" +external insert_block : llcontext -> string -> llbasicblock -> llbasicblock + = "llvm_insert_block" +external block_begin : llvalue -> (llvalue, llbasicblock) llpos + = "llvm_block_begin" +external block_succ : llbasicblock -> (llvalue, llbasicblock) llpos + = "llvm_block_succ" +external block_end : llvalue -> (llvalue, llbasicblock) llrev_pos + = "llvm_block_end" +external block_pred : llbasicblock -> (llvalue, llbasicblock) llrev_pos + = "llvm_block_pred" +external block_terminator : llbasicblock -> llvalue option = + "llvm_block_terminator" + +let rec iter_block_range f i e = + if i = e then () else + match i with + | At_end _ -> raise (Invalid_argument "Invalid block range.") + | Before bb -> + f bb; + iter_block_range f (block_succ bb) e + +let iter_blocks f fn = + iter_block_range f (block_begin fn) (At_end fn) + +let rec fold_left_block_range f init i e = + if i = e then init else + match i with + | At_end _ -> raise (Invalid_argument "Invalid block range.") + | Before bb -> fold_left_block_range f (f init bb) (block_succ bb) e + +let fold_left_blocks f init fn = + fold_left_block_range f init (block_begin fn) (At_end fn) + +let rec rev_iter_block_range f i e = + if i = e then () else + match i with + | At_start _ -> raise (Invalid_argument "Invalid block range.") + | After bb -> + f bb; + rev_iter_block_range f (block_pred bb) e + +let rev_iter_blocks f fn = + rev_iter_block_range f (block_end fn) (At_start fn) + +let rec fold_right_block_range f init i e = + if i = e then init else + match i with + | At_start _ -> raise (Invalid_argument "Invalid block range.") + | After bb -> fold_right_block_range f (f bb init) (block_pred bb) e + +let fold_right_blocks f fn init = + fold_right_block_range f init (block_end fn) (At_start fn) + +(*--... Operations on instructions .........................................--*) +external instr_parent : llvalue -> llbasicblock = "LLVMGetInstructionParent" +external instr_begin : llbasicblock -> (llbasicblock, llvalue) llpos + = "llvm_instr_begin" +external instr_succ : llvalue -> (llbasicblock, llvalue) llpos + = "llvm_instr_succ" +external instr_end : llbasicblock -> (llbasicblock, llvalue) llrev_pos + = "llvm_instr_end" +external instr_pred : llvalue -> (llbasicblock, llvalue) llrev_pos + = "llvm_instr_pred" + +external instr_opcode : llvalue -> Opcode.t = "llvm_instr_get_opcode" +external icmp_predicate : llvalue -> Icmp.t option = "llvm_instr_icmp_predicate" + +let rec iter_instrs_range f i e = + if i = e then () else + match i with + | At_end _ -> raise (Invalid_argument "Invalid instruction range.") + | Before i -> + f i; + iter_instrs_range f (instr_succ i) e + +let iter_instrs f bb = + iter_instrs_range f (instr_begin bb) (At_end bb) + +let rec fold_left_instrs_range f init i e = + if i = e then init else + match i with + | At_end _ -> raise (Invalid_argument "Invalid instruction range.") + | Before i -> fold_left_instrs_range f (f init i) (instr_succ i) e + +let fold_left_instrs f init bb = + fold_left_instrs_range f init (instr_begin bb) (At_end bb) + +let rec rev_iter_instrs_range f i e = + if i = e then () else + match i with + | At_start _ -> raise (Invalid_argument "Invalid instruction range.") + | After i -> + f i; + rev_iter_instrs_range f (instr_pred i) e + +let rev_iter_instrs f bb = + rev_iter_instrs_range f (instr_end bb) (At_start bb) + +let rec fold_right_instr_range f i e init = + if i = e then init else + match i with + | At_start _ -> raise (Invalid_argument "Invalid instruction range.") + | After i -> fold_right_instr_range f (instr_pred i) e (f i init) + +let fold_right_instrs f bb init = + fold_right_instr_range f (instr_end bb) (At_start bb) init + + +(*--... Operations on call sites ...........................................--*) +external instruction_call_conv: llvalue -> int + = "llvm_instruction_call_conv" +external set_instruction_call_conv: int -> llvalue -> unit + = "llvm_set_instruction_call_conv" + +external llvm_add_instruction_param_attr : llvalue -> int -> int32 -> unit + = "llvm_add_instruction_param_attr" +external llvm_remove_instruction_param_attr : llvalue -> int -> int32 -> unit + = "llvm_remove_instruction_param_attr" + +let add_instruction_param_attr llval i attr = + llvm_add_instruction_param_attr llval i (pack_attr attr) + +let remove_instruction_param_attr llval i attr = + llvm_remove_instruction_param_attr llval i (pack_attr attr) + +(*--... Operations on call instructions (only) .............................--*) +external is_tail_call : llvalue -> bool = "llvm_is_tail_call" +external set_tail_call : bool -> llvalue -> unit = "llvm_set_tail_call" + +(*--... Operations on load/store instructions (only) .......................--*) +external is_volatile : llvalue -> bool = "llvm_is_volatile" +external set_volatile : bool -> llvalue -> unit = "llvm_set_volatile" + +(*--... Operations on phi nodes ............................................--*) +external add_incoming : (llvalue * llbasicblock) -> llvalue -> unit + = "llvm_add_incoming" +external incoming : llvalue -> (llvalue * llbasicblock) list = "llvm_incoming" + +external delete_instruction : llvalue -> unit = "llvm_delete_instruction" + +(*===-- Instruction builders ----------------------------------------------===*) +external builder : llcontext -> llbuilder = "llvm_builder" +external position_builder : (llbasicblock, llvalue) llpos -> llbuilder -> unit + = "llvm_position_builder" +external insertion_block : llbuilder -> llbasicblock = "llvm_insertion_block" +external insert_into_builder : llvalue -> string -> llbuilder -> unit + = "llvm_insert_into_builder" + +let builder_at context ip = + let b = builder context in + position_builder ip b; + b + +let builder_before context i = builder_at context (Before i) +let builder_at_end context bb = builder_at context (At_end bb) + +let position_before i = position_builder (Before i) +let position_at_end bb = position_builder (At_end bb) + + +(*--... Metadata ...........................................................--*) +external set_current_debug_location : llbuilder -> llvalue -> unit + = "llvm_set_current_debug_location" +external clear_current_debug_location : llbuilder -> unit + = "llvm_clear_current_debug_location" +external current_debug_location : llbuilder -> llvalue option + = "llvm_current_debug_location" +external set_inst_debug_location : llbuilder -> llvalue -> unit + = "llvm_set_inst_debug_location" + + +(*--... Terminators ........................................................--*) +external build_ret_void : llbuilder -> llvalue = "llvm_build_ret_void" +external build_ret : llvalue -> llbuilder -> llvalue = "llvm_build_ret" +external build_aggregate_ret : llvalue array -> llbuilder -> llvalue + = "llvm_build_aggregate_ret" +external build_br : llbasicblock -> llbuilder -> llvalue = "llvm_build_br" +external build_cond_br : llvalue -> llbasicblock -> llbasicblock -> llbuilder -> + llvalue = "llvm_build_cond_br" +external build_switch : llvalue -> llbasicblock -> int -> llbuilder -> llvalue + = "llvm_build_switch" +external build_malloc : lltype -> string -> llbuilder -> llvalue = + "llvm_build_malloc" +external build_array_malloc : lltype -> llvalue -> string -> llbuilder -> + llvalue = "llvm_build_array_malloc" +external build_free : llvalue -> llbuilder -> llvalue = "llvm_build_free" +external add_case : llvalue -> llvalue -> llbasicblock -> unit + = "llvm_add_case" +external switch_default_dest : llvalue -> llbasicblock = + "LLVMGetSwitchDefaultDest" +external build_indirect_br : llvalue -> int -> llbuilder -> llvalue + = "llvm_build_indirect_br" +external add_destination : llvalue -> llbasicblock -> unit + = "llvm_add_destination" +external build_invoke : llvalue -> llvalue array -> llbasicblock -> + llbasicblock -> string -> llbuilder -> llvalue + = "llvm_build_invoke_bc" "llvm_build_invoke_nat" +external build_landingpad : lltype -> llvalue -> int -> string -> llbuilder -> + llvalue = "llvm_build_landingpad" +external set_cleanup : llvalue -> bool -> unit = "llvm_set_cleanup" +external add_clause : llvalue -> llvalue -> unit = "llvm_add_clause" +external build_resume : llvalue -> llbuilder -> llvalue = "llvm_build_resume" +external build_unreachable : llbuilder -> llvalue = "llvm_build_unreachable" + +(*--... Arithmetic .........................................................--*) +external build_add : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_add" +external build_nsw_add : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_nsw_add" +external build_nuw_add : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_nuw_add" +external build_fadd : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_fadd" +external build_sub : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_sub" +external build_nsw_sub : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_nsw_sub" +external build_nuw_sub : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_nuw_sub" +external build_fsub : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_fsub" +external build_mul : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_mul" +external build_nsw_mul : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_nsw_mul" +external build_nuw_mul : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_nuw_mul" +external build_fmul : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_fmul" +external build_udiv : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_udiv" +external build_sdiv : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_sdiv" +external build_exact_sdiv : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_exact_sdiv" +external build_fdiv : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_fdiv" +external build_urem : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_urem" +external build_srem : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_srem" +external build_frem : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_frem" +external build_shl : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_shl" +external build_lshr : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_lshr" +external build_ashr : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_ashr" +external build_and : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_and" +external build_or : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_or" +external build_xor : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_xor" +external build_neg : llvalue -> string -> llbuilder -> llvalue + = "llvm_build_neg" +external build_nsw_neg : llvalue -> string -> llbuilder -> llvalue + = "llvm_build_nsw_neg" +external build_nuw_neg : llvalue -> string -> llbuilder -> llvalue + = "llvm_build_nuw_neg" +external build_fneg : llvalue -> string -> llbuilder -> llvalue + = "llvm_build_fneg" +external build_not : llvalue -> string -> llbuilder -> llvalue + = "llvm_build_not" + +(*--... Memory .............................................................--*) +external build_alloca : lltype -> string -> llbuilder -> llvalue + = "llvm_build_alloca" +external build_array_alloca : lltype -> llvalue -> string -> llbuilder -> + llvalue = "llvm_build_array_alloca" +external build_load : llvalue -> string -> llbuilder -> llvalue + = "llvm_build_load" +external build_store : llvalue -> llvalue -> llbuilder -> llvalue + = "llvm_build_store" +external build_atomicrmw : AtomicRMWBinOp.t -> llvalue -> llvalue -> + AtomicOrdering.t -> bool -> string -> llbuilder -> + llvalue + = "llvm_build_atomicrmw_bytecode" + "llvm_build_atomicrmw_native" +external build_gep : llvalue -> llvalue array -> string -> llbuilder -> llvalue + = "llvm_build_gep" +external build_in_bounds_gep : llvalue -> llvalue array -> string -> + llbuilder -> llvalue = "llvm_build_in_bounds_gep" +external build_struct_gep : llvalue -> int -> string -> llbuilder -> llvalue + = "llvm_build_struct_gep" + +external build_global_string : string -> string -> llbuilder -> llvalue + = "llvm_build_global_string" +external build_global_stringptr : string -> string -> llbuilder -> llvalue + = "llvm_build_global_stringptr" + +(*--... Casts ..............................................................--*) +external build_trunc : llvalue -> lltype -> string -> llbuilder -> llvalue + = "llvm_build_trunc" +external build_zext : llvalue -> lltype -> string -> llbuilder -> llvalue + = "llvm_build_zext" +external build_sext : llvalue -> lltype -> string -> llbuilder -> llvalue + = "llvm_build_sext" +external build_fptoui : llvalue -> lltype -> string -> llbuilder -> llvalue + = "llvm_build_fptoui" +external build_fptosi : llvalue -> lltype -> string -> llbuilder -> llvalue + = "llvm_build_fptosi" +external build_uitofp : llvalue -> lltype -> string -> llbuilder -> llvalue + = "llvm_build_uitofp" +external build_sitofp : llvalue -> lltype -> string -> llbuilder -> llvalue + = "llvm_build_sitofp" +external build_fptrunc : llvalue -> lltype -> string -> llbuilder -> llvalue + = "llvm_build_fptrunc" +external build_fpext : llvalue -> lltype -> string -> llbuilder -> llvalue + = "llvm_build_fpext" +external build_ptrtoint : llvalue -> lltype -> string -> llbuilder -> llvalue + = "llvm_build_prttoint" +external build_inttoptr : llvalue -> lltype -> string -> llbuilder -> llvalue + = "llvm_build_inttoptr" +external build_bitcast : llvalue -> lltype -> string -> llbuilder -> llvalue + = "llvm_build_bitcast" +external build_zext_or_bitcast : llvalue -> lltype -> string -> llbuilder -> + llvalue = "llvm_build_zext_or_bitcast" +external build_sext_or_bitcast : llvalue -> lltype -> string -> llbuilder -> + llvalue = "llvm_build_sext_or_bitcast" +external build_trunc_or_bitcast : llvalue -> lltype -> string -> llbuilder -> + llvalue = "llvm_build_trunc_or_bitcast" +external build_pointercast : llvalue -> lltype -> string -> llbuilder -> llvalue + = "llvm_build_pointercast" +external build_intcast : llvalue -> lltype -> string -> llbuilder -> llvalue + = "llvm_build_intcast" +external build_fpcast : llvalue -> lltype -> string -> llbuilder -> llvalue + = "llvm_build_fpcast" + +(*--... Comparisons ........................................................--*) +external build_icmp : Icmp.t -> llvalue -> llvalue -> string -> + llbuilder -> llvalue = "llvm_build_icmp" +external build_fcmp : Fcmp.t -> llvalue -> llvalue -> string -> + llbuilder -> llvalue = "llvm_build_fcmp" + +(*--... Miscellaneous instructions .........................................--*) +external build_phi : (llvalue * llbasicblock) list -> string -> llbuilder -> + llvalue = "llvm_build_phi" +external build_call : llvalue -> llvalue array -> string -> llbuilder -> llvalue + = "llvm_build_call" +external build_select : llvalue -> llvalue -> llvalue -> string -> llbuilder -> + llvalue = "llvm_build_select" +external build_va_arg : llvalue -> lltype -> string -> llbuilder -> llvalue + = "llvm_build_va_arg" +external build_extractelement : llvalue -> llvalue -> string -> llbuilder -> + llvalue = "llvm_build_extractelement" +external build_insertelement : llvalue -> llvalue -> llvalue -> string -> + llbuilder -> llvalue = "llvm_build_insertelement" +external build_shufflevector : llvalue -> llvalue -> llvalue -> string -> + llbuilder -> llvalue = "llvm_build_shufflevector" +external build_extractvalue : llvalue -> int -> string -> llbuilder -> llvalue + = "llvm_build_extractvalue" +external build_insertvalue : llvalue -> llvalue -> int -> string -> llbuilder -> + llvalue = "llvm_build_insertvalue" + +external build_is_null : llvalue -> string -> llbuilder -> llvalue + = "llvm_build_is_null" +external build_is_not_null : llvalue -> string -> llbuilder -> llvalue + = "llvm_build_is_not_null" +external build_ptrdiff : llvalue -> llvalue -> string -> llbuilder -> llvalue + = "llvm_build_ptrdiff" + + +(*===-- Memory buffers ----------------------------------------------------===*) + +module MemoryBuffer = struct + external of_file : string -> llmemorybuffer = "llvm_memorybuffer_of_file" + external of_stdin : unit -> llmemorybuffer = "llvm_memorybuffer_of_stdin" + external of_string : ?name:string -> string -> llmemorybuffer + = "llvm_memorybuffer_of_string" + external as_string : llmemorybuffer -> string = "llvm_memorybuffer_as_string" + external dispose : llmemorybuffer -> unit = "llvm_memorybuffer_dispose" +end + + +(*===-- Pass Manager ------------------------------------------------------===*) + +module PassManager = struct + type 'a t + type any = [ `Module | `Function ] + external create : unit -> [ `Module ] t = "llvm_passmanager_create" + external create_function : llmodule -> [ `Function ] t + = "LLVMCreateFunctionPassManager" + external run_module : llmodule -> [ `Module ] t -> bool + = "llvm_passmanager_run_module" + external initialize : [ `Function ] t -> bool = "llvm_passmanager_initialize" + external run_function : llvalue -> [ `Function ] t -> bool + = "llvm_passmanager_run_function" + external finalize : [ `Function ] t -> bool = "llvm_passmanager_finalize" + external dispose : [< any ] t -> unit = "llvm_passmanager_dispose" +end diff --git a/bindings/ocaml/llvm/llvm.mli b/bindings/ocaml/llvm/llvm.mli new file mode 100644 index 00000000..e9961217 --- /dev/null +++ b/bindings/ocaml/llvm/llvm.mli @@ -0,0 +1,2465 @@ +(*===-- llvm/llvm.mli - LLVM OCaml Interface ------------------------------===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +(** Core API. + + This interface provides an OCaml API for the LLVM intermediate + representation, the classes in the VMCore library. *) + + +(** {6 Abstract types} + + These abstract types correlate directly to the LLVM VMCore classes. *) + +(** The top-level container for all LLVM global data. See the + [llvm::LLVMContext] class. *) +type llcontext + +(** The top-level container for all other LLVM Intermediate Representation (IR) + objects. See the [llvm::Module] class. *) +type llmodule + +(** Each value in the LLVM IR has a type, an instance of [lltype]. See the + [llvm::Type] class. *) +type lltype + +(** Any value in the LLVM IR. Functions, instructions, global variables, + constants, and much more are all [llvalues]. See the [llvm::Value] class. + This type covers a wide range of subclasses. *) +type llvalue + +(** Used to store users and usees of values. See the [llvm::Use] class. *) +type lluse + +(** A basic block in LLVM IR. See the [llvm::BasicBlock] class. *) +type llbasicblock + +(** Used to generate instructions in the LLVM IR. See the [llvm::LLVMBuilder] + class. *) +type llbuilder + +(** Used to efficiently handle large buffers of read-only binary data. + See the [llvm::MemoryBuffer] class. *) +type llmemorybuffer + +(** The kind of an [lltype], the result of [classify_type ty]. See the + [llvm::Type::TypeID] enumeration. *) +module TypeKind : sig + type t = + Void + | Half + | Float + | Double + | X86fp80 + | Fp128 + | Ppc_fp128 + | Label + | Integer + | Function + | Struct + | Array + | Pointer + | Vector + | Metadata + | X86_mmx +end + +(** The linkage of a global value, accessed with {!linkage} and + {!set_linkage}. See [llvm::GlobalValue::LinkageTypes]. *) +module Linkage : sig + type t = + External + | Available_externally + | Link_once + | Link_once_odr + | Link_once_odr_auto_hide + | Weak + | Weak_odr + | Appending + | Internal + | Private + | Dllimport + | Dllexport + | External_weak + | Ghost + | Common + | Linker_private + | Linker_private_weak +end + +(** The linker visibility of a global value, accessed with {!visibility} and + {!set_visibility}. See [llvm::GlobalValue::VisibilityTypes]. *) +module Visibility : sig + type t = + Default + | Hidden + | Protected +end + +(** The following calling convention values may be accessed with + {!function_call_conv} and {!set_function_call_conv}. Calling + conventions are open-ended. *) +module CallConv : sig + val c : int (** [c] is the C calling convention. *) + val fast : int (** [fast] is the calling convention to allow LLVM + maximum optimization opportunities. Use only with + internal linkage. *) + val cold : int (** [cold] is the calling convention for + callee-save. *) + val x86_stdcall : int (** [x86_stdcall] is the familiar stdcall calling + convention from C. *) + val x86_fastcall : int (** [x86_fastcall] is the familiar fastcall calling + convention from C. *) +end + +(** The attribute kind of a function parameter, result or the function itself. + See [llvm::Attribute::AttrKind]. *) +module Attribute : sig + type t = + | Zext + | Sext + | Noreturn + | Inreg + | Structret + | Nounwind + | Noalias + | Byval + | Nest + | Readnone + | Readonly + | Noinline + | Alwaysinline + | Optsize + | Ssp + | Sspreq + | Alignment of int + | Nocapture + | Noredzone + | Noimplicitfloat + | Naked + | Inlinehint + | Stackalignment of int + | ReturnsTwice + | UWTable + | NonLazyBind +end + +(** The predicate for an integer comparison ([icmp]) instruction. + See the [llvm::ICmpInst::Predicate] enumeration. *) +module Icmp : sig + type t = + | Eq + | Ne + | Ugt + | Uge + | Ult + | Ule + | Sgt + | Sge + | Slt + | Sle +end + +(** The predicate for a floating-point comparison ([fcmp]) instruction. + See the [llvm::FCmpInst::Predicate] enumeration. *) +module Fcmp : sig + type t = + | False + | Oeq + | Ogt + | Oge + | Olt + | Ole + | One + | Ord + | Uno + | Ueq + | Ugt + | Uge + | Ult + | Ule + | Une + | True +end + +(** The opcodes for LLVM instructions and constant expressions. *) +module Opcode : sig + type t = + | Invalid (* not an instruction *) + (* Terminator Instructions *) + | Ret + | Br + | Switch + | IndirectBr + | Invoke + | Invalid2 + | Unreachable + (* Standard Binary Operators *) + | Add + | FAdd + | Sub + | FSub + | Mul + | FMul + | UDiv + | SDiv + | FDiv + | URem + | SRem + | FRem + (* Logical Operators *) + | Shl + | LShr + | AShr + | And + | Or + | Xor + (* Memory Operators *) + | Alloca + | Load + | Store + | GetElementPtr + (* Cast Operators *) + | Trunc + | ZExt + | SExt + | FPToUI + | FPToSI + | UIToFP + | SIToFP + | FPTrunc + | FPExt + | PtrToInt + | IntToPtr + | BitCast + (* Other Operators *) + | ICmp + | FCmp + | PHI + | Call + | Select + | UserOp1 + | UserOp2 + | VAArg + | ExtractElement + | InsertElement + | ShuffleVector + | ExtractValue + | InsertValue + | Fence + | AtomicCmpXchg + | AtomicRMW + | Resume + | LandingPad +end + +(** The type of a clause of a [landingpad] instruction. + See [llvm::LandingPadInst::ClauseType]. *) +module LandingPadClauseTy : sig + type t = + | Catch + | Filter +end + +(** The thread local mode of a global value, accessed with {!thread_local_mode} + and {!set_thread_local_mode}. + See [llvm::GlobalVariable::ThreadLocalMode]. *) +module ThreadLocalMode : sig + type t = + | None + | GeneralDynamic + | LocalDynamic + | InitialExec + | LocalExec +end + +(** The ordering of an atomic [load], [store], [cmpxchg], [atomicrmw] or + [fence] instruction. See [llvm::AtomicOrdering]. *) +module AtomicOrdering : sig + type t = + | NotAtomic + | Unordered + | Monotonic + | Invalid (* removed due to API changes *) + | Acquire + | Release + | AcqiureRelease + | SequentiallyConsistent +end + +(** The opcode of an [atomicrmw] instruction. + See [llvm::AtomicRMWInst::BinOp]. *) +module AtomicRMWBinOp : sig + type t = + | Xchg + | Add + | Sub + | And + | Nand + | Or + | Xor + | Max + | Min + | UMax + | UMin +end + +(** The kind of an [llvalue], the result of [classify_value v]. + See the various [LLVMIsA*] functions. *) +module ValueKind : sig + type t = + | NullValue + | Argument + | BasicBlock + | InlineAsm + | MDNode + | MDString + | BlockAddress + | ConstantAggregateZero + | ConstantArray + | ConstantDataArray + | ConstantDataVector + | ConstantExpr + | ConstantFP + | ConstantInt + | ConstantPointerNull + | ConstantStruct + | ConstantVector + | Function + | GlobalAlias + | GlobalVariable + | UndefValue + | Instruction of Opcode.t +end + + +(** {6 Iteration} *) + +(** [Before b] and [At_end a] specify positions from the start of the ['b] list + of [a]. [llpos] is used to specify positions in and for forward iteration + through the various value lists maintained by the LLVM IR. *) +type ('a, 'b) llpos = +| At_end of 'a +| Before of 'b + +(** [After b] and [At_start a] specify positions from the end of the ['b] list + of [a]. [llrev_pos] is used for reverse iteration through the various value + lists maintained by the LLVM IR. *) +type ('a, 'b) llrev_pos = +| At_start of 'a +| After of 'b + + +(** {6 Exceptions} *) + +exception IoError of string + + +(** {6 Global configuration} *) + +(** [enable_pretty_stacktraces ()] enables LLVM's built-in stack trace code. + This intercepts the OS's crash signals and prints which component of LLVM + you were in at the time of the crash. *) +val enable_pretty_stacktrace : unit -> unit + +(** [install_fatal_error_handler f] installs [f] as LLVM's fatal error handler. + The handler will receive the reason for termination as a string. After + the handler has been executed, LLVM calls [exit(1)]. *) +val install_fatal_error_handler : (string -> unit) -> unit + +(** [reset_fatal_error_handler ()] resets LLVM's fatal error handler. *) +val reset_fatal_error_handler : unit -> unit + +(** {6 Contexts} *) + +(** [create_context ()] creates a context for storing the "global" state in + LLVM. See the constructor [llvm::LLVMContext]. *) +val create_context : unit -> llcontext + +(** [destroy_context ()] destroys a context. See the destructor + [llvm::LLVMContext::~LLVMContext]. *) +val dispose_context : llcontext -> unit + +(** See the function [llvm::getGlobalContext]. *) +val global_context : unit -> llcontext + +(** [mdkind_id context name] returns the MDKind ID that corresponds to the + name [name] in the context [context]. See the function + [llvm::LLVMContext::getMDKindID]. *) +val mdkind_id : llcontext -> string -> int + + +(** {6 Modules} *) + +(** [create_module context id] creates a module with the supplied module ID in + the context [context]. Modules are not garbage collected; it is mandatory + to call {!dispose_module} to free memory. See the constructor + [llvm::Module::Module]. *) +val create_module : llcontext -> string -> llmodule + +(** [dispose_module m] destroys a module [m] and all of the IR objects it + contained. All references to subordinate objects are invalidated; + referencing them will invoke undefined behavior. See the destructor + [llvm::Module::~Module]. *) +val dispose_module : llmodule -> unit + +(** [target_triple m] is the target specifier for the module [m], something like + [i686-apple-darwin8]. See the method [llvm::Module::getTargetTriple]. *) +val target_triple: llmodule -> string + +(** [target_triple triple m] changes the target specifier for the module [m] to + the string [triple]. See the method [llvm::Module::setTargetTriple]. *) +val set_target_triple: string -> llmodule -> unit + +(** [data_layout m] is the data layout specifier for the module [m], something + like [e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-...-a0:0:64-f80:128:128]. See the + method [llvm::Module::getDataLayout]. *) +val data_layout: llmodule -> string + +(** [set_data_layout s m] changes the data layout specifier for the module [m] + to the string [s]. See the method [llvm::Module::setDataLayout]. *) +val set_data_layout: string -> llmodule -> unit + +(** [dump_module m] prints the .ll representation of the module [m] to standard + error. See the method [llvm::Module::dump]. *) +val dump_module : llmodule -> unit + +(** [print_module f m] prints the .ll representation of the module [m] + to file [f]. See the method [llvm::Module::print]. *) +val print_module : string -> llmodule -> unit + +(** [string_of_llmodule m] returns the .ll representation of the module [m] + as a string. See the method [llvm::Module::print]. *) +val string_of_llmodule : llmodule -> string + +(** [set_module_inline_asm m asm] sets the inline assembler for the module. See + the method [llvm::Module::setModuleInlineAsm]. *) +val set_module_inline_asm : llmodule -> string -> unit + +(** [module_context m] returns the context of the specified module. + See the method [llvm::Module::getContext] *) +val module_context : llmodule -> llcontext + + +(** {6 Types} *) + +(** [classify_type ty] returns the {!TypeKind.t} corresponding to the type [ty]. + See the method [llvm::Type::getTypeID]. *) +val classify_type : lltype -> TypeKind.t + +(** [type_is_sized ty] returns whether the type has a size or not. + If it doesn't then it is not safe to call the [DataLayout::] methods on it. + *) +val type_is_sized : lltype -> bool + +(** [type_context ty] returns the {!llcontext} corresponding to the type [ty]. + See the method [llvm::Type::getContext]. *) +val type_context : lltype -> llcontext + +(** [dump_type ty] prints the .ll representation of the type [ty] to standard + error. See the method [llvm::Type::dump]. *) +val dump_type : lltype -> unit + +(** [string_of_lltype ty] returns a string describing the type [ty]. *) +val string_of_lltype : lltype -> string + + +(** {7 Operations on integer types} *) + +(** [i1_type c] returns an integer type of bitwidth 1 in the context [c]. See + [llvm::Type::Int1Ty]. *) +val i1_type : llcontext -> lltype + +(** [i8_type c] returns an integer type of bitwidth 8 in the context [c]. See + [llvm::Type::Int8Ty]. *) +val i8_type : llcontext -> lltype + +(** [i16_type c] returns an integer type of bitwidth 16 in the context [c]. See + [llvm::Type::Int16Ty]. *) +val i16_type : llcontext -> lltype + +(** [i32_type c] returns an integer type of bitwidth 32 in the context [c]. See + [llvm::Type::Int32Ty]. *) +val i32_type : llcontext -> lltype + +(** [i64_type c] returns an integer type of bitwidth 64 in the context [c]. See + [llvm::Type::Int64Ty]. *) +val i64_type : llcontext -> lltype + +(** [integer_type c n] returns an integer type of bitwidth [n] in the context + [c]. See the method [llvm::IntegerType::get]. *) +val integer_type : llcontext -> int -> lltype + +(** [integer_bitwidth c ty] returns the number of bits in the integer type [ty] + in the context [c]. See the method [llvm::IntegerType::getBitWidth]. *) +val integer_bitwidth : lltype -> int + + +(** {7 Operations on real types} *) + +(** [float_type c] returns the IEEE 32-bit floating point type in the context + [c]. See [llvm::Type::FloatTy]. *) +val float_type : llcontext -> lltype + +(** [double_type c] returns the IEEE 64-bit floating point type in the context + [c]. See [llvm::Type::DoubleTy]. *) +val double_type : llcontext -> lltype + +(** [x86fp80_type c] returns the x87 80-bit floating point type in the context + [c]. See [llvm::Type::X86_FP80Ty]. *) +val x86fp80_type : llcontext -> lltype + +(** [fp128_type c] returns the IEEE 128-bit floating point type in the context + [c]. See [llvm::Type::FP128Ty]. *) +val fp128_type : llcontext -> lltype + +(** [ppc_fp128_type c] returns the PowerPC 128-bit floating point type in the + context [c]. See [llvm::Type::PPC_FP128Ty]. *) +val ppc_fp128_type : llcontext -> lltype + + +(** {7 Operations on function types} *) + +(** [function_type ret_ty param_tys] returns the function type returning + [ret_ty] and taking [param_tys] as parameters. + See the method [llvm::FunctionType::get]. *) +val function_type : lltype -> lltype array -> lltype + +(** [var_arg_function_type ret_ty param_tys] is just like + [function_type ret_ty param_tys] except that it returns the function type + which also takes a variable number of arguments. + See the method [llvm::FunctionType::get]. *) +val var_arg_function_type : lltype -> lltype array -> lltype + +(** [is_var_arg fty] returns [true] if [fty] is a varargs function type, [false] + otherwise. See the method [llvm::FunctionType::isVarArg]. *) +val is_var_arg : lltype -> bool + +(** [return_type fty] gets the return type of the function type [fty]. + See the method [llvm::FunctionType::getReturnType]. *) +val return_type : lltype -> lltype + +(** [param_types fty] gets the parameter types of the function type [fty]. + See the method [llvm::FunctionType::getParamType]. *) +val param_types : lltype -> lltype array + + +(** {7 Operations on struct types} *) + +(** [struct_type context tys] returns the structure type in the context + [context] containing in the types in the array [tys]. See the method + [llvm::StructType::get]. *) +val struct_type : llcontext -> lltype array -> lltype + +(** [packed_struct_type context ys] returns the packed structure type in the + context [context] containing in the types in the array [tys]. See the method + [llvm::StructType::get]. *) +val packed_struct_type : llcontext -> lltype array -> lltype + +(** [struct_name ty] returns the name of the named structure type [ty], + or None if the structure type is not named *) +val struct_name : lltype -> string option + +(** [named_struct_type context name] returns the named structure type [name] + in the context [context]. + See the method [llvm::StructType::get]. *) +val named_struct_type : llcontext -> string -> lltype + +(** [struct_set_body ty elts ispacked] sets the body of the named struct [ty] + to the [elts] elements. + See the moethd [llvm::StructType::setBody]. *) +val struct_set_body : lltype -> lltype array -> bool -> unit + +(** [struct_element_types sty] returns the constituent types of the struct type + [sty]. See the method [llvm::StructType::getElementType]. *) +val struct_element_types : lltype -> lltype array + +(** [is_packed sty] returns [true] if the structure type [sty] is packed, + [false] otherwise. See the method [llvm::StructType::isPacked]. *) +val is_packed : lltype -> bool + +(** [is_opaque sty] returns [true] if the structure type [sty] is opaque. + [false] otherwise. See the method [llvm::StructType::isOpaque]. *) +val is_opaque : lltype -> bool + + +(** {7 Operations on pointer, vector, and array types} *) + +(** [array_type ty n] returns the array type containing [n] elements of type + [ty]. See the method [llvm::ArrayType::get]. *) +val array_type : lltype -> int -> lltype + +(** [pointer_type ty] returns the pointer type referencing objects of type + [ty] in the default address space (0). + See the method [llvm::PointerType::getUnqual]. *) +val pointer_type : lltype -> lltype + +(** [qualified_pointer_type ty as] returns the pointer type referencing objects + of type [ty] in address space [as]. + See the method [llvm::PointerType::get]. *) +val qualified_pointer_type : lltype -> int -> lltype + +(** [vector_type ty n] returns the array type containing [n] elements of the + primitive type [ty]. See the method [llvm::ArrayType::get]. *) +val vector_type : lltype -> int -> lltype + +(** [element_type ty] returns the element type of the pointer, vector, or array + type [ty]. See the method [llvm::SequentialType::get]. *) +val element_type : lltype -> lltype + +(** [element_type aty] returns the element count of the array type [aty]. + See the method [llvm::ArrayType::getNumElements]. *) +val array_length : lltype -> int + +(** [address_space pty] returns the address space qualifier of the pointer type + [pty]. See the method [llvm::PointerType::getAddressSpace]. *) +val address_space : lltype -> int + +(** [element_type ty] returns the element count of the vector type [ty]. + See the method [llvm::VectorType::getNumElements]. *) +val vector_size : lltype -> int + + +(** {7 Operations on other types} *) + +(** [void_type c] creates a type of a function which does not return any + value in the context [c]. See [llvm::Type::VoidTy]. *) +val void_type : llcontext -> lltype + +(** [label_type c] creates a type of a basic block in the context [c]. See + [llvm::Type::LabelTy]. *) +val label_type : llcontext -> lltype + +(** [x86_mmx_type c] returns the x86 64-bit MMX register type in the + context [c]. See [llvm::Type::X86_MMXTy]. *) +val x86_mmx_type : llcontext -> lltype + +(** [type_by_name m name] returns the specified type from the current module + if it exists. + See the method [llvm::Module::getTypeByName] *) +val type_by_name : llmodule -> string -> lltype option + + +(* {6 Values} *) + +(** [type_of v] returns the type of the value [v]. + See the method [llvm::Value::getType]. *) +val type_of : llvalue -> lltype + +(** [classify_value v] returns the kind of the value [v]. *) +val classify_value : llvalue -> ValueKind.t + +(** [value_name v] returns the name of the value [v]. For global values, this is + the symbol name. For instructions and basic blocks, it is the SSA register + name. It is meaningless for constants. + See the method [llvm::Value::getName]. *) +val value_name : llvalue -> string + +(** [set_value_name n v] sets the name of the value [v] to [n]. See the method + [llvm::Value::setName]. *) +val set_value_name : string -> llvalue -> unit + +(** [dump_value v] prints the .ll representation of the value [v] to standard + error. See the method [llvm::Value::dump]. *) +val dump_value : llvalue -> unit + +(** [string_of_llvalue v] returns a string describing the value [v]. *) +val string_of_llvalue : llvalue -> string + +(** [replace_all_uses_with old new] replaces all uses of the value [old] + with the value [new]. See the method [llvm::Value::replaceAllUsesWith]. *) +val replace_all_uses_with : llvalue -> llvalue -> unit + + +(* {6 Uses} *) + +(** [use_begin v] returns the first position in the use list for the value [v]. + [use_begin] and [use_succ] can e used to iterate over the use list in order. + See the method [llvm::Value::use_begin]. *) +val use_begin : llvalue -> lluse option + +(** [use_succ u] returns the use list position succeeding [u]. + See the method [llvm::use_value_iterator::operator++]. *) +val use_succ : lluse -> lluse option + +(** [user u] returns the user of the use [u]. + See the method [llvm::Use::getUser]. *) +val user : lluse -> llvalue + +(** [used_value u] returns the usee of the use [u]. + See the method [llvm::Use::getUsedValue]. *) +val used_value : lluse -> llvalue + +(** [iter_uses f v] applies function [f] to each of the users of the value [v] + in order. Tail recursive. *) +val iter_uses : (lluse -> unit) -> llvalue -> unit + +(** [fold_left_uses f init v] is [f (... (f init u1) ...) uN] where + [u1,...,uN] are the users of the value [v]. Tail recursive. *) +val fold_left_uses : ('a -> lluse -> 'a) -> 'a -> llvalue -> 'a + +(** [fold_right_uses f v init] is [f u1 (... (f uN init) ...)] where + [u1,...,uN] are the users of the value [v]. Not tail recursive. *) +val fold_right_uses : (lluse -> 'a -> 'a) -> llvalue -> 'a -> 'a + + +(* {6 Users} *) + +(** [operand v i] returns the operand at index [i] for the value [v]. See the + method [llvm::User::getOperand]. *) +val operand : llvalue -> int -> llvalue + +(** [set_operand v i o] sets the operand of the value [v] at the index [i] to + the value [o]. + See the method [llvm::User::setOperand]. *) +val set_operand : llvalue -> int -> llvalue -> unit + +(** [num_operands v] returns the number of operands for the value [v]. + See the method [llvm::User::getNumOperands]. *) +val num_operands : llvalue -> int + + +(** {7 Operations on constants of (mostly) any type} *) + +(** [is_constant v] returns [true] if the value [v] is a constant, [false] + otherwise. Similar to [llvm::isa]. *) +val is_constant : llvalue -> bool + +(** [const_null ty] returns the constant null (zero) of the type [ty]. + See the method [llvm::Constant::getNullValue]. *) +val const_null : lltype -> llvalue + +(** [const_all_ones ty] returns the constant '-1' of the integer or vector type + [ty]. See the method [llvm::Constant::getAllOnesValue]. *) +val const_all_ones : (*int|vec*)lltype -> llvalue + +(** [const_pointer_null ty] returns the constant null (zero) pointer of the type + [ty]. See the method [llvm::ConstantPointerNull::get]. *) +val const_pointer_null : lltype -> llvalue + +(** [undef ty] returns the undefined value of the type [ty]. + See the method [llvm::UndefValue::get]. *) +val undef : lltype -> llvalue + +(** [is_null v] returns [true] if the value [v] is the null (zero) value. + See the method [llvm::Constant::isNullValue]. *) +val is_null : llvalue -> bool + +(** [is_undef v] returns [true] if the value [v] is an undefined value, [false] + otherwise. Similar to [llvm::isa]. *) +val is_undef : llvalue -> bool + +(** [constexpr_opcode v] returns an [Opcode.t] corresponding to constexpr + value [v], or [Opcode.Invalid] if [v] is not a constexpr. *) +val constexpr_opcode : llvalue -> Opcode.t + + +(** {7 Operations on instructions} *) + +(** [has_metadata i] returns whether or not the instruction [i] has any + metadata attached to it. See the function + [llvm::Instruction::hasMetadata]. *) +val has_metadata : llvalue -> bool + +(** [metadata i kind] optionally returns the metadata associated with the + kind [kind] in the instruction [i] See the function + [llvm::Instruction::getMetadata]. *) +val metadata : llvalue -> int -> llvalue option + +(** [set_metadata i kind md] sets the metadata [md] of kind [kind] in the + instruction [i]. See the function [llvm::Instruction::setMetadata]. *) +val set_metadata : llvalue -> int -> llvalue -> unit + +(** [clear_metadata i kind] clears the metadata of kind [kind] in the + instruction [i]. See the function [llvm::Instruction::setMetadata]. *) +val clear_metadata : llvalue -> int -> unit + + +(** {7 Operations on metadata} *) + +(** [mdstring c s] returns the MDString of the string [s] in the context [c]. + See the method [llvm::MDNode::get]. *) +val mdstring : llcontext -> string -> llvalue + +(** [mdnode c elts] returns the MDNode containing the values [elts] in the + context [c]. + See the method [llvm::MDNode::get]. *) +val mdnode : llcontext -> llvalue array -> llvalue + +(** [get_mdstring v] returns the MDString. + See the method [llvm::MDString::getString] *) +val get_mdstring : llvalue -> string option + +(** [get_named_metadata m name] returns all the MDNodes belonging to the named + metadata (if any). + See the method [llvm::NamedMDNode::getOperand]. *) +val get_named_metadata : llmodule -> string -> llvalue array + +(** [add_named_metadata_operand m name v] adds [v] as the last operand of + metadata named [name] in module [m]. If the metadata does not exist, + it is created. + See the methods [llvm::Module::getNamedMetadata()] and + [llvm::MDNode::addOperand()]. *) +val add_named_metadata_operand : llmodule -> string -> llvalue -> unit + + +(** {7 Operations on scalar constants} *) + +(** [const_int ty i] returns the integer constant of type [ty] and value [i]. + See the method [llvm::ConstantInt::get]. *) +val const_int : lltype -> int -> llvalue + +(** [const_of_int64 ty i] returns the integer constant of type [ty] and value + [i]. See the method [llvm::ConstantInt::get]. *) +val const_of_int64 : lltype -> Int64.t -> bool -> llvalue + +(** [int64_of_const c] returns the int64 value of the [c] constant integer. + None is returned if this is not an integer constant, or bitwidth exceeds 64. + See the method [llvm::ConstantInt::getSExtValue].*) +val int64_of_const : llvalue -> Int64.t option + +(** [const_int_of_string ty s r] returns the integer constant of type [ty] and + value [s], with the radix [r]. See the method [llvm::ConstantInt::get]. *) +val const_int_of_string : lltype -> string -> int -> llvalue + +(** [const_float ty n] returns the floating point constant of type [ty] and + value [n]. See the method [llvm::ConstantFP::get]. *) +val const_float : lltype -> float -> llvalue + +(** [const_float_of_string ty s] returns the floating point constant of type + [ty] and value [n]. See the method [llvm::ConstantFP::get]. *) +val const_float_of_string : lltype -> string -> llvalue + + +(** {7 Operations on composite constants} *) + +(** [const_string c s] returns the constant [i8] array with the values of the + characters in the string [s] in the context [c]. The array is not + null-terminated (but see {!const_stringz}). This value can in turn be used + as the initializer for a global variable. See the method + [llvm::ConstantArray::get]. *) +val const_string : llcontext -> string -> llvalue + +(** [const_stringz c s] returns the constant [i8] array with the values of the + characters in the string [s] and a null terminator in the context [c]. This + value can in turn be used as the initializer for a global variable. + See the method [llvm::ConstantArray::get]. *) +val const_stringz : llcontext -> string -> llvalue + +(** [const_array ty elts] returns the constant array of type + [array_type ty (Array.length elts)] and containing the values [elts]. + This value can in turn be used as the initializer for a global variable. + See the method [llvm::ConstantArray::get]. *) +val const_array : lltype -> llvalue array -> llvalue + +(** [const_struct context elts] returns the structured constant of type + [struct_type (Array.map type_of elts)] and containing the values [elts] + in the context [context]. This value can in turn be used as the initializer + for a global variable. See the method [llvm::ConstantStruct::getAnon]. *) +val const_struct : llcontext -> llvalue array -> llvalue + +(** [const_named_struct namedty elts] returns the structured constant of type + [namedty] (which must be a named structure type) and containing the values [elts]. + This value can in turn be used as the initializer + for a global variable. See the method [llvm::ConstantStruct::get]. *) +val const_named_struct : lltype -> llvalue array -> llvalue + +(** [const_packed_struct context elts] returns the structured constant of + type {!packed_struct_type} [(Array.map type_of elts)] and containing the + values [elts] in the context [context]. This value can in turn be used as + the initializer for a global variable. See the method + [llvm::ConstantStruct::get]. *) +val const_packed_struct : llcontext -> llvalue array -> llvalue + +(** [const_vector elts] returns the vector constant of type + [vector_type (type_of elts.(0)) (Array.length elts)] and containing the + values [elts]. See the method [llvm::ConstantVector::get]. *) +val const_vector : llvalue array -> llvalue + + +(** {7 Constant expressions} *) + +(** [align_of ty] returns the alignof constant for the type [ty]. This is + equivalent to [const_ptrtoint (const_gep (const_null (pointer_type {i8,ty})) + (const_int i32_type 0) (const_int i32_type 1)) i32_type], but considerably + more readable. See the method [llvm::ConstantExpr::getAlignOf]. *) +val align_of : lltype -> llvalue + +(** [size_of ty] returns the sizeof constant for the type [ty]. This is + equivalent to [const_ptrtoint (const_gep (const_null (pointer_type ty)) + (const_int i32_type 1)) i64_type], but considerably more readable. + See the method [llvm::ConstantExpr::getSizeOf]. *) +val size_of : lltype -> llvalue + +(** [const_neg c] returns the arithmetic negation of the constant [c]. + See the method [llvm::ConstantExpr::getNeg]. *) +val const_neg : llvalue -> llvalue + +(** [const_nsw_neg c] returns the arithmetic negation of the constant [c] with + no signed wrapping. The result is undefined if the negation overflows. + See the method [llvm::ConstantExpr::getNSWNeg]. *) +val const_nsw_neg : llvalue -> llvalue + +(** [const_nuw_neg c] returns the arithmetic negation of the constant [c] with + no unsigned wrapping. The result is undefined if the negation overflows. + See the method [llvm::ConstantExpr::getNUWNeg]. *) +val const_nuw_neg : llvalue -> llvalue + +(** [const_fneg c] returns the arithmetic negation of the constant float [c]. + See the method [llvm::ConstantExpr::getFNeg]. *) +val const_fneg : llvalue -> llvalue + +(** [const_not c] returns the bitwise inverse of the constant [c]. + See the method [llvm::ConstantExpr::getNot]. *) +val const_not : llvalue -> llvalue + +(** [const_add c1 c2] returns the constant sum of two constants. + See the method [llvm::ConstantExpr::getAdd]. *) +val const_add : llvalue -> llvalue -> llvalue + +(** [const_nsw_add c1 c2] returns the constant sum of two constants with no + signed wrapping. The result is undefined if the sum overflows. + See the method [llvm::ConstantExpr::getNSWAdd]. *) +val const_nsw_add : llvalue -> llvalue -> llvalue + +(** [const_nuw_add c1 c2] returns the constant sum of two constants with no + unsigned wrapping. The result is undefined if the sum overflows. + See the method [llvm::ConstantExpr::getNSWAdd]. *) +val const_nuw_add : llvalue -> llvalue -> llvalue + +(** [const_fadd c1 c2] returns the constant sum of two constant floats. + See the method [llvm::ConstantExpr::getFAdd]. *) +val const_fadd : llvalue -> llvalue -> llvalue + +(** [const_sub c1 c2] returns the constant difference, [c1 - c2], of two + constants. See the method [llvm::ConstantExpr::getSub]. *) +val const_sub : llvalue -> llvalue -> llvalue + +(** [const_nsw_sub c1 c2] returns the constant difference of two constants with + no signed wrapping. The result is undefined if the sum overflows. + See the method [llvm::ConstantExpr::getNSWSub]. *) +val const_nsw_sub : llvalue -> llvalue -> llvalue + +(** [const_nuw_sub c1 c2] returns the constant difference of two constants with + no unsigned wrapping. The result is undefined if the sum overflows. + See the method [llvm::ConstantExpr::getNSWSub]. *) +val const_nuw_sub : llvalue -> llvalue -> llvalue + +(** [const_fsub c1 c2] returns the constant difference, [c1 - c2], of two + constant floats. See the method [llvm::ConstantExpr::getFSub]. *) +val const_fsub : llvalue -> llvalue -> llvalue + +(** [const_mul c1 c2] returns the constant product of two constants. + See the method [llvm::ConstantExpr::getMul]. *) +val const_mul : llvalue -> llvalue -> llvalue + +(** [const_nsw_mul c1 c2] returns the constant product of two constants with + no signed wrapping. The result is undefined if the sum overflows. + See the method [llvm::ConstantExpr::getNSWMul]. *) +val const_nsw_mul : llvalue -> llvalue -> llvalue + +(** [const_nuw_mul c1 c2] returns the constant product of two constants with + no unsigned wrapping. The result is undefined if the sum overflows. + See the method [llvm::ConstantExpr::getNSWMul]. *) +val const_nuw_mul : llvalue -> llvalue -> llvalue + +(** [const_fmul c1 c2] returns the constant product of two constants floats. + See the method [llvm::ConstantExpr::getFMul]. *) +val const_fmul : llvalue -> llvalue -> llvalue + +(** [const_udiv c1 c2] returns the constant quotient [c1 / c2] of two unsigned + integer constants. + See the method [llvm::ConstantExpr::getUDiv]. *) +val const_udiv : llvalue -> llvalue -> llvalue + +(** [const_sdiv c1 c2] returns the constant quotient [c1 / c2] of two signed + integer constants. + See the method [llvm::ConstantExpr::getSDiv]. *) +val const_sdiv : llvalue -> llvalue -> llvalue + +(** [const_exact_sdiv c1 c2] returns the constant quotient [c1 / c2] of two + signed integer constants. The result is undefined if the result is rounded + or overflows. See the method [llvm::ConstantExpr::getExactSDiv]. *) +val const_exact_sdiv : llvalue -> llvalue -> llvalue + +(** [const_fdiv c1 c2] returns the constant quotient [c1 / c2] of two floating + point constants. + See the method [llvm::ConstantExpr::getFDiv]. *) +val const_fdiv : llvalue -> llvalue -> llvalue + +(** [const_urem c1 c2] returns the constant remainder [c1 MOD c2] of two + unsigned integer constants. + See the method [llvm::ConstantExpr::getURem]. *) +val const_urem : llvalue -> llvalue -> llvalue + +(** [const_srem c1 c2] returns the constant remainder [c1 MOD c2] of two + signed integer constants. + See the method [llvm::ConstantExpr::getSRem]. *) +val const_srem : llvalue -> llvalue -> llvalue + +(** [const_frem c1 c2] returns the constant remainder [c1 MOD c2] of two + signed floating point constants. + See the method [llvm::ConstantExpr::getFRem]. *) +val const_frem : llvalue -> llvalue -> llvalue + +(** [const_and c1 c2] returns the constant bitwise [AND] of two integer + constants. + See the method [llvm::ConstantExpr::getAnd]. *) +val const_and : llvalue -> llvalue -> llvalue + +(** [const_or c1 c2] returns the constant bitwise [OR] of two integer + constants. + See the method [llvm::ConstantExpr::getOr]. *) +val const_or : llvalue -> llvalue -> llvalue + +(** [const_xor c1 c2] returns the constant bitwise [XOR] of two integer + constants. + See the method [llvm::ConstantExpr::getXor]. *) +val const_xor : llvalue -> llvalue -> llvalue + +(** [const_icmp pred c1 c2] returns the constant comparison of two integer + constants, [c1 pred c2]. + See the method [llvm::ConstantExpr::getICmp]. *) +val const_icmp : Icmp.t -> llvalue -> llvalue -> llvalue + +(** [const_fcmp pred c1 c2] returns the constant comparison of two floating + point constants, [c1 pred c2]. + See the method [llvm::ConstantExpr::getFCmp]. *) +val const_fcmp : Fcmp.t -> llvalue -> llvalue -> llvalue + +(** [const_shl c1 c2] returns the constant integer [c1] left-shifted by the + constant integer [c2]. + See the method [llvm::ConstantExpr::getShl]. *) +val const_shl : llvalue -> llvalue -> llvalue + +(** [const_lshr c1 c2] returns the constant integer [c1] right-shifted by the + constant integer [c2] with zero extension. + See the method [llvm::ConstantExpr::getLShr]. *) +val const_lshr : llvalue -> llvalue -> llvalue + +(** [const_ashr c1 c2] returns the constant integer [c1] right-shifted by the + constant integer [c2] with sign extension. + See the method [llvm::ConstantExpr::getAShr]. *) +val const_ashr : llvalue -> llvalue -> llvalue + +(** [const_gep pc indices] returns the constant [getElementPtr] of [p1] with the + constant integers indices from the array [indices]. + See the method [llvm::ConstantExpr::getGetElementPtr]. *) +val const_gep : llvalue -> llvalue array -> llvalue + +(** [const_in_bounds_gep pc indices] returns the constant [getElementPtr] of [p1] + with the constant integers indices from the array [indices]. + See the method [llvm::ConstantExpr::getInBoundsGetElementPtr]. *) +val const_in_bounds_gep : llvalue -> llvalue array -> llvalue + +(** [const_trunc c ty] returns the constant truncation of integer constant [c] + to the smaller integer type [ty]. + See the method [llvm::ConstantExpr::getTrunc]. *) +val const_trunc : llvalue -> lltype -> llvalue + +(** [const_sext c ty] returns the constant sign extension of integer constant + [c] to the larger integer type [ty]. + See the method [llvm::ConstantExpr::getSExt]. *) +val const_sext : llvalue -> lltype -> llvalue + +(** [const_zext c ty] returns the constant zero extension of integer constant + [c] to the larger integer type [ty]. + See the method [llvm::ConstantExpr::getZExt]. *) +val const_zext : llvalue -> lltype -> llvalue + +(** [const_fptrunc c ty] returns the constant truncation of floating point + constant [c] to the smaller floating point type [ty]. + See the method [llvm::ConstantExpr::getFPTrunc]. *) +val const_fptrunc : llvalue -> lltype -> llvalue + +(** [const_fpext c ty] returns the constant extension of floating point constant + [c] to the larger floating point type [ty]. + See the method [llvm::ConstantExpr::getFPExt]. *) +val const_fpext : llvalue -> lltype -> llvalue + +(** [const_uitofp c ty] returns the constant floating point conversion of + unsigned integer constant [c] to the floating point type [ty]. + See the method [llvm::ConstantExpr::getUIToFP]. *) +val const_uitofp : llvalue -> lltype -> llvalue + +(** [const_sitofp c ty] returns the constant floating point conversion of + signed integer constant [c] to the floating point type [ty]. + See the method [llvm::ConstantExpr::getSIToFP]. *) +val const_sitofp : llvalue -> lltype -> llvalue + +(** [const_fptoui c ty] returns the constant unsigned integer conversion of + floating point constant [c] to integer type [ty]. + See the method [llvm::ConstantExpr::getFPToUI]. *) +val const_fptoui : llvalue -> lltype -> llvalue + +(** [const_fptoui c ty] returns the constant unsigned integer conversion of + floating point constant [c] to integer type [ty]. + See the method [llvm::ConstantExpr::getFPToSI]. *) +val const_fptosi : llvalue -> lltype -> llvalue + +(** [const_ptrtoint c ty] returns the constant integer conversion of + pointer constant [c] to integer type [ty]. + See the method [llvm::ConstantExpr::getPtrToInt]. *) +val const_ptrtoint : llvalue -> lltype -> llvalue + +(** [const_inttoptr c ty] returns the constant pointer conversion of + integer constant [c] to pointer type [ty]. + See the method [llvm::ConstantExpr::getIntToPtr]. *) +val const_inttoptr : llvalue -> lltype -> llvalue + +(** [const_bitcast c ty] returns the constant bitwise conversion of constant [c] + to type [ty] of equal size. + See the method [llvm::ConstantExpr::getBitCast]. *) +val const_bitcast : llvalue -> lltype -> llvalue + +(** [const_zext_or_bitcast c ty] returns a constant zext or bitwise cast + conversion of constant [c] to type [ty]. + See the method [llvm::ConstantExpr::getZExtOrBitCast]. *) +val const_zext_or_bitcast : llvalue -> lltype -> llvalue + +(** [const_sext_or_bitcast c ty] returns a constant sext or bitwise cast + conversion of constant [c] to type [ty]. + See the method [llvm::ConstantExpr::getSExtOrBitCast]. *) +val const_sext_or_bitcast : llvalue -> lltype -> llvalue + +(** [const_trunc_or_bitcast c ty] returns a constant trunc or bitwise cast + conversion of constant [c] to type [ty]. + See the method [llvm::ConstantExpr::getTruncOrBitCast]. *) +val const_trunc_or_bitcast : llvalue -> lltype -> llvalue + +(** [const_pointercast c ty] returns a constant bitcast or a pointer-to-int + cast conversion of constant [c] to type [ty] of equal size. + See the method [llvm::ConstantExpr::getPointerCast]. *) +val const_pointercast : llvalue -> lltype -> llvalue + +(** [const_intcast c ty ~is_signed] returns a constant sext/zext, bitcast, + or trunc for integer -> integer casts of constant [c] to type [ty]. + When converting a narrower value to a wider one, whether sext or zext + will be used is controlled by [is_signed]. + See the method [llvm::ConstantExpr::getIntegerCast]. *) +val const_intcast : llvalue -> lltype -> is_signed:bool -> llvalue + +(** [const_fpcast c ty] returns a constant fpext, bitcast, or fptrunc for fp -> + fp casts of constant [c] to type [ty]. + See the method [llvm::ConstantExpr::getFPCast]. *) +val const_fpcast : llvalue -> lltype -> llvalue + +(** [const_select cond t f] returns the constant conditional which returns value + [t] if the boolean constant [cond] is true and the value [f] otherwise. + See the method [llvm::ConstantExpr::getSelect]. *) +val const_select : llvalue -> llvalue -> llvalue -> llvalue + +(** [const_extractelement vec i] returns the constant [i]th element of + constant vector [vec]. [i] must be a constant [i32] value unsigned less than + the size of the vector. + See the method [llvm::ConstantExpr::getExtractElement]. *) +val const_extractelement : llvalue -> llvalue -> llvalue + +(** [const_insertelement vec v i] returns the constant vector with the same + elements as constant vector [v] but the [i]th element replaced by the + constant [v]. [v] must be a constant value with the type of the vector + elements. [i] must be a constant [i32] value unsigned less than the size + of the vector. + See the method [llvm::ConstantExpr::getInsertElement]. *) +val const_insertelement : llvalue -> llvalue -> llvalue -> llvalue + +(** [const_shufflevector a b mask] returns a constant [shufflevector]. + See the LLVM Language Reference for details on the [shufflevector] + instruction. + See the method [llvm::ConstantExpr::getShuffleVector]. *) +val const_shufflevector : llvalue -> llvalue -> llvalue -> llvalue + +(** [const_extractvalue agg idxs] returns the constant [idxs]th value of + constant aggregate [agg]. Each [idxs] must be less than the size of the + aggregate. See the method [llvm::ConstantExpr::getExtractValue]. *) +val const_extractvalue : llvalue -> int array -> llvalue + +(** [const_insertvalue agg val idxs] inserts the value [val] in the specified + indexs [idxs] in the aggegate [agg]. Each [idxs] must be less than the size + of the aggregate. See the method [llvm::ConstantExpr::getInsertValue]. *) +val const_insertvalue : llvalue -> llvalue -> int array -> llvalue + +(** [const_inline_asm ty asm con side align] inserts a inline assembly string. + See the method [llvm::InlineAsm::get]. *) +val const_inline_asm : lltype -> string -> string -> bool -> bool -> llvalue + +(** [block_address f bb] returns the address of the basic block [bb] in the + function [f]. See the method [llvm::BasicBlock::get]. *) +val block_address : llvalue -> llbasicblock -> llvalue + + +(** {7 Operations on global variables, functions, and aliases (globals)} *) + +(** [global_parent g] is the enclosing module of the global value [g]. + See the method [llvm::GlobalValue::getParent]. *) +val global_parent : llvalue -> llmodule + +(** [is_declaration g] returns [true] if the global value [g] is a declaration + only. Returns [false] otherwise. + See the method [llvm::GlobalValue::isDeclaration]. *) +val is_declaration : llvalue -> bool + +(** [linkage g] returns the linkage of the global value [g]. + See the method [llvm::GlobalValue::getLinkage]. *) +val linkage : llvalue -> Linkage.t + +(** [set_linkage l g] sets the linkage of the global value [g] to [l]. + See the method [llvm::GlobalValue::setLinkage]. *) +val set_linkage : Linkage.t -> llvalue -> unit + +(** [section g] returns the linker section of the global value [g]. + See the method [llvm::GlobalValue::getSection]. *) +val section : llvalue -> string + +(** [set_section s g] sets the linker section of the global value [g] to [s]. + See the method [llvm::GlobalValue::setSection]. *) +val set_section : string -> llvalue -> unit + +(** [visibility g] returns the linker visibility of the global value [g]. + See the method [llvm::GlobalValue::getVisibility]. *) +val visibility : llvalue -> Visibility.t + +(** [set_visibility v g] sets the linker visibility of the global value [g] to + [v]. See the method [llvm::GlobalValue::setVisibility]. *) +val set_visibility : Visibility.t -> llvalue -> unit + +(** [alignment g] returns the required alignment of the global value [g]. + See the method [llvm::GlobalValue::getAlignment]. *) +val alignment : llvalue -> int + +(** [set_alignment n g] sets the required alignment of the global value [g] to + [n] bytes. See the method [llvm::GlobalValue::setAlignment]. *) +val set_alignment : int -> llvalue -> unit + + +(** {7 Operations on global variables} *) + +(** [declare_global ty name m] returns a new global variable of type [ty] and + with name [name] in module [m] in the default address space (0). If such a + global variable already exists, it is returned. If the type of the existing + global differs, then a bitcast to [ty] is returned. *) +val declare_global : lltype -> string -> llmodule -> llvalue + +(** [declare_qualified_global ty name addrspace m] returns a new global variable + of type [ty] and with name [name] in module [m] in the address space + [addrspace]. If such a global variable already exists, it is returned. If + the type of the existing global differs, then a bitcast to [ty] is + returned. *) +val declare_qualified_global : lltype -> string -> int -> llmodule -> llvalue + +(** [define_global name init m] returns a new global with name [name] and + initializer [init] in module [m] in the default address space (0). If the + named global already exists, it is renamed. + See the constructor of [llvm::GlobalVariable]. *) +val define_global : string -> llvalue -> llmodule -> llvalue + +(** [define_qualified_global name init addrspace m] returns a new global with + name [name] and initializer [init] in module [m] in the address space + [addrspace]. If the named global already exists, it is renamed. + See the constructor of [llvm::GlobalVariable]. *) +val define_qualified_global : string -> llvalue -> int -> llmodule -> llvalue + +(** [lookup_global name m] returns [Some g] if a global variable with name + [name] exists in module [m]. If no such global exists, returns [None]. + See the [llvm::GlobalVariable] constructor. *) +val lookup_global : string -> llmodule -> llvalue option + +(** [delete_global gv] destroys the global variable [gv]. + See the method [llvm::GlobalVariable::eraseFromParent]. *) +val delete_global : llvalue -> unit + +(** [global_begin m] returns the first position in the global variable list of + the module [m]. [global_begin] and [global_succ] can be used to iterate + over the global list in order. + See the method [llvm::Module::global_begin]. *) +val global_begin : llmodule -> (llmodule, llvalue) llpos + +(** [global_succ gv] returns the global variable list position succeeding + [Before gv]. + See the method [llvm::Module::global_iterator::operator++]. *) +val global_succ : llvalue -> (llmodule, llvalue) llpos + +(** [iter_globals f m] applies function [f] to each of the global variables of + module [m] in order. Tail recursive. *) +val iter_globals : (llvalue -> unit) -> llmodule -> unit + +(** [fold_left_globals f init m] is [f (... (f init g1) ...) gN] where + [g1,...,gN] are the global variables of module [m]. Tail recursive. *) +val fold_left_globals : ('a -> llvalue -> 'a) -> 'a -> llmodule -> 'a + +(** [global_end m] returns the last position in the global variable list of the + module [m]. [global_end] and [global_pred] can be used to iterate over the + global list in reverse. + See the method [llvm::Module::global_end]. *) +val global_end : llmodule -> (llmodule, llvalue) llrev_pos + +(** [global_pred gv] returns the global variable list position preceding + [After gv]. + See the method [llvm::Module::global_iterator::operator--]. *) +val global_pred : llvalue -> (llmodule, llvalue) llrev_pos + +(** [rev_iter_globals f m] applies function [f] to each of the global variables + of module [m] in reverse order. Tail recursive. *) +val rev_iter_globals : (llvalue -> unit) -> llmodule -> unit + +(** [fold_right_globals f m init] is [f g1 (... (f gN init) ...)] where + [g1,...,gN] are the global variables of module [m]. Tail recursive. *) +val fold_right_globals : (llvalue -> 'a -> 'a) -> llmodule -> 'a -> 'a + +(** [is_global_constant gv] returns [true] if the global variabile [gv] is a + constant. Returns [false] otherwise. + See the method [llvm::GlobalVariable::isConstant]. *) +val is_global_constant : llvalue -> bool + +(** [set_global_constant c gv] sets the global variable [gv] to be a constant if + [c] is [true] and not if [c] is [false]. + See the method [llvm::GlobalVariable::setConstant]. *) +val set_global_constant : bool -> llvalue -> unit + +(** [global_initializer gv] returns the initializer for the global variable + [gv]. See the method [llvm::GlobalVariable::getInitializer]. *) +val global_initializer : llvalue -> llvalue + +(** [set_initializer c gv] sets the initializer for the global variable + [gv] to the constant [c]. + See the method [llvm::GlobalVariable::setInitializer]. *) +val set_initializer : llvalue -> llvalue -> unit + +(** [remove_initializer gv] unsets the initializer for the global variable + [gv]. + See the method [llvm::GlobalVariable::setInitializer]. *) +val remove_initializer : llvalue -> unit + +(** [is_thread_local gv] returns [true] if the global variable [gv] is + thread-local and [false] otherwise. + See the method [llvm::GlobalVariable::isThreadLocal]. *) +val is_thread_local : llvalue -> bool + +(** [set_thread_local c gv] sets the global variable [gv] to be thread local if + [c] is [true] and not otherwise. + See the method [llvm::GlobalVariable::setThreadLocal]. *) +val set_thread_local : bool -> llvalue -> unit + +(** [is_thread_local gv] returns the thread local mode of the global + variable [gv]. + See the method [llvm::GlobalVariable::getThreadLocalMode]. *) +val thread_local_mode : llvalue -> ThreadLocalMode.t + +(** [set_thread_local c gv] sets the thread local mode of the global + variable [gv]. + See the method [llvm::GlobalVariable::setThreadLocalMode]. *) +val set_thread_local_mode : ThreadLocalMode.t -> llvalue -> unit + +(** [is_externally_initialized gv] returns [true] if the global + variable [gv] is externally initialized and [false] otherwise. + See the method [llvm::GlobalVariable::isExternallyInitialized]. *) +val is_externally_initialized : llvalue -> bool + +(** [set_externally_initialized c gv] sets the global variable [gv] to be + externally initialized if [c] is [true] and not otherwise. + See the method [llvm::GlobalVariable::setExternallyInitialized]. *) +val set_externally_initialized : bool -> llvalue -> unit + + +(** {7 Operations on aliases} *) + +(** [add_alias m t a n] inserts an alias in the module [m] with the type [t] and + the aliasee [a] with the name [n]. + See the constructor for [llvm::GlobalAlias]. *) +val add_alias : llmodule -> lltype -> llvalue -> string -> llvalue + + +(** {7 Operations on functions} *) + +(** [declare_function name ty m] returns a new function of type [ty] and + with name [name] in module [m]. If such a function already exists, + it is returned. If the type of the existing function differs, then a bitcast + to [ty] is returned. *) +val declare_function : string -> lltype -> llmodule -> llvalue + +(** [define_function name ty m] creates a new function with name [name] and + type [ty] in module [m]. If the named function already exists, it is + renamed. An entry basic block is created in the function. + See the constructor of [llvm::GlobalVariable]. *) +val define_function : string -> lltype -> llmodule -> llvalue + +(** [lookup_function name m] returns [Some f] if a function with name + [name] exists in module [m]. If no such function exists, returns [None]. + See the method [llvm::Module] constructor. *) +val lookup_function : string -> llmodule -> llvalue option + +(** [delete_function f] destroys the function [f]. + See the method [llvm::Function::eraseFromParent]. *) +val delete_function : llvalue -> unit + +(** [function_begin m] returns the first position in the function list of the + module [m]. [function_begin] and [function_succ] can be used to iterate over + the function list in order. + See the method [llvm::Module::begin]. *) +val function_begin : llmodule -> (llmodule, llvalue) llpos + +(** [function_succ gv] returns the function list position succeeding + [Before gv]. + See the method [llvm::Module::iterator::operator++]. *) +val function_succ : llvalue -> (llmodule, llvalue) llpos + +(** [iter_functions f m] applies function [f] to each of the functions of module + [m] in order. Tail recursive. *) +val iter_functions : (llvalue -> unit) -> llmodule -> unit + +(** [fold_left_function f init m] is [f (... (f init f1) ...) fN] where + [f1,...,fN] are the functions of module [m]. Tail recursive. *) +val fold_left_functions : ('a -> llvalue -> 'a) -> 'a -> llmodule -> 'a + +(** [function_end m] returns the last position in the function list of + the module [m]. [function_end] and [function_pred] can be used to iterate + over the function list in reverse. + See the method [llvm::Module::end]. *) +val function_end : llmodule -> (llmodule, llvalue) llrev_pos + +(** [function_pred gv] returns the function list position preceding [After gv]. + See the method [llvm::Module::iterator::operator--]. *) +val function_pred : llvalue -> (llmodule, llvalue) llrev_pos + +(** [rev_iter_functions f fn] applies function [f] to each of the functions of + module [m] in reverse order. Tail recursive. *) +val rev_iter_functions : (llvalue -> unit) -> llmodule -> unit + +(** [fold_right_functions f m init] is [f (... (f init fN) ...) f1] where + [f1,...,fN] are the functions of module [m]. Tail recursive. *) +val fold_right_functions : (llvalue -> 'a -> 'a) -> llmodule -> 'a -> 'a + +(** [is_intrinsic f] returns true if the function [f] is an intrinsic. + See the method [llvm::Function::isIntrinsic]. *) +val is_intrinsic : llvalue -> bool + +(** [function_call_conv f] returns the calling convention of the function [f]. + See the method [llvm::Function::getCallingConv]. *) +val function_call_conv : llvalue -> int + +(** [set_function_call_conv cc f] sets the calling convention of the function + [f] to the calling convention numbered [cc]. + See the method [llvm::Function::setCallingConv]. *) +val set_function_call_conv : int -> llvalue -> unit + +(** [gc f] returns [Some name] if the function [f] has a garbage + collection algorithm specified and [None] otherwise. + See the method [llvm::Function::getGC]. *) +val gc : llvalue -> string option + +(** [set_gc gc f] sets the collection algorithm for the function [f] to + [gc]. See the method [llvm::Function::setGC]. *) +val set_gc : string option -> llvalue -> unit + +(** [add_function_attr f a] adds attribute [a] to the return type of function + [f]. *) +val add_function_attr : llvalue -> Attribute.t -> unit + +(** [add_target_dependent_function_attr f a] adds target-dependent attribute + [a] to function [f]. *) +val add_target_dependent_function_attr : llvalue -> string -> string -> unit + +(** [function_attr f] returns the function attribute for the function [f]. + See the method [llvm::Function::getAttributes] *) +val function_attr : llvalue -> Attribute.t list + +(** [remove_function_attr f a] removes attribute [a] from the return type of + function [f]. *) +val remove_function_attr : llvalue -> Attribute.t -> unit + + +(** {7 Operations on params} *) + +(** [params f] returns the parameters of function [f]. + See the method [llvm::Function::getArgumentList]. *) +val params : llvalue -> llvalue array + +(** [param f n] returns the [n]th parameter of function [f]. + See the method [llvm::Function::getArgumentList]. *) +val param : llvalue -> int -> llvalue + +(** [param_attr p] returns the attributes of parameter [p]. + See the methods [llvm::Function::getAttributes] and + [llvm::Attributes::getParamAttributes] *) +val param_attr : llvalue -> Attribute.t list + +(** [param_parent p] returns the parent function that owns the parameter. + See the method [llvm::Argument::getParent]. *) +val param_parent : llvalue -> llvalue + +(** [param_begin f] returns the first position in the parameter list of the + function [f]. [param_begin] and [param_succ] can be used to iterate over + the parameter list in order. + See the method [llvm::Function::arg_begin]. *) +val param_begin : llvalue -> (llvalue, llvalue) llpos + +(** [param_succ bb] returns the parameter list position succeeding + [Before bb]. + See the method [llvm::Function::arg_iterator::operator++]. *) +val param_succ : llvalue -> (llvalue, llvalue) llpos + +(** [iter_params f fn] applies function [f] to each of the parameters + of function [fn] in order. Tail recursive. *) +val iter_params : (llvalue -> unit) -> llvalue -> unit + +(** [fold_left_params f init fn] is [f (... (f init b1) ...) bN] where + [b1,...,bN] are the parameters of function [fn]. Tail recursive. *) +val fold_left_params : ('a -> llvalue -> 'a) -> 'a -> llvalue -> 'a + +(** [param_end f] returns the last position in the parameter list of + the function [f]. [param_end] and [param_pred] can be used to iterate + over the parameter list in reverse. + See the method [llvm::Function::arg_end]. *) +val param_end : llvalue -> (llvalue, llvalue) llrev_pos + +(** [param_pred gv] returns the function list position preceding [After gv]. + See the method [llvm::Function::arg_iterator::operator--]. *) +val param_pred : llvalue -> (llvalue, llvalue) llrev_pos + +(** [rev_iter_params f fn] applies function [f] to each of the parameters + of function [fn] in reverse order. Tail recursive. *) +val rev_iter_params : (llvalue -> unit) -> llvalue -> unit + +(** [fold_right_params f fn init] is [f (... (f init bN) ...) b1] where + [b1,...,bN] are the parameters of function [fn]. Tail recursive. *) +val fold_right_params : (llvalue -> 'a -> 'a) -> llvalue -> 'a -> 'a + +(** [add_param p a] adds attribute [a] to parameter [p]. *) +val add_param_attr : llvalue -> Attribute.t -> unit + +(** [remove_param_attr p a] removes attribute [a] from parameter [p]. *) +val remove_param_attr : llvalue -> Attribute.t -> unit + +(** [set_param_alignment p a] set the alignment of parameter [p] to [a]. *) +val set_param_alignment : llvalue -> int -> unit + + +(** {7 Operations on basic blocks} *) + +(** [basic_blocks fn] returns the basic blocks of the function [f]. + See the method [llvm::Function::getBasicBlockList]. *) +val basic_blocks : llvalue -> llbasicblock array + +(** [entry_block fn] returns the entry basic block of the function [f]. + See the method [llvm::Function::getEntryBlock]. *) +val entry_block : llvalue -> llbasicblock + +(** [delete_block bb] deletes the basic block [bb]. + See the method [llvm::BasicBlock::eraseFromParent]. *) +val delete_block : llbasicblock -> unit + +(** [remove_block bb] removes the basic block [bb] from its parent function. + See the method [llvm::BasicBlock::removeFromParent]. *) +val remove_block : llbasicblock -> unit + +(** [move_block_before pos bb] moves the basic block [bb] before [pos]. + See the method [llvm::BasicBlock::moveBefore]. *) +val move_block_before : llbasicblock -> llbasicblock -> unit + +(** [move_block_after pos bb] moves the basic block [bb] after [pos]. + See the method [llvm::BasicBlock::moveAfter]. *) +val move_block_after : llbasicblock -> llbasicblock -> unit + +(** [append_block c name f] creates a new basic block named [name] at the end of + function [f] in the context [c]. + See the constructor of [llvm::BasicBlock]. *) +val append_block : llcontext -> string -> llvalue -> llbasicblock + +(** [insert_block c name bb] creates a new basic block named [name] before the + basic block [bb] in the context [c]. + See the constructor of [llvm::BasicBlock]. *) +val insert_block : llcontext -> string -> llbasicblock -> llbasicblock + +(** [block_parent bb] returns the parent function that owns the basic block. + See the method [llvm::BasicBlock::getParent]. *) +val block_parent : llbasicblock -> llvalue + +(** [block_begin f] returns the first position in the basic block list of the + function [f]. [block_begin] and [block_succ] can be used to iterate over + the basic block list in order. + See the method [llvm::Function::begin]. *) +val block_begin : llvalue -> (llvalue, llbasicblock) llpos + +(** [block_succ bb] returns the basic block list position succeeding + [Before bb]. + See the method [llvm::Function::iterator::operator++]. *) +val block_succ : llbasicblock -> (llvalue, llbasicblock) llpos + +(** [iter_blocks f fn] applies function [f] to each of the basic blocks + of function [fn] in order. Tail recursive. *) +val iter_blocks : (llbasicblock -> unit) -> llvalue -> unit + +(** [fold_left_blocks f init fn] is [f (... (f init b1) ...) bN] where + [b1,...,bN] are the basic blocks of function [fn]. Tail recursive. *) +val fold_left_blocks : ('a -> llbasicblock -> 'a) -> 'a -> llvalue -> 'a + +(** [block_end f] returns the last position in the basic block list of + the function [f]. [block_end] and [block_pred] can be used to iterate + over the basic block list in reverse. + See the method [llvm::Function::end]. *) +val block_end : llvalue -> (llvalue, llbasicblock) llrev_pos + +(** [block_pred bb] returns the basic block list position preceding [After bb]. + See the method [llvm::Function::iterator::operator--]. *) +val block_pred : llbasicblock -> (llvalue, llbasicblock) llrev_pos + +(** [block_terminator bb] returns the terminator of the basic block [bb]. *) +val block_terminator : llbasicblock -> llvalue option + +(** [rev_iter_blocks f fn] applies function [f] to each of the basic blocks + of function [fn] in reverse order. Tail recursive. *) +val rev_iter_blocks : (llbasicblock -> unit) -> llvalue -> unit + +(** [fold_right_blocks f fn init] is [f (... (f init bN) ...) b1] where + [b1,...,bN] are the basic blocks of function [fn]. Tail recursive. *) +val fold_right_blocks : (llbasicblock -> 'a -> 'a) -> llvalue -> 'a -> 'a + +(** [value_of_block bb] losslessly casts [bb] to an [llvalue]. *) +val value_of_block : llbasicblock -> llvalue + +(** [value_is_block v] returns [true] if the value [v] is a basic block and + [false] otherwise. + Similar to [llvm::isa]. *) +val value_is_block : llvalue -> bool + +(** [block_of_value v] losslessly casts [v] to an [llbasicblock]. *) +val block_of_value : llvalue -> llbasicblock + + +(** {7 Operations on instructions} *) + +(** [instr_parent i] is the enclosing basic block of the instruction [i]. + See the method [llvm::Instruction::getParent]. *) +val instr_parent : llvalue -> llbasicblock + +(** [delete_instruction i] deletes the instruction [i]. + * See the method [llvm::Instruction::eraseFromParent]. *) +val delete_instruction : llvalue -> unit + +(** [instr_begin bb] returns the first position in the instruction list of the + basic block [bb]. [instr_begin] and [instr_succ] can be used to iterate over + the instruction list in order. + See the method [llvm::BasicBlock::begin]. *) +val instr_begin : llbasicblock -> (llbasicblock, llvalue) llpos + +(** [instr_succ i] returns the instruction list position succeeding [Before i]. + See the method [llvm::BasicBlock::iterator::operator++]. *) +val instr_succ : llvalue -> (llbasicblock, llvalue) llpos + +(** [iter_instrs f bb] applies function [f] to each of the instructions of basic + block [bb] in order. Tail recursive. *) +val iter_instrs: (llvalue -> unit) -> llbasicblock -> unit + +(** [fold_left_instrs f init bb] is [f (... (f init g1) ...) gN] where + [g1,...,gN] are the instructions of basic block [bb]. Tail recursive. *) +val fold_left_instrs: ('a -> llvalue -> 'a) -> 'a -> llbasicblock -> 'a + +(** [instr_end bb] returns the last position in the instruction list of the + basic block [bb]. [instr_end] and [instr_pred] can be used to iterate over + the instruction list in reverse. + See the method [llvm::BasicBlock::end]. *) +val instr_end : llbasicblock -> (llbasicblock, llvalue) llrev_pos + +(** [instr_pred i] returns the instruction list position preceding [After i]. + See the method [llvm::BasicBlock::iterator::operator--]. *) +val instr_pred : llvalue -> (llbasicblock, llvalue) llrev_pos + +(** [fold_right_instrs f bb init] is [f (... (f init fN) ...) f1] where + [f1,...,fN] are the instructions of basic block [bb]. Tail recursive. *) +val fold_right_instrs: (llvalue -> 'a -> 'a) -> llbasicblock -> 'a -> 'a + +(** [inst_opcode i] returns the [Opcode.t] corresponding to instruction [i], + or [Opcode.Invalid] if [i] is not an instruction. *) +val instr_opcode : llvalue -> Opcode.t + +(** [icmp_predicate i] returns the [Icmp.t] corresponding to an [icmp] + instruction [i]. *) +val icmp_predicate : llvalue -> Icmp.t option + + +(** {7 Operations on call sites} *) + +(** [instruction_call_conv ci] is the calling convention for the call or invoke + instruction [ci], which may be one of the values from the module + {!CallConv}. See the method [llvm::CallInst::getCallingConv] and + [llvm::InvokeInst::getCallingConv]. *) +val instruction_call_conv: llvalue -> int + +(** [set_instruction_call_conv cc ci] sets the calling convention for the call + or invoke instruction [ci] to the integer [cc], which can be one of the + values from the module {!CallConv}. + See the method [llvm::CallInst::setCallingConv] + and [llvm::InvokeInst::setCallingConv]. *) +val set_instruction_call_conv: int -> llvalue -> unit + +(** [add_instruction_param_attr ci i a] adds attribute [a] to the [i]th + parameter of the call or invoke instruction [ci]. [i]=0 denotes the return + value. *) +val add_instruction_param_attr : llvalue -> int -> Attribute.t -> unit + +(** [remove_instruction_param_attr ci i a] removes attribute [a] from the + [i]th parameter of the call or invoke instruction [ci]. [i]=0 denotes the + return value. *) +val remove_instruction_param_attr : llvalue -> int -> Attribute.t -> unit + + +(** {7 Operations on call instructions (only)} *) + +(** [is_tail_call ci] is [true] if the call instruction [ci] is flagged as + eligible for tail call optimization, [false] otherwise. + See the method [llvm::CallInst::isTailCall]. *) +val is_tail_call : llvalue -> bool + +(** [set_tail_call tc ci] flags the call instruction [ci] as eligible for tail + call optimization if [tc] is [true], clears otherwise. + See the method [llvm::CallInst::setTailCall]. *) +val set_tail_call : bool -> llvalue -> unit + + +(** {7 Operations on load/store instructions (only)} *) + +(** [is_volatile i] is [true] if the load or store instruction [i] is marked + as volatile. + See the methods [llvm::LoadInst::isVolatile] and + [llvm::StoreInst::isVolatile]. *) +val is_volatile : llvalue -> bool + +(** [set_volatile v i] marks the load or store instruction [i] as volatile + if [v] is [true], unmarks otherwise. + See the methods [llvm::LoadInst::setVolatile] and + [llvm::StoreInst::setVolatile]. *) +val set_volatile : bool -> llvalue -> unit + + +(** {7 Operations on phi nodes} *) + +(** [add_incoming (v, bb) pn] adds the value [v] to the phi node [pn] for use + with branches from [bb]. See the method [llvm::PHINode::addIncoming]. *) +val add_incoming : (llvalue * llbasicblock) -> llvalue -> unit + +(** [incoming pn] returns the list of value-block pairs for phi node [pn]. + See the method [llvm::PHINode::getIncomingValue]. *) +val incoming : llvalue -> (llvalue * llbasicblock) list + + + +(** {6 Instruction builders} *) + +(** [builder context] creates an instruction builder with no position in + the context [context]. It is invalid to use this builder until its position + is set with {!position_before} or {!position_at_end}. See the constructor + for [llvm::LLVMBuilder]. *) +val builder : llcontext -> llbuilder + +(** [builder_at ip] creates an instruction builder positioned at [ip]. + See the constructor for [llvm::LLVMBuilder]. *) +val builder_at : llcontext -> (llbasicblock, llvalue) llpos -> llbuilder + +(** [builder_before ins] creates an instruction builder positioned before the + instruction [isn]. See the constructor for [llvm::LLVMBuilder]. *) +val builder_before : llcontext -> llvalue -> llbuilder + +(** [builder_at_end bb] creates an instruction builder positioned at the end of + the basic block [bb]. See the constructor for [llvm::LLVMBuilder]. *) +val builder_at_end : llcontext -> llbasicblock -> llbuilder + +(** [position_builder ip bb] moves the instruction builder [bb] to the position + [ip]. + See the constructor for [llvm::LLVMBuilder]. *) +val position_builder : (llbasicblock, llvalue) llpos -> llbuilder -> unit + +(** [position_before ins b] moves the instruction builder [b] to before the + instruction [isn]. See the method [llvm::LLVMBuilder::SetInsertPoint]. *) +val position_before : llvalue -> llbuilder -> unit + +(** [position_at_end bb b] moves the instruction builder [b] to the end of the + basic block [bb]. See the method [llvm::LLVMBuilder::SetInsertPoint]. *) +val position_at_end : llbasicblock -> llbuilder -> unit + +(** [insertion_block b] returns the basic block that the builder [b] is + positioned to insert into. Raises [Not_Found] if the instruction builder is + uninitialized. + See the method [llvm::LLVMBuilder::GetInsertBlock]. *) +val insertion_block : llbuilder -> llbasicblock + +(** [insert_into_builder i name b] inserts the specified instruction [i] at the + position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::Insert]. *) +val insert_into_builder : llvalue -> string -> llbuilder -> unit + + +(** {7 Metadata} *) + +(** [set_current_debug_location b md] sets the current debug location [md] in + the builder [b]. + See the method [llvm::IRBuilder::SetDebugLocation]. *) +val set_current_debug_location : llbuilder -> llvalue -> unit + +(** [clear_current_debug_location b] clears the current debug location in the + builder [b]. *) +val clear_current_debug_location : llbuilder -> unit + +(** [current_debug_location b] returns the current debug location, or None + if none is currently set. + See the method [llvm::IRBuilder::GetDebugLocation]. *) +val current_debug_location : llbuilder -> llvalue option + +(** [set_inst_debug_location b i] sets the current debug location of the builder + [b] to the instruction [i]. + See the method [llvm::IRBuilder::SetInstDebugLocation]. *) +val set_inst_debug_location : llbuilder -> llvalue -> unit + + +(** {7 Terminators} *) + +(** [build_ret_void b] creates a + [ret void] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateRetVoid]. *) +val build_ret_void : llbuilder -> llvalue + +(** [build_ret v b] creates a + [ret %v] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateRet]. *) +val build_ret : llvalue -> llbuilder -> llvalue + +(** [build_aggregate_ret vs b] creates a + [ret {...} { %v1, %v2, ... } ] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateAggregateRet]. *) +val build_aggregate_ret : llvalue array -> llbuilder -> llvalue + +(** [build_br bb b] creates a + [br %bb] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateBr]. *) +val build_br : llbasicblock -> llbuilder -> llvalue + +(** [build_cond_br cond tbb fbb b] creates a + [br %cond, %tbb, %fbb] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateCondBr]. *) +val build_cond_br : llvalue -> llbasicblock -> llbasicblock -> llbuilder -> + llvalue + +(** [build_switch case elsebb count b] creates an empty + [switch %case, %elsebb] + instruction at the position specified by the instruction builder [b] with + space reserved for [count] cases. + See the method [llvm::LLVMBuilder::CreateSwitch]. *) +val build_switch : llvalue -> llbasicblock -> int -> llbuilder -> llvalue + +(** [build_malloc ty name b] creates an [malloc] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::CallInst::CreateMalloc]. *) +val build_malloc : lltype -> string -> llbuilder -> llvalue + +(** [build_array_malloc ty val name b] creates an [array malloc] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::CallInst::CreateArrayMalloc]. *) +val build_array_malloc : lltype -> llvalue -> string -> llbuilder -> llvalue + +(** [build_free p b] creates a [free] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateFree]. *) +val build_free : llvalue -> llbuilder -> llvalue + +(** [add_case sw onval bb] causes switch instruction [sw] to branch to [bb] + when its input matches the constant [onval]. + See the method [llvm::SwitchInst::addCase]. **) +val add_case : llvalue -> llvalue -> llbasicblock -> unit + +(** [switch_default_dest sw] returns the default destination of the [switch] + instruction. + See the method [llvm:;SwitchInst::getDefaultDest]. **) +val switch_default_dest : llvalue -> llbasicblock + +(** [build_indirect_br addr count b] creates a + [indirectbr %addr] + instruction at the position specified by the instruction builder [b] with + space reserved for [count] destinations. + See the method [llvm::LLVMBuilder::CreateIndirectBr]. *) +val build_indirect_br : llvalue -> int -> llbuilder -> llvalue + +(** [add_destination br bb] adds the basic block [bb] as a possible branch + location for the indirectbr instruction [br]. + See the method [llvm::IndirectBrInst::addDestination]. **) +val add_destination : llvalue -> llbasicblock -> unit + +(** [build_invoke fn args tobb unwindbb name b] creates an + [%name = invoke %fn(args) to %tobb unwind %unwindbb] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateInvoke]. *) +val build_invoke : llvalue -> llvalue array -> llbasicblock -> + llbasicblock -> string -> llbuilder -> llvalue + +(** [build_landingpad ty persfn numclauses name b] creates an + [landingpad] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateLandingPad]. *) +val build_landingpad : lltype -> llvalue -> int -> string -> llbuilder -> + llvalue + +(** [set_cleanup lp] sets the cleanup flag in the [landingpad]instruction. + See the method [llvm::LandingPadInst::setCleanup]. *) +val set_cleanup : llvalue -> bool -> unit + +(** [add_clause lp clause] adds the clause to the [landingpad]instruction. + See the method [llvm::LandingPadInst::addClause]. *) +val add_clause : llvalue -> llvalue -> unit + +(** [build_resume exn b] builds a [resume exn] instruction + at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateResume] *) +val build_resume : llvalue -> llbuilder -> llvalue + +(** [build_unreachable b] creates an + [unreachable] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateUnwind]. *) +val build_unreachable : llbuilder -> llvalue + + +(** {7 Arithmetic} *) + +(** [build_add x y name b] creates a + [%name = add %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateAdd]. *) +val build_add : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_nsw_add x y name b] creates a + [%name = nsw add %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateNSWAdd]. *) +val build_nsw_add : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_nuw_add x y name b] creates a + [%name = nuw add %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateNUWAdd]. *) +val build_nuw_add : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_fadd x y name b] creates a + [%name = fadd %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateFAdd]. *) +val build_fadd : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_sub x y name b] creates a + [%name = sub %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateSub]. *) +val build_sub : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_nsw_sub x y name b] creates a + [%name = nsw sub %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateNSWSub]. *) +val build_nsw_sub : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_nuw_sub x y name b] creates a + [%name = nuw sub %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateNUWSub]. *) +val build_nuw_sub : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_fsub x y name b] creates a + [%name = fsub %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateFSub]. *) +val build_fsub : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_mul x y name b] creates a + [%name = mul %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateMul]. *) +val build_mul : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_nsw_mul x y name b] creates a + [%name = nsw mul %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateNSWMul]. *) +val build_nsw_mul : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_nuw_mul x y name b] creates a + [%name = nuw mul %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateNUWMul]. *) +val build_nuw_mul : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_fmul x y name b] creates a + [%name = fmul %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateFMul]. *) +val build_fmul : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_udiv x y name b] creates a + [%name = udiv %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateUDiv]. *) +val build_udiv : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_sdiv x y name b] creates a + [%name = sdiv %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateSDiv]. *) +val build_sdiv : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_exact_sdiv x y name b] creates a + [%name = exact sdiv %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateExactSDiv]. *) +val build_exact_sdiv : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_fdiv x y name b] creates a + [%name = fdiv %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateFDiv]. *) +val build_fdiv : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_urem x y name b] creates a + [%name = urem %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateURem]. *) +val build_urem : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_SRem x y name b] creates a + [%name = srem %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateSRem]. *) +val build_srem : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_frem x y name b] creates a + [%name = frem %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateFRem]. *) +val build_frem : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_shl x y name b] creates a + [%name = shl %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateShl]. *) +val build_shl : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_lshr x y name b] creates a + [%name = lshr %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateLShr]. *) +val build_lshr : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_ashr x y name b] creates a + [%name = ashr %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateAShr]. *) +val build_ashr : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_and x y name b] creates a + [%name = and %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateAnd]. *) +val build_and : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_or x y name b] creates a + [%name = or %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateOr]. *) +val build_or : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_xor x y name b] creates a + [%name = xor %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateXor]. *) +val build_xor : llvalue -> llvalue -> string -> llbuilder -> llvalue + +(** [build_neg x name b] creates a + [%name = sub 0, %x] + instruction at the position specified by the instruction builder [b]. + [-0.0] is used for floating point types to compute the correct sign. + See the method [llvm::LLVMBuilder::CreateNeg]. *) +val build_neg : llvalue -> string -> llbuilder -> llvalue + +(** [build_nsw_neg x name b] creates a + [%name = nsw sub 0, %x] + instruction at the position specified by the instruction builder [b]. + [-0.0] is used for floating point types to compute the correct sign. + See the method [llvm::LLVMBuilder::CreateNeg]. *) +val build_nsw_neg : llvalue -> string -> llbuilder -> llvalue + +(** [build_nuw_neg x name b] creates a + [%name = nuw sub 0, %x] + instruction at the position specified by the instruction builder [b]. + [-0.0] is used for floating point types to compute the correct sign. + See the method [llvm::LLVMBuilder::CreateNeg]. *) +val build_nuw_neg : llvalue -> string -> llbuilder -> llvalue + +(** [build_fneg x name b] creates a + [%name = fsub 0, %x] + instruction at the position specified by the instruction builder [b]. + [-0.0] is used for floating point types to compute the correct sign. + See the method [llvm::LLVMBuilder::CreateFNeg]. *) +val build_fneg : llvalue -> string -> llbuilder -> llvalue + +(** [build_xor x name b] creates a + [%name = xor %x, -1] + instruction at the position specified by the instruction builder [b]. + [-1] is the correct "all ones" value for the type of [x]. + See the method [llvm::LLVMBuilder::CreateXor]. *) +val build_not : llvalue -> string -> llbuilder -> llvalue + + +(** {7 Memory} *) + +(** [build_alloca ty name b] creates a + [%name = alloca %ty] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateAlloca]. *) +val build_alloca : lltype -> string -> llbuilder -> llvalue + +(** [build_array_alloca ty n name b] creates a + [%name = alloca %ty, %n] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateAlloca]. *) +val build_array_alloca : lltype -> llvalue -> string -> llbuilder -> + llvalue + +(** [build_load v name b] creates a + [%name = load %v] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateLoad]. *) +val build_load : llvalue -> string -> llbuilder -> llvalue + +(** [build_store v p b] creates a + [store %v, %p] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateStore]. *) +val build_store : llvalue -> llvalue -> llbuilder -> llvalue + +(** [build_atomicrmw op ptr val o st b] creates an [atomicrmw] instruction with + operation [op] performed on pointer [ptr] and value [val] with ordering [o] + and singlethread flag set to [st] at the position specified by + the instruction builder [b]. + See the method [llvm::IRBuilder::CreateAtomicRMW]. *) +val build_atomicrmw : AtomicRMWBinOp.t -> llvalue -> llvalue -> + AtomicOrdering.t -> bool -> string -> llbuilder -> llvalue + +(** [build_gep p indices name b] creates a + [%name = getelementptr %p, indices...] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateGetElementPtr]. *) +val build_gep : llvalue -> llvalue array -> string -> llbuilder -> llvalue + +(** [build_in_bounds_gep p indices name b] creates a + [%name = gelementptr inbounds %p, indices...] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateInBoundsGetElementPtr]. *) +val build_in_bounds_gep : llvalue -> llvalue array -> string -> llbuilder -> + llvalue + +(** [build_struct_gep p idx name b] creates a + [%name = getelementptr %p, 0, idx] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateStructGetElementPtr]. *) +val build_struct_gep : llvalue -> int -> string -> llbuilder -> + llvalue + +(** [build_global_string str name b] creates a series of instructions that adds + a global string at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateGlobalString]. *) +val build_global_string : string -> string -> llbuilder -> llvalue + +(** [build_global_stringptr str name b] creates a series of instructions that + adds a global string pointer at the position specified by the instruction + builder [b]. + See the method [llvm::LLVMBuilder::CreateGlobalStringPtr]. *) +val build_global_stringptr : string -> string -> llbuilder -> llvalue + + +(** {7 Casts} *) + +(** [build_trunc v ty name b] creates a + [%name = trunc %p to %ty] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateTrunc]. *) +val build_trunc : llvalue -> lltype -> string -> llbuilder -> llvalue + +(** [build_zext v ty name b] creates a + [%name = zext %p to %ty] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateZExt]. *) +val build_zext : llvalue -> lltype -> string -> llbuilder -> llvalue + +(** [build_sext v ty name b] creates a + [%name = sext %p to %ty] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateSExt]. *) +val build_sext : llvalue -> lltype -> string -> llbuilder -> llvalue + +(** [build_fptoui v ty name b] creates a + [%name = fptoui %p to %ty] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateFPToUI]. *) +val build_fptoui : llvalue -> lltype -> string -> llbuilder -> llvalue + +(** [build_fptosi v ty name b] creates a + [%name = fptosi %p to %ty] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateFPToSI]. *) +val build_fptosi : llvalue -> lltype -> string -> llbuilder -> llvalue + +(** [build_uitofp v ty name b] creates a + [%name = uitofp %p to %ty] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateUIToFP]. *) +val build_uitofp : llvalue -> lltype -> string -> llbuilder -> llvalue + +(** [build_sitofp v ty name b] creates a + [%name = sitofp %p to %ty] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateSIToFP]. *) +val build_sitofp : llvalue -> lltype -> string -> llbuilder -> llvalue + +(** [build_fptrunc v ty name b] creates a + [%name = fptrunc %p to %ty] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateFPTrunc]. *) +val build_fptrunc : llvalue -> lltype -> string -> llbuilder -> llvalue + +(** [build_fpext v ty name b] creates a + [%name = fpext %p to %ty] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateFPExt]. *) +val build_fpext : llvalue -> lltype -> string -> llbuilder -> llvalue + +(** [build_ptrtoint v ty name b] creates a + [%name = prtotint %p to %ty] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreatePtrToInt]. *) +val build_ptrtoint : llvalue -> lltype -> string -> llbuilder -> llvalue + +(** [build_inttoptr v ty name b] creates a + [%name = inttoptr %p to %ty] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateIntToPtr]. *) +val build_inttoptr : llvalue -> lltype -> string -> llbuilder -> llvalue + +(** [build_bitcast v ty name b] creates a + [%name = bitcast %p to %ty] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateBitCast]. *) +val build_bitcast : llvalue -> lltype -> string -> llbuilder -> llvalue + +(** [build_zext_or_bitcast v ty name b] creates a zext or bitcast + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateZExtOrBitCast]. *) +val build_zext_or_bitcast : llvalue -> lltype -> string -> llbuilder -> + llvalue + +(** [build_sext_or_bitcast v ty name b] creates a sext or bitcast + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateSExtOrBitCast]. *) +val build_sext_or_bitcast : llvalue -> lltype -> string -> llbuilder -> + llvalue + +(** [build_trunc_or_bitcast v ty name b] creates a trunc or bitcast + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateZExtOrBitCast]. *) +val build_trunc_or_bitcast : llvalue -> lltype -> string -> llbuilder -> + llvalue + +(** [build_pointercast v ty name b] creates a bitcast or pointer-to-int + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreatePointerCast]. *) +val build_pointercast : llvalue -> lltype -> string -> llbuilder -> llvalue + +(** [build_intcast v ty name b] creates a zext, bitcast, or trunc + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateIntCast]. *) +val build_intcast : llvalue -> lltype -> string -> llbuilder -> llvalue + +(** [build_fpcast v ty name b] creates a fpext, bitcast, or fptrunc + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateFPCast]. *) +val build_fpcast : llvalue -> lltype -> string -> llbuilder -> llvalue + + +(** {7 Comparisons} *) + +(** [build_icmp pred x y name b] creates a + [%name = icmp %pred %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateICmp]. *) +val build_icmp : Icmp.t -> llvalue -> llvalue -> string -> + llbuilder -> llvalue + +(** [build_fcmp pred x y name b] creates a + [%name = fcmp %pred %x, %y] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateFCmp]. *) +val build_fcmp : Fcmp.t -> llvalue -> llvalue -> string -> + llbuilder -> llvalue + + +(** {7 Miscellaneous instructions} *) + +(** [build_phi incoming name b] creates a + [%name = phi %incoming] + instruction at the position specified by the instruction builder [b]. + [incoming] is a list of [(llvalue, llbasicblock)] tuples. + See the method [llvm::LLVMBuilder::CreatePHI]. *) +val build_phi : (llvalue * llbasicblock) list -> string -> llbuilder -> + llvalue + +(** [build_call fn args name b] creates a + [%name = call %fn(args...)] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateCall]. *) +val build_call : llvalue -> llvalue array -> string -> llbuilder -> llvalue + +(** [build_select cond thenv elsev name b] creates a + [%name = select %cond, %thenv, %elsev] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateSelect]. *) +val build_select : llvalue -> llvalue -> llvalue -> string -> llbuilder -> + llvalue + +(** [build_va_arg valist argty name b] creates a + [%name = va_arg %valist, %argty] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateVAArg]. *) +val build_va_arg : llvalue -> lltype -> string -> llbuilder -> llvalue + +(** [build_extractelement vec i name b] creates a + [%name = extractelement %vec, %i] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateExtractElement]. *) +val build_extractelement : llvalue -> llvalue -> string -> llbuilder -> + llvalue + +(** [build_insertelement vec elt i name b] creates a + [%name = insertelement %vec, %elt, %i] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateInsertElement]. *) +val build_insertelement : llvalue -> llvalue -> llvalue -> string -> + llbuilder -> llvalue + +(** [build_shufflevector veca vecb mask name b] creates a + [%name = shufflevector %veca, %vecb, %mask] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateShuffleVector]. *) +val build_shufflevector : llvalue -> llvalue -> llvalue -> string -> + llbuilder -> llvalue + +(** [build_insertvalue agg idx name b] creates a + [%name = extractvalue %agg, %idx] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateExtractValue]. *) +val build_extractvalue : llvalue -> int -> string -> llbuilder -> llvalue + + +(** [build_insertvalue agg val idx name b] creates a + [%name = insertvalue %agg, %val, %idx] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateInsertValue]. *) +val build_insertvalue : llvalue -> llvalue -> int -> string -> llbuilder -> + llvalue + +(** [build_is_null val name b] creates a + [%name = icmp eq %val, null] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateIsNull]. *) +val build_is_null : llvalue -> string -> llbuilder -> llvalue + +(** [build_is_not_null val name b] creates a + [%name = icmp ne %val, null] + instruction at the position specified by the instruction builder [b]. + See the method [llvm::LLVMBuilder::CreateIsNotNull]. *) +val build_is_not_null : llvalue -> string -> llbuilder -> llvalue + +(** [build_ptrdiff lhs rhs name b] creates a series of instructions that measure + the difference between two pointer values at the position specified by the + instruction builder [b]. + See the method [llvm::LLVMBuilder::CreatePtrDiff]. *) +val build_ptrdiff : llvalue -> llvalue -> string -> llbuilder -> llvalue + + +(** {6 Memory buffers} *) + +module MemoryBuffer : sig + (** [of_file p] is the memory buffer containing the contents of the file at + path [p]. If the file could not be read, then [IoError msg] is + raised. *) + val of_file : string -> llmemorybuffer + + (** [of_stdin ()] is the memory buffer containing the contents of standard input. + If standard input is empty, then [IoError msg] is raised. *) + val of_stdin : unit -> llmemorybuffer + + (** [of_string ~name s] is the memory buffer containing the contents of string [s]. + The name of memory buffer is set to [name] if it is provided. *) + val of_string : ?name:string -> string -> llmemorybuffer + + (** [as_string mb] is the string containing the contents of memory buffer [mb]. *) + val as_string : llmemorybuffer -> string + + (** Disposes of a memory buffer. *) + val dispose : llmemorybuffer -> unit +end + + +(** {6 Pass Managers} *) + +module PassManager : sig + (** *) + type 'a t + type any = [ `Module | `Function ] + + (** [PassManager.create ()] constructs a new whole-module pass pipeline. This + type of pipeline is suitable for link-time optimization and whole-module + transformations. + See the constructor of [llvm::PassManager]. *) + val create : unit -> [ `Module ] t + + (** [PassManager.create_function m] constructs a new function-by-function + pass pipeline over the module [m]. It does not take ownership of [m]. + This type of pipeline is suitable for code generation and JIT compilation + tasks. + See the constructor of [llvm::FunctionPassManager]. *) + val create_function : llmodule -> [ `Function ] t + + (** [run_module m pm] initializes, executes on the module [m], and finalizes + all of the passes scheduled in the pass manager [pm]. Returns [true] if + any of the passes modified the module, [false] otherwise. + See the [llvm::PassManager::run] method. *) + val run_module : llmodule -> [ `Module ] t -> bool + + (** [initialize fpm] initializes all of the function passes scheduled in the + function pass manager [fpm]. Returns [true] if any of the passes modified + the module, [false] otherwise. + See the [llvm::FunctionPassManager::doInitialization] method. *) + val initialize : [ `Function ] t -> bool + + (** [run_function f fpm] executes all of the function passes scheduled in the + function pass manager [fpm] over the function [f]. Returns [true] if any + of the passes modified [f], [false] otherwise. + See the [llvm::FunctionPassManager::run] method. *) + val run_function : llvalue -> [ `Function ] t -> bool + + (** [finalize fpm] finalizes all of the function passes scheduled in in the + function pass manager [fpm]. Returns [true] if any of the passes + modified the module, [false] otherwise. + See the [llvm::FunctionPassManager::doFinalization] method. *) + val finalize : [ `Function ] t -> bool + + (** Frees the memory of a pass pipeline. For function pipelines, does not free + the module. + See the destructor of [llvm::BasePassManager]. *) + val dispose : [< any ] t -> unit +end diff --git a/bindings/ocaml/llvm/llvm_ocaml.c b/bindings/ocaml/llvm/llvm_ocaml.c new file mode 100644 index 00000000..d5ebdcd3 --- /dev/null +++ b/bindings/ocaml/llvm/llvm_ocaml.c @@ -0,0 +1,2235 @@ +/*===-- llvm_ocaml.c - LLVM OCaml Glue --------------------------*- C++ -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This file glues LLVM's OCaml interface to its C interface. These functions *| +|* are by and large transparent wrappers to the corresponding C functions. *| +|* *| +|* Note that these functions intentionally take liberties with the CAMLparamX *| +|* macros, since most of the parameters are not GC heap objects. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#include "llvm-c/Core.h" +#include "caml/alloc.h" +#include "caml/custom.h" +#include "caml/memory.h" +#include "caml/fail.h" +#include "caml/callback.h" +#include +#include +#include + + +/* Can't use the recommended caml_named_value mechanism for backwards + compatibility reasons. This is largely equivalent. */ +static value llvm_ioerror_exn; + +CAMLprim value llvm_register_core_exns(value IoError) { + llvm_ioerror_exn = Field(IoError, 0); + register_global_root(&llvm_ioerror_exn); + + return Val_unit; +} + +static void llvm_raise(value Prototype, char *Message) { + CAMLparam1(Prototype); + CAMLlocal1(CamlMessage); + + CamlMessage = copy_string(Message); + LLVMDisposeMessage(Message); + + raise_with_arg(Prototype, CamlMessage); + abort(); /* NOTREACHED */ +#ifdef CAMLnoreturn + CAMLnoreturn; /* Silences warnings, but is missing in some versions. */ +#endif +} + +static value llvm_fatal_error_handler; + +static void llvm_fatal_error_trampoline(const char *Reason) { + callback(llvm_fatal_error_handler, copy_string(Reason)); +} + +CAMLprim value llvm_install_fatal_error_handler(value Handler) { + LLVMInstallFatalErrorHandler(llvm_fatal_error_trampoline); + llvm_fatal_error_handler = Handler; + caml_register_global_root(&llvm_fatal_error_handler); + return Val_unit; +} + +CAMLprim value llvm_reset_fatal_error_handler(value Unit) { + caml_remove_global_root(&llvm_fatal_error_handler); + LLVMResetFatalErrorHandler(); + return Val_unit; +} + +CAMLprim value llvm_enable_pretty_stacktrace(value Unit) { + LLVMEnablePrettyStackTrace(); + return Val_unit; +} + +static value alloc_variant(int tag, void *Value) { + value Iter = alloc_small(1, tag); + Field(Iter, 0) = Val_op(Value); + return Iter; +} + +/* Macro to convert the C first/next/last/prev idiom to the Ocaml llpos/ + llrev_pos idiom. */ +#define DEFINE_ITERATORS(camlname, cname, pty, cty, pfun) \ + /* llmodule -> ('a, 'b) llpos */ \ + CAMLprim value llvm_##camlname##_begin(pty Mom) { \ + cty First = LLVMGetFirst##cname(Mom); \ + if (First) \ + return alloc_variant(1, First); \ + return alloc_variant(0, Mom); \ + } \ + \ + /* llvalue -> ('a, 'b) llpos */ \ + CAMLprim value llvm_##camlname##_succ(cty Kid) { \ + cty Next = LLVMGetNext##cname(Kid); \ + if (Next) \ + return alloc_variant(1, Next); \ + return alloc_variant(0, pfun(Kid)); \ + } \ + \ + /* llmodule -> ('a, 'b) llrev_pos */ \ + CAMLprim value llvm_##camlname##_end(pty Mom) { \ + cty Last = LLVMGetLast##cname(Mom); \ + if (Last) \ + return alloc_variant(1, Last); \ + return alloc_variant(0, Mom); \ + } \ + \ + /* llvalue -> ('a, 'b) llrev_pos */ \ + CAMLprim value llvm_##camlname##_pred(cty Kid) { \ + cty Prev = LLVMGetPrevious##cname(Kid); \ + if (Prev) \ + return alloc_variant(1, Prev); \ + return alloc_variant(0, pfun(Kid)); \ + } + + +/*===-- Contexts ----------------------------------------------------------===*/ + +/* unit -> llcontext */ +CAMLprim LLVMContextRef llvm_create_context(value Unit) { + return LLVMContextCreate(); +} + +/* llcontext -> unit */ +CAMLprim value llvm_dispose_context(LLVMContextRef C) { + LLVMContextDispose(C); + return Val_unit; +} + +/* unit -> llcontext */ +CAMLprim LLVMContextRef llvm_global_context(value Unit) { + return LLVMGetGlobalContext(); +} + +/* llcontext -> string -> int */ +CAMLprim value llvm_mdkind_id(LLVMContextRef C, value Name) { + unsigned MDKindID = LLVMGetMDKindIDInContext(C, String_val(Name), + caml_string_length(Name)); + return Val_int(MDKindID); +} + +/*===-- Modules -----------------------------------------------------------===*/ + +/* llcontext -> string -> llmodule */ +CAMLprim LLVMModuleRef llvm_create_module(LLVMContextRef C, value ModuleID) { + return LLVMModuleCreateWithNameInContext(String_val(ModuleID), C); +} + +/* llmodule -> unit */ +CAMLprim value llvm_dispose_module(LLVMModuleRef M) { + LLVMDisposeModule(M); + return Val_unit; +} + +/* llmodule -> string */ +CAMLprim value llvm_target_triple(LLVMModuleRef M) { + return copy_string(LLVMGetTarget(M)); +} + +/* string -> llmodule -> unit */ +CAMLprim value llvm_set_target_triple(value Trip, LLVMModuleRef M) { + LLVMSetTarget(M, String_val(Trip)); + return Val_unit; +} + +/* llmodule -> string */ +CAMLprim value llvm_data_layout(LLVMModuleRef M) { + return copy_string(LLVMGetDataLayout(M)); +} + +/* string -> llmodule -> unit */ +CAMLprim value llvm_set_data_layout(value Layout, LLVMModuleRef M) { + LLVMSetDataLayout(M, String_val(Layout)); + return Val_unit; +} + +/* llmodule -> unit */ +CAMLprim value llvm_dump_module(LLVMModuleRef M) { + LLVMDumpModule(M); + return Val_unit; +} + +/* string -> llmodule -> unit */ +CAMLprim value llvm_print_module(value Filename, LLVMModuleRef M) { + char* Message; + if(LLVMPrintModuleToFile(M, String_val(Filename), &Message)) { + llvm_raise(llvm_ioerror_exn, Message); + } + + return Val_unit; +} + +/* llmodule -> string */ +CAMLprim value llvm_string_of_llmodule(LLVMModuleRef M) { + char* ModuleCStr; + ModuleCStr = LLVMPrintModuleToString(M); + + value ModuleStr = caml_copy_string(ModuleCStr); + LLVMDisposeMessage(ModuleCStr); + + return ModuleStr; +} + +/* llmodule -> string -> unit */ +CAMLprim value llvm_set_module_inline_asm(LLVMModuleRef M, value Asm) { + LLVMSetModuleInlineAsm(M, String_val(Asm)); + return Val_unit; +} + +/*===-- Types -------------------------------------------------------------===*/ + +/* lltype -> TypeKind.t */ +CAMLprim value llvm_classify_type(LLVMTypeRef Ty) { + return Val_int(LLVMGetTypeKind(Ty)); +} + +CAMLprim value llvm_type_is_sized(LLVMTypeRef Ty) { + return Val_bool(LLVMTypeIsSized(Ty)); +} + +/* lltype -> llcontext */ +CAMLprim LLVMContextRef llvm_type_context(LLVMTypeRef Ty) { + return LLVMGetTypeContext(Ty); +} + +/* lltype -> unit */ +CAMLprim value llvm_dump_type(LLVMTypeRef Val) { + LLVMDumpType(Val); + return Val_unit; +} + +/* lltype -> string */ +CAMLprim value llvm_string_of_lltype(LLVMTypeRef M) { + char* TypeCStr; + TypeCStr = LLVMPrintTypeToString(M); + + value TypeStr = caml_copy_string(TypeCStr); + LLVMDisposeMessage(TypeCStr); + + return TypeStr; +} + +/*--... Operations on integer types ........................................--*/ + +/* llcontext -> lltype */ +CAMLprim LLVMTypeRef llvm_i1_type (LLVMContextRef Context) { + return LLVMInt1TypeInContext(Context); +} + +/* llcontext -> lltype */ +CAMLprim LLVMTypeRef llvm_i8_type (LLVMContextRef Context) { + return LLVMInt8TypeInContext(Context); +} + +/* llcontext -> lltype */ +CAMLprim LLVMTypeRef llvm_i16_type (LLVMContextRef Context) { + return LLVMInt16TypeInContext(Context); +} + +/* llcontext -> lltype */ +CAMLprim LLVMTypeRef llvm_i32_type (LLVMContextRef Context) { + return LLVMInt32TypeInContext(Context); +} + +/* llcontext -> lltype */ +CAMLprim LLVMTypeRef llvm_i64_type (LLVMContextRef Context) { + return LLVMInt64TypeInContext(Context); +} + +/* llcontext -> int -> lltype */ +CAMLprim LLVMTypeRef llvm_integer_type(LLVMContextRef Context, value Width) { + return LLVMIntTypeInContext(Context, Int_val(Width)); +} + +/* lltype -> int */ +CAMLprim value llvm_integer_bitwidth(LLVMTypeRef IntegerTy) { + return Val_int(LLVMGetIntTypeWidth(IntegerTy)); +} + +/*--... Operations on real types ...........................................--*/ + +/* llcontext -> lltype */ +CAMLprim LLVMTypeRef llvm_float_type(LLVMContextRef Context) { + return LLVMFloatTypeInContext(Context); +} + +/* llcontext -> lltype */ +CAMLprim LLVMTypeRef llvm_double_type(LLVMContextRef Context) { + return LLVMDoubleTypeInContext(Context); +} + +/* llcontext -> lltype */ +CAMLprim LLVMTypeRef llvm_x86fp80_type(LLVMContextRef Context) { + return LLVMX86FP80TypeInContext(Context); +} + +/* llcontext -> lltype */ +CAMLprim LLVMTypeRef llvm_fp128_type(LLVMContextRef Context) { + return LLVMFP128TypeInContext(Context); +} + +/* llcontext -> lltype */ +CAMLprim LLVMTypeRef llvm_ppc_fp128_type(LLVMContextRef Context) { + return LLVMPPCFP128TypeInContext(Context); +} + +/*--... Operations on function types .......................................--*/ + +/* lltype -> lltype array -> lltype */ +CAMLprim LLVMTypeRef llvm_function_type(LLVMTypeRef RetTy, value ParamTys) { + return LLVMFunctionType(RetTy, (LLVMTypeRef *) ParamTys, + Wosize_val(ParamTys), 0); +} + +/* lltype -> lltype array -> lltype */ +CAMLprim LLVMTypeRef llvm_var_arg_function_type(LLVMTypeRef RetTy, + value ParamTys) { + return LLVMFunctionType(RetTy, (LLVMTypeRef *) ParamTys, + Wosize_val(ParamTys), 1); +} + +/* lltype -> bool */ +CAMLprim value llvm_is_var_arg(LLVMTypeRef FunTy) { + return Val_bool(LLVMIsFunctionVarArg(FunTy)); +} + +/* lltype -> lltype array */ +CAMLprim value llvm_param_types(LLVMTypeRef FunTy) { + value Tys = alloc(LLVMCountParamTypes(FunTy), 0); + LLVMGetParamTypes(FunTy, (LLVMTypeRef *) Tys); + return Tys; +} + +/*--... Operations on struct types .........................................--*/ + +/* llcontext -> lltype array -> lltype */ +CAMLprim LLVMTypeRef llvm_struct_type(LLVMContextRef C, value ElementTypes) { + return LLVMStructTypeInContext(C, (LLVMTypeRef *) ElementTypes, + Wosize_val(ElementTypes), 0); +} + +/* llcontext -> lltype array -> lltype */ +CAMLprim LLVMTypeRef llvm_packed_struct_type(LLVMContextRef C, + value ElementTypes) { + return LLVMStructTypeInContext(C, (LLVMTypeRef *) ElementTypes, + Wosize_val(ElementTypes), 1); +} + +/* llcontext -> string -> lltype */ +CAMLprim LLVMTypeRef llvm_named_struct_type(LLVMContextRef C, + value Name) { + return LLVMStructCreateNamed(C, String_val(Name)); +} + +CAMLprim value llvm_struct_set_body(LLVMTypeRef Ty, + value ElementTypes, + value Packed) { + LLVMStructSetBody(Ty, (LLVMTypeRef *) ElementTypes, + Wosize_val(ElementTypes), Bool_val(Packed)); + return Val_unit; +} + +/* lltype -> string option */ +CAMLprim value llvm_struct_name(LLVMTypeRef Ty) +{ + CAMLparam0(); + const char *C = LLVMGetStructName(Ty); + if (C) { + CAMLlocal1(result); + result = caml_alloc_small(1, 0); + Store_field(result, 0, caml_copy_string(C)); + CAMLreturn(result); + } + CAMLreturn(Val_int(0)); +} + +/* lltype -> lltype array */ +CAMLprim value llvm_struct_element_types(LLVMTypeRef StructTy) { + value Tys = alloc(LLVMCountStructElementTypes(StructTy), 0); + LLVMGetStructElementTypes(StructTy, (LLVMTypeRef *) Tys); + return Tys; +} + +/* lltype -> bool */ +CAMLprim value llvm_is_packed(LLVMTypeRef StructTy) { + return Val_bool(LLVMIsPackedStruct(StructTy)); +} + +/* lltype -> bool */ +CAMLprim value llvm_is_opaque(LLVMTypeRef StructTy) { + return Val_bool(LLVMIsOpaqueStruct(StructTy)); +} + +/*--... Operations on array, pointer, and vector types .....................--*/ + +/* lltype -> int -> lltype */ +CAMLprim LLVMTypeRef llvm_array_type(LLVMTypeRef ElementTy, value Count) { + return LLVMArrayType(ElementTy, Int_val(Count)); +} + +/* lltype -> lltype */ +CAMLprim LLVMTypeRef llvm_pointer_type(LLVMTypeRef ElementTy) { + return LLVMPointerType(ElementTy, 0); +} + +/* lltype -> int -> lltype */ +CAMLprim LLVMTypeRef llvm_qualified_pointer_type(LLVMTypeRef ElementTy, + value AddressSpace) { + return LLVMPointerType(ElementTy, Int_val(AddressSpace)); +} + +/* lltype -> int -> lltype */ +CAMLprim LLVMTypeRef llvm_vector_type(LLVMTypeRef ElementTy, value Count) { + return LLVMVectorType(ElementTy, Int_val(Count)); +} + +/* lltype -> int */ +CAMLprim value llvm_array_length(LLVMTypeRef ArrayTy) { + return Val_int(LLVMGetArrayLength(ArrayTy)); +} + +/* lltype -> int */ +CAMLprim value llvm_address_space(LLVMTypeRef PtrTy) { + return Val_int(LLVMGetPointerAddressSpace(PtrTy)); +} + +/* lltype -> int */ +CAMLprim value llvm_vector_size(LLVMTypeRef VectorTy) { + return Val_int(LLVMGetVectorSize(VectorTy)); +} + +/*--... Operations on other types ..........................................--*/ + +/* llcontext -> lltype */ +CAMLprim LLVMTypeRef llvm_void_type (LLVMContextRef Context) { + return LLVMVoidTypeInContext(Context); +} + +/* llcontext -> lltype */ +CAMLprim LLVMTypeRef llvm_label_type(LLVMContextRef Context) { + return LLVMLabelTypeInContext(Context); +} + +/* llcontext -> lltype */ +CAMLprim LLVMTypeRef llvm_x86_mmx_type(LLVMContextRef Context) { + return LLVMX86MMXTypeInContext(Context); +} + +CAMLprim value llvm_type_by_name(LLVMModuleRef M, value Name) +{ + CAMLparam1(Name); + LLVMTypeRef Ty = LLVMGetTypeByName(M, String_val(Name)); + if (Ty) { + value Option = alloc(1, 0); + Field(Option, 0) = (value) Ty; + CAMLreturn(Option); + } + CAMLreturn(Val_int(0)); +} + +/*===-- VALUES ------------------------------------------------------------===*/ + +/* llvalue -> lltype */ +CAMLprim LLVMTypeRef llvm_type_of(LLVMValueRef Val) { + return LLVMTypeOf(Val); +} + +/* keep in sync with ValueKind.t */ +enum ValueKind { + NullValue=0, + Argument, + BasicBlock, + InlineAsm, + MDNode, + MDString, + BlockAddress, + ConstantAggregateZero, + ConstantArray, + ConstantDataArray, + ConstantDataVector, + ConstantExpr, + ConstantFP, + ConstantInt, + ConstantPointerNull, + ConstantStruct, + ConstantVector, + Function, + GlobalAlias, + GlobalVariable, + UndefValue, + Instruction +}; + +/* llvalue -> ValueKind.t */ +#define DEFINE_CASE(Val, Kind) \ + do {if (LLVMIsA##Kind(Val)) CAMLreturn(Val_int(Kind));} while(0) + +CAMLprim value llvm_classify_value(LLVMValueRef Val) { + CAMLparam0(); + if (!Val) + CAMLreturn(Val_int(NullValue)); + if (LLVMIsAConstant(Val)) { + DEFINE_CASE(Val, BlockAddress); + DEFINE_CASE(Val, ConstantAggregateZero); + DEFINE_CASE(Val, ConstantArray); + DEFINE_CASE(Val, ConstantDataArray); + DEFINE_CASE(Val, ConstantDataVector); + DEFINE_CASE(Val, ConstantExpr); + DEFINE_CASE(Val, ConstantFP); + DEFINE_CASE(Val, ConstantInt); + DEFINE_CASE(Val, ConstantPointerNull); + DEFINE_CASE(Val, ConstantStruct); + DEFINE_CASE(Val, ConstantVector); + } + if (LLVMIsAInstruction(Val)) { + CAMLlocal1(result); + result = caml_alloc_small(1, 0); + Store_field(result, 0, Val_int(LLVMGetInstructionOpcode(Val))); + CAMLreturn(result); + } + if (LLVMIsAGlobalValue(Val)) { + DEFINE_CASE(Val, Function); + DEFINE_CASE(Val, GlobalAlias); + DEFINE_CASE(Val, GlobalVariable); + } + DEFINE_CASE(Val, Argument); + DEFINE_CASE(Val, BasicBlock); + DEFINE_CASE(Val, InlineAsm); + DEFINE_CASE(Val, MDNode); + DEFINE_CASE(Val, MDString); + DEFINE_CASE(Val, UndefValue); + failwith("Unknown Value class"); +} + +/* llvalue -> string */ +CAMLprim value llvm_value_name(LLVMValueRef Val) { + return copy_string(LLVMGetValueName(Val)); +} + +/* string -> llvalue -> unit */ +CAMLprim value llvm_set_value_name(value Name, LLVMValueRef Val) { + LLVMSetValueName(Val, String_val(Name)); + return Val_unit; +} + +/* llvalue -> unit */ +CAMLprim value llvm_dump_value(LLVMValueRef Val) { + LLVMDumpValue(Val); + return Val_unit; +} + +/* llvalue -> string */ +CAMLprim value llvm_string_of_llvalue(LLVMValueRef M) { + char* ValueCStr; + ValueCStr = LLVMPrintValueToString(M); + + value ValueStr = caml_copy_string(ValueCStr); + LLVMDisposeMessage(ValueCStr); + + return ValueStr; +} + +/* llvalue -> llvalue -> unit */ +CAMLprim value llvm_replace_all_uses_with(LLVMValueRef OldVal, + LLVMValueRef NewVal) { + LLVMReplaceAllUsesWith(OldVal, NewVal); + return Val_unit; +} + +/*--... Operations on users ................................................--*/ + +/* llvalue -> int -> llvalue */ +CAMLprim LLVMValueRef llvm_operand(LLVMValueRef V, value I) { + return LLVMGetOperand(V, Int_val(I)); +} + +/* llvalue -> int -> llvalue -> unit */ +CAMLprim value llvm_set_operand(LLVMValueRef U, value I, LLVMValueRef V) { + LLVMSetOperand(U, Int_val(I), V); + return Val_unit; +} + +/* llvalue -> int */ +CAMLprim value llvm_num_operands(LLVMValueRef V) { + return Val_int(LLVMGetNumOperands(V)); +} + +/*--... Operations on constants of (mostly) any type .......................--*/ + +/* llvalue -> bool */ +CAMLprim value llvm_is_constant(LLVMValueRef Val) { + return Val_bool(LLVMIsConstant(Val)); +} + +/* llvalue -> bool */ +CAMLprim value llvm_is_null(LLVMValueRef Val) { + return Val_bool(LLVMIsNull(Val)); +} + +/* llvalue -> bool */ +CAMLprim value llvm_is_undef(LLVMValueRef Val) { + return Val_bool(LLVMIsUndef(Val)); +} + +/* llvalue -> Opcode.t */ +CAMLprim value llvm_constexpr_get_opcode(LLVMValueRef Val) { + return LLVMIsAConstantExpr(Val) ? + Val_int(LLVMGetConstOpcode(Val)) : Val_int(0); +} + +/*--... Operations on instructions .........................................--*/ + +/* llvalue -> bool */ +CAMLprim value llvm_has_metadata(LLVMValueRef Val) { + return Val_bool(LLVMHasMetadata(Val)); +} + +/* llvalue -> int -> llvalue option */ +CAMLprim value llvm_metadata(LLVMValueRef Val, value MDKindID) { + CAMLparam1(MDKindID); + LLVMValueRef MD; + if ((MD = LLVMGetMetadata(Val, Int_val(MDKindID)))) { + value Option = alloc(1, 0); + Field(Option, 0) = (value) MD; + CAMLreturn(Option); + } + CAMLreturn(Val_int(0)); +} + +/* llvalue -> int -> llvalue -> unit */ +CAMLprim value llvm_set_metadata(LLVMValueRef Val, value MDKindID, + LLVMValueRef MD) { + LLVMSetMetadata(Val, Int_val(MDKindID), MD); + return Val_unit; +} + +/* llvalue -> int -> unit */ +CAMLprim value llvm_clear_metadata(LLVMValueRef Val, value MDKindID) { + LLVMSetMetadata(Val, Int_val(MDKindID), NULL); + return Val_unit; +} + + +/*--... Operations on metadata .............................................--*/ + +/* llcontext -> string -> llvalue */ +CAMLprim LLVMValueRef llvm_mdstring(LLVMContextRef C, value S) { + return LLVMMDStringInContext(C, String_val(S), caml_string_length(S)); +} + +/* llcontext -> llvalue array -> llvalue */ +CAMLprim LLVMValueRef llvm_mdnode(LLVMContextRef C, value ElementVals) { + return LLVMMDNodeInContext(C, (LLVMValueRef*) Op_val(ElementVals), + Wosize_val(ElementVals)); +} + +/* llvalue -> string option */ +CAMLprim value llvm_get_mdstring(LLVMValueRef V) { + CAMLparam0(); + const char *S; + unsigned Len; + + if ((S = LLVMGetMDString(V, &Len))) { + CAMLlocal2(Option, Str); + + Str = caml_alloc_string(Len); + memcpy(String_val(Str), S, Len); + Option = alloc(1,0); + Store_field(Option, 0, Str); + CAMLreturn(Option); + } + CAMLreturn(Val_int(0)); +} + +/* llmodule -> string -> llvalue array */ +CAMLprim value llvm_get_namedmd(LLVMModuleRef M, value Name) +{ + CAMLparam1(Name); + CAMLlocal1(Nodes); + Nodes = alloc(LLVMGetNamedMetadataNumOperands(M, String_val(Name)), 0); + LLVMGetNamedMetadataOperands(M, String_val(Name), (LLVMValueRef *) Nodes); + CAMLreturn(Nodes); +} + +/* llmodule -> string -> llvalue -> unit */ +CAMLprim value llvm_append_namedmd(LLVMModuleRef M, value Name, LLVMValueRef Val) { + LLVMAddNamedMetadataOperand(M, String_val(Name), Val); + return Val_unit; +} + +/*--... Operations on scalar constants .....................................--*/ + +/* lltype -> int -> llvalue */ +CAMLprim LLVMValueRef llvm_const_int(LLVMTypeRef IntTy, value N) { + return LLVMConstInt(IntTy, (long long) Int_val(N), 1); +} + +/* lltype -> Int64.t -> bool -> llvalue */ +CAMLprim LLVMValueRef llvm_const_of_int64(LLVMTypeRef IntTy, value N, + value SExt) { + return LLVMConstInt(IntTy, Int64_val(N), Bool_val(SExt)); +} + +/* llvalue -> Int64.t */ +CAMLprim value llvm_int64_of_const(LLVMValueRef Const) +{ + CAMLparam0(); + if (LLVMIsAConstantInt(Const) && + LLVMGetIntTypeWidth(LLVMTypeOf(Const)) <= 64) { + value Option = alloc(1, 0); + Field(Option, 0) = caml_copy_int64(LLVMConstIntGetSExtValue(Const)); + CAMLreturn(Option); + } + CAMLreturn(Val_int(0)); +} + +/* lltype -> string -> int -> llvalue */ +CAMLprim LLVMValueRef llvm_const_int_of_string(LLVMTypeRef IntTy, value S, + value Radix) { + return LLVMConstIntOfStringAndSize(IntTy, String_val(S), caml_string_length(S), + Int_val(Radix)); +} + +/* lltype -> float -> llvalue */ +CAMLprim LLVMValueRef llvm_const_float(LLVMTypeRef RealTy, value N) { + return LLVMConstReal(RealTy, Double_val(N)); +} + +/* lltype -> string -> llvalue */ +CAMLprim LLVMValueRef llvm_const_float_of_string(LLVMTypeRef RealTy, value S) { + return LLVMConstRealOfStringAndSize(RealTy, String_val(S), + caml_string_length(S)); +} + +/*--... Operations on composite constants ..................................--*/ + +/* llcontext -> string -> llvalue */ +CAMLprim LLVMValueRef llvm_const_string(LLVMContextRef Context, value Str, + value NullTerminate) { + return LLVMConstStringInContext(Context, String_val(Str), string_length(Str), + 1); +} + +/* llcontext -> string -> llvalue */ +CAMLprim LLVMValueRef llvm_const_stringz(LLVMContextRef Context, value Str, + value NullTerminate) { + return LLVMConstStringInContext(Context, String_val(Str), string_length(Str), + 0); +} + +/* lltype -> llvalue array -> llvalue */ +CAMLprim LLVMValueRef llvm_const_array(LLVMTypeRef ElementTy, + value ElementVals) { + return LLVMConstArray(ElementTy, (LLVMValueRef*) Op_val(ElementVals), + Wosize_val(ElementVals)); +} + +/* llcontext -> llvalue array -> llvalue */ +CAMLprim LLVMValueRef llvm_const_struct(LLVMContextRef C, value ElementVals) { + return LLVMConstStructInContext(C, (LLVMValueRef *) Op_val(ElementVals), + Wosize_val(ElementVals), 0); +} + +/* lltype -> llvalue array -> llvalue */ +CAMLprim LLVMValueRef llvm_const_named_struct(LLVMTypeRef Ty, value ElementVals) { + return LLVMConstNamedStruct(Ty, (LLVMValueRef *) Op_val(ElementVals), Wosize_val(ElementVals)); +} + +/* llcontext -> llvalue array -> llvalue */ +CAMLprim LLVMValueRef llvm_const_packed_struct(LLVMContextRef C, + value ElementVals) { + return LLVMConstStructInContext(C, (LLVMValueRef *) Op_val(ElementVals), + Wosize_val(ElementVals), 1); +} + +/* llvalue array -> llvalue */ +CAMLprim LLVMValueRef llvm_const_vector(value ElementVals) { + return LLVMConstVector((LLVMValueRef*) Op_val(ElementVals), + Wosize_val(ElementVals)); +} + +/*--... Constant expressions ...............................................--*/ + +/* Icmp.t -> llvalue -> llvalue -> llvalue */ +CAMLprim LLVMValueRef llvm_const_icmp(value Pred, + LLVMValueRef LHSConstant, + LLVMValueRef RHSConstant) { + return LLVMConstICmp(Int_val(Pred) + LLVMIntEQ, LHSConstant, RHSConstant); +} + +/* Fcmp.t -> llvalue -> llvalue -> llvalue */ +CAMLprim LLVMValueRef llvm_const_fcmp(value Pred, + LLVMValueRef LHSConstant, + LLVMValueRef RHSConstant) { + return LLVMConstFCmp(Int_val(Pred), LHSConstant, RHSConstant); +} + +/* llvalue -> llvalue array -> llvalue */ +CAMLprim LLVMValueRef llvm_const_gep(LLVMValueRef ConstantVal, value Indices) { + return LLVMConstGEP(ConstantVal, (LLVMValueRef*) Op_val(Indices), + Wosize_val(Indices)); +} + +/* llvalue -> llvalue array -> llvalue */ +CAMLprim LLVMValueRef llvm_const_in_bounds_gep(LLVMValueRef ConstantVal, + value Indices) { + return LLVMConstInBoundsGEP(ConstantVal, (LLVMValueRef*) Op_val(Indices), + Wosize_val(Indices)); +} + +/* llvalue -> lltype -> is_signed:bool -> llvalue */ +CAMLprim LLVMValueRef llvm_const_intcast(LLVMValueRef CV, LLVMTypeRef T, + value IsSigned) { + return LLVMConstIntCast(CV, T, Bool_val(IsSigned)); +} + +/* llvalue -> int array -> llvalue */ +CAMLprim LLVMValueRef llvm_const_extractvalue(LLVMValueRef Aggregate, + value Indices) { + CAMLparam1(Indices); + int size = Wosize_val(Indices); + int i; + LLVMValueRef result; + + unsigned* idxs = (unsigned*)malloc(size * sizeof(unsigned)); + for (i = 0; i < size; i++) { + idxs[i] = Int_val(Field(Indices, i)); + } + + result = LLVMConstExtractValue(Aggregate, idxs, size); + free(idxs); + CAMLreturnT(LLVMValueRef, result); +} + +/* llvalue -> llvalue -> int array -> llvalue */ +CAMLprim LLVMValueRef llvm_const_insertvalue(LLVMValueRef Aggregate, + LLVMValueRef Val, value Indices) { + CAMLparam1(Indices); + int size = Wosize_val(Indices); + int i; + LLVMValueRef result; + + unsigned* idxs = (unsigned*)malloc(size * sizeof(unsigned)); + for (i = 0; i < size; i++) { + idxs[i] = Int_val(Field(Indices, i)); + } + + result = LLVMConstInsertValue(Aggregate, Val, idxs, size); + free(idxs); + CAMLreturnT(LLVMValueRef, result); +} + +/* lltype -> string -> string -> bool -> bool -> llvalue */ +CAMLprim LLVMValueRef llvm_const_inline_asm(LLVMTypeRef Ty, value Asm, + value Constraints, value HasSideEffects, + value IsAlignStack) { + return LLVMConstInlineAsm(Ty, String_val(Asm), String_val(Constraints), + Bool_val(HasSideEffects), Bool_val(IsAlignStack)); +} + +/*--... Operations on global variables, functions, and aliases (globals) ...--*/ + +/* llvalue -> bool */ +CAMLprim value llvm_is_declaration(LLVMValueRef Global) { + return Val_bool(LLVMIsDeclaration(Global)); +} + +/* llvalue -> Linkage.t */ +CAMLprim value llvm_linkage(LLVMValueRef Global) { + return Val_int(LLVMGetLinkage(Global)); +} + +/* Linkage.t -> llvalue -> unit */ +CAMLprim value llvm_set_linkage(value Linkage, LLVMValueRef Global) { + LLVMSetLinkage(Global, Int_val(Linkage)); + return Val_unit; +} + +/* llvalue -> string */ +CAMLprim value llvm_section(LLVMValueRef Global) { + return copy_string(LLVMGetSection(Global)); +} + +/* string -> llvalue -> unit */ +CAMLprim value llvm_set_section(value Section, LLVMValueRef Global) { + LLVMSetSection(Global, String_val(Section)); + return Val_unit; +} + +/* llvalue -> Visibility.t */ +CAMLprim value llvm_visibility(LLVMValueRef Global) { + return Val_int(LLVMGetVisibility(Global)); +} + +/* Visibility.t -> llvalue -> unit */ +CAMLprim value llvm_set_visibility(value Viz, LLVMValueRef Global) { + LLVMSetVisibility(Global, Int_val(Viz)); + return Val_unit; +} + +/* llvalue -> int */ +CAMLprim value llvm_alignment(LLVMValueRef Global) { + return Val_int(LLVMGetAlignment(Global)); +} + +/* int -> llvalue -> unit */ +CAMLprim value llvm_set_alignment(value Bytes, LLVMValueRef Global) { + LLVMSetAlignment(Global, Int_val(Bytes)); + return Val_unit; +} + +/*--... Operations on uses .................................................--*/ + +/* llvalue -> lluse option */ +CAMLprim value llvm_use_begin(LLVMValueRef Val) { + CAMLparam0(); + LLVMUseRef First; + if ((First = LLVMGetFirstUse(Val))) { + value Option = alloc(1, 0); + Field(Option, 0) = (value) First; + CAMLreturn(Option); + } + CAMLreturn(Val_int(0)); +} + +/* lluse -> lluse option */ +CAMLprim value llvm_use_succ(LLVMUseRef U) { + CAMLparam0(); + LLVMUseRef Next; + if ((Next = LLVMGetNextUse(U))) { + value Option = alloc(1, 0); + Field(Option, 0) = (value) Next; + CAMLreturn(Option); + } + CAMLreturn(Val_int(0)); +} + +/* lluse -> llvalue */ +CAMLprim LLVMValueRef llvm_user(LLVMUseRef UR) { + return LLVMGetUser(UR); +} + +/* lluse -> llvalue */ +CAMLprim LLVMValueRef llvm_used_value(LLVMUseRef UR) { + return LLVMGetUsedValue(UR); +} + +/*--... Operations on global variables .....................................--*/ + +DEFINE_ITERATORS(global, Global, LLVMModuleRef, LLVMValueRef, + LLVMGetGlobalParent) + +/* lltype -> string -> llmodule -> llvalue */ +CAMLprim LLVMValueRef llvm_declare_global(LLVMTypeRef Ty, value Name, + LLVMModuleRef M) { + LLVMValueRef GlobalVar; + if ((GlobalVar = LLVMGetNamedGlobal(M, String_val(Name)))) { + if (LLVMGetElementType(LLVMTypeOf(GlobalVar)) != Ty) + return LLVMConstBitCast(GlobalVar, LLVMPointerType(Ty, 0)); + return GlobalVar; + } + return LLVMAddGlobal(M, Ty, String_val(Name)); +} + +/* lltype -> string -> int -> llmodule -> llvalue */ +CAMLprim LLVMValueRef llvm_declare_qualified_global(LLVMTypeRef Ty, value Name, + value AddressSpace, + LLVMModuleRef M) { + LLVMValueRef GlobalVar; + if ((GlobalVar = LLVMGetNamedGlobal(M, String_val(Name)))) { + if (LLVMGetElementType(LLVMTypeOf(GlobalVar)) != Ty) + return LLVMConstBitCast(GlobalVar, + LLVMPointerType(Ty, Int_val(AddressSpace))); + return GlobalVar; + } + return LLVMAddGlobalInAddressSpace(M, Ty, String_val(Name), + Int_val(AddressSpace)); +} + +/* string -> llmodule -> llvalue option */ +CAMLprim value llvm_lookup_global(value Name, LLVMModuleRef M) { + CAMLparam1(Name); + LLVMValueRef GlobalVar; + if ((GlobalVar = LLVMGetNamedGlobal(M, String_val(Name)))) { + value Option = alloc(1, 0); + Field(Option, 0) = (value) GlobalVar; + CAMLreturn(Option); + } + CAMLreturn(Val_int(0)); +} + +/* string -> llvalue -> llmodule -> llvalue */ +CAMLprim LLVMValueRef llvm_define_global(value Name, LLVMValueRef Initializer, + LLVMModuleRef M) { + LLVMValueRef GlobalVar = LLVMAddGlobal(M, LLVMTypeOf(Initializer), + String_val(Name)); + LLVMSetInitializer(GlobalVar, Initializer); + return GlobalVar; +} + +/* string -> llvalue -> int -> llmodule -> llvalue */ +CAMLprim LLVMValueRef llvm_define_qualified_global(value Name, + LLVMValueRef Initializer, + value AddressSpace, + LLVMModuleRef M) { + LLVMValueRef GlobalVar = LLVMAddGlobalInAddressSpace(M, + LLVMTypeOf(Initializer), + String_val(Name), + Int_val(AddressSpace)); + LLVMSetInitializer(GlobalVar, Initializer); + return GlobalVar; +} + +/* llvalue -> unit */ +CAMLprim value llvm_delete_global(LLVMValueRef GlobalVar) { + LLVMDeleteGlobal(GlobalVar); + return Val_unit; +} + +/* llvalue -> llvalue -> unit */ +CAMLprim value llvm_set_initializer(LLVMValueRef ConstantVal, + LLVMValueRef GlobalVar) { + LLVMSetInitializer(GlobalVar, ConstantVal); + return Val_unit; +} + +/* llvalue -> unit */ +CAMLprim value llvm_remove_initializer(LLVMValueRef GlobalVar) { + LLVMSetInitializer(GlobalVar, NULL); + return Val_unit; +} + +/* llvalue -> bool */ +CAMLprim value llvm_is_thread_local(LLVMValueRef GlobalVar) { + return Val_bool(LLVMIsThreadLocal(GlobalVar)); +} + +/* bool -> llvalue -> unit */ +CAMLprim value llvm_set_thread_local(value IsThreadLocal, + LLVMValueRef GlobalVar) { + LLVMSetThreadLocal(GlobalVar, Bool_val(IsThreadLocal)); + return Val_unit; +} + +/* llvalue -> ThreadLocalMode.t */ +CAMLprim value llvm_thread_local_mode(LLVMValueRef GlobalVar) { + return Val_int(LLVMGetThreadLocalMode(GlobalVar)); +} + +/* ThreadLocalMode.t -> llvalue -> unit */ +CAMLprim value llvm_set_thread_local_mode(value ThreadLocalMode, + LLVMValueRef GlobalVar) { + LLVMSetThreadLocalMode(GlobalVar, Int_val(ThreadLocalMode)); + return Val_unit; +} + +/* llvalue -> bool */ +CAMLprim value llvm_is_externally_initialized(LLVMValueRef GlobalVar) { + return Val_bool(LLVMIsExternallyInitialized(GlobalVar)); +} + +/* bool -> llvalue -> unit */ +CAMLprim value llvm_set_externally_initialized(value IsExternallyInitialized, + LLVMValueRef GlobalVar) { + LLVMSetExternallyInitialized(GlobalVar, Bool_val(IsExternallyInitialized)); + return Val_unit; +} + +/* llvalue -> bool */ +CAMLprim value llvm_is_global_constant(LLVMValueRef GlobalVar) { + return Val_bool(LLVMIsGlobalConstant(GlobalVar)); +} + +/* bool -> llvalue -> unit */ +CAMLprim value llvm_set_global_constant(value Flag, LLVMValueRef GlobalVar) { + LLVMSetGlobalConstant(GlobalVar, Bool_val(Flag)); + return Val_unit; +} + +/*--... Operations on aliases ..............................................--*/ + +CAMLprim LLVMValueRef llvm_add_alias(LLVMModuleRef M, LLVMTypeRef Ty, + LLVMValueRef Aliasee, value Name) { + return LLVMAddAlias(M, Ty, Aliasee, String_val(Name)); +} + +/*--... Operations on functions ............................................--*/ + +DEFINE_ITERATORS(function, Function, LLVMModuleRef, LLVMValueRef, + LLVMGetGlobalParent) + +/* string -> lltype -> llmodule -> llvalue */ +CAMLprim LLVMValueRef llvm_declare_function(value Name, LLVMTypeRef Ty, + LLVMModuleRef M) { + LLVMValueRef Fn; + if ((Fn = LLVMGetNamedFunction(M, String_val(Name)))) { + if (LLVMGetElementType(LLVMTypeOf(Fn)) != Ty) + return LLVMConstBitCast(Fn, LLVMPointerType(Ty, 0)); + return Fn; + } + return LLVMAddFunction(M, String_val(Name), Ty); +} + +/* string -> llmodule -> llvalue option */ +CAMLprim value llvm_lookup_function(value Name, LLVMModuleRef M) { + CAMLparam1(Name); + LLVMValueRef Fn; + if ((Fn = LLVMGetNamedFunction(M, String_val(Name)))) { + value Option = alloc(1, 0); + Field(Option, 0) = (value) Fn; + CAMLreturn(Option); + } + CAMLreturn(Val_int(0)); +} + +/* string -> lltype -> llmodule -> llvalue */ +CAMLprim LLVMValueRef llvm_define_function(value Name, LLVMTypeRef Ty, + LLVMModuleRef M) { + LLVMValueRef Fn = LLVMAddFunction(M, String_val(Name), Ty); + LLVMAppendBasicBlockInContext(LLVMGetTypeContext(Ty), Fn, "entry"); + return Fn; +} + +/* llvalue -> unit */ +CAMLprim value llvm_delete_function(LLVMValueRef Fn) { + LLVMDeleteFunction(Fn); + return Val_unit; +} + +/* llvalue -> bool */ +CAMLprim value llvm_is_intrinsic(LLVMValueRef Fn) { + return Val_bool(LLVMGetIntrinsicID(Fn)); +} + +/* llvalue -> int */ +CAMLprim value llvm_function_call_conv(LLVMValueRef Fn) { + return Val_int(LLVMGetFunctionCallConv(Fn)); +} + +/* int -> llvalue -> unit */ +CAMLprim value llvm_set_function_call_conv(value Id, LLVMValueRef Fn) { + LLVMSetFunctionCallConv(Fn, Int_val(Id)); + return Val_unit; +} + +/* llvalue -> string option */ +CAMLprim value llvm_gc(LLVMValueRef Fn) { + const char *GC; + CAMLparam0(); + CAMLlocal2(Name, Option); + + if ((GC = LLVMGetGC(Fn))) { + Name = copy_string(GC); + + Option = alloc(1, 0); + Field(Option, 0) = Name; + CAMLreturn(Option); + } else { + CAMLreturn(Val_int(0)); + } +} + +/* string option -> llvalue -> unit */ +CAMLprim value llvm_set_gc(value GC, LLVMValueRef Fn) { + LLVMSetGC(Fn, GC == Val_int(0)? 0 : String_val(Field(GC, 0))); + return Val_unit; +} + +/* llvalue -> int32 -> unit */ +CAMLprim value llvm_add_function_attr(LLVMValueRef Arg, value PA) { + LLVMAddFunctionAttr(Arg, Int32_val(PA)); + return Val_unit; +} + +/* llvalue -> string -> string -> unit */ +CAMLprim value llvm_add_target_dependent_function_attr( + LLVMValueRef Arg, value A, value V) { + LLVMAddTargetDependentFunctionAttr(Arg, String_val(A), String_val(V)); + return Val_unit; +} + +/* llvalue -> int32 */ +CAMLprim value llvm_function_attr(LLVMValueRef Fn) +{ + CAMLparam0(); + CAMLreturn(caml_copy_int32(LLVMGetFunctionAttr(Fn))); +} + +/* llvalue -> int32 -> unit */ +CAMLprim value llvm_remove_function_attr(LLVMValueRef Arg, value PA) { + LLVMRemoveFunctionAttr(Arg, Int32_val(PA)); + return Val_unit; +} +/*--... Operations on parameters ...........................................--*/ + +DEFINE_ITERATORS(param, Param, LLVMValueRef, LLVMValueRef, LLVMGetParamParent) + +/* llvalue -> int -> llvalue */ +CAMLprim LLVMValueRef llvm_param(LLVMValueRef Fn, value Index) { + return LLVMGetParam(Fn, Int_val(Index)); +} + +/* llvalue -> int */ +CAMLprim value llvm_param_attr(LLVMValueRef Param) +{ + CAMLparam0(); + CAMLreturn(caml_copy_int32(LLVMGetAttribute(Param))); +} + +/* llvalue -> llvalue */ +CAMLprim value llvm_params(LLVMValueRef Fn) { + value Params = alloc(LLVMCountParams(Fn), 0); + LLVMGetParams(Fn, (LLVMValueRef *) Op_val(Params)); + return Params; +} + +/* llvalue -> int32 -> unit */ +CAMLprim value llvm_add_param_attr(LLVMValueRef Arg, value PA) { + LLVMAddAttribute(Arg, Int32_val(PA)); + return Val_unit; +} + +/* llvalue -> int32 -> unit */ +CAMLprim value llvm_remove_param_attr(LLVMValueRef Arg, value PA) { + LLVMRemoveAttribute(Arg, Int32_val(PA)); + return Val_unit; +} + +/* llvalue -> int -> unit */ +CAMLprim value llvm_set_param_alignment(LLVMValueRef Arg, value align) { + LLVMSetParamAlignment(Arg, Int_val(align)); + return Val_unit; +} + +/*--... Operations on basic blocks .........................................--*/ + +DEFINE_ITERATORS( + block, BasicBlock, LLVMValueRef, LLVMBasicBlockRef, LLVMGetBasicBlockParent) + +/* llbasicblock -> llvalue option */ +CAMLprim value llvm_block_terminator(LLVMBasicBlockRef Block) +{ + CAMLparam0(); + LLVMValueRef Term = LLVMGetBasicBlockTerminator(Block); + if (Term) { + value Option = alloc(1, 0); + Field(Option, 0) = (value) Term; + CAMLreturn(Option); + } + CAMLreturn(Val_int(0)); +} + +/* llvalue -> llbasicblock array */ +CAMLprim value llvm_basic_blocks(LLVMValueRef Fn) { + value MLArray = alloc(LLVMCountBasicBlocks(Fn), 0); + LLVMGetBasicBlocks(Fn, (LLVMBasicBlockRef *) Op_val(MLArray)); + return MLArray; +} + +/* llbasicblock -> unit */ +CAMLprim value llvm_delete_block(LLVMBasicBlockRef BB) { + LLVMDeleteBasicBlock(BB); + return Val_unit; +} + +/* llbasicblock -> unit */ +CAMLprim value llvm_remove_block(LLVMBasicBlockRef BB) { + LLVMRemoveBasicBlockFromParent(BB); + return Val_unit; +} + +/* llbasicblock -> llbasicblock -> unit */ +CAMLprim value llvm_move_block_before(LLVMBasicBlockRef Pos, LLVMBasicBlockRef BB) { + LLVMMoveBasicBlockBefore(BB, Pos); + return Val_unit; +} + +/* llbasicblock -> llbasicblock -> unit */ +CAMLprim value llvm_move_block_after(LLVMBasicBlockRef Pos, LLVMBasicBlockRef BB) { + LLVMMoveBasicBlockAfter(BB, Pos); + return Val_unit; +} + +/* string -> llvalue -> llbasicblock */ +CAMLprim LLVMBasicBlockRef llvm_append_block(LLVMContextRef Context, value Name, + LLVMValueRef Fn) { + return LLVMAppendBasicBlockInContext(Context, Fn, String_val(Name)); +} + +/* string -> llbasicblock -> llbasicblock */ +CAMLprim LLVMBasicBlockRef llvm_insert_block(LLVMContextRef Context, value Name, + LLVMBasicBlockRef BB) { + return LLVMInsertBasicBlockInContext(Context, BB, String_val(Name)); +} + +/* llvalue -> bool */ +CAMLprim value llvm_value_is_block(LLVMValueRef Val) { + return Val_bool(LLVMValueIsBasicBlock(Val)); +} + +/*--... Operations on instructions .........................................--*/ + +DEFINE_ITERATORS(instr, Instruction, LLVMBasicBlockRef, LLVMValueRef, + LLVMGetInstructionParent) + +/* llvalue -> Opcode.t */ +CAMLprim value llvm_instr_get_opcode(LLVMValueRef Inst) { + LLVMOpcode o; + if (!LLVMIsAInstruction(Inst)) + failwith("Not an instruction"); + o = LLVMGetInstructionOpcode(Inst); + assert (o <= LLVMLandingPad); + return Val_int(o); +} + +/* llvalue -> ICmp.t option */ +CAMLprim value llvm_instr_icmp_predicate(LLVMValueRef Val) { + CAMLparam0(); + int x = LLVMGetICmpPredicate(Val); + if (x) { + value Option = alloc(1, 0); + Field(Option, 0) = Val_int(x - LLVMIntEQ); + CAMLreturn(Option); + } + CAMLreturn(Val_int(0)); +} + + +/*--... Operations on call sites ...........................................--*/ + +/* llvalue -> int */ +CAMLprim value llvm_instruction_call_conv(LLVMValueRef Inst) { + return Val_int(LLVMGetInstructionCallConv(Inst)); +} + +/* int -> llvalue -> unit */ +CAMLprim value llvm_set_instruction_call_conv(value CC, LLVMValueRef Inst) { + LLVMSetInstructionCallConv(Inst, Int_val(CC)); + return Val_unit; +} + +/* llvalue -> int -> int32 -> unit */ +CAMLprim value llvm_add_instruction_param_attr(LLVMValueRef Instr, + value index, + value PA) { + LLVMAddInstrAttribute(Instr, Int_val(index), Int32_val(PA)); + return Val_unit; +} + +/* llvalue -> int -> int32 -> unit */ +CAMLprim value llvm_remove_instruction_param_attr(LLVMValueRef Instr, + value index, + value PA) { + LLVMRemoveInstrAttribute(Instr, Int_val(index), Int32_val(PA)); + return Val_unit; +} + +/*--... Operations on call instructions (only) .............................--*/ + +/* llvalue -> bool */ +CAMLprim value llvm_is_tail_call(LLVMValueRef CallInst) { + return Val_bool(LLVMIsTailCall(CallInst)); +} + +/* bool -> llvalue -> unit */ +CAMLprim value llvm_set_tail_call(value IsTailCall, + LLVMValueRef CallInst) { + LLVMSetTailCall(CallInst, Bool_val(IsTailCall)); + return Val_unit; +} + +/*--... Operations on load/store instructions (only)........................--*/ + +/* llvalue -> bool */ +CAMLprim value llvm_is_volatile(LLVMValueRef MemoryInst) { + return Val_bool(LLVMGetVolatile(MemoryInst)); +} + +/* bool -> llvalue -> unit */ +CAMLprim value llvm_set_volatile(value IsVolatile, + LLVMValueRef MemoryInst) { + LLVMSetVolatile(MemoryInst, Bool_val(IsVolatile)); + return Val_unit; +} + +/*--... Operations on phi nodes ............................................--*/ + +/* (llvalue * llbasicblock) -> llvalue -> unit */ +CAMLprim value llvm_add_incoming(value Incoming, LLVMValueRef PhiNode) { + LLVMAddIncoming(PhiNode, + (LLVMValueRef*) &Field(Incoming, 0), + (LLVMBasicBlockRef*) &Field(Incoming, 1), + 1); + return Val_unit; +} + +/* llvalue -> (llvalue * llbasicblock) list */ +CAMLprim value llvm_incoming(LLVMValueRef PhiNode) { + unsigned I; + CAMLparam0(); + CAMLlocal3(Hd, Tl, Tmp); + + /* Build a tuple list of them. */ + Tl = Val_int(0); + for (I = LLVMCountIncoming(PhiNode); I != 0; ) { + Hd = alloc(2, 0); + Store_field(Hd, 0, (value) LLVMGetIncomingValue(PhiNode, --I)); + Store_field(Hd, 1, (value) LLVMGetIncomingBlock(PhiNode, I)); + + Tmp = alloc(2, 0); + Store_field(Tmp, 0, Hd); + Store_field(Tmp, 1, Tl); + Tl = Tmp; + } + + CAMLreturn(Tl); +} + +/* llvalue -> unit */ +CAMLprim value llvm_delete_instruction(LLVMValueRef Instruction) { + LLVMInstructionEraseFromParent(Instruction); + return Val_unit; +} + +/*===-- Instruction builders ----------------------------------------------===*/ + +#define Builder_val(v) (*(LLVMBuilderRef *)(Data_custom_val(v))) + +static void llvm_finalize_builder(value B) { + LLVMDisposeBuilder(Builder_val(B)); +} + +static struct custom_operations builder_ops = { + (char *) "LLVMIRBuilder", + llvm_finalize_builder, + custom_compare_default, + custom_hash_default, + custom_serialize_default, + custom_deserialize_default +#ifdef custom_compare_ext_default + , custom_compare_ext_default +#endif +}; + +static value alloc_builder(LLVMBuilderRef B) { + value V = alloc_custom(&builder_ops, sizeof(LLVMBuilderRef), 0, 1); + Builder_val(V) = B; + return V; +} + +/* llcontext -> llbuilder */ +CAMLprim value llvm_builder(LLVMContextRef C) { + return alloc_builder(LLVMCreateBuilderInContext(C)); +} + +/* (llbasicblock, llvalue) llpos -> llbuilder -> unit */ +CAMLprim value llvm_position_builder(value Pos, value B) { + if (Tag_val(Pos) == 0) { + LLVMBasicBlockRef BB = (LLVMBasicBlockRef) Op_val(Field(Pos, 0)); + LLVMPositionBuilderAtEnd(Builder_val(B), BB); + } else { + LLVMValueRef I = (LLVMValueRef) Op_val(Field(Pos, 0)); + LLVMPositionBuilderBefore(Builder_val(B), I); + } + return Val_unit; +} + +/* llbuilder -> llbasicblock */ +CAMLprim LLVMBasicBlockRef llvm_insertion_block(value B) { + LLVMBasicBlockRef InsertBlock = LLVMGetInsertBlock(Builder_val(B)); + if (!InsertBlock) + raise_not_found(); + return InsertBlock; +} + +/* llvalue -> string -> llbuilder -> unit */ +CAMLprim value llvm_insert_into_builder(LLVMValueRef I, value Name, value B) { + LLVMInsertIntoBuilderWithName(Builder_val(B), I, String_val(Name)); + return Val_unit; +} + +/*--... Metadata ...........................................................--*/ + +/* llbuilder -> llvalue -> unit */ +CAMLprim value llvm_set_current_debug_location(value B, LLVMValueRef V) { + LLVMSetCurrentDebugLocation(Builder_val(B), V); + return Val_unit; +} + +/* llbuilder -> unit */ +CAMLprim value llvm_clear_current_debug_location(value B) { + LLVMSetCurrentDebugLocation(Builder_val(B), NULL); + return Val_unit; +} + +/* llbuilder -> llvalue option */ +CAMLprim value llvm_current_debug_location(value B) { + CAMLparam0(); + LLVMValueRef L; + if ((L = LLVMGetCurrentDebugLocation(Builder_val(B)))) { + value Option = alloc(1, 0); + Field(Option, 0) = (value) L; + CAMLreturn(Option); + } + CAMLreturn(Val_int(0)); +} + +/* llbuilder -> llvalue -> unit */ +CAMLprim value llvm_set_inst_debug_location(value B, LLVMValueRef V) { + LLVMSetInstDebugLocation(Builder_val(B), V); + return Val_unit; +} + + +/*--... Terminators ........................................................--*/ + +/* llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_ret_void(value B) { + return LLVMBuildRetVoid(Builder_val(B)); +} + +/* llvalue -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_ret(LLVMValueRef Val, value B) { + return LLVMBuildRet(Builder_val(B), Val); +} + +/* llvalue array -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_aggregate_ret(value RetVals, value B) { + return LLVMBuildAggregateRet(Builder_val(B), (LLVMValueRef *) Op_val(RetVals), + Wosize_val(RetVals)); +} + +/* llbasicblock -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_br(LLVMBasicBlockRef BB, value B) { + return LLVMBuildBr(Builder_val(B), BB); +} + +/* llvalue -> llbasicblock -> llbasicblock -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_cond_br(LLVMValueRef If, + LLVMBasicBlockRef Then, + LLVMBasicBlockRef Else, + value B) { + return LLVMBuildCondBr(Builder_val(B), If, Then, Else); +} + +/* llvalue -> llbasicblock -> int -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_switch(LLVMValueRef Of, + LLVMBasicBlockRef Else, + value EstimatedCount, + value B) { + return LLVMBuildSwitch(Builder_val(B), Of, Else, Int_val(EstimatedCount)); +} + +/* lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_malloc(LLVMTypeRef Ty, value Name, + value B) +{ + return LLVMBuildMalloc(Builder_val(B), Ty, String_val(Name)); +} + +/* lltype -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_array_malloc(LLVMTypeRef Ty, + LLVMValueRef Val, + value Name, value B) +{ + return LLVMBuildArrayMalloc(Builder_val(B), Ty, Val, String_val(Name)); +} + +/* llvalue -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_free(LLVMValueRef P, value B) +{ + return LLVMBuildFree(Builder_val(B), P); +} + +/* llvalue -> llvalue -> llbasicblock -> unit */ +CAMLprim value llvm_add_case(LLVMValueRef Switch, LLVMValueRef OnVal, + LLVMBasicBlockRef Dest) { + LLVMAddCase(Switch, OnVal, Dest); + return Val_unit; +} + +/* llvalue -> llbasicblock -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_indirect_br(LLVMValueRef Addr, + value EstimatedDests, + value B) { + return LLVMBuildIndirectBr(Builder_val(B), Addr, EstimatedDests); +} + +/* llvalue -> llvalue -> llbasicblock -> unit */ +CAMLprim value llvm_add_destination(LLVMValueRef IndirectBr, + LLVMBasicBlockRef Dest) { + LLVMAddDestination(IndirectBr, Dest); + return Val_unit; +} + +/* llvalue -> llvalue array -> llbasicblock -> llbasicblock -> string -> + llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_invoke_nat(LLVMValueRef Fn, value Args, + LLVMBasicBlockRef Then, + LLVMBasicBlockRef Catch, + value Name, value B) { + return LLVMBuildInvoke(Builder_val(B), Fn, (LLVMValueRef *) Op_val(Args), + Wosize_val(Args), Then, Catch, String_val(Name)); +} + +/* llvalue -> llvalue array -> llbasicblock -> llbasicblock -> string -> + llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_invoke_bc(value Args[], int NumArgs) { + return llvm_build_invoke_nat((LLVMValueRef) Args[0], Args[1], + (LLVMBasicBlockRef) Args[2], + (LLVMBasicBlockRef) Args[3], + Args[4], Args[5]); +} + +/* lltype -> llvalue -> int -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_landingpad(LLVMTypeRef Ty, LLVMValueRef PersFn, + value NumClauses, value Name, + value B) { + return LLVMBuildLandingPad(Builder_val(B), Ty, PersFn, Int_val(NumClauses), + String_val(Name)); +} + +/* llvalue -> llvalue -> unit */ +CAMLprim value llvm_add_clause(LLVMValueRef LandingPadInst, LLVMValueRef ClauseVal) +{ + LLVMAddClause(LandingPadInst, ClauseVal); + return Val_unit; +} + + +/* llvalue -> bool -> unit */ +CAMLprim value llvm_set_cleanup(LLVMValueRef LandingPadInst, value flag) +{ + LLVMSetCleanup(LandingPadInst, Bool_val(flag)); + return Val_unit; +} + +/* llvalue -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_resume(LLVMValueRef Exn, value B) +{ + return LLVMBuildResume(Builder_val(B), Exn); +} + +/* llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_unreachable(value B) { + return LLVMBuildUnreachable(Builder_val(B)); +} + +/*--... Arithmetic .........................................................--*/ + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_add(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildAdd(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_nsw_add(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildNSWAdd(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_nuw_add(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildNUWAdd(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_fadd(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildFAdd(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_sub(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildSub(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_nsw_sub(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildNSWSub(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_nuw_sub(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildNUWSub(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_fsub(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildFSub(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_mul(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildMul(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_nsw_mul(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildNSWMul(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_nuw_mul(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildNUWMul(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_fmul(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildFMul(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_udiv(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildUDiv(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_sdiv(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildSDiv(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_exact_sdiv(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildExactSDiv(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_fdiv(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildFDiv(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_urem(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildURem(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_srem(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildSRem(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_frem(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildFRem(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_shl(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildShl(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_lshr(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildLShr(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_ashr(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildAShr(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_and(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildAnd(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_or(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildOr(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_xor(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildXor(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/* llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_neg(LLVMValueRef X, + value Name, value B) { + return LLVMBuildNeg(Builder_val(B), X, String_val(Name)); +} + +/* llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_nsw_neg(LLVMValueRef X, + value Name, value B) { + return LLVMBuildNSWNeg(Builder_val(B), X, String_val(Name)); +} + +/* llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_nuw_neg(LLVMValueRef X, + value Name, value B) { + return LLVMBuildNUWNeg(Builder_val(B), X, String_val(Name)); +} + +/* llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_fneg(LLVMValueRef X, + value Name, value B) { + return LLVMBuildFNeg(Builder_val(B), X, String_val(Name)); +} + +/* llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_not(LLVMValueRef X, + value Name, value B) { + return LLVMBuildNot(Builder_val(B), X, String_val(Name)); +} + +/*--... Memory .............................................................--*/ + +/* lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_alloca(LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildAlloca(Builder_val(B), Ty, String_val(Name)); +} + +/* lltype -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_array_alloca(LLVMTypeRef Ty, LLVMValueRef Size, + value Name, value B) { + return LLVMBuildArrayAlloca(Builder_val(B), Ty, Size, String_val(Name)); +} + +/* llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_load(LLVMValueRef Pointer, + value Name, value B) { + return LLVMBuildLoad(Builder_val(B), Pointer, String_val(Name)); +} + +/* llvalue -> llvalue -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_store(LLVMValueRef Value, LLVMValueRef Pointer, + value B) { + return LLVMBuildStore(Builder_val(B), Value, Pointer); +} + +/* AtomicRMWBinOp.t -> llvalue -> llvalue -> AtomicOrdering.t -> + bool -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_atomicrmw_native(value BinOp, LLVMValueRef Ptr, + LLVMValueRef Val, value Ord, + value ST, value Name, value B) { + LLVMValueRef Instr; + Instr = LLVMBuildAtomicRMW(Builder_val(B), Int_val(BinOp), + Ptr, Val, Int_val(Ord), Bool_val(ST)); + LLVMSetValueName(Instr, String_val(Name)); + return Instr; +} + +CAMLprim LLVMValueRef llvm_build_atomicrmw_bytecode(value *argv, int argn) { + return llvm_build_atomicrmw_native(argv[0], (LLVMValueRef) argv[1], + (LLVMValueRef) argv[2], argv[3], + argv[4], argv[5], argv[6]); +} + +/* llvalue -> llvalue array -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_gep(LLVMValueRef Pointer, value Indices, + value Name, value B) { + return LLVMBuildGEP(Builder_val(B), Pointer, + (LLVMValueRef *) Op_val(Indices), Wosize_val(Indices), + String_val(Name)); +} + +/* llvalue -> llvalue array -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_in_bounds_gep(LLVMValueRef Pointer, + value Indices, value Name, + value B) { + return LLVMBuildInBoundsGEP(Builder_val(B), Pointer, + (LLVMValueRef *) Op_val(Indices), + Wosize_val(Indices), String_val(Name)); +} + +/* llvalue -> int -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_struct_gep(LLVMValueRef Pointer, + value Index, value Name, + value B) { + return LLVMBuildStructGEP(Builder_val(B), Pointer, + Int_val(Index), String_val(Name)); +} + +/* string -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_global_string(value Str, value Name, value B) { + return LLVMBuildGlobalString(Builder_val(B), String_val(Str), + String_val(Name)); +} + +/* string -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_global_stringptr(value Str, value Name, + value B) { + return LLVMBuildGlobalStringPtr(Builder_val(B), String_val(Str), + String_val(Name)); +} + +/*--... Casts ..............................................................--*/ + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_trunc(LLVMValueRef X, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildTrunc(Builder_val(B), X, Ty, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_zext(LLVMValueRef X, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildZExt(Builder_val(B), X, Ty, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_sext(LLVMValueRef X, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildSExt(Builder_val(B), X, Ty, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_fptoui(LLVMValueRef X, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildFPToUI(Builder_val(B), X, Ty, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_fptosi(LLVMValueRef X, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildFPToSI(Builder_val(B), X, Ty, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_uitofp(LLVMValueRef X, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildUIToFP(Builder_val(B), X, Ty, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_sitofp(LLVMValueRef X, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildSIToFP(Builder_val(B), X, Ty, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_fptrunc(LLVMValueRef X, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildFPTrunc(Builder_val(B), X, Ty, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_fpext(LLVMValueRef X, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildFPExt(Builder_val(B), X, Ty, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_prttoint(LLVMValueRef X, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildPtrToInt(Builder_val(B), X, Ty, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_inttoptr(LLVMValueRef X, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildIntToPtr(Builder_val(B), X, Ty, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_bitcast(LLVMValueRef X, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildBitCast(Builder_val(B), X, Ty, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_zext_or_bitcast(LLVMValueRef X, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildZExtOrBitCast(Builder_val(B), X, Ty, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_sext_or_bitcast(LLVMValueRef X, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildSExtOrBitCast(Builder_val(B), X, Ty, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_trunc_or_bitcast(LLVMValueRef X, + LLVMTypeRef Ty, value Name, + value B) { + return LLVMBuildTruncOrBitCast(Builder_val(B), X, Ty, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_pointercast(LLVMValueRef X, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildPointerCast(Builder_val(B), X, Ty, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_intcast(LLVMValueRef X, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildIntCast(Builder_val(B), X, Ty, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_fpcast(LLVMValueRef X, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildFPCast(Builder_val(B), X, Ty, String_val(Name)); +} + +/*--... Comparisons ........................................................--*/ + +/* Icmp.t -> llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_icmp(value Pred, + LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildICmp(Builder_val(B), Int_val(Pred) + LLVMIntEQ, LHS, RHS, + String_val(Name)); +} + +/* Fcmp.t -> llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_fcmp(value Pred, + LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildFCmp(Builder_val(B), Int_val(Pred), LHS, RHS, + String_val(Name)); +} + +/*--... Miscellaneous instructions .........................................--*/ + +/* (llvalue * llbasicblock) list -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_phi(value Incoming, value Name, value B) { + value Hd, Tl; + LLVMValueRef FirstValue, PhiNode; + + assert(Incoming != Val_int(0) && "Empty list passed to Llvm.build_phi!"); + + Hd = Field(Incoming, 0); + FirstValue = (LLVMValueRef) Field(Hd, 0); + PhiNode = LLVMBuildPhi(Builder_val(B), LLVMTypeOf(FirstValue), + String_val(Name)); + + for (Tl = Incoming; Tl != Val_int(0); Tl = Field(Tl, 1)) { + value Hd = Field(Tl, 0); + LLVMAddIncoming(PhiNode, (LLVMValueRef*) &Field(Hd, 0), + (LLVMBasicBlockRef*) &Field(Hd, 1), 1); + } + + return PhiNode; +} + +/* llvalue -> llvalue array -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_call(LLVMValueRef Fn, value Params, + value Name, value B) { + return LLVMBuildCall(Builder_val(B), Fn, (LLVMValueRef *) Op_val(Params), + Wosize_val(Params), String_val(Name)); +} + +/* llvalue -> llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_select(LLVMValueRef If, + LLVMValueRef Then, LLVMValueRef Else, + value Name, value B) { + return LLVMBuildSelect(Builder_val(B), If, Then, Else, String_val(Name)); +} + +/* llvalue -> lltype -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_va_arg(LLVMValueRef List, LLVMTypeRef Ty, + value Name, value B) { + return LLVMBuildVAArg(Builder_val(B), List, Ty, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_extractelement(LLVMValueRef Vec, + LLVMValueRef Idx, + value Name, value B) { + return LLVMBuildExtractElement(Builder_val(B), Vec, Idx, String_val(Name)); +} + +/* llvalue -> llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_insertelement(LLVMValueRef Vec, + LLVMValueRef Element, + LLVMValueRef Idx, + value Name, value B) { + return LLVMBuildInsertElement(Builder_val(B), Vec, Element, Idx, + String_val(Name)); +} + +/* llvalue -> llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_shufflevector(LLVMValueRef V1, LLVMValueRef V2, + LLVMValueRef Mask, + value Name, value B) { + return LLVMBuildShuffleVector(Builder_val(B), V1, V2, Mask, String_val(Name)); +} + +/* llvalue -> int -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_extractvalue(LLVMValueRef Aggregate, + value Idx, value Name, value B) { + return LLVMBuildExtractValue(Builder_val(B), Aggregate, Int_val(Idx), + String_val(Name)); +} + +/* llvalue -> llvalue -> int -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_insertvalue(LLVMValueRef Aggregate, + LLVMValueRef Val, value Idx, + value Name, value B) { + return LLVMBuildInsertValue(Builder_val(B), Aggregate, Val, Int_val(Idx), + String_val(Name)); +} + +/* llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_is_null(LLVMValueRef Val, value Name, + value B) { + return LLVMBuildIsNull(Builder_val(B), Val, String_val(Name)); +} + +/* llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_is_not_null(LLVMValueRef Val, value Name, + value B) { + return LLVMBuildIsNotNull(Builder_val(B), Val, String_val(Name)); +} + +/* llvalue -> llvalue -> string -> llbuilder -> llvalue */ +CAMLprim LLVMValueRef llvm_build_ptrdiff(LLVMValueRef LHS, LLVMValueRef RHS, + value Name, value B) { + return LLVMBuildPtrDiff(Builder_val(B), LHS, RHS, String_val(Name)); +} + +/*===-- Memory buffers ----------------------------------------------------===*/ + +/* string -> llmemorybuffer + raises IoError msg on error */ +CAMLprim value llvm_memorybuffer_of_file(value Path) { + CAMLparam1(Path); + char *Message; + LLVMMemoryBufferRef MemBuf; + + if (LLVMCreateMemoryBufferWithContentsOfFile(String_val(Path), + &MemBuf, &Message)) + llvm_raise(llvm_ioerror_exn, Message); + + CAMLreturn((value) MemBuf); +} + +/* unit -> llmemorybuffer + raises IoError msg on error */ +CAMLprim LLVMMemoryBufferRef llvm_memorybuffer_of_stdin(value Unit) { + char *Message; + LLVMMemoryBufferRef MemBuf; + + if (LLVMCreateMemoryBufferWithSTDIN(&MemBuf, &Message)) + llvm_raise(llvm_ioerror_exn, Message); + + return MemBuf; +} + +/* ?name:string -> string -> llmemorybuffer */ +CAMLprim LLVMMemoryBufferRef llvm_memorybuffer_of_string(value Name, value String) { + const char *NameCStr; + if(Name == Val_int(0)) + NameCStr = ""; + else + NameCStr = String_val(Field(Name, 0)); + + LLVMMemoryBufferRef MemBuf; + MemBuf = LLVMCreateMemoryBufferWithMemoryRangeCopy( + String_val(String), caml_string_length(String), NameCStr); + + return MemBuf; +} + +/* llmemorybuffer -> string */ +CAMLprim value llvm_memorybuffer_as_string(LLVMMemoryBufferRef MemBuf) { + value String = caml_alloc_string(LLVMGetBufferSize(MemBuf)); + memcpy(String_val(String), LLVMGetBufferStart(MemBuf), + LLVMGetBufferSize(MemBuf)); + + return String; +} + +/* llmemorybuffer -> unit */ +CAMLprim value llvm_memorybuffer_dispose(LLVMMemoryBufferRef MemBuf) { + LLVMDisposeMemoryBuffer(MemBuf); + return Val_unit; +} + +/*===-- Pass Managers -----------------------------------------------------===*/ + +/* unit -> [ `Module ] PassManager.t */ +CAMLprim LLVMPassManagerRef llvm_passmanager_create(value Unit) { + return LLVMCreatePassManager(); +} + +/* llmodule -> [ `Function ] PassManager.t -> bool */ +CAMLprim value llvm_passmanager_run_module(LLVMModuleRef M, + LLVMPassManagerRef PM) { + return Val_bool(LLVMRunPassManager(PM, M)); +} + +/* [ `Function ] PassManager.t -> bool */ +CAMLprim value llvm_passmanager_initialize(LLVMPassManagerRef FPM) { + return Val_bool(LLVMInitializeFunctionPassManager(FPM)); +} + +/* llvalue -> [ `Function ] PassManager.t -> bool */ +CAMLprim value llvm_passmanager_run_function(LLVMValueRef F, + LLVMPassManagerRef FPM) { + return Val_bool(LLVMRunFunctionPassManager(FPM, F)); +} + +/* [ `Function ] PassManager.t -> bool */ +CAMLprim value llvm_passmanager_finalize(LLVMPassManagerRef FPM) { + return Val_bool(LLVMFinalizeFunctionPassManager(FPM)); +} + +/* PassManager.any PassManager.t -> unit */ +CAMLprim value llvm_passmanager_dispose(LLVMPassManagerRef PM) { + LLVMDisposePassManager(PM); + return Val_unit; +} diff --git a/bindings/ocaml/target/Makefile b/bindings/ocaml/target/Makefile new file mode 100644 index 00000000..3c48cd8f --- /dev/null +++ b/bindings/ocaml/target/Makefile @@ -0,0 +1,19 @@ +##===- bindings/ocaml/target/Makefile ----------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +# +# This is the makefile for the Objective Caml Llvm_target interface. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../../.. +LIBRARYNAME := llvm_target +UsedComponents := target +UsedOcamlInterfaces := llvm + +include ../Makefile.ocaml diff --git a/bindings/ocaml/target/llvm_target.ml b/bindings/ocaml/target/llvm_target.ml new file mode 100644 index 00000000..974bd49c --- /dev/null +++ b/bindings/ocaml/target/llvm_target.ml @@ -0,0 +1,138 @@ +(*===-- llvm_target.ml - LLVM OCaml Interface ------------------*- OCaml -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +module Endian = struct + type t = + | Big + | Little +end + +module CodeGenOptLevel = struct + type t = + | None + | Less + | Default + | Aggressive +end + +module RelocMode = struct + type t = + | Default + | Static + | PIC + | DynamicNoPIC +end + +module CodeModel = struct + type t = + | Default + | JITDefault + | Small + | Kernel + | Medium + | Large +end + +module CodeGenFileType = struct + type t = + | AssemblyFile + | ObjectFile +end + +exception Error of string + +external register_exns : exn -> unit = "llvm_register_target_exns" +let _ = register_exns (Error "") + +module DataLayout = struct + type t + + external of_string : string -> t = "llvm_datalayout_of_string" + external as_string : t -> string = "llvm_datalayout_as_string" + external add_to_pass_manager : [ t -> unit + = "llvm_datalayout_add_to_pass_manager" + external byte_order : t -> Endian.t = "llvm_datalayout_byte_order" + external pointer_size : t -> int = "llvm_datalayout_pointer_size" + external intptr_type : Llvm.llcontext -> t -> Llvm.lltype + = "llvm_datalayout_intptr_type" + external qualified_pointer_size : int -> t -> int + = "llvm_datalayout_qualified_pointer_size" + external qualified_intptr_type : Llvm.llcontext -> int -> t -> Llvm.lltype + = "llvm_datalayout_qualified_intptr_type" + external size_in_bits : Llvm.lltype -> t -> Int64.t + = "llvm_datalayout_size_in_bits" + external store_size : Llvm.lltype -> t -> Int64.t + = "llvm_datalayout_store_size" + external abi_size : Llvm.lltype -> t -> Int64.t + = "llvm_datalayout_abi_size" + external abi_align : Llvm.lltype -> t -> int + = "llvm_datalayout_abi_align" + external stack_align : Llvm.lltype -> t -> int + = "llvm_datalayout_stack_align" + external preferred_align : Llvm.lltype -> t -> int + = "llvm_datalayout_preferred_align" + external preferred_align_of_global : Llvm.llvalue -> t -> int + = "llvm_datalayout_preferred_align_of_global" + external element_at_offset : Llvm.lltype -> Int64.t -> t -> int + = "llvm_datalayout_element_at_offset" + external offset_of_element : Llvm.lltype -> int -> t -> Int64.t + = "llvm_datalayout_offset_of_element" +end + +module Target = struct + type t + + external default_triple : unit -> string = "llvm_target_default_triple" + external first : unit -> t option = "llvm_target_first" + external succ : t -> t option = "llvm_target_succ" + external by_name : string -> t option = "llvm_target_by_name" + external by_triple : string -> t = "llvm_target_by_triple" + external name : t -> string = "llvm_target_name" + external description : t -> string = "llvm_target_description" + external has_jit : t -> bool = "llvm_target_has_jit" + external has_target_machine : t -> bool = "llvm_target_has_target_machine" + external has_asm_backend : t -> bool = "llvm_target_has_asm_backend" + + let all () = + let rec step elem lst = + match elem with + | Some target -> step (succ target) (target :: lst) + | None -> lst + in + step (first ()) [] +end + +module TargetMachine = struct + type t + + external create : triple:string -> ?cpu:string -> ?features:string -> + ?level:CodeGenOptLevel.t -> ?reloc_mode:RelocMode.t -> + ?code_model:CodeModel.t -> Target.t -> t + = "llvm_create_targetmachine_bytecode" + "llvm_create_targetmachine_native" + external target : t -> Target.t + = "llvm_targetmachine_target" + external triple : t -> string + = "llvm_targetmachine_triple" + external cpu : t -> string + = "llvm_targetmachine_cpu" + external features : t -> string + = "llvm_targetmachine_features" + external data_layout : t -> DataLayout.t + = "llvm_targetmachine_data_layout" + external set_verbose_asm : bool -> t -> unit + = "llvm_targetmachine_set_verbose_asm" + external emit_to_file : Llvm.llmodule -> CodeGenFileType.t -> string -> + t -> unit + = "llvm_targetmachine_emit_to_file" + external emit_to_memory_buffer : Llvm.llmodule -> CodeGenFileType.t -> + t -> Llvm.llmemorybuffer + = "llvm_targetmachine_emit_to_memory_buffer" +end diff --git a/bindings/ocaml/target/llvm_target.mli b/bindings/ocaml/target/llvm_target.mli new file mode 100644 index 00000000..4f5e7171 --- /dev/null +++ b/bindings/ocaml/target/llvm_target.mli @@ -0,0 +1,222 @@ +(*===-- llvm_target.mli - LLVM OCaml Interface -----------------*- OCaml -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +(** Target Information. + + This interface provides an OCaml API for LLVM target information, + the classes in the Target library. *) + +module Endian : sig + type t = + | Big + | Little +end + +module CodeGenOptLevel : sig + type t = + | None + | Less + | Default + | Aggressive +end + +module RelocMode : sig + type t = + | Default + | Static + | PIC + | DynamicNoPIC +end + +module CodeModel : sig + type t = + | Default + | JITDefault + | Small + | Kernel + | Medium + | Large +end + +module CodeGenFileType : sig + type t = + | AssemblyFile + | ObjectFile +end + +(** {6 Exceptions} *) + +exception Error of string + +(** {6 Data Layout} *) + +module DataLayout : sig + type t + + (** [of_string rep] parses the data layout string representation [rep]. + See the constructor [llvm::DataLayout::DataLayout]. *) + val of_string : string -> t + + (** [as_string dl] is the string representation of the data layout [dl]. + See the method [llvm::DataLayout::getStringRepresentation]. *) + val as_string : t -> string + + (** [add_to_pass_manager dl pm] adds the target data [dl] to + the pass manager [pm]. + See the method [llvm::PassManagerBase::add]. *) + val add_to_pass_manager : [ + t -> unit + + (** Returns the byte order of a target, either [Endian.Big] or + [Endian.Little]. + See the method [llvm::DataLayout::isLittleEndian]. *) + val byte_order : t -> Endian.t + + (** Returns the pointer size in bytes for a target. + See the method [llvm::DataLayout::getPointerSize]. *) + val pointer_size : t -> int + + (** Returns the integer type that is the same size as a pointer on a target. + See the method [llvm::DataLayout::getIntPtrType]. *) + val intptr_type : Llvm.llcontext -> t -> Llvm.lltype + + (** Returns the pointer size in bytes for a target in a given address space. + See the method [llvm::DataLayout::getPointerSize]. *) + val qualified_pointer_size : int -> t -> int + + (** Returns the integer type that is the same size as a pointer on a target + in a given address space. + See the method [llvm::DataLayout::getIntPtrType]. *) + val qualified_intptr_type : Llvm.llcontext -> int -> t -> Llvm.lltype + + (** Computes the size of a type in bits for a target. + See the method [llvm::DataLayout::getTypeSizeInBits]. *) + val size_in_bits : Llvm.lltype -> t -> Int64.t + + (** Computes the storage size of a type in bytes for a target. + See the method [llvm::DataLayout::getTypeStoreSize]. *) + val store_size : Llvm.lltype -> t -> Int64.t + + (** Computes the ABI size of a type in bytes for a target. + See the method [llvm::DataLayout::getTypeAllocSize]. *) + val abi_size : Llvm.lltype -> t -> Int64.t + + (** Computes the ABI alignment of a type in bytes for a target. + See the method [llvm::DataLayout::getTypeABISize]. *) + val abi_align : Llvm.lltype -> t -> int + + (** Computes the call frame alignment of a type in bytes for a target. + See the method [llvm::DataLayout::getTypeABISize]. *) + val stack_align : Llvm.lltype -> t -> int + + (** Computes the preferred alignment of a type in bytes for a target. + See the method [llvm::DataLayout::getTypeABISize]. *) + val preferred_align : Llvm.lltype -> t -> int + + (** Computes the preferred alignment of a global variable in bytes for + a target. See the method [llvm::DataLayout::getPreferredAlignment]. *) + val preferred_align_of_global : Llvm.llvalue -> t -> int + + (** Computes the structure element that contains the byte offset for a target. + See the method [llvm::StructLayout::getElementContainingOffset]. *) + val element_at_offset : Llvm.lltype -> Int64.t -> t -> int + + (** Computes the byte offset of the indexed struct element for a target. + See the method [llvm::StructLayout::getElementContainingOffset]. *) + val offset_of_element : Llvm.lltype -> int -> t -> Int64.t +end + +(** {6 Target} *) + +module Target : sig + type t + + (** [default_triple ()] returns the default target triple for current + platform. *) + val default_triple : unit -> string + + (** [first ()] returns the first target in the registered targets + list, or [None]. *) + val first : unit -> t option + + (** [succ t] returns the next target after [t], or [None] + if [t] was the last target. *) + val succ : t -> t option + + (** [all ()] returns a list of known targets. *) + val all : unit -> t list + + (** [by_name name] returns [Some t] if a target [t] named [name] is + registered, or [None] otherwise. *) + val by_name : string -> t option + + (** [by_triple triple] returns a target for a triple [triple], or raises + [Error] if [triple] does not correspond to a registered target. *) + val by_triple : string -> t + + (** Returns the name of a target. See [llvm::Target::getName]. *) + val name : t -> string + + (** Returns the description of a target. + See [llvm::Target::getDescription]. *) + val description : t -> string + + (** Returns [true] if the target has a JIT. *) + val has_jit : t -> bool + + (** Returns [true] if the target has a target machine associated. *) + val has_target_machine : t -> bool + + (** Returns [true] if the target has an ASM backend (required for + emitting output). *) + val has_asm_backend : t -> bool +end + +(** {6 Target Machine} *) + +module TargetMachine : sig + type t + + (** Creates a new target machine. + See [llvm::Target::createTargetMachine]. *) + val create : triple:string -> ?cpu:string -> ?features:string -> + ?level:CodeGenOptLevel.t -> ?reloc_mode:RelocMode.t -> + ?code_model:CodeModel.t -> Target.t -> t + + (** Returns the Target used in a TargetMachine *) + val target : t -> Target.t + + (** Returns the triple used while creating this target machine. See + [llvm::TargetMachine::getTriple]. *) + val triple : t -> string + + (** Returns the CPU used while creating this target machine. See + [llvm::TargetMachine::getCPU]. *) + val cpu : t -> string + + (** Returns the feature string used while creating this target machine. See + [llvm::TargetMachine::getFeatureString]. *) + val features : t -> string + + (** Returns the data layout of this target machine. *) + val data_layout : t -> DataLayout.t + + (** Sets the assembly verbosity of this target machine. + See [llvm::TargetMachine::setAsmVerbosity]. *) + val set_verbose_asm : bool -> t -> unit + + (** Emits assembly or object data for the given module to the given + file or raise [Error]. *) + val emit_to_file : Llvm.llmodule -> CodeGenFileType.t -> string -> t -> unit + + (** Emits assembly or object data for the given module to a fresh memory + buffer or raise [Error]. *) + val emit_to_memory_buffer : Llvm.llmodule -> CodeGenFileType.t -> t -> + Llvm.llmemorybuffer +end diff --git a/bindings/ocaml/target/target_ocaml.c b/bindings/ocaml/target/target_ocaml.c new file mode 100644 index 00000000..9e8778aa --- /dev/null +++ b/bindings/ocaml/target/target_ocaml.c @@ -0,0 +1,390 @@ +/*===-- target_ocaml.c - LLVM OCaml Glue ------------------------*- C++ -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This file glues LLVM's OCaml interface to its C interface. These functions *| +|* are by and large transparent wrappers to the corresponding C functions. *| +|* *| +|* Note that these functions intentionally take liberties with the CAMLparamX *| +|* macros, since most of the parameters are not GC heap objects. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#include "llvm-c/Target.h" +#include "llvm-c/TargetMachine.h" +#include "caml/alloc.h" +#include "caml/fail.h" +#include "caml/memory.h" +#include "caml/custom.h" + +/*===---- Exceptions ------------------------------------------------------===*/ + +static value llvm_target_error_exn; + +CAMLprim value llvm_register_target_exns(value Error) { + llvm_target_error_exn = Field(Error, 0); + register_global_root(&llvm_target_error_exn); + return Val_unit; +} + +static void llvm_raise(value Prototype, char *Message) { + CAMLparam1(Prototype); + CAMLlocal1(CamlMessage); + + CamlMessage = copy_string(Message); + LLVMDisposeMessage(Message); + + raise_with_arg(Prototype, CamlMessage); + abort(); /* NOTREACHED */ +#ifdef CAMLnoreturn + CAMLnoreturn; /* Silences warnings, but is missing in some versions. */ +#endif +} + +static value llvm_string_of_message(char* Message) { + value String = caml_copy_string(Message); + LLVMDisposeMessage(Message); + + return String; +} + +/*===---- Data Layout -----------------------------------------------------===*/ + +#define DataLayout_val(v) (*(LLVMTargetDataRef *)(Data_custom_val(v))) + +static void llvm_finalize_data_layout(value DataLayout) { + LLVMDisposeTargetData(DataLayout_val(DataLayout)); +} + +static struct custom_operations llvm_data_layout_ops = { + (char *) "LLVMDataLayout", + llvm_finalize_data_layout, + custom_compare_default, + custom_hash_default, + custom_serialize_default, + custom_deserialize_default +#ifdef custom_compare_ext_default + , custom_compare_ext_default +#endif +}; + +value llvm_alloc_data_layout(LLVMTargetDataRef DataLayout) { + value V = alloc_custom(&llvm_data_layout_ops, sizeof(LLVMTargetDataRef), + 0, 1); + DataLayout_val(V) = DataLayout; + return V; +} + +/* string -> DataLayout.t */ +CAMLprim value llvm_datalayout_of_string(value StringRep) { + return llvm_alloc_data_layout(LLVMCreateTargetData(String_val(StringRep))); +} + +/* DataLayout.t -> string */ +CAMLprim value llvm_datalayout_as_string(value TD) { + char *StringRep = LLVMCopyStringRepOfTargetData(DataLayout_val(TD)); + value Copy = copy_string(StringRep); + LLVMDisposeMessage(StringRep); + return Copy; +} + +/* [ DataLayout.t -> unit */ +CAMLprim value llvm_datalayout_add_to_pass_manager(LLVMPassManagerRef PM, + value DL) { + LLVMAddTargetData(DataLayout_val(DL), PM); + return Val_unit; +} + +/* DataLayout.t -> Endian.t */ +CAMLprim value llvm_datalayout_byte_order(value DL) { + return Val_int(LLVMByteOrder(DataLayout_val(DL))); +} + +/* DataLayout.t -> int */ +CAMLprim value llvm_datalayout_pointer_size(value DL) { + return Val_int(LLVMPointerSize(DataLayout_val(DL))); +} + +/* Llvm.llcontext -> DataLayout.t -> Llvm.lltype */ +CAMLprim LLVMTypeRef llvm_datalayout_intptr_type(LLVMContextRef C, value DL) { + return LLVMIntPtrTypeInContext(C, DataLayout_val(DL));; +} + +/* int -> DataLayout.t -> int */ +CAMLprim value llvm_datalayout_qualified_pointer_size(value AS, value DL) { + return Val_int(LLVMPointerSizeForAS(DataLayout_val(DL), Int_val(AS))); +} + +/* Llvm.llcontext -> int -> DataLayout.t -> Llvm.lltype */ +CAMLprim LLVMTypeRef llvm_datalayout_qualified_intptr_type(LLVMContextRef C, + value AS, + value DL) { + return LLVMIntPtrTypeForASInContext(C, DataLayout_val(DL), Int_val(AS)); +} + +/* Llvm.lltype -> DataLayout.t -> Int64.t */ +CAMLprim value llvm_datalayout_size_in_bits(LLVMTypeRef Ty, value DL) { + return caml_copy_int64(LLVMSizeOfTypeInBits(DataLayout_val(DL), Ty)); +} + +/* Llvm.lltype -> DataLayout.t -> Int64.t */ +CAMLprim value llvm_datalayout_store_size(LLVMTypeRef Ty, value DL) { + return caml_copy_int64(LLVMStoreSizeOfType(DataLayout_val(DL), Ty)); +} + +/* Llvm.lltype -> DataLayout.t -> Int64.t */ +CAMLprim value llvm_datalayout_abi_size(LLVMTypeRef Ty, value DL) { + return caml_copy_int64(LLVMABISizeOfType(DataLayout_val(DL), Ty)); +} + +/* Llvm.lltype -> DataLayout.t -> int */ +CAMLprim value llvm_datalayout_abi_align(LLVMTypeRef Ty, value DL) { + return Val_int(LLVMABIAlignmentOfType(DataLayout_val(DL), Ty)); +} + +/* Llvm.lltype -> DataLayout.t -> int */ +CAMLprim value llvm_datalayout_stack_align(LLVMTypeRef Ty, value DL) { + return Val_int(LLVMCallFrameAlignmentOfType(DataLayout_val(DL), Ty)); +} + +/* Llvm.lltype -> DataLayout.t -> int */ +CAMLprim value llvm_datalayout_preferred_align(LLVMTypeRef Ty, value DL) { + return Val_int(LLVMPreferredAlignmentOfType(DataLayout_val(DL), Ty)); +} + +/* Llvm.llvalue -> DataLayout.t -> int */ +CAMLprim value llvm_datalayout_preferred_align_of_global(LLVMValueRef GlobalVar, + value DL) { + return Val_int(LLVMPreferredAlignmentOfGlobal(DataLayout_val(DL), GlobalVar)); +} + +/* Llvm.lltype -> Int64.t -> DataLayout.t -> int */ +CAMLprim value llvm_datalayout_element_at_offset(LLVMTypeRef Ty, value Offset, + value DL) { + return Val_int(LLVMElementAtOffset(DataLayout_val(DL), Ty, + Int64_val(Offset))); +} + +/* Llvm.lltype -> int -> DataLayout.t -> Int64.t */ +CAMLprim value llvm_datalayout_offset_of_element(LLVMTypeRef Ty, value Index, + value DL) { + return caml_copy_int64(LLVMOffsetOfElement(DataLayout_val(DL), Ty, + Int_val(Index))); +} + +/*===---- Target ----------------------------------------------------------===*/ + +static value llvm_target_option(LLVMTargetRef Target) { + if(Target != NULL) { + value Result = caml_alloc_small(1, 0); + Store_field(Result, 0, (value) Target); + return Result; + } + + return Val_int(0); +} + +/* unit -> string */ +CAMLprim value llvm_target_default_triple(value Unit) { + char *TripleCStr = LLVMGetDefaultTargetTriple(); + value TripleStr = caml_copy_string(TripleCStr); + LLVMDisposeMessage(TripleCStr); + + return TripleStr; +} + +/* unit -> Target.t option */ +CAMLprim value llvm_target_first(value Unit) { + return llvm_target_option(LLVMGetFirstTarget()); +} + +/* Target.t -> Target.t option */ +CAMLprim value llvm_target_succ(LLVMTargetRef Target) { + return llvm_target_option(LLVMGetNextTarget(Target)); +} + +/* string -> Target.t option */ +CAMLprim value llvm_target_by_name(value Name) { + return llvm_target_option(LLVMGetTargetFromName(String_val(Name))); +} + +/* string -> Target.t */ +CAMLprim LLVMTargetRef llvm_target_by_triple(value Triple) { + LLVMTargetRef T; + char *Error; + + if(LLVMGetTargetFromTriple(String_val(Triple), &T, &Error)) + llvm_raise(llvm_target_error_exn, Error); + + return T; +} + +/* Target.t -> string */ +CAMLprim value llvm_target_name(LLVMTargetRef Target) { + return caml_copy_string(LLVMGetTargetName(Target)); +} + +/* Target.t -> string */ +CAMLprim value llvm_target_description(LLVMTargetRef Target) { + return caml_copy_string(LLVMGetTargetDescription(Target)); +} + +/* Target.t -> bool */ +CAMLprim value llvm_target_has_jit(LLVMTargetRef Target) { + return Val_bool(LLVMTargetHasJIT(Target)); +} + +/* Target.t -> bool */ +CAMLprim value llvm_target_has_target_machine(LLVMTargetRef Target) { + return Val_bool(LLVMTargetHasTargetMachine(Target)); +} + +/* Target.t -> bool */ +CAMLprim value llvm_target_has_asm_backend(LLVMTargetRef Target) { + return Val_bool(LLVMTargetHasAsmBackend(Target)); +} + +/*===---- Target Machine --------------------------------------------------===*/ + +#define TargetMachine_val(v) (*(LLVMTargetMachineRef *)(Data_custom_val(v))) + +static void llvm_finalize_target_machine(value Machine) { + LLVMDisposeTargetMachine(TargetMachine_val(Machine)); +} + +static struct custom_operations llvm_target_machine_ops = { + (char *) "LLVMTargetMachine", + llvm_finalize_target_machine, + custom_compare_default, + custom_hash_default, + custom_serialize_default, + custom_deserialize_default +#ifdef custom_compare_ext_default + , custom_compare_ext_default +#endif +}; + +static value llvm_alloc_targetmachine(LLVMTargetMachineRef Machine) { + value V = alloc_custom(&llvm_target_machine_ops, sizeof(LLVMTargetMachineRef), + 0, 1); + TargetMachine_val(V) = Machine; + return V; +} + +/* triple:string -> ?cpu:string -> ?features:string + ?level:CodeGenOptLevel.t -> ?reloc_mode:RelocMode.t + ?code_model:CodeModel.t -> Target.t -> TargetMachine.t */ +CAMLprim value llvm_create_targetmachine_native(value Triple, value CPU, + value Features, value OptLevel, value RelocMode, + value CodeModel, LLVMTargetRef Target) { + LLVMTargetMachineRef Machine; + const char *CPUStr = "", *FeaturesStr = ""; + LLVMCodeGenOptLevel OptLevelEnum = LLVMCodeGenLevelDefault; + LLVMRelocMode RelocModeEnum = LLVMRelocDefault; + LLVMCodeModel CodeModelEnum = LLVMCodeModelDefault; + + if(CPU != Val_int(0)) + CPUStr = String_val(Field(CPU, 0)); + if(Features != Val_int(0)) + FeaturesStr = String_val(Field(Features, 0)); + if(OptLevel != Val_int(0)) + OptLevelEnum = Int_val(Field(OptLevel, 0)); + if(RelocMode != Val_int(0)) + RelocModeEnum = Int_val(Field(RelocMode, 0)); + if(CodeModel != Val_int(0)) + CodeModelEnum = Int_val(Field(CodeModel, 0)); + + Machine = LLVMCreateTargetMachine(Target, String_val(Triple), CPUStr, + FeaturesStr, OptLevelEnum, RelocModeEnum, CodeModelEnum); + + return llvm_alloc_targetmachine(Machine); +} + +CAMLprim value llvm_create_targetmachine_bytecode(value *argv, int argn) { + return llvm_create_targetmachine_native(argv[0], argv[1], argv[2], argv[3], + argv[4], argv[5], (LLVMTargetRef) argv[6]); +} + +/* TargetMachine.t -> Target.t */ +CAMLprim LLVMTargetRef llvm_targetmachine_target(value Machine) { + return LLVMGetTargetMachineTarget(TargetMachine_val(Machine)); +} + +/* TargetMachine.t -> string */ +CAMLprim value llvm_targetmachine_triple(value Machine) { + return llvm_string_of_message(LLVMGetTargetMachineTriple( + TargetMachine_val(Machine))); +} + +/* TargetMachine.t -> string */ +CAMLprim value llvm_targetmachine_cpu(value Machine) { + return llvm_string_of_message(LLVMGetTargetMachineCPU( + TargetMachine_val(Machine))); +} + +/* TargetMachine.t -> string */ +CAMLprim value llvm_targetmachine_features(value Machine) { + return llvm_string_of_message(LLVMGetTargetMachineFeatureString( + TargetMachine_val(Machine))); +} + +/* TargetMachine.t -> DataLayout.t */ +CAMLprim value llvm_targetmachine_data_layout(value Machine) { + CAMLparam1(Machine); + CAMLlocal1(DataLayout); + + /* LLVMGetTargetMachineData returns a pointer owned by the TargetMachine, + so it is impossible to wrap it with llvm_alloc_target_data, which assumes + that OCaml owns the pointer. */ + LLVMTargetDataRef OrigDataLayout; + OrigDataLayout = LLVMGetTargetMachineData(TargetMachine_val(Machine)); + + char* TargetDataCStr; + TargetDataCStr = LLVMCopyStringRepOfTargetData(OrigDataLayout); + DataLayout = llvm_alloc_data_layout(LLVMCreateTargetData(TargetDataCStr)); + LLVMDisposeMessage(TargetDataCStr); + + CAMLreturn(DataLayout); +} + +/* TargetMachine.t -> bool -> unit */ +CAMLprim value llvm_targetmachine_set_verbose_asm(value Machine, value Verb) { + LLVMSetTargetMachineAsmVerbosity(TargetMachine_val(Machine), Bool_val(Verb)); + return Val_unit; +} + +/* Llvm.llmodule -> CodeGenFileType.t -> string -> TargetMachine.t -> unit */ +CAMLprim value llvm_targetmachine_emit_to_file(LLVMModuleRef Module, + value FileType, value FileName, value Machine) { + char* ErrorMessage; + + if(LLVMTargetMachineEmitToFile(TargetMachine_val(Machine), Module, + String_val(FileName), Int_val(FileType), + &ErrorMessage)) { + llvm_raise(llvm_target_error_exn, ErrorMessage); + } + + return Val_unit; +} + +/* Llvm.llmodule -> CodeGenFileType.t -> TargetMachine.t -> + Llvm.llmemorybuffer */ +CAMLprim LLVMMemoryBufferRef llvm_targetmachine_emit_to_memory_buffer( + LLVMModuleRef Module, value FileType, + value Machine) { + char* ErrorMessage; + LLVMMemoryBufferRef Buffer; + + if(LLVMTargetMachineEmitToMemoryBuffer(TargetMachine_val(Machine), Module, + Int_val(FileType), &ErrorMessage, + &Buffer)) { + llvm_raise(llvm_target_error_exn, ErrorMessage); + } + + return Buffer; +} diff --git a/bindings/ocaml/transforms/Makefile b/bindings/ocaml/transforms/Makefile new file mode 100644 index 00000000..92c8396d --- /dev/null +++ b/bindings/ocaml/transforms/Makefile @@ -0,0 +1,18 @@ +##===- bindings/ocaml/transforms/Makefile ------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../../.. +DIRS = scalar ipo vectorize passmgr_builder + +ocamldoc: + $(Verb) for i in $(DIRS) ; do \ + $(MAKE) -C $$i ocamldoc; \ + done + +include $(LEVEL)/Makefile.common diff --git a/bindings/ocaml/transforms/ipo/Makefile b/bindings/ocaml/transforms/ipo/Makefile new file mode 100644 index 00000000..ed67a7cb --- /dev/null +++ b/bindings/ocaml/transforms/ipo/Makefile @@ -0,0 +1,19 @@ +##===- bindings/ocaml/transforms/scalar/Makefile -----------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +# +# This is the makefile for the Objective Caml Llvm_scalar_opts interface. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../../../.. +LIBRARYNAME := llvm_ipo +UsedComponents := ipo +UsedOcamlInterfaces := llvm + +include ../../Makefile.ocaml diff --git a/bindings/ocaml/transforms/ipo/ipo_ocaml.c b/bindings/ocaml/transforms/ipo/ipo_ocaml.c new file mode 100644 index 00000000..4ad8afbc --- /dev/null +++ b/bindings/ocaml/transforms/ipo/ipo_ocaml.c @@ -0,0 +1,110 @@ +/*===-- ipo_ocaml.c - LLVM OCaml Glue ---------------------------*- C++ -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This file glues LLVM's OCaml interface to its C interface. These functions *| +|* are by and large transparent wrappers to the corresponding C functions. *| +|* *| +|* Note that these functions intentionally take liberties with the CAMLparamX *| +|* macros, since most of the parameters are not GC heap objects. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#include "llvm-c/Transforms/IPO.h" +#include "caml/mlvalues.h" +#include "caml/misc.h" + +/* [`Module] Llvm.PassManager.t -> unit */ +CAMLprim value llvm_add_argument_promotion(LLVMPassManagerRef PM) { + LLVMAddArgumentPromotionPass(PM); + return Val_unit; +} + +/* [`Module] Llvm.PassManager.t -> unit */ +CAMLprim value llvm_add_constant_merge(LLVMPassManagerRef PM) { + LLVMAddConstantMergePass(PM); + return Val_unit; +} + +/* [`Module] Llvm.PassManager.t -> unit */ +CAMLprim value llvm_add_dead_arg_elimination(LLVMPassManagerRef PM) { + LLVMAddDeadArgEliminationPass(PM); + return Val_unit; +} + +/* [`Module] Llvm.PassManager.t -> unit */ +CAMLprim value llvm_add_function_attrs(LLVMPassManagerRef PM) { + LLVMAddFunctionAttrsPass(PM); + return Val_unit; +} + +/* [`Module] Llvm.PassManager.t -> unit */ +CAMLprim value llvm_add_function_inlining(LLVMPassManagerRef PM) { + LLVMAddFunctionInliningPass(PM); + return Val_unit; +} + +/* [`Module] Llvm.PassManager.t -> unit */ +CAMLprim value llvm_add_always_inliner(LLVMPassManagerRef PM) { + LLVMAddAlwaysInlinerPass(PM); + return Val_unit; +} + +/* [`Module] Llvm.PassManager.t -> unit */ +CAMLprim value llvm_add_always_inliner_pass(LLVMPassManagerRef PM) { + LLVMAddAlwaysInlinerPass(PM); + return Val_unit; +} + +/* [`Module] Llvm.PassManager.t -> unit */ +CAMLprim value llvm_add_global_dce(LLVMPassManagerRef PM) { + LLVMAddGlobalDCEPass(PM); + return Val_unit; +} + +/* [`Module] Llvm.PassManager.t -> unit */ +CAMLprim value llvm_add_global_optimizer(LLVMPassManagerRef PM) { + LLVMAddGlobalOptimizerPass(PM); + return Val_unit; +} + +/* [`Module] Llvm.PassManager.t -> unit */ +CAMLprim value llvm_add_ipc_propagation(LLVMPassManagerRef PM) { + LLVMAddIPConstantPropagationPass(PM); + return Val_unit; +} + +/* [`Module] Llvm.PassManager.t -> unit */ +CAMLprim value llvm_add_prune_eh(LLVMPassManagerRef PM) { + LLVMAddPruneEHPass(PM); + return Val_unit; +} + +/* [`Module] Llvm.PassManager.t -> unit */ +CAMLprim value llvm_add_ipsccp(LLVMPassManagerRef PM) { + LLVMAddIPSCCPPass(PM); + return Val_unit; +} + +/* [`Module] Llvm.PassManager.t -> bool -> unit */ +CAMLprim value llvm_add_internalize(LLVMPassManagerRef PM, value AllButMain) { + LLVMAddInternalizePass(PM, Bool_val(AllButMain)); + return Val_unit; +} + +/* [`Module] Llvm.PassManager.t -> unit */ +CAMLprim value llvm_add_strip_dead_prototypes(LLVMPassManagerRef PM) { + LLVMAddStripDeadPrototypesPass(PM); + return Val_unit; +} + +/* [`Module] Llvm.PassManager.t -> unit */ +CAMLprim value llvm_add_strip_symbols(LLVMPassManagerRef PM) { + LLVMAddStripSymbolsPass(PM); + return Val_unit; +} diff --git a/bindings/ocaml/transforms/ipo/llvm_ipo.ml b/bindings/ocaml/transforms/ipo/llvm_ipo.ml new file mode 100644 index 00000000..93f564a1 --- /dev/null +++ b/bindings/ocaml/transforms/ipo/llvm_ipo.ml @@ -0,0 +1,37 @@ +(*===-- llvm_ipo.ml - LLVM OCaml Interface --------------------*- OCaml -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +external add_argument_promotion : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_argument_promotion" +external add_constant_merge : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_constant_merge" +external add_dead_arg_elimination : + [ | `Module ] Llvm.PassManager.t -> unit = "llvm_add_dead_arg_elimination" +external add_function_attrs : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_function_attrs" +external add_function_inlining : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_function_inlining" +external add_always_inliner : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_always_inliner" +external add_global_dce : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_global_dce" +external add_global_optimizer : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_global_optimizer" +external add_ipc_propagation : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_ipc_propagation" +external add_prune_eh : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_prune_eh" +external add_ipsccp : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_ipsccp" +external add_internalize : [ | `Module ] Llvm.PassManager.t -> bool -> unit = + "llvm_add_internalize" +external add_strip_dead_prototypes : + [ | `Module ] Llvm.PassManager.t -> unit = "llvm_add_strip_dead_prototypes" +external add_strip_symbols : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_strip_symbols" diff --git a/bindings/ocaml/transforms/ipo/llvm_ipo.mli b/bindings/ocaml/transforms/ipo/llvm_ipo.mli new file mode 100644 index 00000000..1944c30b --- /dev/null +++ b/bindings/ocaml/transforms/ipo/llvm_ipo.mli @@ -0,0 +1,69 @@ +(*===-- llvm_ipo.mli - LLVM OCaml Interface -------------------*- OCaml -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +(** IPO Transforms. + + This interface provides an OCaml API for LLVM interprocedural optimizations, the + classes in the [LLVMIPO] library. *) + +(** See llvm::createAddArgumentPromotionPass *) +external add_argument_promotion : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_argument_promotion" + +(** See llvm::createConstantMergePass function. *) +external add_constant_merge : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_constant_merge" + +(** See llvm::createDeadArgEliminationPass function. *) +external add_dead_arg_elimination : + [ | `Module ] Llvm.PassManager.t -> unit = "llvm_add_dead_arg_elimination" + +(** See llvm::createFunctionAttrsPass function. *) +external add_function_attrs : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_function_attrs" + +(** See llvm::createFunctionInliningPass function. *) +external add_function_inlining : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_function_inlining" + +(** See llvm::createAlwaysInlinerPass function. *) +external add_always_inliner : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_always_inliner" + +(** See llvm::createGlobalDCEPass function. *) +external add_global_dce : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_global_dce" + +(** See llvm::createGlobalOptimizerPass function. *) +external add_global_optimizer : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_global_optimizer" + +(** See llvm::createIPConstantPropagationPass function. *) +external add_ipc_propagation : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_ipc_propagation" + +(** See llvm::createPruneEHPass function. *) +external add_prune_eh : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_prune_eh" + +(** See llvm::createIPSCCPPass function. *) +external add_ipsccp : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_ipsccp" + +(** See llvm::createInternalizePass function. *) +external add_internalize : [ | `Module ] Llvm.PassManager.t -> bool -> unit = + "llvm_add_internalize" + +(** See llvm::createStripDeadPrototypesPass function. *) +external add_strip_dead_prototypes : + [ | `Module ] Llvm.PassManager.t -> unit = "llvm_add_strip_dead_prototypes" + +(** See llvm::createStripSymbolsPass function. *) +external add_strip_symbols : [ | `Module ] Llvm.PassManager.t -> unit = + "llvm_add_strip_symbols" diff --git a/bindings/ocaml/transforms/passmgr_builder/Makefile b/bindings/ocaml/transforms/passmgr_builder/Makefile new file mode 100644 index 00000000..54099dbb --- /dev/null +++ b/bindings/ocaml/transforms/passmgr_builder/Makefile @@ -0,0 +1,19 @@ +##===- bindings/ocaml/transforms/passmgr_builder/Makefile --*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +# +# This is the makefile for the Objective Caml Llvm_passmgr_builder interface. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../../../.. +LIBRARYNAME := llvm_passmgr_builder +UsedComponents := ipo +UsedOcamlInterfaces := llvm + +include ../../Makefile.ocaml diff --git a/bindings/ocaml/transforms/passmgr_builder/llvm_passmgr_builder.ml b/bindings/ocaml/transforms/passmgr_builder/llvm_passmgr_builder.ml new file mode 100644 index 00000000..60df4461 --- /dev/null +++ b/bindings/ocaml/transforms/passmgr_builder/llvm_passmgr_builder.ml @@ -0,0 +1,32 @@ +(*===-- llvm_passmgr_builder.ml - LLVM OCaml Interface --------*- OCaml -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +type t + +external create : unit -> t + = "llvm_pmbuilder_create" +external set_opt_level : int -> t -> unit + = "llvm_pmbuilder_set_opt_level" +external set_size_level : int -> t -> unit + = "llvm_pmbuilder_set_size_level" +external set_disable_unit_at_a_time : bool -> t -> unit + = "llvm_pmbuilder_set_disable_unit_at_a_time" +external set_disable_unroll_loops : bool -> t -> unit + = "llvm_pmbuilder_set_disable_unroll_loops" +external use_inliner_with_threshold : int -> t -> unit + = "llvm_pmbuilder_use_inliner_with_threshold" +external populate_function_pass_manager + : [ `Function ] Llvm.PassManager.t -> t -> unit + = "llvm_pmbuilder_populate_function_pass_manager" +external populate_module_pass_manager + : [ `Module ] Llvm.PassManager.t -> t -> unit + = "llvm_pmbuilder_populate_module_pass_manager" +external populate_lto_pass_manager + : [ `Module ] Llvm.PassManager.t -> internalize:bool -> run_inliner:bool -> t -> unit + = "llvm_pmbuilder_populate_lto_pass_manager" \ No newline at end of file diff --git a/bindings/ocaml/transforms/passmgr_builder/llvm_passmgr_builder.mli b/bindings/ocaml/transforms/passmgr_builder/llvm_passmgr_builder.mli new file mode 100644 index 00000000..66b0981e --- /dev/null +++ b/bindings/ocaml/transforms/passmgr_builder/llvm_passmgr_builder.mli @@ -0,0 +1,54 @@ +(*===-- llvm_passmgr_builder.mli - LLVM OCaml Interface -------*- OCaml -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +(** Pass Manager Builder. + + This interface provides an OCaml API for LLVM pass manager builder + from the [LLVMCore] library. *) + +type t + +(** See [llvm::PassManagerBuilder]. *) +external create : unit -> t + = "llvm_pmbuilder_create" + +(** See [llvm::PassManagerBuilder::OptLevel]. *) +external set_opt_level : int -> t -> unit + = "llvm_pmbuilder_set_opt_level" + +(** See [llvm::PassManagerBuilder::SizeLevel]. *) +external set_size_level : int -> t -> unit + = "llvm_pmbuilder_set_size_level" + +(** See [llvm::PassManagerBuilder::DisableUnitAtATime]. *) +external set_disable_unit_at_a_time : bool -> t -> unit + = "llvm_pmbuilder_set_disable_unit_at_a_time" + +(** See [llvm::PassManagerBuilder::DisableUnrollLoops]. *) +external set_disable_unroll_loops : bool -> t -> unit + = "llvm_pmbuilder_set_disable_unroll_loops" + +(** See [llvm::PassManagerBuilder::Inliner]. *) +external use_inliner_with_threshold : int -> t -> unit + = "llvm_pmbuilder_use_inliner_with_threshold" + +(** See [llvm::PassManagerBuilder::populateFunctionPassManager]. *) +external populate_function_pass_manager + : [ `Function ] Llvm.PassManager.t -> t -> unit + = "llvm_pmbuilder_populate_function_pass_manager" + +(** See [llvm::PassManagerBuilder::populateModulePassManager]. *) +external populate_module_pass_manager + : [ `Module ] Llvm.PassManager.t -> t -> unit + = "llvm_pmbuilder_populate_module_pass_manager" + +(** See [llvm::PassManagerBuilder::populateLTOPassManager]. *) +external populate_lto_pass_manager + : [ `Module ] Llvm.PassManager.t -> internalize:bool -> run_inliner:bool -> t -> unit + = "llvm_pmbuilder_populate_lto_pass_manager" \ No newline at end of file diff --git a/bindings/ocaml/transforms/passmgr_builder/passmgr_builder_ocaml.c b/bindings/ocaml/transforms/passmgr_builder/passmgr_builder_ocaml.c new file mode 100644 index 00000000..a707856b --- /dev/null +++ b/bindings/ocaml/transforms/passmgr_builder/passmgr_builder_ocaml.c @@ -0,0 +1,113 @@ +/*===-- passmgr_builder_ocaml.c - LLVM OCaml Glue ---------------*- C++ -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This file glues LLVM's OCaml interface to its C interface. These functions *| +|* are by and large transparent wrappers to the corresponding C functions. *| +|* *| +|* Note that these functions intentionally take liberties with the CAMLparamX *| +|* macros, since most of the parameters are not GC heap objects. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#include "llvm-c/Transforms/PassManagerBuilder.h" +#include "caml/mlvalues.h" +#include "caml/custom.h" +#include "caml/misc.h" + +#define PMBuilder_val(v) (*(LLVMPassManagerBuilderRef *)(Data_custom_val(v))) + +static void llvm_finalize_pmbuilder(value PMB) { + LLVMPassManagerBuilderDispose(PMBuilder_val(PMB)); +} + +static struct custom_operations pmbuilder_ops = { + (char *) "LLVMPassManagerBuilder", + llvm_finalize_pmbuilder, + custom_compare_default, + custom_hash_default, + custom_serialize_default, + custom_deserialize_default +#ifdef custom_compare_ext_default + , custom_compare_ext_default +#endif +}; + +static value alloc_pmbuilder(LLVMPassManagerBuilderRef Ref) { + value Val = alloc_custom(&pmbuilder_ops, + sizeof(LLVMPassManagerBuilderRef), 0, 1); + PMBuilder_val(Val) = Ref; + return Val; +} + +/* t -> unit */ +CAMLprim value llvm_pmbuilder_create(value Unit) { + return alloc_pmbuilder(LLVMPassManagerBuilderCreate()); +} + +/* int -> t -> unit */ +CAMLprim value llvm_pmbuilder_set_opt_level(value OptLevel, value PMB) { + LLVMPassManagerBuilderSetOptLevel(PMBuilder_val(PMB), Int_val(OptLevel)); + return Val_unit; +} + +/* int -> t -> unit */ +CAMLprim value llvm_pmbuilder_set_size_level(value SizeLevel, value PMB) { + LLVMPassManagerBuilderSetSizeLevel(PMBuilder_val(PMB), Int_val(SizeLevel)); + return Val_unit; +} + +/* int -> t -> unit */ +CAMLprim value llvm_pmbuilder_use_inliner_with_threshold( + value Threshold, value PMB) { + LLVMPassManagerBuilderSetOptLevel(PMBuilder_val(PMB), Int_val(Threshold)); + return Val_unit; +} + +/* bool -> t -> unit */ +CAMLprim value llvm_pmbuilder_set_disable_unit_at_a_time( + value DisableUnitAtATime, value PMB) { + LLVMPassManagerBuilderSetDisableUnitAtATime( + PMBuilder_val(PMB), Bool_val(DisableUnitAtATime)); + return Val_unit; +} + +/* bool -> t -> unit */ +CAMLprim value llvm_pmbuilder_set_disable_unroll_loops( + value DisableUnroll, value PMB) { + LLVMPassManagerBuilderSetDisableUnrollLoops( + PMBuilder_val(PMB), Bool_val(DisableUnroll)); + return Val_unit; +} + +/* [ `Function ] Llvm.PassManager.t -> t -> unit */ +CAMLprim value llvm_pmbuilder_populate_function_pass_manager( + LLVMPassManagerRef PM, value PMB) { + LLVMPassManagerBuilderPopulateFunctionPassManager( + PMBuilder_val(PMB), PM); + return Val_unit; +} + +/* [ `Module ] Llvm.PassManager.t -> t -> unit */ +CAMLprim value llvm_pmbuilder_populate_module_pass_manager( + LLVMPassManagerRef PM, value PMB) { + LLVMPassManagerBuilderPopulateModulePassManager( + PMBuilder_val(PMB), PM); + return Val_unit; +} + +/* [ `Module ] Llvm.PassManager.t -> + internalize:bool -> run_inliner:bool -> t -> unit */ +CAMLprim value llvm_pmbuilder_populate_lto_pass_manager( + LLVMPassManagerRef PM, value Internalize, value RunInliner, + value PMB) { + LLVMPassManagerBuilderPopulateLTOPassManager( + PMBuilder_val(PMB), PM, + Bool_val(Internalize), Bool_val(RunInliner)); + return Val_unit; +} diff --git a/bindings/ocaml/transforms/scalar/Makefile b/bindings/ocaml/transforms/scalar/Makefile new file mode 100644 index 00000000..6e250f66 --- /dev/null +++ b/bindings/ocaml/transforms/scalar/Makefile @@ -0,0 +1,19 @@ +##===- bindings/ocaml/transforms/scalar/Makefile -----------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +# +# This is the makefile for the Objective Caml Llvm_scalar_opts interface. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../../../.. +LIBRARYNAME := llvm_scalar_opts +UsedComponents := scalaropts +UsedOcamlInterfaces := llvm + +include ../../Makefile.ocaml diff --git a/bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml b/bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml new file mode 100644 index 00000000..958939dc --- /dev/null +++ b/bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml @@ -0,0 +1,114 @@ +(*===-- llvm_scalar_opts.ml - LLVM OCaml Interface -------------*- OCaml -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +external add_constant_propagation : [ unit + = "llvm_add_constant_propagation" +external add_sccp : [ unit + = "llvm_add_sccp" +external add_dead_store_elimination : [ unit + = "llvm_add_dead_store_elimination" +external add_aggressive_dce : [ unit + = "llvm_add_aggressive_dce" +external +add_scalar_repl_aggregation : [ unit + = "llvm_add_scalar_repl_aggregation" + +external +add_scalar_repl_aggregation_ssa : [ unit + = "llvm_add_scalar_repl_aggregation_ssa" + +external +add_scalar_repl_aggregation_with_threshold : int -> [ unit + = "llvm_add_scalar_repl_aggregation_with_threshold" +external add_ind_var_simplification : [ unit + = "llvm_add_ind_var_simplification" +external +add_instruction_combination : [ unit + = "llvm_add_instruction_combination" +external add_licm : [ unit + = "llvm_add_licm" +external add_loop_unswitch : [ unit + = "llvm_add_loop_unswitch" +external add_loop_unroll : [ unit + = "llvm_add_loop_unroll" +external add_loop_rotation : [ unit + = "llvm_add_loop_rotation" +external +add_memory_to_register_promotion : [ unit + = "llvm_add_memory_to_register_promotion" +external +add_memory_to_register_demotion : [ unit + = "llvm_add_memory_to_register_demotion" +external add_reassociation : [ unit + = "llvm_add_reassociation" +external add_jump_threading : [ unit + = "llvm_add_jump_threading" +external add_cfg_simplification : [ unit + = "llvm_add_cfg_simplification" +external +add_tail_call_elimination : [ unit + = "llvm_add_tail_call_elimination" +external add_gvn : [ unit + = "llvm_add_gvn" +external add_memcpy_opt : [ unit + = "llvm_add_memcpy_opt" +external add_loop_deletion : [ unit + = "llvm_add_loop_deletion" + +external add_loop_idiom : [ unit + = "llvm_add_loop_idiom" + +external +add_lib_call_simplification : [ unit + = "llvm_add_lib_call_simplification" + +external +add_verifier : [ unit + = "llvm_add_verifier" + +external +add_correlated_value_propagation : [ unit + = "llvm_add_correlated_value_propagation" + +external +add_early_cse : [ unit + = "llvm_add_early_cse" + +external +add_lower_expect_intrinsic : [ unit + = "llvm_add_lower_expect_intrinsic" + +external +add_type_based_alias_analysis : [ unit + = "llvm_add_type_based_alias_analysis" + +external +add_basic_alias_analysis : [ unit + = "llvm_add_basic_alias_analysis" + +external +add_partially_inline_lib_calls : [ unit + = "llvm_add_partially_inline_lib_calls" diff --git a/bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli b/bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli new file mode 100644 index 00000000..d69abe20 --- /dev/null +++ b/bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli @@ -0,0 +1,168 @@ +(*===-- llvm_scalar_opts.mli - LLVM OCaml Interface ------------*- OCaml -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +(** Scalar Transforms. + + This interface provides an OCaml API for LLVM scalar transforms, the + classes in the [LLVMScalarOpts] library. *) + +(** See the [llvm::createConstantPropogationPass] function. *) +external add_constant_propagation : [ unit + = "llvm_add_constant_propagation" + +(** See the [llvm::createSCCPPass] function. *) +external add_sccp : [ unit + = "llvm_add_sccp" + +(** See [llvm::createDeadStoreEliminationPass] function. *) +external add_dead_store_elimination : [ unit + = "llvm_add_dead_store_elimination" + +(** See The [llvm::createAggressiveDCEPass] function. *) +external add_aggressive_dce : [ unit + = "llvm_add_aggressive_dce" + +(** See the [llvm::createScalarReplAggregatesPass] function. *) +external +add_scalar_repl_aggregation : [ unit + = "llvm_add_scalar_repl_aggregation" + +(** See the [llvm::createScalarReplAggregatesPassSSA] function. *) +external +add_scalar_repl_aggregation_ssa : [ unit + = "llvm_add_scalar_repl_aggregation_ssa" + +(** See the [llvm::createScalarReplAggregatesWithThreshold] function. *) +external +add_scalar_repl_aggregation_with_threshold : int -> [ unit + = "llvm_add_scalar_repl_aggregation_with_threshold" + +(** See the [llvm::createIndVarSimplifyPass] function. *) +external add_ind_var_simplification : [ unit + = "llvm_add_ind_var_simplification" + +(** See the [llvm::createInstructionCombiningPass] function. *) +external +add_instruction_combination : [ unit + = "llvm_add_instruction_combination" + +(** See the [llvm::createLICMPass] function. *) +external add_licm : [ unit + = "llvm_add_licm" + +(** See the [llvm::createLoopUnswitchPass] function. *) +external add_loop_unswitch : [ unit + = "llvm_add_loop_unswitch" + +(** See the [llvm::createLoopUnrollPass] function. *) +external add_loop_unroll : [ unit + = "llvm_add_loop_unroll" + +(** See the [llvm::createLoopRotatePass] function. *) +external add_loop_rotation : [ unit + = "llvm_add_loop_rotation" + +(** See the [llvm::createPromoteMemoryToRegisterPass] function. *) +external +add_memory_to_register_promotion : [ unit + = "llvm_add_memory_to_register_promotion" + +(** See the [llvm::createDemoteMemoryToRegisterPass] function. *) +external +add_memory_to_register_demotion : [ unit + = "llvm_add_memory_to_register_demotion" + +(** See the [llvm::createReassociatePass] function. *) +external add_reassociation : [ unit + = "llvm_add_reassociation" + +(** See the [llvm::createJumpThreadingPass] function. *) +external add_jump_threading : [ unit + = "llvm_add_jump_threading" + +(** See the [llvm::createCFGSimplificationPass] function. *) +external add_cfg_simplification : [ unit + = "llvm_add_cfg_simplification" + +(** See the [llvm::createTailCallEliminationPass] function. *) +external +add_tail_call_elimination : [ unit + = "llvm_add_tail_call_elimination" + +(** See the [llvm::createGVNPass] function. *) +external add_gvn : [ unit + = "llvm_add_gvn" + +(** See the [llvm::createMemCpyOptPass] function. *) +external add_memcpy_opt : [ unit + = "llvm_add_memcpy_opt" + +(** See the [llvm::createLoopDeletionPass] function. *) +external add_loop_deletion : [ unit + = "llvm_add_loop_deletion" + +external add_loop_idiom : [ unit + = "llvm_add_loop_idiom" + +(** See the [llvm::createSimplifyLibCallsPass] function. *) +external +add_lib_call_simplification : [ unit + = "llvm_add_lib_call_simplification" + +(** See the [llvm::createVerifierPass] function. *) +external +add_verifier : [ unit + = "llvm_add_verifier" + +(** See the [llvm::createCorrelatedValuePropagationPass] function. *) +external +add_correlated_value_propagation : [ unit + = "llvm_add_correlated_value_propagation" + +(** See the [llvm::createEarlyCSE] function. *) +external +add_early_cse : [ unit + = "llvm_add_early_cse" + +(** See the [llvm::createLowerExpectIntrinsicPass] function. *) +external +add_lower_expect_intrinsic : [ unit + = "llvm_add_lower_expect_intrinsic" + +(** See the [llvm::createTypeBasedAliasAnalysisPass] function. *) +external +add_type_based_alias_analysis : [ unit + = "llvm_add_type_based_alias_analysis" + +(** See the [llvm::createBasicAliasAnalysisPass] function. *) +external +add_basic_alias_analysis : [ unit + = "llvm_add_basic_alias_analysis" + +(** See the [llvm::createPartiallyInlineLibCallsPass] function. *) +external +add_partially_inline_lib_calls : [ unit + = "llvm_add_partially_inline_lib_calls" diff --git a/bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c b/bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c new file mode 100644 index 00000000..0a71bd7c --- /dev/null +++ b/bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c @@ -0,0 +1,207 @@ +/*===-- scalar_opts_ocaml.c - LLVM OCaml Glue -------------------*- C++ -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This file glues LLVM's OCaml interface to its C interface. These functions *| +|* are by and large transparent wrappers to the corresponding C functions. *| +|* *| +|* Note that these functions intentionally take liberties with the CAMLparamX *| +|* macros, since most of the parameters are not GC heap objects. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#include "llvm-c/Transforms/Scalar.h" +#include "caml/mlvalues.h" +#include "caml/misc.h" + +/* [ unit */ +CAMLprim value llvm_add_constant_propagation(LLVMPassManagerRef PM) { + LLVMAddConstantPropagationPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_sccp(LLVMPassManagerRef PM) { + LLVMAddSCCPPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_dead_store_elimination(LLVMPassManagerRef PM) { + LLVMAddDeadStoreEliminationPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_aggressive_dce(LLVMPassManagerRef PM) { + LLVMAddAggressiveDCEPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_scalar_repl_aggregation(LLVMPassManagerRef PM) { + LLVMAddScalarReplAggregatesPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_scalar_repl_aggregation_ssa(LLVMPassManagerRef PM) { + LLVMAddScalarReplAggregatesPassSSA(PM); + return Val_unit; +} + +/* [ int -> unit */ +CAMLprim value llvm_add_scalar_repl_aggregation_with_threshold(value threshold, + LLVMPassManagerRef PM) { + LLVMAddScalarReplAggregatesPassWithThreshold(PM, Int_val(threshold)); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_ind_var_simplification(LLVMPassManagerRef PM) { + LLVMAddIndVarSimplifyPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_instruction_combination(LLVMPassManagerRef PM) { + LLVMAddInstructionCombiningPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_licm(LLVMPassManagerRef PM) { + LLVMAddLICMPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_loop_unswitch(LLVMPassManagerRef PM) { + LLVMAddLoopUnswitchPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_loop_unroll(LLVMPassManagerRef PM) { + LLVMAddLoopUnrollPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_loop_rotation(LLVMPassManagerRef PM) { + LLVMAddLoopRotatePass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_memory_to_register_promotion(LLVMPassManagerRef PM) { + LLVMAddPromoteMemoryToRegisterPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_memory_to_register_demotion(LLVMPassManagerRef PM) { + LLVMAddDemoteMemoryToRegisterPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_reassociation(LLVMPassManagerRef PM) { + LLVMAddReassociatePass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_jump_threading(LLVMPassManagerRef PM) { + LLVMAddJumpThreadingPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_cfg_simplification(LLVMPassManagerRef PM) { + LLVMAddCFGSimplificationPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_tail_call_elimination(LLVMPassManagerRef PM) { + LLVMAddTailCallEliminationPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_gvn(LLVMPassManagerRef PM) { + LLVMAddGVNPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_memcpy_opt(LLVMPassManagerRef PM) { + LLVMAddMemCpyOptPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_loop_deletion(LLVMPassManagerRef PM) { + LLVMAddLoopDeletionPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_loop_idiom(LLVMPassManagerRef PM) { + LLVMAddLoopIdiomPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_lib_call_simplification(LLVMPassManagerRef PM) { + LLVMAddSimplifyLibCallsPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_verifier(LLVMPassManagerRef PM) { + LLVMAddVerifierPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_correlated_value_propagation(LLVMPassManagerRef PM) { + LLVMAddCorrelatedValuePropagationPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_early_cse(LLVMPassManagerRef PM) { + LLVMAddEarlyCSEPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_lower_expect_intrinsic(LLVMPassManagerRef PM) { + LLVMAddLowerExpectIntrinsicPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_type_based_alias_analysis(LLVMPassManagerRef PM) { + LLVMAddTypeBasedAliasAnalysisPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_basic_alias_analysis(LLVMPassManagerRef PM) { + LLVMAddBasicAliasAnalysisPass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_partially_inline_lib_calls(LLVMPassManagerRef PM) { + LLVMAddPartiallyInlineLibCallsPass(PM); + return Val_unit; +} diff --git a/bindings/ocaml/transforms/vectorize/Makefile b/bindings/ocaml/transforms/vectorize/Makefile new file mode 100644 index 00000000..5a854d17 --- /dev/null +++ b/bindings/ocaml/transforms/vectorize/Makefile @@ -0,0 +1,19 @@ +##===- bindings/ocaml/transforms/vectorize/Makefile --------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## +# +# This is the makefile for the Objective Caml Llvm_vectorize_opts interface. +# +##===----------------------------------------------------------------------===## + +LEVEL := ../../../.. +LIBRARYNAME := llvm_vectorize +UsedComponents := vectorize +UsedOcamlInterfaces := llvm + +include ../../Makefile.ocaml diff --git a/bindings/ocaml/transforms/vectorize/llvm_vectorize.ml b/bindings/ocaml/transforms/vectorize/llvm_vectorize.ml new file mode 100644 index 00000000..4fc53c6d --- /dev/null +++ b/bindings/ocaml/transforms/vectorize/llvm_vectorize.ml @@ -0,0 +1,15 @@ +(*===-- llvm_vectorize.ml - LLVM OCaml Interface --------------*- OCaml -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +external add_bb_vectorize : [ unit + = "llvm_add_bb_vectorize" +external add_loop_vectorize : [ unit + = "llvm_add_loop_vectorize" +external add_slp_vectorize : [ unit + = "llvm_add_slp_vectorize" diff --git a/bindings/ocaml/transforms/vectorize/llvm_vectorize.mli b/bindings/ocaml/transforms/vectorize/llvm_vectorize.mli new file mode 100644 index 00000000..02530398 --- /dev/null +++ b/bindings/ocaml/transforms/vectorize/llvm_vectorize.mli @@ -0,0 +1,25 @@ +(*===-- llvm_vectorize.mli - LLVM OCaml Interface -------------*- OCaml -*-===* + * + * The LLVM Compiler Infrastructure + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===*) + +(** Vectorize Transforms. + + This interface provides an OCaml API for LLVM vectorize transforms, the + classes in the [LLVMVectorize] library. *) + +(** See the [llvm::createBBVectorizePass] function. *) +external add_bb_vectorize : [ unit + = "llvm_add_bb_vectorize" + +(** See the [llvm::createLoopVectorizePass] function. *) +external add_loop_vectorize : [ unit + = "llvm_add_loop_vectorize" + +(** See [llvm::createSLPVectorizerPass] function. *) +external add_slp_vectorize : [ unit + = "llvm_add_slp_vectorize" diff --git a/bindings/ocaml/transforms/vectorize/vectorize_ocaml.c b/bindings/ocaml/transforms/vectorize/vectorize_ocaml.c new file mode 100644 index 00000000..1c810495 --- /dev/null +++ b/bindings/ocaml/transforms/vectorize/vectorize_ocaml.c @@ -0,0 +1,38 @@ +/*===-- vectorize_ocaml.c - LLVM OCaml Glue ---------------------*- C++ -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This file glues LLVM's OCaml interface to its C interface. These functions *| +|* are by and large transparent wrappers to the corresponding C functions. *| +|* *| +|* Note that these functions intentionally take liberties with the CAMLparamX *| +|* macros, since most of the parameters are not GC heap objects. *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#include "llvm-c/Transforms/Vectorize.h" +#include "caml/mlvalues.h" +#include "caml/misc.h" + +/* [ unit */ +CAMLprim value llvm_add_bb_vectorize(LLVMPassManagerRef PM) { + LLVMAddBBVectorizePass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_loop_vectorize(LLVMPassManagerRef PM) { + LLVMAddLoopVectorizePass(PM); + return Val_unit; +} + +/* [ unit */ +CAMLprim value llvm_add_slp_vectorize(LLVMPassManagerRef PM) { + LLVMAddSLPVectorizePass(PM); + return Val_unit; +} diff --git a/bindings/python/README.txt b/bindings/python/README.txt new file mode 100644 index 00000000..96e33431 --- /dev/null +++ b/bindings/python/README.txt @@ -0,0 +1,67 @@ +This directory contains Python bindings for LLVM's C library. + +The bindings are currently a work in progress and are far from complete. +Use at your own risk. + +Developer Info +============== + +The single Python package is "llvm." Modules inside this package roughly +follow the names of the modules/headers defined by LLVM's C API. + +Testing +------- + +All test code is location in llvm/tests. Tests are written as classes +which inherit from llvm.tests.base.TestBase, which is a convenience base +class that provides common functionality. + +Tests can be executed by installing nose: + + pip install nosetests + +Then by running nosetests: + + nosetests + +To see more output: + + nosetests -v + +To step into the Python debugger while running a test, add the following +to your test at the point you wish to enter the debugger: + + import pdb; pdb.set_trace() + +Then run nosetests: + + nosetests -s -v + +You should strive for high code coverage. To see current coverage: + + pip install coverage + nosetests --with-coverage --cover-html + +Then open cover/index.html in your browser of choice to see the code coverage. + +Style Convention +---------------- + +All code should pass PyFlakes. First, install PyFlakes: + + pip install pyflakes + +Then at any time run it to see a report: + + pyflakes . + +Eventually we'll provide a Pylint config file. In the meantime, install +Pylint: + + pip install pylint + +And run: + + pylint llvm + +And try to keep the number of violations to a minimum. diff --git a/bindings/python/llvm/__init__.py b/bindings/python/llvm/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/bindings/python/llvm/bit_reader.py b/bindings/python/llvm/bit_reader.py new file mode 100644 index 00000000..5bf5e220 --- /dev/null +++ b/bindings/python/llvm/bit_reader.py @@ -0,0 +1,31 @@ + +from .common import LLVMObject +from .common import c_object_p +from .common import get_library +from . import enumerations +from .core import MemoryBuffer +from .core import Module +from .core import OpCode +from ctypes import POINTER +from ctypes import byref +from ctypes import c_char_p +from ctypes import cast +__all__ = ['parse_bitcode'] +lib = get_library() + +def parse_bitcode(mem_buffer): + """Input is .core.MemoryBuffer""" + module = c_object_p() + out = c_char_p(None) + result = lib.LLVMParseBitcode(mem_buffer, byref(module), byref(out)) + if result: + raise RuntimeError('LLVM Error: %s' % out.value) + m = Module(module) + m.take_ownership(mem_buffer) + return m + +def register_library(library): + library.LLVMParseBitcode.argtypes = [MemoryBuffer, POINTER(c_object_p), POINTER(c_char_p)] + library.LLVMParseBitcode.restype = bool + +register_library(lib) diff --git a/bindings/python/llvm/common.py b/bindings/python/llvm/common.py new file mode 100644 index 00000000..b177f7fa --- /dev/null +++ b/bindings/python/llvm/common.py @@ -0,0 +1,126 @@ +#===- common.py - Python LLVM Bindings -----------------------*- python -*--===# +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# + +from ctypes import POINTER +from ctypes import c_void_p +from ctypes import cdll + +import ctypes.util +import platform + +# LLVM_VERSION: sync with PACKAGE_VERSION in autoconf/configure.ac and CMakeLists.txt +# but leave out the 'svn' suffix. +LLVM_VERSION = '3.4' + +__all__ = [ + 'c_object_p', + 'get_library', +] + +c_object_p = POINTER(c_void_p) + +class LLVMObject(object): + """Base class for objects that are backed by an LLVM data structure. + + This class should never be instantiated outside of this package. + """ + def __init__(self, ptr, ownable=True, disposer=None): + assert isinstance(ptr, c_object_p) + + self._ptr = self._as_parameter_ = ptr + + self._self_owned = True + self._ownable = ownable + self._disposer = disposer + + self._owned_objects = [] + + def take_ownership(self, obj): + """Take ownership of another object. + + When you take ownership of another object, you are responsible for + destroying that object. In addition, a reference to that object is + placed inside this object so the Python garbage collector will not + collect the object while it is still alive in libLLVM. + + This method should likely only be called from within modules inside + this package. + """ + assert isinstance(obj, LLVMObject) + + self._owned_objects.append(obj) + obj._self_owned = False + + def from_param(self): + """ctypes function that converts this object to a function parameter.""" + return self._as_parameter_ + + def __del__(self): + if not hasattr(self, '_self_owned') or not hasattr(self, '_disposer'): + return + + if self._self_owned and self._disposer: + self._disposer(self) + +class CachedProperty(object): + """Decorator that caches the result of a property lookup. + + This is a useful replacement for @property. It is recommended to use this + decorator on properties that invoke C API calls for which the result of the + call will be idempotent. + """ + def __init__(self, wrapped): + self.wrapped = wrapped + try: + self.__doc__ = wrapped.__doc__ + except: # pragma: no cover + pass + + def __get__(self, instance, instance_type=None): + if instance is None: + return self + + value = self.wrapped(instance) + setattr(instance, self.wrapped.__name__, value) + + return value + +def get_library(): + """Obtain a reference to the llvm library.""" + + # On Linux, ctypes.cdll.LoadLibrary() respects LD_LIBRARY_PATH + # while ctypes.util.find_library() doesn't. + # See http://docs.python.org/2/library/ctypes.html#finding-shared-libraries + # + # To make it possible to run the unit tests without installing the LLVM shared + # library into a default linker search path. Always Try ctypes.cdll.LoadLibrary() + # with all possible library names first, then try ctypes.util.find_library(). + + names = ['LLVM-' + LLVM_VERSION, 'LLVM-' + LLVM_VERSION + 'svn'] + t = platform.system() + if t == 'Darwin': + pfx, ext = 'lib', '.dylib' + elif t == 'Windows': + pfx, ext = '', '.dll' + else: + pfx, ext = 'lib', '.so' + + for i in names: + try: + lib = cdll.LoadLibrary(pfx + i + ext) + except OSError: + pass + else: + return lib + + for i in names: + t = ctypes.util.find_library(i) + if t: + return cdll.LoadLibrary(t) + raise Exception('LLVM shared library not found!') diff --git a/bindings/python/llvm/core.py b/bindings/python/llvm/core.py new file mode 100644 index 00000000..ebf57d44 --- /dev/null +++ b/bindings/python/llvm/core.py @@ -0,0 +1,540 @@ +#===- core.py - Python LLVM Bindings -------------------------*- python -*--===# +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# + +from .common import LLVMObject +from .common import c_object_p +from .common import get_library + +from . import enumerations + +from ctypes import POINTER +from ctypes import byref +from ctypes import c_char_p +from ctypes import c_uint + +__all__ = [ + "lib", + "OpCode", + "MemoryBuffer", + "Module", + "Value", + "Function", + "BasicBlock", + "Instruction", + "Context", + "PassRegistry" +] + +lib = get_library() + +class OpCode(object): + """Represents an individual OpCode enumeration.""" + + _value_map = {} + + def __init__(self, name, value): + self.name = name + self.value = value + + def __repr__(self): + return 'OpCode.%s' % self.name + + @staticmethod + def from_value(value): + """Obtain an OpCode instance from a numeric value.""" + result = OpCode._value_map.get(value, None) + + if result is None: + raise ValueError('Unknown OpCode: %d' % value) + + return result + + @staticmethod + def register(name, value): + """Registers a new OpCode enumeration. + + This is called by this module for each enumeration defined in + enumerations. You should not need to call this outside this module. + """ + if value in OpCode._value_map: + raise ValueError('OpCode value already registered: %d' % value) + + opcode = OpCode(name, value) + OpCode._value_map[value] = opcode + setattr(OpCode, name, opcode) + +class MemoryBuffer(LLVMObject): + """Represents an opaque memory buffer.""" + + def __init__(self, filename=None): + """Create a new memory buffer. + + Currently, we support creating from the contents of a file at the + specified filename. + """ + if filename is None: + raise Exception("filename argument must be defined") + + memory = c_object_p() + out = c_char_p(None) + + result = lib.LLVMCreateMemoryBufferWithContentsOfFile(filename, + byref(memory), byref(out)) + + if result: + raise Exception("Could not create memory buffer: %s" % out.value) + + LLVMObject.__init__(self, memory, disposer=lib.LLVMDisposeMemoryBuffer) + + def __len__(self): + return lib.LLVMGetBufferSize(self) + +class Value(LLVMObject): + + def __init__(self, value): + LLVMObject.__init__(self, value) + + @property + def name(self): + return lib.LLVMGetValueName(self) + + def dump(self): + lib.LLVMDumpValue(self) + + def get_operand(self, i): + return Value(lib.LLVMGetOperand(self, i)) + + def set_operand(self, i, v): + return lib.LLVMSetOperand(self, i, v) + + def __len__(self): + return lib.LLVMGetNumOperands(self) + +class Module(LLVMObject): + """Represents the top-level structure of an llvm program in an opaque object.""" + + def __init__(self, module, name=None, context=None): + LLVMObject.__init__(self, module, disposer=lib.LLVMDisposeModule) + + @classmethod + def CreateWithName(cls, module_id): + m = Module(lib.LLVMModuleCreateWithName(module_id)) + c = Context.GetGlobalContext().take_ownership(m) + return m + + @property + def datalayout(self): + return lib.LLVMGetDataLayout(self) + + @datalayout.setter + def datalayout(self, new_data_layout): + """new_data_layout is a string.""" + lib.LLVMSetDataLayout(self, new_data_layout) + + @property + def target(self): + return lib.LLVMGetTarget(self) + + @target.setter + def target(self, new_target): + """new_target is a string.""" + lib.LLVMSetTarget(self, new_target) + + def dump(self): + lib.LLVMDumpModule(self) + + class __function_iterator(object): + def __init__(self, module, reverse=False): + self.module = module + self.reverse = reverse + if self.reverse: + self.function = self.module.last + else: + self.function = self.module.first + + def __iter__(self): + return self + + def next(self): + if not isinstance(self.function, Function): + raise StopIteration("") + result = self.function + if self.reverse: + self.function = self.function.prev + else: + self.function = self.function.next + return result + + def __iter__(self): + return Module.__function_iterator(self) + + def __reversed__(self): + return Module.__function_iterator(self, reverse=True) + + @property + def first(self): + return Function(lib.LLVMGetFirstFunction(self)) + + @property + def last(self): + return Function(lib.LLVMGetLastFunction(self)) + + def print_module_to_file(self, filename): + out = c_char_p(None) + # Result is inverted so 0 means everything was ok. + result = lib.LLVMPrintModuleToFile(self, filename, byref(out)) + if result: + raise RuntimeError("LLVM Error: %s" % out.value) + +class Function(Value): + + def __init__(self, value): + Value.__init__(self, value) + + @property + def next(self): + f = lib.LLVMGetNextFunction(self) + return f and Function(f) + + @property + def prev(self): + f = lib.LLVMGetPreviousFunction(self) + return f and Function(f) + + @property + def first(self): + b = lib.LLVMGetFirstBasicBlock(self) + return b and BasicBlock(b) + + @property + def last(self): + b = lib.LLVMGetLastBasicBlock(self) + return b and BasicBlock(b) + + class __bb_iterator(object): + def __init__(self, function, reverse=False): + self.function = function + self.reverse = reverse + if self.reverse: + self.bb = function.last + else: + self.bb = function.first + + def __iter__(self): + return self + + def next(self): + if not isinstance(self.bb, BasicBlock): + raise StopIteration("") + result = self.bb + if self.reverse: + self.bb = self.bb.prev + else: + self.bb = self.bb.next + return result + + def __iter__(self): + return Function.__bb_iterator(self) + + def __reversed__(self): + return Function.__bb_iterator(self, reverse=True) + + def __len__(self): + return lib.LLVMCountBasicBlocks(self) + +class BasicBlock(LLVMObject): + + def __init__(self, value): + LLVMObject.__init__(self, value) + + @property + def next(self): + b = lib.LLVMGetNextBasicBlock(self) + return b and BasicBlock(b) + + @property + def prev(self): + b = lib.LLVMGetPreviousBasicBlock(self) + return b and BasicBlock(b) + + @property + def first(self): + i = lib.LLVMGetFirstInstruction(self) + return i and Instruction(i) + + @property + def last(self): + i = lib.LLVMGetLastInstruction(self) + return i and Instruction(i) + + def __as_value(self): + return Value(lib.LLVMBasicBlockAsValue(self)) + + @property + def name(self): + return lib.LLVMGetValueName(self.__as_value()) + + def dump(self): + lib.LLVMDumpValue(self.__as_value()) + + def get_operand(self, i): + return Value(lib.LLVMGetOperand(self.__as_value(), + i)) + + def set_operand(self, i, v): + return lib.LLVMSetOperand(self.__as_value(), + i, v) + + def __len__(self): + return lib.LLVMGetNumOperands(self.__as_value()) + + class __inst_iterator(object): + def __init__(self, bb, reverse=False): + self.bb = bb + self.reverse = reverse + if self.reverse: + self.inst = self.bb.last + else: + self.inst = self.bb.first + + def __iter__(self): + return self + + def next(self): + if not isinstance(self.inst, Instruction): + raise StopIteration("") + result = self.inst + if self.reverse: + self.inst = self.inst.prev + else: + self.inst = self.inst.next + return result + + def __iter__(self): + return BasicBlock.__inst_iterator(self) + + def __reversed__(self): + return BasicBlock.__inst_iterator(self, reverse=True) + + +class Instruction(Value): + + def __init__(self, value): + Value.__init__(self, value) + + @property + def next(self): + i = lib.LLVMGetNextInstruction(self) + return i and Instruction(i) + + @property + def prev(self): + i = lib.LLVMGetPreviousInstruction(self) + return i and Instruction(i) + + @property + def opcode(self): + return OpCode.from_value(lib.LLVMGetInstructionOpcode(self)) + +class Context(LLVMObject): + + def __init__(self, context=None): + if context is None: + context = lib.LLVMContextCreate() + LLVMObject.__init__(self, context, disposer=lib.LLVMContextDispose) + else: + LLVMObject.__init__(self, context) + + @classmethod + def GetGlobalContext(cls): + return Context(lib.LLVMGetGlobalContext()) + +class PassRegistry(LLVMObject): + """Represents an opaque pass registry object.""" + + def __init__(self): + LLVMObject.__init__(self, + lib.LLVMGetGlobalPassRegistry()) + +def register_library(library): + # Initialization/Shutdown declarations. + library.LLVMInitializeCore.argtypes = [PassRegistry] + library.LLVMInitializeCore.restype = None + + library.LLVMInitializeTransformUtils.argtypes = [PassRegistry] + library.LLVMInitializeTransformUtils.restype = None + + library.LLVMInitializeScalarOpts.argtypes = [PassRegistry] + library.LLVMInitializeScalarOpts.restype = None + + library.LLVMInitializeObjCARCOpts.argtypes = [PassRegistry] + library.LLVMInitializeObjCARCOpts.restype = None + + library.LLVMInitializeVectorization.argtypes = [PassRegistry] + library.LLVMInitializeVectorization.restype = None + + library.LLVMInitializeInstCombine.argtypes = [PassRegistry] + library.LLVMInitializeInstCombine.restype = None + + library.LLVMInitializeIPO.argtypes = [PassRegistry] + library.LLVMInitializeIPO.restype = None + + library.LLVMInitializeInstrumentation.argtypes = [PassRegistry] + library.LLVMInitializeInstrumentation.restype = None + + library.LLVMInitializeAnalysis.argtypes = [PassRegistry] + library.LLVMInitializeAnalysis.restype = None + + library.LLVMInitializeIPA.argtypes = [PassRegistry] + library.LLVMInitializeIPA.restype = None + + library.LLVMInitializeCodeGen.argtypes = [PassRegistry] + library.LLVMInitializeCodeGen.restype = None + + library.LLVMInitializeTarget.argtypes = [PassRegistry] + library.LLVMInitializeTarget.restype = None + + library.LLVMShutdown.argtypes = [] + library.LLVMShutdown.restype = None + + # Pass Registry declarations. + library.LLVMGetGlobalPassRegistry.argtypes = [] + library.LLVMGetGlobalPassRegistry.restype = c_object_p + + # Context declarations. + library.LLVMContextCreate.argtypes = [] + library.LLVMContextCreate.restype = c_object_p + + library.LLVMContextDispose.argtypes = [Context] + library.LLVMContextDispose.restype = None + + library.LLVMGetGlobalContext.argtypes = [] + library.LLVMGetGlobalContext.restype = c_object_p + + # Memory buffer declarations + library.LLVMCreateMemoryBufferWithContentsOfFile.argtypes = [c_char_p, + POINTER(c_object_p), POINTER(c_char_p)] + library.LLVMCreateMemoryBufferWithContentsOfFile.restype = bool + + library.LLVMGetBufferSize.argtypes = [MemoryBuffer] + + library.LLVMDisposeMemoryBuffer.argtypes = [MemoryBuffer] + + # Module declarations + library.LLVMModuleCreateWithName.argtypes = [c_char_p] + library.LLVMModuleCreateWithName.restype = c_object_p + + library.LLVMDisposeModule.argtypes = [Module] + library.LLVMDisposeModule.restype = None + + library.LLVMGetDataLayout.argtypes = [Module] + library.LLVMGetDataLayout.restype = c_char_p + + library.LLVMSetDataLayout.argtypes = [Module, c_char_p] + library.LLVMSetDataLayout.restype = None + + library.LLVMGetTarget.argtypes = [Module] + library.LLVMGetTarget.restype = c_char_p + + library.LLVMSetTarget.argtypes = [Module, c_char_p] + library.LLVMSetTarget.restype = None + + library.LLVMDumpModule.argtypes = [Module] + library.LLVMDumpModule.restype = None + + library.LLVMPrintModuleToFile.argtypes = [Module, c_char_p, + POINTER(c_char_p)] + library.LLVMPrintModuleToFile.restype = bool + + library.LLVMGetFirstFunction.argtypes = [Module] + library.LLVMGetFirstFunction.restype = c_object_p + + library.LLVMGetLastFunction.argtypes = [Module] + library.LLVMGetLastFunction.restype = c_object_p + + library.LLVMGetNextFunction.argtypes = [Function] + library.LLVMGetNextFunction.restype = c_object_p + + library.LLVMGetPreviousFunction.argtypes = [Function] + library.LLVMGetPreviousFunction.restype = c_object_p + + # Value declarations. + library.LLVMGetValueName.argtypes = [Value] + library.LLVMGetValueName.restype = c_char_p + + library.LLVMDumpValue.argtypes = [Value] + library.LLVMDumpValue.restype = None + + library.LLVMGetOperand.argtypes = [Value, c_uint] + library.LLVMGetOperand.restype = c_object_p + + library.LLVMSetOperand.argtypes = [Value, Value, c_uint] + library.LLVMSetOperand.restype = None + + library.LLVMGetNumOperands.argtypes = [Value] + library.LLVMGetNumOperands.restype = c_uint + + # Basic Block Declarations. + library.LLVMGetFirstBasicBlock.argtypes = [Function] + library.LLVMGetFirstBasicBlock.restype = c_object_p + + library.LLVMGetLastBasicBlock.argtypes = [Function] + library.LLVMGetLastBasicBlock.restype = c_object_p + + library.LLVMGetNextBasicBlock.argtypes = [BasicBlock] + library.LLVMGetNextBasicBlock.restype = c_object_p + + library.LLVMGetPreviousBasicBlock.argtypes = [BasicBlock] + library.LLVMGetPreviousBasicBlock.restype = c_object_p + + library.LLVMGetFirstInstruction.argtypes = [BasicBlock] + library.LLVMGetFirstInstruction.restype = c_object_p + + library.LLVMGetLastInstruction.argtypes = [BasicBlock] + library.LLVMGetLastInstruction.restype = c_object_p + + library.LLVMBasicBlockAsValue.argtypes = [BasicBlock] + library.LLVMBasicBlockAsValue.restype = c_object_p + + library.LLVMCountBasicBlocks.argtypes = [Function] + library.LLVMCountBasicBlocks.restype = c_uint + + # Instruction Declarations. + library.LLVMGetNextInstruction.argtypes = [Instruction] + library.LLVMGetNextInstruction.restype = c_object_p + + library.LLVMGetPreviousInstruction.argtypes = [Instruction] + library.LLVMGetPreviousInstruction.restype = c_object_p + + library.LLVMGetInstructionOpcode.argtypes = [Instruction] + library.LLVMGetInstructionOpcode.restype = c_uint + +def register_enumerations(): + for name, value in enumerations.OpCodes: + OpCode.register(name, value) + +def initialize_llvm(): + c = Context.GetGlobalContext() + p = PassRegistry() + lib.LLVMInitializeCore(p) + lib.LLVMInitializeTransformUtils(p) + lib.LLVMInitializeScalarOpts(p) + lib.LLVMInitializeObjCARCOpts(p) + lib.LLVMInitializeVectorization(p) + lib.LLVMInitializeInstCombine(p) + lib.LLVMInitializeIPO(p) + lib.LLVMInitializeInstrumentation(p) + lib.LLVMInitializeAnalysis(p) + lib.LLVMInitializeIPA(p) + lib.LLVMInitializeCodeGen(p) + lib.LLVMInitializeTarget(p) + +register_library(lib) +register_enumerations() +initialize_llvm() diff --git a/bindings/python/llvm/disassembler.py b/bindings/python/llvm/disassembler.py new file mode 100644 index 00000000..f2df275b --- /dev/null +++ b/bindings/python/llvm/disassembler.py @@ -0,0 +1,170 @@ +#===- disassembler.py - Python LLVM Bindings -----------------*- python -*--===# +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# + +from ctypes import CFUNCTYPE +from ctypes import POINTER +from ctypes import addressof +from ctypes import c_byte +from ctypes import c_char_p +from ctypes import c_int +from ctypes import c_size_t +from ctypes import c_ubyte +from ctypes import c_uint64 +from ctypes import c_void_p +from ctypes import cast + +from .common import LLVMObject +from .common import c_object_p +from .common import get_library + +__all__ = [ + 'Disassembler', +] + +lib = get_library() +callbacks = {} + +# Constants for set_options +Option_UseMarkup = 1 + + + +_initialized = False +_targets = ['AArch64', 'ARM', 'Hexagon', 'MSP430', 'Mips', 'NVPTX', 'PowerPC', 'R600', 'Sparc', 'SystemZ', 'X86', 'XCore'] +def _ensure_initialized(): + global _initialized + if not _initialized: + # Here one would want to call the functions + # LLVMInitializeAll{TargetInfo,TargetMC,Disassembler}s, but + # unfortunately they are only defined as static inline + # functions in the header files of llvm-c, so they don't exist + # as symbols in the shared library. + # So until that is fixed use this hack to initialize them all + for tgt in _targets: + for initializer in ("TargetInfo", "TargetMC", "Disassembler"): + try: + f = getattr(lib, "LLVMInitialize" + tgt + initializer) + except AttributeError: + continue + f() + _initialized = True + + +class Disassembler(LLVMObject): + """Represents a disassembler instance. + + Disassembler instances are tied to specific "triple," which must be defined + at creation time. + + Disassembler instances can disassemble instructions from multiple sources. + """ + def __init__(self, triple): + """Create a new disassembler instance. + + The triple argument is the triple to create the disassembler for. This + is something like 'i386-apple-darwin9'. + """ + + _ensure_initialized() + + ptr = lib.LLVMCreateDisasm(c_char_p(triple), c_void_p(None), c_int(0), + callbacks['op_info'](0), callbacks['symbol_lookup'](0)) + if not ptr: + raise Exception('Could not obtain disassembler for triple: %s' % + triple) + + LLVMObject.__init__(self, ptr, disposer=lib.LLVMDisasmDispose) + + def get_instruction(self, source, pc=0): + """Obtain the next instruction from an input source. + + The input source should be a str or bytearray or something that + represents a sequence of bytes. + + This function will start reading bytes from the beginning of the + source. + + The pc argument specifies the address that the first byte is at. + + This returns a 2-tuple of: + + long number of bytes read. 0 if no instruction was read. + str representation of instruction. This will be the assembly that + represents the instruction. + """ + buf = cast(c_char_p(source), POINTER(c_ubyte)) + out_str = cast((c_byte * 255)(), c_char_p) + + result = lib.LLVMDisasmInstruction(self, buf, c_uint64(len(source)), + c_uint64(pc), out_str, 255) + + return (result, out_str.value) + + def get_instructions(self, source, pc=0): + """Obtain multiple instructions from an input source. + + This is like get_instruction() except it is a generator for all + instructions within the source. It starts at the beginning of the + source and reads instructions until no more can be read. + + This generator returns 3-tuple of: + + long address of instruction. + long size of instruction, in bytes. + str representation of instruction. + """ + source_bytes = c_char_p(source) + out_str = cast((c_byte * 255)(), c_char_p) + + # This could probably be written cleaner. But, it does work. + buf = cast(source_bytes, POINTER(c_ubyte * len(source))).contents + offset = 0 + address = pc + end_address = pc + len(source) + while address < end_address: + b = cast(addressof(buf) + offset, POINTER(c_ubyte)) + result = lib.LLVMDisasmInstruction(self, b, + c_uint64(len(source) - offset), c_uint64(address), + out_str, 255) + + if result == 0: + break + + yield (address, result, out_str.value) + + address += result + offset += result + + def set_options(self, options): + if not lib.LLVMSetDisasmOptions(self, options): + raise Exception('Unable to set all disassembler options in %i' % options) + + +def register_library(library): + library.LLVMCreateDisasm.argtypes = [c_char_p, c_void_p, c_int, + callbacks['op_info'], callbacks['symbol_lookup']] + library.LLVMCreateDisasm.restype = c_object_p + + library.LLVMDisasmDispose.argtypes = [Disassembler] + + library.LLVMDisasmInstruction.argtypes = [Disassembler, POINTER(c_ubyte), + c_uint64, c_uint64, c_char_p, c_size_t] + library.LLVMDisasmInstruction.restype = c_size_t + + library.LLVMSetDisasmOptions.argtypes = [Disassembler, c_uint64] + library.LLVMSetDisasmOptions.restype = c_int + + +callbacks['op_info'] = CFUNCTYPE(c_int, c_void_p, c_uint64, c_uint64, c_uint64, + c_int, c_void_p) +callbacks['symbol_lookup'] = CFUNCTYPE(c_char_p, c_void_p, c_uint64, + POINTER(c_uint64), c_uint64, + POINTER(c_char_p)) + +register_library(lib) diff --git a/bindings/python/llvm/enumerations.py b/bindings/python/llvm/enumerations.py new file mode 100644 index 00000000..f49d2faa --- /dev/null +++ b/bindings/python/llvm/enumerations.py @@ -0,0 +1,211 @@ +#===- enumerations.py - Python LLVM Enumerations -------------*- python -*--===# +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# + +r""" +LLVM Enumerations +================= + +This file defines enumerations from LLVM. + +Each enumeration is exposed as a list of 2-tuples. These lists are consumed by +dedicated types elsewhere in the package. The enumerations are centrally +defined in this file so they are easier to locate and maintain. +""" + +__all__ = [ + 'Attributes', + 'OpCodes', + 'TypeKinds', + 'Linkages', + 'Visibility', + 'CallConv', + 'IntPredicate', + 'RealPredicate', + 'LandingPadClauseTy', +] + +Attributes = [ + ('ZExt', 1 << 0), + ('MSExt', 1 << 1), + ('NoReturn', 1 << 2), + ('InReg', 1 << 3), + ('StructRet', 1 << 4), + ('NoUnwind', 1 << 5), + ('NoAlias', 1 << 6), + ('ByVal', 1 << 7), + ('Nest', 1 << 8), + ('ReadNone', 1 << 9), + ('ReadOnly', 1 << 10), + ('NoInline', 1 << 11), + ('AlwaysInline', 1 << 12), + ('OptimizeForSize', 1 << 13), + ('StackProtect', 1 << 14), + ('StackProtectReq', 1 << 15), + ('Alignment', 31 << 16), + ('NoCapture', 1 << 21), + ('NoRedZone', 1 << 22), + ('ImplicitFloat', 1 << 23), + ('Naked', 1 << 24), + ('InlineHint', 1 << 25), + ('StackAlignment', 7 << 26), + ('ReturnsTwice', 1 << 29), + ('UWTable', 1 << 30), + ('NonLazyBind', 1 << 31), +] + +OpCodes = [ + ('Ret', 1), + ('Br', 2), + ('Switch', 3), + ('IndirectBr', 4), + ('Invoke', 5), + ('Unreachable', 7), + ('Add', 8), + ('FAdd', 9), + ('Sub', 10), + ('FSub', 11), + ('Mul', 12), + ('FMul', 13), + ('UDiv', 14), + ('SDiv', 15), + ('FDiv', 16), + ('URem', 17), + ('SRem', 18), + ('FRem', 19), + ('Shl', 20), + ('LShr', 21), + ('AShr', 22), + ('And', 23), + ('Or', 24), + ('Xor', 25), + ('Alloca', 26), + ('Load', 27), + ('Store', 28), + ('GetElementPtr', 29), + ('Trunc', 30), + ('ZExt', 31), + ('SExt', 32), + ('FPToUI', 33), + ('FPToSI', 34), + ('UIToFP', 35), + ('SIToFP', 36), + ('FPTrunc', 37), + ('FPExt', 38), + ('PtrToInt', 39), + ('IntToPtr', 40), + ('BitCast', 41), + ('ICmp', 42), + ('FCmpl', 43), + ('PHI', 44), + ('Call', 45), + ('Select', 46), + ('UserOp1', 47), + ('UserOp2', 48), + ('AArg', 49), + ('ExtractElement', 50), + ('InsertElement', 51), + ('ShuffleVector', 52), + ('ExtractValue', 53), + ('InsertValue', 54), + ('Fence', 55), + ('AtomicCmpXchg', 56), + ('AtomicRMW', 57), + ('Resume', 58), + ('LandingPad', 59), +] + +TypeKinds = [ + ('Void', 0), + ('Half', 1), + ('Float', 2), + ('Double', 3), + ('X86_FP80', 4), + ('FP128', 5), + ('PPC_FP128', 6), + ('Label', 7), + ('Integer', 8), + ('Function', 9), + ('Struct', 10), + ('Array', 11), + ('Pointer', 12), + ('Vector', 13), + ('Metadata', 14), + ('X86_MMX', 15), +] + +Linkages = [ + ('External', 0), + ('AvailableExternally', 1), + ('LinkOnceAny', 2), + ('LinkOnceODR', 3), + ('WeakAny', 4), + ('WeakODR', 5), + ('Appending', 6), + ('Internal', 7), + ('Private', 8), + ('DLLImport', 9), + ('DLLExport', 10), + ('ExternalWeak', 11), + ('Ghost', 12), + ('Common', 13), + ('LinkerPrivate', 14), + ('LinkerPrivateWeak', 15), + ('LinkerPrivateWeakDefAuto', 16), +] + +Visibility = [ + ('Default', 0), + ('Hidden', 1), + ('Protected', 2), +] + +CallConv = [ + ('CCall', 0), + ('FastCall', 8), + ('ColdCall', 9), + ('X86StdcallCall', 64), + ('X86FastcallCall', 65), +] + +IntPredicate = [ + ('EQ', 32), + ('NE', 33), + ('UGT', 34), + ('UGE', 35), + ('ULT', 36), + ('ULE', 37), + ('SGT', 38), + ('SGE', 39), + ('SLT', 40), + ('SLE', 41), +] + +RealPredicate = [ + ('PredicateFalse', 0), + ('OEQ', 1), + ('OGT', 2), + ('OGE', 3), + ('OLT', 4), + ('OLE', 5), + ('ONE', 6), + ('ORD', 7), + ('UNO', 8), + ('UEQ', 9), + ('UGT', 10), + ('UGE', 11), + ('ULT', 12), + ('ULE', 13), + ('UNE', 14), + ('PredicateTrue', 15), +] + +LandingPadClauseTy = [ + ('Catch', 0), + ('Filter', 1), +] diff --git a/bindings/python/llvm/object.py b/bindings/python/llvm/object.py new file mode 100644 index 00000000..473aa3a1 --- /dev/null +++ b/bindings/python/llvm/object.py @@ -0,0 +1,523 @@ +#===- object.py - Python Object Bindings --------------------*- python -*--===# +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# + +r""" +Object File Interface +===================== + +This module provides an interface for reading information from object files +(e.g. binary executables and libraries). + +Using this module, you can obtain information about an object file's sections, +symbols, and relocations. These are represented by the classes ObjectFile, +Section, Symbol, and Relocation, respectively. + +Usage +----- + +The only way to use this module is to start by creating an ObjectFile. You can +create an ObjectFile by loading a file (specified by its path) or by creating a +llvm.core.MemoryBuffer and loading that. + +Once you have an object file, you can inspect its sections and symbols directly +by calling get_sections() and get_symbols() respectively. To inspect +relocations, call get_relocations() on a Section instance. + +Iterator Interface +------------------ + +The LLVM bindings expose iteration over sections, symbols, and relocations in a +way that only allows one instance to be operated on at a single time. This is +slightly annoying from a Python perspective, as it isn't very Pythonic to have +objects that "expire" but are still active from a dynamic language. + +To aid working around this limitation, each Section, Symbol, and Relocation +instance caches its properties after first access. So, if the underlying +iterator is advanced, the properties can still be obtained provided they have +already been retrieved. + +In addition, we also provide a "cache" method on each class to cache all +available data. You can call this on each obtained instance. Or, you can pass +cache=True to the appropriate get_XXX() method to have this done for you. + +Here are some examples on how to perform iteration: + + obj = ObjectFile(filename='/bin/ls') + + # This is OK. Each Section is only accessed inside its own iteration slot. + section_names = [] + for section in obj.get_sections(): + section_names.append(section.name) + + # This is NOT OK. You perform a lookup after the object has expired. + symbols = list(obj.get_symbols()) + for symbol in symbols: + print symbol.name # This raises because the object has expired. + + # In this example, we mix a working and failing scenario. + symbols = [] + for symbol in obj.get_symbols(): + symbols.append(symbol) + print symbol.name + + for symbol in symbols: + print symbol.name # OK + print symbol.address # NOT OK. We didn't look up this property before. + + # Cache everything up front. + symbols = list(obj.get_symbols(cache=True)) + for symbol in symbols: + print symbol.name # OK + +""" + +from ctypes import c_char_p +from ctypes import c_uint64 + +from .common import CachedProperty +from .common import LLVMObject +from .common import c_object_p +from .common import get_library +from .core import MemoryBuffer + +__all__ = [ + "lib", + "ObjectFile", + "Relocation", + "Section", + "Symbol", +] + +class ObjectFile(LLVMObject): + """Represents an object/binary file.""" + + def __init__(self, filename=None, contents=None): + """Construct an instance from a filename or binary data. + + filename must be a path to a file that can be opened with open(). + contents can be either a native Python buffer type (like str) or a + llvm.core.MemoryBuffer instance. + """ + if contents: + assert isinstance(contents, MemoryBuffer) + + if filename is not None: + contents = MemoryBuffer(filename=filename) + + if contents is None: + raise Exception('No input found.') + + ptr = lib.LLVMCreateObjectFile(contents) + LLVMObject.__init__(self, ptr, disposer=lib.LLVMDisposeObjectFile) + self.take_ownership(contents) + + def get_sections(self, cache=False): + """Obtain the sections in this object file. + + This is a generator for llvm.object.Section instances. + + Sections are exposed as limited-use objects. See the module's + documentation on iterators for more. + """ + sections = lib.LLVMGetSections(self) + last = None + while True: + if lib.LLVMIsSectionIteratorAtEnd(self, sections): + break + + last = Section(sections) + if cache: + last.cache() + + yield last + + lib.LLVMMoveToNextSection(sections) + last.expire() + + if last is not None: + last.expire() + + lib.LLVMDisposeSectionIterator(sections) + + def get_symbols(self, cache=False): + """Obtain the symbols in this object file. + + This is a generator for llvm.object.Symbol instances. + + Each Symbol instance is a limited-use object. See this module's + documentation on iterators for more. + """ + symbols = lib.LLVMGetSymbols(self) + last = None + while True: + if lib.LLVMIsSymbolIteratorAtEnd(self, symbols): + break + + last = Symbol(symbols, self) + if cache: + last.cache() + + yield last + + lib.LLVMMoveToNextSymbol(symbols) + last.expire() + + if last is not None: + last.expire() + + lib.LLVMDisposeSymbolIterator(symbols) + +class Section(LLVMObject): + """Represents a section in an object file.""" + + def __init__(self, ptr): + """Construct a new section instance. + + Section instances can currently only be created from an ObjectFile + instance. Therefore, this constructor should not be used outside of + this module. + """ + LLVMObject.__init__(self, ptr) + + self.expired = False + + @CachedProperty + def name(self): + """Obtain the string name of the section. + + This is typically something like '.dynsym' or '.rodata'. + """ + if self.expired: + raise Exception('Section instance has expired.') + + return lib.LLVMGetSectionName(self) + + @CachedProperty + def size(self): + """The size of the section, in long bytes.""" + if self.expired: + raise Exception('Section instance has expired.') + + return lib.LLVMGetSectionSize(self) + + @CachedProperty + def contents(self): + if self.expired: + raise Exception('Section instance has expired.') + + return lib.LLVMGetSectionContents(self) + + @CachedProperty + def address(self): + """The address of this section, in long bytes.""" + if self.expired: + raise Exception('Section instance has expired.') + + return lib.LLVMGetSectionAddress(self) + + def has_symbol(self, symbol): + """Returns whether a Symbol instance is present in this Section.""" + if self.expired: + raise Exception('Section instance has expired.') + + assert isinstance(symbol, Symbol) + return lib.LLVMGetSectionContainsSymbol(self, symbol) + + def get_relocations(self, cache=False): + """Obtain the relocations in this Section. + + This is a generator for llvm.object.Relocation instances. + + Each instance is a limited used object. See this module's documentation + on iterators for more. + """ + if self.expired: + raise Exception('Section instance has expired.') + + relocations = lib.LLVMGetRelocations(self) + last = None + while True: + if lib.LLVMIsRelocationIteratorAtEnd(self, relocations): + break + + last = Relocation(relocations) + if cache: + last.cache() + + yield last + + lib.LLVMMoveToNextRelocation(relocations) + last.expire() + + if last is not None: + last.expire() + + lib.LLVMDisposeRelocationIterator(relocations) + + def cache(self): + """Cache properties of this Section. + + This can be called as a workaround to the single active Section + limitation. When called, the properties of the Section are fetched so + they are still available after the Section has been marked inactive. + """ + getattr(self, 'name') + getattr(self, 'size') + getattr(self, 'contents') + getattr(self, 'address') + + def expire(self): + """Expire the section. + + This is called internally by the section iterator. + """ + self.expired = True + +class Symbol(LLVMObject): + """Represents a symbol in an object file.""" + def __init__(self, ptr, object_file): + assert isinstance(ptr, c_object_p) + assert isinstance(object_file, ObjectFile) + + LLVMObject.__init__(self, ptr) + + self.expired = False + self._object_file = object_file + + @CachedProperty + def name(self): + """The str name of the symbol. + + This is often a function or variable name. Keep in mind that name + mangling could be in effect. + """ + if self.expired: + raise Exception('Symbol instance has expired.') + + return lib.LLVMGetSymbolName(self) + + @CachedProperty + def address(self): + """The address of this symbol, in long bytes.""" + if self.expired: + raise Exception('Symbol instance has expired.') + + return lib.LLVMGetSymbolAddress(self) + + @CachedProperty + def file_offset(self): + """The offset of this symbol in the file, in long bytes.""" + if self.expired: + raise Exception('Symbol instance has expired.') + + return lib.LLVMGetSymbolFileOffset(self) + + @CachedProperty + def size(self): + """The size of the symbol, in long bytes.""" + if self.expired: + raise Exception('Symbol instance has expired.') + + return lib.LLVMGetSymbolSize(self) + + @CachedProperty + def section(self): + """The Section to which this Symbol belongs. + + The returned Section instance does not expire, unlike Sections that are + commonly obtained through iteration. + + Because this obtains a new section iterator each time it is accessed, + calling this on a number of Symbol instances could be expensive. + """ + sections = lib.LLVMGetSections(self._object_file) + lib.LLVMMoveToContainingSection(sections, self) + + return Section(sections) + + def cache(self): + """Cache all cacheable properties.""" + getattr(self, 'name') + getattr(self, 'address') + getattr(self, 'file_offset') + getattr(self, 'size') + + def expire(self): + """Mark the object as expired to prevent future API accesses. + + This is called internally by this module and it is unlikely that + external callers have a legitimate reason for using it. + """ + self.expired = True + +class Relocation(LLVMObject): + """Represents a relocation definition.""" + def __init__(self, ptr): + """Create a new relocation instance. + + Relocations are created from objects derived from Section instances. + Therefore, this constructor should not be called outside of this + module. See Section.get_relocations() for the proper method to obtain + a Relocation instance. + """ + assert isinstance(ptr, c_object_p) + + LLVMObject.__init__(self, ptr) + + self.expired = False + + @CachedProperty + def address(self): + """The address of this relocation, in long bytes.""" + if self.expired: + raise Exception('Relocation instance has expired.') + + return lib.LLVMGetRelocationAddress(self) + + @CachedProperty + def offset(self): + """The offset of this relocation, in long bytes.""" + if self.expired: + raise Exception('Relocation instance has expired.') + + return lib.LLVMGetRelocationOffset(self) + + @CachedProperty + def symbol(self): + """The Symbol corresponding to this Relocation.""" + if self.expired: + raise Exception('Relocation instance has expired.') + + ptr = lib.LLVMGetRelocationSymbol(self) + return Symbol(ptr) + + @CachedProperty + def type_number(self): + """The relocation type, as a long.""" + if self.expired: + raise Exception('Relocation instance has expired.') + + return lib.LLVMGetRelocationType(self) + + @CachedProperty + def type_name(self): + """The relocation type's name, as a str.""" + if self.expired: + raise Exception('Relocation instance has expired.') + + return lib.LLVMGetRelocationTypeName(self) + + @CachedProperty + def value_string(self): + if self.expired: + raise Exception('Relocation instance has expired.') + + return lib.LLVMGetRelocationValueString(self) + + def expire(self): + """Expire this instance, making future API accesses fail.""" + self.expired = True + + def cache(self): + """Cache all cacheable properties on this instance.""" + getattr(self, 'address') + getattr(self, 'offset') + getattr(self, 'symbol') + getattr(self, 'type') + getattr(self, 'type_name') + getattr(self, 'value_string') + +def register_library(library): + """Register function prototypes with LLVM library instance.""" + + # Object.h functions + library.LLVMCreateObjectFile.argtypes = [MemoryBuffer] + library.LLVMCreateObjectFile.restype = c_object_p + + library.LLVMDisposeObjectFile.argtypes = [ObjectFile] + + library.LLVMGetSections.argtypes = [ObjectFile] + library.LLVMGetSections.restype = c_object_p + + library.LLVMDisposeSectionIterator.argtypes = [c_object_p] + + library.LLVMIsSectionIteratorAtEnd.argtypes = [ObjectFile, c_object_p] + library.LLVMIsSectionIteratorAtEnd.restype = bool + + library.LLVMMoveToNextSection.argtypes = [c_object_p] + + library.LLVMMoveToContainingSection.argtypes = [c_object_p, c_object_p] + + library.LLVMGetSymbols.argtypes = [ObjectFile] + library.LLVMGetSymbols.restype = c_object_p + + library.LLVMDisposeSymbolIterator.argtypes = [c_object_p] + + library.LLVMIsSymbolIteratorAtEnd.argtypes = [ObjectFile, c_object_p] + library.LLVMIsSymbolIteratorAtEnd.restype = bool + + library.LLVMMoveToNextSymbol.argtypes = [c_object_p] + + library.LLVMGetSectionName.argtypes = [c_object_p] + library.LLVMGetSectionName.restype = c_char_p + + library.LLVMGetSectionSize.argtypes = [c_object_p] + library.LLVMGetSectionSize.restype = c_uint64 + + library.LLVMGetSectionContents.argtypes = [c_object_p] + library.LLVMGetSectionContents.restype = c_char_p + + library.LLVMGetSectionAddress.argtypes = [c_object_p] + library.LLVMGetSectionAddress.restype = c_uint64 + + library.LLVMGetSectionContainsSymbol.argtypes = [c_object_p, c_object_p] + library.LLVMGetSectionContainsSymbol.restype = bool + + library.LLVMGetRelocations.argtypes = [c_object_p] + library.LLVMGetRelocations.restype = c_object_p + + library.LLVMDisposeRelocationIterator.argtypes = [c_object_p] + + library.LLVMIsRelocationIteratorAtEnd.argtypes = [c_object_p, c_object_p] + library.LLVMIsRelocationIteratorAtEnd.restype = bool + + library.LLVMMoveToNextRelocation.argtypes = [c_object_p] + + library.LLVMGetSymbolName.argtypes = [Symbol] + library.LLVMGetSymbolName.restype = c_char_p + + library.LLVMGetSymbolAddress.argtypes = [Symbol] + library.LLVMGetSymbolAddress.restype = c_uint64 + + library.LLVMGetSymbolFileOffset.argtypes = [Symbol] + library.LLVMGetSymbolFileOffset.restype = c_uint64 + + library.LLVMGetSymbolSize.argtypes = [Symbol] + library.LLVMGetSymbolSize.restype = c_uint64 + + library.LLVMGetRelocationAddress.argtypes = [c_object_p] + library.LLVMGetRelocationAddress.restype = c_uint64 + + library.LLVMGetRelocationOffset.argtypes = [c_object_p] + library.LLVMGetRelocationOffset.restype = c_uint64 + + library.LLVMGetRelocationSymbol.argtypes = [c_object_p] + library.LLVMGetRelocationSymbol.restype = c_object_p + + library.LLVMGetRelocationType.argtypes = [c_object_p] + library.LLVMGetRelocationType.restype = c_uint64 + + library.LLVMGetRelocationTypeName.argtypes = [c_object_p] + library.LLVMGetRelocationTypeName.restype = c_char_p + + library.LLVMGetRelocationValueString.argtypes = [c_object_p] + library.LLVMGetRelocationValueString.restype = c_char_p + +lib = get_library() +register_library(lib) diff --git a/bindings/python/llvm/tests/__init__.py b/bindings/python/llvm/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/bindings/python/llvm/tests/base.py b/bindings/python/llvm/tests/base.py new file mode 100644 index 00000000..194f1a41 --- /dev/null +++ b/bindings/python/llvm/tests/base.py @@ -0,0 +1,38 @@ +import os.path +import unittest + +POSSIBLE_TEST_BINARIES = [ + 'libreadline.so.5', + 'libreadline.so.6', +] + +POSSIBLE_TEST_BINARY_PATHS = [ + '/usr/lib/debug', + '/lib', + '/usr/lib', + '/usr/local/lib', + '/lib/i386-linux-gnu', +] + +class TestBase(unittest.TestCase): + def get_test_binary(self): + """Helper to obtain a test binary for object file testing. + + FIXME Support additional, highly-likely targets or create one + ourselves. + """ + for d in POSSIBLE_TEST_BINARY_PATHS: + for lib in POSSIBLE_TEST_BINARIES: + path = os.path.join(d, lib) + + if os.path.exists(path): + return path + + raise Exception('No suitable test binaries available!') + get_test_binary.__test__ = False + + def get_test_file(self): + return os.path.join(os.path.dirname(os.path.abspath(__file__)), "test_file") + + def get_test_bc(self): + return os.path.join(os.path.dirname(os.path.abspath(__file__)), "test.bc") diff --git a/bindings/python/llvm/tests/test.bc b/bindings/python/llvm/tests/test.bc new file mode 100644 index 0000000000000000000000000000000000000000..8d3d28fbc0db75966d653101c54c4e4702649b0d GIT binary patch literal 1344 zcmbtTO=weD6h1HS<=vO`HN9z{G{LAhO$8Sfo>gm#29lRlqjph$K$vlnlv0b}kp56! zBf@JNO=j$(I*V}}7m2AuVK!=Mbs2wfx+p^h(Skovl!6PzMRh&r=2@A_;Kswd_k6kM zobQ}-@5!r5V-28axR?__MQy|@uYw3V1b~_`1`a%{$3;d%mtynML7BF;UlwxeR;S|M zEM4rjv<`=HxyG2Hty);|9dx%Qnv?FyVCdmdOZ5i_n#p|9+dW;Jjz0Q;l<+eH*n+yX zDd}Q8=cQkprgFHw&Xp#$`p#b_YI0MZ)C|F(l+q7a%~rUaxdw$vy59?>qXpe49+P#) zjV3Ghmzq*fpXf=vSyHwo%ph$M&Cxf0zqfrjH+G^BjTe8AqvFfG?!R5u{C=a@0l%+m zl|T$rLqkh8n$Px;{+s!|ed8I6n5q0g-}sQ3ADI^SSon?Cu6B9OKwVZR14S~(2nUPu zTS~Il8bbH~_cr}g3iRsE zs@wR+1u-%ok4%V>1#@C3L(VE>B$>}-NH!x5oB0eQ$lcFy_E7)H0(XMSfinBq6mQZMt(Zc;APqHh{wDC!0&*1|RKN;_1VMg?V;s9%jrAz6lf z!j4p!+a+9cI$TP7BuhAw>~`t5-O`oz=48nG`1tcxAyBy;b}$}g=jH$31}Xl9>&Yq1s~U8nUJ*Bl zg702I5TMiM, }') diff --git a/bindings/python/llvm/tests/test_file b/bindings/python/llvm/tests/test_file new file mode 100644 index 00000000..6c9b0385 --- /dev/null +++ b/bindings/python/llvm/tests/test_file @@ -0,0 +1 @@ +I,"cAGxqԐdvl\L>g>``wɩ \ No newline at end of file diff --git a/bindings/python/llvm/tests/test_object.py b/bindings/python/llvm/tests/test_object.py new file mode 100644 index 00000000..7ff981b6 --- /dev/null +++ b/bindings/python/llvm/tests/test_object.py @@ -0,0 +1,67 @@ +from .base import TestBase +from ..object import ObjectFile +from ..object import Relocation +from ..object import Section +from ..object import Symbol + +class TestObjectFile(TestBase): + def get_object_file(self): + source = self.get_test_binary() + return ObjectFile(filename=source) + + def test_create_from_file(self): + self.get_object_file() + + def test_get_sections(self): + o = self.get_object_file() + + count = 0 + for section in o.get_sections(): + count += 1 + assert isinstance(section, Section) + assert isinstance(section.name, str) + assert isinstance(section.size, long) + assert isinstance(section.contents, str) + assert isinstance(section.address, long) + + self.assertGreater(count, 0) + + for section in o.get_sections(): + section.cache() + + def test_get_symbols(self): + o = self.get_object_file() + + count = 0 + for symbol in o.get_symbols(): + count += 1 + assert isinstance(symbol, Symbol) + assert isinstance(symbol.name, str) + assert isinstance(symbol.address, long) + assert isinstance(symbol.size, long) + assert isinstance(symbol.file_offset, long) + + self.assertGreater(count, 0) + + for symbol in o.get_symbols(): + symbol.cache() + + def test_symbol_section_accessor(self): + o = self.get_object_file() + + for symbol in o.get_symbols(): + section = symbol.section + assert isinstance(section, Section) + + break + + def test_get_relocations(self): + o = self.get_object_file() + for section in o.get_sections(): + for relocation in section.get_relocations(): + assert isinstance(relocation, Relocation) + assert isinstance(relocation.address, long) + assert isinstance(relocation.offset, long) + assert isinstance(relocation.type_number, long) + assert isinstance(relocation.type_name, str) + assert isinstance(relocation.value_string, str) diff --git a/cmake/README b/cmake/README new file mode 100644 index 00000000..4aafdbf3 --- /dev/null +++ b/cmake/README @@ -0,0 +1 @@ +See docs/CMake.html for instructions on how to build LLVM with CMake. diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake new file mode 100755 index 00000000..dc991a23 --- /dev/null +++ b/cmake/config-ix.cmake @@ -0,0 +1,500 @@ +if( WIN32 AND NOT CYGWIN ) + # We consider Cygwin as another Unix + set(PURE_WINDOWS 1) +endif() + +include(CheckIncludeFile) +include(CheckIncludeFileCXX) +include(CheckLibraryExists) +include(CheckSymbolExists) +include(CheckFunctionExists) +include(CheckCXXSourceCompiles) +include(TestBigEndian) + +if( UNIX AND NOT BEOS ) + # Used by check_symbol_exists: + set(CMAKE_REQUIRED_LIBRARIES m) +endif() + +# Helper macros and functions +macro(add_cxx_include result files) + set(${result} "") + foreach (file_name ${files}) + set(${result} "${${result}}#include<${file_name}>\n") + endforeach() +endmacro(add_cxx_include files result) + +function(check_type_exists type files variable) + add_cxx_include(includes "${files}") + CHECK_CXX_SOURCE_COMPILES(" + ${includes} ${type} typeVar; + int main() { + return 0; + } + " ${variable}) +endfunction() + +# include checks +check_include_file_cxx(cxxabi.h HAVE_CXXABI_H) +check_include_file(dirent.h HAVE_DIRENT_H) +check_include_file(dlfcn.h HAVE_DLFCN_H) +check_include_file(errno.h HAVE_ERRNO_H) +check_include_file(execinfo.h HAVE_EXECINFO_H) +check_include_file(fcntl.h HAVE_FCNTL_H) +check_include_file(inttypes.h HAVE_INTTYPES_H) +check_include_file(limits.h HAVE_LIMITS_H) +check_include_file(malloc.h HAVE_MALLOC_H) +check_include_file(malloc/malloc.h HAVE_MALLOC_MALLOC_H) +check_include_file(ndir.h HAVE_NDIR_H) +if( NOT PURE_WINDOWS ) + check_include_file(pthread.h HAVE_PTHREAD_H) +endif() +check_include_file(sanitizer/msan_interface.h HAVE_SANITIZER_MSAN_INTERFACE_H) +check_include_file(signal.h HAVE_SIGNAL_H) +check_include_file(stdint.h HAVE_STDINT_H) +check_include_file(sys/dir.h HAVE_SYS_DIR_H) +check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H) +check_include_file(sys/mman.h HAVE_SYS_MMAN_H) +check_include_file(sys/ndir.h HAVE_SYS_NDIR_H) +check_include_file(sys/param.h HAVE_SYS_PARAM_H) +check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H) +check_include_file(sys/stat.h HAVE_SYS_STAT_H) +check_include_file(sys/time.h HAVE_SYS_TIME_H) +check_include_file(sys/uio.h HAVE_SYS_UIO_H) +check_include_file(sys/wait.h HAVE_SYS_WAIT_H) +check_include_file(termios.h HAVE_TERMIOS_H) +check_include_file(unistd.h HAVE_UNISTD_H) +check_include_file(utime.h HAVE_UTIME_H) +check_include_file(valgrind/valgrind.h HAVE_VALGRIND_VALGRIND_H) +check_include_file(zlib.h HAVE_ZLIB_H) +check_include_file(fenv.h HAVE_FENV_H) +check_symbol_exists(FE_ALL_EXCEPT "fenv.h" HAVE_DECL_FE_ALL_EXCEPT) +check_symbol_exists(FE_INEXACT "fenv.h" HAVE_DECL_FE_INEXACT) + +check_include_file(mach/mach.h HAVE_MACH_MACH_H) +check_include_file(mach-o/dyld.h HAVE_MACH_O_DYLD_H) + +# library checks +if( NOT PURE_WINDOWS ) + check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD) + if (HAVE_LIBPTHREAD) + check_library_exists(pthread pthread_getspecific "" HAVE_PTHREAD_GETSPECIFIC) + check_library_exists(pthread pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT) + check_library_exists(pthread pthread_mutex_lock "" HAVE_PTHREAD_MUTEX_LOCK) + else() + # this could be Android + check_library_exists(c pthread_create "" PTHREAD_IN_LIBC) + if (PTHREAD_IN_LIBC) + check_library_exists(c pthread_getspecific "" HAVE_PTHREAD_GETSPECIFIC) + check_library_exists(c pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT) + check_library_exists(c pthread_mutex_lock "" HAVE_PTHREAD_MUTEX_LOCK) + endif() + endif() + check_library_exists(dl dlopen "" HAVE_LIBDL) + check_library_exists(rt clock_gettime "" HAVE_LIBRT) + if (LLVM_ENABLE_ZLIB) + check_library_exists(z compress2 "" HAVE_LIBZ) + else() + set(HAVE_LIBZ 0) + endif() + if(LLVM_ENABLE_TERMINFO) + set(HAVE_TERMINFO 0) + foreach(library tinfo terminfo curses ncurses ncursesw) + string(TOUPPER ${library} library_suffix) + check_library_exists(${library} setupterm "" HAVE_TERMINFO_${library_suffix}) + if(HAVE_TERMINFO_${library_suffix}) + set(HAVE_TERMINFO 1) + set(TERMINFO_LIBS "${library}") + break() + endif() + endforeach() + else() + set(HAVE_TERMINFO 0) + endif() +endif() + +# function checks +check_symbol_exists(arc4random "stdlib.h" HAVE_ARC4RANDOM) +check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE) +check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE) +check_symbol_exists(getrusage sys/resource.h HAVE_GETRUSAGE) +check_symbol_exists(setrlimit sys/resource.h HAVE_SETRLIMIT) +check_symbol_exists(isatty unistd.h HAVE_ISATTY) +check_symbol_exists(isinf cmath HAVE_ISINF_IN_CMATH) +check_symbol_exists(isinf math.h HAVE_ISINF_IN_MATH_H) +check_symbol_exists(finite ieeefp.h HAVE_FINITE_IN_IEEEFP_H) +check_symbol_exists(isnan cmath HAVE_ISNAN_IN_CMATH) +check_symbol_exists(isnan math.h HAVE_ISNAN_IN_MATH_H) +check_symbol_exists(ceilf math.h HAVE_CEILF) +check_symbol_exists(floorf math.h HAVE_FLOORF) +check_symbol_exists(fmodf math.h HAVE_FMODF) +check_symbol_exists(log math.h HAVE_LOG) +check_symbol_exists(log2 math.h HAVE_LOG2) +check_symbol_exists(log10 math.h HAVE_LOG10) +check_symbol_exists(exp math.h HAVE_EXP) +check_symbol_exists(exp2 math.h HAVE_EXP2) +check_symbol_exists(exp10 math.h HAVE_EXP10) +check_symbol_exists(futimens sys/stat.h HAVE_FUTIMENS) +check_symbol_exists(futimes sys/time.h HAVE_FUTIMES) +if( HAVE_SETJMP_H ) + check_symbol_exists(longjmp setjmp.h HAVE_LONGJMP) + check_symbol_exists(setjmp setjmp.h HAVE_SETJMP) + check_symbol_exists(siglongjmp setjmp.h HAVE_SIGLONGJMP) + check_symbol_exists(sigsetjmp setjmp.h HAVE_SIGSETJMP) +endif() +if( HAVE_SYS_UIO_H ) + check_symbol_exists(writev sys/uio.h HAVE_WRITEV) +endif() +check_symbol_exists(nearbyintf math.h HAVE_NEARBYINTF) +check_symbol_exists(mallinfo malloc.h HAVE_MALLINFO) +check_symbol_exists(malloc_zone_statistics malloc/malloc.h + HAVE_MALLOC_ZONE_STATISTICS) +check_symbol_exists(mkdtemp "stdlib.h;unistd.h" HAVE_MKDTEMP) +check_symbol_exists(mkstemp "stdlib.h;unistd.h" HAVE_MKSTEMP) +check_symbol_exists(mktemp "stdlib.h;unistd.h" HAVE_MKTEMP) +check_symbol_exists(closedir "sys/types.h;dirent.h" HAVE_CLOSEDIR) +check_symbol_exists(opendir "sys/types.h;dirent.h" HAVE_OPENDIR) +check_symbol_exists(readdir "sys/types.h;dirent.h" HAVE_READDIR) +check_symbol_exists(getcwd unistd.h HAVE_GETCWD) +check_symbol_exists(gettimeofday sys/time.h HAVE_GETTIMEOFDAY) +check_symbol_exists(getrlimit "sys/types.h;sys/time.h;sys/resource.h" HAVE_GETRLIMIT) +check_symbol_exists(posix_spawn spawn.h HAVE_POSIX_SPAWN) +check_symbol_exists(pread unistd.h HAVE_PREAD) +check_symbol_exists(realpath stdlib.h HAVE_REALPATH) +check_symbol_exists(sbrk unistd.h HAVE_SBRK) +check_symbol_exists(srand48 stdlib.h HAVE_RAND48_SRAND48) +if( HAVE_RAND48_SRAND48 ) + check_symbol_exists(lrand48 stdlib.h HAVE_RAND48_LRAND48) + if( HAVE_RAND48_LRAND48 ) + check_symbol_exists(drand48 stdlib.h HAVE_RAND48_DRAND48) + if( HAVE_RAND48_DRAND48 ) + set(HAVE_RAND48 1 CACHE INTERNAL "are srand48/lrand48/drand48 available?") + endif() + endif() +endif() +check_symbol_exists(strtoll stdlib.h HAVE_STRTOLL) +check_symbol_exists(strtoq stdlib.h HAVE_STRTOQ) +check_symbol_exists(strerror string.h HAVE_STRERROR) +check_symbol_exists(strerror_r string.h HAVE_STRERROR_R) +check_symbol_exists(strerror_s string.h HAVE_DECL_STRERROR_S) +check_symbol_exists(setenv stdlib.h HAVE_SETENV) +if( PURE_WINDOWS ) + check_symbol_exists(_chsize_s io.h HAVE__CHSIZE_S) + + check_function_exists(_alloca HAVE__ALLOCA) + check_function_exists(__alloca HAVE___ALLOCA) + check_function_exists(__chkstk HAVE___CHKSTK) + check_function_exists(___chkstk HAVE____CHKSTK) + + check_function_exists(__ashldi3 HAVE___ASHLDI3) + check_function_exists(__ashrdi3 HAVE___ASHRDI3) + check_function_exists(__divdi3 HAVE___DIVDI3) + check_function_exists(__fixdfdi HAVE___FIXDFDI) + check_function_exists(__fixsfdi HAVE___FIXSFDI) + check_function_exists(__floatdidf HAVE___FLOATDIDF) + check_function_exists(__lshrdi3 HAVE___LSHRDI3) + check_function_exists(__moddi3 HAVE___MODDI3) + check_function_exists(__udivdi3 HAVE___UDIVDI3) + check_function_exists(__umoddi3 HAVE___UMODDI3) + + check_function_exists(__main HAVE___MAIN) + check_function_exists(__cmpdi2 HAVE___CMPDI2) +endif() +if( HAVE_DLFCN_H ) + if( HAVE_LIBDL ) + list(APPEND CMAKE_REQUIRED_LIBRARIES dl) + endif() + check_symbol_exists(dlerror dlfcn.h HAVE_DLERROR) + check_symbol_exists(dlopen dlfcn.h HAVE_DLOPEN) + if( HAVE_LIBDL ) + list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES dl) + endif() +endif() + +check_symbol_exists(__GLIBC__ stdio.h LLVM_USING_GLIBC) +if( LLVM_USING_GLIBC ) + add_llvm_definitions( -D_GNU_SOURCE ) +endif() + +set(headers "sys/types.h") + +if (HAVE_INTTYPES_H) + set(headers ${headers} "inttypes.h") +endif() + +if (HAVE_STDINT_H) + set(headers ${headers} "stdint.h") +endif() + +check_type_exists(int64_t "${headers}" HAVE_INT64_T) +check_type_exists(uint64_t "${headers}" HAVE_UINT64_T) +check_type_exists(u_int64_t "${headers}" HAVE_U_INT64_T) + +# available programs checks +function(llvm_find_program name) + string(TOUPPER ${name} NAME) + string(REGEX REPLACE "\\." "_" NAME ${NAME}) + + find_program(LLVM_PATH_${NAME} NAMES ${ARGV}) + mark_as_advanced(LLVM_PATH_${NAME}) + if(LLVM_PATH_${NAME}) + set(HAVE_${NAME} 1 CACHE INTERNAL "Is ${name} available ?") + mark_as_advanced(HAVE_${NAME}) + else(LLVM_PATH_${NAME}) + set(HAVE_${NAME} "" CACHE INTERNAL "Is ${name} available ?") + endif(LLVM_PATH_${NAME}) +endfunction() + +llvm_find_program(gv) +llvm_find_program(circo) +llvm_find_program(twopi) +llvm_find_program(neato) +llvm_find_program(fdp) +llvm_find_program(dot) +llvm_find_program(dotty) +llvm_find_program(xdot xdot.py) +llvm_find_program(Graphviz) + +if( LLVM_ENABLE_FFI ) + find_path(FFI_INCLUDE_PATH ffi.h PATHS ${FFI_INCLUDE_DIR}) + if( FFI_INCLUDE_PATH ) + set(FFI_HEADER ffi.h CACHE INTERNAL "") + set(HAVE_FFI_H 1 CACHE INTERNAL "") + else() + find_path(FFI_INCLUDE_PATH ffi/ffi.h PATHS ${FFI_INCLUDE_DIR}) + if( FFI_INCLUDE_PATH ) + set(FFI_HEADER ffi/ffi.h CACHE INTERNAL "") + set(HAVE_FFI_FFI_H 1 CACHE INTERNAL "") + endif() + endif() + + if( NOT FFI_HEADER ) + message(FATAL_ERROR "libffi includes are not found.") + endif() + + find_library(FFI_LIBRARY_PATH ffi PATHS ${FFI_LIBRARY_DIR}) + if( NOT FFI_LIBRARY_PATH ) + message(FATAL_ERROR "libffi is not found.") + endif() + + list(APPEND CMAKE_REQUIRED_LIBRARIES ${FFI_LIBRARY_PATH}) + list(APPEND CMAKE_REQUIRED_INCLUDES ${FFI_INCLUDE_PATH}) + check_symbol_exists(ffi_call ${FFI_HEADER} HAVE_FFI_CALL) + list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${FFI_INCLUDE_PATH}) + list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${FFI_LIBRARY_PATH}) +else() + unset(HAVE_FFI_FFI_H CACHE) + unset(HAVE_FFI_H CACHE) + unset(HAVE_FFI_CALL CACHE) +endif( LLVM_ENABLE_FFI ) + +# Define LLVM_HAS_ATOMICS if gcc or MSVC atomic builtins are supported. +include(CheckAtomic) + +if( LLVM_ENABLE_PIC ) + set(ENABLE_PIC 1) +else() + set(ENABLE_PIC 0) +endif() + +find_package(LibXml2) +if (LIBXML2_FOUND) + set(CLANG_HAVE_LIBXML 1) + # When cross-compiling, liblzma is not detected as a dependency for libxml2, + # which makes linking c-index-test fail. But for native builds, all libraries + # are installed and checked by CMake before Makefiles are generated and everything + # works according to the plan. However, if a -llzma is added to native builds, + # an additional requirement on the static liblzma.a is required, but will not + # be checked by CMake, breaking native compilation. + # Since this is only pertinent to cross-compilations, and there's no way CMake + # can check for every foreign library on every OS, we add the dep and warn the dev. + if ( CMAKE_CROSSCOMPILING ) + if (NOT PC_LIBXML_VERSION VERSION_LESS "2.8.0") + message(STATUS "Adding LZMA as a dep to XML2 for cross-compilation, make sure liblzma.a is available.") + set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} "-llzma") + endif () + endif () +endif () + +include(CheckCXXCompilerFlag) + +check_cxx_compiler_flag("-Wno-variadic-macros" SUPPORTS_NO_VARIADIC_MACROS_FLAG) + +set(USE_NO_MAYBE_UNINITIALIZED 0) +set(USE_NO_UNINITIALIZED 0) + +# Disable gcc's potentially uninitialized use analysis as it presents lots of +# false positives. +if (CMAKE_COMPILER_IS_GNUCXX) + check_cxx_compiler_flag("-Wmaybe-uninitialized" HAS_MAYBE_UNINITIALIZED) + if (HAS_MAYBE_UNINITIALIZED) + set(USE_NO_MAYBE_UNINITIALIZED 1) + else() + # Only recent versions of gcc make the distinction between -Wuninitialized + # and -Wmaybe-uninitialized. If -Wmaybe-uninitialized isn't supported, just + # turn off all uninitialized use warnings. + check_cxx_compiler_flag("-Wuninitialized" HAS_UNINITIALIZED) + set(USE_NO_UNINITIALIZED ${HAS_UNINITIALIZED}) + endif() +endif() + +# By default, we target the host, but this can be overridden at CMake +# invocation time. +include(GetHostTriple) +get_host_triple(LLVM_INFERRED_HOST_TRIPLE) + +set(LLVM_HOST_TRIPLE "${LLVM_INFERRED_HOST_TRIPLE}" CACHE STRING + "Host on which LLVM binaries will run") + +# Determine the native architecture. +string(TOLOWER "${LLVM_TARGET_ARCH}" LLVM_NATIVE_ARCH) +if( LLVM_NATIVE_ARCH STREQUAL "host" ) + string(REGEX MATCH "^[^-]*" LLVM_NATIVE_ARCH ${LLVM_HOST_TRIPLE}) +endif () + +if (LLVM_NATIVE_ARCH MATCHES "i[2-6]86") + set(LLVM_NATIVE_ARCH X86) +elseif (LLVM_NATIVE_ARCH STREQUAL "x86") + set(LLVM_NATIVE_ARCH X86) +elseif (LLVM_NATIVE_ARCH STREQUAL "amd64") + set(LLVM_NATIVE_ARCH X86) +elseif (LLVM_NATIVE_ARCH STREQUAL "x86_64") + set(LLVM_NATIVE_ARCH X86) +elseif (LLVM_NATIVE_ARCH MATCHES "sparc") + set(LLVM_NATIVE_ARCH Sparc) +elseif (LLVM_NATIVE_ARCH MATCHES "powerpc") + set(LLVM_NATIVE_ARCH PowerPC) +elseif (LLVM_NATIVE_ARCH MATCHES "aarch64") + set(LLVM_NATIVE_ARCH AArch64) +elseif (LLVM_NATIVE_ARCH MATCHES "arm") + set(LLVM_NATIVE_ARCH ARM) +elseif (LLVM_NATIVE_ARCH MATCHES "mips") + set(LLVM_NATIVE_ARCH Mips) +elseif (LLVM_NATIVE_ARCH MATCHES "xcore") + set(LLVM_NATIVE_ARCH XCore) +elseif (LLVM_NATIVE_ARCH MATCHES "msp430") + set(LLVM_NATIVE_ARCH MSP430) +elseif (LLVM_NATIVE_ARCH MATCHES "hexagon") + set(LLVM_NATIVE_ARCH Hexagon) +elseif (LLVM_NATIVE_ARCH MATCHES "s390x") + set(LLVM_NATIVE_ARCH SystemZ) +else () + message(FATAL_ERROR "Unknown architecture ${LLVM_NATIVE_ARCH}") +endif () + +# If build targets includes "host", then replace with native architecture. +list(FIND LLVM_TARGETS_TO_BUILD "host" idx) +if( NOT idx LESS 0 ) + list(REMOVE_AT LLVM_TARGETS_TO_BUILD ${idx}) + list(APPEND LLVM_TARGETS_TO_BUILD ${LLVM_NATIVE_ARCH}) + list(REMOVE_DUPLICATES LLVM_TARGETS_TO_BUILD) +endif() + +list(FIND LLVM_TARGETS_TO_BUILD ${LLVM_NATIVE_ARCH} NATIVE_ARCH_IDX) +if (NATIVE_ARCH_IDX EQUAL -1) + message(STATUS + "Native target ${LLVM_NATIVE_ARCH} is not selected; lli will not JIT code") +else () + message(STATUS "Native target architecture is ${LLVM_NATIVE_ARCH}") + set(LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target) + set(LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo) + set(LLVM_NATIVE_TARGETMC LLVMInitialize${LLVM_NATIVE_ARCH}TargetMC) + set(LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter) + + # We don't have an ASM parser for all architectures yet. + if (EXISTS ${CMAKE_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/CMakeLists.txt) + set(LLVM_NATIVE_ASMPARSER LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser) + endif () + + # We don't have an disassembler for all architectures yet. + if (EXISTS ${CMAKE_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/Disassembler/CMakeLists.txt) + set(LLVM_NATIVE_DISASSEMBLER LLVMInitialize${LLVM_NATIVE_ARCH}Disassembler) + endif () +endif () + +if( MINGW ) + set(HAVE_LIBIMAGEHLP 1) + set(HAVE_LIBPSAPI 1) + set(HAVE_LIBSHELL32 1) + # TODO: Check existence of libraries. + # include(CheckLibraryExists) + # CHECK_LIBRARY_EXISTS(imagehlp ??? . HAVE_LIBIMAGEHLP) +endif( MINGW ) + +if (NOT HAVE_STRTOLL) + # Use _strtoi64 if strtoll is not available. + check_symbol_exists(_strtoi64 stdlib.h have_strtoi64) + if (have_strtoi64) + set(HAVE_STRTOLL 1) + set(strtoll "_strtoi64") + set(strtoull "_strtoui64") + endif () +endif () + +if( MSVC ) + set(SHLIBEXT ".lib") + set(stricmp "_stricmp") + set(strdup "_strdup") +endif( MSVC ) + +if( PURE_WINDOWS ) + CHECK_CXX_SOURCE_COMPILES(" + #include + #include + extern \"C\" void foo(PENUMLOADED_MODULES_CALLBACK); + extern \"C\" void foo(BOOL(CALLBACK*)(PCSTR,ULONG_PTR,ULONG,PVOID)); + int main(){return 0;}" + HAVE_ELMCB_PCSTR) + if( HAVE_ELMCB_PCSTR ) + set(WIN32_ELMCB_PCSTR "PCSTR") + else() + set(WIN32_ELMCB_PCSTR "PSTR") + endif() +endif( PURE_WINDOWS ) + +# FIXME: Signal handler return type, currently hardcoded to 'void' +set(RETSIGTYPE void) + +if( LLVM_ENABLE_THREADS ) + # Check if threading primitives aren't supported on this platform + if( NOT HAVE_PTHREAD_H AND NOT WIN32 ) + set(LLVM_ENABLE_THREADS 0) + endif() +endif() + +if( LLVM_ENABLE_THREADS ) + message(STATUS "Threads enabled.") +else( LLVM_ENABLE_THREADS ) + message(STATUS "Threads disabled.") +endif() + +if (LLVM_ENABLE_ZLIB ) + # Check if zlib is available in the system. + if ( NOT HAVE_ZLIB_H OR NOT HAVE_LIBZ ) + set(LLVM_ENABLE_ZLIB 0) + endif() +endif() + +set(LLVM_PREFIX ${CMAKE_INSTALL_PREFIX}) + +if (LLVM_ENABLE_DOXYGEN) + message(STATUS "Doxygen enabled.") + find_package(Doxygen) + + if (DOXYGEN_FOUND) + # If we find doxygen and we want to enable doxygen by default create a + # global aggregate doxygen target for generating llvm and any/all + # subprojects doxygen documentation. + if (LLVM_BUILD_DOCS) + add_custom_target(doxygen ALL) + endif() + + option(LLVM_DOXYGEN_EXTERNAL_SEARCH "Enable doxygen external search." OFF) + if (LLVM_DOXYGEN_EXTERNAL_SEARCH) + set(LLVM_DOXYGEN_SEARCHENGINE_URL "" CACHE STRING "URL to use for external searhc.") + set(LLVM_DOXYGEN_SEARCH_MAPPINGS "" CACHE STRING "Doxygen Search Mappings") + endif() + endif() +else() + message(STATUS "Doxygen disabled.") +endif() diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake new file mode 100644 index 00000000..34e40172 --- /dev/null +++ b/cmake/modules/AddLLVM.cmake @@ -0,0 +1,366 @@ +include(LLVMParseArguments) +include(LLVMProcessSources) +include(LLVM-Config) + +macro(add_llvm_library name) + llvm_process_sources( ALL_FILES ${ARGN} ) + add_library( ${name} ${ALL_FILES} ) + set_property( GLOBAL APPEND PROPERTY LLVM_LIBS ${name} ) + if( LLVM_COMMON_DEPENDS ) + add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} ) + endif( LLVM_COMMON_DEPENDS ) + + if( BUILD_SHARED_LIBS ) + llvm_config( ${name} ${LLVM_LINK_COMPONENTS} ) + if (MSVC) + set_target_properties(${name} + PROPERTIES + IMPORT_SUFFIX ".imp") + endif () + endif() + + # Ensure that the system libraries always comes last on the + # list. Without this, linking the unit tests on MinGW fails. + link_system_libs( ${name} ) + + if( EXCLUDE_FROM_ALL ) + set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON) + else() + if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LTO") + install(TARGETS ${name} + LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} + ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) + endif() + endif() + set_target_properties(${name} PROPERTIES FOLDER "Libraries") + + # Add the explicit dependency information for this library. + # + # It would be nice to verify that we have the dependencies for this library + # name, but using get_property(... SET) doesn't suffice to determine if a + # property has been set to an empty value. + get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${name}) + target_link_libraries(${name} ${lib_deps}) +endmacro(add_llvm_library name) + +macro(add_llvm_loadable_module name) + if( NOT LLVM_ON_UNIX OR CYGWIN ) + message(STATUS "Loadable modules not supported on this platform. +${name} ignored.") + # Add empty "phony" target + add_custom_target(${name}) + else() + llvm_process_sources( ALL_FILES ${ARGN} ) + if (MODULE) + set(libkind MODULE) + else() + set(libkind SHARED) + endif() + + add_library( ${name} ${libkind} ${ALL_FILES} ) + set_target_properties( ${name} PROPERTIES PREFIX "" ) + + llvm_config( ${name} ${LLVM_LINK_COMPONENTS} ) + link_system_libs( ${name} ) + + if (APPLE) + # Darwin-specific linker flags for loadable modules. + set_target_properties(${name} PROPERTIES + LINK_FLAGS "-Wl,-flat_namespace -Wl,-undefined -Wl,suppress") + endif() + + if( EXCLUDE_FROM_ALL ) + set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON) + else() + if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + install(TARGETS ${name} + LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} + ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) + endif() + endif() + endif() + + set_target_properties(${name} PROPERTIES FOLDER "Loadable modules") +endmacro(add_llvm_loadable_module name) + + +macro(add_llvm_executable name) + llvm_process_sources( ALL_FILES ${ARGN} ) + if( EXCLUDE_FROM_ALL ) + add_executable(${name} EXCLUDE_FROM_ALL ${ALL_FILES}) + else() + add_executable(${name} ${ALL_FILES}) + endif() + set(EXCLUDE_FROM_ALL OFF) + llvm_config( ${name} ${LLVM_LINK_COMPONENTS} ) + if( LLVM_COMMON_DEPENDS ) + add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} ) + endif( LLVM_COMMON_DEPENDS ) + link_system_libs( ${name} ) +endmacro(add_llvm_executable name) + + +set (LLVM_TOOLCHAIN_TOOLS + llvm-ar + llvm-objdump + ) + +macro(add_llvm_tool name) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR}) + if( NOT LLVM_BUILD_TOOLS ) + set(EXCLUDE_FROM_ALL ON) + endif() + add_llvm_executable(${name} ${ARGN}) + + list(FIND LLVM_TOOLCHAIN_TOOLS ${name} LLVM_IS_${name}_TOOLCHAIN_TOOL) + if (LLVM_IS_${name}_TOOLCHAIN_TOOL GREATER -1 OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + if( LLVM_BUILD_TOOLS ) + install(TARGETS ${name} RUNTIME DESTINATION bin) + endif() + endif() + set_target_properties(${name} PROPERTIES FOLDER "Tools") +endmacro(add_llvm_tool name) + + +macro(add_llvm_example name) +# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_EXAMPLES_BINARY_DIR}) + if( NOT LLVM_BUILD_EXAMPLES ) + set(EXCLUDE_FROM_ALL ON) + endif() + add_llvm_executable(${name} ${ARGN}) + if( LLVM_BUILD_EXAMPLES ) + install(TARGETS ${name} RUNTIME DESTINATION examples) + endif() + set_target_properties(${name} PROPERTIES FOLDER "Examples") +endmacro(add_llvm_example name) + + +macro(add_llvm_utility name) + add_llvm_executable(${name} ${ARGN}) + set_target_properties(${name} PROPERTIES FOLDER "Utils") +endmacro(add_llvm_utility name) + + +macro(add_llvm_target target_name) + include_directories(BEFORE + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}) + add_llvm_library(LLVM${target_name} ${ARGN} ${TABLEGEN_OUTPUT}) + set( CURRENT_LLVM_TARGET LLVM${target_name} ) +endmacro(add_llvm_target) + +# Add external project that may want to be built as part of llvm such as Clang, +# lld, and Polly. This adds two options. One for the source directory of the +# project, which defaults to ${CMAKE_CURRENT_SOURCE_DIR}/${name}. Another to +# enable or disable building it with everthing else. +# Additional parameter can be specified as the name of directory. +macro(add_llvm_external_project name) + set(add_llvm_external_dir "${ARGN}") + if("${add_llvm_external_dir}" STREQUAL "") + set(add_llvm_external_dir ${name}) + endif() + list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}") + string(REPLACE "-" "_" nameUNDERSCORE ${name}) + string(TOUPPER ${nameUNDERSCORE} nameUPPER) + set(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}" + CACHE PATH "Path to ${name} source directory") + if (NOT ${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR} STREQUAL "" + AND EXISTS ${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR}/CMakeLists.txt) + option(LLVM_EXTERNAL_${nameUPPER}_BUILD + "Whether to build ${name} as part of LLVM" ON) + if (LLVM_EXTERNAL_${nameUPPER}_BUILD) + add_subdirectory(${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR} ${add_llvm_external_dir}) + endif() + endif() +endmacro(add_llvm_external_project) + +macro(add_llvm_tool_subdirectory name) + list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${CMAKE_CURRENT_SOURCE_DIR}/${name}") + add_subdirectory(${name}) +endmacro(add_llvm_tool_subdirectory) + +macro(ignore_llvm_tool_subdirectory name) + list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${CMAKE_CURRENT_SOURCE_DIR}/${name}") +endmacro(ignore_llvm_tool_subdirectory) + +function(add_llvm_implicit_external_projects) + set(list_of_implicit_subdirs "") + file(GLOB sub-dirs "${CMAKE_CURRENT_SOURCE_DIR}/*") + foreach(dir ${sub-dirs}) + if(IS_DIRECTORY "${dir}") + list(FIND LLVM_IMPLICIT_PROJECT_IGNORE "${dir}" tool_subdir_ignore) + if( tool_subdir_ignore EQUAL -1 + AND EXISTS "${dir}/CMakeLists.txt") + get_filename_component(fn "${dir}" NAME) + list(APPEND list_of_implicit_subdirs "${fn}") + endif() + endif() + endforeach() + + foreach(external_proj ${list_of_implicit_subdirs}) + add_llvm_external_project("${external_proj}") + endforeach() +endfunction(add_llvm_implicit_external_projects) + +# Generic support for adding a unittest. +function(add_unittest test_suite test_name) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + if( NOT LLVM_BUILD_TESTS ) + set(EXCLUDE_FROM_ALL ON) + endif() + + add_llvm_executable(${test_name} ${ARGN}) + target_link_libraries(${test_name} + gtest + gtest_main + LLVMSupport # gtest needs it for raw_ostream. + ) + + add_dependencies(${test_suite} ${test_name}) + get_target_property(test_suite_folder ${test_suite} FOLDER) + if (NOT ${test_suite_folder} STREQUAL "NOTFOUND") + set_property(TARGET ${test_name} PROPERTY FOLDER "${test_suite_folder}") + endif () + + # Visual Studio 2012 only supports up to 8 template parameters in + # std::tr1::tuple by default, but gtest requires 10 + if (MSVC AND MSVC_VERSION EQUAL 1700) + set_property(TARGET ${test_name} APPEND PROPERTY COMPILE_DEFINITIONS _VARIADIC_MAX=10) + endif () + + include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include) + set_property(TARGET ${test_name} APPEND PROPERTY COMPILE_DEFINITIONS GTEST_HAS_RTTI=0) + if (NOT LLVM_ENABLE_THREADS) + set_property(TARGET ${test_name} APPEND PROPERTY COMPILE_DEFINITIONS GTEST_HAS_PTHREAD=0) + endif () + + get_property(target_compile_flags TARGET ${test_name} PROPERTY COMPILE_FLAGS) + if (LLVM_COMPILER_IS_GCC_COMPATIBLE) + set(target_compile_flags "${target_compile_flags} -fno-rtti") + elseif (MSVC) + llvm_replace_compiler_option(target_compile_flags "/GR" "/GR-") + endif () + + if (SUPPORTS_NO_VARIADIC_MACROS_FLAG) + set(target_compile_flags "${target_compile_flags} -Wno-variadic-macros") + endif () + set_property(TARGET ${test_name} PROPERTY COMPILE_FLAGS "${target_compile_flags}") +endfunction() + +# This function provides an automatic way to 'configure'-like generate a file +# based on a set of common and custom variables, specifically targetting the +# variables needed for the 'lit.site.cfg' files. This function bundles the +# common variables that any Lit instance is likely to need, and custom +# variables can be passed in. +function(configure_lit_site_cfg input output) + foreach(c ${LLVM_TARGETS_TO_BUILD}) + set(TARGETS_BUILT "${TARGETS_BUILT} ${c}") + endforeach(c) + set(TARGETS_TO_BUILD ${TARGETS_BUILT}) + + set(SHLIBEXT "${LTDL_SHLIB_EXT}") + set(SHLIBDIR "${LLVM_BINARY_DIR}/lib/${CMAKE_CFG_INTDIR}") + + if(BUILD_SHARED_LIBS) + set(LLVM_SHARED_LIBS_ENABLED "1") + else() + set(LLVM_SHARED_LIBS_ENABLED "0") + endif(BUILD_SHARED_LIBS) + + if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(SHLIBPATH_VAR "DYLD_LIBRARY_PATH") + else() # Default for all other unix like systems. + # CMake hardcodes the library locaction using rpath. + # Therefore LD_LIBRARY_PATH is not required to run binaries in the + # build dir. We pass it anyways. + set(SHLIBPATH_VAR "LD_LIBRARY_PATH") + endif() + + # Configuration-time: See Unit/lit.site.cfg.in + set(LLVM_BUILD_MODE "%(build_mode)s") + + set(LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR}) + set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR}) + set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/%(build_mode)s") + set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib/%(build_mode)s") + set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) + set(ENABLE_SHARED ${LLVM_SHARED_LIBS_ENABLED}) + set(SHLIBPATH_VAR ${SHLIBPATH_VAR}) + + if(LLVM_ENABLE_ASSERTIONS AND NOT MSVC_IDE) + set(ENABLE_ASSERTIONS "1") + else() + set(ENABLE_ASSERTIONS "0") + endif() + + set(HOST_OS ${CMAKE_SYSTEM_NAME}) + set(HOST_ARCH ${CMAKE_SYSTEM_PROCESSOR}) + + if (CLANG_ENABLE_ARCMT) + set(ENABLE_CLANG_ARCMT "1") + else() + set(ENABLE_CLANG_ARCMT "0") + endif() + if (CLANG_ENABLE_REWRITER) + set(ENABLE_CLANG_REWRITER "1") + else() + set(ENABLE_CLANG_REWRITER "0") + endif() + if (CLANG_ENABLE_STATIC_ANALYZER) + set(ENABLE_CLANG_STATIC_ANALYZER "1") + else() + set(ENABLE_CLANG_STATIC_ANALYZER "0") + endif() + + configure_file(${input} ${output} @ONLY) +endfunction() + +# A raw function to create a lit target. This is used to implement the testuite +# management functions. +function(add_lit_target target comment) + parse_arguments(ARG "PARAMS;DEPENDS;ARGS" "" ${ARGN}) + set(LIT_ARGS "${ARG_ARGS} ${LLVM_LIT_ARGS}") + separate_arguments(LIT_ARGS) + set(LIT_COMMAND + ${PYTHON_EXECUTABLE} + ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py + --param build_mode=${CMAKE_CFG_INTDIR} + ${LIT_ARGS} + ) + foreach(param ${ARG_PARAMS}) + list(APPEND LIT_COMMAND --param ${param}) + endforeach() + if( ARG_DEPENDS ) + add_custom_target(${target} + COMMAND ${LIT_COMMAND} ${ARG_DEFAULT_ARGS} + COMMENT "${comment}" + ) + add_dependencies(${target} ${ARG_DEPENDS}) + else() + add_custom_target(${target} + COMMAND cmake -E echo "${target} does nothing, no tools built.") + message(STATUS "${target} does nothing.") + endif() +endfunction() + +# A function to add a set of lit test suites to be driven through 'check-*' targets. +function(add_lit_testsuite target comment) + parse_arguments(ARG "PARAMS;DEPENDS;ARGS" "" ${ARGN}) + + # EXCLUDE_FROM_ALL excludes the test ${target} out of check-all. + if(NOT EXCLUDE_FROM_ALL) + # Register the testsuites, params and depends for the global check rule. + set_property(GLOBAL APPEND PROPERTY LLVM_LIT_TESTSUITES ${ARG_DEFAULT_ARGS}) + set_property(GLOBAL APPEND PROPERTY LLVM_LIT_PARAMS ${ARG_PARAMS}) + set_property(GLOBAL APPEND PROPERTY LLVM_LIT_DEPENDS ${ARG_DEPENDS}) + set_property(GLOBAL APPEND PROPERTY LLVM_LIT_EXTRA_ARGS ${ARG_ARGS}) + endif() + + # Produce a specific suffixed check rule. + add_lit_target(${target} ${comment} + ${ARG_DEFAULT_ARGS} + PARAMS ${ARG_PARAMS} + DEPENDS ${ARG_DEPENDS} + ARGS ${ARG_ARGS} + ) +endfunction() diff --git a/cmake/modules/AddLLVMDefinitions.cmake b/cmake/modules/AddLLVMDefinitions.cmake new file mode 100644 index 00000000..33ac9731 --- /dev/null +++ b/cmake/modules/AddLLVMDefinitions.cmake @@ -0,0 +1,13 @@ +# There is no clear way of keeping track of compiler command-line +# options chosen via `add_definitions', so we need our own method for +# using it on tools/llvm-config/CMakeLists.txt. + +# Beware that there is no implementation of remove_llvm_definitions. + +macro(add_llvm_definitions) + # We don't want no semicolons on LLVM_DEFINITIONS: + foreach(arg ${ARGN}) + set(LLVM_DEFINITIONS "${LLVM_DEFINITIONS} ${arg}") + endforeach(arg) + add_definitions( ${ARGN} ) +endmacro(add_llvm_definitions) diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt new file mode 100644 index 00000000..0253952c --- /dev/null +++ b/cmake/modules/CMakeLists.txt @@ -0,0 +1,39 @@ +set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm/cmake") +set(LLVM_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) + +get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS) + +foreach(lib ${llvm_libs}) + get_property(llvm_lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib}) + set(all_llvm_lib_deps + "${all_llvm_lib_deps}\nset_property(GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib} ${llvm_lib_deps})") +endforeach(lib) + +configure_file( + LLVMConfig.cmake.in + ${llvm_cmake_builddir}/LLVMConfig.cmake + @ONLY) + +configure_file( + LLVMConfigVersion.cmake.in + ${llvm_cmake_builddir}/LLVMConfigVersion.cmake + @ONLY) + +if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + install(FILES + ${llvm_cmake_builddir}/LLVMConfig.cmake + ${llvm_cmake_builddir}/LLVMConfigVersion.cmake + LLVM-Config.cmake + DESTINATION share/llvm/cmake) + + install(DIRECTORY . + DESTINATION share/llvm/cmake + FILES_MATCHING PATTERN *.cmake + PATTERN .svn EXCLUDE + PATTERN LLVMConfig.cmake EXCLUDE + PATTERN LLVMConfigVersion.cmake EXCLUDE + PATTERN LLVM-Config.cmake EXCLUDE + PATTERN GetHostTriple.cmake EXCLUDE + PATTERN VersionFromVCS.cmake EXCLUDE + PATTERN CheckAtomic.cmake EXCLUDE) +endif() diff --git a/cmake/modules/CheckAtomic.cmake b/cmake/modules/CheckAtomic.cmake new file mode 100644 index 00000000..0d63a82b --- /dev/null +++ b/cmake/modules/CheckAtomic.cmake @@ -0,0 +1,29 @@ +# atomic builtins are required for threading support. + +INCLUDE(CheckCXXSourceCompiles) + +CHECK_CXX_SOURCE_COMPILES(" +#ifdef _MSC_VER +#include +#endif +int main() { +#ifdef _MSC_VER + volatile LONG val = 1; + MemoryBarrier(); + InterlockedCompareExchange(&val, 0, 1); + InterlockedIncrement(&val); + InterlockedDecrement(&val); +#else + volatile unsigned long val = 1; + __sync_synchronize(); + __sync_val_compare_and_swap(&val, 1, 0); + __sync_add_and_fetch(&val, 1); + __sync_sub_and_fetch(&val, 1); +#endif + return 0; + } +" LLVM_HAS_ATOMICS) + +if( NOT LLVM_HAS_ATOMICS ) + message(STATUS "Warning: LLVM will be built thread-unsafe because atomic builtins are missing") +endif() diff --git a/cmake/modules/ChooseMSVCCRT.cmake b/cmake/modules/ChooseMSVCCRT.cmake new file mode 100644 index 00000000..25ed9c71 --- /dev/null +++ b/cmake/modules/ChooseMSVCCRT.cmake @@ -0,0 +1,106 @@ +# The macro choose_msvc_crt() takes a list of possible +# C runtimes to choose from, in the form of compiler flags, +# to present to the user. (MTd for /MTd, etc) +# +# The macro is invoked at the end of the file. +# +# CMake already sets CRT flags in the CMAKE_CXX_FLAGS_* and +# CMAKE_C_FLAGS_* variables by default. To let the user +# override that for each build type: +# 1. Detect which CRT is already selected, and reflect this in +# LLVM_USE_CRT_* so the user can have a better idea of what +# changes they're making. +# 2. Replace the flags in both variables with the new flag via a regex. +# 3. set() the variables back into the cache so the changes +# are user-visible. + +### Helper macros: ### +macro(make_crt_regex regex crts) + set(${regex} "") + foreach(crt ${${crts}}) + # Trying to match the beginning or end of the string with stuff + # like [ ^]+ didn't work, so use a bunch of parentheses instead. + set(${regex} "${${regex}}|(^| +)/${crt}($| +)") + endforeach(crt) + string(REGEX REPLACE "^\\|" "" ${regex} "${${regex}}") +endmacro(make_crt_regex) + +macro(get_current_crt crt_current regex flagsvar) + # Find the selected-by-CMake CRT for each build type, if any. + # Strip off the leading slash and any whitespace. + string(REGEX MATCH "${${regex}}" ${crt_current} "${${flagsvar}}") + string(REPLACE "/" " " ${crt_current} "${${crt_current}}") + string(STRIP "${${crt_current}}" ${crt_current}) +endmacro(get_current_crt) + +# Replaces or adds a flag to a variable. +# Expects 'flag' to be padded with spaces. +macro(set_flag_in_var flagsvar regex flag) + string(REGEX MATCH "${${regex}}" current_flag "${${flagsvar}}") + if("${current_flag}" STREQUAL "") + set(${flagsvar} "${${flagsvar}}${${flag}}") + else() + string(REGEX REPLACE "${${regex}}" "${${flag}}" ${flagsvar} "${${flagsvar}}") + endif() + string(STRIP "${${flagsvar}}" ${flagsvar}) + # Make sure this change gets reflected in the cache/gui. + # CMake requires the docstring parameter whenever set() touches the cache, + # so get the existing docstring and re-use that. + get_property(flagsvar_docs CACHE ${flagsvar} PROPERTY HELPSTRING) + set(${flagsvar} "${${flagsvar}}" CACHE STRING "${flagsvar_docs}" FORCE) +endmacro(set_flag_in_var) + + +macro(choose_msvc_crt MSVC_CRT) + if(LLVM_USE_CRT) + message(FATAL_ERROR + "LLVM_USE_CRT is deprecated. Use the CMAKE_BUILD_TYPE-specific +variables (LLVM_USE_CRT_DEBUG, etc) instead.") + endif() + + make_crt_regex(MSVC_CRT_REGEX ${MSVC_CRT}) + + foreach(build_type ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE}) + string(TOUPPER "${build_type}" build) + if (NOT LLVM_USE_CRT_${build}) + get_current_crt(LLVM_USE_CRT_${build} + MSVC_CRT_REGEX + CMAKE_CXX_FLAGS_${build}) + set(LLVM_USE_CRT_${build} + "${LLVM_USE_CRT_${build}}" + CACHE STRING "Specify VC++ CRT to use for ${build_type} configurations." + FORCE) + set_property(CACHE LLVM_USE_CRT_${build} + PROPERTY STRINGS ;${${MSVC_CRT}}) + endif(NOT LLVM_USE_CRT_${build}) + endforeach(build_type) + + foreach(build_type ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE}) + string(TOUPPER "${build_type}" build) + if ("${LLVM_USE_CRT_${build}}" STREQUAL "") + set(flag_string " ") + else() + set(flag_string " /${LLVM_USE_CRT_${build}} ") + list(FIND ${MSVC_CRT} ${LLVM_USE_CRT_${build}} idx) + if (idx LESS 0) + message(FATAL_ERROR + "Invalid value for LLVM_USE_CRT_${build}: ${LLVM_USE_CRT_${build}}. Valid options are one of: ${${MSVC_CRT}}") + endif (idx LESS 0) + message(STATUS "Using ${build_type} VC++ CRT: ${LLVM_USE_CRT_${build}}") + endif() + foreach(lang C CXX) + set_flag_in_var(CMAKE_${lang}_FLAGS_${build} MSVC_CRT_REGEX flag_string) + endforeach(lang) + endforeach(build_type) +endmacro(choose_msvc_crt MSVC_CRT) + + +# List of valid CRTs for MSVC +set(MSVC_CRT + MD + MDd + MT + MTd) + +choose_msvc_crt(MSVC_CRT) + diff --git a/cmake/modules/GetHostTriple.cmake b/cmake/modules/GetHostTriple.cmake new file mode 100644 index 00000000..671a8ce7 --- /dev/null +++ b/cmake/modules/GetHostTriple.cmake @@ -0,0 +1,30 @@ +# Returns the host triple. +# Invokes config.guess + +function( get_host_triple var ) + if( MSVC ) + if( CMAKE_CL_64 ) + set( value "x86_64-pc-win32" ) + else() + set( value "i686-pc-win32" ) + endif() + elseif( MINGW AND NOT MSYS ) + if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) + set( value "x86_64-w64-mingw32" ) + else() + set( value "i686-pc-mingw32" ) + endif() + else( MSVC ) + set(config_guess ${LLVM_MAIN_SRC_DIR}/autoconf/config.guess) + execute_process(COMMAND sh ${config_guess} + RESULT_VARIABLE TT_RV + OUTPUT_VARIABLE TT_OUT + OUTPUT_STRIP_TRAILING_WHITESPACE) + if( NOT TT_RV EQUAL 0 ) + message(FATAL_ERROR "Failed to execute ${config_guess}") + endif( NOT TT_RV EQUAL 0 ) + set( value ${TT_OUT} ) + endif( MSVC ) + set( ${var} ${value} PARENT_SCOPE ) + message(STATUS "Target triple: ${value}") +endfunction( get_host_triple var ) diff --git a/cmake/modules/GetSVN.cmake b/cmake/modules/GetSVN.cmake new file mode 100644 index 00000000..acccc12a --- /dev/null +++ b/cmake/modules/GetSVN.cmake @@ -0,0 +1,25 @@ +# CMake project that writes Subversion revision information to a header. +# +# Input variables: +# FIRST_SOURCE_DIR - First source directory +# FIRST_REPOSITORY - The macro to define to the first revision number. +# SECOND_SOURCE_DIR - Second source directory +# SECOND_REPOSITORY - The macro to define to the second revision number. +# HEADER_FILE - The header file to write +include(FindSubversion) +if (Subversion_FOUND AND EXISTS "${FIRST_SOURCE_DIR}/.svn") + # Repository information for the first repository. + Subversion_WC_INFO(${FIRST_SOURCE_DIR} MY) + file(WRITE ${HEADER_FILE}.txt "#define ${FIRST_REPOSITORY} \"${MY_WC_REVISION}\"\n") + + # Repository information for the second repository. + if (EXISTS "${SECOND_SOURCE_DIR}/.svn") + Subversion_WC_INFO(${SECOND_SOURCE_DIR} MY) + file(APPEND ${HEADER_FILE}.txt + "#define ${SECOND_REPOSITORY} \"${MY_WC_REVISION}\"\n") + endif () + + # Copy the file only if it has changed. + execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${HEADER_FILE}.txt ${HEADER_FILE}) +endif() diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake new file mode 100644 index 00000000..bb41a58d --- /dev/null +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -0,0 +1,299 @@ +# This CMake module is responsible for interpreting the user defined LLVM_ +# options and executing the appropriate CMake commands to realize the users' +# selections. + +include(AddLLVMDefinitions) +include(CheckCCompilerFlag) +include(CheckCXXCompilerFlag) + +if( CMAKE_COMPILER_IS_GNUCXX ) + set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON) +elseif( MSVC ) + set(LLVM_COMPILER_IS_GCC_COMPATIBLE OFF) +elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) + set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON) +endif() + +if( LLVM_ENABLE_ASSERTIONS ) + # MSVC doesn't like _DEBUG on release builds. See PR 4379. + if( NOT MSVC ) + add_definitions( -D_DEBUG ) + endif() + # On non-Debug builds cmake automatically defines NDEBUG, so we + # explicitly undefine it: + if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" ) + add_definitions( -UNDEBUG ) + # Also remove /D NDEBUG to avoid MSVC warnings about conflicting defines. + set(REGEXP_NDEBUG "(^| )[/-]D *NDEBUG($| )") + string (REGEX REPLACE "${REGEXP_NDEBUG}" " " + CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") + string (REGEX REPLACE "${REGEXP_NDEBUG}" " " + CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + string (REGEX REPLACE "${REGEXP_NDEBUG}" " " + CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}") + endif() +else() + if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" ) + if( NOT MSVC_IDE AND NOT XCODE ) + add_definitions( -DNDEBUG ) + endif() + endif() +endif() + +if(WIN32) + if(CYGWIN) + set(LLVM_ON_WIN32 0) + set(LLVM_ON_UNIX 1) + else(CYGWIN) + set(LLVM_ON_WIN32 1) + set(LLVM_ON_UNIX 0) + endif(CYGWIN) + set(LTDL_SHLIB_EXT ".dll") + set(EXEEXT ".exe") + # Maximum path length is 160 for non-unicode paths + set(MAXPATHLEN 160) +else(WIN32) + if(UNIX) + set(LLVM_ON_WIN32 0) + set(LLVM_ON_UNIX 1) + if(APPLE) + set(LTDL_SHLIB_EXT ".dylib") + else(APPLE) + set(LTDL_SHLIB_EXT ".so") + endif(APPLE) + set(EXEEXT "") + # FIXME: Maximum path length is currently set to 'safe' fixed value + set(MAXPATHLEN 2024) + else(UNIX) + MESSAGE(SEND_ERROR "Unable to determine platform") + endif(UNIX) +endif(WIN32) + +function(add_flag_or_print_warning flag) + check_c_compiler_flag(${flag} C_SUPPORTS_FLAG) + check_cxx_compiler_flag(${flag} CXX_SUPPORTS_FLAG) + if (C_SUPPORTS_FLAG AND CXX_SUPPORTS_FLAG) + message(STATUS "Building with ${flag}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}" PARENT_SCOPE) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}" PARENT_SCOPE) + else() + message(WARNING "${flag} is not supported.") + endif() +endfunction() + +function(append value) + foreach(variable ${ARGN}) + set(${variable} "${${variable}} ${value}" PARENT_SCOPE) + endforeach(variable) +endfunction() + +function(append_if condition value) + if (${condition}) + foreach(variable ${ARGN}) + set(${variable} "${${variable}} ${value}" PARENT_SCOPE) + endforeach(variable) + endif() +endfunction() + +macro(add_flag_if_supported flag) + check_c_compiler_flag(${flag} C_SUPPORTS_FLAG) + append_if(C_SUPPORTS_FLAG "${flag}" CMAKE_C_FLAGS) + check_cxx_compiler_flag(${flag} CXX_SUPPORTS_FLAG) + append_if(CXX_SUPPORTS_FLAG "${flag}" CMAKE_CXX_FLAGS) +endmacro() + +if( LLVM_ENABLE_PIC ) + if( XCODE ) + # Xcode has -mdynamic-no-pic on by default, which overrides -fPIC. I don't + # know how to disable this, so just force ENABLE_PIC off for now. + message(WARNING "-fPIC not supported with Xcode.") + elseif( WIN32 OR CYGWIN) + # On Windows all code is PIC. MinGW warns if -fPIC is used. + else() + add_flag_or_print_warning("-fPIC") + + if( WIN32 OR CYGWIN) + # MinGW warns if -fvisibility-inlines-hidden is used. + else() + check_cxx_compiler_flag("-fvisibility-inlines-hidden" SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG) + append_if(SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG "-fvisibility-inlines-hidden" CMAKE_CXX_FLAGS) + endif() + endif() +endif() + +if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) + # TODO: support other platforms and toolchains. + if( LLVM_BUILD_32_BITS ) + message(STATUS "Building 32 bits executables and libraries.") + add_llvm_definitions( -m32 ) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32") + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -m32") + endif( LLVM_BUILD_32_BITS ) +endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) + +# On Win32 using MS tools, provide an option to set the number of parallel jobs +# to use. +if( MSVC_IDE ) + set(LLVM_COMPILER_JOBS "0" CACHE STRING + "Number of parallel compiler jobs. 0 means use all processors. Default is 0.") + if( NOT LLVM_COMPILER_JOBS STREQUAL "1" ) + if( LLVM_COMPILER_JOBS STREQUAL "0" ) + add_llvm_definitions( /MP ) + else() + if (MSVC10) + message(FATAL_ERROR + "Due to a bug in CMake only 0 and 1 is supported for " + "LLVM_COMPILER_JOBS when generating for Visual Studio 2010") + else() + message(STATUS "Number of parallel compiler jobs set to " ${LLVM_COMPILER_JOBS}) + add_llvm_definitions( /MP${LLVM_COMPILER_JOBS} ) + endif() + endif() + else() + message(STATUS "Parallel compilation disabled") + endif() +endif() + +if( MSVC ) + include(ChooseMSVCCRT) + + if( NOT (${CMAKE_VERSION} VERSION_LESS 2.8.11) ) + # set stack reserved size to ~10MB + # CMake previously automatically set this value for MSVC builds, but the + # behavior was changed in CMake 2.8.11 (Issue 12437) to use the MSVC default + # value (1 MB) which is not enough for us in tasks such as parsing recursive + # C++ templates in Clang. + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:10000000") + endif() + + if( MSVC10 ) + # MSVC 10 will complain about headers in the STL not being exported, but + # will not complain in MSVC 11. + add_llvm_definitions( + -wd4275 # Suppress 'An exported class was derived from a class that was not exported.' + ) + elseif( MSVC11 ) + add_llvm_definitions(-D_VARIADIC_MAX=10) + endif() + + # Add definitions that make MSVC much less annoying. + add_llvm_definitions( + # For some reason MS wants to deprecate a bunch of standard functions... + -D_CRT_SECURE_NO_DEPRECATE + -D_CRT_SECURE_NO_WARNINGS + -D_CRT_NONSTDC_NO_DEPRECATE + -D_CRT_NONSTDC_NO_WARNINGS + -D_SCL_SECURE_NO_DEPRECATE + -D_SCL_SECURE_NO_WARNINGS + + # Disabled warnings. + -wd4146 # Suppress 'unary minus operator applied to unsigned type, result still unsigned' + -wd4180 # Suppress 'qualifier applied to function type has no meaning; ignored' + -wd4244 # Suppress ''argument' : conversion from 'type1' to 'type2', possible loss of data' + -wd4267 # Suppress ''var' : conversion from 'size_t' to 'type', possible loss of data' + -wd4345 # Suppress 'behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized' + -wd4351 # Suppress 'new behavior: elements of array 'array' will be default initialized' + -wd4355 # Suppress ''this' : used in base member initializer list' + -wd4503 # Suppress ''identifier' : decorated name length exceeded, name was truncated' + -wd4624 # Suppress ''derived class' : destructor could not be generated because a base class destructor is inaccessible' + -wd4800 # Suppress ''type' : forcing value to bool 'true' or 'false' (performance warning)' + -wd4291 # Suppress ''declaration' : no matching operator delete found; memory will not be freed if initialization throws an exception' + + # Promoted warnings. + -w14062 # Promote 'enumerator in switch of enum is not handled' to level 1 warning. + + # Promoted warnings to errors. + -we4238 # Promote 'nonstandard extension used : class rvalue used as lvalue' to error. + ) + + # Enable warnings + if (LLVM_ENABLE_WARNINGS) + add_llvm_definitions( /W4 ) + if (LLVM_ENABLE_PEDANTIC) + # No MSVC equivalent available + endif (LLVM_ENABLE_PEDANTIC) + endif (LLVM_ENABLE_WARNINGS) + if (LLVM_ENABLE_WERROR) + add_llvm_definitions( /WX ) + endif (LLVM_ENABLE_WERROR) +elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE ) + if (LLVM_ENABLE_WARNINGS) + append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + + # Turn off missing field initializer warnings for gcc to avoid noise from + # false positives with empty {}. Turn them on otherwise (they're off by + # default for clang). + check_cxx_compiler_flag("-Wmissing-field-initializers" CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG) + if (CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG) + if (CMAKE_COMPILER_IS_GNUCXX) + append("-Wno-missing-field-initializers" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + else() + append("-Wmissing-field-initializers" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + endif() + endif() + + append_if(LLVM_ENABLE_PEDANTIC "-pedantic -Wno-long-long" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + check_cxx_compiler_flag("-Werror -Wcovered-switch-default" CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG) + append_if(CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG "-Wcovered-switch-default" CMAKE_CXX_FLAGS) + check_c_compiler_flag("-Werror -Wcovered-switch-default" C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG) + append_if(C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG "-Wcovered-switch-default" CMAKE_C_FLAGS) + append_if(USE_NO_UNINITIALIZED "-Wno-uninitialized" CMAKE_CXX_FLAGS) + append_if(USE_NO_MAYBE_UNINITIALIZED "-Wno-maybe-uninitialized" CMAKE_CXX_FLAGS) + check_cxx_compiler_flag("-Werror -Wnon-virtual-dtor" CXX_SUPPORTS_NON_VIRTUAL_DTOR_FLAG) + append_if(CXX_SUPPORTS_NON_VIRTUAL_DTOR_FLAG "-Wnon-virtual-dtor" CMAKE_CXX_FLAGS) + endif (LLVM_ENABLE_WARNINGS) + if (LLVM_ENABLE_WERROR) + add_llvm_definitions( -Werror ) + endif (LLVM_ENABLE_WERROR) +endif( MSVC ) + +macro(append_common_sanitizer_flags) + # Append -fno-omit-frame-pointer and turn on debug info to get better + # stack traces. + add_flag_if_supported("-fno-omit-frame-pointer") + if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" AND + NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO") + add_flag_if_supported("-gline-tables-only") + endif() + # Use -O1 even in debug mode, otherwise sanitizers slowdown is too large. + if (uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG") + add_flag_if_supported("-O1") + endif() +endmacro() + +# Turn on sanitizers if necessary. +if(LLVM_USE_SANITIZER) + if (LLVM_ON_UNIX) + if (LLVM_USE_SANITIZER STREQUAL "Address") + append_common_sanitizer_flags() + add_flag_or_print_warning("-fsanitize=address") + elseif (LLVM_USE_SANITIZER MATCHES "Memory(WithOrigins)?") + append_common_sanitizer_flags() + add_flag_or_print_warning("-fsanitize=memory") + if(LLVM_USE_SANITIZER STREQUAL "MemoryWithOrigins") + add_flag_or_print_warning("-fsanitize-memory-track-origins") + endif() + else() + message(WARNING "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}") + endif() + else() + message(WARNING "LLVM_USE_SANITIZER is not supported on this platform.") + endif() +endif() + +# Turn on -gsplit-dwarf if requested +if(LLVM_USE_SPLIT_DWARF) + add_llvm_definitions("-gsplit-dwarf") +endif() + +add_llvm_definitions( -D__STDC_CONSTANT_MACROS ) +add_llvm_definitions( -D__STDC_FORMAT_MACROS ) +add_llvm_definitions( -D__STDC_LIMIT_MACROS ) + +# clang doesn't print colored diagnostics when invoked from Ninja +if (UNIX AND + CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND + CMAKE_GENERATOR STREQUAL "Ninja") + append("-fcolor-diagnostics" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) +endif() diff --git a/cmake/modules/LLVM-Config.cmake b/cmake/modules/LLVM-Config.cmake new file mode 100644 index 00000000..e26fabd1 --- /dev/null +++ b/cmake/modules/LLVM-Config.cmake @@ -0,0 +1,189 @@ +function(get_system_libs return_var) + # Returns in `return_var' a list of system libraries used by LLVM. + if( NOT MSVC ) + if( MINGW ) + set(system_libs ${system_libs} imagehlp psapi shell32) + elseif( CMAKE_HOST_UNIX ) + if( HAVE_LIBRT ) + set(system_libs ${system_libs} rt) + endif() + if( HAVE_LIBDL ) + set(system_libs ${system_libs} ${CMAKE_DL_LIBS}) + endif() + if(LLVM_ENABLE_TERMINFO) + if(HAVE_TERMINFO) + set(system_libs ${system_libs} ${TERMINFO_LIBS}) + endif() + endif() + if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD ) + set(system_libs ${system_libs} pthread) + endif() + if ( LLVM_ENABLE_ZLIB AND HAVE_LIBZ ) + set(system_libs ${system_libs} z) + endif() + endif( MINGW ) + endif( NOT MSVC ) + set(${return_var} ${system_libs} PARENT_SCOPE) +endfunction(get_system_libs) + + +function(link_system_libs target) + get_system_libs(llvm_system_libs) + target_link_libraries(${target} ${llvm_system_libs}) +endfunction(link_system_libs) + + +function(is_llvm_target_library library return_var) + # Sets variable `return_var' to ON if `library' corresponds to a + # LLVM supported target. To OFF if it doesn't. + set(${return_var} OFF PARENT_SCOPE) + string(TOUPPER "${library}" capitalized_lib) + string(TOUPPER "${LLVM_ALL_TARGETS}" targets) + foreach(t ${targets}) + if( capitalized_lib STREQUAL t OR + capitalized_lib STREQUAL "LLVM${t}" OR + capitalized_lib STREQUAL "LLVM${t}CODEGEN" OR + capitalized_lib STREQUAL "LLVM${t}ASMPARSER" OR + capitalized_lib STREQUAL "LLVM${t}ASMPRINTER" OR + capitalized_lib STREQUAL "LLVM${t}DISASSEMBLER" OR + capitalized_lib STREQUAL "LLVM${t}INFO" ) + set(${return_var} ON PARENT_SCOPE) + break() + endif() + endforeach() +endfunction(is_llvm_target_library) + + +macro(llvm_config executable) + explicit_llvm_config(${executable} ${ARGN}) +endmacro(llvm_config) + + +function(explicit_llvm_config executable) + set( link_components ${ARGN} ) + + explicit_map_components_to_libraries(LIBRARIES ${link_components}) + target_link_libraries(${executable} ${LIBRARIES}) +endfunction(explicit_llvm_config) + + +# This is a variant intended for the final user: +function(llvm_map_components_to_libraries OUT_VAR) + explicit_map_components_to_libraries(result ${ARGN}) + get_system_libs(sys_result) + set( ${OUT_VAR} ${result} ${sys_result} PARENT_SCOPE ) +endfunction(llvm_map_components_to_libraries) + + +function(explicit_map_components_to_libraries out_libs) + set( link_components ${ARGN} ) + get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS) + string(TOUPPER "${llvm_libs}" capitalized_libs) + + # Expand some keywords: + list(FIND LLVM_TARGETS_TO_BUILD "${LLVM_NATIVE_ARCH}" have_native_backend) + list(FIND link_components "engine" engine_required) + if( NOT engine_required EQUAL -1 ) + list(FIND LLVM_TARGETS_WITH_JIT "${LLVM_NATIVE_ARCH}" have_jit) + if( NOT have_native_backend EQUAL -1 AND NOT have_jit EQUAL -1 ) + list(APPEND link_components "jit") + list(APPEND link_components "native") + else() + list(APPEND link_components "interpreter") + endif() + endif() + list(FIND link_components "native" native_required) + if( NOT native_required EQUAL -1 ) + if( NOT have_native_backend EQUAL -1 ) + list(APPEND link_components ${LLVM_NATIVE_ARCH}) + endif() + endif() + + # Translate symbolic component names to real libraries: + foreach(c ${link_components}) + # add codegen, asmprinter, asmparser, disassembler + list(FIND LLVM_TARGETS_TO_BUILD ${c} idx) + if( NOT idx LESS 0 ) + list(FIND llvm_libs "LLVM${c}CodeGen" idx) + if( NOT idx LESS 0 ) + list(APPEND expanded_components "LLVM${c}CodeGen") + else() + list(FIND llvm_libs "LLVM${c}" idx) + if( NOT idx LESS 0 ) + list(APPEND expanded_components "LLVM${c}") + else() + message(FATAL_ERROR "Target ${c} is not in the set of libraries.") + endif() + endif() + list(FIND llvm_libs "LLVM${c}AsmPrinter" asmidx) + if( NOT asmidx LESS 0 ) + list(APPEND expanded_components "LLVM${c}AsmPrinter") + endif() + list(FIND llvm_libs "LLVM${c}AsmParser" asmidx) + if( NOT asmidx LESS 0 ) + list(APPEND expanded_components "LLVM${c}AsmParser") + endif() + list(FIND llvm_libs "LLVM${c}Info" asmidx) + if( NOT asmidx LESS 0 ) + list(APPEND expanded_components "LLVM${c}Info") + endif() + list(FIND llvm_libs "LLVM${c}Disassembler" asmidx) + if( NOT asmidx LESS 0 ) + list(APPEND expanded_components "LLVM${c}Disassembler") + endif() + elseif( c STREQUAL "native" ) + # already processed + elseif( c STREQUAL "nativecodegen" ) + list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen") + elseif( c STREQUAL "backend" ) + # same case as in `native'. + elseif( c STREQUAL "engine" ) + # already processed + elseif( c STREQUAL "all" ) + list(APPEND expanded_components ${llvm_libs}) + else( NOT idx LESS 0 ) + # Canonize the component name: + string(TOUPPER "${c}" capitalized) + list(FIND capitalized_libs LLVM${capitalized} lib_idx) + if( lib_idx LESS 0 ) + # The component is unknown. Maybe is an omitted target? + is_llvm_target_library(${c} iltl_result) + if( NOT iltl_result ) + message(FATAL_ERROR "Library `${c}' not found in list of llvm libraries.") + endif() + else( lib_idx LESS 0 ) + list(GET llvm_libs ${lib_idx} canonical_lib) + list(APPEND expanded_components ${canonical_lib}) + endif( lib_idx LESS 0 ) + endif( NOT idx LESS 0 ) + endforeach(c) + # Expand dependencies while topologically sorting the list of libraries: + list(LENGTH expanded_components lst_size) + set(cursor 0) + set(processed) + while( cursor LESS lst_size ) + list(GET expanded_components ${cursor} lib) + get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib}) + list(APPEND expanded_components ${lib_deps}) + # Remove duplicates at the front: + list(REVERSE expanded_components) + list(REMOVE_DUPLICATES expanded_components) + list(REVERSE expanded_components) + list(APPEND processed ${lib}) + # Find the maximum index that doesn't have to be re-processed: + while(NOT "${expanded_components}" MATCHES "^${processed}.*" ) + list(REMOVE_AT processed -1) + endwhile() + list(LENGTH processed cursor) + list(LENGTH expanded_components lst_size) + endwhile( cursor LESS lst_size ) + # Return just the libraries included in this build: + set(result) + foreach(c ${expanded_components}) + list(FIND llvm_libs ${c} lib_idx) + if( NOT lib_idx LESS 0 ) + set(result ${result} ${c}) + endif() + endforeach(c) + set(${out_libs} ${result} PARENT_SCOPE) +endfunction(explicit_map_components_to_libraries) diff --git a/cmake/modules/LLVMConfig.cmake.in b/cmake/modules/LLVMConfig.cmake.in new file mode 100644 index 00000000..68fe2969 --- /dev/null +++ b/cmake/modules/LLVMConfig.cmake.in @@ -0,0 +1,58 @@ +# This file provides information and services to the final user. + +set(LLVM_VERSION_MAJOR @LLVM_VERSION_MAJOR@) +set(LLVM_VERSION_MINOR @LLVM_VERSION_MINOR@) +set(LLVM_PACKAGE_VERSION @PACKAGE_VERSION@) + +set(LLVM_COMMON_DEPENDS @LLVM_COMMON_DEPENDS@) + +set_property( GLOBAL PROPERTY LLVM_LIBS "@llvm_libs@") + +set(LLVM_ALL_TARGETS @LLVM_ALL_TARGETS@) + +set(LLVM_TARGETS_TO_BUILD @LLVM_TARGETS_TO_BUILD@) + +set(LLVM_TARGETS_WITH_JIT @LLVM_TARGETS_WITH_JIT@) + +@all_llvm_lib_deps@ + +set(TARGET_TRIPLE "@TARGET_TRIPLE@") + +set(LLVM_TOOLS_BINARY_DIR @LLVM_TOOLS_BINARY_DIR@) + +set(LLVM_ENABLE_TERMINFO @LLVM_ENABLE_TERMINFO@) + +set(LLVM_ENABLE_THREADS @LLVM_ENABLE_THREADS@) + +set(LLVM_ENABLE_ZLIB @LLVM_ENABLE_ZLIB@) + +set(LLVM_NATIVE_ARCH @LLVM_NATIVE_ARCH@) + +set(LLVM_ENABLE_PIC @LLVM_ENABLE_PIC@) + +set(HAVE_TERMINFO @HAVE_TERMINFO@) +set(TERMINFO_LIBS @TERMINFO_LIBS@) +set(HAVE_LIBDL @HAVE_LIBDL@) +set(HAVE_LIBPTHREAD @HAVE_LIBPTHREAD@) +set(HAVE_LIBZ @HAVE_LIBZ@) +set(LLVM_ON_UNIX @LLVM_ON_UNIX@) +set(LLVM_ON_WIN32 @LLVM_ON_WIN32@) + +set(LLVM_INSTALL_PREFIX "@LLVM_INSTALL_PREFIX@") +set(LLVM_INCLUDE_DIRS ${LLVM_INSTALL_PREFIX}/include) +set(LLVM_LIBRARY_DIRS ${LLVM_INSTALL_PREFIX}/lib) +set(LLVM_DEFINITIONS "-D__STDC_LIMIT_MACROS" "-D__STDC_CONSTANT_MACROS") + +# We try to include using the current setting of CMAKE_MODULE_PATH, +# which suppossedly was filled by the user with the directory where +# this file was installed: +include( LLVM-Config OPTIONAL RESULT_VARIABLE LLVMCONFIG_INCLUDED ) + +# If failed, we assume that this is an un-installed build: +if( NOT LLVMCONFIG_INCLUDED ) + set(CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} + "@LLVM_SOURCE_DIR@/cmake/modules") + include( LLVM-Config ) +endif() + diff --git a/cmake/modules/LLVMConfigVersion.cmake.in b/cmake/modules/LLVMConfigVersion.cmake.in new file mode 100644 index 00000000..add5aa9a --- /dev/null +++ b/cmake/modules/LLVMConfigVersion.cmake.in @@ -0,0 +1 @@ +set(PACKAGE_VERSION "@PACKAGE_VERSION@") \ No newline at end of file diff --git a/cmake/modules/LLVMParseArguments.cmake b/cmake/modules/LLVMParseArguments.cmake new file mode 100644 index 00000000..ce19be11 --- /dev/null +++ b/cmake/modules/LLVMParseArguments.cmake @@ -0,0 +1,80 @@ +# Copied from http://www.itk.org/Wiki/CMakeMacroParseArguments under +# http://creativecommons.org/licenses/by/2.5/. +# +# The PARSE_ARGUMENTS macro will take the arguments of another macro and define +# several variables. The first argument to PARSE_ARGUMENTS is a prefix to put on +# all variables it creates. The second argument is a list of names, and the +# third argument is a list of options. Both of these lists should be quoted. The +# rest of PARSE_ARGUMENTS are arguments from another macro to be parsed. +# +# PARSE_ARGUMENTS(prefix arg_names options arg1 arg2...) +# +# For each item in options, PARSE_ARGUMENTS will create a variable with that +# name, prefixed with prefix_. So, for example, if prefix is MY_MACRO and +# options is OPTION1;OPTION2, then PARSE_ARGUMENTS will create the variables +# MY_MACRO_OPTION1 and MY_MACRO_OPTION2. These variables will be set to true if +# the option exists in the command line or false otherwise. +# +#For each item in arg_names, PARSE_ARGUMENTS will create a variable with that +#name, prefixed with prefix_. Each variable will be filled with the arguments +#that occur after the given arg_name is encountered up to the next arg_name or +#the end of the arguments. All options are removed from these +#lists. PARSE_ARGUMENTS also creates a prefix_DEFAULT_ARGS variable containing +#the list of all arguments up to the first arg_name encountered. +# +#Here is a simple, albeit impractical, example of using PARSE_ARGUMENTS that +#demonstrates its behavior. +# +# SET(arguments +# hello OPTION3 world +# LIST3 foo bar +# OPTION2 +# LIST1 fuz baz +# ) +# +# PARSE_ARGUMENTS(ARG "LIST1;LIST2;LIST3" "OPTION1;OPTION2;OPTION3" ${arguments}) +# +# PARSE_ARGUMENTS creates 7 variables and sets them as follows: +# ARG_DEFAULT_ARGS: hello;world +# ARG_LIST1: fuz;baz +# ARG_LIST2: +# ARG_LIST3: foo;bar +# ARG_OPTION1: FALSE +# ARG_OPTION2: TRUE +# ARG_OPTION3: TRUE +# +# If you don't have any options, use an empty string in its place. +# PARSE_ARGUMENTS(ARG "LIST1;LIST2;LIST3" "" ${arguments}) +# Likewise if you have no lists. +# PARSE_ARGUMENTS(ARG "" "OPTION1;OPTION2;OPTION3" ${arguments}) + +MACRO(PARSE_ARGUMENTS prefix arg_names option_names) + SET(DEFAULT_ARGS) + FOREACH(arg_name ${arg_names}) + SET(${prefix}_${arg_name}) + ENDFOREACH(arg_name) + FOREACH(option ${option_names}) + SET(${prefix}_${option} FALSE) + ENDFOREACH(option) + + SET(current_arg_name DEFAULT_ARGS) + SET(current_arg_list) + FOREACH(arg ${ARGN}) + SET(larg_names ${arg_names}) + LIST(FIND larg_names "${arg}" is_arg_name) + IF (is_arg_name GREATER -1) + SET(${prefix}_${current_arg_name} ${current_arg_list}) + SET(current_arg_name ${arg}) + SET(current_arg_list) + ELSE (is_arg_name GREATER -1) + SET(loption_names ${option_names}) + LIST(FIND loption_names "${arg}" is_option) + IF (is_option GREATER -1) + SET(${prefix}_${arg} TRUE) + ELSE (is_option GREATER -1) + SET(current_arg_list ${current_arg_list} ${arg}) + ENDIF (is_option GREATER -1) + ENDIF (is_arg_name GREATER -1) + ENDFOREACH(arg) + SET(${prefix}_${current_arg_name} ${current_arg_list}) +ENDMACRO(PARSE_ARGUMENTS) diff --git a/cmake/modules/LLVMProcessSources.cmake b/cmake/modules/LLVMProcessSources.cmake new file mode 100644 index 00000000..2cef6cfc --- /dev/null +++ b/cmake/modules/LLVMProcessSources.cmake @@ -0,0 +1,94 @@ +include(AddFileDependencies) + +function(llvm_replace_compiler_option var old new) + # Replaces a compiler option or switch `old' in `var' by `new'. + # If `old' is not in `var', appends `new' to `var'. + # Example: llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2") + # If the option already is on the variable, don't add it: + if( "${${var}}" MATCHES "(^| )${new}($| )" ) + set(n "") + else() + set(n "${new}") + endif() + if( "${${var}}" MATCHES "(^| )${old}($| )" ) + string( REGEX REPLACE "(^| )${old}($| )" " ${n} " ${var} "${${var}}" ) + else() + set( ${var} "${${var}} ${n}" ) + endif() + set( ${var} "${${var}}" PARENT_SCOPE ) +endfunction(llvm_replace_compiler_option) + +macro(add_td_sources srcs) + file(GLOB tds *.td) + if( tds ) + source_group("TableGen descriptions" FILES ${tds}) + set_source_files_properties(${tds} PROPERTIES HEADER_FILE_ONLY ON) + list(APPEND ${srcs} ${tds}) + endif() +endmacro(add_td_sources) + + +macro(add_header_files srcs) + file(GLOB hds *.h) + if( hds ) + set_source_files_properties(${hds} PROPERTIES HEADER_FILE_ONLY ON) + list(APPEND ${srcs} ${hds}) + endif() +endmacro(add_header_files) + + +function(llvm_process_sources OUT_VAR) + set( sources ${ARGN} ) + llvm_check_source_file_list( ${sources} ) + # Create file dependencies on the tablegenned files, if any. Seems + # that this is not strictly needed, as dependencies of the .cpp + # sources on the tablegenned .inc files are detected and handled, + # but just in case... + foreach( s ${sources} ) + set( f ${CMAKE_CURRENT_SOURCE_DIR}/${s} ) + add_file_dependencies( ${f} ${TABLEGEN_OUTPUT} ) + endforeach(s) + if( MSVC_IDE OR XCODE ) + # This adds .td and .h files to the Visual Studio solution: + # FIXME: Shall we handle *.def here? + add_td_sources(sources) + add_header_files(sources) + endif() + + # Set common compiler options: + if( NOT LLVM_REQUIRES_EH ) + if( LLVM_COMPILER_IS_GCC_COMPATIBLE ) + add_definitions( -fno-exceptions ) + elseif( MSVC ) + llvm_replace_compiler_option(CMAKE_CXX_FLAGS "/EHsc" "/EHs-c-") + add_definitions( /D_HAS_EXCEPTIONS=0 ) + endif() + endif() + if( NOT LLVM_REQUIRES_RTTI ) + if( LLVM_COMPILER_IS_GCC_COMPATIBLE ) + llvm_replace_compiler_option(CMAKE_CXX_FLAGS "-frtti" "-fno-rtti") + elseif( MSVC ) + llvm_replace_compiler_option(CMAKE_CXX_FLAGS "/GR" "/GR-") + endif() + endif() + + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" PARENT_SCOPE ) + set( ${OUT_VAR} ${sources} PARENT_SCOPE ) +endfunction(llvm_process_sources) + + +function(llvm_check_source_file_list) + set(listed ${ARGN}) + file(GLOB globbed *.cpp) + foreach(g ${globbed}) + get_filename_component(fn ${g} NAME) + list(FIND LLVM_OPTIONAL_SOURCES ${fn} idx) + if( idx LESS 0 ) + list(FIND listed ${fn} idx) + if( idx LESS 0 ) + message(SEND_ERROR "Found unknown source file ${g} +Please update ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt\n") + endif() + endif() + endforeach() +endfunction(llvm_check_source_file_list) diff --git a/cmake/modules/TableGen.cmake b/cmake/modules/TableGen.cmake new file mode 100644 index 00000000..c17e67e4 --- /dev/null +++ b/cmake/modules/TableGen.cmake @@ -0,0 +1,143 @@ +# LLVM_TARGET_DEFINITIONS must contain the name of the .td file to process. +# Extra parameters for `tblgen' may come after `ofn' parameter. +# Adds the name of the generated file to TABLEGEN_OUTPUT. + +macro(tablegen project ofn) + file(GLOB local_tds "*.td") + file(GLOB_RECURSE global_tds "${LLVM_MAIN_SRC_DIR}/include/llvm/*.td") + + if (IS_ABSOLUTE ${LLVM_TARGET_DEFINITIONS}) + set(LLVM_TARGET_DEFINITIONS_ABSOLUTE ${LLVM_TARGET_DEFINITIONS}) + else() + set(LLVM_TARGET_DEFINITIONS_ABSOLUTE + ${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS}) + endif() + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp + # Generate tablegen output in a temporary file. + COMMAND ${${project}_TABLEGEN_EXE} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} + -I ${LLVM_MAIN_SRC_DIR}/lib/Target -I ${LLVM_MAIN_INCLUDE_DIR} + ${LLVM_TARGET_DEFINITIONS_ABSOLUTE} + -o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp + # The file in LLVM_TARGET_DEFINITIONS may be not in the current + # directory and local_tds may not contain it, so we must + # explicitly list it here: + DEPENDS ${${project}_TABLEGEN_EXE} ${local_tds} ${global_tds} + ${LLVM_TARGET_DEFINITIONS_ABSOLUTE} + COMMENT "Building ${ofn}..." + ) + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn} + # Only update the real output file if there are any differences. + # This prevents recompilation of all the files depending on it if there + # aren't any. + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp + ${CMAKE_CURRENT_BINARY_DIR}/${ofn} + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp + COMMENT "" + ) + + # `make clean' must remove all those generated files: + set_property(DIRECTORY APPEND + PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${ofn}.tmp ${ofn}) + + set(TABLEGEN_OUTPUT ${TABLEGEN_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR}/${ofn}) + set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${ofn} + PROPERTIES GENERATED 1) +endmacro(tablegen) + +function(add_public_tablegen_target target) + # Creates a target for publicly exporting tablegen dependencies. + if( TABLEGEN_OUTPUT ) + add_custom_target(${target} + DEPENDS ${TABLEGEN_OUTPUT}) + if (LLVM_COMMON_DEPENDS) + add_dependencies(${target} ${LLVM_COMMON_DEPENDS}) + endif () + set_target_properties(${target} PROPERTIES FOLDER "Tablegenning") + endif( TABLEGEN_OUTPUT ) +endfunction() + +if(CMAKE_CROSSCOMPILING) + set(CX_NATIVE_TG_DIR "${CMAKE_BINARY_DIR}/native") + + add_custom_command(OUTPUT ${CX_NATIVE_TG_DIR} + COMMAND ${CMAKE_COMMAND} -E make_directory ${CX_NATIVE_TG_DIR} + COMMENT "Creating ${CX_NATIVE_TG_DIR}...") + + add_custom_command(OUTPUT ${CX_NATIVE_TG_DIR}/CMakeCache.txt + COMMAND ${CMAKE_COMMAND} -UMAKE_TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=Release + -DLLVM_BUILD_POLLY=OFF + -G "${CMAKE_GENERATOR}" ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY ${CX_NATIVE_TG_DIR} + DEPENDS ${CX_NATIVE_TG_DIR} + COMMENT "Configuring native TableGen...") + + add_custom_target(ConfigureNativeTableGen DEPENDS ${CX_NATIVE_TG_DIR}/CMakeCache.txt) + + set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CX_NATIVE_TG_DIR}) +endif() + +macro(add_tablegen target project) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR}) + + set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS}) + set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen) + add_llvm_utility(${target} ${ARGN}) + set(LLVM_LINK_COMPONENTS ${${target}_OLD_LLVM_LINK_COMPONENTS}) + + # For Xcode builds, symlink bin/ to bin// so that + # a separately-configured Clang project can still find llvm-tblgen. + if (XCODE) + add_custom_target(${target}-top ALL + ${CMAKE_COMMAND} -E create_symlink + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${target}${CMAKE_EXECUTABLE_SUFFIX} + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${target}${CMAKE_EXECUTABLE_SUFFIX} + DEPENDS ${target}) + endif () + + set(${project}_TABLEGEN "${target}" CACHE + STRING "Native TableGen executable. Saves building one when cross-compiling.") + + # Upgrade existing LLVM_TABLEGEN setting. + if(${project} STREQUAL LLVM) + if(${LLVM_TABLEGEN} STREQUAL tblgen) + set(LLVM_TABLEGEN "${target}" CACHE + STRING "Native TableGen executable. Saves building one when cross-compiling." + FORCE) + endif() + endif() + + # Effective tblgen executable to be used: + set(${project}_TABLEGEN_EXE ${${project}_TABLEGEN} PARENT_SCOPE) + + if(CMAKE_CROSSCOMPILING) + if( ${${project}_TABLEGEN} STREQUAL "${target}" ) + set(${project}_TABLEGEN_EXE "${CX_NATIVE_TG_DIR}/bin/${target}") + set(${project}_TABLEGEN_EXE ${${project}_TABLEGEN_EXE} PARENT_SCOPE) + + add_custom_command(OUTPUT ${${project}_TABLEGEN_EXE} + COMMAND ${CMAKE_BUILD_TOOL} ${target} + DEPENDS ${CX_NATIVE_TG_DIR}/CMakeCache.txt + WORKING_DIRECTORY ${CX_NATIVE_TG_DIR} + COMMENT "Building native TableGen...") + add_custom_target(${project}NativeTableGen DEPENDS ${${project}_TABLEGEN_EXE}) + add_dependencies(${project}NativeTableGen ConfigureNativeTableGen) + + add_dependencies(${target} ${project}NativeTableGen) + endif() + endif() + + if( MINGW ) + target_link_libraries(${target} imagehlp psapi shell32) + if(CMAKE_SIZEOF_VOID_P MATCHES "8") + set_target_properties(${target} PROPERTIES LINK_FLAGS -Wl,--stack,16777216) + endif(CMAKE_SIZEOF_VOID_P MATCHES "8") + endif( MINGW ) + if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD AND NOT BEOS ) + target_link_libraries(${target} pthread) + endif() + + if (${project} STREQUAL LLVM AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + install(TARGETS ${target} RUNTIME DESTINATION bin) + endif() +endmacro() diff --git a/cmake/modules/VersionFromVCS.cmake b/cmake/modules/VersionFromVCS.cmake new file mode 100644 index 00000000..26314d41 --- /dev/null +++ b/cmake/modules/VersionFromVCS.cmake @@ -0,0 +1,72 @@ +# Adds version control information to the variable VERS. For +# determining the Version Control System used (if any) it inspects the +# existence of certain subdirectories under CMAKE_CURRENT_SOURCE_DIR. + +function(add_version_info_from_vcs VERS) + string(REPLACE "svn" "" result "${${VERS}}") + if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.svn" ) + set(result "${result}svn") + # FindSubversion does not work with symlinks. See PR 8437 + if( NOT IS_SYMLINK "${CMAKE_CURRENT_SOURCE_DIR}" ) + find_package(Subversion) + endif() + if( Subversion_FOUND ) + subversion_wc_info( ${CMAKE_CURRENT_SOURCE_DIR} Project ) + if( Project_WC_REVISION ) + set(SVN_REVISION ${Project_WC_REVISION} PARENT_SCOPE) + set(result "${result}-r${Project_WC_REVISION}") + endif() + endif() + elseif( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git ) + set(result "${result}git") + # Try to get a ref-id + if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/svn ) + find_program(git_executable NAMES git git.exe git.cmd) + if( git_executable ) + set(is_git_svn_rev_exact false) + execute_process(COMMAND ${git_executable} svn log --limit=1 --oneline + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + TIMEOUT 5 + RESULT_VARIABLE git_result + OUTPUT_VARIABLE git_output) + if( git_result EQUAL 0 ) + string(REGEX MATCH r[0-9]+ git_svn_rev ${git_output}) + string(LENGTH "${git_svn_rev}" rev_length) + math(EXPR rev_length "${rev_length}-1") + string(SUBSTRING "${git_svn_rev}" 1 ${rev_length} git_svn_rev_number) + set(SVN_REVISION ${git_svn_rev_number} PARENT_SCOPE) + set(git_svn_rev "-svn-${git_svn_rev}") + + # Determine if the HEAD points directly at a subversion revision. + execute_process(COMMAND ${git_executable} svn find-rev HEAD + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + TIMEOUT 5 + RESULT_VARIABLE git_result + OUTPUT_VARIABLE git_output) + if( git_result EQUAL 0 ) + string(STRIP "${git_output}" git_head_svn_rev_number) + if( git_head_svn_rev_number EQUAL git_svn_rev_number ) + set(is_git_svn_rev_exact true) + endif() + endif() + else() + set(git_svn_rev "") + endif() + execute_process(COMMAND + ${git_executable} rev-parse --short HEAD + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + TIMEOUT 5 + RESULT_VARIABLE git_result + OUTPUT_VARIABLE git_output) + if( git_result EQUAL 0 AND NOT is_git_svn_rev_exact ) + string(STRIP "${git_output}" git_ref_id) + set(GIT_COMMIT ${git_ref_id} PARENT_SCOPE) + set(result "${result}${git_svn_rev}-${git_ref_id}") + else() + set(result "${result}${git_svn_rev}") + endif() + endif() + endif() + endif() + set(${VERS} ${result} PARENT_SCOPE) +endfunction(add_version_info_from_vcs) diff --git a/cmake/nsis_logo.bmp b/cmake/nsis_logo.bmp new file mode 100644 index 0000000000000000000000000000000000000000..5fcb3cec19858386f3bfbd318b2b46b4de9101ca GIT binary patch literal 30776 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 + +SET(CMAKE_SYSTEM_NAME Linux) + +IF(NOT CMAKE_C_COMPILER) + SET(CMAKE_C_COMPILER ${CMAKE_BINARY_DIR}/../bin/clang) +ENDIF() + +IF(NOT CMAKE_CXX_COMPILER) + SET(CMAKE_CXX_COMPILER ${CMAKE_BINARY_DIR}/../bin/clang++) +ENDIF() + +SET(ANDROID "1" CACHE STRING "ANDROID" FORCE) + +SET(ANDROID_COMMON_FLAGS "-target arm-linux-androideabi --sysroot=${LLVM_ANDROID_TOOLCHAIN_DIR}/sysroot -B${LLVM_ANDROID_TOOLCHAIN_DIR} -mllvm -arm-enable-ehabi") +SET(CMAKE_C_FLAGS "${ANDROID_COMMON_FLAGS}" CACHE STRING "toolchain_cflags" FORCE) +SET(CMAKE_CXX_FLAGS "${ANDROID_COMMON_FLAGS}" CACHE STRING "toolchain_cxxflags" FORCE) +SET(CMAKE_LINK_FLAGS "${ANDROID_COMMON_FLAGS}" CACHE STRING "toolchain_linkflags" FORCE) diff --git a/configure b/configure new file mode 100755 index 00000000..cbda923c --- /dev/null +++ b/configure @@ -0,0 +1,23947 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.60 for LLVM 3.4.1. +# +# Report bugs to . +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +# +# Copyright (c) 2003-2013 University of Illinois at Urbana-Champaign. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" +else + as_executable_p=: +fi +rm -f conf$$.file + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='LLVM' +PACKAGE_TARNAME='llvm' +PACKAGE_VERSION='3.4.1' +PACKAGE_STRING='LLVM 3.4.1' +PACKAGE_BUGREPORT='http://llvm.org/bugs/' + +ac_unique_file="lib/IR/Module.cpp" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#endif +#if HAVE_STDINT_H +# include +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +LLVM_VERSION_MAJOR +LLVM_VERSION_MINOR +LLVM_VERSION_PATCH +LLVM_VERSION_SUFFIX +LLVM_COPYRIGHT +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +CXX +CXXFLAGS +ac_ct_CXX +CPP +subdirs +ENABLE_POLLY +LLVM_HAS_POLLY +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +target +target_cpu +target_vendor +target_os +OS +HOST_OS +TARGET_OS +LINKALL +NOLINKALL +LLVM_ON_UNIX +LLVM_ON_WIN32 +ARCH +HOST_ARCH +ENDIAN +GREP +EGREP +LLVM_CROSS_COMPILING +BUILD_CC +BUILD_EXEEXT +BUILD_CXX +CVSBUILD +ENABLE_LIBCPP +ENABLE_CXX11 +ENABLE_SPLIT_DWARF +ENABLE_CLANG_ARCMT +ENABLE_CLANG_STATIC_ANALYZER +ENABLE_CLANG_REWRITER +ENABLE_OPTIMIZED +ENABLE_PROFILING +DISABLE_ASSERTIONS +ENABLE_WERROR +ENABLE_EXPENSIVE_CHECKS +EXPENSIVE_CHECKS +DEBUG_RUNTIME +DEBUG_SYMBOLS +KEEP_SYMBOLS +JIT +TARGET_HAS_JIT +ENABLE_DOCS +ENABLE_DOXYGEN +LLVM_ENABLE_THREADS +ENABLE_PTHREADS +LLVM_ENABLE_ZLIB +ENABLE_PIC +ENABLE_SHARED +ENABLE_EMBED_STDCXX +ENABLE_TIMESTAMPS +TARGETS_TO_BUILD +LLVM_ENUM_TARGETS +LLVM_ENUM_ASM_PRINTERS +LLVM_ENUM_ASM_PARSERS +LLVM_ENUM_DISASSEMBLERS +OPTIMIZE_OPTION +EXTRA_OPTIONS +EXTRA_LD_OPTIONS +CLANG_SRC_ROOT +BINUTILS_INCDIR +INTERNAL_PREFIX +NM +ifGNUmake +LN_S +CMP +CP +DATE +FIND +MKDIR +MV +RANLIB +AR +RM +SED +TAR +BINPWD +GRAPHVIZ +DOT +FDP +NEATO +TWOPI +CIRCO +GV +DOTTY +XDOT +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +BZIP2 +CAT +DOXYGEN +GROFF +GZIPBIN +PDFROFF +ZIP +OCAMLC +OCAMLOPT +OCAMLDEP +OCAMLDOC +GAS +HAVE_LINK_VERSION_SCRIPT +INSTALL_LTDL_TRUE +INSTALL_LTDL_FALSE +CONVENIENCE_LTDL_TRUE +CONVENIENCE_LTDL_FALSE +LIBADD_DL +NO_VARIADIC_MACROS +NO_MISSING_FIELD_INITIALIZERS +COVERED_SWITCH_DEFAULT +NO_MAYBE_UNINITIALIZED +NO_UNINITIALIZED +PYTHON +USE_UDIS86 +USE_OPROFILE +USE_INTEL_JITEVENTS +XML2CONFIG +LIBXML2_LIBS +LIBXML2_INC +CXXCPP +HAVE_PTHREAD +HAVE_LIBZ +HUGE_VAL_SANITY +MMAP_FILE +SHLIBEXT +SHLIBPATH_VAR +LLVM_PREFIX +LLVM_BINDIR +LLVM_DATADIR +LLVM_DOCSDIR +LLVM_ETCDIR +LLVM_INCLUDEDIR +LLVM_INFODIR +LLVM_MANDIR +LLVM_CONFIGTIME +BINDINGS_TO_BUILD +ALL_BINDINGS +OCAML_LIBDIR +ENABLE_VISIBILITY_INLINES_HIDDEN +RPATH +RDYNAMIC +program_prefix +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +CPPFLAGS +CXX +CXXFLAGS +CCC +CPP +CXXCPP' +ac_subdirs_all='projects/llvm-gcc +projects/test-suite +projects/llvm-test +projects/poolalloc +projects/llvm-poolalloc +projects/sample +projects/privbracket +projects/llvm-stacker +projects/llvm-reopt +projects/llvm-java +projects/llvm-tv +projects/safecode +projects/llvm-kernel +tools/polly' + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval with_$ac_package=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures LLVM 3.4.1 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/llvm] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of LLVM 3.4.1:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-polly Use polly if available (default is YES) + --enable-libcpp Use libc++ if available (default is NO) + --enable-cxx11 Use c++11 if available (default is NO) + --enable-split-dwarf Use split-dwarf if available (default is NO) + --enable-clang-arcmt Enable building of clang ARCMT (default is YES) + --enable-clang-static-analyzer + Enable building of clang Static Analyzer (default is + YES) + --enable-clang-rewriter Enable building of clang rewriter (default is YES) + --enable-optimized Compile with optimizations enabled (default is NO) + --enable-profiling Compile with profiling enabled (default is NO) + --enable-assertions Compile with assertion checks enabled (default is + YES) + --enable-werror Compile with -Werror enabled (default is NO) + --enable-expensive-checks + Compile with expensive debug checks enabled (default + is NO) + --enable-debug-runtime Build runtime libs with debug symbols (default is + NO) + --enable-debug-symbols Build compiler with debug symbols (default is NO if + optimization is on and YES if it's off) + --enable-keep-symbols Do not strip installed executables) + --enable-jit Enable Just In Time Compiling (default is YES) + --enable-docs Build documents (default is YES) + --enable-doxygen Build doxygen documentation (default is NO) + --enable-threads Use threads if available (default is YES) + --enable-pthreads Use pthreads if available (default is YES) + --enable-zlib Use zlib for compression/decompression if available + (default is YES) + --enable-pic Build LLVM with Position Independent Code (default + is YES) + --enable-shared Build a shared library and link tools against it + (default is NO) + --enable-embed-stdcxx Build a shared library with embedded libstdc++ for + Win32 DLL (default is NO) + --enable-timestamps Enable embedding timestamp information in build + (default is YES) + --enable-backtraces Enable embedding backtraces on crash (default is + YES) + --enable-crash-overrides + Enable crash handling overrides (default is YES) + --enable-targets Build specific host targets: all or + target1,target2,... Valid targets are: host, x86, + x86_64, sparc, powerpc, arm, aarch64, mips, hexagon, + xcore, msp430, nvptx, systemz, r600, and cpp + (default=all) + --enable-experimental-targets + Build experimental host targets: disable or + target1,target2,... (default=disable) + --enable-bindings Build specific language bindings: + all,auto,none,{binding-name} (default=auto) + --enable-terminfo Query the terminfo database if available (default is + YES) + --enable-libffi Check for the presence of libffi (default is NO) + --enable-ltdl-install install libltdl + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-optimize-option Select the compiler options to use for optimized + builds + --with-extra-options Specify additional options to compile LLVM with + --with-extra-ld-options Specify additional options to link LLVM with + --with-ocaml-libdir Specify install location for ocaml bindings (default + is stdlib) + --with-clang-srcdir Directory to the out-of-tree Clang source + --with-clang-resource-dir + Relative directory from the Clang binary for + resource files + --with-c-include-dirs Colon separated list of directories clang will + search for headers + --with-gcc-toolchain Directory where gcc is installed. + --with-default-sysroot Add --sysroot= to all compiler invocations. + --with-binutils-include Specify path to binutils/include/ containing + plugin-api.h file for gold plugin. + --with-bug-report-url Specify the URL where bug reports should be + submitted (default=http://llvm.org/bugs/) + --with-internal-prefix Installation directory for internal files + --with-python path to python + --with-udis86= Use udis86 external x86 disassembler library + --with-oprofile= + Tell OProfile >= 0.9.4 how to symbolize JIT output + --with-intel-jitevents Notify Intel JIT profiling API of generated code + + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CPP C preprocessor + CXXCPP C++ preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +LLVM configure 3.4.1 +generated by GNU Autoconf 2.60 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. + +Copyright (c) 2003-2013 University of Illinois at Urbana-Champaign. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by LLVM $as_me 3.4.1, which was +generated by GNU Autoconf 2.60. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +LLVM_VERSION_MAJOR=3 +LLVM_VERSION_MINOR=4 +LLVM_VERSION_PATCH=1 +LLVM_VERSION_SUFFIX= + + +cat >>confdefs.h <<_ACEOF +#define LLVM_VERSION_MAJOR $LLVM_VERSION_MAJOR +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LLVM_VERSION_MINOR $LLVM_VERSION_MINOR +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LLVM_VERSION_PATCH $LLVM_VERSION_PATCH +_ACEOF + + + + + + + +LLVM_COPYRIGHT="Copyright (c) 2003-2013 University of Illinois at Urbana-Champaign." + + + + + + + +ac_aux_dir= +for ac_dir in autoconf "$srcdir"/autoconf; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in autoconf \"$srcdir\"/autoconf" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in autoconf \"$srcdir\"/autoconf" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + +if test ${srcdir} != "." ; then + if test -f ${srcdir}/include/llvm/Config/config.h ; then + { { echo "$as_me:$LINENO: error: Already configured in ${srcdir}" >&5 +echo "$as_me: error: Already configured in ${srcdir}" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +: ${CFLAGS=} +: ${CXXFLAGS=} + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in clang llvm-gcc gcc + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in clang llvm-gcc gcc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in clang++ llvm-g++ g++ + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in clang++ llvm-g++ g++ +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CXX=$ac_ct_CXX + fi +fi + + fi +fi +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +if test "$CXX" = "clang++" ; then + { echo "$as_me:$LINENO: checking whether clang works" >&5 +echo $ECHO_N "checking whether clang works... $ECHO_C" >&6; } + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if __has_include () +#include +#endif +#if __has_include () +#include +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + { { echo "$as_me:$LINENO: error: Selected compiler could not find or parse C++ standard library headers. Rerun with CC=c-compiler CXX=c++-compiler ./configure ..." >&5 +echo "$as_me: error: Selected compiler could not find or parse C++ standard library headers. Rerun with CC=c-compiler CXX=c++-compiler ./configure ..." >&2;} + { (exit 1); exit 1; }; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi + + + +if test -d ${srcdir}/projects/llvm-gcc ; then + subdirs="$subdirs projects/llvm-gcc" + +fi + +if test -d ${srcdir}/projects/test-suite ; then + subdirs="$subdirs projects/test-suite" + +fi + +if test -d ${srcdir}/projects/llvm-test ; then + subdirs="$subdirs projects/llvm-test" + +fi + +if test -d ${srcdir}/projects/poolalloc ; then + subdirs="$subdirs projects/poolalloc" + +fi + +if test -d ${srcdir}/projects/llvm-poolalloc ; then + subdirs="$subdirs projects/llvm-poolalloc" + +fi + +for i in `ls ${srcdir}/projects` +do + if test -d ${srcdir}/projects/${i} ; then + case ${i} in + sample) subdirs="$subdirs projects/sample" + ;; + privbracket) subdirs="$subdirs projects/privbracket" + ;; + llvm-stacker) subdirs="$subdirs projects/llvm-stacker" + ;; + llvm-reopt) subdirs="$subdirs projects/llvm-reopt" +;; + llvm-java) subdirs="$subdirs projects/llvm-java" + ;; + llvm-tv) subdirs="$subdirs projects/llvm-tv" + ;; + safecode) subdirs="$subdirs projects/safecode" + ;; + llvm-kernel) subdirs="$subdirs projects/llvm-kernel" + ;; + compiler-rt) ;; + llvm-gcc) ;; + test-suite) ;; + llvm-test) ;; + poolalloc) ;; + llvm-poolalloc) ;; + *) + { echo "$as_me:$LINENO: WARNING: Unknown project (${i}) won't be configured automatically" >&5 +echo "$as_me: WARNING: Unknown project (${i}) won't be configured automatically" >&2;} + ;; + esac + fi +done + +# Check whether --enable-polly was given. +if test "${enable_polly+set}" = set; then + enableval=$enable_polly; +else + enableval=default +fi + +case "$enableval" in + yes) ENABLE_POLLY=1 + ;; + no) ENABLE_POLLY=0 + ;; + default) ENABLE_POLLY=1 + ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-polly. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-polly. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + + +if (test -d ${srcdir}/tools/polly) && (test $ENABLE_POLLY -eq 1) ; then + LLVM_HAS_POLLY=1 + + subdirs="$subdirs tools/polly" + +fi + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6; } +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 +echo "$as_me: error: invalid value of canonical target" >&2;} + { (exit 1); exit 1; }; };; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- + +{ echo "$as_me:$LINENO: checking type of operating system we're going to host on" >&5 +echo $ECHO_N "checking type of operating system we're going to host on... $ECHO_C" >&6; } +if test "${llvm_cv_os_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $host in + *-*-aix*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="AIX" + llvm_cv_platform_type="Unix" ;; + *-*-irix*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="IRIX" + llvm_cv_platform_type="Unix" ;; + *-*-cygwin*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="Cygwin" + llvm_cv_platform_type="Unix" ;; + *-*-darwin*) + llvm_cv_link_all_option="-Wl,-all_load" + llvm_cv_no_link_all_option="-Wl,-noall_load" + llvm_cv_os_type="Darwin" + llvm_cv_platform_type="Unix" ;; + *-*-minix*) + llvm_cv_link_all_option="-Wl,-all_load" + llvm_cv_no_link_all_option="-Wl,-noall_load" + llvm_cv_os_type="Minix" + llvm_cv_platform_type="Unix" ;; + *-*-freebsd*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="FreeBSD" + llvm_cv_platform_type="Unix" ;; + *-*-kfreebsd-gnu) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="GNU/kFreeBSD" + llvm_cv_platform_type="Unix" ;; + *-*-openbsd*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="OpenBSD" + llvm_cv_platform_type="Unix" ;; + *-*-netbsd*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="NetBSD" + llvm_cv_platform_type="Unix" ;; + *-*-dragonfly*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="DragonFly" + llvm_cv_platform_type="Unix" ;; + *-*-hpux*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="HP-UX" + llvm_cv_platform_type="Unix" ;; + *-*-interix*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="Interix" + llvm_cv_platform_type="Unix" ;; + *-*-linux*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="Linux" + llvm_cv_platform_type="Unix" ;; + *-*-gnu*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="GNU" + llvm_cv_platform_type="Unix" ;; + *-*-solaris*) + llvm_cv_link_all_option="-Wl,-z,allextract" + llvm_cv_no_link_all_option="-Wl,-z,defaultextract" + llvm_cv_os_type="SunOS" + llvm_cv_platform_type="Unix" ;; + *-*-auroraux*) + llvm_cv_link_all_option="-Wl,-z,allextract" + llvm_cv_link_all_option="-Wl,-z,defaultextract" + llvm_cv_os_type="AuroraUX" + llvm_cv_platform_type="Unix" ;; + *-*-win32*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="Win32" + llvm_cv_platform_type="Win32" ;; + *-*-mingw*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="MingW" + llvm_cv_platform_type="Win32" ;; + *-*-haiku*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="Haiku" + llvm_cv_platform_type="Unix" ;; + *-unknown-eabi*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="Freestanding" + llvm_cv_platform_type="Unix" ;; + *-unknown-elf*) + llvm_cv_link_all_option="-Wl,--whole-archive" + llvm_cv_no_link_all_option="-Wl,--no-whole-archive" + llvm_cv_os_type="Freestanding" + llvm_cv_platform_type="Unix" ;; + *) + llvm_cv_link_all_option="" + llvm_cv_no_link_all_option="" + llvm_cv_os_type="Unknown" + llvm_cv_platform_type="Unknown" ;; +esac +fi +{ echo "$as_me:$LINENO: result: $llvm_cv_os_type" >&5 +echo "${ECHO_T}$llvm_cv_os_type" >&6; } + +{ echo "$as_me:$LINENO: checking type of operating system we're going to target" >&5 +echo $ECHO_N "checking type of operating system we're going to target... $ECHO_C" >&6; } +if test "${llvm_cv_target_os_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $target in + *-*-aix*) + llvm_cv_target_os_type="AIX" ;; + *-*-irix*) + llvm_cv_target_os_type="IRIX" ;; + *-*-cygwin*) + llvm_cv_target_os_type="Cygwin" ;; + *-*-darwin*) + llvm_cv_target_os_type="Darwin" ;; + *-*-minix*) + llvm_cv_target_os_type="Minix" ;; + *-*-freebsd*) + llvm_cv_target_os_type="FreeBSD" ;; + *-*-kfreebsd-gnu) + llvm_cv_target_os_type="GNU/kFreeBSD" ;; + *-*-openbsd*) + llvm_cv_target_os_type="OpenBSD" ;; + *-*-netbsd*) + llvm_cv_target_os_type="NetBSD" ;; + *-*-dragonfly*) + llvm_cv_target_os_type="DragonFly" ;; + *-*-hpux*) + llvm_cv_target_os_type="HP-UX" ;; + *-*-interix*) + llvm_cv_target_os_type="Interix" ;; + *-*-linux*) + llvm_cv_target_os_type="Linux" ;; + *-*-gnu*) + llvm_cv_target_os_type="GNU" ;; + *-*-solaris*) + llvm_cv_target_os_type="SunOS" ;; + *-*-auroraux*) + llvm_cv_target_os_type="AuroraUX" ;; + *-*-win32*) + llvm_cv_target_os_type="Win32" ;; + *-*-mingw*) + llvm_cv_target_os_type="MingW" ;; + *-*-haiku*) + llvm_cv_target_os_type="Haiku" ;; + *-*-rtems*) + llvm_cv_target_os_type="RTEMS" ;; + *-*-nacl*) + llvm_cv_target_os_type="NativeClient" ;; + *-unknown-eabi*) + llvm_cv_target_os_type="Freestanding" ;; + *) + llvm_cv_target_os_type="Unknown" ;; +esac +fi +{ echo "$as_me:$LINENO: result: $llvm_cv_target_os_type" >&5 +echo "${ECHO_T}$llvm_cv_target_os_type" >&6; } + +if test "$llvm_cv_os_type" = "Unknown" ; then + { { echo "$as_me:$LINENO: error: Operating system is unknown, configure can't continue" >&5 +echo "$as_me: error: Operating system is unknown, configure can't continue" >&2;} + { (exit 1); exit 1; }; } +fi + +OS=$llvm_cv_os_type + +HOST_OS=$llvm_cv_os_type + +TARGET_OS=$llvm_cv_target_os_type + + +LINKALL=$llvm_cv_link_all_option + +NOLINKALL=$llvm_cv_no_link_all_option + + +case $llvm_cv_platform_type in + Unix) + +cat >>confdefs.h <<\_ACEOF +#define LLVM_ON_UNIX 1 +_ACEOF + + LLVM_ON_UNIX=1 + + LLVM_ON_WIN32=0 + + ;; + Win32) + +cat >>confdefs.h <<\_ACEOF +#define LLVM_ON_WIN32 1 +_ACEOF + + LLVM_ON_UNIX=0 + + LLVM_ON_WIN32=1 + + ;; +esac + +{ echo "$as_me:$LINENO: checking target architecture" >&5 +echo $ECHO_N "checking target architecture... $ECHO_C" >&6; } +if test "${llvm_cv_target_arch+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $target in + i?86-*) llvm_cv_target_arch="x86" ;; + amd64-* | x86_64-*) llvm_cv_target_arch="x86_64" ;; + sparc*-*) llvm_cv_target_arch="Sparc" ;; + powerpc*-*) llvm_cv_target_arch="PowerPC" ;; + arm*-*) llvm_cv_target_arch="ARM" ;; + aarch64*-*) llvm_cv_target_arch="AArch64" ;; + mips-* | mips64-*) llvm_cv_target_arch="Mips" ;; + mipsel-* | mips64el-*) llvm_cv_target_arch="Mips" ;; + xcore-*) llvm_cv_target_arch="XCore" ;; + msp430-*) llvm_cv_target_arch="MSP430" ;; + hexagon-*) llvm_cv_target_arch="Hexagon" ;; + nvptx-*) llvm_cv_target_arch="NVPTX" ;; + s390x-*) llvm_cv_target_arch="SystemZ" ;; + *) llvm_cv_target_arch="Unknown" ;; +esac +fi +{ echo "$as_me:$LINENO: result: $llvm_cv_target_arch" >&5 +echo "${ECHO_T}$llvm_cv_target_arch" >&6; } + +if test "$llvm_cv_target_arch" = "Unknown" ; then + { echo "$as_me:$LINENO: WARNING: Configuring LLVM for an unknown target archicture" >&5 +echo "$as_me: WARNING: Configuring LLVM for an unknown target archicture" >&2;} +fi + +case "$llvm_cv_target_arch" in + x86) LLVM_NATIVE_ARCH="X86" ;; + x86_64) LLVM_NATIVE_ARCH="X86" ;; + *) LLVM_NATIVE_ARCH="$llvm_cv_target_arch" ;; +esac + +ARCH=$llvm_cv_target_arch + + +case $host in + i?86-*) host_arch="x86" ;; + amd64-* | x86_64-*) host_arch="x86_64" ;; + sparc*-*) host_arch="Sparc" ;; + powerpc*-*) host_arch="PowerPC" ;; + arm*-*) host_arch="ARM" ;; + aarch64*-*) host_arch="AArch64" ;; + mips-* | mips64-*) host_arch="Mips" ;; + mipsel-* | mips64el-*) host_arch="Mips" ;; + xcore-*) host_arch="XCore" ;; + msp430-*) host_arch="MSP430" ;; + hexagon-*) host_arch="Hexagon" ;; + s390x-*) host_arch="SystemZ" ;; + *) host_arch="Unknown" ;; +esac + +if test "$host_arch" = "Unknown" ; then + { echo "$as_me:$LINENO: WARNING: Configuring LLVM for an unknown host archicture" >&5 +echo "$as_me: WARNING: Configuring LLVM for an unknown host archicture" >&2;} +fi + +HOST_ARCH=$host_arch + + + + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } +case $ac_cv_c_bigendian in + yes) + ENDIAN=big + ;; + no) + ENDIAN=little + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac + + +if test "$cross_compiling" = yes; then + LLVM_CROSS_COMPILING=1 + + +{ echo "$as_me:$LINENO: checking for executable suffix on build platform" >&5 +echo $ECHO_N "checking for executable suffix on build platform... $ECHO_C" >&6; } +if test "${ac_cv_build_exeext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + ac_cv_build_exeext=.exe +else + ac_build_prefix=${build_alias}- + + # Extract the first word of "${ac_build_prefix}gcc", so it can be a program name with args. +set dummy ${ac_build_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_BUILD_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$BUILD_CC"; then + ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_BUILD_CC="${ac_build_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +BUILD_CC=$ac_cv_prog_BUILD_CC +if test -n "$BUILD_CC"; then + { echo "$as_me:$LINENO: result: $BUILD_CC" >&5 +echo "${ECHO_T}$BUILD_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + if test -z "$BUILD_CC"; then + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_BUILD_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$BUILD_CC"; then + ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_BUILD_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +BUILD_CC=$ac_cv_prog_BUILD_CC +if test -n "$BUILD_CC"; then + { echo "$as_me:$LINENO: result: $BUILD_CC" >&5 +echo "${ECHO_T}$BUILD_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + if test -z "$BUILD_CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_BUILD_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$BUILD_CC"; then + ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_BUILD_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_BUILD_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set BUILD_CC to just the basename; use the full file name. + shift + ac_cv_prog_BUILD_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +BUILD_CC=$ac_cv_prog_BUILD_CC +if test -n "$BUILD_CC"; then + { echo "$as_me:$LINENO: result: $BUILD_CC" >&5 +echo "${ECHO_T}$BUILD_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi + fi + test -z "$BUILD_CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5 +echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_build_exeext= + if { (eval echo "$as_me:$LINENO: \"$ac_build_link\"") >&5 + (eval $ac_build_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj | *.dSYM) ;; + *) ac_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + { { echo "$as_me:$LINENO: error: installation or configuration problem: compiler cannot create executables." >&5 +echo "$as_me: error: installation or configuration problem: compiler cannot create executables." >&2;} + { (exit 1); exit 1; }; } + fi + rm -f conftest* + test x"${ac_cv_build_exeext}" = x && ac_cv_build_exeext=blank +fi +fi + +BUILD_EXEEXT="" +test x"${ac_cv_build_exeext}" != xblank && BUILD_EXEEXT=${ac_cv_build_exeext} +{ echo "$as_me:$LINENO: result: ${ac_cv_build_exeext}" >&5 +echo "${ECHO_T}${ac_cv_build_exeext}" >&6; } +ac_build_exeext=$BUILD_EXEEXT + + ac_build_prefix=${build_alias}- + # Extract the first word of "${ac_build_prefix}g++", so it can be a program name with args. +set dummy ${ac_build_prefix}g++; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_BUILD_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$BUILD_CXX"; then + ac_cv_prog_BUILD_CXX="$BUILD_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_BUILD_CXX="${ac_build_prefix}g++" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +BUILD_CXX=$ac_cv_prog_BUILD_CXX +if test -n "$BUILD_CXX"; then + { echo "$as_me:$LINENO: result: $BUILD_CXX" >&5 +echo "${ECHO_T}$BUILD_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + if test -z "$BUILD_CXX"; then + # Extract the first word of "g++", so it can be a program name with args. +set dummy g++; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_BUILD_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$BUILD_CXX"; then + ac_cv_prog_BUILD_CXX="$BUILD_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_BUILD_CXX="g++" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +BUILD_CXX=$ac_cv_prog_BUILD_CXX +if test -n "$BUILD_CXX"; then + { echo "$as_me:$LINENO: result: $BUILD_CXX" >&5 +echo "${ECHO_T}$BUILD_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + if test -z "$BUILD_CXX"; then + # Extract the first word of "c++", so it can be a program name with args. +set dummy c++; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_BUILD_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$BUILD_CXX"; then + ac_cv_prog_BUILD_CXX="$BUILD_CXX" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/c++"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_BUILD_CXX="c++" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_BUILD_CXX + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set BUILD_CXX to just the basename; use the full file name. + shift + ac_cv_prog_BUILD_CXX="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +BUILD_CXX=$ac_cv_prog_BUILD_CXX +if test -n "$BUILD_CXX"; then + { echo "$as_me:$LINENO: result: $BUILD_CXX" >&5 +echo "${ECHO_T}$BUILD_CXX" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi + fi +else + LLVM_CROSS_COMPILING=0 + +fi + +if test -d ".svn" -o -d "${srcdir}/.svn" -o -d ".git" -o -d "${srcdir}/.git"; then + cvsbuild="yes" + optimize="no" + CVSBUILD=CVSBUILD=1 + +else + cvsbuild="no" + optimize="yes" +fi + + +# Check whether --enable-libcpp was given. +if test "${enable_libcpp+set}" = set; then + enableval=$enable_libcpp; +else + enableval=default +fi + +case "$enableval" in + yes) ENABLE_LIBCPP=1 + ;; + no) ENABLE_LIBCPP=0 + ;; + default) ENABLE_LIBCPP=0 +;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-libcpp. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-libcpp. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +# Check whether --enable-cxx11 was given. +if test "${enable_cxx11+set}" = set; then + enableval=$enable_cxx11; +else + enableval=default +fi + +case "$enableval" in + yes) ENABLE_CXX11=1 + ;; + no) ENABLE_CXX11=0 + ;; + default) ENABLE_CXX11=0 +;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-cxx11. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-cxx11. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +# Check whether --enable-split-dwarf was given. +if test "${enable_split_dwarf+set}" = set; then + enableval=$enable_split_dwarf; +else + enableval=default +fi + +case "$enableval" in + yes) ENABLE_SPLIT_DWARF=1 + ;; + no) ENABLE_SPLIT_DWARF=0 + ;; + default) ENABLE_SPLIT_DWARF=0 +;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-split-dwarf. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-split-dwarf. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +clang_arcmt="yes" +# Check whether --enable-clang-arcmt was given. +if test "${enable_clang_arcmt+set}" = set; then + enableval=$enable_clang_arcmt; clang_arcmt="$enableval" +else + enableval="yes" +fi + +case "$enableval" in + yes) ENABLE_CLANG_ARCMT=1 + ;; + no) ENABLE_CLANG_ARCMT=0 + ;; + default) ENABLE_CLANG_ARCMT=1 +;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-clang-arcmt. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-clang-arcmt. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +clang_static_analyzer="yes" +# Check whether --enable-clang-static-analyzer was given. +if test "${enable_clang_static_analyzer+set}" = set; then + enableval=$enable_clang_static_analyzer; clang_static_analyzer="$enableval" +else + enableval="yes" +fi + +case "$enableval" in + yes) ENABLE_CLANG_STATIC_ANALYZER=1 + ;; + no) + if test ${clang_arcmt} != "no" ; then + { { echo "$as_me:$LINENO: error: Cannot enable clang ARC Migration Tool while disabling static analyzer." >&5 +echo "$as_me: error: Cannot enable clang ARC Migration Tool while disabling static analyzer." >&2;} + { (exit 1); exit 1; }; } + fi + ENABLE_CLANG_STATIC_ANALYZER=0 + + ;; + default) ENABLE_CLANG_STATIC_ANALYZER=1 +;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-clang-static-analyzer. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-clang-static-analyzer. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +# Check whether --enable-clang-rewriter was given. +if test "${enable_clang_rewriter+set}" = set; then + enableval=$enable_clang_rewriter; +else + enableval="yes" +fi + +case "$enableval" in + yes) ENABLE_CLANG_REWRITER=1 + ;; + no) + if test ${clang_arcmt} != "no" ; then + { { echo "$as_me:$LINENO: error: Cannot enable clang ARC Migration Tool while disabling rewriter." >&5 +echo "$as_me: error: Cannot enable clang ARC Migration Tool while disabling rewriter." >&2;} + { (exit 1); exit 1; }; } + fi + if test ${clang_static_analyzer} != "no" ; then + { { echo "$as_me:$LINENO: error: Cannot enable clang static analyzer while disabling rewriter." >&5 +echo "$as_me: error: Cannot enable clang static analyzer while disabling rewriter." >&2;} + { (exit 1); exit 1; }; } + fi + ENABLE_CLANG_REWRITER=0 + + ;; + default) ENABLE_CLANG_REWRITER=1 +;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-clang-rewriter. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-clang-rewriter. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +# Check whether --enable-optimized was given. +if test "${enable_optimized+set}" = set; then + enableval=$enable_optimized; +else + enableval=$optimize +fi + +if test ${enableval} = "no" ; then + ENABLE_OPTIMIZED= + +else + ENABLE_OPTIMIZED=ENABLE_OPTIMIZED=1 + +fi + +# Check whether --enable-profiling was given. +if test "${enable_profiling+set}" = set; then + enableval=$enable_profiling; +else + enableval="no" +fi + +if test ${enableval} = "no" ; then + ENABLE_PROFILING= + +else + ENABLE_PROFILING=ENABLE_PROFILING=1 + +fi + +# Check whether --enable-assertions was given. +if test "${enable_assertions+set}" = set; then + enableval=$enable_assertions; +else + enableval="yes" +fi + +if test ${enableval} = "yes" ; then + DISABLE_ASSERTIONS= + +else + DISABLE_ASSERTIONS=DISABLE_ASSERTIONS=1 + +fi + +# Check whether --enable-werror was given. +if test "${enable_werror+set}" = set; then + enableval=$enable_werror; +else + enableval="no" +fi + +case "$enableval" in + yes) ENABLE_WERROR=1 + ;; + no) ENABLE_WERROR=0 + ;; + default) ENABLE_WERROR=0 +;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-werror. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-werror. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +# Check whether --enable-expensive-checks was given. +if test "${enable_expensive_checks+set}" = set; then + enableval=$enable_expensive_checks; +else + enableval="no" +fi + +if test ${enableval} = "yes" ; then + ENABLE_EXPENSIVE_CHECKS=ENABLE_EXPENSIVE_CHECKS=1 + + EXPENSIVE_CHECKS=yes + +else + ENABLE_EXPENSIVE_CHECKS= + + EXPENSIVE_CHECKS=no + +fi + +# Check whether --enable-debug-runtime was given. +if test "${enable_debug_runtime+set}" = set; then + enableval=$enable_debug_runtime; +else + enableval=no +fi + +if test ${enableval} = "no" ; then + DEBUG_RUNTIME= + +else + DEBUG_RUNTIME=DEBUG_RUNTIME=1 + +fi + +# Check whether --enable-debug-symbols was given. +if test "${enable_debug_symbols+set}" = set; then + enableval=$enable_debug_symbols; +else + enableval=no +fi + +if test ${enableval} = "no" ; then + DEBUG_SYMBOLS= + +else + DEBUG_SYMBOLS=DEBUG_SYMBOLS=1 + +fi + +# Check whether --enable-keep-symbols was given. +if test "${enable_keep_symbols+set}" = set; then + enableval=$enable_keep_symbols; +else + enableval=no +fi + +if test ${enableval} = "no" ; then + KEEP_SYMBOLS= + +else + KEEP_SYMBOLS=KEEP_SYMBOLS=1 + +fi + +# Check whether --enable-jit was given. +if test "${enable_jit+set}" = set; then + enableval=$enable_jit; +else + enableval=default +fi + +if test ${enableval} = "no" +then + JIT= + +else + case "$llvm_cv_target_arch" in + x86) TARGET_HAS_JIT=1 + ;; + Sparc) TARGET_HAS_JIT=0 + ;; + PowerPC) TARGET_HAS_JIT=1 + ;; + x86_64) TARGET_HAS_JIT=1 + ;; + ARM) TARGET_HAS_JIT=1 + ;; + AArch64) TARGET_HAS_JIT=0 + ;; + Mips) TARGET_HAS_JIT=1 + ;; + XCore) TARGET_HAS_JIT=0 + ;; + MSP430) TARGET_HAS_JIT=0 + ;; + Hexagon) TARGET_HAS_JIT=0 + ;; + NVPTX) TARGET_HAS_JIT=0 + ;; + SystemZ) TARGET_HAS_JIT=1 + ;; + *) TARGET_HAS_JIT=0 + ;; + esac +fi + +# Check whether --enable-docs was given. +if test "${enable_docs+set}" = set; then + enableval=$enable_docs; +else + enableval=default +fi + +case "$enableval" in + yes) ENABLE_DOCS=1 + ;; + no) ENABLE_DOCS=0 + ;; + default) ENABLE_DOCS=1 + ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-docs. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-docs. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +# Check whether --enable-doxygen was given. +if test "${enable_doxygen+set}" = set; then + enableval=$enable_doxygen; +else + enableval=default +fi + +case "$enableval" in + yes) ENABLE_DOXYGEN=1 + ;; + no) ENABLE_DOXYGEN=0 + ;; + default) ENABLE_DOXYGEN=0 + ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-doxygen. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-doxygen. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +# Check whether --enable-threads was given. +if test "${enable_threads+set}" = set; then + enableval=$enable_threads; +else + enableval=default +fi + +case "$enableval" in + yes) LLVM_ENABLE_THREADS=1 + ;; + no) LLVM_ENABLE_THREADS=0 + ;; + default) LLVM_ENABLE_THREADS=1 + ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-threads. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-threads. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +cat >>confdefs.h <<_ACEOF +#define LLVM_ENABLE_THREADS $LLVM_ENABLE_THREADS +_ACEOF + + +# Check whether --enable-pthreads was given. +if test "${enable_pthreads+set}" = set; then + enableval=$enable_pthreads; +else + enableval=default +fi + +case "$enableval" in + yes) ENABLE_PTHREADS=1 + ;; + no) ENABLE_PTHREADS=0 + ;; + default) ENABLE_PTHREADS=1 + ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-pthreads. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-pthreads. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +# Check whether --enable-zlib was given. +if test "${enable_zlib+set}" = set; then + enableval=$enable_zlib; +else + enableval=default +fi + +case "$enableval" in + yes) LLVM_ENABLE_ZLIB=1 + ;; + no) LLVM_ENABLE_ZLIB=0 + ;; + default) LLVM_ENABLE_ZLIB=1 + ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-zlib. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-zlib. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +cat >>confdefs.h <<_ACEOF +#define LLVM_ENABLE_ZLIB $LLVM_ENABLE_ZLIB +_ACEOF + + +# Check whether --enable-pic was given. +if test "${enable_pic+set}" = set; then + enableval=$enable_pic; +else + enableval=default +fi + +case "$enableval" in + yes) ENABLE_PIC=1 + ;; + no) ENABLE_PIC=0 + ;; + default) ENABLE_PIC=1 + ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-pic. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-pic. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +cat >>confdefs.h <<_ACEOF +#define ENABLE_PIC $ENABLE_PIC +_ACEOF + + +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; +else + enableval=default +fi + +case "$enableval" in + yes) ENABLE_SHARED=1 + ;; + no) ENABLE_SHARED=0 + ;; + default) ENABLE_SHARED=0 + ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-shared. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-shared. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +# Check whether --enable-embed-stdcxx was given. +if test "${enable_embed_stdcxx+set}" = set; then + enableval=$enable_embed_stdcxx; +else + enableval=default +fi + +case "$enableval" in + yes) ENABLE_EMBED_STDCXX=1 + ;; + no) ENABLE_EMBED_STDCXX=0 + ;; + default) ENABLE_EMBED_STDCXX=0 + ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-embed-stdcxx. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-embed-stdcxx. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +# Check whether --enable-timestamps was given. +if test "${enable_timestamps+set}" = set; then + enableval=$enable_timestamps; +else + enableval=default +fi + +case "$enableval" in + yes) ENABLE_TIMESTAMPS=1 + ;; + no) ENABLE_TIMESTAMPS=0 + ;; + default) ENABLE_TIMESTAMPS=1 + ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-timestamps. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-timestamps. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +cat >>confdefs.h <<_ACEOF +#define ENABLE_TIMESTAMPS $ENABLE_TIMESTAMPS +_ACEOF + + +# Check whether --enable-backtraces was given. +if test "${enable_backtraces+set}" = set; then + enableval=$enable_backtraces; case "$enableval" in + yes) llvm_cv_enable_backtraces="yes" ;; + no) llvm_cv_enable_backtraces="no" ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-backtraces. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-backtraces. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + llvm_cv_enable_backtraces="yes" +fi + +if test "$llvm_cv_enable_backtraces" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_BACKTRACES 1 +_ACEOF + +fi + +# Check whether --enable-crash-overrides was given. +if test "${enable_crash_overrides+set}" = set; then + enableval=$enable_crash_overrides; case "$enableval" in + yes) llvm_cv_enable_crash_overrides="yes" ;; + no) llvm_cv_enable_crash_overrides="no" ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-crash-overrides. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-crash-overrides. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + llvm_cv_enable_crash_overrides="yes" +fi + +if test "$llvm_cv_enable_crash_overrides" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_CRASH_OVERRIDES 1 +_ACEOF + +fi + +TARGETS_TO_BUILD="" +# Check whether --enable-targets was given. +if test "${enable_targets+set}" = set; then + enableval=$enable_targets; +else + enableval=all +fi + +if test "$enableval" = host-only ; then + enableval=host +fi +case "$enableval" in + all) TARGETS_TO_BUILD="X86 Sparc PowerPC AArch64 ARM Mips XCore MSP430 CppBackend NVPTX Hexagon SystemZ R600" ;; + *)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do + case "$a_target" in + x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; + x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; + sparc) TARGETS_TO_BUILD="Sparc $TARGETS_TO_BUILD" ;; + powerpc) TARGETS_TO_BUILD="PowerPC $TARGETS_TO_BUILD" ;; + aarch64) TARGETS_TO_BUILD="AArch64 $TARGETS_TO_BUILD" ;; + arm) TARGETS_TO_BUILD="ARM $TARGETS_TO_BUILD" ;; + mips) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; + mipsel) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; + mips64) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; + mips64el) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; + xcore) TARGETS_TO_BUILD="XCore $TARGETS_TO_BUILD" ;; + msp430) TARGETS_TO_BUILD="MSP430 $TARGETS_TO_BUILD" ;; + cpp) TARGETS_TO_BUILD="CppBackend $TARGETS_TO_BUILD" ;; + hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;; + nvptx) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;; + systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; + r600) TARGETS_TO_BUILD="R600 $TARGETS_TO_BUILD" ;; + host) case "$llvm_cv_target_arch" in + x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; + x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; + Sparc) TARGETS_TO_BUILD="Sparc $TARGETS_TO_BUILD" ;; + PowerPC) TARGETS_TO_BUILD="PowerPC $TARGETS_TO_BUILD" ;; + AArch64) TARGETS_TO_BUILD="AArch64 $TARGETS_TO_BUILD" ;; + ARM) TARGETS_TO_BUILD="ARM $TARGETS_TO_BUILD" ;; + Mips) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;; + XCore) TARGETS_TO_BUILD="XCore $TARGETS_TO_BUILD" ;; + MSP430) TARGETS_TO_BUILD="MSP430 $TARGETS_TO_BUILD" ;; + Hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;; + NVPTX) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;; + SystemZ) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; + *) { { echo "$as_me:$LINENO: error: Can not set target to build" >&5 +echo "$as_me: error: Can not set target to build" >&2;} + { (exit 1); exit 1; }; } ;; + esac ;; + *) { { echo "$as_me:$LINENO: error: Unrecognized target $a_target" >&5 +echo "$as_me: error: Unrecognized target $a_target" >&2;} + { (exit 1); exit 1; }; } ;; + esac + done + ;; +esac + +# Check whether --enable-experimental-targets was given. +if test "${enable_experimental_targets+set}" = set; then + enableval=$enable_experimental_targets; +else + enableval=disable +fi + + +if test ${enableval} != "disable" +then + TARGETS_TO_BUILD="$enableval $TARGETS_TO_BUILD" +fi + +TARGETS_TO_BUILD=$TARGETS_TO_BUILD + + +for a_target in $TARGETS_TO_BUILD; do + if test "$a_target" = "$LLVM_NATIVE_ARCH"; then + +cat >>confdefs.h <<_ACEOF +#define LLVM_NATIVE_ARCH $LLVM_NATIVE_ARCH +_ACEOF + + LLVM_NATIVE_TARGET="LLVMInitialize${LLVM_NATIVE_ARCH}Target" + LLVM_NATIVE_TARGETINFO="LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo" + LLVM_NATIVE_TARGETMC="LLVMInitialize${LLVM_NATIVE_ARCH}TargetMC" + LLVM_NATIVE_ASMPRINTER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter" + if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/Makefile ; then + LLVM_NATIVE_ASMPARSER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser" + fi + if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/Disassembler/Makefile ; then + LLVM_NATIVE_DISASSEMBLER="LLVMInitialize${LLVM_NATIVE_ARCH}Disassembler" + fi + +cat >>confdefs.h <<_ACEOF +#define LLVM_NATIVE_TARGET $LLVM_NATIVE_TARGET +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LLVM_NATIVE_TARGETINFO $LLVM_NATIVE_TARGETINFO +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LLVM_NATIVE_TARGETMC $LLVM_NATIVE_TARGETMC +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LLVM_NATIVE_ASMPRINTER $LLVM_NATIVE_ASMPRINTER +_ACEOF + + if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/Makefile ; then + +cat >>confdefs.h <<_ACEOF +#define LLVM_NATIVE_ASMPARSER $LLVM_NATIVE_ASMPARSER +_ACEOF + + fi + if test -f ${srcdir}/lib/Target/${LLVM_NATIVE_ARCH}/Disassembler/Makefile ; then + +cat >>confdefs.h <<_ACEOF +#define LLVM_NATIVE_DISASSEMBLER $LLVM_NATIVE_DISASSEMBLER +_ACEOF + + fi + fi +done + +LLVM_ENUM_TARGETS="" +LLVM_ENUM_ASM_PRINTERS="" +LLVM_ENUM_ASM_PARSERS="" +LLVM_ENUM_DISASSEMBLERS="" +for target_to_build in $TARGETS_TO_BUILD; do + LLVM_ENUM_TARGETS="LLVM_TARGET($target_to_build) $LLVM_ENUM_TARGETS" + if test -f ${srcdir}/lib/Target/${target_to_build}/*AsmPrinter.cpp ; then + LLVM_ENUM_ASM_PRINTERS="LLVM_ASM_PRINTER($target_to_build) $LLVM_ENUM_ASM_PRINTERS"; + fi + if test -f ${srcdir}/lib/Target/${target_to_build}/AsmParser/Makefile ; then + LLVM_ENUM_ASM_PARSERS="LLVM_ASM_PARSER($target_to_build) $LLVM_ENUM_ASM_PARSERS"; + fi + if test -f ${srcdir}/lib/Target/${target_to_build}/Disassembler/Makefile ; then + LLVM_ENUM_DISASSEMBLERS="LLVM_DISASSEMBLER($target_to_build) $LLVM_ENUM_DISASSEMBLERS"; + fi +done + + + + + + +# Check whether --with-optimize-option was given. +if test "${with_optimize_option+set}" = set; then + withval=$with_optimize_option; +else + withval=default +fi + +{ echo "$as_me:$LINENO: checking optimization flags" >&5 +echo $ECHO_N "checking optimization flags... $ECHO_C" >&6; } +case "$withval" in + default) + case "$llvm_cv_os_type" in + FreeBSD) optimize_option=-O2 ;; + MingW) optimize_option=-O2 ;; + *) optimize_option=-O3 ;; + esac ;; + *) optimize_option="$withval" ;; +esac +OPTIMIZE_OPTION=$optimize_option + +{ echo "$as_me:$LINENO: result: $optimize_option" >&5 +echo "${ECHO_T}$optimize_option" >&6; } + + +# Check whether --with-extra-options was given. +if test "${with_extra_options+set}" = set; then + withval=$with_extra_options; +else + withval=default +fi + +case "$withval" in + default) EXTRA_OPTIONS= ;; + *) EXTRA_OPTIONS=$withval ;; +esac +EXTRA_OPTIONS=$EXTRA_OPTIONS + + + +# Check whether --with-extra-ld-options was given. +if test "${with_extra_ld_options+set}" = set; then + withval=$with_extra_ld_options; +else + withval=default +fi + +case "$withval" in + default) EXTRA_LD_OPTIONS= ;; + *) EXTRA_LD_OPTIONS=$withval ;; +esac +EXTRA_LD_OPTIONS=$EXTRA_LD_OPTIONS + + +# Check whether --enable-bindings was given. +if test "${enable_bindings+set}" = set; then + enableval=$enable_bindings; +else + enableval=default +fi + +BINDINGS_TO_BUILD="" +case "$enableval" in + yes | default | auto) BINDINGS_TO_BUILD="auto" ;; + all ) BINDINGS_TO_BUILD="ocaml" ;; + none | no) BINDINGS_TO_BUILD="" ;; + *)for a_binding in `echo $enableval|sed -e 's/,/ /g' ` ; do + case "$a_binding" in + ocaml) BINDINGS_TO_BUILD="ocaml $BINDINGS_TO_BUILD" ;; + *) { { echo "$as_me:$LINENO: error: Unrecognized binding $a_binding" >&5 +echo "$as_me: error: Unrecognized binding $a_binding" >&2;} + { (exit 1); exit 1; }; } ;; + esac + done + ;; +esac + + +# Check whether --with-ocaml-libdir was given. +if test "${with_ocaml_libdir+set}" = set; then + withval=$with_ocaml_libdir; +else + withval=auto +fi + +case "$withval" in + auto) with_ocaml_libdir="$withval" ;; + /* | [A-Za-z]:[\\/]*) with_ocaml_libdir="$withval" ;; + *) { { echo "$as_me:$LINENO: error: Invalid path for --with-ocaml-libdir. Provide full path" >&5 +echo "$as_me: error: Invalid path for --with-ocaml-libdir. Provide full path" >&2;} + { (exit 1); exit 1; }; } ;; +esac + + +# Check whether --with-clang-srcdir was given. +if test "${with_clang_srcdir+set}" = set; then + withval=$with_clang_srcdir; +else + withval="-" +fi + +case "$withval" in + -) clang_src_root="" ;; + /* | [A-Za-z]:[\\/]*) clang_src_root="$withval" ;; + *) clang_src_root="$ac_pwd/$withval" ;; +esac +CLANG_SRC_ROOT=$clang_src_root + + + +# Check whether --with-clang-resource-dir was given. +if test "${with_clang_resource_dir+set}" = set; then + withval=$with_clang_resource_dir; +else + withval="" +fi + + +cat >>confdefs.h <<_ACEOF +#define CLANG_RESOURCE_DIR "$withval" +_ACEOF + + + +# Check whether --with-c-include-dirs was given. +if test "${with_c_include_dirs+set}" = set; then + withval=$with_c_include_dirs; +else + withval="" +fi + + +cat >>confdefs.h <<_ACEOF +#define C_INCLUDE_DIRS "$withval" +_ACEOF + + +# Clang normally uses the system c++ headers and libraries. With this option, +# clang will use the ones provided by a gcc installation instead. This option should +# be passed the same value that was used with --prefix when configuring gcc. + +# Check whether --with-gcc-toolchain was given. +if test "${with_gcc_toolchain+set}" = set; then + withval=$with_gcc_toolchain; +else + withval="" +fi + + +cat >>confdefs.h <<_ACEOF +#define GCC_INSTALL_PREFIX "$withval" +_ACEOF + + + +# Check whether --with-default-sysroot was given. +if test "${with_default_sysroot+set}" = set; then + withval=$with_default_sysroot; +else + withval="" +fi + + +cat >>confdefs.h <<_ACEOF +#define DEFAULT_SYSROOT "$withval" +_ACEOF + + + +# Check whether --with-binutils-include was given. +if test "${with_binutils_include+set}" = set; then + withval=$with_binutils_include; +else + withval=default +fi + +case "$withval" in + default) WITH_BINUTILS_INCDIR=default ;; + /* | [A-Za-z]:[\\/]*) WITH_BINUTILS_INCDIR=$withval ;; + *) { { echo "$as_me:$LINENO: error: Invalid path for --with-binutils-include. Provide full path" >&5 +echo "$as_me: error: Invalid path for --with-binutils-include. Provide full path" >&2;} + { (exit 1); exit 1; }; } ;; +esac +if test "x$WITH_BINUTILS_INCDIR" != xdefault ; then + BINUTILS_INCDIR=$WITH_BINUTILS_INCDIR + + if test ! -f "$WITH_BINUTILS_INCDIR/plugin-api.h"; then + echo "$WITH_BINUTILS_INCDIR/plugin-api.h" + { { echo "$as_me:$LINENO: error: Invalid path to directory containing plugin-api.h." >&5 +echo "$as_me: error: Invalid path to directory containing plugin-api.h." >&2;} + { (exit 1); exit 1; }; }; + fi +fi + + +# Check whether --with-bug-report-url was given. +if test "${with_bug_report_url+set}" = set; then + withval=$with_bug_report_url; +else + withval="http://llvm.org/bugs/" +fi + + +cat >>confdefs.h <<_ACEOF +#define BUG_REPORT_URL "$withval" +_ACEOF + + +# Check whether --enable-terminfo was given. +if test "${enable_terminfo+set}" = set; then + enableval=$enable_terminfo; case "$enableval" in + yes) llvm_cv_enable_terminfo="yes" ;; + no) llvm_cv_enable_terminfo="no" ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-terminfo. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-terminfo. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + llvm_cv_enable_terminfo="yes" +fi + + +# Check whether --enable-libffi was given. +if test "${enable_libffi+set}" = set; then + enableval=$enable_libffi; case "$enableval" in + yes) llvm_cv_enable_libffi="yes" ;; + no) llvm_cv_enable_libffi="no" ;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-libffi. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --enable-libffi. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + llvm_cv_enable_libffi=no +fi + + + +# Check whether --with-internal-prefix was given. +if test "${with_internal_prefix+set}" = set; then + withval=$with_internal_prefix; +else + withval="" +fi + +INTERNAL_PREFIX=$withval + + + +{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6; } +NM="$lt_cv_path_NM" + + + +{ echo "$as_me:$LINENO: checking for GNU make" >&5 +echo $ECHO_N "checking for GNU make... $ECHO_C" >&6; } +if test "${llvm_cv_gnu_make_command+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + llvm_cv_gnu_make_command='' + for a in "$MAKE" make gmake gnumake ; do + if test -z "$a" ; then continue ; fi ; + if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) + then + llvm_cv_gnu_make_command=$a ; + break; + fi + done +fi +{ echo "$as_me:$LINENO: result: $llvm_cv_gnu_make_command" >&5 +echo "${ECHO_T}$llvm_cv_gnu_make_command" >&6; } + if test "x$llvm_cv_gnu_make_command" != "x" ; then + ifGNUmake='' ; + else + ifGNUmake='#' ; + { echo "$as_me:$LINENO: result: \"Not found\"" >&5 +echo "${ECHO_T}\"Not found\"" >&6; }; + fi + + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + +# Extract the first word of "cmp", so it can be a program name with args. +set dummy cmp; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_CMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $CMP in + [\\/]* | ?:[\\/]*) + ac_cv_path_CMP="$CMP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_CMP" && ac_cv_path_CMP="cmp" + ;; +esac +fi +CMP=$ac_cv_path_CMP +if test -n "$CMP"; then + { echo "$as_me:$LINENO: result: $CMP" >&5 +echo "${ECHO_T}$CMP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "cp", so it can be a program name with args. +set dummy cp; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_CP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $CP in + [\\/]* | ?:[\\/]*) + ac_cv_path_CP="$CP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_CP" && ac_cv_path_CP="cp" + ;; +esac +fi +CP=$ac_cv_path_CP +if test -n "$CP"; then + { echo "$as_me:$LINENO: result: $CP" >&5 +echo "${ECHO_T}$CP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "date", so it can be a program name with args. +set dummy date; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_DATE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $DATE in + [\\/]* | ?:[\\/]*) + ac_cv_path_DATE="$DATE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_DATE" && ac_cv_path_DATE="date" + ;; +esac +fi +DATE=$ac_cv_path_DATE +if test -n "$DATE"; then + { echo "$as_me:$LINENO: result: $DATE" >&5 +echo "${ECHO_T}$DATE" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "find", so it can be a program name with args. +set dummy find; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_FIND+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $FIND in + [\\/]* | ?:[\\/]*) + ac_cv_path_FIND="$FIND" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_FIND" && ac_cv_path_FIND="find" + ;; +esac +fi +FIND=$ac_cv_path_FIND +if test -n "$FIND"; then + { echo "$as_me:$LINENO: result: $FIND" >&5 +echo "${ECHO_T}$FIND" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "grep", so it can be a program name with args. +set dummy grep; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GREP in + [\\/]* | ?:[\\/]*) + ac_cv_path_GREP="$GREP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GREP" && ac_cv_path_GREP="grep" + ;; +esac +fi +GREP=$ac_cv_path_GREP +if test -n "$GREP"; then + { echo "$as_me:$LINENO: result: $GREP" >&5 +echo "${ECHO_T}$GREP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "mkdir", so it can be a program name with args. +set dummy mkdir; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_MKDIR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MKDIR in + [\\/]* | ?:[\\/]*) + ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_MKDIR" && ac_cv_path_MKDIR="mkdir" + ;; +esac +fi +MKDIR=$ac_cv_path_MKDIR +if test -n "$MKDIR"; then + { echo "$as_me:$LINENO: result: $MKDIR" >&5 +echo "${ECHO_T}$MKDIR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "mv", so it can be a program name with args. +set dummy mv; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_MV+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MV in + [\\/]* | ?:[\\/]*) + ac_cv_path_MV="$MV" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_MV" && ac_cv_path_MV="mv" + ;; +esac +fi +MV=$ac_cv_path_MV +if test -n "$MV"; then + { echo "$as_me:$LINENO: result: $MV" >&5 +echo "${ECHO_T}$MV" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +# Extract the first word of "rm", so it can be a program name with args. +set dummy rm; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_RM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $RM in + [\\/]* | ?:[\\/]*) + ac_cv_path_RM="$RM" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_RM" && ac_cv_path_RM="rm" + ;; +esac +fi +RM=$ac_cv_path_RM +if test -n "$RM"; then + { echo "$as_me:$LINENO: result: $RM" >&5 +echo "${ECHO_T}$RM" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "sed", so it can be a program name with args. +set dummy sed; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $SED in + [\\/]* | ?:[\\/]*) + ac_cv_path_SED="$SED" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_SED" && ac_cv_path_SED="sed" + ;; +esac +fi +SED=$ac_cv_path_SED +if test -n "$SED"; then + { echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "tar", so it can be a program name with args. +set dummy tar; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_TAR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $TAR in + [\\/]* | ?:[\\/]*) + ac_cv_path_TAR="$TAR" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_TAR" && ac_cv_path_TAR="gtar" + ;; +esac +fi +TAR=$ac_cv_path_TAR +if test -n "$TAR"; then + { echo "$as_me:$LINENO: result: $TAR" >&5 +echo "${ECHO_T}$TAR" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "pwd", so it can be a program name with args. +set dummy pwd; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_BINPWD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $BINPWD in + [\\/]* | ?:[\\/]*) + ac_cv_path_BINPWD="$BINPWD" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_BINPWD="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_BINPWD" && ac_cv_path_BINPWD="pwd" + ;; +esac +fi +BINPWD=$ac_cv_path_BINPWD +if test -n "$BINPWD"; then + { echo "$as_me:$LINENO: result: $BINPWD" >&5 +echo "${ECHO_T}$BINPWD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + +# Extract the first word of "Graphviz", so it can be a program name with args. +set dummy Graphviz; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GRAPHVIZ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GRAPHVIZ in + [\\/]* | ?:[\\/]*) + ac_cv_path_GRAPHVIZ="$GRAPHVIZ" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GRAPHVIZ="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GRAPHVIZ" && ac_cv_path_GRAPHVIZ="echo Graphviz" + ;; +esac +fi +GRAPHVIZ=$ac_cv_path_GRAPHVIZ +if test -n "$GRAPHVIZ"; then + { echo "$as_me:$LINENO: result: $GRAPHVIZ" >&5 +echo "${ECHO_T}$GRAPHVIZ" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +if test "$GRAPHVIZ" != "echo Graphviz" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GRAPHVIZ 1 +_ACEOF + + if test "$llvm_cv_os_type" = "MingW" ; then + GRAPHVIZ=`echo $GRAPHVIZ | sed 's/^\/\([A-Za-z]\)\//\1:\//' ` + fi + +cat >>confdefs.h <<_ACEOF +#define LLVM_PATH_GRAPHVIZ "$GRAPHVIZ${EXEEXT}" +_ACEOF + +fi +# Extract the first word of "dot", so it can be a program name with args. +set dummy dot; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_DOT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $DOT in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOT="$DOT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_DOT" && ac_cv_path_DOT="echo dot" + ;; +esac +fi +DOT=$ac_cv_path_DOT +if test -n "$DOT"; then + { echo "$as_me:$LINENO: result: $DOT" >&5 +echo "${ECHO_T}$DOT" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +if test "$DOT" != "echo dot" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DOT 1 +_ACEOF + + if test "$llvm_cv_os_type" = "MingW" ; then + DOT=`echo $DOT | sed 's/^\/\([A-Za-z]\)\//\1:\//' ` + fi + +cat >>confdefs.h <<_ACEOF +#define LLVM_PATH_DOT "$DOT${EXEEXT}" +_ACEOF + +fi +# Extract the first word of "fdp", so it can be a program name with args. +set dummy fdp; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_FDP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $FDP in + [\\/]* | ?:[\\/]*) + ac_cv_path_FDP="$FDP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_FDP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_FDP" && ac_cv_path_FDP="echo fdp" + ;; +esac +fi +FDP=$ac_cv_path_FDP +if test -n "$FDP"; then + { echo "$as_me:$LINENO: result: $FDP" >&5 +echo "${ECHO_T}$FDP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +if test "$FDP" != "echo fdp" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FDP 1 +_ACEOF + + if test "$llvm_cv_os_type" = "MingW" ; then + FDP=`echo $FDP | sed 's/^\/\([A-Za-z]\)\//\1:\//' ` + fi + +cat >>confdefs.h <<_ACEOF +#define LLVM_PATH_FDP "$FDP${EXEEXT}" +_ACEOF + +fi +# Extract the first word of "neato", so it can be a program name with args. +set dummy neato; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_NEATO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $NEATO in + [\\/]* | ?:[\\/]*) + ac_cv_path_NEATO="$NEATO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_NEATO="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_NEATO" && ac_cv_path_NEATO="echo neato" + ;; +esac +fi +NEATO=$ac_cv_path_NEATO +if test -n "$NEATO"; then + { echo "$as_me:$LINENO: result: $NEATO" >&5 +echo "${ECHO_T}$NEATO" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +if test "$NEATO" != "echo neato" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NEATO 1 +_ACEOF + + if test "$llvm_cv_os_type" = "MingW" ; then + NEATO=`echo $NEATO | sed 's/^\/\([A-Za-z]\)\//\1:\//' ` + fi + +cat >>confdefs.h <<_ACEOF +#define LLVM_PATH_NEATO "$NEATO${EXEEXT}" +_ACEOF + +fi +# Extract the first word of "twopi", so it can be a program name with args. +set dummy twopi; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_TWOPI+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $TWOPI in + [\\/]* | ?:[\\/]*) + ac_cv_path_TWOPI="$TWOPI" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_TWOPI="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_TWOPI" && ac_cv_path_TWOPI="echo twopi" + ;; +esac +fi +TWOPI=$ac_cv_path_TWOPI +if test -n "$TWOPI"; then + { echo "$as_me:$LINENO: result: $TWOPI" >&5 +echo "${ECHO_T}$TWOPI" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +if test "$TWOPI" != "echo twopi" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TWOPI 1 +_ACEOF + + if test "$llvm_cv_os_type" = "MingW" ; then + TWOPI=`echo $TWOPI | sed 's/^\/\([A-Za-z]\)\//\1:\//' ` + fi + +cat >>confdefs.h <<_ACEOF +#define LLVM_PATH_TWOPI "$TWOPI${EXEEXT}" +_ACEOF + +fi +# Extract the first word of "circo", so it can be a program name with args. +set dummy circo; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_CIRCO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $CIRCO in + [\\/]* | ?:[\\/]*) + ac_cv_path_CIRCO="$CIRCO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_CIRCO="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_CIRCO" && ac_cv_path_CIRCO="echo circo" + ;; +esac +fi +CIRCO=$ac_cv_path_CIRCO +if test -n "$CIRCO"; then + { echo "$as_me:$LINENO: result: $CIRCO" >&5 +echo "${ECHO_T}$CIRCO" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +if test "$CIRCO" != "echo circo" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CIRCO 1 +_ACEOF + + if test "$llvm_cv_os_type" = "MingW" ; then + CIRCO=`echo $CIRCO | sed 's/^\/\([A-Za-z]\)\//\1:\//' ` + fi + +cat >>confdefs.h <<_ACEOF +#define LLVM_PATH_CIRCO "$CIRCO${EXEEXT}" +_ACEOF + +fi +for ac_prog in gv gsview32 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GV+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GV in + [\\/]* | ?:[\\/]*) + ac_cv_path_GV="$GV" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GV="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +GV=$ac_cv_path_GV +if test -n "$GV"; then + { echo "$as_me:$LINENO: result: $GV" >&5 +echo "${ECHO_T}$GV" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$GV" && break +done +test -n "$GV" || GV="echo gv" + +if test "$GV" != "echo gv" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GV 1 +_ACEOF + + if test "$llvm_cv_os_type" = "MingW" ; then + GV=`echo $GV | sed 's/^\/\([A-Za-z]\)\//\1:\//' ` + fi + +cat >>confdefs.h <<_ACEOF +#define LLVM_PATH_GV "$GV${EXEEXT}" +_ACEOF + +fi +# Extract the first word of "dotty", so it can be a program name with args. +set dummy dotty; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_DOTTY+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $DOTTY in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOTTY="$DOTTY" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DOTTY="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_DOTTY" && ac_cv_path_DOTTY="echo dotty" + ;; +esac +fi +DOTTY=$ac_cv_path_DOTTY +if test -n "$DOTTY"; then + { echo "$as_me:$LINENO: result: $DOTTY" >&5 +echo "${ECHO_T}$DOTTY" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +if test "$DOTTY" != "echo dotty" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DOTTY 1 +_ACEOF + + if test "$llvm_cv_os_type" = "MingW" ; then + DOTTY=`echo $DOTTY | sed 's/^\/\([A-Za-z]\)\//\1:\//' ` + fi + +cat >>confdefs.h <<_ACEOF +#define LLVM_PATH_DOTTY "$DOTTY${EXEEXT}" +_ACEOF + +fi +for ac_prog in xdot xdot.py +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_XDOT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $XDOT in + [\\/]* | ?:[\\/]*) + ac_cv_path_XDOT="$XDOT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_XDOT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +XDOT=$ac_cv_path_XDOT +if test -n "$XDOT"; then + { echo "$as_me:$LINENO: result: $XDOT" >&5 +echo "${ECHO_T}$XDOT" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$XDOT" && break +done +test -n "$XDOT" || XDOT="echo xdot" + +if test "$XDOT" != "echo xdot" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_XDOT 1 +_ACEOF + + if test "$llvm_cv_os_type" = "MingW" ; then + XDOT=`echo $XDOT | sed 's/^\/\([A-Za-z]\)\//\1:\//' ` + fi + +cat >>confdefs.h <<_ACEOF +#define LLVM_PATH_XDOT "$XDOT${EXEEXT}" +_ACEOF + +fi + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +case "$INSTALL" in + [\\/$]* | ?:[\\/]* ) ;; + *) INSTALL="\\\$(TOPSRCDIR)/$INSTALL" ;; +esac + +# Extract the first word of "bzip2", so it can be a program name with args. +set dummy bzip2; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_BZIP2+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $BZIP2 in + [\\/]* | ?:[\\/]*) + ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_BZIP2="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +BZIP2=$ac_cv_path_BZIP2 +if test -n "$BZIP2"; then + { echo "$as_me:$LINENO: result: $BZIP2" >&5 +echo "${ECHO_T}$BZIP2" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "cat", so it can be a program name with args. +set dummy cat; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_CAT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $CAT in + [\\/]* | ?:[\\/]*) + ac_cv_path_CAT="$CAT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +CAT=$ac_cv_path_CAT +if test -n "$CAT"; then + { echo "$as_me:$LINENO: result: $CAT" >&5 +echo "${ECHO_T}$CAT" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "doxygen", so it can be a program name with args. +set dummy doxygen; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_DOXYGEN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $DOXYGEN in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +DOXYGEN=$ac_cv_path_DOXYGEN +if test -n "$DOXYGEN"; then + { echo "$as_me:$LINENO: result: $DOXYGEN" >&5 +echo "${ECHO_T}$DOXYGEN" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "groff", so it can be a program name with args. +set dummy groff; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GROFF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GROFF in + [\\/]* | ?:[\\/]*) + ac_cv_path_GROFF="$GROFF" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +GROFF=$ac_cv_path_GROFF +if test -n "$GROFF"; then + { echo "$as_me:$LINENO: result: $GROFF" >&5 +echo "${ECHO_T}$GROFF" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "gzip", so it can be a program name with args. +set dummy gzip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GZIPBIN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GZIPBIN in + [\\/]* | ?:[\\/]*) + ac_cv_path_GZIPBIN="$GZIPBIN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GZIPBIN="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +GZIPBIN=$ac_cv_path_GZIPBIN +if test -n "$GZIPBIN"; then + { echo "$as_me:$LINENO: result: $GZIPBIN" >&5 +echo "${ECHO_T}$GZIPBIN" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "pdfroff", so it can be a program name with args. +set dummy pdfroff; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PDFROFF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PDFROFF in + [\\/]* | ?:[\\/]*) + ac_cv_path_PDFROFF="$PDFROFF" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PDFROFF="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PDFROFF=$ac_cv_path_PDFROFF +if test -n "$PDFROFF"; then + { echo "$as_me:$LINENO: result: $PDFROFF" >&5 +echo "${ECHO_T}$PDFROFF" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +# Extract the first word of "zip", so it can be a program name with args. +set dummy zip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ZIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ZIP in + [\\/]* | ?:[\\/]*) + ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +ZIP=$ac_cv_path_ZIP +if test -n "$ZIP"; then + { echo "$as_me:$LINENO: result: $ZIP" >&5 +echo "${ECHO_T}$ZIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +for ac_prog in ocamlc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_OCAMLC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $OCAMLC in + [\\/]* | ?:[\\/]*) + ac_cv_path_OCAMLC="$OCAMLC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_OCAMLC="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +OCAMLC=$ac_cv_path_OCAMLC +if test -n "$OCAMLC"; then + { echo "$as_me:$LINENO: result: $OCAMLC" >&5 +echo "${ECHO_T}$OCAMLC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$OCAMLC" && break +done + +for ac_prog in ocamlopt +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_OCAMLOPT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $OCAMLOPT in + [\\/]* | ?:[\\/]*) + ac_cv_path_OCAMLOPT="$OCAMLOPT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_OCAMLOPT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +OCAMLOPT=$ac_cv_path_OCAMLOPT +if test -n "$OCAMLOPT"; then + { echo "$as_me:$LINENO: result: $OCAMLOPT" >&5 +echo "${ECHO_T}$OCAMLOPT" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$OCAMLOPT" && break +done + +for ac_prog in ocamldep +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_OCAMLDEP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $OCAMLDEP in + [\\/]* | ?:[\\/]*) + ac_cv_path_OCAMLDEP="$OCAMLDEP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_OCAMLDEP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +OCAMLDEP=$ac_cv_path_OCAMLDEP +if test -n "$OCAMLDEP"; then + { echo "$as_me:$LINENO: result: $OCAMLDEP" >&5 +echo "${ECHO_T}$OCAMLDEP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$OCAMLDEP" && break +done + +for ac_prog in ocamldoc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_OCAMLDOC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $OCAMLDOC in + [\\/]* | ?:[\\/]*) + ac_cv_path_OCAMLDOC="$OCAMLDOC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_OCAMLDOC="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +OCAMLDOC=$ac_cv_path_OCAMLDOC +if test -n "$OCAMLDOC"; then + { echo "$as_me:$LINENO: result: $OCAMLDOC" >&5 +echo "${ECHO_T}$OCAMLDOC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$OCAMLDOC" && break +done + +for ac_prog in gas as +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GAS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GAS in + [\\/]* | ?:[\\/]*) + ac_cv_path_GAS="$GAS" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GAS="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +GAS=$ac_cv_path_GAS +if test -n "$GAS"; then + { echo "$as_me:$LINENO: result: $GAS" >&5 +echo "${ECHO_T}$GAS" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$GAS" && break +done + + +{ echo "$as_me:$LINENO: checking for linker version" >&5 +echo $ECHO_N "checking for linker version... $ECHO_C" >&6; } +if test "${llvm_cv_link_version+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + version_string="$(ld -v 2>&1 | head -1)" + + # Check for ld64. + if (echo "$version_string" | grep -q "ld64"); then + llvm_cv_link_version=$(echo "$version_string" | sed -e "s#.*ld64-\([^ ]*\)\( (.*)\)\{0,1\}#\1#") + else + llvm_cv_link_version=$(echo "$version_string" | sed -e "s#[^0-9]*\([0-9.]*\).*#\1#") + fi + +fi +{ echo "$as_me:$LINENO: result: $llvm_cv_link_version" >&5 +echo "${ECHO_T}$llvm_cv_link_version" >&6; } + +cat >>confdefs.h <<_ACEOF +#define HOST_LINK_VERSION "$llvm_cv_link_version" +_ACEOF + + + +{ echo "$as_me:$LINENO: checking for compiler -Wl,-R option" >&5 +echo $ECHO_N "checking for compiler -Wl,-R option... $ECHO_C" >&6; } +if test "${llvm_cv_link_use_r+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + oldcflags="$CFLAGS" + CFLAGS="$CFLAGS -Wl,-R." + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + llvm_cv_link_use_r=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + llvm_cv_link_use_r=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$oldcflags" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $llvm_cv_link_use_r" >&5 +echo "${ECHO_T}$llvm_cv_link_use_r" >&6; } +if test "$llvm_cv_link_use_r" = yes ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LINK_R 1 +_ACEOF + + fi + + +{ echo "$as_me:$LINENO: checking for compiler -rdynamic option" >&5 +echo $ECHO_N "checking for compiler -rdynamic option... $ECHO_C" >&6; } +if test "${llvm_cv_link_use_export_dynamic+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + oldcflags="$CFLAGS" + CFLAGS="$CFLAGS -rdynamic" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + llvm_cv_link_use_export_dynamic=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + llvm_cv_link_use_export_dynamic=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$oldcflags" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $llvm_cv_link_use_export_dynamic" >&5 +echo "${ECHO_T}$llvm_cv_link_use_export_dynamic" >&6; } +if test "$llvm_cv_link_use_export_dynamic" = yes ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LINK_EXPORT_DYNAMIC 1 +_ACEOF + + fi + + +{ echo "$as_me:$LINENO: checking for compiler -Wl,--version-script option" >&5 +echo $ECHO_N "checking for compiler -Wl,--version-script option... $ECHO_C" >&6; } +if test "${llvm_cv_link_use_version_script+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + oldcflags="$CFLAGS" + + # The following code is from the autoconf manual, + # "11.13: Limitations of Usual Tools". + # Create a temporary directory $tmp in $TMPDIR (default /tmp). + # Use mktemp if possible; otherwise fall back on mkdir, + # with $RANDOM to make collisions less likely. + : ${TMPDIR=/tmp} + { + tmp=` + (umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null + ` && + test -n "$tmp" && test -d "$tmp" + } || { + tmp=$TMPDIR/foo$$-$RANDOM + (umask 077 && mkdir "$tmp") + } || exit $? + + echo "{" > "$tmp/export.map" + echo " global: main;" >> "$tmp/export.map" + echo " local: *;" >> "$tmp/export.map" + echo "};" >> "$tmp/export.map" + + CFLAGS="$CFLAGS -Wl,--version-script=$tmp/export.map" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + llvm_cv_link_use_version_script=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + llvm_cv_link_use_version_script=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + rm "$tmp/export.map" + rmdir "$tmp" + CFLAGS="$oldcflags" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $llvm_cv_link_use_version_script" >&5 +echo "${ECHO_T}$llvm_cv_link_use_version_script" >&6; } +if test "$llvm_cv_link_use_version_script" = yes ; then + HAVE_LINK_VERSION_SCRIPT=1 + + fi + + + + +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset x; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *ccp; + char **p; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + ccp = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !x[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + + + + + + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include <$ac_hdr> + +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +else + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' x; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + + +for ac_header in dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +# Check whether --enable-ltdl-install was given. +if test "${enable_ltdl_install+set}" = set; then + enableval=$enable_ltdl_install; +fi + + + + +if test x"${enable_ltdl_install-no}" != xno; then + INSTALL_LTDL_TRUE= + INSTALL_LTDL_FALSE='#' +else + INSTALL_LTDL_TRUE='#' + INSTALL_LTDL_FALSE= +fi + + + +if test x"${enable_ltdl_convenience-no}" != xno; then + CONVENIENCE_LTDL_TRUE= + CONVENIENCE_LTDL_FALSE='#' +else + CONVENIENCE_LTDL_TRUE='#' + CONVENIENCE_LTDL_FALSE= +fi + + +{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='.dylib' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1.*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix3*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd* | bitrig*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + + +{ echo "$as_me:$LINENO: checking which extension is used for loadable modules" >&5 +echo $ECHO_N "checking which extension is used for loadable modules... $ECHO_C" >&6; } +if test "${libltdl_cv_shlibext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +module=yes +eval libltdl_cv_shlibext=$shrext_cmds + +fi +{ echo "$as_me:$LINENO: result: $libltdl_cv_shlibext" >&5 +echo "${ECHO_T}$libltdl_cv_shlibext" >&6; } +if test -n "$libltdl_cv_shlibext"; then + +cat >>confdefs.h <<_ACEOF +#define LTDL_SHLIB_EXT "$libltdl_cv_shlibext" +_ACEOF + +fi + + +{ echo "$as_me:$LINENO: checking for the default library search path" >&5 +echo $ECHO_N "checking for the default library search path... $ECHO_C" >&6; } +if test "${libltdl_cv_sys_search_path+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec" +fi +{ echo "$as_me:$LINENO: result: $libltdl_cv_sys_search_path" >&5 +echo "${ECHO_T}$libltdl_cv_sys_search_path" >&6; } +if test -n "$libltdl_cv_sys_search_path"; then + sys_search_path= + for dir in $libltdl_cv_sys_search_path; do + if test -z "$sys_search_path"; then + sys_search_path="$dir" + else + sys_search_path="$sys_search_path$PATH_SEPARATOR$dir" + fi + done + +cat >>confdefs.h <<_ACEOF +#define LTDL_SYSSEARCHPATH "$sys_search_path" +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } +if test "${libltdl_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + libltdl_cv_objdir="$objdir" + if test -n "$objdir"; then + : + else + rm -f .libs 2>/dev/null + mkdir .libs 2>/dev/null + if test -d .libs; then + libltdl_cv_objdir=.libs + else + # MS-DOS does not allow filenames that begin with a dot. + libltdl_cv_objdir=_libs + fi + rmdir .libs 2>/dev/null + fi + +fi +{ echo "$as_me:$LINENO: result: $libltdl_cv_objdir" >&5 +echo "${ECHO_T}$libltdl_cv_objdir" >&6; } + +cat >>confdefs.h <<_ACEOF +#define LTDL_OBJDIR "$libltdl_cv_objdir/" +_ACEOF + + + + + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris*) + symcode='[BDRT]' + ;; +sco3.2v5*) + symcode='[DT]' + ;; +sysv4.2uw2*) + symcode='[DT]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[ABDT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6; } +else + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } +fi + + +{ echo "$as_me:$LINENO: checking whether libtool supports -dlopen/-dlpreopen" >&5 +echo $ECHO_N "checking whether libtool supports -dlopen/-dlpreopen... $ECHO_C" >&6; } +if test "${libltdl_cv_preloaded_symbols+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$lt_cv_sys_global_symbol_pipe"; then + libltdl_cv_preloaded_symbols=yes + else + libltdl_cv_preloaded_symbols=no + fi + +fi +{ echo "$as_me:$LINENO: result: $libltdl_cv_preloaded_symbols" >&5 +echo "${ECHO_T}$libltdl_cv_preloaded_symbols" >&6; } +if test x"$libltdl_cv_preloaded_symbols" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PRELOADED_SYMBOLS 1 +_ACEOF + +fi + +LIBADD_DL= + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shl_load || defined __stub___shl_load +choke me +#endif + +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } +if test $ac_cv_func_shl_load = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHL_LOAD 1 +_ACEOF + +else + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_shl_load=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } +if test $ac_cv_lib_dld_shl_load = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SHL_LOAD 1 +_ACEOF + + LIBADD_DL="$LIBADD_DL -ldld" +else + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } +if test $ac_cv_lib_dl_dlopen = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBDL 1 +_ACEOF + + LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#if HAVE_DLFCN_H +# include +#endif + +int +main () +{ +dlopen(0, 0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBDL 1 +_ACEOF + libltdl_cv_func_dlopen="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_svld_dlopen=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } +if test $ac_cv_lib_svld_dlopen = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBDL 1 +_ACEOF + + LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes" +else + { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dld_dld_link=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } +if test $ac_cv_lib_dld_dld_link = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DLD 1 +_ACEOF + + LIBADD_DL="$LIBADD_DL -ldld" +else + { echo "$as_me:$LINENO: checking for _dyld_func_lookup" >&5 +echo $ECHO_N "checking for _dyld_func_lookup... $ECHO_C" >&6; } +if test "${ac_cv_func__dyld_func_lookup+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define _dyld_func_lookup to an innocuous variant, in case declares _dyld_func_lookup. + For example, HP-UX 11i declares gettimeofday. */ +#define _dyld_func_lookup innocuous__dyld_func_lookup + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char _dyld_func_lookup (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef _dyld_func_lookup + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char _dyld_func_lookup (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub__dyld_func_lookup || defined __stub____dyld_func_lookup +choke me +#endif + +int +main () +{ +return _dyld_func_lookup (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func__dyld_func_lookup=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func__dyld_func_lookup=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func__dyld_func_lookup" >&5 +echo "${ECHO_T}$ac_cv_func__dyld_func_lookup" >&6; } +if test $ac_cv_func__dyld_func_lookup = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DYLD 1 +_ACEOF + +fi + + +fi + + +fi + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi + + +fi + + +fi + + +if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes +then + lt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBADD_DL" + +for ac_func in dlerror +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + LIBS="$lt_save_LIBS" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +{ echo "$as_me:$LINENO: checking for _ prefix in compiled symbols" >&5 +echo $ECHO_N "checking for _ prefix in compiled symbols... $ECHO_C" >&6; } +if test "${ac_cv_sys_symbol_underscore+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_sys_symbol_underscore=no + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + ac_nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$ac_nlist"; then + # See whether the symbols have a leading underscore. + if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then + ac_cv_sys_symbol_underscore=yes + else + if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then + : + else + echo "configure: cannot find nm_test_func in $ac_nlist" >&5 + fi + fi + else + echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "configure: failed program was:" >&5 + cat conftest.c >&5 + fi + rm -rf conftest* + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_symbol_underscore" >&5 +echo "${ECHO_T}$ac_cv_sys_symbol_underscore" >&6; } + + +if test x"$ac_cv_sys_symbol_underscore" = xyes; then + if test x"$libltdl_cv_func_dlopen" = xyes || + test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then + { echo "$as_me:$LINENO: checking whether we have to add an underscore for dlsym" >&5 +echo $ECHO_N "checking whether we have to add an underscore for dlsym... $ECHO_C" >&6; } +if test "${libltdl_cv_need_uscore+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + libltdl_cv_need_uscore=unknown + save_LIBS="$LIBS" + LIBS="$LIBS $LIBADD_DL" + if test "$cross_compiling" = yes; then : + libltdl_cv_need_uscore=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) libltdl_cv_need_uscore=no ;; + x$lt_dlneed_uscore) libltdl_cv_need_uscore=yes ;; + x$lt_dlunknown|x*) ;; + esac + else : + # compilation failed + + fi +fi +rm -fr conftest* + + LIBS="$save_LIBS" + +fi +{ echo "$as_me:$LINENO: result: $libltdl_cv_need_uscore" >&5 +echo "${ECHO_T}$libltdl_cv_need_uscore" >&6; } + fi +fi + +if test x"$libltdl_cv_need_uscore" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define NEED_USCORE 1 +_ACEOF + +fi + + +{ echo "$as_me:$LINENO: checking whether deplibs are loaded by dlopen" >&5 +echo $ECHO_N "checking whether deplibs are loaded by dlopen... $ECHO_C" >&6; } +if test "${libltdl_cv_sys_dlopen_deplibs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # PORTME does your system automatically load deplibs for dlopen? + # or its logical equivalent (e.g. shl_load for HP-UX < 11) + # For now, we just catch OSes we know something about -- in the + # future, we'll try test this programmatically. + libltdl_cv_sys_dlopen_deplibs=unknown + case "$host_os" in + aix3*|aix4.1.*|aix4.2.*) + # Unknown whether this is true for these versions of AIX, but + # we want this `case' here to explicitly catch those versions. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + aix[45]*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + darwin*) + # Assuming the user has installed a libdl from somewhere, this is true + # If you are looking for one http://www.opendarwin.org/projects/dlcompat + libltdl_cv_sys_dlopen_deplibs=yes + ;; + gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) + # GNU and its variants, using gnu ld.so (Glibc) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + hpux10*|hpux11*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + interix*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + irix[12345]*|irix6.[01]*) + # Catch all versions of IRIX before 6.2, and indicate that we don't + # know how it worked for any of those versions. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + irix*) + # The case above catches anything before 6.2, and it's known that + # at 6.2 and later dlopen does load deplibs. + libltdl_cv_sys_dlopen_deplibs=yes + ;; + netbsd*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + openbsd*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + osf[1234]*) + # dlopen did load deplibs (at least at 4.x), but until the 5.x series, + # it did *not* use an RPATH in a shared library to find objects the + # library depends on, so we explicitly say `no'. + libltdl_cv_sys_dlopen_deplibs=no + ;; + osf5.0|osf5.0a|osf5.1) + # dlopen *does* load deplibs and with the right loader patch applied + # it even uses RPATH in a shared library to search for shared objects + # that the library depends on, but there's no easy way to know if that + # patch is installed. Since this is the case, all we can really + # say is unknown -- it depends on the patch being installed. If + # it is, this changes to `yes'. Without it, it would be `no'. + libltdl_cv_sys_dlopen_deplibs=unknown + ;; + osf*) + # the two cases above should catch all versions of osf <= 5.1. Read + # the comments above for what we know about them. + # At > 5.1, deplibs are loaded *and* any RPATH in a shared library + # is used to find them so we can finally say `yes'. + libltdl_cv_sys_dlopen_deplibs=yes + ;; + solaris*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + esac + +fi +{ echo "$as_me:$LINENO: result: $libltdl_cv_sys_dlopen_deplibs" >&5 +echo "${ECHO_T}$libltdl_cv_sys_dlopen_deplibs" >&6; } +if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then + +cat >>confdefs.h <<\_ACEOF +#define LTDL_DLOPEN_DEPLIBS 1 +_ACEOF + +fi + + +for ac_header in argz.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +{ echo "$as_me:$LINENO: checking for error_t" >&5 +echo $ECHO_N "checking for error_t... $ECHO_C" >&6; } +if test "${ac_cv_type_error_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#if HAVE_ARGZ_H +# include +#endif + +typedef error_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_error_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_error_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_error_t" >&5 +echo "${ECHO_T}$ac_cv_type_error_t" >&6; } +if test $ac_cv_type_error_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_ERROR_T 1 +_ACEOF + + +else + +cat >>confdefs.h <<\_ACEOF +#define error_t int +_ACEOF + +fi + + + + + + + +for ac_func in argz_append argz_create_sep argz_insert argz_next argz_stringify +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + + + + + + + + + + + + + + + + + + +for ac_header in errno.h malloc.h memory.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in mach-o/dyld.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + +for ac_func in closedir opendir readdir +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + +{ echo "$as_me:$LINENO: checking tool compatibility" >&5 +echo $ECHO_N "checking tool compatibility... $ECHO_C" >&6; } + +ICC=no +IXX=no +case $CC in + icc*|icpc*) + ICC=yes + IXX=yes + ;; + *) + ;; +esac + +if test "$GCC" != "yes" && test "$ICC" != "yes" +then + { { echo "$as_me:$LINENO: error: gcc|icc required but not found" >&5 +echo "$as_me: error: gcc|icc required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + +if test "$GXX" != "yes" && test "$IXX" != "yes" +then + { { echo "$as_me:$LINENO: error: g++|clang++|icc required but not found" >&5 +echo "$as_me: error: g++|clang++|icc required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + +if test "$GCC" = "yes" +then + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #if !defined(__GNUC__) || __GNUC__ < 3 + #error Unsupported GCC version + #endif + + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { { echo "$as_me:$LINENO: error: gcc 3.x required, but you have a lower version" >&5 +echo "$as_me: error: gcc 3.x required, but you have a lower version" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +if test -z "$llvm_cv_gnu_make_command" +then + { { echo "$as_me:$LINENO: error: GNU Make required but not found" >&5 +echo "$as_me: error: GNU Make required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + +{ echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } + +{ echo "$as_me:$LINENO: checking optional compiler flags" >&5 +echo $ECHO_N "checking optional compiler flags... $ECHO_C" >&6; } +NO_VARIADIC_MACROS=`$CXX -Werror -Wvariadic-macros -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-variadic-macros` + +NO_MISSING_FIELD_INITIALIZERS=`$CXX -Werror -Wmissing-field-initializers -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-missing-field-initializers` + +COVERED_SWITCH_DEFAULT=`$CXX -Werror -Wcovered-switch-default -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wcovered-switch-default` + + +NO_UNINITIALIZED= +NO_MAYBE_UNINITIALIZED= +if test "$GXX" = "yes" +then + NO_MAYBE_UNINITIALIZED=`$CXX -Werror -Wmaybe-uninitialized -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-maybe-uninitialized` + + if test -z "$NO_MAYBE_UNINITIALIZED" + then + NO_UNINITIALIZED=`$CXX -Werror -Wuninitialized -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-uninitialized` + + fi +fi +{ echo "$as_me:$LINENO: result: $NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS $COVERED_SWITCH_DEFAULT $NO_UNINITIALIZED $NO_MAYBE_UNINITIALIZED" >&5 +echo "${ECHO_T}$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS $COVERED_SWITCH_DEFAULT $NO_UNINITIALIZED $NO_MAYBE_UNINITIALIZED" >&6; } + + +# Check whether --with-python was given. +if test "${with_python+set}" = set; then + withval=$with_python; PYTHON="$withval" +fi + + +if test -n "$PYTHON" && test -x "$PYTHON" ; then + { echo "$as_me:$LINENO: checking for python" >&5 +echo $ECHO_N "checking for python... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: result: user defined: $with_python" >&5 +echo "${ECHO_T}user defined: $with_python" >&6; } +else + if test -n "$PYTHON" ; then + { echo "$as_me:$LINENO: WARNING: specified python ($PYTHON) is not usable, searching path" >&5 +echo "$as_me: WARNING: specified python ($PYTHON) is not usable, searching path" >&2;} + fi + + # Extract the first word of "python python2 python26", so it can be a program name with args. +set dummy python python2 python26; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PYTHON+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON="{ echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6; } + { { echo "$as_me:$LINENO: error: could not find python 2.5 or higher" >&5 +echo "$as_me: error: could not find python 2.5 or higher" >&2;} + { (exit 1); exit 1; }; }" + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { echo "$as_me:$LINENO: result: $PYTHON" >&5 +echo "${ECHO_T}$PYTHON" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi + +{ echo "$as_me:$LINENO: checking for python >= 2.5" >&5 +echo $ECHO_N "checking for python >= 2.5... $ECHO_C" >&6; } +ac_python_version=`$PYTHON -V 2>&1 | cut -d' ' -f2` +ac_python_version_major=`echo $ac_python_version | cut -d'.' -f1` +ac_python_version_minor=`echo $ac_python_version | cut -d'.' -f2` +ac_python_version_patch=`echo $ac_python_version | cut -d'.' -f3` +if test "$ac_python_version_major" -gt "2" || \ + (test "$ac_python_version_major" -eq "2" && \ + test "$ac_python_version_minor" -ge "5") ; then + { echo "$as_me:$LINENO: result: $PYTHON ($ac_python_version)" >&5 +echo "${ECHO_T}$PYTHON ($ac_python_version)" >&6; } +else + { echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6; } + { { echo "$as_me:$LINENO: error: found python $ac_python_version ($PYTHON); required >= 2.5 +See \`config.log' for more details." >&5 +echo "$as_me: error: found python $ac_python_version ($PYTHON); required >= 2.5 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + + + +{ echo "$as_me:$LINENO: checking for sin in -lm" >&5 +echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6; } +if test "${ac_cv_lib_m_sin+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sin (); +int +main () +{ +return sin (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_m_sin=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_m_sin=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5 +echo "${ECHO_T}$ac_cv_lib_m_sin" >&6; } +if test $ac_cv_lib_m_sin = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi + +if test "$llvm_cv_os_type" = "MingW" ; then + +{ echo "$as_me:$LINENO: checking for main in -limagehlp" >&5 +echo $ECHO_N "checking for main in -limagehlp... $ECHO_C" >&6; } +if test "${ac_cv_lib_imagehlp_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-limagehlp $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_imagehlp_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_imagehlp_main=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_imagehlp_main" >&5 +echo "${ECHO_T}$ac_cv_lib_imagehlp_main" >&6; } +if test $ac_cv_lib_imagehlp_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBIMAGEHLP 1 +_ACEOF + + LIBS="-limagehlp $LIBS" + +fi + + +{ echo "$as_me:$LINENO: checking for main in -lpsapi" >&5 +echo $ECHO_N "checking for main in -lpsapi... $ECHO_C" >&6; } +if test "${ac_cv_lib_psapi_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpsapi $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_psapi_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_psapi_main=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_psapi_main" >&5 +echo "${ECHO_T}$ac_cv_lib_psapi_main" >&6; } +if test $ac_cv_lib_psapi_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPSAPI 1 +_ACEOF + + LIBS="-lpsapi $LIBS" + +fi + + +{ echo "$as_me:$LINENO: checking for main in -lshell32" >&5 +echo $ECHO_N "checking for main in -lshell32... $ECHO_C" >&6; } +if test "${ac_cv_lib_shell32_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lshell32 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_shell32_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_shell32_main=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_shell32_main" >&5 +echo "${ECHO_T}$ac_cv_lib_shell32_main" >&6; } +if test $ac_cv_lib_shell32_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSHELL32 1 +_ACEOF + + LIBS="-lshell32 $LIBS" + +fi + +fi + +{ echo "$as_me:$LINENO: checking for library containing dlopen" >&5 +echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6; } +if test "${ac_cv_search_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_dlopen=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_dlopen+set}" = set; then + break +fi +done +if test "${ac_cv_search_dlopen+set}" = set; then + : +else + ac_cv_search_dlopen=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5 +echo "${ECHO_T}$ac_cv_search_dlopen" >&6; } +ac_res=$ac_cv_search_dlopen +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DLOPEN 1 +_ACEOF + +else + { echo "$as_me:$LINENO: WARNING: dlopen() not found - disabling plugin support" >&5 +echo "$as_me: WARNING: dlopen() not found - disabling plugin support" >&2;} +fi + + +{ echo "$as_me:$LINENO: checking for library containing clock_gettime" >&5 +echo $ECHO_N "checking for library containing clock_gettime... $ECHO_C" >&6; } +if test "${ac_cv_search_clock_gettime+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (); +int +main () +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rt; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_clock_gettime=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_clock_gettime+set}" = set; then + break +fi +done +if test "${ac_cv_search_clock_gettime+set}" = set; then + : +else + ac_cv_search_clock_gettime=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettime" >&5 +echo "${ECHO_T}$ac_cv_search_clock_gettime" >&6; } +ac_res=$ac_cv_search_clock_gettime +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + +if test "$llvm_cv_enable_terminfo" = "yes" ; then + { echo "$as_me:$LINENO: checking for library containing setupterm" >&5 +echo $ECHO_N "checking for library containing setupterm... $ECHO_C" >&6; } +if test "${ac_cv_search_setupterm+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char setupterm (); +int +main () +{ +return setupterm (); + ; + return 0; +} +_ACEOF +for ac_lib in '' tinfo terminfo curses ncurses ncursesw; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_setupterm=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_setupterm+set}" = set; then + break +fi +done +if test "${ac_cv_search_setupterm+set}" = set; then + : +else + ac_cv_search_setupterm=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_setupterm" >&5 +echo "${ECHO_T}$ac_cv_search_setupterm" >&6; } +ac_res=$ac_cv_search_setupterm +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TERMINFO 1 +_ACEOF + +fi + +fi + +if test "$llvm_cv_enable_libffi" = "yes" ; then + { echo "$as_me:$LINENO: checking for library containing ffi_call" >&5 +echo $ECHO_N "checking for library containing ffi_call... $ECHO_C" >&6; } +if test "${ac_cv_search_ffi_call+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ffi_call (); +int +main () +{ +return ffi_call (); + ; + return 0; +} +_ACEOF +for ac_lib in '' ffi; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_ffi_call=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_ffi_call+set}" = set; then + break +fi +done +if test "${ac_cv_search_ffi_call+set}" = set; then + : +else + ac_cv_search_ffi_call=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_ffi_call" >&5 +echo "${ECHO_T}$ac_cv_search_ffi_call" >&6; } +ac_res=$ac_cv_search_ffi_call +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FFI_CALL 1 +_ACEOF + +else + { { echo "$as_me:$LINENO: error: libffi not found - configure without --enable-libffi to compile without it" >&5 +echo "$as_me: error: libffi not found - configure without --enable-libffi to compile without it" >&2;} + { (exit 1); exit 1; }; } +fi + +fi + +{ echo "$as_me:$LINENO: checking for library containing mallinfo" >&5 +echo $ECHO_N "checking for library containing mallinfo... $ECHO_C" >&6; } +if test "${ac_cv_search_mallinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char mallinfo (); +int +main () +{ +return mallinfo (); + ; + return 0; +} +_ACEOF +for ac_lib in '' malloc; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_mallinfo=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_mallinfo+set}" = set; then + break +fi +done +if test "${ac_cv_search_mallinfo+set}" = set; then + : +else + ac_cv_search_mallinfo=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_mallinfo" >&5 +echo "${ECHO_T}$ac_cv_search_mallinfo" >&6; } +ac_res=$ac_cv_search_mallinfo +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MALLINFO 1 +_ACEOF + +fi + + +if test "$LLVM_ENABLE_THREADS" -eq 1 && test "$ENABLE_PTHREADS" -eq 1 ; then + +{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 +echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } +if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_mutex_init (); +int +main () +{ +return pthread_mutex_init (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_pthread_pthread_mutex_init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_pthread_pthread_mutex_init=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; } +if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPTHREAD 1 +_ACEOF + + LIBS="-lpthread $LIBS" + +fi + + { echo "$as_me:$LINENO: checking for library containing pthread_mutex_lock" >&5 +echo $ECHO_N "checking for library containing pthread_mutex_lock... $ECHO_C" >&6; } +if test "${ac_cv_search_pthread_mutex_lock+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_mutex_lock (); +int +main () +{ +return pthread_mutex_lock (); + ; + return 0; +} +_ACEOF +for ac_lib in '' pthread; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_pthread_mutex_lock=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_pthread_mutex_lock+set}" = set; then + break +fi +done +if test "${ac_cv_search_pthread_mutex_lock+set}" = set; then + : +else + ac_cv_search_pthread_mutex_lock=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_pthread_mutex_lock" >&5 +echo "${ECHO_T}$ac_cv_search_pthread_mutex_lock" >&6; } +ac_res=$ac_cv_search_pthread_mutex_lock +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PTHREAD_MUTEX_LOCK 1 +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for library containing pthread_rwlock_init" >&5 +echo $ECHO_N "checking for library containing pthread_rwlock_init... $ECHO_C" >&6; } +if test "${ac_cv_search_pthread_rwlock_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_rwlock_init (); +int +main () +{ +return pthread_rwlock_init (); + ; + return 0; +} +_ACEOF +for ac_lib in '' pthread; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_pthread_rwlock_init=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_pthread_rwlock_init+set}" = set; then + break +fi +done +if test "${ac_cv_search_pthread_rwlock_init+set}" = set; then + : +else + ac_cv_search_pthread_rwlock_init=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_pthread_rwlock_init" >&5 +echo "${ECHO_T}$ac_cv_search_pthread_rwlock_init" >&6; } +ac_res=$ac_cv_search_pthread_rwlock_init +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PTHREAD_RWLOCK_INIT 1 +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for library containing pthread_getspecific" >&5 +echo $ECHO_N "checking for library containing pthread_getspecific... $ECHO_C" >&6; } +if test "${ac_cv_search_pthread_getspecific+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_getspecific (); +int +main () +{ +return pthread_getspecific (); + ; + return 0; +} +_ACEOF +for ac_lib in '' pthread; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_pthread_getspecific=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_pthread_getspecific+set}" = set; then + break +fi +done +if test "${ac_cv_search_pthread_getspecific+set}" = set; then + : +else + ac_cv_search_pthread_getspecific=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_pthread_getspecific" >&5 +echo "${ECHO_T}$ac_cv_search_pthread_getspecific" >&6; } +ac_res=$ac_cv_search_pthread_getspecific +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PTHREAD_GETSPECIFIC 1 +_ACEOF + +fi + +fi + +if test "$LLVM_ENABLE_ZLIB" -eq 1 ; then + +{ echo "$as_me:$LINENO: checking for compress2 in -lz" >&5 +echo $ECHO_N "checking for compress2 in -lz... $ECHO_C" >&6; } +if test "${ac_cv_lib_z_compress2+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char compress2 (); +int +main () +{ +return compress2 (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_z_compress2=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_z_compress2=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress2" >&5 +echo "${ECHO_T}$ac_cv_lib_z_compress2" >&6; } +if test $ac_cv_lib_z_compress2 = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + LIBS="-lz $LIBS" + +fi + +fi + + +# Check whether --with-udis86 was given. +if test "${with_udis86+set}" = set; then + withval=$with_udis86; + USE_UDIS86=1 + + case "$withval" in + /usr/lib|yes) ;; + *) LDFLAGS="$LDFLAGS -L${withval}" ;; + esac + +{ echo "$as_me:$LINENO: checking for ud_init in -ludis86" >&5 +echo $ECHO_N "checking for ud_init in -ludis86... $ECHO_C" >&6; } +if test "${ac_cv_lib_udis86_ud_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ludis86 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ud_init (); +int +main () +{ +return ud_init (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_udis86_ud_init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_udis86_ud_init=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_udis86_ud_init" >&5 +echo "${ECHO_T}$ac_cv_lib_udis86_ud_init" >&6; } +if test $ac_cv_lib_udis86_ud_init = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBUDIS86 1 +_ACEOF + + LIBS="-ludis86 $LIBS" + +else + + echo "Error! You need to have libudis86 around." + exit -1 + +fi + + +else + USE_UDIS86=0 + +fi + + +cat >>confdefs.h <<_ACEOF +#define USE_UDIS86 $USE_UDIS86 +_ACEOF + + + +# Check whether --with-oprofile was given. +if test "${with_oprofile+set}" = set; then + withval=$with_oprofile; + USE_OPROFILE=1 + + case "$withval" in + /usr|yes) llvm_cv_oppath=/usr/lib/oprofile ;; + no) llvm_cv_oppath= + USE_OPROFILE=0 + ;; + *) llvm_cv_oppath="${withval}/lib/oprofile" + CPPFLAGS="-I${withval}/include";; + esac + case $llvm_cv_os_type in + Linux) + if test -n "$llvm_cv_oppath" ; then + LIBS="$LIBS -lopagent -L${llvm_cv_oppath} -Wl,-rpath,${llvm_cv_oppath}" + { echo "$as_me:$LINENO: checking for library containing bfd_init" >&5 +echo $ECHO_N "checking for library containing bfd_init... $ECHO_C" >&6; } +if test "${ac_cv_search_bfd_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char bfd_init (); +int +main () +{ +return bfd_init (); + ; + return 0; +} +_ACEOF +for ac_lib in '' bfd; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_bfd_init=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_bfd_init+set}" = set; then + break +fi +done +if test "${ac_cv_search_bfd_init+set}" = set; then + : +else + ac_cv_search_bfd_init=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_bfd_init" >&5 +echo "${ECHO_T}$ac_cv_search_bfd_init" >&6; } +ac_res=$ac_cv_search_bfd_init +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + { echo "$as_me:$LINENO: checking for library containing op_open_agent" >&5 +echo $ECHO_N "checking for library containing op_open_agent... $ECHO_C" >&6; } +if test "${ac_cv_search_op_open_agent+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char op_open_agent (); +int +main () +{ +return op_open_agent (); + ; + return 0; +} +_ACEOF +for ac_lib in '' opagent; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_op_open_agent=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_op_open_agent+set}" = set; then + break +fi +done +if test "${ac_cv_search_op_open_agent+set}" = set; then + : +else + ac_cv_search_op_open_agent=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_op_open_agent" >&5 +echo "${ECHO_T}$ac_cv_search_op_open_agent" >&6; } +ac_res=$ac_cv_search_op_open_agent +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + + echo "Error! You need to have libopagent around." + exit -1 + +fi + + if test "${ac_cv_header_opagent_h+set}" = set; then + { echo "$as_me:$LINENO: checking for opagent.h" >&5 +echo $ECHO_N "checking for opagent.h... $ECHO_C" >&6; } +if test "${ac_cv_header_opagent_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_opagent_h" >&5 +echo "${ECHO_T}$ac_cv_header_opagent_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking opagent.h usability" >&5 +echo $ECHO_N "checking opagent.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking opagent.h presence" >&5 +echo $ECHO_N "checking opagent.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: opagent.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: opagent.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: opagent.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: opagent.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: opagent.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: opagent.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: opagent.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: opagent.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: opagent.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: opagent.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: opagent.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: opagent.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: opagent.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: opagent.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: opagent.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: opagent.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for opagent.h" >&5 +echo $ECHO_N "checking for opagent.h... $ECHO_C" >&6; } +if test "${ac_cv_header_opagent_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_opagent_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_opagent_h" >&5 +echo "${ECHO_T}$ac_cv_header_opagent_h" >&6; } + +fi +if test $ac_cv_header_opagent_h = yes; then + : +else + + echo "Error! You need to have opagent.h around." + exit -1 + +fi + + + fi ;; + *) + { { echo "$as_me:$LINENO: error: OProfile support is available on Linux only." >&5 +echo "$as_me: error: OProfile support is available on Linux only." >&2;} + { (exit 1); exit 1; }; } ;; + esac + +else + + USE_OPROFILE=0 + + +fi + + +cat >>confdefs.h <<_ACEOF +#define LLVM_USE_OPROFILE $USE_OPROFILE +_ACEOF + + + +# Check whether --with-intel-jitevents was given. +if test "${with_intel_jitevents+set}" = set; then + withval=$with_intel_jitevents; + case "$withval" in + yes) USE_INTEL_JITEVENTS=1 +;; + no) USE_INTEL_JITEVENTS=0 +;; + *) { { echo "$as_me:$LINENO: error: Invalid setting for --with-intel-jitevents. Use \"yes\" or \"no\"" >&5 +echo "$as_me: error: Invalid setting for --with-intel-jitevents. Use \"yes\" or \"no\"" >&2;} + { (exit 1); exit 1; }; };; + esac + + case $llvm_cv_os_type in + Linux|Win32|Cygwin|MingW) ;; + *) { { echo "$as_me:$LINENO: error: Intel JIT API support is available on Linux and Windows only." >&5 +echo "$as_me: error: Intel JIT API support is available on Linux and Windows only." >&2;} + { (exit 1); exit 1; }; };; + esac + + case "$llvm_cv_target_arch" in + x86|x86_64) ;; + *) { { echo "$as_me:$LINENO: error: Target architecture $llvm_cv_target_arch does not support Intel JIT Events API." >&5 +echo "$as_me: error: Target architecture $llvm_cv_target_arch does not support Intel JIT Events API." >&2;} + { (exit 1); exit 1; }; };; + esac + +else + + USE_INTEL_JITEVENTS=0 + + +fi + + +cat >>confdefs.h <<_ACEOF +#define LLVM_USE_INTEL_JITEVENTS $USE_INTEL_JITEVENTS +_ACEOF + + +for ac_prog in xml2-config +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_XML2CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$XML2CONFIG"; then + ac_cv_prog_XML2CONFIG="$XML2CONFIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_XML2CONFIG="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +XML2CONFIG=$ac_cv_prog_XML2CONFIG +if test -n "$XML2CONFIG"; then + { echo "$as_me:$LINENO: result: $XML2CONFIG" >&5 +echo "${ECHO_T}$XML2CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$XML2CONFIG" && break +done + + +{ echo "$as_me:$LINENO: checking for libxml2 includes" >&5 +echo $ECHO_N "checking for libxml2 includes... $ECHO_C" >&6; } +if test "x$XML2CONFIG" = "x"; then + { echo "$as_me:$LINENO: result: xml2-config not found" >&5 +echo "${ECHO_T}xml2-config not found" >&6; } +else + LIBXML2_INC=`$XML2CONFIG --cflags` + { echo "$as_me:$LINENO: result: $LIBXML2_INC" >&5 +echo "${ECHO_T}$LIBXML2_INC" >&6; } + { echo "$as_me:$LINENO: checking for xmlReadFile in -lxml2" >&5 +echo $ECHO_N "checking for xmlReadFile in -lxml2... $ECHO_C" >&6; } +if test "${ac_cv_lib_xml2_xmlReadFile+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lxml2 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char xmlReadFile (); +int +main () +{ +return xmlReadFile (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_xml2_xmlReadFile=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_xml2_xmlReadFile=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlReadFile" >&5 +echo "${ECHO_T}$ac_cv_lib_xml2_xmlReadFile" >&6; } +if test $ac_cv_lib_xml2_xmlReadFile = yes; then + +cat >>confdefs.h <<\_ACEOF +#define CLANG_HAVE_LIBXML 1 +_ACEOF + + LIBXML2_LIBS="-lxml2" +fi + +fi + + + + + + + + + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include <$ac_hdr> + +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +else + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' x; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break +fi +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + +{ echo "$as_me:$LINENO: checking for MAP_ANONYMOUS vs. MAP_ANON" >&5 +echo $ECHO_N "checking for MAP_ANONYMOUS vs. MAP_ANON... $ECHO_C" >&6; } +if test "${ac_cv_header_mmap_anon+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +int +main () +{ +mmap (0, 1, PROT_READ, MAP_ANONYMOUS, -1, 0); return (0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_mmap_anon=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_mmap_anon=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_mmap_anon" >&5 +echo "${ECHO_T}$ac_cv_header_mmap_anon" >&6; } +if test "$ac_cv_header_mmap_anon" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP_ANONYMOUS 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5 +echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6; } +if test "${ac_cv_header_stat_broken+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +#if defined S_ISBLK && defined S_IFDIR +# if S_ISBLK (S_IFDIR) +You lose. +# endif +#endif + +#if defined S_ISBLK && defined S_IFCHR +# if S_ISBLK (S_IFCHR) +You lose. +# endif +#endif + +#if defined S_ISLNK && defined S_IFREG +# if S_ISLNK (S_IFREG) +You lose. +# endif +#endif + +#if defined S_ISSOCK && defined S_IFREG +# if S_ISSOCK (S_IFREG) +You lose. +# endif +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "You lose" >/dev/null 2>&1; then + ac_cv_header_stat_broken=yes +else + ac_cv_header_stat_broken=no +fi +rm -f conftest* + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5 +echo "${ECHO_T}$ac_cv_header_stat_broken" >&6; } +if test $ac_cv_header_stat_broken = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STAT_MACROS_BROKEN 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; } +if test "${ac_cv_header_sys_wait_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + +int +main () +{ + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_sys_wait_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_sys_wait_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +if test $ac_cv_header_sys_wait_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_WAIT_H 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_time=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_time=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then + +cat >>confdefs.h <<\_ACEOF +#define TIME_WITH_SYS_TIME 1 +_ACEOF + +fi + + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + +for ac_header in cxxabi.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + +for ac_header in dlfcn.h execinfo.h fcntl.h inttypes.h link.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + +for ac_header in malloc.h setjmp.h signal.h stdint.h termios.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in utime.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + +for ac_header in sys/mman.h sys/param.h sys/resource.h sys/time.h sys/uio.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + +for ac_header in sys/ioctl.h malloc/malloc.h mach/mach.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in valgrind/valgrind.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in fenv.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +{ echo "$as_me:$LINENO: checking whether FE_ALL_EXCEPT is declared" >&5 +echo $ECHO_N "checking whether FE_ALL_EXCEPT is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_FE_ALL_EXCEPT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef FE_ALL_EXCEPT + char *p = (char *) FE_ALL_EXCEPT; + return !p; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_FE_ALL_EXCEPT=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_FE_ALL_EXCEPT=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_FE_ALL_EXCEPT" >&5 +echo "${ECHO_T}$ac_cv_have_decl_FE_ALL_EXCEPT" >&6; } +if test $ac_cv_have_decl_FE_ALL_EXCEPT = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FE_ALL_EXCEPT 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FE_ALL_EXCEPT 0 +_ACEOF + + +fi +{ echo "$as_me:$LINENO: checking whether FE_INEXACT is declared" >&5 +echo $ECHO_N "checking whether FE_INEXACT is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_FE_INEXACT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef FE_INEXACT + char *p = (char *) FE_INEXACT; + return !p; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_FE_INEXACT=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_FE_INEXACT=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_FE_INEXACT" >&5 +echo "${ECHO_T}$ac_cv_have_decl_FE_INEXACT" >&6; } +if test $ac_cv_have_decl_FE_INEXACT = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FE_INEXACT 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FE_INEXACT 0 +_ACEOF + + +fi + + +if test "$LLVM_ENABLE_THREADS" -eq 1 && test "$ENABLE_PTHREADS" -eq 1 ; then + +for ac_header in pthread.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + HAVE_PTHREAD=1 + +else + HAVE_PTHREAD=0 + +fi + +done + +else + HAVE_PTHREAD=0 + +fi +if test "$LLVM_ENABLE_ZLIB" -eq 1 ; then + +for ac_header in zlib.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + HAVE_LIBZ=1 + +else + HAVE_LIBZ=0 + +fi + +done + +else + HAVE_LIBZ=0 + +fi + +if test "$llvm_cv_enable_libffi" = "yes" ; then + + +for ac_header in ffi.h ffi/ffi.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +fi + + +for ac_header in CrashReporterClient.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +{ echo "$as_me:$LINENO: checking __crashreporter_info__" >&5 +echo $ECHO_N "checking __crashreporter_info__... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + extern const char *__crashreporter_info__; + int main() { + __crashreporter_info__ = "test"; + return 0; + } + + +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CRASHREPORTER_INFO 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CRASHREPORTER_INFO 0 +_ACEOF + + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + + + { echo "$as_me:$LINENO: checking for HUGE_VAL sanity" >&5 +echo $ECHO_N "checking for HUGE_VAL sanity... $ECHO_C" >&6; } +if test "${ac_cv_huge_val_sanity+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + ac_save_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -pedantic" + if test "$cross_compiling" = yes; then + ac_cv_huge_val_sanity=yes +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +double x = HUGE_VAL; return x != x; + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_huge_val_sanity=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_huge_val_sanity=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + CXXFLAGS=$ac_save_CXXFLAGS + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_huge_val_sanity" >&5 +echo "${ECHO_T}$ac_cv_huge_val_sanity" >&6; } + HUGE_VAL_SANITY=$ac_cv_huge_val_sanity + + +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } +if test "${ac_cv_type_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef pid_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_pid_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_pid_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } +if test $ac_cv_type_pid_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef size_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_size_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE void +_ACEOF + +{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } +if test "${ac_cv_struct_tm+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +struct tm *tp; tp->tm_sec; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_struct_tm=time.h +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_struct_tm=sys/time.h +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6; } +if test $ac_cv_struct_tm = sys/time.h; then + +cat >>confdefs.h <<\_ACEOF +#define TM_IN_SYS_TIME 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for int64_t" >&5 +echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; } +if test "${ac_cv_type_int64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef int64_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_int64_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_int64_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5 +echo "${ECHO_T}$ac_cv_type_int64_t" >&6; } +if test $ac_cv_type_int64_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_INT64_T 1 +_ACEOF + + +else + { { echo "$as_me:$LINENO: error: Type int64_t required but not found" >&5 +echo "$as_me: error: Type int64_t required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + +{ echo "$as_me:$LINENO: checking for uint64_t" >&5 +echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; } +if test "${ac_cv_type_uint64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef uint64_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_uint64_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_uint64_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5 +echo "${ECHO_T}$ac_cv_type_uint64_t" >&6; } +if test $ac_cv_type_uint64_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_UINT64_T 1 +_ACEOF + + +else + { echo "$as_me:$LINENO: checking for u_int64_t" >&5 +echo $ECHO_N "checking for u_int64_t... $ECHO_C" >&6; } +if test "${ac_cv_type_u_int64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef u_int64_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_u_int64_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_u_int64_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_u_int64_t" >&5 +echo "${ECHO_T}$ac_cv_type_u_int64_t" >&6; } +if test $ac_cv_type_u_int64_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_U_INT64_T 1 +_ACEOF + + +else + { { echo "$as_me:$LINENO: error: Type uint64_t or u_int64_t required but not found" >&5 +echo "$as_me: error: Type uint64_t or u_int64_t required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + +fi + + + + + + + + + + +for ac_func in backtrace ceilf floorf roundf rintf nearbyintf getcwd +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + +for ac_func in powf fmodf strtof round +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + +for ac_func in log log2 log10 exp exp2 +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + +for ac_func in getpagesize getrusage getrlimit setrlimit gettimeofday +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + +for ac_func in isatty mkdtemp mkstemp +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + + +for ac_func in mktemp posix_spawn pread realpath sbrk setrlimit +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + +for ac_func in strerror strerror_r setenv arc4random +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + +for ac_func in strtoll strtoq sysconf malloc_zone_statistics +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + +for ac_func in setjmp longjmp sigsetjmp siglongjmp writev +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + +for ac_func in futimes futimens +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +{ echo "$as_me:$LINENO: checking if printf has the %a format character" >&5 +echo $ECHO_N "checking if printf has the %a format character... $ECHO_C" >&6; } +if test "${llvm_cv_c_printf_a+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + if test "$cross_compiling" = yes; then + llvmac_cv_c_printf_a=no +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include + +int +main () +{ + +volatile double A, B; +char Buffer[100]; +A = 1; +A /= 10.0; +sprintf(Buffer, "%a", A); +B = atof(Buffer); +if (A != B) + return (1); +if (A != 0x1.999999999999ap-4) + return (1); +return (0); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + llvm_cv_c_printf_a=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +llvmac_cv_c_printf_a=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $llvm_cv_c_printf_a" >&5 +echo "${ECHO_T}$llvm_cv_c_printf_a" >&6; } + if test "$llvm_cv_c_printf_a" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PRINTF_A 1 +_ACEOF + + fi + + + + { echo "$as_me:$LINENO: checking for srand48/lrand48/drand48 in " >&5 +echo $ECHO_N "checking for srand48/lrand48/drand48 in ... $ECHO_C" >&6; } +if test "${ac_cv_func_rand48+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +srand48(0);lrand48();drand48(); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_rand48=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_rand48=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_rand48" >&5 +echo "${ECHO_T}$ac_cv_func_rand48" >&6; } + +if test "$ac_cv_func_rand48" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_RAND48 1 +_ACEOF + +fi + + +{ echo "$as_me:$LINENO: checking whether strerror_s is declared" >&5 +echo $ECHO_N "checking whether strerror_s is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_strerror_s+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef strerror_s + char *p = (char *) strerror_s; + return !p; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_strerror_s=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_strerror_s=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_s" >&5 +echo "${ECHO_T}$ac_cv_have_decl_strerror_s" >&6; } +if test $ac_cv_have_decl_strerror_s = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRERROR_S 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRERROR_S 0 +_ACEOF + + +fi + + + +if test "$llvm_cv_os_type" = "MingW" ; then + { echo "$as_me:$LINENO: checking for _alloca in -lgcc" >&5 +echo $ECHO_N "checking for _alloca in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc__alloca+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char _alloca (); +int +main () +{ +return _alloca (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc__alloca=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc__alloca=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc__alloca" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc__alloca" >&6; } +if test $ac_cv_lib_gcc__alloca = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE__ALLOCA 1 +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for __alloca in -lgcc" >&5 +echo $ECHO_N "checking for __alloca in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc___alloca+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __alloca (); +int +main () +{ +return __alloca (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc___alloca=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc___alloca=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc___alloca" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc___alloca" >&6; } +if test $ac_cv_lib_gcc___alloca = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___ALLOCA 1 +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for __chkstk in -lgcc" >&5 +echo $ECHO_N "checking for __chkstk in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc___chkstk+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __chkstk (); +int +main () +{ +return __chkstk (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc___chkstk=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc___chkstk=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc___chkstk" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc___chkstk" >&6; } +if test $ac_cv_lib_gcc___chkstk = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___CHKSTK 1 +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for ___chkstk in -lgcc" >&5 +echo $ECHO_N "checking for ___chkstk in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc____chkstk+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ___chkstk (); +int +main () +{ +return ___chkstk (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc____chkstk=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc____chkstk=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc____chkstk" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc____chkstk" >&6; } +if test $ac_cv_lib_gcc____chkstk = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE____CHKSTK 1 +_ACEOF + +fi + + + { echo "$as_me:$LINENO: checking for __ashldi3 in -lgcc" >&5 +echo $ECHO_N "checking for __ashldi3 in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc___ashldi3+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __ashldi3 (); +int +main () +{ +return __ashldi3 (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc___ashldi3=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc___ashldi3=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc___ashldi3" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc___ashldi3" >&6; } +if test $ac_cv_lib_gcc___ashldi3 = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___ASHLDI3 1 +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for __ashrdi3 in -lgcc" >&5 +echo $ECHO_N "checking for __ashrdi3 in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc___ashrdi3+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __ashrdi3 (); +int +main () +{ +return __ashrdi3 (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc___ashrdi3=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc___ashrdi3=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc___ashrdi3" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc___ashrdi3" >&6; } +if test $ac_cv_lib_gcc___ashrdi3 = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___ASHRDI3 1 +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for __divdi3 in -lgcc" >&5 +echo $ECHO_N "checking for __divdi3 in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc___divdi3+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __divdi3 (); +int +main () +{ +return __divdi3 (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc___divdi3=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc___divdi3=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc___divdi3" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc___divdi3" >&6; } +if test $ac_cv_lib_gcc___divdi3 = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___DIVDI3 1 +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for __fixdfdi in -lgcc" >&5 +echo $ECHO_N "checking for __fixdfdi in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc___fixdfdi+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __fixdfdi (); +int +main () +{ +return __fixdfdi (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc___fixdfdi=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc___fixdfdi=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc___fixdfdi" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc___fixdfdi" >&6; } +if test $ac_cv_lib_gcc___fixdfdi = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___FIXDFDI 1 +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for __fixsfdi in -lgcc" >&5 +echo $ECHO_N "checking for __fixsfdi in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc___fixsfdi+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __fixsfdi (); +int +main () +{ +return __fixsfdi (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc___fixsfdi=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc___fixsfdi=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc___fixsfdi" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc___fixsfdi" >&6; } +if test $ac_cv_lib_gcc___fixsfdi = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___FIXSFDI 1 +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for __floatdidf in -lgcc" >&5 +echo $ECHO_N "checking for __floatdidf in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc___floatdidf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __floatdidf (); +int +main () +{ +return __floatdidf (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc___floatdidf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc___floatdidf=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc___floatdidf" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc___floatdidf" >&6; } +if test $ac_cv_lib_gcc___floatdidf = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___FLOATDIDF 1 +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for __lshrdi3 in -lgcc" >&5 +echo $ECHO_N "checking for __lshrdi3 in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc___lshrdi3+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __lshrdi3 (); +int +main () +{ +return __lshrdi3 (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc___lshrdi3=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc___lshrdi3=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc___lshrdi3" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc___lshrdi3" >&6; } +if test $ac_cv_lib_gcc___lshrdi3 = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___LSHRDI3 1 +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for __moddi3 in -lgcc" >&5 +echo $ECHO_N "checking for __moddi3 in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc___moddi3+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __moddi3 (); +int +main () +{ +return __moddi3 (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc___moddi3=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc___moddi3=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc___moddi3" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc___moddi3" >&6; } +if test $ac_cv_lib_gcc___moddi3 = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___MODDI3 1 +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for __udivdi3 in -lgcc" >&5 +echo $ECHO_N "checking for __udivdi3 in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc___udivdi3+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __udivdi3 (); +int +main () +{ +return __udivdi3 (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc___udivdi3=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc___udivdi3=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc___udivdi3" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc___udivdi3" >&6; } +if test $ac_cv_lib_gcc___udivdi3 = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___UDIVDI3 1 +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for __umoddi3 in -lgcc" >&5 +echo $ECHO_N "checking for __umoddi3 in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc___umoddi3+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __umoddi3 (); +int +main () +{ +return __umoddi3 (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc___umoddi3=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc___umoddi3=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc___umoddi3" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc___umoddi3" >&6; } +if test $ac_cv_lib_gcc___umoddi3 = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___UMODDI3 1 +_ACEOF + +fi + + + { echo "$as_me:$LINENO: checking for __main in -lgcc" >&5 +echo $ECHO_N "checking for __main in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc___main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __main (); +int +main () +{ +return __main (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc___main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc___main=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc___main" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc___main" >&6; } +if test $ac_cv_lib_gcc___main = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___MAIN 1 +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for __cmpdi2 in -lgcc" >&5 +echo $ECHO_N "checking for __cmpdi2 in -lgcc... $ECHO_C" >&6; } +if test "${ac_cv_lib_gcc___cmpdi2+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgcc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char __cmpdi2 (); +int +main () +{ +return __cmpdi2 (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gcc___cmpdi2=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gcc___cmpdi2=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gcc___cmpdi2" >&5 +echo "${ECHO_T}$ac_cv_lib_gcc___cmpdi2" >&6; } +if test $ac_cv_lib_gcc___cmpdi2 = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE___CMPDI2 1 +_ACEOF + +fi + +fi + +if test "$llvm_cv_os_type" = "MingW" ; then + { echo "$as_me:$LINENO: checking whether EnumerateLoadedModules() accepts new decl" >&5 +echo $ECHO_N "checking whether EnumerateLoadedModules() accepts new decl... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + #include + extern void foo(PENUMLOADED_MODULES_CALLBACK); + extern void foo(BOOL(CALLBACK*)(PCSTR,ULONG_PTR,ULONG,PVOID)); + + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + llvm_cv_win32_elmcb_pcstr="PCSTR" + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + llvm_cv_win32_elmcb_pcstr="PSTR" + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +cat >>confdefs.h <<_ACEOF +#define WIN32_ELMCB_PCSTR $llvm_cv_win32_elmcb_pcstr +_ACEOF + +fi + + + + { echo "$as_me:$LINENO: checking for isnan in " >&5 +echo $ECHO_N "checking for isnan in ... $ECHO_C" >&6; } +if test "${ac_cv_func_isnan_in_math_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +float f; isnan(f); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_isnan_in_math_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_isnan_in_math_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_isnan_in_math_h" >&5 +echo "${ECHO_T}$ac_cv_func_isnan_in_math_h" >&6; } + + +if test "$ac_cv_func_isnan_in_math_h" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ISNAN_IN_MATH_H 1 +_ACEOF + +fi + + + { echo "$as_me:$LINENO: checking for isnan in " >&5 +echo $ECHO_N "checking for isnan in ... $ECHO_C" >&6; } +if test "${ac_cv_func_isnan_in_cmath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +float f; isnan(f); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_isnan_in_cmath=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_isnan_in_cmath=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_isnan_in_cmath" >&5 +echo "${ECHO_T}$ac_cv_func_isnan_in_cmath" >&6; } + +if test "$ac_cv_func_isnan_in_cmath" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ISNAN_IN_CMATH 1 +_ACEOF + +fi + + + { echo "$as_me:$LINENO: checking for std::isnan in " >&5 +echo $ECHO_N "checking for std::isnan in ... $ECHO_C" >&6; } +if test "${ac_cv_func_std_isnan_in_cmath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +float f; std::isnan(f); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_std_isnan_in_cmath=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_std_isnan_in_cmath=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_std_isnan_in_cmath" >&5 +echo "${ECHO_T}$ac_cv_func_std_isnan_in_cmath" >&6; } + +if test "$ac_cv_func_std_isnan_in_cmath" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STD_ISNAN_IN_CMATH 1 +_ACEOF + +fi + + + + + { echo "$as_me:$LINENO: checking for isinf in " >&5 +echo $ECHO_N "checking for isinf in ... $ECHO_C" >&6; } +if test "${ac_cv_func_isinf_in_math_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +float f; isinf(f); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_isinf_in_math_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_isinf_in_math_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_isinf_in_math_h" >&5 +echo "${ECHO_T}$ac_cv_func_isinf_in_math_h" >&6; } + +if test "$ac_cv_func_isinf_in_math_h" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ISINF_IN_MATH_H 1 +_ACEOF + +fi + + + { echo "$as_me:$LINENO: checking for isinf in " >&5 +echo $ECHO_N "checking for isinf in ... $ECHO_C" >&6; } +if test "${ac_cv_func_isinf_in_cmath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +float f; isinf(f); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_isinf_in_cmath=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_isinf_in_cmath=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_isinf_in_cmath" >&5 +echo "${ECHO_T}$ac_cv_func_isinf_in_cmath" >&6; } + +if test "$ac_cv_func_isinf_in_cmath" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ISINF_IN_CMATH 1 +_ACEOF + +fi + + + { echo "$as_me:$LINENO: checking for std::isinf in " >&5 +echo $ECHO_N "checking for std::isinf in ... $ECHO_C" >&6; } +if test "${ac_cv_func_std_isinf_in_cmath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +float f; std::isinf(f); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_std_isinf_in_cmath=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_std_isinf_in_cmath=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_std_isinf_in_cmath" >&5 +echo "${ECHO_T}$ac_cv_func_std_isinf_in_cmath" >&6; } + +if test "$ac_cv_func_std_isinf_in_cmath" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STD_ISINF_IN_CMATH 1 +_ACEOF + +fi + + + { echo "$as_me:$LINENO: checking for finite in " >&5 +echo $ECHO_N "checking for finite in ... $ECHO_C" >&6; } +if test "${ac_cv_func_finite_in_ieeefp_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +float f; finite(f); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_finite_in_ieeefp_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_finite_in_ieeefp_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_finite_in_ieeefp_h" >&5 +echo "${ECHO_T}$ac_cv_func_finite_in_ieeefp_h" >&6; } + +if test "$ac_cv_func_finite_in_ieeefp_h" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FINITE_IN_IEEEFP_H 1 +_ACEOF + +fi + + + +if test "$llvm_cv_platform_type" = "Unix" ; then + + +for ac_header in stdlib.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------------ ## +## Report this to http://llvm.org/bugs/ ## +## ------------------------------------ ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_func in getpagesize +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +{ echo "$as_me:$LINENO: checking for working mmap" >&5 +echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; } +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include +#include + +#if !STDC_HEADERS && !HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#if !HAVE_GETPAGESIZE +/* Assume that all systems that can run configure have sys/param.h. */ +# if !HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# if HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + return 1; + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + return 1; + if (write (fd, data, pagesize) != pagesize) + return 1; + close (fd); + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + return 1; + data2 = (char *) malloc (2 * pagesize); + if (!data2) + return 1; + data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 1; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 1; + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + return 1; + if (read (fd, data3, pagesize) != pagesize) + return 1; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 1; + close (fd); + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_mmap_fixed_mapped=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 +echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP 1 +_ACEOF + +fi +rm -f conftest.mmap + + { echo "$as_me:$LINENO: checking for mmap of files" >&5 +echo $ECHO_N "checking for mmap of files... $ECHO_C" >&6; } +if test "${ac_cv_func_mmap_file+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_file=no +else + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include + +int +main () +{ + + int fd; + fd = creat ("foo",0777); + fd = (int) mmap (0, 1, PROT_READ, MAP_SHARED, fd, 0); + unlink ("foo"); + return (fd != (int) MAP_FAILED); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_mmap_file=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_mmap_file=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_file" >&5 +echo "${ECHO_T}$ac_cv_func_mmap_file" >&6; } +if test "$ac_cv_func_mmap_file" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP_FILE +_ACEOF + + MMAP_FILE=yes + +fi + + { echo "$as_me:$LINENO: checking if /dev/zero is needed for mmap" >&5 +echo $ECHO_N "checking if /dev/zero is needed for mmap... $ECHO_C" >&6; } +if test "${ac_cv_need_dev_zero_for_mmap+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$llvm_cv_os_type" = "Interix" ; then + ac_cv_need_dev_zero_for_mmap=yes + else + ac_cv_need_dev_zero_for_mmap=no + fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_need_dev_zero_for_mmap" >&5 +echo "${ECHO_T}$ac_cv_need_dev_zero_for_mmap" >&6; } +if test "$ac_cv_need_dev_zero_for_mmap" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define NEED_DEV_ZERO_FOR_MMAP 1 +_ACEOF + +fi + + if test "$ac_cv_func_mmap_fixed_mapped" = "no" + then + { echo "$as_me:$LINENO: WARNING: mmap() of a fixed address required but not supported" >&5 +echo "$as_me: WARNING: mmap() of a fixed address required but not supported" >&2;} + fi + if test "$ac_cv_func_mmap_file" = "no" + then + { echo "$as_me:$LINENO: WARNING: mmap() of files required but not found" >&5 +echo "$as_me: WARNING: mmap() of files required but not found" >&2;} + fi +fi + +{ echo "$as_me:$LINENO: checking for GCC atomic builtins" >&5 +echo $ECHO_N "checking for GCC atomic builtins... $ECHO_C" >&6; } +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + int main() { + volatile unsigned long val = 1; + __sync_synchronize(); + __sync_val_compare_and_swap(&val, 1, 0); + __sync_add_and_fetch(&val, 1); + __sync_sub_and_fetch(&val, 1); + return 0; + } + + +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define LLVM_HAS_ATOMICS 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define LLVM_HAS_ATOMICS 0 +_ACEOF + + { echo "$as_me:$LINENO: WARNING: LLVM will be built thread-unsafe because atomic builtins are missing" >&5 +echo "$as_me: WARNING: LLVM will be built thread-unsafe because atomic builtins are missing" >&2;} + +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +if test "$llvm_cv_os_type" = "Linux" -a "$llvm_cv_target_arch" = "x86_64" ; then + { echo "$as_me:$LINENO: checking for 32-bit userspace on 64-bit system" >&5 +echo $ECHO_N "checking for 32-bit userspace on 64-bit system... $ECHO_C" >&6; } +if test "${llvm_cv_linux_mixed+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __x86_64__ + error: Not x86-64 even if uname says so! + #endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + llvm_cv_linux_mixed=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + llvm_cv_linux_mixed=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $llvm_cv_linux_mixed" >&5 +echo "${ECHO_T}$llvm_cv_linux_mixed" >&6; } + + if test "$llvm_cv_linux_mixed" = "yes"; then + llvm_cv_target_arch="x86" + ARCH="x86" + fi +fi + + +for ac_func in __dso_handle +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +SHLIBEXT=$libltdl_cv_shlibext + + +SHLIBPATH_VAR=$libltdl_cv_shlibpath_var + + +if test "${prefix}" = "NONE" ; then + prefix="/usr/local" +fi +eval LLVM_PREFIX="${prefix}"; +eval LLVM_BINDIR="${prefix}/bin"; +eval LLVM_DATADIR="${prefix}/share/llvm"; +eval LLVM_DOCSDIR="${prefix}/share/doc/llvm"; +eval LLVM_ETCDIR="${prefix}/etc/llvm"; +eval LLVM_INCLUDEDIR="${prefix}/include"; +eval LLVM_INFODIR="${prefix}/info"; +eval LLVM_MANDIR="${prefix}/man"; +LLVM_CONFIGTIME=`date` + + + + + + + + + + +if test "${ENABLE_TIMESTAMPS}" = "0"; then + LLVM_CONFIGTIME="(timestamp not enabled)" +fi + + +cat >>confdefs.h <<_ACEOF +#define LLVM_PREFIX "$LLVM_PREFIX" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LLVM_BINDIR "$LLVM_BINDIR" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LLVM_DATADIR "$LLVM_DATADIR" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LLVM_DOCSDIR "$LLVM_DOCSDIR" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LLVM_ETCDIR "$LLVM_ETCDIR" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LLVM_INCLUDEDIR "$LLVM_INCLUDEDIR" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LLVM_INFODIR "$LLVM_INFODIR" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LLVM_MANDIR "$LLVM_MANDIR" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LLVM_CONFIGTIME "$LLVM_CONFIGTIME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LLVM_HOST_TRIPLE "$host" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LLVM_DEFAULT_TARGET_TRIPLE "$target" +_ACEOF + + +if test "$BINDINGS_TO_BUILD" = auto ; then + BINDINGS_TO_BUILD="" + if test "x$OCAMLC" != x -a "x$OCAMLDEP" != x ; then + BINDINGS_TO_BUILD="ocaml $BINDINGS_TO_BUILD" + fi +fi +BINDINGS_TO_BUILD=$BINDINGS_TO_BUILD + + +ALL_BINDINGS=ocaml + + +binding_prereqs_failed=0 +for a_binding in $BINDINGS_TO_BUILD ; do + case "$a_binding" in + ocaml) + if test "x$OCAMLC" = x ; then + { echo "$as_me:$LINENO: WARNING: --enable-bindings=ocaml specified, but ocamlc not found. Try configure OCAMLC=/path/to/ocamlc" >&5 +echo "$as_me: WARNING: --enable-bindings=ocaml specified, but ocamlc not found. Try configure OCAMLC=/path/to/ocamlc" >&2;} + binding_prereqs_failed=1 + fi + if test "x$OCAMLDEP" = x ; then + { echo "$as_me:$LINENO: WARNING: --enable-bindings=ocaml specified, but ocamldep not found. Try configure OCAMLDEP=/path/to/ocamldep" >&5 +echo "$as_me: WARNING: --enable-bindings=ocaml specified, but ocamldep not found. Try configure OCAMLDEP=/path/to/ocamldep" >&2;} + binding_prereqs_failed=1 + fi + if test "x$OCAMLOPT" = x ; then + { echo "$as_me:$LINENO: WARNING: --enable-bindings=ocaml specified, but ocamlopt not found. Try configure OCAMLOPT=/path/to/ocamlopt" >&5 +echo "$as_me: WARNING: --enable-bindings=ocaml specified, but ocamlopt not found. Try configure OCAMLOPT=/path/to/ocamlopt" >&2;} + fi + if test "x$with_ocaml_libdir" != xauto ; then + OCAML_LIBDIR=$with_ocaml_libdir + + else + ocaml_stdlib="`"$OCAMLC" -where`" + if test "$LLVM_PREFIX" '<' "$ocaml_stdlib" -a "$ocaml_stdlib" '<' "$LLVM_PREFIX~" + then + # ocaml stdlib is beneath our prefix; use stdlib + OCAML_LIBDIR=$ocaml_stdlib + + else + # ocaml stdlib is outside our prefix; use libdir/ocaml + OCAML_LIBDIR=${prefix}/lib/ocaml + + fi + fi + ;; + esac +done +if test "$binding_prereqs_failed" = 1 ; then + { { echo "$as_me:$LINENO: error: Prequisites for bindings not satisfied. Fix them or use configure --disable-bindings." >&5 +echo "$as_me: error: Prequisites for bindings not satisfied. Fix them or use configure --disable-bindings." >&2;} + { (exit 1); exit 1; }; } +fi + +{ echo "$as_me:$LINENO: checking for compiler -fvisibility-inlines-hidden option" >&5 +echo $ECHO_N "checking for compiler -fvisibility-inlines-hidden option... $ECHO_C" >&6; } +if test "${llvm_cv_cxx_visibility_inlines_hidden+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + oldcxxflags="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -O0 -fvisibility-inlines-hidden -Werror" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +template struct X { void __attribute__((noinline)) f() {} }; +int +main () +{ +X().f(); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + llvm_cv_cxx_visibility_inlines_hidden=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + llvm_cv_cxx_visibility_inlines_hidden=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS="$oldcxxflags" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ echo "$as_me:$LINENO: result: $llvm_cv_cxx_visibility_inlines_hidden" >&5 +echo "${ECHO_T}$llvm_cv_cxx_visibility_inlines_hidden" >&6; } +if test "$llvm_cv_cxx_visibility_inlines_hidden" = yes ; then + ENABLE_VISIBILITY_INLINES_HIDDEN=1 + +else + ENABLE_VISIBILITY_INLINES_HIDDEN=0 + +fi + + +if test "$llvm_cv_link_use_r" = "yes" ; then + RPATH="-Wl,-R" +else + RPATH="-Wl,-rpath" +fi + + +if test "$llvm_cv_link_use_export_dynamic" = "yes" ; then + RDYNAMIC="-rdynamic" +else + RDYNAMIC="" +fi + + + +ac_config_headers="$ac_config_headers include/llvm/Config/config.h include/llvm/Config/llvm-config.h" + + + + + + +ac_config_files="$ac_config_files include/llvm/Config/Targets.def" + +ac_config_files="$ac_config_files include/llvm/Config/AsmPrinters.def" + +ac_config_files="$ac_config_files include/llvm/Config/AsmParsers.def" + +ac_config_files="$ac_config_files include/llvm/Config/Disassemblers.def" + +ac_config_headers="$ac_config_headers include/llvm/Support/DataTypes.h" + + +ac_config_files="$ac_config_files Makefile.config" + + +ac_config_files="$ac_config_files llvm.spec" + + +ac_config_files="$ac_config_files docs/doxygen.cfg" + + +if test "${clang_src_root}" = ""; then + clang_src_root="$srcdir/tools/clang" +fi +if test -f ${clang_src_root}/README.txt; then + configh="include/clang/Config/config.h" + doxy="docs/doxygen.cfg" + ac_config_headers="$ac_config_headers tools/clang/${configh}:${clang_src_root}/${configh}.in" + + ac_config_files="$ac_config_files tools/clang/${doxy}:${clang_src_root}/${doxy}.in" + +fi + +ac_config_files="$ac_config_files bindings/ocaml/llvm/META.llvm" + + +test "x$program_prefix" = "xNONE" && program_prefix="" + + + +ac_config_commands="$ac_config_commands setup" + +ac_config_commands="$ac_config_commands Makefile" + + +ac_config_commands="$ac_config_commands Makefile.common" + + +ac_config_commands="$ac_config_commands examples/Makefile" + + +ac_config_commands="$ac_config_commands lib/Makefile" + + +ac_config_commands="$ac_config_commands test/Makefile" + + +ac_config_commands="$ac_config_commands test/Makefile.tests" + + +ac_config_commands="$ac_config_commands unittests/Makefile" + + +ac_config_commands="$ac_config_commands tools/Makefile" + + +ac_config_commands="$ac_config_commands utils/Makefile" + + +ac_config_commands="$ac_config_commands projects/Makefile" + + +ac_config_commands="$ac_config_commands bindings/Makefile" + + +ac_config_commands="$ac_config_commands bindings/ocaml/Makefile.ocaml" + + + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"INSTALL_LTDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"INSTALL_LTDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${CONVENIENCE_LTDL_TRUE}" && test -z "${CONVENIENCE_LTDL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CONVENIENCE_LTDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CONVENIENCE_LTDL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" +else + as_executable_p=: +fi +rm -f conf$$.file + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by LLVM $as_me 3.4.1, which was +generated by GNU Autoconf 2.60. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +LLVM config.status 3.4.1 +configured by $0, generated by GNU Autoconf 2.60, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS +# +llvm_src="${srcdir}" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "include/llvm/Config/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/Config/config.h" ;; + "include/llvm/Config/llvm-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/Config/llvm-config.h" ;; + "include/llvm/Config/Targets.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/Targets.def" ;; + "include/llvm/Config/AsmPrinters.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/AsmPrinters.def" ;; + "include/llvm/Config/AsmParsers.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/AsmParsers.def" ;; + "include/llvm/Config/Disassemblers.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/Disassemblers.def" ;; + "include/llvm/Support/DataTypes.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/Support/DataTypes.h" ;; + "Makefile.config") CONFIG_FILES="$CONFIG_FILES Makefile.config" ;; + "llvm.spec") CONFIG_FILES="$CONFIG_FILES llvm.spec" ;; + "docs/doxygen.cfg") CONFIG_FILES="$CONFIG_FILES docs/doxygen.cfg" ;; + "tools/clang/${configh}") CONFIG_HEADERS="$CONFIG_HEADERS tools/clang/${configh}:${clang_src_root}/${configh}.in" ;; + "tools/clang/${doxy}") CONFIG_FILES="$CONFIG_FILES tools/clang/${doxy}:${clang_src_root}/${doxy}.in" ;; + "bindings/ocaml/llvm/META.llvm") CONFIG_FILES="$CONFIG_FILES bindings/ocaml/llvm/META.llvm" ;; + "setup") CONFIG_COMMANDS="$CONFIG_COMMANDS setup" ;; + "Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile" ;; + "Makefile.common") CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile.common" ;; + "examples/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS examples/Makefile" ;; + "lib/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS lib/Makefile" ;; + "test/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS test/Makefile" ;; + "test/Makefile.tests") CONFIG_COMMANDS="$CONFIG_COMMANDS test/Makefile.tests" ;; + "unittests/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS unittests/Makefile" ;; + "tools/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS tools/Makefile" ;; + "utils/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS utils/Makefile" ;; + "projects/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS projects/Makefile" ;; + "bindings/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS bindings/Makefile" ;; + "bindings/ocaml/Makefile.ocaml") CONFIG_COMMANDS="$CONFIG_COMMANDS bindings/ocaml/Makefile.ocaml" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +LLVM_VERSION_MAJOR!$LLVM_VERSION_MAJOR$ac_delim +LLVM_VERSION_MINOR!$LLVM_VERSION_MINOR$ac_delim +LLVM_VERSION_PATCH!$LLVM_VERSION_PATCH$ac_delim +LLVM_VERSION_SUFFIX!$LLVM_VERSION_SUFFIX$ac_delim +LLVM_COPYRIGHT!$LLVM_COPYRIGHT$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +CXX!$CXX$ac_delim +CXXFLAGS!$CXXFLAGS$ac_delim +ac_ct_CXX!$ac_ct_CXX$ac_delim +CPP!$CPP$ac_delim +subdirs!$subdirs$ac_delim +ENABLE_POLLY!$ENABLE_POLLY$ac_delim +LLVM_HAS_POLLY!$LLVM_HAS_POLLY$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +target!$target$ac_delim +target_cpu!$target_cpu$ac_delim +target_vendor!$target_vendor$ac_delim +target_os!$target_os$ac_delim +OS!$OS$ac_delim +HOST_OS!$HOST_OS$ac_delim +TARGET_OS!$TARGET_OS$ac_delim +LINKALL!$LINKALL$ac_delim +NOLINKALL!$NOLINKALL$ac_delim +LLVM_ON_UNIX!$LLVM_ON_UNIX$ac_delim +LLVM_ON_WIN32!$LLVM_ON_WIN32$ac_delim +ARCH!$ARCH$ac_delim +HOST_ARCH!$HOST_ARCH$ac_delim +ENDIAN!$ENDIAN$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +LLVM_CROSS_COMPILING!$LLVM_CROSS_COMPILING$ac_delim +BUILD_CC!$BUILD_CC$ac_delim +BUILD_EXEEXT!$BUILD_EXEEXT$ac_delim +BUILD_CXX!$BUILD_CXX$ac_delim +CVSBUILD!$CVSBUILD$ac_delim +ENABLE_LIBCPP!$ENABLE_LIBCPP$ac_delim +ENABLE_CXX11!$ENABLE_CXX11$ac_delim +ENABLE_SPLIT_DWARF!$ENABLE_SPLIT_DWARF$ac_delim +ENABLE_CLANG_ARCMT!$ENABLE_CLANG_ARCMT$ac_delim +ENABLE_CLANG_STATIC_ANALYZER!$ENABLE_CLANG_STATIC_ANALYZER$ac_delim +ENABLE_CLANG_REWRITER!$ENABLE_CLANG_REWRITER$ac_delim +ENABLE_OPTIMIZED!$ENABLE_OPTIMIZED$ac_delim +ENABLE_PROFILING!$ENABLE_PROFILING$ac_delim +DISABLE_ASSERTIONS!$DISABLE_ASSERTIONS$ac_delim +ENABLE_WERROR!$ENABLE_WERROR$ac_delim +ENABLE_EXPENSIVE_CHECKS!$ENABLE_EXPENSIVE_CHECKS$ac_delim +EXPENSIVE_CHECKS!$EXPENSIVE_CHECKS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +DEBUG_RUNTIME!$DEBUG_RUNTIME$ac_delim +DEBUG_SYMBOLS!$DEBUG_SYMBOLS$ac_delim +KEEP_SYMBOLS!$KEEP_SYMBOLS$ac_delim +JIT!$JIT$ac_delim +TARGET_HAS_JIT!$TARGET_HAS_JIT$ac_delim +ENABLE_DOCS!$ENABLE_DOCS$ac_delim +ENABLE_DOXYGEN!$ENABLE_DOXYGEN$ac_delim +LLVM_ENABLE_THREADS!$LLVM_ENABLE_THREADS$ac_delim +ENABLE_PTHREADS!$ENABLE_PTHREADS$ac_delim +LLVM_ENABLE_ZLIB!$LLVM_ENABLE_ZLIB$ac_delim +ENABLE_PIC!$ENABLE_PIC$ac_delim +ENABLE_SHARED!$ENABLE_SHARED$ac_delim +ENABLE_EMBED_STDCXX!$ENABLE_EMBED_STDCXX$ac_delim +ENABLE_TIMESTAMPS!$ENABLE_TIMESTAMPS$ac_delim +TARGETS_TO_BUILD!$TARGETS_TO_BUILD$ac_delim +LLVM_ENUM_TARGETS!$LLVM_ENUM_TARGETS$ac_delim +LLVM_ENUM_ASM_PRINTERS!$LLVM_ENUM_ASM_PRINTERS$ac_delim +LLVM_ENUM_ASM_PARSERS!$LLVM_ENUM_ASM_PARSERS$ac_delim +LLVM_ENUM_DISASSEMBLERS!$LLVM_ENUM_DISASSEMBLERS$ac_delim +OPTIMIZE_OPTION!$OPTIMIZE_OPTION$ac_delim +EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim +EXTRA_LD_OPTIONS!$EXTRA_LD_OPTIONS$ac_delim +CLANG_SRC_ROOT!$CLANG_SRC_ROOT$ac_delim +BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim +INTERNAL_PREFIX!$INTERNAL_PREFIX$ac_delim +NM!$NM$ac_delim +ifGNUmake!$ifGNUmake$ac_delim +LN_S!$LN_S$ac_delim +CMP!$CMP$ac_delim +CP!$CP$ac_delim +DATE!$DATE$ac_delim +FIND!$FIND$ac_delim +MKDIR!$MKDIR$ac_delim +MV!$MV$ac_delim +RANLIB!$RANLIB$ac_delim +AR!$AR$ac_delim +RM!$RM$ac_delim +SED!$SED$ac_delim +TAR!$TAR$ac_delim +BINPWD!$BINPWD$ac_delim +GRAPHVIZ!$GRAPHVIZ$ac_delim +DOT!$DOT$ac_delim +FDP!$FDP$ac_delim +NEATO!$NEATO$ac_delim +TWOPI!$TWOPI$ac_delim +CIRCO!$CIRCO$ac_delim +GV!$GV$ac_delim +DOTTY!$DOTTY$ac_delim +XDOT!$XDOT$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +BZIP2!$BZIP2$ac_delim +CAT!$CAT$ac_delim +DOXYGEN!$DOXYGEN$ac_delim +GROFF!$GROFF$ac_delim +GZIPBIN!$GZIPBIN$ac_delim +PDFROFF!$PDFROFF$ac_delim +ZIP!$ZIP$ac_delim +OCAMLC!$OCAMLC$ac_delim +OCAMLOPT!$OCAMLOPT$ac_delim +OCAMLDEP!$OCAMLDEP$ac_delim +OCAMLDOC!$OCAMLDOC$ac_delim +GAS!$GAS$ac_delim +HAVE_LINK_VERSION_SCRIPT!$HAVE_LINK_VERSION_SCRIPT$ac_delim +INSTALL_LTDL_TRUE!$INSTALL_LTDL_TRUE$ac_delim +INSTALL_LTDL_FALSE!$INSTALL_LTDL_FALSE$ac_delim +CONVENIENCE_LTDL_TRUE!$CONVENIENCE_LTDL_TRUE$ac_delim +CONVENIENCE_LTDL_FALSE!$CONVENIENCE_LTDL_FALSE$ac_delim +LIBADD_DL!$LIBADD_DL$ac_delim +NO_VARIADIC_MACROS!$NO_VARIADIC_MACROS$ac_delim +NO_MISSING_FIELD_INITIALIZERS!$NO_MISSING_FIELD_INITIALIZERS$ac_delim +COVERED_SWITCH_DEFAULT!$COVERED_SWITCH_DEFAULT$ac_delim +NO_MAYBE_UNINITIALIZED!$NO_MAYBE_UNINITIALIZED$ac_delim +NO_UNINITIALIZED!$NO_UNINITIALIZED$ac_delim +PYTHON!$PYTHON$ac_delim +USE_UDIS86!$USE_UDIS86$ac_delim +USE_OPROFILE!$USE_OPROFILE$ac_delim +USE_INTEL_JITEVENTS!$USE_INTEL_JITEVENTS$ac_delim +XML2CONFIG!$XML2CONFIG$ac_delim +LIBXML2_LIBS!$LIBXML2_LIBS$ac_delim +LIBXML2_INC!$LIBXML2_INC$ac_delim +CXXCPP!$CXXCPP$ac_delim +HAVE_PTHREAD!$HAVE_PTHREAD$ac_delim +HAVE_LIBZ!$HAVE_LIBZ$ac_delim +HUGE_VAL_SANITY!$HUGE_VAL_SANITY$ac_delim +MMAP_FILE!$MMAP_FILE$ac_delim +SHLIBEXT!$SHLIBEXT$ac_delim +SHLIBPATH_VAR!$SHLIBPATH_VAR$ac_delim +LLVM_PREFIX!$LLVM_PREFIX$ac_delim +LLVM_BINDIR!$LLVM_BINDIR$ac_delim +LLVM_DATADIR!$LLVM_DATADIR$ac_delim +LLVM_DOCSDIR!$LLVM_DOCSDIR$ac_delim +LLVM_ETCDIR!$LLVM_ETCDIR$ac_delim +LLVM_INCLUDEDIR!$LLVM_INCLUDEDIR$ac_delim +LLVM_INFODIR!$LLVM_INFODIR$ac_delim +LLVM_MANDIR!$LLVM_MANDIR$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +LLVM_CONFIGTIME!$LLVM_CONFIGTIME$ac_delim +BINDINGS_TO_BUILD!$BINDINGS_TO_BUILD$ac_delim +ALL_BINDINGS!$ALL_BINDINGS$ac_delim +OCAML_LIBDIR!$OCAML_LIBDIR$ac_delim +ENABLE_VISIBILITY_INLINES_HIDDEN!$ENABLE_VISIBILITY_INLINES_HIDDEN$ac_delim +RPATH!$RPATH$ac_delim +RDYNAMIC!$RDYNAMIC$ac_delim +program_prefix!$program_prefix$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 10; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' + +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines + +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF + if test x"$ac_file" != x-; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f $ac_file + mv "$tmp/config.h" $ac_file + fi + else + echo "/* $configure_input */" + cat "$ac_result" + fi + rm -f "$tmp/out12" + ;; + + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname Makefile` + ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/Makefile Makefile ;; + "Makefile.common":C) ${llvm_src}/autoconf/mkinstalldirs `dirname Makefile.common` + ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/Makefile.common Makefile.common ;; + "examples/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname examples/Makefile` + ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/examples/Makefile examples/Makefile ;; + "lib/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname lib/Makefile` + ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/lib/Makefile lib/Makefile ;; + "test/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname test/Makefile` + ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/test/Makefile test/Makefile ;; + "test/Makefile.tests":C) ${llvm_src}/autoconf/mkinstalldirs `dirname test/Makefile.tests` + ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/test/Makefile.tests test/Makefile.tests ;; + "unittests/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname unittests/Makefile` + ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/unittests/Makefile unittests/Makefile ;; + "tools/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname tools/Makefile` + ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/tools/Makefile tools/Makefile ;; + "utils/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname utils/Makefile` + ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/utils/Makefile utils/Makefile ;; + "projects/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname projects/Makefile` + ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/projects/Makefile projects/Makefile ;; + "bindings/Makefile":C) ${llvm_src}/autoconf/mkinstalldirs `dirname bindings/Makefile` + ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/bindings/Makefile bindings/Makefile ;; + "bindings/ocaml/Makefile.ocaml":C) ${llvm_src}/autoconf/mkinstalldirs `dirname bindings/ocaml/Makefile.ocaml` + ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/bindings/ocaml/Makefile.ocaml bindings/ocaml/Makefile.ocaml ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + +# +# CONFIG_SUBDIRS section. +# +if test "$no_recursion" != yes; then + + # Remove --cache-file and --srcdir arguments so they do not pile up. + ac_sub_configure_args= + ac_prev= + eval "set x $ac_configure_args" + shift + for ac_arg + do + if test -n "$ac_prev"; then + ac_prev= + continue + fi + case $ac_arg in + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ + | --c=*) + ;; + --config-cache | -C) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + ;; + *) + case $ac_arg in + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; + esac + done + + # Always prepend --prefix to ensure using the same prefix + # in subdir configurations. + ac_arg="--prefix=$prefix" + case $ac_arg in + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + ac_sub_configure_args="$ac_arg $ac_sub_configure_args" + + ac_popdir=`pwd` + for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue + + # Do not complain, so a configure script can configure whichever + # parts of a large source tree are present. + test -d "$srcdir/$ac_dir" || continue + + ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" + echo "$as_me:$LINENO: $ac_msg" >&5 + echo "$ac_msg" >&6 + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + cd "$ac_dir" + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f "$ac_srcdir/configure.gnu"; then + ac_sub_configure=$ac_srcdir/configure.gnu + elif test -f "$ac_srcdir/configure"; then + ac_sub_configure=$ac_srcdir/configure + elif test -f "$ac_srcdir/configure.in"; then + # This should be Cygnus configure. + ac_sub_configure=$ac_aux_dir/configure + else + { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 +echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} + ac_sub_configure= + fi + + # The recursion is here. + if test -n "$ac_sub_configure"; then + # Make the cache file name correct relative to the subdirectory. + case $cache_file in + [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; + *) # Relative name. + ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; + esac + + { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 +echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} + # The eval makes quoting arguments work. + eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ + --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || + { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 +echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} + { (exit 1); exit 1; }; } + fi + + cd "$ac_popdir" + done +fi + diff --git a/docs/AliasAnalysis.rst b/docs/AliasAnalysis.rst new file mode 100644 index 00000000..712d57d1 --- /dev/null +++ b/docs/AliasAnalysis.rst @@ -0,0 +1,699 @@ +================================== +LLVM Alias Analysis Infrastructure +================================== + +.. contents:: + :local: + +Introduction +============ + +Alias Analysis (aka Pointer Analysis) is a class of techniques which attempt to +determine whether or not two pointers ever can point to the same object in +memory. There are many different algorithms for alias analysis and many +different ways of classifying them: flow-sensitive vs. flow-insensitive, +context-sensitive vs. context-insensitive, field-sensitive +vs. field-insensitive, unification-based vs. subset-based, etc. Traditionally, +alias analyses respond to a query with a `Must, May, or No`_ alias response, +indicating that two pointers always point to the same object, might point to the +same object, or are known to never point to the same object. + +The LLVM `AliasAnalysis +`__ class is the +primary interface used by clients and implementations of alias analyses in the +LLVM system. This class is the common interface between clients of alias +analysis information and the implementations providing it, and is designed to +support a wide range of implementations and clients (but currently all clients +are assumed to be flow-insensitive). In addition to simple alias analysis +information, this class exposes Mod/Ref information from those implementations +which can provide it, allowing for powerful analyses and transformations to work +well together. + +This document contains information necessary to successfully implement this +interface, use it, and to test both sides. It also explains some of the finer +points about what exactly results mean. If you feel that something is unclear +or should be added, please `let me know `_. + +``AliasAnalysis`` Class Overview +================================ + +The `AliasAnalysis `__ +class defines the interface that the various alias analysis implementations +should support. This class exports two important enums: ``AliasResult`` and +``ModRefResult`` which represent the result of an alias query or a mod/ref +query, respectively. + +The ``AliasAnalysis`` interface exposes information about memory, represented in +several different ways. In particular, memory objects are represented as a +starting address and size, and function calls are represented as the actual +``call`` or ``invoke`` instructions that performs the call. The +``AliasAnalysis`` interface also exposes some helper methods which allow you to +get mod/ref information for arbitrary instructions. + +All ``AliasAnalysis`` interfaces require that in queries involving multiple +values, values which are not `constants `_ are all +defined within the same function. + +Representation of Pointers +-------------------------- + +Most importantly, the ``AliasAnalysis`` class provides several methods which are +used to query whether or not two memory objects alias, whether function calls +can modify or read a memory object, etc. For all of these queries, memory +objects are represented as a pair of their starting address (a symbolic LLVM +``Value*``) and a static size. + +Representing memory objects as a starting address and a size is critically +important for correct Alias Analyses. For example, consider this (silly, but +possible) C code: + +.. code-block:: c++ + + int i; + char C[2]; + char A[10]; + /* ... */ + for (i = 0; i != 10; ++i) { + C[0] = A[i]; /* One byte store */ + C[1] = A[9-i]; /* One byte store */ + } + +In this case, the ``basicaa`` pass will disambiguate the stores to ``C[0]`` and +``C[1]`` because they are accesses to two distinct locations one byte apart, and +the accesses are each one byte. In this case, the Loop Invariant Code Motion +(LICM) pass can use store motion to remove the stores from the loop. In +constrast, the following code: + +.. code-block:: c++ + + int i; + char C[2]; + char A[10]; + /* ... */ + for (i = 0; i != 10; ++i) { + ((short*)C)[0] = A[i]; /* Two byte store! */ + C[1] = A[9-i]; /* One byte store */ + } + +In this case, the two stores to C do alias each other, because the access to the +``&C[0]`` element is a two byte access. If size information wasn't available in +the query, even the first case would have to conservatively assume that the +accesses alias. + +.. _alias: + +The ``alias`` method +-------------------- + +The ``alias`` method is the primary interface used to determine whether or not +two memory objects alias each other. It takes two memory objects as input and +returns MustAlias, PartialAlias, MayAlias, or NoAlias as appropriate. + +Like all ``AliasAnalysis`` interfaces, the ``alias`` method requires that either +the two pointer values be defined within the same function, or at least one of +the values is a `constant `_. + +.. _Must, May, or No: + +Must, May, and No Alias Responses +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``NoAlias`` response may be used when there is never an immediate dependence +between any memory reference *based* on one pointer and any memory reference +*based* the other. The most obvious example is when the two pointers point to +non-overlapping memory ranges. Another is when the two pointers are only ever +used for reading memory. Another is when the memory is freed and reallocated +between accesses through one pointer and accesses through the other --- in this +case, there is a dependence, but it's mediated by the free and reallocation. + +As an exception to this is with the `noalias `_ keyword; +the "irrelevant" dependencies are ignored. + +The ``MayAlias`` response is used whenever the two pointers might refer to the +same object. + +The ``PartialAlias`` response is used when the two memory objects are known to +be overlapping in some way, but do not start at the same address. + +The ``MustAlias`` response may only be returned if the two memory objects are +guaranteed to always start at exactly the same location. A ``MustAlias`` +response implies that the pointers compare equal. + +The ``getModRefInfo`` methods +----------------------------- + +The ``getModRefInfo`` methods return information about whether the execution of +an instruction can read or modify a memory location. Mod/Ref information is +always conservative: if an instruction **might** read or write a location, +``ModRef`` is returned. + +The ``AliasAnalysis`` class also provides a ``getModRefInfo`` method for testing +dependencies between function calls. This method takes two call sites (``CS1`` +& ``CS2``), returns ``NoModRef`` if neither call writes to memory read or +written by the other, ``Ref`` if ``CS1`` reads memory written by ``CS2``, +``Mod`` if ``CS1`` writes to memory read or written by ``CS2``, or ``ModRef`` if +``CS1`` might read or write memory written to by ``CS2``. Note that this +relation is not commutative. + +Other useful ``AliasAnalysis`` methods +-------------------------------------- + +Several other tidbits of information are often collected by various alias +analysis implementations and can be put to good use by various clients. + +The ``pointsToConstantMemory`` method +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``pointsToConstantMemory`` method returns true if and only if the analysis +can prove that the pointer only points to unchanging memory locations +(functions, constant global variables, and the null pointer). This information +can be used to refine mod/ref information: it is impossible for an unchanging +memory location to be modified. + +.. _never access memory or only read memory: + +The ``doesNotAccessMemory`` and ``onlyReadsMemory`` methods +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +These methods are used to provide very simple mod/ref information for function +calls. The ``doesNotAccessMemory`` method returns true for a function if the +analysis can prove that the function never reads or writes to memory, or if the +function only reads from constant memory. Functions with this property are +side-effect free and only depend on their input arguments, allowing them to be +eliminated if they form common subexpressions or be hoisted out of loops. Many +common functions behave this way (e.g., ``sin`` and ``cos``) but many others do +not (e.g., ``acos``, which modifies the ``errno`` variable). + +The ``onlyReadsMemory`` method returns true for a function if analysis can prove +that (at most) the function only reads from non-volatile memory. Functions with +this property are side-effect free, only depending on their input arguments and +the state of memory when they are called. This property allows calls to these +functions to be eliminated and moved around, as long as there is no store +instruction that changes the contents of memory. Note that all functions that +satisfy the ``doesNotAccessMemory`` method also satisfies ``onlyReadsMemory``. + +Writing a new ``AliasAnalysis`` Implementation +============================================== + +Writing a new alias analysis implementation for LLVM is quite straight-forward. +There are already several implementations that you can use for examples, and the +following information should help fill in any details. For a examples, take a +look at the `various alias analysis implementations`_ included with LLVM. + +Different Pass styles +--------------------- + +The first step to determining what type of :doc:`LLVM pass ` +you need to use for your Alias Analysis. As is the case with most other +analyses and transformations, the answer should be fairly obvious from what type +of problem you are trying to solve: + +#. If you require interprocedural analysis, it should be a ``Pass``. +#. If you are a function-local analysis, subclass ``FunctionPass``. +#. If you don't need to look at the program at all, subclass ``ImmutablePass``. + +In addition to the pass that you subclass, you should also inherit from the +``AliasAnalysis`` interface, of course, and use the ``RegisterAnalysisGroup`` +template to register as an implementation of ``AliasAnalysis``. + +Required initialization calls +----------------------------- + +Your subclass of ``AliasAnalysis`` is required to invoke two methods on the +``AliasAnalysis`` base class: ``getAnalysisUsage`` and +``InitializeAliasAnalysis``. In particular, your implementation of +``getAnalysisUsage`` should explicitly call into the +``AliasAnalysis::getAnalysisUsage`` method in addition to doing any declaring +any pass dependencies your pass has. Thus you should have something like this: + +.. code-block:: c++ + + void getAnalysisUsage(AnalysisUsage &AU) const { + AliasAnalysis::getAnalysisUsage(AU); + // declare your dependencies here. + } + +Additionally, your must invoke the ``InitializeAliasAnalysis`` method from your +analysis run method (``run`` for a ``Pass``, ``runOnFunction`` for a +``FunctionPass``, or ``InitializePass`` for an ``ImmutablePass``). For example +(as part of a ``Pass``): + +.. code-block:: c++ + + bool run(Module &M) { + InitializeAliasAnalysis(this); + // Perform analysis here... + return false; + } + +Interfaces which may be specified +--------------------------------- + +All of the `AliasAnalysis +`__ virtual methods +default to providing :ref:`chaining ` to another alias +analysis implementation, which ends up returning conservatively correct +information (returning "May" Alias and "Mod/Ref" for alias and mod/ref queries +respectively). Depending on the capabilities of the analysis you are +implementing, you just override the interfaces you can improve. + +.. _aliasanalysis-chaining: + +``AliasAnalysis`` chaining behavior +----------------------------------- + +With only one special exception (the :ref:`-no-aa ` pass) +every alias analysis pass chains to another alias analysis implementation (for +example, the user can specify "``-basicaa -ds-aa -licm``" to get the maximum +benefit from both alias analyses). The alias analysis class automatically +takes care of most of this for methods that you don't override. For methods +that you do override, in code paths that return a conservative MayAlias or +Mod/Ref result, simply return whatever the superclass computes. For example: + +.. code-block:: c++ + + AliasAnalysis::AliasResult alias(const Value *V1, unsigned V1Size, + const Value *V2, unsigned V2Size) { + if (...) + return NoAlias; + ... + + // Couldn't determine a must or no-alias result. + return AliasAnalysis::alias(V1, V1Size, V2, V2Size); + } + +In addition to analysis queries, you must make sure to unconditionally pass LLVM +`update notification`_ methods to the superclass as well if you override them, +which allows all alias analyses in a change to be updated. + +.. _update notification: + +Updating analysis results for transformations +--------------------------------------------- + +Alias analysis information is initially computed for a static snapshot of the +program, but clients will use this information to make transformations to the +code. All but the most trivial forms of alias analysis will need to have their +analysis results updated to reflect the changes made by these transformations. + +The ``AliasAnalysis`` interface exposes four methods which are used to +communicate program changes from the clients to the analysis implementations. +Various alias analysis implementations should use these methods to ensure that +their internal data structures are kept up-to-date as the program changes (for +example, when an instruction is deleted), and clients of alias analysis must be +sure to call these interfaces appropriately. + +The ``deleteValue`` method +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``deleteValue`` method is called by transformations when they remove an +instruction or any other value from the program (including values that do not +use pointers). Typically alias analyses keep data structures that have entries +for each value in the program. When this method is called, they should remove +any entries for the specified value, if they exist. + +The ``copyValue`` method +^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``copyValue`` method is used when a new value is introduced into the +program. There is no way to introduce a value into the program that did not +exist before (this doesn't make sense for a safe compiler transformation), so +this is the only way to introduce a new value. This method indicates that the +new value has exactly the same properties as the value being copied. + +The ``replaceWithNewValue`` method +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This method is a simple helper method that is provided to make clients easier to +use. It is implemented by copying the old analysis information to the new +value, then deleting the old value. This method cannot be overridden by alias +analysis implementations. + +The ``addEscapingUse`` method +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``addEscapingUse`` method is used when the uses of a pointer value have +changed in ways that may invalidate precomputed analysis information. +Implementations may either use this callback to provide conservative responses +for points whose uses have change since analysis time, or may recompute some or +all of their internal state to continue providing accurate responses. + +In general, any new use of a pointer value is considered an escaping use, and +must be reported through this callback, *except* for the uses below: + +* A ``bitcast`` or ``getelementptr`` of the pointer +* A ``store`` through the pointer (but not a ``store`` *of* the pointer) +* A ``load`` through the pointer + +Efficiency Issues +----------------- + +From the LLVM perspective, the only thing you need to do to provide an efficient +alias analysis is to make sure that alias analysis **queries** are serviced +quickly. The actual calculation of the alias analysis results (the "run" +method) is only performed once, but many (perhaps duplicate) queries may be +performed. Because of this, try to move as much computation to the run method +as possible (within reason). + +Limitations +----------- + +The AliasAnalysis infrastructure has several limitations which make writing a +new ``AliasAnalysis`` implementation difficult. + +There is no way to override the default alias analysis. It would be very useful +to be able to do something like "``opt -my-aa -O2``" and have it use ``-my-aa`` +for all passes which need AliasAnalysis, but there is currently no support for +that, short of changing the source code and recompiling. Similarly, there is +also no way of setting a chain of analyses as the default. + +There is no way for transform passes to declare that they preserve +``AliasAnalysis`` implementations. The ``AliasAnalysis`` interface includes +``deleteValue`` and ``copyValue`` methods which are intended to allow a pass to +keep an AliasAnalysis consistent, however there's no way for a pass to declare +in its ``getAnalysisUsage`` that it does so. Some passes attempt to use +``AU.addPreserved``, however this doesn't actually have any +effect. + +``AliasAnalysisCounter`` (``-count-aa``) and ``AliasDebugger`` (``-debug-aa``) +are implemented as ``ModulePass`` classes, so if your alias analysis uses +``FunctionPass``, it won't be able to use these utilities. If you try to use +them, the pass manager will silently route alias analysis queries directly to +``BasicAliasAnalysis`` instead. + +Similarly, the ``opt -p`` option introduces ``ModulePass`` passes between each +pass, which prevents the use of ``FunctionPass`` alias analysis passes. + +The ``AliasAnalysis`` API does have functions for notifying implementations when +values are deleted or copied, however these aren't sufficient. There are many +other ways that LLVM IR can be modified which could be relevant to +``AliasAnalysis`` implementations which can not be expressed. + +The ``AliasAnalysisDebugger`` utility seems to suggest that ``AliasAnalysis`` +implementations can expect that they will be informed of any relevant ``Value`` +before it appears in an alias query. However, popular clients such as ``GVN`` +don't support this, and are known to trigger errors when run with the +``AliasAnalysisDebugger``. + +Due to several of the above limitations, the most obvious use for the +``AliasAnalysisCounter`` utility, collecting stats on all alias queries in a +compilation, doesn't work, even if the ``AliasAnalysis`` implementations don't +use ``FunctionPass``. There's no way to set a default, much less a default +sequence, and there's no way to preserve it. + +The ``AliasSetTracker`` class (which is used by ``LICM``) makes a +non-deterministic number of alias queries. This can cause stats collected by +``AliasAnalysisCounter`` to have fluctuations among identical runs, for +example. Another consequence is that debugging techniques involving pausing +execution after a predetermined number of queries can be unreliable. + +Many alias queries can be reformulated in terms of other alias queries. When +multiple ``AliasAnalysis`` queries are chained together, it would make sense to +start those queries from the beginning of the chain, with care taken to avoid +infinite looping, however currently an implementation which wants to do this can +only start such queries from itself. + +Using alias analysis results +============================ + +There are several different ways to use alias analysis results. In order of +preference, these are: + +Using the ``MemoryDependenceAnalysis`` Pass +------------------------------------------- + +The ``memdep`` pass uses alias analysis to provide high-level dependence +information about memory-using instructions. This will tell you which store +feeds into a load, for example. It uses caching and other techniques to be +efficient, and is used by Dead Store Elimination, GVN, and memcpy optimizations. + +.. _AliasSetTracker: + +Using the ``AliasSetTracker`` class +----------------------------------- + +Many transformations need information about alias **sets** that are active in +some scope, rather than information about pairwise aliasing. The +`AliasSetTracker `__ +class is used to efficiently build these Alias Sets from the pairwise alias +analysis information provided by the ``AliasAnalysis`` interface. + +First you initialize the AliasSetTracker by using the "``add``" methods to add +information about various potentially aliasing instructions in the scope you are +interested in. Once all of the alias sets are completed, your pass should +simply iterate through the constructed alias sets, using the ``AliasSetTracker`` +``begin()``/``end()`` methods. + +The ``AliasSet``\s formed by the ``AliasSetTracker`` are guaranteed to be +disjoint, calculate mod/ref information and volatility for the set, and keep +track of whether or not all of the pointers in the set are Must aliases. The +AliasSetTracker also makes sure that sets are properly folded due to call +instructions, and can provide a list of pointers in each set. + +As an example user of this, the `Loop Invariant Code Motion +`_ pass uses ``AliasSetTracker``\s to calculate alias +sets for each loop nest. If an ``AliasSet`` in a loop is not modified, then all +load instructions from that set may be hoisted out of the loop. If any alias +sets are stored to **and** are must alias sets, then the stores may be sunk +to outside of the loop, promoting the memory location to a register for the +duration of the loop nest. Both of these transformations only apply if the +pointer argument is loop-invariant. + +The AliasSetTracker implementation +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The AliasSetTracker class is implemented to be as efficient as possible. It +uses the union-find algorithm to efficiently merge AliasSets when a pointer is +inserted into the AliasSetTracker that aliases multiple sets. The primary data +structure is a hash table mapping pointers to the AliasSet they are in. + +The AliasSetTracker class must maintain a list of all of the LLVM ``Value*``\s +that are in each AliasSet. Since the hash table already has entries for each +LLVM ``Value*`` of interest, the AliasesSets thread the linked list through +these hash-table nodes to avoid having to allocate memory unnecessarily, and to +make merging alias sets extremely efficient (the linked list merge is constant +time). + +You shouldn't need to understand these details if you are just a client of the +AliasSetTracker, but if you look at the code, hopefully this brief description +will help make sense of why things are designed the way they are. + +Using the ``AliasAnalysis`` interface directly +---------------------------------------------- + +If neither of these utility class are what your pass needs, you should use the +interfaces exposed by the ``AliasAnalysis`` class directly. Try to use the +higher-level methods when possible (e.g., use mod/ref information instead of the +`alias`_ method directly if possible) to get the best precision and efficiency. + +Existing alias analysis implementations and clients +=================================================== + +If you're going to be working with the LLVM alias analysis infrastructure, you +should know what clients and implementations of alias analysis are available. +In particular, if you are implementing an alias analysis, you should be aware of +the `the clients`_ that are useful for monitoring and evaluating different +implementations. + +.. _various alias analysis implementations: + +Available ``AliasAnalysis`` implementations +------------------------------------------- + +This section lists the various implementations of the ``AliasAnalysis`` +interface. With the exception of the :ref:`-no-aa ` +implementation, all of these :ref:`chain ` to other +alias analysis implementations. + +.. _aliasanalysis-no-aa: + +The ``-no-aa`` pass +^^^^^^^^^^^^^^^^^^^ + +The ``-no-aa`` pass is just like what it sounds: an alias analysis that never +returns any useful information. This pass can be useful if you think that alias +analysis is doing something wrong and are trying to narrow down a problem. + +The ``-basicaa`` pass +^^^^^^^^^^^^^^^^^^^^^ + +The ``-basicaa`` pass is an aggressive local analysis that *knows* many +important facts: + +* Distinct globals, stack allocations, and heap allocations can never alias. +* Globals, stack allocations, and heap allocations never alias the null pointer. +* Different fields of a structure do not alias. +* Indexes into arrays with statically differing subscripts cannot alias. +* Many common standard C library functions `never access memory or only read + memory`_. +* Pointers that obviously point to constant globals "``pointToConstantMemory``". +* Function calls can not modify or references stack allocations if they never + escape from the function that allocates them (a common case for automatic + arrays). + +The ``-globalsmodref-aa`` pass +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This pass implements a simple context-sensitive mod/ref and alias analysis for +internal global variables that don't "have their address taken". If a global +does not have its address taken, the pass knows that no pointers alias the +global. This pass also keeps track of functions that it knows never access +memory or never read memory. This allows certain optimizations (e.g. GVN) to +eliminate call instructions entirely. + +The real power of this pass is that it provides context-sensitive mod/ref +information for call instructions. This allows the optimizer to know that calls +to a function do not clobber or read the value of the global, allowing loads and +stores to be eliminated. + +.. note:: + + This pass is somewhat limited in its scope (only support non-address taken + globals), but is very quick analysis. + +The ``-steens-aa`` pass +^^^^^^^^^^^^^^^^^^^^^^^ + +The ``-steens-aa`` pass implements a variation on the well-known "Steensgaard's +algorithm" for interprocedural alias analysis. Steensgaard's algorithm is a +unification-based, flow-insensitive, context-insensitive, and field-insensitive +alias analysis that is also very scalable (effectively linear time). + +The LLVM ``-steens-aa`` pass implements a "speculatively field-**sensitive**" +version of Steensgaard's algorithm using the Data Structure Analysis framework. +This gives it substantially more precision than the standard algorithm while +maintaining excellent analysis scalability. + +.. note:: + + ``-steens-aa`` is available in the optional "poolalloc" module. It is not part + of the LLVM core. + +The ``-ds-aa`` pass +^^^^^^^^^^^^^^^^^^^ + +The ``-ds-aa`` pass implements the full Data Structure Analysis algorithm. Data +Structure Analysis is a modular unification-based, flow-insensitive, +context-**sensitive**, and speculatively field-**sensitive** alias +analysis that is also quite scalable, usually at ``O(n * log(n))``. + +This algorithm is capable of responding to a full variety of alias analysis +queries, and can provide context-sensitive mod/ref information as well. The +only major facility not implemented so far is support for must-alias +information. + +.. note:: + + ``-ds-aa`` is available in the optional "poolalloc" module. It is not part of + the LLVM core. + +The ``-scev-aa`` pass +^^^^^^^^^^^^^^^^^^^^^ + +The ``-scev-aa`` pass implements AliasAnalysis queries by translating them into +ScalarEvolution queries. This gives it a more complete understanding of +``getelementptr`` instructions and loop induction variables than other alias +analyses have. + +Alias analysis driven transformations +------------------------------------- + +LLVM includes several alias-analysis driven transformations which can be used +with any of the implementations above. + +The ``-adce`` pass +^^^^^^^^^^^^^^^^^^ + +The ``-adce`` pass, which implements Aggressive Dead Code Elimination uses the +``AliasAnalysis`` interface to delete calls to functions that do not have +side-effects and are not used. + +The ``-licm`` pass +^^^^^^^^^^^^^^^^^^ + +The ``-licm`` pass implements various Loop Invariant Code Motion related +transformations. It uses the ``AliasAnalysis`` interface for several different +transformations: + +* It uses mod/ref information to hoist or sink load instructions out of loops if + there are no instructions in the loop that modifies the memory loaded. + +* It uses mod/ref information to hoist function calls out of loops that do not + write to memory and are loop-invariant. + +* If uses alias information to promote memory objects that are loaded and stored + to in loops to live in a register instead. It can do this if there are no may + aliases to the loaded/stored memory location. + +The ``-argpromotion`` pass +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``-argpromotion`` pass promotes by-reference arguments to be passed in +by-value instead. In particular, if pointer arguments are only loaded from it +passes in the value loaded instead of the address to the function. This pass +uses alias information to make sure that the value loaded from the argument +pointer is not modified between the entry of the function and any load of the +pointer. + +The ``-gvn``, ``-memcpyopt``, and ``-dse`` passes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +These passes use AliasAnalysis information to reason about loads and stores. + +.. _the clients: + +Clients for debugging and evaluation of implementations +------------------------------------------------------- + +These passes are useful for evaluating the various alias analysis +implementations. You can use them with commands like: + +.. code-block:: bash + + % opt -ds-aa -aa-eval foo.bc -disable-output -stats + +The ``-print-alias-sets`` pass +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``-print-alias-sets`` pass is exposed as part of the ``opt`` tool to print +out the Alias Sets formed by the `AliasSetTracker`_ class. This is useful if +you're using the ``AliasSetTracker`` class. To use it, use something like: + +.. code-block:: bash + + % opt -ds-aa -print-alias-sets -disable-output + +The ``-count-aa`` pass +^^^^^^^^^^^^^^^^^^^^^^ + +The ``-count-aa`` pass is useful to see how many queries a particular pass is +making and what responses are returned by the alias analysis. As an example: + +.. code-block:: bash + + % opt -basicaa -count-aa -ds-aa -count-aa -licm + +will print out how many queries (and what responses are returned) by the +``-licm`` pass (of the ``-ds-aa`` pass) and how many queries are made of the +``-basicaa`` pass by the ``-ds-aa`` pass. This can be useful when debugging a +transformation or an alias analysis implementation. + +The ``-aa-eval`` pass +^^^^^^^^^^^^^^^^^^^^^ + +The ``-aa-eval`` pass simply iterates through all pairs of pointers in a +function and asks an alias analysis whether or not the pointers alias. This +gives an indication of the precision of the alias analysis. Statistics are +printed indicating the percent of no/may/must aliases found (a more precise +algorithm will have a lower number of may aliases). + +Memory Dependence Analysis +========================== + +If you're just looking to be a client of alias analysis information, consider +using the Memory Dependence Analysis interface instead. MemDep is a lazy, +caching layer on top of alias analysis that is able to answer the question of +what preceding memory operations a given instruction depends on, either at an +intra- or inter-block level. Because of its laziness and caching policy, using +MemDep can be a significant performance win over accessing alias analysis +directly. diff --git a/docs/Atomics.rst b/docs/Atomics.rst new file mode 100644 index 00000000..1243f345 --- /dev/null +++ b/docs/Atomics.rst @@ -0,0 +1,439 @@ +============================================== +LLVM Atomic Instructions and Concurrency Guide +============================================== + +.. contents:: + :local: + +Introduction +============ + +Historically, LLVM has not had very strong support for concurrency; some minimal +intrinsics were provided, and ``volatile`` was used in some cases to achieve +rough semantics in the presence of concurrency. However, this is changing; +there are now new instructions which are well-defined in the presence of threads +and asynchronous signals, and the model for existing instructions has been +clarified in the IR. + +The atomic instructions are designed specifically to provide readable IR and +optimized code generation for the following: + +* The new C++0x ```` header. (`C++0x draft available here + `_.) (`C1x draft available here + `_.) + +* Proper semantics for Java-style memory, for both ``volatile`` and regular + shared variables. (`Java Specification + `_) + +* gcc-compatible ``__sync_*`` builtins. (`Description + `_) + +* Other scenarios with atomic semantics, including ``static`` variables with + non-trivial constructors in C++. + +Atomic and volatile in the IR are orthogonal; "volatile" is the C/C++ volatile, +which ensures that every volatile load and store happens and is performed in the +stated order. A couple examples: if a SequentiallyConsistent store is +immediately followed by another SequentiallyConsistent store to the same +address, the first store can be erased. This transformation is not allowed for a +pair of volatile stores. On the other hand, a non-volatile non-atomic load can +be moved across a volatile load freely, but not an Acquire load. + +This document is intended to provide a guide to anyone either writing a frontend +for LLVM or working on optimization passes for LLVM with a guide for how to deal +with instructions with special semantics in the presence of concurrency. This +is not intended to be a precise guide to the semantics; the details can get +extremely complicated and unreadable, and are not usually necessary. + +.. _Optimization outside atomic: + +Optimization outside atomic +=========================== + +The basic ``'load'`` and ``'store'`` allow a variety of optimizations, but can +lead to undefined results in a concurrent environment; see `NotAtomic`_. This +section specifically goes into the one optimizer restriction which applies in +concurrent environments, which gets a bit more of an extended description +because any optimization dealing with stores needs to be aware of it. + +From the optimizer's point of view, the rule is that if there are not any +instructions with atomic ordering involved, concurrency does not matter, with +one exception: if a variable might be visible to another thread or signal +handler, a store cannot be inserted along a path where it might not execute +otherwise. Take the following example: + +.. code-block:: c + + /* C code, for readability; run through clang -O2 -S -emit-llvm to get + equivalent IR */ + int x; + void f(int* a) { + for (int i = 0; i < 100; i++) { + if (a[i]) + x += 1; + } + } + +The following is equivalent in non-concurrent situations: + +.. code-block:: c + + int x; + void f(int* a) { + int xtemp = x; + for (int i = 0; i < 100; i++) { + if (a[i]) + xtemp += 1; + } + x = xtemp; + } + +However, LLVM is not allowed to transform the former to the latter: it could +indirectly introduce undefined behavior if another thread can access ``x`` at +the same time. (This example is particularly of interest because before the +concurrency model was implemented, LLVM would perform this transformation.) + +Note that speculative loads are allowed; a load which is part of a race returns +``undef``, but does not have undefined behavior. + +Atomic instructions +=================== + +For cases where simple loads and stores are not sufficient, LLVM provides +various atomic instructions. The exact guarantees provided depend on the +ordering; see `Atomic orderings`_. + +``load atomic`` and ``store atomic`` provide the same basic functionality as +non-atomic loads and stores, but provide additional guarantees in situations +where threads and signals are involved. + +``cmpxchg`` and ``atomicrmw`` are essentially like an atomic load followed by an +atomic store (where the store is conditional for ``cmpxchg``), but no other +memory operation can happen on any thread between the load and store. Note that +LLVM's cmpxchg does not provide quite as many options as the C++0x version. + +A ``fence`` provides Acquire and/or Release ordering which is not part of +another operation; it is normally used along with Monotonic memory operations. +A Monotonic load followed by an Acquire fence is roughly equivalent to an +Acquire load. + +Frontends generating atomic instructions generally need to be aware of the +target to some degree; atomic instructions are guaranteed to be lock-free, and +therefore an instruction which is wider than the target natively supports can be +impossible to generate. + +.. _Atomic orderings: + +Atomic orderings +================ + +In order to achieve a balance between performance and necessary guarantees, +there are six levels of atomicity. They are listed in order of strength; each +level includes all the guarantees of the previous level except for +Acquire/Release. (See also `LangRef Ordering `_.) + +.. _NotAtomic: + +NotAtomic +--------- + +NotAtomic is the obvious, a load or store which is not atomic. (This isn't +really a level of atomicity, but is listed here for comparison.) This is +essentially a regular load or store. If there is a race on a given memory +location, loads from that location return undef. + +Relevant standard + This is intended to match shared variables in C/C++, and to be used in any + other context where memory access is necessary, and a race is impossible. (The + precise definition is in `LangRef Memory Model `_.) + +Notes for frontends + The rule is essentially that all memory accessed with basic loads and stores + by multiple threads should be protected by a lock or other synchronization; + otherwise, you are likely to run into undefined behavior. If your frontend is + for a "safe" language like Java, use Unordered to load and store any shared + variable. Note that NotAtomic volatile loads and stores are not properly + atomic; do not try to use them as a substitute. (Per the C/C++ standards, + volatile does provide some limited guarantees around asynchronous signals, but + atomics are generally a better solution.) + +Notes for optimizers + Introducing loads to shared variables along a codepath where they would not + otherwise exist is allowed; introducing stores to shared variables is not. See + `Optimization outside atomic`_. + +Notes for code generation + The one interesting restriction here is that it is not allowed to write to + bytes outside of the bytes relevant to a store. This is mostly relevant to + unaligned stores: it is not allowed in general to convert an unaligned store + into two aligned stores of the same width as the unaligned store. Backends are + also expected to generate an i8 store as an i8 store, and not an instruction + which writes to surrounding bytes. (If you are writing a backend for an + architecture which cannot satisfy these restrictions and cares about + concurrency, please send an email to llvmdev.) + +Unordered +--------- + +Unordered is the lowest level of atomicity. It essentially guarantees that races +produce somewhat sane results instead of having undefined behavior. It also +guarantees the operation to be lock-free, so it do not depend on the data being +part of a special atomic structure or depend on a separate per-process global +lock. Note that code generation will fail for unsupported atomic operations; if +you need such an operation, use explicit locking. + +Relevant standard + This is intended to match the Java memory model for shared variables. + +Notes for frontends + This cannot be used for synchronization, but is useful for Java and other + "safe" languages which need to guarantee that the generated code never + exhibits undefined behavior. Note that this guarantee is cheap on common + platforms for loads of a native width, but can be expensive or unavailable for + wider loads, like a 64-bit store on ARM. (A frontend for Java or other "safe" + languages would normally split a 64-bit store on ARM into two 32-bit unordered + stores.) + +Notes for optimizers + In terms of the optimizer, this prohibits any transformation that transforms a + single load into multiple loads, transforms a store into multiple stores, + narrows a store, or stores a value which would not be stored otherwise. Some + examples of unsafe optimizations are narrowing an assignment into a bitfield, + rematerializing a load, and turning loads and stores into a memcpy + call. Reordering unordered operations is safe, though, and optimizers should + take advantage of that because unordered operations are common in languages + that need them. + +Notes for code generation + These operations are required to be atomic in the sense that if you use + unordered loads and unordered stores, a load cannot see a value which was + never stored. A normal load or store instruction is usually sufficient, but + note that an unordered load or store cannot be split into multiple + instructions (or an instruction which does multiple memory operations, like + ``LDRD`` on ARM without LPAE, or not naturally-aligned ``LDRD`` on LPAE ARM). + +Monotonic +--------- + +Monotonic is the weakest level of atomicity that can be used in synchronization +primitives, although it does not provide any general synchronization. It +essentially guarantees that if you take all the operations affecting a specific +address, a consistent ordering exists. + +Relevant standard + This corresponds to the C++0x/C1x ``memory_order_relaxed``; see those + standards for the exact definition. + +Notes for frontends + If you are writing a frontend which uses this directly, use with caution. The + guarantees in terms of synchronization are very weak, so make sure these are + only used in a pattern which you know is correct. Generally, these would + either be used for atomic operations which do not protect other memory (like + an atomic counter), or along with a ``fence``. + +Notes for optimizers + In terms of the optimizer, this can be treated as a read+write on the relevant + memory location (and alias analysis will take advantage of that). In addition, + it is legal to reorder non-atomic and Unordered loads around Monotonic + loads. CSE/DSE and a few other optimizations are allowed, but Monotonic + operations are unlikely to be used in ways which would make those + optimizations useful. + +Notes for code generation + Code generation is essentially the same as that for unordered for loads and + stores. No fences are required. ``cmpxchg`` and ``atomicrmw`` are required + to appear as a single operation. + +Acquire +------- + +Acquire provides a barrier of the sort necessary to acquire a lock to access +other memory with normal loads and stores. + +Relevant standard + This corresponds to the C++0x/C1x ``memory_order_acquire``. It should also be + used for C++0x/C1x ``memory_order_consume``. + +Notes for frontends + If you are writing a frontend which uses this directly, use with caution. + Acquire only provides a semantic guarantee when paired with a Release + operation. + +Notes for optimizers + Optimizers not aware of atomics can treat this like a nothrow call. It is + also possible to move stores from before an Acquire load or read-modify-write + operation to after it, and move non-Acquire loads from before an Acquire + operation to after it. + +Notes for code generation + Architectures with weak memory ordering (essentially everything relevant today + except x86 and SPARC) require some sort of fence to maintain the Acquire + semantics. The precise fences required varies widely by architecture, but for + a simple implementation, most architectures provide a barrier which is strong + enough for everything (``dmb`` on ARM, ``sync`` on PowerPC, etc.). Putting + such a fence after the equivalent Monotonic operation is sufficient to + maintain Acquire semantics for a memory operation. + +Release +------- + +Release is similar to Acquire, but with a barrier of the sort necessary to +release a lock. + +Relevant standard + This corresponds to the C++0x/C1x ``memory_order_release``. + +Notes for frontends + If you are writing a frontend which uses this directly, use with caution. + Release only provides a semantic guarantee when paired with a Acquire + operation. + +Notes for optimizers + Optimizers not aware of atomics can treat this like a nothrow call. It is + also possible to move loads from after a Release store or read-modify-write + operation to before it, and move non-Release stores from after an Release + operation to before it. + +Notes for code generation + See the section on Acquire; a fence before the relevant operation is usually + sufficient for Release. Note that a store-store fence is not sufficient to + implement Release semantics; store-store fences are generally not exposed to + IR because they are extremely difficult to use correctly. + +AcquireRelease +-------------- + +AcquireRelease (``acq_rel`` in IR) provides both an Acquire and a Release +barrier (for fences and operations which both read and write memory). + +Relevant standard + This corresponds to the C++0x/C1x ``memory_order_acq_rel``. + +Notes for frontends + If you are writing a frontend which uses this directly, use with caution. + Acquire only provides a semantic guarantee when paired with a Release + operation, and vice versa. + +Notes for optimizers + In general, optimizers should treat this like a nothrow call; the possible + optimizations are usually not interesting. + +Notes for code generation + This operation has Acquire and Release semantics; see the sections on Acquire + and Release. + +SequentiallyConsistent +---------------------- + +SequentiallyConsistent (``seq_cst`` in IR) provides Acquire semantics for loads +and Release semantics for stores. Additionally, it guarantees that a total +ordering exists between all SequentiallyConsistent operations. + +Relevant standard + This corresponds to the C++0x/C1x ``memory_order_seq_cst``, Java volatile, and + the gcc-compatible ``__sync_*`` builtins which do not specify otherwise. + +Notes for frontends + If a frontend is exposing atomic operations, these are much easier to reason + about for the programmer than other kinds of operations, and using them is + generally a practical performance tradeoff. + +Notes for optimizers + Optimizers not aware of atomics can treat this like a nothrow call. For + SequentiallyConsistent loads and stores, the same reorderings are allowed as + for Acquire loads and Release stores, except that SequentiallyConsistent + operations may not be reordered. + +Notes for code generation + SequentiallyConsistent loads minimally require the same barriers as Acquire + operations and SequentiallyConsistent stores require Release + barriers. Additionally, the code generator must enforce ordering between + SequentiallyConsistent stores followed by SequentiallyConsistent loads. This + is usually done by emitting either a full fence before the loads or a full + fence after the stores; which is preferred varies by architecture. + +Atomics and IR optimization +=========================== + +Predicates for optimizer writers to query: + +* ``isSimple()``: A load or store which is not volatile or atomic. This is + what, for example, memcpyopt would check for operations it might transform. + +* ``isUnordered()``: A load or store which is not volatile and at most + Unordered. This would be checked, for example, by LICM before hoisting an + operation. + +* ``mayReadFromMemory()``/``mayWriteToMemory()``: Existing predicate, but note + that they return true for any operation which is volatile or at least + Monotonic. + +* Alias analysis: Note that AA will return ModRef for anything Acquire or + Release, and for the address accessed by any Monotonic operation. + +To support optimizing around atomic operations, make sure you are using the +right predicates; everything should work if that is done. If your pass should +optimize some atomic operations (Unordered operations in particular), make sure +it doesn't replace an atomic load or store with a non-atomic operation. + +Some examples of how optimizations interact with various kinds of atomic +operations: + +* ``memcpyopt``: An atomic operation cannot be optimized into part of a + memcpy/memset, including unordered loads/stores. It can pull operations + across some atomic operations. + +* LICM: Unordered loads/stores can be moved out of a loop. It just treats + monotonic operations like a read+write to a memory location, and anything + stricter than that like a nothrow call. + +* DSE: Unordered stores can be DSE'ed like normal stores. Monotonic stores can + be DSE'ed in some cases, but it's tricky to reason about, and not especially + important. + +* Folding a load: Any atomic load from a constant global can be constant-folded, + because it cannot be observed. Similar reasoning allows scalarrepl with + atomic loads and stores. + +Atomics and Codegen +=================== + +Atomic operations are represented in the SelectionDAG with ``ATOMIC_*`` opcodes. +On architectures which use barrier instructions for all atomic ordering (like +ARM), appropriate fences are split out as the DAG is built. + +The MachineMemOperand for all atomic operations is currently marked as volatile; +this is not correct in the IR sense of volatile, but CodeGen handles anything +marked volatile very conservatively. This should get fixed at some point. + +Common architectures have some way of representing at least a pointer-sized +lock-free ``cmpxchg``; such an operation can be used to implement all the other +atomic operations which can be represented in IR up to that size. Backends are +expected to implement all those operations, but not operations which cannot be +implemented in a lock-free manner. It is expected that backends will give an +error when given an operation which cannot be implemented. (The LLVM code +generator is not very helpful here at the moment, but hopefully that will +change.) + +The implementation of atomics on LL/SC architectures (like ARM) is currently a +bit of a mess; there is a lot of copy-pasted code across targets, and the +representation is relatively unsuited to optimization (it would be nice to be +able to optimize loops involving cmpxchg etc.). + +On x86, all atomic loads generate a ``MOV``. SequentiallyConsistent stores +generate an ``XCHG``, other stores generate a ``MOV``. SequentiallyConsistent +fences generate an ``MFENCE``, other fences do not cause any code to be +generated. cmpxchg uses the ``LOCK CMPXCHG`` instruction. ``atomicrmw xchg`` +uses ``XCHG``, ``atomicrmw add`` and ``atomicrmw sub`` use ``XADD``, and all +other ``atomicrmw`` operations generate a loop with ``LOCK CMPXCHG``. Depending +on the users of the result, some ``atomicrmw`` operations can be translated into +operations like ``LOCK AND``, but that does not work in general. + +On ARM, MIPS, and many other RISC architectures, Acquire, Release, and +SequentiallyConsistent semantics require barrier instructions for every such +operation. Loads and stores generate normal instructions. ``cmpxchg`` and +``atomicrmw`` can be represented using a loop with LL/SC-style instructions +which take some sort of exclusive lock on a cache line (``LDREX`` and ``STREX`` +on ARM, etc.). At the moment, the IR does not provide any way to represent a +weak ``cmpxchg`` which would not require a loop. diff --git a/docs/BitCodeFormat.rst b/docs/BitCodeFormat.rst new file mode 100644 index 00000000..d9d1df0b --- /dev/null +++ b/docs/BitCodeFormat.rst @@ -0,0 +1,1093 @@ +.. role:: raw-html(raw) + :format: html + +======================== +LLVM Bitcode File Format +======================== + +.. contents:: + :local: + +Abstract +======== + +This document describes the LLVM bitstream file format and the encoding of the +LLVM IR into it. + +Overview +======== + +What is commonly known as the LLVM bitcode file format (also, sometimes +anachronistically known as bytecode) is actually two things: a `bitstream +container format`_ and an `encoding of LLVM IR`_ into the container format. + +The bitstream format is an abstract encoding of structured data, very similar to +XML in some ways. Like XML, bitstream files contain tags, and nested +structures, and you can parse the file without having to understand the tags. +Unlike XML, the bitstream format is a binary encoding, and unlike XML it +provides a mechanism for the file to self-describe "abbreviations", which are +effectively size optimizations for the content. + +LLVM IR files may be optionally embedded into a `wrapper`_ structure that makes +it easy to embed extra data along with LLVM IR files. + +This document first describes the LLVM bitstream format, describes the wrapper +format, then describes the record structure used by LLVM IR files. + +.. _bitstream container format: + +Bitstream Format +================ + +The bitstream format is literally a stream of bits, with a very simple +structure. This structure consists of the following concepts: + +* A "`magic number`_" that identifies the contents of the stream. + +* Encoding `primitives`_ like variable bit-rate integers. + +* `Blocks`_, which define nested content. + +* `Data Records`_, which describe entities within the file. + +* Abbreviations, which specify compression optimizations for the file. + +Note that the :doc:`llvm-bcanalyzer ` tool can be +used to dump and inspect arbitrary bitstreams, which is very useful for +understanding the encoding. + +.. _magic number: + +Magic Numbers +------------- + +The first two bytes of a bitcode file are 'BC' (``0x42``, ``0x43``). The second +two bytes are an application-specific magic number. Generic bitcode tools can +look at only the first two bytes to verify the file is bitcode, while +application-specific programs will want to look at all four. + +.. _primitives: + +Primitives +---------- + +A bitstream literally consists of a stream of bits, which are read in order +starting with the least significant bit of each byte. The stream is made up of +a number of primitive values that encode a stream of unsigned integer values. +These integers are encoded in two ways: either as `Fixed Width Integers`_ or as +`Variable Width Integers`_. + +.. _Fixed Width Integers: +.. _fixed-width value: + +Fixed Width Integers +^^^^^^^^^^^^^^^^^^^^ + +Fixed-width integer values have their low bits emitted directly to the file. +For example, a 3-bit integer value encodes 1 as 001. Fixed width integers are +used when there are a well-known number of options for a field. For example, +boolean values are usually encoded with a 1-bit wide integer. + +.. _Variable Width Integers: +.. _Variable Width Integer: +.. _variable-width value: + +Variable Width Integers +^^^^^^^^^^^^^^^^^^^^^^^ + +Variable-width integer (VBR) values encode values of arbitrary size, optimizing +for the case where the values are small. Given a 4-bit VBR field, any 3-bit +value (0 through 7) is encoded directly, with the high bit set to zero. Values +larger than N-1 bits emit their bits in a series of N-1 bit chunks, where all +but the last set the high bit. + +For example, the value 27 (0x1B) is encoded as 1011 0011 when emitted as a vbr4 +value. The first set of four bits indicates the value 3 (011) with a +continuation piece (indicated by a high bit of 1). The next word indicates a +value of 24 (011 << 3) with no continuation. The sum (3+24) yields the value +27. + +.. _char6-encoded value: + +6-bit characters +^^^^^^^^^^^^^^^^ + +6-bit characters encode common characters into a fixed 6-bit field. They +represent the following characters with the following 6-bit values: + +:: + + 'a' .. 'z' --- 0 .. 25 + 'A' .. 'Z' --- 26 .. 51 + '0' .. '9' --- 52 .. 61 + '.' --- 62 + '_' --- 63 + +This encoding is only suitable for encoding characters and strings that consist +only of the above characters. It is completely incapable of encoding characters +not in the set. + +Word Alignment +^^^^^^^^^^^^^^ + +Occasionally, it is useful to emit zero bits until the bitstream is a multiple +of 32 bits. This ensures that the bit position in the stream can be represented +as a multiple of 32-bit words. + +Abbreviation IDs +---------------- + +A bitstream is a sequential series of `Blocks`_ and `Data Records`_. Both of +these start with an abbreviation ID encoded as a fixed-bitwidth field. The +width is specified by the current block, as described below. The value of the +abbreviation ID specifies either a builtin ID (which have special meanings, +defined below) or one of the abbreviation IDs defined for the current block by +the stream itself. + +The set of builtin abbrev IDs is: + +* 0 - `END_BLOCK`_ --- This abbrev ID marks the end of the current block. + +* 1 - `ENTER_SUBBLOCK`_ --- This abbrev ID marks the beginning of a new + block. + +* 2 - `DEFINE_ABBREV`_ --- This defines a new abbreviation. + +* 3 - `UNABBREV_RECORD`_ --- This ID specifies the definition of an + unabbreviated record. + +Abbreviation IDs 4 and above are defined by the stream itself, and specify an +`abbreviated record encoding`_. + +.. _Blocks: + +Blocks +------ + +Blocks in a bitstream denote nested regions of the stream, and are identified by +a content-specific id number (for example, LLVM IR uses an ID of 12 to represent +function bodies). Block IDs 0-7 are reserved for `standard blocks`_ whose +meaning is defined by Bitcode; block IDs 8 and greater are application +specific. Nested blocks capture the hierarchical structure of the data encoded +in it, and various properties are associated with blocks as the file is parsed. +Block definitions allow the reader to efficiently skip blocks in constant time +if the reader wants a summary of blocks, or if it wants to efficiently skip data +it does not understand. The LLVM IR reader uses this mechanism to skip function +bodies, lazily reading them on demand. + +When reading and encoding the stream, several properties are maintained for the +block. In particular, each block maintains: + +#. A current abbrev id width. This value starts at 2 at the beginning of the + stream, and is set every time a block record is entered. The block entry + specifies the abbrev id width for the body of the block. + +#. A set of abbreviations. Abbreviations may be defined within a block, in + which case they are only defined in that block (neither subblocks nor + enclosing blocks see the abbreviation). Abbreviations can also be defined + inside a `BLOCKINFO`_ block, in which case they are defined in all blocks + that match the ID that the ``BLOCKINFO`` block is describing. + +As sub blocks are entered, these properties are saved and the new sub-block has +its own set of abbreviations, and its own abbrev id width. When a sub-block is +popped, the saved values are restored. + +.. _ENTER_SUBBLOCK: + +ENTER_SUBBLOCK Encoding +^^^^^^^^^^^^^^^^^^^^^^^ + +:raw-html:`` +[ENTER_SUBBLOCK, blockid\ :sub:`vbr8`, newabbrevlen\ :sub:`vbr4`, , blocklen_32] +:raw-html:`` + +The ``ENTER_SUBBLOCK`` abbreviation ID specifies the start of a new block +record. The ``blockid`` value is encoded as an 8-bit VBR identifier, and +indicates the type of block being entered, which can be a `standard block`_ or +an application-specific block. The ``newabbrevlen`` value is a 4-bit VBR, which +specifies the abbrev id width for the sub-block. The ``blocklen`` value is a +32-bit aligned value that specifies the size of the subblock in 32-bit +words. This value allows the reader to skip over the entire block in one jump. + +.. _END_BLOCK: + +END_BLOCK Encoding +^^^^^^^^^^^^^^^^^^ + +``[END_BLOCK, ]`` + +The ``END_BLOCK`` abbreviation ID specifies the end of the current block record. +Its end is aligned to 32-bits to ensure that the size of the block is an even +multiple of 32-bits. + +.. _Data Records: + +Data Records +------------ + +Data records consist of a record code and a number of (up to) 64-bit integer +values. The interpretation of the code and values is application specific and +may vary between different block types. Records can be encoded either using an +unabbrev record, or with an abbreviation. In the LLVM IR format, for example, +there is a record which encodes the target triple of a module. The code is +``MODULE_CODE_TRIPLE``, and the values of the record are the ASCII codes for the +characters in the string. + +.. _UNABBREV_RECORD: + +UNABBREV_RECORD Encoding +^^^^^^^^^^^^^^^^^^^^^^^^ + +:raw-html:`` +[UNABBREV_RECORD, code\ :sub:`vbr6`, numops\ :sub:`vbr6`, op0\ :sub:`vbr6`, op1\ :sub:`vbr6`, ...] +:raw-html:`` + +An ``UNABBREV_RECORD`` provides a default fallback encoding, which is both +completely general and extremely inefficient. It can describe an arbitrary +record by emitting the code and operands as VBRs. + +For example, emitting an LLVM IR target triple as an unabbreviated record +requires emitting the ``UNABBREV_RECORD`` abbrevid, a vbr6 for the +``MODULE_CODE_TRIPLE`` code, a vbr6 for the length of the string, which is equal +to the number of operands, and a vbr6 for each character. Because there are no +letters with values less than 32, each letter would need to be emitted as at +least a two-part VBR, which means that each letter would require at least 12 +bits. This is not an efficient encoding, but it is fully general. + +.. _abbreviated record encoding: + +Abbreviated Record Encoding +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``[, fields...]`` + +An abbreviated record is a abbreviation id followed by a set of fields that are +encoded according to the `abbreviation definition`_. This allows records to be +encoded significantly more densely than records encoded with the +`UNABBREV_RECORD`_ type, and allows the abbreviation types to be specified in +the stream itself, which allows the files to be completely self describing. The +actual encoding of abbreviations is defined below. + +The record code, which is the first field of an abbreviated record, may be +encoded in the abbreviation definition (as a literal operand) or supplied in the +abbreviated record (as a Fixed or VBR operand value). + +.. _abbreviation definition: + +Abbreviations +------------- + +Abbreviations are an important form of compression for bitstreams. The idea is +to specify a dense encoding for a class of records once, then use that encoding +to emit many records. It takes space to emit the encoding into the file, but +the space is recouped (hopefully plus some) when the records that use it are +emitted. + +Abbreviations can be determined dynamically per client, per file. Because the +abbreviations are stored in the bitstream itself, different streams of the same +format can contain different sets of abbreviations according to the needs of the +specific stream. As a concrete example, LLVM IR files usually emit an +abbreviation for binary operators. If a specific LLVM module contained no or +few binary operators, the abbreviation does not need to be emitted. + +.. _DEFINE_ABBREV: + +DEFINE_ABBREV Encoding +^^^^^^^^^^^^^^^^^^^^^^ + +:raw-html:`` +[DEFINE_ABBREV, numabbrevops\ :sub:`vbr5`, abbrevop0, abbrevop1, ...] +:raw-html:`` + +A ``DEFINE_ABBREV`` record adds an abbreviation to the list of currently defined +abbreviations in the scope of this block. This definition only exists inside +this immediate block --- it is not visible in subblocks or enclosing blocks. +Abbreviations are implicitly assigned IDs sequentially starting from 4 (the +first application-defined abbreviation ID). Any abbreviations defined in a +``BLOCKINFO`` record for the particular block type receive IDs first, in order, +followed by any abbreviations defined within the block itself. Abbreviated data +records reference this ID to indicate what abbreviation they are invoking. + +An abbreviation definition consists of the ``DEFINE_ABBREV`` abbrevid followed +by a VBR that specifies the number of abbrev operands, then the abbrev operands +themselves. Abbreviation operands come in three forms. They all start with a +single bit that indicates whether the abbrev operand is a literal operand (when +the bit is 1) or an encoding operand (when the bit is 0). + +#. Literal operands --- :raw-html:`` [1\ :sub:`1`, litvalue\ + :sub:`vbr8`] :raw-html:`` --- Literal operands specify that the value in + the result is always a single specific value. This specific value is emitted + as a vbr8 after the bit indicating that it is a literal operand. + +#. Encoding info without data --- :raw-html:`` [0\ :sub:`1`, encoding\ + :sub:`3`] :raw-html:`` --- Operand encodings that do not have extra data + are just emitted as their code. + +#. Encoding info with data --- :raw-html:`` [0\ :sub:`1`, encoding\ + :sub:`3`, value\ :sub:`vbr5`] :raw-html:`` --- Operand encodings that do + have extra data are emitted as their code, followed by the extra data. + +The possible operand encodings are: + +* Fixed (code 1): The field should be emitted as a `fixed-width value`_, whose + width is specified by the operand's extra data. + +* VBR (code 2): The field should be emitted as a `variable-width value`_, whose + width is specified by the operand's extra data. + +* Array (code 3): This field is an array of values. The array operand has no + extra data, but expects another operand to follow it, indicating the element + type of the array. When reading an array in an abbreviated record, the first + integer is a vbr6 that indicates the array length, followed by the encoded + elements of the array. An array may only occur as the last operand of an + abbreviation (except for the one final operand that gives the array's + type). + +* Char6 (code 4): This field should be emitted as a `char6-encoded value`_. + This operand type takes no extra data. Char6 encoding is normally used as an + array element type. + +* Blob (code 5): This field is emitted as a vbr6, followed by padding to a + 32-bit boundary (for alignment) and an array of 8-bit objects. The array of + bytes is further followed by tail padding to ensure that its total length is a + multiple of 4 bytes. This makes it very efficient for the reader to decode + the data without having to make a copy of it: it can use a pointer to the data + in the mapped in file and poke directly at it. A blob may only occur as the + last operand of an abbreviation. + +For example, target triples in LLVM modules are encoded as a record of the form +``[TRIPLE, 'a', 'b', 'c', 'd']``. Consider if the bitstream emitted the +following abbrev entry: + +:: + + [0, Fixed, 4] + [0, Array] + [0, Char6] + +When emitting a record with this abbreviation, the above entry would be emitted +as: + +:raw-html:`
` +[4\ :sub:`abbrevwidth`, 2\ :sub:`4`, 4\ :sub:`vbr6`, 0\ :sub:`6`, 1\ :sub:`6`, 2\ :sub:`6`, 3\ :sub:`6`] +:raw-html:`
` + +These values are: + +#. The first value, 4, is the abbreviation ID for this abbreviation. + +#. The second value, 2, is the record code for ``TRIPLE`` records within LLVM IR + file ``MODULE_BLOCK`` blocks. + +#. The third value, 4, is the length of the array. + +#. The rest of the values are the char6 encoded values for ``"abcd"``. + +With this abbreviation, the triple is emitted with only 37 bits (assuming a +abbrev id width of 3). Without the abbreviation, significantly more space would +be required to emit the target triple. Also, because the ``TRIPLE`` value is +not emitted as a literal in the abbreviation, the abbreviation can also be used +for any other string value. + +.. _standard blocks: +.. _standard block: + +Standard Blocks +--------------- + +In addition to the basic block structure and record encodings, the bitstream +also defines specific built-in block types. These block types specify how the +stream is to be decoded or other metadata. In the future, new standard blocks +may be added. Block IDs 0-7 are reserved for standard blocks. + +.. _BLOCKINFO: + +#0 - BLOCKINFO Block +^^^^^^^^^^^^^^^^^^^^ + +The ``BLOCKINFO`` block allows the description of metadata for other blocks. +The currently specified records are: + +:: + + [SETBID (#1), blockid] + [DEFINE_ABBREV, ...] + [BLOCKNAME, ...name...] + [SETRECORDNAME, RecordID, ...name...] + +The ``SETBID`` record (code 1) indicates which block ID is being described. +``SETBID`` records can occur multiple times throughout the block to change which +block ID is being described. There must be a ``SETBID`` record prior to any +other records. + +Standard ``DEFINE_ABBREV`` records can occur inside ``BLOCKINFO`` blocks, but +unlike their occurrence in normal blocks, the abbreviation is defined for blocks +matching the block ID we are describing, *not* the ``BLOCKINFO`` block +itself. The abbreviations defined in ``BLOCKINFO`` blocks receive abbreviation +IDs as described in `DEFINE_ABBREV`_. + +The ``BLOCKNAME`` record (code 2) can optionally occur in this block. The +elements of the record are the bytes of the string name of the block. +llvm-bcanalyzer can use this to dump out bitcode files symbolically. + +The ``SETRECORDNAME`` record (code 3) can also optionally occur in this block. +The first operand value is a record ID number, and the rest of the elements of +the record are the bytes for the string name of the record. llvm-bcanalyzer can +use this to dump out bitcode files symbolically. + +Note that although the data in ``BLOCKINFO`` blocks is described as "metadata," +the abbreviations they contain are essential for parsing records from the +corresponding blocks. It is not safe to skip them. + +.. _wrapper: + +Bitcode Wrapper Format +====================== + +Bitcode files for LLVM IR may optionally be wrapped in a simple wrapper +structure. This structure contains a simple header that indicates the offset +and size of the embedded BC file. This allows additional information to be +stored alongside the BC file. The structure of this file header is: + +:raw-html:`
` +[Magic\ :sub:`32`, Version\ :sub:`32`, Offset\ :sub:`32`, Size\ :sub:`32`, CPUType\ :sub:`32`] +:raw-html:`
` + +Each of the fields are 32-bit fields stored in little endian form (as with the +rest of the bitcode file fields). The Magic number is always ``0x0B17C0DE`` and +the version is currently always ``0``. The Offset field is the offset in bytes +to the start of the bitcode stream in the file, and the Size field is the size +in bytes of the stream. CPUType is a target-specific value that can be used to +encode the CPU of the target. + +.. _encoding of LLVM IR: + +LLVM IR Encoding +================ + +LLVM IR is encoded into a bitstream by defining blocks and records. It uses +blocks for things like constant pools, functions, symbol tables, etc. It uses +records for things like instructions, global variable descriptors, type +descriptions, etc. This document does not describe the set of abbreviations +that the writer uses, as these are fully self-described in the file, and the +reader is not allowed to build in any knowledge of this. + +Basics +------ + +LLVM IR Magic Number +^^^^^^^^^^^^^^^^^^^^ + +The magic number for LLVM IR files is: + +:raw-html:`
` +[0x0\ :sub:`4`, 0xC\ :sub:`4`, 0xE\ :sub:`4`, 0xD\ :sub:`4`] +:raw-html:`
` + +When combined with the bitcode magic number and viewed as bytes, this is +``"BC 0xC0DE"``. + +.. _Signed VBRs: + +Signed VBRs +^^^^^^^^^^^ + +`Variable Width Integer`_ encoding is an efficient way to encode arbitrary sized +unsigned values, but is an extremely inefficient for encoding signed values, as +signed values are otherwise treated as maximally large unsigned values. + +As such, signed VBR values of a specific width are emitted as follows: + +* Positive values are emitted as VBRs of the specified width, but with their + value shifted left by one. + +* Negative values are emitted as VBRs of the specified width, but the negated + value is shifted left by one, and the low bit is set. + +With this encoding, small positive and small negative values can both be emitted +efficiently. Signed VBR encoding is used in ``CST_CODE_INTEGER`` and +``CST_CODE_WIDE_INTEGER`` records within ``CONSTANTS_BLOCK`` blocks. +It is also used for phi instruction operands in `MODULE_CODE_VERSION`_ 1. + +LLVM IR Blocks +^^^^^^^^^^^^^^ + +LLVM IR is defined with the following blocks: + +* 8 --- `MODULE_BLOCK`_ --- This is the top-level block that contains the entire + module, and describes a variety of per-module information. + +* 9 --- `PARAMATTR_BLOCK`_ --- This enumerates the parameter attributes. + +* 10 --- `TYPE_BLOCK`_ --- This describes all of the types in the module. + +* 11 --- `CONSTANTS_BLOCK`_ --- This describes constants for a module or + function. + +* 12 --- `FUNCTION_BLOCK`_ --- This describes a function body. + +* 13 --- `TYPE_SYMTAB_BLOCK`_ --- This describes the type symbol table. + +* 14 --- `VALUE_SYMTAB_BLOCK`_ --- This describes a value symbol table. + +* 15 --- `METADATA_BLOCK`_ --- This describes metadata items. + +* 16 --- `METADATA_ATTACHMENT`_ --- This contains records associating metadata + with function instruction values. + +.. _MODULE_BLOCK: + +MODULE_BLOCK Contents +--------------------- + +The ``MODULE_BLOCK`` block (id 8) is the top-level block for LLVM bitcode files, +and each bitcode file must contain exactly one. In addition to records +(described below) containing information about the module, a ``MODULE_BLOCK`` +block may contain the following sub-blocks: + +* `BLOCKINFO`_ +* `PARAMATTR_BLOCK`_ +* `TYPE_BLOCK`_ +* `TYPE_SYMTAB_BLOCK`_ +* `VALUE_SYMTAB_BLOCK`_ +* `CONSTANTS_BLOCK`_ +* `FUNCTION_BLOCK`_ +* `METADATA_BLOCK`_ + +.. _MODULE_CODE_VERSION: + +MODULE_CODE_VERSION Record +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``[VERSION, version#]`` + +The ``VERSION`` record (code 1) contains a single value indicating the format +version. Versions 0 and 1 are supported at this time. The difference between +version 0 and 1 is in the encoding of instruction operands in +each `FUNCTION_BLOCK`_. + +In version 0, each value defined by an instruction is assigned an ID +unique to the function. Function-level value IDs are assigned starting from +``NumModuleValues`` since they share the same namespace as module-level +values. The value enumerator resets after each function. When a value is +an operand of an instruction, the value ID is used to represent the operand. +For large functions or large modules, these operand values can be large. + +The encoding in version 1 attempts to avoid large operand values +in common cases. Instead of using the value ID directly, operands are +encoded as relative to the current instruction. Thus, if an operand +is the value defined by the previous instruction, the operand +will be encoded as 1. + +For example, instead of + +.. code-block:: llvm + + #n = load #n-1 + #n+1 = icmp eq #n, #const0 + br #n+1, label #(bb1), label #(bb2) + +version 1 will encode the instructions as + +.. code-block:: llvm + + #n = load #1 + #n+1 = icmp eq #1, (#n+1)-#const0 + br #1, label #(bb1), label #(bb2) + +Note in the example that operands which are constants also use +the relative encoding, while operands like basic block labels +do not use the relative encoding. + +Forward references will result in a negative value. +This can be inefficient, as operands are normally encoded +as unsigned VBRs. However, forward references are rare, except in the +case of phi instructions. For phi instructions, operands are encoded as +`Signed VBRs`_ to deal with forward references. + + +MODULE_CODE_TRIPLE Record +^^^^^^^^^^^^^^^^^^^^^^^^^ + +``[TRIPLE, ...string...]`` + +The ``TRIPLE`` record (code 2) contains a variable number of values representing +the bytes of the ``target triple`` specification string. + +MODULE_CODE_DATALAYOUT Record +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``[DATALAYOUT, ...string...]`` + +The ``DATALAYOUT`` record (code 3) contains a variable number of values +representing the bytes of the ``target datalayout`` specification string. + +MODULE_CODE_ASM Record +^^^^^^^^^^^^^^^^^^^^^^ + +``[ASM, ...string...]`` + +The ``ASM`` record (code 4) contains a variable number of values representing +the bytes of ``module asm`` strings, with individual assembly blocks separated +by newline (ASCII 10) characters. + +.. _MODULE_CODE_SECTIONNAME: + +MODULE_CODE_SECTIONNAME Record +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``[SECTIONNAME, ...string...]`` + +The ``SECTIONNAME`` record (code 5) contains a variable number of values +representing the bytes of a single section name string. There should be one +``SECTIONNAME`` record for each section name referenced (e.g., in global +variable or function ``section`` attributes) within the module. These records +can be referenced by the 1-based index in the *section* fields of ``GLOBALVAR`` +or ``FUNCTION`` records. + +MODULE_CODE_DEPLIB Record +^^^^^^^^^^^^^^^^^^^^^^^^^ + +``[DEPLIB, ...string...]`` + +The ``DEPLIB`` record (code 6) contains a variable number of values representing +the bytes of a single dependent library name string, one of the libraries +mentioned in a ``deplibs`` declaration. There should be one ``DEPLIB`` record +for each library name referenced. + +MODULE_CODE_GLOBALVAR Record +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``[GLOBALVAR, pointer type, isconst, initid, linkage, alignment, section, visibility, threadlocal, unnamed_addr]`` + +The ``GLOBALVAR`` record (code 7) marks the declaration or definition of a +global variable. The operand fields are: + +* *pointer type*: The type index of the pointer type used to point to this + global variable + +* *isconst*: Non-zero if the variable is treated as constant within the module, + or zero if it is not + +* *initid*: If non-zero, the value index of the initializer for this variable, + plus 1. + +.. _linkage type: + +* *linkage*: An encoding of the linkage type for this variable: + * ``external``: code 0 + * ``weak``: code 1 + * ``appending``: code 2 + * ``internal``: code 3 + * ``linkonce``: code 4 + * ``dllimport``: code 5 + * ``dllexport``: code 6 + * ``extern_weak``: code 7 + * ``common``: code 8 + * ``private``: code 9 + * ``weak_odr``: code 10 + * ``linkonce_odr``: code 11 + * ``available_externally``: code 12 + * ``linker_private``: code 13 + +* alignment*: The logarithm base 2 of the variable's requested alignment, plus 1 + +* *section*: If non-zero, the 1-based section index in the table of + `MODULE_CODE_SECTIONNAME`_ entries. + +.. _visibility: + +* *visibility*: If present, an encoding of the visibility of this variable: + * ``default``: code 0 + * ``hidden``: code 1 + * ``protected``: code 2 + +* *threadlocal*: If present, an encoding of the thread local storage mode of the + variable: + * ``not thread local``: code 0 + * ``thread local; default TLS model``: code 1 + * ``localdynamic``: code 2 + * ``initialexec``: code 3 + * ``localexec``: code 4 + +* *unnamed_addr*: If present and non-zero, indicates that the variable has + ``unnamed_addr`` + +.. _FUNCTION: + +MODULE_CODE_FUNCTION Record +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``[FUNCTION, type, callingconv, isproto, linkage, paramattr, alignment, section, visibility, gc, prefix]`` + +The ``FUNCTION`` record (code 8) marks the declaration or definition of a +function. The operand fields are: + +* *type*: The type index of the function type describing this function + +* *callingconv*: The calling convention number: + * ``ccc``: code 0 + * ``fastcc``: code 8 + * ``coldcc``: code 9 + * ``x86_stdcallcc``: code 64 + * ``x86_fastcallcc``: code 65 + * ``arm_apcscc``: code 66 + * ``arm_aapcscc``: code 67 + * ``arm_aapcs_vfpcc``: code 68 + +* isproto*: Non-zero if this entry represents a declaration rather than a + definition + +* *linkage*: An encoding of the `linkage type`_ for this function + +* *paramattr*: If nonzero, the 1-based parameter attribute index into the table + of `PARAMATTR_CODE_ENTRY`_ entries. + +* *alignment*: The logarithm base 2 of the function's requested alignment, plus + 1 + +* *section*: If non-zero, the 1-based section index in the table of + `MODULE_CODE_SECTIONNAME`_ entries. + +* *visibility*: An encoding of the `visibility`_ of this function + +* *gc*: If present and nonzero, the 1-based garbage collector index in the table + of `MODULE_CODE_GCNAME`_ entries. + +* *unnamed_addr*: If present and non-zero, indicates that the function has + ``unnamed_addr`` + +* *prefix*: If non-zero, the value index of the prefix data for this function, + plus 1. + +MODULE_CODE_ALIAS Record +^^^^^^^^^^^^^^^^^^^^^^^^ + +``[ALIAS, alias type, aliasee val#, linkage, visibility]`` + +The ``ALIAS`` record (code 9) marks the definition of an alias. The operand +fields are + +* *alias type*: The type index of the alias + +* *aliasee val#*: The value index of the aliased value + +* *linkage*: An encoding of the `linkage type`_ for this alias + +* *visibility*: If present, an encoding of the `visibility`_ of the alias + +MODULE_CODE_PURGEVALS Record +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``[PURGEVALS, numvals]`` + +The ``PURGEVALS`` record (code 10) resets the module-level value list to the +size given by the single operand value. Module-level value list items are added +by ``GLOBALVAR``, ``FUNCTION``, and ``ALIAS`` records. After a ``PURGEVALS`` +record is seen, new value indices will start from the given *numvals* value. + +.. _MODULE_CODE_GCNAME: + +MODULE_CODE_GCNAME Record +^^^^^^^^^^^^^^^^^^^^^^^^^ + +``[GCNAME, ...string...]`` + +The ``GCNAME`` record (code 11) contains a variable number of values +representing the bytes of a single garbage collector name string. There should +be one ``GCNAME`` record for each garbage collector name referenced in function +``gc`` attributes within the module. These records can be referenced by 1-based +index in the *gc* fields of ``FUNCTION`` records. + +.. _PARAMATTR_BLOCK: + +PARAMATTR_BLOCK Contents +------------------------ + +The ``PARAMATTR_BLOCK`` block (id 9) contains a table of entries describing the +attributes of function parameters. These entries are referenced by 1-based index +in the *paramattr* field of module block `FUNCTION`_ records, or within the +*attr* field of function block ``INST_INVOKE`` and ``INST_CALL`` records. + +Entries within ``PARAMATTR_BLOCK`` are constructed to ensure that each is unique +(i.e., no two indicies represent equivalent attribute lists). + +.. _PARAMATTR_CODE_ENTRY: + +PARAMATTR_CODE_ENTRY Record +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``[ENTRY, paramidx0, attr0, paramidx1, attr1...]`` + +The ``ENTRY`` record (code 1) contains an even number of values describing a +unique set of function parameter attributes. Each *paramidx* value indicates +which set of attributes is represented, with 0 representing the return value +attributes, 0xFFFFFFFF representing function attributes, and other values +representing 1-based function parameters. Each *attr* value is a bitmap with the +following interpretation: + +* bit 0: ``zeroext`` +* bit 1: ``signext`` +* bit 2: ``noreturn`` +* bit 3: ``inreg`` +* bit 4: ``sret`` +* bit 5: ``nounwind`` +* bit 6: ``noalias`` +* bit 7: ``byval`` +* bit 8: ``nest`` +* bit 9: ``readnone`` +* bit 10: ``readonly`` +* bit 11: ``noinline`` +* bit 12: ``alwaysinline`` +* bit 13: ``optsize`` +* bit 14: ``ssp`` +* bit 15: ``sspreq`` +* bits 16-31: ``align n`` +* bit 32: ``nocapture`` +* bit 33: ``noredzone`` +* bit 34: ``noimplicitfloat`` +* bit 35: ``naked`` +* bit 36: ``inlinehint`` +* bits 37-39: ``alignstack n``, represented as the logarithm + base 2 of the requested alignment, plus 1 + +.. _TYPE_BLOCK: + +TYPE_BLOCK Contents +------------------- + +The ``TYPE_BLOCK`` block (id 10) contains records which constitute a table of +type operator entries used to represent types referenced within an LLVM +module. Each record (with the exception of `NUMENTRY`_) generates a single type +table entry, which may be referenced by 0-based index from instructions, +constants, metadata, type symbol table entries, or other type operator records. + +Entries within ``TYPE_BLOCK`` are constructed to ensure that each entry is +unique (i.e., no two indicies represent structurally equivalent types). + +.. _TYPE_CODE_NUMENTRY: +.. _NUMENTRY: + +TYPE_CODE_NUMENTRY Record +^^^^^^^^^^^^^^^^^^^^^^^^^ + +``[NUMENTRY, numentries]`` + +The ``NUMENTRY`` record (code 1) contains a single value which indicates the +total number of type code entries in the type table of the module. If present, +``NUMENTRY`` should be the first record in the block. + +TYPE_CODE_VOID Record +^^^^^^^^^^^^^^^^^^^^^ + +``[VOID]`` + +The ``VOID`` record (code 2) adds a ``void`` type to the type table. + +TYPE_CODE_HALF Record +^^^^^^^^^^^^^^^^^^^^^ + +``[HALF]`` + +The ``HALF`` record (code 10) adds a ``half`` (16-bit floating point) type to +the type table. + +TYPE_CODE_FLOAT Record +^^^^^^^^^^^^^^^^^^^^^^ + +``[FLOAT]`` + +The ``FLOAT`` record (code 3) adds a ``float`` (32-bit floating point) type to +the type table. + +TYPE_CODE_DOUBLE Record +^^^^^^^^^^^^^^^^^^^^^^^ + +``[DOUBLE]`` + +The ``DOUBLE`` record (code 4) adds a ``double`` (64-bit floating point) type to +the type table. + +TYPE_CODE_LABEL Record +^^^^^^^^^^^^^^^^^^^^^^ + +``[LABEL]`` + +The ``LABEL`` record (code 5) adds a ``label`` type to the type table. + +TYPE_CODE_OPAQUE Record +^^^^^^^^^^^^^^^^^^^^^^^ + +``[OPAQUE]`` + +The ``OPAQUE`` record (code 6) adds an ``opaque`` type to the type table. Note +that distinct ``opaque`` types are not unified. + +TYPE_CODE_INTEGER Record +^^^^^^^^^^^^^^^^^^^^^^^^ + +``[INTEGER, width]`` + +The ``INTEGER`` record (code 7) adds an integer type to the type table. The +single *width* field indicates the width of the integer type. + +TYPE_CODE_POINTER Record +^^^^^^^^^^^^^^^^^^^^^^^^ + +``[POINTER, pointee type, address space]`` + +The ``POINTER`` record (code 8) adds a pointer type to the type table. The +operand fields are + +* *pointee type*: The type index of the pointed-to type + +* *address space*: If supplied, the target-specific numbered address space where + the pointed-to object resides. Otherwise, the default address space is zero. + +TYPE_CODE_FUNCTION Record +^^^^^^^^^^^^^^^^^^^^^^^^^ + +``[FUNCTION, vararg, ignored, retty, ...paramty... ]`` + +The ``FUNCTION`` record (code 9) adds a function type to the type table. The +operand fields are + +* *vararg*: Non-zero if the type represents a varargs function + +* *ignored*: This value field is present for backward compatibility only, and is + ignored + +* *retty*: The type index of the function's return type + +* *paramty*: Zero or more type indices representing the parameter types of the + function + +TYPE_CODE_STRUCT Record +^^^^^^^^^^^^^^^^^^^^^^^ + +``[STRUCT, ispacked, ...eltty...]`` + +The ``STRUCT`` record (code 10) adds a struct type to the type table. The +operand fields are + +* *ispacked*: Non-zero if the type represents a packed structure + +* *eltty*: Zero or more type indices representing the element types of the + structure + +TYPE_CODE_ARRAY Record +^^^^^^^^^^^^^^^^^^^^^^ + +``[ARRAY, numelts, eltty]`` + +The ``ARRAY`` record (code 11) adds an array type to the type table. The +operand fields are + +* *numelts*: The number of elements in arrays of this type + +* *eltty*: The type index of the array element type + +TYPE_CODE_VECTOR Record +^^^^^^^^^^^^^^^^^^^^^^^ + +``[VECTOR, numelts, eltty]`` + +The ``VECTOR`` record (code 12) adds a vector type to the type table. The +operand fields are + +* *numelts*: The number of elements in vectors of this type + +* *eltty*: The type index of the vector element type + +TYPE_CODE_X86_FP80 Record +^^^^^^^^^^^^^^^^^^^^^^^^^ + +``[X86_FP80]`` + +The ``X86_FP80`` record (code 13) adds an ``x86_fp80`` (80-bit floating point) +type to the type table. + +TYPE_CODE_FP128 Record +^^^^^^^^^^^^^^^^^^^^^^ + +``[FP128]`` + +The ``FP128`` record (code 14) adds an ``fp128`` (128-bit floating point) type +to the type table. + +TYPE_CODE_PPC_FP128 Record +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``[PPC_FP128]`` + +The ``PPC_FP128`` record (code 15) adds a ``ppc_fp128`` (128-bit floating point) +type to the type table. + +TYPE_CODE_METADATA Record +^^^^^^^^^^^^^^^^^^^^^^^^^ + +``[METADATA]`` + +The ``METADATA`` record (code 16) adds a ``metadata`` type to the type table. + +.. _CONSTANTS_BLOCK: + +CONSTANTS_BLOCK Contents +------------------------ + +The ``CONSTANTS_BLOCK`` block (id 11) ... + +.. _FUNCTION_BLOCK: + +FUNCTION_BLOCK Contents +----------------------- + +The ``FUNCTION_BLOCK`` block (id 12) ... + +In addition to the record types described below, a ``FUNCTION_BLOCK`` block may +contain the following sub-blocks: + +* `CONSTANTS_BLOCK`_ +* `VALUE_SYMTAB_BLOCK`_ +* `METADATA_ATTACHMENT`_ + +.. _TYPE_SYMTAB_BLOCK: + +TYPE_SYMTAB_BLOCK Contents +-------------------------- + +The ``TYPE_SYMTAB_BLOCK`` block (id 13) contains entries which map between +module-level named types and their corresponding type indices. + +.. _TST_CODE_ENTRY: + +TST_CODE_ENTRY Record +^^^^^^^^^^^^^^^^^^^^^ + +``[ENTRY, typeid, ...string...]`` + +The ``ENTRY`` record (code 1) contains a variable number of values, with the +first giving the type index of the designated type, and the remaining values +giving the character codes of the type name. Each entry corresponds to a single +named type. + +.. _VALUE_SYMTAB_BLOCK: + +VALUE_SYMTAB_BLOCK Contents +--------------------------- + +The ``VALUE_SYMTAB_BLOCK`` block (id 14) ... + +.. _METADATA_BLOCK: + +METADATA_BLOCK Contents +----------------------- + +The ``METADATA_BLOCK`` block (id 15) ... + +.. _METADATA_ATTACHMENT: + +METADATA_ATTACHMENT Contents +---------------------------- + +The ``METADATA_ATTACHMENT`` block (id 16) ... diff --git a/docs/BranchWeightMetadata.rst b/docs/BranchWeightMetadata.rst new file mode 100644 index 00000000..71ecd34c --- /dev/null +++ b/docs/BranchWeightMetadata.rst @@ -0,0 +1,116 @@ +=========================== +LLVM Branch Weight Metadata +=========================== + +.. contents:: + :local: + +Introduction +============ + +Branch Weight Metadata represents branch weights as its likeliness to be +taken. Metadata is assigned to the ``TerminatorInst`` as a ``MDNode`` of the +``MD_prof`` kind. The first operator is always a ``MDString`` node with the +string "branch_weights". Number of operators depends on the terminator type. + +Branch weights might be fetch from the profiling file, or generated based on +`__builtin_expect`_ instruction. + +All weights are represented as an unsigned 32-bit values, where higher value +indicates greater chance to be taken. + +Supported Instructions +====================== + +``BranchInst`` +^^^^^^^^^^^^^^ + +Metadata is only assigned to the conditional branches. There are two extra +operarands for the true and the false branch. + +.. code-block:: llvm + + !0 = metadata !{ + metadata !"branch_weights", + i32 , + i32 + } + +``SwitchInst`` +^^^^^^^^^^^^^^ + +Branch weights are assigned to every case (including the ``default`` case which +is always case #0). + +.. code-block:: llvm + + !0 = metadata !{ + metadata !"branch_weights", + i32 + [ , i32 ... ] + } + +``IndirectBrInst`` +^^^^^^^^^^^^^^^^^^ + +Branch weights are assigned to every destination. + +.. code-block:: llvm + + !0 = metadata !{ + metadata !"branch_weights", + i32 + [ , i32 ... ] + } + +Other +^^^^^ + +Other terminator instructions are not allowed to contain Branch Weight Metadata. + +.. _\__builtin_expect: + +Built-in ``expect`` Instructions +================================ + +``__builtin_expect(long exp, long c)`` instruction provides branch prediction +information. The return value is the value of ``exp``. + +It is especially useful in conditional statements. Currently Clang supports two +conditional statements: + +``if`` statement +^^^^^^^^^^^^^^^^ + +The ``exp`` parameter is the condition. The ``c`` parameter is the expected +comparison value. If it is equal to 1 (true), the condition is likely to be +true, in other case condition is likely to be false. For example: + +.. code-block:: c++ + + if (__builtin_expect(x > 0, 1)) { + // This block is likely to be taken. + } + +``switch`` statement +^^^^^^^^^^^^^^^^^^^^ + +The ``exp`` parameter is the value. The ``c`` parameter is the expected +value. If the expected value doesn't show on the cases list, the ``default`` +case is assumed to be likely taken. + +.. code-block:: c++ + + switch (__builtin_expect(x, 5)) { + default: break; + case 0: // ... + case 3: // ... + case 5: // This case is likely to be taken. + } + +CFG Modifications +================= + +Branch Weight Metatada is not proof against CFG changes. If terminator operands' +are changed some action should be taken. In other case some misoptimizations may +occur due to incorrent branch prediction information. diff --git a/docs/Bugpoint.rst b/docs/Bugpoint.rst new file mode 100644 index 00000000..1a5fc8c0 --- /dev/null +++ b/docs/Bugpoint.rst @@ -0,0 +1,216 @@ +==================================== +LLVM bugpoint tool: design and usage +==================================== + +.. contents:: + :local: + +Description +=========== + +``bugpoint`` narrows down the source of problems in LLVM tools and passes. It +can be used to debug three types of failures: optimizer crashes, miscompilations +by optimizers, or bad native code generation (including problems in the static +and JIT compilers). It aims to reduce large test cases to small, useful ones. +For example, if ``opt`` crashes while optimizing a file, it will identify the +optimization (or combination of optimizations) that causes the crash, and reduce +the file down to a small example which triggers the crash. + +For detailed case scenarios, such as debugging ``opt``, or one of the LLVM code +generators, see `How To Submit a Bug Report document `_. + +Design Philosophy +================= + +``bugpoint`` is designed to be a useful tool without requiring any hooks into +the LLVM infrastructure at all. It works with any and all LLVM passes and code +generators, and does not need to "know" how they work. Because of this, it may +appear to do stupid things or miss obvious simplifications. ``bugpoint`` is +also designed to trade off programmer time for computer time in the +compiler-debugging process; consequently, it may take a long period of +(unattended) time to reduce a test case, but we feel it is still worth it. Note +that ``bugpoint`` is generally very quick unless debugging a miscompilation +where each test of the program (which requires executing it) takes a long time. + +Automatic Debugger Selection +---------------------------- + +``bugpoint`` reads each ``.bc`` or ``.ll`` file specified on the command line +and links them together into a single module, called the test program. If any +LLVM passes are specified on the command line, it runs these passes on the test +program. If any of the passes crash, or if they produce malformed output (which +causes the verifier to abort), ``bugpoint`` starts the `crash debugger`_. + +Otherwise, if the ``-output`` option was not specified, ``bugpoint`` runs the +test program with the "safe" backend (which is assumed to generate good code) to +generate a reference output. Once ``bugpoint`` has a reference output for the +test program, it tries executing it with the selected code generator. If the +selected code generator crashes, ``bugpoint`` starts the `crash debugger`_ on +the code generator. Otherwise, if the resulting output differs from the +reference output, it assumes the difference resulted from a code generator +failure, and starts the `code generator debugger`_. + +Finally, if the output of the selected code generator matches the reference +output, ``bugpoint`` runs the test program after all of the LLVM passes have +been applied to it. If its output differs from the reference output, it assumes +the difference resulted from a failure in one of the LLVM passes, and enters the +`miscompilation debugger`_. Otherwise, there is no problem ``bugpoint`` can +debug. + +.. _crash debugger: + +Crash debugger +-------------- + +If an optimizer or code generator crashes, ``bugpoint`` will try as hard as it +can to reduce the list of passes (for optimizer crashes) and the size of the +test program. First, ``bugpoint`` figures out which combination of optimizer +passes triggers the bug. This is useful when debugging a problem exposed by +``opt``, for example, because it runs over 38 passes. + +Next, ``bugpoint`` tries removing functions from the test program, to reduce its +size. Usually it is able to reduce a test program to a single function, when +debugging intraprocedural optimizations. Once the number of functions has been +reduced, it attempts to delete various edges in the control flow graph, to +reduce the size of the function as much as possible. Finally, ``bugpoint`` +deletes any individual LLVM instructions whose absence does not eliminate the +failure. At the end, ``bugpoint`` should tell you what passes crash, give you a +bitcode file, and give you instructions on how to reproduce the failure with +``opt`` or ``llc``. + +.. _code generator debugger: + +Code generator debugger +----------------------- + +The code generator debugger attempts to narrow down the amount of code that is +being miscompiled by the selected code generator. To do this, it takes the test +program and partitions it into two pieces: one piece which it compiles with the +"safe" backend (into a shared object), and one piece which it runs with either +the JIT or the static LLC compiler. It uses several techniques to reduce the +amount of code pushed through the LLVM code generator, to reduce the potential +scope of the problem. After it is finished, it emits two bitcode files (called +"test" [to be compiled with the code generator] and "safe" [to be compiled with +the "safe" backend], respectively), and instructions for reproducing the +problem. The code generator debugger assumes that the "safe" backend produces +good code. + +.. _miscompilation debugger: + +Miscompilation debugger +----------------------- + +The miscompilation debugger works similarly to the code generator debugger. It +works by splitting the test program into two pieces, running the optimizations +specified on one piece, linking the two pieces back together, and then executing +the result. It attempts to narrow down the list of passes to the one (or few) +which are causing the miscompilation, then reduce the portion of the test +program which is being miscompiled. The miscompilation debugger assumes that +the selected code generator is working properly. + +Advice for using bugpoint +========================= + +``bugpoint`` can be a remarkably useful tool, but it sometimes works in +non-obvious ways. Here are some hints and tips: + +* In the code generator and miscompilation debuggers, ``bugpoint`` only works + with programs that have deterministic output. Thus, if the program outputs + ``argv[0]``, the date, time, or any other "random" data, ``bugpoint`` may + misinterpret differences in these data, when output, as the result of a + miscompilation. Programs should be temporarily modified to disable outputs + that are likely to vary from run to run. + +* In the code generator and miscompilation debuggers, debugging will go faster + if you manually modify the program or its inputs to reduce the runtime, but + still exhibit the problem. + +* ``bugpoint`` is extremely useful when working on a new optimization: it helps + track down regressions quickly. To avoid having to relink ``bugpoint`` every + time you change your optimization however, have ``bugpoint`` dynamically load + your optimization with the ``-load`` option. + +* ``bugpoint`` can generate a lot of output and run for a long period of time. + It is often useful to capture the output of the program to file. For example, + in the C shell, you can run: + + .. code-block:: console + + $ bugpoint ... |& tee bugpoint.log + + to get a copy of ``bugpoint``'s output in the file ``bugpoint.log``, as well + as on your terminal. + +* ``bugpoint`` cannot debug problems with the LLVM linker. If ``bugpoint`` + crashes before you see its "All input ok" message, you might try ``llvm-link + -v`` on the same set of input files. If that also crashes, you may be + experiencing a linker bug. + +* ``bugpoint`` is useful for proactively finding bugs in LLVM. Invoking + ``bugpoint`` with the ``-find-bugs`` option will cause the list of specified + optimizations to be randomized and applied to the program. This process will + repeat until a bug is found or the user kills ``bugpoint``. + +What to do when bugpoint isn't enough +===================================== + +Sometimes, ``bugpoint`` is not enough. In particular, InstCombine and +TargetLowering both have visitor structured code with lots of potential +transformations. If the process of using bugpoint has left you with still too +much code to figure out and the problem seems to be in instcombine, the +following steps may help. These same techniques are useful with TargetLowering +as well. + +Turn on ``-debug-only=instcombine`` and see which transformations within +instcombine are firing by selecting out lines with "``IC``" in them. + +At this point, you have a decision to make. Is the number of transformations +small enough to step through them using a debugger? If so, then try that. + +If there are too many transformations, then a source modification approach may +be helpful. In this approach, you can modify the source code of instcombine to +disable just those transformations that are being performed on your test input +and perform a binary search over the set of transformations. One set of places +to modify are the "``visit*``" methods of ``InstCombiner`` (*e.g.* +``visitICmpInst``) by adding a "``return false``" as the first line of the +method. + +If that still doesn't remove enough, then change the caller of +``InstCombiner::DoOneIteration``, ``InstCombiner::runOnFunction`` to limit the +number of iterations. + +You may also find it useful to use "``-stats``" now to see what parts of +instcombine are firing. This can guide where to put additional reporting code. + +At this point, if the amount of transformations is still too large, then +inserting code to limit whether or not to execute the body of the code in the +visit function can be helpful. Add a static counter which is incremented on +every invocation of the function. Then add code which simply returns false on +desired ranges. For example: + +.. code-block:: c++ + + + static int calledCount = 0; + calledCount++; + DEBUG(if (calledCount < 212) return false); + DEBUG(if (calledCount > 217) return false); + DEBUG(if (calledCount == 213) return false); + DEBUG(if (calledCount == 214) return false); + DEBUG(if (calledCount == 215) return false); + DEBUG(if (calledCount == 216) return false); + DEBUG(dbgs() << "visitXOR calledCount: " << calledCount << "\n"); + DEBUG(dbgs() << "I: "; I->dump()); + +could be added to ``visitXOR`` to limit ``visitXor`` to being applied only to +calls 212 and 217. This is from an actual test case and raises an important +point---a simple binary search may not be sufficient, as transformations that +interact may require isolating more than one call. In TargetLowering, use +``return SDNode();`` instead of ``return false;``. + +Now that that the number of transformations is down to a manageable number, try +examining the output to see if you can figure out which transformations are +being done. If that can be figured out, then do the usual debugging. If which +code corresponds to the transformation being performed isn't obvious, set a +breakpoint after the call count based disabling and step through the code. +Alternatively, you can use "``printf``" style debugging to report waypoints. diff --git a/docs/CMake.rst b/docs/CMake.rst new file mode 100644 index 00000000..c9fe538c --- /dev/null +++ b/docs/CMake.rst @@ -0,0 +1,426 @@ +======================== +Building LLVM with CMake +======================== + +.. contents:: + :local: + +Introduction +============ + +`CMake `_ is a cross-platform build-generator tool. CMake +does not build the project, it generates the files needed by your build tool +(GNU make, Visual Studio, etc) for building LLVM. + +If you are really anxious about getting a functional LLVM build, go to the +`Quick start`_ section. If you are a CMake novice, start on `Basic CMake usage`_ +and then go back to the `Quick start`_ once you know what you are doing. The +`Options and variables`_ section is a reference for customizing your build. If +you already have experience with CMake, this is the recommended starting point. + +.. _Quick start: + +Quick start +=========== + +We use here the command-line, non-interactive CMake interface. + +#. `Download `_ and install + CMake. Version 2.8 is the minimum required. + +#. Open a shell. Your development tools must be reachable from this shell + through the PATH environment variable. + +#. Create a directory for containing the build. It is not supported to build + LLVM on the source directory. cd to this directory: + + .. code-block:: console + + $ mkdir mybuilddir + $ cd mybuilddir + +#. Execute this command on the shell replacing `path/to/llvm/source/root` with + the path to the root of your LLVM source tree: + + .. code-block:: console + + $ cmake path/to/llvm/source/root + + CMake will detect your development environment, perform a series of test and + generate the files required for building LLVM. CMake will use default values + for all build parameters. See the `Options and variables`_ section for + fine-tuning your build + + This can fail if CMake can't detect your toolset, or if it thinks that the + environment is not sane enough. On this case make sure that the toolset that + you intend to use is the only one reachable from the shell and that the shell + itself is the correct one for you development environment. CMake will refuse + to build MinGW makefiles if you have a POSIX shell reachable through the PATH + environment variable, for instance. You can force CMake to use a given build + tool, see the `Usage`_ section. + +.. _Basic CMake usage: +.. _Usage: + +Basic CMake usage +================= + +This section explains basic aspects of CMake, mostly for explaining those +options which you may need on your day-to-day usage. + +CMake comes with extensive documentation in the form of html files and on the +cmake executable itself. Execute ``cmake --help`` for further help options. + +CMake requires to know for which build tool it shall generate files (GNU make, +Visual Studio, Xcode, etc). If not specified on the command line, it tries to +guess it based on you environment. Once identified the build tool, CMake uses +the corresponding *Generator* for creating files for your build tool. You can +explicitly specify the generator with the command line option ``-G "Name of the +generator"``. For knowing the available generators on your platform, execute + +.. code-block:: console + + $ cmake --help + +This will list the generator's names at the end of the help text. Generator's +names are case-sensitive. Example: + +.. code-block:: console + + $ cmake -G "Visual Studio 10" path/to/llvm/source/root + +For a given development platform there can be more than one adequate +generator. If you use Visual Studio "NMake Makefiles" is a generator you can use +for building with NMake. By default, CMake chooses the more specific generator +supported by your development environment. If you want an alternative generator, +you must tell this to CMake with the ``-G`` option. + +.. todo:: + + Explain variables and cache. Move explanation here from #options section. + +.. _Options and variables: + +Options and variables +===================== + +Variables customize how the build will be generated. Options are boolean +variables, with possible values ON/OFF. Options and variables are defined on the +CMake command line like this: + +.. code-block:: console + + $ cmake -DVARIABLE=value path/to/llvm/source + +You can set a variable after the initial CMake invocation for changing its +value. You can also undefine a variable: + +.. code-block:: console + + $ cmake -UVARIABLE path/to/llvm/source + +Variables are stored on the CMake cache. This is a file named ``CMakeCache.txt`` +on the root of the build directory. Do not hand-edit it. + +Variables are listed here appending its type after a colon. It is correct to +write the variable and the type on the CMake command line: + +.. code-block:: console + + $ cmake -DVARIABLE:TYPE=value path/to/llvm/source + +Frequently-used CMake variables +------------------------------- + +Here are listed some of the CMake variables that are used often, along with a +brief explanation and LLVM-specific notes. For full documentation, check the +CMake docs or execute ``cmake --help-variable VARIABLE_NAME``. + +**CMAKE_BUILD_TYPE**:STRING + Sets the build type for ``make`` based generators. Possible values are + Release, Debug, RelWithDebInfo and MinSizeRel. On systems like Visual Studio + the user sets the build type with the IDE settings. + +**CMAKE_INSTALL_PREFIX**:PATH + Path where LLVM will be installed if "make install" is invoked or the + "INSTALL" target is built. + +**LLVM_LIBDIR_SUFFIX**:STRING + Extra suffix to append to the directory where libraries are to be + installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64`` + to install libraries to ``/usr/lib64``. + +**CMAKE_C_FLAGS**:STRING + Extra flags to use when compiling C source files. + +**CMAKE_CXX_FLAGS**:STRING + Extra flags to use when compiling C++ source files. + +**BUILD_SHARED_LIBS**:BOOL + Flag indicating is shared libraries will be built. Its default value is + OFF. Shared libraries are not supported on Windows and not recommended in the + other OSes. + +.. _LLVM-specific variables: + +LLVM-specific variables +----------------------- + +**LLVM_TARGETS_TO_BUILD**:STRING + Semicolon-separated list of targets to build, or *all* for building all + targets. Case-sensitive. Defaults to *all*. Example: + ``-DLLVM_TARGETS_TO_BUILD="X86;PowerPC"``. + +**LLVM_BUILD_TOOLS**:BOOL + Build LLVM tools. Defaults to ON. Targets for building each tool are generated + in any case. You can build an tool separately by invoking its target. For + example, you can build *llvm-as* with a makefile-based system executing *make + llvm-as* on the root of your build directory. + +**LLVM_INCLUDE_TOOLS**:BOOL + Generate build targets for the LLVM tools. Defaults to ON. You can use that + option for disabling the generation of build targets for the LLVM tools. + +**LLVM_BUILD_EXAMPLES**:BOOL + Build LLVM examples. Defaults to OFF. Targets for building each example are + generated in any case. See documentation for *LLVM_BUILD_TOOLS* above for more + details. + +**LLVM_INCLUDE_EXAMPLES**:BOOL + Generate build targets for the LLVM examples. Defaults to ON. You can use that + option for disabling the generation of build targets for the LLVM examples. + +**LLVM_BUILD_TESTS**:BOOL + Build LLVM unit tests. Defaults to OFF. Targets for building each unit test + are generated in any case. You can build a specific unit test with the target + *UnitTestNameTests* (where at this time *UnitTestName* can be ADT, Analysis, + ExecutionEngine, JIT, Support, Transform, VMCore; see the subdirectories of + *unittests* for an updated list.) It is possible to build all unit tests with + the target *UnitTests*. + +**LLVM_INCLUDE_TESTS**:BOOL + Generate build targets for the LLVM unit tests. Defaults to ON. You can use + that option for disabling the generation of build targets for the LLVM unit + tests. + +**LLVM_APPEND_VC_REV**:BOOL + Append version control revision info (svn revision number or Git revision id) + to LLVM version string (stored in the PACKAGE_VERSION macro). For this to work + cmake must be invoked before the build. Defaults to OFF. + +**LLVM_ENABLE_THREADS**:BOOL + Build with threads support, if available. Defaults to ON. + +**LLVM_ENABLE_ASSERTIONS**:BOOL + Enables code assertions. Defaults to OFF if and only if ``CMAKE_BUILD_TYPE`` + is *Release*. + +**LLVM_ENABLE_PIC**:BOOL + Add the ``-fPIC`` flag for the compiler command-line, if the compiler supports + this flag. Some systems, like Windows, do not need this flag. Defaults to ON. + +**LLVM_ENABLE_WARNINGS**:BOOL + Enable all compiler warnings. Defaults to ON. + +**LLVM_ENABLE_PEDANTIC**:BOOL + Enable pedantic mode. This disable compiler specific extensions, is + possible. Defaults to ON. + +**LLVM_ENABLE_WERROR**:BOOL + Stop and fail build, if a compiler warning is triggered. Defaults to OFF. + +**LLVM_BUILD_32_BITS**:BOOL + Build 32-bits executables and libraries on 64-bits systems. This option is + available only on some 64-bits unix systems. Defaults to OFF. + +**LLVM_TARGET_ARCH**:STRING + LLVM target to use for native code generation. This is required for JIT + generation. It defaults to "host", meaning that it shall pick the architecture + of the machine where LLVM is being built. If you are cross-compiling, set it + to the target architecture name. + +**LLVM_TABLEGEN**:STRING + Full path to a native TableGen executable (usually named ``tblgen``). This is + intended for cross-compiling: if the user sets this variable, no native + TableGen will be created. + +**LLVM_LIT_ARGS**:STRING + Arguments given to lit. ``make check`` and ``make clang-test`` are affected. + By default, ``'-sv --no-progress-bar'`` on Visual C++ and Xcode, ``'-sv'`` on + others. + +**LLVM_LIT_TOOLS_DIR**:PATH + The path to GnuWin32 tools for tests. Valid on Windows host. Defaults to "", + then Lit seeks tools according to %PATH%. Lit can find tools(eg. grep, sort, + &c) on LLVM_LIT_TOOLS_DIR at first, without specifying GnuWin32 to %PATH%. + +**LLVM_ENABLE_FFI**:BOOL + Indicates whether LLVM Interpreter will be linked with Foreign Function + Interface library. If the library or its headers are installed on a custom + location, you can set the variables FFI_INCLUDE_DIR and + FFI_LIBRARY_DIR. Defaults to OFF. + +**LLVM_EXTERNAL_{CLANG,LLD,POLLY}_SOURCE_DIR**:PATH + Path to ``{Clang,lld,Polly}``\'s source directory. Defaults to + ``tools/{clang,lld,polly}``. ``{Clang,lld,Polly}`` will not be built when it + is empty or it does not point valid path. + +**LLVM_USE_OPROFILE**:BOOL + Enable building OProfile JIT support. Defaults to OFF + +**LLVM_USE_INTEL_JITEVENTS**:BOOL + Enable building support for Intel JIT Events API. Defaults to OFF + +**LLVM_ENABLE_ZLIB**:BOOL + Build with zlib to support compression/uncompression in LLVM tools. + Defaults to ON. + +**LLVM_USE_SANITIZER**:STRING + Define the sanitizer used to build LLVM binaries and tests. Possible values + are ``Address``, ``Memory`` and ``MemoryWithOrigins``. Defaults to empty + string. + +Executing the test suite +======================== + +Testing is performed when the *check* target is built. For instance, if you are +using makefiles, execute this command while on the top level of your build +directory: + +.. code-block:: console + + $ make check + +On Visual Studio, you may run tests to build the project "check". + +Cross compiling +=============== + +See `this wiki page `_ for +generic instructions on how to cross-compile with CMake. It goes into detailed +explanations and may seem daunting, but it is not. On the wiki page there are +several examples including toolchain files. Go directly to `this section +`_ +for a quick solution. + +Also see the `LLVM-specific variables`_ section for variables used when +cross-compiling. + +Embedding LLVM in your project +============================== + +The most difficult part of adding LLVM to the build of a project is to determine +the set of LLVM libraries corresponding to the set of required LLVM +features. What follows is an example of how to obtain this information: + +.. code-block:: cmake + + # A convenience variable: + set(LLVM_ROOT "" CACHE PATH "Root of LLVM install.") + + # A bit of a sanity check: + if( NOT EXISTS ${LLVM_ROOT}/include/llvm ) + message(FATAL_ERROR "LLVM_ROOT (${LLVM_ROOT}) is not a valid LLVM install") + endif() + + # We incorporate the CMake features provided by LLVM: + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${LLVM_ROOT}/share/llvm/cmake") + include(LLVMConfig) + + # Now set the header and library paths: + include_directories( ${LLVM_INCLUDE_DIRS} ) + link_directories( ${LLVM_LIBRARY_DIRS} ) + add_definitions( ${LLVM_DEFINITIONS} ) + + # Let's suppose we want to build a JIT compiler with support for + # binary code (no interpreter): + llvm_map_components_to_libraries(REQ_LLVM_LIBRARIES jit native) + + # Finally, we link the LLVM libraries to our executable: + target_link_libraries(mycompiler ${REQ_LLVM_LIBRARIES}) + +This assumes that LLVM_ROOT points to an install of LLVM. The procedure works +too for uninstalled builds although we need to take care to add an +`include_directories` for the location of the headers on the LLVM source +directory (if we are building out-of-source.) + +Alternativaly, you can utilize CMake's ``find_package`` functionality. Here is +an equivalent variant of snippet shown above: + +.. code-block:: cmake + + find_package(LLVM) + + if( NOT LLVM_FOUND ) + message(FATAL_ERROR "LLVM package can't be found. Set CMAKE_PREFIX_PATH variable to LLVM's installation prefix.") + endif() + + include_directories( ${LLVM_INCLUDE_DIRS} ) + link_directories( ${LLVM_LIBRARY_DIRS} ) + + llvm_map_components_to_libraries(REQ_LLVM_LIBRARIES jit native) + + target_link_libraries(mycompiler ${REQ_LLVM_LIBRARIES}) + +.. _cmake-out-of-source-pass: + +Developing LLVM pass out of source +---------------------------------- + +It is possible to develop LLVM passes against installed LLVM. An example of +project layout provided below: + +.. code-block:: none + + / + | + CMakeLists.txt + / + | + CMakeLists.txt + Pass.cpp + ... + +Contents of ``/CMakeLists.txt``: + +.. code-block:: cmake + + find_package(LLVM) + + # Define add_llvm_* macro's. + include(AddLLVM) + + add_definitions(${LLVM_DEFINITIONS}) + include_directories(${LLVM_INCLUDE_DIRS}) + link_directories(${LLVM_LIBRARY_DIRS}) + + add_subdirectory() + +Contents of ``//CMakeLists.txt``: + +.. code-block:: cmake + + add_llvm_loadable_module(LLVMPassname + Pass.cpp + ) + +When you are done developing your pass, you may wish to integrate it +into LLVM source tree. You can achieve it in two easy steps: + +#. Copying ```` folder into ``/lib/Transform`` directory. + +#. Adding ``add_subdirectory()`` line into + ``/lib/Transform/CMakeLists.txt``. + +Compiler/Platform specific topics +================================= + +Notes for specific compilers and/or platforms. + +Microsoft Visual C++ +-------------------- + +**LLVM_COMPILER_JOBS**:STRING + Specifies the maximum number of parallell compiler jobs to use per project + when building with msbuild or Visual Studio. Only supported for the Visual + Studio 2010 CMake generator. 0 means use all processors. Default is 0. diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt new file mode 100644 index 00000000..8c49aa5e --- /dev/null +++ b/docs/CMakeLists.txt @@ -0,0 +1,51 @@ + +if (DOXYGEN_FOUND) +if (LLVM_ENABLE_DOXYGEN) + set(abs_top_srcdir ${LLVM_MAIN_SRC_DIR}) + set(abs_top_builddir ${LLVM_BINARY_DIR}) + + if (HAVE_DOT) + set(DOT ${LLVM_PATH_DOT}) + endif() + + if (LLVM_DOXYGEN_EXTERNAL_SEARCH) + set(enable_searchengine "YES") + set(searchengine_url "${LLVM_DOXYGEN_SEARCHENGINE_URL}") + set(enable_server_based_search "YES") + set(enable_external_search "YES") + set(extra_search_mappings "${LLVM_DOXYGEN_SEARCH_MAPPINGS}") + else() + set(enable_searchengine "NO") + set(searchengine_url "") + set(enable_server_based_search "NO") + set(enable_external_search "NO") + set(extra_search_mappings "") + endif() + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in + ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY) + + set(abs_top_srcdir) + set(abs_top_builddir) + set(DOT) + set(enable_searchengine) + set(searchengine_url) + set(enable_server_based_search) + set(enable_external_search) + set(extra_search_mappings) + + add_custom_target(doxygen-llvm + COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating llvm doxygen documentation." VERBATIM) + + if (LLVM_BUILD_DOCS) + add_dependencies(doxygen doxygen-llvm) + endif() + + if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html + DESTINATION docs/html) + endif() +endif() +endif() diff --git a/docs/CodeGenerator.rst b/docs/CodeGenerator.rst new file mode 100644 index 00000000..c87a6286 --- /dev/null +++ b/docs/CodeGenerator.rst @@ -0,0 +1,2444 @@ +========================================== +The LLVM Target-Independent Code Generator +========================================== + +.. role:: raw-html(raw) + :format: html + +.. raw:: html + + + +.. contents:: + :local: + +.. warning:: + This is a work in progress. + +Introduction +============ + +The LLVM target-independent code generator is a framework that provides a suite +of reusable components for translating the LLVM internal representation to the +machine code for a specified target---either in assembly form (suitable for a +static compiler) or in binary machine code format (usable for a JIT +compiler). The LLVM target-independent code generator consists of six main +components: + +1. `Abstract target description`_ interfaces which capture important properties + about various aspects of the machine, independently of how they will be used. + These interfaces are defined in ``include/llvm/Target/``. + +2. Classes used to represent the `code being generated`_ for a target. These + classes are intended to be abstract enough to represent the machine code for + *any* target machine. These classes are defined in + ``include/llvm/CodeGen/``. At this level, concepts like "constant pool + entries" and "jump tables" are explicitly exposed. + +3. Classes and algorithms used to represent code as the object file level, the + `MC Layer`_. These classes represent assembly level constructs like labels, + sections, and instructions. At this level, concepts like "constant pool + entries" and "jump tables" don't exist. + +4. `Target-independent algorithms`_ used to implement various phases of native + code generation (register allocation, scheduling, stack frame representation, + etc). This code lives in ``lib/CodeGen/``. + +5. `Implementations of the abstract target description interfaces`_ for + particular targets. These machine descriptions make use of the components + provided by LLVM, and can optionally provide custom target-specific passes, + to build complete code generators for a specific target. Target descriptions + live in ``lib/Target/``. + +6. The target-independent JIT components. The LLVM JIT is completely target + independent (it uses the ``TargetJITInfo`` structure to interface for + target-specific issues. The code for the target-independent JIT lives in + ``lib/ExecutionEngine/JIT``. + +Depending on which part of the code generator you are interested in working on, +different pieces of this will be useful to you. In any case, you should be +familiar with the `target description`_ and `machine code representation`_ +classes. If you want to add a backend for a new target, you will need to +`implement the target description`_ classes for your new target and understand +the `LLVM code representation `_. If you are interested in +implementing a new `code generation algorithm`_, it should only depend on the +target-description and machine code representation classes, ensuring that it is +portable. + +Required components in the code generator +----------------------------------------- + +The two pieces of the LLVM code generator are the high-level interface to the +code generator and the set of reusable components that can be used to build +target-specific backends. The two most important interfaces (:raw-html:`` +`TargetMachine`_ :raw-html:`` and :raw-html:`` `DataLayout`_ +:raw-html:``) are the only ones that are required to be defined for a +backend to fit into the LLVM system, but the others must be defined if the +reusable code generator components are going to be used. + +This design has two important implications. The first is that LLVM can support +completely non-traditional code generation targets. For example, the C backend +does not require register allocation, instruction selection, or any of the other +standard components provided by the system. As such, it only implements these +two interfaces, and does its own thing. Note that C backend was removed from the +trunk since LLVM 3.1 release. Another example of a code generator like this is a +(purely hypothetical) backend that converts LLVM to the GCC RTL form and uses +GCC to emit machine code for a target. + +This design also implies that it is possible to design and implement radically +different code generators in the LLVM system that do not make use of any of the +built-in components. Doing so is not recommended at all, but could be required +for radically different targets that do not fit into the LLVM machine +description model: FPGAs for example. + +.. _high-level design of the code generator: + +The high-level design of the code generator +------------------------------------------- + +The LLVM target-independent code generator is designed to support efficient and +quality code generation for standard register-based microprocessors. Code +generation in this model is divided into the following stages: + +1. `Instruction Selection`_ --- This phase determines an efficient way to + express the input LLVM code in the target instruction set. This stage + produces the initial code for the program in the target instruction set, then + makes use of virtual registers in SSA form and physical registers that + represent any required register assignments due to target constraints or + calling conventions. This step turns the LLVM code into a DAG of target + instructions. + +2. `Scheduling and Formation`_ --- This phase takes the DAG of target + instructions produced by the instruction selection phase, determines an + ordering of the instructions, then emits the instructions as :raw-html:`` + `MachineInstr`_\s :raw-html:`` with that ordering. Note that we + describe this in the `instruction selection section`_ because it operates on + a `SelectionDAG`_. + +3. `SSA-based Machine Code Optimizations`_ --- This optional stage consists of a + series of machine-code optimizations that operate on the SSA-form produced by + the instruction selector. Optimizations like modulo-scheduling or peephole + optimization work here. + +4. `Register Allocation`_ --- The target code is transformed from an infinite + virtual register file in SSA form to the concrete register file used by the + target. This phase introduces spill code and eliminates all virtual register + references from the program. + +5. `Prolog/Epilog Code Insertion`_ --- Once the machine code has been generated + for the function and the amount of stack space required is known (used for + LLVM alloca's and spill slots), the prolog and epilog code for the function + can be inserted and "abstract stack location references" can be eliminated. + This stage is responsible for implementing optimizations like frame-pointer + elimination and stack packing. + +6. `Late Machine Code Optimizations`_ --- Optimizations that operate on "final" + machine code can go here, such as spill code scheduling and peephole + optimizations. + +7. `Code Emission`_ --- The final stage actually puts out the code for the + current function, either in the target assembler format or in machine + code. + +The code generator is based on the assumption that the instruction selector will +use an optimal pattern matching selector to create high-quality sequences of +native instructions. Alternative code generator designs based on pattern +expansion and aggressive iterative peephole optimization are much slower. This +design permits efficient compilation (important for JIT environments) and +aggressive optimization (used when generating code offline) by allowing +components of varying levels of sophistication to be used for any step of +compilation. + +In addition to these stages, target implementations can insert arbitrary +target-specific passes into the flow. For example, the X86 target uses a +special pass to handle the 80x87 floating point stack architecture. Other +targets with unusual requirements can be supported with custom passes as needed. + +Using TableGen for target description +------------------------------------- + +The target description classes require a detailed description of the target +architecture. These target descriptions often have a large amount of common +information (e.g., an ``add`` instruction is almost identical to a ``sub`` +instruction). In order to allow the maximum amount of commonality to be +factored out, the LLVM code generator uses the +:doc:`TableGen ` tool to describe big chunks of the +target machine, which allows the use of domain-specific and target-specific +abstractions to reduce the amount of repetition. + +As LLVM continues to be developed and refined, we plan to move more and more of +the target description to the ``.td`` form. Doing so gives us a number of +advantages. The most important is that it makes it easier to port LLVM because +it reduces the amount of C++ code that has to be written, and the surface area +of the code generator that needs to be understood before someone can get +something working. Second, it makes it easier to change things. In particular, +if tables and other things are all emitted by ``tblgen``, we only need a change +in one place (``tblgen``) to update all of the targets to a new interface. + +.. _Abstract target description: +.. _target description: + +Target description classes +========================== + +The LLVM target description classes (located in the ``include/llvm/Target`` +directory) provide an abstract description of the target machine independent of +any particular client. These classes are designed to capture the *abstract* +properties of the target (such as the instructions and registers it has), and do +not incorporate any particular pieces of code generation algorithms. + +All of the target description classes (except the :raw-html:`` `DataLayout`_ +:raw-html:`` class) are designed to be subclassed by the concrete target +implementation, and have virtual methods implemented. To get to these +implementations, the :raw-html:`` `TargetMachine`_ :raw-html:`` class +provides accessors that should be implemented by the target. + +.. _TargetMachine: + +The ``TargetMachine`` class +--------------------------- + +The ``TargetMachine`` class provides virtual methods that are used to access the +target-specific implementations of the various target description classes via +the ``get*Info`` methods (``getInstrInfo``, ``getRegisterInfo``, +``getFrameInfo``, etc.). This class is designed to be specialized by a concrete +target implementation (e.g., ``X86TargetMachine``) which implements the various +virtual methods. The only required target description class is the +:raw-html:`` `DataLayout`_ :raw-html:`` class, but if the code +generator components are to be used, the other interfaces should be implemented +as well. + +.. _DataLayout: + +The ``DataLayout`` class +------------------------ + +The ``DataLayout`` class is the only required target description class, and it +is the only class that is not extensible (you cannot derive a new class from +it). ``DataLayout`` specifies information about how the target lays out memory +for structures, the alignment requirements for various data types, the size of +pointers in the target, and whether the target is little-endian or +big-endian. + +.. _TargetLowering: + +The ``TargetLowering`` class +---------------------------- + +The ``TargetLowering`` class is used by SelectionDAG based instruction selectors +primarily to describe how LLVM code should be lowered to SelectionDAG +operations. Among other things, this class indicates: + +* an initial register class to use for various ``ValueType``\s, + +* which operations are natively supported by the target machine, + +* the return type of ``setcc`` operations, + +* the type to use for shift amounts, and + +* various high-level characteristics, like whether it is profitable to turn + division by a constant into a multiplication sequence. + +.. _TargetRegisterInfo: + +The ``TargetRegisterInfo`` class +-------------------------------- + +The ``TargetRegisterInfo`` class is used to describe the register file of the +target and any interactions between the registers. + +Registers are represented in the code generator by unsigned integers. Physical +registers (those that actually exist in the target description) are unique +small numbers, and virtual registers are generally large. Note that +register ``#0`` is reserved as a flag value. + +Each register in the processor description has an associated +``TargetRegisterDesc`` entry, which provides a textual name for the register +(used for assembly output and debugging dumps) and a set of aliases (used to +indicate whether one register overlaps with another). + +In addition to the per-register description, the ``TargetRegisterInfo`` class +exposes a set of processor specific register classes (instances of the +``TargetRegisterClass`` class). Each register class contains sets of registers +that have the same properties (for example, they are all 32-bit integer +registers). Each SSA virtual register created by the instruction selector has +an associated register class. When the register allocator runs, it replaces +virtual registers with a physical register in the set. + +The target-specific implementations of these classes is auto-generated from a +`TableGen `_ description of the register file. + +.. _TargetInstrInfo: + +The ``TargetInstrInfo`` class +----------------------------- + +The ``TargetInstrInfo`` class is used to describe the machine instructions +supported by the target. Descriptions define things like the mnemonic for +the opcode, the number of operands, the list of implicit register uses and defs, +whether the instruction has certain target-independent properties (accesses +memory, is commutable, etc), and holds any target-specific flags. + +The ``TargetFrameInfo`` class +----------------------------- + +The ``TargetFrameInfo`` class is used to provide information about the stack +frame layout of the target. It holds the direction of stack growth, the known +stack alignment on entry to each function, and the offset to the local area. +The offset to the local area is the offset from the stack pointer on function +entry to the first location where function data (local variables, spill +locations) can be stored. + +The ``TargetSubtarget`` class +----------------------------- + +The ``TargetSubtarget`` class is used to provide information about the specific +chip set being targeted. A sub-target informs code generation of which +instructions are supported, instruction latencies and instruction execution +itinerary; i.e., which processing units are used, in what order, and for how +long. + +The ``TargetJITInfo`` class +--------------------------- + +The ``TargetJITInfo`` class exposes an abstract interface used by the +Just-In-Time code generator to perform target-specific activities, such as +emitting stubs. If a ``TargetMachine`` supports JIT code generation, it should +provide one of these objects through the ``getJITInfo`` method. + +.. _code being generated: +.. _machine code representation: + +Machine code description classes +================================ + +At the high-level, LLVM code is translated to a machine specific representation +formed out of :raw-html:`` `MachineFunction`_ :raw-html:``, +:raw-html:`` `MachineBasicBlock`_ :raw-html:``, and :raw-html:`` +`MachineInstr`_ :raw-html:`` instances (defined in +``include/llvm/CodeGen``). This representation is completely target agnostic, +representing instructions in their most abstract form: an opcode and a series of +operands. This representation is designed to support both an SSA representation +for machine code, as well as a register allocated, non-SSA form. + +.. _MachineInstr: + +The ``MachineInstr`` class +-------------------------- + +Target machine instructions are represented as instances of the ``MachineInstr`` +class. This class is an extremely abstract way of representing machine +instructions. In particular, it only keeps track of an opcode number and a set +of operands. + +The opcode number is a simple unsigned integer that only has meaning to a +specific backend. All of the instructions for a target should be defined in the +``*InstrInfo.td`` file for the target. The opcode enum values are auto-generated +from this description. The ``MachineInstr`` class does not have any information +about how to interpret the instruction (i.e., what the semantics of the +instruction are); for that you must refer to the :raw-html:`` +`TargetInstrInfo`_ :raw-html:`` class. + +The operands of a machine instruction can be of several different types: a +register reference, a constant integer, a basic block reference, etc. In +addition, a machine operand should be marked as a def or a use of the value +(though only registers are allowed to be defs). + +By convention, the LLVM code generator orders instruction operands so that all +register definitions come before the register uses, even on architectures that +are normally printed in other orders. For example, the SPARC add instruction: +"``add %i1, %i2, %i3``" adds the "%i1", and "%i2" registers and stores the +result into the "%i3" register. In the LLVM code generator, the operands should +be stored as "``%i3, %i1, %i2``": with the destination first. + +Keeping destination (definition) operands at the beginning of the operand list +has several advantages. In particular, the debugging printer will print the +instruction like this: + +.. code-block:: llvm + + %r3 = add %i1, %i2 + +Also if the first operand is a def, it is easier to `create instructions`_ whose +only def is the first operand. + +.. _create instructions: + +Using the ``MachineInstrBuilder.h`` functions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Machine instructions are created by using the ``BuildMI`` functions, located in +the ``include/llvm/CodeGen/MachineInstrBuilder.h`` file. The ``BuildMI`` +functions make it easy to build arbitrary machine instructions. Usage of the +``BuildMI`` functions look like this: + +.. code-block:: c++ + + // Create a 'DestReg = mov 42' (rendered in X86 assembly as 'mov DestReg, 42') + // instruction. The '1' specifies how many operands will be added. + MachineInstr *MI = BuildMI(X86::MOV32ri, 1, DestReg).addImm(42); + + // Create the same instr, but insert it at the end of a basic block. + MachineBasicBlock &MBB = ... + BuildMI(MBB, X86::MOV32ri, 1, DestReg).addImm(42); + + // Create the same instr, but insert it before a specified iterator point. + MachineBasicBlock::iterator MBBI = ... + BuildMI(MBB, MBBI, X86::MOV32ri, 1, DestReg).addImm(42); + + // Create a 'cmp Reg, 0' instruction, no destination reg. + MI = BuildMI(X86::CMP32ri, 2).addReg(Reg).addImm(0); + + // Create an 'sahf' instruction which takes no operands and stores nothing. + MI = BuildMI(X86::SAHF, 0); + + // Create a self looping branch instruction. + BuildMI(MBB, X86::JNE, 1).addMBB(&MBB); + +The key thing to remember with the ``BuildMI`` functions is that you have to +specify the number of operands that the machine instruction will take. This +allows for efficient memory allocation. You also need to specify if operands +default to be uses of values, not definitions. If you need to add a definition +operand (other than the optional destination register), you must explicitly mark +it as such: + +.. code-block:: c++ + + MI.addReg(Reg, RegState::Define); + +Fixed (preassigned) registers +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +One important issue that the code generator needs to be aware of is the presence +of fixed registers. In particular, there are often places in the instruction +stream where the register allocator *must* arrange for a particular value to be +in a particular register. This can occur due to limitations of the instruction +set (e.g., the X86 can only do a 32-bit divide with the ``EAX``/``EDX`` +registers), or external factors like calling conventions. In any case, the +instruction selector should emit code that copies a virtual register into or out +of a physical register when needed. + +For example, consider this simple LLVM example: + +.. code-block:: llvm + + define i32 @test(i32 %X, i32 %Y) { + %Z = udiv i32 %X, %Y + ret i32 %Z + } + +The X86 instruction selector produces this machine code for the ``div`` and +``ret`` (use "``llc X.bc -march=x86 -print-machineinstrs``" to get this): + +.. code-block:: llvm + + ;; Start of div + %EAX = mov %reg1024 ;; Copy X (in reg1024) into EAX + %reg1027 = sar %reg1024, 31 + %EDX = mov %reg1027 ;; Sign extend X into EDX + idiv %reg1025 ;; Divide by Y (in reg1025) + %reg1026 = mov %EAX ;; Read the result (Z) out of EAX + + ;; Start of ret + %EAX = mov %reg1026 ;; 32-bit return value goes in EAX + ret + +By the end of code generation, the register allocator has coalesced the +registers and deleted the resultant identity moves producing the following +code: + +.. code-block:: llvm + + ;; X is in EAX, Y is in ECX + mov %EAX, %EDX + sar %EDX, 31 + idiv %ECX + ret + +This approach is extremely general (if it can handle the X86 architecture, it +can handle anything!) and allows all of the target specific knowledge about the +instruction stream to be isolated in the instruction selector. Note that +physical registers should have a short lifetime for good code generation, and +all physical registers are assumed dead on entry to and exit from basic blocks +(before register allocation). Thus, if you need a value to be live across basic +block boundaries, it *must* live in a virtual register. + +Call-clobbered registers +^^^^^^^^^^^^^^^^^^^^^^^^ + +Some machine instructions, like calls, clobber a large number of physical +registers. Rather than adding ```` operands for all of them, it is +possible to use an ``MO_RegisterMask`` operand instead. The register mask +operand holds a bit mask of preserved registers, and everything else is +considered to be clobbered by the instruction. + +Machine code in SSA form +^^^^^^^^^^^^^^^^^^^^^^^^ + +``MachineInstr``'s are initially selected in SSA-form, and are maintained in +SSA-form until register allocation happens. For the most part, this is +trivially simple since LLVM is already in SSA form; LLVM PHI nodes become +machine code PHI nodes, and virtual registers are only allowed to have a single +definition. + +After register allocation, machine code is no longer in SSA-form because there +are no virtual registers left in the code. + +.. _MachineBasicBlock: + +The ``MachineBasicBlock`` class +------------------------------- + +The ``MachineBasicBlock`` class contains a list of machine instructions +(:raw-html:`` `MachineInstr`_ :raw-html:`` instances). It roughly +corresponds to the LLVM code input to the instruction selector, but there can be +a one-to-many mapping (i.e. one LLVM basic block can map to multiple machine +basic blocks). The ``MachineBasicBlock`` class has a "``getBasicBlock``" method, +which returns the LLVM basic block that it comes from. + +.. _MachineFunction: + +The ``MachineFunction`` class +----------------------------- + +The ``MachineFunction`` class contains a list of machine basic blocks +(:raw-html:`` `MachineBasicBlock`_ :raw-html:`` instances). It +corresponds one-to-one with the LLVM function input to the instruction selector. +In addition to a list of basic blocks, the ``MachineFunction`` contains a a +``MachineConstantPool``, a ``MachineFrameInfo``, a ``MachineFunctionInfo``, and +a ``MachineRegisterInfo``. See ``include/llvm/CodeGen/MachineFunction.h`` for +more information. + +``MachineInstr Bundles`` +------------------------ + +LLVM code generator can model sequences of instructions as MachineInstr +bundles. A MI bundle can model a VLIW group / pack which contains an arbitrary +number of parallel instructions. It can also be used to model a sequential list +of instructions (potentially with data dependencies) that cannot be legally +separated (e.g. ARM Thumb2 IT blocks). + +Conceptually a MI bundle is a MI with a number of other MIs nested within: + +:: + + -------------- + | Bundle | --------- + -------------- \ + | ---------------- + | | MI | + | ---------------- + | | + | ---------------- + | | MI | + | ---------------- + | | + | ---------------- + | | MI | + | ---------------- + | + -------------- + | Bundle | -------- + -------------- \ + | ---------------- + | | MI | + | ---------------- + | | + | ---------------- + | | MI | + | ---------------- + | | + | ... + | + -------------- + | Bundle | -------- + -------------- \ + | + ... + +MI bundle support does not change the physical representations of +MachineBasicBlock and MachineInstr. All the MIs (including top level and nested +ones) are stored as sequential list of MIs. The "bundled" MIs are marked with +the 'InsideBundle' flag. A top level MI with the special BUNDLE opcode is used +to represent the start of a bundle. It's legal to mix BUNDLE MIs with indiviual +MIs that are not inside bundles nor represent bundles. + +MachineInstr passes should operate on a MI bundle as a single unit. Member +methods have been taught to correctly handle bundles and MIs inside bundles. +The MachineBasicBlock iterator has been modified to skip over bundled MIs to +enforce the bundle-as-a-single-unit concept. An alternative iterator +instr_iterator has been added to MachineBasicBlock to allow passes to iterate +over all of the MIs in a MachineBasicBlock, including those which are nested +inside bundles. The top level BUNDLE instruction must have the correct set of +register MachineOperand's that represent the cumulative inputs and outputs of +the bundled MIs. + +Packing / bundling of MachineInstr's should be done as part of the register +allocation super-pass. More specifically, the pass which determines what MIs +should be bundled together must be done after code generator exits SSA form +(i.e. after two-address pass, PHI elimination, and copy coalescing). Bundles +should only be finalized (i.e. adding BUNDLE MIs and input and output register +MachineOperands) after virtual registers have been rewritten into physical +registers. This requirement eliminates the need to add virtual register operands +to BUNDLE instructions which would effectively double the virtual register def +and use lists. + +.. _MC Layer: + +The "MC" Layer +============== + +The MC Layer is used to represent and process code at the raw machine code +level, devoid of "high level" information like "constant pools", "jump tables", +"global variables" or anything like that. At this level, LLVM handles things +like label names, machine instructions, and sections in the object file. The +code in this layer is used for a number of important purposes: the tail end of +the code generator uses it to write a .s or .o file, and it is also used by the +llvm-mc tool to implement standalone machine code assemblers and disassemblers. + +This section describes some of the important classes. There are also a number +of important subsystems that interact at this layer, they are described later in +this manual. + +.. _MCStreamer: + +The ``MCStreamer`` API +---------------------- + +MCStreamer is best thought of as an assembler API. It is an abstract API which +is *implemented* in different ways (e.g. to output a .s file, output an ELF .o +file, etc) but whose API correspond directly to what you see in a .s file. +MCStreamer has one method per directive, such as EmitLabel, EmitSymbolAttribute, +SwitchSection, EmitValue (for .byte, .word), etc, which directly correspond to +assembly level directives. It also has an EmitInstruction method, which is used +to output an MCInst to the streamer. + +This API is most important for two clients: the llvm-mc stand-alone assembler is +effectively a parser that parses a line, then invokes a method on MCStreamer. In +the code generator, the `Code Emission`_ phase of the code generator lowers +higher level LLVM IR and Machine* constructs down to the MC layer, emitting +directives through MCStreamer. + +On the implementation side of MCStreamer, there are two major implementations: +one for writing out a .s file (MCAsmStreamer), and one for writing out a .o +file (MCObjectStreamer). MCAsmStreamer is a straight-forward implementation +that prints out a directive for each method (e.g. ``EmitValue -> .byte``), but +MCObjectStreamer implements a full assembler. + +For target specific directives, the MCStreamer has a MCTargetStreamer instance. +Each target that needs it defines a class that inherits from it and is a lot +like MCStreamer itself: It has one method per directive and two classes that +inherit from it, a target object streamer and a target asm streamer. The target +asm streamer just prints it (``emitFnStart -> .fnstrart``), and the object +streamer implement the assembler logic for it. + +To make llvm use these classes, the target initialization must call +TargetRegistry::RegisterAsmStreamer and TargetRegistry::RegisterMCObjectStreamer +passing callbacks that allocate the corresponding target streamer and pass it +to createAsmStreamer or to the appropriate object streamer constructor. + +The ``MCContext`` class +----------------------- + +The MCContext class is the owner of a variety of uniqued data structures at the +MC layer, including symbols, sections, etc. As such, this is the class that you +interact with to create symbols and sections. This class can not be subclassed. + +The ``MCSymbol`` class +---------------------- + +The MCSymbol class represents a symbol (aka label) in the assembly file. There +are two interesting kinds of symbols: assembler temporary symbols, and normal +symbols. Assembler temporary symbols are used and processed by the assembler +but are discarded when the object file is produced. The distinction is usually +represented by adding a prefix to the label, for example "L" labels are +assembler temporary labels in MachO. + +MCSymbols are created by MCContext and uniqued there. This means that MCSymbols +can be compared for pointer equivalence to find out if they are the same symbol. +Note that pointer inequality does not guarantee the labels will end up at +different addresses though. It's perfectly legal to output something like this +to the .s file: + +:: + + foo: + bar: + .byte 4 + +In this case, both the foo and bar symbols will have the same address. + +The ``MCSection`` class +----------------------- + +The ``MCSection`` class represents an object-file specific section. It is +subclassed by object file specific implementations (e.g. ``MCSectionMachO``, +``MCSectionCOFF``, ``MCSectionELF``) and these are created and uniqued by +MCContext. The MCStreamer has a notion of the current section, which can be +changed with the SwitchToSection method (which corresponds to a ".section" +directive in a .s file). + +.. _MCInst: + +The ``MCInst`` class +-------------------- + +The ``MCInst`` class is a target-independent representation of an instruction. +It is a simple class (much more so than `MachineInstr`_) that holds a +target-specific opcode and a vector of MCOperands. MCOperand, in turn, is a +simple discriminated union of three cases: 1) a simple immediate, 2) a target +register ID, 3) a symbolic expression (e.g. "``Lfoo-Lbar+42``") as an MCExpr. + +MCInst is the common currency used to represent machine instructions at the MC +layer. It is the type used by the instruction encoder, the instruction printer, +and the type generated by the assembly parser and disassembler. + +.. _Target-independent algorithms: +.. _code generation algorithm: + +Target-independent code generation algorithms +============================================= + +This section documents the phases described in the `high-level design of the +code generator`_. It explains how they work and some of the rationale behind +their design. + +.. _Instruction Selection: +.. _instruction selection section: + +Instruction Selection +--------------------- + +Instruction Selection is the process of translating LLVM code presented to the +code generator into target-specific machine instructions. There are several +well-known ways to do this in the literature. LLVM uses a SelectionDAG based +instruction selector. + +Portions of the DAG instruction selector are generated from the target +description (``*.td``) files. Our goal is for the entire instruction selector +to be generated from these ``.td`` files, though currently there are still +things that require custom C++ code. + +.. _SelectionDAG: + +Introduction to SelectionDAGs +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The SelectionDAG provides an abstraction for code representation in a way that +is amenable to instruction selection using automatic techniques +(e.g. dynamic-programming based optimal pattern matching selectors). It is also +well-suited to other phases of code generation; in particular, instruction +scheduling (SelectionDAG's are very close to scheduling DAGs post-selection). +Additionally, the SelectionDAG provides a host representation where a large +variety of very-low-level (but target-independent) `optimizations`_ may be +performed; ones which require extensive information about the instructions +efficiently supported by the target. + +The SelectionDAG is a Directed-Acyclic-Graph whose nodes are instances of the +``SDNode`` class. The primary payload of the ``SDNode`` is its operation code +(Opcode) that indicates what operation the node performs and the operands to the +operation. The various operation node types are described at the top of the +``include/llvm/CodeGen/SelectionDAGNodes.h`` file. + +Although most operations define a single value, each node in the graph may +define multiple values. For example, a combined div/rem operation will define +both the dividend and the remainder. Many other situations require multiple +values as well. Each node also has some number of operands, which are edges to +the node defining the used value. Because nodes may define multiple values, +edges are represented by instances of the ``SDValue`` class, which is a +```` pair, indicating the node and result value being used, +respectively. Each value produced by an ``SDNode`` has an associated ``MVT`` +(Machine Value Type) indicating what the type of the value is. + +SelectionDAGs contain two different kinds of values: those that represent data +flow and those that represent control flow dependencies. Data values are simple +edges with an integer or floating point value type. Control edges are +represented as "chain" edges which are of type ``MVT::Other``. These edges +provide an ordering between nodes that have side effects (such as loads, stores, +calls, returns, etc). All nodes that have side effects should take a token +chain as input and produce a new one as output. By convention, token chain +inputs are always operand #0, and chain results are always the last value +produced by an operation. + +A SelectionDAG has designated "Entry" and "Root" nodes. The Entry node is +always a marker node with an Opcode of ``ISD::EntryToken``. The Root node is +the final side-effecting node in the token chain. For example, in a single basic +block function it would be the return node. + +One important concept for SelectionDAGs is the notion of a "legal" vs. +"illegal" DAG. A legal DAG for a target is one that only uses supported +operations and supported types. On a 32-bit PowerPC, for example, a DAG with a +value of type i1, i8, i16, or i64 would be illegal, as would a DAG that uses a +SREM or UREM operation. The `legalize types`_ and `legalize operations`_ phases +are responsible for turning an illegal DAG into a legal DAG. + +.. _SelectionDAG-Process: + +SelectionDAG Instruction Selection Process +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +SelectionDAG-based instruction selection consists of the following steps: + +#. `Build initial DAG`_ --- This stage performs a simple translation from the + input LLVM code to an illegal SelectionDAG. + +#. `Optimize SelectionDAG`_ --- This stage performs simple optimizations on the + SelectionDAG to simplify it, and recognize meta instructions (like rotates + and ``div``/``rem`` pairs) for targets that support these meta operations. + This makes the resultant code more efficient and the `select instructions + from DAG`_ phase (below) simpler. + +#. `Legalize SelectionDAG Types`_ --- This stage transforms SelectionDAG nodes + to eliminate any types that are unsupported on the target. + +#. `Optimize SelectionDAG`_ --- The SelectionDAG optimizer is run to clean up + redundancies exposed by type legalization. + +#. `Legalize SelectionDAG Ops`_ --- This stage transforms SelectionDAG nodes to + eliminate any operations that are unsupported on the target. + +#. `Optimize SelectionDAG`_ --- The SelectionDAG optimizer is run to eliminate + inefficiencies introduced by operation legalization. + +#. `Select instructions from DAG`_ --- Finally, the target instruction selector + matches the DAG operations to target instructions. This process translates + the target-independent input DAG into another DAG of target instructions. + +#. `SelectionDAG Scheduling and Formation`_ --- The last phase assigns a linear + order to the instructions in the target-instruction DAG and emits them into + the MachineFunction being compiled. This step uses traditional prepass + scheduling techniques. + +After all of these steps are complete, the SelectionDAG is destroyed and the +rest of the code generation passes are run. + +One great way to visualize what is going on here is to take advantage of a few +LLC command line options. The following options pop up a window displaying the +SelectionDAG at specific times (if you only get errors printed to the console +while using this, you probably `need to configure your +system `_ to add support for it). + +* ``-view-dag-combine1-dags`` displays the DAG after being built, before the + first optimization pass. + +* ``-view-legalize-dags`` displays the DAG before Legalization. + +* ``-view-dag-combine2-dags`` displays the DAG before the second optimization + pass. + +* ``-view-isel-dags`` displays the DAG before the Select phase. + +* ``-view-sched-dags`` displays the DAG before Scheduling. + +The ``-view-sunit-dags`` displays the Scheduler's dependency graph. This graph +is based on the final SelectionDAG, with nodes that must be scheduled together +bundled into a single scheduling-unit node, and with immediate operands and +other nodes that aren't relevant for scheduling omitted. + +.. _Build initial DAG: + +Initial SelectionDAG Construction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The initial SelectionDAG is na\ :raw-html:`ï`\ vely peephole expanded from +the LLVM input by the ``SelectionDAGBuilder`` class. The intent of this pass +is to expose as much low-level, target-specific details to the SelectionDAG as +possible. This pass is mostly hard-coded (e.g. an LLVM ``add`` turns into an +``SDNode add`` while a ``getelementptr`` is expanded into the obvious +arithmetic). This pass requires target-specific hooks to lower calls, returns, +varargs, etc. For these features, the :raw-html:`` `TargetLowering`_ +:raw-html:`` interface is used. + +.. _legalize types: +.. _Legalize SelectionDAG Types: +.. _Legalize SelectionDAG Ops: + +SelectionDAG LegalizeTypes Phase +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The Legalize phase is in charge of converting a DAG to only use the types that +are natively supported by the target. + +There are two main ways of converting values of unsupported scalar types to +values of supported types: converting small types to larger types ("promoting"), +and breaking up large integer types into smaller ones ("expanding"). For +example, a target might require that all f32 values are promoted to f64 and that +all i1/i8/i16 values are promoted to i32. The same target might require that +all i64 values be expanded into pairs of i32 values. These changes can insert +sign and zero extensions as needed to make sure that the final code has the same +behavior as the input. + +There are two main ways of converting values of unsupported vector types to +value of supported types: splitting vector types, multiple times if necessary, +until a legal type is found, and extending vector types by adding elements to +the end to round them out to legal types ("widening"). If a vector gets split +all the way down to single-element parts with no supported vector type being +found, the elements are converted to scalars ("scalarizing"). + +A target implementation tells the legalizer which types are supported (and which +register class to use for them) by calling the ``addRegisterClass`` method in +its ``TargetLowering`` constructor. + +.. _legalize operations: +.. _Legalizer: + +SelectionDAG Legalize Phase +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The Legalize phase is in charge of converting a DAG to only use the operations +that are natively supported by the target. + +Targets often have weird constraints, such as not supporting every operation on +every supported datatype (e.g. X86 does not support byte conditional moves and +PowerPC does not support sign-extending loads from a 16-bit memory location). +Legalize takes care of this by open-coding another sequence of operations to +emulate the operation ("expansion"), by promoting one type to a larger type that +supports the operation ("promotion"), or by using a target-specific hook to +implement the legalization ("custom"). + +A target implementation tells the legalizer which operations are not supported +(and which of the above three actions to take) by calling the +``setOperationAction`` method in its ``TargetLowering`` constructor. + +Prior to the existence of the Legalize passes, we required that every target +`selector`_ supported and handled every operator and type even if they are not +natively supported. The introduction of the Legalize phases allows all of the +canonicalization patterns to be shared across targets, and makes it very easy to +optimize the canonicalized code because it is still in the form of a DAG. + +.. _optimizations: +.. _Optimize SelectionDAG: +.. _selector: + +SelectionDAG Optimization Phase: the DAG Combiner +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The SelectionDAG optimization phase is run multiple times for code generation, +immediately after the DAG is built and once after each legalization. The first +run of the pass allows the initial code to be cleaned up (e.g. performing +optimizations that depend on knowing that the operators have restricted type +inputs). Subsequent runs of the pass clean up the messy code generated by the +Legalize passes, which allows Legalize to be very simple (it can focus on making +code legal instead of focusing on generating *good* and legal code). + +One important class of optimizations performed is optimizing inserted sign and +zero extension instructions. We currently use ad-hoc techniques, but could move +to more rigorous techniques in the future. Here are some good papers on the +subject: + +"`Widening integer arithmetic `_" :raw-html:`
` +Kevin Redwine and Norman Ramsey :raw-html:`
` +International Conference on Compiler Construction (CC) 2004 + +"`Effective sign extension elimination `_" :raw-html:`
` +Motohiro Kawahito, Hideaki Komatsu, and Toshio Nakatani :raw-html:`
` +Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design +and Implementation. + +.. _Select instructions from DAG: + +SelectionDAG Select Phase +^^^^^^^^^^^^^^^^^^^^^^^^^ + +The Select phase is the bulk of the target-specific code for instruction +selection. This phase takes a legal SelectionDAG as input, pattern matches the +instructions supported by the target to this DAG, and produces a new DAG of +target code. For example, consider the following LLVM fragment: + +.. code-block:: llvm + + %t1 = fadd float %W, %X + %t2 = fmul float %t1, %Y + %t3 = fadd float %t2, %Z + +This LLVM code corresponds to a SelectionDAG that looks basically like this: + +.. code-block:: llvm + + (fadd:f32 (fmul:f32 (fadd:f32 W, X), Y), Z) + +If a target supports floating point multiply-and-add (FMA) operations, one of +the adds can be merged with the multiply. On the PowerPC, for example, the +output of the instruction selector might look like this DAG: + +:: + + (FMADDS (FADDS W, X), Y, Z) + +The ``FMADDS`` instruction is a ternary instruction that multiplies its first +two operands and adds the third (as single-precision floating-point numbers). +The ``FADDS`` instruction is a simple binary single-precision add instruction. +To perform this pattern match, the PowerPC backend includes the following +instruction definitions: + +.. code-block:: text + :emphasize-lines: 4-5,9 + + def FMADDS : AForm_1<59, 29, + (ops F4RC:$FRT, F4RC:$FRA, F4RC:$FRC, F4RC:$FRB), + "fmadds $FRT, $FRA, $FRC, $FRB", + [(set F4RC:$FRT, (fadd (fmul F4RC:$FRA, F4RC:$FRC), + F4RC:$FRB))]>; + def FADDS : AForm_2<59, 21, + (ops F4RC:$FRT, F4RC:$FRA, F4RC:$FRB), + "fadds $FRT, $FRA, $FRB", + [(set F4RC:$FRT, (fadd F4RC:$FRA, F4RC:$FRB))]>; + +The highlighted portion of the instruction definitions indicates the pattern +used to match the instructions. The DAG operators (like ``fmul``/``fadd``) +are defined in the ``include/llvm/Target/TargetSelectionDAG.td`` file. +"``F4RC``" is the register class of the input and result values. + +The TableGen DAG instruction selector generator reads the instruction patterns +in the ``.td`` file and automatically builds parts of the pattern matching code +for your target. It has the following strengths: + +* At compiler-compiler time, it analyzes your instruction patterns and tells you + if your patterns make sense or not. + +* It can handle arbitrary constraints on operands for the pattern match. In + particular, it is straight-forward to say things like "match any immediate + that is a 13-bit sign-extended value". For examples, see the ``immSExt16`` + and related ``tblgen`` classes in the PowerPC backend. + +* It knows several important identities for the patterns defined. For example, + it knows that addition is commutative, so it allows the ``FMADDS`` pattern + above to match "``(fadd X, (fmul Y, Z))``" as well as "``(fadd (fmul X, Y), + Z)``", without the target author having to specially handle this case. + +* It has a full-featured type-inferencing system. In particular, you should + rarely have to explicitly tell the system what type parts of your patterns + are. In the ``FMADDS`` case above, we didn't have to tell ``tblgen`` that all + of the nodes in the pattern are of type 'f32'. It was able to infer and + propagate this knowledge from the fact that ``F4RC`` has type 'f32'. + +* Targets can define their own (and rely on built-in) "pattern fragments". + Pattern fragments are chunks of reusable patterns that get inlined into your + patterns during compiler-compiler time. For example, the integer "``(not + x)``" operation is actually defined as a pattern fragment that expands as + "``(xor x, -1)``", since the SelectionDAG does not have a native '``not``' + operation. Targets can define their own short-hand fragments as they see fit. + See the definition of '``not``' and '``ineg``' for examples. + +* In addition to instructions, targets can specify arbitrary patterns that map + to one or more instructions using the 'Pat' class. For example, the PowerPC + has no way to load an arbitrary integer immediate into a register in one + instruction. To tell tblgen how to do this, it defines: + + :: + + // Arbitrary immediate support. Implement in terms of LIS/ORI. + def : Pat<(i32 imm:$imm), + (ORI (LIS (HI16 imm:$imm)), (LO16 imm:$imm))>; + + If none of the single-instruction patterns for loading an immediate into a + register match, this will be used. This rule says "match an arbitrary i32 + immediate, turning it into an ``ORI`` ('or a 16-bit immediate') and an ``LIS`` + ('load 16-bit immediate, where the immediate is shifted to the left 16 bits') + instruction". To make this work, the ``LO16``/``HI16`` node transformations + are used to manipulate the input immediate (in this case, take the high or low + 16-bits of the immediate). + +* When using the 'Pat' class to map a pattern to an instruction that has one + or more complex operands (like e.g. `X86 addressing mode`_), the pattern may + either specify the operand as a whole using a ``ComplexPattern``, or else it + may specify the components of the complex operand separately. The latter is + done e.g. for pre-increment instructions by the PowerPC back end: + + :: + + def STWU : DForm_1<37, (outs ptr_rc:$ea_res), (ins GPRC:$rS, memri:$dst), + "stwu $rS, $dst", LdStStoreUpd, []>, + RegConstraint<"$dst.reg = $ea_res">, NoEncode<"$ea_res">; + + def : Pat<(pre_store GPRC:$rS, ptr_rc:$ptrreg, iaddroff:$ptroff), + (STWU GPRC:$rS, iaddroff:$ptroff, ptr_rc:$ptrreg)>; + + Here, the pair of ``ptroff`` and ``ptrreg`` operands is matched onto the + complex operand ``dst`` of class ``memri`` in the ``STWU`` instruction. + +* While the system does automate a lot, it still allows you to write custom C++ + code to match special cases if there is something that is hard to + express. + +While it has many strengths, the system currently has some limitations, +primarily because it is a work in progress and is not yet finished: + +* Overall, there is no way to define or match SelectionDAG nodes that define + multiple values (e.g. ``SMUL_LOHI``, ``LOAD``, ``CALL``, etc). This is the + biggest reason that you currently still *have to* write custom C++ code + for your instruction selector. + +* There is no great way to support matching complex addressing modes yet. In + the future, we will extend pattern fragments to allow them to define multiple + values (e.g. the four operands of the `X86 addressing mode`_, which are + currently matched with custom C++ code). In addition, we'll extend fragments + so that a fragment can match multiple different patterns. + +* We don't automatically infer flags like ``isStore``/``isLoad`` yet. + +* We don't automatically generate the set of supported registers and operations + for the `Legalizer`_ yet. + +* We don't have a way of tying in custom legalized nodes yet. + +Despite these limitations, the instruction selector generator is still quite +useful for most of the binary and logical operations in typical instruction +sets. If you run into any problems or can't figure out how to do something, +please let Chris know! + +.. _Scheduling and Formation: +.. _SelectionDAG Scheduling and Formation: + +SelectionDAG Scheduling and Formation Phase +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The scheduling phase takes the DAG of target instructions from the selection +phase and assigns an order. The scheduler can pick an order depending on +various constraints of the machines (i.e. order for minimal register pressure or +try to cover instruction latencies). Once an order is established, the DAG is +converted to a list of :raw-html:`` `MachineInstr`_\s :raw-html:`` and +the SelectionDAG is destroyed. + +Note that this phase is logically separate from the instruction selection phase, +but is tied to it closely in the code because it operates on SelectionDAGs. + +Future directions for the SelectionDAG +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +#. Optional function-at-a-time selection. + +#. Auto-generate entire selector from ``.td`` file. + +.. _SSA-based Machine Code Optimizations: + +SSA-based Machine Code Optimizations +------------------------------------ + +To Be Written + +Live Intervals +-------------- + +Live Intervals are the ranges (intervals) where a variable is *live*. They are +used by some `register allocator`_ passes to determine if two or more virtual +registers which require the same physical register are live at the same point in +the program (i.e., they conflict). When this situation occurs, one virtual +register must be *spilled*. + +Live Variable Analysis +^^^^^^^^^^^^^^^^^^^^^^ + +The first step in determining the live intervals of variables is to calculate +the set of registers that are immediately dead after the instruction (i.e., the +instruction calculates the value, but it is never used) and the set of registers +that are used by the instruction, but are never used after the instruction +(i.e., they are killed). Live variable information is computed for +each *virtual* register and *register allocatable* physical register +in the function. This is done in a very efficient manner because it uses SSA to +sparsely compute lifetime information for virtual registers (which are in SSA +form) and only has to track physical registers within a block. Before register +allocation, LLVM can assume that physical registers are only live within a +single basic block. This allows it to do a single, local analysis to resolve +physical register lifetimes within each basic block. If a physical register is +not register allocatable (e.g., a stack pointer or condition codes), it is not +tracked. + +Physical registers may be live in to or out of a function. Live in values are +typically arguments in registers. Live out values are typically return values in +registers. Live in values are marked as such, and are given a dummy "defining" +instruction during live intervals analysis. If the last basic block of a +function is a ``return``, then it's marked as using all live out values in the +function. + +``PHI`` nodes need to be handled specially, because the calculation of the live +variable information from a depth first traversal of the CFG of the function +won't guarantee that a virtual register used by the ``PHI`` node is defined +before it's used. When a ``PHI`` node is encountered, only the definition is +handled, because the uses will be handled in other basic blocks. + +For each ``PHI`` node of the current basic block, we simulate an assignment at +the end of the current basic block and traverse the successor basic blocks. If a +successor basic block has a ``PHI`` node and one of the ``PHI`` node's operands +is coming from the current basic block, then the variable is marked as *alive* +within the current basic block and all of its predecessor basic blocks, until +the basic block with the defining instruction is encountered. + +Live Intervals Analysis +^^^^^^^^^^^^^^^^^^^^^^^ + +We now have the information available to perform the live intervals analysis and +build the live intervals themselves. We start off by numbering the basic blocks +and machine instructions. We then handle the "live-in" values. These are in +physical registers, so the physical register is assumed to be killed by the end +of the basic block. Live intervals for virtual registers are computed for some +ordering of the machine instructions ``[1, N]``. A live interval is an interval +``[i, j)``, where ``1 >= i >= j > N``, for which a variable is live. + +.. note:: + More to come... + +.. _Register Allocation: +.. _register allocator: + +Register Allocation +------------------- + +The *Register Allocation problem* consists in mapping a program +:raw-html:`` P\ :sub:`v`\ :raw-html:``, that can use an unbounded +number of virtual registers, to a program :raw-html:`` P\ :sub:`p`\ +:raw-html:`` that contains a finite (possibly small) number of physical +registers. Each target architecture has a different number of physical +registers. If the number of physical registers is not enough to accommodate all +the virtual registers, some of them will have to be mapped into memory. These +virtuals are called *spilled virtuals*. + +How registers are represented in LLVM +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +In LLVM, physical registers are denoted by integer numbers that normally range +from 1 to 1023. To see how this numbering is defined for a particular +architecture, you can read the ``GenRegisterNames.inc`` file for that +architecture. For instance, by inspecting +``lib/Target/X86/X86GenRegisterInfo.inc`` we see that the 32-bit register +``EAX`` is denoted by 43, and the MMX register ``MM0`` is mapped to 65. + +Some architectures contain registers that share the same physical location. A +notable example is the X86 platform. For instance, in the X86 architecture, the +registers ``EAX``, ``AX`` and ``AL`` share the first eight bits. These physical +registers are marked as *aliased* in LLVM. Given a particular architecture, you +can check which registers are aliased by inspecting its ``RegisterInfo.td`` +file. Moreover, the class ``MCRegAliasIterator`` enumerates all the physical +registers aliased to a register. + +Physical registers, in LLVM, are grouped in *Register Classes*. Elements in the +same register class are functionally equivalent, and can be interchangeably +used. Each virtual register can only be mapped to physical registers of a +particular class. For instance, in the X86 architecture, some virtuals can only +be allocated to 8 bit registers. A register class is described by +``TargetRegisterClass`` objects. To discover if a virtual register is +compatible with a given physical, this code can be used:

+ +.. code-block:: c++ + + bool RegMapping_Fer::compatible_class(MachineFunction &mf, + unsigned v_reg, + unsigned p_reg) { + assert(TargetRegisterInfo::isPhysicalRegister(p_reg) && + "Target register must be physical"); + const TargetRegisterClass *trc = mf.getRegInfo().getRegClass(v_reg); + return trc->contains(p_reg); + } + +Sometimes, mostly for debugging purposes, it is useful to change the number of +physical registers available in the target architecture. This must be done +statically, inside the ``TargetRegsterInfo.td`` file. Just ``grep`` for +``RegisterClass``, the last parameter of which is a list of registers. Just +commenting some out is one simple way to avoid them being used. A more polite +way is to explicitly exclude some registers from the *allocation order*. See the +definition of the ``GR8`` register class in +``lib/Target/X86/X86RegisterInfo.td`` for an example of this. + +Virtual registers are also denoted by integer numbers. Contrary to physical +registers, different virtual registers never share the same number. Whereas +physical registers are statically defined in a ``TargetRegisterInfo.td`` file +and cannot be created by the application developer, that is not the case with +virtual registers. In order to create new virtual registers, use the method +``MachineRegisterInfo::createVirtualRegister()``. This method will return a new +virtual register. Use an ``IndexedMap`` to hold +information per virtual register. If you need to enumerate all virtual +registers, use the function ``TargetRegisterInfo::index2VirtReg()`` to find the +virtual register numbers: + +.. code-block:: c++ + + for (unsigned i = 0, e = MRI->getNumVirtRegs(); i != e; ++i) { + unsigned VirtReg = TargetRegisterInfo::index2VirtReg(i); + stuff(VirtReg); + } + +Before register allocation, the operands of an instruction are mostly virtual +registers, although physical registers may also be used. In order to check if a +given machine operand is a register, use the boolean function +``MachineOperand::isRegister()``. To obtain the integer code of a register, use +``MachineOperand::getReg()``. An instruction may define or use a register. For +instance, ``ADD reg:1026 := reg:1025 reg:1024`` defines the registers 1024, and +uses registers 1025 and 1026. Given a register operand, the method +``MachineOperand::isUse()`` informs if that register is being used by the +instruction. The method ``MachineOperand::isDef()`` informs if that registers is +being defined. + +We will call physical registers present in the LLVM bitcode before register +allocation *pre-colored registers*. Pre-colored registers are used in many +different situations, for instance, to pass parameters of functions calls, and +to store results of particular instructions. There are two types of pre-colored +registers: the ones *implicitly* defined, and those *explicitly* +defined. Explicitly defined registers are normal operands, and can be accessed +with ``MachineInstr::getOperand(int)::getReg()``. In order to check which +registers are implicitly defined by an instruction, use the +``TargetInstrInfo::get(opcode)::ImplicitDefs``, where ``opcode`` is the opcode +of the target instruction. One important difference between explicit and +implicit physical registers is that the latter are defined statically for each +instruction, whereas the former may vary depending on the program being +compiled. For example, an instruction that represents a function call will +always implicitly define or use the same set of physical registers. To read the +registers implicitly used by an instruction, use +``TargetInstrInfo::get(opcode)::ImplicitUses``. Pre-colored registers impose +constraints on any register allocation algorithm. The register allocator must +make sure that none of them are overwritten by the values of virtual registers +while still alive. + +Mapping virtual registers to physical registers +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +There are two ways to map virtual registers to physical registers (or to memory +slots). The first way, that we will call *direct mapping*, is based on the use +of methods of the classes ``TargetRegisterInfo``, and ``MachineOperand``. The +second way, that we will call *indirect mapping*, relies on the ``VirtRegMap`` +class in order to insert loads and stores sending and getting values to and from +memory. + +The direct mapping provides more flexibility to the developer of the register +allocator; however, it is more error prone, and demands more implementation +work. Basically, the programmer will have to specify where load and store +instructions should be inserted in the target function being compiled in order +to get and store values in memory. To assign a physical register to a virtual +register present in a given operand, use ``MachineOperand::setReg(p_reg)``. To +insert a store instruction, use ``TargetInstrInfo::storeRegToStackSlot(...)``, +and to insert a load instruction, use ``TargetInstrInfo::loadRegFromStackSlot``. + +The indirect mapping shields the application developer from the complexities of +inserting load and store instructions. In order to map a virtual register to a +physical one, use ``VirtRegMap::assignVirt2Phys(vreg, preg)``. In order to map +a certain virtual register to memory, use +``VirtRegMap::assignVirt2StackSlot(vreg)``. This method will return the stack +slot where ``vreg``'s value will be located. If it is necessary to map another +virtual register to the same stack slot, use +``VirtRegMap::assignVirt2StackSlot(vreg, stack_location)``. One important point +to consider when using the indirect mapping, is that even if a virtual register +is mapped to memory, it still needs to be mapped to a physical register. This +physical register is the location where the virtual register is supposed to be +found before being stored or after being reloaded. + +If the indirect strategy is used, after all the virtual registers have been +mapped to physical registers or stack slots, it is necessary to use a spiller +object to place load and store instructions in the code. Every virtual that has +been mapped to a stack slot will be stored to memory after been defined and will +be loaded before being used. The implementation of the spiller tries to recycle +load/store instructions, avoiding unnecessary instructions. For an example of +how to invoke the spiller, see ``RegAllocLinearScan::runOnMachineFunction`` in +``lib/CodeGen/RegAllocLinearScan.cpp``. + +Handling two address instructions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +With very rare exceptions (e.g., function calls), the LLVM machine code +instructions are three address instructions. That is, each instruction is +expected to define at most one register, and to use at most two registers. +However, some architectures use two address instructions. In this case, the +defined register is also one of the used register. For instance, an instruction +such as ``ADD %EAX, %EBX``, in X86 is actually equivalent to ``%EAX = %EAX + +%EBX``. + +In order to produce correct code, LLVM must convert three address instructions +that represent two address instructions into true two address instructions. LLVM +provides the pass ``TwoAddressInstructionPass`` for this specific purpose. It +must be run before register allocation takes place. After its execution, the +resulting code may no longer be in SSA form. This happens, for instance, in +situations where an instruction such as ``%a = ADD %b %c`` is converted to two +instructions such as: + +:: + + %a = MOVE %b + %a = ADD %a %c + +Notice that, internally, the second instruction is represented as ``ADD +%a[def/use] %c``. I.e., the register operand ``%a`` is both used and defined by +the instruction. + +The SSA deconstruction phase +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +An important transformation that happens during register allocation is called +the *SSA Deconstruction Phase*. The SSA form simplifies many analyses that are +performed on the control flow graph of programs. However, traditional +instruction sets do not implement PHI instructions. Thus, in order to generate +executable code, compilers must replace PHI instructions with other instructions +that preserve their semantics. + +There are many ways in which PHI instructions can safely be removed from the +target code. The most traditional PHI deconstruction algorithm replaces PHI +instructions with copy instructions. That is the strategy adopted by LLVM. The +SSA deconstruction algorithm is implemented in +``lib/CodeGen/PHIElimination.cpp``. In order to invoke this pass, the identifier +``PHIEliminationID`` must be marked as required in the code of the register +allocator. + +Instruction folding +^^^^^^^^^^^^^^^^^^^ + +*Instruction folding* is an optimization performed during register allocation +that removes unnecessary copy instructions. For instance, a sequence of +instructions such as: + +:: + + %EBX = LOAD %mem_address + %EAX = COPY %EBX + +can be safely substituted by the single instruction: + +:: + + %EAX = LOAD %mem_address + +Instructions can be folded with the +``TargetRegisterInfo::foldMemoryOperand(...)`` method. Care must be taken when +folding instructions; a folded instruction can be quite different from the +original instruction. See ``LiveIntervals::addIntervalsForSpills`` in +``lib/CodeGen/LiveIntervalAnalysis.cpp`` for an example of its use. + +Built in register allocators +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The LLVM infrastructure provides the application developer with three different +register allocators: + +* *Fast* --- This register allocator is the default for debug builds. It + allocates registers on a basic block level, attempting to keep values in + registers and reusing registers as appropriate. + +* *Basic* --- This is an incremental approach to register allocation. Live + ranges are assigned to registers one at a time in an order that is driven by + heuristics. Since code can be rewritten on-the-fly during allocation, this + framework allows interesting allocators to be developed as extensions. It is + not itself a production register allocator but is a potentially useful + stand-alone mode for triaging bugs and as a performance baseline. + +* *Greedy* --- *The default allocator*. This is a highly tuned implementation of + the *Basic* allocator that incorporates global live range splitting. This + allocator works hard to minimize the cost of spill code. + +* *PBQP* --- A Partitioned Boolean Quadratic Programming (PBQP) based register + allocator. This allocator works by constructing a PBQP problem representing + the register allocation problem under consideration, solving this using a PBQP + solver, and mapping the solution back to a register assignment. + +The type of register allocator used in ``llc`` can be chosen with the command +line option ``-regalloc=...``: + +.. code-block:: bash + + $ llc -regalloc=linearscan file.bc -o ln.s + $ llc -regalloc=fast file.bc -o fa.s + $ llc -regalloc=pbqp file.bc -o pbqp.s + +.. _Prolog/Epilog Code Insertion: + +Prolog/Epilog Code Insertion +---------------------------- + +Compact Unwind + +Throwing an exception requires *unwinding* out of a function. The information on +how to unwind a given function is traditionally expressed in DWARF unwind +(a.k.a. frame) info. But that format was originally developed for debuggers to +backtrace, and each Frame Description Entry (FDE) requires ~20-30 bytes per +function. There is also the cost of mapping from an address in a function to the +corresponding FDE at runtime. An alternative unwind encoding is called *compact +unwind* and requires just 4-bytes per function. + +The compact unwind encoding is a 32-bit value, which is encoded in an +architecture-specific way. It specifies which registers to restore and from +where, and how to unwind out of the function. When the linker creates a final +linked image, it will create a ``__TEXT,__unwind_info`` section. This section is +a small and fast way for the runtime to access unwind info for any given +function. If we emit compact unwind info for the function, that compact unwind +info will be encoded in the ``__TEXT,__unwind_info`` section. If we emit DWARF +unwind info, the ``__TEXT,__unwind_info`` section will contain the offset of the +FDE in the ``__TEXT,__eh_frame`` section in the final linked image. + +For X86, there are three modes for the compact unwind encoding: + +*Function with a Frame Pointer (``EBP`` or ``RBP``)* + ``EBP/RBP``-based frame, where ``EBP/RBP`` is pushed onto the stack + immediately after the return address, then ``ESP/RSP`` is moved to + ``EBP/RBP``. Thus to unwind, ``ESP/RSP`` is restored with the current + ``EBP/RBP`` value, then ``EBP/RBP`` is restored by popping the stack, and the + return is done by popping the stack once more into the PC. All non-volatile + registers that need to be restored must have been saved in a small range on + the stack that starts ``EBP-4`` to ``EBP-1020`` (``RBP-8`` to + ``RBP-1020``). The offset (divided by 4 in 32-bit mode and 8 in 64-bit mode) + is encoded in bits 16-23 (mask: ``0x00FF0000``). The registers saved are + encoded in bits 0-14 (mask: ``0x00007FFF``) as five 3-bit entries from the + following table: + + ============== ============= =============== + Compact Number i386 Register x86-64 Register + ============== ============= =============== + 1 ``EBX`` ``RBX`` + 2 ``ECX`` ``R12`` + 3 ``EDX`` ``R13`` + 4 ``EDI`` ``R14`` + 5 ``ESI`` ``R15`` + 6 ``EBP`` ``RBP`` + ============== ============= =============== + +*Frameless with a Small Constant Stack Size (``EBP`` or ``RBP`` is not used as a frame pointer)* + To return, a constant (encoded in the compact unwind encoding) is added to the + ``ESP/RSP``. Then the return is done by popping the stack into the PC. All + non-volatile registers that need to be restored must have been saved on the + stack immediately after the return address. The stack size (divided by 4 in + 32-bit mode and 8 in 64-bit mode) is encoded in bits 16-23 (mask: + ``0x00FF0000``). There is a maximum stack size of 1024 bytes in 32-bit mode + and 2048 in 64-bit mode. The number of registers saved is encoded in bits 9-12 + (mask: ``0x00001C00``). Bits 0-9 (mask: ``0x000003FF``) contain which + registers were saved and their order. (See the + ``encodeCompactUnwindRegistersWithoutFrame()`` function in + ``lib/Target/X86FrameLowering.cpp`` for the encoding algorithm.) + +*Frameless with a Large Constant Stack Size (``EBP`` or ``RBP`` is not used as a frame pointer)* + This case is like the "Frameless with a Small Constant Stack Size" case, but + the stack size is too large to encode in the compact unwind encoding. Instead + it requires that the function contains "``subl $nnnnnn, %esp``" in its + prolog. The compact encoding contains the offset to the ``$nnnnnn`` value in + the function in bits 9-12 (mask: ``0x00001C00``). + +.. _Late Machine Code Optimizations: + +Late Machine Code Optimizations +------------------------------- + +.. note:: + + To Be Written + +.. _Code Emission: + +Code Emission +------------- + +The code emission step of code generation is responsible for lowering from the +code generator abstractions (like `MachineFunction`_, `MachineInstr`_, etc) down +to the abstractions used by the MC layer (`MCInst`_, `MCStreamer`_, etc). This +is done with a combination of several different classes: the (misnamed) +target-independent AsmPrinter class, target-specific subclasses of AsmPrinter +(such as SparcAsmPrinter), and the TargetLoweringObjectFile class. + +Since the MC layer works at the level of abstraction of object files, it doesn't +have a notion of functions, global variables etc. Instead, it thinks about +labels, directives, and instructions. A key class used at this time is the +MCStreamer class. This is an abstract API that is implemented in different ways +(e.g. to output a .s file, output an ELF .o file, etc) that is effectively an +"assembler API". MCStreamer has one method per directive, such as EmitLabel, +EmitSymbolAttribute, SwitchSection, etc, which directly correspond to assembly +level directives. + +If you are interested in implementing a code generator for a target, there are +three important things that you have to implement for your target: + +#. First, you need a subclass of AsmPrinter for your target. This class + implements the general lowering process converting MachineFunction's into MC + label constructs. The AsmPrinter base class provides a number of useful + methods and routines, and also allows you to override the lowering process in + some important ways. You should get much of the lowering for free if you are + implementing an ELF, COFF, or MachO target, because the + TargetLoweringObjectFile class implements much of the common logic. + +#. Second, you need to implement an instruction printer for your target. The + instruction printer takes an `MCInst`_ and renders it to a raw_ostream as + text. Most of this is automatically generated from the .td file (when you + specify something like "``add $dst, $src1, $src2``" in the instructions), but + you need to implement routines to print operands. + +#. Third, you need to implement code that lowers a `MachineInstr`_ to an MCInst, + usually implemented in "MCInstLower.cpp". This lowering process is + often target specific, and is responsible for turning jump table entries, + constant pool indices, global variable addresses, etc into MCLabels as + appropriate. This translation layer is also responsible for expanding pseudo + ops used by the code generator into the actual machine instructions they + correspond to. The MCInsts that are generated by this are fed into the + instruction printer or the encoder. + +Finally, at your choosing, you can also implement an subclass of MCCodeEmitter +which lowers MCInst's into machine code bytes and relocations. This is +important if you want to support direct .o file emission, or would like to +implement an assembler for your target. + +VLIW Packetizer +--------------- + +In a Very Long Instruction Word (VLIW) architecture, the compiler is responsible +for mapping instructions to functional-units available on the architecture. To +that end, the compiler creates groups of instructions called *packets* or +*bundles*. The VLIW packetizer in LLVM is a target-independent mechanism to +enable the packetization of machine instructions. + +Mapping from instructions to functional units +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Instructions in a VLIW target can typically be mapped to multiple functional +units. During the process of packetizing, the compiler must be able to reason +about whether an instruction can be added to a packet. This decision can be +complex since the compiler has to examine all possible mappings of instructions +to functional units. Therefore to alleviate compilation-time complexity, the +VLIW packetizer parses the instruction classes of a target and generates tables +at compiler build time. These tables can then be queried by the provided +machine-independent API to determine if an instruction can be accommodated in a +packet. + +How the packetization tables are generated and used +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The packetizer reads instruction classes from a target's itineraries and creates +a deterministic finite automaton (DFA) to represent the state of a packet. A DFA +consists of three major elements: inputs, states, and transitions. The set of +inputs for the generated DFA represents the instruction being added to a +packet. The states represent the possible consumption of functional units by +instructions in a packet. In the DFA, transitions from one state to another +occur on the addition of an instruction to an existing packet. If there is a +legal mapping of functional units to instructions, then the DFA contains a +corresponding transition. The absence of a transition indicates that a legal +mapping does not exist and that the instruction cannot be added to the packet. + +To generate tables for a VLIW target, add *Target*\ GenDFAPacketizer.inc as a +target to the Makefile in the target directory. The exported API provides three +functions: ``DFAPacketizer::clearResources()``, +``DFAPacketizer::reserveResources(MachineInstr *MI)``, and +``DFAPacketizer::canReserveResources(MachineInstr *MI)``. These functions allow +a target packetizer to add an instruction to an existing packet and to check +whether an instruction can be added to a packet. See +``llvm/CodeGen/DFAPacketizer.h`` for more information. + +Implementing a Native Assembler +=============================== + +Though you're probably reading this because you want to write or maintain a +compiler backend, LLVM also fully supports building a native assembler. +We've tried hard to automate the generation of the assembler from the .td files +(in particular the instruction syntax and encodings), which means that a large +part of the manual and repetitive data entry can be factored and shared with the +compiler. + +Instruction Parsing +------------------- + +.. note:: + + To Be Written + + +Instruction Alias Processing +---------------------------- + +Once the instruction is parsed, it enters the MatchInstructionImpl function. +The MatchInstructionImpl function performs alias processing and then does actual +matching. + +Alias processing is the phase that canonicalizes different lexical forms of the +same instructions down to one representation. There are several different kinds +of alias that are possible to implement and they are listed below in the order +that they are processed (which is in order from simplest/weakest to most +complex/powerful). Generally you want to use the first alias mechanism that +meets the needs of your instruction, because it will allow a more concise +description. + +Mnemonic Aliases +^^^^^^^^^^^^^^^^ + +The first phase of alias processing is simple instruction mnemonic remapping for +classes of instructions which are allowed with two different mnemonics. This +phase is a simple and unconditionally remapping from one input mnemonic to one +output mnemonic. It isn't possible for this form of alias to look at the +operands at all, so the remapping must apply for all forms of a given mnemonic. +Mnemonic aliases are defined simply, for example X86 has: + +:: + + def : MnemonicAlias<"cbw", "cbtw">; + def : MnemonicAlias<"smovq", "movsq">; + def : MnemonicAlias<"fldcww", "fldcw">; + def : MnemonicAlias<"fucompi", "fucomip">; + def : MnemonicAlias<"ud2a", "ud2">; + +... and many others. With a MnemonicAlias definition, the mnemonic is remapped +simply and directly. Though MnemonicAlias's can't look at any aspect of the +instruction (such as the operands) they can depend on global modes (the same +ones supported by the matcher), through a Requires clause: + +:: + + def : MnemonicAlias<"pushf", "pushfq">, Requires<[In64BitMode]>; + def : MnemonicAlias<"pushf", "pushfl">, Requires<[In32BitMode]>; + +In this example, the mnemonic gets mapped into different a new one depending on +the current instruction set. + +Instruction Aliases +^^^^^^^^^^^^^^^^^^^ + +The most general phase of alias processing occurs while matching is happening: +it provides new forms for the matcher to match along with a specific instruction +to generate. An instruction alias has two parts: the string to match and the +instruction to generate. For example: + +:: + + def : InstAlias<"movsx $src, $dst", (MOVSX16rr8W GR16:$dst, GR8 :$src)>; + def : InstAlias<"movsx $src, $dst", (MOVSX16rm8W GR16:$dst, i8mem:$src)>; + def : InstAlias<"movsx $src, $dst", (MOVSX32rr8 GR32:$dst, GR8 :$src)>; + def : InstAlias<"movsx $src, $dst", (MOVSX32rr16 GR32:$dst, GR16 :$src)>; + def : InstAlias<"movsx $src, $dst", (MOVSX64rr8 GR64:$dst, GR8 :$src)>; + def : InstAlias<"movsx $src, $dst", (MOVSX64rr16 GR64:$dst, GR16 :$src)>; + def : InstAlias<"movsx $src, $dst", (MOVSX64rr32 GR64:$dst, GR32 :$src)>; + +This shows a powerful example of the instruction aliases, matching the same +mnemonic in multiple different ways depending on what operands are present in +the assembly. The result of instruction aliases can include operands in a +different order than the destination instruction, and can use an input multiple +times, for example: + +:: + + def : InstAlias<"clrb $reg", (XOR8rr GR8 :$reg, GR8 :$reg)>; + def : InstAlias<"clrw $reg", (XOR16rr GR16:$reg, GR16:$reg)>; + def : InstAlias<"clrl $reg", (XOR32rr GR32:$reg, GR32:$reg)>; + def : InstAlias<"clrq $reg", (XOR64rr GR64:$reg, GR64:$reg)>; + +This example also shows that tied operands are only listed once. In the X86 +backend, XOR8rr has two input GR8's and one output GR8 (where an input is tied +to the output). InstAliases take a flattened operand list without duplicates +for tied operands. The result of an instruction alias can also use immediates +and fixed physical registers which are added as simple immediate operands in the +result, for example: + +:: + + // Fixed Immediate operand. + def : InstAlias<"aad", (AAD8i8 10)>; + + // Fixed register operand. + def : InstAlias<"fcomi", (COM_FIr ST1)>; + + // Simple alias. + def : InstAlias<"fcomi $reg", (COM_FIr RST:$reg)>; + +Instruction aliases can also have a Requires clause to make them subtarget +specific. + +If the back-end supports it, the instruction printer can automatically emit the +alias rather than what's being aliased. It typically leads to better, more +readable code. If it's better to print out what's being aliased, then pass a '0' +as the third parameter to the InstAlias definition. + +Instruction Matching +-------------------- + +.. note:: + + To Be Written + +.. _Implementations of the abstract target description interfaces: +.. _implement the target description: + +Target-specific Implementation Notes +==================================== + +This section of the document explains features or design decisions that are +specific to the code generator for a particular target. First we start with a +table that summarizes what features are supported by each target. + +.. _target-feature-matrix: + +Target Feature Matrix +--------------------- + +Note that this table does not include the C backend or Cpp backends, since they +do not use the target independent code generator infrastructure. It also +doesn't list features that are not supported fully by any target yet. It +considers a feature to be supported if at least one subtarget supports it. A +feature being supported means that it is useful and works for most cases, it +does not indicate that there are zero known bugs in the implementation. Here is +the key: + +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`
UnknownNot ApplicableNo supportPartial SupportComplete Support
` + +Here is the table: + +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` + +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` + +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` + +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` + +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` + +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` + +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` + +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` + +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` + +:raw-html:`
Target
FeatureARMHexagonMSP430MipsNVPTXPowerPCSparcSystemZX86XCore
is generally reliable
assembly parser
disassembler
inline asm
jit*
.o file writing
tail calls
segmented stacks *
` + +.. _feat_reliable: + +Is Generally Reliable +^^^^^^^^^^^^^^^^^^^^^ + +This box indicates whether the target is considered to be production quality. +This indicates that the target has been used as a static compiler to compile +large amounts of code by a variety of different people and is in continuous use. + +.. _feat_asmparser: + +Assembly Parser +^^^^^^^^^^^^^^^ + +This box indicates whether the target supports parsing target specific .s files +by implementing the MCAsmParser interface. This is required for llvm-mc to be +able to act as a native assembler and is required for inline assembly support in +the native .o file writer. + +.. _feat_disassembler: + +Disassembler +^^^^^^^^^^^^ + +This box indicates whether the target supports the MCDisassembler API for +disassembling machine opcode bytes into MCInst's. + +.. _feat_inlineasm: + +Inline Asm +^^^^^^^^^^ + +This box indicates whether the target supports most popular inline assembly +constraints and modifiers. + +.. _feat_jit: + +JIT Support +^^^^^^^^^^^ + +This box indicates whether the target supports the JIT compiler through the +ExecutionEngine interface. + +.. _feat_jit_arm: + +The ARM backend has basic support for integer code in ARM codegen mode, but +lacks NEON and full Thumb support. + +.. _feat_objectwrite: + +.o File Writing +^^^^^^^^^^^^^^^ + +This box indicates whether the target supports writing .o files (e.g. MachO, +ELF, and/or COFF) files directly from the target. Note that the target also +must include an assembly parser and general inline assembly support for full +inline assembly support in the .o writer. + +Targets that don't support this feature can obviously still write out .o files, +they just rely on having an external assembler to translate from a .s file to a +.o file (as is the case for many C compilers). + +.. _feat_tailcall: + +Tail Calls +^^^^^^^^^^ + +This box indicates whether the target supports guaranteed tail calls. These are +calls marked "`tail `_" and use the fastcc calling +convention. Please see the `tail call section more more details`_. + +.. _feat_segstacks: + +Segmented Stacks +^^^^^^^^^^^^^^^^ + +This box indicates whether the target supports segmented stacks. This replaces +the traditional large C stack with many linked segments. It is compatible with +the `gcc implementation `_ used by the Go +front end. + +.. _feat_segstacks_x86: + +Basic support exists on the X86 backend. Currently vararg doesn't work and the +object files are not marked the way the gold linker expects, but simple Go +programs can be built by dragonegg. + +.. _tail call section more more details: + +Tail call optimization +---------------------- + +Tail call optimization, callee reusing the stack of the caller, is currently +supported on x86/x86-64 and PowerPC. It is performed if: + +* Caller and callee have the calling convention ``fastcc``, ``cc 10`` (GHC + calling convention) or ``cc 11`` (HiPE calling convention). + +* The call is a tail call - in tail position (ret immediately follows call and + ret uses value of call or is void). + +* Option ``-tailcallopt`` is enabled. + +* Platform specific constraints are met. + +x86/x86-64 constraints: + +* No variable argument lists are used. + +* On x86-64 when generating GOT/PIC code only module-local calls (visibility = + hidden or protected) are supported. + +PowerPC constraints: + +* No variable argument lists are used. + +* No byval parameters are used. + +* On ppc32/64 GOT/PIC only module-local calls (visibility = hidden or protected) + are supported. + +Example: + +Call as ``llc -tailcallopt test.ll``. + +.. code-block:: llvm + + declare fastcc i32 @tailcallee(i32 inreg %a1, i32 inreg %a2, i32 %a3, i32 %a4) + + define fastcc i32 @tailcaller(i32 %in1, i32 %in2) { + %l1 = add i32 %in1, %in2 + %tmp = tail call fastcc i32 @tailcallee(i32 %in1 inreg, i32 %in2 inreg, i32 %in1, i32 %l1) + ret i32 %tmp + } + +Implications of ``-tailcallopt``: + +To support tail call optimization in situations where the callee has more +arguments than the caller a 'callee pops arguments' convention is used. This +currently causes each ``fastcc`` call that is not tail call optimized (because +one or more of above constraints are not met) to be followed by a readjustment +of the stack. So performance might be worse in such cases. + +Sibling call optimization +------------------------- + +Sibling call optimization is a restricted form of tail call optimization. +Unlike tail call optimization described in the previous section, it can be +performed automatically on any tail calls when ``-tailcallopt`` option is not +specified. + +Sibling call optimization is currently performed on x86/x86-64 when the +following constraints are met: + +* Caller and callee have the same calling convention. It can be either ``c`` or + ``fastcc``. + +* The call is a tail call - in tail position (ret immediately follows call and + ret uses value of call or is void). + +* Caller and callee have matching return type or the callee result is not used. + +* If any of the callee arguments are being passed in stack, they must be + available in caller's own incoming argument stack and the frame offsets must + be the same. + +Example: + +.. code-block:: llvm + + declare i32 @bar(i32, i32) + + define i32 @foo(i32 %a, i32 %b, i32 %c) { + entry: + %0 = tail call i32 @bar(i32 %a, i32 %b) + ret i32 %0 + } + +The X86 backend +--------------- + +The X86 code generator lives in the ``lib/Target/X86`` directory. This code +generator is capable of targeting a variety of x86-32 and x86-64 processors, and +includes support for ISA extensions such as MMX and SSE. + +X86 Target Triples supported +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The following are the known target triples that are supported by the X86 +backend. This is not an exhaustive list, and it would be useful to add those +that people test. + +* **i686-pc-linux-gnu** --- Linux + +* **i386-unknown-freebsd5.3** --- FreeBSD 5.3 + +* **i686-pc-cygwin** --- Cygwin on Win32 + +* **i686-pc-mingw32** --- MingW on Win32 + +* **i386-pc-mingw32msvc** --- MingW crosscompiler on Linux + +* **i686-apple-darwin*** --- Apple Darwin on X86 + +* **x86_64-unknown-linux-gnu** --- Linux + +X86 Calling Conventions supported +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The following target-specific calling conventions are known to backend: + +* **x86_StdCall** --- stdcall calling convention seen on Microsoft Windows + platform (CC ID = 64). + +* **x86_FastCall** --- fastcall calling convention seen on Microsoft Windows + platform (CC ID = 65). + +* **x86_ThisCall** --- Similar to X86_StdCall. Passes first argument in ECX, + others via stack. Callee is responsible for stack cleaning. This convention is + used by MSVC by default for methods in its ABI (CC ID = 70). + +.. _X86 addressing mode: + +Representing X86 addressing modes in MachineInstrs +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The x86 has a very flexible way of accessing memory. It is capable of forming +memory addresses of the following expression directly in integer instructions +(which use ModR/M addressing): + +:: + + SegmentReg: Base + [1,2,4,8] * IndexReg + Disp32 + +In order to represent this, LLVM tracks no less than 5 operands for each memory +operand of this form. This means that the "load" form of '``mov``' has the +following ``MachineOperand``\s in this order: + +:: + + Index: 0 | 1 2 3 4 5 + Meaning: DestReg, | BaseReg, Scale, IndexReg, Displacement Segment + OperandTy: VirtReg, | VirtReg, UnsImm, VirtReg, SignExtImm PhysReg + +Stores, and all other instructions, treat the four memory operands in the same +way and in the same order. If the segment register is unspecified (regno = 0), +then no segment override is generated. "Lea" operations do not have a segment +register specified, so they only have 4 operands for their memory reference. + +X86 address spaces supported +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +x86 has a feature which provides the ability to perform loads and stores to +different address spaces via the x86 segment registers. A segment override +prefix byte on an instruction causes the instruction's memory access to go to +the specified segment. LLVM address space 0 is the default address space, which +includes the stack, and any unqualified memory accesses in a program. Address +spaces 1-255 are currently reserved for user-defined code. The GS-segment is +represented by address space 256, while the FS-segment is represented by address +space 257. Other x86 segments have yet to be allocated address space +numbers. + +While these address spaces may seem similar to TLS via the ``thread_local`` +keyword, and often use the same underlying hardware, there are some fundamental +differences. + +The ``thread_local`` keyword applies to global variables and specifies that they +are to be allocated in thread-local memory. There are no type qualifiers +involved, and these variables can be pointed to with normal pointers and +accessed with normal loads and stores. The ``thread_local`` keyword is +target-independent at the LLVM IR level (though LLVM doesn't yet have +implementations of it for some configurations) + +Special address spaces, in contrast, apply to static types. Every load and store +has a particular address space in its address operand type, and this is what +determines which address space is accessed. LLVM ignores these special address +space qualifiers on global variables, and does not provide a way to directly +allocate storage in them. At the LLVM IR level, the behavior of these special +address spaces depends in part on the underlying OS or runtime environment, and +they are specific to x86 (and LLVM doesn't yet handle them correctly in some +cases). + +Some operating systems and runtime environments use (or may in the future use) +the FS/GS-segment registers for various low-level purposes, so care should be +taken when considering them. + +Instruction naming +^^^^^^^^^^^^^^^^^^ + +An instruction name consists of the base name, a default operand size, and a a +character per operand with an optional special size. For example: + +:: + + ADD8rr -> add, 8-bit register, 8-bit register + IMUL16rmi -> imul, 16-bit register, 16-bit memory, 16-bit immediate + IMUL16rmi8 -> imul, 16-bit register, 16-bit memory, 8-bit immediate + MOVSX32rm16 -> movsx, 32-bit register, 16-bit memory + +The PowerPC backend +------------------- + +The PowerPC code generator lives in the lib/Target/PowerPC directory. The code +generation is retargetable to several variations or *subtargets* of the PowerPC +ISA; including ppc32, ppc64 and altivec. + +LLVM PowerPC ABI +^^^^^^^^^^^^^^^^ + +LLVM follows the AIX PowerPC ABI, with two deviations. LLVM uses a PC relative +(PIC) or static addressing for accessing global values, so no TOC (r2) is +used. Second, r31 is used as a frame pointer to allow dynamic growth of a stack +frame. LLVM takes advantage of having no TOC to provide space to save the frame +pointer in the PowerPC linkage area of the caller frame. Other details of +PowerPC ABI can be found at `PowerPC ABI +`_\ +. Note: This link describes the 32 bit ABI. The 64 bit ABI is similar except +space for GPRs are 8 bytes wide (not 4) and r13 is reserved for system use. + +Frame Layout +^^^^^^^^^^^^ + +The size of a PowerPC frame is usually fixed for the duration of a function's +invocation. Since the frame is fixed size, all references into the frame can be +accessed via fixed offsets from the stack pointer. The exception to this is +when dynamic alloca or variable sized arrays are present, then a base pointer +(r31) is used as a proxy for the stack pointer and stack pointer is free to grow +or shrink. A base pointer is also used if llvm-gcc is not passed the +-fomit-frame-pointer flag. The stack pointer is always aligned to 16 bytes, so +that space allocated for altivec vectors will be properly aligned. + +An invocation frame is laid out as follows (low memory at top): + +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`
Linkage

Parameter area

Dynamic area

Locals area

Saved registers area


Previous Frame

` + +The *linkage* area is used by a callee to save special registers prior to +allocating its own frame. Only three entries are relevant to LLVM. The first +entry is the previous stack pointer (sp), aka link. This allows probing tools +like gdb or exception handlers to quickly scan the frames in the stack. A +function epilog can also use the link to pop the frame from the stack. The +third entry in the linkage area is used to save the return address from the lr +register. Finally, as mentioned above, the last entry is used to save the +previous frame pointer (r31.) The entries in the linkage area are the size of a +GPR, thus the linkage area is 24 bytes long in 32 bit mode and 48 bytes in 64 +bit mode. + +32 bit linkage area: + +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`
0Saved SP (r1)
4Saved CR
8Saved LR
12Reserved
16Reserved
20Saved FP (r31)
` + +64 bit linkage area: + +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`
0Saved SP (r1)
8Saved CR
16Saved LR
24Reserved
32Reserved
40Saved FP (r31)
` + +The *parameter area* is used to store arguments being passed to a callee +function. Following the PowerPC ABI, the first few arguments are actually +passed in registers, with the space in the parameter area unused. However, if +there are not enough registers or the callee is a thunk or vararg function, +these register arguments can be spilled into the parameter area. Thus, the +parameter area must be large enough to store all the parameters for the largest +call sequence made by the caller. The size must also be minimally large enough +to spill registers r3-r10. This allows callees blind to the call signature, +such as thunks and vararg functions, enough space to cache the argument +registers. Therefore, the parameter area is minimally 32 bytes (64 bytes in 64 +bit mode.) Also note that since the parameter area is a fixed offset from the +top of the frame, that a callee can access its spilt arguments using fixed +offsets from the stack pointer (or base pointer.) + +Combining the information about the linkage, parameter areas and alignment. A +stack frame is minimally 64 bytes in 32 bit mode and 128 bytes in 64 bit mode. + +The *dynamic area* starts out as size zero. If a function uses dynamic alloca +then space is added to the stack, the linkage and parameter areas are shifted to +top of stack, and the new space is available immediately below the linkage and +parameter areas. The cost of shifting the linkage and parameter areas is minor +since only the link value needs to be copied. The link value can be easily +fetched by adding the original frame size to the base pointer. Note that +allocations in the dynamic space need to observe 16 byte alignment. + +The *locals area* is where the llvm compiler reserves space for local variables. + +The *saved registers area* is where the llvm compiler spills callee saved +registers on entry to the callee. + +Prolog/Epilog +^^^^^^^^^^^^^ + +The llvm prolog and epilog are the same as described in the PowerPC ABI, with +the following exceptions. Callee saved registers are spilled after the frame is +created. This allows the llvm epilog/prolog support to be common with other +targets. The base pointer callee saved register r31 is saved in the TOC slot of +linkage area. This simplifies allocation of space for the base pointer and +makes it convenient to locate programatically and during debugging. + +Dynamic Allocation +^^^^^^^^^^^^^^^^^^ + +.. note:: + + TODO - More to come. + +The NVPTX backend +----------------- + +The NVPTX code generator under lib/Target/NVPTX is an open-source version of +the NVIDIA NVPTX code generator for LLVM. It is contributed by NVIDIA and is +a port of the code generator used in the CUDA compiler (nvcc). It targets the +PTX 3.0/3.1 ISA and can target any compute capability greater than or equal to +2.0 (Fermi). + +This target is of production quality and should be completely compatible with +the official NVIDIA toolchain. + +Code Generator Options: + +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`` +:raw-html:`
OptionDescription
sm_20Set shader model/compute capability to 2.0
sm_21Set shader model/compute capability to 2.1
sm_30Set shader model/compute capability to 3.0
sm_35Set shader model/compute capability to 3.5
ptx30Target PTX 3.0
ptx31Target PTX 3.1
` + diff --git a/docs/CodingStandards.rst b/docs/CodingStandards.rst new file mode 100644 index 00000000..9418680e --- /dev/null +++ b/docs/CodingStandards.rst @@ -0,0 +1,1348 @@ +===================== +LLVM Coding Standards +===================== + +.. contents:: + :local: + +Introduction +============ + +This document attempts to describe a few coding standards that are being used in +the LLVM source tree. Although no coding standards should be regarded as +absolute requirements to be followed in all instances, coding standards are +particularly important for large-scale code bases that follow a library-based +design (like LLVM). + +This document intentionally does not prescribe fixed standards for religious +issues such as brace placement and space usage. For issues like this, follow +the golden rule: + +.. _Golden Rule: + + **If you are extending, enhancing, or bug fixing already implemented code, + use the style that is already being used so that the source is uniform and + easy to follow.** + +Note that some code bases (e.g. ``libc++``) have really good reasons to deviate +from the coding standards. In the case of ``libc++``, this is because the +naming and other conventions are dictated by the C++ standard. If you think +there is a specific good reason to deviate from the standards here, please bring +it up on the LLVMdev mailing list. + +There are some conventions that are not uniformly followed in the code base +(e.g. the naming convention). This is because they are relatively new, and a +lot of code was written before they were put in place. Our long term goal is +for the entire codebase to follow the convention, but we explicitly *do not* +want patches that do large-scale reformating of existing code. On the other +hand, it is reasonable to rename the methods of a class if you're about to +change it in some other way. Just do the reformating as a separate commit from +the functionality change. + +The ultimate goal of these guidelines is the increase readability and +maintainability of our common source base. If you have suggestions for topics to +be included, please mail them to `Chris `_. + +Mechanical Source Issues +======================== + +Source Code Formatting +---------------------- + +Commenting +^^^^^^^^^^ + +Comments are one critical part of readability and maintainability. Everyone +knows they should comment their code, and so should you. When writing comments, +write them as English prose, which means they should use proper capitalization, +punctuation, etc. Aim to describe what the code is trying to do and why, not +*how* it does it at a micro level. Here are a few critical things to document: + +.. _header file comment: + +File Headers +"""""""""""" + +Every source file should have a header on it that describes the basic purpose of +the file. If a file does not have a header, it should not be checked into the +tree. The standard header looks like this: + +.. code-block:: c++ + + //===-- llvm/Instruction.h - Instruction class definition -------*- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file is distributed under the University of Illinois Open Source + // License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + /// + /// \file + /// \brief This file contains the declaration of the Instruction class, which is + /// the base class for all of the VM instructions. + /// + //===----------------------------------------------------------------------===// + +A few things to note about this particular format: The "``-*- C++ -*-``" string +on the first line is there to tell Emacs that the source file is a C++ file, not +a C file (Emacs assumes ``.h`` files are C files by default). + +.. note:: + + This tag is not necessary in ``.cpp`` files. The name of the file is also + on the first line, along with a very short description of the purpose of the + file. This is important when printing out code and flipping though lots of + pages. + +The next section in the file is a concise note that defines the license that the +file is released under. This makes it perfectly clear what terms the source +code can be distributed under and should not be modified in any way. + +The main body is a ``doxygen`` comment describing the purpose of the file. It +should have a ``\brief`` command that describes the file in one or two +sentences. Any additional information should be separated by a blank line. If +an algorithm is being implemented or something tricky is going on, a reference +to the paper where it is published should be included, as well as any notes or +*gotchas* in the code to watch out for. + +Class overviews +""""""""""""""" + +Classes are one fundamental part of a good object oriented design. As such, a +class definition should have a comment block that explains what the class is +used for and how it works. Every non-trivial class is expected to have a +``doxygen`` comment block. + +Method information +"""""""""""""""""" + +Methods defined in a class (as well as any global functions) should also be +documented properly. A quick note about what it does and a description of the +borderline behaviour is all that is necessary here (unless something +particularly tricky or insidious is going on). The hope is that people can +figure out how to use your interfaces without reading the code itself. + +Good things to talk about here are what happens when something unexpected +happens: does the method return null? Abort? Format your hard disk? + +Comment Formatting +^^^^^^^^^^^^^^^^^^ + +In general, prefer C++ style (``//``) comments. They take less space, require +less typing, don't have nesting problems, etc. There are a few cases when it is +useful to use C style (``/* */``) comments however: + +#. When writing C code: Obviously if you are writing C code, use C style + comments. + +#. When writing a header file that may be ``#include``\d by a C source file. + +#. When writing a source file that is used by a tool that only accepts C style + comments. + +To comment out a large block of code, use ``#if 0`` and ``#endif``. These nest +properly and are better behaved in general than C style comments. + +Doxygen Use in Documentation Comments +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Use the ``\file`` command to turn the standard file header into a file-level +comment. + +Include descriptive ``\brief`` paragraphs for all public interfaces (public +classes, member and non-member functions). Explain API use and purpose in +``\brief`` paragraphs, don't just restate the information that can be inferred +from the API name. Put detailed discussion into separate paragraphs. + +To refer to parameter names inside a paragraph, use the ``\p name`` command. +Don't use the ``\arg name`` command since it starts a new paragraph that +contains documentation for the parameter. + +Wrap non-inline code examples in ``\code ... \endcode``. + +To document a function parameter, start a new paragraph with the +``\param name`` command. If the parameter is used as an out or an in/out +parameter, use the ``\param [out] name`` or ``\param [in,out] name`` command, +respectively. + +To describe function return value, start a new paragraph with the ``\returns`` +command. + +A minimal documentation comment: + +.. code-block:: c++ + + /// \brief Does foo and bar. + void fooBar(bool Baz); + +A documentation comment that uses all Doxygen features in a preferred way: + +.. code-block:: c++ + + /// \brief Does foo and bar. + /// + /// Does not do foo the usual way if \p Baz is true. + /// + /// Typical usage: + /// \code + /// fooBar(false, "quux", Res); + /// \endcode + /// + /// \param Quux kind of foo to do. + /// \param [out] Result filled with bar sequence on foo success. + /// + /// \returns true on success. + bool fooBar(bool Baz, StringRef Quux, std::vector &Result); + +Don't duplicate the documentation comment in the header file and in the +implementation file. Put the documentation comments for public APIs into the +header file. Documentation comments for private APIs can go to the +implementation file. In any case, implementation files can include additional +comments (not necessarily in Doxygen markup) to explain implementation details +as needed. + +Don't duplicate function or class name at the beginning of the comment. +For humans it is obvious which function or class is being documented; +automatic documentation processing tools are smart enough to bind the comment +to the correct declaration. + +Wrong: + +.. code-block:: c++ + + // In Something.h: + + /// Something - An abstraction for some complicated thing. + class Something { + public: + /// fooBar - Does foo and bar. + void fooBar(); + }; + + // In Something.cpp: + + /// fooBar - Does foo and bar. + void Something::fooBar() { ... } + +Correct: + +.. code-block:: c++ + + // In Something.h: + + /// \brief An abstraction for some complicated thing. + class Something { + public: + /// \brief Does foo and bar. + void fooBar(); + }; + + // In Something.cpp: + + // Builds a B-tree in order to do foo. See paper by... + void Something::fooBar() { ... } + +It is not required to use additional Doxygen features, but sometimes it might +be a good idea to do so. + +Consider: + +* adding comments to any narrow namespace containing a collection of + related functions or types; + +* using top-level groups to organize a collection of related functions at + namespace scope where the grouping is smaller than the namespace; + +* using member groups and additional comments attached to member + groups to organize within a class. + +For example: + +.. code-block:: c++ + + class Something { + /// \name Functions that do Foo. + /// @{ + void fooBar(); + void fooBaz(); + /// @} + ... + }; + +``#include`` Style +^^^^^^^^^^^^^^^^^^ + +Immediately after the `header file comment`_ (and include guards if working on a +header file), the `minimal list of #includes`_ required by the file should be +listed. We prefer these ``#include``\s to be listed in this order: + +.. _Main Module Header: +.. _Local/Private Headers: + +#. Main Module Header +#. Local/Private Headers +#. ``llvm/...`` +#. System ``#include``\s + +and each category should be sorted lexicographically by the full path. + +The `Main Module Header`_ file applies to ``.cpp`` files which implement an +interface defined by a ``.h`` file. This ``#include`` should always be included +**first** regardless of where it lives on the file system. By including a +header file first in the ``.cpp`` files that implement the interfaces, we ensure +that the header does not have any hidden dependencies which are not explicitly +``#include``\d in the header, but should be. It is also a form of documentation +in the ``.cpp`` file to indicate where the interfaces it implements are defined. + +.. _fit into 80 columns: + +Source Code Width +^^^^^^^^^^^^^^^^^ + +Write your code to fit within 80 columns of text. This helps those of us who +like to print out code and look at your code in an ``xterm`` without resizing +it. + +The longer answer is that there must be some limit to the width of the code in +order to reasonably allow developers to have multiple files side-by-side in +windows on a modest display. If you are going to pick a width limit, it is +somewhat arbitrary but you might as well pick something standard. Going with 90 +columns (for example) instead of 80 columns wouldn't add any significant value +and would be detrimental to printing out code. Also many other projects have +standardized on 80 columns, so some people have already configured their editors +for it (vs something else, like 90 columns). + +This is one of many contentious issues in coding standards, but it is not up for +debate. + +Use Spaces Instead of Tabs +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +In all cases, prefer spaces to tabs in source files. People have different +preferred indentation levels, and different styles of indentation that they +like; this is fine. What isn't fine is that different editors/viewers expand +tabs out to different tab stops. This can cause your code to look completely +unreadable, and it is not worth dealing with. + +As always, follow the `Golden Rule`_ above: follow the style of +existing code if you are modifying and extending it. If you like four spaces of +indentation, **DO NOT** do that in the middle of a chunk of code with two spaces +of indentation. Also, do not reindent a whole source file: it makes for +incredible diffs that are absolutely worthless. + +Indent Code Consistently +^^^^^^^^^^^^^^^^^^^^^^^^ + +Okay, in your first year of programming you were told that indentation is +important. If you didn't believe and internalize this then, now is the time. +Just do it. + +Compiler Issues +--------------- + +Treat Compiler Warnings Like Errors +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If your code has compiler warnings in it, something is wrong --- you aren't +casting values correctly, you have "questionable" constructs in your code, or +you are doing something legitimately wrong. Compiler warnings can cover up +legitimate errors in output and make dealing with a translation unit difficult. + +It is not possible to prevent all warnings from all compilers, nor is it +desirable. Instead, pick a standard compiler (like ``gcc``) that provides a +good thorough set of warnings, and stick to it. At least in the case of +``gcc``, it is possible to work around any spurious errors by changing the +syntax of the code slightly. For example, a warning that annoys me occurs when +I write code like this: + +.. code-block:: c++ + + if (V = getValue()) { + ... + } + +``gcc`` will warn me that I probably want to use the ``==`` operator, and that I +probably mistyped it. In most cases, I haven't, and I really don't want the +spurious errors. To fix this particular problem, I rewrite the code like +this: + +.. code-block:: c++ + + if ((V = getValue())) { + ... + } + +which shuts ``gcc`` up. Any ``gcc`` warning that annoys you can be fixed by +massaging the code appropriately. + +Write Portable Code +^^^^^^^^^^^^^^^^^^^ + +In almost all cases, it is possible and within reason to write completely +portable code. If there are cases where it isn't possible to write portable +code, isolate it behind a well defined (and well documented) interface. + +In practice, this means that you shouldn't assume much about the host compiler +(and Visual Studio tends to be the lowest common denominator). If advanced +features are used, they should only be an implementation detail of a library +which has a simple exposed API, and preferably be buried in ``libSystem``. + +Do not use RTTI or Exceptions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +In an effort to reduce code and executable size, LLVM does not use RTTI +(e.g. ``dynamic_cast<>;``) or exceptions. These two language features violate +the general C++ principle of *"you only pay for what you use"*, causing +executable bloat even if exceptions are never used in the code base, or if RTTI +is never used for a class. Because of this, we turn them off globally in the +code. + +That said, LLVM does make extensive use of a hand-rolled form of RTTI that use +templates like `isa<>, cast<>, and dyn_cast<> `_. +This form of RTTI is opt-in and can be +:doc:`added to any class `. It is also +substantially more efficient than ``dynamic_cast<>``. + +.. _static constructor: + +Do not use Static Constructors +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Static constructors and destructors (e.g. global variables whose types have a +constructor or destructor) should not be added to the code base, and should be +removed wherever possible. Besides `well known problems +`_ where the order of +initialization is undefined between globals in different source files, the +entire concept of static constructors is at odds with the common use case of +LLVM as a library linked into a larger application. + +Consider the use of LLVM as a JIT linked into another application (perhaps for +`OpenGL, custom languages `_, `shaders in movies +`_, etc). Due to the +design of static constructors, they must be executed at startup time of the +entire application, regardless of whether or how LLVM is used in that larger +application. There are two problems with this: + +* The time to run the static constructors impacts startup time of applications + --- a critical time for GUI apps, among others. + +* The static constructors cause the app to pull many extra pages of memory off + the disk: both the code for the constructor in each ``.o`` file and the small + amount of data that gets touched. In addition, touched/dirty pages put more + pressure on the VM system on low-memory machines. + +We would really like for there to be zero cost for linking in an additional LLVM +target or other library into an application, but static constructors violate +this goal. + +That said, LLVM unfortunately does contain static constructors. It would be a +`great project `_ for someone to purge all static +constructors from LLVM, and then enable the ``-Wglobal-constructors`` warning +flag (when building with Clang) to ensure we do not regress in the future. + +Use of ``class`` and ``struct`` Keywords +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +In C++, the ``class`` and ``struct`` keywords can be used almost +interchangeably. The only difference is when they are used to declare a class: +``class`` makes all members private by default while ``struct`` makes all +members public by default. + +Unfortunately, not all compilers follow the rules and some will generate +different symbols based on whether ``class`` or ``struct`` was used to declare +the symbol. This can lead to problems at link time. + +So, the rule for LLVM is to always use the ``class`` keyword, unless **all** +members are public and the type is a C++ `POD +`_ type, in which case +``struct`` is allowed. + +Style Issues +============ + +The High-Level Issues +--------------------- + +A Public Header File **is** a Module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +C++ doesn't do too well in the modularity department. There is no real +encapsulation or data hiding (unless you use expensive protocol classes), but it +is what we have to work with. When you write a public header file (in the LLVM +source tree, they live in the top level "``include``" directory), you are +defining a module of functionality. + +Ideally, modules should be completely independent of each other, and their +header files should only ``#include`` the absolute minimum number of headers +possible. A module is not just a class, a function, or a namespace: it's a +collection of these that defines an interface. This interface may be several +functions, classes, or data structures, but the important issue is how they work +together. + +In general, a module should be implemented by one or more ``.cpp`` files. Each +of these ``.cpp`` files should include the header that defines their interface +first. This ensures that all of the dependences of the module header have been +properly added to the module header itself, and are not implicit. System +headers should be included after user headers for a translation unit. + +.. _minimal list of #includes: + +``#include`` as Little as Possible +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``#include`` hurts compile time performance. Don't do it unless you have to, +especially in header files. + +But wait! Sometimes you need to have the definition of a class to use it, or to +inherit from it. In these cases go ahead and ``#include`` that header file. Be +aware however that there are many cases where you don't need to have the full +definition of a class. If you are using a pointer or reference to a class, you +don't need the header file. If you are simply returning a class instance from a +prototyped function or method, you don't need it. In fact, for most cases, you +simply don't need the definition of a class. And not ``#include``\ing speeds up +compilation. + +It is easy to try to go too overboard on this recommendation, however. You +**must** include all of the header files that you are using --- you can include +them either directly or indirectly through another header file. To make sure +that you don't accidentally forget to include a header file in your module +header, make sure to include your module header **first** in the implementation +file (as mentioned above). This way there won't be any hidden dependencies that +you'll find out about later. + +Keep "Internal" Headers Private +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Many modules have a complex implementation that causes them to use more than one +implementation (``.cpp``) file. It is often tempting to put the internal +communication interface (helper classes, extra functions, etc) in the public +module header file. Don't do this! + +If you really need to do something like this, put a private header file in the +same directory as the source files, and include it locally. This ensures that +your private interface remains private and undisturbed by outsiders. + +.. note:: + + It's okay to put extra implementation methods in a public class itself. Just + make them private (or protected) and all is well. + +.. _early exits: + +Use Early Exits and ``continue`` to Simplify Code +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +When reading code, keep in mind how much state and how many previous decisions +have to be remembered by the reader to understand a block of code. Aim to +reduce indentation where possible when it doesn't make it more difficult to +understand the code. One great way to do this is by making use of early exits +and the ``continue`` keyword in long loops. As an example of using an early +exit from a function, consider this "bad" code: + +.. code-block:: c++ + + Value *doSomething(Instruction *I) { + if (!isa(I) && + I->hasOneUse() && doOtherThing(I)) { + ... some long code .... + } + + return 0; + } + +This code has several problems if the body of the ``'if'`` is large. When +you're looking at the top of the function, it isn't immediately clear that this +*only* does interesting things with non-terminator instructions, and only +applies to things with the other predicates. Second, it is relatively difficult +to describe (in comments) why these predicates are important because the ``if`` +statement makes it difficult to lay out the comments. Third, when you're deep +within the body of the code, it is indented an extra level. Finally, when +reading the top of the function, it isn't clear what the result is if the +predicate isn't true; you have to read to the end of the function to know that +it returns null. + +It is much preferred to format the code like this: + +.. code-block:: c++ + + Value *doSomething(Instruction *I) { + // Terminators never need 'something' done to them because ... + if (isa(I)) + return 0; + + // We conservatively avoid transforming instructions with multiple uses + // because goats like cheese. + if (!I->hasOneUse()) + return 0; + + // This is really just here for example. + if (!doOtherThing(I)) + return 0; + + ... some long code .... + } + +This fixes these problems. A similar problem frequently happens in ``for`` +loops. A silly example is something like this: + +.. code-block:: c++ + + for (BasicBlock::iterator II = BB->begin(), E = BB->end(); II != E; ++II) { + if (BinaryOperator *BO = dyn_cast(II)) { + Value *LHS = BO->getOperand(0); + Value *RHS = BO->getOperand(1); + if (LHS != RHS) { + ... + } + } + } + +When you have very, very small loops, this sort of structure is fine. But if it +exceeds more than 10-15 lines, it becomes difficult for people to read and +understand at a glance. The problem with this sort of code is that it gets very +nested very quickly. Meaning that the reader of the code has to keep a lot of +context in their brain to remember what is going immediately on in the loop, +because they don't know if/when the ``if`` conditions will have ``else``\s etc. +It is strongly preferred to structure the loop like this: + +.. code-block:: c++ + + for (BasicBlock::iterator II = BB->begin(), E = BB->end(); II != E; ++II) { + BinaryOperator *BO = dyn_cast(II); + if (!BO) continue; + + Value *LHS = BO->getOperand(0); + Value *RHS = BO->getOperand(1); + if (LHS == RHS) continue; + + ... + } + +This has all the benefits of using early exits for functions: it reduces nesting +of the loop, it makes it easier to describe why the conditions are true, and it +makes it obvious to the reader that there is no ``else`` coming up that they +have to push context into their brain for. If a loop is large, this can be a +big understandability win. + +Don't use ``else`` after a ``return`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +For similar reasons above (reduction of indentation and easier reading), please +do not use ``'else'`` or ``'else if'`` after something that interrupts control +flow --- like ``return``, ``break``, ``continue``, ``goto``, etc. For +example, this is *bad*: + +.. code-block:: c++ + + case 'J': { + if (Signed) { + Type = Context.getsigjmp_bufType(); + if (Type.isNull()) { + Error = ASTContext::GE_Missing_sigjmp_buf; + return QualType(); + } else { + break; + } + } else { + Type = Context.getjmp_bufType(); + if (Type.isNull()) { + Error = ASTContext::GE_Missing_jmp_buf; + return QualType(); + } else { + break; + } + } + } + +It is better to write it like this: + +.. code-block:: c++ + + case 'J': + if (Signed) { + Type = Context.getsigjmp_bufType(); + if (Type.isNull()) { + Error = ASTContext::GE_Missing_sigjmp_buf; + return QualType(); + } + } else { + Type = Context.getjmp_bufType(); + if (Type.isNull()) { + Error = ASTContext::GE_Missing_jmp_buf; + return QualType(); + } + } + break; + +Or better yet (in this case) as: + +.. code-block:: c++ + + case 'J': + if (Signed) + Type = Context.getsigjmp_bufType(); + else + Type = Context.getjmp_bufType(); + + if (Type.isNull()) { + Error = Signed ? ASTContext::GE_Missing_sigjmp_buf : + ASTContext::GE_Missing_jmp_buf; + return QualType(); + } + break; + +The idea is to reduce indentation and the amount of code you have to keep track +of when reading the code. + +Turn Predicate Loops into Predicate Functions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +It is very common to write small loops that just compute a boolean value. There +are a number of ways that people commonly write these, but an example of this +sort of thing is: + +.. code-block:: c++ + + bool FoundFoo = false; + for (unsigned I = 0, E = BarList.size(); I != E; ++I) + if (BarList[I]->isFoo()) { + FoundFoo = true; + break; + } + + if (FoundFoo) { + ... + } + +This sort of code is awkward to write, and is almost always a bad sign. Instead +of this sort of loop, we strongly prefer to use a predicate function (which may +be `static`_) that uses `early exits`_ to compute the predicate. We prefer the +code to be structured like this: + +.. code-block:: c++ + + /// \returns true if the specified list has an element that is a foo. + static bool containsFoo(const std::vector &List) { + for (unsigned I = 0, E = List.size(); I != E; ++I) + if (List[I]->isFoo()) + return true; + return false; + } + ... + + if (containsFoo(BarList)) { + ... + } + +There are many reasons for doing this: it reduces indentation and factors out +code which can often be shared by other code that checks for the same predicate. +More importantly, it *forces you to pick a name* for the function, and forces +you to write a comment for it. In this silly example, this doesn't add much +value. However, if the condition is complex, this can make it a lot easier for +the reader to understand the code that queries for this predicate. Instead of +being faced with the in-line details of how we check to see if the BarList +contains a foo, we can trust the function name and continue reading with better +locality. + +The Low-Level Issues +-------------------- + +Name Types, Functions, Variables, and Enumerators Properly +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Poorly-chosen names can mislead the reader and cause bugs. We cannot stress +enough how important it is to use *descriptive* names. Pick names that match +the semantics and role of the underlying entities, within reason. Avoid +abbreviations unless they are well known. After picking a good name, make sure +to use consistent capitalization for the name, as inconsistency requires clients +to either memorize the APIs or to look it up to find the exact spelling. + +In general, names should be in camel case (e.g. ``TextFileReader`` and +``isLValue()``). Different kinds of declarations have different rules: + +* **Type names** (including classes, structs, enums, typedefs, etc) should be + nouns and start with an upper-case letter (e.g. ``TextFileReader``). + +* **Variable names** should be nouns (as they represent state). The name should + be camel case, and start with an upper case letter (e.g. ``Leader`` or + ``Boats``). + +* **Function names** should be verb phrases (as they represent actions), and + command-like function should be imperative. The name should be camel case, + and start with a lower case letter (e.g. ``openFile()`` or ``isFoo()``). + +* **Enum declarations** (e.g. ``enum Foo {...}``) are types, so they should + follow the naming conventions for types. A common use for enums is as a + discriminator for a union, or an indicator of a subclass. When an enum is + used for something like this, it should have a ``Kind`` suffix + (e.g. ``ValueKind``). + +* **Enumerators** (e.g. ``enum { Foo, Bar }``) and **public member variables** + should start with an upper-case letter, just like types. Unless the + enumerators are defined in their own small namespace or inside a class, + enumerators should have a prefix corresponding to the enum declaration name. + For example, ``enum ValueKind { ... };`` may contain enumerators like + ``VK_Argument``, ``VK_BasicBlock``, etc. Enumerators that are just + convenience constants are exempt from the requirement for a prefix. For + instance: + + .. code-block:: c++ + + enum { + MaxSize = 42, + Density = 12 + }; + +As an exception, classes that mimic STL classes can have member names in STL's +style of lower-case words separated by underscores (e.g. ``begin()``, +``push_back()``, and ``empty()``). Classes that provide multiple +iterators should add a singular prefix to ``begin()`` and ``end()`` +(e.g. ``global_begin()`` and ``use_begin()``). + +Here are some examples of good and bad names: + +.. code-block:: c++ + + class VehicleMaker { + ... + Factory F; // Bad -- abbreviation and non-descriptive. + Factory Factory; // Better. + Factory TireFactory; // Even better -- if VehicleMaker has more than one + // kind of factories. + }; + + Vehicle MakeVehicle(VehicleType Type) { + VehicleMaker M; // Might be OK if having a short life-span. + Tire Tmp1 = M.makeTire(); // Bad -- 'Tmp1' provides no information. + Light Headlight = M.makeLight("head"); // Good -- descriptive. + ... + } + +Assert Liberally +^^^^^^^^^^^^^^^^ + +Use the "``assert``" macro to its fullest. Check all of your preconditions and +assumptions, you never know when a bug (not necessarily even yours) might be +caught early by an assertion, which reduces debugging time dramatically. The +"````" header file is probably already included by the header files you +are using, so it doesn't cost anything to use it. + +To further assist with debugging, make sure to put some kind of error message in +the assertion statement, which is printed if the assertion is tripped. This +helps the poor debugger make sense of why an assertion is being made and +enforced, and hopefully what to do about it. Here is one complete example: + +.. code-block:: c++ + + inline Value *getOperand(unsigned I) { + assert(I < Operands.size() && "getOperand() out of range!"); + return Operands[I]; + } + +Here are more examples: + +.. code-block:: c++ + + assert(Ty->isPointerType() && "Can't allocate a non pointer type!"); + + assert((Opcode == Shl || Opcode == Shr) && "ShiftInst Opcode invalid!"); + + assert(idx < getNumSuccessors() && "Successor # out of range!"); + + assert(V1.getType() == V2.getType() && "Constant types must be identical!"); + + assert(isa(Succ->front()) && "Only works on PHId BBs!"); + +You get the idea. + +In the past, asserts were used to indicate a piece of code that should not be +reached. These were typically of the form: + +.. code-block:: c++ + + assert(0 && "Invalid radix for integer literal"); + +This has a few issues, the main one being that some compilers might not +understand the assertion, or warn about a missing return in builds where +assertions are compiled out. + +Today, we have something much better: ``llvm_unreachable``: + +.. code-block:: c++ + + llvm_unreachable("Invalid radix for integer literal"); + +When assertions are enabled, this will print the message if it's ever reached +and then exit the program. When assertions are disabled (i.e. in release +builds), ``llvm_unreachable`` becomes a hint to compilers to skip generating +code for this branch. If the compiler does not support this, it will fall back +to the "abort" implementation. + +Another issue is that values used only by assertions will produce an "unused +value" warning when assertions are disabled. For example, this code will warn: + +.. code-block:: c++ + + unsigned Size = V.size(); + assert(Size > 42 && "Vector smaller than it should be"); + + bool NewToSet = Myset.insert(Value); + assert(NewToSet && "The value shouldn't be in the set yet"); + +These are two interesting different cases. In the first case, the call to +``V.size()`` is only useful for the assert, and we don't want it executed when +assertions are disabled. Code like this should move the call into the assert +itself. In the second case, the side effects of the call must happen whether +the assert is enabled or not. In this case, the value should be cast to void to +disable the warning. To be specific, it is preferred to write the code like +this: + +.. code-block:: c++ + + assert(V.size() > 42 && "Vector smaller than it should be"); + + bool NewToSet = Myset.insert(Value); (void)NewToSet; + assert(NewToSet && "The value shouldn't be in the set yet"); + +Do Not Use ``using namespace std`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +In LLVM, we prefer to explicitly prefix all identifiers from the standard +namespace with an "``std::``" prefix, rather than rely on "``using namespace +std;``". + +In header files, adding a ``'using namespace XXX'`` directive pollutes the +namespace of any source file that ``#include``\s the header. This is clearly a +bad thing. + +In implementation files (e.g. ``.cpp`` files), the rule is more of a stylistic +rule, but is still important. Basically, using explicit namespace prefixes +makes the code **clearer**, because it is immediately obvious what facilities +are being used and where they are coming from. And **more portable**, because +namespace clashes cannot occur between LLVM code and other namespaces. The +portability rule is important because different standard library implementations +expose different symbols (potentially ones they shouldn't), and future revisions +to the C++ standard will add more symbols to the ``std`` namespace. As such, we +never use ``'using namespace std;'`` in LLVM. + +The exception to the general rule (i.e. it's not an exception for the ``std`` +namespace) is for implementation files. For example, all of the code in the +LLVM project implements code that lives in the 'llvm' namespace. As such, it is +ok, and actually clearer, for the ``.cpp`` files to have a ``'using namespace +llvm;'`` directive at the top, after the ``#include``\s. This reduces +indentation in the body of the file for source editors that indent based on +braces, and keeps the conceptual context cleaner. The general form of this rule +is that any ``.cpp`` file that implements code in any namespace may use that +namespace (and its parents'), but should not use any others. + +Provide a Virtual Method Anchor for Classes in Headers +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If a class is defined in a header file and has a vtable (either it has virtual +methods or it derives from classes with virtual methods), it must always have at +least one out-of-line virtual method in the class. Without this, the compiler +will copy the vtable and RTTI into every ``.o`` file that ``#include``\s the +header, bloating ``.o`` file sizes and increasing link times. + +Don't use default labels in fully covered switches over enumerations +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``-Wswitch`` warns if a switch, without a default label, over an enumeration +does not cover every enumeration value. If you write a default label on a fully +covered switch over an enumeration then the ``-Wswitch`` warning won't fire +when new elements are added to that enumeration. To help avoid adding these +kinds of defaults, Clang has the warning ``-Wcovered-switch-default`` which is +off by default but turned on when building LLVM with a version of Clang that +supports the warning. + +A knock-on effect of this stylistic requirement is that when building LLVM with +GCC you may get warnings related to "control may reach end of non-void function" +if you return from each case of a covered switch-over-enum because GCC assumes +that the enum expression may take any representable value, not just those of +individual enumerators. To suppress this warning, use ``llvm_unreachable`` after +the switch. + +Use ``LLVM_DELETED_FUNCTION`` to mark uncallable methods +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Prior to C++11, a common pattern to make a class uncopyable was to declare an +unimplemented copy constructor and copy assignment operator and make them +private. This would give a compiler error for accessing a private method or a +linker error because it wasn't implemented. + +With C++11, we can mark methods that won't be implemented with ``= delete``. +This will trigger a much better error message and tell the compiler that the +method will never be implemented. This enables other checks like +``-Wunused-private-field`` to run correctly on classes that contain these +methods. + +To maintain compatibility with C++03, ``LLVM_DELETED_FUNCTION`` should be used +which will expand to ``= delete`` if the compiler supports it. These methods +should still be declared private. Example of the uncopyable pattern: + +.. code-block:: c++ + + class DontCopy { + private: + DontCopy(const DontCopy&) LLVM_DELETED_FUNCTION; + DontCopy &operator =(const DontCopy&) LLVM_DELETED_FUNCTION; + public: + ... + }; + +Don't evaluate ``end()`` every time through a loop +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Because C++ doesn't have a standard "``foreach``" loop (though it can be +emulated with macros and may be coming in C++'0x) we end up writing a lot of +loops that manually iterate from begin to end on a variety of containers or +through other data structures. One common mistake is to write a loop in this +style: + +.. code-block:: c++ + + BasicBlock *BB = ... + for (BasicBlock::iterator I = BB->begin(); I != BB->end(); ++I) + ... use I ... + +The problem with this construct is that it evaluates "``BB->end()``" every time +through the loop. Instead of writing the loop like this, we strongly prefer +loops to be written so that they evaluate it once before the loop starts. A +convenient way to do this is like so: + +.. code-block:: c++ + + BasicBlock *BB = ... + for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) + ... use I ... + +The observant may quickly point out that these two loops may have different +semantics: if the container (a basic block in this case) is being mutated, then +"``BB->end()``" may change its value every time through the loop and the second +loop may not in fact be correct. If you actually do depend on this behavior, +please write the loop in the first form and add a comment indicating that you +did it intentionally. + +Why do we prefer the second form (when correct)? Writing the loop in the first +form has two problems. First it may be less efficient than evaluating it at the +start of the loop. In this case, the cost is probably minor --- a few extra +loads every time through the loop. However, if the base expression is more +complex, then the cost can rise quickly. I've seen loops where the end +expression was actually something like: "``SomeMap[X]->end()``" and map lookups +really aren't cheap. By writing it in the second form consistently, you +eliminate the issue entirely and don't even have to think about it. + +The second (even bigger) issue is that writing the loop in the first form hints +to the reader that the loop is mutating the container (a fact that a comment +would handily confirm!). If you write the loop in the second form, it is +immediately obvious without even looking at the body of the loop that the +container isn't being modified, which makes it easier to read the code and +understand what it does. + +While the second form of the loop is a few extra keystrokes, we do strongly +prefer it. + +``#include `` is Forbidden +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The use of ``#include `` in library files is hereby **forbidden**, +because many common implementations transparently inject a `static constructor`_ +into every translation unit that includes it. + +Note that using the other stream headers (```` for example) is not +problematic in this regard --- just ````. However, ``raw_ostream`` +provides various APIs that are better performing for almost every use than +``std::ostream`` style APIs. + +.. note:: + + New code should always use `raw_ostream`_ for writing, or the + ``llvm::MemoryBuffer`` API for reading files. + +.. _raw_ostream: + +Use ``raw_ostream`` +^^^^^^^^^^^^^^^^^^^ + +LLVM includes a lightweight, simple, and efficient stream implementation in +``llvm/Support/raw_ostream.h``, which provides all of the common features of +``std::ostream``. All new code should use ``raw_ostream`` instead of +``ostream``. + +Unlike ``std::ostream``, ``raw_ostream`` is not a template and can be forward +declared as ``class raw_ostream``. Public headers should generally not include +the ``raw_ostream`` header, but use forward declarations and constant references +to ``raw_ostream`` instances. + +Avoid ``std::endl`` +^^^^^^^^^^^^^^^^^^^ + +The ``std::endl`` modifier, when used with ``iostreams`` outputs a newline to +the output stream specified. In addition to doing this, however, it also +flushes the output stream. In other words, these are equivalent: + +.. code-block:: c++ + + std::cout << std::endl; + std::cout << '\n' << std::flush; + +Most of the time, you probably have no reason to flush the output stream, so +it's better to use a literal ``'\n'``. + +Don't use ``inline`` when defining a function in a class definition +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +A member function defined in a class definition is implicitly inline, so don't +put the ``inline`` keyword in this case. + +Don't: + +.. code-block:: c++ + + class Foo { + public: + inline void bar() { + // ... + } + }; + +Do: + +.. code-block:: c++ + + class Foo { + public: + void bar() { + // ... + } + }; + +Microscopic Details +------------------- + +This section describes preferred low-level formatting guidelines along with +reasoning on why we prefer them. + +Spaces Before Parentheses +^^^^^^^^^^^^^^^^^^^^^^^^^ + +We prefer to put a space before an open parenthesis only in control flow +statements, but not in normal function call expressions and function-like +macros. For example, this is good: + +.. code-block:: c++ + + if (X) ... + for (I = 0; I != 100; ++I) ... + while (LLVMRocks) ... + + somefunc(42); + assert(3 != 4 && "laws of math are failing me"); + + A = foo(42, 92) + bar(X); + +and this is bad: + +.. code-block:: c++ + + if(X) ... + for(I = 0; I != 100; ++I) ... + while(LLVMRocks) ... + + somefunc (42); + assert (3 != 4 && "laws of math are failing me"); + + A = foo (42, 92) + bar (X); + +The reason for doing this is not completely arbitrary. This style makes control +flow operators stand out more, and makes expressions flow better. The function +call operator binds very tightly as a postfix operator. Putting a space after a +function name (as in the last example) makes it appear that the code might bind +the arguments of the left-hand-side of a binary operator with the argument list +of a function and the name of the right side. More specifically, it is easy to +misread the "``A``" example as: + +.. code-block:: c++ + + A = foo ((42, 92) + bar) (X); + +when skimming through the code. By avoiding a space in a function, we avoid +this misinterpretation. + +Prefer Preincrement +^^^^^^^^^^^^^^^^^^^ + +Hard fast rule: Preincrement (``++X``) may be no slower than postincrement +(``X++``) and could very well be a lot faster than it. Use preincrementation +whenever possible. + +The semantics of postincrement include making a copy of the value being +incremented, returning it, and then preincrementing the "work value". For +primitive types, this isn't a big deal. But for iterators, it can be a huge +issue (for example, some iterators contains stack and set objects in them... +copying an iterator could invoke the copy ctor's of these as well). In general, +get in the habit of always using preincrement, and you won't have a problem. + + +Namespace Indentation +^^^^^^^^^^^^^^^^^^^^^ + +In general, we strive to reduce indentation wherever possible. This is useful +because we want code to `fit into 80 columns`_ without wrapping horribly, but +also because it makes it easier to understand the code. Namespaces are a funny +thing: they are often large, and we often desire to put lots of stuff into them +(so they can be large). Other times they are tiny, because they just hold an +enum or something similar. In order to balance this, we use different +approaches for small versus large namespaces. + +If a namespace definition is small and *easily* fits on a screen (say, less than +35 lines of code), then you should indent its body. Here's an example: + +.. code-block:: c++ + + namespace llvm { + namespace X86 { + /// \brief An enum for the x86 relocation codes. Note that + /// the terminology here doesn't follow x86 convention - word means + /// 32-bit and dword means 64-bit. + enum RelocationType { + /// \brief PC relative relocation, add the relocated value to + /// the value already in memory, after we adjust it for where the PC is. + reloc_pcrel_word = 0, + + /// \brief PIC base relative relocation, add the relocated value to + /// the value already in memory, after we adjust it for where the + /// PIC base is. + reloc_picrel_word = 1, + + /// \brief Absolute relocation, just add the relocated value to the + /// value already in memory. + reloc_absolute_word = 2, + reloc_absolute_dword = 3 + }; + } + } + +Since the body is small, indenting adds value because it makes it very clear +where the namespace starts and ends, and it is easy to take the whole thing in +in one "gulp" when reading the code. If the blob of code in the namespace is +larger (as it typically is in a header in the ``llvm`` or ``clang`` namespaces), +do not indent the code, and add a comment indicating what namespace is being +closed. For example: + +.. code-block:: c++ + + namespace llvm { + namespace knowledge { + + /// This class represents things that Smith can have an intimate + /// understanding of and contains the data associated with it. + class Grokable { + ... + public: + explicit Grokable() { ... } + virtual ~Grokable() = 0; + + ... + + }; + + } // end namespace knowledge + } // end namespace llvm + +Because the class is large, we don't expect that the reader can easily +understand the entire concept in a glance, and the end of the file (where the +namespaces end) may be a long ways away from the place they open. As such, +indenting the contents of the namespace doesn't add any value, and detracts from +the readability of the class. In these cases it is best to *not* indent the +contents of the namespace. + +.. _static: + +Anonymous Namespaces +^^^^^^^^^^^^^^^^^^^^ + +After talking about namespaces in general, you may be wondering about anonymous +namespaces in particular. Anonymous namespaces are a great language feature +that tells the C++ compiler that the contents of the namespace are only visible +within the current translation unit, allowing more aggressive optimization and +eliminating the possibility of symbol name collisions. Anonymous namespaces are +to C++ as "static" is to C functions and global variables. While "``static``" +is available in C++, anonymous namespaces are more general: they can make entire +classes private to a file. + +The problem with anonymous namespaces is that they naturally want to encourage +indentation of their body, and they reduce locality of reference: if you see a +random function definition in a C++ file, it is easy to see if it is marked +static, but seeing if it is in an anonymous namespace requires scanning a big +chunk of the file. + +Because of this, we have a simple guideline: make anonymous namespaces as small +as possible, and only use them for class declarations. For example, this is +good: + +.. code-block:: c++ + + namespace { + class StringSort { + ... + public: + StringSort(...) + bool operator<(const char *RHS) const; + }; + } // end anonymous namespace + + static void runHelper() { + ... + } + + bool StringSort::operator<(const char *RHS) const { + ... + } + +This is bad: + +.. code-block:: c++ + + namespace { + class StringSort { + ... + public: + StringSort(...) + bool operator<(const char *RHS) const; + }; + + void runHelper() { + ... + } + + bool StringSort::operator<(const char *RHS) const { + ... + } + + } // end anonymous namespace + +This is bad specifically because if you're looking at "``runHelper``" in the middle +of a large C++ file, that you have no immediate way to tell if it is local to +the file. When it is marked static explicitly, this is immediately obvious. +Also, there is no reason to enclose the definition of "``operator<``" in the +namespace just because it was declared there. + +See Also +======== + +A lot of these comments and recommendations have been culled from other sources. +Two particularly important books for our work are: + +#. `Effective C++ + `_ + by Scott Meyers. Also interesting and useful are "More Effective C++" and + "Effective STL" by the same author. + +#. `Large-Scale C++ Software Design + `_ + by John Lakos + +If you get some free time, and you haven't read them: do so, you might learn +something. diff --git a/docs/CommandGuide/FileCheck.rst b/docs/CommandGuide/FileCheck.rst new file mode 100644 index 00000000..5a60d60a --- /dev/null +++ b/docs/CommandGuide/FileCheck.rst @@ -0,0 +1,410 @@ +FileCheck - Flexible pattern matching file verifier +=================================================== + +SYNOPSIS +-------- + +:program:`FileCheck` *match-filename* [*--check-prefix=XXX*] [*--strict-whitespace*] + +DESCRIPTION +----------- + +:program:`FileCheck` reads two files (one from standard input, and one +specified on the command line) and uses one to verify the other. This +behavior is particularly useful for the testsuite, which wants to verify that +the output of some tool (e.g. :program:`llc`) contains the expected information +(for example, a movsd from esp or whatever is interesting). This is similar to +using :program:`grep`, but it is optimized for matching multiple different +inputs in one file in a specific order. + +The ``match-filename`` file specifies the file that contains the patterns to +match. The file to verify is read from standard input unless the +:option:`--input-file` option is used. + +OPTIONS +------- + +.. option:: -help + + Print a summary of command line options. + +.. option:: --check-prefix prefix + + FileCheck searches the contents of ``match-filename`` for patterns to + match. By default, these patterns are prefixed with "``CHECK:``". + If you'd like to use a different prefix (e.g. because the same input + file is checking multiple different tool or options), the + :option:`--check-prefix` argument allows you to specify one or more + prefixes to match. Multiple prefixes are useful for tests which might + change for different run options, but most lines remain the same. + +.. option:: --input-file filename + + File to check (defaults to stdin). + +.. option:: --strict-whitespace + + By default, FileCheck canonicalizes input horizontal whitespace (spaces and + tabs) which causes it to ignore these differences (a space will match a tab). + The :option:`--strict-whitespace` argument disables this behavior. End-of-line + sequences are canonicalized to UNIX-style ``\n`` in all modes. + +.. option:: -version + + Show the version number of this program. + +EXIT STATUS +----------- + +If :program:`FileCheck` verifies that the file matches the expected contents, +it exits with 0. Otherwise, if not, or if an error occurs, it will exit with a +non-zero value. + +TUTORIAL +-------- + +FileCheck is typically used from LLVM regression tests, being invoked on the RUN +line of the test. A simple example of using FileCheck from a RUN line looks +like this: + +.. code-block:: llvm + + ; RUN: llvm-as < %s | llc -march=x86-64 | FileCheck %s + +This syntax says to pipe the current file ("``%s``") into ``llvm-as``, pipe +that into ``llc``, then pipe the output of ``llc`` into ``FileCheck``. This +means that FileCheck will be verifying its standard input (the llc output) +against the filename argument specified (the original ``.ll`` file specified by +"``%s``"). To see how this works, let's look at the rest of the ``.ll`` file +(after the RUN line): + +.. code-block:: llvm + + define void @sub1(i32* %p, i32 %v) { + entry: + ; CHECK: sub1: + ; CHECK: subl + %0 = tail call i32 @llvm.atomic.load.sub.i32.p0i32(i32* %p, i32 %v) + ret void + } + + define void @inc4(i64* %p) { + entry: + ; CHECK: inc4: + ; CHECK: incq + %0 = tail call i64 @llvm.atomic.load.add.i64.p0i64(i64* %p, i64 1) + ret void + } + +Here you can see some "``CHECK:``" lines specified in comments. Now you can +see how the file is piped into ``llvm-as``, then ``llc``, and the machine code +output is what we are verifying. FileCheck checks the machine code output to +verify that it matches what the "``CHECK:``" lines specify. + +The syntax of the "``CHECK:``" lines is very simple: they are fixed strings that +must occur in order. FileCheck defaults to ignoring horizontal whitespace +differences (e.g. a space is allowed to match a tab) but otherwise, the contents +of the "``CHECK:``" line is required to match some thing in the test file exactly. + +One nice thing about FileCheck (compared to grep) is that it allows merging +test cases together into logical groups. For example, because the test above +is checking for the "``sub1:``" and "``inc4:``" labels, it will not match +unless there is a "``subl``" in between those labels. If it existed somewhere +else in the file, that would not count: "``grep subl``" matches if "``subl``" +exists anywhere in the file. + +The FileCheck -check-prefix option +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The FileCheck :option:`-check-prefix` option allows multiple test +configurations to be driven from one `.ll` file. This is useful in many +circumstances, for example, testing different architectural variants with +:program:`llc`. Here's a simple example: + +.. code-block:: llvm + + ; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin9 -mattr=sse41 \ + ; RUN: | FileCheck %s -check-prefix=X32 + ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin9 -mattr=sse41 \ + ; RUN: | FileCheck %s -check-prefix=X64 + + define <4 x i32> @pinsrd_1(i32 %s, <4 x i32> %tmp) nounwind { + %tmp1 = insertelement <4 x i32>; %tmp, i32 %s, i32 1 + ret <4 x i32> %tmp1 + ; X32: pinsrd_1: + ; X32: pinsrd $1, 4(%esp), %xmm0 + + ; X64: pinsrd_1: + ; X64: pinsrd $1, %edi, %xmm0 + } + +In this case, we're testing that we get the expected code generation with +both 32-bit and 64-bit code generation. + +The "CHECK-NEXT:" directive +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Sometimes you want to match lines and would like to verify that matches +happen on exactly consecutive lines with no other lines in between them. In +this case, you can use "``CHECK:``" and "``CHECK-NEXT:``" directives to specify +this. If you specified a custom check prefix, just use "``-NEXT:``". +For example, something like this works as you'd expect: + +.. code-block:: llvm + + define void @t2(<2 x double>* %r, <2 x double>* %A, double %B) { + %tmp3 = load <2 x double>* %A, align 16 + %tmp7 = insertelement <2 x double> undef, double %B, i32 0 + %tmp9 = shufflevector <2 x double> %tmp3, + <2 x double> %tmp7, + <2 x i32> < i32 0, i32 2 > + store <2 x double> %tmp9, <2 x double>* %r, align 16 + ret void + + ; CHECK: t2: + ; CHECK: movl 8(%esp), %eax + ; CHECK-NEXT: movapd (%eax), %xmm0 + ; CHECK-NEXT: movhpd 12(%esp), %xmm0 + ; CHECK-NEXT: movl 4(%esp), %eax + ; CHECK-NEXT: movapd %xmm0, (%eax) + ; CHECK-NEXT: ret + } + +"``CHECK-NEXT:``" directives reject the input unless there is exactly one +newline between it and the previous directive. A "``CHECK-NEXT:``" cannot be +the first directive in a file. + +The "CHECK-NOT:" directive +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The "``CHECK-NOT:``" directive is used to verify that a string doesn't occur +between two matches (or before the first match, or after the last match). For +example, to verify that a load is removed by a transformation, a test like this +can be used: + +.. code-block:: llvm + + define i8 @coerce_offset0(i32 %V, i32* %P) { + store i32 %V, i32* %P + + %P2 = bitcast i32* %P to i8* + %P3 = getelementptr i8* %P2, i32 2 + + %A = load i8* %P3 + ret i8 %A + ; CHECK: @coerce_offset0 + ; CHECK-NOT: load + ; CHECK: ret i8 + } + +The "CHECK-DAG:" directive +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If it's necessary to match strings that don't occur in a strictly sequential +order, "``CHECK-DAG:``" could be used to verify them between two matches (or +before the first match, or after the last match). For example, clang emits +vtable globals in reverse order. Using ``CHECK-DAG:``, we can keep the checks +in the natural order: + +.. code-block:: c++ + + // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s + + struct Foo { virtual void method(); }; + Foo f; // emit vtable + // CHECK-DAG: @_ZTV3Foo = + + struct Bar { virtual void method(); }; + Bar b; + // CHECK-DAG: @_ZTV3Bar = + +``CHECK-NOT:`` directives could be mixed with ``CHECK-DAG:`` directives to +exclude strings between the surrounding ``CHECK-DAG:`` directives. As a result, +the surrounding ``CHECK-DAG:`` directives cannot be reordered, i.e. all +occurrences matching ``CHECK-DAG:`` before ``CHECK-NOT:`` must not fall behind +occurrences matching ``CHECK-DAG:`` after ``CHECK-NOT:``. For example, + +.. code-block:: llvm + + ; CHECK-DAG: BEFORE + ; CHECK-NOT: NOT + ; CHECK-DAG: AFTER + +This case will reject input strings where ``BEFORE`` occurs after ``AFTER``. + +With captured variables, ``CHECK-DAG:`` is able to match valid topological +orderings of a DAG with edges from the definition of a variable to its use. +It's useful, e.g., when your test cases need to match different output +sequences from the instruction scheduler. For example, + +.. code-block:: llvm + + ; CHECK-DAG: add [[REG1:r[0-9]+]], r1, r2 + ; CHECK-DAG: add [[REG2:r[0-9]+]], r3, r4 + ; CHECK: mul r5, [[REG1]], [[REG2]] + +In this case, any order of that two ``add`` instructions will be allowed. + +If you are defining `and` using variables in the same ``CHECK-DAG:`` block, +be aware that the definition rule can match `after` its use. + +So, for instance, the code below will pass: + +.. code-block:: llvm + + ; CHECK-DAG: vmov.32 [[REG2:d[0-9]+]][0] + ; CHECK-DAG: vmov.32 [[REG2]][1] + vmov.32 d0[1] + vmov.32 d0[0] + +While this other code, will not: + +.. code-block:: llvm + + ; CHECK-DAG: vmov.32 [[REG2:d[0-9]+]][0] + ; CHECK-DAG: vmov.32 [[REG2]][1] + vmov.32 d1[1] + vmov.32 d0[0] + +While this can be very useful, it's also dangerous, because in the case of +register sequence, you must have a strong order (read before write, copy before +use, etc). If the definition your test is looking for doesn't match (because +of a bug in the compiler), it may match further away from the use, and mask +real bugs away. + +In those cases, to enforce the order, use a non-DAG directive between DAG-blocks. + +The "CHECK-LABEL:" directive +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Sometimes in a file containing multiple tests divided into logical blocks, one +or more ``CHECK:`` directives may inadvertently succeed by matching lines in a +later block. While an error will usually eventually be generated, the check +flagged as causing the error may not actually bear any relationship to the +actual source of the problem. + +In order to produce better error messages in these cases, the "``CHECK-LABEL:``" +directive can be used. It is treated identically to a normal ``CHECK`` +directive except that FileCheck makes an additional assumption that a line +matched by the directive cannot also be matched by any other check present in +``match-filename``; this is intended to be used for lines containing labels or +other unique identifiers. Conceptually, the presence of ``CHECK-LABEL`` divides +the input stream into separate blocks, each of which is processed independently, +preventing a ``CHECK:`` directive in one block matching a line in another block. +For example, + +.. code-block:: llvm + + define %struct.C* @C_ctor_base(%struct.C* %this, i32 %x) { + entry: + ; CHECK-LABEL: C_ctor_base: + ; CHECK: mov [[SAVETHIS:r[0-9]+]], r0 + ; CHECK: bl A_ctor_base + ; CHECK: mov r0, [[SAVETHIS]] + %0 = bitcast %struct.C* %this to %struct.A* + %call = tail call %struct.A* @A_ctor_base(%struct.A* %0) + %1 = bitcast %struct.C* %this to %struct.B* + %call2 = tail call %struct.B* @B_ctor_base(%struct.B* %1, i32 %x) + ret %struct.C* %this + } + + define %struct.D* @D_ctor_base(%struct.D* %this, i32 %x) { + entry: + ; CHECK-LABEL: D_ctor_base: + +The use of ``CHECK-LABEL:`` directives in this case ensures that the three +``CHECK:`` directives only accept lines corresponding to the body of the +``@C_ctor_base`` function, even if the patterns match lines found later in +the file. Furthermore, if one of these three ``CHECK:`` directives fail, +FileCheck will recover by continuing to the next block, allowing multiple test +failures to be detected in a single invocation. + +There is no requirement that ``CHECK-LABEL:`` directives contain strings that +correspond to actual syntactic labels in a source or output language: they must +simply uniquely match a single line in the file being verified. + +``CHECK-LABEL:`` directives cannot contain variable definitions or uses. + +FileCheck Pattern Matching Syntax +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The "``CHECK:``" and "``CHECK-NOT:``" directives both take a pattern to match. +For most uses of FileCheck, fixed string matching is perfectly sufficient. For +some things, a more flexible form of matching is desired. To support this, +FileCheck allows you to specify regular expressions in matching strings, +surrounded by double braces: ``{{yourregex}}``. Because we want to use fixed +string matching for a majority of what we do, FileCheck has been designed to +support mixing and matching fixed string matching with regular expressions. +This allows you to write things like this: + +.. code-block:: llvm + + ; CHECK: movhpd {{[0-9]+}}(%esp), {{%xmm[0-7]}} + +In this case, any offset from the ESP register will be allowed, and any xmm +register will be allowed. + +Because regular expressions are enclosed with double braces, they are +visually distinct, and you don't need to use escape characters within the double +braces like you would in C. In the rare case that you want to match double +braces explicitly from the input, you can use something ugly like +``{{[{][{]}}`` as your pattern. + +FileCheck Variables +~~~~~~~~~~~~~~~~~~~ + +It is often useful to match a pattern and then verify that it occurs again +later in the file. For codegen tests, this can be useful to allow any register, +but verify that that register is used consistently later. To do this, +:program:`FileCheck` allows named variables to be defined and substituted into +patterns. Here is a simple example: + +.. code-block:: llvm + + ; CHECK: test5: + ; CHECK: notw [[REGISTER:%[a-z]+]] + ; CHECK: andw {{.*}}[[REGISTER]] + +The first check line matches a regex ``%[a-z]+`` and captures it into the +variable ``REGISTER``. The second line verifies that whatever is in +``REGISTER`` occurs later in the file after an "``andw``". :program:`FileCheck` +variable references are always contained in ``[[ ]]`` pairs, and their names can +be formed with the regex ``[a-zA-Z][a-zA-Z0-9]*``. If a colon follows the name, +then it is a definition of the variable; otherwise, it is a use. + +:program:`FileCheck` variables can be defined multiple times, and uses always +get the latest value. Variables can also be used later on the same line they +were defined on. For example: + +.. code-block:: llvm + + ; CHECK: op [[REG:r[0-9]+]], [[REG]] + +Can be useful if you want the operands of ``op`` to be the same register, +and don't care exactly which register it is. + +FileCheck Expressions +~~~~~~~~~~~~~~~~~~~~~ + +Sometimes there's a need to verify output which refers line numbers of the +match file, e.g. when testing compiler diagnostics. This introduces a certain +fragility of the match file structure, as "``CHECK:``" lines contain absolute +line numbers in the same file, which have to be updated whenever line numbers +change due to text addition or deletion. + +To support this case, FileCheck allows using ``[[@LINE]]``, +``[[@LINE+]]``, ``[[@LINE-]]`` expressions in patterns. These +expressions expand to a number of the line where a pattern is located (with an +optional integer offset). + +This way match patterns can be put near the relevant test lines and include +relative line number references, for example: + +.. code-block:: c++ + + // CHECK: test.cpp:[[@LINE+4]]:6: error: expected ';' after top level declarator + // CHECK-NEXT: {{^int a}} + // CHECK-NEXT: {{^ \^}} + // CHECK-NEXT: {{^ ;}} + int a + diff --git a/docs/CommandGuide/bugpoint.rst b/docs/CommandGuide/bugpoint.rst new file mode 100644 index 00000000..e4663e5d --- /dev/null +++ b/docs/CommandGuide/bugpoint.rst @@ -0,0 +1,187 @@ +bugpoint - automatic test case reduction tool +============================================= + +SYNOPSIS +-------- + +**bugpoint** [*options*] [*input LLVM ll/bc files*] [*LLVM passes*] **--args** +*program arguments* + +DESCRIPTION +----------- + +**bugpoint** narrows down the source of problems in LLVM tools and passes. It +can be used to debug three types of failures: optimizer crashes, miscompilations +by optimizers, or bad native code generation (including problems in the static +and JIT compilers). It aims to reduce large test cases to small, useful ones. +For more information on the design and inner workings of **bugpoint**, as well as +advice for using bugpoint, see *llvm/docs/Bugpoint.html* in the LLVM +distribution. + +OPTIONS +------- + +**--additional-so** *library* + + Load the dynamic shared object *library* into the test program whenever it is + run. This is useful if you are debugging programs which depend on non-LLVM + libraries (such as the X or curses libraries) to run. + +**--append-exit-code**\ =\ *{true,false}* + + Append the test programs exit code to the output file so that a change in exit + code is considered a test failure. Defaults to false. + +**--args** *program args* + + Pass all arguments specified after **--args** to the test program whenever it runs. + Note that if any of the *program args* start with a "``-``", you should use: + + .. code-block:: bash + + bugpoint [bugpoint args] --args -- [program args] + + The "``--``" right after the **--args** option tells **bugpoint** to consider + any options starting with "``-``" to be part of the **--args** option, not as + options to **bugpoint** itself. + +**--tool-args** *tool args* + + Pass all arguments specified after **--tool-args** to the LLVM tool under test + (**llc**, **lli**, etc.) whenever it runs. You should use this option in the + following way: + + .. code-block:: bash + + bugpoint [bugpoint args] --tool-args -- [tool args] + + The "``--``" right after the **--tool-args** option tells **bugpoint** to + consider any options starting with "``-``" to be part of the **--tool-args** + option, not as options to **bugpoint** itself. (See **--args**, above.) + +**--safe-tool-args** *tool args* + + Pass all arguments specified after **--safe-tool-args** to the "safe" execution + tool. + +**--gcc-tool-args** *gcc tool args* + + Pass all arguments specified after **--gcc-tool-args** to the invocation of + **gcc**. + +**--opt-args** *opt args* + + Pass all arguments specified after **--opt-args** to the invocation of **opt**. + +**--disable-{dce,simplifycfg}** + + Do not run the specified passes to clean up and reduce the size of the test + program. By default, **bugpoint** uses these passes internally when attempting to + reduce test programs. If you're trying to find a bug in one of these passes, + **bugpoint** may crash. + +**--enable-valgrind** + + Use valgrind to find faults in the optimization phase. This will allow + bugpoint to find otherwise asymptomatic problems caused by memory + mis-management. + +**-find-bugs** + + Continually randomize the specified passes and run them on the test program + until a bug is found or the user kills **bugpoint**. + +**-help** + + Print a summary of command line options. + +**--input** *filename* + + Open *filename* and redirect the standard input of the test program, whenever + it runs, to come from that file. + +**--load** *plugin* + + Load the dynamic object *plugin* into **bugpoint** itself. This object should + register new optimization passes. Once loaded, the object will add new command + line options to enable various optimizations. To see the new complete list of + optimizations, use the **-help** and **--load** options together; for example: + + + .. code-block:: bash + + bugpoint --load myNewPass.so -help + +**--mlimit** *megabytes* + + Specifies an upper limit on memory usage of the optimization and codegen. Set + to zero to disable the limit. + +**--output** *filename* + + Whenever the test program produces output on its standard output stream, it + should match the contents of *filename* (the "reference output"). If you + do not use this option, **bugpoint** will attempt to generate a reference output + by compiling the program with the "safe" backend and running it. + +**--profile-info-file** *filename* + + Profile file loaded by **--profile-loader**. + +**--run-{int,jit,llc,custom}** + + Whenever the test program is compiled, **bugpoint** should generate code for it + using the specified code generator. These options allow you to choose the + interpreter, the JIT compiler, the static native code compiler, or a + custom command (see **--exec-command**) respectively. + +**--safe-{llc,custom}** + + When debugging a code generator, **bugpoint** should use the specified code + generator as the "safe" code generator. This is a known-good code generator + used to generate the "reference output" if it has not been provided, and to + compile portions of the program that as they are excluded from the testcase. + These options allow you to choose the + static native code compiler, or a custom command, (see **--exec-command**) + respectively. The interpreter and the JIT backends cannot currently + be used as the "safe" backends. + +**--exec-command** *command* + + This option defines the command to use with the **--run-custom** and + **--safe-custom** options to execute the bitcode testcase. This can + be useful for cross-compilation. + +**--compile-command** *command* + + This option defines the command to use with the **--compile-custom** + option to compile the bitcode testcase. This can be useful for + testing compiler output without running any link or execute stages. To + generate a reduced unit test, you may add CHECK directives to the + testcase and pass the name of an executable compile-command script in this form: + + .. code-block:: sh + + #!/bin/sh + llc "$@" + not FileCheck [bugpoint input file].ll < bugpoint-test-program.s + + This script will "fail" as long as FileCheck passes. So the result + will be the minimum bitcode that passes FileCheck. + +**--safe-path** *path* + + This option defines the path to the command to execute with the + **--safe-{int,jit,llc,custom}** + option. + +EXIT STATUS +----------- + +If **bugpoint** succeeds in finding a problem, it will exit with 0. Otherwise, +if an error occurs, it will exit with a non-zero value. + +SEE ALSO +-------- + +opt|opt diff --git a/docs/CommandGuide/index.rst b/docs/CommandGuide/index.rst new file mode 100644 index 00000000..d50542dd --- /dev/null +++ b/docs/CommandGuide/index.rst @@ -0,0 +1,52 @@ +LLVM Command Guide +------------------ + +The following documents are command descriptions for all of the LLVM tools. +These pages describe how to use the LLVM commands and what their options are. +Note that these pages do not describe all of the options available for all +tools. To get a complete listing, pass the ``--help`` (general options) or +``--help-hidden`` (general and debugging options) arguments to the tool you are +interested in. + +Basic Commands +~~~~~~~~~~~~~~ + +.. toctree:: + :maxdepth: 1 + + llvm-as + llvm-dis + opt + llc + lli + llvm-link + llvm-ar + llvm-nm + llvm-prof + llvm-config + llvm-diff + llvm-cov + llvm-stress + llvm-symbolizer + +Debugging Tools +~~~~~~~~~~~~~~~ + +.. toctree:: + :maxdepth: 1 + + bugpoint + llvm-extract + llvm-bcanalyzer + +Developer Tools +~~~~~~~~~~~~~~~ + +.. toctree:: + :maxdepth: 1 + + FileCheck + tblgen + lit + llvm-build + llvm-readobj diff --git a/docs/CommandGuide/lit.rst b/docs/CommandGuide/lit.rst new file mode 100644 index 00000000..4d84be63 --- /dev/null +++ b/docs/CommandGuide/lit.rst @@ -0,0 +1,414 @@ +lit - LLVM Integrated Tester +============================ + +SYNOPSIS +-------- + +:program:`lit` [*options*] [*tests*] + +DESCRIPTION +----------- + +:program:`lit` is a portable tool for executing LLVM and Clang style test +suites, summarizing their results, and providing indication of failures. +:program:`lit` is designed to be a lightweight testing tool with as simple a +user interface as possible. + +:program:`lit` should be run with one or more *tests* to run specified on the +command line. Tests can be either individual test files or directories to +search for tests (see :ref:`test-discovery`). + +Each specified test will be executed (potentially in parallel) and once all +tests have been run :program:`lit` will print summary information on the number +of tests which passed or failed (see :ref:`test-status-results`). The +:program:`lit` program will execute with a non-zero exit code if any tests +fail. + +By default :program:`lit` will use a succinct progress display and will only +print summary information for test failures. See :ref:`output-options` for +options controlling the :program:`lit` progress display and output. + +:program:`lit` also includes a number of options for controlling how tests are +executed (specific features may depend on the particular test format). See +:ref:`execution-options` for more information. + +Finally, :program:`lit` also supports additional options for only running a +subset of the options specified on the command line, see +:ref:`selection-options` for more information. + +Users interested in the :program:`lit` architecture or designing a +:program:`lit` testing implementation should see :ref:`lit-infrastructure`. + +GENERAL OPTIONS +--------------- + +.. option:: -h, --help + + Show the :program:`lit` help message. + +.. option:: -j N, --threads=N + + Run ``N`` tests in parallel. By default, this is automatically chosen to + match the number of detected available CPUs. + +.. option:: --config-prefix=NAME + + Search for :file:`{NAME}.cfg` and :file:`{NAME}.site.cfg` when searching for + test suites, instead of :file:`lit.cfg` and :file:`lit.site.cfg`. + +.. option:: --param NAME, --param NAME=VALUE + + Add a user defined parameter ``NAME`` with the given ``VALUE`` (or the empty + string if not given). The meaning and use of these parameters is test suite + dependent. + +.. _output-options: + +OUTPUT OPTIONS +-------------- + +.. option:: -q, --quiet + + Suppress any output except for test failures. + +.. option:: -s, --succinct + + Show less output, for example don't show information on tests that pass. + +.. option:: -v, --verbose + + Show more information on test failures, for example the entire test output + instead of just the test result. + +.. option:: --no-progress-bar + + Do not use curses based progress bar. + +.. _execution-options: + +EXECUTION OPTIONS +----------------- + +.. option:: --path=PATH + + Specify an additional ``PATH`` to use when searching for executables in tests. + +.. option:: --vg + + Run individual tests under valgrind (using the memcheck tool). The + ``--error-exitcode`` argument for valgrind is used so that valgrind failures + will cause the program to exit with a non-zero status. + + When this option is enabled, :program:`lit` will also automatically provide a + "``valgrind``" feature that can be used to conditionally disable (or expect + failure in) certain tests. + +.. option:: --vg-arg=ARG + + When :option:`--vg` is used, specify an additional argument to pass to + :program:`valgrind` itself. + +.. option:: --vg-leak + + When :option:`--vg` is used, enable memory leak checks. When this option is + enabled, :program:`lit` will also automatically provide a "``vg_leak``" + feature that can be used to conditionally disable (or expect failure in) + certain tests. + +.. option:: --time-tests + + Track the wall time individual tests take to execute and includes the results + in the summary output. This is useful for determining which tests in a test + suite take the most time to execute. Note that this option is most useful + with ``-j 1``. + +.. _selection-options: + +SELECTION OPTIONS +----------------- + +.. option:: --max-tests=N + + Run at most ``N`` tests and then terminate. + +.. option:: --max-time=N + + Spend at most ``N`` seconds (approximately) running tests and then terminate. + +.. option:: --shuffle + + Run the tests in a random order. + +ADDITIONAL OPTIONS +------------------ + +.. option:: --debug + + Run :program:`lit` in debug mode, for debugging configuration issues and + :program:`lit` itself. + +.. option:: --show-suites + + List the discovered test suites and exit. + +.. option:: --show-tests + + List all of the the discovered tests and exit. + +EXIT STATUS +----------- + +:program:`lit` will exit with an exit code of 1 if there are any FAIL or XPASS +results. Otherwise, it will exit with the status 0. Other exit codes are used +for non-test related failures (for example a user error or an internal program +error). + +.. _test-discovery: + +TEST DISCOVERY +-------------- + +The inputs passed to :program:`lit` can be either individual tests, or entire +directories or hierarchies of tests to run. When :program:`lit` starts up, the +first thing it does is convert the inputs into a complete list of tests to run +as part of *test discovery*. + +In the :program:`lit` model, every test must exist inside some *test suite*. +:program:`lit` resolves the inputs specified on the command line to test suites +by searching upwards from the input path until it finds a :file:`lit.cfg` or +:file:`lit.site.cfg` file. These files serve as both a marker of test suites +and as configuration files which :program:`lit` loads in order to understand +how to find and run the tests inside the test suite. + +Once :program:`lit` has mapped the inputs into test suites it traverses the +list of inputs adding tests for individual files and recursively searching for +tests in directories. + +This behavior makes it easy to specify a subset of tests to run, while still +allowing the test suite configuration to control exactly how tests are +interpreted. In addition, :program:`lit` always identifies tests by the test +suite they are in, and their relative path inside the test suite. For +appropriately configured projects, this allows :program:`lit` to provide +convenient and flexible support for out-of-tree builds. + +.. _test-status-results: + +TEST STATUS RESULTS +------------------- + +Each test ultimately produces one of the following six results: + +**PASS** + + The test succeeded. + +**XFAIL** + + The test failed, but that is expected. This is used for test formats which allow + specifying that a test does not currently work, but wish to leave it in the test + suite. + +**XPASS** + + The test succeeded, but it was expected to fail. This is used for tests which + were specified as expected to fail, but are now succeeding (generally because + the feature they test was broken and has been fixed). + +**FAIL** + + The test failed. + +**UNRESOLVED** + + The test result could not be determined. For example, this occurs when the test + could not be run, the test itself is invalid, or the test was interrupted. + +**UNSUPPORTED** + + The test is not supported in this environment. This is used by test formats + which can report unsupported tests. + +Depending on the test format tests may produce additional information about +their status (generally only for failures). See the :ref:`output-options` +section for more information. + +.. _lit-infrastructure: + +LIT INFRASTRUCTURE +------------------ + +This section describes the :program:`lit` testing architecture for users interested in +creating a new :program:`lit` testing implementation, or extending an existing one. + +:program:`lit` proper is primarily an infrastructure for discovering and running +arbitrary tests, and to expose a single convenient interface to these +tests. :program:`lit` itself doesn't know how to run tests, rather this logic is +defined by *test suites*. + +TEST SUITES +~~~~~~~~~~~ + +As described in :ref:`test-discovery`, tests are always located inside a *test +suite*. Test suites serve to define the format of the tests they contain, the +logic for finding those tests, and any additional information to run the tests. + +:program:`lit` identifies test suites as directories containing ``lit.cfg`` or +``lit.site.cfg`` files (see also :option:`--config-prefix`). Test suites are +initially discovered by recursively searching up the directory hierarchy for +all the input files passed on the command line. You can use +:option:`--show-suites` to display the discovered test suites at startup. + +Once a test suite is discovered, its config file is loaded. Config files +themselves are Python modules which will be executed. When the config file is +executed, two important global variables are predefined: + +**lit** + + The global **lit** configuration object (a *LitConfig* instance), which defines + the builtin test formats, global configuration parameters, and other helper + routines for implementing test configurations. + +**config** + + This is the config object (a *TestingConfig* instance) for the test suite, + which the config file is expected to populate. The following variables are also + available on the *config* object, some of which must be set by the config and + others are optional or predefined: + + **name** *[required]* The name of the test suite, for use in reports and + diagnostics. + + **test_format** *[required]* The test format object which will be used to + discover and run tests in the test suite. Generally this will be a builtin test + format available from the *lit.formats* module. + + **test_source_root** The filesystem path to the test suite root. For out-of-dir + builds this is the directory that will be scanned for tests. + + **test_exec_root** For out-of-dir builds, the path to the test suite root inside + the object directory. This is where tests will be run and temporary output files + placed. + + **environment** A dictionary representing the environment to use when executing + tests in the suite. + + **suffixes** For **lit** test formats which scan directories for tests, this + variable is a list of suffixes to identify test files. Used by: *ShTest*. + + **substitutions** For **lit** test formats which substitute variables into a test + script, the list of substitutions to perform. Used by: *ShTest*. + + **unsupported** Mark an unsupported directory, all tests within it will be + reported as unsupported. Used by: *ShTest*. + + **parent** The parent configuration, this is the config object for the directory + containing the test suite, or None. + + **root** The root configuration. This is the top-most :program:`lit` configuration in + the project. + + **on_clone** The config is actually cloned for every subdirectory inside a test + suite, to allow local configuration on a per-directory basis. The *on_clone* + variable can be set to a Python function which will be called whenever a + configuration is cloned (for a subdirectory). The function should takes three + arguments: (1) the parent configuration, (2) the new configuration (which the + *on_clone* function will generally modify), and (3) the test path to the new + directory being scanned. + + **pipefail** Normally a test using a shell pipe fails if any of the commands + on the pipe fail. If this is not desired, setting this variable to false + makes the test fail only if the last command in the pipe fails. + +TEST DISCOVERY +~~~~~~~~~~~~~~ + +Once test suites are located, :program:`lit` recursively traverses the source +directory (following *test_source_root*) looking for tests. When :program:`lit` +enters a sub-directory, it first checks to see if a nested test suite is +defined in that directory. If so, it loads that test suite recursively, +otherwise it instantiates a local test config for the directory (see +:ref:`local-configuration-files`). + +Tests are identified by the test suite they are contained within, and the +relative path inside that suite. Note that the relative path may not refer to +an actual file on disk; some test formats (such as *GoogleTest*) define +"virtual tests" which have a path that contains both the path to the actual +test file and a subpath to identify the virtual test. + +.. _local-configuration-files: + +LOCAL CONFIGURATION FILES +~~~~~~~~~~~~~~~~~~~~~~~~~ + +When :program:`lit` loads a subdirectory in a test suite, it instantiates a +local test configuration by cloning the configuration for the parent direction +--- the root of this configuration chain will always be a test suite. Once the +test configuration is cloned :program:`lit` checks for a *lit.local.cfg* file +in the subdirectory. If present, this file will be loaded and can be used to +specialize the configuration for each individual directory. This facility can +be used to define subdirectories of optional tests, or to change other +configuration parameters --- for example, to change the test format, or the +suffixes which identify test files. + +TEST RUN OUTPUT FORMAT +~~~~~~~~~~~~~~~~~~~~~~ + +The :program:`lit` output for a test run conforms to the following schema, in +both short and verbose modes (although in short mode no PASS lines will be +shown). This schema has been chosen to be relatively easy to reliably parse by +a machine (for example in buildbot log scraping), and for other tools to +generate. + +Each test result is expected to appear on a line that matches: + +.. code-block:: none + + : () + +where ```` is a standard test result such as PASS, FAIL, XFAIL, +XPASS, UNRESOLVED, or UNSUPPORTED. The performance result codes of IMPROVED and +REGRESSED are also allowed. + +The ```` field can consist of an arbitrary string containing no +newline. + +The ```` field can be used to report progress information such +as (1/300) or can be empty, but even when empty the parentheses are required. + +Each test result may include additional (multiline) log information in the +following format: + +.. code-block:: none + + TEST '()' + ... log message ... + + +where ```` should be the name of a preceding reported test, ```` is a string of "*" characters *at least* four characters long +(the recommended length is 20), and ```` is an arbitrary +(unparsed) string. + +The following is an example of a test run output which consists of four tests A, +B, C, and D, and a log message for the failing test C: + +.. code-block:: none + + PASS: A (1 of 4) + PASS: B (2 of 4) + FAIL: C (3 of 4) + ******************** TEST 'C' FAILED ******************** + Test 'C' failed as a result of exit code 1. + ******************** + PASS: D (4 of 4) + +LIT EXAMPLE TESTS +~~~~~~~~~~~~~~~~~ + +The :program:`lit` distribution contains several example implementations of +test suites in the *ExampleTests* directory. + +SEE ALSO +-------- + +valgrind(1) diff --git a/docs/CommandGuide/llc.rst b/docs/CommandGuide/llc.rst new file mode 100644 index 00000000..02ad798c --- /dev/null +++ b/docs/CommandGuide/llc.rst @@ -0,0 +1,195 @@ +llc - LLVM static compiler +========================== + +SYNOPSIS +-------- + +:program:`llc` [*options*] [*filename*] + +DESCRIPTION +----------- + +The :program:`llc` command compiles LLVM source inputs into assembly language +for a specified architecture. The assembly language output can then be passed +through a native assembler and linker to generate a native executable. + +The choice of architecture for the output assembly code is automatically +determined from the input file, unless the :option:`-march` option is used to +override the default. + +OPTIONS +------- + +If ``filename`` is "``-``" or omitted, :program:`llc` reads from standard input. +Otherwise, it will from ``filename``. Inputs can be in either the LLVM assembly +language format (``.ll``) or the LLVM bitcode format (``.bc``). + +If the :option:`-o` option is omitted, then :program:`llc` will send its output +to standard output if the input is from standard input. If the :option:`-o` +option specifies "``-``", then the output will also be sent to standard output. + +If no :option:`-o` option is specified and an input file other than "``-``" is +specified, then :program:`llc` creates the output filename by taking the input +filename, removing any existing ``.bc`` extension, and adding a ``.s`` suffix. + +Other :program:`llc` options are described below. + +End-user Options +~~~~~~~~~~~~~~~~ + +.. option:: -help + + Print a summary of command line options. + +.. option:: -O=uint + + Generate code at different optimization levels. These correspond to the + ``-O0``, ``-O1``, ``-O2``, and ``-O3`` optimization levels used by + :program:`llvm-gcc` and :program:`clang`. + +.. option:: -mtriple= + + Override the target triple specified in the input file with the specified + string. + +.. option:: -march= + + Specify the architecture for which to generate assembly, overriding the target + encoded in the input file. See the output of ``llc -help`` for a list of + valid architectures. By default this is inferred from the target triple or + autodetected to the current architecture. + +.. option:: -mcpu= + + Specify a specific chip in the current architecture to generate code for. + By default this is inferred from the target triple and autodetected to + the current architecture. For a list of available CPUs, use: + + .. code-block:: none + + llvm-as < /dev/null | llc -march=xyz -mcpu=help + +.. option:: -filetype= + + Specify what kind of output ``llc`` should generated. Options are: ``asm`` + for textual assembly ( ``'.s'``), ``obj`` for native object files (``'.o'``) + and ``null`` for not emitting anything (for performance testing). + + Note that not all targets support all options. + +.. option:: -mattr=a1,+a2,-a3,... + + Override or control specific attributes of the target, such as whether SIMD + operations are enabled or not. The default set of attributes is set by the + current CPU. For a list of available attributes, use: + + .. code-block:: none + + llvm-as < /dev/null | llc -march=xyz -mattr=help + +.. option:: --disable-fp-elim + + Disable frame pointer elimination optimization. + +.. option:: --disable-excess-fp-precision + + Disable optimizations that may produce excess precision for floating point. + Note that this option can dramatically slow down code on some systems + (e.g. X86). + +.. option:: --enable-no-infs-fp-math + + Enable optimizations that assume no Inf values. + +.. option:: --enable-no-nans-fp-math + + Enable optimizations that assume no NAN values. + +.. option:: --enable-unsafe-fp-math + + Enable optimizations that make unsafe assumptions about IEEE math (e.g. that + addition is associative) or may not work for all input ranges. These + optimizations allow the code generator to make use of some instructions which + would otherwise not be usable (such as ``fsin`` on X86). + +.. option:: --enable-correct-eh-support + + Instruct the **lowerinvoke** pass to insert code for correct exception + handling support. This is expensive and is by default omitted for efficiency. + +.. option:: --stats + + Print statistics recorded by code-generation passes. + +.. option:: --time-passes + + Record the amount of time needed for each pass and print a report to standard + error. + +.. option:: --load= + + Dynamically load ``dso_path`` (a path to a dynamically shared object) that + implements an LLVM target. This will permit the target name to be used with + the :option:`-march` option so that code can be generated for that target. + +Tuning/Configuration Options +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. option:: --print-machineinstrs + + Print generated machine code between compilation phases (useful for debugging). + +.. option:: --regalloc= + + Specify the register allocator to use. + Valid register allocators are: + + *basic* + + Basic register allocator. + + *fast* + + Fast register allocator. It is the default for unoptimized code. + + *greedy* + + Greedy register allocator. It is the default for optimized code. + + *pbqp* + + Register allocator based on 'Partitioned Boolean Quadratic Programming'. + +.. option:: --spiller= + + Specify the spiller to use for register allocators that support it. Currently + this option is used only by the linear scan register allocator. The default + ``spiller`` is *local*. Valid spillers are: + + *simple* + + Simple spiller + + *local* + + Local spiller + +Intel IA-32-specific Options +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. option:: --x86-asm-syntax=[att|intel] + + Specify whether to emit assembly code in AT&T syntax (the default) or Intel + syntax. + +EXIT STATUS +----------- + +If :program:`llc` succeeds, it will exit with 0. Otherwise, if an error +occurs, it will exit with a non-zero value. + +SEE ALSO +-------- + +lli + diff --git a/docs/CommandGuide/lli.rst b/docs/CommandGuide/lli.rst new file mode 100644 index 00000000..a9aaf310 --- /dev/null +++ b/docs/CommandGuide/lli.rst @@ -0,0 +1,300 @@ +lli - directly execute programs from LLVM bitcode +================================================= + + +SYNOPSIS +-------- + + +**lli** [*options*] [*filename*] [*program args*] + + +DESCRIPTION +----------- + + +**lli** directly executes programs in LLVM bitcode format. It takes a program +in LLVM bitcode format and executes it using a just-in-time compiler, if one is +available for the current architecture, or an interpreter. **lli** takes all of +the same code generator options as llc|llc, but they are only effective when +**lli** is using the just-in-time compiler. + +If *filename* is not specified, then **lli** reads the LLVM bitcode for the +program from standard input. + +The optional *args* specified on the command line are passed to the program as +arguments. + + +GENERAL OPTIONS +--------------- + + + +**-fake-argv0**\ =\ *executable* + + Override the ``argv[0]`` value passed into the executing program. + + + +**-force-interpreter**\ =\ *{false,true}* + + If set to true, use the interpreter even if a just-in-time compiler is available + for this architecture. Defaults to false. + + + +**-help** + + Print a summary of command line options. + + + +**-load**\ =\ *pluginfilename* + + Causes **lli** to load the plugin (shared object) named *pluginfilename* and use + it for optimization. + + + +**-stats** + + Print statistics from the code-generation passes. This is only meaningful for + the just-in-time compiler, at present. + + + +**-time-passes** + + Record the amount of time needed for each code-generation pass and print it to + standard error. + + + +**-version** + + Print out the version of **lli** and exit without doing anything else. + + + + +TARGET OPTIONS +-------------- + + + +**-mtriple**\ =\ *target triple* + + Override the target triple specified in the input bitcode file with the + specified string. This may result in a crash if you pick an + architecture which is not compatible with the current system. + + + +**-march**\ =\ *arch* + + Specify the architecture for which to generate assembly, overriding the target + encoded in the bitcode file. See the output of **llc -help** for a list of + valid architectures. By default this is inferred from the target triple or + autodetected to the current architecture. + + + +**-mcpu**\ =\ *cpuname* + + Specify a specific chip in the current architecture to generate code for. + By default this is inferred from the target triple and autodetected to + the current architecture. For a list of available CPUs, use: + **llvm-as < /dev/null | llc -march=xyz -mcpu=help** + + + +**-mattr**\ =\ *a1,+a2,-a3,...* + + Override or control specific attributes of the target, such as whether SIMD + operations are enabled or not. The default set of attributes is set by the + current CPU. For a list of available attributes, use: + **llvm-as < /dev/null | llc -march=xyz -mattr=help** + + + + +FLOATING POINT OPTIONS +---------------------- + + + +**-disable-excess-fp-precision** + + Disable optimizations that may increase floating point precision. + + + +**-enable-no-infs-fp-math** + + Enable optimizations that assume no Inf values. + + + +**-enable-no-nans-fp-math** + + Enable optimizations that assume no NAN values. + + + +**-enable-unsafe-fp-math** + + Causes **lli** to enable optimizations that may decrease floating point + precision. + + + +**-soft-float** + + Causes **lli** to generate software floating point library calls instead of + equivalent hardware instructions. + + + + +CODE GENERATION OPTIONS +----------------------- + + + +**-code-model**\ =\ *model* + + Choose the code model from: + + + .. code-block:: perl + + default: Target default code model + small: Small code model + kernel: Kernel code model + medium: Medium code model + large: Large code model + + + + +**-disable-post-RA-scheduler** + + Disable scheduling after register allocation. + + + +**-disable-spill-fusing** + + Disable fusing of spill code into instructions. + + + +**-enable-correct-eh-support** + + Make the -lowerinvoke pass insert expensive, but correct, EH code. + + + +**-jit-enable-eh** + + Exception handling should be enabled in the just-in-time compiler. + + + +**-join-liveintervals** + + Coalesce copies (default=true). + + + +**-nozero-initialized-in-bss** Don't place zero-initialized symbols into the BSS section. + + + +**-pre-RA-sched**\ =\ *scheduler* + + Instruction schedulers available (before register allocation): + + + .. code-block:: perl + + =default: Best scheduler for the target + =none: No scheduling: breadth first sequencing + =simple: Simple two pass scheduling: minimize critical path and maximize processor utilization + =simple-noitin: Simple two pass scheduling: Same as simple except using generic latency + =list-burr: Bottom-up register reduction list scheduling + =list-tdrr: Top-down register reduction list scheduling + =list-td: Top-down list scheduler -print-machineinstrs - Print generated machine code + + + + +**-regalloc**\ =\ *allocator* + + Register allocator to use (default=linearscan) + + + .. code-block:: perl + + =bigblock: Big-block register allocator + =linearscan: linear scan register allocator =local - local register allocator + =simple: simple register allocator + + + + +**-relocation-model**\ =\ *model* + + Choose relocation model from: + + + .. code-block:: perl + + =default: Target default relocation model + =static: Non-relocatable code =pic - Fully relocatable, position independent code + =dynamic-no-pic: Relocatable external references, non-relocatable code + + + + +**-spiller** + + Spiller to use (default=local) + + + .. code-block:: perl + + =simple: simple spiller + =local: local spiller + + + + +**-x86-asm-syntax**\ =\ *syntax* + + Choose style of code to emit from X86 backend: + + + .. code-block:: perl + + =att: Emit AT&T-style assembly + =intel: Emit Intel-style assembly + + + + + +EXIT STATUS +----------- + + +If **lli** fails to load the program, it will exit with an exit code of 1. +Otherwise, it will return the exit code of the program it executes. + + +SEE ALSO +-------- + + +llc|llc diff --git a/docs/CommandGuide/llvm-ar.rst b/docs/CommandGuide/llvm-ar.rst new file mode 100644 index 00000000..d3ee993f --- /dev/null +++ b/docs/CommandGuide/llvm-ar.rst @@ -0,0 +1,367 @@ +llvm-ar - LLVM archiver +======================= + + +SYNOPSIS +-------- + + +**llvm-ar** [-]{dmpqrtx}[Rabfikou] [relpos] [count] [files...] + + +DESCRIPTION +----------- + + +The **llvm-ar** command is similar to the common Unix utility, ``ar``. It +archives several files together into a single file. The intent for this is +to produce archive libraries by LLVM bitcode that can be linked into an +LLVM program. However, the archive can contain any kind of file. By default, +**llvm-ar** generates a symbol table that makes linking faster because +only the symbol table needs to be consulted, not each individual file member +of the archive. + +The **llvm-ar** command can be used to *read* SVR4, GNU and BSD style archive +files. However, right now it can only write in the GNU format. If an +SVR4 or BSD style archive is used with the ``r`` (replace) or ``q`` (quick +update) operations, the archive will be reconstructed in GNU format. + +Here's where **llvm-ar** departs from previous ``ar`` implementations: + + +*Symbol Table* + + Since **llvm-ar** supports bitcode files. The symbol table it creates + is in GNU format and includes both native and bitcode files. + + +*Long Paths* + + Currently **llvm-ar** can read GNU and BSD long file names, but only writes + archives with the GNU format. + + + +OPTIONS +------- + + +The options to **llvm-ar** are compatible with other ``ar`` implementations. +However, there are a few modifiers (*R*) that are not found in other ``ar`` +implementations. The options to **llvm-ar** specify a single basic operation to +perform on the archive, a variety of modifiers for that operation, the name of +the archive file, and an optional list of file names. These options are used to +determine how **llvm-ar** should process the archive file. + +The Operations and Modifiers are explained in the sections below. The minimal +set of options is at least one operator and the name of the archive. Typically +archive files end with a ``.a`` suffix, but this is not required. Following +the *archive-name* comes a list of *files* that indicate the specific members +of the archive to operate on. If the *files* option is not specified, it +generally means either "none" or "all" members, depending on the operation. + +Operations +~~~~~~~~~~ + + + +d + + Delete files from the archive. No modifiers are applicable to this operation. + The *files* options specify which members should be removed from the + archive. It is not an error if a specified file does not appear in the archive. + If no *files* are specified, the archive is not modified. + + + +m[abi] + + Move files from one location in the archive to another. The *a*, *b*, and + *i* modifiers apply to this operation. The *files* will all be moved + to the location given by the modifiers. If no modifiers are used, the files + will be moved to the end of the archive. If no *files* are specified, the + archive is not modified. + + + +p + + Print files to the standard output. This operation simply prints the + *files* indicated to the standard output. If no *files* are + specified, the entire archive is printed. Printing bitcode files is + ill-advised as they might confuse your terminal settings. The *p* + operation never modifies the archive. + + + +q + + Quickly append files to the end of the archive. This operation quickly adds the + *files* to the archive without checking for duplicates that should be + removed first. If no *files* are specified, the archive is not modified. + Because of the way that **llvm-ar** constructs the archive file, its dubious + whether the *q* operation is any faster than the *r* operation. + + + +r[abu] + + Replace or insert file members. The *a*, *b*, and *u* + modifiers apply to this operation. This operation will replace existing + *files* or insert them at the end of the archive if they do not exist. If no + *files* are specified, the archive is not modified. + + + +t[v] + + Print the table of contents. Without any modifiers, this operation just prints + the names of the members to the standard output. With the *v* modifier, + **llvm-ar** also prints out the file type (B=bitcode, S=symbol + table, blank=regular file), the permission mode, the owner and group, the + size, and the date. If any *files* are specified, the listing is only for + those files. If no *files* are specified, the table of contents for the + whole archive is printed. + + + +x[oP] + + Extract archive members back to files. The *o* modifier applies to this + operation. This operation retrieves the indicated *files* from the archive + and writes them back to the operating system's file system. If no + *files* are specified, the entire archive is extract. + + + + +Modifiers (operation specific) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +The modifiers below are specific to certain operations. See the Operations +section (above) to determine which modifiers are applicable to which operations. + + +[a] + + When inserting or moving member files, this option specifies the destination of + the new files as being after the *relpos* member. If *relpos* is not found, + the files are placed at the end of the archive. + + + +[b] + + When inserting or moving member files, this option specifies the destination of + the new files as being before the *relpos* member. If *relpos* is not + found, the files are placed at the end of the archive. This modifier is + identical to the *i* modifier. + + + +[i] + + A synonym for the *b* option. + + + +[o] + + When extracting files, this option will cause **llvm-ar** to preserve the + original modification times of the files it writes. + + + +[u] + + When replacing existing files in the archive, only replace those files that have + a time stamp than the time stamp of the member in the archive. + + + + +Modifiers (generic) +~~~~~~~~~~~~~~~~~~~ + + +The modifiers below may be applied to any operation. + + +[c] + + For all operations, **llvm-ar** will always create the archive if it doesn't + exist. Normally, **llvm-ar** will print a warning message indicating that the + archive is being created. Using this modifier turns off that warning. + + + +[s] + + This modifier requests that an archive index (or symbol table) be added to the + archive. This is the default mode of operation. The symbol table will contain + all the externally visible functions and global variables defined by all the + bitcode files in the archive. + + + +[S] + + This modifier is the opposite of the *s* modifier. It instructs **llvm-ar** to + not build the symbol table. If both *s* and *S* are used, the last modifier to + occur in the options will prevail. + + + +[v] + + This modifier instructs **llvm-ar** to be verbose about what it is doing. Each + editing operation taken against the archive will produce a line of output saying + what is being done. + + + + + +STANDARDS +--------- + + +The **llvm-ar** utility is intended to provide a superset of the IEEE Std 1003.2 +(POSIX.2) functionality for ``ar``. **llvm-ar** can read both SVR4 and BSD4.4 (or +Mac OS X) archives. If the ``f`` modifier is given to the ``x`` or ``r`` operations +then **llvm-ar** will write SVR4 compatible archives. Without this modifier, +**llvm-ar** will write BSD4.4 compatible archives that have long names +immediately after the header and indicated using the "#1/ddd" notation for the +name in the header. + + +FILE FORMAT +----------- + + +The file format for LLVM Archive files is similar to that of BSD 4.4 or Mac OSX +archive files. In fact, except for the symbol table, the ``ar`` commands on those +operating systems should be able to read LLVM archive files. The details of the +file format follow. + +Each archive begins with the archive magic number which is the eight printable +characters "!\n" where \n represents the newline character (0x0A). +Following the magic number, the file is composed of even length members that +begin with an archive header and end with a \n padding character if necessary +(to make the length even). Each file member is composed of a header (defined +below), an optional newline-terminated "long file name" and the contents of +the file. + +The fields of the header are described in the items below. All fields of the +header contain only ASCII characters, are left justified and are right padded +with space characters. + + +name - char[16] + + This field of the header provides the name of the archive member. If the name is + longer than 15 characters or contains a slash (/) character, then this field + contains ``#1/nnn`` where ``nnn`` provides the length of the name and the ``#1/`` + is literal. In this case, the actual name of the file is provided in the ``nnn`` + bytes immediately following the header. If the name is 15 characters or less, it + is contained directly in this field and terminated with a slash (/) character. + + + +date - char[12] + + This field provides the date of modification of the file in the form of a + decimal encoded number that provides the number of seconds since the epoch + (since 00:00:00 Jan 1, 1970) per Posix specifications. + + + +uid - char[6] + + This field provides the user id of the file encoded as a decimal ASCII string. + This field might not make much sense on non-Unix systems. On Unix, it is the + same value as the st_uid field of the stat structure returned by the stat(2) + operating system call. + + + +gid - char[6] + + This field provides the group id of the file encoded as a decimal ASCII string. + This field might not make much sense on non-Unix systems. On Unix, it is the + same value as the st_gid field of the stat structure returned by the stat(2) + operating system call. + + + +mode - char[8] + + This field provides the access mode of the file encoded as an octal ASCII + string. This field might not make much sense on non-Unix systems. On Unix, it + is the same value as the st_mode field of the stat structure returned by the + stat(2) operating system call. + + + +size - char[10] + + This field provides the size of the file, in bytes, encoded as a decimal ASCII + string. + + + +fmag - char[2] + + This field is the archive file member magic number. Its content is always the + two characters back tick (0x60) and newline (0x0A). This provides some measure + utility in identifying archive files that have been corrupted. + + +offset - vbr encoded 32-bit integer + + The offset item provides the offset into the archive file where the bitcode + member is stored that is associated with the symbol. The offset value is 0 + based at the start of the first "normal" file member. To derive the actual + file offset of the member, you must add the number of bytes occupied by the file + signature (8 bytes) and the symbol tables. The value of this item is encoded + using variable bit rate encoding to reduce the size of the symbol table. + Variable bit rate encoding uses the high bit (0x80) of each byte to indicate + if there are more bytes to follow. The remaining 7 bits in each byte carry bits + from the value. The final byte does not have the high bit set. + + + +length - vbr encoded 32-bit integer + + The length item provides the length of the symbol that follows. Like this + *offset* item, the length is variable bit rate encoded. + + + +symbol - character array + + The symbol item provides the text of the symbol that is associated with the + *offset*. The symbol is not terminated by any character. Its length is provided + by the *length* field. Note that is allowed (but unwise) to use non-printing + characters (even 0x00) in the symbol. This allows for multiple encodings of + symbol names. + + + + +EXIT STATUS +----------- + + +If **llvm-ar** succeeds, it will exit with 0. A usage error, results +in an exit code of 1. A hard (file system typically) error results in an +exit code of 2. Miscellaneous or unknown errors result in an +exit code of 3. + + +SEE ALSO +-------- + + +ar(1) diff --git a/docs/CommandGuide/llvm-as.rst b/docs/CommandGuide/llvm-as.rst new file mode 100644 index 00000000..1b499bbe --- /dev/null +++ b/docs/CommandGuide/llvm-as.rst @@ -0,0 +1,56 @@ +llvm-as - LLVM assembler +======================== + +SYNOPSIS +-------- + +**llvm-as** [*options*] [*filename*] + +DESCRIPTION +----------- + +**llvm-as** is the LLVM assembler. It reads a file containing human-readable +LLVM assembly language, translates it to LLVM bitcode, and writes the result +into a file or to standard output. + +If *filename* is omitted or is ``-``, then **llvm-as** reads its input from +standard input. + +If an output file is not specified with the **-o** option, then +**llvm-as** sends its output to a file or standard output by following +these rules: + +* If the input is standard input, then the output is standard output. + +* If the input is a file that ends with ``.ll``, then the output file is of the + same name, except that the suffix is changed to ``.bc``. + +* If the input is a file that does not end with the ``.ll`` suffix, then the + output file has the same name as the input file, except that the ``.bc`` + suffix is appended. + +OPTIONS +------- + +**-f** + Enable binary output on terminals. Normally, **llvm-as** will refuse to + write raw bitcode output if the output stream is a terminal. With this option, + **llvm-as** will write raw bitcode regardless of the output device. + +**-help** + Print a summary of command line options. + +**-o** *filename* + Specify the output file name. If *filename* is ``-``, then **llvm-as** + sends its output to standard output. + +EXIT STATUS +----------- + +If **llvm-as** succeeds, it will exit with 0. Otherwise, if an error occurs, it +will exit with a non-zero value. + +SEE ALSO +-------- + +llvm-dis|llvm-dis, gccas|gccas diff --git a/docs/CommandGuide/llvm-bcanalyzer.rst b/docs/CommandGuide/llvm-bcanalyzer.rst new file mode 100644 index 00000000..7254088e --- /dev/null +++ b/docs/CommandGuide/llvm-bcanalyzer.rst @@ -0,0 +1,305 @@ +llvm-bcanalyzer - LLVM bitcode analyzer +======================================= + +SYNOPSIS +-------- + +:program:`llvm-bcanalyzer` [*options*] [*filename*] + +DESCRIPTION +----------- + +The :program:`llvm-bcanalyzer` command is a small utility for analyzing bitcode +files. The tool reads a bitcode file (such as generated with the +:program:`llvm-as` tool) and produces a statistical report on the contents of +the bitcode file. The tool can also dump a low level but human readable +version of the bitcode file. This tool is probably not of much interest or +utility except for those working directly with the bitcode file format. Most +LLVM users can just ignore this tool. + +If *filename* is omitted or is ``-``, then :program:`llvm-bcanalyzer` reads its +input from standard input. This is useful for combining the tool into a +pipeline. Output is written to the standard output. + +OPTIONS +------- + +.. program:: llvm-bcanalyzer + +.. option:: -nodetails + + Causes :program:`llvm-bcanalyzer` to abbreviate its output by writing out only + a module level summary. The details for individual functions are not + displayed. + +.. option:: -dump + + Causes :program:`llvm-bcanalyzer` to dump the bitcode in a human readable + format. This format is significantly different from LLVM assembly and + provides details about the encoding of the bitcode file. + +.. option:: -verify + + Causes :program:`llvm-bcanalyzer` to verify the module produced by reading the + bitcode. This ensures that the statistics generated are based on a consistent + module. + +.. option:: -help + + Print a summary of command line options. + +EXIT STATUS +----------- + +If :program:`llvm-bcanalyzer` succeeds, it will exit with 0. Otherwise, if an +error occurs, it will exit with a non-zero value, usually 1. + +SUMMARY OUTPUT DEFINITIONS +-------------------------- + +The following items are always printed by llvm-bcanalyzer. They comprize the +summary output. + +**Bitcode Analysis Of Module** + + This just provides the name of the module for which bitcode analysis is being + generated. + +**Bitcode Version Number** + + The bitcode version (not LLVM version) of the file read by the analyzer. + +**File Size** + + The size, in bytes, of the entire bitcode file. + +**Module Bytes** + + The size, in bytes, of the module block. Percentage is relative to File Size. + +**Function Bytes** + + The size, in bytes, of all the function blocks. Percentage is relative to File + Size. + +**Global Types Bytes** + + The size, in bytes, of the Global Types Pool. Percentage is relative to File + Size. This is the size of the definitions of all types in the bitcode file. + +**Constant Pool Bytes** + + The size, in bytes, of the Constant Pool Blocks Percentage is relative to File + Size. + +**Module Globals Bytes** + + Ths size, in bytes, of the Global Variable Definitions and their initializers. + Percentage is relative to File Size. + +**Instruction List Bytes** + + The size, in bytes, of all the instruction lists in all the functions. + Percentage is relative to File Size. Note that this value is also included in + the Function Bytes. + +**Compaction Table Bytes** + + The size, in bytes, of all the compaction tables in all the functions. + Percentage is relative to File Size. Note that this value is also included in + the Function Bytes. + +**Symbol Table Bytes** + + The size, in bytes, of all the symbol tables in all the functions. Percentage is + relative to File Size. Note that this value is also included in the Function + Bytes. + +**Dependent Libraries Bytes** + + The size, in bytes, of the list of dependent libraries in the module. Percentage + is relative to File Size. Note that this value is also included in the Module + Global Bytes. + +**Number Of Bitcode Blocks** + + The total number of blocks of any kind in the bitcode file. + +**Number Of Functions** + + The total number of function definitions in the bitcode file. + +**Number Of Types** + + The total number of types defined in the Global Types Pool. + +**Number Of Constants** + + The total number of constants (of any type) defined in the Constant Pool. + +**Number Of Basic Blocks** + + The total number of basic blocks defined in all functions in the bitcode file. + +**Number Of Instructions** + + The total number of instructions defined in all functions in the bitcode file. + +**Number Of Long Instructions** + + The total number of long instructions defined in all functions in the bitcode + file. Long instructions are those taking greater than 4 bytes. Typically long + instructions are GetElementPtr with several indices, PHI nodes, and calls to + functions with large numbers of arguments. + +**Number Of Operands** + + The total number of operands used in all instructions in the bitcode file. + +**Number Of Compaction Tables** + + The total number of compaction tables in all functions in the bitcode file. + +**Number Of Symbol Tables** + + The total number of symbol tables in all functions in the bitcode file. + +**Number Of Dependent Libs** + + The total number of dependent libraries found in the bitcode file. + +**Total Instruction Size** + + The total size of the instructions in all functions in the bitcode file. + +**Average Instruction Size** + + The average number of bytes per instruction across all functions in the bitcode + file. This value is computed by dividing Total Instruction Size by Number Of + Instructions. + +**Maximum Type Slot Number** + + The maximum value used for a type's slot number. Larger slot number values take + more bytes to encode. + +**Maximum Value Slot Number** + + The maximum value used for a value's slot number. Larger slot number values take + more bytes to encode. + +**Bytes Per Value** + + The average size of a Value definition (of any type). This is computed by + dividing File Size by the total number of values of any type. + +**Bytes Per Global** + + The average size of a global definition (constants and global variables). + +**Bytes Per Function** + + The average number of bytes per function definition. This is computed by + dividing Function Bytes by Number Of Functions. + +**# of VBR 32-bit Integers** + + The total number of 32-bit integers encoded using the Variable Bit Rate + encoding scheme. + +**# of VBR 64-bit Integers** + + The total number of 64-bit integers encoded using the Variable Bit Rate encoding + scheme. + +**# of VBR Compressed Bytes** + + The total number of bytes consumed by the 32-bit and 64-bit integers that use + the Variable Bit Rate encoding scheme. + +**# of VBR Expanded Bytes** + + The total number of bytes that would have been consumed by the 32-bit and 64-bit + integers had they not been compressed with the Variable Bit Rage encoding + scheme. + +**Bytes Saved With VBR** + + The total number of bytes saved by using the Variable Bit Rate encoding scheme. + The percentage is relative to # of VBR Expanded Bytes. + +DETAILED OUTPUT DEFINITIONS +--------------------------- + +The following definitions occur only if the -nodetails option was not given. +The detailed output provides additional information on a per-function basis. + +**Type** + + The type signature of the function. + +**Byte Size** + + The total number of bytes in the function's block. + +**Basic Blocks** + + The number of basic blocks defined by the function. + +**Instructions** + + The number of instructions defined by the function. + +**Long Instructions** + + The number of instructions using the long instruction format in the function. + +**Operands** + + The number of operands used by all instructions in the function. + +**Instruction Size** + + The number of bytes consumed by instructions in the function. + +**Average Instruction Size** + + The average number of bytes consumed by the instructions in the function. + This value is computed by dividing Instruction Size by Instructions. + +**Bytes Per Instruction** + + The average number of bytes used by the function per instruction. This value + is computed by dividing Byte Size by Instructions. Note that this is not the + same as Average Instruction Size. It computes a number relative to the total + function size not just the size of the instruction list. + +**Number of VBR 32-bit Integers** + + The total number of 32-bit integers found in this function (for any use). + +**Number of VBR 64-bit Integers** + + The total number of 64-bit integers found in this function (for any use). + +**Number of VBR Compressed Bytes** + + The total number of bytes in this function consumed by the 32-bit and 64-bit + integers that use the Variable Bit Rate encoding scheme. + +**Number of VBR Expanded Bytes** + + The total number of bytes in this function that would have been consumed by + the 32-bit and 64-bit integers had they not been compressed with the Variable + Bit Rate encoding scheme. + +**Bytes Saved With VBR** + + The total number of bytes saved in this function by using the Variable Bit + Rate encoding scheme. The percentage is relative to # of VBR Expanded Bytes. + +SEE ALSO +-------- + +:doc:`/CommandGuide/llvm-dis`, :doc:`/BitCodeFormat` + diff --git a/docs/CommandGuide/llvm-build.rst b/docs/CommandGuide/llvm-build.rst new file mode 100644 index 00000000..f788f7c5 --- /dev/null +++ b/docs/CommandGuide/llvm-build.rst @@ -0,0 +1,102 @@ +llvm-build - LLVM Project Build Utility +======================================= + + +SYNOPSIS +-------- + + +**llvm-build** [*options*] + + +DESCRIPTION +----------- + + +**llvm-build** is a tool for working with LLVM projects that use the LLVMBuild +system for describing their components. + +At heart, **llvm-build** is responsible for loading, verifying, and manipulating +the project's component data. The tool is primarily designed for use in +implementing build systems and tools which need access to the project structure +information. + + +OPTIONS +------- + + + +**-h**, **--help** + + Print the builtin program help. + + + +**--source-root**\ =\ *PATH* + + If given, load the project at the given source root path. If this option is not + given, the location of the project sources will be inferred from the location of + the **llvm-build** script itself. + + + +**--print-tree** + + Print the component tree for the project. + + + +**--write-library-table** + + Write out the C++ fragment which defines the components, library names, and + required libraries. This C++ fragment is built into llvm-config|llvm-config + in order to provide clients with the list of required libraries for arbitrary + component combinations. + + + +**--write-llvmbuild** + + Write out new *LLVMBuild.txt* files based on the loaded components. This is + useful for auto-upgrading the schema of the files. **llvm-build** will try to a + limited extent to preserve the comments which were written in the original + source file, although at this time it only preserves block comments that precede + the section names in the *LLVMBuild* files. + + + +**--write-cmake-fragment** + + Write out the LLVMBuild in the form of a CMake fragment, so it can easily be + consumed by the CMake based build system. The exact contents and format of this + file are closely tied to how LLVMBuild is integrated with CMake, see LLVM's + top-level CMakeLists.txt. + + + +**--write-make-fragment** + + Write out the LLVMBuild in the form of a Makefile fragment, so it can easily be + consumed by a Make based build system. The exact contents and format of this + file are closely tied to how LLVMBuild is integrated with the Makefiles, see + LLVM's Makefile.rules. + + + +**--llvmbuild-source-root**\ =\ *PATH* + + If given, expect the *LLVMBuild* files for the project to be rooted at the + given path, instead of inside the source tree itself. This option is primarily + designed for use in conjunction with **--write-llvmbuild** to test changes to + *LLVMBuild* schema. + + + + +EXIT STATUS +----------- + + +**llvm-build** exits with 0 if operation was successful. Otherwise, it will exist +with a non-zero value. diff --git a/docs/CommandGuide/llvm-config.rst b/docs/CommandGuide/llvm-config.rst new file mode 100644 index 00000000..0ebb344c --- /dev/null +++ b/docs/CommandGuide/llvm-config.rst @@ -0,0 +1,176 @@ +llvm-config - Print LLVM compilation options +============================================ + + +SYNOPSIS +-------- + + +**llvm-config** *option* [*components*...] + + +DESCRIPTION +----------- + + +**llvm-config** makes it easier to build applications that use LLVM. It can +print the compiler flags, linker flags and object libraries needed to link +against LLVM. + + +EXAMPLES +-------- + + +To link against the JIT: + + +.. code-block:: sh + + g++ `llvm-config --cxxflags` -o HowToUseJIT.o -c HowToUseJIT.cpp + g++ `llvm-config --ldflags` -o HowToUseJIT HowToUseJIT.o \ + `llvm-config --libs engine bcreader scalaropts` + + + +OPTIONS +------- + + + +**--version** + + Print the version number of LLVM. + + + +**-help** + + Print a summary of **llvm-config** arguments. + + + +**--prefix** + + Print the installation prefix for LLVM. + + + +**--src-root** + + Print the source root from which LLVM was built. + + + +**--obj-root** + + Print the object root used to build LLVM. + + + +**--bindir** + + Print the installation directory for LLVM binaries. + + + +**--includedir** + + Print the installation directory for LLVM headers. + + + +**--libdir** + + Print the installation directory for LLVM libraries. + + + +**--cxxflags** + + Print the C++ compiler flags needed to use LLVM headers. + + + +**--ldflags** + + Print the flags needed to link against LLVM libraries. + + + +**--libs** + + Print all the libraries needed to link against the specified LLVM + *components*, including any dependencies. + + + +**--libnames** + + Similar to **--libs**, but prints the bare filenames of the libraries + without **-l** or pathnames. Useful for linking against a not-yet-installed + copy of LLVM. + + + +**--libfiles** + + Similar to **--libs**, but print the full path to each library file. This is + useful when creating makefile dependencies, to ensure that a tool is relinked if + any library it uses changes. + + + +**--components** + + Print all valid component names. + + + +**--targets-built** + + Print the component names for all targets supported by this copy of LLVM. + + + +**--build-mode** + + Print the build mode used when LLVM was built (e.g. Debug or Release) + + + + +COMPONENTS +---------- + + +To print a list of all available components, run **llvm-config +--components**. In most cases, components correspond directly to LLVM +libraries. Useful "virtual" components include: + + +**all** + + Includes all LLVM libaries. The default if no components are specified. + + + +**backend** + + Includes either a native backend or the C backend. + + + +**engine** + + Includes either a native JIT or the bitcode interpreter. + + + + +EXIT STATUS +----------- + + +If **llvm-config** succeeds, it will exit with 0. Otherwise, if an error +occurs, it will exit with a non-zero value. diff --git a/docs/CommandGuide/llvm-cov.rst b/docs/CommandGuide/llvm-cov.rst new file mode 100644 index 00000000..524f2408 --- /dev/null +++ b/docs/CommandGuide/llvm-cov.rst @@ -0,0 +1,39 @@ +llvm-cov - emit coverage information +==================================== + +SYNOPSIS +-------- + +:program:`llvm-cov` [-gcno=filename] [-gcda=filename] [dump] + +DESCRIPTION +----------- + +The experimental :program:`llvm-cov` tool reads in description file generated +by compiler and coverage data file generated by instrumented program. This +program assumes that the description and data file uses same format as gcov +files. + +OPTIONS +------- + +.. option:: -gcno=filename + + This option selects input description file generated by compiler while + instrumenting program. + +.. option:: -gcda=filename + + This option selects coverage data file generated by instrumented compiler. + +.. option:: -dump + + This options enables output dump that is suitable for a developer to help + debug :program:`llvm-cov` itself. + +EXIT STATUS +----------- + +:program:`llvm-cov` returns 1 if it cannot read input files. Otherwise, it +exits with zero. + diff --git a/docs/CommandGuide/llvm-diff.rst b/docs/CommandGuide/llvm-diff.rst new file mode 100644 index 00000000..991d4fec --- /dev/null +++ b/docs/CommandGuide/llvm-diff.rst @@ -0,0 +1,56 @@ +llvm-diff - LLVM structural 'diff' +================================== + + +SYNOPSIS +-------- + + +**llvm-diff** [*options*] *module 1* *module 2* [*global name ...*] + + +DESCRIPTION +----------- + + +**llvm-diff** compares the structure of two LLVM modules, primarily +focusing on differences in function definitions. Insignificant +differences, such as changes in the ordering of globals or in the +names of local values, are ignored. + +An input module will be interpreted as an assembly file if its name +ends in '.ll'; otherwise it will be read in as a bitcode file. + +If a list of global names is given, just the values with those names +are compared; otherwise, all global values are compared, and +diagnostics are produced for globals which only appear in one module +or the other. + +**llvm-diff** compares two functions by comparing their basic blocks, +beginning with the entry blocks. If the terminators seem to match, +then the corresponding successors are compared; otherwise they are +ignored. This algorithm is very sensitive to changes in control flow, +which tend to stop any downstream changes from being detected. + +**llvm-diff** is intended as a debugging tool for writers of LLVM +passes and frontends. It does not have a stable output format. + + +EXIT STATUS +----------- + + +If **llvm-diff** finds no differences between the modules, it will exit +with 0 and produce no output. Otherwise it will exit with a non-zero +value. + + +BUGS +---- + + +Many important differences, like changes in linkage or function +attributes, are not diagnosed. + +Changes in memory behavior (for example, coalescing loads) can cause +massive detected differences in blocks. diff --git a/docs/CommandGuide/llvm-dis.rst b/docs/CommandGuide/llvm-dis.rst new file mode 100644 index 00000000..85cdca85 --- /dev/null +++ b/docs/CommandGuide/llvm-dis.rst @@ -0,0 +1,69 @@ +llvm-dis - LLVM disassembler +============================ + + +SYNOPSIS +-------- + + +**llvm-dis** [*options*] [*filename*] + + +DESCRIPTION +----------- + + +The **llvm-dis** command is the LLVM disassembler. It takes an LLVM +bitcode file and converts it into human-readable LLVM assembly language. + +If filename is omitted or specified as ``-``, **llvm-dis** reads its +input from standard input. + +If the input is being read from standard input, then **llvm-dis** +will send its output to standard output by default. Otherwise, the +output will be written to a file named after the input file, with +a ``.ll`` suffix added (any existing ``.bc`` suffix will first be +removed). You can override the choice of output file using the +**-o** option. + + +OPTIONS +------- + + + +**-f** + + Enable binary output on terminals. Normally, **llvm-dis** will refuse to + write raw bitcode output if the output stream is a terminal. With this option, + **llvm-dis** will write raw bitcode regardless of the output device. + + + +**-help** + + Print a summary of command line options. + + + +**-o** *filename* + + Specify the output file name. If *filename* is -, then the output is sent + to standard output. + + + + +EXIT STATUS +----------- + + +If **llvm-dis** succeeds, it will exit with 0. Otherwise, if an error +occurs, it will exit with a non-zero value. + + +SEE ALSO +-------- + + +llvm-as|llvm-as diff --git a/docs/CommandGuide/llvm-extract.rst b/docs/CommandGuide/llvm-extract.rst new file mode 100644 index 00000000..d0e9c1c2 --- /dev/null +++ b/docs/CommandGuide/llvm-extract.rst @@ -0,0 +1,79 @@ +llvm-extract - extract a function from an LLVM module +===================================================== + +SYNOPSIS +-------- + +:program:`llvm-extract` [*options*] **--func** *function-name* [*filename*] + +DESCRIPTION +----------- + +The :program:`llvm-extract` command takes the name of a function and extracts +it from the specified LLVM bitcode file. It is primarily used as a debugging +tool to reduce test cases from larger programs that are triggering a bug. + +In addition to extracting the bitcode of the specified function, +:program:`llvm-extract` will also remove unreachable global variables, +prototypes, and unused types. + +The :program:`llvm-extract` command reads its input from standard input if +filename is omitted or if filename is ``-``. The output is always written to +standard output, unless the **-o** option is specified (see below). + +OPTIONS +------- + +**-f** + + Enable binary output on terminals. Normally, :program:`llvm-extract` will + refuse to write raw bitcode output if the output stream is a terminal. With + this option, :program:`llvm-extract` will write raw bitcode regardless of the + output device. + +**--func** *function-name* + + Extract the function named *function-name* from the LLVM bitcode. May be + specified multiple times to extract multiple functions at once. + +**--rfunc** *function-regular-expr* + + Extract the function(s) matching *function-regular-expr* from the LLVM bitcode. + All functions matching the regular expression will be extracted. May be + specified multiple times. + +**--glob** *global-name* + + Extract the global variable named *global-name* from the LLVM bitcode. May be + specified multiple times to extract multiple global variables at once. + +**--rglob** *glob-regular-expr* + + Extract the global variable(s) matching *global-regular-expr* from the LLVM + bitcode. All global variables matching the regular expression will be + extracted. May be specified multiple times. + +**-help** + + Print a summary of command line options. + +**-o** *filename* + + Specify the output filename. If filename is "-" (the default), then + :program:`llvm-extract` sends its output to standard output. + +**-S** + + Write output in LLVM intermediate language (instead of bitcode). + +EXIT STATUS +----------- + +If :program:`llvm-extract` succeeds, it will exit with 0. Otherwise, if an error +occurs, it will exit with a non-zero value. + +SEE ALSO +-------- + +bugpoint + diff --git a/docs/CommandGuide/llvm-link.rst b/docs/CommandGuide/llvm-link.rst new file mode 100644 index 00000000..3bcfa68c --- /dev/null +++ b/docs/CommandGuide/llvm-link.rst @@ -0,0 +1,56 @@ +llvm-link - LLVM bitcode linker +=============================== + +SYNOPSIS +-------- + +:program:`llvm-link` [*options*] *filename ...* + +DESCRIPTION +----------- + +:program:`llvm-link` takes several LLVM bitcode files and links them together +into a single LLVM bitcode file. It writes the output file to standard output, +unless the :option:`-o` option is used to specify a filename. + +OPTIONS +------- + +.. option:: -f + + Enable binary output on terminals. Normally, :program:`llvm-link` will refuse + to write raw bitcode output if the output stream is a terminal. With this + option, :program:`llvm-link` will write raw bitcode regardless of the output + device. + +.. option:: -o filename + + Specify the output file name. If ``filename`` is "``-``", then + :program:`llvm-link` will write its output to standard output. + +.. option:: -S + + Write output in LLVM intermediate language (instead of bitcode). + +.. option:: -d + + If specified, :program:`llvm-link` prints a human-readable version of the + output bitcode file to standard error. + +.. option:: -help + + Print a summary of command line options. + +.. option:: -v + + Verbose mode. Print information about what :program:`llvm-link` is doing. + This typically includes a message for each bitcode file linked in and for each + library found. + +EXIT STATUS +----------- + +If :program:`llvm-link` succeeds, it will exit with 0. Otherwise, if an error +occurs, it will exit with a non-zero value. + + diff --git a/docs/CommandGuide/llvm-nm.rst b/docs/CommandGuide/llvm-nm.rst new file mode 100644 index 00000000..83d9fbaf --- /dev/null +++ b/docs/CommandGuide/llvm-nm.rst @@ -0,0 +1,146 @@ +llvm-nm - list LLVM bitcode and object file's symbol table +========================================================== + +SYNOPSIS +-------- + +:program:`llvm-nm` [*options*] [*filenames...*] + +DESCRIPTION +----------- + +The :program:`llvm-nm` utility lists the names of symbols from the LLVM bitcode +files, object files, or :program:`ar` archives containing them, named on the +command line. Each symbol is listed along with some simple information about +its provenance. If no file name is specified, or *-* is used as a file name, +:program:`llvm-nm` will process a file on its standard input stream. + +:program:`llvm-nm`'s default output format is the traditional BSD :program:`nm` +output format. Each such output record consists of an (optional) 8-digit +hexadecimal address, followed by a type code character, followed by a name, for +each symbol. One record is printed per line; fields are separated by spaces. +When the address is omitted, it is replaced by 8 spaces. + +Type code characters currently supported, and their meanings, are as follows: + +U + + Named object is referenced but undefined in this bitcode file + +C + + Common (multiple definitions link together into one def) + +W + + Weak reference (multiple definitions link together into zero or one definitions) + +t + + Local function (text) object + +T + + Global function (text) object + +d + + Local data object + +D + + Global data object + +? + + Something unrecognizable + +Because LLVM bitcode files typically contain objects that are not considered to +have addresses until they are linked into an executable image or dynamically +compiled "just-in-time", :program:`llvm-nm` does not print an address for any +symbol in an LLVM bitcode file, even symbols which are defined in the bitcode +file. + +OPTIONS +------- + +.. program:: llvm-nm + +.. option:: -B (default) + + Use BSD output format. Alias for :option:`--format=bsd`. + +.. option:: -P + + Use POSIX.2 output format. Alias for :option:`--format=posix`. + +.. option:: --debug-syms, -a + + Show all symbols, even debugger only. + +.. option:: --defined-only + + Print only symbols defined in this file (as opposed to + symbols which may be referenced by objects in this file, but not + defined in this file.) + +.. option:: --dynamic, -D + + Display dynamic symbols instead of normal symbols. + +.. option:: --extern-only, -g + + Print only symbols whose definitions are external; that is, accessible + from other files. + +.. option:: --format=format, -f format + + Select an output format; *format* may be *sysv*, *posix*, or *bsd*. The default + is *bsd*. + +.. option:: -help + + Print a summary of command-line options and their meanings. + +.. option:: --no-sort, -p + + Shows symbols in order encountered. + +.. option:: --numeric-sort, -n, -v + + Sort symbols by address. + +.. option:: --print-file-name, -A, -o + + Precede each symbol with the file it came from. + +.. option:: --print-size, -S + + Show symbol size instead of address. + +.. option:: --size-sort + + Sort symbols by size. + +.. option:: --undefined-only, -u + + Print only symbols referenced but not defined in this file. + +BUGS +---- + + * :program:`llvm-nm` cannot demangle C++ mangled names, like GNU :program:`nm` + can. + + * :program:`llvm-nm` does not support the full set of arguments that GNU + :program:`nm` does. + +EXIT STATUS +----------- + +:program:`llvm-nm` exits with an exit code of zero. + +SEE ALSO +-------- + +llvm-dis, ar(1), nm(1) diff --git a/docs/CommandGuide/llvm-prof.rst b/docs/CommandGuide/llvm-prof.rst new file mode 100644 index 00000000..e8d0b19c --- /dev/null +++ b/docs/CommandGuide/llvm-prof.rst @@ -0,0 +1,63 @@ +llvm-prof - print execution profile of LLVM program +=================================================== + + +SYNOPSIS +-------- + + +**llvm-prof** [*options*] [*bitcode file*] [*llvmprof.out*] + + +DESCRIPTION +----------- + + +The **llvm-prof** tool reads in an *llvmprof.out* file (which can +optionally use a specific file with the third program argument), a bitcode file +for the program, and produces a human readable report, suitable for determining +where the program hotspots are. + +This program is often used in conjunction with the *utils/profile.pl* +script. This script automatically instruments a program, runs it with the JIT, +then runs **llvm-prof** to format a report. To get more information about +*utils/profile.pl*, execute it with the **-help** option. + + +OPTIONS +------- + + + +**--annotated-llvm** or **-A** + + In addition to the normal report printed, print out the code for the + program, annotated with execution frequency information. This can be + particularly useful when trying to visualize how frequently basic blocks + are executed. This is most useful with basic block profiling + information or better. + + + +**--print-all-code** + + Using this option enables the **--annotated-llvm** option, but it + prints the entire module, instead of just the most commonly executed + functions. + + + +**--time-passes** + + Record the amount of time needed for each pass and print it to standard + error. + + + + +EXIT STATUS +----------- + + +**llvm-prof** returns 1 if it cannot load the bitcode file or the profile +information. Otherwise, it exits with zero. diff --git a/docs/CommandGuide/llvm-readobj.rst b/docs/CommandGuide/llvm-readobj.rst new file mode 100644 index 00000000..b1918b54 --- /dev/null +++ b/docs/CommandGuide/llvm-readobj.rst @@ -0,0 +1,86 @@ +llvm-readobj - LLVM Object Reader +================================= + +SYNOPSIS +-------- + +:program:`llvm-readobj` [*options*] [*input...*] + +DESCRIPTION +----------- + +The :program:`llvm-readobj` tool displays low-level format-specific information +about one or more object files. The tool and its output is primarily designed +for use in FileCheck-based tests. + +OPTIONS +------- + +If ``input`` is "``-``" or omitted, :program:`llvm-readobj` reads from standard +input. Otherwise, it will read from the specified ``filenames``. + +.. option:: -help + + Print a summary of command line options. + +.. option:: -version + + Display the version of this program + +.. option:: -file-headers, -h + + Display file headers. + +.. option:: -sections, -s + + Display all sections. + +.. option:: -section-data, -sd + + When used with ``-sections``, display section data for each section shown. + +.. option:: -section-relocations, -sr + + When used with ``-sections``, display relocations for each section shown. + +.. option:: -section-symbols, -st + + When used with ``-sections``, display symbols for each section shown. + +.. option:: -relocations, -r + + Display the relocation entries in the file. + +.. option:: -symbols, -t + + Display the symbol table. + +.. option:: -dyn-symbols + + Display the dynamic symbol table (only for ELF object files). + +.. option:: -unwind, -u + + Display unwind information. + +.. option:: -expand-relocs + + When used with ``-relocations``, display each relocation in an expanded + multi-line format. + +.. option:: -dynamic-table + + Display the ELF .dynamic section table (only for ELF object files). + +.. option:: -needed-libs + + Display the needed libraries (only for ELF object files). + +.. option:: -program-headers + + Display the ELF program headers (only for ELF object files). + +EXIT STATUS +----------- + +:program:`llvm-readobj` returns 0. diff --git a/docs/CommandGuide/llvm-stress.rst b/docs/CommandGuide/llvm-stress.rst new file mode 100644 index 00000000..fb006f56 --- /dev/null +++ b/docs/CommandGuide/llvm-stress.rst @@ -0,0 +1,34 @@ +llvm-stress - generate random .ll files +======================================= + +SYNOPSIS +-------- + +:program:`llvm-stress` [-size=filesize] [-seed=initialseed] [-o=outfile] + +DESCRIPTION +----------- + +The :program:`llvm-stress` tool is used to generate random ``.ll`` files that +can be used to test different components of LLVM. + +OPTIONS +------- + +.. option:: -o filename + + Specify the output filename. + +.. option:: -size size + + Specify the size of the generated ``.ll`` file. + +.. option:: -seed seed + + Specify the seed to be used for the randomly generated instructions. + +EXIT STATUS +----------- + +:program:`llvm-stress` returns 0. + diff --git a/docs/CommandGuide/llvm-symbolizer.rst b/docs/CommandGuide/llvm-symbolizer.rst new file mode 100644 index 00000000..e03be9b1 --- /dev/null +++ b/docs/CommandGuide/llvm-symbolizer.rst @@ -0,0 +1,81 @@ +llvm-symbolizer - convert addresses into source code locations +============================================================== + +SYNOPSIS +-------- + +:program:`llvm-symbolizer` [options] + +DESCRIPTION +----------- + +:program:`llvm-symbolizer` reads object file names and addresses from standard +input and prints corresponding source code locations to standard output. This +program uses debug info sections and symbol table in the object files. + +EXAMPLE +-------- + +.. code-block:: console + + $ cat addr.txt + a.out 0x4004f4 + /tmp/b.out 0x400528 + /tmp/c.so 0x710 + /tmp/mach_universal_binary:i386 0x1f84 + /tmp/mach_universal_binary:x86_64 0x100000f24 + $ llvm-symbolizer < addr.txt + main + /tmp/a.cc:4 + + f(int, int) + /tmp/b.cc:11 + + h_inlined_into_g + /tmp/header.h:2 + g_inlined_into_f + /tmp/header.h:7 + f_inlined_into_main + /tmp/source.cc:3 + main + /tmp/source.cc:8 + + _main + /tmp/source_i386.cc:8 + + _main + /tmp/source_x86_64.cc:8 + +OPTIONS +------- + +.. option:: -functions + + Print function names as well as source file/line locations. Defaults to true. + +.. option:: -use-symbol-table + + Prefer function names stored in symbol table to function names + in debug info sections. Defaults to true. + +.. option:: -demangle + + Print demangled function names. Defaults to true. + +.. option:: -inlining + + If a source code location is in an inlined function, prints all the + inlnied frames. Defaults to true. + +.. option:: -default-arch + + If a binary contains object files for multiple architectures (e.g. it is a + Mach-O universal binary), symbolize the object file for a given architecture. + You can also specify architecture by writing ``binary_name:arch_name`` in the + input (see example above). If architecture is not specified in either way, + address will not be symbolized. Defaults to empty string. + +EXIT STATUS +----------- + +:program:`llvm-symbolizer` returns 0. Other exit codes imply internal program error. diff --git a/docs/CommandGuide/opt.rst b/docs/CommandGuide/opt.rst new file mode 100644 index 00000000..179c297c --- /dev/null +++ b/docs/CommandGuide/opt.rst @@ -0,0 +1,143 @@ +opt - LLVM optimizer +==================== + +SYNOPSIS +-------- + +:program:`opt` [*options*] [*filename*] + +DESCRIPTION +----------- + +The :program:`opt` command is the modular LLVM optimizer and analyzer. It +takes LLVM source files as input, runs the specified optimizations or analyses +on it, and then outputs the optimized file or the analysis results. The +function of :program:`opt` depends on whether the :option:`-analyze` option is +given. + +When :option:`-analyze` is specified, :program:`opt` performs various analyses +of the input source. It will usually print the results on standard output, but +in a few cases, it will print output to standard error or generate a file with +the analysis output, which is usually done when the output is meant for another +program. + +While :option:`-analyze` is *not* given, :program:`opt` attempts to produce an +optimized output file. The optimizations available via :program:`opt` depend +upon what libraries were linked into it as well as any additional libraries +that have been loaded with the :option:`-load` option. Use the :option:`-help` +option to determine what optimizations you can use. + +If ``filename`` is omitted from the command line or is "``-``", :program:`opt` +reads its input from standard input. Inputs can be in either the LLVM assembly +language format (``.ll``) or the LLVM bitcode format (``.bc``). + +If an output filename is not specified with the :option:`-o` option, +:program:`opt` writes its output to the standard output. + +OPTIONS +------- + +.. option:: -f + + Enable binary output on terminals. Normally, :program:`opt` will refuse to + write raw bitcode output if the output stream is a terminal. With this option, + :program:`opt` will write raw bitcode regardless of the output device. + +.. option:: -help + + Print a summary of command line options. + +.. option:: -o + + Specify the output filename. + +.. option:: -S + + Write output in LLVM intermediate language (instead of bitcode). + +.. option:: -{passname} + + :program:`opt` provides the ability to run any of LLVM's optimization or + analysis passes in any order. The :option:`-help` option lists all the passes + available. The order in which the options occur on the command line are the + order in which they are executed (within pass constraints). + +.. option:: -std-compile-opts + + This is short hand for a standard list of *compile time optimization* passes. + This is typically used to optimize the output from the llvm-gcc front end. It + might be useful for other front end compilers as well. To discover the full + set of options available, use the following command: + + .. code-block:: sh + + llvm-as < /dev/null | opt -std-compile-opts -disable-output -debug-pass=Arguments + +.. option:: -disable-inlining + + This option is only meaningful when :option:`-std-compile-opts` is given. It + simply removes the inlining pass from the standard list. + +.. option:: -disable-opt + + This option is only meaningful when :option:`-std-compile-opts` is given. It + disables most, but not all, of the :option:`-std-compile-opts`. The ones that + remain are :option:`-verify`, :option:`-lower-setjmp`, and + :option:`-funcresolve`. + +.. option:: -strip-debug + + This option causes opt to strip debug information from the module before + applying other optimizations. It is essentially the same as :option:`-strip` + but it ensures that stripping of debug information is done first. + +.. option:: -verify-each + + This option causes opt to add a verify pass after every pass otherwise + specified on the command line (including :option:`-verify`). This is useful + for cases where it is suspected that a pass is creating an invalid module but + it is not clear which pass is doing it. The combination of + :option:`-std-compile-opts` and :option:`-verify-each` can quickly track down + this kind of problem. + +.. option:: -profile-info-file + + Specify the name of the file loaded by the ``-profile-loader`` option. + +.. option:: -stats + + Print statistics. + +.. option:: -time-passes + + Record the amount of time needed for each pass and print it to standard + error. + +.. option:: -debug + + If this is a debug build, this option will enable debug printouts from passes + which use the ``DEBUG()`` macro. See the `LLVM Programmer's Manual + <../ProgrammersManual.html>`_, section ``#DEBUG`` for more information. + +.. option:: -load= + + Load the dynamic object ``plugin``. This object should register new + optimization or analysis passes. Once loaded, the object will add new command + line options to enable various optimizations or analyses. To see the new + complete list of optimizations, use the :option:`-help` and :option:`-load` + options together. For example: + + .. code-block:: sh + + opt -load=plugin.so -help + +.. option:: -p + + Print module after each transformation. + +EXIT STATUS +----------- + +If :program:`opt` succeeds, it will exit with 0. Otherwise, if an error +occurs, it will exit with a non-zero value. + diff --git a/docs/CommandGuide/tblgen.rst b/docs/CommandGuide/tblgen.rst new file mode 100644 index 00000000..1c468283 --- /dev/null +++ b/docs/CommandGuide/tblgen.rst @@ -0,0 +1,131 @@ +tblgen - Target Description To C++ Code Generator +================================================= + +SYNOPSIS +-------- + +:program:`tblgen` [*options*] [*filename*] + +DESCRIPTION +----------- + +:program:`tblgen` translates from target description (``.td``) files into C++ +code that can be included in the definition of an LLVM target library. Most +users of LLVM will not need to use this program. It is only for assisting with +writing an LLVM target backend. + +The input and output of :program:`tblgen` is beyond the scope of this short +introduction. Please see :doc:`../TableGenFundamentals`. + +The *filename* argument specifies the name of a Target Description (``.td``) +file to read as input. + +OPTIONS +------- + +.. program:: tblgen + +.. option:: -help + + Print a summary of command line options. + +.. option:: -o filename + + Specify the output file name. If ``filename`` is ``-``, then + :program:`tblgen` sends its output to standard output. + +.. option:: -I directory + + Specify where to find other target description files for inclusion. The + ``directory`` value should be a full or partial path to a directory that + contains target description files. + +.. option:: -asmparsernum N + + Make -gen-asm-parser emit assembly writer number ``N``. + +.. option:: -asmwriternum N + + Make -gen-asm-writer emit assembly writer number ``N``. + +.. option:: -class className + + Print the enumeration list for this class. + +.. option:: -print-records + + Print all records to standard output (default). + +.. option:: -print-enums + + Print enumeration values for a class. + +.. option:: -print-sets + + Print expanded sets for testing DAG exprs. + +.. option:: -gen-emitter + + Generate machine code emitter. + +.. option:: -gen-register-info + + Generate registers and register classes info. + +.. option:: -gen-instr-info + + Generate instruction descriptions. + +.. option:: -gen-asm-writer + + Generate the assembly writer. + +.. option:: -gen-disassembler + + Generate disassembler. + +.. option:: -gen-pseudo-lowering + + Generate pseudo instruction lowering. + +.. option:: -gen-dag-isel + + Generate a DAG (Directed Acycle Graph) instruction selector. + +.. option:: -gen-asm-matcher + + Generate assembly instruction matcher. + +.. option:: -gen-dfa-packetizer + + Generate DFA Packetizer for VLIW targets. + +.. option:: -gen-fast-isel + + Generate a "fast" instruction selector. + +.. option:: -gen-subtarget + + Generate subtarget enumerations. + +.. option:: -gen-intrinsic + + Generate intrinsic information. + +.. option:: -gen-tgt-intrinsic + + Generate target intrinsic information. + +.. option:: -gen-enhanced-disassembly-info + + Generate enhanced disassembly info. + +.. option:: -version + + Show the version number of this program. + +EXIT STATUS +----------- + +If :program:`tblgen` succeeds, it will exit with 0. Otherwise, if an error +occurs, it will exit with a non-zero value. diff --git a/docs/CommandLine.rst b/docs/CommandLine.rst new file mode 100644 index 00000000..4c84d232 --- /dev/null +++ b/docs/CommandLine.rst @@ -0,0 +1,1743 @@ +============================== +CommandLine 2.0 Library Manual +============================== + +.. contents:: + :local: + +Introduction +============ + +This document describes the CommandLine argument processing library. It will +show you how to use it, and what it can do. The CommandLine library uses a +declarative approach to specifying the command line options that your program +takes. By default, these options declarations implicitly hold the value parsed +for the option declared (of course this `can be changed`_). + +Although there are a **lot** of command line argument parsing libraries out +there in many different languages, none of them fit well with what I needed. By +looking at the features and problems of other libraries, I designed the +CommandLine library to have the following features: + +#. Speed: The CommandLine library is very quick and uses little resources. The + parsing time of the library is directly proportional to the number of + arguments parsed, not the number of options recognized. Additionally, + command line argument values are captured transparently into user defined + global variables, which can be accessed like any other variable (and with the + same performance). + +#. Type Safe: As a user of CommandLine, you don't have to worry about + remembering the type of arguments that you want (is it an int? a string? a + bool? an enum?) and keep casting it around. Not only does this help prevent + error prone constructs, it also leads to dramatically cleaner source code. + +#. No subclasses required: To use CommandLine, you instantiate variables that + correspond to the arguments that you would like to capture, you don't + subclass a parser. This means that you don't have to write **any** + boilerplate code. + +#. Globally accessible: Libraries can specify command line arguments that are + automatically enabled in any tool that links to the library. This is + possible because the application doesn't have to keep a list of arguments to + pass to the parser. This also makes supporting `dynamically loaded options`_ + trivial. + +#. Cleaner: CommandLine supports enum and other types directly, meaning that + there is less error and more security built into the library. You don't have + to worry about whether your integral command line argument accidentally got + assigned a value that is not valid for your enum type. + +#. Powerful: The CommandLine library supports many different types of arguments, + from simple `boolean flags`_ to `scalars arguments`_ (`strings`_, + `integers`_, `enums`_, `doubles`_), to `lists of arguments`_. This is + possible because CommandLine is... + +#. Extensible: It is very simple to add a new argument type to CommandLine. + Simply specify the parser that you want to use with the command line option + when you declare it. `Custom parsers`_ are no problem. + +#. Labor Saving: The CommandLine library cuts down on the amount of grunt work + that you, the user, have to do. For example, it automatically provides a + ``-help`` option that shows the available command line options for your tool. + Additionally, it does most of the basic correctness checking for you. + +#. Capable: The CommandLine library can handle lots of different forms of + options often found in real programs. For example, `positional`_ arguments, + ``ls`` style `grouping`_ options (to allow processing '``ls -lad``' + naturally), ``ld`` style `prefix`_ options (to parse '``-lmalloc + -L/usr/lib``'), and interpreter style options. + +This document will hopefully let you jump in and start using CommandLine in your +utility quickly and painlessly. Additionally it should be a simple reference +manual to figure out how stuff works. + +Quick Start Guide +================= + +This section of the manual runs through a simple CommandLine'ification of a +basic compiler tool. This is intended to show you how to jump into using the +CommandLine library in your own program, and show you some of the cool things it +can do. + +To start out, you need to include the CommandLine header file into your program: + +.. code-block:: c++ + + #include "llvm/Support/CommandLine.h" + +Additionally, you need to add this as the first line of your main program: + +.. code-block:: c++ + + int main(int argc, char **argv) { + cl::ParseCommandLineOptions(argc, argv); + ... + } + +... which actually parses the arguments and fills in the variable declarations. + +Now that you are ready to support command line arguments, we need to tell the +system which ones we want, and what type of arguments they are. The CommandLine +library uses a declarative syntax to model command line arguments with the +global variable declarations that capture the parsed values. This means that +for every command line option that you would like to support, there should be a +global variable declaration to capture the result. For example, in a compiler, +we would like to support the Unix-standard '``-o ``' option to specify +where to put the output. With the CommandLine library, this is represented like +this: + +.. _scalars arguments: +.. _here: + +.. code-block:: c++ + + cl::opt OutputFilename("o", cl::desc("Specify output filename"), cl::value_desc("filename")); + +This declares a global variable "``OutputFilename``" that is used to capture the +result of the "``o``" argument (first parameter). We specify that this is a +simple scalar option by using the "``cl::opt``" template (as opposed to the +"``cl::list``" template), and tell the CommandLine library that the data +type that we are parsing is a string. + +The second and third parameters (which are optional) are used to specify what to +output for the "``-help``" option. In this case, we get a line that looks like +this: + +:: + + USAGE: compiler [options] + + OPTIONS: + -help - display available options (-help-hidden for more) + -o - Specify output filename + +Because we specified that the command line option should parse using the +``string`` data type, the variable declared is automatically usable as a real +string in all contexts that a normal C++ string object may be used. For +example: + +.. code-block:: c++ + + ... + std::ofstream Output(OutputFilename.c_str()); + if (Output.good()) ... + ... + +There are many different options that you can use to customize the command line +option handling library, but the above example shows the general interface to +these options. The options can be specified in any order, and are specified +with helper functions like `cl::desc(...)`_, so there are no positional +dependencies to remember. The available options are discussed in detail in the +`Reference Guide`_. + +Continuing the example, we would like to have our compiler take an input +filename as well as an output filename, but we do not want the input filename to +be specified with a hyphen (ie, not ``-filename.c``). To support this style of +argument, the CommandLine library allows for `positional`_ arguments to be +specified for the program. These positional arguments are filled with command +line parameters that are not in option form. We use this feature like this: + +.. code-block:: c++ + + + cl::opt InputFilename(cl::Positional, cl::desc(""), cl::init("-")); + +This declaration indicates that the first positional argument should be treated +as the input filename. Here we use the `cl::init`_ option to specify an initial +value for the command line option, which is used if the option is not specified +(if you do not specify a `cl::init`_ modifier for an option, then the default +constructor for the data type is used to initialize the value). Command line +options default to being optional, so if we would like to require that the user +always specify an input filename, we would add the `cl::Required`_ flag, and we +could eliminate the `cl::init`_ modifier, like this: + +.. code-block:: c++ + + cl::opt InputFilename(cl::Positional, cl::desc(""), cl::Required); + +Again, the CommandLine library does not require the options to be specified in +any particular order, so the above declaration is equivalent to: + +.. code-block:: c++ + + cl::opt InputFilename(cl::Positional, cl::Required, cl::desc("")); + +By simply adding the `cl::Required`_ flag, the CommandLine library will +automatically issue an error if the argument is not specified, which shifts all +of the command line option verification code out of your application into the +library. This is just one example of how using flags can alter the default +behaviour of the library, on a per-option basis. By adding one of the +declarations above, the ``-help`` option synopsis is now extended to: + +:: + + USAGE: compiler [options] + + OPTIONS: + -help - display available options (-help-hidden for more) + -o - Specify output filename + +... indicating that an input filename is expected. + +Boolean Arguments +----------------- + +In addition to input and output filenames, we would like the compiler example to +support three boolean flags: "``-f``" to force writing binary output to a +terminal, "``--quiet``" to enable quiet mode, and "``-q``" for backwards +compatibility with some of our users. We can support these by declaring options +of boolean type like this: + +.. code-block:: c++ + + cl::opt Force ("f", cl::desc("Enable binary output on terminals")); + cl::opt Quiet ("quiet", cl::desc("Don't print informational messages")); + cl::opt Quiet2("q", cl::desc("Don't print informational messages"), cl::Hidden); + +This does what you would expect: it declares three boolean variables +("``Force``", "``Quiet``", and "``Quiet2``") to recognize these options. Note +that the "``-q``" option is specified with the "`cl::Hidden`_" flag. This +modifier prevents it from being shown by the standard "``-help``" output (note +that it is still shown in the "``-help-hidden``" output). + +The CommandLine library uses a `different parser`_ for different data types. +For example, in the string case, the argument passed to the option is copied +literally into the content of the string variable... we obviously cannot do that +in the boolean case, however, so we must use a smarter parser. In the case of +the boolean parser, it allows no options (in which case it assigns the value of +true to the variable), or it allows the values "``true``" or "``false``" to be +specified, allowing any of the following inputs: + +:: + + compiler -f # No value, 'Force' == true + compiler -f=true # Value specified, 'Force' == true + compiler -f=TRUE # Value specified, 'Force' == true + compiler -f=FALSE # Value specified, 'Force' == false + +... you get the idea. The `bool parser`_ just turns the string values into +boolean values, and rejects things like '``compiler -f=foo``'. Similarly, the +`float`_, `double`_, and `int`_ parsers work like you would expect, using the +'``strtol``' and '``strtod``' C library calls to parse the string value into the +specified data type. + +With the declarations above, "``compiler -help``" emits this: + +:: + + USAGE: compiler [options] + + OPTIONS: + -f - Enable binary output on terminals + -o - Override output filename + -quiet - Don't print informational messages + -help - display available options (-help-hidden for more) + +and "``compiler -help-hidden``" prints this: + +:: + + USAGE: compiler [options] + + OPTIONS: + -f - Enable binary output on terminals + -o - Override output filename + -q - Don't print informational messages + -quiet - Don't print informational messages + -help - display available options (-help-hidden for more) + +This brief example has shown you how to use the '`cl::opt`_' class to parse +simple scalar command line arguments. In addition to simple scalar arguments, +the CommandLine library also provides primitives to support CommandLine option +`aliases`_, and `lists`_ of options. + +.. _aliases: + +Argument Aliases +---------------- + +So far, the example works well, except for the fact that we need to check the +quiet condition like this now: + +.. code-block:: c++ + + ... + if (!Quiet && !Quiet2) printInformationalMessage(...); + ... + +... which is a real pain! Instead of defining two values for the same +condition, we can use the "`cl::alias`_" class to make the "``-q``" option an +**alias** for the "``-quiet``" option, instead of providing a value itself: + +.. code-block:: c++ + + cl::opt Force ("f", cl::desc("Overwrite output files")); + cl::opt Quiet ("quiet", cl::desc("Don't print informational messages")); + cl::alias QuietA("q", cl::desc("Alias for -quiet"), cl::aliasopt(Quiet)); + +The third line (which is the only one we modified from above) defines a "``-q``" +alias that updates the "``Quiet``" variable (as specified by the `cl::aliasopt`_ +modifier) whenever it is specified. Because aliases do not hold state, the only +thing the program has to query is the ``Quiet`` variable now. Another nice +feature of aliases is that they automatically hide themselves from the ``-help`` +output (although, again, they are still visible in the ``-help-hidden output``). + +Now the application code can simply use: + +.. code-block:: c++ + + ... + if (!Quiet) printInformationalMessage(...); + ... + +... which is much nicer! The "`cl::alias`_" can be used to specify an +alternative name for any variable type, and has many uses. + +.. _unnamed alternatives using the generic parser: + +Selecting an alternative from a set of possibilities +---------------------------------------------------- + +So far we have seen how the CommandLine library handles builtin types like +``std::string``, ``bool`` and ``int``, but how does it handle things it doesn't +know about, like enums or '``int*``'s? + +The answer is that it uses a table-driven generic parser (unless you specify +your own parser, as described in the `Extension Guide`_). This parser maps +literal strings to whatever type is required, and requires you to tell it what +this mapping should be. + +Let's say that we would like to add four optimization levels to our optimizer, +using the standard flags "``-g``", "``-O0``", "``-O1``", and "``-O2``". We +could easily implement this with boolean options like above, but there are +several problems with this strategy: + +#. A user could specify more than one of the options at a time, for example, + "``compiler -O3 -O2``". The CommandLine library would not be able to catch + this erroneous input for us. + +#. We would have to test 4 different variables to see which ones are set. + +#. This doesn't map to the numeric levels that we want... so we cannot easily + see if some level >= "``-O1``" is enabled. + +To cope with these problems, we can use an enum value, and have the CommandLine +library fill it in with the appropriate level directly, which is used like this: + +.. code-block:: c++ + + enum OptLevel { + g, O1, O2, O3 + }; + + cl::opt OptimizationLevel(cl::desc("Choose optimization level:"), + cl::values( + clEnumVal(g , "No optimizations, enable debugging"), + clEnumVal(O1, "Enable trivial optimizations"), + clEnumVal(O2, "Enable default optimizations"), + clEnumVal(O3, "Enable expensive optimizations"), + clEnumValEnd)); + + ... + if (OptimizationLevel >= O2) doPartialRedundancyElimination(...); + ... + +This declaration defines a variable "``OptimizationLevel``" of the +"``OptLevel``" enum type. This variable can be assigned any of the values that +are listed in the declaration (Note that the declaration list must be terminated +with the "``clEnumValEnd``" argument!). The CommandLine library enforces that +the user can only specify one of the options, and it ensure that only valid enum +values can be specified. The "``clEnumVal``" macros ensure that the command +line arguments matched the enum values. With this option added, our help output +now is: + +:: + + USAGE: compiler [options] + + OPTIONS: + Choose optimization level: + -g - No optimizations, enable debugging + -O1 - Enable trivial optimizations + -O2 - Enable default optimizations + -O3 - Enable expensive optimizations + -f - Enable binary output on terminals + -help - display available options (-help-hidden for more) + -o - Specify output filename + -quiet - Don't print informational messages + +In this case, it is sort of awkward that flag names correspond directly to enum +names, because we probably don't want a enum definition named "``g``" in our +program. Because of this, we can alternatively write this example like this: + +.. code-block:: c++ + + enum OptLevel { + Debug, O1, O2, O3 + }; + + cl::opt OptimizationLevel(cl::desc("Choose optimization level:"), + cl::values( + clEnumValN(Debug, "g", "No optimizations, enable debugging"), + clEnumVal(O1 , "Enable trivial optimizations"), + clEnumVal(O2 , "Enable default optimizations"), + clEnumVal(O3 , "Enable expensive optimizations"), + clEnumValEnd)); + + ... + if (OptimizationLevel == Debug) outputDebugInfo(...); + ... + +By using the "``clEnumValN``" macro instead of "``clEnumVal``", we can directly +specify the name that the flag should get. In general a direct mapping is nice, +but sometimes you can't or don't want to preserve the mapping, which is when you +would use it. + +Named Alternatives +------------------ + +Another useful argument form is a named alternative style. We shall use this +style in our compiler to specify different debug levels that can be used. +Instead of each debug level being its own switch, we want to support the +following options, of which only one can be specified at a time: +"``--debug-level=none``", "``--debug-level=quick``", +"``--debug-level=detailed``". To do this, we use the exact same format as our +optimization level flags, but we also specify an option name. For this case, +the code looks like this: + +.. code-block:: c++ + + enum DebugLev { + nodebuginfo, quick, detailed + }; + + // Enable Debug Options to be specified on the command line + cl::opt DebugLevel("debug_level", cl::desc("Set the debugging level:"), + cl::values( + clEnumValN(nodebuginfo, "none", "disable debug information"), + clEnumVal(quick, "enable quick debug information"), + clEnumVal(detailed, "enable detailed debug information"), + clEnumValEnd)); + +This definition defines an enumerated command line variable of type "``enum +DebugLev``", which works exactly the same way as before. The difference here is +just the interface exposed to the user of your program and the help output by +the "``-help``" option: + +:: + + USAGE: compiler [options] + + OPTIONS: + Choose optimization level: + -g - No optimizations, enable debugging + -O1 - Enable trivial optimizations + -O2 - Enable default optimizations + -O3 - Enable expensive optimizations + -debug_level - Set the debugging level: + =none - disable debug information + =quick - enable quick debug information + =detailed - enable detailed debug information + -f - Enable binary output on terminals + -help - display available options (-help-hidden for more) + -o - Specify output filename + -quiet - Don't print informational messages + +Again, the only structural difference between the debug level declaration and +the optimization level declaration is that the debug level declaration includes +an option name (``"debug_level"``), which automatically changes how the library +processes the argument. The CommandLine library supports both forms so that you +can choose the form most appropriate for your application. + +.. _lists: + +Parsing a list of options +------------------------- + +Now that we have the standard run-of-the-mill argument types out of the way, +lets get a little wild and crazy. Lets say that we want our optimizer to accept +a **list** of optimizations to perform, allowing duplicates. For example, we +might want to run: "``compiler -dce -constprop -inline -dce -strip``". In this +case, the order of the arguments and the number of appearances is very +important. This is what the "``cl::list``" template is for. First, start by +defining an enum of the optimizations that you would like to perform: + +.. code-block:: c++ + + enum Opts { + // 'inline' is a C++ keyword, so name it 'inlining' + dce, constprop, inlining, strip + }; + +Then define your "``cl::list``" variable: + +.. code-block:: c++ + + cl::list OptimizationList(cl::desc("Available Optimizations:"), + cl::values( + clEnumVal(dce , "Dead Code Elimination"), + clEnumVal(constprop , "Constant Propagation"), + clEnumValN(inlining, "inline", "Procedure Integration"), + clEnumVal(strip , "Strip Symbols"), + clEnumValEnd)); + +This defines a variable that is conceptually of the type +"``std::vector``". Thus, you can access it with standard vector +methods: + +.. code-block:: c++ + + for (unsigned i = 0; i != OptimizationList.size(); ++i) + switch (OptimizationList[i]) + ... + +... to iterate through the list of options specified. + +Note that the "``cl::list``" template is completely general and may be used with +any data types or other arguments that you can use with the "``cl::opt``" +template. One especially useful way to use a list is to capture all of the +positional arguments together if there may be more than one specified. In the +case of a linker, for example, the linker takes several '``.o``' files, and +needs to capture them into a list. This is naturally specified as: + +.. code-block:: c++ + + ... + cl::list InputFilenames(cl::Positional, cl::desc(""), cl::OneOrMore); + ... + +This variable works just like a "``vector``" object. As such, accessing +the list is simple, just like above. In this example, we used the +`cl::OneOrMore`_ modifier to inform the CommandLine library that it is an error +if the user does not specify any ``.o`` files on our command line. Again, this +just reduces the amount of checking we have to do. + +Collecting options as a set of flags +------------------------------------ + +Instead of collecting sets of options in a list, it is also possible to gather +information for enum values in a **bit vector**. The representation used by the +`cl::bits`_ class is an ``unsigned`` integer. An enum value is represented by a +0/1 in the enum's ordinal value bit position. 1 indicating that the enum was +specified, 0 otherwise. As each specified value is parsed, the resulting enum's +bit is set in the option's bit vector: + +.. code-block:: c++ + + bits |= 1 << (unsigned)enum; + +Options that are specified multiple times are redundant. Any instances after +the first are discarded. + +Reworking the above list example, we could replace `cl::list`_ with `cl::bits`_: + +.. code-block:: c++ + + cl::bits OptimizationBits(cl::desc("Available Optimizations:"), + cl::values( + clEnumVal(dce , "Dead Code Elimination"), + clEnumVal(constprop , "Constant Propagation"), + clEnumValN(inlining, "inline", "Procedure Integration"), + clEnumVal(strip , "Strip Symbols"), + clEnumValEnd)); + +To test to see if ``constprop`` was specified, we can use the ``cl:bits::isSet`` +function: + +.. code-block:: c++ + + if (OptimizationBits.isSet(constprop)) { + ... + } + +It's also possible to get the raw bit vector using the ``cl::bits::getBits`` +function: + +.. code-block:: c++ + + unsigned bits = OptimizationBits.getBits(); + +Finally, if external storage is used, then the location specified must be of +**type** ``unsigned``. In all other ways a `cl::bits`_ option is equivalent to a +`cl::list`_ option. + +.. _additional extra text: + +Adding freeform text to help output +----------------------------------- + +As our program grows and becomes more mature, we may decide to put summary +information about what it does into the help output. The help output is styled +to look similar to a Unix ``man`` page, providing concise information about a +program. Unix ``man`` pages, however often have a description about what the +program does. To add this to your CommandLine program, simply pass a third +argument to the `cl::ParseCommandLineOptions`_ call in main. This additional +argument is then printed as the overview information for your program, allowing +you to include any additional information that you want. For example: + +.. code-block:: c++ + + int main(int argc, char **argv) { + cl::ParseCommandLineOptions(argc, argv, " CommandLine compiler example\n\n" + " This program blah blah blah...\n"); + ... + } + +would yield the help output: + +:: + + **OVERVIEW: CommandLine compiler example + + This program blah blah blah...** + + USAGE: compiler [options] + + OPTIONS: + ... + -help - display available options (-help-hidden for more) + -o - Specify output filename + +.. _grouping options into categories: + +Grouping options into categories +-------------------------------- + +If our program has a large number of options it may become difficult for users +of our tool to navigate the output of ``-help``. To alleviate this problem we +can put our options into categories. This can be done by declaring option +categories (`cl::OptionCategory`_ objects) and then placing our options into +these categories using the `cl::cat`_ option attribute. For example: + +.. code-block:: c++ + + cl::OptionCategory StageSelectionCat("Stage Selection Options", + "These control which stages are run."); + + cl::opt Preprocessor("E",cl::desc("Run preprocessor stage."), + cl::cat(StageSelectionCat)); + + cl::opt NoLink("c",cl::desc("Run all stages except linking."), + cl::cat(StageSelectionCat)); + +The output of ``-help`` will become categorized if an option category is +declared. The output looks something like :: + + OVERVIEW: This is a small program to demo the LLVM CommandLine API + USAGE: Sample [options] + + OPTIONS: + + General options: + + -help - Display available options (-help-hidden for more) + -help-list - Display list of available options (-help-list-hidden for more) + + + Stage Selection Options: + These control which stages are run. + + -E - Run preprocessor stage. + -c - Run all stages except linking. + +In addition to the behaviour of ``-help`` changing when an option category is +declared, the command line option ``-help-list`` becomes visible which will +print the command line options as uncategorized list. + +Note that Options that are not explicitly categorized will be placed in the +``cl::GeneralCategory`` category. + +.. _Reference Guide: + +Reference Guide +=============== + +Now that you know the basics of how to use the CommandLine library, this section +will give you the detailed information you need to tune how command line options +work, as well as information on more "advanced" command line option processing +capabilities. + +.. _positional: +.. _positional argument: +.. _Positional Arguments: +.. _Positional arguments section: +.. _positional options: + +Positional Arguments +-------------------- + +Positional arguments are those arguments that are not named, and are not +specified with a hyphen. Positional arguments should be used when an option is +specified by its position alone. For example, the standard Unix ``grep`` tool +takes a regular expression argument, and an optional filename to search through +(which defaults to standard input if a filename is not specified). Using the +CommandLine library, this would be specified as: + +.. code-block:: c++ + + cl::opt Regex (cl::Positional, cl::desc(""), cl::Required); + cl::opt Filename(cl::Positional, cl::desc(""), cl::init("-")); + +Given these two option declarations, the ``-help`` output for our grep +replacement would look like this: + +:: + + USAGE: spiffygrep [options] + + OPTIONS: + -help - display available options (-help-hidden for more) + +... and the resultant program could be used just like the standard ``grep`` +tool. + +Positional arguments are sorted by their order of construction. This means that +command line options will be ordered according to how they are listed in a .cpp +file, but will not have an ordering defined if the positional arguments are +defined in multiple .cpp files. The fix for this problem is simply to define +all of your positional arguments in one .cpp file. + +Specifying positional options with hyphens +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Sometimes you may want to specify a value to your positional argument that +starts with a hyphen (for example, searching for '``-foo``' in a file). At +first, you will have trouble doing this, because it will try to find an argument +named '``-foo``', and will fail (and single quotes will not save you). Note +that the system ``grep`` has the same problem: + +:: + + $ spiffygrep '-foo' test.txt + Unknown command line argument '-foo'. Try: spiffygrep -help' + + $ grep '-foo' test.txt + grep: illegal option -- f + grep: illegal option -- o + grep: illegal option -- o + Usage: grep -hblcnsviw pattern file . . . + +The solution for this problem is the same for both your tool and the system +version: use the '``--``' marker. When the user specifies '``--``' on the +command line, it is telling the program that all options after the '``--``' +should be treated as positional arguments, not options. Thus, we can use it +like this: + +:: + + $ spiffygrep -- -foo test.txt + ...output... + +Determining absolute position with getPosition() +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Sometimes an option can affect or modify the meaning of another option. For +example, consider ``gcc``'s ``-x LANG`` option. This tells ``gcc`` to ignore the +suffix of subsequent positional arguments and force the file to be interpreted +as if it contained source code in language ``LANG``. In order to handle this +properly, you need to know the absolute position of each argument, especially +those in lists, so their interaction(s) can be applied correctly. This is also +useful for options like ``-llibname`` which is actually a positional argument +that starts with a dash. + +So, generally, the problem is that you have two ``cl::list`` variables that +interact in some way. To ensure the correct interaction, you can use the +``cl::list::getPosition(optnum)`` method. This method returns the absolute +position (as found on the command line) of the ``optnum`` item in the +``cl::list``. + +The idiom for usage is like this: + +.. code-block:: c++ + + static cl::list Files(cl::Positional, cl::OneOrMore); + static cl::list Libraries("l", cl::ZeroOrMore); + + int main(int argc, char**argv) { + // ... + std::vector::iterator fileIt = Files.begin(); + std::vector::iterator libIt = Libraries.begin(); + unsigned libPos = 0, filePos = 0; + while ( 1 ) { + if ( libIt != Libraries.end() ) + libPos = Libraries.getPosition( libIt - Libraries.begin() ); + else + libPos = 0; + if ( fileIt != Files.end() ) + filePos = Files.getPosition( fileIt - Files.begin() ); + else + filePos = 0; + + if ( filePos != 0 && (libPos == 0 || filePos < libPos) ) { + // Source File Is next + ++fileIt; + } + else if ( libPos != 0 && (filePos == 0 || libPos < filePos) ) { + // Library is next + ++libIt; + } + else + break; // we're done with the list + } + } + +Note that, for compatibility reasons, the ``cl::opt`` also supports an +``unsigned getPosition()`` option that will provide the absolute position of +that option. You can apply the same approach as above with a ``cl::opt`` and a +``cl::list`` option as you can with two lists. + +.. _interpreter style options: +.. _cl::ConsumeAfter: +.. _this section for more information: + +The ``cl::ConsumeAfter`` modifier +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``cl::ConsumeAfter`` `formatting option`_ is used to construct programs that +use "interpreter style" option processing. With this style of option +processing, all arguments specified after the last positional argument are +treated as special interpreter arguments that are not interpreted by the command +line argument. + +As a concrete example, lets say we are developing a replacement for the standard +Unix Bourne shell (``/bin/sh``). To run ``/bin/sh``, first you specify options +to the shell itself (like ``-x`` which turns on trace output), then you specify +the name of the script to run, then you specify arguments to the script. These +arguments to the script are parsed by the Bourne shell command line option +processor, but are not interpreted as options to the shell itself. Using the +CommandLine library, we would specify this as: + +.. code-block:: c++ + + cl::opt Script(cl::Positional, cl::desc(""), cl::init("-")); + cl::list Argv(cl::ConsumeAfter, cl::desc("...")); + cl::opt Trace("x", cl::desc("Enable trace output")); + +which automatically provides the help output: + +:: + + USAGE: spiffysh [options] ... + + OPTIONS: + -help - display available options (-help-hidden for more) + -x - Enable trace output + +At runtime, if we run our new shell replacement as ```spiffysh -x test.sh -a -x +-y bar``', the ``Trace`` variable will be set to true, the ``Script`` variable +will be set to "``test.sh``", and the ``Argv`` list will contain ``["-a", "-x", +"-y", "bar"]``, because they were specified after the last positional argument +(which is the script name). + +There are several limitations to when ``cl::ConsumeAfter`` options can be +specified. For example, only one ``cl::ConsumeAfter`` can be specified per +program, there must be at least one `positional argument`_ specified, there must +not be any `cl::list`_ positional arguments, and the ``cl::ConsumeAfter`` option +should be a `cl::list`_ option. + +.. _can be changed: +.. _Internal vs External Storage: + +Internal vs External Storage +---------------------------- + +By default, all command line options automatically hold the value that they +parse from the command line. This is very convenient in the common case, +especially when combined with the ability to define command line options in the +files that use them. This is called the internal storage model. + +Sometimes, however, it is nice to separate the command line option processing +code from the storage of the value parsed. For example, lets say that we have a +'``-debug``' option that we would like to use to enable debug information across +the entire body of our program. In this case, the boolean value controlling the +debug code should be globally accessible (in a header file, for example) yet the +command line option processing code should not be exposed to all of these +clients (requiring lots of .cpp files to ``#include CommandLine.h``). + +To do this, set up your .h file with your option, like this for example: + +.. code-block:: c++ + + // DebugFlag.h - Get access to the '-debug' command line option + // + + // DebugFlag - This boolean is set to true if the '-debug' command line option + // is specified. This should probably not be referenced directly, instead, use + // the DEBUG macro below. + // + extern bool DebugFlag; + + // DEBUG macro - This macro should be used by code to emit debug information. + // In the '-debug' option is specified on the command line, and if this is a + // debug build, then the code specified as the option to the macro will be + // executed. Otherwise it will not be. + #ifdef NDEBUG + #define DEBUG(X) + #else + #define DEBUG(X) do { if (DebugFlag) { X; } } while (0) + #endif + +This allows clients to blissfully use the ``DEBUG()`` macro, or the +``DebugFlag`` explicitly if they want to. Now we just need to be able to set +the ``DebugFlag`` boolean when the option is set. To do this, we pass an +additional argument to our command line argument processor, and we specify where +to fill in with the `cl::location`_ attribute: + +.. code-block:: c++ + + bool DebugFlag; // the actual value + static cl::opt // The parser + Debug("debug", cl::desc("Enable debug output"), cl::Hidden, cl::location(DebugFlag)); + +In the above example, we specify "``true``" as the second argument to the +`cl::opt`_ template, indicating that the template should not maintain a copy of +the value itself. In addition to this, we specify the `cl::location`_ +attribute, so that ``DebugFlag`` is automatically set. + +Option Attributes +----------------- + +This section describes the basic attributes that you can specify on options. + +* The option name attribute (which is required for all options, except + `positional options`_) specifies what the option name is. This option is + specified in simple double quotes: + + .. code-block:: c++ + + cl::opt Quiet("quiet"); + +.. _cl::desc(...): + +* The **cl::desc** attribute specifies a description for the option to be + shown in the ``-help`` output for the program. This attribute supports + multi-line descriptions with lines separated by '\n'. + +.. _cl::value_desc: + +* The **cl::value_desc** attribute specifies a string that can be used to + fine tune the ``-help`` output for a command line option. Look `here`_ for an + example. + +.. _cl::init: + +* The **cl::init** attribute specifies an initial value for a `scalar`_ + option. If this attribute is not specified then the command line option value + defaults to the value created by the default constructor for the + type. + + .. warning:: + + If you specify both **cl::init** and **cl::location** for an option, you + must specify **cl::location** first, so that when the command-line parser + sees **cl::init**, it knows where to put the initial value. (You will get an + error at runtime if you don't put them in the right order.) + +.. _cl::location: + +* The **cl::location** attribute where to store the value for a parsed command + line option if using external storage. See the section on `Internal vs + External Storage`_ for more information. + +.. _cl::aliasopt: + +* The **cl::aliasopt** attribute specifies which option a `cl::alias`_ option is + an alias for. + +.. _cl::values: + +* The **cl::values** attribute specifies the string-to-value mapping to be used + by the generic parser. It takes a **clEnumValEnd terminated** list of + (option, value, description) triplets that specify the option name, the value + mapped to, and the description shown in the ``-help`` for the tool. Because + the generic parser is used most frequently with enum values, two macros are + often useful: + + #. The **clEnumVal** macro is used as a nice simple way to specify a triplet + for an enum. This macro automatically makes the option name be the same as + the enum name. The first option to the macro is the enum, the second is + the description for the command line option. + + #. The **clEnumValN** macro is used to specify macro options where the option + name doesn't equal the enum name. For this macro, the first argument is + the enum value, the second is the flag name, and the second is the + description. + + You will get a compile time error if you try to use cl::values with a parser + that does not support it. + +.. _cl::multi_val: + +* The **cl::multi_val** attribute specifies that this option takes has multiple + values (example: ``-sectalign segname sectname sectvalue``). This attribute + takes one unsigned argument - the number of values for the option. This + attribute is valid only on ``cl::list`` options (and will fail with compile + error if you try to use it with other option types). It is allowed to use all + of the usual modifiers on multi-valued options (besides + ``cl::ValueDisallowed``, obviously). + +.. _cl::cat: + +* The **cl::cat** attribute specifies the option category that the option + belongs to. The category should be a `cl::OptionCategory`_ object. + +Option Modifiers +---------------- + +Option modifiers are the flags and expressions that you pass into the +constructors for `cl::opt`_ and `cl::list`_. These modifiers give you the +ability to tweak how options are parsed and how ``-help`` output is generated to +fit your application well. + +These options fall into five main categories: + +#. Hiding an option from ``-help`` output + +#. Controlling the number of occurrences required and allowed + +#. Controlling whether or not a value must be specified + +#. Controlling other formatting options + +#. Miscellaneous option modifiers + +It is not possible to specify two options from the same category (you'll get a +runtime error) to a single option, except for options in the miscellaneous +category. The CommandLine library specifies defaults for all of these settings +that are the most useful in practice and the most common, which mean that you +usually shouldn't have to worry about these. + +Hiding an option from ``-help`` output +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``cl::NotHidden``, ``cl::Hidden``, and ``cl::ReallyHidden`` modifiers are +used to control whether or not an option appears in the ``-help`` and +``-help-hidden`` output for the compiled program: + +.. _cl::NotHidden: + +* The **cl::NotHidden** modifier (which is the default for `cl::opt`_ and + `cl::list`_ options) indicates the option is to appear in both help + listings. + +.. _cl::Hidden: + +* The **cl::Hidden** modifier (which is the default for `cl::alias`_ options) + indicates that the option should not appear in the ``-help`` output, but + should appear in the ``-help-hidden`` output. + +.. _cl::ReallyHidden: + +* The **cl::ReallyHidden** modifier indicates that the option should not appear + in any help output. + +Controlling the number of occurrences required and allowed +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This group of options is used to control how many time an option is allowed (or +required) to be specified on the command line of your program. Specifying a +value for this setting allows the CommandLine library to do error checking for +you. + +The allowed values for this option group are: + +.. _cl::Optional: + +* The **cl::Optional** modifier (which is the default for the `cl::opt`_ and + `cl::alias`_ classes) indicates that your program will allow either zero or + one occurrence of the option to be specified. + +.. _cl::ZeroOrMore: + +* The **cl::ZeroOrMore** modifier (which is the default for the `cl::list`_ + class) indicates that your program will allow the option to be specified zero + or more times. + +.. _cl::Required: + +* The **cl::Required** modifier indicates that the specified option must be + specified exactly one time. + +.. _cl::OneOrMore: + +* The **cl::OneOrMore** modifier indicates that the option must be specified at + least one time. + +* The **cl::ConsumeAfter** modifier is described in the `Positional arguments + section`_. + +If an option is not specified, then the value of the option is equal to the +value specified by the `cl::init`_ attribute. If the ``cl::init`` attribute is +not specified, the option value is initialized with the default constructor for +the data type. + +If an option is specified multiple times for an option of the `cl::opt`_ class, +only the last value will be retained. + +Controlling whether or not a value must be specified +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This group of options is used to control whether or not the option allows a +value to be present. In the case of the CommandLine library, a value is either +specified with an equal sign (e.g. '``-index-depth=17``') or as a trailing +string (e.g. '``-o a.out``'). + +The allowed values for this option group are: + +.. _cl::ValueOptional: + +* The **cl::ValueOptional** modifier (which is the default for ``bool`` typed + options) specifies that it is acceptable to have a value, or not. A boolean + argument can be enabled just by appearing on the command line, or it can have + an explicit '``-foo=true``'. If an option is specified with this mode, it is + illegal for the value to be provided without the equal sign. Therefore + '``-foo true``' is illegal. To get this behavior, you must use + the `cl::ValueRequired`_ modifier. + +.. _cl::ValueRequired: + +* The **cl::ValueRequired** modifier (which is the default for all other types + except for `unnamed alternatives using the generic parser`_) specifies that a + value must be provided. This mode informs the command line library that if an + option is not provides with an equal sign, that the next argument provided + must be the value. This allows things like '``-o a.out``' to work. + +.. _cl::ValueDisallowed: + +* The **cl::ValueDisallowed** modifier (which is the default for `unnamed + alternatives using the generic parser`_) indicates that it is a runtime error + for the user to specify a value. This can be provided to disallow users from + providing options to boolean options (like '``-foo=true``'). + +In general, the default values for this option group work just like you would +want them to. As mentioned above, you can specify the `cl::ValueDisallowed`_ +modifier to a boolean argument to restrict your command line parser. These +options are mostly useful when `extending the library`_. + +.. _formatting option: + +Controlling other formatting options +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The formatting option group is used to specify that the command line option has +special abilities and is otherwise different from other command line arguments. +As usual, you can only specify one of these arguments at most. + +.. _cl::NormalFormatting: + +* The **cl::NormalFormatting** modifier (which is the default all options) + specifies that this option is "normal". + +.. _cl::Positional: + +* The **cl::Positional** modifier specifies that this is a positional argument + that does not have a command line option associated with it. See the + `Positional Arguments`_ section for more information. + +* The **cl::ConsumeAfter** modifier specifies that this option is used to + capture "interpreter style" arguments. See `this section for more + information`_. + +.. _prefix: +.. _cl::Prefix: + +* The **cl::Prefix** modifier specifies that this option prefixes its value. + With 'Prefix' options, the equal sign does not separate the value from the + option name specified. Instead, the value is everything after the prefix, + including any equal sign if present. This is useful for processing odd + arguments like ``-lmalloc`` and ``-L/usr/lib`` in a linker tool or + ``-DNAME=value`` in a compiler tool. Here, the '``l``', '``D``' and '``L``' + options are normal string (or list) options, that have the **cl::Prefix** + modifier added to allow the CommandLine library to recognize them. Note that + **cl::Prefix** options must not have the **cl::ValueDisallowed** modifier + specified. + +.. _grouping: +.. _cl::Grouping: + +* The **cl::Grouping** modifier is used to implement Unix-style tools (like + ``ls``) that have lots of single letter arguments, but only require a single + dash. For example, the '``ls -labF``' command actually enables four different + options, all of which are single letters. Note that **cl::Grouping** options + cannot have values. + +The CommandLine library does not restrict how you use the **cl::Prefix** or +**cl::Grouping** modifiers, but it is possible to specify ambiguous argument +settings. Thus, it is possible to have multiple letter options that are prefix +or grouping options, and they will still work as designed. + +To do this, the CommandLine library uses a greedy algorithm to parse the input +option into (potentially multiple) prefix and grouping options. The strategy +basically looks like this: + +:: + + parse(string OrigInput) { + + 1. string input = OrigInput; + 2. if (isOption(input)) return getOption(input).parse(); // Normal option + 3. while (!isOption(input) && !input.empty()) input.pop_back(); // Remove the last letter + 4. if (input.empty()) return error(); // No matching option + 5. if (getOption(input).isPrefix()) + return getOption(input).parse(input); + 6. while (!input.empty()) { // Must be grouping options + getOption(input).parse(); + OrigInput.erase(OrigInput.begin(), OrigInput.begin()+input.length()); + input = OrigInput; + while (!isOption(input) && !input.empty()) input.pop_back(); + } + 7. if (!OrigInput.empty()) error(); + + } + +Miscellaneous option modifiers +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The miscellaneous option modifiers are the only flags where you can specify more +than one flag from the set: they are not mutually exclusive. These flags +specify boolean properties that modify the option. + +.. _cl::CommaSeparated: + +* The **cl::CommaSeparated** modifier indicates that any commas specified for an + option's value should be used to split the value up into multiple values for + the option. For example, these two options are equivalent when + ``cl::CommaSeparated`` is specified: "``-foo=a -foo=b -foo=c``" and + "``-foo=a,b,c``". This option only makes sense to be used in a case where the + option is allowed to accept one or more values (i.e. it is a `cl::list`_ + option). + +.. _cl::PositionalEatsArgs: + +* The **cl::PositionalEatsArgs** modifier (which only applies to positional + arguments, and only makes sense for lists) indicates that positional argument + should consume any strings after it (including strings that start with a "-") + up until another recognized positional argument. For example, if you have two + "eating" positional arguments, "``pos1``" and "``pos2``", the string "``-pos1 + -foo -bar baz -pos2 -bork``" would cause the "``-foo -bar -baz``" strings to + be applied to the "``-pos1``" option and the "``-bork``" string to be applied + to the "``-pos2``" option. + +.. _cl::Sink: + +* The **cl::Sink** modifier is used to handle unknown options. If there is at + least one option with ``cl::Sink`` modifier specified, the parser passes + unrecognized option strings to it as values instead of signaling an error. As + with ``cl::CommaSeparated``, this modifier only makes sense with a `cl::list`_ + option. + +So far, these are the only three miscellaneous option modifiers. + +.. _response files: + +Response files +^^^^^^^^^^^^^^ + +Some systems, such as certain variants of Microsoft Windows and some older +Unices have a relatively low limit on command-line length. It is therefore +customary to use the so-called 'response files' to circumvent this +restriction. These files are mentioned on the command-line (using the "@file") +syntax. The program reads these files and inserts the contents into argv, +thereby working around the command-line length limits. Response files are +enabled by an optional fourth argument to `cl::ParseEnvironmentOptions`_ and +`cl::ParseCommandLineOptions`_. + +Top-Level Classes and Functions +------------------------------- + +Despite all of the built-in flexibility, the CommandLine option library really +only consists of one function `cl::ParseCommandLineOptions`_) and three main +classes: `cl::opt`_, `cl::list`_, and `cl::alias`_. This section describes +these three classes in detail. + +.. _cl::getRegisteredOptions: + +The ``cl::getRegisteredOptions`` function +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``cl::getRegisteredOptions`` function is designed to give a programmer +access to declared non positional command line options so that how they appear +in ``-help`` can be modified prior to calling `cl::ParseCommandLineOptions`_. +Note this method should not be called during any static initialisation because +it cannot be guaranteed that all options will have been initialised. Hence it +should be called from ``main``. + +This function can be used to gain access to options declared in libraries that +the tool writter may not have direct access to. + +The function retrieves a :ref:`StringMap ` that maps the option +string (e.g. ``-help``) to an ``Option*``. + +Here is an example of how the function could be used: + +.. code-block:: c++ + + using namespace llvm; + int main(int argc, char **argv) { + cl::OptionCategory AnotherCategory("Some options"); + + StringMap Map; + cl::getRegisteredOptions(Map); + + //Unhide useful option and put it in a different category + assert(Map.count("print-all-options") > 0); + Map["print-all-options"]->setHiddenFlag(cl::NotHidden); + Map["print-all-options"]->setCategory(AnotherCategory); + + //Hide an option we don't want to see + assert(Map.count("enable-no-infs-fp-math") > 0); + Map["enable-no-infs-fp-math"]->setHiddenFlag(cl::Hidden); + + //Change --version to --show-version + assert(Map.count("version") > 0); + Map["version"]->setArgStr("show-version"); + + //Change --help description + assert(Map.count("help") > 0); + Map["help"]->setDescription("Shows help"); + + cl::ParseCommandLineOptions(argc, argv, "This is a small program to demo the LLVM CommandLine API"); + ... + } + + +.. _cl::ParseCommandLineOptions: + +The ``cl::ParseCommandLineOptions`` function +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``cl::ParseCommandLineOptions`` function is designed to be called directly +from ``main``, and is used to fill in the values of all of the command line +option variables once ``argc`` and ``argv`` are available. + +The ``cl::ParseCommandLineOptions`` function requires two parameters (``argc`` +and ``argv``), but may also take an optional third parameter which holds +`additional extra text`_ to emit when the ``-help`` option is invoked, and a +fourth boolean parameter that enables `response files`_. + +.. _cl::ParseEnvironmentOptions: + +The ``cl::ParseEnvironmentOptions`` function +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``cl::ParseEnvironmentOptions`` function has mostly the same effects as +`cl::ParseCommandLineOptions`_, except that it is designed to take values for +options from an environment variable, for those cases in which reading the +command line is not convenient or desired. It fills in the values of all the +command line option variables just like `cl::ParseCommandLineOptions`_ does. + +It takes four parameters: the name of the program (since ``argv`` may not be +available, it can't just look in ``argv[0]``), the name of the environment +variable to examine, the optional `additional extra text`_ to emit when the +``-help`` option is invoked, and the boolean switch that controls whether +`response files`_ should be read. + +``cl::ParseEnvironmentOptions`` will break the environment variable's value up +into words and then process them using `cl::ParseCommandLineOptions`_. +**Note:** Currently ``cl::ParseEnvironmentOptions`` does not support quoting, so +an environment variable containing ``-option "foo bar"`` will be parsed as three +words, ``-option``, ``"foo``, and ``bar"``, which is different from what you +would get from the shell with the same input. + +The ``cl::SetVersionPrinter`` function +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``cl::SetVersionPrinter`` function is designed to be called directly from +``main`` and *before* ``cl::ParseCommandLineOptions``. Its use is optional. It +simply arranges for a function to be called in response to the ``--version`` +option instead of having the ``CommandLine`` library print out the usual version +string for LLVM. This is useful for programs that are not part of LLVM but wish +to use the ``CommandLine`` facilities. Such programs should just define a small +function that takes no arguments and returns ``void`` and that prints out +whatever version information is appropriate for the program. Pass the address of +that function to ``cl::SetVersionPrinter`` to arrange for it to be called when +the ``--version`` option is given by the user. + +.. _cl::opt: +.. _scalar: + +The ``cl::opt`` class +^^^^^^^^^^^^^^^^^^^^^ + +The ``cl::opt`` class is the class used to represent scalar command line +options, and is the one used most of the time. It is a templated class which +can take up to three arguments (all except for the first have default values +though): + +.. code-block:: c++ + + namespace cl { + template > + class opt; + } + +The first template argument specifies what underlying data type the command line +argument is, and is used to select a default parser implementation. The second +template argument is used to specify whether the option should contain the +storage for the option (the default) or whether external storage should be used +to contain the value parsed for the option (see `Internal vs External Storage`_ +for more information). + +The third template argument specifies which parser to use. The default value +selects an instantiation of the ``parser`` class based on the underlying data +type of the option. In general, this default works well for most applications, +so this option is only used when using a `custom parser`_. + +.. _lists of arguments: +.. _cl::list: + +The ``cl::list`` class +^^^^^^^^^^^^^^^^^^^^^^ + +The ``cl::list`` class is the class used to represent a list of command line +options. It too is a templated class which can take up to three arguments: + +.. code-block:: c++ + + namespace cl { + template > + class list; + } + +This class works the exact same as the `cl::opt`_ class, except that the second +argument is the **type** of the external storage, not a boolean value. For this +class, the marker type '``bool``' is used to indicate that internal storage +should be used. + +.. _cl::bits: + +The ``cl::bits`` class +^^^^^^^^^^^^^^^^^^^^^^ + +The ``cl::bits`` class is the class used to represent a list of command line +options in the form of a bit vector. It is also a templated class which can +take up to three arguments: + +.. code-block:: c++ + + namespace cl { + template > + class bits; + } + +This class works the exact same as the `cl::list`_ class, except that the second +argument must be of **type** ``unsigned`` if external storage is used. + +.. _cl::alias: + +The ``cl::alias`` class +^^^^^^^^^^^^^^^^^^^^^^^ + +The ``cl::alias`` class is a nontemplated class that is used to form aliases for +other arguments. + +.. code-block:: c++ + + namespace cl { + class alias; + } + +The `cl::aliasopt`_ attribute should be used to specify which option this is an +alias for. Alias arguments default to being `cl::Hidden`_, and use the aliased +options parser to do the conversion from string to data. + +.. _cl::extrahelp: + +The ``cl::extrahelp`` class +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``cl::extrahelp`` class is a nontemplated class that allows extra help text +to be printed out for the ``-help`` option. + +.. code-block:: c++ + + namespace cl { + struct extrahelp; + } + +To use the extrahelp, simply construct one with a ``const char*`` parameter to +the constructor. The text passed to the constructor will be printed at the +bottom of the help message, verbatim. Note that multiple ``cl::extrahelp`` +**can** be used, but this practice is discouraged. If your tool needs to print +additional help information, put all that help into a single ``cl::extrahelp`` +instance. + +For example: + +.. code-block:: c++ + + cl::extrahelp("\nADDITIONAL HELP:\n\n This is the extra help\n"); + +.. _cl::OptionCategory: + +The ``cl::OptionCategory`` class +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``cl::OptionCategory`` class is a simple class for declaring +option categories. + +.. code-block:: c++ + + namespace cl { + class OptionCategory; + } + +An option category must have a name and optionally a description which are +passed to the constructor as ``const char*``. + +Note that declaring an option category and associating it with an option before +parsing options (e.g. statically) will change the output of ``-help`` from +uncategorized to categorized. If an option category is declared but not +associated with an option then it will be hidden from the output of ``-help`` +but will be shown in the output of ``-help-hidden``. + +.. _different parser: +.. _discussed previously: + +Builtin parsers +--------------- + +Parsers control how the string value taken from the command line is translated +into a typed value, suitable for use in a C++ program. By default, the +CommandLine library uses an instance of ``parser`` if the command line +option specifies that it uses values of type '``type``'. Because of this, +custom option processing is specified with specializations of the '``parser``' +class. + +The CommandLine library provides the following builtin parser specializations, +which are sufficient for most applications. It can, however, also be extended to +work with new data types and new ways of interpreting the same data. See the +`Writing a Custom Parser`_ for more details on this type of library extension. + +.. _enums: +.. _cl::parser: + +* The generic ``parser`` parser can be used to map strings values to any data + type, through the use of the `cl::values`_ property, which specifies the + mapping information. The most common use of this parser is for parsing enum + values, which allows you to use the CommandLine library for all of the error + checking to make sure that only valid enum values are specified (as opposed to + accepting arbitrary strings). Despite this, however, the generic parser class + can be used for any data type. + +.. _boolean flags: +.. _bool parser: + +* The **parser specialization** is used to convert boolean strings to a + boolean value. Currently accepted strings are "``true``", "``TRUE``", + "``True``", "``1``", "``false``", "``FALSE``", "``False``", and "``0``". + +* The **parser specialization** is used for cases where the value + is boolean, but we also need to know whether the option was specified at all. + boolOrDefault is an enum with 3 values, BOU_UNSET, BOU_TRUE and BOU_FALSE. + This parser accepts the same strings as **``parser``**. + +.. _strings: + +* The **parser specialization** simply stores the parsed string into the + string value specified. No conversion or modification of the data is + performed. + +.. _integers: +.. _int: + +* The **parser specialization** uses the C ``strtol`` function to parse the + string input. As such, it will accept a decimal number (with an optional '+' + or '-' prefix) which must start with a non-zero digit. It accepts octal + numbers, which are identified with a '``0``' prefix digit, and hexadecimal + numbers with a prefix of '``0x``' or '``0X``'. + +.. _doubles: +.. _float: +.. _double: + +* The **parser** and **parser specializations** use the standard + C ``strtod`` function to convert floating point strings into floating point + values. As such, a broad range of string formats is supported, including + exponential notation (ex: ``1.7e15``) and properly supports locales. + +.. _Extension Guide: +.. _extending the library: + +Extension Guide +=============== + +Although the CommandLine library has a lot of functionality built into it +already (as discussed previously), one of its true strengths lie in its +extensibility. This section discusses how the CommandLine library works under +the covers and illustrates how to do some simple, common, extensions. + +.. _Custom parsers: +.. _custom parser: +.. _Writing a Custom Parser: + +Writing a custom parser +----------------------- + +One of the simplest and most common extensions is the use of a custom parser. +As `discussed previously`_, parsers are the portion of the CommandLine library +that turns string input from the user into a particular parsed data type, +validating the input in the process. + +There are two ways to use a new parser: + +#. Specialize the `cl::parser`_ template for your custom data type. + + This approach has the advantage that users of your custom data type will + automatically use your custom parser whenever they define an option with a + value type of your data type. The disadvantage of this approach is that it + doesn't work if your fundamental data type is something that is already + supported. + +#. Write an independent class, using it explicitly from options that need it. + + This approach works well in situations where you would line to parse an + option using special syntax for a not-very-special data-type. The drawback + of this approach is that users of your parser have to be aware that they are + using your parser instead of the builtin ones. + +To guide the discussion, we will discuss a custom parser that accepts file +sizes, specified with an optional unit after the numeric size. For example, we +would like to parse "102kb", "41M", "1G" into the appropriate integer value. In +this case, the underlying data type we want to parse into is '``unsigned``'. We +choose approach #2 above because we don't want to make this the default for all +``unsigned`` options. + +To start out, we declare our new ``FileSizeParser`` class: + +.. code-block:: c++ + + struct FileSizeParser : public cl::basic_parser { + // parse - Return true on error. + bool parse(cl::Option &O, const char *ArgName, const std::string &ArgValue, + unsigned &Val); + }; + +Our new class inherits from the ``cl::basic_parser`` template class to fill in +the default, boiler plate code for us. We give it the data type that we parse +into, the last argument to the ``parse`` method, so that clients of our custom +parser know what object type to pass in to the parse method. (Here we declare +that we parse into '``unsigned``' variables.) + +For most purposes, the only method that must be implemented in a custom parser +is the ``parse`` method. The ``parse`` method is called whenever the option is +invoked, passing in the option itself, the option name, the string to parse, and +a reference to a return value. If the string to parse is not well-formed, the +parser should output an error message and return true. Otherwise it should +return false and set '``Val``' to the parsed value. In our example, we +implement ``parse`` as: + +.. code-block:: c++ + + bool FileSizeParser::parse(cl::Option &O, const char *ArgName, + const std::string &Arg, unsigned &Val) { + const char *ArgStart = Arg.c_str(); + char *End; + + // Parse integer part, leaving 'End' pointing to the first non-integer char + Val = (unsigned)strtol(ArgStart, &End, 0); + + while (1) { + switch (*End++) { + case 0: return false; // No error + case 'i': // Ignore the 'i' in KiB if people use that + case 'b': case 'B': // Ignore B suffix + break; + + case 'g': case 'G': Val *= 1024*1024*1024; break; + case 'm': case 'M': Val *= 1024*1024; break; + case 'k': case 'K': Val *= 1024; break; + + default: + // Print an error message if unrecognized character! + return O.error("'" + Arg + "' value invalid for file size argument!"); + } + } + } + +This function implements a very simple parser for the kinds of strings we are +interested in. Although it has some holes (it allows "``123KKK``" for example), +it is good enough for this example. Note that we use the option itself to print +out the error message (the ``error`` method always returns true) in order to get +a nice error message (shown below). Now that we have our parser class, we can +use it like this: + +.. code-block:: c++ + + static cl::opt + MFS("max-file-size", cl::desc("Maximum file size to accept"), + cl::value_desc("size")); + +Which adds this to the output of our program: + +:: + + OPTIONS: + -help - display available options (-help-hidden for more) + ... + -max-file-size= - Maximum file size to accept + +And we can test that our parse works correctly now (the test program just prints +out the max-file-size argument value): + +:: + + $ ./test + MFS: 0 + $ ./test -max-file-size=123MB + MFS: 128974848 + $ ./test -max-file-size=3G + MFS: 3221225472 + $ ./test -max-file-size=dog + -max-file-size option: 'dog' value invalid for file size argument! + +It looks like it works. The error message that we get is nice and helpful, and +we seem to accept reasonable file sizes. This wraps up the "custom parser" +tutorial. + +Exploiting external storage +--------------------------- + +Several of the LLVM libraries define static ``cl::opt`` instances that will +automatically be included in any program that links with that library. This is +a feature. However, sometimes it is necessary to know the value of the command +line option outside of the library. In these cases the library does or should +provide an external storage location that is accessible to users of the +library. Examples of this include the ``llvm::DebugFlag`` exported by the +``lib/Support/Debug.cpp`` file and the ``llvm::TimePassesIsEnabled`` flag +exported by the ``lib/VMCore/PassManager.cpp`` file. + +.. todo:: + + TODO: complete this section + +.. _dynamically loaded options: + +Dynamically adding command line options + +.. todo:: + + TODO: fill in this section diff --git a/docs/CompilerWriterInfo.rst b/docs/CompilerWriterInfo.rst new file mode 100644 index 00000000..7b02a787 --- /dev/null +++ b/docs/CompilerWriterInfo.rst @@ -0,0 +1,155 @@ +======================================================== +Architecture & Platform Information for Compiler Writers +======================================================== + +.. contents:: + :local: + +.. note:: + + This document is a work-in-progress. Additions and clarifications are + welcome. + +Hardware +======== + +ARM +--- + +* `ARM documentation `_ (`Processor Cores `_ Cores) + +* `ABI `_ + +* `ABI Addenda and Errata `_ + +* `ARM C Language Extensions `_ + +AArch64 +------- + +* `ARMv8 Instruction Set Overview `_ + +* `ARM C Language Extensions `_ + +Itanium (ia64) +-------------- + +* `Itanium documentation `_ + +MIPS +---- + +* `MIPS Processor Architecture `_ + +PowerPC +------- + +IBM - Official manuals and docs +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* `Power Instruction Set Architecture, Versions 2.03 through 2.06 (authentication required, free sign-up) `_ + +* `PowerPC Compiler Writer's Guide `_ + +* `Intro to PowerPC Architecture `_ + +* `PowerPC Processor Manuals (embedded) `_ + +* `Various IBM specifications and white papers `_ + +* `IBM AIX/5L for POWER Assembly Reference `_ + +Other documents, collections, notes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* `PowerPC ABI documents `_ +* `PowerPC64 alignment of long doubles (from GCC) `_ +* `Long branch stubs for powerpc64-linux (from binutils) `_ + +R600 +---- + +* `AMD R6xx shader ISA `_ +* `AMD R7xx shader ISA `_ +* `AMD Evergreen shader ISA `_ +* `AMD Cayman/Trinity shader ISA `_ +* `AMD Southern Islands Series ISA `_ +* `AMD GPU Programming Guide `_ +* `AMD Compute Resources `_ + +SPARC +----- + +* `SPARC resources `_ +* `SPARC standards `_ + +SystemZ +------- + +* `z/Architecture Principles of Operation (registration required, free sign-up) `_ + +X86 +--- + +AMD - Official manuals and docs +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* `AMD processor manuals `_ +* `X86-64 ABI `_ + +Intel - Official manuals and docs +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* `Intel 64 and IA-32 manuals `_ +* `Intel Itanium documentation `_ + +Other x86-specific information +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* `Calling conventions for different C++ compilers and operating systems `_ + +Other relevant lists +-------------------- + +* `GCC reading list `_ + +ABI +=== + +* `System V Application Binary Interface `_ +* `Itanium C++ ABI `_ + +Linux +----- + +* `PowerPC 64-bit ELF ABI Supplement `_ +* `Procedure Call Standard for the AArch64 Architecture `_ +* `ELF for the ARM Architecture `_ +* `ELF for the ARM 64-bit Architecture (AArch64) `_ +* `System z ELF ABI Supplement `_ + +OS X +---- + +* `Mach-O Runtime Architecture `_ +* `Notes on Mach-O ABI `_ + +Windows +------- + +* `Microsoft PE/COFF Specification `_ + +NVPTX +===== + +* `CUDA Documentation `_ includes the PTX + ISA and Driver API documentation + +Miscellaneous Resources +======================= + +* `Executable File Format library `_ + +* `GCC prefetch project `_ page has a + good survey of the prefetching capabilities of a variety of modern + processors. diff --git a/docs/DebuggingJITedCode.rst b/docs/DebuggingJITedCode.rst new file mode 100644 index 00000000..d6101d51 --- /dev/null +++ b/docs/DebuggingJITedCode.rst @@ -0,0 +1,143 @@ +============================== +Debugging JIT-ed Code With GDB +============================== + +Background +========== + +Without special runtime support, debugging dynamically generated code with +GDB (as well as most debuggers) can be quite painful. Debuggers generally +read debug information from the object file of the code, but for JITed +code, there is no such file to look for. + +In order to communicate the necessary debug info to GDB, an interface for +registering JITed code with debuggers has been designed and implemented for +GDB and LLVM MCJIT. At a high level, whenever MCJIT generates new machine code, +it does so in an in-memory object file that contains the debug information in +DWARF format. MCJIT then adds this in-memory object file to a global list of +dynamically generated object files and calls a special function +(``__jit_debug_register_code``) marked noinline that GDB knows about. When +GDB attaches to a process, it puts a breakpoint in this function and loads all +of the object files in the global list. When MCJIT calls the registration +function, GDB catches the breakpoint signal, loads the new object file from +the inferior's memory, and resumes the execution. In this way, GDB can get the +necessary debug information. + +GDB Version +=========== + +In order to debug code JIT-ed by LLVM, you need GDB 7.0 or newer, which is +available on most modern distributions of Linux. The version of GDB that +Apple ships with Xcode has been frozen at 6.3 for a while. LLDB may be a +better option for debugging JIT-ed code on Mac OS X. + + +Debugging MCJIT-ed code +======================= + +The emerging MCJIT component of LLVM allows full debugging of JIT-ed code with +GDB. This is due to MCJIT's ability to use the MC emitter to provide full +DWARF debugging information to GDB. + +Note that lli has to be passed the ``-use-mcjit`` flag to JIT the code with +MCJIT instead of the old JIT. + +Example +------- + +Consider the following C code (with line numbers added to make the example +easier to follow): + +.. + FIXME: + Sphinx has the ability to automatically number these lines by adding + :linenos: on the line immediately following the `.. code-block:: c`, but + it looks like garbage; the line numbers don't even line up with the + lines. Is this a Sphinx bug, or is it a CSS problem? + +.. code-block:: c + + 1 int compute_factorial(int n) + 2 { + 3 if (n <= 1) + 4 return 1; + 5 + 6 int f = n; + 7 while (--n > 1) + 8 f *= n; + 9 return f; + 10 } + 11 + 12 + 13 int main(int argc, char** argv) + 14 { + 15 if (argc < 2) + 16 return -1; + 17 char firstletter = argv[1][0]; + 18 int result = compute_factorial(firstletter - '0'); + 19 + 20 // Returned result is clipped at 255... + 21 return result; + 22 } + +Here is a sample command line session that shows how to build and run this +code via ``lli`` inside GDB: + +.. code-block:: bash + + $ $BINPATH/clang -cc1 -O0 -g -emit-llvm showdebug.c + $ gdb --quiet --args $BINPATH/lli -use-mcjit showdebug.ll 5 + Reading symbols from $BINPATH/lli...done. + (gdb) b showdebug.c:6 + No source file named showdebug.c. + Make breakpoint pending on future shared library load? (y or [n]) y + Breakpoint 1 (showdebug.c:6) pending. + (gdb) r + Starting program: $BINPATH/lli -use-mcjit showdebug.ll 5 + [Thread debugging using libthread_db enabled] + + Breakpoint 1, compute_factorial (n=5) at showdebug.c:6 + 6 int f = n; + (gdb) p n + $1 = 5 + (gdb) p f + $2 = 0 + (gdb) n + 7 while (--n > 1) + (gdb) p f + $3 = 5 + (gdb) b showdebug.c:9 + Breakpoint 2 at 0x7ffff7ed404c: file showdebug.c, line 9. + (gdb) c + Continuing. + + Breakpoint 2, compute_factorial (n=1) at showdebug.c:9 + 9 return f; + (gdb) p f + $4 = 120 + (gdb) bt + #0 compute_factorial (n=1) at showdebug.c:9 + #1 0x00007ffff7ed40a9 in main (argc=2, argv=0x16677e0) at showdebug.c:18 + #2 0x3500000001652748 in ?? () + #3 0x00000000016677e0 in ?? () + #4 0x0000000000000002 in ?? () + #5 0x0000000000d953b3 in llvm::MCJIT::runFunction (this=0x16151f0, F=0x1603020, ArgValues=...) at /home/ebenders_test/llvm_svn_rw/lib/ExecutionEngine/MCJIT/MCJIT.cpp:161 + #6 0x0000000000dc8872 in llvm::ExecutionEngine::runFunctionAsMain (this=0x16151f0, Fn=0x1603020, argv=..., envp=0x7fffffffe040) + at /home/ebenders_test/llvm_svn_rw/lib/ExecutionEngine/ExecutionEngine.cpp:397 + #7 0x000000000059c583 in main (argc=4, argv=0x7fffffffe018, envp=0x7fffffffe040) at /home/ebenders_test/llvm_svn_rw/tools/lli/lli.cpp:324 + (gdb) finish + Run till exit from #0 compute_factorial (n=1) at showdebug.c:9 + 0x00007ffff7ed40a9 in main (argc=2, argv=0x16677e0) at showdebug.c:18 + 18 int result = compute_factorial(firstletter - '0'); + Value returned is $5 = 120 + (gdb) p result + $6 = 23406408 + (gdb) n + 21 return result; + (gdb) p result + $7 = 120 + (gdb) c + Continuing. + + Program exited with code 0170. + (gdb) diff --git a/docs/DeveloperPolicy.rst b/docs/DeveloperPolicy.rst new file mode 100644 index 00000000..ea5a7d1b --- /dev/null +++ b/docs/DeveloperPolicy.rst @@ -0,0 +1,533 @@ +===================== +LLVM Developer Policy +===================== + +.. contents:: + :local: + +Introduction +============ + +This document contains the LLVM Developer Policy which defines the project's +policy towards developers and their contributions. The intent of this policy is +to eliminate miscommunication, rework, and confusion that might arise from the +distributed nature of LLVM's development. By stating the policy in clear terms, +we hope each developer can know ahead of time what to expect when making LLVM +contributions. This policy covers all llvm.org subprojects, including Clang, +LLDB, libc++, etc. + +This policy is also designed to accomplish the following objectives: + +#. Attract both users and developers to the LLVM project. + +#. Make life as simple and easy for contributors as possible. + +#. Keep the top of Subversion trees as stable as possible. + +#. Establish awareness of the project's :ref:`copyright, license, and patent + policies ` with contributors to the project. + +This policy is aimed at frequent contributors to LLVM. People interested in +contributing one-off patches can do so in an informal way by sending them to the +`llvm-commits mailing list +`_ and engaging another +developer to see it through the process. + +Developer Policies +================== + +This section contains policies that pertain to frequent LLVM developers. We +always welcome `one-off patches`_ from people who do not routinely contribute to +LLVM, but we expect more from frequent contributors to keep the system as +efficient as possible for everyone. Frequent LLVM contributors are expected to +meet the following requirements in order for LLVM to maintain a high standard of +quality. + +Stay Informed +------------- + +Developers should stay informed by reading at least the "dev" mailing list for +the projects you are interested in, such as `llvmdev +`_ for LLVM, `cfe-dev +`_ for Clang, or `lldb-dev +`_ for LLDB. If you are +doing anything more than just casual work on LLVM, it is suggested that you also +subscribe to the "commits" mailing list for the subproject you're interested in, +such as `llvm-commits +`_, `cfe-commits +`_, or `lldb-commits +`_. Reading the +"commits" list and paying attention to changes being made by others is a good +way to see what other people are interested in and watching the flow of the +project as a whole. + +We recommend that active developers register an email account with `LLVM +Bugzilla `_ and preferably subscribe to the `llvm-bugs +`_ email list to keep track +of bugs and enhancements occurring in LLVM. We really appreciate people who are +proactive at catching incoming bugs in their components and dealing with them +promptly. + +Please be aware that all public LLVM mailing lists are public and archived, and +that notices of confidentiality or non-disclosure cannot be respected. + +.. _patch: +.. _one-off patches: + +Making a Patch +-------------- + +When making a patch for review, the goal is to make it as easy for the reviewer +to read it as possible. As such, we recommend that you: + +#. Make your patch against the Subversion trunk, not a branch, and not an old + version of LLVM. This makes it easy to apply the patch. For information on + how to check out SVN trunk, please see the `Getting Started + Guide `_. + +#. Similarly, patches should be submitted soon after they are generated. Old + patches may not apply correctly if the underlying code changes between the + time the patch was created and the time it is applied. + +#. Patches should be made with ``svn diff``, or similar. If you use a + different tool, make sure it uses the ``diff -u`` format and that it + doesn't contain clutter which makes it hard to read. + +#. If you are modifying generated files, such as the top-level ``configure`` + script, please separate out those changes into a separate patch from the rest + of your changes. + +When sending a patch to a mailing list, it is a good idea to send it as an +*attachment* to the message, not embedded into the text of the message. This +ensures that your mailer will not mangle the patch when it sends it (e.g. by +making whitespace changes or by wrapping lines). + +*For Thunderbird users:* Before submitting a patch, please open *Preferences > +Advanced > General > Config Editor*, find the key +``mail.content_disposition_type``, and set its value to ``1``. Without this +setting, Thunderbird sends your attachment using ``Content-Disposition: inline`` +rather than ``Content-Disposition: attachment``. Apple Mail gamely displays such +a file inline, making it difficult to work with for reviewers using that +program. + +When submitting patches, please do not add confidentiality or non-disclosure +notices to the patches themselves. These notices conflict with the `LLVM +License`_ and may result in your contribution being excluded. + +.. _code review: + +Code Reviews +------------ + +LLVM has a code review policy. Code review is one way to increase the quality of +software. We generally follow these policies: + +#. All developers are required to have significant changes reviewed before they + are committed to the repository. + +#. Code reviews are conducted by email, usually on the llvm-commits list. + +#. Code can be reviewed either before it is committed or after. We expect major + changes to be reviewed before being committed, but smaller changes (or + changes where the developer owns the component) can be reviewed after commit. + +#. The developer responsible for a code change is also responsible for making + all necessary review-related changes. + +#. Code review can be an iterative process, which continues until the patch is + ready to be committed. Specifically, once a patch is sent out for review, it + needs an explicit "looks good" before it is submitted. Do not assume silent + approval, or request active objections to the patch with a deadline. + +Sometimes code reviews will take longer than you would hope for, especially for +larger features. Accepted ways to speed up review times for your patches are: + +* Review other people's patches. If you help out, everybody will be more + willing to do the same for you; goodwill is our currency. +* Ping the patch. If it is urgent, provide reasons why it is important to you to + get this patch landed and ping it every couple of days. If it is + not urgent, the common courtesy ping rate is one week. Remember that you're + asking for valuable time from other professional developers. +* Ask for help on IRC. Developers on IRC will be able to either help you + directly, or tell you who might be a good reviewer. +* Split your patch into multiple smaller patches that build on each other. The + smaller your patch, the higher the probability that somebody will take a quick + look at it. + +Developers should participate in code reviews as both reviewers and +reviewees. If someone is kind enough to review your code, you should return the +favor for someone else. Note that anyone is welcome to review and give feedback +on a patch, but only people with Subversion write access can approve it. + +There is a web based code review tool that can optionally be used +for code reviews. See :doc:`Phabricator`. + +Code Owners +----------- + +The LLVM Project relies on two features of its process to maintain rapid +development in addition to the high quality of its source base: the combination +of code review plus post-commit review for trusted maintainers. Having both is +a great way for the project to take advantage of the fact that most people do +the right thing most of the time, and only commit patches without pre-commit +review when they are confident they are right. + +The trick to this is that the project has to guarantee that all patches that are +committed are reviewed after they go in: you don't want everyone to assume +someone else will review it, allowing the patch to go unreviewed. To solve this +problem, we have a notion of an 'owner' for a piece of the code. The sole +responsibility of a code owner is to ensure that a commit to their area of the +code is appropriately reviewed, either by themself or by someone else. The list +of current code owners can be found in the file +`CODE_OWNERS.TXT `_ +in the root of the LLVM source tree. + +Note that code ownership is completely different than reviewers: anyone can +review a piece of code, and we welcome code review from anyone who is +interested. Code owners are the "last line of defense" to guarantee that all +patches that are committed are actually reviewed. + +Being a code owner is a somewhat unglamorous position, but it is incredibly +important for the ongoing success of the project. Because people get busy, +interests change, and unexpected things happen, code ownership is purely opt-in, +and anyone can choose to resign their "title" at any time. For now, we do not +have an official policy on how one gets elected to be a code owner. + +.. _include a testcase: + +Test Cases +---------- + +Developers are required to create test cases for any bugs fixed and any new +features added. Some tips for getting your testcase approved: + +* All feature and regression test cases are added to the ``llvm/test`` + directory. The appropriate sub-directory should be selected (see the + :doc:`Testing Guide ` for details). + +* Test cases should be written in `LLVM assembly language `_ + unless the feature or regression being tested requires another language + (e.g. the bug being fixed or feature being implemented is in the llvm-gcc C++ + front-end, in which case it must be written in C++). + +* Test cases, especially for regressions, should be reduced as much as possible, + by `bugpoint `_ or manually. It is unacceptable to place an + entire failing program into ``llvm/test`` as this creates a *time-to-test* + burden on all developers. Please keep them short. + +Note that llvm/test and clang/test are designed for regression and small feature +tests only. More extensive test cases (e.g., entire applications, benchmarks, +etc) should be added to the ``llvm-test`` test suite. The llvm-test suite is +for coverage (correctness, performance, etc) testing, not feature or regression +testing. + +Quality +------- + +The minimum quality standards that any change must satisfy before being +committed to the main development branch are: + +#. Code must adhere to the `LLVM Coding Standards `_. + +#. Code must compile cleanly (no errors, no warnings) on at least one platform. + +#. Bug fixes and new features should `include a testcase`_ so we know if the + fix/feature ever regresses in the future. + +#. Code must pass the ``llvm/test`` test suite. + +#. The code must not cause regressions on a reasonable subset of llvm-test, + where "reasonable" depends on the contributor's judgement and the scope of + the change (more invasive changes require more testing). A reasonable subset + might be something like "``llvm-test/MultiSource/Benchmarks``". + +Additionally, the committer is responsible for addressing any problems found in +the future that the change is responsible for. For example: + +* The code should compile cleanly on all supported platforms. + +* The changes should not cause any correctness regressions in the ``llvm-test`` + suite and must not cause any major performance regressions. + +* The change set should not cause performance or correctness regressions for the + LLVM tools. + +* The changes should not cause performance or correctness regressions in code + compiled by LLVM on all applicable targets. + +* You are expected to address any `Bugzilla bugs `_ that + result from your change. + +We prefer for this to be handled before submission but understand that it isn't +possible to test all of this for every submission. Our build bots and nightly +testing infrastructure normally finds these problems. A good rule of thumb is +to check the nightly testers for regressions the day after your change. Build +bots will directly email you if a group of commits that included yours caused a +failure. You are expected to check the build bot messages to see if they are +your fault and, if so, fix the breakage. + +Commits that violate these quality standards (e.g. are very broken) may be +reverted. This is necessary when the change blocks other developers from making +progress. The developer is welcome to re-commit the change after the problem has +been fixed. + +Obtaining Commit Access +----------------------- + +We grant commit access to contributors with a track record of submitting high +quality patches. If you would like commit access, please send an email to +`Chris `_ with the following information: + +#. The user name you want to commit with, e.g. "hacker". + +#. The full name and email address you want message to llvm-commits to come + from, e.g. "J. Random Hacker ". + +#. A "password hash" of the password you want to use, e.g. "``2ACR96qjUqsyM``". + Note that you don't ever tell us what your password is; you just give it to + us in an encrypted form. To get this, run "``htpasswd``" (a utility that + comes with apache) in crypt mode (often enabled with "``-d``"), or find a web + page that will do it for you. + +Once you've been granted commit access, you should be able to check out an LLVM +tree with an SVN URL of "https://username@llvm.org/..." instead of the normal +anonymous URL of "http://llvm.org/...". The first time you commit you'll have +to type in your password. Note that you may get a warning from SVN about an +untrusted key; you can ignore this. To verify that your commit access works, +please do a test commit (e.g. change a comment or add a blank line). Your first +commit to a repository may require the autogenerated email to be approved by a +mailing list. This is normal and will be done when the mailing list owner has +time. + +If you have recently been granted commit access, these policies apply: + +#. You are granted *commit-after-approval* to all parts of LLVM. To get + approval, submit a `patch`_ to `llvm-commits + `_. When approved, + you may commit it yourself. + +#. You are allowed to commit patches without approval which you think are + obvious. This is clearly a subjective decision --- we simply expect you to + use good judgement. Examples include: fixing build breakage, reverting + obviously broken patches, documentation/comment changes, any other minor + changes. + +#. You are allowed to commit patches without approval to those portions of LLVM + that you have contributed or maintain (i.e., have been assigned + responsibility for), with the proviso that such commits must not break the + build. This is a "trust but verify" policy, and commits of this nature are + reviewed after they are committed. + +#. Multiple violations of these policies or a single egregious violation may + cause commit access to be revoked. + +In any case, your changes are still subject to `code review`_ (either before or +after they are committed, depending on the nature of the change). You are +encouraged to review other peoples' patches as well, but you aren't required +to do so. + +.. _discuss the change/gather consensus: + +Making a Major Change +--------------------- + +When a developer begins a major new project with the aim of contributing it back +to LLVM, s/he should inform the community with an email to the `llvmdev +`_ email list, to the extent +possible. The reason for this is to: + +#. keep the community informed about future changes to LLVM, + +#. avoid duplication of effort by preventing multiple parties working on the + same thing and not knowing about it, and + +#. ensure that any technical issues around the proposed work are discussed and + resolved before any significant work is done. + +The design of LLVM is carefully controlled to ensure that all the pieces fit +together well and are as consistent as possible. If you plan to make a major +change to the way LLVM works or want to add a major new extension, it is a good +idea to get consensus with the development community before you start working on +it. + +Once the design of the new feature is finalized, the work itself should be done +as a series of `incremental changes`_, not as a long-term development branch. + +.. _incremental changes: + +Incremental Development +----------------------- + +In the LLVM project, we do all significant changes as a series of incremental +patches. We have a strong dislike for huge changes or long-term development +branches. Long-term development branches have a number of drawbacks: + +#. Branches must have mainline merged into them periodically. If the branch + development and mainline development occur in the same pieces of code, + resolving merge conflicts can take a lot of time. + +#. Other people in the community tend to ignore work on branches. + +#. Huge changes (produced when a branch is merged back onto mainline) are + extremely difficult to `code review`_. + +#. Branches are not routinely tested by our nightly tester infrastructure. + +#. Changes developed as monolithic large changes often don't work until the + entire set of changes is done. Breaking it down into a set of smaller + changes increases the odds that any of the work will be committed to the main + repository. + +To address these problems, LLVM uses an incremental development style and we +require contributors to follow this practice when making a large/invasive +change. Some tips: + +* Large/invasive changes usually have a number of secondary changes that are + required before the big change can be made (e.g. API cleanup, etc). These + sorts of changes can often be done before the major change is done, + independently of that work. + +* The remaining inter-related work should be decomposed into unrelated sets of + changes if possible. Once this is done, define the first increment and get + consensus on what the end goal of the change is. + +* Each change in the set can be stand alone (e.g. to fix a bug), or part of a + planned series of changes that works towards the development goal. + +* Each change should be kept as small as possible. This simplifies your work + (into a logical progression), simplifies code review and reduces the chance + that you will get negative feedback on the change. Small increments also + facilitate the maintenance of a high quality code base. + +* Often, an independent precursor to a big change is to add a new API and slowly + migrate clients to use the new API. Each change to use the new API is often + "obvious" and can be committed without review. Once the new API is in place + and used, it is much easier to replace the underlying implementation of the + API. This implementation change is logically separate from the API + change. + +If you are interested in making a large change, and this scares you, please make +sure to first `discuss the change/gather consensus`_ then ask about the best way +to go about making the change. + +Attribution of Changes +---------------------- + +We believe in correct attribution of contributions to their contributors. +However, we do not want the source code to be littered with random attributions +"this code written by J. Random Hacker" (this is noisy and distracting). In +practice, the revision control system keeps a perfect history of who changed +what, and the CREDITS.txt file describes higher-level contributions. If you +commit a patch for someone else, please say "patch contributed by J. Random +Hacker!" in the commit message. + +Overall, please do not add contributor names to the source code. + +.. _copyright-license-patents: + +Copyright, License, and Patents +=============================== + +.. note:: + + This section deals with legal matters but does not provide legal advice. We + are not lawyers --- please seek legal counsel from an attorney. + +This section addresses the issues of copyright, license and patents for the LLVM +project. The copyright for the code is held by the individual contributors of +the code and the terms of its license to LLVM users and developers is the +`University of Illinois/NCSA Open Source License +`_ (with portions dual licensed +under the `MIT License `_, +see below). As contributor to the LLVM project, you agree to allow any +contributions to the project to licensed under these terms. + +Copyright +--------- + +The LLVM project does not require copyright assignments, which means that the +copyright for the code in the project is held by its respective contributors who +have each agreed to release their contributed code under the terms of the `LLVM +License`_. + +An implication of this is that the LLVM license is unlikely to ever change: +changing it would require tracking down all the contributors to LLVM and getting +them to agree that a license change is acceptable for their contribution. Since +there are no plans to change the license, this is not a cause for concern. + +As a contributor to the project, this means that you (or your company) retain +ownership of the code you contribute, that it cannot be used in a way that +contradicts the license (which is a liberal BSD-style license), and that the +license for your contributions won't change without your approval in the +future. + +.. _LLVM License: + +License +------- + +We intend to keep LLVM perpetually open source and to use a liberal open source +license. **As a contributor to the project, you agree that any contributions be +licensed under the terms of the corresponding subproject.** All of the code in +LLVM is available under the `University of Illinois/NCSA Open Source License +`_, which boils down to +this: + +* You can freely distribute LLVM. +* You must retain the copyright notice if you redistribute LLVM. +* Binaries derived from LLVM must reproduce the copyright notice (e.g. in an + included readme file). +* You can't use our names to promote your LLVM derived products. +* There's no warranty on LLVM at all. + +We believe this fosters the widest adoption of LLVM because it **allows +commercial products to be derived from LLVM** with few restrictions and without +a requirement for making any derived works also open source (i.e. LLVM's +license is not a "copyleft" license like the GPL). We suggest that you read the +`License `_ if further +clarification is needed. + +In addition to the UIUC license, the runtime library components of LLVM +(**compiler_rt, libc++, and libclc**) are also licensed under the `MIT License +`_, which does not contain +the binary redistribution clause. As a user of these runtime libraries, it +means that you can choose to use the code under either license (and thus don't +need the binary redistribution clause), and as a contributor to the code that +you agree that any contributions to these libraries be licensed under both +licenses. We feel that this is important for runtime libraries, because they +are implicitly linked into applications and therefore should not subject those +applications to the binary redistribution clause. This also means that it is ok +to move code from (e.g.) libc++ to the LLVM core without concern, but that code +cannot be moved from the LLVM core to libc++ without the copyright owner's +permission. + +Note that the LLVM Project does distribute llvm-gcc and dragonegg, **which are +GPL.** This means that anything "linked" into llvm-gcc must itself be compatible +with the GPL, and must be releasable under the terms of the GPL. This implies +that **any code linked into llvm-gcc and distributed to others may be subject to +the viral aspects of the GPL** (for example, a proprietary code generator linked +into llvm-gcc must be made available under the GPL). This is not a problem for +code already distributed under a more liberal license (like the UIUC license), +and GPL-containing subprojects are kept in separate SVN repositories whose +LICENSE.txt files specifically indicate that they contain GPL code. + +We have no plans to change the license of LLVM. If you have questions or +comments about the license, please contact the `LLVM Developer's Mailing +List `_. + +Patents +------- + +To the best of our knowledge, LLVM does not infringe on any patents (we have +actually removed code from LLVM in the past that was found to infringe). Having +code in LLVM that infringes on patents would violate an important goal of the +project by making it hard or impossible to reuse the code for arbitrary purposes +(including commercial use). + +When contributing code, we expect contributors to notify us of any potential for +patent-related trouble with their changes (including from third parties). If +you or your employer own the rights to a patent and would like to contribute +code to LLVM that relies on it, we require that the copyright owner sign an +agreement that allows any other user of LLVM to freely use your patent. Please +contact the `oversight group `_ for more +details. diff --git a/docs/Dummy.html b/docs/Dummy.html new file mode 100644 index 00000000..e69de29b diff --git a/docs/ExceptionHandling.rst b/docs/ExceptionHandling.rst new file mode 100644 index 00000000..0a866075 --- /dev/null +++ b/docs/ExceptionHandling.rst @@ -0,0 +1,364 @@ +========================== +Exception Handling in LLVM +========================== + +.. contents:: + :local: + +Introduction +============ + +This document is the central repository for all information pertaining to +exception handling in LLVM. It describes the format that LLVM exception +handling information takes, which is useful for those interested in creating +front-ends or dealing directly with the information. Further, this document +provides specific examples of what exception handling information is used for in +C and C++. + +Itanium ABI Zero-cost Exception Handling +---------------------------------------- + +Exception handling for most programming languages is designed to recover from +conditions that rarely occur during general use of an application. To that end, +exception handling should not interfere with the main flow of an application's +algorithm by performing checkpointing tasks, such as saving the current pc or +register state. + +The Itanium ABI Exception Handling Specification defines a methodology for +providing outlying data in the form of exception tables without inlining +speculative exception handling code in the flow of an application's main +algorithm. Thus, the specification is said to add "zero-cost" to the normal +execution of an application. + +A more complete description of the Itanium ABI exception handling runtime +support of can be found at `Itanium C++ ABI: Exception Handling +`_. A description of the +exception frame format can be found at `Exception Frames +`_, +with details of the DWARF 4 specification at `DWARF 4 Standard +`_. A description for the C++ exception +table formats can be found at `Exception Handling Tables +`_. + +Setjmp/Longjmp Exception Handling +--------------------------------- + +Setjmp/Longjmp (SJLJ) based exception handling uses LLVM intrinsics +`llvm.eh.sjlj.setjmp`_ and `llvm.eh.sjlj.longjmp`_ to handle control flow for +exception handling. + +For each function which does exception processing --- be it ``try``/``catch`` +blocks or cleanups --- that function registers itself on a global frame +list. When exceptions are unwinding, the runtime uses this list to identify +which functions need processing. + +Landing pad selection is encoded in the call site entry of the function +context. The runtime returns to the function via `llvm.eh.sjlj.longjmp`_, where +a switch table transfers control to the appropriate landing pad based on the +index stored in the function context. + +In contrast to DWARF exception handling, which encodes exception regions and +frame information in out-of-line tables, SJLJ exception handling builds and +removes the unwind frame context at runtime. This results in faster exception +handling at the expense of slower execution when no exceptions are thrown. As +exceptions are, by their nature, intended for uncommon code paths, DWARF +exception handling is generally preferred to SJLJ. + +Overview +-------- + +When an exception is thrown in LLVM code, the runtime does its best to find a +handler suited to processing the circumstance. + +The runtime first attempts to find an *exception frame* corresponding to the +function where the exception was thrown. If the programming language supports +exception handling (e.g. C++), the exception frame contains a reference to an +exception table describing how to process the exception. If the language does +not support exception handling (e.g. C), or if the exception needs to be +forwarded to a prior activation, the exception frame contains information about +how to unwind the current activation and restore the state of the prior +activation. This process is repeated until the exception is handled. If the +exception is not handled and no activations remain, then the application is +terminated with an appropriate error message. + +Because different programming languages have different behaviors when handling +exceptions, the exception handling ABI provides a mechanism for +supplying *personalities*. An exception handling personality is defined by +way of a *personality function* (e.g. ``__gxx_personality_v0`` in C++), +which receives the context of the exception, an *exception structure* +containing the exception object type and value, and a reference to the exception +table for the current function. The personality function for the current +compile unit is specified in a *common exception frame*. + +The organization of an exception table is language dependent. For C++, an +exception table is organized as a series of code ranges defining what to do if +an exception occurs in that range. Typically, the information associated with a +range defines which types of exception objects (using C++ *type info*) that are +handled in that range, and an associated action that should take place. Actions +typically pass control to a *landing pad*. + +A landing pad corresponds roughly to the code found in the ``catch`` portion of +a ``try``/``catch`` sequence. When execution resumes at a landing pad, it +receives an *exception structure* and a *selector value* corresponding to the +*type* of exception thrown. The selector is then used to determine which *catch* +should actually process the exception. + +LLVM Code Generation +==================== + +From a C++ developer's perspective, exceptions are defined in terms of the +``throw`` and ``try``/``catch`` statements. In this section we will describe the +implementation of LLVM exception handling in terms of C++ examples. + +Throw +----- + +Languages that support exception handling typically provide a ``throw`` +operation to initiate the exception process. Internally, a ``throw`` operation +breaks down into two steps. + +#. A request is made to allocate exception space for an exception structure. + This structure needs to survive beyond the current activation. This structure + will contain the type and value of the object being thrown. + +#. A call is made to the runtime to raise the exception, passing the exception + structure as an argument. + +In C++, the allocation of the exception structure is done by the +``__cxa_allocate_exception`` runtime function. The exception raising is handled +by ``__cxa_throw``. The type of the exception is represented using a C++ RTTI +structure. + +Try/Catch +--------- + +A call within the scope of a *try* statement can potentially raise an +exception. In those circumstances, the LLVM C++ front-end replaces the call with +an ``invoke`` instruction. Unlike a call, the ``invoke`` has two potential +continuation points: + +#. where to continue when the call succeeds as per normal, and + +#. where to continue if the call raises an exception, either by a throw or the + unwinding of a throw + +The term used to define a the place where an ``invoke`` continues after an +exception is called a *landing pad*. LLVM landing pads are conceptually +alternative function entry points where an exception structure reference and a +type info index are passed in as arguments. The landing pad saves the exception +structure reference and then proceeds to select the catch block that corresponds +to the type info of the exception object. + +The LLVM :ref:`i_landingpad` is used to convey information about the landing +pad to the back end. For C++, the ``landingpad`` instruction returns a pointer +and integer pair corresponding to the pointer to the *exception structure* and +the *selector value* respectively. + +The ``landingpad`` instruction takes a reference to the personality function to +be used for this ``try``/``catch`` sequence. The remainder of the instruction is +a list of *cleanup*, *catch*, and *filter* clauses. The exception is tested +against the clauses sequentially from first to last. The selector value is a +positive number if the exception matched a type info, a negative number if it +matched a filter, and zero if it matched a cleanup. If nothing is matched, the +behavior of the program is `undefined`_. If a type info matched, then the +selector value is the index of the type info in the exception table, which can +be obtained using the `llvm.eh.typeid.for`_ intrinsic. + +Once the landing pad has the type info selector, the code branches to the code +for the first catch. The catch then checks the value of the type info selector +against the index of type info for that catch. Since the type info index is not +known until all the type infos have been gathered in the backend, the catch code +must call the `llvm.eh.typeid.for`_ intrinsic to determine the index for a given +type info. If the catch fails to match the selector then control is passed on to +the next catch. + +Finally, the entry and exit of catch code is bracketed with calls to +``__cxa_begin_catch`` and ``__cxa_end_catch``. + +* ``__cxa_begin_catch`` takes an exception structure reference as an argument + and returns the value of the exception object. + +* ``__cxa_end_catch`` takes no arguments. This function: + + #. Locates the most recently caught exception and decrements its handler + count, + + #. Removes the exception from the *caught* stack if the handler count goes to + zero, and + + #. Destroys the exception if the handler count goes to zero and the exception + was not re-thrown by throw. + + .. note:: + + a rethrow from within the catch may replace this call with a + ``__cxa_rethrow``. + +Cleanups +-------- + +A cleanup is extra code which needs to be run as part of unwinding a scope. C++ +destructors are a typical example, but other languages and language extensions +provide a variety of different kinds of cleanups. In general, a landing pad may +need to run arbitrary amounts of cleanup code before actually entering a catch +block. To indicate the presence of cleanups, a :ref:`i_landingpad` should have +a *cleanup* clause. Otherwise, the unwinder will not stop at the landing pad if +there are no catches or filters that require it to. + +.. note:: + + Do not allow a new exception to propagate out of the execution of a + cleanup. This can corrupt the internal state of the unwinder. Different + languages describe different high-level semantics for these situations: for + example, C++ requires that the process be terminated, whereas Ada cancels both + exceptions and throws a third. + +When all cleanups are finished, if the exception is not handled by the current +function, resume unwinding by calling the `resume +instruction `_, passing in the result of the +``landingpad`` instruction for the original landing pad. + +Throw Filters +------------- + +C++ allows the specification of which exception types may be thrown from a +function. To represent this, a top level landing pad may exist to filter out +invalid types. To express this in LLVM code the :ref:`i_landingpad` will have a +filter clause. The clause consists of an array of type infos. +``landingpad`` will return a negative value +if the exception does not match any of the type infos. If no match is found then +a call to ``__cxa_call_unexpected`` should be made, otherwise +``_Unwind_Resume``. Each of these functions requires a reference to the +exception structure. Note that the most general form of a ``landingpad`` +instruction can have any number of catch, cleanup, and filter clauses (though +having more than one cleanup is pointless). The LLVM C++ front-end can generate +such ``landingpad`` instructions due to inlining creating nested exception +handling scopes. + +.. _undefined: + +Restrictions +------------ + +The unwinder delegates the decision of whether to stop in a call frame to that +call frame's language-specific personality function. Not all unwinders guarantee +that they will stop to perform cleanups. For example, the GNU C++ unwinder +doesn't do so unless the exception is actually caught somewhere further up the +stack. + +In order for inlining to behave correctly, landing pads must be prepared to +handle selector results that they did not originally advertise. Suppose that a +function catches exceptions of type ``A``, and it's inlined into a function that +catches exceptions of type ``B``. The inliner will update the ``landingpad`` +instruction for the inlined landing pad to include the fact that ``B`` is also +caught. If that landing pad assumes that it will only be entered to catch an +``A``, it's in for a rude awakening. Consequently, landing pads must test for +the selector results they understand and then resume exception propagation with +the `resume instruction `_ if none of the conditions +match. + +Exception Handling Intrinsics +============================= + +In addition to the ``landingpad`` and ``resume`` instructions, LLVM uses several +intrinsic functions (name prefixed with ``llvm.eh``) to provide exception +handling information at various points in generated code. + +.. _llvm.eh.typeid.for: + +``llvm.eh.typeid.for`` +---------------------- + +.. code-block:: llvm + + i32 @llvm.eh.typeid.for(i8* %type_info) + + +This intrinsic returns the type info index in the exception table of the current +function. This value can be used to compare against the result of +``landingpad`` instruction. The single argument is a reference to a type info. + +.. _llvm.eh.sjlj.setjmp: + +``llvm.eh.sjlj.setjmp`` +----------------------- + +.. code-block:: llvm + + i32 @llvm.eh.sjlj.setjmp(i8* %setjmp_buf) + +For SJLJ based exception handling, this intrinsic forces register saving for the +current function and stores the address of the following instruction for use as +a destination address by `llvm.eh.sjlj.longjmp`_. The buffer format and the +overall functioning of this intrinsic is compatible with the GCC +``__builtin_setjmp`` implementation allowing code built with the clang and GCC +to interoperate. + +The single parameter is a pointer to a five word buffer in which the calling +context is saved. The front end places the frame pointer in the first word, and +the target implementation of this intrinsic should place the destination address +for a `llvm.eh.sjlj.longjmp`_ in the second word. The following three words are +available for use in a target-specific manner. + +.. _llvm.eh.sjlj.longjmp: + +``llvm.eh.sjlj.longjmp`` +------------------------ + +.. code-block:: llvm + + void @llvm.eh.sjlj.longjmp(i8* %setjmp_buf) + +For SJLJ based exception handling, the ``llvm.eh.sjlj.longjmp`` intrinsic is +used to implement ``__builtin_longjmp()``. The single parameter is a pointer to +a buffer populated by `llvm.eh.sjlj.setjmp`_. The frame pointer and stack +pointer are restored from the buffer, then control is transferred to the +destination address. + +``llvm.eh.sjlj.lsda`` +--------------------- + +.. code-block:: llvm + + i8* @llvm.eh.sjlj.lsda() + +For SJLJ based exception handling, the ``llvm.eh.sjlj.lsda`` intrinsic returns +the address of the Language Specific Data Area (LSDA) for the current +function. The SJLJ front-end code stores this address in the exception handling +function context for use by the runtime. + +``llvm.eh.sjlj.callsite`` +------------------------- + +.. code-block:: llvm + + void @llvm.eh.sjlj.callsite(i32 %call_site_num) + +For SJLJ based exception handling, the ``llvm.eh.sjlj.callsite`` intrinsic +identifies the callsite value associated with the following ``invoke`` +instruction. This is used to ensure that landing pad entries in the LSDA are +generated in matching order. + +Asm Table Formats +================= + +There are two tables that are used by the exception handling runtime to +determine which actions should be taken when an exception is thrown. + +Exception Handling Frame +------------------------ + +An exception handling frame ``eh_frame`` is very similar to the unwind frame +used by DWARF debug info. The frame contains all the information necessary to +tear down the current frame and restore the state of the prior frame. There is +an exception handling frame for each function in a compile unit, plus a common +exception handling frame that defines information common to all functions in the +unit. + +Exception Tables +---------------- + +An exception table contains information about what actions to take when an +exception is thrown in a particular part of a function's code. There is one +exception table per function, except leaf functions and functions that have +calls only to non-throwing functions. They do not need an exception table. diff --git a/docs/ExtendedIntegerResults.txt b/docs/ExtendedIntegerResults.txt new file mode 100644 index 00000000..44e9fbf0 --- /dev/null +++ b/docs/ExtendedIntegerResults.txt @@ -0,0 +1,133 @@ +//===----------------------------------------------------------------------===// +// Representing sign/zero extension of function results +//===----------------------------------------------------------------------===// + +Mar 25, 2009 - Initial Revision + +Most ABIs specify that functions which return small integers do so in a +specific integer GPR. This is an efficient way to go, but raises the question: +if the returned value is smaller than the register, what do the high bits hold? + +There are three (interesting) possible answers: undefined, zero extended, or +sign extended. The number of bits in question depends on the data-type that +the front-end is referencing (typically i1/i8/i16/i32). + +Knowing the answer to this is important for two reasons: 1) we want to be able +to implement the ABI correctly. If we need to sign extend the result according +to the ABI, we really really do need to do this to preserve correctness. 2) +this information is often useful for optimization purposes, and we want the +mid-level optimizers to be able to process this (e.g. eliminate redundant +extensions). + +For example, lets pretend that X86 requires the caller to properly extend the +result of a return (I'm not sure this is the case, but the argument doesn't +depend on this). Given this, we should compile this: + +int a(); +short b() { return a(); } + +into: + +_b: + subl $12, %esp + call L_a$stub + addl $12, %esp + cwtl + ret + +An optimization example is that we should be able to eliminate the explicit +sign extension in this example: + +short y(); +int z() { + return ((int)y() << 16) >> 16; +} + +_z: + subl $12, %esp + call _y + ;; movswl %ax, %eax -> not needed because eax is already sext'd + addl $12, %esp + ret + +//===----------------------------------------------------------------------===// +// What we have right now. +//===----------------------------------------------------------------------===// + +Currently, these sorts of things are modelled by compiling a function to return +the small type and a signext/zeroext marker is used. For example, we compile +Z into: + +define i32 @z() nounwind { +entry: + %0 = tail call signext i16 (...)* @y() nounwind + %1 = sext i16 %0 to i32 + ret i32 %1 +} + +and b into: + +define signext i16 @b() nounwind { +entry: + %0 = tail call i32 (...)* @a() nounwind ; [#uses=1] + %retval12 = trunc i32 %0 to i16 ; [#uses=1] + ret i16 %retval12 +} + +This has some problems: 1) the actual precise semantics are really poorly +defined (see PR3779). 2) some targets might want the caller to extend, some +might want the callee to extend 3) the mid-level optimizer doesn't know the +size of the GPR, so it doesn't know that %0 is sign extended up to 32-bits +here, and even if it did, it could not eliminate the sext. 4) the code +generator has historically assumed that the result is extended to i32, which is +a problem on PIC16 (and is also probably wrong on alpha and other 64-bit +targets). + +//===----------------------------------------------------------------------===// +// The proposal +//===----------------------------------------------------------------------===// + +I suggest that we have the front-end fully lower out the ABI issues here to +LLVM IR. This makes it 100% explicit what is going on and means that there is +no cause for confusion. For example, the cases above should compile into: + +define i32 @z() nounwind { +entry: + %0 = tail call i32 (...)* @y() nounwind + %1 = trunc i32 %0 to i16 + %2 = sext i16 %1 to i32 + ret i32 %2 +} +define i32 @b() nounwind { +entry: + %0 = tail call i32 (...)* @a() nounwind + %retval12 = trunc i32 %0 to i16 + %tmp = sext i16 %retval12 to i32 + ret i32 %tmp +} + +In this model, no functions will return an i1/i8/i16 (and on a x86-64 target +that extends results to i64, no i32). This solves the ambiguity issue, allows us +to fully describe all possible ABIs, and now allows the optimizers to reason +about and eliminate these extensions. + +The one thing that is missing is the ability for the front-end and optimizer to +specify/infer the guarantees provided by the ABI to allow other optimizations. +For example, in the y/z case, since y is known to return a sign extended value, +the trunc/sext in z should be eliminable. + +This can be done by introducing new sext/zext attributes which mean "I know +that the result of the function is sign extended at least N bits. Given this, +and given that it is stuck on the y function, the mid-level optimizer could +easily eliminate the extensions etc with existing functionality. + +The major disadvantage of doing this sort of thing is that it makes the ABI +lowering stuff even more explicit in the front-end, and that we would like to +eventually move to having the code generator do more of this work. However, +the sad truth of the matter is that this is a) unlikely to happen anytime in +the near future, and b) this is no worse than we have now with the existing +attributes. + +C compilers fundamentally have to reason about the target in many ways. +This is ugly and horrible, but a fact of life. + diff --git a/docs/ExtendingLLVM.rst b/docs/ExtendingLLVM.rst new file mode 100644 index 00000000..60cbf011 --- /dev/null +++ b/docs/ExtendingLLVM.rst @@ -0,0 +1,304 @@ +============================================================ +Extending LLVM: Adding instructions, intrinsics, types, etc. +============================================================ + +Introduction and Warning +======================== + + +During the course of using LLVM, you may wish to customize it for your research +project or for experimentation. At this point, you may realize that you need to +add something to LLVM, whether it be a new fundamental type, a new intrinsic +function, or a whole new instruction. + +When you come to this realization, stop and think. Do you really need to extend +LLVM? Is it a new fundamental capability that LLVM does not support at its +current incarnation or can it be synthesized from already pre-existing LLVM +elements? If you are not sure, ask on the `LLVM-dev +`_ list. The reason is that +extending LLVM will get involved as you need to update all the different passes +that you intend to use with your extension, and there are ``many`` LLVM analyses +and transformations, so it may be quite a bit of work. + +Adding an `intrinsic function`_ is far easier than adding an +instruction, and is transparent to optimization passes. If your added +functionality can be expressed as a function call, an intrinsic function is the +method of choice for LLVM extension. + +Before you invest a significant amount of effort into a non-trivial extension, +**ask on the list** if what you are looking to do can be done with +already-existing infrastructure, or if maybe someone else is already working on +it. You will save yourself a lot of time and effort by doing so. + +.. _intrinsic function: + +Adding a new intrinsic function +=============================== + +Adding a new intrinsic function to LLVM is much easier than adding a new +instruction. Almost all extensions to LLVM should start as an intrinsic +function and then be turned into an instruction if warranted. + +#. ``llvm/docs/LangRef.html``: + + Document the intrinsic. Decide whether it is code generator specific and + what the restrictions are. Talk to other people about it so that you are + sure it's a good idea. + +#. ``llvm/include/llvm/IR/Intrinsics*.td``: + + Add an entry for your intrinsic. Describe its memory access characteristics + for optimization (this controls whether it will be DCE'd, CSE'd, etc). Note + that any intrinsic using the ``llvm_int_ty`` type for an argument will + be deemed by ``tblgen`` as overloaded and the corresponding suffix will + be required on the intrinsic's name. + +#. ``llvm/lib/Analysis/ConstantFolding.cpp``: + + If it is possible to constant fold your intrinsic, add support to it in the + ``canConstantFoldCallTo`` and ``ConstantFoldCall`` functions. + +#. ``llvm/test/Regression/*``: + + Add test cases for your test cases to the test suite + +Once the intrinsic has been added to the system, you must add code generator +support for it. Generally you must do the following steps: + +Add support to the .td file for the target(s) of your choice in +``lib/Target/*/*.td``. + + This is usually a matter of adding a pattern to the .td file that matches the + intrinsic, though it may obviously require adding the instructions you want to + generate as well. There are lots of examples in the PowerPC and X86 backend + to follow. + +Adding a new SelectionDAG node +============================== + +As with intrinsics, adding a new SelectionDAG node to LLVM is much easier than +adding a new instruction. New nodes are often added to help represent +instructions common to many targets. These nodes often map to an LLVM +instruction (add, sub) or intrinsic (byteswap, population count). In other +cases, new nodes have been added to allow many targets to perform a common task +(converting between floating point and integer representation) or capture more +complicated behavior in a single node (rotate). + +#. ``include/llvm/CodeGen/ISDOpcodes.h``: + + Add an enum value for the new SelectionDAG node. + +#. ``lib/CodeGen/SelectionDAG/SelectionDAG.cpp``: + + Add code to print the node to ``getOperationName``. If your new node can be + evaluated at compile time when given constant arguments (such as an add of a + constant with another constant), find the ``getNode`` method that takes the + appropriate number of arguments, and add a case for your node to the switch + statement that performs constant folding for nodes that take the same number + of arguments as your new node. + +#. ``lib/CodeGen/SelectionDAG/LegalizeDAG.cpp``: + + Add code to `legalize, promote, and expand + `_ the node as necessary. At a + minimum, you will need to add a case statement for your node in + ``LegalizeOp`` which calls LegalizeOp on the node's operands, and returns a + new node if any of the operands changed as a result of being legalized. It + is likely that not all targets supported by the SelectionDAG framework will + natively support the new node. In this case, you must also add code in your + node's case statement in ``LegalizeOp`` to Expand your node into simpler, + legal operations. The case for ``ISD::UREM`` for expanding a remainder into + a divide, multiply, and a subtract is a good example. + +#. ``lib/CodeGen/SelectionDAG/LegalizeDAG.cpp``: + + If targets may support the new node being added only at certain sizes, you + will also need to add code to your node's case statement in ``LegalizeOp`` + to Promote your node's operands to a larger size, and perform the correct + operation. You will also need to add code to ``PromoteOp`` to do this as + well. For a good example, see ``ISD::BSWAP``, which promotes its operand to + a wider size, performs the byteswap, and then shifts the correct bytes right + to emulate the narrower byteswap in the wider type. + +#. ``lib/CodeGen/SelectionDAG/LegalizeDAG.cpp``: + + Add a case for your node in ``ExpandOp`` to teach the legalizer how to + perform the action represented by the new node on a value that has been split + into high and low halves. This case will be used to support your node with a + 64 bit operand on a 32 bit target. + +#. ``lib/CodeGen/SelectionDAG/DAGCombiner.cpp``: + + If your node can be combined with itself, or other existing nodes in a + peephole-like fashion, add a visit function for it, and call that function + from. There are several good examples for simple combines you can do; + ``visitFABS`` and ``visitSRL`` are good starting places. + +#. ``lib/Target/PowerPC/PPCISelLowering.cpp``: + + Each target has an implementation of the ``TargetLowering`` class, usually in + its own file (although some targets include it in the same file as the + DAGToDAGISel). The default behavior for a target is to assume that your new + node is legal for all types that are legal for that target. If this target + does not natively support your node, then tell the target to either Promote + it (if it is supported at a larger type) or Expand it. This will cause the + code you wrote in ``LegalizeOp`` above to decompose your new node into other + legal nodes for this target. + +#. ``lib/Target/TargetSelectionDAG.td``: + + Most current targets supported by LLVM generate code using the DAGToDAG + method, where SelectionDAG nodes are pattern matched to target-specific + nodes, which represent individual instructions. In order for the targets to + match an instruction to your new node, you must add a def for that node to + the list in this file, with the appropriate type constraints. Look at + ``add``, ``bswap``, and ``fadd`` for examples. + +#. ``lib/Target/PowerPC/PPCInstrInfo.td``: + + Each target has a tablegen file that describes the target's instruction set. + For targets that use the DAGToDAG instruction selection framework, add a + pattern for your new node that uses one or more target nodes. Documentation + for this is a bit sparse right now, but there are several decent examples. + See the patterns for ``rotl`` in ``PPCInstrInfo.td``. + +#. TODO: document complex patterns. + +#. ``llvm/test/Regression/CodeGen/*``: + + Add test cases for your new node to the test suite. + ``llvm/test/Regression/CodeGen/X86/bswap.ll`` is a good example. + +Adding a new instruction +======================== + +.. warning:: + + Adding instructions changes the bitcode format, and it will take some effort + to maintain compatibility with the previous version. Only add an instruction + if it is absolutely necessary. + +#. ``llvm/include/llvm/Instruction.def``: + + add a number for your instruction and an enum name + +#. ``llvm/include/llvm/Instructions.h``: + + add a definition for the class that will represent your instruction + +#. ``llvm/include/llvm/Support/InstVisitor.h``: + + add a prototype for a visitor to your new instruction type + +#. ``llvm/lib/AsmParser/Lexer.l``: + + add a new token to parse your instruction from assembly text file + +#. ``llvm/lib/AsmParser/llvmAsmParser.y``: + + add the grammar on how your instruction can be read and what it will + construct as a result + +#. ``llvm/lib/Bitcode/Reader/Reader.cpp``: + + add a case for your instruction and how it will be parsed from bitcode + +#. ``llvm/lib/VMCore/Instruction.cpp``: + + add a case for how your instruction will be printed out to assembly + +#. ``llvm/lib/VMCore/Instructions.cpp``: + + implement the class you defined in ``llvm/include/llvm/Instructions.h`` + +#. Test your instruction + +#. ``llvm/lib/Target/*``: + + add support for your instruction to code generators, or add a lowering pass. + +#. ``llvm/test/Regression/*``: + + add your test cases to the test suite. + +Also, you need to implement (or modify) any analyses or passes that you want to +understand this new instruction. + +Adding a new type +================= + +.. warning:: + + Adding new types changes the bitcode format, and will break compatibility with + currently-existing LLVM installations. Only add new types if it is absolutely + necessary. + +Adding a fundamental type +------------------------- + +#. ``llvm/include/llvm/Type.h``: + + add enum for the new type; add static ``Type*`` for this type + +#. ``llvm/lib/VMCore/Type.cpp``: + + add mapping from ``TypeID`` => ``Type*``; initialize the static ``Type*`` + +#. ``llvm/lib/AsmReader/Lexer.l``: + + add ability to parse in the type from text assembly + +#. ``llvm/lib/AsmReader/llvmAsmParser.y``: + + add a token for that type + +Adding a derived type +--------------------- + +#. ``llvm/include/llvm/Type.h``: + + add enum for the new type; add a forward declaration of the type also + +#. ``llvm/include/llvm/DerivedTypes.h``: + + add new class to represent new class in the hierarchy; add forward + declaration to the TypeMap value type + +#. ``llvm/lib/VMCore/Type.cpp``: + + add support for derived type to: + + .. code-block:: c++ + + std::string getTypeDescription(const Type &Ty, + std::vector &TypeStack) + bool TypesEqual(const Type *Ty, const Type *Ty2, + std::map &EqTypes) + + add necessary member functions for type, and factory methods + +#. ``llvm/lib/AsmReader/Lexer.l``: + + add ability to parse in the type from text assembly + +#. ``llvm/lib/Bitcode/Writer/Writer.cpp``: + + modify ``void BitcodeWriter::outputType(const Type *T)`` to serialize your + type + +#. ``llvm/lib/Bitcode/Reader/Reader.cpp``: + + modify ``const Type *BitcodeReader::ParseType()`` to read your data type + +#. ``llvm/lib/VMCore/AsmWriter.cpp``: + + modify + + .. code-block:: c++ + + void calcTypeName(const Type *Ty, + std::vector &TypeStack, + std::map &TypeNames, + std::string &Result) + + to output the new derived type diff --git a/docs/Extensions.rst b/docs/Extensions.rst new file mode 100644 index 00000000..e308dbcd --- /dev/null +++ b/docs/Extensions.rst @@ -0,0 +1,145 @@ +=============== +LLVM Extensions +=============== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction +============ + +This document describes extensions to tools and formats LLVM seeks compatibility +with. + +General Assembly Syntax +=========================== + +C99-style Hexadecimal Floating-point Constants +---------------------------------------------- + +LLVM's assemblers allow floating-point constants to be written in C99's +hexadecimal format instead of decimal if desired. + +.. code-block:: gas + + .section .data + .float 0x1c2.2ap3 + +Machine-specific Assembly Syntax +================================ + +X86/COFF-Dependent +------------------ + +Relocations +^^^^^^^^^^^ + +The following additional relocation type is supported: + +**@IMGREL** (AT&T syntax only) generates an image-relative relocation that +corresponds to the COFF relocation types ``IMAGE_REL_I386_DIR32NB`` (32-bit) or +``IMAGE_REL_AMD64_ADDR32NB`` (64-bit). + +.. code-block:: gas + + .text + fun: + mov foo@IMGREL(%ebx, %ecx, 4), %eax + + .section .pdata + .long fun@IMGREL + .long (fun@imgrel + 0x3F) + .long $unwind$fun@imgrel + + +``.linkonce`` Directive +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: + + ``.linkonce [ comdat type [ section identifier ] ]`` + +Supported COMDAT types: + +``discard`` + Discards duplicate sections with the same COMDAT symbol. This is the default + if no type is specified. + +``one_only`` + If the symbol is defined multiple times, the linker issues an error. + +``same_size`` + Duplicates are discarded, but the linker issues an error if any have + different sizes. + +``same_contents`` + Duplicates are discarded, but the linker issues an error if any duplicates + do not have exactly the same content. + +``associative`` + Links the section if a certain other COMDAT section is linked. This other + section is indicated by its section identifier following the comdat type. + The following restrictions apply to the associated section: + + 1. It must be the name of a section already defined. + 2. It must differ from the current section. + 3. It must be a COMDAT section. + 4. It cannot be another associative COMDAT section. + +``largest`` + Links the largest section from among the duplicates. + +``newest`` + Links the newest section from among the duplicates. + + +.. code-block:: gas + + .section .text$foo + .linkonce + ... + + .section .xdata$foo + .linkonce associative .text$foo + ... + +``.section`` Directive +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +MC supports passing the information in ``.linkonce`` at the end of +``.section``. For example, these two codes are equivalent + +.. code-block:: gas + + .section secName, "dr", discard, "Symbol1" + .globl Symbol1 + Symbol1: + .long 1 + +.. code-block:: gas + + .section secName, "dr" + .linkonce discard + .globl Symbol1 + Symbol1: + .long 1 + +Note that in the combined form the COMDAT symbol is explict. This +extension exits to support multiple sections with the same name in +different comdats: + + +.. code-block:: gas + + .section secName, "dr", discard, "Symbol1" + .globl Symbol1 + Symbol1: + .long 1 + + .section secName, "dr", discard, "Symbol2" + .globl Symbol2 + Symbol2: + .long 1 diff --git a/docs/FAQ.rst b/docs/FAQ.rst new file mode 100644 index 00000000..e4ab2c18 --- /dev/null +++ b/docs/FAQ.rst @@ -0,0 +1,485 @@ +================================ +Frequently Asked Questions (FAQ) +================================ + +.. contents:: + :local: + + +License +======= + +Does the University of Illinois Open Source License really qualify as an "open source" license? +----------------------------------------------------------------------------------------------- +Yes, the license is `certified +`_ by the Open Source +Initiative (OSI). + + +Can I modify LLVM source code and redistribute the modified source? +------------------------------------------------------------------- +Yes. The modified source distribution must retain the copyright notice and +follow the three bulletted conditions listed in the `LLVM license +`_. + + +Can I modify the LLVM source code and redistribute binaries or other tools based on it, without redistributing the source? +-------------------------------------------------------------------------------------------------------------------------- +Yes. This is why we distribute LLVM under a less restrictive license than GPL, +as explained in the first question above. + + +Source Code +=========== + +In what language is LLVM written? +--------------------------------- +All of the LLVM tools and libraries are written in C++ with extensive use of +the STL. + + +How portable is the LLVM source code? +------------------------------------- +The LLVM source code should be portable to most modern Unix-like operating +systems. Most of the code is written in standard C++ with operating system +services abstracted to a support library. The tools required to build and +test LLVM have been ported to a plethora of platforms. + +Some porting problems may exist in the following areas: + +* The autoconf/makefile build system relies heavily on UNIX shell tools, + like the Bourne Shell and sed. Porting to systems without these tools + (MacOS 9, Plan 9) will require more effort. + +What API do I use to store a value to one of the virtual registers in LLVM IR's SSA representation? +--------------------------------------------------------------------------------------------------- + +In short: you can't. It's actually kind of a silly question once you grok +what's going on. Basically, in code like: + +.. code-block:: llvm + + %result = add i32 %foo, %bar + +, ``%result`` is just a name given to the ``Value`` of the ``add`` +instruction. In other words, ``%result`` *is* the add instruction. The +"assignment" doesn't explicitly "store" anything to any "virtual register"; +the "``=``" is more like the mathematical sense of equality. + +Longer explanation: In order to generate a textual representation of the +IR, some kind of name has to be given to each instruction so that other +instructions can textually reference it. However, the isomorphic in-memory +representation that you manipulate from C++ has no such restriction since +instructions can simply keep pointers to any other ``Value``'s that they +reference. In fact, the names of dummy numbered temporaries like ``%1`` are +not explicitly represented in the in-memory representation at all (see +``Value::getName()``). + +Build Problems +============== + +When I run configure, it finds the wrong C compiler. +---------------------------------------------------- +The ``configure`` script attempts to locate first ``gcc`` and then ``cc``, +unless it finds compiler paths set in ``CC`` and ``CXX`` for the C and C++ +compiler, respectively. + +If ``configure`` finds the wrong compiler, either adjust your ``PATH`` +environment variable or set ``CC`` and ``CXX`` explicitly. + + +The ``configure`` script finds the right C compiler, but it uses the LLVM tools from a previous build. What do I do? +--------------------------------------------------------------------------------------------------------------------- +The ``configure`` script uses the ``PATH`` to find executables, so if it's +grabbing the wrong linker/assembler/etc, there are two ways to fix it: + +#. Adjust your ``PATH`` environment variable so that the correct program + appears first in the ``PATH``. This may work, but may not be convenient + when you want them *first* in your path for other work. + +#. Run ``configure`` with an alternative ``PATH`` that is correct. In a + Bourne compatible shell, the syntax would be: + +.. code-block:: console + + % PATH=[the path without the bad program] ./configure ... + +This is still somewhat inconvenient, but it allows ``configure`` to do its +work without having to adjust your ``PATH`` permanently. + + +When creating a dynamic library, I get a strange GLIBC error. +------------------------------------------------------------- +Under some operating systems (i.e. Linux), libtool does not work correctly if +GCC was compiled with the ``--disable-shared option``. To work around this, +install your own version of GCC that has shared libraries enabled by default. + + +I've updated my source tree from Subversion, and now my build is trying to use a file/directory that doesn't exist. +------------------------------------------------------------------------------------------------------------------- +You need to re-run configure in your object directory. When new Makefiles +are added to the source tree, they have to be copied over to the object tree +in order to be used by the build. + + +I've modified a Makefile in my source tree, but my build tree keeps using the old version. What do I do? +--------------------------------------------------------------------------------------------------------- +If the Makefile already exists in your object tree, you can just run the +following command in the top level directory of your object tree: + +.. code-block:: console + + % ./config.status ; + +If the Makefile is new, you will have to modify the configure script to copy +it over. + + +I've upgraded to a new version of LLVM, and I get strange build errors. +----------------------------------------------------------------------- +Sometimes, changes to the LLVM source code alters how the build system works. +Changes in ``libtool``, ``autoconf``, or header file dependencies are +especially prone to this sort of problem. + +The best thing to try is to remove the old files and re-build. In most cases, +this takes care of the problem. To do this, just type ``make clean`` and then +``make`` in the directory that fails to build. + + +I've built LLVM and am testing it, but the tests freeze. +-------------------------------------------------------- +This is most likely occurring because you built a profile or release +(optimized) build of LLVM and have not specified the same information on the +``gmake`` command line. + +For example, if you built LLVM with the command: + +.. code-block:: console + + % gmake ENABLE_PROFILING=1 + +...then you must run the tests with the following commands: + +.. code-block:: console + + % cd llvm/test + % gmake ENABLE_PROFILING=1 + +Why do test results differ when I perform different types of builds? +-------------------------------------------------------------------- +The LLVM test suite is dependent upon several features of the LLVM tools and +libraries. + +First, the debugging assertions in code are not enabled in optimized or +profiling builds. Hence, tests that used to fail may pass. + +Second, some tests may rely upon debugging options or behavior that is only +available in the debug build. These tests will fail in an optimized or +profile build. + + +Compiling LLVM with GCC 3.3.2 fails, what should I do? +------------------------------------------------------ +This is `a bug in GCC `_, +and affects projects other than LLVM. Try upgrading or downgrading your GCC. + + +Compiling LLVM with GCC succeeds, but the resulting tools do not work, what can be wrong? +----------------------------------------------------------------------------------------- +Several versions of GCC have shown a weakness in miscompiling the LLVM +codebase. Please consult your compiler version (``gcc --version``) to find +out whether it is `broken `_. If so, your only +option is to upgrade GCC to a known good version. + + +After Subversion update, rebuilding gives the error "No rule to make target". +----------------------------------------------------------------------------- +If the error is of the form: + +.. code-block:: console + + gmake[2]: *** No rule to make target `/path/to/somefile', + needed by `/path/to/another/file.d'. + Stop. + +This may occur anytime files are moved within the Subversion repository or +removed entirely. In this case, the best solution is to erase all ``.d`` +files, which list dependencies for source files, and rebuild: + +.. code-block:: console + + % cd $LLVM_OBJ_DIR + % rm -f `find . -name \*\.d` + % gmake + +In other cases, it may be necessary to run ``make clean`` before rebuilding. + + +Source Languages +================ + +What source languages are supported? +------------------------------------ +LLVM currently has full support for C and C++ source languages. These are +available through both `Clang `_ and `DragonEgg +`_. + +The PyPy developers are working on integrating LLVM into the PyPy backend so +that PyPy language can translate to LLVM. + + +I'd like to write a self-hosting LLVM compiler. How should I interface with the LLVM middle-end optimizers and back-end code generators? +---------------------------------------------------------------------------------------------------------------------------------------- +Your compiler front-end will communicate with LLVM by creating a module in the +LLVM intermediate representation (IR) format. Assuming you want to write your +language's compiler in the language itself (rather than C++), there are 3 +major ways to tackle generating LLVM IR from a front-end: + +1. **Call into the LLVM libraries code using your language's FFI (foreign + function interface).** + + * *for:* best tracks changes to the LLVM IR, .ll syntax, and .bc format + + * *for:* enables running LLVM optimization passes without a emit/parse + overhead + + * *for:* adapts well to a JIT context + + * *against:* lots of ugly glue code to write + +2. **Emit LLVM assembly from your compiler's native language.** + + * *for:* very straightforward to get started + + * *against:* the .ll parser is slower than the bitcode reader when + interfacing to the middle end + + * *against:* it may be harder to track changes to the IR + +3. **Emit LLVM bitcode from your compiler's native language.** + + * *for:* can use the more-efficient bitcode reader when interfacing to the + middle end + + * *against:* you'll have to re-engineer the LLVM IR object model and bitcode + writer in your language + + * *against:* it may be harder to track changes to the IR + +If you go with the first option, the C bindings in include/llvm-c should help +a lot, since most languages have strong support for interfacing with C. The +most common hurdle with calling C from managed code is interfacing with the +garbage collector. The C interface was designed to require very little memory +management, and so is straightforward in this regard. + +What support is there for a higher level source language constructs for building a compiler? +-------------------------------------------------------------------------------------------- +Currently, there isn't much. LLVM supports an intermediate representation +which is useful for code representation but will not support the high level +(abstract syntax tree) representation needed by most compilers. There are no +facilities for lexical nor semantic analysis. + + +I don't understand the ``GetElementPtr`` instruction. Help! +----------------------------------------------------------- +See `The Often Misunderstood GEP Instruction `_. + + +Using the C and C++ Front Ends +============================== + +Can I compile C or C++ code to platform-independent LLVM bitcode? +----------------------------------------------------------------- +No. C and C++ are inherently platform-dependent languages. The most obvious +example of this is the preprocessor. A very common way that C code is made +portable is by using the preprocessor to include platform-specific code. In +practice, information about other platforms is lost after preprocessing, so +the result is inherently dependent on the platform that the preprocessing was +targeting. + +Another example is ``sizeof``. It's common for ``sizeof(long)`` to vary +between platforms. In most C front-ends, ``sizeof`` is expanded to a +constant immediately, thus hard-wiring a platform-specific detail. + +Also, since many platforms define their ABIs in terms of C, and since LLVM is +lower-level than C, front-ends currently must emit platform-specific IR in +order to have the result conform to the platform ABI. + + +Questions about code generated by the demo page +=============================================== + +What is this ``llvm.global_ctors`` and ``_GLOBAL__I_a...`` stuff that happens when I ``#include ``? +------------------------------------------------------------------------------------------------------------- +If you ``#include`` the ```` header into a C++ translation unit, +the file will probably use the ``std::cin``/``std::cout``/... global objects. +However, C++ does not guarantee an order of initialization between static +objects in different translation units, so if a static ctor/dtor in your .cpp +file used ``std::cout``, for example, the object would not necessarily be +automatically initialized before your use. + +To make ``std::cout`` and friends work correctly in these scenarios, the STL +that we use declares a static object that gets created in every translation +unit that includes ````. This object has a static constructor +and destructor that initializes and destroys the global iostream objects +before they could possibly be used in the file. The code that you see in the +``.ll`` file corresponds to the constructor and destructor registration code. + +If you would like to make it easier to *understand* the LLVM code generated +by the compiler in the demo page, consider using ``printf()`` instead of +``iostream``\s to print values. + + +Where did all of my code go?? +----------------------------- +If you are using the LLVM demo page, you may often wonder what happened to +all of the code that you typed in. Remember that the demo script is running +the code through the LLVM optimizers, so if your code doesn't actually do +anything useful, it might all be deleted. + +To prevent this, make sure that the code is actually needed. For example, if +you are computing some expression, return the value from the function instead +of leaving it in a local variable. If you really want to constrain the +optimizer, you can read from and assign to ``volatile`` global variables. + + +What is this "``undef``" thing that shows up in my code? +-------------------------------------------------------- +``undef`` is the LLVM way of representing a value that is not defined. You +can get these if you do not initialize a variable before you use it. For +example, the C function: + +.. code-block:: c + + int X() { int i; return i; } + +Is compiled to "``ret i32 undef``" because "``i``" never has a value specified +for it. + + +Why does instcombine + simplifycfg turn a call to a function with a mismatched calling convention into "unreachable"? Why not make the verifier reject it? +---------------------------------------------------------------------------------------------------------------------------------------------------------- +This is a common problem run into by authors of front-ends that are using +custom calling conventions: you need to make sure to set the right calling +convention on both the function and on each call to the function. For +example, this code: + +.. code-block:: llvm + + define fastcc void @foo() { + ret void + } + define void @bar() { + call void @foo() + ret void + } + +Is optimized to: + +.. code-block:: llvm + + define fastcc void @foo() { + ret void + } + define void @bar() { + unreachable + } + +... with "``opt -instcombine -simplifycfg``". This often bites people because +"all their code disappears". Setting the calling convention on the caller and +callee is required for indirect calls to work, so people often ask why not +make the verifier reject this sort of thing. + +The answer is that this code has undefined behavior, but it is not illegal. +If we made it illegal, then every transformation that could potentially create +this would have to ensure that it doesn't, and there is valid code that can +create this sort of construct (in dead code). The sorts of things that can +cause this to happen are fairly contrived, but we still need to accept them. +Here's an example: + +.. code-block:: llvm + + define fastcc void @foo() { + ret void + } + define internal void @bar(void()* %FP, i1 %cond) { + br i1 %cond, label %T, label %F + T: + call void %FP() + ret void + F: + call fastcc void %FP() + ret void + } + define void @test() { + %X = or i1 false, false + call void @bar(void()* @foo, i1 %X) + ret void + } + +In this example, "test" always passes ``@foo``/``false`` into ``bar``, which +ensures that it is dynamically called with the right calling conv (thus, the +code is perfectly well defined). If you run this through the inliner, you +get this (the explicit "or" is there so that the inliner doesn't dead code +eliminate a bunch of stuff): + +.. code-block:: llvm + + define fastcc void @foo() { + ret void + } + define void @test() { + %X = or i1 false, false + br i1 %X, label %T.i, label %F.i + T.i: + call void @foo() + br label %bar.exit + F.i: + call fastcc void @foo() + br label %bar.exit + bar.exit: + ret void + } + +Here you can see that the inlining pass made an undefined call to ``@foo`` +with the wrong calling convention. We really don't want to make the inliner +have to know about this sort of thing, so it needs to be valid code. In this +case, dead code elimination can trivially remove the undefined code. However, +if ``%X`` was an input argument to ``@test``, the inliner would produce this: + +.. code-block:: llvm + + define fastcc void @foo() { + ret void + } + + define void @test(i1 %X) { + br i1 %X, label %T.i, label %F.i + T.i: + call void @foo() + br label %bar.exit + F.i: + call fastcc void @foo() + br label %bar.exit + bar.exit: + ret void + } + +The interesting thing about this is that ``%X`` *must* be false for the +code to be well-defined, but no amount of dead code elimination will be able +to delete the broken call as unreachable. However, since +``instcombine``/``simplifycfg`` turns the undefined call into unreachable, we +end up with a branch on a condition that goes to unreachable: a branch to +unreachable can never happen, so "``-inline -instcombine -simplifycfg``" is +able to produce: + +.. code-block:: llvm + + define fastcc void @foo() { + ret void + } + define void @test(i1 %X) { + F.i: + call fastcc void @foo() + ret void + } diff --git a/docs/GarbageCollection.rst b/docs/GarbageCollection.rst new file mode 100644 index 00000000..73bc5eeb --- /dev/null +++ b/docs/GarbageCollection.rst @@ -0,0 +1,1015 @@ +===================================== +Accurate Garbage Collection with LLVM +===================================== + +.. contents:: + :local: + +Introduction +============ + +Garbage collection is a widely used technique that frees the programmer from +having to know the lifetimes of heap objects, making software easier to produce +and maintain. Many programming languages rely on garbage collection for +automatic memory management. There are two primary forms of garbage collection: +conservative and accurate. + +Conservative garbage collection often does not require any special support from +either the language or the compiler: it can handle non-type-safe programming +languages (such as C/C++) and does not require any special information from the +compiler. The `Boehm collector +`__ is an example of a +state-of-the-art conservative collector. + +Accurate garbage collection requires the ability to identify all pointers in the +program at run-time (which requires that the source-language be type-safe in +most cases). Identifying pointers at run-time requires compiler support to +locate all places that hold live pointer variables at run-time, including the +:ref:`processor stack and registers `. + +Conservative garbage collection is attractive because it does not require any +special compiler support, but it does have problems. In particular, because the +conservative garbage collector cannot *know* that a particular word in the +machine is a pointer, it cannot move live objects in the heap (preventing the +use of compacting and generational GC algorithms) and it can occasionally suffer +from memory leaks due to integer values that happen to point to objects in the +program. In addition, some aggressive compiler transformations can break +conservative garbage collectors (though these seem rare in practice). + +Accurate garbage collectors do not suffer from any of these problems, but they +can suffer from degraded scalar optimization of the program. In particular, +because the runtime must be able to identify and update all pointers active in +the program, some optimizations are less effective. In practice, however, the +locality and performance benefits of using aggressive garbage collection +techniques dominates any low-level losses. + +This document describes the mechanisms and interfaces provided by LLVM to +support accurate garbage collection. + +Goals and non-goals +------------------- + +LLVM's intermediate representation provides :ref:`garbage collection intrinsics +` that offer support for a broad class of collector models. For +instance, the intrinsics permit: + +* semi-space collectors + +* mark-sweep collectors + +* generational collectors + +* reference counting + +* incremental collectors + +* concurrent collectors + +* cooperative collectors + +We hope that the primitive support built into the LLVM IR is sufficient to +support a broad class of garbage collected languages including Scheme, ML, Java, +C#, Perl, Python, Lua, Ruby, other scripting languages, and more. + +However, LLVM does not itself provide a garbage collector --- this should be +part of your language's runtime library. LLVM provides a framework for compile +time :ref:`code generation plugins `. The role of these plugins is to +generate code and data structures which conforms to the *binary interface* +specified by the *runtime library*. This is similar to the relationship between +LLVM and DWARF debugging info, for example. The difference primarily lies in +the lack of an established standard in the domain of garbage collection --- thus +the plugins. + +The aspects of the binary interface with which LLVM's GC support is +concerned are: + +* Creation of GC-safe points within code where collection is allowed to execute + safely. + +* Computation of the stack map. For each safe point in the code, object + references within the stack frame must be identified so that the collector may + traverse and perhaps update them. + +* Write barriers when storing object references to the heap. These are commonly + used to optimize incremental scans in generational collectors. + +* Emission of read barriers when loading object references. These are useful + for interoperating with concurrent collectors. + +There are additional areas that LLVM does not directly address: + +* Registration of global roots with the runtime. + +* Registration of stack map entries with the runtime. + +* The functions used by the program to allocate memory, trigger a collection, + etc. + +* Computation or compilation of type maps, or registration of them with the + runtime. These are used to crawl the heap for object references. + +In general, LLVM's support for GC does not include features which can be +adequately addressed with other features of the IR and does not specify a +particular binary interface. On the plus side, this means that you should be +able to integrate LLVM with an existing runtime. On the other hand, it leaves a +lot of work for the developer of a novel language. However, it's easy to get +started quickly and scale up to a more sophisticated implementation as your +compiler matures. + +Getting started +=============== + +Using a GC with LLVM implies many things, for example: + +* Write a runtime library or find an existing one which implements a GC heap. + + #. Implement a memory allocator. + + #. Design a binary interface for the stack map, used to identify references + within a stack frame on the machine stack.\* + + #. Implement a stack crawler to discover functions on the call stack.\* + + #. Implement a registry for global roots. + + #. Design a binary interface for type maps, used to identify references + within heap objects. + + #. Implement a collection routine bringing together all of the above. + +* Emit compatible code from your compiler. + + * Initialization in the main function. + + * Use the ``gc "..."`` attribute to enable GC code generation (or + ``F.setGC("...")``). + + * Use ``@llvm.gcroot`` to mark stack roots. + + * Use ``@llvm.gcread`` and/or ``@llvm.gcwrite`` to manipulate GC references, + if necessary. + + * Allocate memory using the GC allocation routine provided by the runtime + library. + + * Generate type maps according to your runtime's binary interface. + +* Write a compiler plugin to interface LLVM with the runtime library.\* + + * Lower ``@llvm.gcread`` and ``@llvm.gcwrite`` to appropriate code + sequences.\* + + * Compile LLVM's stack map to the binary form expected by the runtime. + +* Load the plugin into the compiler. Use ``llc -load`` or link the plugin + statically with your language's compiler.\* + +* Link program executables with the runtime. + +To help with several of these tasks (those indicated with a \*), LLVM includes a +highly portable, built-in ShadowStack code generator. It is compiled into +``llc`` and works even with the interpreter and C backends. + +In your compiler +---------------- + +To turn the shadow stack on for your functions, first call: + +.. code-block:: c++ + + F.setGC("shadow-stack"); + +for each function your compiler emits. Since the shadow stack is built into +LLVM, you do not need to load a plugin. + +Your compiler must also use ``@llvm.gcroot`` as documented. Don't forget to +create a root for each intermediate value that is generated when evaluating an +expression. In ``h(f(), g())``, the result of ``f()`` could easily be collected +if evaluating ``g()`` triggers a collection. + +There's no need to use ``@llvm.gcread`` and ``@llvm.gcwrite`` over plain +``load`` and ``store`` for now. You will need them when switching to a more +advanced GC. + +In your runtime +--------------- + +The shadow stack doesn't imply a memory allocation algorithm. A semispace +collector or building atop ``malloc`` are great places to start, and can be +implemented with very little code. + +When it comes time to collect, however, your runtime needs to traverse the stack +roots, and for this it needs to integrate with the shadow stack. Luckily, doing +so is very simple. (This code is heavily commented to help you understand the +data structure, but there are only 20 lines of meaningful code.) + +.. code-block:: c++ + + /// @brief The map for a single function's stack frame. One of these is + /// compiled as constant data into the executable for each function. + /// + /// Storage of metadata values is elided if the %metadata parameter to + /// @llvm.gcroot is null. + struct FrameMap { + int32_t NumRoots; //< Number of roots in stack frame. + int32_t NumMeta; //< Number of metadata entries. May be < NumRoots. + const void *Meta[0]; //< Metadata for each root. + }; + + /// @brief A link in the dynamic shadow stack. One of these is embedded in + /// the stack frame of each function on the call stack. + struct StackEntry { + StackEntry *Next; //< Link to next stack entry (the caller's). + const FrameMap *Map; //< Pointer to constant FrameMap. + void *Roots[0]; //< Stack roots (in-place array). + }; + + /// @brief The head of the singly-linked list of StackEntries. Functions push + /// and pop onto this in their prologue and epilogue. + /// + /// Since there is only a global list, this technique is not threadsafe. + StackEntry *llvm_gc_root_chain; + + /// @brief Calls Visitor(root, meta) for each GC root on the stack. + /// root and meta are exactly the values passed to + /// @llvm.gcroot. + /// + /// Visitor could be a function to recursively mark live objects. Or it + /// might copy them to another heap or generation. + /// + /// @param Visitor A function to invoke for every GC root on the stack. + void visitGCRoots(void (*Visitor)(void **Root, const void *Meta)) { + for (StackEntry *R = llvm_gc_root_chain; R; R = R->Next) { + unsigned i = 0; + + // For roots [0, NumMeta), the metadata pointer is in the FrameMap. + for (unsigned e = R->Map->NumMeta; i != e; ++i) + Visitor(&R->Roots[i], R->Map->Meta[i]); + + // For roots [NumMeta, NumRoots), the metadata pointer is null. + for (unsigned e = R->Map->NumRoots; i != e; ++i) + Visitor(&R->Roots[i], NULL); + } + } + +About the shadow stack +---------------------- + +Unlike many GC algorithms which rely on a cooperative code generator to compile +stack maps, this algorithm carefully maintains a linked list of stack roots +[:ref:`Henderson2002 `]. This so-called "shadow stack" mirrors the +machine stack. Maintaining this data structure is slower than using a stack map +compiled into the executable as constant data, but has a significant portability +advantage because it requires no special support from the target code generator, +and does not require tricky platform-specific code to crawl the machine stack. + +The tradeoff for this simplicity and portability is: + +* High overhead per function call. + +* Not thread-safe. + +Still, it's an easy way to get started. After your compiler and runtime are up +and running, writing a :ref:`plugin ` will allow you to take advantage +of :ref:`more advanced GC features ` of LLVM in order to +improve performance. + +.. _gc_intrinsics: + +IR features +=========== + +This section describes the garbage collection facilities provided by the +:doc:`LLVM intermediate representation `. The exact behavior of these +IR features is specified by the binary interface implemented by a :ref:`code +generation plugin `, not by this document. + +These facilities are limited to those strictly necessary; they are not intended +to be a complete interface to any garbage collector. A program will need to +interface with the GC library using the facilities provided by that program. + +Specifying GC code generation: ``gc "..."`` +------------------------------------------- + +.. code-block:: llvm + + define ty @name(...) gc "name" { ... + +The ``gc`` function attribute is used to specify the desired GC style to the +compiler. Its programmatic equivalent is the ``setGC`` method of ``Function``. + +Setting ``gc "name"`` on a function triggers a search for a matching code +generation plugin "*name*"; it is that plugin which defines the exact nature of +the code generated to support GC. If none is found, the compiler will raise an +error. + +Specifying the GC style on a per-function basis allows LLVM to link together +programs that use different garbage collection algorithms (or none at all). + +.. _gcroot: + +Identifying GC roots on the stack: ``llvm.gcroot`` +-------------------------------------------------- + +.. code-block:: llvm + + void @llvm.gcroot(i8** %ptrloc, i8* %metadata) + +The ``llvm.gcroot`` intrinsic is used to inform LLVM that a stack variable +references an object on the heap and is to be tracked for garbage collection. +The exact impact on generated code is specified by a :ref:`compiler plugin +`. All calls to ``llvm.gcroot`` **must** reside inside the first basic +block. + +A compiler which uses mem2reg to raise imperative code using ``alloca`` into SSA +form need only add a call to ``@llvm.gcroot`` for those variables which a +pointers into the GC heap. + +It is also important to mark intermediate values with ``llvm.gcroot``. For +example, consider ``h(f(), g())``. Beware leaking the result of ``f()`` in the +case that ``g()`` triggers a collection. Note, that stack variables must be +initialized and marked with ``llvm.gcroot`` in function's prologue. + +The first argument **must** be a value referring to an alloca instruction or a +bitcast of an alloca. The second contains a pointer to metadata that should be +associated with the pointer, and **must** be a constant or global value +address. If your target collector uses tags, use a null pointer for metadata. + +The ``%metadata`` argument can be used to avoid requiring heap objects to have +'isa' pointers or tag bits. [Appel89_, Goldberg91_, Tolmach94_] If specified, +its value will be tracked along with the location of the pointer in the stack +frame. + +Consider the following fragment of Java code: + +.. code-block:: java + + { + Object X; // A null-initialized reference to an object + ... + } + +This block (which may be located in the middle of a function or in a loop nest), +could be compiled to this LLVM code: + +.. code-block:: llvm + + Entry: + ;; In the entry block for the function, allocate the + ;; stack space for X, which is an LLVM pointer. + %X = alloca %Object* + + ;; Tell LLVM that the stack space is a stack root. + ;; Java has type-tags on objects, so we pass null as metadata. + %tmp = bitcast %Object** %X to i8** + call void @llvm.gcroot(i8** %tmp, i8* null) + ... + + ;; "CodeBlock" is the block corresponding to the start + ;; of the scope above. + CodeBlock: + ;; Java null-initializes pointers. + store %Object* null, %Object** %X + + ... + + ;; As the pointer goes out of scope, store a null value into + ;; it, to indicate that the value is no longer live. + store %Object* null, %Object** %X + ... + +Reading and writing references in the heap +------------------------------------------ + +Some collectors need to be informed when the mutator (the program that needs +garbage collection) either reads a pointer from or writes a pointer to a field +of a heap object. The code fragments inserted at these points are called *read +barriers* and *write barriers*, respectively. The amount of code that needs to +be executed is usually quite small and not on the critical path of any +computation, so the overall performance impact of the barrier is tolerable. + +Barriers often require access to the *object pointer* rather than the *derived +pointer* (which is a pointer to the field within the object). Accordingly, +these intrinsics take both pointers as separate arguments for completeness. In +this snippet, ``%object`` is the object pointer, and ``%derived`` is the derived +pointer: + +.. code-block:: llvm + + ;; An array type. + %class.Array = type { %class.Object, i32, [0 x %class.Object*] } + ... + + ;; Load the object pointer from a gcroot. + %object = load %class.Array** %object_addr + + ;; Compute the derived pointer. + %derived = getelementptr %object, i32 0, i32 2, i32 %n + +LLVM does not enforce this relationship between the object and derived pointer +(although a :ref:`plugin ` might). However, it would be an unusual +collector that violated it. + +The use of these intrinsics is naturally optional if the target GC does require +the corresponding barrier. Such a GC plugin will replace the intrinsic calls +with the corresponding ``load`` or ``store`` instruction if they are used. + +Write barrier: ``llvm.gcwrite`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: llvm + + void @llvm.gcwrite(i8* %value, i8* %object, i8** %derived) + +For write barriers, LLVM provides the ``llvm.gcwrite`` intrinsic function. It +has exactly the same semantics as a non-volatile ``store`` to the derived +pointer (the third argument). The exact code generated is specified by a +compiler :ref:`plugin `. + +Many important algorithms require write barriers, including generational and +concurrent collectors. Additionally, write barriers could be used to implement +reference counting. + +Read barrier: ``llvm.gcread`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: llvm + + i8* @llvm.gcread(i8* %object, i8** %derived) + +For read barriers, LLVM provides the ``llvm.gcread`` intrinsic function. It has +exactly the same semantics as a non-volatile ``load`` from the derived pointer +(the second argument). The exact code generated is specified by a +:ref:`compiler plugin `. + +Read barriers are needed by fewer algorithms than write barriers, and may have a +greater performance impact since pointer reads are more frequent than writes. + +.. _plugin: + +Implementing a collector plugin +=============================== + +User code specifies which GC code generation to use with the ``gc`` function +attribute or, equivalently, with the ``setGC`` method of ``Function``. + +To implement a GC plugin, it is necessary to subclass ``llvm::GCStrategy``, +which can be accomplished in a few lines of boilerplate code. LLVM's +infrastructure provides access to several important algorithms. For an +uncontroversial collector, all that remains may be to compile LLVM's computed +stack map to assembly code (using the binary representation expected by the +runtime library). This can be accomplished in about 100 lines of code. + +This is not the appropriate place to implement a garbage collected heap or a +garbage collector itself. That code should exist in the language's runtime +library. The compiler plugin is responsible for generating code which conforms +to the binary interface defined by library, most essentially the :ref:`stack map +`. + +To subclass ``llvm::GCStrategy`` and register it with the compiler: + +.. code-block:: c++ + + // lib/MyGC/MyGC.cpp - Example LLVM GC plugin + + #include "llvm/CodeGen/GCStrategy.h" + #include "llvm/CodeGen/GCMetadata.h" + #include "llvm/Support/Compiler.h" + + using namespace llvm; + + namespace { + class LLVM_LIBRARY_VISIBILITY MyGC : public GCStrategy { + public: + MyGC() {} + }; + + GCRegistry::Add + X("mygc", "My bespoke garbage collector."); + } + +This boilerplate collector does nothing. More specifically: + +* ``llvm.gcread`` calls are replaced with the corresponding ``load`` + instruction. + +* ``llvm.gcwrite`` calls are replaced with the corresponding ``store`` + instruction. + +* No safe points are added to the code. + +* The stack map is not compiled into the executable. + +Using the LLVM makefiles (like the `sample project +`__), this code +can be compiled as a plugin using a simple makefile: + +.. code-block:: make + + # lib/MyGC/Makefile + + LEVEL := ../.. + LIBRARYNAME = MyGC + LOADABLE_MODULE = 1 + + include $(LEVEL)/Makefile.common + +Once the plugin is compiled, code using it may be compiled using ``llc +-load=MyGC.so`` (though MyGC.so may have some other platform-specific +extension): + +:: + + $ cat sample.ll + define void @f() gc "mygc" { + entry: + ret void + } + $ llvm-as < sample.ll | llc -load=MyGC.so + +It is also possible to statically link the collector plugin into tools, such as +a language-specific compiler front-end. + +.. _collector-algos: + +Overview of available features +------------------------------ + +``GCStrategy`` provides a range of features through which a plugin may do useful +work. Some of these are callbacks, some are algorithms that can be enabled, +disabled, or customized. This matrix summarizes the supported (and planned) +features and correlates them with the collection techniques which typically +require them. + +.. |v| unicode:: 0x2714 + :trim: + +.. |x| unicode:: 0x2718 + :trim: + ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| Algorithm | Done | Shadow | refcount | mark- | copying | incremental | threaded | concurrent | +| | | stack | | sweep | | | | | ++============+======+========+==========+=======+=========+=============+==========+============+ +| stack map | |v| | | | |x| | |x| | |x| | |x| | |x| | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| initialize | |v| | |x| | |x| | |x| | |x| | |x| | |x| | |x| | +| roots | | | | | | | | | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| derived | NO | | | | | | **N**\* | **N**\* | +| pointers | | | | | | | | | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| **custom | |v| | | | | | | | | +| lowering** | | | | | | | | | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| *gcroot* | |v| | |x| | |x| | | | | | | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| *gcwrite* | |v| | | |x| | | | |x| | | |x| | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| *gcread* | |v| | | | | | | | |x| | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| **safe | | | | | | | | | +| points** | | | | | | | | | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| *in | |v| | | | |x| | |x| | |x| | |x| | |x| | +| calls* | | | | | | | | | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| *before | |v| | | | | | | |x| | |x| | +| calls* | | | | | | | | | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| *for | NO | | | | | | **N** | **N** | +| loops* | | | | | | | | | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| *before | |v| | | | | | | |x| | |x| | +| escape* | | | | | | | | | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| emit code | NO | | | | | | **N** | **N** | +| at safe | | | | | | | | | +| points | | | | | | | | | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| **output** | | | | | | | | | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| *assembly* | |v| | | | |x| | |x| | |x| | |x| | |x| | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| *JIT* | NO | | | **?** | **?** | **?** | **?** | **?** | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| *obj* | NO | | | **?** | **?** | **?** | **?** | **?** | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| live | NO | | | **?** | **?** | **?** | **?** | **?** | +| analysis | | | | | | | | | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| register | NO | | | **?** | **?** | **?** | **?** | **?** | +| map | | | | | | | | | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| \* Derived pointers only pose a hasard to copying collections. | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ +| **?** denotes a feature which could be utilized if available. | ++------------+------+--------+----------+-------+---------+-------------+----------+------------+ + +To be clear, the collection techniques above are defined as: + +Shadow Stack + The mutator carefully maintains a linked list of stack roots. + +Reference Counting + The mutator maintains a reference count for each object and frees an object + when its count falls to zero. + +Mark-Sweep + When the heap is exhausted, the collector marks reachable objects starting + from the roots, then deallocates unreachable objects in a sweep phase. + +Copying + As reachability analysis proceeds, the collector copies objects from one heap + area to another, compacting them in the process. Copying collectors enable + highly efficient "bump pointer" allocation and can improve locality of + reference. + +Incremental + (Including generational collectors.) Incremental collectors generally have all + the properties of a copying collector (regardless of whether the mature heap + is compacting), but bring the added complexity of requiring write barriers. + +Threaded + Denotes a multithreaded mutator; the collector must still stop the mutator + ("stop the world") before beginning reachability analysis. Stopping a + multithreaded mutator is a complicated problem. It generally requires highly + platform specific code in the runtime, and the production of carefully + designed machine code at safe points. + +Concurrent + In this technique, the mutator and the collector run concurrently, with the + goal of eliminating pause times. In a *cooperative* collector, the mutator + further aids with collection should a pause occur, allowing collection to take + advantage of multiprocessor hosts. The "stop the world" problem of threaded + collectors is generally still present to a limited extent. Sophisticated + marking algorithms are necessary. Read barriers may be necessary. + +As the matrix indicates, LLVM's garbage collection infrastructure is already +suitable for a wide variety of collectors, but does not currently extend to +multithreaded programs. This will be added in the future as there is +interest. + +.. _stack-map: + +Computing stack maps +-------------------- + +LLVM automatically computes a stack map. One of the most important features +of a ``GCStrategy`` is to compile this information into the executable in +the binary representation expected by the runtime library. + +The stack map consists of the location and identity of each GC root in the +each function in the module. For each root: + +* ``RootNum``: The index of the root. + +* ``StackOffset``: The offset of the object relative to the frame pointer. + +* ``RootMetadata``: The value passed as the ``%metadata`` parameter to the + ``@llvm.gcroot`` intrinsic. + +Also, for the function as a whole: + +* ``getFrameSize()``: The overall size of the function's initial stack frame, + not accounting for any dynamic allocation. + +* ``roots_size()``: The count of roots in the function. + +To access the stack map, use ``GCFunctionMetadata::roots_begin()`` and +-``end()`` from the :ref:`GCMetadataPrinter `: + +.. code-block:: c++ + + for (iterator I = begin(), E = end(); I != E; ++I) { + GCFunctionInfo *FI = *I; + unsigned FrameSize = FI->getFrameSize(); + size_t RootCount = FI->roots_size(); + + for (GCFunctionInfo::roots_iterator RI = FI->roots_begin(), + RE = FI->roots_end(); + RI != RE; ++RI) { + int RootNum = RI->Num; + int RootStackOffset = RI->StackOffset; + Constant *RootMetadata = RI->Metadata; + } + } + +If the ``llvm.gcroot`` intrinsic is eliminated before code generation by a +custom lowering pass, LLVM will compute an empty stack map. This may be useful +for collector plugins which implement reference counting or a shadow stack. + +.. _init-roots: + +Initializing roots to null: ``InitRoots`` +----------------------------------------- + +.. code-block:: c++ + + MyGC::MyGC() { + InitRoots = true; + } + +When set, LLVM will automatically initialize each root to ``null`` upon entry to +the function. This prevents the GC's sweep phase from visiting uninitialized +pointers, which will almost certainly cause it to crash. This initialization +occurs before custom lowering, so the two may be used together. + +Since LLVM does not yet compute liveness information, there is no means of +distinguishing an uninitialized stack root from an initialized one. Therefore, +this feature should be used by all GC plugins. It is enabled by default. + +Custom lowering of intrinsics: ``CustomRoots``, ``CustomReadBarriers``, and ``CustomWriteBarriers`` +--------------------------------------------------------------------------------------------------- + +For GCs which use barriers or unusual treatment of stack roots, these flags +allow the collector to perform arbitrary transformations of the LLVM IR: + +.. code-block:: c++ + + class MyGC : public GCStrategy { + public: + MyGC() { + CustomRoots = true; + CustomReadBarriers = true; + CustomWriteBarriers = true; + } + + virtual bool initializeCustomLowering(Module &M); + virtual bool performCustomLowering(Function &F); + }; + +If any of these flags are set, then LLVM suppresses its default lowering for the +corresponding intrinsics and instead calls ``performCustomLowering``. + +LLVM's default action for each intrinsic is as follows: + +* ``llvm.gcroot``: Leave it alone. The code generator must see it or the stack + map will not be computed. + +* ``llvm.gcread``: Substitute a ``load`` instruction. + +* ``llvm.gcwrite``: Substitute a ``store`` instruction. + +If ``CustomReadBarriers`` or ``CustomWriteBarriers`` are specified, then +``performCustomLowering`` **must** eliminate the corresponding barriers. + +``performCustomLowering`` must comply with the same restrictions as +:ref:`FunctionPass::runOnFunction ` +Likewise, ``initializeCustomLowering`` has the same semantics as +:ref:`Pass::doInitialization(Module&) +` + +The following can be used as a template: + +.. code-block:: c++ + + #include "llvm/IR/Module.h" + #include "llvm/IR/IntrinsicInst.h" + + bool MyGC::initializeCustomLowering(Module &M) { + return false; + } + + bool MyGC::performCustomLowering(Function &F) { + bool MadeChange = false; + + for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) + for (BasicBlock::iterator II = BB->begin(), E = BB->end(); II != E; ) + if (IntrinsicInst *CI = dyn_cast(II++)) + if (Function *F = CI->getCalledFunction()) + switch (F->getIntrinsicID()) { + case Intrinsic::gcwrite: + // Handle llvm.gcwrite. + CI->eraseFromParent(); + MadeChange = true; + break; + case Intrinsic::gcread: + // Handle llvm.gcread. + CI->eraseFromParent(); + MadeChange = true; + break; + case Intrinsic::gcroot: + // Handle llvm.gcroot. + CI->eraseFromParent(); + MadeChange = true; + break; + } + + return MadeChange; + } + +.. _safe-points: + +Generating safe points: ``NeededSafePoints`` +-------------------------------------------- + +LLVM can compute four kinds of safe points: + +.. code-block:: c++ + + namespace GC { + /// PointKind - The type of a collector-safe point. + /// + enum PointKind { + Loop, //< Instr is a loop (backwards branch). + Return, //< Instr is a return instruction. + PreCall, //< Instr is a call instruction. + PostCall //< Instr is the return address of a call. + }; + } + +A collector can request any combination of the four by setting the +``NeededSafePoints`` mask: + +.. code-block:: c++ + + MyGC::MyGC() { + NeededSafePoints = 1 << GC::Loop + | 1 << GC::Return + | 1 << GC::PreCall + | 1 << GC::PostCall; + } + +It can then use the following routines to access safe points. + +.. code-block:: c++ + + for (iterator I = begin(), E = end(); I != E; ++I) { + GCFunctionInfo *MD = *I; + size_t PointCount = MD->size(); + + for (GCFunctionInfo::iterator PI = MD->begin(), + PE = MD->end(); PI != PE; ++PI) { + GC::PointKind PointKind = PI->Kind; + unsigned PointNum = PI->Num; + } + } + +Almost every collector requires ``PostCall`` safe points, since these correspond +to the moments when the function is suspended during a call to a subroutine. + +Threaded programs generally require ``Loop`` safe points to guarantee that the +application will reach a safe point within a bounded amount of time, even if it +is executing a long-running loop which contains no function calls. + +Threaded collectors may also require ``Return`` and ``PreCall`` safe points to +implement "stop the world" techniques using self-modifying code, where it is +important that the program not exit the function without reaching a safe point +(because only the topmost function has been patched). + +.. _assembly: + +Emitting assembly code: ``GCMetadataPrinter`` +--------------------------------------------- + +LLVM allows a plugin to print arbitrary assembly code before and after the rest +of a module's assembly code. At the end of the module, the GC can compile the +LLVM stack map into assembly code. (At the beginning, this information is not +yet computed.) + +Since AsmWriter and CodeGen are separate components of LLVM, a separate abstract +base class and registry is provided for printing assembly code, the +``GCMetadaPrinter`` and ``GCMetadataPrinterRegistry``. The AsmWriter will look +for such a subclass if the ``GCStrategy`` sets ``UsesMetadata``: + +.. code-block:: c++ + + MyGC::MyGC() { + UsesMetadata = true; + } + +This separation allows JIT-only clients to be smaller. + +Note that LLVM does not currently have analogous APIs to support code generation +in the JIT, nor using the object writers. + +.. code-block:: c++ + + // lib/MyGC/MyGCPrinter.cpp - Example LLVM GC printer + + #include "llvm/CodeGen/GCMetadataPrinter.h" + #include "llvm/Support/Compiler.h" + + using namespace llvm; + + namespace { + class LLVM_LIBRARY_VISIBILITY MyGCPrinter : public GCMetadataPrinter { + public: + virtual void beginAssembly(AsmPrinter &AP); + + virtual void finishAssembly(AsmPrinter &AP); + }; + + GCMetadataPrinterRegistry::Add + X("mygc", "My bespoke garbage collector."); + } + +The collector should use ``AsmPrinter`` to print portable assembly code. The +collector itself contains the stack map for the entire module, and may access +the ``GCFunctionInfo`` using its own ``begin()`` and ``end()`` methods. Here's +a realistic example: + +.. code-block:: c++ + + #include "llvm/CodeGen/AsmPrinter.h" + #include "llvm/IR/Function.h" + #include "llvm/IR/DataLayout.h" + #include "llvm/Target/TargetAsmInfo.h" + #include "llvm/Target/TargetMachine.h" + + void MyGCPrinter::beginAssembly(AsmPrinter &AP) { + // Nothing to do. + } + + void MyGCPrinter::finishAssembly(AsmPrinter &AP) { + MCStreamer &OS = AP.OutStreamer; + unsigned IntPtrSize = AP.TM.getDataLayout()->getPointerSize(); + + // Put this in the data section. + OS.SwitchSection(AP.getObjFileLowering().getDataSection()); + + // For each function... + for (iterator FI = begin(), FE = end(); FI != FE; ++FI) { + GCFunctionInfo &MD = **FI; + + // A compact GC layout. Emit this data structure: + // + // struct { + // int32_t PointCount; + // void *SafePointAddress[PointCount]; + // int32_t StackFrameSize; // in words + // int32_t StackArity; + // int32_t LiveCount; + // int32_t LiveOffsets[LiveCount]; + // } __gcmap_; + + // Align to address width. + AP.EmitAlignment(IntPtrSize == 4 ? 2 : 3); + + // Emit PointCount. + OS.AddComment("safe point count"); + AP.EmitInt32(MD.size()); + + // And each safe point... + for (GCFunctionInfo::iterator PI = MD.begin(), + PE = MD.end(); PI != PE; ++PI) { + // Emit the address of the safe point. + OS.AddComment("safe point address"); + MCSymbol *Label = PI->Label; + AP.EmitLabelPlusOffset(Label/*Hi*/, 0/*Offset*/, 4/*Size*/); + } + + // Stack information never change in safe points! Only print info from the + // first call-site. + GCFunctionInfo::iterator PI = MD.begin(); + + // Emit the stack frame size. + OS.AddComment("stack frame size (in words)"); + AP.EmitInt32(MD.getFrameSize() / IntPtrSize); + + // Emit stack arity, i.e. the number of stacked arguments. + unsigned RegisteredArgs = IntPtrSize == 4 ? 5 : 6; + unsigned StackArity = MD.getFunction().arg_size() > RegisteredArgs ? + MD.getFunction().arg_size() - RegisteredArgs : 0; + OS.AddComment("stack arity"); + AP.EmitInt32(StackArity); + + // Emit the number of live roots in the function. + OS.AddComment("live root count"); + AP.EmitInt32(MD.live_size(PI)); + + // And for each live root... + for (GCFunctionInfo::live_iterator LI = MD.live_begin(PI), + LE = MD.live_end(PI); + LI != LE; ++LI) { + // Emit live root's offset within the stack frame. + OS.AddComment("stack index (offset / wordsize)"); + AP.EmitInt32(LI->StackOffset); + } + } + } + +References +========== + +.. _appel89: + +[Appel89] Runtime Tags Aren't Necessary. Andrew W. Appel. Lisp and Symbolic +Computation 19(7):703-705, July 1989. + +.. _goldberg91: + +[Goldberg91] Tag-free garbage collection for strongly typed programming +languages. Benjamin Goldberg. ACM SIGPLAN PLDI'91. + +.. _tolmach94: + +[Tolmach94] Tag-free garbage collection using explicit type parameters. Andrew +Tolmach. Proceedings of the 1994 ACM conference on LISP and functional +programming. + +.. _henderson02: + +[Henderson2002] `Accurate Garbage Collection in an Uncooperative Environment +`__ diff --git a/docs/GetElementPtr.rst b/docs/GetElementPtr.rst new file mode 100644 index 00000000..306a2a87 --- /dev/null +++ b/docs/GetElementPtr.rst @@ -0,0 +1,536 @@ +======================================= +The Often Misunderstood GEP Instruction +======================================= + +.. contents:: + :local: + +Introduction +============ + +This document seeks to dispel the mystery and confusion surrounding LLVM's +`GetElementPtr `_ (GEP) instruction. Questions +about the wily GEP instruction are probably the most frequently occurring +questions once a developer gets down to coding with LLVM. Here we lay out the +sources of confusion and show that the GEP instruction is really quite simple. + +Address Computation +=================== + +When people are first confronted with the GEP instruction, they tend to relate +it to known concepts from other programming paradigms, most notably C array +indexing and field selection. GEP closely resembles C array indexing and field +selection, however it is a little different and this leads to the following +questions. + +What is the first index of the GEP instruction? +----------------------------------------------- + +Quick answer: The index stepping through the first operand. + +The confusion with the first index usually arises from thinking about the +GetElementPtr instruction as if it was a C index operator. They aren't the +same. For example, when we write, in "C": + +.. code-block:: c++ + + AType *Foo; + ... + X = &Foo->F; + +it is natural to think that there is only one index, the selection of the field +``F``. However, in this example, ``Foo`` is a pointer. That pointer +must be indexed explicitly in LLVM. C, on the other hand, indices through it +transparently. To arrive at the same address location as the C code, you would +provide the GEP instruction with two index operands. The first operand indexes +through the pointer; the second operand indexes the field ``F`` of the +structure, just as if you wrote: + +.. code-block:: c++ + + X = &Foo[0].F; + +Sometimes this question gets rephrased as: + +.. _GEP index through first pointer: + + *Why is it okay to index through the first pointer, but subsequent pointers + won't be dereferenced?* + +The answer is simply because memory does not have to be accessed to perform the +computation. The first operand to the GEP instruction must be a value of a +pointer type. The value of the pointer is provided directly to the GEP +instruction as an operand without any need for accessing memory. It must, +therefore be indexed and requires an index operand. Consider this example: + +.. code-block:: c++ + + struct munger_struct { + int f1; + int f2; + }; + void munge(struct munger_struct *P) { + P[0].f1 = P[1].f1 + P[2].f2; + } + ... + munger_struct Array[3]; + ... + munge(Array); + +In this "C" example, the front end compiler (llvm-gcc) will generate three GEP +instructions for the three indices through "P" in the assignment statement. The +function argument ``P`` will be the first operand of each of these GEP +instructions. The second operand indexes through that pointer. The third +operand will be the field offset into the ``struct munger_struct`` type, for +either the ``f1`` or ``f2`` field. So, in LLVM assembly the ``munge`` function +looks like: + +.. code-block:: llvm + + void %munge(%struct.munger_struct* %P) { + entry: + %tmp = getelementptr %struct.munger_struct* %P, i32 1, i32 0 + %tmp = load i32* %tmp + %tmp6 = getelementptr %struct.munger_struct* %P, i32 2, i32 1 + %tmp7 = load i32* %tmp6 + %tmp8 = add i32 %tmp7, %tmp + %tmp9 = getelementptr %struct.munger_struct* %P, i32 0, i32 0 + store i32 %tmp8, i32* %tmp9 + ret void + } + +In each case the first operand is the pointer through which the GEP instruction +starts. The same is true whether the first operand is an argument, allocated +memory, or a global variable. + +To make this clear, let's consider a more obtuse example: + +.. code-block:: llvm + + %MyVar = uninitialized global i32 + ... + %idx1 = getelementptr i32* %MyVar, i64 0 + %idx2 = getelementptr i32* %MyVar, i64 1 + %idx3 = getelementptr i32* %MyVar, i64 2 + +These GEP instructions are simply making address computations from the base +address of ``MyVar``. They compute, as follows (using C syntax): + +.. code-block:: c++ + + idx1 = (char*) &MyVar + 0 + idx2 = (char*) &MyVar + 4 + idx3 = (char*) &MyVar + 8 + +Since the type ``i32`` is known to be four bytes long, the indices 0, 1 and 2 +translate into memory offsets of 0, 4, and 8, respectively. No memory is +accessed to make these computations because the address of ``%MyVar`` is passed +directly to the GEP instructions. + +The obtuse part of this example is in the cases of ``%idx2`` and ``%idx3``. They +result in the computation of addresses that point to memory past the end of the +``%MyVar`` global, which is only one ``i32`` long, not three ``i32``\s long. +While this is legal in LLVM, it is inadvisable because any load or store with +the pointer that results from these GEP instructions would produce undefined +results. + +Why is the extra 0 index required? +---------------------------------- + +Quick answer: there are no superfluous indices. + +This question arises most often when the GEP instruction is applied to a global +variable which is always a pointer type. For example, consider this: + +.. code-block:: llvm + + %MyStruct = uninitialized global { float*, i32 } + ... + %idx = getelementptr { float*, i32 }* %MyStruct, i64 0, i32 1 + +The GEP above yields an ``i32*`` by indexing the ``i32`` typed field of the +structure ``%MyStruct``. When people first look at it, they wonder why the ``i64 +0`` index is needed. However, a closer inspection of how globals and GEPs work +reveals the need. Becoming aware of the following facts will dispel the +confusion: + +#. The type of ``%MyStruct`` is *not* ``{ float*, i32 }`` but rather ``{ float*, + i32 }*``. That is, ``%MyStruct`` is a pointer to a structure containing a + pointer to a ``float`` and an ``i32``. + +#. Point #1 is evidenced by noticing the type of the first operand of the GEP + instruction (``%MyStruct``) which is ``{ float*, i32 }*``. + +#. The first index, ``i64 0`` is required to step over the global variable + ``%MyStruct``. Since the first argument to the GEP instruction must always + be a value of pointer type, the first index steps through that pointer. A + value of 0 means 0 elements offset from that pointer. + +#. The second index, ``i32 1`` selects the second field of the structure (the + ``i32``). + +What is dereferenced by GEP? +---------------------------- + +Quick answer: nothing. + +The GetElementPtr instruction dereferences nothing. That is, it doesn't access +memory in any way. That's what the Load and Store instructions are for. GEP is +only involved in the computation of addresses. For example, consider this: + +.. code-block:: llvm + + %MyVar = uninitialized global { [40 x i32 ]* } + ... + %idx = getelementptr { [40 x i32]* }* %MyVar, i64 0, i32 0, i64 0, i64 17 + +In this example, we have a global variable, ``%MyVar`` that is a pointer to a +structure containing a pointer to an array of 40 ints. The GEP instruction seems +to be accessing the 18th integer of the structure's array of ints. However, this +is actually an illegal GEP instruction. It won't compile. The reason is that the +pointer in the structure *must* be dereferenced in order to index into the +array of 40 ints. Since the GEP instruction never accesses memory, it is +illegal. + +In order to access the 18th integer in the array, you would need to do the +following: + +.. code-block:: llvm + + %idx = getelementptr { [40 x i32]* }* %, i64 0, i32 0 + %arr = load [40 x i32]** %idx + %idx = getelementptr [40 x i32]* %arr, i64 0, i64 17 + +In this case, we have to load the pointer in the structure with a load +instruction before we can index into the array. If the example was changed to: + +.. code-block:: llvm + + %MyVar = uninitialized global { [40 x i32 ] } + ... + %idx = getelementptr { [40 x i32] }*, i64 0, i32 0, i64 17 + +then everything works fine. In this case, the structure does not contain a +pointer and the GEP instruction can index through the global variable, into the +first field of the structure and access the 18th ``i32`` in the array there. + +Why don't GEP x,0,0,1 and GEP x,1 alias? +---------------------------------------- + +Quick Answer: They compute different address locations. + +If you look at the first indices in these GEP instructions you find that they +are different (0 and 1), therefore the address computation diverges with that +index. Consider this example: + +.. code-block:: llvm + + %MyVar = global { [10 x i32 ] } + %idx1 = getelementptr { [10 x i32 ] }* %MyVar, i64 0, i32 0, i64 1 + %idx2 = getelementptr { [10 x i32 ] }* %MyVar, i64 1 + +In this example, ``idx1`` computes the address of the second integer in the +array that is in the structure in ``%MyVar``, that is ``MyVar+4``. The type of +``idx1`` is ``i32*``. However, ``idx2`` computes the address of *the next* +structure after ``%MyVar``. The type of ``idx2`` is ``{ [10 x i32] }*`` and its +value is equivalent to ``MyVar + 40`` because it indexes past the ten 4-byte +integers in ``MyVar``. Obviously, in such a situation, the pointers don't +alias. + +Why do GEP x,1,0,0 and GEP x,1 alias? +------------------------------------- + +Quick Answer: They compute the same address location. + +These two GEP instructions will compute the same address because indexing +through the 0th element does not change the address. However, it does change the +type. Consider this example: + +.. code-block:: llvm + + %MyVar = global { [10 x i32 ] } + %idx1 = getelementptr { [10 x i32 ] }* %MyVar, i64 1, i32 0, i64 0 + %idx2 = getelementptr { [10 x i32 ] }* %MyVar, i64 1 + +In this example, the value of ``%idx1`` is ``%MyVar+40`` and its type is +``i32*``. The value of ``%idx2`` is also ``MyVar+40`` but its type is ``{ [10 x +i32] }*``. + +Can GEP index into vector elements? +----------------------------------- + +This hasn't always been forcefully disallowed, though it's not recommended. It +leads to awkward special cases in the optimizers, and fundamental inconsistency +in the IR. In the future, it will probably be outright disallowed. + +What effect do address spaces have on GEPs? +------------------------------------------- + +None, except that the address space qualifier on the first operand pointer type +always matches the address space qualifier on the result type. + +How is GEP different from ``ptrtoint``, arithmetic, and ``inttoptr``? +--------------------------------------------------------------------- + +It's very similar; there are only subtle differences. + +With ptrtoint, you have to pick an integer type. One approach is to pick i64; +this is safe on everything LLVM supports (LLVM internally assumes pointers are +never wider than 64 bits in many places), and the optimizer will actually narrow +the i64 arithmetic down to the actual pointer size on targets which don't +support 64-bit arithmetic in most cases. However, there are some cases where it +doesn't do this. With GEP you can avoid this problem. + +Also, GEP carries additional pointer aliasing rules. It's invalid to take a GEP +from one object, address into a different separately allocated object, and +dereference it. IR producers (front-ends) must follow this rule, and consumers +(optimizers, specifically alias analysis) benefit from being able to rely on +it. See the `Rules`_ section for more information. + +And, GEP is more concise in common cases. + +However, for the underlying integer computation implied, there is no +difference. + + +I'm writing a backend for a target which needs custom lowering for GEP. How do I do this? +----------------------------------------------------------------------------------------- + +You don't. The integer computation implied by a GEP is target-independent. +Typically what you'll need to do is make your backend pattern-match expressions +trees involving ADD, MUL, etc., which are what GEP is lowered into. This has the +advantage of letting your code work correctly in more cases. + +GEP does use target-dependent parameters for the size and layout of data types, +which targets can customize. + +If you require support for addressing units which are not 8 bits, you'll need to +fix a lot of code in the backend, with GEP lowering being only a small piece of +the overall picture. + +How does VLA addressing work with GEPs? +--------------------------------------- + +GEPs don't natively support VLAs. LLVM's type system is entirely static, and GEP +address computations are guided by an LLVM type. + +VLA indices can be implemented as linearized indices. For example, an expression +like ``X[a][b][c]``, must be effectively lowered into a form like +``X[a*m+b*n+c]``, so that it appears to the GEP as a single-dimensional array +reference. + +This means if you want to write an analysis which understands array indices and +you want to support VLAs, your code will have to be prepared to reverse-engineer +the linearization. One way to solve this problem is to use the ScalarEvolution +library, which always presents VLA and non-VLA indexing in the same manner. + +.. _Rules: + +Rules +===== + +What happens if an array index is out of bounds? +------------------------------------------------ + +There are two senses in which an array index can be out of bounds. + +First, there's the array type which comes from the (static) type of the first +operand to the GEP. Indices greater than the number of elements in the +corresponding static array type are valid. There is no problem with out of +bounds indices in this sense. Indexing into an array only depends on the size of +the array element, not the number of elements. + +A common example of how this is used is arrays where the size is not known. +It's common to use array types with zero length to represent these. The fact +that the static type says there are zero elements is irrelevant; it's perfectly +valid to compute arbitrary element indices, as the computation only depends on +the size of the array element, not the number of elements. Note that zero-sized +arrays are not a special case here. + +This sense is unconnected with ``inbounds`` keyword. The ``inbounds`` keyword is +designed to describe low-level pointer arithmetic overflow conditions, rather +than high-level array indexing rules. + +Analysis passes which wish to understand array indexing should not assume that +the static array type bounds are respected. + +The second sense of being out of bounds is computing an address that's beyond +the actual underlying allocated object. + +With the ``inbounds`` keyword, the result value of the GEP is undefined if the +address is outside the actual underlying allocated object and not the address +one-past-the-end. + +Without the ``inbounds`` keyword, there are no restrictions on computing +out-of-bounds addresses. Obviously, performing a load or a store requires an +address of allocated and sufficiently aligned memory. But the GEP itself is only +concerned with computing addresses. + +Can array indices be negative? +------------------------------ + +Yes. This is basically a special case of array indices being out of bounds. + +Can I compare two values computed with GEPs? +-------------------------------------------- + +Yes. If both addresses are within the same allocated object, or +one-past-the-end, you'll get the comparison result you expect. If either is +outside of it, integer arithmetic wrapping may occur, so the comparison may not +be meaningful. + +Can I do GEP with a different pointer type than the type of the underlying object? +---------------------------------------------------------------------------------- + +Yes. There are no restrictions on bitcasting a pointer value to an arbitrary +pointer type. The types in a GEP serve only to define the parameters for the +underlying integer computation. They need not correspond with the actual type of +the underlying object. + +Furthermore, loads and stores don't have to use the same types as the type of +the underlying object. Types in this context serve only to specify memory size +and alignment. Beyond that there are merely a hint to the optimizer indicating +how the value will likely be used. + +Can I cast an object's address to integer and add it to null? +------------------------------------------------------------- + +You can compute an address that way, but if you use GEP to do the add, you can't +use that pointer to actually access the object, unless the object is managed +outside of LLVM. + +The underlying integer computation is sufficiently defined; null has a defined +value --- zero --- and you can add whatever value you want to it. + +However, it's invalid to access (load from or store to) an LLVM-aware object +with such a pointer. This includes ``GlobalVariables``, ``Allocas``, and objects +pointed to by noalias pointers. + +If you really need this functionality, you can do the arithmetic with explicit +integer instructions, and use inttoptr to convert the result to an address. Most +of GEP's special aliasing rules do not apply to pointers computed from ptrtoint, +arithmetic, and inttoptr sequences. + +Can I compute the distance between two objects, and add that value to one address to compute the other address? +--------------------------------------------------------------------------------------------------------------- + +As with arithmetic on null, you can use GEP to compute an address that way, but +you can't use that pointer to actually access the object if you do, unless the +object is managed outside of LLVM. + +Also as above, ptrtoint and inttoptr provide an alternative way to do this which +do not have this restriction. + +Can I do type-based alias analysis on LLVM IR? +---------------------------------------------- + +You can't do type-based alias analysis using LLVM's built-in type system, +because LLVM has no restrictions on mixing types in addressing, loads or stores. + +LLVM's type-based alias analysis pass uses metadata to describe a different type +system (such as the C type system), and performs type-based aliasing on top of +that. Further details are in the `language reference `_. + +What happens if a GEP computation overflows? +-------------------------------------------- + +If the GEP lacks the ``inbounds`` keyword, the value is the result from +evaluating the implied two's complement integer computation. However, since +there's no guarantee of where an object will be allocated in the address space, +such values have limited meaning. + +If the GEP has the ``inbounds`` keyword, the result value is undefined (a "trap +value") if the GEP overflows (i.e. wraps around the end of the address space). + +As such, there are some ramifications of this for inbounds GEPs: scales implied +by array/vector/pointer indices are always known to be "nsw" since they are +signed values that are scaled by the element size. These values are also +allowed to be negative (e.g. "``gep i32 *%P, i32 -1``") but the pointer itself +is logically treated as an unsigned value. This means that GEPs have an +asymmetric relation between the pointer base (which is treated as unsigned) and +the offset applied to it (which is treated as signed). The result of the +additions within the offset calculation cannot have signed overflow, but when +applied to the base pointer, there can be signed overflow. + +How can I tell if my front-end is following the rules? +------------------------------------------------------ + +There is currently no checker for the getelementptr rules. Currently, the only +way to do this is to manually check each place in your front-end where +GetElementPtr operators are created. + +It's not possible to write a checker which could find all rule violations +statically. It would be possible to write a checker which works by instrumenting +the code with dynamic checks though. Alternatively, it would be possible to +write a static checker which catches a subset of possible problems. However, no +such checker exists today. + +Rationale +========= + +Why is GEP designed this way? +----------------------------- + +The design of GEP has the following goals, in rough unofficial order of +priority: + +* Support C, C-like languages, and languages which can be conceptually lowered + into C (this covers a lot). + +* Support optimizations such as those that are common in C compilers. In + particular, GEP is a cornerstone of LLVM's `pointer aliasing + model `_. + +* Provide a consistent method for computing addresses so that address + computations don't need to be a part of load and store instructions in the IR. + +* Support non-C-like languages, to the extent that it doesn't interfere with + other goals. + +* Minimize target-specific information in the IR. + +Why do struct member indices always use ``i32``? +------------------------------------------------ + +The specific type i32 is probably just a historical artifact, however it's wide +enough for all practical purposes, so there's been no need to change it. It +doesn't necessarily imply i32 address arithmetic; it's just an identifier which +identifies a field in a struct. Requiring that all struct indices be the same +reduces the range of possibilities for cases where two GEPs are effectively the +same but have distinct operand types. + +What's an uglygep? +------------------ + +Some LLVM optimizers operate on GEPs by internally lowering them into more +primitive integer expressions, which allows them to be combined with other +integer expressions and/or split into multiple separate integer expressions. If +they've made non-trivial changes, translating back into LLVM IR can involve +reverse-engineering the structure of the addressing in order to fit it into the +static type of the original first operand. It isn't always possibly to fully +reconstruct this structure; sometimes the underlying addressing doesn't +correspond with the static type at all. In such cases the optimizer instead will +emit a GEP with the base pointer casted to a simple address-unit pointer, using +the name "uglygep". This isn't pretty, but it's just as valid, and it's +sufficient to preserve the pointer aliasing guarantees that GEP provides. + +Summary +======= + +In summary, here's some things to always remember about the GetElementPtr +instruction: + + +#. The GEP instruction never accesses memory, it only provides pointer + computations. + +#. The first operand to the GEP instruction is always a pointer and it must be + indexed. + +#. There are no superfluous indices for the GEP instruction. + +#. Trailing zero indices are superfluous for pointer aliasing, but not for the + types of the pointers. + +#. Leading zero indices are not superfluous for pointer aliasing nor the types + of the pointers. diff --git a/docs/GettingStarted.rst b/docs/GettingStarted.rst new file mode 100644 index 00000000..2a6b6379 --- /dev/null +++ b/docs/GettingStarted.rst @@ -0,0 +1,1383 @@ +==================================== +Getting Started with the LLVM System +==================================== + +.. contents:: + :local: + +Overview +======== + +Welcome to LLVM! In order to get started, you first need to know some basic +information. + +First, LLVM comes in three pieces. The first piece is the LLVM suite. This +contains all of the tools, libraries, and header files needed to use LLVM. It +contains an assembler, disassembler, bitcode analyzer and bitcode optimizer. It +also contains basic regression tests that can be used to test the LLVM tools and +the Clang front end. + +The second piece is the `Clang `_ front end. This +component compiles C, C++, Objective C, and Objective C++ code into LLVM +bitcode. Once compiled into LLVM bitcode, a program can be manipulated with the +LLVM tools from the LLVM suite. + +There is a third, optional piece called Test Suite. It is a suite of programs +with a testing harness that can be used to further test LLVM's functionality +and performance. + +Getting Started Quickly (A Summary) +=================================== + +The LLVM Getting Started documentation may be out of date. So, the `Clang +Getting Started `_ page might also be a +good place to start. + +Here's the short story for getting up and running quickly with LLVM: + +#. Read the documentation. +#. Read the documentation. +#. Remember that you were warned twice about reading the documentation. +#. Checkout LLVM: + + * ``cd where-you-want-llvm-to-live`` + * ``svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm`` + +#. Checkout Clang: + + * ``cd where-you-want-llvm-to-live`` + * ``cd llvm/tools`` + * ``svn co http://llvm.org/svn/llvm-project/cfe/trunk clang`` + +#. Checkout Compiler-RT: + + * ``cd where-you-want-llvm-to-live`` + * ``cd llvm/projects`` + * ``svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt`` + +#. Get the Test Suite Source Code **[Optional]** + + * ``cd where-you-want-llvm-to-live`` + * ``cd llvm/projects`` + * ``svn co http://llvm.org/svn/llvm-project/test-suite/trunk test-suite`` + +#. Configure and build LLVM and Clang: + + * ``cd where-you-want-to-build-llvm`` + * ``mkdir build`` (for building without polluting the source dir) + * ``cd build`` + * ``../llvm/configure [options]`` + Some common options: + + * ``--prefix=directory`` --- Specify for *directory* the full pathname of + where you want the LLVM tools and libraries to be installed (default + ``/usr/local``). + + * ``--enable-optimized`` --- Compile with optimizations enabled (default + is NO). + + * ``--enable-assertions`` --- Compile with assertion checks enabled + (default is YES). + + * ``make [-j]`` --- The ``-j`` specifies the number of jobs (commands) to run + simultaneously. This builds both LLVM and Clang for Debug+Asserts mode. + The ``--enable-optimized`` configure option is used to specify a Release + build. + + * ``make check-all`` --- This run the regression tests to ensure everything + is in working order. + + * ``make update`` --- This command is used to update all the svn repositories + at once, rather then having to ``cd`` into the individual repositories and + running ``svn update``. + + * It is also possible to use CMake instead of the makefiles. With CMake it is + possible to generate project files for several IDEs: Xcode, Eclipse CDT4, + CodeBlocks, Qt-Creator (use the CodeBlocks generator), KDevelop3. + + * If you get an "internal compiler error (ICE)" or test failures, see + `below`. + +Consult the `Getting Started with LLVM`_ section for detailed information on +configuring and compiling LLVM. See `Setting Up Your Environment`_ for tips +that simplify working with the Clang front end and LLVM tools. Go to `Program +Layout`_ to learn about the layout of the source code tree. + +Requirements +============ + +Before you begin to use the LLVM system, review the requirements given below. +This may save you some trouble by knowing ahead of time what hardware and +software you will need. + +Hardware +-------- + +LLVM is known to work on the following platforms: + ++-----------------+----------------------+-------------------------+ +|OS | Arch | Compilers | ++=================+======================+=========================+ +|AuroraUX | x86\ :sup:`1` | GCC | ++-----------------+----------------------+-------------------------+ +|Linux | x86\ :sup:`1` | GCC | ++-----------------+----------------------+-------------------------+ +|Linux | amd64 | GCC | ++-----------------+----------------------+-------------------------+ +|Linux | ARM\ :sup:`13` | GCC | ++-----------------+----------------------+-------------------------+ +|Solaris | V9 (Ultrasparc) | GCC | ++-----------------+----------------------+-------------------------+ +|FreeBSD | x86\ :sup:`1` | GCC | ++-----------------+----------------------+-------------------------+ +|FreeBSD | amd64 | GCC | ++-----------------+----------------------+-------------------------+ +|MacOS X\ :sup:`2`| PowerPC | GCC | ++-----------------+----------------------+-------------------------+ +|MacOS X\ :sup:`9`| x86 | GCC | ++-----------------+----------------------+-------------------------+ +|Cygwin/Win32 | x86\ :sup:`1, 8, 11` | GCC 3.4.X, binutils 2.20| ++-----------------+----------------------+-------------------------+ + +LLVM has partial support for the following platforms: + ++-------------------+----------------------+-------------------------------------------+ +|OS | Arch | Compilers | ++===================+======================+===========================================+ +| Windows | x86\ :sup:`1` | Visual Studio 2000 or higher\ :sup:`4,5` | ++-------------------+----------------------+-------------------------------------------+ +| AIX\ :sup:`3,4` | PowerPC | GCC | ++-------------------+----------------------+-------------------------------------------+ +| Linux\ :sup:`3,5` | PowerPC | GCC | ++-------------------+----------------------+-------------------------------------------+ +| Linux\ :sup:`7` | Alpha | GCC | ++-------------------+----------------------+-------------------------------------------+ +| Linux\ :sup:`7` | Itanium (IA-64) | GCC | ++-------------------+----------------------+-------------------------------------------+ +| HP-UX\ :sup:`7` | Itanium (IA-64) | HP aCC | ++-------------------+----------------------+-------------------------------------------+ +| Windows x64 | x86-64 | mingw-w64's GCC-4.5.x\ :sup:`12` | ++-------------------+----------------------+-------------------------------------------+ + +.. note:: + + #. Code generation supported for Pentium processors and up + #. Code generation supported for 32-bit ABI only + #. No native code generation + #. Build is not complete: one or more tools do not link or function + #. The GCC-based C/C++ frontend does not build + #. The port is done using the MSYS shell. + #. Native code generation exists but is not complete. + #. Binutils 2.20 or later is required to build the assembler generated by LLVM properly. + #. Xcode 2.5 and gcc 4.0.1 (Apple Build 5370) will trip internal LLVM assert + messages when compiled for Release at optimization levels greater than 0 + (i.e., ``-O1`` and higher). Add ``OPTIMIZE_OPTION="-O0"`` to the build + command line if compiling for LLVM Release or bootstrapping the LLVM + toolchain. + #. For MSYS/MinGW on Windows, be sure to install the MSYS version of the perl + package, and be sure it appears in your path before any Windows-based + versions such as Strawberry Perl and ActivePerl, as these have + Windows-specifics that will cause the build to fail. + #. To use LLVM modules on Win32-based system, you may configure LLVM + with ``--enable-shared``. + #. To compile SPU backend, you need to add ``LDFLAGS=-Wl,--stack,16777216`` to + configure. + #. MCJIT not working well pre-v7, old JIT engine not supported any more. + +Note that you will need about 1-3 GB of space for a full LLVM build in Debug +mode, depending on the system (it is so large because of all the debugging +information and the fact that the libraries are statically linked into multiple +tools). If you do not need many of the tools and you are space-conscious, you +can pass ``ONLY_TOOLS="tools you need"`` to make. The Release build requires +considerably less space. + +The LLVM suite *may* compile on other platforms, but it is not guaranteed to do +so. If compilation is successful, the LLVM utilities should be able to +assemble, disassemble, analyze, and optimize LLVM bitcode. Code generation +should work as well, although the generated native code may not work on your +platform. + +Software +-------- + +Compiling LLVM requires that you have several software packages installed. The +table below lists those required packages. The Package column is the usual name +for the software package that LLVM depends on. The Version column provides +"known to work" versions of the package. The Notes column describes how LLVM +uses the package and provides other details. + ++--------------------------------------------------------------+-----------------+---------------------------------------------+ +| Package | Version | Notes | ++==============================================================+=================+=============================================+ +| `GNU Make `_ | 3.79, 3.79.1 | Makefile/build processor | ++--------------------------------------------------------------+-----------------+---------------------------------------------+ +| `GCC `_ | 3.4.2 | C/C++ compiler\ :sup:`1` | ++--------------------------------------------------------------+-----------------+---------------------------------------------+ +| `TeXinfo `_ | 4.5 | For building the CFE | ++--------------------------------------------------------------+-----------------+---------------------------------------------+ +| `SVN `_ | >=1.3 | Subversion access to LLVM\ :sup:`2` | ++--------------------------------------------------------------+-----------------+---------------------------------------------+ +| `python `_ | >=2.5 | Automated test suite\ :sup:`3` | ++--------------------------------------------------------------+-----------------+---------------------------------------------+ +| `GNU M4 `_ | 1.4 | Macro processor for configuration\ :sup:`4` | ++--------------------------------------------------------------+-----------------+---------------------------------------------+ +| `GNU Autoconf `_ | 2.60 | Configuration script builder\ :sup:`4` | ++--------------------------------------------------------------+-----------------+---------------------------------------------+ +| `GNU Automake `_ | 1.9.6 | aclocal macro generator\ :sup:`4` | ++--------------------------------------------------------------+-----------------+---------------------------------------------+ +| `libtool `_ | 1.5.22 | Shared library manager\ :sup:`4` | ++--------------------------------------------------------------+-----------------+---------------------------------------------+ +| `zlib `_ | >=1.2.3.4 | Compression library\ :sup:`5` | ++--------------------------------------------------------------+-----------------+---------------------------------------------+ + +.. note:: + + #. Only the C and C++ languages are needed so there's no need to build the + other languages for LLVM's purposes. See `below` for specific version + info. + #. You only need Subversion if you intend to build from the latest LLVM + sources. If you're working from a release distribution, you don't need + Subversion. + #. Only needed if you want to run the automated test suite in the + ``llvm/test`` directory. + #. If you want to make changes to the configure scripts, you will need GNU + autoconf (2.60), and consequently, GNU M4 (version 1.4 or higher). You + will also need automake (1.9.6). We only use aclocal from that package. + #. Optional, adds compression/uncompression capabilities to selected LLVM + tools. + +Additionally, your compilation host is expected to have the usual plethora of +Unix utilities. Specifically: + +* **ar** --- archive library builder +* **bzip2** --- bzip2 command for distribution generation +* **bunzip2** --- bunzip2 command for distribution checking +* **chmod** --- change permissions on a file +* **cat** --- output concatenation utility +* **cp** --- copy files +* **date** --- print the current date/time +* **echo** --- print to standard output +* **egrep** --- extended regular expression search utility +* **find** --- find files/dirs in a file system +* **grep** --- regular expression search utility +* **gzip** --- gzip command for distribution generation +* **gunzip** --- gunzip command for distribution checking +* **install** --- install directories/files +* **mkdir** --- create a directory +* **mv** --- move (rename) files +* **ranlib** --- symbol table builder for archive libraries +* **rm** --- remove (delete) files and directories +* **sed** --- stream editor for transforming output +* **sh** --- Bourne shell for make build scripts +* **tar** --- tape archive for distribution generation +* **test** --- test things in file system +* **unzip** --- unzip command for distribution checking +* **zip** --- zip command for distribution generation + +.. _below: +.. _check here: + +Broken versions of GCC and other tools +-------------------------------------- + +LLVM is very demanding of the host C++ compiler, and as such tends to expose +bugs in the compiler. In particular, several versions of GCC crash when trying +to compile LLVM. We routinely use GCC 4.2 (and higher) or Clang. Other +versions of GCC will probably work as well. GCC versions listed here are known +to not work. If you are using one of these versions, please try to upgrade your +GCC to something more recent. If you run into a problem with a version of GCC +not listed here, please `let us know `_. Please use +the "``gcc -v``" command to find out which version of GCC you are using. + +**GCC versions prior to 3.0**: GCC 2.96.x and before had several problems in the +STL that effectively prevent it from compiling LLVM. + +**GCC 3.2.2 and 3.2.3**: These versions of GCC fails to compile LLVM with a +bogus template error. This was fixed in later GCCs. + +**GCC 3.3.2**: This version of GCC suffered from a `serious bug +`_ which causes it to crash in the +"``convert_from_eh_region_ranges_1``" GCC function. + +**Cygwin GCC 3.3.3**: The version of GCC 3.3.3 commonly shipped with Cygwin does +not work. + +**SuSE GCC 3.3.3**: The version of GCC 3.3.3 shipped with SuSE 9.1 (and possibly +others) does not compile LLVM correctly (it appears that exception handling is +broken in some cases). Please download the FSF 3.3.3 or upgrade to a newer +version of GCC. + +**GCC 3.4.0 on linux/x86 (32-bit)**: GCC miscompiles portions of the code +generator, causing an infinite loop in the llvm-gcc build when built with +optimizations enabled (i.e. a release build). + +**GCC 3.4.2 on linux/x86 (32-bit)**: GCC miscompiles portions of the code +generator at -O3, as with 3.4.0. However gcc 3.4.2 (unlike 3.4.0) correctly +compiles LLVM at -O2. A work around is to build release LLVM builds with +"``make ENABLE_OPTIMIZED=1 OPTIMIZE_OPTION=-O2 ...``" + +**GCC 3.4.x on X86-64/amd64**: GCC `miscompiles portions of LLVM +`__. + +**GCC 3.4.4 (CodeSourcery ARM 2005q3-2)**: this compiler miscompiles LLVM when +building with optimizations enabled. It appears to work with "``make +ENABLE_OPTIMIZED=1 OPTIMIZE_OPTION=-O1``" or build a debug build. + +**IA-64 GCC 4.0.0**: The IA-64 version of GCC 4.0.0 is known to miscompile LLVM. + +**Apple Xcode 2.3**: GCC crashes when compiling LLVM at -O3 (which is the +default with ENABLE_OPTIMIZED=1. To work around this, build with +"``ENABLE_OPTIMIZED=1 OPTIMIZE_OPTION=-O2``". + +**GCC 4.1.1**: GCC fails to build LLVM with template concept check errors +compiling some files. At the time of this writing, GCC mainline (4.2) did not +share the problem. + +**GCC 4.1.1 on X86-64/amd64**: GCC `miscompiles portions of LLVM +`__ when compiling llvm itself into 64-bit code. LLVM +will appear to mostly work but will be buggy, e.g. failing portions of its +testsuite. + +**GCC 4.1.2 on OpenSUSE**: Seg faults during libstdc++ build and on x86_64 +platforms compiling md5.c gets a mangled constant. + +**GCC 4.1.2 (20061115 (prerelease) (Debian 4.1.1-21)) on Debian**: Appears to +miscompile parts of LLVM 2.4. One symptom is ValueSymbolTable complaining about +symbols remaining in the table on destruction. + +**GCC 4.1.2 20071124 (Red Hat 4.1.2-42)**: Suffers from the same symptoms as the +previous one. It appears to work with ENABLE_OPTIMIZED=0 (the default). + +**Cygwin GCC 4.3.2 20080827 (beta) 2**: Users `reported +`_ various problems related with link errors when using +this GCC version. + +**Debian GCC 4.3.2 on X86**: Crashes building some files in LLVM 2.6. + +**GCC 4.3.3 (Debian 4.3.3-10) on ARM**: Miscompiles parts of LLVM 2.6 when +optimizations are turned on. The symptom is an infinite loop in +``FoldingSetImpl::RemoveNode`` while running the code generator. + +**SUSE 11 GCC 4.3.4**: Miscompiles LLVM, causing crashes in ValueHandle logic. + +**GCC 4.3.5 and GCC 4.4.5 on ARM**: These can miscompile ``value >> 1`` even at +``-O0``. A test failure in ``test/Assembler/alignstack.ll`` is one symptom of +the problem. + +**GCC 4.6.3 on ARM**: Miscompiles ``llvm-readobj`` at ``-O3``. A test failure +in ``test/Object/readobj-shared-object.test`` is one symptom of the problem. + +**GNU ld 2.16.X**. Some 2.16.X versions of the ld linker will produce very long +warning messages complaining that some "``.gnu.linkonce.t.*``" symbol was +defined in a discarded section. You can safely ignore these messages as they are +erroneous and the linkage is correct. These messages disappear using ld 2.17. + +**GNU binutils 2.17**: Binutils 2.17 contains `a bug +`__ which causes huge link +times (minutes instead of seconds) when building LLVM. We recommend upgrading +to a newer version (2.17.50.0.4 or later). + +**GNU Binutils 2.19.1 Gold**: This version of Gold contained `a bug +`__ which causes +intermittent failures when building LLVM with position independent code. The +symptom is an error about cyclic dependencies. We recommend upgrading to a +newer version of Gold. + +**Clang 3.0 with libstdc++ 4.7.x**: a few Linux distributions (Ubuntu 12.10, +Fedora 17) have both Clang 3.0 and libstdc++ 4.7 in their repositories. Clang +3.0 does not implement a few builtins that are used in this library. We +recommend using the system GCC to compile LLVM and Clang in this case. + +**Clang 3.0 on Mageia 2**. There's a packaging issue: Clang can not find at +least some (``cxxabi.h``) libstdc++ headers. + +.. _Getting Started with LLVM: + +Getting Started with LLVM +========================= + +The remainder of this guide is meant to get you up and running with LLVM and to +give you some basic information about the LLVM environment. + +The later sections of this guide describe the `general layout`_ of the LLVM +source tree, a `simple example`_ using the LLVM tool chain, and `links`_ to find +more information about LLVM or to get help via e-mail. + +Terminology and Notation +------------------------ + +Throughout this manual, the following names are used to denote paths specific to +the local system and working environment. *These are not environment variables +you need to set but just strings used in the rest of this document below*. In +any of the examples below, simply replace each of these names with the +appropriate pathname on your local system. All these paths are absolute: + +``SRC_ROOT`` + + This is the top level directory of the LLVM source tree. + +``OBJ_ROOT`` + + This is the top level directory of the LLVM object tree (i.e. the tree where + object files and compiled programs will be placed. It can be the same as + SRC_ROOT). + +.. _Setting Up Your Environment: + +Setting Up Your Environment +--------------------------- + +In order to compile and use LLVM, you may need to set some environment +variables. + +``LLVM_LIB_SEARCH_PATH=/path/to/your/bitcode/libs`` + + [Optional] This environment variable helps LLVM linking tools find the + locations of your bitcode libraries. It is provided only as a convenience + since you can specify the paths using the -L options of the tools and the + C/C++ front-end will automatically use the bitcode files installed in its + ``lib`` directory. + +Unpacking the LLVM Archives +--------------------------- + +If you have the LLVM distribution, you will need to unpack it before you can +begin to compile it. LLVM is distributed as a set of two files: the LLVM suite +and the LLVM GCC front end compiled for your platform. There is an additional +test suite that is optional. Each file is a TAR archive that is compressed with +the gzip program. + +The files are as follows, with *x.y* marking the version number: + +``llvm-x.y.tar.gz`` + + Source release for the LLVM libraries and tools. + +``llvm-test-x.y.tar.gz`` + + Source release for the LLVM test-suite. + +.. _checkout: + +Checkout LLVM from Subversion +----------------------------- + +If you have access to our Subversion repository, you can get a fresh copy of the +entire source code. All you need to do is check it out from Subversion as +follows: + +* ``cd where-you-want-llvm-to-live`` +* Read-Only: ``svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm`` +* Read-Write:``svn co https://user@llvm.org/svn/llvm-project/llvm/trunk llvm`` + +This will create an '``llvm``' directory in the current directory and fully +populate it with the LLVM source code, Makefiles, test directories, and local +copies of documentation files. + +If you want to get a specific release (as opposed to the most recent revision), +you can checkout it from the '``tags``' directory (instead of '``trunk``'). The +following releases are located in the following subdirectories of the '``tags``' +directory: + +* Release 3.3: **RELEASE_33/final** +* Release 3.2: **RELEASE_32/final** +* Release 3.1: **RELEASE_31/final** +* Release 3.0: **RELEASE_30/final** +* Release 2.9: **RELEASE_29/final** +* Release 2.8: **RELEASE_28** +* Release 2.7: **RELEASE_27** +* Release 2.6: **RELEASE_26** +* Release 2.5: **RELEASE_25** +* Release 2.4: **RELEASE_24** +* Release 2.3: **RELEASE_23** +* Release 2.2: **RELEASE_22** +* Release 2.1: **RELEASE_21** +* Release 2.0: **RELEASE_20** +* Release 1.9: **RELEASE_19** +* Release 1.8: **RELEASE_18** +* Release 1.7: **RELEASE_17** +* Release 1.6: **RELEASE_16** +* Release 1.5: **RELEASE_15** +* Release 1.4: **RELEASE_14** +* Release 1.3: **RELEASE_13** +* Release 1.2: **RELEASE_12** +* Release 1.1: **RELEASE_11** +* Release 1.0: **RELEASE_1** + +If you would like to get the LLVM test suite (a separate package as of 1.4), you +get it from the Subversion repository: + +.. code-block:: console + + % cd llvm/projects + % svn co http://llvm.org/svn/llvm-project/test-suite/trunk test-suite + +By placing it in the ``llvm/projects``, it will be automatically configured by +the LLVM configure script as well as automatically updated when you run ``svn +update``. + +Git Mirror +---------- + +Git mirrors are available for a number of LLVM subprojects. These mirrors sync +automatically with each Subversion commit and contain all necessary git-svn +marks (so, you can recreate git-svn metadata locally). Note that right now +mirrors reflect only ``trunk`` for each project. You can do the read-only Git +clone of LLVM via: + +.. code-block:: console + + % git clone http://llvm.org/git/llvm.git + +If you want to check out clang too, run: + +.. code-block:: console + + % cd llvm/tools + % git clone http://llvm.org/git/clang.git + +If you want to check out compiler-rt too, run: + +.. code-block:: console + + % cd llvm/projects + % git clone http://llvm.org/git/compiler-rt.git + +If you want to check out the Test Suite Source Code (optional), run: + +.. code-block:: console + + % cd llvm/projects + % git clone http://llvm.org/git/test-suite.git + +Since the upstream repository is in Subversion, you should use ``git +pull --rebase`` instead of ``git pull`` to avoid generating a non-linear history +in your clone. To configure ``git pull`` to pass ``--rebase`` by default on the +master branch, run the following command: + +.. code-block:: console + + % git config branch.master.rebase true + +Sending patches with Git +^^^^^^^^^^^^^^^^^^^^^^^^ + +Please read `Developer Policy `_, too. + +Assume ``master`` points the upstream and ``mybranch`` points your working +branch, and ``mybranch`` is rebased onto ``master``. At first you may check +sanity of whitespaces: + +.. code-block:: console + + % git diff --check master..mybranch + +The easiest way to generate a patch is as below: + +.. code-block:: console + + % git diff master..mybranch > /path/to/mybranch.diff + +It is a little different from svn-generated diff. git-diff-generated diff has +prefixes like ``a/`` and ``b/``. Don't worry, most developers might know it +could be accepted with ``patch -p1 -N``. + +But you may generate patchset with git-format-patch. It generates by-each-commit +patchset. To generate patch files to attach to your article: + +.. code-block:: console + + % git format-patch --no-attach master..mybranch -o /path/to/your/patchset + +If you would like to send patches directly, you may use git-send-email or +git-imap-send. Here is an example to generate the patchset in Gmail's [Drafts]. + +.. code-block:: console + + % git format-patch --attach master..mybranch --stdout | git imap-send + +Then, your .git/config should have [imap] sections. + +.. code-block:: ini + + [imap] + host = imaps://imap.gmail.com + user = your.gmail.account@gmail.com + pass = himitsu! + port = 993 + sslverify = false + ; in English + folder = "[Gmail]/Drafts" + ; example for Japanese, "Modified UTF-7" encoded. + folder = "[Gmail]/&Tgtm+DBN-" + ; example for Traditional Chinese + folder = "[Gmail]/&g0l6Pw-" + +For developers to work with git-svn +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +To set up clone from which you can submit code using ``git-svn``, run: + +.. code-block:: console + + % git clone http://llvm.org/git/llvm.git + % cd llvm + % git svn init https://llvm.org/svn/llvm-project/llvm/trunk --username= + % git config svn-remote.svn.fetch :refs/remotes/origin/master + % git svn rebase -l # -l avoids fetching ahead of the git mirror. + + # If you have clang too: + % cd tools + % git clone http://llvm.org/git/clang.git + % cd clang + % git svn init https://llvm.org/svn/llvm-project/cfe/trunk --username= + % git config svn-remote.svn.fetch :refs/remotes/origin/master + % git svn rebase -l + +Likewise for compiler-rt and test-suite. + +To update this clone without generating git-svn tags that conflict with the +upstream Git repo, run: + +.. code-block:: console + + % git fetch && (cd tools/clang && git fetch) # Get matching revisions of both trees. + % git checkout master + % git svn rebase -l + % (cd tools/clang && + git checkout master && + git svn rebase -l) + +Likewise for compiler-rt and test-suite. + +This leaves your working directories on their master branches, so you'll need to +``checkout`` each working branch individually and ``rebase`` it on top of its +parent branch. + +For those who wish to be able to update an llvm repo/revert patches easily using +git-svn, please look in the directory for the scripts ``git-svnup`` and +``git-svnrevert``. + +To perform the aforementioned update steps go into your source directory and +just type ``git-svnup`` or ``git svnup`` and everything will just work. + +If one wishes to revert a commit with git-svn, but do not want the git hash to +escape into the commit message, one can use the script ``git-svnrevert`` or +``git svnrevert`` which will take in the git hash for the commit you want to +revert, look up the appropriate svn revision, and output a message where all +references to the git hash have been replaced with the svn revision. + +To commit back changes via git-svn, use ``git svn dcommit``: + +.. code-block:: console + + % git svn dcommit + +Note that git-svn will create one SVN commit for each Git commit you have pending, +so squash and edit each commit before executing ``dcommit`` to make sure they all +conform to the coding standards and the developers' policy. + +On success, ``dcommit`` will rebase against the HEAD of SVN, so to avoid conflict, +please make sure your current branch is up-to-date (via fetch/rebase) before +proceeding. + +The git-svn metadata can get out of sync after you mess around with branches and +``dcommit``. When that happens, ``git svn dcommit`` stops working, complaining +about files with uncommitted changes. The fix is to rebuild the metadata: + +.. code-block:: console + + % rm -rf .git/svn + % git svn rebase -l + +Please, refer to the Git-SVN manual (``man git-svn``) for more information. + +Local LLVM Configuration +------------------------ + +Once checked out from the Subversion repository, the LLVM suite source code must +be configured via the ``configure`` script. This script sets variables in the +various ``*.in`` files, most notably ``llvm/Makefile.config`` and +``llvm/include/Config/config.h``. It also populates *OBJ_ROOT* with the +Makefiles needed to begin building LLVM. + +The following environment variables are used by the ``configure`` script to +configure the build system: + ++------------+-----------------------------------------------------------+ +| Variable | Purpose | ++============+===========================================================+ +| CC | Tells ``configure`` which C compiler to use. By default, | +| | ``configure`` will check ``PATH`` for ``clang`` and GCC C | +| | compilers (in this order). Use this variable to override | +| | ``configure``\'s default behavior. | ++------------+-----------------------------------------------------------+ +| CXX | Tells ``configure`` which C++ compiler to use. By | +| | default, ``configure`` will check ``PATH`` for | +| | ``clang++`` and GCC C++ compilers (in this order). Use | +| | this variable to override ``configure``'s default | +| | behavior. | ++------------+-----------------------------------------------------------+ + +The following options can be used to set or enable LLVM specific options: + +``--enable-optimized`` + + Enables optimized compilation (debugging symbols are removed and GCC + optimization flags are enabled). Note that this is the default setting if you + are using the LLVM distribution. The default behavior of an Subversion + checkout is to use an unoptimized build (also known as a debug build). + +``--enable-debug-runtime`` + + Enables debug symbols in the runtime libraries. The default is to strip debug + symbols from the runtime libraries. + +``--enable-jit`` + + Compile the Just In Time (JIT) compiler functionality. This is not available + on all platforms. The default is dependent on platform, so it is best to + explicitly enable it if you want it. + +``--enable-targets=target-option`` + + Controls which targets will be built and linked into llc. The default value + for ``target_options`` is "all" which builds and links all available targets. + The value "host-only" can be specified to build only a native compiler (no + cross-compiler targets available). The "native" target is selected as the + target of the build host. You can also specify a comma separated list of + target names that you want available in llc. The target names use all lower + case. The current set of targets is: + + ``arm, cpp, hexagon, mips, mipsel, msp430, powerpc, ptx, sparc, spu, + systemz, x86, x86_64, xcore``. + +``--enable-doxygen`` + + Look for the doxygen program and enable construction of doxygen based + documentation from the source code. This is disabled by default because + generating the documentation can take a long time and producess 100s of + megabytes of output. + +``--with-udis86`` + + LLVM can use external disassembler library for various purposes (now it's used + only for examining code produced by JIT). This option will enable usage of + `udis86 `_ x86 (both 32 and 64 bits) + disassembler library. + +To configure LLVM, follow these steps: + +#. Change directory into the object root directory: + + .. code-block:: console + + % cd OBJ_ROOT + +#. Run the ``configure`` script located in the LLVM source tree: + + .. code-block:: console + + % SRC_ROOT/configure --prefix=/install/path [other options] + +Compiling the LLVM Suite Source Code +------------------------------------ + +Once you have configured LLVM, you can build it. There are three types of +builds: + +Debug Builds + + These builds are the default when one is using an Subversion checkout and + types ``gmake`` (unless the ``--enable-optimized`` option was used during + configuration). The build system will compile the tools and libraries with + debugging information. To get a Debug Build using the LLVM distribution the + ``--disable-optimized`` option must be passed to ``configure``. + +Release (Optimized) Builds + + These builds are enabled with the ``--enable-optimized`` option to + ``configure`` or by specifying ``ENABLE_OPTIMIZED=1`` on the ``gmake`` command + line. For these builds, the build system will compile the tools and libraries + with GCC optimizations enabled and strip debugging information from the + libraries and executables it generates. Note that Release Builds are default + when using an LLVM distribution. + +Profile Builds + + These builds are for use with profiling. They compile profiling information + into the code for use with programs like ``gprof``. Profile builds must be + started by specifying ``ENABLE_PROFILING=1`` on the ``gmake`` command line. + +Once you have LLVM configured, you can build it by entering the *OBJ_ROOT* +directory and issuing the following command: + +.. code-block:: console + + % gmake + +If the build fails, please `check here`_ to see if you are using a version of +GCC that is known not to compile LLVM. + +If you have multiple processors in your machine, you may wish to use some of the +parallel build options provided by GNU Make. For example, you could use the +command: + +.. code-block:: console + + % gmake -j2 + +There are several special targets which are useful when working with the LLVM +source code: + +``gmake clean`` + + Removes all files generated by the build. This includes object files, + generated C/C++ files, libraries, and executables. + +``gmake dist-clean`` + + Removes everything that ``gmake clean`` does, but also removes files generated + by ``configure``. It attempts to return the source tree to the original state + in which it was shipped. + +``gmake install`` + + Installs LLVM header files, libraries, tools, and documentation in a hierarchy + under ``$PREFIX``, specified with ``./configure --prefix=[dir]``, which + defaults to ``/usr/local``. + +``gmake -C runtime install-bytecode`` + + Assuming you built LLVM into $OBJDIR, when this command is run, it will + install bitcode libraries into the GCC front end's bitcode library directory. + If you need to update your bitcode libraries, this is the target to use once + you've built them. + +Please see the `Makefile Guide `_ for further details on +these ``make`` targets and descriptions of other targets available. + +It is also possible to override default values from ``configure`` by declaring +variables on the command line. The following are some examples: + +``gmake ENABLE_OPTIMIZED=1`` + + Perform a Release (Optimized) build. + +``gmake ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1`` + + Perform a Release (Optimized) build without assertions enabled. + +``gmake ENABLE_OPTIMIZED=0`` + + Perform a Debug build. + +``gmake ENABLE_PROFILING=1`` + + Perform a Profiling build. + +``gmake VERBOSE=1`` + + Print what ``gmake`` is doing on standard output. + +``gmake TOOL_VERBOSE=1`` + + Ask each tool invoked by the makefiles to print out what it is doing on + the standard output. This also implies ``VERBOSE=1``. + +Every directory in the LLVM object tree includes a ``Makefile`` to build it and +any subdirectories that it contains. Entering any directory inside the LLVM +object tree and typing ``gmake`` should rebuild anything in or below that +directory that is out of date. + +This does not apply to building the documentation. +LLVM's (non-Doxygen) documentation is produced with the +`Sphinx `_ documentation generation system. +There are some HTML documents that have not yet been converted to the new +system (which uses the easy-to-read and easy-to-write +`reStructuredText `_ plaintext markup +language). +The generated documentation is built in the ``SRC_ROOT/docs`` directory using +a special makefile. +For instructions on how to install Sphinx, see +`Sphinx Introduction for LLVM Developers +`_. +After following the instructions there for installing Sphinx, build the LLVM +HTML documentation by doing the following: + +.. code-block:: console + + $ cd SRC_ROOT/docs + $ make -f Makefile.sphinx + +This creates a ``_build/html`` sub-directory with all of the HTML files, not +just the generated ones. +This directory corresponds to ``llvm.org/docs``. +For example, ``_build/html/SphinxQuickstartTemplate.html`` corresponds to +``llvm.org/docs/SphinxQuickstartTemplate.html``. +The :doc:`SphinxQuickstartTemplate` is useful when creating a new document. + +Cross-Compiling LLVM +-------------------- + +It is possible to cross-compile LLVM itself. That is, you can create LLVM +executables and libraries to be hosted on a platform different from the platform +where they are built (a Canadian Cross build). To configure a cross-compile, +supply the configure script with ``--build`` and ``--host`` options that are +different. The values of these options must be legal target triples that your +GCC compiler supports. + +The result of such a build is executables that are not runnable on on the build +host (--build option) but can be executed on the compile host (--host option). + +Check :doc:`HowToCrossCompileLLVM` and `Clang docs on how to cross-compile in general +`_ for more information +about cross-compiling. + +The Location of LLVM Object Files +--------------------------------- + +The LLVM build system is capable of sharing a single LLVM source tree among +several LLVM builds. Hence, it is possible to build LLVM for several different +platforms or configurations using the same source tree. + +This is accomplished in the typical autoconf manner: + +* Change directory to where the LLVM object files should live: + + .. code-block:: console + + % cd OBJ_ROOT + +* Run the ``configure`` script found in the LLVM source directory: + + .. code-block:: console + + % SRC_ROOT/configure + +The LLVM build will place files underneath *OBJ_ROOT* in directories named after +the build type: + +Debug Builds with assertions enabled (the default) + + Tools + + ``OBJ_ROOT/Debug+Asserts/bin`` + + Libraries + + ``OBJ_ROOT/Debug+Asserts/lib`` + +Release Builds + + Tools + + ``OBJ_ROOT/Release/bin`` + + Libraries + + ``OBJ_ROOT/Release/lib`` + +Profile Builds + + Tools + + ``OBJ_ROOT/Profile/bin`` + + Libraries + + ``OBJ_ROOT/Profile/lib`` + +Optional Configuration Items +---------------------------- + +If you're running on a Linux system that supports the `binfmt_misc +`_ +module, and you have root access on the system, you can set your system up to +execute LLVM bitcode files directly. To do this, use commands like this (the +first command may not be required if you are already using the module): + +.. code-block:: console + + % mount -t binfmt_misc none /proc/sys/fs/binfmt_misc + % echo ':llvm:M::BC::/path/to/lli:' > /proc/sys/fs/binfmt_misc/register + % chmod u+x hello.bc (if needed) + % ./hello.bc + +This allows you to execute LLVM bitcode files directly. On Debian, you can also +use this command instead of the 'echo' command above: + +.. code-block:: console + + % sudo update-binfmts --install llvm /path/to/lli --magic 'BC' + +.. _Program Layout: +.. _general layout: + +Program Layout +============== + +One useful source of information about the LLVM source base is the LLVM `doxygen +`_ documentation available at +``_. The following is a brief introduction to code +layout: + +``llvm/examples`` +----------------- + +This directory contains some simple examples of how to use the LLVM IR and JIT. + +``llvm/include`` +---------------- + +This directory contains public header files exported from the LLVM library. The +three main subdirectories of this directory are: + +``llvm/include/llvm`` + + This directory contains all of the LLVM specific header files. This directory + also has subdirectories for different portions of LLVM: ``Analysis``, + ``CodeGen``, ``Target``, ``Transforms``, etc... + +``llvm/include/llvm/Support`` + + This directory contains generic support libraries that are provided with LLVM + but not necessarily specific to LLVM. For example, some C++ STL utilities and + a Command Line option processing library store their header files here. + +``llvm/include/llvm/Config`` + + This directory contains header files configured by the ``configure`` script. + They wrap "standard" UNIX and C header files. Source code can include these + header files which automatically take care of the conditional #includes that + the ``configure`` script generates. + +``llvm/lib`` +------------ + +This directory contains most of the source files of the LLVM system. In LLVM, +almost all code exists in libraries, making it very easy to share code among the +different `tools`_. + +``llvm/lib/VMCore/`` + + This directory holds the core LLVM source files that implement core classes + like Instruction and BasicBlock. + +``llvm/lib/AsmParser/`` + + This directory holds the source code for the LLVM assembly language parser + library. + +``llvm/lib/Bitcode/`` + + This directory holds code for reading and write LLVM bitcode. + +``llvm/lib/Analysis/`` + + This directory contains a variety of different program analyses, such as + Dominator Information, Call Graphs, Induction Variables, Interval + Identification, Natural Loop Identification, etc. + +``llvm/lib/Transforms/`` + + This directory contains the source code for the LLVM to LLVM program + transformations, such as Aggressive Dead Code Elimination, Sparse Conditional + Constant Propagation, Inlining, Loop Invariant Code Motion, Dead Global + Elimination, and many others. + +``llvm/lib/Target/`` + + This directory contains files that describe various target architectures for + code generation. For example, the ``llvm/lib/Target/X86`` directory holds the + X86 machine description while ``llvm/lib/Target/ARM`` implements the ARM + backend. + +``llvm/lib/CodeGen/`` + + This directory contains the major parts of the code generator: Instruction + Selector, Instruction Scheduling, and Register Allocation. + +``llvm/lib/MC/`` + + (FIXME: T.B.D.) + +``llvm/lib/Debugger/`` + + This directory contains the source level debugger library that makes it + possible to instrument LLVM programs so that a debugger could identify source + code locations at which the program is executing. + +``llvm/lib/ExecutionEngine/`` + + This directory contains libraries for executing LLVM bitcode directly at + runtime in both interpreted and JIT compiled fashions. + +``llvm/lib/Support/`` + + This directory contains the source code that corresponds to the header files + located in ``llvm/include/ADT/`` and ``llvm/include/Support/``. + +``llvm/projects`` +----------------- + +This directory contains projects that are not strictly part of LLVM but are +shipped with LLVM. This is also the directory where you should create your own +LLVM-based projects. See ``llvm/projects/sample`` for an example of how to set +up your own project. + +``llvm/runtime`` +---------------- + +This directory contains libraries which are compiled into LLVM bitcode and used +when linking programs with the Clang front end. Most of these libraries are +skeleton versions of real libraries; for example, libc is a stripped down +version of glibc. + +Unlike the rest of the LLVM suite, this directory needs the LLVM GCC front end +to compile. + +``llvm/test`` +------------- + +This directory contains feature and regression tests and other basic sanity +checks on the LLVM infrastructure. These are intended to run quickly and cover a +lot of territory without being exhaustive. + +``test-suite`` +-------------- + +This is not a directory in the normal llvm module; it is a separate Subversion +module that must be checked out (usually to ``projects/test-suite``). This +module contains a comprehensive correctness, performance, and benchmarking test +suite for LLVM. It is a separate Subversion module because not every LLVM user +is interested in downloading or building such a comprehensive test suite. For +further details on this test suite, please see the :doc:`Testing Guide +` document. + +.. _tools: + +``llvm/tools`` +-------------- + +The **tools** directory contains the executables built out of the libraries +above, which form the main part of the user interface. You can always get help +for a tool by typing ``tool_name -help``. The following is a brief introduction +to the most important tools. More detailed information is in +the `Command Guide `_. + +``bugpoint`` + + ``bugpoint`` is used to debug optimization passes or code generation backends + by narrowing down the given test case to the minimum number of passes and/or + instructions that still cause a problem, whether it is a crash or + miscompilation. See ``_ for more information on using + ``bugpoint``. + +``llvm-ar`` + + The archiver produces an archive containing the given LLVM bitcode files, + optionally with an index for faster lookup. + +``llvm-as`` + + The assembler transforms the human readable LLVM assembly to LLVM bitcode. + +``llvm-dis`` + + The disassembler transforms the LLVM bitcode to human readable LLVM assembly. + +``llvm-link`` + + ``llvm-link``, not surprisingly, links multiple LLVM modules into a single + program. + +``lli`` + + ``lli`` is the LLVM interpreter, which can directly execute LLVM bitcode + (although very slowly...). For architectures that support it (currently x86, + Sparc, and PowerPC), by default, ``lli`` will function as a Just-In-Time + compiler (if the functionality was compiled in), and will execute the code + *much* faster than the interpreter. + +``llc`` + + ``llc`` is the LLVM backend compiler, which translates LLVM bitcode to a + native code assembly file or to C code (with the ``-march=c`` option). + +``opt`` + + ``opt`` reads LLVM bitcode, applies a series of LLVM to LLVM transformations + (which are specified on the command line), and then outputs the resultant + bitcode. The '``opt -help``' command is a good way to get a list of the + program transformations available in LLVM. + + ``opt`` can also be used to run a specific analysis on an input LLVM bitcode + file and print out the results. It is primarily useful for debugging + analyses, or familiarizing yourself with what an analysis does. + +``llvm/utils`` +-------------- + +This directory contains utilities for working with LLVM source code, and some of +the utilities are actually required as part of the build process because they +are code generators for parts of LLVM infrastructure. + + +``codegen-diff`` + + ``codegen-diff`` is a script that finds differences between code that LLC + generates and code that LLI generates. This is a useful tool if you are + debugging one of them, assuming that the other generates correct output. For + the full user manual, run ```perldoc codegen-diff'``. + +``emacs/`` + + The ``emacs`` directory contains syntax-highlighting files which will work + with Emacs and XEmacs editors, providing syntax highlighting support for LLVM + assembly files and TableGen description files. For information on how to use + the syntax files, consult the ``README`` file in that directory. + +``getsrcs.sh`` + + The ``getsrcs.sh`` script finds and outputs all non-generated source files, + which is useful if one wishes to do a lot of development across directories + and does not want to individually find each file. One way to use it is to run, + for example: ``xemacs `utils/getsources.sh``` from the top of your LLVM source + tree. + +``llvmgrep`` + + This little tool performs an ``egrep -H -n`` on each source file in LLVM and + passes to it a regular expression provided on ``llvmgrep``'s command + line. This is a very efficient way of searching the source base for a + particular regular expression. + +``makellvm`` + + The ``makellvm`` script compiles all files in the current directory and then + compiles and links the tool that is the first argument. For example, assuming + you are in the directory ``llvm/lib/Target/Sparc``, if ``makellvm`` is in your + path, simply running ``makellvm llc`` will make a build of the current + directory, switch to directory ``llvm/tools/llc`` and build it, causing a + re-linking of LLC. + +``TableGen/`` + + The ``TableGen`` directory contains the tool used to generate register + descriptions, instruction set descriptions, and even assemblers from common + TableGen description files. + +``vim/`` + + The ``vim`` directory contains syntax-highlighting files which will work with + the VIM editor, providing syntax highlighting support for LLVM assembly files + and TableGen description files. For information on how to use the syntax + files, consult the ``README`` file in that directory. + +.. _simple example: + +An Example Using the LLVM Tool Chain +==================================== + +This section gives an example of using LLVM with the Clang front end. + +Example with clang +------------------ + +#. First, create a simple C file, name it 'hello.c': + + .. code-block:: c + + #include + + int main() { + printf("hello world\n"); + return 0; + } + +#. Next, compile the C file into a native executable: + + .. code-block:: console + + % clang hello.c -o hello + + .. note:: + + Clang works just like GCC by default. The standard -S and -c arguments + work as usual (producing a native .s or .o file, respectively). + +#. Next, compile the C file into an LLVM bitcode file: + + .. code-block:: console + + % clang -O3 -emit-llvm hello.c -c -o hello.bc + + The -emit-llvm option can be used with the -S or -c options to emit an LLVM + ``.ll`` or ``.bc`` file (respectively) for the code. This allows you to use + the `standard LLVM tools `_ on the bitcode file. + +#. Run the program in both forms. To run the program, use: + + .. code-block:: console + + % ./hello + + and + + .. code-block:: console + + % lli hello.bc + + The second examples shows how to invoke the LLVM JIT, :doc:`lli + `. + +#. Use the ``llvm-dis`` utility to take a look at the LLVM assembly code: + + .. code-block:: console + + % llvm-dis < hello.bc | less + +#. Compile the program to native assembly using the LLC code generator: + + .. code-block:: console + + % llc hello.bc -o hello.s + +#. Assemble the native assembly language file into a program: + + .. code-block:: console + + % /opt/SUNWspro/bin/cc -xarch=v9 hello.s -o hello.native # On Solaris + + % gcc hello.s -o hello.native # On others + +#. Execute the native code program: + + .. code-block:: console + + % ./hello.native + + Note that using clang to compile directly to native code (i.e. when the + ``-emit-llvm`` option is not present) does steps 6/7/8 for you. + +Common Problems +=============== + +If you are having problems building or using LLVM, or if you have any other +general questions about LLVM, please consult the `Frequently Asked +Questions `_ page. + +.. _links: + +Links +===== + +This document is just an **introduction** on how to use LLVM to do some simple +things... there are many more interesting and complicated things that you can do +that aren't documented here (but we'll gladly accept a patch if you want to +write something up!). For more information about LLVM, check out: + +* `LLVM Homepage `_ +* `LLVM Doxygen Tree `_ +* `Starting a Project that Uses LLVM `_ diff --git a/docs/GettingStartedVS.rst b/docs/GettingStartedVS.rst new file mode 100644 index 00000000..c46dc831 --- /dev/null +++ b/docs/GettingStartedVS.rst @@ -0,0 +1,235 @@ +================================================================== +Getting Started with the LLVM System using Microsoft Visual Studio +================================================================== + +.. contents:: + :local: + + +Overview +======== +Welcome to LLVM on Windows! This document only covers LLVM on Windows using +Visual Studio, not mingw or cygwin. In order to get started, you first need to +know some basic information. + +There are many different projects that compose LLVM. The first is the LLVM +suite. This contains all of the tools, libraries, and header files needed to +use LLVM. It contains an assembler, disassembler, +bitcode analyzer and bitcode optimizer. It also contains a test suite that can +be used to test the LLVM tools. + +Another useful project on Windows is `Clang `_. +Clang is a C family ([Objective]C/C++) compiler. Clang mostly works on +Windows, but does not currently understand all of the Microsoft extensions +to C and C++. Because of this, clang cannot parse the C++ standard library +included with Visual Studio, nor parts of the Windows Platform SDK. However, +most standard C programs do compile. Clang can be used to emit bitcode, +directly emit object files or even linked executables using Visual Studio's +``link.exe``. + +The large LLVM test suite cannot be run on the Visual Studio port at this +time. + +Most of the tools build and work. ``bugpoint`` does build, but does +not work. + +Additional information about the LLVM directory structure and tool chain +can be found on the main `Getting Started `_ page. + + +Requirements +============ +Before you begin to use the LLVM system, review the requirements given +below. This may save you some trouble by knowing ahead of time what hardware +and software you will need. + +Hardware +-------- +Any system that can adequately run Visual Studio 2010 is fine. The LLVM +source tree and object files, libraries and executables will consume +approximately 3GB. + +Software +-------- +You will need Visual Studio 2010 or higher. Earlier versions of Visual +Studio have bugs, are not completely compatible, or do not support the C++ +standard well enough. + +You will also need the `CMake `_ build system since it +generates the project files you will use to build with. + +If you would like to run the LLVM tests you will need `Python +`_. Versions 2.4-2.7 are known to work. You will need +`GnuWin32 `_ tools, too. + +Do not install the LLVM directory tree into a path containing spaces (e.g. +``C:\Documents and Settings\...``) as the configure step will fail. + + +Getting Started +=============== +Here's the short story for getting up and running quickly with LLVM: + +1. Read the documentation. +2. Seriously, read the documentation. +3. Remember that you were warned twice about reading the documentation. +4. Get the Source Code + + * With the distributed files: + + 1. ``cd `` + 2. ``gunzip --stdout llvm-VERSION.tar.gz | tar -xvf -`` + (*or use WinZip*) + 3. ``cd llvm`` + + * With anonymous Subversion access: + + 1. ``cd `` + 2. ``svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm`` + 3. ``cd llvm`` + +5. Use `CMake `_ to generate up-to-date project files: + + * Once CMake is installed then the simplest way is to just start the + CMake GUI, select the directory where you have LLVM extracted to, and + the default options should all be fine. One option you may really + want to change, regardless of anything else, might be the + ``CMAKE_INSTALL_PREFIX`` setting to select a directory to INSTALL to + once compiling is complete, although installation is not mandatory for + using LLVM. Another important option is ``LLVM_TARGETS_TO_BUILD``, + which controls the LLVM target architectures that are included on the + build. + * See the `LLVM CMake guide `_ for detailed information about + how to configure the LLVM build. + +6. Start Visual Studio + + * In the directory you created the project files will have an ``llvm.sln`` + file, just double-click on that to open Visual Studio. + +7. Build the LLVM Suite: + + * The projects may still be built individually, but to build them all do + not just select all of them in batch build (as some are meant as + configuration projects), but rather select and build just the + ``ALL_BUILD`` project to build everything, or the ``INSTALL`` project, + which first builds the ``ALL_BUILD`` project, then installs the LLVM + headers, libs, and other useful things to the directory set by the + ``CMAKE_INSTALL_PREFIX`` setting when you first configured CMake. + * The Fibonacci project is a sample program that uses the JIT. Modify the + project's debugging properties to provide a numeric command line argument + or run it from the command line. The program will print the + corresponding fibonacci value. + +8. Test LLVM on Visual Studio: + + * If ``%PATH%`` does not contain GnuWin32, you may specify + ``LLVM_LIT_TOOLS_DIR`` on CMake for the path to GnuWin32. + * You can run LLVM tests by merely building the project "check". The test + results will be shown in the VS output window. + +.. FIXME: Is it up-to-date? + +9. Test LLVM: + + * The LLVM tests can be run by changing directory to the llvm source + directory and running: + + .. code-block:: bat + + C:\..\llvm> python ..\build\bin\llvm-lit --param build_config=Win32 --param build_mode=Debug --param llvm_site_config=../build/test/lit.site.cfg test + + This example assumes that Python is in your PATH variable, you + have built a Win32 Debug version of llvm with a standard out of + line build. You should not see any unexpected failures, but will + see many unsupported tests and expected failures. + + A specific test or test directory can be run with: + + .. code-block:: bat + + C:\..\llvm> python ..\build\bin\llvm-lit --param build_config=Win32 --param build_mode=Debug --param llvm_site_config=../build/test/lit.site.cfg test/path/to/test + + +An Example Using the LLVM Tool Chain +==================================== + +1. First, create a simple C file, name it '``hello.c``': + + .. code-block:: c + + #include + int main() { + printf("hello world\n"); + return 0; + } + +2. Next, compile the C file into an LLVM bitcode file: + + .. code-block:: bat + + C:\..> clang -c hello.c -emit-llvm -o hello.bc + + This will create the result file ``hello.bc`` which is the LLVM bitcode + that corresponds the compiled program and the library facilities that + it required. You can execute this file directly using ``lli`` tool, + compile it to native assembly with the ``llc``, optimize or analyze it + further with the ``opt`` tool, etc. + + Alternatively you can directly output an executable with clang with: + + .. code-block:: bat + + C:\..> clang hello.c -o hello.exe + + The ``-o hello.exe`` is required because clang currently outputs ``a.out`` + when neither ``-o`` nor ``-c`` are given. + +3. Run the program using the just-in-time compiler: + + .. code-block:: bat + + C:\..> lli hello.bc + +4. Use the ``llvm-dis`` utility to take a look at the LLVM assembly code: + + .. code-block:: bat + + C:\..> llvm-dis < hello.bc | more + +5. Compile the program to object code using the LLC code generator: + + .. code-block:: bat + + C:\..> llc -filetype=obj hello.bc + +6. Link to binary using Microsoft link: + + .. code-block:: bat + + C:\..> link hello.obj -defaultlib:libcmt + +7. Execute the native code program: + + .. code-block:: bat + + C:\..> hello.exe + + +Common Problems +=============== +If you are having problems building or using LLVM, or if you have any other +general questions about LLVM, please consult the `Frequently Asked Questions +`_ page. + + +Links +===== +This document is just an **introduction** to how to use LLVM to do some simple +things... there are many more interesting and complicated things that you can +do that aren't documented here (but we'll gladly accept a patch if you want to +write something up!). For more information about LLVM, check out: + +* `LLVM homepage `_ +* `LLVM doxygen tree `_ + diff --git a/docs/GoldPlugin.rst b/docs/GoldPlugin.rst new file mode 100644 index 00000000..28b202ad --- /dev/null +++ b/docs/GoldPlugin.rst @@ -0,0 +1,172 @@ +==================== +The LLVM gold plugin +==================== + +Introduction +============ + +Building with link time optimization requires cooperation from +the system linker. LTO support on Linux systems requires that you use the +`gold linker`_ which supports LTO via plugins. This is the same mechanism +used by the `GCC LTO`_ project. + +The LLVM gold plugin implements the gold plugin interface on top of +:ref:`libLTO`. The same plugin can also be used by other tools such as +``ar`` and ``nm``. + +.. _`gold linker`: http://sourceware.org/binutils +.. _`GCC LTO`: http://gcc.gnu.org/wiki/LinkTimeOptimization +.. _`gold plugin interface`: http://gcc.gnu.org/wiki/whopr/driver + +.. _lto-how-to-build: + +How to build it +=============== + +You need to have gold with plugin support and build the LLVMgold plugin. +Check whether you have gold running ``/usr/bin/ld -v``. It will report "GNU +gold" or else "GNU ld" if not. If you have gold, check for plugin support +by running ``/usr/bin/ld -plugin``. If it complains "missing argument" then +you have plugin support. If not, such as an "unknown option" error then you +will either need to build gold or install a version with plugin support. + +* Download, configure and build gold with plugin support: + + .. code-block:: bash + + $ git clone --depth 1 git://sourceware.org/git/binutils-gdb.git binutils + $ mkdir build + $ cd build + $ ../binutils/configure --enable-gold --enable-plugins --disable-werror + $ make all-gold + + That should leave you with ``build/gold/ld-new`` which supports + the ``-plugin`` option. Running ``make`` will additionally build + ``build/binutils/ar`` and ``nm-new`` binaries supporting plugins. + +* Build the LLVMgold plugin: Configure LLVM with + ``--with-binutils-include=/path/to/binutils/include`` and run + ``make``. + +Usage +===== + +The linker takes a ``-plugin`` option that points to the path of +the plugin ``.so`` file. To find out what link command ``gcc`` +would run in a given situation, run ``gcc -v [...]`` and +look for the line where it runs ``collect2``. Replace that with +``ld-new -plugin /path/to/LLVMgold.so`` to test it out. Once you're +ready to switch to using gold, backup your existing ``/usr/bin/ld`` +then replace it with ``ld-new``. + +You should produce bitcode files from ``clang`` with the option +``-flto``. This flag will also cause ``clang`` to look for the gold plugin in +the ``lib`` directory under its prefix and pass the ``-plugin`` option to +``ld``. It will not look for an alternate linker, which is why you need +gold to be the installed system linker in your path. + +``ar`` and ``nm`` also accept the ``-plugin`` option and it's possible to +to install ``LLVMgold.so`` to ``/usr/lib/bfd-plugins`` for a seamless setup. +If you built your own gold, be sure to install the ``ar`` and ``nm-new`` you +built to ``/usr/bin``. + + +Example of link time optimization +--------------------------------- + +The following example shows a worked example of the gold plugin mixing LLVM +bitcode and native code. + +.. code-block:: c + + --- a.c --- + #include + + extern void foo1(void); + extern void foo4(void); + + void foo2(void) { + printf("Foo2\n"); + } + + void foo3(void) { + foo4(); + } + + int main(void) { + foo1(); + } + + --- b.c --- + #include + + extern void foo2(void); + + void foo1(void) { + foo2(); + } + + void foo4(void) { + printf("Foo4"); + } + +.. code-block:: bash + + --- command lines --- + $ clang -flto a.c -c -o a.o # <-- a.o is LLVM bitcode file + $ ar q a.a a.o # <-- a.a is an archive with LLVM bitcode + $ clang b.c -c -o b.o # <-- b.o is native object file + $ clang -flto a.a b.o -o main # <-- link with LLVMgold plugin + +Gold informs the plugin that foo3 is never referenced outside the IR, +leading LLVM to delete that function. However, unlike in the :ref:`libLTO +example ` gold does not currently eliminate foo4. + +Quickstart for using LTO with autotooled projects +================================================= + +Once your system ``ld``, ``ar``, and ``nm`` all support LLVM bitcode, +everything is in place for an easy to use LTO build of autotooled projects: + +* Follow the instructions :ref:`on how to build LLVMgold.so + `. + +* Install the newly built binutils to ``$PREFIX`` + +* Copy ``Release/lib/LLVMgold.so`` to ``$PREFIX/lib/bfd-plugins/`` + +* Set environment variables (``$PREFIX`` is where you installed clang and + binutils): + + .. code-block:: bash + + export CC="$PREFIX/bin/clang -flto" + export CXX="$PREFIX/bin/clang++ -flto" + export AR="$PREFIX/bin/ar" + export NM="$PREFIX/bin/nm" + export RANLIB=/bin/true #ranlib is not needed, and doesn't support .bc files in .a + +* Or you can just set your path: + + .. code-block:: bash + + export PATH="$PREFIX/bin:$PATH" + export CC="clang -flto" + export CXX="clang++ -flto" + export RANLIB=/bin/true +* Configure and build the project as usual: + + .. code-block:: bash + + % ./configure && make && make check + +The environment variable settings may work for non-autotooled projects too, +but you may need to set the ``LD`` environment variable as well. + +Licensing +========= + +Gold is licensed under the GPLv3. LLVMgold uses the interface file +``plugin-api.h`` from gold which means that the resulting ``LLVMgold.so`` +binary is also GPLv3. This can still be used to link non-GPLv3 programs +just as much as gold could without the plugin. diff --git a/docs/HistoricalNotes/2000-11-18-EarlyDesignIdeas.txt b/docs/HistoricalNotes/2000-11-18-EarlyDesignIdeas.txt new file mode 100644 index 00000000..f0861811 --- /dev/null +++ b/docs/HistoricalNotes/2000-11-18-EarlyDesignIdeas.txt @@ -0,0 +1,74 @@ +Date: Sat, 18 Nov 2000 09:19:35 -0600 (CST) +From: Vikram Adve +To: Chris Lattner +Subject: a few thoughts + +I've been mulling over the virtual machine problem and I had some +thoughts about some things for us to think about discuss: + +1. We need to be clear on our goals for the VM. Do we want to emphasize + portability and safety like the Java VM? Or shall we focus on the + architecture interface first (i.e., consider the code generation and + processor issues), since the architecture interface question is also + important for portable Java-type VMs? + + This is important because the audiences for these two goals are very + different. Architects and many compiler people care much more about + the second question. The Java compiler and OS community care much more + about the first one. + + Also, while the architecture interface question is important for + Java-type VMs, the design constraints are very different. + + +2. Design issues to consider (an initial list that we should continue + to modify). Note that I'm not trying to suggest actual solutions here, + but just various directions we can pursue: + + a. A single-assignment VM, which we've both already been thinking about. + + b. A strongly-typed VM. One question is do we need the types to be + explicitly declared or should they be inferred by the dynamic compiler? + + c. How do we get more high-level information into the VM while keeping + to a low-level VM design? + + o Explicit array references as operands? An alternative is + to have just an array type, and let the index computations be + separate 3-operand instructions. + + o Explicit instructions to handle aliasing, e.g.s: + -- an instruction to say "I speculate that these two values are not + aliased, but check at runtime", like speculative execution in + EPIC? + -- or an instruction to check whether two values are aliased and + execute different code depending on the answer, somewhat like + predicated code in EPIC + + o (This one is a difficult but powerful idea.) + A "thread-id" field on every instruction that allows the static + compiler to generate a set of parallel threads, and then have + the runtime compiler and hardware do what they please with it. + This has very powerful uses, but thread-id on every instruction + is expensive in terms of instruction size and code size. + We would need to compactly encode it somehow. + + Also, this will require some reading on at least two other + projects: + -- Multiscalar architecture from Wisconsin + -- Simultaneous multithreading architecture from Washington + + o Or forget all this and stick to a traditional instruction set? + + +BTW, on an unrelated note, after the meeting yesterday, I did remember +that you had suggested doing instruction scheduling on SSA form instead +of a dependence DAG earlier in the semester. When we talked about +it yesterday, I didn't remember where the idea had come from but I +remembered later. Just giving credit where its due... + +Perhaps you can save the above as a file under RCS so you and I can +continue to expand on this. + +--Vikram + diff --git a/docs/HistoricalNotes/2000-11-18-EarlyDesignIdeasResp.txt b/docs/HistoricalNotes/2000-11-18-EarlyDesignIdeasResp.txt new file mode 100644 index 00000000..81ca5391 --- /dev/null +++ b/docs/HistoricalNotes/2000-11-18-EarlyDesignIdeasResp.txt @@ -0,0 +1,199 @@ +Date: Sun, 19 Nov 2000 16:23:57 -0600 (CST) +From: Chris Lattner +To: Vikram Adve +Subject: Re: a few thoughts + +Okay... here are a few of my thoughts on this (it's good to know that we +think so alike!): + +> 1. We need to be clear on our goals for the VM. Do we want to emphasize +> portability and safety like the Java VM? Or shall we focus on the +> architecture interface first (i.e., consider the code generation and +> processor issues), since the architecture interface question is also +> important for portable Java-type VMs? + +I forsee the architecture looking kinda like this: (which is completely +subject to change) + +1. The VM code is NOT guaranteed safe in a java sense. Doing so makes it + basically impossible to support C like languages. Besides that, + certifying a register based language as safe at run time would be a + pretty expensive operation to have to do. Additionally, we would like + to be able to statically eliminate many bounds checks in Java + programs... for example. + + 2. Instead, we can do the following (eventually): + * Java bytecode is used as our "safe" representation (to avoid + reinventing something that we don't add much value to). When the + user chooses to execute Java bytecodes directly (ie, not + precompiled) the runtime compiler can do some very simple + transformations (JIT style) to convert it into valid input for our + VM. Performance is not wonderful, but it works right. + * The file is scheduled to be compiled (rigorously) at a later + time. This could be done by some background process or by a second + processor in the system during idle time or something... + * To keep things "safe" ie to enforce a sandbox on Java/foreign code, + we could sign the generated VM code with a host specific private + key. Then before the code is executed/loaded, we can check to see if + the trusted compiler generated the code. This would be much quicker + than having to validate consistency (especially if bounds checks have + been removed, for example) + +> This is important because the audiences for these two goals are very +> different. Architects and many compiler people care much more about +> the second question. The Java compiler and OS community care much more +> about the first one. + +3. By focusing on a more low level virtual machine, we have much more room + for value add. The nice safe "sandbox" VM can be provided as a layer + on top of it. It also lets us focus on the more interesting compilers + related projects. + +> 2. Design issues to consider (an initial list that we should continue +> to modify). Note that I'm not trying to suggest actual solutions here, +> but just various directions we can pursue: + +Understood. :) + +> a. A single-assignment VM, which we've both already been thinking +> about. + +Yup, I think that this makes a lot of sense. I am still intrigued, +however, by the prospect of a minimally allocated VM representation... I +think that it could have definite advantages for certain applications +(think very small machines, like PDAs). I don't, however, think that our +initial implementations should focus on this. :) + +Here are some other auxiliary goals that I think we should consider: + +1. Primary goal: Support a high performance dynamic compilation + system. This means that we have an "ideal" division of labor between + the runtime and static compilers. Of course, the other goals of the + system somewhat reduce the importance of this point (f.e. portability + reduces performance, but hopefully not much) +2. Portability to different processors. Since we are most familiar with + x86 and solaris, I think that these two are excellent candidates when + we get that far... +3. Support for all languages & styles of programming (general purpose + VM). This is the point that disallows java style bytecodes, where all + array refs are checked for bounds, etc... +4. Support linking between different language families. For example, call + C functions directly from Java without using the nasty/slow/gross JNI + layer. This involves several subpoints: + A. Support for languages that require garbage collectors and integration + with languages that don't. As a base point, we could insist on + always using a conservative GC, but implement free as a noop, f.e. + +> b. A strongly-typed VM. One question is do we need the types to be +> explicitly declared or should they be inferred by the dynamic +> compiler? + + B. This is kind of similar to another idea that I have: make OOP + constructs (virtual function tables, class heirarchies, etc) explicit + in the VM representation. I believe that the number of additional + constructs would be fairly low, but would give us lots of important + information... something else that would/could be important is to + have exceptions as first class types so that they would be handled in + a uniform way for the entire VM... so that C functions can call Java + functions for example... + +> c. How do we get more high-level information into the VM while keeping +> to a low-level VM design? +> o Explicit array references as operands? An alternative is +> to have just an array type, and let the index computations be +> separate 3-operand instructions. + + C. In the model I was thinking of (subject to change of course), we + would just have an array type (distinct from the pointer + types). This would allow us to have arbitrarily complex index + expressions, while still distinguishing "load" from "Array load", + for example. Perhaps also, switch jump tables would be first class + types as well? This would allow better reasoning about the program. + +5. Support dynamic loading of code from various sources. Already + mentioned above was the example of loading java bytecodes, but we want + to support dynamic loading of VM code as well. This makes the job of + the runtime compiler much more interesting: it can do interprocedural + optimizations that the static compiler can't do, because it doesn't + have all of the required information (for example, inlining from + shared libraries, etc...) + +6. Define a set of generally useful annotations to add to the VM + representation. For example, a function can be analysed to see if it + has any sideeffects when run... also, the MOD/REF sets could be + calculated, etc... we would have to determine what is reasonable. This + would generally be used to make IP optimizations cheaper for the + runtime compiler... + +> o Explicit instructions to handle aliasing, e.g.s: +> -- an instruction to say "I speculate that these two values are not +> aliased, but check at runtime", like speculative execution in +> EPIC? +> -- or an instruction to check whether two values are aliased and +> execute different code depending on the answer, somewhat like +> predicated code in EPIC + +These are also very good points... if this can be determined at compile +time. I think that an epic style of representation (not the instruction +packing, just the information presented) could be a very interesting model +to use... more later... + +> o (This one is a difficult but powerful idea.) +> A "thread-id" field on every instruction that allows the static +> compiler to generate a set of parallel threads, and then have +> the runtime compiler and hardware do what they please with it. +> This has very powerful uses, but thread-id on every instruction +> is expensive in terms of instruction size and code size. +> We would need to compactly encode it somehow. + +Yes yes yes! :) I think it would be *VERY* useful to include this kind +of information (which EPIC architectures *implicitly* encode. The trend +that we are seeing supports this greatly: + +1. Commodity processors are getting massive SIMD support: + * Intel/Amd MMX/MMX2 + * AMD's 3Dnow! + * Intel's SSE/SSE2 + * Sun's VIS +2. SMP is becoming much more common, especially in the server space. +3. Multiple processors on a die are right around the corner. + +If nothing else, not designing this in would severely limit our future +expansion of the project... + +> Also, this will require some reading on at least two other +> projects: +> -- Multiscalar architecture from Wisconsin +> -- Simultaneous multithreading architecture from Washington +> +> o Or forget all this and stick to a traditional instruction set? + +Heh... :) Well, from a pure research point of view, it is almost more +attactive to go with the most extreme/different ISA possible. On one axis +you get safety and conservatism, and on the other you get degree of +influence that the results have. Of course the problem with pure research +is that often times there is no concrete product of the research... :) + +> BTW, on an unrelated note, after the meeting yesterday, I did remember +> that you had suggested doing instruction scheduling on SSA form instead +> of a dependence DAG earlier in the semester. When we talked about +> it yesterday, I didn't remember where the idea had come from but I +> remembered later. Just giving credit where its due... + +:) Thanks. + +> Perhaps you can save the above as a file under RCS so you and I can +> continue to expand on this. + +I think it makes sense to do so when we get our ideas more formalized and +bounce it back and forth a couple of times... then I'll do a more formal +writeup of our goals and ideas. Obviously our first implementation will +not want to do all of the stuff that I pointed out above... be we will +want to design the project so that we do not artificially limit ourselves +at sometime in the future... + +Anyways, let me know what you think about these ideas... and if they sound +reasonable... + +-Chris + diff --git a/docs/HistoricalNotes/2000-12-06-EncodingIdea.txt b/docs/HistoricalNotes/2000-12-06-EncodingIdea.txt new file mode 100644 index 00000000..8c452924 --- /dev/null +++ b/docs/HistoricalNotes/2000-12-06-EncodingIdea.txt @@ -0,0 +1,30 @@ +From: Chris Lattner [mailto:sabre@nondot.org] +Sent: Wednesday, December 06, 2000 6:41 PM +To: Vikram S. Adve +Subject: Additional idea with respect to encoding + +Here's another idea with respect to keeping the common case instruction +size down (less than 32 bits ideally): + +Instead of encoding an instruction to operate on two register numbers, +have it operate on two negative offsets based on the current register +number. Therefore, instead of using: + +r57 = add r55, r56 (r57 is the implicit dest register, of course) + +We could use: + +r57 = add -2, -1 + +My guess is that most SSA references are to recent values (especially if +they correspond to expressions like (x+y*z+p*q/ ...), so the negative +numbers would tend to stay small, even at the end of the procedure (where +the implicit register destination number could be quite large). Of course +the negative sign is reduntant, so you would be storing small integers +almost all of the time, and 5-6 bits worth of register number would be +plenty for most cases... + +What do you think? + +-Chris + diff --git a/docs/HistoricalNotes/2000-12-06-MeetingSummary.txt b/docs/HistoricalNotes/2000-12-06-MeetingSummary.txt new file mode 100644 index 00000000..01b644b3 --- /dev/null +++ b/docs/HistoricalNotes/2000-12-06-MeetingSummary.txt @@ -0,0 +1,83 @@ +SUMMARY +------- + +We met to discuss the LLVM instruction format and bytecode representation: + +ISSUES RESOLVED +--------------- + +1. We decided that we shall use a flat namespace to represent our + variables in SSA form, as opposed to having a two dimensional namespace + of the original variable and the SSA instance subscript. + +ARGUMENT AGAINST: + * A two dimensional namespace would be valuable when doing alias + analysis because the extra information can help limit the scope of + analysis. + +ARGUMENT FOR: + * Including this information would require that all users of the LLVM + bytecode would have to parse and handle it. This would slow down the + common case and inflate the instruction representation with another + infinite variable space. + +REASONING: + * It was decided that because original variable sources could be + reconstructed from SSA form in linear time, that it would be an + unjustified expense for the common case to include the extra + information for one optimization. Alias analysis itself is typically + greater than linear in asymptotic complexity, so this extra analaysis + would not affect the runtime of the optimization in a significant + way. Additionally, this would be an unlikely optimization to do at + runtime. + + +IDEAS TO CONSIDER +----------------- + +1. Including dominator information in the LLVM bytecode + representation. This is one example of an analysis result that may be + packaged with the bytecodes themselves. As a conceptual implementation + idea, we could include an immediate dominator number for each basic block + in the LLVM bytecode program. Basic blocks could be numbered according + to the order of occurrence in the bytecode representation. + +2. Including loop header and body information. This would facilitate + detection of intervals and natural loops. + +UNRESOLVED ISSUES +----------------- + +1. Will oSUIF provide enough of an infrastructure to support the research + that we will be doing? We know that it has less than stellar + performance, but hope that this will be of little importance for our + static compiler. This could affect us if we decided to do some IP + research. Also we do not yet understand the level of exception support + currently implemented. + +2. Should we consider the requirements of a direct hardware implementation + of the LLVM when we design it? If so, several design issues should + have their priorities shifted. The other option is to focus on a + software layer interpreting the LLVM in all cases. + +3. Should we use some form of packetized format to improve forward + compatibility? For example, we could design the system to encode a + packet type and length field before analysis information, to allow a + runtime to skip information that it didn't understand in a bytecode + stream. The obvious benefit would be for compatibility, the drawback + is that it would tend to splinter that 'standard' LLVM definition. + +4. Should we use fixed length instructions or variable length + instructions? Fetching variable length instructions is expensive (for + either hardware or software based LLVM runtimes), but we have several + 'infinite' spaces that instructions operate in (SSA register numbers, + type spaces, or packet length [if packets were implemented]). Several + options were mentioned including: + A. Using 16 or 32 bit numbers, which would be 'big enough' + B. A scheme similar to how UTF-8 works, to encode infinite numbers + while keeping small number small. + C. Use something similar to Huffman encoding, so that the most common + numbers are the smallest. + +-Chris + diff --git a/docs/HistoricalNotes/2001-01-31-UniversalIRIdea.txt b/docs/HistoricalNotes/2001-01-31-UniversalIRIdea.txt new file mode 100644 index 00000000..111706a3 --- /dev/null +++ b/docs/HistoricalNotes/2001-01-31-UniversalIRIdea.txt @@ -0,0 +1,39 @@ +Date: Wed, 31 Jan 2001 12:04:33 -0600 +From: Vikram S. Adve +To: Chris Lattner +Subject: another thought + +I have a budding idea about making LLVM a little more ambitious: a +customizable runtime system that can be used to implement language-specific +virtual machines for many different languages. E.g., a C vm, a C++ vm, a +Java vm, a Lisp vm, .. + +The idea would be that LLVM would provide a standard set of runtime features +(some low-level like standard assembly instructions with code generation and +static and runtime optimization; some higher-level like type-safety and +perhaps a garbage collection library). Each language vm would select the +runtime features needed for that language, extending or customizing them as +needed. Most of the machine-dependent code-generation and optimization +features as well as low-level machine-independent optimizations (like PRE) +could be provided by LLVM and should be sufficient for any language, +simplifying the language compiler. (This would also help interoperability +between languages.) Also, some or most of the higher-level +machine-independent features like type-safety and access safety should be +reusable by different languages, with minor extensions. The language +compiler could then focus on language-specific analyses and optimizations. + +The risk is that this sounds like a universal IR -- something that the +compiler community has tried and failed to develop for decades, and is +universally skeptical about. No matter what we say, we won't be able to +convince anyone that we have a universal IR that will work. We need to +think about whether LLVM is different or if has something novel that might +convince people. E.g., the idea of providing a package of separable +features that different languages select from. Also, using SSA with or +without type-safety as the intermediate representation. + +One interesting starting point would be to discuss how a JVM would be +implemented on top of LLVM a bit more. That might give us clues on how to +structure LLVM to support one or more language VMs. + +--Vikram + diff --git a/docs/HistoricalNotes/2001-02-06-TypeNotationDebate.txt b/docs/HistoricalNotes/2001-02-06-TypeNotationDebate.txt new file mode 100644 index 00000000..c09cf1f0 --- /dev/null +++ b/docs/HistoricalNotes/2001-02-06-TypeNotationDebate.txt @@ -0,0 +1,67 @@ +Date: Tue, 6 Feb 2001 20:27:37 -0600 (CST) +From: Chris Lattner +To: Vikram S. Adve +Subject: Type notation debate... + +This is the way that I am currently planning on implementing types: + +Primitive Types: +type ::= void|bool|sbyte|ubyte|short|ushort|int|uint|long|ulong + +Method: +typelist ::= typelisth | /*empty*/ +typelisth ::= type | typelisth ',' type +type ::= type (typelist) + +Arrays (without and with size): +type ::= '[' type ']' | '[' INT ',' type ']' + +Pointer: +type ::= type '*' + +Structure: +type ::= '{' typelist '}' + +Packed: +type ::= '<' INT ',' type '>' + +Simple examples: + +[[ %4, int ]] - array of (array of 4 (int)) +[ { int, int } ] - Array of structure +[ < %4, int > ] - Array of 128 bit SIMD packets +int (int, [[int, %4]]) - Method taking a 2d array and int, returning int + + +Okay before you comment, please look at: + +http://www.research.att.com/~bs/devXinterview.html + +Search for "In another interview, you defined the C declarator syntax as +an experiment that failed. However, this syntactic construct has been +around for 27 years and perhaps more; why do you consider it problematic +(except for its cumbersome syntax)?" and read that response for me. :) + +Now with this syntax, his example would be represented as: + +[ %10, bool (int, int) * ] * + +vs + +bool (*(*)[10])(int, int) + +in C. + +Basically, my argument for this type construction system is that it is +VERY simple to use and understand (although it IS different than C, it is +very simple and straightforward, which C is NOT). In fact, I would assert +that most programmers TODAY do not understand pointers to member +functions, and have to look up an example when they have to write them. + +In my opinion, it is critically important to have clear and concise type +specifications, because types are going to be all over the programs. + +Let me know your thoughts on this. :) + +-Chris + diff --git a/docs/HistoricalNotes/2001-02-06-TypeNotationDebateResp1.txt b/docs/HistoricalNotes/2001-02-06-TypeNotationDebateResp1.txt new file mode 100644 index 00000000..8bfefbf6 --- /dev/null +++ b/docs/HistoricalNotes/2001-02-06-TypeNotationDebateResp1.txt @@ -0,0 +1,75 @@ +Date: Thu, 8 Feb 2001 08:42:04 -0600 +From: Vikram S. Adve +To: Chris Lattner +Subject: RE: Type notation debate... + +Chris, + +> Okay before you comment, please look at: +> +> http://www.research.att.com/~bs/devXinterview.html + +I read this argument. Even before that, I was already in agreement with you +and him that the C declarator syntax is difficult and confusing. + +But in fact, if you read the entire answer carefully, he came to the same +conclusion I do: that you have to go with familiar syntax over logical +syntax because familiarity is such a strong force: + + "However, familiarity is a strong force. To compare, in English, we +live +more or less happily with the absurd rules for "to be" (am, are, is, been, +was, were, ...) and all attempts to simplify are treated with contempt or +(preferably) humor. It be a curious world and it always beed." + +> Basically, my argument for this type construction system is that it is +> VERY simple to use and understand (although it IS different than C, it is +> very simple and straightforward, which C is NOT). In fact, I would assert +> that most programmers TODAY do not understand pointers to member +> functions, and have to look up an example when they have to write them. + +Again, I don't disagree with this at all. But to some extent this +particular problem is inherently difficult. Your syntax for the above +example may be easier for you to read because this is the way you have been +thinking about it. Honestly, I don't find it much easier than the C syntax. +In either case, I would have to look up an example to write pointers to +member functions. + +But pointers to member functions are nowhere near as common as arrays. And +the old array syntax: + type [ int, int, ...] +is just much more familiar and clear to people than anything new you +introduce, no matter how logical it is. Introducing a new syntax that may +make function pointers easier but makes arrays much more difficult seems +very risky to me. + +> In my opinion, it is critically important to have clear and concise type +> specifications, because types are going to be all over the programs. + +I absolutely agree. But the question is, what is more clear and concise? +The syntax programmers are used to out of years of experience or a new +syntax that they have never seen that has a more logical structure. I think +the answer is the former. Sometimes, you have to give up a better idea +because you can't overcome sociological barriers to it. Qwerty keyboards +and Windows are two classic examples of bad technology that are difficult to +root out. + +P.S. Also, while I agree that most your syntax is more logical, there is +one part that isn't: + +Arrays (without and with size): +type ::= '[' type ']' | '[' INT ',' type ']'. + +The arrays with size lists the dimensions and the type in a single list. +That is just too confusing: + [10, 40, int] +This seems to be a 3-D array where the third dimension is something strange. +It is too confusing to have a list of 3 things, some of which are dimensions +and one is a type. Either of the following would be better: + + array [10, 40] of int +or + int [10, 40] + +--Vikram + diff --git a/docs/HistoricalNotes/2001-02-06-TypeNotationDebateResp2.txt b/docs/HistoricalNotes/2001-02-06-TypeNotationDebateResp2.txt new file mode 100644 index 00000000..6e978415 --- /dev/null +++ b/docs/HistoricalNotes/2001-02-06-TypeNotationDebateResp2.txt @@ -0,0 +1,53 @@ +Date: Thu, 8 Feb 2001 14:31:05 -0600 (CST) +From: Chris Lattner +To: Vikram S. Adve +Subject: RE: Type notation debate... + +> Arrays (without and with size): +> type ::= '[' type ']' | '[' INT ',' type ']'. +> +> The arrays with size lists the dimensions and the type in a single list. +> That is just too confusing: + +> [10, 40, int] +> This seems to be a 3-D array where the third dimension is something strange. +> It is too confusing to have a list of 3 things, some of which are dimensions +> and one is a type. + +The above grammar indicates that there is only one integer parameter, ie +the upper bound. The lower bound is always implied to be zero, for +several reasons: + +* As a low level VM, we want to expose addressing computations + explicitly. Since the lower bound must always be known in a high level + language statically, the language front end can do the translation + automatically. +* This fits more closely with what Java needs, ie what we need in the + short term. Java arrays are always zero based. + +If a two element list is too confusing, I would recommend an alternate +syntax of: + +type ::= '[' type ']' | '[' INT 'x' type ']'. + +For example: + [12 x int] + [12x int] + [ 12 x [ 4x int ]] + +Which is syntactically nicer, and more explicit. + +> Either of the following would be better: +> array [10, 40] of int + +I considered this approach for arrays in general (ie array of int/ array +of 12 int), but found that it made declarations WAY too long. Remember +that because of the nature of llvm, you get a lot of types strewn all over +the program, and using the 'typedef' like facility is not a wonderful +option, because then types aren't explicit anymore. + +I find this email interesting, because you contradict the previous email +you sent, where you recommend that we stick to C syntax.... + +-Chris + diff --git a/docs/HistoricalNotes/2001-02-06-TypeNotationDebateResp4.txt b/docs/HistoricalNotes/2001-02-06-TypeNotationDebateResp4.txt new file mode 100644 index 00000000..83973244 --- /dev/null +++ b/docs/HistoricalNotes/2001-02-06-TypeNotationDebateResp4.txt @@ -0,0 +1,89 @@ +> But in fact, if you read the entire answer carefully, he came to the same +> conclusion I do: that you have to go with familiar syntax over logical +> syntax because familiarity is such a strong force: +> "However, familiarity is a strong force. To compare, in English, we +live +> more or less happily with the absurd rules for "to be" (am, are, is, been, +> was, were, ...) and all attempts to simplify are treated with contempt or +> (preferably) humor. It be a curious world and it always beed." + +Although you have to remember that his situation was considerably +different than ours. He was in a position where he was designing a high +level language that had to be COMPATIBLE with C. Our language is such +that a new person would have to learn the new, different, syntax +anyways. Making them learn about the type system does not seem like much +of a stretch from learning the opcodes and how SSA form works, and how +everything ties together... + +> > Basically, my argument for this type construction system is that it is +> > VERY simple to use and understand (although it IS different than C, it is +> > very simple and straightforward, which C is NOT). In fact, I would assert +> > that most programmers TODAY do not understand pointers to member +> > functions, and have to look up an example when they have to write them. + +> Again, I don't disagree with this at all. But to some extent this +> particular problem is inherently difficult. Your syntax for the above +> example may be easier for you to read because this is the way you have been +> thinking about it. Honestly, I don't find it much easier than the C syntax. +> In either case, I would have to look up an example to write pointers to +> member functions. + +I would argue that because the lexical structure of the language is self +consistent, any person who spent a significant amount of time programming +in LLVM directly would understand how to do it without looking it up in a +manual. The reason this does not work for C is because you rarely have to +declare these pointers, and the syntax is inconsistent with the method +declaration and calling syntax. + +> But pointers to member functions are nowhere near as common as arrays. + +Very true. If you're implementing an object oriented language, however, +remember that you have to do all the pointer to member function stuff +yourself.... so every time you invoke a virtual method one is involved +(instead of having C++ hide it for you behind "syntactic sugar"). + +> And the old array syntax: +> type [ int, int, ...] +> is just much more familiar and clear to people than anything new you +> introduce, no matter how logical it is. + +Erm... excuse me but how is this the "old array syntax"? If you are +arguing for consistency with C, you should be asking for 'type int []', +which is significantly different than the above (beside the above +introduces a new operator and duplicates information +needlessly). Basically what I am suggesting is exactly the above without +the fluff. So instead of: + + type [ int, int, ...] + +you use: + + type [ int ] + +> Introducing a new syntax that may +> make function pointers easier but makes arrays much more difficult seems +> very risky to me. + +This is not about function pointers. This is about consistency in the +type system, and consistency with the rest of the language. The point +above does not make arrays any more difficult to use, and makes the +structure of types much more obvious than the "c way". + +> > In my opinion, it is critically important to have clear and concise type +> > specifications, because types are going to be all over the programs. +> +> I absolutely agree. But the question is, what is more clear and concise? +> The syntax programmers are used to out of years of experience or a new +> syntax that they have never seen that has a more logical structure. I think +> the answer is the former. Sometimes, you have to give up a better idea +> because you can't overcome sociological barriers to it. Qwerty keyboards +> and Windows are two classic examples of bad technology that are difficult to +> root out. + +Very true, but you seem to be advocating a completely different Type +system than C has, in addition to it not offering the advantages of clear +structure that the system I recommended does... so you seem to not have a +problem with changing this, just with what I change it to. :) + +-Chris + diff --git a/docs/HistoricalNotes/2001-02-09-AdveComments.txt b/docs/HistoricalNotes/2001-02-09-AdveComments.txt new file mode 100644 index 00000000..5503233c --- /dev/null +++ b/docs/HistoricalNotes/2001-02-09-AdveComments.txt @@ -0,0 +1,120 @@ +Ok, here are my comments and suggestions about the LLVM instruction set. +We should discuss some now, but can discuss many of them later, when we +revisit synchronization, type inference, and other issues. +(We have discussed some of the comments already.) + + +o We should consider eliminating the type annotation in cases where it is + essentially obvious from the instruction type, e.g., in br, it is obvious + that the first arg. should be a bool and the other args should be labels: + + br bool , label , label + + I think your point was that making all types explicit improves clarity + and readability. I agree to some extent, but it also comes at the cost + of verbosity. And when the types are obvious from people's experience + (e.g., in the br instruction), it doesn't seem to help as much. + + +o On reflection, I really like your idea of having the two different switch + types (even though they encode implementation techniques rather than + semantics). It should simplify building the CFG and my guess is it could + enable some significant optimizations, though we should think about which. + + +o In the lookup-indirect form of the switch, is there a reason not to make + the val-type uint? Most HLL switch statements (including Java and C++) + require that anyway. And it would also make the val-type uniform + in the two forms of the switch. + + I did see the switch-on-bool examples and, while cute, we can just use + the branch instructions in that particular case. + + +o I agree with your comment that we don't need 'neg'. + + +o There's a trade-off with the cast instruction: + + it avoids having to define all the upcasts and downcasts that are + valid for the operands of each instruction (you probably have thought + of other benefits also) + - it could make the bytecode significantly larger because there could + be a lot of cast operations + + +o Making the second arg. to 'shl' a ubyte seems good enough to me. + 255 positions seems adequate for several generations of machines + and is more compact than uint. + + +o I still have some major concerns about including malloc and free in the + language (either as builtin functions or instructions). LLVM must be + able to represent code from many different languages. Languages such as + C, C++ Java and Fortran 90 would not be able to use our malloc anyway + because each of them will want to provide a library implementation of it. + + This gets even worse when code from different languages is linked + into a single executable (which is fairly common in large apps). + Having a single malloc would just not suffice, and instead would simply + complicate the picture further because it adds an extra variant in + addition to the one each language provides. + + Instead, providing a default library version of malloc and free + (and perhaps a malloc_gc with garbage collection instead of free) + would make a good implementation available to anyone who wants it. + + I don't recall all your arguments in favor so let's discuss this again, + and soon. + + +o 'alloca' on the other hand sounds like a good idea, and the + implementation seems fairly language-independent so it doesn't have the + problems with malloc listed above. + + +o About indirect call: + Your option #2 sounded good to me. I'm not sure I understand your + concern about an explicit 'icall' instruction? + + +o A pair of important synchronization instr'ns to think about: + load-linked + store-conditional + + +o Other classes of instructions that are valuable for pipeline performance: + conditional-move + predicated instructions + + +o I believe tail calls are relatively easy to identify; do you know why + .NET has a tailcall instruction? + + +o I agree that we need a static data space. Otherwise, emulating global + data gets unnecessarily complex. + + +o About explicit parallelism: + + We once talked about adding a symbolic thread-id field to each + instruction. (It could be optional so single-threaded codes are + not penalized.) This could map well to multi-threaded architectures + while providing easy ILP for single-threaded onces. But it is probably + too radical an idea to include in a base version of LLVM. Instead, it + could a great topic for a separate study. + + What is the semantics of the IA64 stop bit? + + + + +o And finally, another thought about the syntax for arrays :-) + + Although this syntax: + array of + is verbose, it will be used only in the human-readable assembly code so + size should not matter. I think we should consider it because I find it + to be the clearest syntax. It could even make arrays of function + pointers somewhat readable. + diff --git a/docs/HistoricalNotes/2001-02-09-AdveCommentsResponse.txt b/docs/HistoricalNotes/2001-02-09-AdveCommentsResponse.txt new file mode 100644 index 00000000..da502636 --- /dev/null +++ b/docs/HistoricalNotes/2001-02-09-AdveCommentsResponse.txt @@ -0,0 +1,245 @@ +From: Chris Lattner +To: "Vikram S. Adve" +Subject: Re: LLVM Feedback + +I've included your feedback in the /home/vadve/lattner/llvm/docs directory +so that it will live in CVS eventually with the rest of LLVM. I've +significantly updated the documentation to reflect the changes you +suggested, as specified below: + +> We should consider eliminating the type annotation in cases where it is +> essentially obvious from the instruction type: +> br bool , label , label +> I think your point was that making all types explicit improves clarity +> and readability. I agree to some extent, but it also comes at the +> cost of verbosity. And when the types are obvious from people's +> experience (e.g., in the br instruction), it doesn't seem to help as +> much. + +Very true. We should discuss this more, but my reasoning is more of a +consistency argument. There are VERY few instructions that can have all +of the types eliminated, and doing so when available unnecessarily makes +the language more difficult to handle. Especially when you see 'int +%this' and 'bool %that' all over the place, I think it would be +disorienting to see: + + br %predicate, %iftrue, %iffalse + +for branches. Even just typing that once gives me the creeps. ;) Like I +said, we should probably discuss this further in person... + +> On reflection, I really like your idea of having the two different +> switch types (even though they encode implementation techniques rather +> than semantics). It should simplify building the CFG and my guess is it +> could enable some significant optimizations, though we should think +> about which. + +Great. I added a note to the switch section commenting on how the VM +should just use the instruction type as a hint, and that the +implementation may choose altermate representations (such as predicated +branches). + +> In the lookup-indirect form of the switch, is there a reason not to +> make the val-type uint? + +No. This was something I was debating for a while, and didn't really feel +strongly about either way. It is common to switch on other types in HLL's +(for example signed int's are particularly common), but in this case, all +that will be added is an additional 'cast' instruction. I removed that +from the spec. + +> I agree with your comment that we don't need 'neg' + +Removed. + +> There's a trade-off with the cast instruction: +> + it avoids having to define all the upcasts and downcasts that are +> valid for the operands of each instruction (you probably have +> thought of other benefits also) +> - it could make the bytecode significantly larger because there could +> be a lot of cast operations + + + You NEED casts to represent things like: + void foo(float); + ... + int x; + ... + foo(x); + in a language like C. Even in a Java like language, you need upcasts + and some way to implement dynamic downcasts. + + Not all forms of instructions take every type (for example you can't + shift by a floating point number of bits), thus SOME programs will need + implicit casts. + +To be efficient and to avoid your '-' point above, we just have to be +careful to specify that the instructions shall operate on all common +types, therefore casting should be relatively uncommon. For example all +of the arithmetic operations work on almost all data types. + +> Making the second arg. to 'shl' a ubyte seems good enough to me. +> 255 positions seems adequate for several generations of machines + +Okay, that comment is removed. + +> and is more compact than uint. + +No, it isn't. Remember that the bytecode encoding saves value slots into +the bytecode instructions themselves, not constant values. This is +another case where we may introduce more cast instructions (but we will +also reduce the number of opcode variants that must be supported by a +virtual machine). Because most shifts are by constant values, I don't +think that we'll have to cast many shifts. :) + +> I still have some major concerns about including malloc and free in the +> language (either as builtin functions or instructions). + +Agreed. How about this proposal: + +malloc/free are either built in functions or actual opcodes. They provide +all of the type safety that the document would indicate, blah blah +blah. :) + +Now, because of all of the excellent points that you raised, an +implementation may want to override the default malloc/free behavior of +the program. To do this, they simply implement a "malloc" and +"free" function. The virtual machine will then be defined to use the user +defined malloc/free function (which return/take void*'s, not type'd +pointers like the builtin function would) if one is available, otherwise +fall back on a system malloc/free. + +Does this sound like a good compromise? It would give us all of the +typesafety/elegance in the language while still allowing the user to do +all the cool stuff they want to... + +> 'alloca' on the other hand sounds like a good idea, and the +> implementation seems fairly language-independent so it doesn't have the +> problems with malloc listed above. + +Okay, once we get the above stuff figured out, I'll put it all in the +spec. + +> About indirect call: +> Your option #2 sounded good to me. I'm not sure I understand your +> concern about an explicit 'icall' instruction? + +I worry too much. :) The other alternative has been removed. 'icall' is +now up in the instruction list next to 'call'. + +> I believe tail calls are relatively easy to identify; do you know why +> .NET has a tailcall instruction? + +Although I am just guessing, I believe it probably has to do with the fact +that they want languages like Haskell and lisp to be efficiently runnable +on their VM. Of course this means that the VM MUST implement tail calls +'correctly', or else life will suck. :) I would put this into a future +feature bin, because it could be pretty handy... + +> A pair of important synchronization instr'ns to think about: +> load-linked +> store-conditional + +What is 'load-linked'? I think that (at least for now) I should add these +to the 'possible extensions' section, because they are not immediately +needed... + +> Other classes of instructions that are valuable for pipeline +> performance: +> conditional-move +> predicated instructions + +Conditional move is effectly a special case of a predicated +instruction... and I think that all predicated instructions can possibly +be implemented later in LLVM. It would significantly change things, and +it doesn't seem to be very necessary right now. It would seem to +complicate flow control analysis a LOT in the virtual machine. I would +tend to prefer that a predicated architecture like IA64 convert from a +"basic block" representation to a predicated rep as part of it's dynamic +complication phase. Also, if a basic block contains ONLY a move, then +that can be trivally translated into a conditional move... + +> I agree that we need a static data space. Otherwise, emulating global +> data gets unnecessarily complex. + +Definitely. Also a later item though. :) + +> We once talked about adding a symbolic thread-id field to each +> .. +> Instead, it could a great topic for a separate study. + +Agreed. :) + +> What is the semantics of the IA64 stop bit? + +Basically, the IA64 writes instructions like this: +mov ... +add ... +sub ... +op xxx +op xxx +;; +mov ... +add ... +sub ... +op xxx +op xxx +;; + +Where the ;; delimits a group of instruction with no dependencies between +them, which can all be executed concurrently (to the limits of the +available functional units). The ;; gets translated into a bit set in one +of the opcodes. + +The advantages of this representation is that you don't have to do some +kind of 'thread id scheduling' pass by having to specify ahead of time how +many threads to use, and the representation doesn't have a per instruction +overhead... + +> And finally, another thought about the syntax for arrays :-) +> Although this syntax: +> array of +> is verbose, it will be used only in the human-readable assembly code so +> size should not matter. I think we should consider it because I find it +> to be the clearest syntax. It could even make arrays of function +> pointers somewhat readable. + +My only comment will be to give you an example of why this is a bad +idea. :) + +Here is an example of using the switch statement (with my recommended +syntax): + +switch uint %val, label %otherwise, + [%3 x {uint, label}] [ { uint %57, label %l1 }, + { uint %20, label %l2 }, + { uint %14, label %l3 } ] + +Here it is with the syntax you are proposing: + +switch uint %val, label %otherwise, + array %3 of {uint, label} + array of {uint, label} + { uint %57, label %l1 }, + { uint %20, label %l2 }, + { uint %14, label %l3 } + +Which is ambiguous and very verbose. It would be possible to specify +constants with [] brackets as in my syntax, which would look like this: + +switch uint %val, label %otherwise, + array %3 of {uint, label} [ { uint %57, label %l1 }, + { uint %20, label %l2 }, + { uint %14, label %l3 } ] + +But then the syntax is inconsistent between type definition and constant +definition (why do []'s enclose the constants but not the types??). + +Anyways, I'm sure that there is much debate still to be had over +this... :) + +-Chris + +http://www.nondot.org/~sabre/os/ +http://www.nondot.org/MagicStats/ +http://korbit.sourceforge.net/ + + diff --git a/docs/HistoricalNotes/2001-02-13-Reference-Memory.txt b/docs/HistoricalNotes/2001-02-13-Reference-Memory.txt new file mode 100644 index 00000000..2c7534d9 --- /dev/null +++ b/docs/HistoricalNotes/2001-02-13-Reference-Memory.txt @@ -0,0 +1,39 @@ +Date: Tue, 13 Feb 2001 13:29:52 -0600 (CST) +From: Chris Lattner +To: Vikram S. Adve +Subject: LLVM Concerns... + + +I've updated the documentation to include load store and allocation +instructions (please take a look and let me know if I'm on the right +track): + +file:/home/vadve/lattner/llvm/docs/LangRef.html#memoryops + +I have a couple of concerns I would like to bring up: + +1. Reference types + Right now, I've spec'd out the language to have a pointer type, which + works fine for lots of stuff... except that Java really has + references: constrained pointers that cannot be manipulated: added and + subtracted, moved, etc... Do we want to have a type like this? It + could be very nice for analysis (pointer always points to the start of + an object, etc...) and more closely matches Java semantics. The + pointer type would be kept for C++ like semantics. Through analysis, + C++ pointers could be promoted to references in the LLVM + representation. + +2. Our "implicit" memory references in assembly language: + After thinking about it, this model has two problems: + A. If you do pointer analysis and realize that two stores are + independent and can share the same memory source object, there is + no way to represent this in either the bytecode or assembly. + B. When parsing assembly/bytecode, we effectively have to do a full + SSA generation/PHI node insertion pass to build the dependencies + when we don't want the "pinned" representation. This is not + cool. + I'm tempted to make memory references explicit in both the assembly and + bytecode to get around this... what do you think? + +-Chris + diff --git a/docs/HistoricalNotes/2001-02-13-Reference-MemoryResponse.txt b/docs/HistoricalNotes/2001-02-13-Reference-MemoryResponse.txt new file mode 100644 index 00000000..50534337 --- /dev/null +++ b/docs/HistoricalNotes/2001-02-13-Reference-MemoryResponse.txt @@ -0,0 +1,47 @@ +Date: Tue, 13 Feb 2001 18:25:42 -0600 +From: Vikram S. Adve +To: Chris Lattner +Subject: RE: LLVM Concerns... + +> 1. Reference types +> Right now, I've spec'd out the language to have a pointer type, which +> works fine for lots of stuff... except that Java really has +> references: constrained pointers that cannot be manipulated: added and +> subtracted, moved, etc... Do we want to have a type like this? It +> could be very nice for analysis (pointer always points to the start of +> an object, etc...) and more closely matches Java semantics. The +> pointer type would be kept for C++ like semantics. Through analysis, +> C++ pointers could be promoted to references in the LLVM +> representation. + + +You're right, having references would be useful. Even for C++ the *static* +compiler could generate references instead of pointers with fairly +straightforward analysis. Let's include a reference type for now. But I'm +also really concerned that LLVM is becoming big and complex and (perhaps) +too high-level. After we get some initial performance results, we may have +a clearer idea of what our goals should be and we should revisit this +question then. + +> 2. Our "implicit" memory references in assembly language: +> After thinking about it, this model has two problems: +> A. If you do pointer analysis and realize that two stores are +> independent and can share the same memory source object, + +not sure what you meant by "share the same memory source object" + +> there is +> no way to represent this in either the bytecode or assembly. +> B. When parsing assembly/bytecode, we effectively have to do a full +> SSA generation/PHI node insertion pass to build the dependencies +> when we don't want the "pinned" representation. This is not +> cool. + +I understand the concern. But again, let's focus on the performance first +and then look at the language design issues. E.g., it would be good to know +how big the bytecode files are before expanding them further. I am pretty +keen to explore the implications of LLVM for mobile devices. Both bytecode +size and power consumption are important to consider there. + +--Vikram + diff --git a/docs/HistoricalNotes/2001-04-16-DynamicCompilation.txt b/docs/HistoricalNotes/2001-04-16-DynamicCompilation.txt new file mode 100644 index 00000000..5f7843ab --- /dev/null +++ b/docs/HistoricalNotes/2001-04-16-DynamicCompilation.txt @@ -0,0 +1,49 @@ +By Chris: + +LLVM has been designed with two primary goals in mind. First we strive to +enable the best possible division of labor between static and dynamic +compilers, and second, we need a flexible and powerful interface +between these two complementary stages of compilation. We feel that +providing a solution to these two goals will yield an excellent solution +to the performance problem faced by modern architectures and programming +languages. + +A key insight into current compiler and runtime systems is that a +compiler may fall in anywhere in a "continuum of compilation" to do its +job. On one side, scripting languages statically compile nothing and +dynamically compile (or equivalently, interpret) everything. On the far +other side, traditional static compilers process everything statically and +nothing dynamically. These approaches have typically been seen as a +tradeoff between performance and portability. On a deeper level, however, +there are two reasons that optimal system performance may be obtained by a +system somewhere in between these two extremes: Dynamic application +behavior and social constraints. + +From a technical perspective, pure static compilation cannot ever give +optimal performance in all cases, because applications have varying dynamic +behavior that the static compiler cannot take into consideration. Even +compilers that support profile guided optimization generate poor code in +the real world, because using such optimization tunes that application +to one particular usage pattern, whereas real programs (as opposed to +benchmarks) often have several different usage patterns. + +On a social level, static compilation is a very shortsighted solution to +the performance problem. Instruction set architectures (ISAs) continuously +evolve, and each implementation of an ISA (a processor) must choose a set +of tradeoffs that make sense in the market context that it is designed for. +With every new processor introduced, the vendor faces two fundamental +problems: First, there is a lag time between when a processor is introduced +to when compilers generate quality code for the architecture. Secondly, +even when compilers catch up to the new architecture there is often a large +body of legacy code that was compiled for previous generations and will +not or can not be upgraded. Thus a large percentage of code running on a +processor may be compiled quite sub-optimally for the current +characteristics of the dynamic execution environment. + +For these reasons, LLVM has been designed from the beginning as a long-term +solution to these problems. Its design allows the large body of platform +independent, static, program optimizations currently in compilers to be +reused unchanged in their current form. It also provides important static +type information to enable powerful dynamic and link time optimizations +to be performed quickly and efficiently. This combination enables an +increase in effective system performance for real world environments. diff --git a/docs/HistoricalNotes/2001-05-18-ExceptionHandling.txt b/docs/HistoricalNotes/2001-05-18-ExceptionHandling.txt new file mode 100644 index 00000000..b546301d --- /dev/null +++ b/docs/HistoricalNotes/2001-05-18-ExceptionHandling.txt @@ -0,0 +1,202 @@ +Meeting notes: Implementation idea: Exception Handling in C++/Java + +The 5/18/01 meeting discussed ideas for implementing exceptions in LLVM. +We decided that the best solution requires a set of library calls provided by +the VM, as well as an extension to the LLVM function invocation syntax. + +The LLVM function invocation instruction previously looks like this (ignoring +types): + + call func(arg1, arg2, arg3) + +The extension discussed today adds an optional "with" clause that +associates a label with the call site. The new syntax looks like this: + + call func(arg1, arg2, arg3) with funcCleanup + +This funcHandler always stays tightly associated with the call site (being +encoded directly into the call opcode itself), and should be used whenever +there is cleanup work that needs to be done for the current function if +an exception is thrown by func (or if we are in a try block). + +To support this, the VM/Runtime provide the following simple library +functions (all syntax in this document is very abstract): + +typedef struct { something } %frame; + The VM must export a "frame type", that is an opaque structure used to + implement different types of stack walking that may be used by various + language runtime libraries. We imagine that it would be typical to + represent a frame with a PC and frame pointer pair, although that is not + required. + +%frame getStackCurrentFrame(); + Get a frame object for the current function. Note that if the current + function was inlined into its caller, the "current" frame will belong to + the "caller". + +bool isFirstFrame(%frame f); + Returns true if the specified frame is the top level (first activated) frame + for this thread. For the main thread, this corresponds to the main() + function, for a spawned thread, it corresponds to the thread function. + +%frame getNextFrame(%frame f); + Return the previous frame on the stack. This function is undefined if f + satisfies the predicate isFirstFrame(f). + +Label *getFrameLabel(%frame f); + If a label was associated with f (as discussed below), this function returns + it. Otherwise, it returns a null pointer. + +doNonLocalBranch(Label *L); + At this point, it is not clear whether this should be a function or + intrinsic. It should probably be an intrinsic in LLVM, but we'll deal with + this issue later. + + +Here is a motivating example that illustrates how these facilities could be +used to implement the C++ exception model: + +void TestFunction(...) { + A a; B b; + foo(); // Any function call may throw + bar(); + C c; + + try { + D d; + baz(); + } catch (int) { + ...int Stuff... + // execution continues after the try block: the exception is consumed + } catch (double) { + ...double stuff... + throw; // Exception is propogated + } +} + +This function would compile to approximately the following code (heavy +pseudo code follows): + +Func: + %a = alloca A + A::A(%a) // These ctors & dtors could throw, but we ignore this + %b = alloca B // minor detail for this example + B::B(%b) + + call foo() with fooCleanup // An exception in foo is propogated to fooCleanup + call bar() with barCleanup // An exception in bar is propogated to barCleanup + + %c = alloca C + C::C(c) + %d = alloca D + D::D(d) + call baz() with bazCleanup // An exception in baz is propogated to bazCleanup + d->~D(); +EndTry: // This label corresponds to the end of the try block + c->~C() // These could also throw, these are also ignored + b->~B() + a->~A() + return + +Note that this is a very straight forward and literal translation: exactly +what we want for zero cost (when unused) exception handling. Especially on +platforms with many registers (ie, the IA64) setjmp/longjmp style exception +handling is *very* impractical. Also, the "with" clauses describe the +control flow paths explicitly so that analysis is not adversly effected. + +The foo/barCleanup labels are implemented as: + +TryCleanup: // Executed if an exception escapes the try block + c->~C() +barCleanup: // Executed if an exception escapes from bar() + // fall through +fooCleanup: // Executed if an exception escapes from foo() + b->~B() + a->~A() + Exception *E = getThreadLocalException() + call throw(E) // Implemented by the C++ runtime, described below + +Which does the work one would expect. getThreadLocalException is a function +implemented by the C++ support library. It returns the current exception +object for the current thread. Note that we do not attempt to recycle the +shutdown code from before, because performance of the mainline code is +critically important. Also, obviously fooCleanup and barCleanup may be +merged and one of them eliminated. This just shows how the code generator +would most likely emit code. + +The bazCleanup label is more interesting. Because the exception may be caught +by the try block, we must dispatch to its handler... but it does not exist +on the call stack (it does not have a VM Call->Label mapping installed), so +we must dispatch statically with a goto. The bazHandler thus appears as: + +bazHandler: + d->~D(); // destruct D as it goes out of scope when entering catch clauses + goto TryHandler + +In general, TryHandler is not the same as bazHandler, because multiple +function calls could be made from the try block. In this case, trivial +optimization could merge the two basic blocks. TryHandler is the code +that actually determines the type of exception, based on the Exception object +itself. For this discussion, assume that the exception object contains *at +least*: + +1. A pointer to the RTTI info for the contained object +2. A pointer to the dtor for the contained object +3. The contained object itself + +Note that it is necessary to maintain #1 & #2 in the exception object itself +because objects without virtual function tables may be thrown (as in this +example). Assuming this, TryHandler would look something like this: + +TryHandler: + Exception *E = getThreadLocalException(); + switch (E->RTTIType) { + case IntRTTIInfo: + ...int Stuff... // The action to perform from the catch block + break; + case DoubleRTTIInfo: + ...double Stuff... // The action to perform from the catch block + goto TryCleanup // This catch block rethrows the exception + break; // Redundant, eliminated by the optimizer + default: + goto TryCleanup // Exception not caught, rethrow + } + + // Exception was consumed + if (E->dtor) + E->dtor(E->object) // Invoke the dtor on the object if it exists + goto EndTry // Continue mainline code... + +And that is all there is to it. + +The throw(E) function would then be implemented like this (which may be +inlined into the caller through standard optimization): + +function throw(Exception *E) { + // Get the start of the stack trace... + %frame %f = call getStackCurrentFrame() + + // Get the label information that corresponds to it + label * %L = call getFrameLabel(%f) + while (%L == 0 && !isFirstFrame(%f)) { + // Loop until a cleanup handler is found + %f = call getNextFrame(%f) + %L = call getFrameLabel(%f) + } + + if (%L != 0) { + call setThreadLocalException(E) // Allow handlers access to this... + call doNonLocalBranch(%L) + } + // No handler found! + call BlowUp() // Ends up calling the terminate() method in use +} + +That's a brief rundown of how C++ exception handling could be implemented in +llvm. Java would be very similar, except it only uses destructors to unlock +synchronized blocks, not to destroy data. Also, it uses two stack walks: a +nondestructive walk that builds a stack trace, then a destructive walk that +unwinds the stack as shown here. + +It would be trivial to get exception interoperability between C++ and Java. + diff --git a/docs/HistoricalNotes/2001-05-19-ExceptionResponse.txt b/docs/HistoricalNotes/2001-05-19-ExceptionResponse.txt new file mode 100644 index 00000000..3375365f --- /dev/null +++ b/docs/HistoricalNotes/2001-05-19-ExceptionResponse.txt @@ -0,0 +1,45 @@ +Date: Sat, 19 May 2001 19:09:13 -0500 (CDT) +From: Chris Lattner +To: Vikram S. Adve +Subject: RE: Meeting writeup + +> I read it through and it looks great! + +Thanks! + +> The finally clause in Java may need more thought. The code for this clause +> is like a subroutine because it needs to be entered from many points (end of +> try block and beginning of each catch block), and then needs to *return to +> the place from where the code was entered*. That's why JVM has the +> jsr/jsr_w instruction. + +Hrm... I guess that is an implementation decision. It can either be +modelled as a subroutine (as java bytecodes do), which is really +gross... or it can be modelled as code duplication (emitted once inline, +then once in the exception path). Because this could, at worst, +slightly less than double the amount of code in a function (it is +bounded) I don't think this is a big deal. One of the really nice things +about the LLVM representation is that it still allows for runtime code +generation for exception paths (exceptions paths are not compiled until +needed). Obviously a static compiler couldn't do this though. :) + +In this case, only one copy of the code would be compiled... until the +other one is needed on demand. Also this strategy fits with the "zero +cost" exception model... the standard case is not burdened with extra +branches or "call"s. + +> I suppose you could save the return address in a particular register +> (specific to this finally block), jump to the finally block, and then at the +> end of the finally block, jump back indirectly through this register. It +> will complicate building the CFG but I suppose that can be handled. It is +> also unsafe in terms of checking where control returns (which is I suppose +> why the JVM doesn't use this). + +I think that a code duplication method would be cleaner, and would avoid +the caveats that you mention. Also, it does not slow down the normal case +with an indirect branch... + +Like everything, we can probably defer a final decision until later. :) + +-Chris + diff --git a/docs/HistoricalNotes/2001-06-01-GCCOptimizations.txt b/docs/HistoricalNotes/2001-06-01-GCCOptimizations.txt new file mode 100644 index 00000000..97af16a2 --- /dev/null +++ b/docs/HistoricalNotes/2001-06-01-GCCOptimizations.txt @@ -0,0 +1,63 @@ +Date: Fri, 1 Jun 2001 16:38:17 -0500 (CDT) +From: Chris Lattner +To: Vikram S. Adve +Subject: Interesting: GCC passes + + +Take a look at this document (which describes the order of optimizations +that GCC performs): + +http://gcc.gnu.org/onlinedocs/gcc_17.html + +The rundown is that after RTL generation, the following happens: + +1 . [t] jump optimization (jumps to jumps, etc) +2 . [t] Delete unreachable code +3 . Compute live ranges for CSE +4 . [t] Jump threading (jumps to jumps with identical or inverse conditions) +5 . [t] CSE +6 . *** Conversion to SSA +7 . [t] SSA Based DCE +8 . *** Conversion to LLVM +9 . UnSSA +10. GCSE +11. LICM +12. Strength Reduction +13. Loop unrolling +14. [t] CSE +15. [t] DCE +16. Instruction combination, register movement, scheduling... etc. + +I've marked optimizations with a [t] to indicate things that I believe to +be relatively trivial to implement in LLVM itself. The time consuming +things to reimplement would be SSA based PRE, Strength reduction & loop +unrolling... these would be the major things we would miss out on if we +did LLVM creation from tree code [inlining and other high level +optimizations are done on the tree representation]. + +Given the lack of "strong" optimizations that would take a long time to +reimplement, I am leaning a bit more towards creating LLVM from the tree +code. Especially given that SGI has GPL'd their compiler, including many +SSA based optimizations that could be adapted (besides the fact that their +code looks MUCH nicer than GCC :) + +Even if we choose to do LLVM code emission from RTL, we will almost +certainly want to move LLVM emission from step 8 down until at least CSE +has been rerun... which causes me to wonder if the SSA generation code +will still work (due to global variable dependencies and stuff). I assume +that it can be made to work, but might be a little more involved than we +would like. + +I'm continuing to look at the Tree -> RTL code. It is pretty gross +because they do some of the translation a statement at a time, and some +of it a function at a time... I'm not quite clear why and how the +distinction is drawn, but it does not appear that there is a wonderful +place to attach extra info. + +Anyways, I'm proceeding with the RTL -> LLVM conversion phase for now. We +can talk about this more on Monday. + +Wouldn't it be nice if there were a obvious decision to be made? :) + +-Chris + diff --git a/docs/HistoricalNotes/2001-06-01-GCCOptimizations2.txt b/docs/HistoricalNotes/2001-06-01-GCCOptimizations2.txt new file mode 100644 index 00000000..e61042fd --- /dev/null +++ b/docs/HistoricalNotes/2001-06-01-GCCOptimizations2.txt @@ -0,0 +1,71 @@ +Date: Fri, 1 Jun 2001 17:08:44 -0500 (CDT) +From: Chris Lattner +To: Vikram S. Adve +Subject: RE: Interesting: GCC passes + +> That is very interesting. I agree that some of these could be done on LLVM +> at link-time, but it is the extra time required that concerns me. Link-time +> optimization is severely time-constrained. + +If we were to reimplement any of these optimizations, I assume that we +could do them a translation unit at a time, just as GCC does now. This +would lead to a pipeline like this: + +Static optimizations, xlation unit at a time: +.c --GCC--> .llvm --llvmopt--> .llvm + +Link time optimizations: +.llvm --llvm-ld--> .llvm --llvm-link-opt--> .llvm + +Of course, many optimizations could be shared between llvmopt and +llvm-link-opt, but the wouldn't need to be shared... Thus compile time +could be faster, because we are using a "smarter" IR (SSA based). + +> BTW, about SGI, "borrowing" SSA-based optimizations from one compiler and +> putting it into another is not necessarily easier than re-doing it. +> Optimization code is usually heavily tied in to the specific IR they use. + +Understood. The only reason that I brought this up is because SGI's IR is +more similar to LLVM than it is different in many respects (SSA based, +relatively low level, etc), and could be easily adapted. Also their +optimizations are written in C++ and are actually somewhat +structured... of course it would be no walk in the park, but it would be +much less time consuming to adapt, say, SSA-PRE than to rewrite it. + +> But your larger point is valid that adding SSA based optimizations is +> feasible and should be fun. (Again, link time cost is the issue.) + +Assuming linktime cost wasn't an issue, the question is: +Does using GCC's backend buy us anything? + +> It also occurs to me that GCC is probably doing quite a bit of back-end +> optimization (step 16 in your list). Do you have a breakdown of that? + +Not really. The irritating part of GCC is that it mixes it all up and +doesn't have a clean separation of concerns. A lot of the "back end +optimization" happens right along with other data optimizations (ie, CSE +of machine specific things). + +As far as REAL back end optimizations go, it looks something like this: + +1. Instruction combination: try to make CISCy instructions, if available +2. Register movement: try to get registers in the right places for the +architecture to avoid register to register moves. For example, try to get +the first argument of a function to naturally land in %o0 for sparc. +3. Instruction scheduling: 'nuff said :) +4. Register class preferencing: ?? +5. Local register allocation +6. global register allocation +7. Spilling +8. Local regalloc +9. Jump optimization +10. Delay slot scheduling +11. Branch shorting for CISC machines +12. Instruction selection & peephole optimization +13. Debug info output + +But none of this would be usable for LLVM anyways, unless we were using +GCC as a static compiler. + +-Chris + diff --git a/docs/HistoricalNotes/2001-06-20-.NET-Differences.txt b/docs/HistoricalNotes/2001-06-20-.NET-Differences.txt new file mode 100644 index 00000000..1bc2eae7 --- /dev/null +++ b/docs/HistoricalNotes/2001-06-20-.NET-Differences.txt @@ -0,0 +1,30 @@ +Date: Wed, 20 Jun 2001 12:32:22 -0500 +From: Vikram Adve +To: Chris Lattner +Subject: .NET vs. our VM + +One significant difference between .NET CLR and our VM is that the CLR +includes full information about classes and inheritance. In fact, I just +sat through the paper on adding templates to .NET CLR, and the speaker +indicated that the goal seems to be to do simple static compilation (very +little lowering or optimization). Also, the templates implementation in CLR +"relies on dynamic class loading and JIT compilation". + +This is an important difference because I think there are some significant +advantages to have a much lower level VM layer, and do significant static +analysis and optimization. + +I also talked to the lead guy for KAI's C++ compiler (Arch Robison) and he +said that SGI and other commercial compilers have included options to export +their *IR* next to the object code (i.e., .il files) and use them for +link-time code generation. In fact, he said that the .o file was nearly +empty and was entirely generated from the .il at link-time. But he agreed +that this limited the link-time interprocedural optimization to modules +compiled by the same compiler, whereas our approach allows us to link and +optimize modules from multiple different compilers. (Also, of course, they +don't do anything for runtime optimization). + +All issues to bring up in Related Work. + +--Vikram + diff --git a/docs/HistoricalNotes/2001-07-06-LoweringIRForCodeGen.txt b/docs/HistoricalNotes/2001-07-06-LoweringIRForCodeGen.txt new file mode 100644 index 00000000..3e10416f --- /dev/null +++ b/docs/HistoricalNotes/2001-07-06-LoweringIRForCodeGen.txt @@ -0,0 +1,31 @@ +Date: Fri, 6 Jul 2001 16:56:56 -0500 +From: Vikram S. Adve +To: Chris Lattner +Subject: lowering the IR + +BTW, I do think that we should consider lowering the IR as you said. I +didn't get time to raise it today, but it comes up with the SPARC +move-conditional instruction. I don't think we want to put that in the core +VM -- it is a little too specialized. But without a corresponding +conditional move instruction in the VM, it is pretty difficult to maintain a +close mapping between VM and machine code. Other architectures may have +other such instructions. + +What I was going to suggest was that for a particular processor, we define +additional VM instructions that match some of the unusual opcodes on the +processor but have VM semantics otherwise, i.e., all operands are in SSA +form and typed. This means that we can re-generate core VM code from the +more specialized code any time we want (so that portability is not lost). + +Typically, a static compiler like gcc would generate just the core VM, which +is relatively portable. Anyone (an offline tool, the linker, etc., or even +the static compiler itself if it chooses) can transform that into more +specialized target-specific VM code for a particular architecture. If the +linker does it, it can do it after all machine-independent optimizations. +This would be the most convenient, but not necessary. + +The main benefit of lowering will be that we will be able to retain a close +mapping between VM and machine code. + +--Vikram + diff --git a/docs/HistoricalNotes/2001-09-18-OptimizeExceptions.txt b/docs/HistoricalNotes/2001-09-18-OptimizeExceptions.txt new file mode 100644 index 00000000..93790810 --- /dev/null +++ b/docs/HistoricalNotes/2001-09-18-OptimizeExceptions.txt @@ -0,0 +1,56 @@ +Date: Tue, 18 Sep 2001 00:38:37 -0500 (CDT) +From: Chris Lattner +To: Vikram S. Adve +Subject: Idea for a simple, useful link time optimization + + +In C++ programs, exceptions suck, and here's why: + +1. In virtually all function calls, you must assume that the function + throws an exception, unless it is defined as 'nothrow'. This means + that every function call has to have code to invoke dtors on objects + locally if one is thrown by the function. Most functions don't throw + exceptions, so this code is dead [with all the bad effects of dead + code, including icache pollution]. +2. Declaring a function nothrow causes catch blocks to be added to every + call that isnot provably nothrow. This makes them very slow. +3. Extra extraneous exception edges reduce the opportunity for code + motion. +4. EH is typically implemented with large lookup tables. Ours is going to + be much smaller (than the "standard" way of doing it) to start with, + but eliminating it entirely would be nice. :) +5. It is physically impossible to correctly put (accurate, correct) + exception specifications on generic, templated code. But it is trivial + to analyze instantiations of said code. +6. Most large C++ programs throw few exceptions. Most well designed + programs only throw exceptions in specific planned portions of the + code. + +Given our _planned_ model of handling exceptions, all of this would be +pretty trivial to eliminate through some pretty simplistic interprocedural +analysis. The DCE factor alone could probably be pretty significant. The +extra code motion opportunities could also be exploited though... + +Additionally, this optimization can be implemented in a straight forward +conservative manner, allowing libraries to be optimized or individual +files even (if there are leaf functions visible in the translation unit +that are called). + +I think it's a reasonable optimization that hasn't really been addressed +(because assembly is way too low level for this), and could have decent +payoffs... without being a overly complex optimization. + +After I wrote all of that, I found this page that is talking about +basically the same thing I just wrote, except that it is translation unit +at a time, tree based approach: +http://www.ocston.org/~jls/ehopt.html + +but is very useful from "expected gain" and references perspective. Note +that their compiler is apparently unable to inline functions that use +exceptions, so there numbers are pretty worthless... also our results +would (hopefully) be better because it's interprocedural... + +What do you think? + +-Chris + diff --git a/docs/HistoricalNotes/2002-05-12-InstListChange.txt b/docs/HistoricalNotes/2002-05-12-InstListChange.txt new file mode 100644 index 00000000..638682b4 --- /dev/null +++ b/docs/HistoricalNotes/2002-05-12-InstListChange.txt @@ -0,0 +1,55 @@ +Date: Sun, 12 May 2002 17:12:53 -0500 (CDT) +From: Chris Lattner +To: "Vikram S. Adve" +Subject: LLVM change + +There is a fairly fundemental change that I would like to make to the LLVM +infrastructure, but I'd like to know if you see any drawbacks that I +don't... + +Basically right now at the basic block level, each basic block contains an +instruction list (returned by getInstList()) that is a ValueHolder of +instructions. To iterate over instructions, we must actually iterate over +the instlist, and access the instructions through the instlist. + +To add or remove an instruction from a basic block, we need to get an +iterator to an instruction, which, given just an Instruction*, requires a +linear search of the basic block the instruction is contained in... just +to insert an instruction before another instruction, or to delete an +instruction! This complicates algorithms that should be very simple (like +simple constant propagation), because they aren't actually sparse anymore, +they have to traverse basic blocks to remove constant propogated +instructions. + +Additionally, adding or removing instructions to a basic block +_invalidates all iterators_ pointing into that block, which is really +irritating. + +To fix these problems (and others), I would like to make the ordering of +the instructions be represented with a doubly linked list in the +instructions themselves, instead of an external data structure. This is +how many other representations do it, and frankly I can't remember why I +originally implemented it the way I did. + +Long term, all of the code that depends on the nasty features in the +instruction list (which can be found by grep'ing for getInstList()) will +be changed to do nice local transformations. In the short term, I'll +change the representation, but preserve the interface (including +getInstList()) so that all of the code doesn't have to change. + +Iteration over the instructions in a basic block remains the simple: +for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) ... + +But we will also support: +for (Instruction *I = BB->front(); I; I = I->getNext()) ... + +After converting instructions over, I'll convert basic blocks and +functions to have a similar interface. + +The only negative aspect of this change that I see is that it increases +the amount of memory consumed by one pointer per instruction. Given the +benefits, I think this is a very reasonable tradeoff. + +What do you think? + +-Chris diff --git a/docs/HistoricalNotes/2002-06-25-MegaPatchInfo.txt b/docs/HistoricalNotes/2002-06-25-MegaPatchInfo.txt new file mode 100644 index 00000000..2ca46117 --- /dev/null +++ b/docs/HistoricalNotes/2002-06-25-MegaPatchInfo.txt @@ -0,0 +1,72 @@ +Changes: +* Change the casting code to be const correct. Now, doing this is invalid: + const Value *V = ...; + Instruction *I = dyn_cast(V); + instead, the second line should be: + const Instruction *I = dyn_cast(V); + +* Change the casting code to allow casting a reference value thus: + const Value &V = ...; + Instruction &I = cast(V); + + dyn_cast does not work with references, because it must return a null pointer + on failure. + +* Fundamentally change how instructions and other values are represented. + Before, every llvm container was an instance of the ValueHolder template, + instantiated for each container type. This ValueHolder was effectively a + wrapper around a vector of pointers to the sub-objects. + + Now, instead of having a vector to pointers of objects, the objects are + maintained in a doubly linked list of values (ie each Instruction now has + Next & Previous fields). The containers are now instances of ilist (intrusive + linked list class), which use the next and previous fields to chain them + together. The advantage of this implementation is that iterators can be + formed directly from pointers to the LLVM value, and invalidation is much + easier to handle. + +* As part of the above change, dereferencing an iterator (for example: + BasicBlock::iterator) now produces a reference to the underlying type (same + example: Instruction&) instead of a pointer to the underlying object. This + makes it much easier to write nested loops that iterator over things, changing + this: + + for (Function::iterator BI = Func->begin(); BI != Func->end(); ++BI) + for (BasicBlock::iterator II = (*BI)->begin(); II != (*BI)->end(); ++II) + (*II)->dump(); + + into: + + for (Function::iterator BI = Func->begin(); BI != Func->end(); ++BI) + for (BasicBlock::iterator II = BI->begin(); II != BI->end(); ++II) + II->dump(); + + which is much more natural and what users expect. + +* Simplification of #include's: Before, it was necessary for a .cpp file to + include every .h file that it used. Now things are batched a little bit more + to make it easier to use. Specifically, the include graph now includes these + edges: + Module.h -> Function.h, GlobalVariable.h + Function.h -> BasicBlock.h, Argument.h + BasicBlock.h -> Instruction.h + + Which means that #including Function.h is usually sufficient for getting the + lower level #includes. + +* Printing out a Value* has now changed: Printing a Value* will soon print out + the address of the value instead of the contents of the Value. To print out + the contents, you must convert it to a reference with (for example) + 'cout << *I' instead of 'cout << I;'. This conversion is not yet complete, + but will be eventually. In the mean time, both forms print out the contents. + +* References are used much more throughout the code base. In general, if a + pointer is known to never be null, it is passed in as a reference instead of a + pointer. For example, the instruction visitor class uses references instead + of pointers, and that Pass subclasses now all receive references to Values + instead of pointers, because they may never be null. + +* The Function class now has helper functions for accessing the Arguments list. + Instead of having to go through getArgumentList for simple things like + iterator over the arguments, now the a*() methods can be used to access them. + diff --git a/docs/HistoricalNotes/2003-01-23-CygwinNotes.txt b/docs/HistoricalNotes/2003-01-23-CygwinNotes.txt new file mode 100644 index 00000000..fbe811d6 --- /dev/null +++ b/docs/HistoricalNotes/2003-01-23-CygwinNotes.txt @@ -0,0 +1,28 @@ +Date: Mon, 20 Jan 2003 00:00:28 -0600 +From: Brian R. Gaeke +Subject: windows vs. llvm + +If you're interested, here are some of the major problems compiling LLVM +under Cygwin and/or Mingw. + +1. Cygwin doesn't have or , so all the INT*_MAX + symbols and standard int*_t types are off in limbo somewhere. Mingw has + , but Cygwin doesn't like it. + +2. Mingw doesn't have (because Windows doesn't have it.) + +3. SA_SIGINFO and friends are not around; only signal() seems to work. + +4. Relink, aka ld -r, doesn't work (probably an ld bug); you need + DONT_BUILD_RELINKED. This breaks all the tools makefiles; you just need to + change them to have .a's. + +5. There isn't a . + +6. There isn't a mallinfo() (or, at least, it's documented, but it doesn't seem + to link). + +7. The version of Bison that cygwin (and newer Linux versions) comes with + does not like = signs in rules. Burg's gram.yc source file uses them. I think + you can just take them out. + diff --git a/docs/HistoricalNotes/2003-06-25-Reoptimizer1.txt b/docs/HistoricalNotes/2003-06-25-Reoptimizer1.txt new file mode 100644 index 00000000..521526fb --- /dev/null +++ b/docs/HistoricalNotes/2003-06-25-Reoptimizer1.txt @@ -0,0 +1,137 @@ +Wed Jun 25 15:13:51 CDT 2003 + +First-level instrumentation +--------------------------- + +We use opt to do Bytecode-to-bytecode instrumentation. Look at +back-edges and insert llvm_first_trigger() function call which takes +no arguments and no return value. This instrumentation is designed to +be easy to remove, for instance by writing a NOP over the function +call instruction. + +Keep count of every call to llvm_first_trigger(), and maintain +counters in a map indexed by return address. If the trigger count +exceeds a threshold, we identify a hot loop and perform second-level +instrumentation on the hot loop region (the instructions between the +target of the back-edge and the branch that causes the back-edge). We +do not move code across basic-block boundaries. + + +Second-level instrumentation +--------------------------- + +We remove the first-level instrumentation by overwriting the CALL to +llvm_first_trigger() with a NOP. + +The reoptimizer maintains a map between machine-code basic blocks and +LLVM BasicBlock*s. We only keep track of paths that start at the +first machine-code basic block of the hot loop region. + +How do we keep track of which edges to instrument, and which edges are +exits from the hot region? 3 step process. + +1) Do a DFS from the first machine-code basic block of the hot loop +region and mark reachable edges. + +2) Do a DFS from the last machine-code basic block of the hot loop +region IGNORING back edges, and mark the edges which are reachable in +1) and also in 2) (i.e., must be reachable from both the start BB and +the end BB of the hot region). + +3) Mark BBs which end in edges that exit the hot region; we need to +instrument these differently. + +Assume that there is 1 free register. On SPARC we use %g1, which LLC +has agreed not to use. Shift a 1 into it at the beginning. At every +edge which corresponds to a conditional branch, we shift 0 for not +taken and 1 for taken into a register. This uniquely numbers the paths +through the hot region. Silently fail if we need more than 64 bits. + +At the end BB we call countPath and increment the counter based on %g1 +and the return address of the countPath call. We keep track of the +number of iterations and the number of paths. We only run this +version 30 or 40 times. + +Find the BBs that total 90% or more of execution, and aggregate them +together to form our trace. But we do not allow more than 5 paths; if +we have more than 5 we take the ones that are executed the most. We +verify our assumption that we picked a hot back-edge in first-level +instrumentation, by making sure that the number of times we took an +exit edge from the hot trace is less than 10% of the number of +iterations. + +LLC has been taught to recognize llvm_first_trigger() calls and NOT +generate saves and restores of caller-saved registers around these +calls. + + +Phase behavior +-------------- + +We turn off llvm_first_trigger() calls with NOPs, but this would hide +phase behavior from us (when some funcs/traces stop being hot and +others become hot.) + +We have a SIGALRM timer that counts time for us. Every time we get a +SIGALRM we look at our priority queue of locations where we have +removed llvm_first_trigger() calls. Each location is inserted along +with a time when we will next turn instrumentation back on for that +call site. If the time has arrived for a particular call site, we pop +that off the prio. queue and turn instrumentation back on for that +call site. + + +Generating traces +----------------- + +When we finally generate an optimized trace we first copy the code +into the trace cache. This leaves us with 3 copies of the code: the +original code, the instrumented code, and the optimized trace. The +optimized trace does not have instrumentation. The original code and +the instrumented code are modified to have a branch to the trace +cache, where the optimized traces are kept. + +We copy the code from the original to the instrumentation version +by tracing the LLVM-to-Machine code basic block map and then copying +each machine code basic block we think is in the hot region into the +trace cache. Then we instrument that code. The process is similar for +generating the final optimized trace; we copy the same basic blocks +because we might need to put in fixup code for exit BBs. + +LLVM basic blocks are not typically used in the Reoptimizer except +for the mapping information. + +We are restricted to using single instructions to branch between the +original code, trace, and instrumented code. So we have to keep the +code copies in memory near the original code (they can't be far enough +away that a single pc-relative branch would not work.) Malloc() or +data region space is too far away. this impacts the design of the +trace cache. + +We use a dummy function that is full of a bunch of for loops which we +overwrite with trace-cache code. The trace manager keeps track of +whether or not we have enough space in the trace cache, etc. + +The trace insertion routine takes an original start address, a vector +of machine instructions representing the trace, index of branches and +their corresponding absolute targets, and index of calls and their +corresponding absolute targets. + +The trace insertion routine is responsible for inserting branches from +the beginning of the original code to the beginning of the optimized +trace. This is because at some point the trace cache may run out of +space and it may have to evict a trace, at which point the branch to +the trace would also have to be removed. It uses a round-robin +replacement policy; we have found that this is almost as good as LRU +and better than random (especially because of problems fitting the new +trace in.) + +We cannot deal with discontiguous trace cache areas. The trace cache +is supposed to be cache-line-aligned, but it is not page-aligned. + +We generate instrumentation traces and optimized traces into separate +trace caches. We keep the instrumented code around because you don't +want to delete a trace when you still might have to return to it +(i.e., return from an llvm_first_trigger() or countPath() call.) + + diff --git a/docs/HistoricalNotes/2003-06-26-Reoptimizer2.txt b/docs/HistoricalNotes/2003-06-26-Reoptimizer2.txt new file mode 100644 index 00000000..ec4b93fe --- /dev/null +++ b/docs/HistoricalNotes/2003-06-26-Reoptimizer2.txt @@ -0,0 +1,110 @@ +Thu Jun 26 14:43:04 CDT 2003 + +Information about BinInterface +------------------------------ + +Take in a set of instructions with some particular register +allocation. It allows you to add, modify, or delete some instructions, +in SSA form (kind of like LLVM's MachineInstrs.) Then re-allocate +registers. It assumes that the transformations you are doing are safe. +It does not update the mapping information or the LLVM representation +for the modified trace (so it would not, for instance, support +multiple optimization passes; passes have to be aware of and update +manually the mapping information.) + +The way you use it is you take the original code and provide it to +BinInterface; then you do optimizations to it, then you put it in the +trace cache. + +The BinInterface tries to find live-outs for traces so that it can do +register allocation on just the trace, and stitch the trace back into +the original code. It has to preserve the live-ins and live-outs when +it does its register allocation. (On exits from the trace we have +epilogues that copy live-outs back into the right registers, but +live-ins have to be in the right registers.) + + +Limitations of BinInterface +--------------------------- + +It does copy insertions for PHIs, which it infers from the machine +code. The mapping info inserted by LLC is not sufficient to determine +the PHIs. + +It does not handle integer or floating-point condition codes and it +does not handle floating-point register allocation. + +It is not aggressively able to use lots of registers. + +There is a problem with alloca: we cannot find our spill space for +spilling registers, normally allocated on the stack, if the trace +follows an alloca(). What might be an acceptable solution would be to +disable trace generation on functions that have variable-sized +alloca()s. Variable-sized allocas in the trace would also probably +screw things up. + +Because of the FP and alloca limitations, the BinInterface is +completely disabled right now. + + +Demo +---- + +This is a demo of the Ball & Larus version that does NOT use 2-level +profiling. + +1. Compile program with llvm-gcc. +2. Run opt -lowerswitch -paths -emitfuncs on the bytecode. + -lowerswitch change switch statements to branches + -paths Ball & Larus path-profiling algorithm + -emitfuncs emit the table of functions +3. Run llc to generate SPARC assembly code for the result of step 2. +4. Use g++ to link the (instrumented) assembly code. + +We use a script to do all this: +------------------------------------------------------------------------------ +#!/bin/sh +llvm-gcc $1.c -o $1 +opt -lowerswitch -paths -emitfuncs $1.bc > $1.run.bc +llc -f $1.run.bc +LIBS=$HOME/llvm_sparc/lib/Debug +GXX=/usr/dcs/software/evaluation/bin/g++ +$GXX -g -L $LIBS $1.run.s -o $1.run.llc \ +$LIBS/tracecache.o \ +$LIBS/mapinfo.o \ +$LIBS/trigger.o \ +$LIBS/profpaths.o \ +$LIBS/bininterface.o \ +$LIBS/support.o \ +$LIBS/vmcore.o \ +$LIBS/transformutils.o \ +$LIBS/bcreader.o \ +-lscalaropts -lscalaropts -lanalysis \ +-lmalloc -lcpc -lm -ldl +------------------------------------------------------------------------------ + +5. Run the resulting binary. You will see output from BinInterface +(described below) intermixed with the output from the program. + + +Output from BinInterface +------------------------ + +BinInterface's debugging code prints out the following stuff in order: + +1. Initial code provided to BinInterface with original register +allocation. + +2. Section 0 is the trace prolog, consisting mainly of live-ins and +register saves which will be restored in epilogs. + +3. Section 1 is the trace itself, in SSA form used by BinInterface, +along with the PHIs that are inserted. +PHIs are followed by the copies that implement them. +Each branch (i.e., out of the trace) is annotated with the +section number that represents the epilog it branches to. + +4. All the other sections starting with Section 2 are trace epilogs. +Every branch from the trace has to go to some epilog. + +5. After the last section is the register allocation output. diff --git a/docs/HistoricalNotes/2007-OriginalClangReadme.txt b/docs/HistoricalNotes/2007-OriginalClangReadme.txt new file mode 100644 index 00000000..611dc9d2 --- /dev/null +++ b/docs/HistoricalNotes/2007-OriginalClangReadme.txt @@ -0,0 +1,178 @@ +//===----------------------------------------------------------------------===// +// C Language Family Front-end +//===----------------------------------------------------------------------===// + Chris Lattner + +I. Introduction: + + clang: noun + 1. A loud, resonant, metallic sound. + 2. The strident call of a crane or goose. + 3. C-language family front-end toolkit. + + The world needs better compiler tools, tools which are built as libraries. This + design point allows reuse of the tools in new and novel ways. However, building + the tools as libraries isn't enough: they must have clean APIs, be as + decoupled from each other as possible, and be easy to modify/extend. This + requires clean layering, decent design, and avoiding tying the libraries to a + specific use. Oh yeah, did I mention that we want the resultant libraries to + be as fast as possible? :) + + This front-end is built as a component of the LLVM toolkit that can be used + with the LLVM backend or independently of it. In this spirit, the API has been + carefully designed as the following components: + + libsupport - Basic support library, reused from LLVM. + + libsystem - System abstraction library, reused from LLVM. + + libbasic - Diagnostics, SourceLocations, SourceBuffer abstraction, + file system caching for input source files. This depends on + libsupport and libsystem. + + libast - Provides classes to represent the C AST, the C type system, + builtin functions, and various helpers for analyzing and + manipulating the AST (visitors, pretty printers, etc). This + library depends on libbasic. + + + liblex - C/C++/ObjC lexing and preprocessing, identifier hash table, + pragma handling, tokens, and macros. This depends on libbasic. + + libparse - C (for now) parsing and local semantic analysis. This library + invokes coarse-grained 'Actions' provided by the client to do + stuff (e.g. libsema builds ASTs). This depends on liblex. + + libsema - Provides a set of parser actions to build a standardized AST + for programs. AST's are 'streamed' out a top-level declaration + at a time, allowing clients to use decl-at-a-time processing, + build up entire translation units, or even build 'whole + program' ASTs depending on how they use the APIs. This depends + on libast and libparse. + + librewrite - Fast, scalable rewriting of source code. This operates on + the raw syntactic text of source code, allowing a client + to insert and delete text in very large source files using + the same source location information embedded in ASTs. This + is intended to be a low-level API that is useful for + higher-level clients and libraries such as code refactoring. + + libanalysis - Source-level dataflow analysis useful for performing analyses + such as computing live variables. It also includes a + path-sensitive "graph-reachability" engine for writing + analyses that reason about different possible paths of + execution through source code. This is currently being + employed to write a set of checks for finding bugs in software. + + libcodegen - Lower the AST to LLVM IR for optimization & codegen. Depends + on libast. + + clang - An example driver, client of the libraries at various levels. + This depends on all these libraries, and on LLVM VMCore. + + This front-end has been intentionally built as a DAG of libraries, making it + easy to reuse individual parts or replace pieces if desired. For example, to + build a preprocessor, you take the Basic and Lexer libraries. If you want an + indexer, you take those plus the Parser library and provide some actions for + indexing. If you want a refactoring, static analysis, or source-to-source + compiler tool, it makes sense to take those plus the AST building and semantic + analyzer library. Finally, if you want to use this with the LLVM backend, + you'd take these components plus the AST to LLVM lowering code. + + In the future I hope this toolkit will grow to include new and interesting + components, including a C++ front-end, ObjC support, and a whole lot of other + things. + + Finally, it should be pointed out that the goal here is to build something that + is high-quality and industrial-strength: all the obnoxious features of the C + family must be correctly supported (trigraphs, preprocessor arcana, K&R-style + prototypes, GCC/MS extensions, etc). It cannot be used if it is not 'real'. + + +II. Usage of clang driver: + + * Basic Command-Line Options: + - Help: clang --help + - Standard GCC options accepted: -E, -I*, -i*, -pedantic, -std=c90, etc. + - To make diagnostics more gcc-like: -fno-caret-diagnostics -fno-show-column + - Enable metric printing: -stats + + * -fsyntax-only is currently the default mode. + + * -E mode works the same way as GCC. + + * -Eonly mode does all preprocessing, but does not print the output, + useful for timing the preprocessor. + + * -fsyntax-only is currently partially implemented, lacking some + semantic analysis (some errors and warnings are not produced). + + * -parse-noop parses code without building an AST. This is useful + for timing the cost of the parser without including AST building + time. + + * -parse-ast builds ASTs, but doesn't print them. This is most + useful for timing AST building vs -parse-noop. + + * -parse-ast-print pretty prints most expression and statements nodes. + + * -parse-ast-check checks that diagnostic messages that are expected + are reported and that those which are reported are expected. + + * -dump-cfg builds ASTs and then CFGs. CFGs are then pretty-printed. + + * -view-cfg builds ASTs and then CFGs. CFGs are then visualized by + invoking Graphviz. + + For more information on getting Graphviz to work with clang/LLVM, + see: http://llvm.org/docs/ProgrammersManual.html#ViewGraph + + +III. Current advantages over GCC: + + * Column numbers are fully tracked (no 256 col limit, no GCC-style pruning). + * All diagnostics have column numbers, includes 'caret diagnostics', and they + highlight regions of interesting code (e.g. the LHS and RHS of a binop). + * Full diagnostic customization by client (can format diagnostics however they + like, e.g. in an IDE or refactoring tool) through DiagnosticClient interface. + * Built as a framework, can be reused by multiple tools. + * All languages supported linked into same library (no cc1,cc1obj, ...). + * mmap's code in read-only, does not dirty the pages like GCC (mem footprint). + * LLVM License, can be linked into non-GPL projects. + * Full diagnostic control, per diagnostic. Diagnostics are identified by ID. + * Significantly faster than GCC at semantic analysis, parsing, preprocessing + and lexing. + * Defers exposing platform-specific stuff to as late as possible, tracks use of + platform-specific features (e.g. #ifdef PPC) to allow 'portable bytecodes'. + * The lexer doesn't rely on the "lexer hack": it has no notion of scope and + does not categorize identifiers as types or variables -- this is up to the + parser to decide. + +Potential Future Features: + + * Fine grained diag control within the source (#pragma enable/disable warning). + * Better token tracking within macros? (Token came from this line, which is + a macro argument instantiated here, recursively instantiated here). + * Fast #import with a module system. + * Dependency tracking: change to header file doesn't recompile every function + that texually depends on it: recompile only those functions that need it. + This is aka 'incremental parsing'. + + +IV. Missing Functionality / Improvements + +Lexer: + * Source character mapping. GCC supports ASCII and UTF-8. + See GCC options: -ftarget-charset and -ftarget-wide-charset. + * Universal character support. Experimental in GCC, enabled with + -fextended-identifiers. + * -fpreprocessed mode. + +Preprocessor: + * #assert/#unassert + * MSExtension: "L#param" stringizes to a wide string literal. + * Add support for -M* + +Traditional Preprocessor: + * Currently, we have none. :) + diff --git a/docs/HowToAddABuilder.rst b/docs/HowToAddABuilder.rst new file mode 100644 index 00000000..893f12d1 --- /dev/null +++ b/docs/HowToAddABuilder.rst @@ -0,0 +1,86 @@ +=================================================================== +How To Add Your Build Configuration To LLVM Buildbot Infrastructure +=================================================================== + +Introduction +============ + +This document contains information about adding a build configuration and +buildslave to private slave builder to LLVM Buildbot Infrastructure +``_. + + +Steps To Add Builder To LLVM Buildbot +===================================== +Volunteers can provide their build machines to work as build slaves to +public LLVM Buildbot. + +Here are the steps you can follow to do so: + +#. Check the existing build configurations to make sure the one you are + interested in is not covered yet or gets built on your computer much + faster than on the existing one. We prefer faster builds so developers + will get feedback sooner after changes get committed. + +#. The computer you will be registering with the LLVM buildbot + infrastructure should have all dependencies installed and you can + actually build your configuration successfully. Please check what degree + of parallelism (-j param) would give the fastest build. You can build + multiple configurations on one computer. + +#. Install buildslave (currently we are using buildbot version 0.8.5). + Depending on the platform, buildslave could be available to download and + install with your packet manager, or you can download it directly from + ``_ and install it manually. + +#. Create a designated user account, your buildslave will be running under, + and set appropriate permissions. + +#. Choose the buildslave root directory (all builds will be placed under + it), buildslave access name and password the build master will be using + to authenticate your buildslave. + +#. Create a buildslave in context of that buildslave account. Point it to + the **lab.llvm.org** port **9990** (see `Buildbot documentation, + Creating a slave + `_ + for more details) by running the following command: + + .. code-block:: bash + + $ buildslave create-slave \ + lab.llvm.org:9990 \ + + +#. Fill the buildslave description and admin name/e-mail. Here is an + example of the buildslave description:: + + Windows 7 x64 + Core i7 (2.66GHz), 16GB of RAM + + g++.exe (TDM-1 mingw32) 4.4.0 + GNU Binutils 2.19.1 + cmake version 2.8.4 + Microsoft(R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86 + +#. Make sure you can actually start the buildslave successfully. Then set + up your buildslave to start automatically at the start up time. See the + buildbot documentation for help. You may want to restart your computer + to see if it works. + +#. Send a patch which adds your build slave and your builder to zorg. + + * slaves are added to ``buildbot/osuosl/master/config/slaves.py`` + * builders are added to ``buildbot/osuosl/master/config/builders.py`` + +#. Send the buildslave access name and the access password directly to + `Galina Kistanova `_, and wait till she + will let you know that your changes are applied and buildmaster is + reconfigured. + +#. Check the status of your buildslave on the `Waterfall Display + `_ to make sure it is connected, and + ``http://lab.llvm.org:8011/buildslaves/`` to see + if administrator contact and slave information are correct. + +#. Wait for the first build to succeed and enjoy. diff --git a/docs/HowToBuildOnARM.rst b/docs/HowToBuildOnARM.rst new file mode 100644 index 00000000..f2edaef7 --- /dev/null +++ b/docs/HowToBuildOnARM.rst @@ -0,0 +1,69 @@ +=================================================================== +How To Build On ARM +=================================================================== + +Introduction +============ + +This document contains information about building/testing LLVM and +Clang on an ARM machine. + +This document is *NOT* tailored to help you cross-compile LLVM/Clang +to ARM on another architecture, for example an x86_64 machine. To find +out more about cross-compiling, please check :doc:`HowToCrossCompileLLVM`. + +Notes On Building LLVM/Clang on ARM +===================================== +Here are some notes on building/testing LLVM/Clang on ARM. Note that +ARM encompasses a wide variety of CPUs; this advice is primarily based +on the ARMv6 and ARMv7 architectures and may be inapplicable to older chips. + +#. If you are building LLVM/Clang on an ARM board with 1G of memory or less, + please use ``gold`` rather then GNU ``ld``. + Building LLVM/Clang with ``--enable-optimized`` + is preferred since it consumes less memory. Otherwise, the building + process will very likely fail due to insufficient memory. In any + case it is probably a good idea to set up a swap partition. + +#. If you want to run ``make check-all`` after building LLVM/Clang, to avoid + false alarms (e.g., ARCMT failure) please use at least the following + configuration: + + .. code-block:: bash + + $ ../$LLVM_SRC_DIR/configure --with-abi=aapcs-vfp + +#. The most popular Linaro/Ubuntu OS's for ARM boards, e.g., the + Pandaboard, have become hard-float platforms. The following set + of configuration options appears to be a good choice for this + platform: + + .. code-block:: bash + + ./configure --build=armv7l-unknown-linux-gnueabihf \ + --host=armv7l-unknown-linux-gnueabihf \ + --target=armv7l-unknown-linux-gnueabihf --with-cpu=cortex-a9 \ + --with-float=hard --with-abi=aapcs-vfp --with-fpu=neon \ + --enable-targets=arm --enable-optimized --enable-assertions + +#. ARM development boards can be unstable and you may experience that cores + are disappearing, caches being flushed on every big.LITTLE switch, and + other similar issues. To help ease the effect of this, set the Linux + scheduler to "performance" on **all** cores using this little script: + + .. code-block:: bash + + # The code below requires the package 'cpufrequtils' to be installed. + for ((cpu=0; cpu<`grep -c proc /proc/cpuinfo`; cpu++)); do + sudo cpufreq-set -c $cpu -g performance + done + +#. Running the build on SD cards is ok, but they are more prone to failures + than good quality USB sticks, and those are more prone to failures than + external hard-drives (those are also a lot faster). So, at least, you + should consider to buy a fast USB stick. On systems with a fast eMMC, + that's a good option too. + +#. Make sure you have a decent power supply (dozens of dollars worth) that can + provide *at least* 4 amperes, this is especially important if you use USB + devices with your board. diff --git a/docs/HowToCrossCompileLLVM.rst b/docs/HowToCrossCompileLLVM.rst new file mode 100644 index 00000000..1072517e --- /dev/null +++ b/docs/HowToCrossCompileLLVM.rst @@ -0,0 +1,175 @@ +=================================================================== +How To Cross-Compile Clang/LLVM using Clang/LLVM +=================================================================== + +Introduction +============ + +This document contains information about building LLVM and +Clang on host machine, targeting another platform. + +For more information on how to use Clang as a cross-compiler, +please check http://clang.llvm.org/docs/CrossCompilation.html. + +TODO: Add MIPS and other platforms to this document. + +Cross-Compiling from x86_64 to ARM +================================== + +In this use case, we'll be using CMake and Ninja, on a Debian-based Linux +system, cross-compiling from an x86_64 host (most Intel and AMD chips +nowadays) to a hard-float ARM target (most ARM targets nowadays). + +The packages you'll need are: + + * ``cmake`` + * ``ninja-build`` (from backports in Ubuntu) + * ``gcc-4.7-arm-linux-gnueabihf`` + * ``gcc-4.7-multilib-arm-linux-gnueabihf`` + * ``binutils-arm-linux-gnueabihf`` + * ``libgcc1-armhf-cross`` + * ``libsfgcc1-armhf-cross`` + * ``libstdc++6-armhf-cross`` + * ``libstdc++6-4.7-dev-armhf-cross`` + +Configuring CMake +----------------- + +For more information on how to configure CMake for LLVM/Clang, +see :doc:`CMake`. + +The CMake options you need to add are: + * ``-DCMAKE_CROSSCOMPILING=True`` + * ``-DCMAKE_INSTALL_PREFIX=`` + * ``-DLLVM_TABLEGEN=/llvm-tblgen`` + * ``-DCLANG_TABLEGEN=/clang-tblgen`` + * ``-DLLVM_DEFAULT_TARGET_TRIPLE=arm-linux-gnueabihf`` + * ``-DLLVM_TARGET_ARCH=ARM`` + * ``-DLLVM_TARGETS_TO_BUILD=ARM`` + * ``-DCMAKE_CXX_FLAGS='-target armv7a-linux-gnueabihf -mcpu=cortex-a9 -I/usr/arm-linux-gnueabihf/include/c++/4.7.2/arm-linux-gnueabihf/ -I/usr/arm-linux-gnueabihf/include/ -mfloat-abi=hard -ccc-gcc-name arm-linux-gnueabihf-gcc'`` + +The TableGen options are required to compile it with the host compiler, +so you'll need to compile LLVM (or at least ``llvm-tblgen``) to your host +platform before you start. The CXX flags define the target, cpu (which +defaults to ``fpu=VFP3`` with NEON), and forcing the hard-float ABI. If you're +using Clang as a cross-compiler, you will *also* have to set ``-ccc-gcc-name``, +to make sure it picks the correct linker. + +Most of the time, what you want is to have a native compiler to the +platform itself, but not others. It might not even be feasible to +produce x86 binaries from ARM targets, so there's no point in compiling +all back-ends. For that reason, you should also set the +``TARGETS_TO_BUILD`` to only build the ARM back-end. + +You must set the ``CMAKE_INSTALL_PREFIX``, otherwise a ``ninja install`` +will copy ARM binaries to your root filesystem, which is not what you +want. + +Hacks +----- + +There are some bugs in current LLVM, which require some fiddling before +running CMake: + +#. If you're using Clang as the cross-compiler, there is a problem in + the LLVM ARM back-end that is producing absolute relocations on + position-independent code (``R_ARM_THM_MOVW_ABS_NC``), so for now, you + should disable PIC: + + .. code-block:: bash + + -DLLVM_ENABLE_PIC=False + + This is not a problem, since Clang/LLVM libraries are statically + linked anyway, it shouldn't affect much. + +#. The ARM libraries won't be installed in your system, and possibly + not easily installable anyway, so you'll have to build/download + them separately. But the CMake prepare step, which checks for + dependencies, will check the *host* libraries, not the *target* + ones. + + A quick way of getting the libraries is to download them from + a distribution repository, like Debian (http://packages.debian.org/wheezy/), + and download the missing libraries. Note that the ``libXXX`` + will have the shared objects (``.so``) and the ``libXXX-dev`` will + give you the headers and the static (``.a``) library. Just in + case, download both. + + The ones you need for ARM are: ``libtinfo``, ``zlib1g``, + ``libxml2`` and ``liblzma``. In the Debian repository you'll + find downloads for all architectures. + + After you download and unpack all ``.deb`` packages, copy all + ``.so`` and ``.a`` to a directory, make the appropriate + symbolic links (if necessary), and add the relevant ``-L`` + and ``-I`` paths to ``-DCMAKE_CXX_FLAGS`` above. + + +Running CMake and Building +-------------------------- + +Finally, if you're using your platform compiler, run: + + .. code-block:: bash + + $ cmake -G Ninja + +If you're using Clang as the cross-compiler, run: + + .. code-block:: bash + + $ CC='clang' CXX='clang++' cmake -G Ninja + +If you have ``clang``/``clang++`` on the path, it should just work, and special +Ninja files will be created in the build directory. I strongly suggest +you to run ``cmake`` on a separate build directory, *not* inside the +source tree. + +To build, simply type: + + .. code-block:: bash + + $ ninja + +It should automatically find out how many cores you have, what are +the rules that needs building and will build the whole thing. + +You can't run ``ninja check-all`` on this tree because the created +binaries are targeted to ARM, not x86_64. + +Installing and Using +-------------------- + +After the LLVM/Clang has built successfully, you should install it +via: + + .. code-block:: bash + + $ ninja install + +which will create a sysroot on the install-dir. You can then tar +that directory into a binary with the full triple name (for easy +identification), like: + + .. code-block:: bash + + $ ln -sf arm-linux-gnueabihf-clang + $ tar zchf arm-linux-gnueabihf-clang.tar.gz arm-linux-gnueabihf-clang + +If you copy that tarball to your target board, you'll be able to use +it for running the test-suite, for example. Follow the guidelines at +http://llvm.org/docs/lnt/quickstart.html, unpack the tarball in the +test directory, and use options: + + .. code-block:: bash + + $ ./sandbox/bin/python sandbox/bin/lnt runtest nt \ + --sandbox sandbox \ + --test-suite `pwd`/test-suite \ + --cc `pwd`/arm-linux-gnueabihf-clang/bin/clang \ + --cxx `pwd`/arm-linux-gnueabihf-clang/bin/clang++ + +Remember to add the ``-jN`` options to ``lnt`` to the number of CPUs +on your board. Also, the path to your clang has to be absolute, so +you'll need the `pwd` trick above. diff --git a/docs/HowToReleaseLLVM.rst b/docs/HowToReleaseLLVM.rst new file mode 100644 index 00000000..bc3b093d --- /dev/null +++ b/docs/HowToReleaseLLVM.rst @@ -0,0 +1,425 @@ +================================= +How To Release LLVM To The Public +================================= + +.. contents:: + :local: + :depth: 1 + +Introduction +============ + +This document contains information about successfully releasing LLVM --- +including subprojects: e.g., ``clang`` and ``dragonegg`` --- to the public. It +is the Release Manager's responsibility to ensure that a high quality build of +LLVM is released. + +If you're looking for the document on how to test the release candidates and +create the binary packages, please refer to the :doc:`ReleaseProcess` instead. + +.. _timeline: + +Release Timeline +================ + +LLVM is released on a time based schedule --- roughly every 6 months. We do +not normally have dot releases because of the nature of LLVM's incremental +development philosophy. That said, the only thing preventing dot releases for +critical bug fixes from happening is a lack of resources --- testers, +machines, time, etc. And, because of the high quality we desire for LLVM +releases, we cannot allow for a truncated form of release qualification. + +The release process is roughly as follows: + +* Set code freeze and branch creation date for 6 months after last code freeze + date. Announce release schedule to the LLVM community and update the website. + +* Create release branch and begin release process. + +* Send out release candidate sources for first round of testing. Testing lasts + 7-10 days. During the first round of testing, any regressions found should be + fixed. Patches are merged from mainline into the release branch. Also, all + features need to be completed during this time. Any features not completed at + the end of the first round of testing will be removed or disabled for the + release. + +* Generate and send out the second release candidate sources. Only *critial* + bugs found during this testing phase will be fixed. Any bugs introduced by + merged patches will be fixed. If so a third round of testing is needed. + +* The release notes are updated. + +* Finally, release! + +Release Process +=============== + +.. contents:: + :local: + +Release Administrative Tasks +---------------------------- + +This section describes a few administrative tasks that need to be done for the +release process to begin. Specifically, it involves: + +* Creating the release branch, + +* Setting version numbers, and + +* Tagging release candidates for the release team to begin testing. + +Create Release Branch +^^^^^^^^^^^^^^^^^^^^^ + +Branch the Subversion trunk using the following procedure: + +#. Remind developers that the release branching is imminent and to refrain from + committing patches that might break the build. E.g., new features, large + patches for works in progress, an overhaul of the type system, an exciting + new TableGen feature, etc. + +#. Verify that the current Subversion trunk is in decent shape by + examining nightly tester and buildbot results. + +#. Create the release branch for ``llvm``, ``clang``, the ``test-suite``, and + ``dragonegg`` from the last known good revision. The branch's name is + ``release_XY``, where ``X`` is the major and ``Y`` the minor release + numbers. The branches should be created using the following commands: + + :: + + $ svn copy https://llvm.org/svn/llvm-project/llvm/trunk \ + https://llvm.org/svn/llvm-project/llvm/branches/release_XY + + $ svn copy https://llvm.org/svn/llvm-project/cfe/trunk \ + https://llvm.org/svn/llvm-project/cfe/branches/release_XY + + $ svn copy https://llvm.org/svn/llvm-project/dragonegg/trunk \ + https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY + + $ svn copy https://llvm.org/svn/llvm-project/test-suite/trunk \ + https://llvm.org/svn/llvm-project/test-suite/branches/release_XY + +#. Advise developers that they may now check their patches into the Subversion + tree again. + +#. The Release Manager should switch to the release branch, because all changes + to the release will now be done in the branch. The easiest way to do this is + to grab a working copy using the following commands: + + :: + + $ svn co https://llvm.org/svn/llvm-project/llvm/branches/release_XY llvm-X.Y + + $ svn co https://llvm.org/svn/llvm-project/cfe/branches/release_XY clang-X.Y + + $ svn co https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY dragonegg-X.Y + + $ svn co https://llvm.org/svn/llvm-project/test-suite/branches/release_XY test-suite-X.Y + +Update LLVM Version +^^^^^^^^^^^^^^^^^^^ + +After creating the LLVM release branch, update the release branches' +``autoconf`` and ``configure.ac`` versions from '``X.Ysvn``' to '``X.Y``'. +Update it on mainline as well to be the next version ('``X.Y+1svn``'). +Regenerate the configure scripts for both ``llvm`` and the ``test-suite``. + +In addition, the version numbers of all the Bugzilla components must be updated +for the next release. + +Build the LLVM Release Candidates +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Create release candidates for ``llvm``, ``clang``, ``dragonegg``, and the LLVM +``test-suite`` by tagging the branch with the respective release candidate +number. For instance, to create **Release Candidate 1** you would issue the +following commands: + +:: + + $ svn mkdir https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY + $ svn copy https://llvm.org/svn/llvm-project/llvm/branches/release_XY \ + https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY/rc1 + + $ svn mkdir https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY + $ svn copy https://llvm.org/svn/llvm-project/cfe/branches/release_XY \ + https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY/rc1 + + $ svn mkdir https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY + $ svn copy https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY \ + https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY/rc1 + + $ svn mkdir https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY + $ svn copy https://llvm.org/svn/llvm-project/test-suite/branches/release_XY \ + https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY/rc1 + +Similarly, **Release Candidate 2** would be named ``RC2`` and so on. This keeps +a permanent copy of the release candidate around for people to export and build +as they wish. The final released sources will be tagged in the ``RELEASE_XY`` +directory as ``Final`` (c.f. :ref:`tag`). + +The Release Manager may supply pre-packaged source tarballs for users. This can +be done with the following commands: + +:: + + $ svn export https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY/rc1 llvm-X.Yrc1 + $ svn export https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY/rc1 clang-X.Yrc1 + $ svn export https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY/rc1 dragonegg-X.Yrc1 + $ svn export https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY/rc1 llvm-test-X.Yrc1 + + $ tar -cvf - llvm-X.Yrc1 | gzip > llvm-X.Yrc1.src.tar.gz + $ tar -cvf - clang-X.Yrc1 | gzip > clang-X.Yrc1.src.tar.gz + $ tar -cvf - dragonegg-X.Yrc1 | gzip > dragonegg-X.Yrc1.src.tar.gz + $ tar -cvf - llvm-test-X.Yrc1 | gzip > llvm-test-X.Yrc1.src.tar.gz + +Building the Release +-------------------- + +The builds of ``llvm``, ``clang``, and ``dragonegg`` *must* be free of +errors and warnings in Debug, Release+Asserts, and Release builds. If all +builds are clean, then the release passes Build Qualification. + +The ``make`` options for building the different modes: + ++-----------------+---------------------------------------------+ +| Mode | Options | ++=================+=============================================+ +| Debug | ``ENABLE_OPTIMIZED=0`` | ++-----------------+---------------------------------------------+ +| Release+Asserts | ``ENABLE_OPTIMIZED=1`` | ++-----------------+---------------------------------------------+ +| Release | ``ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1`` | ++-----------------+---------------------------------------------+ + +Build LLVM +^^^^^^^^^^ + +Build ``Debug``, ``Release+Asserts``, and ``Release`` versions +of ``llvm`` on all supported platforms. Directions to build ``llvm`` +are :doc:`here `. + +Build Clang Binary Distribution +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Creating the ``clang`` binary distribution (Debug/Release+Asserts/Release) +requires performing the following steps for each supported platform: + +#. Build clang according to the directions `here + `__. + +#. Build both a Debug and Release version of clang. The binary will be the + Release build. + +#. Package ``clang`` (details to follow). + +Target Specific Build Details +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The table below specifies which compilers are used for each Arch/OS combination +when qualifying the build of ``llvm``, ``clang``, and ``dragonegg``. + ++--------------+---------------+----------------------+ +| Architecture | OS | compiler | ++==============+===============+======================+ +| x86-32 | Mac OS 10.5 | gcc 4.0.1 | ++--------------+---------------+----------------------+ +| x86-32 | Linux | gcc 4.2.X, gcc 4.3.X | ++--------------+---------------+----------------------+ +| x86-32 | FreeBSD | gcc 4.2.X | ++--------------+---------------+----------------------+ +| x86-32 | mingw | gcc 3.4.5 | ++--------------+---------------+----------------------+ +| x86-64 | Mac OS 10.5 | gcc 4.0.1 | ++--------------+---------------+----------------------+ +| x86-64 | Linux | gcc 4.2.X, gcc 4.3.X | ++--------------+---------------+----------------------+ +| x86-64 | FreeBSD | gcc 4.2.X | ++--------------+---------------+----------------------+ + +Release Qualification Criteria +------------------------------ + +A release is qualified when it has no regressions from the previous release (or +baseline). Regressions are related to correctness first and performance second. +(We may tolerate some minor performance regressions if they are deemed +necessary for the general quality of the compiler.) + +**Regressions are new failures in the set of tests that are used to qualify +each product and only include things on the list. Every release will have +some bugs in it. It is the reality of developing a complex piece of +software. We need a very concrete and definitive release criteria that +ensures we have monotonically improving quality on some metric. The metric we +use is described below. This doesn't mean that we don't care about other +criteria, but these are the criteria which we found to be most important and +which must be satisfied before a release can go out.** + +Qualify LLVM +^^^^^^^^^^^^ + +LLVM is qualified when it has a clean test run without a front-end. And it has +no regressions when using either ``clang`` or ``dragonegg`` with the +``test-suite`` from the previous release. + +Qualify Clang +^^^^^^^^^^^^^ + +``Clang`` is qualified when front-end specific tests in the ``llvm`` regression +test suite all pass, clang's own test suite passes cleanly, and there are no +regressions in the ``test-suite``. + +Specific Target Qualification Details +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ++--------------+-------------+----------------+-----------------------------+ +| Architecture | OS | clang baseline | tests | ++==============+=============+================+=============================+ +| x86-32 | Linux | last release | llvm regression tests, | +| | | | clang regression tests, | +| | | | test-suite (including spec) | ++--------------+-------------+----------------+-----------------------------+ +| x86-32 | FreeBSD | last release | llvm regression tests, | +| | | | clang regression tests, | +| | | | test-suite | ++--------------+-------------+----------------+-----------------------------+ +| x86-32 | mingw | none | QT | ++--------------+-------------+----------------+-----------------------------+ +| x86-64 | Mac OS 10.X | last release | llvm regression tests, | +| | | | clang regression tests, | +| | | | test-suite (including spec) | ++--------------+-------------+----------------+-----------------------------+ +| x86-64 | Linux | last release | llvm regression tests, | +| | | | clang regression tests, | +| | | | test-suite (including spec) | ++--------------+-------------+----------------+-----------------------------+ +| x86-64 | FreeBSD | last release | llvm regression tests, | +| | | | clang regression tests, | +| | | | test-suite | ++--------------+-------------+----------------+-----------------------------+ + +Community Testing +----------------- + +Once all testing has been completed and appropriate bugs filed, the release +candidate tarballs are put on the website and the LLVM community is notified. +Ask that all LLVM developers test the release in 2 ways: + +#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the appropriate ``clang`` + binary. Build LLVM. Run ``make check`` and the full LLVM test suite (``make + TEST=nightly report``). + +#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the ``clang`` sources. Compile + everything. Run ``make check`` and the full LLVM test suite (``make + TEST=nightly report``). + +Ask LLVM developers to submit the test suite report and ``make check`` results +to the list. Verify that there are no regressions from the previous release. +The results are not used to qualify a release, but to spot other potential +problems. For unsupported targets, verify that ``make check`` is at least +clean. + +During the first round of testing, all regressions must be fixed before the +second release candidate is tagged. + +If this is the second round of testing, the testing is only to ensure that bug +fixes previously merged in have not created new major problems. *This is not +the time to solve additional and unrelated bugs!* If no patches are merged in, +the release is determined to be ready and the release manager may move onto the +next stage. + +Release Patch Rules +------------------- + +Below are the rules regarding patching the release branch: + +#. Patches applied to the release branch may only be applied by the release + manager. + +#. During the first round of testing, patches that fix regressions or that are + small and relatively risk free (verified by the appropriate code owner) are + applied to the branch. Code owners are asked to be very conservative in + approving patches for the branch. We reserve the right to reject any patch + that does not fix a regression as previously defined. + +#. During the remaining rounds of testing, only patches that fix critical + regressions may be applied. + +Release Final Tasks +------------------- + +The final stages of the release process involves tagging the "final" release +branch, updating documentation that refers to the release, and updating the +demo page. + +Update Documentation +^^^^^^^^^^^^^^^^^^^^ + +Review the documentation and ensure that it is up to date. The "Release Notes" +must be updated to reflect new features, bug fixes, new known issues, and +changes in the list of supported platforms. The "Getting Started Guide" should +be updated to reflect the new release version number tag available from +Subversion and changes in basic system requirements. Merge both changes from +mainline into the release branch. + +.. _tag: + +Tag the LLVM Final Release +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Tag the final release sources using the following procedure: + +:: + + $ svn copy https://llvm.org/svn/llvm-project/llvm/branches/release_XY \ + https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_XY/Final + + $ svn copy https://llvm.org/svn/llvm-project/cfe/branches/release_XY \ + https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_XY/Final + + $ svn copy https://llvm.org/svn/llvm-project/dragonegg/branches/release_XY \ + https://llvm.org/svn/llvm-project/dragonegg/tags/RELEASE_XY/Final + + $ svn copy https://llvm.org/svn/llvm-project/test-suite/branches/release_XY \ + https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_XY/Final + +Update the LLVM Demo Page +------------------------- + +The LLVM demo page must be updated to use the new release. This consists of +using the new ``clang`` binary and building LLVM. + +Update the LLVM Website +^^^^^^^^^^^^^^^^^^^^^^^ + +The website must be updated before the release announcement is sent out. Here +is what to do: + +#. Check out the ``www`` module from Subversion. + +#. Create a new subdirectory ``X.Y`` in the releases directory. + +#. Commit the ``llvm``, ``test-suite``, ``clang`` source, ``clang binaries``, + ``dragonegg`` source, and ``dragonegg`` binaries in this new directory. + +#. Copy and commit the ``llvm/docs`` and ``LICENSE.txt`` files into this new + directory. The docs should be built with ``BUILD_FOR_WEBSITE=1``. + +#. Commit the ``index.html`` to the ``release/X.Y`` directory to redirect (use + from previous release). + +#. Update the ``releases/download.html`` file with the new release. + +#. Update the ``releases/index.html`` with the new release and link to release + documentation. + +#. Finally, update the main page (``index.html`` and sidebar) to point to the + new release and release announcement. Make sure this all gets committed back + into Subversion. + +Announce the Release +^^^^^^^^^^^^^^^^^^^^ + +Have Chris send out the release announcement when everything is finished. + diff --git a/docs/HowToSetUpLLVMStyleRTTI.rst b/docs/HowToSetUpLLVMStyleRTTI.rst new file mode 100644 index 00000000..e0f865a1 --- /dev/null +++ b/docs/HowToSetUpLLVMStyleRTTI.rst @@ -0,0 +1,400 @@ +====================================================== +How to set up LLVM-style RTTI for your class hierarchy +====================================================== + +.. contents:: + +Background +========== + +LLVM avoids using C++'s built in RTTI. Instead, it pervasively uses its +own hand-rolled form of RTTI which is much more efficient and flexible, +although it requires a bit more work from you as a class author. + +A description of how to use LLVM-style RTTI from a client's perspective is +given in the `Programmer's Manual `_. This +document, in contrast, discusses the steps you need to take as a class +hierarchy author to make LLVM-style RTTI available to your clients. + +Before diving in, make sure that you are familiar with the Object Oriented +Programming concept of "`is-a`_". + +.. _is-a: http://en.wikipedia.org/wiki/Is-a + +Basic Setup +=========== + +This section describes how to set up the most basic form of LLVM-style RTTI +(which is sufficient for 99.9% of the cases). We will set up LLVM-style +RTTI for this class hierarchy: + +.. code-block:: c++ + + class Shape { + public: + Shape() {} + virtual double computeArea() = 0; + }; + + class Square : public Shape { + double SideLength; + public: + Square(double S) : SideLength(S) {} + double computeArea() /* override */; + }; + + class Circle : public Shape { + double Radius; + public: + Circle(double R) : Radius(R) {} + double computeArea() /* override */; + }; + +The most basic working setup for LLVM-style RTTI requires the following +steps: + +#. In the header where you declare ``Shape``, you will want to ``#include + "llvm/Support/Casting.h"``, which declares LLVM's RTTI templates. That + way your clients don't even have to think about it. + + .. code-block:: c++ + + #include "llvm/Support/Casting.h" + +#. In the base class, introduce an enum which discriminates all of the + different concrete classes in the hierarchy, and stash the enum value + somewhere in the base class. + + Here is the code after introducing this change: + + .. code-block:: c++ + + class Shape { + public: + + /// Discriminator for LLVM-style RTTI (dyn_cast<> et al.) + + enum ShapeKind { + + SK_Square, + + SK_Circle + + }; + +private: + + const ShapeKind Kind; + +public: + + ShapeKind getKind() const { return Kind; } + + + Shape() {} + virtual double computeArea() = 0; + }; + + You will usually want to keep the ``Kind`` member encapsulated and + private, but let the enum ``ShapeKind`` be public along with providing a + ``getKind()`` method. This is convenient for clients so that they can do + a ``switch`` over the enum. + + A common naming convention is that these enums are "kind"s, to avoid + ambiguity with the words "type" or "class" which have overloaded meanings + in many contexts within LLVM. Sometimes there will be a natural name for + it, like "opcode". Don't bikeshed over this; when in doubt use ``Kind``. + + You might wonder why the ``Kind`` enum doesn't have an entry for + ``Shape``. The reason for this is that since ``Shape`` is abstract + (``computeArea() = 0;``), you will never actually have non-derived + instances of exactly that class (only subclasses). See `Concrete Bases + and Deeper Hierarchies`_ for information on how to deal with + non-abstract bases. It's worth mentioning here that unlike + ``dynamic_cast<>``, LLVM-style RTTI can be used (and is often used) for + classes that don't have v-tables. + +#. Next, you need to make sure that the ``Kind`` gets initialized to the + value corresponding to the dynamic type of the class. Typically, you will + want to have it be an argument to the constructor of the base class, and + then pass in the respective ``XXXKind`` from subclass constructors. + + Here is the code after that change: + + .. code-block:: c++ + + class Shape { + public: + /// Discriminator for LLVM-style RTTI (dyn_cast<> et al.) + enum ShapeKind { + SK_Square, + SK_Circle + }; + private: + const ShapeKind Kind; + public: + ShapeKind getKind() const { return Kind; } + + - Shape() {} + + Shape(ShapeKind K) : Kind(K) {} + virtual double computeArea() = 0; + }; + + class Square : public Shape { + double SideLength; + public: + - Square(double S) : SideLength(S) {} + + Square(double S) : Shape(SK_Square), SideLength(S) {} + double computeArea() /* override */; + }; + + class Circle : public Shape { + double Radius; + public: + - Circle(double R) : Radius(R) {} + + Circle(double R) : Shape(SK_Circle), Radius(R) {} + double computeArea() /* override */; + }; + +#. Finally, you need to inform LLVM's RTTI templates how to dynamically + determine the type of a class (i.e. whether the ``isa<>``/``dyn_cast<>`` + should succeed). The default "99.9% of use cases" way to accomplish this + is through a small static member function ``classof``. In order to have + proper context for an explanation, we will display this code first, and + then below describe each part: + + .. code-block:: c++ + + class Shape { + public: + /// Discriminator for LLVM-style RTTI (dyn_cast<> et al.) + enum ShapeKind { + SK_Square, + SK_Circle + }; + private: + const ShapeKind Kind; + public: + ShapeKind getKind() const { return Kind; } + + Shape(ShapeKind K) : Kind(K) {} + virtual double computeArea() = 0; + }; + + class Square : public Shape { + double SideLength; + public: + Square(double S) : Shape(SK_Square), SideLength(S) {} + double computeArea() /* override */; + + + + static bool classof(const Shape *S) { + + return S->getKind() == SK_Square; + + } + }; + + class Circle : public Shape { + double Radius; + public: + Circle(double R) : Shape(SK_Circle), Radius(R) {} + double computeArea() /* override */; + + + + static bool classof(const Shape *S) { + + return S->getKind() == SK_Circle; + + } + }; + + The job of ``classof`` is to dynamically determine whether an object of + a base class is in fact of a particular derived class. In order to + downcast a type ``Base`` to a type ``Derived``, there needs to be a + ``classof`` in ``Derived`` which will accept an object of type ``Base``. + + To be concrete, consider the following code: + + .. code-block:: c++ + + Shape *S = ...; + if (isa(S)) { + /* do something ... */ + } + + The code of the ``isa<>`` test in this code will eventually boil + down---after template instantiation and some other machinery---to a + check roughly like ``Circle::classof(S)``. For more information, see + :ref:`classof-contract`. + + The argument to ``classof`` should always be an *ancestor* class because + the implementation has logic to allow and optimize away + upcasts/up-``isa<>``'s automatically. It is as though every class + ``Foo`` automatically has a ``classof`` like: + + .. code-block:: c++ + + class Foo { + [...] + template + static bool classof(const T *, + ::llvm::enable_if_c< + ::llvm::is_base_of::value + >::type* = 0) { return true; } + [...] + }; + + Note that this is the reason that we did not need to introduce a + ``classof`` into ``Shape``: all relevant classes derive from ``Shape``, + and ``Shape`` itself is abstract (has no entry in the ``Kind`` enum), + so this notional inferred ``classof`` is all we need. See `Concrete + Bases and Deeper Hierarchies`_ for more information about how to extend + this example to more general hierarchies. + +Although for this small example setting up LLVM-style RTTI seems like a lot +of "boilerplate", if your classes are doing anything interesting then this +will end up being a tiny fraction of the code. + +Concrete Bases and Deeper Hierarchies +===================================== + +For concrete bases (i.e. non-abstract interior nodes of the inheritance +tree), the ``Kind`` check inside ``classof`` needs to be a bit more +complicated. The situation differs from the example above in that + +* Since the class is concrete, it must itself have an entry in the ``Kind`` + enum because it is possible to have objects with this class as a dynamic + type. + +* Since the class has children, the check inside ``classof`` must take them + into account. + +Say that ``SpecialSquare`` and ``OtherSpecialSquare`` derive +from ``Square``, and so ``ShapeKind`` becomes: + +.. code-block:: c++ + + enum ShapeKind { + SK_Square, + + SK_SpecialSquare, + + SK_OtherSpecialSquare, + SK_Circle + } + +Then in ``Square``, we would need to modify the ``classof`` like so: + +.. code-block:: c++ + + - static bool classof(const Shape *S) { + - return S->getKind() == SK_Square; + - } + + static bool classof(const Shape *S) { + + return S->getKind() >= SK_Square && + + S->getKind() <= SK_OtherSpecialSquare; + + } + +The reason that we need to test a range like this instead of just equality +is that both ``SpecialSquare`` and ``OtherSpecialSquare`` "is-a" +``Square``, and so ``classof`` needs to return ``true`` for them. + +This approach can be made to scale to arbitrarily deep hierarchies. The +trick is that you arrange the enum values so that they correspond to a +preorder traversal of the class hierarchy tree. With that arrangement, all +subclass tests can be done with two comparisons as shown above. If you just +list the class hierarchy like a list of bullet points, you'll get the +ordering right:: + + | Shape + | Square + | SpecialSquare + | OtherSpecialSquare + | Circle + +A Bug to be Aware Of +-------------------- + +The example just given opens the door to bugs where the ``classof``\s are +not updated to match the ``Kind`` enum when adding (or removing) classes to +(from) the hierarchy. + +Continuing the example above, suppose we add a ``SomewhatSpecialSquare`` as +a subclass of ``Square``, and update the ``ShapeKind`` enum like so: + +.. code-block:: c++ + + enum ShapeKind { + SK_Square, + SK_SpecialSquare, + SK_OtherSpecialSquare, + + SK_SomewhatSpecialSquare, + SK_Circle + } + +Now, suppose that we forget to update ``Square::classof()``, so it still +looks like: + +.. code-block:: c++ + + static bool classof(const Shape *S) { + // BUG: Returns false when S->getKind() == SK_SomewhatSpecialSquare, + // even though SomewhatSpecialSquare "is a" Square. + return S->getKind() >= SK_Square && + S->getKind() <= SK_OtherSpecialSquare; + } + +As the comment indicates, this code contains a bug. A straightforward and +non-clever way to avoid this is to introduce an explicit ``SK_LastSquare`` +entry in the enum when adding the first subclass(es). For example, we could +rewrite the example at the beginning of `Concrete Bases and Deeper +Hierarchies`_ as: + +.. code-block:: c++ + + enum ShapeKind { + SK_Square, + + SK_SpecialSquare, + + SK_OtherSpecialSquare, + + SK_LastSquare, + SK_Circle + } + ... + // Square::classof() + - static bool classof(const Shape *S) { + - return S->getKind() == SK_Square; + - } + + static bool classof(const Shape *S) { + + return S->getKind() >= SK_Square && + + S->getKind() <= SK_LastSquare; + + } + +Then, adding new subclasses is easy: + +.. code-block:: c++ + + enum ShapeKind { + SK_Square, + SK_SpecialSquare, + SK_OtherSpecialSquare, + + SK_SomewhatSpecialSquare, + SK_LastSquare, + SK_Circle + } + +Notice that ``Square::classof`` does not need to be changed. + +.. _classof-contract: + +The Contract of ``classof`` +--------------------------- + +To be more precise, let ``classof`` be inside a class ``C``. Then the +contract for ``classof`` is "return ``true`` if the dynamic type of the +argument is-a ``C``". As long as your implementation fulfills this +contract, you can tweak and optimize it as much as you want. + +.. TODO:: + + Touch on some of the more advanced features, like ``isa_impl`` and + ``simplify_type``. However, those two need reference documentation in + the form of doxygen comments as well. We need the doxygen so that we can + say "for full details, see http://llvm.org/doxygen/..." + +Rules of Thumb +============== + +#. The ``Kind`` enum should have one entry per concrete class, ordered + according to a preorder traversal of the inheritance tree. +#. The argument to ``classof`` should be a ``const Base *``, where ``Base`` + is some ancestor in the inheritance hierarchy. The argument should + *never* be a derived class or the class itself: the template machinery + for ``isa<>`` already handles this case and optimizes it. +#. For each class in the hierarchy that has no children, implement a + ``classof`` that checks only against its ``Kind``. +#. For each class in the hierarchy that has children, implement a + ``classof`` that checks a range of the first child's ``Kind`` and the + last child's ``Kind``. diff --git a/docs/HowToSubmitABug.rst b/docs/HowToSubmitABug.rst new file mode 100644 index 00000000..45be2826 --- /dev/null +++ b/docs/HowToSubmitABug.rst @@ -0,0 +1,229 @@ +================================ +How to submit an LLVM bug report +================================ + +Introduction - Got bugs? +======================== + + +If you're working with LLVM and run into a bug, we definitely want to know +about it. This document describes what you can do to increase the odds of +getting it fixed quickly. + +Basically you have to do two things at a minimum. First, decide whether +the bug `crashes the compiler`_ (or an LLVM pass), or if the +compiler is `miscompiling`_ the program (i.e., the +compiler successfully produces an executable, but it doesn't run right). +Based on what type of bug it is, follow the instructions in the linked +section to narrow down the bug so that the person who fixes it will be able +to find the problem more easily. + +Once you have a reduced test-case, go to `the LLVM Bug Tracking System +`_ and fill out the form with the +necessary details (note that you don't need to pick a category, just use +the "new-bugs" category if you're not sure). The bug description should +contain the following information: + +* All information necessary to reproduce the problem. +* The reduced test-case that triggers the bug. +* The location where you obtained LLVM (if not from our Subversion + repository). + +Thanks for helping us make LLVM better! + +.. _crashes the compiler: + +Crashing Bugs +============= + +More often than not, bugs in the compiler cause it to crash---often due to +an assertion failure of some sort. The most important piece of the puzzle +is to figure out if it is crashing in the GCC front-end or if it is one of +the LLVM libraries (e.g. the optimizer or code generator) that has +problems. + +To figure out which component is crashing (the front-end, optimizer or code +generator), run the ``llvm-gcc`` command line as you were when the crash +occurred, but with the following extra command line options: + +* ``-O0 -emit-llvm``: If ``llvm-gcc`` still crashes when passed these + options (which disable the optimizer and code generator), then the crash + is in the front-end. Jump ahead to the section on :ref:`front-end bugs + `. + +* ``-emit-llvm``: If ``llvm-gcc`` crashes with this option (which disables + the code generator), you found an optimizer bug. Jump ahead to + `compile-time optimization bugs`_. + +* Otherwise, you have a code generator crash. Jump ahead to `code + generator bugs`_. + +.. _front-end bug: +.. _front-end: + +Front-end bugs +-------------- + +If the problem is in the front-end, you should re-run the same ``llvm-gcc`` +command that resulted in the crash, but add the ``-save-temps`` option. +The compiler will crash again, but it will leave behind a ``foo.i`` file +(containing preprocessed C source code) and possibly ``foo.s`` for each +compiled ``foo.c`` file. Send us the ``foo.i`` file, along with the options +you passed to ``llvm-gcc``, and a brief description of the error it caused. + +The `delta `_ tool helps to reduce the +preprocessed file down to the smallest amount of code that still replicates +the problem. You're encouraged to use delta to reduce the code to make the +developers' lives easier. `This website +`_ has instructions +on the best way to use delta. + +.. _compile-time optimization bugs: + +Compile-time optimization bugs +------------------------------ + +If you find that a bug crashes in the optimizer, compile your test-case to a +``.bc`` file by passing "``-emit-llvm -O0 -c -o foo.bc``". +Then run: + +.. code-block:: bash + + opt -std-compile-opts -debug-pass=Arguments foo.bc -disable-output + +This command should do two things: it should print out a list of passes, and +then it should crash in the same way as llvm-gcc. If it doesn't crash, please +follow the instructions for a `front-end bug`_. + +If this does crash, then you should be able to debug this with the following +bugpoint command: + +.. code-block:: bash + + bugpoint foo.bc + +Please run this, then file a bug with the instructions and reduced .bc +files that bugpoint emits. If something goes wrong with bugpoint, please +submit the "foo.bc" file and the list of passes printed by ``opt``. + +.. _code generator bugs: + +Code generator bugs +------------------- + +If you find a bug that crashes llvm-gcc in the code generator, compile your +source file to a .bc file by passing "``-emit-llvm -c -o foo.bc``" to +llvm-gcc (in addition to the options you already pass). Once your have +foo.bc, one of the following commands should fail: + +#. ``llc foo.bc`` +#. ``llc foo.bc -relocation-model=pic`` +#. ``llc foo.bc -relocation-model=static`` + +If none of these crash, please follow the instructions for a `front-end +bug`_. If one of these do crash, you should be able to reduce this with +one of the following bugpoint command lines (use the one corresponding to +the command above that failed): + +#. ``bugpoint -run-llc foo.bc`` +#. ``bugpoint -run-llc foo.bc --tool-args -relocation-model=pic`` +#. ``bugpoint -run-llc foo.bc --tool-args -relocation-model=static`` + +Please run this, then file a bug with the instructions and reduced .bc file +that bugpoint emits. If something goes wrong with bugpoint, please submit +the "foo.bc" file and the option that llc crashes with. + +.. _miscompiling: + +Miscompilations +=============== + +If llvm-gcc successfully produces an executable, but that executable +doesn't run right, this is either a bug in the code or a bug in the +compiler. The first thing to check is to make sure it is not using +undefined behavior (e.g. reading a variable before it is defined). In +particular, check to see if the program `valgrind +`_'s clean, passes purify, or some other memory +checker tool. Many of the "LLVM bugs" that we have chased down ended up +being bugs in the program being compiled, not LLVM. + +Once you determine that the program itself is not buggy, you should choose +which code generator you wish to compile the program with (e.g. LLC or the JIT) +and optionally a series of LLVM passes to run. For example: + +.. code-block:: bash + + bugpoint -run-llc [... optzn passes ...] file-to-test.bc --args -- [program arguments] + +bugpoint will try to narrow down your list of passes to the one pass that +causes an error, and simplify the bitcode file as much as it can to assist +you. It will print a message letting you know how to reproduce the +resulting error. + +Incorrect code generation +========================= + +Similarly to debugging incorrect compilation by mis-behaving passes, you +can debug incorrect code generation by either LLC or the JIT, using +``bugpoint``. The process ``bugpoint`` follows in this case is to try to +narrow the code down to a function that is miscompiled by one or the other +method, but since for correctness, the entire program must be run, +``bugpoint`` will compile the code it deems to not be affected with the C +Backend, and then link in the shared object it generates. + +To debug the JIT: + +.. code-block:: bash + + bugpoint -run-jit -output=[correct output file] [bitcode file] \ + --tool-args -- [arguments to pass to lli] \ + --args -- [program arguments] + +Similarly, to debug the LLC, one would run: + +.. code-block:: bash + + bugpoint -run-llc -output=[correct output file] [bitcode file] \ + --tool-args -- [arguments to pass to llc] \ + --args -- [program arguments] + +**Special note:** if you are debugging MultiSource or SPEC tests that +already exist in the ``llvm/test`` hierarchy, there is an easier way to +debug the JIT, LLC, and CBE, using the pre-written Makefile targets, which +will pass the program options specified in the Makefiles: + +.. code-block:: bash + + cd llvm/test/../../program + make bugpoint-jit + +At the end of a successful ``bugpoint`` run, you will be presented +with two bitcode files: a *safe* file which can be compiled with the C +backend and the *test* file which either LLC or the JIT +mis-codegenerates, and thus causes the error. + +To reproduce the error that ``bugpoint`` found, it is sufficient to do +the following: + +#. Regenerate the shared object from the safe bitcode file: + + .. code-block:: bash + + llc -march=c safe.bc -o safe.c + gcc -shared safe.c -o safe.so + +#. If debugging LLC, compile test bitcode native and link with the shared + object: + + .. code-block:: bash + + llc test.bc -o test.s + gcc test.s safe.so -o test.llc + ./test.llc [program options] + +#. If debugging the JIT, load the shared object and supply the test + bitcode: + + .. code-block:: bash + + lli -load=safe.so test.bc [program options] diff --git a/docs/HowToUseAttributes.rst b/docs/HowToUseAttributes.rst new file mode 100644 index 00000000..66c44c01 --- /dev/null +++ b/docs/HowToUseAttributes.rst @@ -0,0 +1,81 @@ +===================== +How To Use Attributes +===================== + +.. contents:: + :local: + +Introduction +============ + +Attributes in LLVM have changed in some fundamental ways. It was necessary to +do this to support expanding the attributes to encompass more than a handful of +attributes --- e.g. command line options. The old way of handling attributes +consisted of representing them as a bit mask of values. This bit mask was +stored in a "list" structure that was reference counted. The advantage of this +was that attributes could be manipulated with 'or's and 'and's. The +disadvantage of this was that there was limited room for expansion, and +virtually no support for attribute-value pairs other than alignment. + +In the new scheme, an ``Attribute`` object represents a single attribute that's +uniqued. You use the ``Attribute::get`` methods to create a new ``Attribute`` +object. An attribute can be a single "enum" value (the enum being the +``Attribute::AttrKind`` enum), a string representing a target-dependent +attribute, or an attribute-value pair. Some examples: + +* Target-independent: ``noinline``, ``zext`` +* Target-dependent: ``"no-sse"``, ``"thumb2"`` +* Attribute-value pair: ``"cpu" = "cortex-a8"``, ``align = 4`` + +Note: for an attribute value pair, we expect a target-dependent attribute to +have a string for the value. + +``Attribute`` +============= +An ``Attribute`` object is designed to be passed around by value. + +Because attributes are no longer represented as a bit mask, you will need to +convert any code which does treat them as a bit mask to use the new query +methods on the Attribute class. + +``AttributeSet`` +================ + +The ``AttributeSet`` class replaces the old ``AttributeList`` class. The +``AttributeSet`` stores a collection of Attribute objects for each kind of +object that may have an attribute associated with it: the function as a +whole, the return type, or the function's parameters. A function's attributes +are at index ``AttributeSet::FunctionIndex``; the return type's attributes are +at index ``AttributeSet::ReturnIndex``; and the function's parameters' +attributes are at indices 1, ..., n (where 'n' is the number of parameters). +Most methods on the ``AttributeSet`` class take an index parameter. + +An ``AttributeSet`` is also a uniqued and immutable object. You create an +``AttributeSet`` through the ``AttributeSet::get`` methods. You can add and +remove attributes, which result in the creation of a new ``AttributeSet``. + +An ``AttributeSet`` object is designed to be passed around by value. + +Note: It is advised that you do *not* use the ``AttributeSet`` "introspection" +methods (e.g. ``Raw``, ``getRawPointer``, etc.). These methods break +encapsulation, and may be removed in a future release (i.e. LLVM 4.0). + +``AttrBuilder`` +=============== + +Lastly, we have a "builder" class to help create the ``AttributeSet`` object +without having to create several different intermediate uniqued +``AttributeSet`` objects. The ``AttrBuilder`` class allows you to add and +remove attributes at will. The attributes won't be uniqued until you call the +appropriate ``AttributeSet::get`` method. + +An ``AttrBuilder`` object is *not* designed to be passed around by value. It +should be passed by reference. + +Note: It is advised that you do *not* use the ``AttrBuilder::addRawValue()`` +method or the ``AttrBuilder(uint64_t Val)`` constructor. These are for +backwards compatibility and may be removed in a future release (i.e. LLVM 4.0). + +And that's basically it! A lot of functionality is hidden behind these classes, +but the interfaces are pretty straight forward. + diff --git a/docs/HowToUseInstrMappings.rst b/docs/HowToUseInstrMappings.rst new file mode 100644 index 00000000..8a3e7c8d --- /dev/null +++ b/docs/HowToUseInstrMappings.rst @@ -0,0 +1,175 @@ +=============================== +How To Use Instruction Mappings +=============================== + +.. contents:: + :local: + +Introduction +============ + +This document contains information about adding instruction mapping support +for a target. The motivation behind this feature comes from the need to switch +between different instruction formats during various optimizations. One approach +could be to use switch cases which list all the instructions along with formats +they can transition to. However, it has large maintenance overhead +because of the hardcoded instruction names. Also, whenever a new instruction is +added in the .td files, all the relevant switch cases should be modified +accordingly. Instead, the same functionality could be achieved with TableGen and +some support from the .td files for a fraction of maintenance cost. + +``InstrMapping`` Class Overview +=============================== + +TableGen uses relationship models to map instructions with each other. These +models are described using ``InstrMapping`` class as a base. Each model sets +various fields of the ``InstrMapping`` class such that they can uniquely +describe all the instructions using that model. TableGen parses all the relation +models and uses the information to construct relation tables which relate +instructions with each other. These tables are emitted in the +``XXXInstrInfo.inc`` file along with the functions to query them. Following +is the definition of ``InstrMapping`` class definied in Target.td file: + +.. code-block:: llvm + + class InstrMapping { + // Used to reduce search space only to the instructions using this + // relation model. + string FilterClass; + + // List of fields/attributes that should be same for all the instructions in + // a row of the relation table. Think of this as a set of properties shared + // by all the instructions related by this relationship. + list RowFields = []; + + // List of fields/attributes that are same for all the instructions + // in a column of the relation table. + list ColFields = []; + + // Values for the fields/attributes listed in 'ColFields' corresponding to + // the key instruction. This is the instruction that will be transformed + // using this relation model. + list KeyCol = []; + + // List of values for the fields/attributes listed in 'ColFields', one for + // each column in the relation table. These are the instructions a key + // instruction will be transformed into. + list > ValueCols = []; + } + +Sample Example +-------------- + +Let's say that we want to have a function +``int getPredOpcode(uint16_t Opcode, enum PredSense inPredSense)`` which +takes a non-predicated instruction and returns its predicated true or false form +depending on some input flag, ``inPredSense``. The first step in the process is +to define a relationship model that relates predicated instructions to their +non-predicated form by assigning appropriate values to the ``InstrMapping`` +fields. For this relationship, non-predicated instructions are treated as key +instruction since they are the one used to query the interface function. + +.. code-block:: llvm + + def getPredOpcode : InstrMapping { + // Choose a FilterClass that is used as a base class for all the + // instructions modeling this relationship. This is done to reduce the + // search space only to these set of instructions. + let FilterClass = "PredRel"; + + // Instructions with same values for all the fields in RowFields form a + // row in the resulting relation table. + // For example, if we want to relate 'ADD' (non-predicated) with 'Add_pt' + // (predicated true) and 'Add_pf' (predicated false), then all 3 + // instructions need to have same value for BaseOpcode field. It can be any + // unique value (Ex: XYZ) and should not be shared with any other + // instruction not related to 'add'. + let RowFields = ["BaseOpcode"]; + + // List of attributes that can be used to define key and column instructions + // for a relation. Key instruction is passed as an argument + // to the function used for querying relation tables. Column instructions + // are the instructions they (key) can transform into. + // + // Here, we choose 'PredSense' as ColFields since this is the unique + // attribute of the key (non-predicated) and column (true/false) + // instructions involved in this relationship model. + let ColFields = ["PredSense"]; + + // The key column contains non-predicated instructions. + let KeyCol = ["none"]; + + // Two value columns - first column contains instructions with + // PredSense=true while second column has instructions with PredSense=false. + let ValueCols = [["true"], ["false"]]; + } + +TableGen uses the above relationship model to emit relation table that maps +non-predicated instructions with their predicated forms. It also outputs the +interface function +``int getPredOpcode(uint16_t Opcode, enum PredSense inPredSense)`` to query +the table. Here, Function ``getPredOpcode`` takes two arguments, opcode of the +current instruction and PredSense of the desired instruction, and returns +predicated form of the instruction, if found in the relation table. +In order for an instruction to be added into the relation table, it needs +to include relevant information in its definition. For example, consider +following to be the current definitions of ADD, ADD_pt (true) and ADD_pf (false) +instructions: + +.. code-block:: llvm + + def ADD : ALU32_rr<(outs IntRegs:$dst), (ins IntRegs:$a, IntRegs:$b), + "$dst = add($a, $b)", + [(set (i32 IntRegs:$dst), (add (i32 IntRegs:$a), + (i32 IntRegs:$b)))]>; + + def ADD_Pt : ALU32_rr<(outs IntRegs:$dst), + (ins PredRegs:$p, IntRegs:$a, IntRegs:$b), + "if ($p) $dst = add($a, $b)", + []>; + + def ADD_Pf : ALU32_rr<(outs IntRegs:$dst), + (ins PredRegs:$p, IntRegs:$a, IntRegs:$b), + "if (!$p) $dst = add($a, $b)", + []>; + +In this step, we modify these instructions to include the information +required by the relationship model, getPredOpcode, so that they can +be related. + +.. code-block:: llvm + + def ADD : PredRel, ALU32_rr<(outs IntRegs:$dst), (ins IntRegs:$a, IntRegs:$b), + "$dst = add($a, $b)", + [(set (i32 IntRegs:$dst), (add (i32 IntRegs:$a), + (i32 IntRegs:$b)))]> { + let BaseOpcode = "ADD"; + let PredSense = "none"; + } + + def ADD_Pt : PredRel, ALU32_rr<(outs IntRegs:$dst), + (ins PredRegs:$p, IntRegs:$a, IntRegs:$b), + "if ($p) $dst = add($a, $b)", + []> { + let BaseOpcode = "ADD"; + let PredSense = "true"; + } + + def ADD_Pf : PredRel, ALU32_rr<(outs IntRegs:$dst), + (ins PredRegs:$p, IntRegs:$a, IntRegs:$b), + "if (!$p) $dst = add($a, $b)", + []> { + let BaseOpcode = "ADD"; + let PredSense = "false"; + } + +Please note that all the above instructions use ``PredRel`` as a base class. +This is extremely important since TableGen uses it as a filter for selecting +instructions for ``getPredOpcode`` model. Any instruction not derived from +``PredRel`` is excluded from the analysis. ``BaseOpcode`` is another important +field. Since it's selected as a ``RowFields`` of the model, it is required +to have the same value for all 3 instructions in order to be related. Next, +``PredSense`` is used to determine their column positions by comparing its value +with ``KeyCol`` and ``ValueCols``. If an instruction sets its ``PredSense`` +value to something not used in the relation model, it will not be assigned +a column in the relation table. diff --git a/docs/LLVMBuild.rst b/docs/LLVMBuild.rst new file mode 100644 index 00000000..040b0448 --- /dev/null +++ b/docs/LLVMBuild.rst @@ -0,0 +1,325 @@ +=============== +LLVMBuild Guide +=============== + +.. contents:: + :local: + +Introduction +============ + +This document describes the ``LLVMBuild`` organization and files which +we use to describe parts of the LLVM ecosystem. For description of +specific LLVMBuild related tools, please see the command guide. + +LLVM is designed to be a modular set of libraries which can be flexibly +mixed together in order to build a variety of tools, like compilers, +JITs, custom code generators, optimization passes, interpreters, and so +on. Related projects in the LLVM system like Clang and LLDB also tend to +follow this philosophy. + +In order to support this usage style, LLVM has a fairly strict structure +as to how the source code and various components are organized. The +``LLVMBuild.txt`` files are the explicit specification of that +structure, and are used by the build systems and other tools in order to +develop the LLVM project. + +Project Organization +==================== + +The source code for LLVM projects using the LLVMBuild system (LLVM, +Clang, and LLDB) is organized into *components*, which define the +separate pieces of functionality that make up the project. These +projects may consist of many libraries, associated tools, build tools, +or other utility tools (for example, testing tools). + +For the most part, the project contents are organized around defining +one main component per each subdirectory. Each such directory contains +an ``LLVMBuild.txt`` which contains the component definitions. + +The component descriptions for the project as a whole are automatically +gathered by the LLVMBuild tools. The tools automatically traverse the +source directory structure to find all of the component description +files. NOTE: For performance/sanity reasons, we only traverse into +subdirectories when the parent itself contains an ``LLVMBuild.txt`` +description file. + +Build Integration +================= + +The LLVMBuild files themselves are just a declarative way to describe +the project structure. The actual building of the LLVM project is +handled by another build system (currently we support both +:doc:`Makefiles ` and :doc:`CMake `). + +The build system implementation will load the relevant contents of the +LLVMBuild files and use that to drive the actual project build. +Typically, the build system will only need to load this information at +"configure" time, and use it to generative native information. Build +systems will also handle automatically reconfiguring their information +when the contents of the ``LLVMBuild.txt`` files change. + +Developers generally are not expected to need to be aware of the details +of how the LLVMBuild system is integrated into their build. Ideally, +LLVM developers who are not working on the build system would only ever +need to modify the contents of the ``LLVMBuild.txt`` description files +(although we have not reached this goal yet). + +For more information on the utility tool we provide to help interfacing +with the build system, please see the :doc:`llvm-build +` documentation. + +Component Overview +================== + +As mentioned earlier, LLVM projects are organized into logical +*components*. Every component is typically grouped into its own +subdirectory. Generally, a component is organized around a coherent +group of sources which have some kind of clear API separation from other +parts of the code. + +LLVM primarily uses the following types of components: + +- *Libraries* - Library components define a distinct API which can be + independently linked into LLVM client applications. Libraries typically + have private and public header files, and may specify a link of required + libraries that they build on top of. +- *Build Tools* - Build tools are applications which are designed to be run + as part of the build process (typically to generate other source files). + Currently, LLVM uses one main build tool called :doc:`TableGen + ` to generate a variety of source files. +- *Tools* - Command line applications which are built using the LLVM + component libraries. Most LLVM tools are small and are primarily + frontends to the library interfaces. + +Components are described using ``LLVMBuild.txt`` files in the directories +that define the component. See the `LLVMBuild Format Reference`_ section +for information on the exact format of these files. + +LLVMBuild Format Reference +========================== + +LLVMBuild files are written in a simple variant of the INI or configuration +file format (`Wikipedia entry`_). The format defines a list of sections +each of which may contain some number of properties. A simple example of +the file format is below: + +.. _Wikipedia entry: http://en.wikipedia.org/wiki/INI_file + +.. code-block:: ini + + ; Comments start with a semi-colon. + + ; Sections are declared using square brackets. + [component_0] + + ; Properties are declared using '=' and are contained in the previous section. + ; + ; We support simple string and boolean scalar values and list values, where + ; items are separated by spaces. There is no support for quoting, and so + ; property values may not contain spaces. + property_name = property_value + list_property_name = value_1 value_2 ... value_n + boolean_property_name = 1 (or 0) + +LLVMBuild files are expected to define a strict set of sections and +properties. A typical component description file for a library +component would look like the following example: + +.. code-block:: ini + + [component_0] + type = Library + name = Linker + parent = Libraries + required_libraries = Archive BitReader Core Support TransformUtils + +A full description of the exact sections and properties which are +allowed follows. + +Each file may define exactly one common component, named ``common``. The +common component may define the following properties: + +- ``subdirectories`` **[optional]** + + If given, a list of the names of the subdirectories from the current + subpath to search for additional LLVMBuild files. + +Each file may define multiple components. Each component is described by a +section who name starts with ``component``. The remainder of the section +name is ignored, but each section name must be unique. Typically components +are just number in order for files with multiple components +(``component_0``, ``component_1``, and so on). + +.. warning:: + + Section names not matching this format (or the ``common`` section) are + currently unused and are disallowed. + +Every component is defined by the properties in the section. The exact +list of properties that are allowed depends on the component type. +Components **may not** define any properties other than those expected +by the component type. + +Every component must define the following properties: + +- ``type`` **[required]** + + The type of the component. Supported component types are detailed + below. Most components will define additional properties which may be + required or optional. + +- ``name`` **[required]** + + The name of the component. Names are required to be unique across the + entire project. + +- ``parent`` **[required]** + + The name of the logical parent of the component. Components are + organized into a logical tree to make it easier to navigate and + organize groups of components. The parents have no semantics as far + as the project build is concerned, however. Typically, the parent + will be the main component of the parent directory. + + Components may reference the root pseudo component using ``$ROOT`` to + indicate they should logically be grouped at the top-level. + +Components may define the following properties: + +- ``dependencies`` **[optional]** + + If specified, a list of names of components which *must* be built + prior to this one. This should only be exactly those components which + produce some tool or source code required for building the component. + + .. note:: + + ``Group`` and ``LibraryGroup`` components have no semantics for the + actual build, and are not allowed to specify dependencies. + +The following section lists the available component types, as well as +the properties which are associated with that component. + +- ``type = Group`` + + Group components exist purely to allow additional arbitrary structuring + of the logical components tree. For example, one might define a + ``Libraries`` group to hold all of the root library components. + + ``Group`` components have no additionally properties. + +- ``type = Library`` + + Library components define an individual library which should be built + from the source code in the component directory. + + Components with this type use the following properties: + + - ``library_name`` **[optional]** + + If given, the name to use for the actual library file on disk. If + not given, the name is derived from the component name itself. + + - ``required_libraries`` **[optional]** + + If given, a list of the names of ``Library`` or ``LibraryGroup`` + components which must also be linked in whenever this library is + used. That is, the link time dependencies for this component. When + tools are built, the build system will include the transitive closure + of all ``required_libraries`` for the components the tool needs. + + - ``add_to_library_groups`` **[optional]** + + If given, a list of the names of ``LibraryGroup`` components which + this component is also part of. This allows nesting groups of + components. For example, the ``X86`` target might define a library + group for all of the ``X86`` components. That library group might + then be included in the ``all-targets`` library group. + + - ``installed`` **[optional]** **[boolean]** + + Whether this library is installed. Libraries that are not installed + are only reported by ``llvm-config`` when it is run as part of a + development directory. + +- ``type = LibraryGroup`` + + ``LibraryGroup`` components are a mechanism to allow easy definition of + useful sets of related components. In particular, we use them to easily + specify things like "all targets", or "all assembly printers". + + Components with this type use the following properties: + + - ``required_libraries`` **[optional]** + + See the ``Library`` type for a description of this property. + + - ``add_to_library_groups`` **[optional]** + + See the ``Library`` type for a description of this property. + +- ``type = TargetGroup`` + + ``TargetGroup`` components are an extension of ``LibraryGroup``\s, + specifically for defining LLVM targets (which are handled specially in a + few places). + + The name of the component should always be the name of the target. + + Components with this type use the ``LibraryGroup`` properties in + addition to: + + - ``has_asmparser`` **[optional]** **[boolean]** + + Whether this target defines an assembly parser. + + - ``has_asmprinter`` **[optional]** **[boolean]** + + Whether this target defines an assembly printer. + + - ``has_disassembler`` **[optional]** **[boolean]** + + Whether this target defines a disassembler. + + - ``has_jit`` **[optional]** **[boolean]** + + Whether this target supports JIT compilation. + +- ``type = Tool`` + + ``Tool`` components define standalone command line tools which should be + built from the source code in the component directory and linked. + + Components with this type use the following properties: + + - ``required_libraries`` **[optional]** + + If given, a list of the names of ``Library`` or ``LibraryGroup`` + components which this tool is required to be linked with. + + .. note:: + + The values should be the component names, which may not always + match up with the actual library names on disk. + + Build systems are expected to properly include all of the libraries + required by the linked components (i.e., the transitive closure of + ``required_libraries``). + + Build systems are also expected to understand that those library + components must be built prior to linking -- they do not also need + to be listed under ``dependencies``. + +- ``type = BuildTool`` + + ``BuildTool`` components are like ``Tool`` components, except that the + tool is supposed to be built for the platform where the build is running + (instead of that platform being targetted). Build systems are expected + to handle the fact that required libraries may need to be built for + multiple platforms in order to be able to link this tool. + + ``BuildTool`` components currently use the exact same properties as + ``Tool`` components, the type distinction is only used to differentiate + what the tool is built for. + diff --git a/docs/LLVMBuild.txt b/docs/LLVMBuild.txt new file mode 100644 index 00000000..d5aea864 --- /dev/null +++ b/docs/LLVMBuild.txt @@ -0,0 +1,21 @@ +;===- ./docs/LLVMBuild.txt -------------------------------------*- Conf -*--===; +; +; The LLVM Compiler Infrastructure +; +; This file is distributed under the University of Illinois Open Source +; License. See LICENSE.TXT for details. +; +;===------------------------------------------------------------------------===; +; +; This is an LLVMBuild description file for the components in this subdirectory. +; +; For more information on the LLVMBuild system, please see: +; +; http://llvm.org/docs/LLVMBuild.html +; +;===------------------------------------------------------------------------===; + +[component_0] +type = Group +name = Docs +parent = $ROOT diff --git a/docs/LangRef.rst b/docs/LangRef.rst new file mode 100644 index 00000000..810455cb --- /dev/null +++ b/docs/LangRef.rst @@ -0,0 +1,8960 @@ +============================== +LLVM Language Reference Manual +============================== + +.. contents:: + :local: + :depth: 3 + +Abstract +======== + +This document is a reference manual for the LLVM assembly language. LLVM +is a Static Single Assignment (SSA) based representation that provides +type safety, low-level operations, flexibility, and the capability of +representing 'all' high-level languages cleanly. It is the common code +representation used throughout all phases of the LLVM compilation +strategy. + +Introduction +============ + +The LLVM code representation is designed to be used in three different +forms: as an in-memory compiler IR, as an on-disk bitcode representation +(suitable for fast loading by a Just-In-Time compiler), and as a human +readable assembly language representation. This allows LLVM to provide a +powerful intermediate representation for efficient compiler +transformations and analysis, while providing a natural means to debug +and visualize the transformations. The three different forms of LLVM are +all equivalent. This document describes the human readable +representation and notation. + +The LLVM representation aims to be light-weight and low-level while +being expressive, typed, and extensible at the same time. It aims to be +a "universal IR" of sorts, by being at a low enough level that +high-level ideas may be cleanly mapped to it (similar to how +microprocessors are "universal IR's", allowing many source languages to +be mapped to them). By providing type information, LLVM can be used as +the target of optimizations: for example, through pointer analysis, it +can be proven that a C automatic variable is never accessed outside of +the current function, allowing it to be promoted to a simple SSA value +instead of a memory location. + +.. _wellformed: + +Well-Formedness +--------------- + +It is important to note that this document describes 'well formed' LLVM +assembly language. There is a difference between what the parser accepts +and what is considered 'well formed'. For example, the following +instruction is syntactically okay, but not well formed: + +.. code-block:: llvm + + %x = add i32 1, %x + +because the definition of ``%x`` does not dominate all of its uses. The +LLVM infrastructure provides a verification pass that may be used to +verify that an LLVM module is well formed. This pass is automatically +run by the parser after parsing input assembly and by the optimizer +before it outputs bitcode. The violations pointed out by the verifier +pass indicate bugs in transformation passes or input to the parser. + +.. _identifiers: + +Identifiers +=========== + +LLVM identifiers come in two basic types: global and local. Global +identifiers (functions, global variables) begin with the ``'@'`` +character. Local identifiers (register names, types) begin with the +``'%'`` character. Additionally, there are three different formats for +identifiers, for different purposes: + +#. Named values are represented as a string of characters with their + prefix. For example, ``%foo``, ``@DivisionByZero``, + ``%a.really.long.identifier``. The actual regular expression used is + '``[%@][a-zA-Z$._][a-zA-Z$._0-9]*``'. Identifiers which require other + characters in their names can be surrounded with quotes. Special + characters may be escaped using ``"\xx"`` where ``xx`` is the ASCII + code for the character in hexadecimal. In this way, any character can + be used in a name value, even quotes themselves. +#. Unnamed values are represented as an unsigned numeric value with + their prefix. For example, ``%12``, ``@2``, ``%44``. +#. Constants, which are described in the section Constants_ below. + +LLVM requires that values start with a prefix for two reasons: Compilers +don't need to worry about name clashes with reserved words, and the set +of reserved words may be expanded in the future without penalty. +Additionally, unnamed identifiers allow a compiler to quickly come up +with a temporary variable without having to avoid symbol table +conflicts. + +Reserved words in LLVM are very similar to reserved words in other +languages. There are keywords for different opcodes ('``add``', +'``bitcast``', '``ret``', etc...), for primitive type names ('``void``', +'``i32``', etc...), and others. These reserved words cannot conflict +with variable names, because none of them start with a prefix character +(``'%'`` or ``'@'``). + +Here is an example of LLVM code to multiply the integer variable +'``%X``' by 8: + +The easy way: + +.. code-block:: llvm + + %result = mul i32 %X, 8 + +After strength reduction: + +.. code-block:: llvm + + %result = shl i32 %X, 3 + +And the hard way: + +.. code-block:: llvm + + %0 = add i32 %X, %X ; yields {i32}:%0 + %1 = add i32 %0, %0 ; yields {i32}:%1 + %result = add i32 %1, %1 + +This last way of multiplying ``%X`` by 8 illustrates several important +lexical features of LLVM: + +#. Comments are delimited with a '``;``' and go until the end of line. +#. Unnamed temporaries are created when the result of a computation is + not assigned to a named value. +#. Unnamed temporaries are numbered sequentially (using a per-function + incrementing counter, starting with 0). Note that basic blocks are + included in this numbering. For example, if the entry basic block is not + given a label name, then it will get number 0. + +It also shows a convention that we follow in this document. When +demonstrating instructions, we will follow an instruction with a comment +that defines the type and name of value produced. + +High Level Structure +==================== + +Module Structure +---------------- + +LLVM programs are composed of ``Module``'s, each of which is a +translation unit of the input programs. Each module consists of +functions, global variables, and symbol table entries. Modules may be +combined together with the LLVM linker, which merges function (and +global variable) definitions, resolves forward declarations, and merges +symbol table entries. Here is an example of the "hello world" module: + +.. code-block:: llvm + + ; Declare the string constant as a global constant. + @.str = private unnamed_addr constant [13 x i8] c"hello world\0A\00" + + ; External declaration of the puts function + declare i32 @puts(i8* nocapture) nounwind + + ; Definition of main function + define i32 @main() { ; i32()* + ; Convert [13 x i8]* to i8 *... + %cast210 = getelementptr [13 x i8]* @.str, i64 0, i64 0 + + ; Call puts function to write out the string to stdout. + call i32 @puts(i8* %cast210) + ret i32 0 + } + + ; Named metadata + !1 = metadata !{i32 42} + !foo = !{!1, null} + +This example is made up of a :ref:`global variable ` named +"``.str``", an external declaration of the "``puts``" function, a +:ref:`function definition ` for "``main``" and +:ref:`named metadata ` "``foo``". + +In general, a module is made up of a list of global values (where both +functions and global variables are global values). Global values are +represented by a pointer to a memory location (in this case, a pointer +to an array of char, and a pointer to a function), and have one of the +following :ref:`linkage types `. + +.. _linkage: + +Linkage Types +------------- + +All Global Variables and Functions have one of the following types of +linkage: + +``private`` + Global values with "``private``" linkage are only directly + accessible by objects in the current module. In particular, linking + code into a module with an private global value may cause the + private to be renamed as necessary to avoid collisions. Because the + symbol is private to the module, all references can be updated. This + doesn't show up in any symbol table in the object file. +``linker_private`` + Similar to ``private``, but the symbol is passed through the + assembler and evaluated by the linker. Unlike normal strong symbols, + they are removed by the linker from the final linked image + (executable or dynamic library). +``linker_private_weak`` + Similar to "``linker_private``", but the symbol is weak. Note that + ``linker_private_weak`` symbols are subject to coalescing by the + linker. The symbols are removed by the linker from the final linked + image (executable or dynamic library). +``internal`` + Similar to private, but the value shows as a local symbol + (``STB_LOCAL`` in the case of ELF) in the object file. This + corresponds to the notion of the '``static``' keyword in C. +``available_externally`` + Globals with "``available_externally``" linkage are never emitted + into the object file corresponding to the LLVM module. They exist to + allow inlining and other optimizations to take place given knowledge + of the definition of the global, which is known to be somewhere + outside the module. Globals with ``available_externally`` linkage + are allowed to be discarded at will, and are otherwise the same as + ``linkonce_odr``. This linkage type is only allowed on definitions, + not declarations. +``linkonce`` + Globals with "``linkonce``" linkage are merged with other globals of + the same name when linkage occurs. This can be used to implement + some forms of inline functions, templates, or other code which must + be generated in each translation unit that uses it, but where the + body may be overridden with a more definitive definition later. + Unreferenced ``linkonce`` globals are allowed to be discarded. Note + that ``linkonce`` linkage does not actually allow the optimizer to + inline the body of this function into callers because it doesn't + know if this definition of the function is the definitive definition + within the program or whether it will be overridden by a stronger + definition. To enable inlining and other optimizations, use + "``linkonce_odr``" linkage. +``weak`` + "``weak``" linkage has the same merging semantics as ``linkonce`` + linkage, except that unreferenced globals with ``weak`` linkage may + not be discarded. This is used for globals that are declared "weak" + in C source code. +``common`` + "``common``" linkage is most similar to "``weak``" linkage, but they + are used for tentative definitions in C, such as "``int X;``" at + global scope. Symbols with "``common``" linkage are merged in the + same way as ``weak symbols``, and they may not be deleted if + unreferenced. ``common`` symbols may not have an explicit section, + must have a zero initializer, and may not be marked + ':ref:`constant `'. Functions and aliases may not have + common linkage. + +.. _linkage_appending: + +``appending`` + "``appending``" linkage may only be applied to global variables of + pointer to array type. When two global variables with appending + linkage are linked together, the two global arrays are appended + together. This is the LLVM, typesafe, equivalent of having the + system linker append together "sections" with identical names when + .o files are linked. +``extern_weak`` + The semantics of this linkage follow the ELF object file model: the + symbol is weak until linked, if not linked, the symbol becomes null + instead of being an undefined reference. +``linkonce_odr``, ``weak_odr`` + Some languages allow differing globals to be merged, such as two + functions with different semantics. Other languages, such as + ``C++``, ensure that only equivalent globals are ever merged (the + "one definition rule" --- "ODR"). Such languages can use the + ``linkonce_odr`` and ``weak_odr`` linkage types to indicate that the + global will only be merged with equivalent globals. These linkage + types are otherwise the same as their non-``odr`` versions. +``external`` + If none of the above identifiers are used, the global is externally + visible, meaning that it participates in linkage and can be used to + resolve external symbol references. + +The next two types of linkage are targeted for Microsoft Windows +platform only. They are designed to support importing (exporting) +symbols from (to) DLLs (Dynamic Link Libraries). + +``dllimport`` + "``dllimport``" linkage causes the compiler to reference a function + or variable via a global pointer to a pointer that is set up by the + DLL exporting the symbol. On Microsoft Windows targets, the pointer + name is formed by combining ``__imp_`` and the function or variable + name. +``dllexport`` + "``dllexport``" linkage causes the compiler to provide a global + pointer to a pointer in a DLL, so that it can be referenced with the + ``dllimport`` attribute. On Microsoft Windows targets, the pointer + name is formed by combining ``__imp_`` and the function or variable + name. + +For example, since the "``.LC0``" variable is defined to be internal, if +another module defined a "``.LC0``" variable and was linked with this +one, one of the two would be renamed, preventing a collision. Since +"``main``" and "``puts``" are external (i.e., lacking any linkage +declarations), they are accessible outside of the current module. + +It is illegal for a function *declaration* to have any linkage type +other than ``external``, ``dllimport`` or ``extern_weak``. + +.. _callingconv: + +Calling Conventions +------------------- + +LLVM :ref:`functions `, :ref:`calls ` and +:ref:`invokes ` can all have an optional calling convention +specified for the call. The calling convention of any pair of dynamic +caller/callee must match, or the behavior of the program is undefined. +The following calling conventions are supported by LLVM, and more may be +added in the future: + +"``ccc``" - The C calling convention + This calling convention (the default if no other calling convention + is specified) matches the target C calling conventions. This calling + convention supports varargs function calls and tolerates some + mismatch in the declared prototype and implemented declaration of + the function (as does normal C). +"``fastcc``" - The fast calling convention + This calling convention attempts to make calls as fast as possible + (e.g. by passing things in registers). This calling convention + allows the target to use whatever tricks it wants to produce fast + code for the target, without having to conform to an externally + specified ABI (Application Binary Interface). `Tail calls can only + be optimized when this, the GHC or the HiPE convention is + used. `_ This calling convention does not + support varargs and requires the prototype of all callees to exactly + match the prototype of the function definition. +"``coldcc``" - The cold calling convention + This calling convention attempts to make code in the caller as + efficient as possible under the assumption that the call is not + commonly executed. As such, these calls often preserve all registers + so that the call does not break any live ranges in the caller side. + This calling convention does not support varargs and requires the + prototype of all callees to exactly match the prototype of the + function definition. +"``cc 10``" - GHC convention + This calling convention has been implemented specifically for use by + the `Glasgow Haskell Compiler (GHC) `_. + It passes everything in registers, going to extremes to achieve this + by disabling callee save registers. This calling convention should + not be used lightly but only for specific situations such as an + alternative to the *register pinning* performance technique often + used when implementing functional programming languages. At the + moment only X86 supports this convention and it has the following + limitations: + + - On *X86-32* only supports up to 4 bit type parameters. No + floating point types are supported. + - On *X86-64* only supports up to 10 bit type parameters and 6 + floating point parameters. + + This calling convention supports `tail call + optimization `_ but requires both the + caller and callee are using it. +"``cc 11``" - The HiPE calling convention + This calling convention has been implemented specifically for use by + the `High-Performance Erlang + (HiPE) `_ compiler, *the* + native code compiler of the `Ericsson's Open Source Erlang/OTP + system `_. It uses more + registers for argument passing than the ordinary C calling + convention and defines no callee-saved registers. The calling + convention properly supports `tail call + optimization `_ but requires that both the + caller and the callee use it. It uses a *register pinning* + mechanism, similar to GHC's convention, for keeping frequently + accessed runtime components pinned to specific hardware registers. + At the moment only X86 supports this convention (both 32 and 64 + bit). +"``cc ``" - Numbered convention + Any calling convention may be specified by number, allowing + target-specific calling conventions to be used. Target specific + calling conventions start at 64. + +More calling conventions can be added/defined on an as-needed basis, to +support Pascal conventions or any other well-known target-independent +convention. + +.. _visibilitystyles: + +Visibility Styles +----------------- + +All Global Variables and Functions have one of the following visibility +styles: + +"``default``" - Default style + On targets that use the ELF object file format, default visibility + means that the declaration is visible to other modules and, in + shared libraries, means that the declared entity may be overridden. + On Darwin, default visibility means that the declaration is visible + to other modules. Default visibility corresponds to "external + linkage" in the language. +"``hidden``" - Hidden style + Two declarations of an object with hidden visibility refer to the + same object if they are in the same shared object. Usually, hidden + visibility indicates that the symbol will not be placed into the + dynamic symbol table, so no other module (executable or shared + library) can reference it directly. +"``protected``" - Protected style + On ELF, protected visibility indicates that the symbol will be + placed in the dynamic symbol table, but that references within the + defining module will bind to the local symbol. That is, the symbol + cannot be overridden by another module. + +.. _namedtypes: + +Named Types +----------- + +LLVM IR allows you to specify name aliases for certain types. This can +make it easier to read the IR and make the IR more condensed +(particularly when recursive types are involved). An example of a name +specification is: + +.. code-block:: llvm + + %mytype = type { %mytype*, i32 } + +You may give a name to any :ref:`type ` except +":ref:`void `". Type name aliases may be used anywhere a type is +expected with the syntax "%mytype". + +Note that type names are aliases for the structural type that they +indicate, and that you can therefore specify multiple names for the same +type. This often leads to confusing behavior when dumping out a .ll +file. Since LLVM IR uses structural typing, the name is not part of the +type. When printing out LLVM IR, the printer will pick *one name* to +render all types of a particular shape. This means that if you have code +where two different source types end up having the same LLVM type, that +the dumper will sometimes print the "wrong" or unexpected type. This is +an important design point and isn't going to change. + +.. _globalvars: + +Global Variables +---------------- + +Global variables define regions of memory allocated at compilation time +instead of run-time. + +Global variables definitions must be initialized, may have an explicit section +to be placed in, and may have an optional explicit alignment specified. + +Global variables in other translation units can also be declared, in which +case they don't have an initializer. + +A variable may be defined as ``thread_local``, which means that it will +not be shared by threads (each thread will have a separated copy of the +variable). Not all targets support thread-local variables. Optionally, a +TLS model may be specified: + +``localdynamic`` + For variables that are only used within the current shared library. +``initialexec`` + For variables in modules that will not be loaded dynamically. +``localexec`` + For variables defined in the executable and only used within it. + +The models correspond to the ELF TLS models; see `ELF Handling For +Thread-Local Storage `_ for +more information on under which circumstances the different models may +be used. The target may choose a different TLS model if the specified +model is not supported, or if a better choice of model can be made. + +A variable may be defined as a global ``constant``, which indicates that +the contents of the variable will **never** be modified (enabling better +optimization, allowing the global data to be placed in the read-only +section of an executable, etc). Note that variables that need runtime +initialization cannot be marked ``constant`` as there is a store to the +variable. + +LLVM explicitly allows *declarations* of global variables to be marked +constant, even if the final definition of the global is not. This +capability can be used to enable slightly better optimization of the +program, but requires the language definition to guarantee that +optimizations based on the 'constantness' are valid for the translation +units that do not include the definition. + +As SSA values, global variables define pointer values that are in scope +(i.e. they dominate) all basic blocks in the program. Global variables +always define a pointer to their "content" type because they describe a +region of memory, and all memory objects in LLVM are accessed through +pointers. + +Global variables can be marked with ``unnamed_addr`` which indicates +that the address is not significant, only the content. Constants marked +like this can be merged with other constants if they have the same +initializer. Note that a constant with significant address *can* be +merged with a ``unnamed_addr`` constant, the result being a constant +whose address is significant. + +A global variable may be declared to reside in a target-specific +numbered address space. For targets that support them, address spaces +may affect how optimizations are performed and/or what target +instructions are used to access the variable. The default address space +is zero. The address space qualifier must precede any other attributes. + +LLVM allows an explicit section to be specified for globals. If the +target supports it, it will emit globals to the section specified. + +By default, global initializers are optimized by assuming that global +variables defined within the module are not modified from their +initial values before the start of the global initializer. This is +true even for variables potentially accessible from outside the +module, including those with external linkage or appearing in +``@llvm.used``. This assumption may be suppressed by marking the +variable with ``externally_initialized``. + +An explicit alignment may be specified for a global, which must be a +power of 2. If not present, or if the alignment is set to zero, the +alignment of the global is set by the target to whatever it feels +convenient. If an explicit alignment is specified, the global is forced +to have exactly that alignment. Targets and optimizers are not allowed +to over-align the global if the global has an assigned section. In this +case, the extra alignment could be observable: for example, code could +assume that the globals are densely packed in their section and try to +iterate over them as an array, alignment padding would break this +iteration. + +For example, the following defines a global in a numbered address space +with an initializer, section, and alignment: + +.. code-block:: llvm + + @G = addrspace(5) constant float 1.0, section "foo", align 4 + +The following example just declares a global variable + +.. code-block:: llvm + + @G = external global i32 + +The following example defines a thread-local global with the +``initialexec`` TLS model: + +.. code-block:: llvm + + @G = thread_local(initialexec) global i32 0, align 4 + +.. _functionstructure: + +Functions +--------- + +LLVM function definitions consist of the "``define``" keyword, an +optional :ref:`linkage type `, an optional :ref:`visibility +style `, an optional :ref:`calling convention `, +an optional ``unnamed_addr`` attribute, a return type, an optional +:ref:`parameter attribute ` for the return type, a function +name, a (possibly empty) argument list (each with optional :ref:`parameter +attributes `), optional :ref:`function attributes `, +an optional section, an optional alignment, an optional :ref:`garbage +collector name `, an optional :ref:`prefix `, an opening +curly brace, a list of basic blocks, and a closing curly brace. + +LLVM function declarations consist of the "``declare``" keyword, an +optional :ref:`linkage type `, an optional :ref:`visibility +style `, an optional :ref:`calling convention `, +an optional ``unnamed_addr`` attribute, a return type, an optional +:ref:`parameter attribute ` for the return type, a function +name, a possibly empty list of arguments, an optional alignment, an optional +:ref:`garbage collector name ` and an optional :ref:`prefix `. + +A function definition contains a list of basic blocks, forming the CFG (Control +Flow Graph) for the function. Each basic block may optionally start with a label +(giving the basic block a symbol table entry), contains a list of instructions, +and ends with a :ref:`terminator ` instruction (such as a branch or +function return). If an explicit label is not provided, a block is assigned an +implicit numbered label, using the next value from the same counter as used for +unnamed temporaries (:ref:`see above`). For example, if a function +entry block does not have an explicit label, it will be assigned label "%0", +then the first unnamed temporary in that block will be "%1", etc. + +The first basic block in a function is special in two ways: it is +immediately executed on entrance to the function, and it is not allowed +to have predecessor basic blocks (i.e. there can not be any branches to +the entry block of a function). Because the block can have no +predecessors, it also cannot have any :ref:`PHI nodes `. + +LLVM allows an explicit section to be specified for functions. If the +target supports it, it will emit functions to the section specified. + +An explicit alignment may be specified for a function. If not present, +or if the alignment is set to zero, the alignment of the function is set +by the target to whatever it feels convenient. If an explicit alignment +is specified, the function is forced to have at least that much +alignment. All alignments must be a power of 2. + +If the ``unnamed_addr`` attribute is given, the address is know to not +be significant and two identical functions can be merged. + +Syntax:: + + define [linkage] [visibility] + [cconv] [ret attrs] + @ ([argument list]) + [fn Attrs] [section "name"] [align N] + [gc] [prefix Constant] { ... } + +.. _langref_aliases: + +Aliases +------- + +Aliases act as "second name" for the aliasee value (which can be either +function, global variable, another alias or bitcast of global value). +Aliases may have an optional :ref:`linkage type `, and an optional +:ref:`visibility style `. + +Syntax:: + + @ = alias [Linkage] [Visibility] @ + +The linkage must be one of ``private``, ``linker_private``, +``linker_private_weak``, ``internal``, ``linkonce``, ``weak``, +``linkonce_odr``, ``weak_odr``, ``external``. Note that some system linkers +might not correctly handle dropping a weak symbol that is aliased by a non weak +alias. + +.. _namedmetadatastructure: + +Named Metadata +-------------- + +Named metadata is a collection of metadata. :ref:`Metadata +nodes ` (but not metadata strings) are the only valid +operands for a named metadata. + +Syntax:: + + ; Some unnamed metadata nodes, which are referenced by the named metadata. + !0 = metadata !{metadata !"zero"} + !1 = metadata !{metadata !"one"} + !2 = metadata !{metadata !"two"} + ; A named metadata. + !name = !{!0, !1, !2} + +.. _paramattrs: + +Parameter Attributes +-------------------- + +The return type and each parameter of a function type may have a set of +*parameter attributes* associated with them. Parameter attributes are +used to communicate additional information about the result or +parameters of a function. Parameter attributes are considered to be part +of the function, not of the function type, so functions with different +parameter attributes can have the same function type. + +Parameter attributes are simple keywords that follow the type specified. +If multiple parameter attributes are needed, they are space separated. +For example: + +.. code-block:: llvm + + declare i32 @printf(i8* noalias nocapture, ...) + declare i32 @atoi(i8 zeroext) + declare signext i8 @returns_signed_char() + +Note that any attributes for the function result (``nounwind``, +``readonly``) come immediately after the argument list. + +Currently, only the following parameter attributes are defined: + +``zeroext`` + This indicates to the code generator that the parameter or return + value should be zero-extended to the extent required by the target's + ABI (which is usually 32-bits, but is 8-bits for a i1 on x86-64) by + the caller (for a parameter) or the callee (for a return value). +``signext`` + This indicates to the code generator that the parameter or return + value should be sign-extended to the extent required by the target's + ABI (which is usually 32-bits) by the caller (for a parameter) or + the callee (for a return value). +``inreg`` + This indicates that this parameter or return value should be treated + in a special target-dependent fashion during while emitting code for + a function call or return (usually, by putting it in a register as + opposed to memory, though some targets use it to distinguish between + two different kinds of registers). Use of this attribute is + target-specific. +``byval`` + This indicates that the pointer parameter should really be passed by + value to the function. The attribute implies that a hidden copy of + the pointee is made between the caller and the callee, so the callee + is unable to modify the value in the caller. This attribute is only + valid on LLVM pointer arguments. It is generally used to pass + structs and arrays by value, but is also valid on pointers to + scalars. The copy is considered to belong to the caller not the + callee (for example, ``readonly`` functions should not write to + ``byval`` parameters). This is not a valid attribute for return + values. + + The byval attribute also supports specifying an alignment with the + align attribute. It indicates the alignment of the stack slot to + form and the known alignment of the pointer specified to the call + site. If the alignment is not specified, then the code generator + makes a target-specific assumption. + +``sret`` + This indicates that the pointer parameter specifies the address of a + structure that is the return value of the function in the source + program. This pointer must be guaranteed by the caller to be valid: + loads and stores to the structure may be assumed by the callee + not to trap and to be properly aligned. This may only be applied to + the first parameter. This is not a valid attribute for return + values. +``noalias`` + This indicates that pointer values :ref:`based ` on + the argument or return value do not alias pointer values which are + not *based* on it, ignoring certain "irrelevant" dependencies. For a + call to the parent function, dependencies between memory references + from before or after the call and from those during the call are + "irrelevant" to the ``noalias`` keyword for the arguments and return + value used in that call. The caller shares the responsibility with + the callee for ensuring that these requirements are met. For further + details, please see the discussion of the NoAlias response in `alias + analysis `_. + + Note that this definition of ``noalias`` is intentionally similar + to the definition of ``restrict`` in C99 for function arguments, + though it is slightly weaker. + + For function return values, C99's ``restrict`` is not meaningful, + while LLVM's ``noalias`` is. +``nocapture`` + This indicates that the callee does not make any copies of the + pointer that outlive the callee itself. This is not a valid + attribute for return values. + +.. _nest: + +``nest`` + This indicates that the pointer parameter can be excised using the + :ref:`trampoline intrinsics `. This is not a valid + attribute for return values and can only be applied to one parameter. + +``returned`` + This indicates that the function always returns the argument as its return + value. This is an optimization hint to the code generator when generating + the caller, allowing tail call optimization and omission of register saves + and restores in some cases; it is not checked or enforced when generating + the callee. The parameter and the function return type must be valid + operands for the :ref:`bitcast instruction `. This is not a + valid attribute for return values and can only be applied to one parameter. + +.. _gc: + +Garbage Collector Names +----------------------- + +Each function may specify a garbage collector name, which is simply a +string: + +.. code-block:: llvm + + define void @f() gc "name" { ... } + +The compiler declares the supported values of *name*. Specifying a +collector which will cause the compiler to alter its output in order to +support the named garbage collection algorithm. + +.. _prefixdata: + +Prefix Data +----------- + +Prefix data is data associated with a function which the code generator +will emit immediately before the function body. The purpose of this feature +is to allow frontends to associate language-specific runtime metadata with +specific functions and make it available through the function pointer while +still allowing the function pointer to be called. To access the data for a +given function, a program may bitcast the function pointer to a pointer to +the constant's type. This implies that the IR symbol points to the start +of the prefix data. + +To maintain the semantics of ordinary function calls, the prefix data must +have a particular format. Specifically, it must begin with a sequence of +bytes which decode to a sequence of machine instructions, valid for the +module's target, which transfer control to the point immediately succeeding +the prefix data, without performing any other visible action. This allows +the inliner and other passes to reason about the semantics of the function +definition without needing to reason about the prefix data. Obviously this +makes the format of the prefix data highly target dependent. + +Prefix data is laid out as if it were an initializer for a global variable +of the prefix data's type. No padding is automatically placed between the +prefix data and the function body. If padding is required, it must be part +of the prefix data. + +A trivial example of valid prefix data for the x86 architecture is ``i8 144``, +which encodes the ``nop`` instruction: + +.. code-block:: llvm + + define void @f() prefix i8 144 { ... } + +Generally prefix data can be formed by encoding a relative branch instruction +which skips the metadata, as in this example of valid prefix data for the +x86_64 architecture, where the first two bytes encode ``jmp .+10``: + +.. code-block:: llvm + + %0 = type <{ i8, i8, i8* }> + + define void @f() prefix %0 <{ i8 235, i8 8, i8* @md}> { ... } + +A function may have prefix data but no body. This has similar semantics +to the ``available_externally`` linkage in that the data may be used by the +optimizers but will not be emitted in the object file. + +.. _attrgrp: + +Attribute Groups +---------------- + +Attribute groups are groups of attributes that are referenced by objects within +the IR. They are important for keeping ``.ll`` files readable, because a lot of +functions will use the same set of attributes. In the degenerative case of a +``.ll`` file that corresponds to a single ``.c`` file, the single attribute +group will capture the important command line flags used to build that file. + +An attribute group is a module-level object. To use an attribute group, an +object references the attribute group's ID (e.g. ``#37``). An object may refer +to more than one attribute group. In that situation, the attributes from the +different groups are merged. + +Here is an example of attribute groups for a function that should always be +inlined, has a stack alignment of 4, and which shouldn't use SSE instructions: + +.. code-block:: llvm + + ; Target-independent attributes: + attributes #0 = { alwaysinline alignstack=4 } + + ; Target-dependent attributes: + attributes #1 = { "no-sse" } + + ; Function @f has attributes: alwaysinline, alignstack=4, and "no-sse". + define void @f() #0 #1 { ... } + +.. _fnattrs: + +Function Attributes +------------------- + +Function attributes are set to communicate additional information about +a function. Function attributes are considered to be part of the +function, not of the function type, so functions with different function +attributes can have the same function type. + +Function attributes are simple keywords that follow the type specified. +If multiple attributes are needed, they are space separated. For +example: + +.. code-block:: llvm + + define void @f() noinline { ... } + define void @f() alwaysinline { ... } + define void @f() alwaysinline optsize { ... } + define void @f() optsize { ... } + +``alignstack()`` + This attribute indicates that, when emitting the prologue and + epilogue, the backend should forcibly align the stack pointer. + Specify the desired alignment, which must be a power of two, in + parentheses. +``alwaysinline`` + This attribute indicates that the inliner should attempt to inline + this function into callers whenever possible, ignoring any active + inlining size threshold for this caller. +``builtin`` + This indicates that the callee function at a call site should be + recognized as a built-in function, even though the function's declaration + uses the ``nobuiltin`` attribute. This is only valid at call sites for + direct calls to functions which are declared with the ``nobuiltin`` + attribute. +``cold`` + This attribute indicates that this function is rarely called. When + computing edge weights, basic blocks post-dominated by a cold + function call are also considered to be cold; and, thus, given low + weight. +``inlinehint`` + This attribute indicates that the source code contained a hint that + inlining this function is desirable (such as the "inline" keyword in + C/C++). It is just a hint; it imposes no requirements on the + inliner. +``minsize`` + This attribute suggests that optimization passes and code generator + passes make choices that keep the code size of this function as small + as possible and perform optimizations that may sacrifice runtime + performance in order to minimize the size of the generated code. +``naked`` + This attribute disables prologue / epilogue emission for the + function. This can have very system-specific consequences. +``nobuiltin`` + This indicates that the callee function at a call site is not recognized as + a built-in function. LLVM will retain the original call and not replace it + with equivalent code based on the semantics of the built-in function, unless + the call site uses the ``builtin`` attribute. This is valid at call sites + and on function declarations and definitions. +``noduplicate`` + This attribute indicates that calls to the function cannot be + duplicated. A call to a ``noduplicate`` function may be moved + within its parent function, but may not be duplicated within + its parent function. + + A function containing a ``noduplicate`` call may still + be an inlining candidate, provided that the call is not + duplicated by inlining. That implies that the function has + internal linkage and only has one call site, so the original + call is dead after inlining. +``noimplicitfloat`` + This attributes disables implicit floating point instructions. +``noinline`` + This attribute indicates that the inliner should never inline this + function in any situation. This attribute may not be used together + with the ``alwaysinline`` attribute. +``nonlazybind`` + This attribute suppresses lazy symbol binding for the function. This + may make calls to the function faster, at the cost of extra program + startup time if the function is not called during program startup. +``noredzone`` + This attribute indicates that the code generator should not use a + red zone, even if the target-specific ABI normally permits it. +``noreturn`` + This function attribute indicates that the function never returns + normally. This produces undefined behavior at runtime if the + function ever does dynamically return. +``nounwind`` + This function attribute indicates that the function never returns + with an unwind or exceptional control flow. If the function does + unwind, its runtime behavior is undefined. +``optnone`` + This function attribute indicates that the function is not optimized + by any optimization or code generator passes with the + exception of interprocedural optimization passes. + This attribute cannot be used together with the ``alwaysinline`` + attribute; this attribute is also incompatible + with the ``minsize`` attribute and the ``optsize`` attribute. + + This attribute requires the ``noinline`` attribute to be specified on + the function as well, so the function is never inlined into any caller. + Only functions with the ``alwaysinline`` attribute are valid + candidates for inlining into the body of this function. +``optsize`` + This attribute suggests that optimization passes and code generator + passes make choices that keep the code size of this function low, + and otherwise do optimizations specifically to reduce code size as + long as they do not significantly impact runtime performance. +``readnone`` + On a function, this attribute indicates that the function computes its + result (or decides to unwind an exception) based strictly on its arguments, + without dereferencing any pointer arguments or otherwise accessing + any mutable state (e.g. memory, control registers, etc) visible to + caller functions. It does not write through any pointer arguments + (including ``byval`` arguments) and never changes any state visible + to callers. This means that it cannot unwind exceptions by calling + the ``C++`` exception throwing methods. + + On an argument, this attribute indicates that the function does not + dereference that pointer argument, even though it may read or write the + memory that the pointer points to if accessed through other pointers. +``readonly`` + On a function, this attribute indicates that the function does not write + through any pointer arguments (including ``byval`` arguments) or otherwise + modify any state (e.g. memory, control registers, etc) visible to + caller functions. It may dereference pointer arguments and read + state that may be set in the caller. A readonly function always + returns the same value (or unwinds an exception identically) when + called with the same set of arguments and global state. It cannot + unwind an exception by calling the ``C++`` exception throwing + methods. + + On an argument, this attribute indicates that the function does not write + through this pointer argument, even though it may write to the memory that + the pointer points to. +``returns_twice`` + This attribute indicates that this function can return twice. The C + ``setjmp`` is an example of such a function. The compiler disables + some optimizations (like tail calls) in the caller of these + functions. +``sanitize_address`` + This attribute indicates that AddressSanitizer checks + (dynamic address safety analysis) are enabled for this function. +``sanitize_memory`` + This attribute indicates that MemorySanitizer checks (dynamic detection + of accesses to uninitialized memory) are enabled for this function. +``sanitize_thread`` + This attribute indicates that ThreadSanitizer checks + (dynamic thread safety analysis) are enabled for this function. +``ssp`` + This attribute indicates that the function should emit a stack + smashing protector. It is in the form of a "canary" --- a random value + placed on the stack before the local variables that's checked upon + return from the function to see if it has been overwritten. A + heuristic is used to determine if a function needs stack protectors + or not. The heuristic used will enable protectors for functions with: + + - Character arrays larger than ``ssp-buffer-size`` (default 8). + - Aggregates containing character arrays larger than ``ssp-buffer-size``. + - Calls to alloca() with variable sizes or constant sizes greater than + ``ssp-buffer-size``. + + If a function that has an ``ssp`` attribute is inlined into a + function that doesn't have an ``ssp`` attribute, then the resulting + function will have an ``ssp`` attribute. +``sspreq`` + This attribute indicates that the function should *always* emit a + stack smashing protector. This overrides the ``ssp`` function + attribute. + + If a function that has an ``sspreq`` attribute is inlined into a + function that doesn't have an ``sspreq`` attribute or which has an + ``ssp`` or ``sspstrong`` attribute, then the resulting function will have + an ``sspreq`` attribute. +``sspstrong`` + This attribute indicates that the function should emit a stack smashing + protector. This attribute causes a strong heuristic to be used when + determining if a function needs stack protectors. The strong heuristic + will enable protectors for functions with: + + - Arrays of any size and type + - Aggregates containing an array of any size and type. + - Calls to alloca(). + - Local variables that have had their address taken. + + This overrides the ``ssp`` function attribute. + + If a function that has an ``sspstrong`` attribute is inlined into a + function that doesn't have an ``sspstrong`` attribute, then the + resulting function will have an ``sspstrong`` attribute. +``uwtable`` + This attribute indicates that the ABI being targeted requires that + an unwind table entry be produce for this function even if we can + show that no exceptions passes by it. This is normally the case for + the ELF x86-64 abi, but it can be disabled for some compilation + units. + +.. _moduleasm: + +Module-Level Inline Assembly +---------------------------- + +Modules may contain "module-level inline asm" blocks, which corresponds +to the GCC "file scope inline asm" blocks. These blocks are internally +concatenated by LLVM and treated as a single unit, but may be separated +in the ``.ll`` file if desired. The syntax is very simple: + +.. code-block:: llvm + + module asm "inline asm code goes here" + module asm "more can go here" + +The strings can contain any character by escaping non-printable +characters. The escape sequence used is simply "\\xx" where "xx" is the +two digit hex code for the number. + +The inline asm code is simply printed to the machine code .s file when +assembly code is generated. + +.. _langref_datalayout: + +Data Layout +----------- + +A module may specify a target specific data layout string that specifies +how data is to be laid out in memory. The syntax for the data layout is +simply: + +.. code-block:: llvm + + target datalayout = "layout specification" + +The *layout specification* consists of a list of specifications +separated by the minus sign character ('-'). Each specification starts +with a letter and may include other information after the letter to +define some aspect of the data layout. The specifications accepted are +as follows: + +``E`` + Specifies that the target lays out data in big-endian form. That is, + the bits with the most significance have the lowest address + location. +``e`` + Specifies that the target lays out data in little-endian form. That + is, the bits with the least significance have the lowest address + location. +``S`` + Specifies the natural alignment of the stack in bits. Alignment + promotion of stack variables is limited to the natural stack + alignment to avoid dynamic stack realignment. The stack alignment + must be a multiple of 8-bits. If omitted, the natural stack + alignment defaults to "unspecified", which does not prevent any + alignment promotions. +``p[n]:::`` + This specifies the *size* of a pointer and its ```` and + ````\erred alignments for address space ``n``. All sizes are in + bits. Specifying the ```` alignment is optional. If omitted, the + preceding ``:`` should be omitted too. The address space, ``n`` is + optional, and if not specified, denotes the default address space 0. + The value of ``n`` must be in the range [1,2^23). +``i::`` + This specifies the alignment for an integer type of a given bit + ````. The value of ```` must be in the range [1,2^23). +``v::`` + This specifies the alignment for a vector type of a given bit + ````. +``f::`` + This specifies the alignment for a floating point type of a given bit + ````. Only values of ```` that are supported by the target + will work. 32 (float) and 64 (double) are supported on all targets; 80 + or 128 (different flavors of long double) are also supported on some + targets. +``a::`` + This specifies the alignment for an aggregate type of a given bit + ````. +``s::`` + This specifies the alignment for a stack object of a given bit + ````. +``n::...`` + This specifies a set of native integer widths for the target CPU in + bits. For example, it might contain ``n32`` for 32-bit PowerPC, + ``n32:64`` for PowerPC 64, or ``n8:16:32:64`` for X86-64. Elements of + this set are considered to support most general arithmetic operations + efficiently. + +When constructing the data layout for a given target, LLVM starts with a +default set of specifications which are then (possibly) overridden by +the specifications in the ``datalayout`` keyword. The default +specifications are given in this list: + +- ``E`` - big endian +- ``p:64:64:64`` - 64-bit pointers with 64-bit alignment. +- ``p[n]:64:64:64`` - Other address spaces are assumed to be the + same as the default address space. +- ``S0`` - natural stack alignment is unspecified +- ``i1:8:8`` - i1 is 8-bit (byte) aligned +- ``i8:8:8`` - i8 is 8-bit (byte) aligned +- ``i16:16:16`` - i16 is 16-bit aligned +- ``i32:32:32`` - i32 is 32-bit aligned +- ``i64:32:64`` - i64 has ABI alignment of 32-bits but preferred + alignment of 64-bits +- ``f16:16:16`` - half is 16-bit aligned +- ``f32:32:32`` - float is 32-bit aligned +- ``f64:64:64`` - double is 64-bit aligned +- ``f128:128:128`` - quad is 128-bit aligned +- ``v64:64:64`` - 64-bit vector is 64-bit aligned +- ``v128:128:128`` - 128-bit vector is 128-bit aligned +- ``a0:0:64`` - aggregates are 64-bit aligned + +When LLVM is determining the alignment for a given type, it uses the +following rules: + +#. If the type sought is an exact match for one of the specifications, + that specification is used. +#. If no match is found, and the type sought is an integer type, then + the smallest integer type that is larger than the bitwidth of the + sought type is used. If none of the specifications are larger than + the bitwidth then the largest integer type is used. For example, + given the default specifications above, the i7 type will use the + alignment of i8 (next largest) while both i65 and i256 will use the + alignment of i64 (largest specified). +#. If no match is found, and the type sought is a vector type, then the + largest vector type that is smaller than the sought vector type will + be used as a fall back. This happens because <128 x double> can be + implemented in terms of 64 <2 x double>, for example. + +The function of the data layout string may not be what you expect. +Notably, this is not a specification from the frontend of what alignment +the code generator should use. + +Instead, if specified, the target data layout is required to match what +the ultimate *code generator* expects. This string is used by the +mid-level optimizers to improve code, and this only works if it matches +what the ultimate code generator uses. If you would like to generate IR +that does not embed this target-specific detail into the IR, then you +don't have to specify the string. This will disable some optimizations +that require precise layout information, but this also prevents those +optimizations from introducing target specificity into the IR. + +.. _langref_triple: + +Target Triple +------------- + +A module may specify a target triple string that describes the target +host. The syntax for the target triple is simply: + +.. code-block:: llvm + + target triple = "x86_64-apple-macosx10.7.0" + +The *target triple* string consists of a series of identifiers delimited +by the minus sign character ('-'). The canonical forms are: + +:: + + ARCHITECTURE-VENDOR-OPERATING_SYSTEM + ARCHITECTURE-VENDOR-OPERATING_SYSTEM-ENVIRONMENT + +This information is passed along to the backend so that it generates +code for the proper architecture. It's possible to override this on the +command line with the ``-mtriple`` command line option. + +.. _pointeraliasing: + +Pointer Aliasing Rules +---------------------- + +Any memory access must be done through a pointer value associated with +an address range of the memory access, otherwise the behavior is +undefined. Pointer values are associated with address ranges according +to the following rules: + +- A pointer value is associated with the addresses associated with any + value it is *based* on. +- An address of a global variable is associated with the address range + of the variable's storage. +- The result value of an allocation instruction is associated with the + address range of the allocated storage. +- A null pointer in the default address-space is associated with no + address. +- An integer constant other than zero or a pointer value returned from + a function not defined within LLVM may be associated with address + ranges allocated through mechanisms other than those provided by + LLVM. Such ranges shall not overlap with any ranges of addresses + allocated by mechanisms provided by LLVM. + +A pointer value is *based* on another pointer value according to the +following rules: + +- A pointer value formed from a ``getelementptr`` operation is *based* + on the first operand of the ``getelementptr``. +- The result value of a ``bitcast`` is *based* on the operand of the + ``bitcast``. +- A pointer value formed by an ``inttoptr`` is *based* on all pointer + values that contribute (directly or indirectly) to the computation of + the pointer's value. +- The "*based* on" relationship is transitive. + +Note that this definition of *"based"* is intentionally similar to the +definition of *"based"* in C99, though it is slightly weaker. + +LLVM IR does not associate types with memory. The result type of a +``load`` merely indicates the size and alignment of the memory from +which to load, as well as the interpretation of the value. The first +operand type of a ``store`` similarly only indicates the size and +alignment of the store. + +Consequently, type-based alias analysis, aka TBAA, aka +``-fstrict-aliasing``, is not applicable to general unadorned LLVM IR. +:ref:`Metadata ` may be used to encode additional information +which specialized optimization passes may use to implement type-based +alias analysis. + +.. _volatile: + +Volatile Memory Accesses +------------------------ + +Certain memory accesses, such as :ref:`load `'s, +:ref:`store `'s, and :ref:`llvm.memcpy `'s may be +marked ``volatile``. The optimizers must not change the number of +volatile operations or change their order of execution relative to other +volatile operations. The optimizers *may* change the order of volatile +operations relative to non-volatile operations. This is not Java's +"volatile" and has no cross-thread synchronization behavior. + +IR-level volatile loads and stores cannot safely be optimized into +llvm.memcpy or llvm.memmove intrinsics even when those intrinsics are +flagged volatile. Likewise, the backend should never split or merge +target-legal volatile load/store instructions. + +.. admonition:: Rationale + + Platforms may rely on volatile loads and stores of natively supported + data width to be executed as single instruction. For example, in C + this holds for an l-value of volatile primitive type with native + hardware support, but not necessarily for aggregate types. The + frontend upholds these expectations, which are intentionally + unspecified in the IR. The rules above ensure that IR transformation + do not violate the frontend's contract with the language. + +.. _memmodel: + +Memory Model for Concurrent Operations +-------------------------------------- + +The LLVM IR does not define any way to start parallel threads of +execution or to register signal handlers. Nonetheless, there are +platform-specific ways to create them, and we define LLVM IR's behavior +in their presence. This model is inspired by the C++0x memory model. + +For a more informal introduction to this model, see the :doc:`Atomics`. + +We define a *happens-before* partial order as the least partial order +that + +- Is a superset of single-thread program order, and +- When a *synchronizes-with* ``b``, includes an edge from ``a`` to + ``b``. *Synchronizes-with* pairs are introduced by platform-specific + techniques, like pthread locks, thread creation, thread joining, + etc., and by atomic instructions. (See also :ref:`Atomic Memory Ordering + Constraints `). + +Note that program order does not introduce *happens-before* edges +between a thread and signals executing inside that thread. + +Every (defined) read operation (load instructions, memcpy, atomic +loads/read-modify-writes, etc.) R reads a series of bytes written by +(defined) write operations (store instructions, atomic +stores/read-modify-writes, memcpy, etc.). For the purposes of this +section, initialized globals are considered to have a write of the +initializer which is atomic and happens before any other read or write +of the memory in question. For each byte of a read R, R\ :sub:`byte` +may see any write to the same byte, except: + +- If write\ :sub:`1` happens before write\ :sub:`2`, and + write\ :sub:`2` happens before R\ :sub:`byte`, then + R\ :sub:`byte` does not see write\ :sub:`1`. +- If R\ :sub:`byte` happens before write\ :sub:`3`, then + R\ :sub:`byte` does not see write\ :sub:`3`. + +Given that definition, R\ :sub:`byte` is defined as follows: + +- If R is volatile, the result is target-dependent. (Volatile is + supposed to give guarantees which can support ``sig_atomic_t`` in + C/C++, and may be used for accesses to addresses which do not behave + like normal memory. It does not generally provide cross-thread + synchronization.) +- Otherwise, if there is no write to the same byte that happens before + R\ :sub:`byte`, R\ :sub:`byte` returns ``undef`` for that byte. +- Otherwise, if R\ :sub:`byte` may see exactly one write, + R\ :sub:`byte` returns the value written by that write. +- Otherwise, if R is atomic, and all the writes R\ :sub:`byte` may + see are atomic, it chooses one of the values written. See the :ref:`Atomic + Memory Ordering Constraints ` section for additional + constraints on how the choice is made. +- Otherwise R\ :sub:`byte` returns ``undef``. + +R returns the value composed of the series of bytes it read. This +implies that some bytes within the value may be ``undef`` **without** +the entire value being ``undef``. Note that this only defines the +semantics of the operation; it doesn't mean that targets will emit more +than one instruction to read the series of bytes. + +Note that in cases where none of the atomic intrinsics are used, this +model places only one restriction on IR transformations on top of what +is required for single-threaded execution: introducing a store to a byte +which might not otherwise be stored is not allowed in general. +(Specifically, in the case where another thread might write to and read +from an address, introducing a store can change a load that may see +exactly one write into a load that may see multiple writes.) + +.. _ordering: + +Atomic Memory Ordering Constraints +---------------------------------- + +Atomic instructions (:ref:`cmpxchg `, +:ref:`atomicrmw `, :ref:`fence `, +:ref:`atomic load `, and :ref:`atomic store `) take +an ordering parameter that determines which other atomic instructions on +the same address they *synchronize with*. These semantics are borrowed +from Java and C++0x, but are somewhat more colloquial. If these +descriptions aren't precise enough, check those specs (see spec +references in the :doc:`atomics guide `). +:ref:`fence ` instructions treat these orderings somewhat +differently since they don't take an address. See that instruction's +documentation for details. + +For a simpler introduction to the ordering constraints, see the +:doc:`Atomics`. + +``unordered`` + The set of values that can be read is governed by the happens-before + partial order. A value cannot be read unless some operation wrote + it. This is intended to provide a guarantee strong enough to model + Java's non-volatile shared variables. This ordering cannot be + specified for read-modify-write operations; it is not strong enough + to make them atomic in any interesting way. +``monotonic`` + In addition to the guarantees of ``unordered``, there is a single + total order for modifications by ``monotonic`` operations on each + address. All modification orders must be compatible with the + happens-before order. There is no guarantee that the modification + orders can be combined to a global total order for the whole program + (and this often will not be possible). The read in an atomic + read-modify-write operation (:ref:`cmpxchg ` and + :ref:`atomicrmw `) reads the value in the modification + order immediately before the value it writes. If one atomic read + happens before another atomic read of the same address, the later + read must see the same value or a later value in the address's + modification order. This disallows reordering of ``monotonic`` (or + stronger) operations on the same address. If an address is written + ``monotonic``-ally by one thread, and other threads ``monotonic``-ally + read that address repeatedly, the other threads must eventually see + the write. This corresponds to the C++0x/C1x + ``memory_order_relaxed``. +``acquire`` + In addition to the guarantees of ``monotonic``, a + *synchronizes-with* edge may be formed with a ``release`` operation. + This is intended to model C++'s ``memory_order_acquire``. +``release`` + In addition to the guarantees of ``monotonic``, if this operation + writes a value which is subsequently read by an ``acquire`` + operation, it *synchronizes-with* that operation. (This isn't a + complete description; see the C++0x definition of a release + sequence.) This corresponds to the C++0x/C1x + ``memory_order_release``. +``acq_rel`` (acquire+release) + Acts as both an ``acquire`` and ``release`` operation on its + address. This corresponds to the C++0x/C1x ``memory_order_acq_rel``. +``seq_cst`` (sequentially consistent) + In addition to the guarantees of ``acq_rel`` (``acquire`` for an + operation which only reads, ``release`` for an operation which only + writes), there is a global total order on all + sequentially-consistent operations on all addresses, which is + consistent with the *happens-before* partial order and with the + modification orders of all the affected addresses. Each + sequentially-consistent read sees the last preceding write to the + same address in this global order. This corresponds to the C++0x/C1x + ``memory_order_seq_cst`` and Java volatile. + +.. _singlethread: + +If an atomic operation is marked ``singlethread``, it only *synchronizes +with* or participates in modification and seq\_cst total orderings with +other operations running in the same thread (for example, in signal +handlers). + +.. _fastmath: + +Fast-Math Flags +--------------- + +LLVM IR floating-point binary ops (:ref:`fadd `, +:ref:`fsub `, :ref:`fmul `, :ref:`fdiv `, +:ref:`frem `) have the following flags that can set to enable +otherwise unsafe floating point operations + +``nnan`` + No NaNs - Allow optimizations to assume the arguments and result are not + NaN. Such optimizations are required to retain defined behavior over + NaNs, but the value of the result is undefined. + +``ninf`` + No Infs - Allow optimizations to assume the arguments and result are not + +/-Inf. Such optimizations are required to retain defined behavior over + +/-Inf, but the value of the result is undefined. + +``nsz`` + No Signed Zeros - Allow optimizations to treat the sign of a zero + argument or result as insignificant. + +``arcp`` + Allow Reciprocal - Allow optimizations to use the reciprocal of an + argument rather than perform division. + +``fast`` + Fast - Allow algebraically equivalent transformations that may + dramatically change results in floating point (e.g. reassociate). This + flag implies all the others. + +.. _typesystem: + +Type System +=========== + +The LLVM type system is one of the most important features of the +intermediate representation. Being typed enables a number of +optimizations to be performed on the intermediate representation +directly, without having to do extra analyses on the side before the +transformation. A strong type system makes it easier to read the +generated code and enables novel analyses and transformations that are +not feasible to perform on normal three address code representations. + +.. _typeclassifications: + +Type Classifications +-------------------- + +The types fall into a few useful classifications: + + +.. list-table:: + :header-rows: 1 + + * - Classification + - Types + + * - :ref:`integer ` + - ``i1``, ``i2``, ``i3``, ... ``i8``, ... ``i16``, ... ``i32``, ... + ``i64``, ... + + * - :ref:`floating point ` + - ``half``, ``float``, ``double``, ``x86_fp80``, ``fp128``, + ``ppc_fp128`` + + + * - first class + + .. _t_firstclass: + + - :ref:`integer `, :ref:`floating point `, + :ref:`pointer `, :ref:`vector `, + :ref:`structure `, :ref:`array `, + :ref:`label `, :ref:`metadata `. + + * - :ref:`primitive ` + - :ref:`label `, + :ref:`void `, + :ref:`integer `, + :ref:`floating point `, + :ref:`x86mmx `, + :ref:`metadata `. + + * - :ref:`derived ` + - :ref:`array `, + :ref:`function `, + :ref:`pointer `, + :ref:`structure `, + :ref:`vector `, + :ref:`opaque `. + +The :ref:`first class ` types are perhaps the most important. +Values of these types are the only ones which can be produced by +instructions. + +.. _t_primitive: + +Primitive Types +--------------- + +The primitive types are the fundamental building blocks of the LLVM +system. + +.. _t_integer: + +Integer Type +^^^^^^^^^^^^ + +Overview: +""""""""" + +The integer type is a very simple type that simply specifies an +arbitrary bit width for the integer type desired. Any bit width from 1 +bit to 2\ :sup:`23`\ -1 (about 8 million) can be specified. + +Syntax: +""""""" + +:: + + iN + +The number of bits the integer will occupy is specified by the ``N`` +value. + +Examples: +""""""""" + ++----------------+------------------------------------------------+ +| ``i1`` | a single-bit integer. | ++----------------+------------------------------------------------+ +| ``i32`` | a 32-bit integer. | ++----------------+------------------------------------------------+ +| ``i1942652`` | a really big integer of over 1 million bits. | ++----------------+------------------------------------------------+ + +.. _t_floating: + +Floating Point Types +^^^^^^^^^^^^^^^^^^^^ + +.. list-table:: + :header-rows: 1 + + * - Type + - Description + + * - ``half`` + - 16-bit floating point value + + * - ``float`` + - 32-bit floating point value + + * - ``double`` + - 64-bit floating point value + + * - ``fp128`` + - 128-bit floating point value (112-bit mantissa) + + * - ``x86_fp80`` + - 80-bit floating point value (X87) + + * - ``ppc_fp128`` + - 128-bit floating point value (two 64-bits) + +.. _t_x86mmx: + +X86mmx Type +^^^^^^^^^^^ + +Overview: +""""""""" + +The x86mmx type represents a value held in an MMX register on an x86 +machine. The operations allowed on it are quite limited: parameters and +return values, load and store, and bitcast. User-specified MMX +instructions are represented as intrinsic or asm calls with arguments +and/or results of this type. There are no arrays, vectors or constants +of this type. + +Syntax: +""""""" + +:: + + x86mmx + +.. _t_void: + +Void Type +^^^^^^^^^ + +Overview: +""""""""" + +The void type does not represent any value and has no size. + +Syntax: +""""""" + +:: + + void + +.. _t_label: + +Label Type +^^^^^^^^^^ + +Overview: +""""""""" + +The label type represents code labels. + +Syntax: +""""""" + +:: + + label + +.. _t_metadata: + +Metadata Type +^^^^^^^^^^^^^ + +Overview: +""""""""" + +The metadata type represents embedded metadata. No derived types may be +created from metadata except for :ref:`function ` arguments. + +Syntax: +""""""" + +:: + + metadata + +.. _t_derived: + +Derived Types +------------- + +The real power in LLVM comes from the derived types in the system. This +is what allows a programmer to represent arrays, functions, pointers, +and other useful types. Each of these types contain one or more element +types which may be a primitive type, or another derived type. For +example, it is possible to have a two dimensional array, using an array +as the element type of another array. + +.. _t_aggregate: + +Aggregate Types +^^^^^^^^^^^^^^^ + +Aggregate Types are a subset of derived types that can contain multiple +member types. :ref:`Arrays ` and :ref:`structs ` are +aggregate types. :ref:`Vectors ` are not considered to be +aggregate types. + +.. _t_array: + +Array Type +^^^^^^^^^^ + +Overview: +""""""""" + +The array type is a very simple derived type that arranges elements +sequentially in memory. The array type requires a size (number of +elements) and an underlying data type. + +Syntax: +""""""" + +:: + + [<# elements> x ] + +The number of elements is a constant integer value; ``elementtype`` may +be any type with a size. + +Examples: +""""""""" + ++------------------+--------------------------------------+ +| ``[40 x i32]`` | Array of 40 32-bit integer values. | ++------------------+--------------------------------------+ +| ``[41 x i32]`` | Array of 41 32-bit integer values. | ++------------------+--------------------------------------+ +| ``[4 x i8]`` | Array of 4 8-bit integer values. | ++------------------+--------------------------------------+ + +Here are some examples of multidimensional arrays: + ++-----------------------------+----------------------------------------------------------+ +| ``[3 x [4 x i32]]`` | 3x4 array of 32-bit integer values. | ++-----------------------------+----------------------------------------------------------+ +| ``[12 x [10 x float]]`` | 12x10 array of single precision floating point values. | ++-----------------------------+----------------------------------------------------------+ +| ``[2 x [3 x [4 x i16]]]`` | 2x3x4 array of 16-bit integer values. | ++-----------------------------+----------------------------------------------------------+ + +There is no restriction on indexing beyond the end of the array implied +by a static type (though there are restrictions on indexing beyond the +bounds of an allocated object in some cases). This means that +single-dimension 'variable sized array' addressing can be implemented in +LLVM with a zero length array type. An implementation of 'pascal style +arrays' in LLVM could use the type "``{ i32, [0 x float]}``", for +example. + +.. _t_function: + +Function Type +^^^^^^^^^^^^^ + +Overview: +""""""""" + +The function type can be thought of as a function signature. It consists of a +return type and a list of formal parameter types. The return type of a function +type is a void type or first class type --- except for :ref:`label ` +and :ref:`metadata ` types. + +Syntax: +""""""" + +:: + + () + +...where '````' is a comma-separated list of type +specifiers. Optionally, the parameter list may include a type ``...``, which +indicates that the function takes a variable number of arguments. Variable +argument functions can access their arguments with the :ref:`variable argument +handling intrinsic ` functions. '````' is any type +except :ref:`label ` and :ref:`metadata `. + +Examples: +""""""""" + ++---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ``i32 (i32)`` | function taking an ``i32``, returning an ``i32`` | ++---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ``float (i16, i32 *) *`` | :ref:`Pointer ` to a function that takes an ``i16`` and a :ref:`pointer ` to ``i32``, returning ``float``. | ++---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ``i32 (i8*, ...)`` | A vararg function that takes at least one :ref:`pointer ` to ``i8`` (char in C), which returns an integer. This is the signature for ``printf`` in LLVM. | ++---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ``{i32, i32} (i32)`` | A function taking an ``i32``, returning a :ref:`structure ` containing two ``i32`` values | ++---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _t_struct: + +Structure Type +^^^^^^^^^^^^^^ + +Overview: +""""""""" + +The structure type is used to represent a collection of data members +together in memory. The elements of a structure may be any type that has +a size. + +Structures in memory are accessed using '``load``' and '``store``' by +getting a pointer to a field with the '``getelementptr``' instruction. +Structures in registers are accessed using the '``extractvalue``' and +'``insertvalue``' instructions. + +Structures may optionally be "packed" structures, which indicate that +the alignment of the struct is one byte, and that there is no padding +between the elements. In non-packed structs, padding between field types +is inserted as defined by the DataLayout string in the module, which is +required to match what the underlying code generator expects. + +Structures can either be "literal" or "identified". A literal structure +is defined inline with other types (e.g. ``{i32, i32}*``) whereas +identified types are always defined at the top level with a name. +Literal types are uniqued by their contents and can never be recursive +or opaque since there is no way to write one. Identified types can be +recursive, can be opaqued, and are never uniqued. + +Syntax: +""""""" + +:: + + %T1 = type { } ; Identified normal struct type + %T2 = type <{ }> ; Identified packed struct type + +Examples: +""""""""" + ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ``{ i32, i32, i32 }`` | A triple of three ``i32`` values | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ``{ float, i32 (i32) * }`` | A pair, where the first element is a ``float`` and the second element is a :ref:`pointer ` to a :ref:`function ` that takes an ``i32``, returning an ``i32``. | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ``<{ i8, i32 }>`` | A packed struct known to be 5 bytes in size. | ++------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _t_opaque: + +Opaque Structure Types +^^^^^^^^^^^^^^^^^^^^^^ + +Overview: +""""""""" + +Opaque structure types are used to represent named structure types that +do not have a body specified. This corresponds (for example) to the C +notion of a forward declared structure. + +Syntax: +""""""" + +:: + + %X = type opaque + %52 = type opaque + +Examples: +""""""""" + ++--------------+-------------------+ +| ``opaque`` | An opaque type. | ++--------------+-------------------+ + +.. _t_pointer: + +Pointer Type +^^^^^^^^^^^^ + +Overview: +""""""""" + +The pointer type is used to specify memory locations. Pointers are +commonly used to reference objects in memory. + +Pointer types may have an optional address space attribute defining the +numbered address space where the pointed-to object resides. The default +address space is number zero. The semantics of non-zero address spaces +are target-specific. + +Note that LLVM does not permit pointers to void (``void*``) nor does it +permit pointers to labels (``label*``). Use ``i8*`` instead. + +Syntax: +""""""" + +:: + + * + +Examples: +""""""""" + ++-------------------------+--------------------------------------------------------------------------------------------------------------+ +| ``[4 x i32]*`` | A :ref:`pointer ` to :ref:`array ` of four ``i32`` values. | ++-------------------------+--------------------------------------------------------------------------------------------------------------+ +| ``i32 (i32*) *`` | A :ref:`pointer ` to a :ref:`function ` that takes an ``i32*``, returning an ``i32``. | ++-------------------------+--------------------------------------------------------------------------------------------------------------+ +| ``i32 addrspace(5)*`` | A :ref:`pointer ` to an ``i32`` value that resides in address space #5. | ++-------------------------+--------------------------------------------------------------------------------------------------------------+ + +.. _t_vector: + +Vector Type +^^^^^^^^^^^ + +Overview: +""""""""" + +A vector type is a simple derived type that represents a vector of +elements. Vector types are used when multiple primitive data are +operated in parallel using a single instruction (SIMD). A vector type +requires a size (number of elements) and an underlying primitive data +type. Vector types are considered :ref:`first class `. + +Syntax: +""""""" + +:: + + < <# elements> x > + +The number of elements is a constant integer value larger than 0; +elementtype may be any integer or floating point type, or a pointer to +these types. Vectors of size zero are not allowed. + +Examples: +""""""""" + ++-------------------+--------------------------------------------------+ +| ``<4 x i32>`` | Vector of 4 32-bit integer values. | ++-------------------+--------------------------------------------------+ +| ``<8 x float>`` | Vector of 8 32-bit floating-point values. | ++-------------------+--------------------------------------------------+ +| ``<2 x i64>`` | Vector of 2 64-bit integer values. | ++-------------------+--------------------------------------------------+ +| ``<4 x i64*>`` | Vector of 4 pointers to 64-bit integer values. | ++-------------------+--------------------------------------------------+ + +Constants +========= + +LLVM has several different basic types of constants. This section +describes them all and their syntax. + +Simple Constants +---------------- + +**Boolean constants** + The two strings '``true``' and '``false``' are both valid constants + of the ``i1`` type. +**Integer constants** + Standard integers (such as '4') are constants of the + :ref:`integer ` type. Negative numbers may be used with + integer types. +**Floating point constants** + Floating point constants use standard decimal notation (e.g. + 123.421), exponential notation (e.g. 1.23421e+2), or a more precise + hexadecimal notation (see below). The assembler requires the exact + decimal value of a floating-point constant. For example, the + assembler accepts 1.25 but rejects 1.3 because 1.3 is a repeating + decimal in binary. Floating point constants must have a :ref:`floating + point ` type. +**Null pointer constants** + The identifier '``null``' is recognized as a null pointer constant + and must be of :ref:`pointer type `. + +The one non-intuitive notation for constants is the hexadecimal form of +floating point constants. For example, the form +'``double 0x432ff973cafa8000``' is equivalent to (but harder to read +than) '``double 4.5e+15``'. The only time hexadecimal floating point +constants are required (and the only time that they are generated by the +disassembler) is when a floating point constant must be emitted but it +cannot be represented as a decimal floating point number in a reasonable +number of digits. For example, NaN's, infinities, and other special +values are represented in their IEEE hexadecimal format so that assembly +and disassembly do not cause any bits to change in the constants. + +When using the hexadecimal form, constants of types half, float, and +double are represented using the 16-digit form shown above (which +matches the IEEE754 representation for double); half and float values +must, however, be exactly representable as IEEE 754 half and single +precision, respectively. Hexadecimal format is always used for long +double, and there are three forms of long double. The 80-bit format used +by x86 is represented as ``0xK`` followed by 20 hexadecimal digits. The +128-bit format used by PowerPC (two adjacent doubles) is represented by +``0xM`` followed by 32 hexadecimal digits. The IEEE 128-bit format is +represented by ``0xL`` followed by 32 hexadecimal digits. Long doubles +will only work if they match the long double format on your target. +The IEEE 16-bit format (half precision) is represented by ``0xH`` +followed by 4 hexadecimal digits. All hexadecimal formats are big-endian +(sign bit at the left). + +There are no constants of type x86mmx. + +.. _complexconstants: + +Complex Constants +----------------- + +Complex constants are a (potentially recursive) combination of simple +constants and smaller complex constants. + +**Structure constants** + Structure constants are represented with notation similar to + structure type definitions (a comma separated list of elements, + surrounded by braces (``{}``)). For example: + "``{ i32 4, float 17.0, i32* @G }``", where "``@G``" is declared as + "``@G = external global i32``". Structure constants must have + :ref:`structure type `, and the number and types of elements + must match those specified by the type. +**Array constants** + Array constants are represented with notation similar to array type + definitions (a comma separated list of elements, surrounded by + square brackets (``[]``)). For example: + "``[ i32 42, i32 11, i32 74 ]``". Array constants must have + :ref:`array type `, and the number and types of elements must + match those specified by the type. +**Vector constants** + Vector constants are represented with notation similar to vector + type definitions (a comma separated list of elements, surrounded by + less-than/greater-than's (``<>``)). For example: + "``< i32 42, i32 11, i32 74, i32 100 >``". Vector constants + must have :ref:`vector type `, and the number and types of + elements must match those specified by the type. +**Zero initialization** + The string '``zeroinitializer``' can be used to zero initialize a + value to zero of *any* type, including scalar and + :ref:`aggregate ` types. This is often used to avoid + having to print large zero initializers (e.g. for large arrays) and + is always exactly equivalent to using explicit zero initializers. +**Metadata node** + A metadata node is a structure-like constant with :ref:`metadata + type `. For example: + "``metadata !{ i32 0, metadata !"test" }``". Unlike other + constants that are meant to be interpreted as part of the + instruction stream, metadata is a place to attach additional + information such as debug info. + +Global Variable and Function Addresses +-------------------------------------- + +The addresses of :ref:`global variables ` and +:ref:`functions ` are always implicitly valid +(link-time) constants. These constants are explicitly referenced when +the :ref:`identifier for the global ` is used and always have +:ref:`pointer ` type. For example, the following is a legal LLVM +file: + +.. code-block:: llvm + + @X = global i32 17 + @Y = global i32 42 + @Z = global [2 x i32*] [ i32* @X, i32* @Y ] + +.. _undefvalues: + +Undefined Values +---------------- + +The string '``undef``' can be used anywhere a constant is expected, and +indicates that the user of the value may receive an unspecified +bit-pattern. Undefined values may be of any type (other than '``label``' +or '``void``') and be used anywhere a constant is permitted. + +Undefined values are useful because they indicate to the compiler that +the program is well defined no matter what value is used. This gives the +compiler more freedom to optimize. Here are some examples of +(potentially surprising) transformations that are valid (in pseudo IR): + +.. code-block:: llvm + + %A = add %X, undef + %B = sub %X, undef + %C = xor %X, undef + Safe: + %A = undef + %B = undef + %C = undef + +This is safe because all of the output bits are affected by the undef +bits. Any output bit can have a zero or one depending on the input bits. + +.. code-block:: llvm + + %A = or %X, undef + %B = and %X, undef + Safe: + %A = -1 + %B = 0 + Unsafe: + %A = undef + %B = undef + +These logical operations have bits that are not always affected by the +input. For example, if ``%X`` has a zero bit, then the output of the +'``and``' operation will always be a zero for that bit, no matter what +the corresponding bit from the '``undef``' is. As such, it is unsafe to +optimize or assume that the result of the '``and``' is '``undef``'. +However, it is safe to assume that all bits of the '``undef``' could be +0, and optimize the '``and``' to 0. Likewise, it is safe to assume that +all the bits of the '``undef``' operand to the '``or``' could be set, +allowing the '``or``' to be folded to -1. + +.. code-block:: llvm + + %A = select undef, %X, %Y + %B = select undef, 42, %Y + %C = select %X, %Y, undef + Safe: + %A = %X (or %Y) + %B = 42 (or %Y) + %C = %Y + Unsafe: + %A = undef + %B = undef + %C = undef + +This set of examples shows that undefined '``select``' (and conditional +branch) conditions can go *either way*, but they have to come from one +of the two operands. In the ``%A`` example, if ``%X`` and ``%Y`` were +both known to have a clear low bit, then ``%A`` would have to have a +cleared low bit. However, in the ``%C`` example, the optimizer is +allowed to assume that the '``undef``' operand could be the same as +``%Y``, allowing the whole '``select``' to be eliminated. + +.. code-block:: llvm + + %A = xor undef, undef + + %B = undef + %C = xor %B, %B + + %D = undef + %E = icmp lt %D, 4 + %F = icmp gte %D, 4 + + Safe: + %A = undef + %B = undef + %C = undef + %D = undef + %E = undef + %F = undef + +This example points out that two '``undef``' operands are not +necessarily the same. This can be surprising to people (and also matches +C semantics) where they assume that "``X^X``" is always zero, even if +``X`` is undefined. This isn't true for a number of reasons, but the +short answer is that an '``undef``' "variable" can arbitrarily change +its value over its "live range". This is true because the variable +doesn't actually *have a live range*. Instead, the value is logically +read from arbitrary registers that happen to be around when needed, so +the value is not necessarily consistent over time. In fact, ``%A`` and +``%C`` need to have the same semantics or the core LLVM "replace all +uses with" concept would not hold. + +.. code-block:: llvm + + %A = fdiv undef, %X + %B = fdiv %X, undef + Safe: + %A = undef + b: unreachable + +These examples show the crucial difference between an *undefined value* +and *undefined behavior*. An undefined value (like '``undef``') is +allowed to have an arbitrary bit-pattern. This means that the ``%A`` +operation can be constant folded to '``undef``', because the '``undef``' +could be an SNaN, and ``fdiv`` is not (currently) defined on SNaN's. +However, in the second example, we can make a more aggressive +assumption: because the ``undef`` is allowed to be an arbitrary value, +we are allowed to assume that it could be zero. Since a divide by zero +has *undefined behavior*, we are allowed to assume that the operation +does not execute at all. This allows us to delete the divide and all +code after it. Because the undefined operation "can't happen", the +optimizer can assume that it occurs in dead code. + +.. code-block:: llvm + + a: store undef -> %X + b: store %X -> undef + Safe: + a: + b: unreachable + +These examples reiterate the ``fdiv`` example: a store *of* an undefined +value can be assumed to not have any effect; we can assume that the +value is overwritten with bits that happen to match what was already +there. However, a store *to* an undefined location could clobber +arbitrary memory, therefore, it has undefined behavior. + +.. _poisonvalues: + +Poison Values +------------- + +Poison values are similar to :ref:`undef values `, however +they also represent the fact that an instruction or constant expression +which cannot evoke side effects has nevertheless detected a condition +which results in undefined behavior. + +There is currently no way of representing a poison value in the IR; they +only exist when produced by operations such as :ref:`add ` with +the ``nsw`` flag. + +Poison value behavior is defined in terms of value *dependence*: + +- Values other than :ref:`phi ` nodes depend on their operands. +- :ref:`Phi ` nodes depend on the operand corresponding to + their dynamic predecessor basic block. +- Function arguments depend on the corresponding actual argument values + in the dynamic callers of their functions. +- :ref:`Call ` instructions depend on the :ref:`ret ` + instructions that dynamically transfer control back to them. +- :ref:`Invoke ` instructions depend on the + :ref:`ret `, :ref:`resume `, or exception-throwing + call instructions that dynamically transfer control back to them. +- Non-volatile loads and stores depend on the most recent stores to all + of the referenced memory addresses, following the order in the IR + (including loads and stores implied by intrinsics such as + :ref:`@llvm.memcpy `.) +- An instruction with externally visible side effects depends on the + most recent preceding instruction with externally visible side + effects, following the order in the IR. (This includes :ref:`volatile + operations `.) +- An instruction *control-depends* on a :ref:`terminator + instruction ` if the terminator instruction has + multiple successors and the instruction is always executed when + control transfers to one of the successors, and may not be executed + when control is transferred to another. +- Additionally, an instruction also *control-depends* on a terminator + instruction if the set of instructions it otherwise depends on would + be different if the terminator had transferred control to a different + successor. +- Dependence is transitive. + +Poison Values have the same behavior as :ref:`undef values `, +with the additional affect that any instruction which has a *dependence* +on a poison value has undefined behavior. + +Here are some examples: + +.. code-block:: llvm + + entry: + %poison = sub nuw i32 0, 1 ; Results in a poison value. + %still_poison = and i32 %poison, 0 ; 0, but also poison. + %poison_yet_again = getelementptr i32* @h, i32 %still_poison + store i32 0, i32* %poison_yet_again ; memory at @h[0] is poisoned + + store i32 %poison, i32* @g ; Poison value stored to memory. + %poison2 = load i32* @g ; Poison value loaded back from memory. + + store volatile i32 %poison, i32* @g ; External observation; undefined behavior. + + %narrowaddr = bitcast i32* @g to i16* + %wideaddr = bitcast i32* @g to i64* + %poison3 = load i16* %narrowaddr ; Returns a poison value. + %poison4 = load i64* %wideaddr ; Returns a poison value. + + %cmp = icmp slt i32 %poison, 0 ; Returns a poison value. + br i1 %cmp, label %true, label %end ; Branch to either destination. + + true: + store volatile i32 0, i32* @g ; This is control-dependent on %cmp, so + ; it has undefined behavior. + br label %end + + end: + %p = phi i32 [ 0, %entry ], [ 1, %true ] + ; Both edges into this PHI are + ; control-dependent on %cmp, so this + ; always results in a poison value. + + store volatile i32 0, i32* @g ; This would depend on the store in %true + ; if %cmp is true, or the store in %entry + ; otherwise, so this is undefined behavior. + + br i1 %cmp, label %second_true, label %second_end + ; The same branch again, but this time the + ; true block doesn't have side effects. + + second_true: + ; No side effects! + ret void + + second_end: + store volatile i32 0, i32* @g ; This time, the instruction always depends + ; on the store in %end. Also, it is + ; control-equivalent to %end, so this is + ; well-defined (ignoring earlier undefined + ; behavior in this example). + +.. _blockaddress: + +Addresses of Basic Blocks +------------------------- + +``blockaddress(@function, %block)`` + +The '``blockaddress``' constant computes the address of the specified +basic block in the specified function, and always has an ``i8*`` type. +Taking the address of the entry block is illegal. + +This value only has defined behavior when used as an operand to the +':ref:`indirectbr `' instruction, or for comparisons +against null. Pointer equality tests between labels addresses results in +undefined behavior --- though, again, comparison against null is ok, and +no label is equal to the null pointer. This may be passed around as an +opaque pointer sized value as long as the bits are not inspected. This +allows ``ptrtoint`` and arithmetic to be performed on these values so +long as the original value is reconstituted before the ``indirectbr`` +instruction. + +Finally, some targets may provide defined semantics when using the value +as the operand to an inline assembly, but that is target specific. + +.. _constantexprs: + +Constant Expressions +-------------------- + +Constant expressions are used to allow expressions involving other +constants to be used as constants. Constant expressions may be of any +:ref:`first class ` type and may involve any LLVM operation +that does not have side effects (e.g. load and call are not supported). +The following is the syntax for constant expressions: + +``trunc (CST to TYPE)`` + Truncate a constant to another type. The bit size of CST must be + larger than the bit size of TYPE. Both types must be integers. +``zext (CST to TYPE)`` + Zero extend a constant to another type. The bit size of CST must be + smaller than the bit size of TYPE. Both types must be integers. +``sext (CST to TYPE)`` + Sign extend a constant to another type. The bit size of CST must be + smaller than the bit size of TYPE. Both types must be integers. +``fptrunc (CST to TYPE)`` + Truncate a floating point constant to another floating point type. + The size of CST must be larger than the size of TYPE. Both types + must be floating point. +``fpext (CST to TYPE)`` + Floating point extend a constant to another type. The size of CST + must be smaller or equal to the size of TYPE. Both types must be + floating point. +``fptoui (CST to TYPE)`` + Convert a floating point constant to the corresponding unsigned + integer constant. TYPE must be a scalar or vector integer type. CST + must be of scalar or vector floating point type. Both CST and TYPE + must be scalars, or vectors of the same number of elements. If the + value won't fit in the integer type, the results are undefined. +``fptosi (CST to TYPE)`` + Convert a floating point constant to the corresponding signed + integer constant. TYPE must be a scalar or vector integer type. CST + must be of scalar or vector floating point type. Both CST and TYPE + must be scalars, or vectors of the same number of elements. If the + value won't fit in the integer type, the results are undefined. +``uitofp (CST to TYPE)`` + Convert an unsigned integer constant to the corresponding floating + point constant. TYPE must be a scalar or vector floating point type. + CST must be of scalar or vector integer type. Both CST and TYPE must + be scalars, or vectors of the same number of elements. If the value + won't fit in the floating point type, the results are undefined. +``sitofp (CST to TYPE)`` + Convert a signed integer constant to the corresponding floating + point constant. TYPE must be a scalar or vector floating point type. + CST must be of scalar or vector integer type. Both CST and TYPE must + be scalars, or vectors of the same number of elements. If the value + won't fit in the floating point type, the results are undefined. +``ptrtoint (CST to TYPE)`` + Convert a pointer typed constant to the corresponding integer + constant. ``TYPE`` must be an integer type. ``CST`` must be of + pointer type. The ``CST`` value is zero extended, truncated, or + unchanged to make it fit in ``TYPE``. +``inttoptr (CST to TYPE)`` + Convert an integer constant to a pointer constant. TYPE must be a + pointer type. CST must be of integer type. The CST value is zero + extended, truncated, or unchanged to make it fit in a pointer size. + This one is *really* dangerous! +``bitcast (CST to TYPE)`` + Convert a constant, CST, to another TYPE. The constraints of the + operands are the same as those for the :ref:`bitcast + instruction `. +``addrspacecast (CST to TYPE)`` + Convert a constant pointer or constant vector of pointer, CST, to another + TYPE in a different address space. The constraints of the operands are the + same as those for the :ref:`addrspacecast instruction `. +``getelementptr (CSTPTR, IDX0, IDX1, ...)``, ``getelementptr inbounds (CSTPTR, IDX0, IDX1, ...)`` + Perform the :ref:`getelementptr operation ` on + constants. As with the :ref:`getelementptr ` + instruction, the index list may have zero or more indexes, which are + required to make sense for the type of "CSTPTR". +``select (COND, VAL1, VAL2)`` + Perform the :ref:`select operation ` on constants. +``icmp COND (VAL1, VAL2)`` + Performs the :ref:`icmp operation ` on constants. +``fcmp COND (VAL1, VAL2)`` + Performs the :ref:`fcmp operation ` on constants. +``extractelement (VAL, IDX)`` + Perform the :ref:`extractelement operation ` on + constants. +``insertelement (VAL, ELT, IDX)`` + Perform the :ref:`insertelement operation ` on + constants. +``shufflevector (VEC1, VEC2, IDXMASK)`` + Perform the :ref:`shufflevector operation ` on + constants. +``extractvalue (VAL, IDX0, IDX1, ...)`` + Perform the :ref:`extractvalue operation ` on + constants. The index list is interpreted in a similar manner as + indices in a ':ref:`getelementptr `' operation. At + least one index value must be specified. +``insertvalue (VAL, ELT, IDX0, IDX1, ...)`` + Perform the :ref:`insertvalue operation ` on constants. + The index list is interpreted in a similar manner as indices in a + ':ref:`getelementptr `' operation. At least one index + value must be specified. +``OPCODE (LHS, RHS)`` + Perform the specified operation of the LHS and RHS constants. OPCODE + may be any of the :ref:`binary ` or :ref:`bitwise + binary ` operations. The constraints on operands are + the same as those for the corresponding instruction (e.g. no bitwise + operations on floating point values are allowed). + +Other Values +============ + +.. _inlineasmexprs: + +Inline Assembler Expressions +---------------------------- + +LLVM supports inline assembler expressions (as opposed to :ref:`Module-Level +Inline Assembly `) through the use of a special value. This +value represents the inline assembler as a string (containing the +instructions to emit), a list of operand constraints (stored as a +string), a flag that indicates whether or not the inline asm expression +has side effects, and a flag indicating whether the function containing +the asm needs to align its stack conservatively. An example inline +assembler expression is: + +.. code-block:: llvm + + i32 (i32) asm "bswap $0", "=r,r" + +Inline assembler expressions may **only** be used as the callee operand +of a :ref:`call ` or an :ref:`invoke ` instruction. +Thus, typically we have: + +.. code-block:: llvm + + %X = call i32 asm "bswap $0", "=r,r"(i32 %Y) + +Inline asms with side effects not visible in the constraint list must be +marked as having side effects. This is done through the use of the +'``sideeffect``' keyword, like so: + +.. code-block:: llvm + + call void asm sideeffect "eieio", ""() + +In some cases inline asms will contain code that will not work unless +the stack is aligned in some way, such as calls or SSE instructions on +x86, yet will not contain code that does that alignment within the asm. +The compiler should make conservative assumptions about what the asm +might contain and should generate its usual stack alignment code in the +prologue if the '``alignstack``' keyword is present: + +.. code-block:: llvm + + call void asm alignstack "eieio", ""() + +Inline asms also support using non-standard assembly dialects. The +assumed dialect is ATT. When the '``inteldialect``' keyword is present, +the inline asm is using the Intel dialect. Currently, ATT and Intel are +the only supported dialects. An example is: + +.. code-block:: llvm + + call void asm inteldialect "eieio", ""() + +If multiple keywords appear the '``sideeffect``' keyword must come +first, the '``alignstack``' keyword second and the '``inteldialect``' +keyword last. + +Inline Asm Metadata +^^^^^^^^^^^^^^^^^^^ + +The call instructions that wrap inline asm nodes may have a +"``!srcloc``" MDNode attached to it that contains a list of constant +integers. If present, the code generator will use the integer as the +location cookie value when report errors through the ``LLVMContext`` +error reporting mechanisms. This allows a front-end to correlate backend +errors that occur with inline asm back to the source code that produced +it. For example: + +.. code-block:: llvm + + call void asm sideeffect "something bad", ""(), !srcloc !42 + ... + !42 = !{ i32 1234567 } + +It is up to the front-end to make sense of the magic numbers it places +in the IR. If the MDNode contains multiple constants, the code generator +will use the one that corresponds to the line of the asm that the error +occurs on. + +.. _metadata: + +Metadata Nodes and Metadata Strings +----------------------------------- + +LLVM IR allows metadata to be attached to instructions in the program +that can convey extra information about the code to the optimizers and +code generator. One example application of metadata is source-level +debug information. There are two metadata primitives: strings and nodes. +All metadata has the ``metadata`` type and is identified in syntax by a +preceding exclamation point ('``!``'). + +A metadata string is a string surrounded by double quotes. It can +contain any character by escaping non-printable characters with +"``\xx``" where "``xx``" is the two digit hex code. For example: +"``!"test\00"``". + +Metadata nodes are represented with notation similar to structure +constants (a comma separated list of elements, surrounded by braces and +preceded by an exclamation point). Metadata nodes can have any values as +their operand. For example: + +.. code-block:: llvm + + !{ metadata !"test\00", i32 10} + +A :ref:`named metadata ` is a collection of +metadata nodes, which can be looked up in the module symbol table. For +example: + +.. code-block:: llvm + + !foo = metadata !{!4, !3} + +Metadata can be used as function arguments. Here ``llvm.dbg.value`` +function is using two metadata arguments: + +.. code-block:: llvm + + call void @llvm.dbg.value(metadata !24, i64 0, metadata !25) + +Metadata can be attached with an instruction. Here metadata ``!21`` is +attached to the ``add`` instruction using the ``!dbg`` identifier: + +.. code-block:: llvm + + %indvar.next = add i64 %indvar, 1, !dbg !21 + +More information about specific metadata nodes recognized by the +optimizers and code generator is found below. + +'``tbaa``' Metadata +^^^^^^^^^^^^^^^^^^^ + +In LLVM IR, memory does not have types, so LLVM's own type system is not +suitable for doing TBAA. Instead, metadata is added to the IR to +describe a type system of a higher level language. This can be used to +implement typical C/C++ TBAA, but it can also be used to implement +custom alias analysis behavior for other languages. + +The current metadata format is very simple. TBAA metadata nodes have up +to three fields, e.g.: + +.. code-block:: llvm + + !0 = metadata !{ metadata !"an example type tree" } + !1 = metadata !{ metadata !"int", metadata !0 } + !2 = metadata !{ metadata !"float", metadata !0 } + !3 = metadata !{ metadata !"const float", metadata !2, i64 1 } + +The first field is an identity field. It can be any value, usually a +metadata string, which uniquely identifies the type. The most important +name in the tree is the name of the root node. Two trees with different +root node names are entirely disjoint, even if they have leaves with +common names. + +The second field identifies the type's parent node in the tree, or is +null or omitted for a root node. A type is considered to alias all of +its descendants and all of its ancestors in the tree. Also, a type is +considered to alias all types in other trees, so that bitcode produced +from multiple front-ends is handled conservatively. + +If the third field is present, it's an integer which if equal to 1 +indicates that the type is "constant" (meaning +``pointsToConstantMemory`` should return true; see `other useful +AliasAnalysis methods `_). + +'``tbaa.struct``' Metadata +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The :ref:`llvm.memcpy ` is often used to implement +aggregate assignment operations in C and similar languages, however it +is defined to copy a contiguous region of memory, which is more than +strictly necessary for aggregate types which contain holes due to +padding. Also, it doesn't contain any TBAA information about the fields +of the aggregate. + +``!tbaa.struct`` metadata can describe which memory subregions in a +memcpy are padding and what the TBAA tags of the struct are. + +The current metadata format is very simple. ``!tbaa.struct`` metadata +nodes are a list of operands which are in conceptual groups of three. +For each group of three, the first operand gives the byte offset of a +field in bytes, the second gives its size in bytes, and the third gives +its tbaa tag. e.g.: + +.. code-block:: llvm + + !4 = metadata !{ i64 0, i64 4, metadata !1, i64 8, i64 4, metadata !2 } + +This describes a struct with two fields. The first is at offset 0 bytes +with size 4 bytes, and has tbaa tag !1. The second is at offset 8 bytes +and has size 4 bytes and has tbaa tag !2. + +Note that the fields need not be contiguous. In this example, there is a +4 byte gap between the two fields. This gap represents padding which +does not carry useful data and need not be preserved. + +'``fpmath``' Metadata +^^^^^^^^^^^^^^^^^^^^^ + +``fpmath`` metadata may be attached to any instruction of floating point +type. It can be used to express the maximum acceptable error in the +result of that instruction, in ULPs, thus potentially allowing the +compiler to use a more efficient but less accurate method of computing +it. ULP is defined as follows: + + If ``x`` is a real number that lies between two finite consecutive + floating-point numbers ``a`` and ``b``, without being equal to one + of them, then ``ulp(x) = |b - a|``, otherwise ``ulp(x)`` is the + distance between the two non-equal finite floating-point numbers + nearest ``x``. Moreover, ``ulp(NaN)`` is ``NaN``. + +The metadata node shall consist of a single positive floating point +number representing the maximum relative error, for example: + +.. code-block:: llvm + + !0 = metadata !{ float 2.5 } ; maximum acceptable inaccuracy is 2.5 ULPs + +'``range``' Metadata +^^^^^^^^^^^^^^^^^^^^ + +``range`` metadata may be attached only to loads of integer types. It +expresses the possible ranges the loaded value is in. The ranges are +represented with a flattened list of integers. The loaded value is known +to be in the union of the ranges defined by each consecutive pair. Each +pair has the following properties: + +- The type must match the type loaded by the instruction. +- The pair ``a,b`` represents the range ``[a,b)``. +- Both ``a`` and ``b`` are constants. +- The range is allowed to wrap. +- The range should not represent the full or empty set. That is, + ``a!=b``. + +In addition, the pairs must be in signed order of the lower bound and +they must be non-contiguous. + +Examples: + +.. code-block:: llvm + + %a = load i8* %x, align 1, !range !0 ; Can only be 0 or 1 + %b = load i8* %y, align 1, !range !1 ; Can only be 255 (-1), 0 or 1 + %c = load i8* %z, align 1, !range !2 ; Can only be 0, 1, 3, 4 or 5 + %d = load i8* %z, align 1, !range !3 ; Can only be -2, -1, 3, 4 or 5 + ... + !0 = metadata !{ i8 0, i8 2 } + !1 = metadata !{ i8 255, i8 2 } + !2 = metadata !{ i8 0, i8 2, i8 3, i8 6 } + !3 = metadata !{ i8 -2, i8 0, i8 3, i8 6 } + +'``llvm.loop``' +^^^^^^^^^^^^^^^ + +It is sometimes useful to attach information to loop constructs. Currently, +loop metadata is implemented as metadata attached to the branch instruction +in the loop latch block. This type of metadata refer to a metadata node that is +guaranteed to be separate for each loop. The loop identifier metadata is +specified with the name ``llvm.loop``. + +The loop identifier metadata is implemented using a metadata that refers to +itself to avoid merging it with any other identifier metadata, e.g., +during module linkage or function inlining. That is, each loop should refer +to their own identification metadata even if they reside in separate functions. +The following example contains loop identifier metadata for two separate loop +constructs: + +.. code-block:: llvm + + !0 = metadata !{ metadata !0 } + !1 = metadata !{ metadata !1 } + +The loop identifier metadata can be used to specify additional per-loop +metadata. Any operands after the first operand can be treated as user-defined +metadata. For example the ``llvm.vectorizer.unroll`` metadata is understood +by the loop vectorizer to indicate how many times to unroll the loop: + +.. code-block:: llvm + + br i1 %exitcond, label %._crit_edge, label %.lr.ph, !llvm.loop !0 + ... + !0 = metadata !{ metadata !0, metadata !1 } + !1 = metadata !{ metadata !"llvm.vectorizer.unroll", i32 2 } + +'``llvm.mem``' +^^^^^^^^^^^^^^^ + +Metadata types used to annotate memory accesses with information helpful +for optimizations are prefixed with ``llvm.mem``. + +'``llvm.mem.parallel_loop_access``' Metadata +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +For a loop to be parallel, in addition to using +the ``llvm.loop`` metadata to mark the loop latch branch instruction, +also all of the memory accessing instructions in the loop body need to be +marked with the ``llvm.mem.parallel_loop_access`` metadata. If there +is at least one memory accessing instruction not marked with the metadata, +the loop must be considered a sequential loop. This causes parallel loops to be +converted to sequential loops due to optimization passes that are unaware of +the parallel semantics and that insert new memory instructions to the loop +body. + +Example of a loop that is considered parallel due to its correct use of +both ``llvm.loop`` and ``llvm.mem.parallel_loop_access`` +metadata types that refer to the same loop identifier metadata. + +.. code-block:: llvm + + for.body: + ... + %0 = load i32* %arrayidx, align 4, !llvm.mem.parallel_loop_access !0 + ... + store i32 %0, i32* %arrayidx4, align 4, !llvm.mem.parallel_loop_access !0 + ... + br i1 %exitcond, label %for.end, label %for.body, !llvm.loop !0 + + for.end: + ... + !0 = metadata !{ metadata !0 } + +It is also possible to have nested parallel loops. In that case the +memory accesses refer to a list of loop identifier metadata nodes instead of +the loop identifier metadata node directly: + +.. code-block:: llvm + + outer.for.body: + ... + + inner.for.body: + ... + %0 = load i32* %arrayidx, align 4, !llvm.mem.parallel_loop_access !0 + ... + store i32 %0, i32* %arrayidx4, align 4, !llvm.mem.parallel_loop_access !0 + ... + br i1 %exitcond, label %inner.for.end, label %inner.for.body, !llvm.loop !1 + + inner.for.end: + ... + %0 = load i32* %arrayidx, align 4, !llvm.mem.parallel_loop_access !0 + ... + store i32 %0, i32* %arrayidx4, align 4, !llvm.mem.parallel_loop_access !0 + ... + br i1 %exitcond, label %outer.for.end, label %outer.for.body, !llvm.loop !2 + + outer.for.end: ; preds = %for.body + ... + !0 = metadata !{ metadata !1, metadata !2 } ; a list of loop identifiers + !1 = metadata !{ metadata !1 } ; an identifier for the inner loop + !2 = metadata !{ metadata !2 } ; an identifier for the outer loop + +'``llvm.vectorizer``' +^^^^^^^^^^^^^^^^^^^^^ + +Metadata prefixed with ``llvm.vectorizer`` is used to control per-loop +vectorization parameters such as vectorization factor and unroll factor. + +``llvm.vectorizer`` metadata should be used in conjunction with ``llvm.loop`` +loop identification metadata. + +'``llvm.vectorizer.unroll``' Metadata +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This metadata instructs the loop vectorizer to unroll the specified +loop exactly ``N`` times. + +The first operand is the string ``llvm.vectorizer.unroll`` and the second +operand is an integer specifying the unroll factor. For example: + +.. code-block:: llvm + + !0 = metadata !{ metadata !"llvm.vectorizer.unroll", i32 4 } + +Note that setting ``llvm.vectorizer.unroll`` to 1 disables unrolling of the +loop. + +If ``llvm.vectorizer.unroll`` is set to 0 then the amount of unrolling will be +determined automatically. + +'``llvm.vectorizer.width``' Metadata +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This metadata sets the target width of the vectorizer to ``N``. Without +this metadata, the vectorizer will choose a width automatically. +Regardless of this metadata, the vectorizer will only vectorize loops if +it believes it is valid to do so. + +The first operand is the string ``llvm.vectorizer.width`` and the second +operand is an integer specifying the width. For example: + +.. code-block:: llvm + + !0 = metadata !{ metadata !"llvm.vectorizer.width", i32 4 } + +Note that setting ``llvm.vectorizer.width`` to 1 disables vectorization of the +loop. + +If ``llvm.vectorizer.width`` is set to 0 then the width will be determined +automatically. + +Module Flags Metadata +===================== + +Information about the module as a whole is difficult to convey to LLVM's +subsystems. The LLVM IR isn't sufficient to transmit this information. +The ``llvm.module.flags`` named metadata exists in order to facilitate +this. These flags are in the form of key / value pairs --- much like a +dictionary --- making it easy for any subsystem who cares about a flag to +look it up. + +The ``llvm.module.flags`` metadata contains a list of metadata triplets. +Each triplet has the following form: + +- The first element is a *behavior* flag, which specifies the behavior + when two (or more) modules are merged together, and it encounters two + (or more) metadata with the same ID. The supported behaviors are + described below. +- The second element is a metadata string that is a unique ID for the + metadata. Each module may only have one flag entry for each unique ID (not + including entries with the **Require** behavior). +- The third element is the value of the flag. + +When two (or more) modules are merged together, the resulting +``llvm.module.flags`` metadata is the union of the modules' flags. That is, for +each unique metadata ID string, there will be exactly one entry in the merged +modules ``llvm.module.flags`` metadata table, and the value for that entry will +be determined by the merge behavior flag, as described below. The only exception +is that entries with the *Require* behavior are always preserved. + +The following behaviors are supported: + +.. list-table:: + :header-rows: 1 + :widths: 10 90 + + * - Value + - Behavior + + * - 1 + - **Error** + Emits an error if two values disagree, otherwise the resulting value + is that of the operands. + + * - 2 + - **Warning** + Emits a warning if two values disagree. The result value will be the + operand for the flag from the first module being linked. + + * - 3 + - **Require** + Adds a requirement that another module flag be present and have a + specified value after linking is performed. The value must be a + metadata pair, where the first element of the pair is the ID of the + module flag to be restricted, and the second element of the pair is + the value the module flag should be restricted to. This behavior can + be used to restrict the allowable results (via triggering of an + error) of linking IDs with the **Override** behavior. + + * - 4 + - **Override** + Uses the specified value, regardless of the behavior or value of the + other module. If both modules specify **Override**, but the values + differ, an error will be emitted. + + * - 5 + - **Append** + Appends the two values, which are required to be metadata nodes. + + * - 6 + - **AppendUnique** + Appends the two values, which are required to be metadata + nodes. However, duplicate entries in the second list are dropped + during the append operation. + +It is an error for a particular unique flag ID to have multiple behaviors, +except in the case of **Require** (which adds restrictions on another metadata +value) or **Override**. + +An example of module flags: + +.. code-block:: llvm + + !0 = metadata !{ i32 1, metadata !"foo", i32 1 } + !1 = metadata !{ i32 4, metadata !"bar", i32 37 } + !2 = metadata !{ i32 2, metadata !"qux", i32 42 } + !3 = metadata !{ i32 3, metadata !"qux", + metadata !{ + metadata !"foo", i32 1 + } + } + !llvm.module.flags = !{ !0, !1, !2, !3 } + +- Metadata ``!0`` has the ID ``!"foo"`` and the value '1'. The behavior + if two or more ``!"foo"`` flags are seen is to emit an error if their + values are not equal. + +- Metadata ``!1`` has the ID ``!"bar"`` and the value '37'. The + behavior if two or more ``!"bar"`` flags are seen is to use the value + '37'. + +- Metadata ``!2`` has the ID ``!"qux"`` and the value '42'. The + behavior if two or more ``!"qux"`` flags are seen is to emit a + warning if their values are not equal. + +- Metadata ``!3`` has the ID ``!"qux"`` and the value: + + :: + + metadata !{ metadata !"foo", i32 1 } + + The behavior is to emit an error if the ``llvm.module.flags`` does not + contain a flag with the ID ``!"foo"`` that has the value '1' after linking is + performed. + +Objective-C Garbage Collection Module Flags Metadata +---------------------------------------------------- + +On the Mach-O platform, Objective-C stores metadata about garbage +collection in a special section called "image info". The metadata +consists of a version number and a bitmask specifying what types of +garbage collection are supported (if any) by the file. If two or more +modules are linked together their garbage collection metadata needs to +be merged rather than appended together. + +The Objective-C garbage collection module flags metadata consists of the +following key-value pairs: + +.. list-table:: + :header-rows: 1 + :widths: 30 70 + + * - Key + - Value + + * - ``Objective-C Version`` + - **[Required]** --- The Objective-C ABI version. Valid values are 1 and 2. + + * - ``Objective-C Image Info Version`` + - **[Required]** --- The version of the image info section. Currently + always 0. + + * - ``Objective-C Image Info Section`` + - **[Required]** --- The section to place the metadata. Valid values are + ``"__OBJC, __image_info, regular"`` for Objective-C ABI version 1, and + ``"__DATA,__objc_imageinfo, regular, no_dead_strip"`` for + Objective-C ABI version 2. + + * - ``Objective-C Garbage Collection`` + - **[Required]** --- Specifies whether garbage collection is supported or + not. Valid values are 0, for no garbage collection, and 2, for garbage + collection supported. + + * - ``Objective-C GC Only`` + - **[Optional]** --- Specifies that only garbage collection is supported. + If present, its value must be 6. This flag requires that the + ``Objective-C Garbage Collection`` flag have the value 2. + +Some important flag interactions: + +- If a module with ``Objective-C Garbage Collection`` set to 0 is + merged with a module with ``Objective-C Garbage Collection`` set to + 2, then the resulting module has the + ``Objective-C Garbage Collection`` flag set to 0. +- A module with ``Objective-C Garbage Collection`` set to 0 cannot be + merged with a module with ``Objective-C GC Only`` set to 6. + +Automatic Linker Flags Module Flags Metadata +-------------------------------------------- + +Some targets support embedding flags to the linker inside individual object +files. Typically this is used in conjunction with language extensions which +allow source files to explicitly declare the libraries they depend on, and have +these automatically be transmitted to the linker via object files. + +These flags are encoded in the IR using metadata in the module flags section, +using the ``Linker Options`` key. The merge behavior for this flag is required +to be ``AppendUnique``, and the value for the key is expected to be a metadata +node which should be a list of other metadata nodes, each of which should be a +list of metadata strings defining linker options. + +For example, the following metadata section specifies two separate sets of +linker options, presumably to link against ``libz`` and the ``Cocoa`` +framework:: + + !0 = metadata !{ i32 6, metadata !"Linker Options", + metadata !{ + metadata !{ metadata !"-lz" }, + metadata !{ metadata !"-framework", metadata !"Cocoa" } } } + !llvm.module.flags = !{ !0 } + +The metadata encoding as lists of lists of options, as opposed to a collapsed +list of options, is chosen so that the IR encoding can use multiple option +strings to specify e.g., a single library, while still having that specifier be +preserved as an atomic element that can be recognized by a target specific +assembly writer or object file emitter. + +Each individual option is required to be either a valid option for the target's +linker, or an option that is reserved by the target specific assembly writer or +object file emitter. No other aspect of these options is defined by the IR. + +.. _intrinsicglobalvariables: + +Intrinsic Global Variables +========================== + +LLVM has a number of "magic" global variables that contain data that +affect code generation or other IR semantics. These are documented here. +All globals of this sort should have a section specified as +"``llvm.metadata``". This section and all globals that start with +"``llvm.``" are reserved for use by LLVM. + +.. _gv_llvmused: + +The '``llvm.used``' Global Variable +----------------------------------- + +The ``@llvm.used`` global is an array which has +:ref:`appending linkage `. This array contains a list of +pointers to named global variables, functions and aliases which may optionally +have a pointer cast formed of bitcast or getelementptr. For example, a legal +use of it is: + +.. code-block:: llvm + + @X = global i8 4 + @Y = global i32 123 + + @llvm.used = appending global [2 x i8*] [ + i8* @X, + i8* bitcast (i32* @Y to i8*) + ], section "llvm.metadata" + +If a symbol appears in the ``@llvm.used`` list, then the compiler, assembler, +and linker are required to treat the symbol as if there is a reference to the +symbol that it cannot see (which is why they have to be named). For example, if +a variable has internal linkage and no references other than that from the +``@llvm.used`` list, it cannot be deleted. This is commonly used to represent +references from inline asms and other things the compiler cannot "see", and +corresponds to "``attribute((used))``" in GNU C. + +On some targets, the code generator must emit a directive to the +assembler or object file to prevent the assembler and linker from +molesting the symbol. + +.. _gv_llvmcompilerused: + +The '``llvm.compiler.used``' Global Variable +-------------------------------------------- + +The ``@llvm.compiler.used`` directive is the same as the ``@llvm.used`` +directive, except that it only prevents the compiler from touching the +symbol. On targets that support it, this allows an intelligent linker to +optimize references to the symbol without being impeded as it would be +by ``@llvm.used``. + +This is a rare construct that should only be used in rare circumstances, +and should not be exposed to source languages. + +.. _gv_llvmglobalctors: + +The '``llvm.global_ctors``' Global Variable +------------------------------------------- + +.. code-block:: llvm + + %0 = type { i32, void ()* } + @llvm.global_ctors = appending global [1 x %0] [%0 { i32 65535, void ()* @ctor }] + +The ``@llvm.global_ctors`` array contains a list of constructor +functions and associated priorities. The functions referenced by this +array will be called in ascending order of priority (i.e. lowest first) +when the module is loaded. The order of functions with the same priority +is not defined. + +.. _llvmglobaldtors: + +The '``llvm.global_dtors``' Global Variable +------------------------------------------- + +.. code-block:: llvm + + %0 = type { i32, void ()* } + @llvm.global_dtors = appending global [1 x %0] [%0 { i32 65535, void ()* @dtor }] + +The ``@llvm.global_dtors`` array contains a list of destructor functions +and associated priorities. The functions referenced by this array will +be called in descending order of priority (i.e. highest first) when the +module is loaded. The order of functions with the same priority is not +defined. + +Instruction Reference +===================== + +The LLVM instruction set consists of several different classifications +of instructions: :ref:`terminator instructions `, :ref:`binary +instructions `, :ref:`bitwise binary +instructions `, :ref:`memory instructions `, and +:ref:`other instructions `. + +.. _terminators: + +Terminator Instructions +----------------------- + +As mentioned :ref:`previously `, every basic block in a +program ends with a "Terminator" instruction, which indicates which +block should be executed after the current block is finished. These +terminator instructions typically yield a '``void``' value: they produce +control flow, not values (the one exception being the +':ref:`invoke `' instruction). + +The terminator instructions are: ':ref:`ret `', +':ref:`br `', ':ref:`switch `', +':ref:`indirectbr `', ':ref:`invoke `', +':ref:`resume `', and ':ref:`unreachable `'. + +.. _i_ret: + +'``ret``' Instruction +^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + ret ; Return a value from a non-void function + ret void ; Return from void function + +Overview: +""""""""" + +The '``ret``' instruction is used to return control flow (and optionally +a value) from a function back to the caller. + +There are two forms of the '``ret``' instruction: one that returns a +value and then causes control flow, and one that just causes control +flow to occur. + +Arguments: +"""""""""" + +The '``ret``' instruction optionally accepts a single argument, the +return value. The type of the return value must be a ':ref:`first +class `' type. + +A function is not :ref:`well formed ` if it it has a non-void +return type and contains a '``ret``' instruction with no return value or +a return value with a type that does not match its type, or if it has a +void return type and contains a '``ret``' instruction with a return +value. + +Semantics: +"""""""""" + +When the '``ret``' instruction is executed, control flow returns back to +the calling function's context. If the caller is a +":ref:`call `" instruction, execution continues at the +instruction after the call. If the caller was an +":ref:`invoke `" instruction, execution continues at the +beginning of the "normal" destination block. If the instruction returns +a value, that value shall set the call or invoke instruction's return +value. + +Example: +"""""""" + +.. code-block:: llvm + + ret i32 5 ; Return an integer value of 5 + ret void ; Return from a void function + ret { i32, i8 } { i32 4, i8 2 } ; Return a struct of values 4 and 2 + +.. _i_br: + +'``br``' Instruction +^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + br i1 , label , label + br label ; Unconditional branch + +Overview: +""""""""" + +The '``br``' instruction is used to cause control flow to transfer to a +different basic block in the current function. There are two forms of +this instruction, corresponding to a conditional branch and an +unconditional branch. + +Arguments: +"""""""""" + +The conditional branch form of the '``br``' instruction takes a single +'``i1``' value and two '``label``' values. The unconditional form of the +'``br``' instruction takes a single '``label``' value as a target. + +Semantics: +"""""""""" + +Upon execution of a conditional '``br``' instruction, the '``i1``' +argument is evaluated. If the value is ``true``, control flows to the +'``iftrue``' ``label`` argument. If "cond" is ``false``, control flows +to the '``iffalse``' ``label`` argument. + +Example: +"""""""" + +.. code-block:: llvm + + Test: + %cond = icmp eq i32 %a, %b + br i1 %cond, label %IfEqual, label %IfUnequal + IfEqual: + ret i32 1 + IfUnequal: + ret i32 0 + +.. _i_switch: + +'``switch``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + switch , label [ , label ... ] + +Overview: +""""""""" + +The '``switch``' instruction is used to transfer control flow to one of +several different places. It is a generalization of the '``br``' +instruction, allowing a branch to occur to one of many possible +destinations. + +Arguments: +"""""""""" + +The '``switch``' instruction uses three parameters: an integer +comparison value '``value``', a default '``label``' destination, and an +array of pairs of comparison value constants and '``label``'s. The table +is not allowed to contain duplicate constant entries. + +Semantics: +"""""""""" + +The ``switch`` instruction specifies a table of values and destinations. +When the '``switch``' instruction is executed, this table is searched +for the given value. If the value is found, control flow is transferred +to the corresponding destination; otherwise, control flow is transferred +to the default destination. + +Implementation: +""""""""""""""" + +Depending on properties of the target machine and the particular +``switch`` instruction, this instruction may be code generated in +different ways. For example, it could be generated as a series of +chained conditional branches or with a lookup table. + +Example: +"""""""" + +.. code-block:: llvm + + ; Emulate a conditional br instruction + %Val = zext i1 %value to i32 + switch i32 %Val, label %truedest [ i32 0, label %falsedest ] + + ; Emulate an unconditional br instruction + switch i32 0, label %dest [ ] + + ; Implement a jump table: + switch i32 %val, label %otherwise [ i32 0, label %onzero + i32 1, label %onone + i32 2, label %ontwo ] + +.. _i_indirectbr: + +'``indirectbr``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + indirectbr *
, [ label , label , ... ] + +Overview: +""""""""" + +The '``indirectbr``' instruction implements an indirect branch to a +label within the current function, whose address is specified by +"``address``". Address must be derived from a +:ref:`blockaddress ` constant. + +Arguments: +"""""""""" + +The '``address``' argument is the address of the label to jump to. The +rest of the arguments indicate the full set of possible destinations +that the address may point to. Blocks are allowed to occur multiple +times in the destination list, though this isn't particularly useful. + +This destination list is required so that dataflow analysis has an +accurate understanding of the CFG. + +Semantics: +"""""""""" + +Control transfers to the block specified in the address argument. All +possible destination blocks must be listed in the label list, otherwise +this instruction has undefined behavior. This implies that jumps to +labels defined in other functions have undefined behavior as well. + +Implementation: +""""""""""""""" + +This is typically implemented with a jump through a register. + +Example: +"""""""" + +.. code-block:: llvm + + indirectbr i8* %Addr, [ label %bb1, label %bb2, label %bb3 ] + +.. _i_invoke: + +'``invoke``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = invoke [cconv] [ret attrs] () [fn attrs] + to label unwind label + +Overview: +""""""""" + +The '``invoke``' instruction causes control to transfer to a specified +function, with the possibility of control flow transfer to either the +'``normal``' label or the '``exception``' label. If the callee function +returns with the "``ret``" instruction, control flow will return to the +"normal" label. If the callee (or any indirect callees) returns via the +":ref:`resume `" instruction or other exception handling +mechanism, control is interrupted and continued at the dynamically +nearest "exception" label. + +The '``exception``' label is a `landing +pad `_ for the exception. As such, +'``exception``' label is required to have the +":ref:`landingpad `" instruction, which contains the +information about the behavior of the program after unwinding happens, +as its first non-PHI instruction. The restrictions on the +"``landingpad``" instruction's tightly couples it to the "``invoke``" +instruction, so that the important information contained within the +"``landingpad``" instruction can't be lost through normal code motion. + +Arguments: +"""""""""" + +This instruction requires several arguments: + +#. The optional "cconv" marker indicates which :ref:`calling + convention ` the call should use. If none is + specified, the call defaults to using C calling conventions. +#. The optional :ref:`Parameter Attributes ` list for return + values. Only '``zeroext``', '``signext``', and '``inreg``' attributes + are valid here. +#. '``ptr to function ty``': shall be the signature of the pointer to + function value being invoked. In most cases, this is a direct + function invocation, but indirect ``invoke``'s are just as possible, + branching off an arbitrary pointer to function value. +#. '``function ptr val``': An LLVM value containing a pointer to a + function to be invoked. +#. '``function args``': argument list whose types match the function + signature argument types and parameter attributes. All arguments must + be of :ref:`first class ` type. If the function signature + indicates the function accepts a variable number of arguments, the + extra arguments can be specified. +#. '``normal label``': the label reached when the called function + executes a '``ret``' instruction. +#. '``exception label``': the label reached when a callee returns via + the :ref:`resume ` instruction or other exception handling + mechanism. +#. The optional :ref:`function attributes ` list. Only + '``noreturn``', '``nounwind``', '``readonly``' and '``readnone``' + attributes are valid here. + +Semantics: +"""""""""" + +This instruction is designed to operate as a standard '``call``' +instruction in most regards. The primary difference is that it +establishes an association with a label, which is used by the runtime +library to unwind the stack. + +This instruction is used in languages with destructors to ensure that +proper cleanup is performed in the case of either a ``longjmp`` or a +thrown exception. Additionally, this is important for implementation of +'``catch``' clauses in high-level languages that support them. + +For the purposes of the SSA form, the definition of the value returned +by the '``invoke``' instruction is deemed to occur on the edge from the +current block to the "normal" label. If the callee unwinds then no +return value is available. + +Example: +"""""""" + +.. code-block:: llvm + + %retval = invoke i32 @Test(i32 15) to label %Continue + unwind label %TestCleanup ; {i32}:retval set + %retval = invoke coldcc i32 %Testfnptr(i32 15) to label %Continue + unwind label %TestCleanup ; {i32}:retval set + +.. _i_resume: + +'``resume``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + resume + +Overview: +""""""""" + +The '``resume``' instruction is a terminator instruction that has no +successors. + +Arguments: +"""""""""" + +The '``resume``' instruction requires one argument, which must have the +same type as the result of any '``landingpad``' instruction in the same +function. + +Semantics: +"""""""""" + +The '``resume``' instruction resumes propagation of an existing +(in-flight) exception whose unwinding was interrupted with a +:ref:`landingpad ` instruction. + +Example: +"""""""" + +.. code-block:: llvm + + resume { i8*, i32 } %exn + +.. _i_unreachable: + +'``unreachable``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + unreachable + +Overview: +""""""""" + +The '``unreachable``' instruction has no defined semantics. This +instruction is used to inform the optimizer that a particular portion of +the code is not reachable. This can be used to indicate that the code +after a no-return function cannot be reached, and other facts. + +Semantics: +"""""""""" + +The '``unreachable``' instruction has no defined semantics. + +.. _binaryops: + +Binary Operations +----------------- + +Binary operators are used to do most of the computation in a program. +They require two operands of the same type, execute an operation on +them, and produce a single value. The operands might represent multiple +data, as is the case with the :ref:`vector ` data type. The +result value has the same type as its operands. + +There are several different binary operators: + +.. _i_add: + +'``add``' Instruction +^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = add , ; yields {ty}:result + = add nuw , ; yields {ty}:result + = add nsw , ; yields {ty}:result + = add nuw nsw , ; yields {ty}:result + +Overview: +""""""""" + +The '``add``' instruction returns the sum of its two operands. + +Arguments: +"""""""""" + +The two arguments to the '``add``' instruction must be +:ref:`integer ` or :ref:`vector ` of integer values. Both +arguments must have identical types. + +Semantics: +"""""""""" + +The value produced is the integer sum of the two operands. + +If the sum has unsigned overflow, the result returned is the +mathematical result modulo 2\ :sup:`n`\ , where n is the bit width of +the result. + +Because LLVM integers use a two's complement representation, this +instruction is appropriate for both signed and unsigned integers. + +``nuw`` and ``nsw`` stand for "No Unsigned Wrap" and "No Signed Wrap", +respectively. If the ``nuw`` and/or ``nsw`` keywords are present, the +result value of the ``add`` is a :ref:`poison value ` if +unsigned and/or signed overflow, respectively, occurs. + +Example: +"""""""" + +.. code-block:: llvm + + = add i32 4, %var ; yields {i32}:result = 4 + %var + +.. _i_fadd: + +'``fadd``' Instruction +^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = fadd [fast-math flags]* , ; yields {ty}:result + +Overview: +""""""""" + +The '``fadd``' instruction returns the sum of its two operands. + +Arguments: +"""""""""" + +The two arguments to the '``fadd``' instruction must be :ref:`floating +point ` or :ref:`vector ` of floating point values. +Both arguments must have identical types. + +Semantics: +"""""""""" + +The value produced is the floating point sum of the two operands. This +instruction can also take any number of :ref:`fast-math flags `, +which are optimization hints to enable otherwise unsafe floating point +optimizations: + +Example: +"""""""" + +.. code-block:: llvm + + = fadd float 4.0, %var ; yields {float}:result = 4.0 + %var + +'``sub``' Instruction +^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = sub , ; yields {ty}:result + = sub nuw , ; yields {ty}:result + = sub nsw , ; yields {ty}:result + = sub nuw nsw , ; yields {ty}:result + +Overview: +""""""""" + +The '``sub``' instruction returns the difference of its two operands. + +Note that the '``sub``' instruction is used to represent the '``neg``' +instruction present in most other intermediate representations. + +Arguments: +"""""""""" + +The two arguments to the '``sub``' instruction must be +:ref:`integer ` or :ref:`vector ` of integer values. Both +arguments must have identical types. + +Semantics: +"""""""""" + +The value produced is the integer difference of the two operands. + +If the difference has unsigned overflow, the result returned is the +mathematical result modulo 2\ :sup:`n`\ , where n is the bit width of +the result. + +Because LLVM integers use a two's complement representation, this +instruction is appropriate for both signed and unsigned integers. + +``nuw`` and ``nsw`` stand for "No Unsigned Wrap" and "No Signed Wrap", +respectively. If the ``nuw`` and/or ``nsw`` keywords are present, the +result value of the ``sub`` is a :ref:`poison value ` if +unsigned and/or signed overflow, respectively, occurs. + +Example: +"""""""" + +.. code-block:: llvm + + = sub i32 4, %var ; yields {i32}:result = 4 - %var + = sub i32 0, %val ; yields {i32}:result = -%var + +.. _i_fsub: + +'``fsub``' Instruction +^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = fsub [fast-math flags]* , ; yields {ty}:result + +Overview: +""""""""" + +The '``fsub``' instruction returns the difference of its two operands. + +Note that the '``fsub``' instruction is used to represent the '``fneg``' +instruction present in most other intermediate representations. + +Arguments: +"""""""""" + +The two arguments to the '``fsub``' instruction must be :ref:`floating +point ` or :ref:`vector ` of floating point values. +Both arguments must have identical types. + +Semantics: +"""""""""" + +The value produced is the floating point difference of the two operands. +This instruction can also take any number of :ref:`fast-math +flags `, which are optimization hints to enable otherwise +unsafe floating point optimizations: + +Example: +"""""""" + +.. code-block:: llvm + + = fsub float 4.0, %var ; yields {float}:result = 4.0 - %var + = fsub float -0.0, %val ; yields {float}:result = -%var + +'``mul``' Instruction +^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = mul , ; yields {ty}:result + = mul nuw , ; yields {ty}:result + = mul nsw , ; yields {ty}:result + = mul nuw nsw , ; yields {ty}:result + +Overview: +""""""""" + +The '``mul``' instruction returns the product of its two operands. + +Arguments: +"""""""""" + +The two arguments to the '``mul``' instruction must be +:ref:`integer ` or :ref:`vector ` of integer values. Both +arguments must have identical types. + +Semantics: +"""""""""" + +The value produced is the integer product of the two operands. + +If the result of the multiplication has unsigned overflow, the result +returned is the mathematical result modulo 2\ :sup:`n`\ , where n is the +bit width of the result. + +Because LLVM integers use a two's complement representation, and the +result is the same width as the operands, this instruction returns the +correct result for both signed and unsigned integers. If a full product +(e.g. ``i32`` * ``i32`` -> ``i64``) is needed, the operands should be +sign-extended or zero-extended as appropriate to the width of the full +product. + +``nuw`` and ``nsw`` stand for "No Unsigned Wrap" and "No Signed Wrap", +respectively. If the ``nuw`` and/or ``nsw`` keywords are present, the +result value of the ``mul`` is a :ref:`poison value ` if +unsigned and/or signed overflow, respectively, occurs. + +Example: +"""""""" + +.. code-block:: llvm + + = mul i32 4, %var ; yields {i32}:result = 4 * %var + +.. _i_fmul: + +'``fmul``' Instruction +^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = fmul [fast-math flags]* , ; yields {ty}:result + +Overview: +""""""""" + +The '``fmul``' instruction returns the product of its two operands. + +Arguments: +"""""""""" + +The two arguments to the '``fmul``' instruction must be :ref:`floating +point ` or :ref:`vector ` of floating point values. +Both arguments must have identical types. + +Semantics: +"""""""""" + +The value produced is the floating point product of the two operands. +This instruction can also take any number of :ref:`fast-math +flags `, which are optimization hints to enable otherwise +unsafe floating point optimizations: + +Example: +"""""""" + +.. code-block:: llvm + + = fmul float 4.0, %var ; yields {float}:result = 4.0 * %var + +'``udiv``' Instruction +^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = udiv , ; yields {ty}:result + = udiv exact , ; yields {ty}:result + +Overview: +""""""""" + +The '``udiv``' instruction returns the quotient of its two operands. + +Arguments: +"""""""""" + +The two arguments to the '``udiv``' instruction must be +:ref:`integer ` or :ref:`vector ` of integer values. Both +arguments must have identical types. + +Semantics: +"""""""""" + +The value produced is the unsigned integer quotient of the two operands. + +Note that unsigned integer division and signed integer division are +distinct operations; for signed integer division, use '``sdiv``'. + +Division by zero leads to undefined behavior. + +If the ``exact`` keyword is present, the result value of the ``udiv`` is +a :ref:`poison value ` if %op1 is not a multiple of %op2 (as +such, "((a udiv exact b) mul b) == a"). + +Example: +"""""""" + +.. code-block:: llvm + + = udiv i32 4, %var ; yields {i32}:result = 4 / %var + +'``sdiv``' Instruction +^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = sdiv , ; yields {ty}:result + = sdiv exact , ; yields {ty}:result + +Overview: +""""""""" + +The '``sdiv``' instruction returns the quotient of its two operands. + +Arguments: +"""""""""" + +The two arguments to the '``sdiv``' instruction must be +:ref:`integer ` or :ref:`vector ` of integer values. Both +arguments must have identical types. + +Semantics: +"""""""""" + +The value produced is the signed integer quotient of the two operands +rounded towards zero. + +Note that signed integer division and unsigned integer division are +distinct operations; for unsigned integer division, use '``udiv``'. + +Division by zero leads to undefined behavior. Overflow also leads to +undefined behavior; this is a rare case, but can occur, for example, by +doing a 32-bit division of -2147483648 by -1. + +If the ``exact`` keyword is present, the result value of the ``sdiv`` is +a :ref:`poison value ` if the result would be rounded. + +Example: +"""""""" + +.. code-block:: llvm + + = sdiv i32 4, %var ; yields {i32}:result = 4 / %var + +.. _i_fdiv: + +'``fdiv``' Instruction +^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = fdiv [fast-math flags]* , ; yields {ty}:result + +Overview: +""""""""" + +The '``fdiv``' instruction returns the quotient of its two operands. + +Arguments: +"""""""""" + +The two arguments to the '``fdiv``' instruction must be :ref:`floating +point ` or :ref:`vector ` of floating point values. +Both arguments must have identical types. + +Semantics: +"""""""""" + +The value produced is the floating point quotient of the two operands. +This instruction can also take any number of :ref:`fast-math +flags `, which are optimization hints to enable otherwise +unsafe floating point optimizations: + +Example: +"""""""" + +.. code-block:: llvm + + = fdiv float 4.0, %var ; yields {float}:result = 4.0 / %var + +'``urem``' Instruction +^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = urem , ; yields {ty}:result + +Overview: +""""""""" + +The '``urem``' instruction returns the remainder from the unsigned +division of its two arguments. + +Arguments: +"""""""""" + +The two arguments to the '``urem``' instruction must be +:ref:`integer ` or :ref:`vector ` of integer values. Both +arguments must have identical types. + +Semantics: +"""""""""" + +This instruction returns the unsigned integer *remainder* of a division. +This instruction always performs an unsigned division to get the +remainder. + +Note that unsigned integer remainder and signed integer remainder are +distinct operations; for signed integer remainder, use '``srem``'. + +Taking the remainder of a division by zero leads to undefined behavior. + +Example: +"""""""" + +.. code-block:: llvm + + = urem i32 4, %var ; yields {i32}:result = 4 % %var + +'``srem``' Instruction +^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = srem , ; yields {ty}:result + +Overview: +""""""""" + +The '``srem``' instruction returns the remainder from the signed +division of its two operands. This instruction can also take +:ref:`vector ` versions of the values in which case the elements +must be integers. + +Arguments: +"""""""""" + +The two arguments to the '``srem``' instruction must be +:ref:`integer ` or :ref:`vector ` of integer values. Both +arguments must have identical types. + +Semantics: +"""""""""" + +This instruction returns the *remainder* of a division (where the result +is either zero or has the same sign as the dividend, ``op1``), not the +*modulo* operator (where the result is either zero or has the same sign +as the divisor, ``op2``) of a value. For more information about the +difference, see `The Math +Forum `_. For a +table of how this is implemented in various languages, please see +`Wikipedia: modulo +operation `_. + +Note that signed integer remainder and unsigned integer remainder are +distinct operations; for unsigned integer remainder, use '``urem``'. + +Taking the remainder of a division by zero leads to undefined behavior. +Overflow also leads to undefined behavior; this is a rare case, but can +occur, for example, by taking the remainder of a 32-bit division of +-2147483648 by -1. (The remainder doesn't actually overflow, but this +rule lets srem be implemented using instructions that return both the +result of the division and the remainder.) + +Example: +"""""""" + +.. code-block:: llvm + + = srem i32 4, %var ; yields {i32}:result = 4 % %var + +.. _i_frem: + +'``frem``' Instruction +^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = frem [fast-math flags]* , ; yields {ty}:result + +Overview: +""""""""" + +The '``frem``' instruction returns the remainder from the division of +its two operands. + +Arguments: +"""""""""" + +The two arguments to the '``frem``' instruction must be :ref:`floating +point ` or :ref:`vector ` of floating point values. +Both arguments must have identical types. + +Semantics: +"""""""""" + +This instruction returns the *remainder* of a division. The remainder +has the same sign as the dividend. This instruction can also take any +number of :ref:`fast-math flags `, which are optimization hints +to enable otherwise unsafe floating point optimizations: + +Example: +"""""""" + +.. code-block:: llvm + + = frem float 4.0, %var ; yields {float}:result = 4.0 % %var + +.. _bitwiseops: + +Bitwise Binary Operations +------------------------- + +Bitwise binary operators are used to do various forms of bit-twiddling +in a program. They are generally very efficient instructions and can +commonly be strength reduced from other instructions. They require two +operands of the same type, execute an operation on them, and produce a +single value. The resulting value is the same type as its operands. + +'``shl``' Instruction +^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = shl , ; yields {ty}:result + = shl nuw , ; yields {ty}:result + = shl nsw , ; yields {ty}:result + = shl nuw nsw , ; yields {ty}:result + +Overview: +""""""""" + +The '``shl``' instruction returns the first operand shifted to the left +a specified number of bits. + +Arguments: +"""""""""" + +Both arguments to the '``shl``' instruction must be the same +:ref:`integer ` or :ref:`vector ` of integer type. +'``op2``' is treated as an unsigned value. + +Semantics: +"""""""""" + +The value produced is ``op1`` \* 2\ :sup:`op2` mod 2\ :sup:`n`, +where ``n`` is the width of the result. If ``op2`` is (statically or +dynamically) negative or equal to or larger than the number of bits in +``op1``, the result is undefined. If the arguments are vectors, each +vector element of ``op1`` is shifted by the corresponding shift amount +in ``op2``. + +If the ``nuw`` keyword is present, then the shift produces a :ref:`poison +value ` if it shifts out any non-zero bits. If the +``nsw`` keyword is present, then the shift produces a :ref:`poison +value ` if it shifts out any bits that disagree with the +resultant sign bit. As such, NUW/NSW have the same semantics as they +would if the shift were expressed as a mul instruction with the same +nsw/nuw bits in (mul %op1, (shl 1, %op2)). + +Example: +"""""""" + +.. code-block:: llvm + + = shl i32 4, %var ; yields {i32}: 4 << %var + = shl i32 4, 2 ; yields {i32}: 16 + = shl i32 1, 10 ; yields {i32}: 1024 + = shl i32 1, 32 ; undefined + = shl <2 x i32> < i32 1, i32 1>, < i32 1, i32 2> ; yields: result=<2 x i32> < i32 2, i32 4> + +'``lshr``' Instruction +^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = lshr , ; yields {ty}:result + = lshr exact , ; yields {ty}:result + +Overview: +""""""""" + +The '``lshr``' instruction (logical shift right) returns the first +operand shifted to the right a specified number of bits with zero fill. + +Arguments: +"""""""""" + +Both arguments to the '``lshr``' instruction must be the same +:ref:`integer ` or :ref:`vector ` of integer type. +'``op2``' is treated as an unsigned value. + +Semantics: +"""""""""" + +This instruction always performs a logical shift right operation. The +most significant bits of the result will be filled with zero bits after +the shift. If ``op2`` is (statically or dynamically) equal to or larger +than the number of bits in ``op1``, the result is undefined. If the +arguments are vectors, each vector element of ``op1`` is shifted by the +corresponding shift amount in ``op2``. + +If the ``exact`` keyword is present, the result value of the ``lshr`` is +a :ref:`poison value ` if any of the bits shifted out are +non-zero. + +Example: +"""""""" + +.. code-block:: llvm + + = lshr i32 4, 1 ; yields {i32}:result = 2 + = lshr i32 4, 2 ; yields {i32}:result = 1 + = lshr i8 4, 3 ; yields {i8}:result = 0 + = lshr i8 -2, 1 ; yields {i8}:result = 0x7F + = lshr i32 1, 32 ; undefined + = lshr <2 x i32> < i32 -2, i32 4>, < i32 1, i32 2> ; yields: result=<2 x i32> < i32 0x7FFFFFFF, i32 1> + +'``ashr``' Instruction +^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = ashr , ; yields {ty}:result + = ashr exact , ; yields {ty}:result + +Overview: +""""""""" + +The '``ashr``' instruction (arithmetic shift right) returns the first +operand shifted to the right a specified number of bits with sign +extension. + +Arguments: +"""""""""" + +Both arguments to the '``ashr``' instruction must be the same +:ref:`integer ` or :ref:`vector ` of integer type. +'``op2``' is treated as an unsigned value. + +Semantics: +"""""""""" + +This instruction always performs an arithmetic shift right operation, +The most significant bits of the result will be filled with the sign bit +of ``op1``. If ``op2`` is (statically or dynamically) equal to or larger +than the number of bits in ``op1``, the result is undefined. If the +arguments are vectors, each vector element of ``op1`` is shifted by the +corresponding shift amount in ``op2``. + +If the ``exact`` keyword is present, the result value of the ``ashr`` is +a :ref:`poison value ` if any of the bits shifted out are +non-zero. + +Example: +"""""""" + +.. code-block:: llvm + + = ashr i32 4, 1 ; yields {i32}:result = 2 + = ashr i32 4, 2 ; yields {i32}:result = 1 + = ashr i8 4, 3 ; yields {i8}:result = 0 + = ashr i8 -2, 1 ; yields {i8}:result = -1 + = ashr i32 1, 32 ; undefined + = ashr <2 x i32> < i32 -2, i32 4>, < i32 1, i32 3> ; yields: result=<2 x i32> < i32 -1, i32 0> + +'``and``' Instruction +^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = and , ; yields {ty}:result + +Overview: +""""""""" + +The '``and``' instruction returns the bitwise logical and of its two +operands. + +Arguments: +"""""""""" + +The two arguments to the '``and``' instruction must be +:ref:`integer ` or :ref:`vector ` of integer values. Both +arguments must have identical types. + +Semantics: +"""""""""" + +The truth table used for the '``and``' instruction is: + ++-----+-----+-----+ +| In0 | In1 | Out | ++-----+-----+-----+ +| 0 | 0 | 0 | ++-----+-----+-----+ +| 0 | 1 | 0 | ++-----+-----+-----+ +| 1 | 0 | 0 | ++-----+-----+-----+ +| 1 | 1 | 1 | ++-----+-----+-----+ + +Example: +"""""""" + +.. code-block:: llvm + + = and i32 4, %var ; yields {i32}:result = 4 & %var + = and i32 15, 40 ; yields {i32}:result = 8 + = and i32 4, 8 ; yields {i32}:result = 0 + +'``or``' Instruction +^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = or , ; yields {ty}:result + +Overview: +""""""""" + +The '``or``' instruction returns the bitwise logical inclusive or of its +two operands. + +Arguments: +"""""""""" + +The two arguments to the '``or``' instruction must be +:ref:`integer ` or :ref:`vector ` of integer values. Both +arguments must have identical types. + +Semantics: +"""""""""" + +The truth table used for the '``or``' instruction is: + ++-----+-----+-----+ +| In0 | In1 | Out | ++-----+-----+-----+ +| 0 | 0 | 0 | ++-----+-----+-----+ +| 0 | 1 | 1 | ++-----+-----+-----+ +| 1 | 0 | 1 | ++-----+-----+-----+ +| 1 | 1 | 1 | ++-----+-----+-----+ + +Example: +"""""""" + +:: + + = or i32 4, %var ; yields {i32}:result = 4 | %var + = or i32 15, 40 ; yields {i32}:result = 47 + = or i32 4, 8 ; yields {i32}:result = 12 + +'``xor``' Instruction +^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = xor , ; yields {ty}:result + +Overview: +""""""""" + +The '``xor``' instruction returns the bitwise logical exclusive or of +its two operands. The ``xor`` is used to implement the "one's +complement" operation, which is the "~" operator in C. + +Arguments: +"""""""""" + +The two arguments to the '``xor``' instruction must be +:ref:`integer ` or :ref:`vector ` of integer values. Both +arguments must have identical types. + +Semantics: +"""""""""" + +The truth table used for the '``xor``' instruction is: + ++-----+-----+-----+ +| In0 | In1 | Out | ++-----+-----+-----+ +| 0 | 0 | 0 | ++-----+-----+-----+ +| 0 | 1 | 1 | ++-----+-----+-----+ +| 1 | 0 | 1 | ++-----+-----+-----+ +| 1 | 1 | 0 | ++-----+-----+-----+ + +Example: +"""""""" + +.. code-block:: llvm + + = xor i32 4, %var ; yields {i32}:result = 4 ^ %var + = xor i32 15, 40 ; yields {i32}:result = 39 + = xor i32 4, 8 ; yields {i32}:result = 12 + = xor i32 %V, -1 ; yields {i32}:result = ~%V + +Vector Operations +----------------- + +LLVM supports several instructions to represent vector operations in a +target-independent manner. These instructions cover the element-access +and vector-specific operations needed to process vectors effectively. +While LLVM does directly support these vector operations, many +sophisticated algorithms will want to use target-specific intrinsics to +take full advantage of a specific target. + +.. _i_extractelement: + +'``extractelement``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = extractelement > , i32 ; yields + +Overview: +""""""""" + +The '``extractelement``' instruction extracts a single scalar element +from a vector at a specified index. + +Arguments: +"""""""""" + +The first operand of an '``extractelement``' instruction is a value of +:ref:`vector ` type. The second operand is an index indicating +the position from which to extract the element. The index may be a +variable. + +Semantics: +"""""""""" + +The result is a scalar of the same type as the element type of ``val``. +Its value is the value at position ``idx`` of ``val``. If ``idx`` +exceeds the length of ``val``, the results are undefined. + +Example: +"""""""" + +.. code-block:: llvm + + = extractelement <4 x i32> %vec, i32 0 ; yields i32 + +.. _i_insertelement: + +'``insertelement``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = insertelement > , , i32 ; yields > + +Overview: +""""""""" + +The '``insertelement``' instruction inserts a scalar element into a +vector at a specified index. + +Arguments: +"""""""""" + +The first operand of an '``insertelement``' instruction is a value of +:ref:`vector ` type. The second operand is a scalar value whose +type must equal the element type of the first operand. The third operand +is an index indicating the position at which to insert the value. The +index may be a variable. + +Semantics: +"""""""""" + +The result is a vector of the same type as ``val``. Its element values +are those of ``val`` except at position ``idx``, where it gets the value +``elt``. If ``idx`` exceeds the length of ``val``, the results are +undefined. + +Example: +"""""""" + +.. code-block:: llvm + + = insertelement <4 x i32> %vec, i32 1, i32 0 ; yields <4 x i32> + +.. _i_shufflevector: + +'``shufflevector``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = shufflevector > , > , ; yields > + +Overview: +""""""""" + +The '``shufflevector``' instruction constructs a permutation of elements +from two input vectors, returning a vector with the same element type as +the input and length that is the same as the shuffle mask. + +Arguments: +"""""""""" + +The first two operands of a '``shufflevector``' instruction are vectors +with the same type. The third argument is a shuffle mask whose element +type is always 'i32'. The result of the instruction is a vector whose +length is the same as the shuffle mask and whose element type is the +same as the element type of the first two operands. + +The shuffle mask operand is required to be a constant vector with either +constant integer or undef values. + +Semantics: +"""""""""" + +The elements of the two input vectors are numbered from left to right +across both of the vectors. The shuffle mask operand specifies, for each +element of the result vector, which element of the two input vectors the +result element gets. The element selector may be undef (meaning "don't +care") and the second operand may be undef if performing a shuffle from +only one vector. + +Example: +"""""""" + +.. code-block:: llvm + + = shufflevector <4 x i32> %v1, <4 x i32> %v2, + <4 x i32> ; yields <4 x i32> + = shufflevector <4 x i32> %v1, <4 x i32> undef, + <4 x i32> ; yields <4 x i32> - Identity shuffle. + = shufflevector <8 x i32> %v1, <8 x i32> undef, + <4 x i32> ; yields <4 x i32> + = shufflevector <4 x i32> %v1, <4 x i32> %v2, + <8 x i32> ; yields <8 x i32> + +Aggregate Operations +-------------------- + +LLVM supports several instructions for working with +:ref:`aggregate ` values. + +.. _i_extractvalue: + +'``extractvalue``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = extractvalue , {, }* + +Overview: +""""""""" + +The '``extractvalue``' instruction extracts the value of a member field +from an :ref:`aggregate ` value. + +Arguments: +"""""""""" + +The first operand of an '``extractvalue``' instruction is a value of +:ref:`struct ` or :ref:`array ` type. The operands are +constant indices to specify which value to extract in a similar manner +as indices in a '``getelementptr``' instruction. + +The major differences to ``getelementptr`` indexing are: + +- Since the value being indexed is not a pointer, the first index is + omitted and assumed to be zero. +- At least one index must be specified. +- Not only struct indices but also array indices must be in bounds. + +Semantics: +"""""""""" + +The result is the value at the position in the aggregate specified by +the index operands. + +Example: +"""""""" + +.. code-block:: llvm + + = extractvalue {i32, float} %agg, 0 ; yields i32 + +.. _i_insertvalue: + +'``insertvalue``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = insertvalue , , {, }* ; yields + +Overview: +""""""""" + +The '``insertvalue``' instruction inserts a value into a member field in +an :ref:`aggregate ` value. + +Arguments: +"""""""""" + +The first operand of an '``insertvalue``' instruction is a value of +:ref:`struct ` or :ref:`array ` type. The second operand is +a first-class value to insert. The following operands are constant +indices indicating the position at which to insert the value in a +similar manner as indices in a '``extractvalue``' instruction. The value +to insert must have the same type as the value identified by the +indices. + +Semantics: +"""""""""" + +The result is an aggregate of the same type as ``val``. Its value is +that of ``val`` except that the value at the position specified by the +indices is that of ``elt``. + +Example: +"""""""" + +.. code-block:: llvm + + %agg1 = insertvalue {i32, float} undef, i32 1, 0 ; yields {i32 1, float undef} + %agg2 = insertvalue {i32, float} %agg1, float %val, 1 ; yields {i32 1, float %val} + %agg3 = insertvalue {i32, {float}} %agg1, float %val, 1, 0 ; yields {i32 1, float %val} + +.. _memoryops: + +Memory Access and Addressing Operations +--------------------------------------- + +A key design point of an SSA-based representation is how it represents +memory. In LLVM, no memory locations are in SSA form, which makes things +very simple. This section describes how to read, write, and allocate +memory in LLVM. + +.. _i_alloca: + +'``alloca``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = alloca [, ][, align ] ; yields {type*}:result + +Overview: +""""""""" + +The '``alloca``' instruction allocates memory on the stack frame of the +currently executing function, to be automatically released when this +function returns to its caller. The object is always allocated in the +generic address space (address space zero). + +Arguments: +"""""""""" + +The '``alloca``' instruction allocates ``sizeof()*NumElements`` +bytes of memory on the runtime stack, returning a pointer of the +appropriate type to the program. If "NumElements" is specified, it is +the number of elements allocated, otherwise "NumElements" is defaulted +to be one. If a constant alignment is specified, the value result of the +allocation is guaranteed to be aligned to at least that boundary. If not +specified, or if zero, the target can choose to align the allocation on +any convenient boundary compatible with the type. + +'``type``' may be any sized type. + +Semantics: +"""""""""" + +Memory is allocated; a pointer is returned. The operation is undefined +if there is insufficient stack space for the allocation. '``alloca``'d +memory is automatically released when the function returns. The +'``alloca``' instruction is commonly used to represent automatic +variables that must have an address available. When the function returns +(either with the ``ret`` or ``resume`` instructions), the memory is +reclaimed. Allocating zero bytes is legal, but the result is undefined. +The order in which memory is allocated (ie., which way the stack grows) +is not specified. + +Example: +"""""""" + +.. code-block:: llvm + + %ptr = alloca i32 ; yields {i32*}:ptr + %ptr = alloca i32, i32 4 ; yields {i32*}:ptr + %ptr = alloca i32, i32 4, align 1024 ; yields {i32*}:ptr + %ptr = alloca i32, align 1024 ; yields {i32*}:ptr + +.. _i_load: + +'``load``' Instruction +^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = load [volatile] * [, align ][, !nontemporal !][, !invariant.load !] + = load atomic [volatile] * [singlethread] , align + ! = !{ i32 1 } + +Overview: +""""""""" + +The '``load``' instruction is used to read from memory. + +Arguments: +"""""""""" + +The argument to the ``load`` instruction specifies the memory address +from which to load. The pointer must point to a :ref:`first +class ` type. If the ``load`` is marked as ``volatile``, +then the optimizer is not allowed to modify the number or order of +execution of this ``load`` with other :ref:`volatile +operations `. + +If the ``load`` is marked as ``atomic``, it takes an extra +:ref:`ordering ` and optional ``singlethread`` argument. The +``release`` and ``acq_rel`` orderings are not valid on ``load`` +instructions. Atomic loads produce :ref:`defined ` results +when they may see multiple atomic stores. The type of the pointee must +be an integer type whose bit width is a power of two greater than or +equal to eight and less than or equal to a target-specific size limit. +``align`` must be explicitly specified on atomic loads, and the load has +undefined behavior if the alignment is not set to a value which is at +least the size in bytes of the pointee. ``!nontemporal`` does not have +any defined semantics for atomic loads. + +The optional constant ``align`` argument specifies the alignment of the +operation (that is, the alignment of the memory address). A value of 0 +or an omitted ``align`` argument means that the operation has the ABI +alignment for the target. It is the responsibility of the code emitter +to ensure that the alignment information is correct. Overestimating the +alignment results in undefined behavior. Underestimating the alignment +may produce less efficient code. An alignment of 1 is always safe. + +The optional ``!nontemporal`` metadata must reference a single +metadata name ```` corresponding to a metadata node with one +``i32`` entry of value 1. The existence of the ``!nontemporal`` +metadata on the instruction tells the optimizer and code generator +that this load is not expected to be reused in the cache. The code +generator may select special instructions to save cache bandwidth, such +as the ``MOVNT`` instruction on x86. + +The optional ``!invariant.load`` metadata must reference a single +metadata name ```` corresponding to a metadata node with no +entries. The existence of the ``!invariant.load`` metadata on the +instruction tells the optimizer and code generator that this load +address points to memory which does not change value during program +execution. The optimizer may then move this load around, for example, by +hoisting it out of loops using loop invariant code motion. + +Semantics: +"""""""""" + +The location of memory pointed to is loaded. If the value being loaded +is of scalar type then the number of bytes read does not exceed the +minimum number of bytes needed to hold all bits of the type. For +example, loading an ``i24`` reads at most three bytes. When loading a +value of a type like ``i20`` with a size that is not an integral number +of bytes, the result is undefined if the value was not originally +written using a store of the same type. + +Examples: +""""""""" + +.. code-block:: llvm + + %ptr = alloca i32 ; yields {i32*}:ptr + store i32 3, i32* %ptr ; yields {void} + %val = load i32* %ptr ; yields {i32}:val = i32 3 + +.. _i_store: + +'``store``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + store [volatile] , * [, align ][, !nontemporal !] ; yields {void} + store atomic [volatile] , * [singlethread] , align ; yields {void} + +Overview: +""""""""" + +The '``store``' instruction is used to write to memory. + +Arguments: +"""""""""" + +There are two arguments to the ``store`` instruction: a value to store +and an address at which to store it. The type of the ```` +operand must be a pointer to the :ref:`first class ` type of +the ```` operand. If the ``store`` is marked as ``volatile``, +then the optimizer is not allowed to modify the number or order of +execution of this ``store`` with other :ref:`volatile +operations `. + +If the ``store`` is marked as ``atomic``, it takes an extra +:ref:`ordering ` and optional ``singlethread`` argument. The +``acquire`` and ``acq_rel`` orderings aren't valid on ``store`` +instructions. Atomic loads produce :ref:`defined ` results +when they may see multiple atomic stores. The type of the pointee must +be an integer type whose bit width is a power of two greater than or +equal to eight and less than or equal to a target-specific size limit. +``align`` must be explicitly specified on atomic stores, and the store +has undefined behavior if the alignment is not set to a value which is +at least the size in bytes of the pointee. ``!nontemporal`` does not +have any defined semantics for atomic stores. + +The optional constant ``align`` argument specifies the alignment of the +operation (that is, the alignment of the memory address). A value of 0 +or an omitted ``align`` argument means that the operation has the ABI +alignment for the target. It is the responsibility of the code emitter +to ensure that the alignment information is correct. Overestimating the +alignment results in undefined behavior. Underestimating the +alignment may produce less efficient code. An alignment of 1 is always +safe. + +The optional ``!nontemporal`` metadata must reference a single metadata +name ```` corresponding to a metadata node with one ``i32`` entry of +value 1. The existence of the ``!nontemporal`` metadata on the instruction +tells the optimizer and code generator that this load is not expected to +be reused in the cache. The code generator may select special +instructions to save cache bandwidth, such as the MOVNT instruction on +x86. + +Semantics: +"""""""""" + +The contents of memory are updated to contain ```` at the +location specified by the ```` operand. If ```` is +of scalar type then the number of bytes written does not exceed the +minimum number of bytes needed to hold all bits of the type. For +example, storing an ``i24`` writes at most three bytes. When writing a +value of a type like ``i20`` with a size that is not an integral number +of bytes, it is unspecified what happens to the extra bits that do not +belong to the type, but they will typically be overwritten. + +Example: +"""""""" + +.. code-block:: llvm + + %ptr = alloca i32 ; yields {i32*}:ptr + store i32 3, i32* %ptr ; yields {void} + %val = load i32* %ptr ; yields {i32}:val = i32 3 + +.. _i_fence: + +'``fence``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + fence [singlethread] ; yields {void} + +Overview: +""""""""" + +The '``fence``' instruction is used to introduce happens-before edges +between operations. + +Arguments: +"""""""""" + +'``fence``' instructions take an :ref:`ordering ` argument which +defines what *synchronizes-with* edges they add. They can only be given +``acquire``, ``release``, ``acq_rel``, and ``seq_cst`` orderings. + +Semantics: +"""""""""" + +A fence A which has (at least) ``release`` ordering semantics +*synchronizes with* a fence B with (at least) ``acquire`` ordering +semantics if and only if there exist atomic operations X and Y, both +operating on some atomic object M, such that A is sequenced before X, X +modifies M (either directly or through some side effect of a sequence +headed by X), Y is sequenced before B, and Y observes M. This provides a +*happens-before* dependency between A and B. Rather than an explicit +``fence``, one (but not both) of the atomic operations X or Y might +provide a ``release`` or ``acquire`` (resp.) ordering constraint and +still *synchronize-with* the explicit ``fence`` and establish the +*happens-before* edge. + +A ``fence`` which has ``seq_cst`` ordering, in addition to having both +``acquire`` and ``release`` semantics specified above, participates in +the global program order of other ``seq_cst`` operations and/or fences. + +The optional ":ref:`singlethread `" argument specifies +that the fence only synchronizes with other fences in the same thread. +(This is useful for interacting with signal handlers.) + +Example: +"""""""" + +.. code-block:: llvm + + fence acquire ; yields {void} + fence singlethread seq_cst ; yields {void} + +.. _i_cmpxchg: + +'``cmpxchg``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + cmpxchg [volatile] * , , [singlethread] ; yields {ty} + +Overview: +""""""""" + +The '``cmpxchg``' instruction is used to atomically modify memory. It +loads a value in memory and compares it to a given value. If they are +equal, it stores a new value into the memory. + +Arguments: +"""""""""" + +There are three arguments to the '``cmpxchg``' instruction: an address +to operate on, a value to compare to the value currently be at that +address, and a new value to place at that address if the compared values +are equal. The type of '' must be an integer type whose bit width +is a power of two greater than or equal to eight and less than or equal +to a target-specific size limit. '' and '' must have the same +type, and the type of '' must be a pointer to that type. If the +``cmpxchg`` is marked as ``volatile``, then the optimizer is not allowed +to modify the number or order of execution of this ``cmpxchg`` with +other :ref:`volatile operations `. + +The :ref:`ordering ` argument specifies how this ``cmpxchg`` +synchronizes with other atomic operations. + +The optional "``singlethread``" argument declares that the ``cmpxchg`` +is only atomic with respect to code (usually signal handlers) running in +the same thread as the ``cmpxchg``. Otherwise the cmpxchg is atomic with +respect to all other code in the system. + +The pointer passed into cmpxchg must have alignment greater than or +equal to the size in memory of the operand. + +Semantics: +"""""""""" + +The contents of memory at the location specified by the '````' +operand is read and compared to '````'; if the read value is the +equal, '````' is written. The original value at the location is +returned. + +A successful ``cmpxchg`` is a read-modify-write instruction for the purpose +of identifying release sequences. A failed ``cmpxchg`` is equivalent to an +atomic load with an ordering parameter determined by dropping any +``release`` part of the ``cmpxchg``'s ordering. + +Example: +"""""""" + +.. code-block:: llvm + + entry: + %orig = atomic load i32* %ptr unordered ; yields {i32} + br label %loop + + loop: + %cmp = phi i32 [ %orig, %entry ], [%old, %loop] + %squared = mul i32 %cmp, %cmp + %old = cmpxchg i32* %ptr, i32 %cmp, i32 %squared ; yields {i32} + %success = icmp eq i32 %cmp, %old + br i1 %success, label %done, label %loop + + done: + ... + +.. _i_atomicrmw: + +'``atomicrmw``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + atomicrmw [volatile] * , [singlethread] ; yields {ty} + +Overview: +""""""""" + +The '``atomicrmw``' instruction is used to atomically modify memory. + +Arguments: +"""""""""" + +There are three arguments to the '``atomicrmw``' instruction: an +operation to apply, an address whose value to modify, an argument to the +operation. The operation must be one of the following keywords: + +- xchg +- add +- sub +- and +- nand +- or +- xor +- max +- min +- umax +- umin + +The type of '' must be an integer type whose bit width is a power +of two greater than or equal to eight and less than or equal to a +target-specific size limit. The type of the '````' operand must +be a pointer to that type. If the ``atomicrmw`` is marked as +``volatile``, then the optimizer is not allowed to modify the number or +order of execution of this ``atomicrmw`` with other :ref:`volatile +operations `. + +Semantics: +"""""""""" + +The contents of memory at the location specified by the '````' +operand are atomically read, modified, and written back. The original +value at the location is returned. The modification is specified by the +operation argument: + +- xchg: ``*ptr = val`` +- add: ``*ptr = *ptr + val`` +- sub: ``*ptr = *ptr - val`` +- and: ``*ptr = *ptr & val`` +- nand: ``*ptr = ~(*ptr & val)`` +- or: ``*ptr = *ptr | val`` +- xor: ``*ptr = *ptr ^ val`` +- max: ``*ptr = *ptr > val ? *ptr : val`` (using a signed comparison) +- min: ``*ptr = *ptr < val ? *ptr : val`` (using a signed comparison) +- umax: ``*ptr = *ptr > val ? *ptr : val`` (using an unsigned + comparison) +- umin: ``*ptr = *ptr < val ? *ptr : val`` (using an unsigned + comparison) + +Example: +"""""""" + +.. code-block:: llvm + + %old = atomicrmw add i32* %ptr, i32 1 acquire ; yields {i32} + +.. _i_getelementptr: + +'``getelementptr``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = getelementptr * {, }* + = getelementptr inbounds * {, }* + = getelementptr ptrval, idx + +Overview: +""""""""" + +The '``getelementptr``' instruction is used to get the address of a +subelement of an :ref:`aggregate ` data structure. It performs +address calculation only and does not access memory. + +Arguments: +"""""""""" + +The first argument is always a pointer or a vector of pointers, and +forms the basis of the calculation. The remaining arguments are indices +that indicate which of the elements of the aggregate object are indexed. +The interpretation of each index is dependent on the type being indexed +into. The first index always indexes the pointer value given as the +first argument, the second index indexes a value of the type pointed to +(not necessarily the value directly pointed to, since the first index +can be non-zero), etc. The first type indexed into must be a pointer +value, subsequent types can be arrays, vectors, and structs. Note that +subsequent types being indexed into can never be pointers, since that +would require loading the pointer before continuing calculation. + +The type of each index argument depends on the type it is indexing into. +When indexing into a (optionally packed) structure, only ``i32`` integer +**constants** are allowed (when using a vector of indices they must all +be the **same** ``i32`` integer constant). When indexing into an array, +pointer or vector, integers of any width are allowed, and they are not +required to be constant. These integers are treated as signed values +where relevant. + +For example, let's consider a C code fragment and how it gets compiled +to LLVM: + +.. code-block:: c + + struct RT { + char A; + int B[10][20]; + char C; + }; + struct ST { + int X; + double Y; + struct RT Z; + }; + + int *foo(struct ST *s) { + return &s[1].Z.B[5][13]; + } + +The LLVM code generated by Clang is: + +.. code-block:: llvm + + %struct.RT = type { i8, [10 x [20 x i32]], i8 } + %struct.ST = type { i32, double, %struct.RT } + + define i32* @foo(%struct.ST* %s) nounwind uwtable readnone optsize ssp { + entry: + %arrayidx = getelementptr inbounds %struct.ST* %s, i64 1, i32 2, i32 1, i64 5, i64 13 + ret i32* %arrayidx + } + +Semantics: +"""""""""" + +In the example above, the first index is indexing into the +'``%struct.ST*``' type, which is a pointer, yielding a '``%struct.ST``' += '``{ i32, double, %struct.RT }``' type, a structure. The second index +indexes into the third element of the structure, yielding a +'``%struct.RT``' = '``{ i8 , [10 x [20 x i32]], i8 }``' type, another +structure. The third index indexes into the second element of the +structure, yielding a '``[10 x [20 x i32]]``' type, an array. The two +dimensions of the array are subscripted into, yielding an '``i32``' +type. The '``getelementptr``' instruction returns a pointer to this +element, thus computing a value of '``i32*``' type. + +Note that it is perfectly legal to index partially through a structure, +returning a pointer to an inner element. Because of this, the LLVM code +for the given testcase is equivalent to: + +.. code-block:: llvm + + define i32* @foo(%struct.ST* %s) { + %t1 = getelementptr %struct.ST* %s, i32 1 ; yields %struct.ST*:%t1 + %t2 = getelementptr %struct.ST* %t1, i32 0, i32 2 ; yields %struct.RT*:%t2 + %t3 = getelementptr %struct.RT* %t2, i32 0, i32 1 ; yields [10 x [20 x i32]]*:%t3 + %t4 = getelementptr [10 x [20 x i32]]* %t3, i32 0, i32 5 ; yields [20 x i32]*:%t4 + %t5 = getelementptr [20 x i32]* %t4, i32 0, i32 13 ; yields i32*:%t5 + ret i32* %t5 + } + +If the ``inbounds`` keyword is present, the result value of the +``getelementptr`` is a :ref:`poison value ` if the base +pointer is not an *in bounds* address of an allocated object, or if any +of the addresses that would be formed by successive addition of the +offsets implied by the indices to the base address with infinitely +precise signed arithmetic are not an *in bounds* address of that +allocated object. The *in bounds* addresses for an allocated object are +all the addresses that point into the object, plus the address one byte +past the end. In cases where the base is a vector of pointers the +``inbounds`` keyword applies to each of the computations element-wise. + +If the ``inbounds`` keyword is not present, the offsets are added to the +base address with silently-wrapping two's complement arithmetic. If the +offsets have a different width from the pointer, they are sign-extended +or truncated to the width of the pointer. The result value of the +``getelementptr`` may be outside the object pointed to by the base +pointer. The result value may not necessarily be used to access memory +though, even if it happens to point into allocated storage. See the +:ref:`Pointer Aliasing Rules ` section for more +information. + +The getelementptr instruction is often confusing. For some more insight +into how it works, see :doc:`the getelementptr FAQ `. + +Example: +"""""""" + +.. code-block:: llvm + + ; yields [12 x i8]*:aptr + %aptr = getelementptr {i32, [12 x i8]}* %saptr, i64 0, i32 1 + ; yields i8*:vptr + %vptr = getelementptr {i32, <2 x i8>}* %svptr, i64 0, i32 1, i32 1 + ; yields i8*:eptr + %eptr = getelementptr [12 x i8]* %aptr, i64 0, i32 1 + ; yields i32*:iptr + %iptr = getelementptr [10 x i32]* @arr, i16 0, i16 0 + +In cases where the pointer argument is a vector of pointers, each index +must be a vector with the same number of elements. For example: + +.. code-block:: llvm + + %A = getelementptr <4 x i8*> %ptrs, <4 x i64> %offsets, + +Conversion Operations +--------------------- + +The instructions in this category are the conversion instructions +(casting) which all take a single operand and a type. They perform +various bit conversions on the operand. + +'``trunc .. to``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = trunc to ; yields ty2 + +Overview: +""""""""" + +The '``trunc``' instruction truncates its operand to the type ``ty2``. + +Arguments: +"""""""""" + +The '``trunc``' instruction takes a value to trunc, and a type to trunc +it to. Both types must be of :ref:`integer ` types, or vectors +of the same number of integers. The bit size of the ``value`` must be +larger than the bit size of the destination type, ``ty2``. Equal sized +types are not allowed. + +Semantics: +"""""""""" + +The '``trunc``' instruction truncates the high order bits in ``value`` +and converts the remaining bits to ``ty2``. Since the source size must +be larger than the destination size, ``trunc`` cannot be a *no-op cast*. +It will always truncate bits. + +Example: +"""""""" + +.. code-block:: llvm + + %X = trunc i32 257 to i8 ; yields i8:1 + %Y = trunc i32 123 to i1 ; yields i1:true + %Z = trunc i32 122 to i1 ; yields i1:false + %W = trunc <2 x i16> to <2 x i8> ; yields + +'``zext .. to``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = zext to ; yields ty2 + +Overview: +""""""""" + +The '``zext``' instruction zero extends its operand to type ``ty2``. + +Arguments: +"""""""""" + +The '``zext``' instruction takes a value to cast, and a type to cast it +to. Both types must be of :ref:`integer ` types, or vectors of +the same number of integers. The bit size of the ``value`` must be +smaller than the bit size of the destination type, ``ty2``. + +Semantics: +"""""""""" + +The ``zext`` fills the high order bits of the ``value`` with zero bits +until it reaches the size of the destination type, ``ty2``. + +When zero extending from i1, the result will always be either 0 or 1. + +Example: +"""""""" + +.. code-block:: llvm + + %X = zext i32 257 to i64 ; yields i64:257 + %Y = zext i1 true to i32 ; yields i32:1 + %Z = zext <2 x i16> to <2 x i32> ; yields + +'``sext .. to``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = sext to ; yields ty2 + +Overview: +""""""""" + +The '``sext``' sign extends ``value`` to the type ``ty2``. + +Arguments: +"""""""""" + +The '``sext``' instruction takes a value to cast, and a type to cast it +to. Both types must be of :ref:`integer ` types, or vectors of +the same number of integers. The bit size of the ``value`` must be +smaller than the bit size of the destination type, ``ty2``. + +Semantics: +"""""""""" + +The '``sext``' instruction performs a sign extension by copying the sign +bit (highest order bit) of the ``value`` until it reaches the bit size +of the type ``ty2``. + +When sign extending from i1, the extension always results in -1 or 0. + +Example: +"""""""" + +.. code-block:: llvm + + %X = sext i8 -1 to i16 ; yields i16 :65535 + %Y = sext i1 true to i32 ; yields i32:-1 + %Z = sext <2 x i16> to <2 x i32> ; yields + +'``fptrunc .. to``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = fptrunc to ; yields ty2 + +Overview: +""""""""" + +The '``fptrunc``' instruction truncates ``value`` to type ``ty2``. + +Arguments: +"""""""""" + +The '``fptrunc``' instruction takes a :ref:`floating point ` +value to cast and a :ref:`floating point ` type to cast it to. +The size of ``value`` must be larger than the size of ``ty2``. This +implies that ``fptrunc`` cannot be used to make a *no-op cast*. + +Semantics: +"""""""""" + +The '``fptrunc``' instruction truncates a ``value`` from a larger +:ref:`floating point ` type to a smaller :ref:`floating +point ` type. If the value cannot fit within the +destination type, ``ty2``, then the results are undefined. + +Example: +"""""""" + +.. code-block:: llvm + + %X = fptrunc double 123.0 to float ; yields float:123.0 + %Y = fptrunc double 1.0E+300 to float ; yields undefined + +'``fpext .. to``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = fpext to ; yields ty2 + +Overview: +""""""""" + +The '``fpext``' extends a floating point ``value`` to a larger floating +point value. + +Arguments: +"""""""""" + +The '``fpext``' instruction takes a :ref:`floating point ` +``value`` to cast, and a :ref:`floating point ` type to cast it +to. The source type must be smaller than the destination type. + +Semantics: +"""""""""" + +The '``fpext``' instruction extends the ``value`` from a smaller +:ref:`floating point ` type to a larger :ref:`floating +point ` type. The ``fpext`` cannot be used to make a +*no-op cast* because it always changes bits. Use ``bitcast`` to make a +*no-op cast* for a floating point cast. + +Example: +"""""""" + +.. code-block:: llvm + + %X = fpext float 3.125 to double ; yields double:3.125000e+00 + %Y = fpext double %X to fp128 ; yields fp128:0xL00000000000000004000900000000000 + +'``fptoui .. to``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = fptoui to ; yields ty2 + +Overview: +""""""""" + +The '``fptoui``' converts a floating point ``value`` to its unsigned +integer equivalent of type ``ty2``. + +Arguments: +"""""""""" + +The '``fptoui``' instruction takes a value to cast, which must be a +scalar or vector :ref:`floating point ` value, and a type to +cast it to ``ty2``, which must be an :ref:`integer ` type. If +``ty`` is a vector floating point type, ``ty2`` must be a vector integer +type with the same number of elements as ``ty`` + +Semantics: +"""""""""" + +The '``fptoui``' instruction converts its :ref:`floating +point ` operand into the nearest (rounding towards zero) +unsigned integer value. If the value cannot fit in ``ty2``, the results +are undefined. + +Example: +"""""""" + +.. code-block:: llvm + + %X = fptoui double 123.0 to i32 ; yields i32:123 + %Y = fptoui float 1.0E+300 to i1 ; yields undefined:1 + %Z = fptoui float 1.04E+17 to i8 ; yields undefined:1 + +'``fptosi .. to``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = fptosi to ; yields ty2 + +Overview: +""""""""" + +The '``fptosi``' instruction converts :ref:`floating point ` +``value`` to type ``ty2``. + +Arguments: +"""""""""" + +The '``fptosi``' instruction takes a value to cast, which must be a +scalar or vector :ref:`floating point ` value, and a type to +cast it to ``ty2``, which must be an :ref:`integer ` type. If +``ty`` is a vector floating point type, ``ty2`` must be a vector integer +type with the same number of elements as ``ty`` + +Semantics: +"""""""""" + +The '``fptosi``' instruction converts its :ref:`floating +point ` operand into the nearest (rounding towards zero) +signed integer value. If the value cannot fit in ``ty2``, the results +are undefined. + +Example: +"""""""" + +.. code-block:: llvm + + %X = fptosi double -123.0 to i32 ; yields i32:-123 + %Y = fptosi float 1.0E-247 to i1 ; yields undefined:1 + %Z = fptosi float 1.04E+17 to i8 ; yields undefined:1 + +'``uitofp .. to``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = uitofp to ; yields ty2 + +Overview: +""""""""" + +The '``uitofp``' instruction regards ``value`` as an unsigned integer +and converts that value to the ``ty2`` type. + +Arguments: +"""""""""" + +The '``uitofp``' instruction takes a value to cast, which must be a +scalar or vector :ref:`integer ` value, and a type to cast it to +``ty2``, which must be an :ref:`floating point ` type. If +``ty`` is a vector integer type, ``ty2`` must be a vector floating point +type with the same number of elements as ``ty`` + +Semantics: +"""""""""" + +The '``uitofp``' instruction interprets its operand as an unsigned +integer quantity and converts it to the corresponding floating point +value. If the value cannot fit in the floating point value, the results +are undefined. + +Example: +"""""""" + +.. code-block:: llvm + + %X = uitofp i32 257 to float ; yields float:257.0 + %Y = uitofp i8 -1 to double ; yields double:255.0 + +'``sitofp .. to``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = sitofp to ; yields ty2 + +Overview: +""""""""" + +The '``sitofp``' instruction regards ``value`` as a signed integer and +converts that value to the ``ty2`` type. + +Arguments: +"""""""""" + +The '``sitofp``' instruction takes a value to cast, which must be a +scalar or vector :ref:`integer ` value, and a type to cast it to +``ty2``, which must be an :ref:`floating point ` type. If +``ty`` is a vector integer type, ``ty2`` must be a vector floating point +type with the same number of elements as ``ty`` + +Semantics: +"""""""""" + +The '``sitofp``' instruction interprets its operand as a signed integer +quantity and converts it to the corresponding floating point value. If +the value cannot fit in the floating point value, the results are +undefined. + +Example: +"""""""" + +.. code-block:: llvm + + %X = sitofp i32 257 to float ; yields float:257.0 + %Y = sitofp i8 -1 to double ; yields double:-1.0 + +.. _i_ptrtoint: + +'``ptrtoint .. to``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = ptrtoint to ; yields ty2 + +Overview: +""""""""" + +The '``ptrtoint``' instruction converts the pointer or a vector of +pointers ``value`` to the integer (or vector of integers) type ``ty2``. + +Arguments: +"""""""""" + +The '``ptrtoint``' instruction takes a ``value`` to cast, which must be +a a value of type :ref:`pointer ` or a vector of pointers, and a +type to cast it to ``ty2``, which must be an :ref:`integer ` or +a vector of integers type. + +Semantics: +"""""""""" + +The '``ptrtoint``' instruction converts ``value`` to integer type +``ty2`` by interpreting the pointer value as an integer and either +truncating or zero extending that value to the size of the integer type. +If ``value`` is smaller than ``ty2`` then a zero extension is done. If +``value`` is larger than ``ty2`` then a truncation is done. If they are +the same size, then nothing is done (*no-op cast*) other than a type +change. + +Example: +"""""""" + +.. code-block:: llvm + + %X = ptrtoint i32* %P to i8 ; yields truncation on 32-bit architecture + %Y = ptrtoint i32* %P to i64 ; yields zero extension on 32-bit architecture + %Z = ptrtoint <4 x i32*> %P to <4 x i64>; yields vector zero extension for a vector of addresses on 32-bit architecture + +.. _i_inttoptr: + +'``inttoptr .. to``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = inttoptr to ; yields ty2 + +Overview: +""""""""" + +The '``inttoptr``' instruction converts an integer ``value`` to a +pointer type, ``ty2``. + +Arguments: +"""""""""" + +The '``inttoptr``' instruction takes an :ref:`integer ` value to +cast, and a type to cast it to, which must be a :ref:`pointer ` +type. + +Semantics: +"""""""""" + +The '``inttoptr``' instruction converts ``value`` to type ``ty2`` by +applying either a zero extension or a truncation depending on the size +of the integer ``value``. If ``value`` is larger than the size of a +pointer then a truncation is done. If ``value`` is smaller than the size +of a pointer then a zero extension is done. If they are the same size, +nothing is done (*no-op cast*). + +Example: +"""""""" + +.. code-block:: llvm + + %X = inttoptr i32 255 to i32* ; yields zero extension on 64-bit architecture + %Y = inttoptr i32 255 to i32* ; yields no-op on 32-bit architecture + %Z = inttoptr i64 0 to i32* ; yields truncation on 32-bit architecture + %Z = inttoptr <4 x i32> %G to <4 x i8*>; yields truncation of vector G to four pointers + +.. _i_bitcast: + +'``bitcast .. to``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = bitcast to ; yields ty2 + +Overview: +""""""""" + +The '``bitcast``' instruction converts ``value`` to type ``ty2`` without +changing any bits. + +Arguments: +"""""""""" + +The '``bitcast``' instruction takes a value to cast, which must be a +non-aggregate first class value, and a type to cast it to, which must +also be a non-aggregate :ref:`first class ` type. The +bit sizes of ``value`` and the destination type, ``ty2``, must be +identical. If the source type is a pointer, the destination type must +also be a pointer of the same size. This instruction supports bitwise +conversion of vectors to integers and to vectors of other types (as +long as they have the same size). + +Semantics: +"""""""""" + +The '``bitcast``' instruction converts ``value`` to type ``ty2``. It +is always a *no-op cast* because no bits change with this +conversion. The conversion is done as if the ``value`` had been stored +to memory and read back as type ``ty2``. Pointer (or vector of +pointers) types may only be converted to other pointer (or vector of +pointers) types with the same address space through this instruction. +To convert pointers to other types, use the :ref:`inttoptr ` +or :ref:`ptrtoint ` instructions first. + +Example: +"""""""" + +.. code-block:: llvm + + %X = bitcast i8 255 to i8 ; yields i8 :-1 + %Y = bitcast i32* %x to sint* ; yields sint*:%x + %Z = bitcast <2 x int> %V to i64; ; yields i64: %V + %Z = bitcast <2 x i32*> %V to <2 x i64*> ; yields <2 x i64*> + +.. _i_addrspacecast: + +'``addrspacecast .. to``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = addrspacecast to ; yields pty2 + +Overview: +""""""""" + +The '``addrspacecast``' instruction converts ``ptrval`` from ``pty`` in +address space ``n`` to type ``pty2`` in address space ``m``. + +Arguments: +"""""""""" + +The '``addrspacecast``' instruction takes a pointer or vector of pointer value +to cast and a pointer type to cast it to, which must have a different +address space. + +Semantics: +"""""""""" + +The '``addrspacecast``' instruction converts the pointer value +``ptrval`` to type ``pty2``. It can be a *no-op cast* or a complex +value modification, depending on the target and the address space +pair. Pointer conversions within the same address space must be +performed with the ``bitcast`` instruction. Note that if the address space +conversion is legal then both result and operand refer to the same memory +location. + +Example: +"""""""" + +.. code-block:: llvm + + %X = addrspacecast i32* %x to i32 addrspace(1)* ; yields i32 addrspace(1)*:%x + %Y = addrspacecast i32 addrspace(1)* %y to i64 addrspace(2)* ; yields i64 addrspace(2)*:%y + %Z = addrspacecast <4 x i32*> %z to <4 x float addrspace(3)*> ; yields <4 x float addrspace(3)*>:%z + +.. _otherops: + +Other Operations +---------------- + +The instructions in this category are the "miscellaneous" instructions, +which defy better classification. + +.. _i_icmp: + +'``icmp``' Instruction +^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = icmp , ; yields {i1} or {}:result + +Overview: +""""""""" + +The '``icmp``' instruction returns a boolean value or a vector of +boolean values based on comparison of its two integer, integer vector, +pointer, or pointer vector operands. + +Arguments: +"""""""""" + +The '``icmp``' instruction takes three operands. The first operand is +the condition code indicating the kind of comparison to perform. It is +not a value, just a keyword. The possible condition code are: + +#. ``eq``: equal +#. ``ne``: not equal +#. ``ugt``: unsigned greater than +#. ``uge``: unsigned greater or equal +#. ``ult``: unsigned less than +#. ``ule``: unsigned less or equal +#. ``sgt``: signed greater than +#. ``sge``: signed greater or equal +#. ``slt``: signed less than +#. ``sle``: signed less or equal + +The remaining two arguments must be :ref:`integer ` or +:ref:`pointer ` or integer :ref:`vector ` typed. They +must also be identical types. + +Semantics: +"""""""""" + +The '``icmp``' compares ``op1`` and ``op2`` according to the condition +code given as ``cond``. The comparison performed always yields either an +:ref:`i1 ` or vector of ``i1`` result, as follows: + +#. ``eq``: yields ``true`` if the operands are equal, ``false`` + otherwise. No sign interpretation is necessary or performed. +#. ``ne``: yields ``true`` if the operands are unequal, ``false`` + otherwise. No sign interpretation is necessary or performed. +#. ``ugt``: interprets the operands as unsigned values and yields + ``true`` if ``op1`` is greater than ``op2``. +#. ``uge``: interprets the operands as unsigned values and yields + ``true`` if ``op1`` is greater than or equal to ``op2``. +#. ``ult``: interprets the operands as unsigned values and yields + ``true`` if ``op1`` is less than ``op2``. +#. ``ule``: interprets the operands as unsigned values and yields + ``true`` if ``op1`` is less than or equal to ``op2``. +#. ``sgt``: interprets the operands as signed values and yields ``true`` + if ``op1`` is greater than ``op2``. +#. ``sge``: interprets the operands as signed values and yields ``true`` + if ``op1`` is greater than or equal to ``op2``. +#. ``slt``: interprets the operands as signed values and yields ``true`` + if ``op1`` is less than ``op2``. +#. ``sle``: interprets the operands as signed values and yields ``true`` + if ``op1`` is less than or equal to ``op2``. + +If the operands are :ref:`pointer ` typed, the pointer values +are compared as if they were integers. + +If the operands are integer vectors, then they are compared element by +element. The result is an ``i1`` vector with the same number of elements +as the values being compared. Otherwise, the result is an ``i1``. + +Example: +"""""""" + +.. code-block:: llvm + + = icmp eq i32 4, 5 ; yields: result=false + = icmp ne float* %X, %X ; yields: result=false + = icmp ult i16 4, 5 ; yields: result=true + = icmp sgt i16 4, 5 ; yields: result=false + = icmp ule i16 -4, 5 ; yields: result=false + = icmp sge i16 4, 5 ; yields: result=false + +Note that the code generator does not yet support vector types with the +``icmp`` instruction. + +.. _i_fcmp: + +'``fcmp``' Instruction +^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = fcmp , ; yields {i1} or {}:result + +Overview: +""""""""" + +The '``fcmp``' instruction returns a boolean value or vector of boolean +values based on comparison of its operands. + +If the operands are floating point scalars, then the result type is a +boolean (:ref:`i1 `). + +If the operands are floating point vectors, then the result type is a +vector of boolean with the same number of elements as the operands being +compared. + +Arguments: +"""""""""" + +The '``fcmp``' instruction takes three operands. The first operand is +the condition code indicating the kind of comparison to perform. It is +not a value, just a keyword. The possible condition code are: + +#. ``false``: no comparison, always returns false +#. ``oeq``: ordered and equal +#. ``ogt``: ordered and greater than +#. ``oge``: ordered and greater than or equal +#. ``olt``: ordered and less than +#. ``ole``: ordered and less than or equal +#. ``one``: ordered and not equal +#. ``ord``: ordered (no nans) +#. ``ueq``: unordered or equal +#. ``ugt``: unordered or greater than +#. ``uge``: unordered or greater than or equal +#. ``ult``: unordered or less than +#. ``ule``: unordered or less than or equal +#. ``une``: unordered or not equal +#. ``uno``: unordered (either nans) +#. ``true``: no comparison, always returns true + +*Ordered* means that neither operand is a QNAN while *unordered* means +that either operand may be a QNAN. + +Each of ``val1`` and ``val2`` arguments must be either a :ref:`floating +point ` type or a :ref:`vector ` of floating point +type. They must have identical types. + +Semantics: +"""""""""" + +The '``fcmp``' instruction compares ``op1`` and ``op2`` according to the +condition code given as ``cond``. If the operands are vectors, then the +vectors are compared element by element. Each comparison performed +always yields an :ref:`i1 ` result, as follows: + +#. ``false``: always yields ``false``, regardless of operands. +#. ``oeq``: yields ``true`` if both operands are not a QNAN and ``op1`` + is equal to ``op2``. +#. ``ogt``: yields ``true`` if both operands are not a QNAN and ``op1`` + is greater than ``op2``. +#. ``oge``: yields ``true`` if both operands are not a QNAN and ``op1`` + is greater than or equal to ``op2``. +#. ``olt``: yields ``true`` if both operands are not a QNAN and ``op1`` + is less than ``op2``. +#. ``ole``: yields ``true`` if both operands are not a QNAN and ``op1`` + is less than or equal to ``op2``. +#. ``one``: yields ``true`` if both operands are not a QNAN and ``op1`` + is not equal to ``op2``. +#. ``ord``: yields ``true`` if both operands are not a QNAN. +#. ``ueq``: yields ``true`` if either operand is a QNAN or ``op1`` is + equal to ``op2``. +#. ``ugt``: yields ``true`` if either operand is a QNAN or ``op1`` is + greater than ``op2``. +#. ``uge``: yields ``true`` if either operand is a QNAN or ``op1`` is + greater than or equal to ``op2``. +#. ``ult``: yields ``true`` if either operand is a QNAN or ``op1`` is + less than ``op2``. +#. ``ule``: yields ``true`` if either operand is a QNAN or ``op1`` is + less than or equal to ``op2``. +#. ``une``: yields ``true`` if either operand is a QNAN or ``op1`` is + not equal to ``op2``. +#. ``uno``: yields ``true`` if either operand is a QNAN. +#. ``true``: always yields ``true``, regardless of operands. + +Example: +"""""""" + +.. code-block:: llvm + + = fcmp oeq float 4.0, 5.0 ; yields: result=false + = fcmp one float 4.0, 5.0 ; yields: result=true + = fcmp olt float 4.0, 5.0 ; yields: result=true + = fcmp ueq double 1.0, 2.0 ; yields: result=false + +Note that the code generator does not yet support vector types with the +``fcmp`` instruction. + +.. _i_phi: + +'``phi``' Instruction +^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = phi [ , ], ... + +Overview: +""""""""" + +The '``phi``' instruction is used to implement the φ node in the SSA +graph representing the function. + +Arguments: +"""""""""" + +The type of the incoming values is specified with the first type field. +After this, the '``phi``' instruction takes a list of pairs as +arguments, with one pair for each predecessor basic block of the current +block. Only values of :ref:`first class ` type may be used as +the value arguments to the PHI node. Only labels may be used as the +label arguments. + +There must be no non-phi instructions between the start of a basic block +and the PHI instructions: i.e. PHI instructions must be first in a basic +block. + +For the purposes of the SSA form, the use of each incoming value is +deemed to occur on the edge from the corresponding predecessor block to +the current block (but after any definition of an '``invoke``' +instruction's return value on the same edge). + +Semantics: +"""""""""" + +At runtime, the '``phi``' instruction logically takes on the value +specified by the pair corresponding to the predecessor basic block that +executed just prior to the current block. + +Example: +"""""""" + +.. code-block:: llvm + + Loop: ; Infinite loop that counts from 0 on up... + %indvar = phi i32 [ 0, %LoopHeader ], [ %nextindvar, %Loop ] + %nextindvar = add i32 %indvar, 1 + br label %Loop + +.. _i_select: + +'``select``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = select selty , , ; yields ty + + selty is either i1 or {} + +Overview: +""""""""" + +The '``select``' instruction is used to choose one value based on a +condition, without branching. + +Arguments: +"""""""""" + +The '``select``' instruction requires an 'i1' value or a vector of 'i1' +values indicating the condition, and two values of the same :ref:`first +class ` type. If the val1/val2 are vectors and the +condition is a scalar, then entire vectors are selected, not individual +elements. + +Semantics: +"""""""""" + +If the condition is an i1 and it evaluates to 1, the instruction returns +the first value argument; otherwise, it returns the second value +argument. + +If the condition is a vector of i1, then the value arguments must be +vectors of the same size, and the selection is done element by element. + +Example: +"""""""" + +.. code-block:: llvm + + %X = select i1 true, i8 17, i8 42 ; yields i8:17 + +.. _i_call: + +'``call``' Instruction +^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = [tail] call [cconv] [ret attrs] [*] () [fn attrs] + +Overview: +""""""""" + +The '``call``' instruction represents a simple function call. + +Arguments: +"""""""""" + +This instruction requires several arguments: + +#. The optional "tail" marker indicates that the callee function does + not access any allocas or varargs in the caller. Note that calls may + be marked "tail" even if they do not occur before a + :ref:`ret ` instruction. If the "tail" marker is present, the + function call is eligible for tail call optimization, but `might not + in fact be optimized into a jump `_. + The code generator may optimize calls marked "tail" with either 1) + automatic `sibling call + optimization `_ when the caller and + callee have matching signatures, or 2) forced tail call optimization + when the following extra requirements are met: + + - Caller and callee both have the calling convention ``fastcc``. + - The call is in tail position (ret immediately follows call and ret + uses value of call or is void). + - Option ``-tailcallopt`` is enabled, or + ``llvm::GuaranteedTailCallOpt`` is ``true``. + - `Platform specific constraints are + met. `_ + +#. The optional "cconv" marker indicates which :ref:`calling + convention ` the call should use. If none is + specified, the call defaults to using C calling conventions. The + calling convention of the call must match the calling convention of + the target function, or else the behavior is undefined. +#. The optional :ref:`Parameter Attributes ` list for return + values. Only '``zeroext``', '``signext``', and '``inreg``' attributes + are valid here. +#. '``ty``': the type of the call instruction itself which is also the + type of the return value. Functions that return no value are marked + ``void``. +#. '``fnty``': shall be the signature of the pointer to function value + being invoked. The argument types must match the types implied by + this signature. This type can be omitted if the function is not + varargs and if the function type does not return a pointer to a + function. +#. '``fnptrval``': An LLVM value containing a pointer to a function to + be invoked. In most cases, this is a direct function invocation, but + indirect ``call``'s are just as possible, calling an arbitrary pointer + to function value. +#. '``function args``': argument list whose types match the function + signature argument types and parameter attributes. All arguments must + be of :ref:`first class ` type. If the function signature + indicates the function accepts a variable number of arguments, the + extra arguments can be specified. +#. The optional :ref:`function attributes ` list. Only + '``noreturn``', '``nounwind``', '``readonly``' and '``readnone``' + attributes are valid here. + +Semantics: +"""""""""" + +The '``call``' instruction is used to cause control flow to transfer to +a specified function, with its incoming arguments bound to the specified +values. Upon a '``ret``' instruction in the called function, control +flow continues with the instruction after the function call, and the +return value of the function is bound to the result argument. + +Example: +"""""""" + +.. code-block:: llvm + + %retval = call i32 @test(i32 %argc) + call i32 (i8*, ...)* @printf(i8* %msg, i32 12, i8 42) ; yields i32 + %X = tail call i32 @foo() ; yields i32 + %Y = tail call fastcc i32 @foo() ; yields i32 + call void %foo(i8 97 signext) + + %struct.A = type { i32, i8 } + %r = call %struct.A @foo() ; yields { 32, i8 } + %gr = extractvalue %struct.A %r, 0 ; yields i32 + %gr1 = extractvalue %struct.A %r, 1 ; yields i8 + %Z = call void @foo() noreturn ; indicates that %foo never returns normally + %ZZ = call zeroext i32 @bar() ; Return value is %zero extended + +llvm treats calls to some functions with names and arguments that match +the standard C99 library as being the C99 library functions, and may +perform optimizations or generate code for them under that assumption. +This is something we'd like to change in the future to provide better +support for freestanding environments and non-C-based languages. + +.. _i_va_arg: + +'``va_arg``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = va_arg , + +Overview: +""""""""" + +The '``va_arg``' instruction is used to access arguments passed through +the "variable argument" area of a function call. It is used to implement +the ``va_arg`` macro in C. + +Arguments: +"""""""""" + +This instruction takes a ``va_list*`` value and the type of the +argument. It returns a value of the specified argument type and +increments the ``va_list`` to point to the next argument. The actual +type of ``va_list`` is target specific. + +Semantics: +"""""""""" + +The '``va_arg``' instruction loads an argument of the specified type +from the specified ``va_list`` and causes the ``va_list`` to point to +the next argument. For more information, see the variable argument +handling :ref:`Intrinsic Functions `. + +It is legal for this instruction to be called in a function which does +not take a variable number of arguments, for example, the ``vfprintf`` +function. + +``va_arg`` is an LLVM instruction instead of an :ref:`intrinsic +function ` because it takes a type as an argument. + +Example: +"""""""" + +See the :ref:`variable argument processing ` section. + +Note that the code generator does not yet fully support va\_arg on many +targets. Also, it does not currently support va\_arg with aggregate +types on any target. + +.. _i_landingpad: + +'``landingpad``' Instruction +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + = landingpad personality + + = landingpad personality cleanup * + + := catch + := filter + +Overview: +""""""""" + +The '``landingpad``' instruction is used by `LLVM's exception handling +system `_ to specify that a basic block +is a landing pad --- one where the exception lands, and corresponds to the +code found in the ``catch`` portion of a ``try``/``catch`` sequence. It +defines values supplied by the personality function (``pers_fn``) upon +re-entry to the function. The ``resultval`` has the type ``resultty``. + +Arguments: +"""""""""" + +This instruction takes a ``pers_fn`` value. This is the personality +function associated with the unwinding mechanism. The optional +``cleanup`` flag indicates that the landing pad block is a cleanup. + +A ``clause`` begins with the clause type --- ``catch`` or ``filter`` --- and +contains the global variable representing the "type" that may be caught +or filtered respectively. Unlike the ``catch`` clause, the ``filter`` +clause takes an array constant as its argument. Use +"``[0 x i8**] undef``" for a filter which cannot throw. The +'``landingpad``' instruction must contain *at least* one ``clause`` or +the ``cleanup`` flag. + +Semantics: +"""""""""" + +The '``landingpad``' instruction defines the values which are set by the +personality function (``pers_fn``) upon re-entry to the function, and +therefore the "result type" of the ``landingpad`` instruction. As with +calling conventions, how the personality function results are +represented in LLVM IR is target specific. + +The clauses are applied in order from top to bottom. If two +``landingpad`` instructions are merged together through inlining, the +clauses from the calling function are appended to the list of clauses. +When the call stack is being unwound due to an exception being thrown, +the exception is compared against each ``clause`` in turn. If it doesn't +match any of the clauses, and the ``cleanup`` flag is not set, then +unwinding continues further up the call stack. + +The ``landingpad`` instruction has several restrictions: + +- A landing pad block is a basic block which is the unwind destination + of an '``invoke``' instruction. +- A landing pad block must have a '``landingpad``' instruction as its + first non-PHI instruction. +- There can be only one '``landingpad``' instruction within the landing + pad block. +- A basic block that is not a landing pad block may not include a + '``landingpad``' instruction. +- All '``landingpad``' instructions in a function must have the same + personality function. + +Example: +"""""""" + +.. code-block:: llvm + + ;; A landing pad which can catch an integer. + %res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + catch i8** @_ZTIi + ;; A landing pad that is a cleanup. + %res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + cleanup + ;; A landing pad which can catch an integer and can only throw a double. + %res = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + catch i8** @_ZTIi + filter [1 x i8**] [@_ZTId] + +.. _intrinsics: + +Intrinsic Functions +=================== + +LLVM supports the notion of an "intrinsic function". These functions +have well known names and semantics and are required to follow certain +restrictions. Overall, these intrinsics represent an extension mechanism +for the LLVM language that does not require changing all of the +transformations in LLVM when adding to the language (or the bitcode +reader/writer, the parser, etc...). + +Intrinsic function names must all start with an "``llvm.``" prefix. This +prefix is reserved in LLVM for intrinsic names; thus, function names may +not begin with this prefix. Intrinsic functions must always be external +functions: you cannot define the body of intrinsic functions. Intrinsic +functions may only be used in call or invoke instructions: it is illegal +to take the address of an intrinsic function. Additionally, because +intrinsic functions are part of the LLVM language, it is required if any +are added that they be documented here. + +Some intrinsic functions can be overloaded, i.e., the intrinsic +represents a family of functions that perform the same operation but on +different data types. Because LLVM can represent over 8 million +different integer types, overloading is used commonly to allow an +intrinsic function to operate on any integer type. One or more of the +argument types or the result type can be overloaded to accept any +integer type. Argument types may also be defined as exactly matching a +previous argument's type or the result type. This allows an intrinsic +function which accepts multiple arguments, but needs all of them to be +of the same type, to only be overloaded with respect to a single +argument or the result. + +Overloaded intrinsics will have the names of its overloaded argument +types encoded into its function name, each preceded by a period. Only +those types which are overloaded result in a name suffix. Arguments +whose type is matched against another type do not. For example, the +``llvm.ctpop`` function can take an integer of any width and returns an +integer of exactly the same integer width. This leads to a family of +functions such as ``i8 @llvm.ctpop.i8(i8 %val)`` and +``i29 @llvm.ctpop.i29(i29 %val)``. Only one type, the return type, is +overloaded, and only one type suffix is required. Because the argument's +type is matched against the return type, it does not require its own +name suffix. + +To learn how to add an intrinsic function, please see the `Extending +LLVM Guide `_. + +.. _int_varargs: + +Variable Argument Handling Intrinsics +------------------------------------- + +Variable argument support is defined in LLVM with the +:ref:`va_arg ` instruction and these three intrinsic +functions. These functions are related to the similarly named macros +defined in the ```` header file. + +All of these functions operate on arguments that use a target-specific +value type "``va_list``". The LLVM assembly language reference manual +does not define what this type is, so all transformations should be +prepared to handle these functions regardless of the type used. + +This example shows how the :ref:`va_arg ` instruction and the +variable argument handling intrinsic functions are used. + +.. code-block:: llvm + + define i32 @test(i32 %X, ...) { + ; Initialize variable argument processing + %ap = alloca i8* + %ap2 = bitcast i8** %ap to i8* + call void @llvm.va_start(i8* %ap2) + + ; Read a single integer argument + %tmp = va_arg i8** %ap, i32 + + ; Demonstrate usage of llvm.va_copy and llvm.va_end + %aq = alloca i8* + %aq2 = bitcast i8** %aq to i8* + call void @llvm.va_copy(i8* %aq2, i8* %ap2) + call void @llvm.va_end(i8* %aq2) + + ; Stop processing of arguments. + call void @llvm.va_end(i8* %ap2) + ret i32 %tmp + } + + declare void @llvm.va_start(i8*) + declare void @llvm.va_copy(i8*, i8*) + declare void @llvm.va_end(i8*) + +.. _int_va_start: + +'``llvm.va_start``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.va_start(i8* ) + +Overview: +""""""""" + +The '``llvm.va_start``' intrinsic initializes ``*`` for +subsequent use by ``va_arg``. + +Arguments: +"""""""""" + +The argument is a pointer to a ``va_list`` element to initialize. + +Semantics: +"""""""""" + +The '``llvm.va_start``' intrinsic works just like the ``va_start`` macro +available in C. In a target-dependent way, it initializes the +``va_list`` element to which the argument points, so that the next call +to ``va_arg`` will produce the first variable argument passed to the +function. Unlike the C ``va_start`` macro, this intrinsic does not need +to know the last argument of the function as the compiler can figure +that out. + +'``llvm.va_end``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.va_end(i8* ) + +Overview: +""""""""" + +The '``llvm.va_end``' intrinsic destroys ``*``, which has been +initialized previously with ``llvm.va_start`` or ``llvm.va_copy``. + +Arguments: +"""""""""" + +The argument is a pointer to a ``va_list`` to destroy. + +Semantics: +"""""""""" + +The '``llvm.va_end``' intrinsic works just like the ``va_end`` macro +available in C. In a target-dependent way, it destroys the ``va_list`` +element to which the argument points. Calls to +:ref:`llvm.va_start ` and +:ref:`llvm.va_copy ` must be matched exactly with calls to +``llvm.va_end``. + +.. _int_va_copy: + +'``llvm.va_copy``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.va_copy(i8* , i8* ) + +Overview: +""""""""" + +The '``llvm.va_copy``' intrinsic copies the current argument position +from the source argument list to the destination argument list. + +Arguments: +"""""""""" + +The first argument is a pointer to a ``va_list`` element to initialize. +The second argument is a pointer to a ``va_list`` element to copy from. + +Semantics: +"""""""""" + +The '``llvm.va_copy``' intrinsic works just like the ``va_copy`` macro +available in C. In a target-dependent way, it copies the source +``va_list`` element into the destination ``va_list`` element. This +intrinsic is necessary because the `` llvm.va_start`` intrinsic may be +arbitrarily complex and require, for example, memory allocation. + +Accurate Garbage Collection Intrinsics +-------------------------------------- + +LLVM support for `Accurate Garbage Collection `_ +(GC) requires the implementation and generation of these intrinsics. +These intrinsics allow identification of :ref:`GC roots on the +stack `, as well as garbage collector implementations that +require :ref:`read ` and :ref:`write ` barriers. +Front-ends for type-safe garbage collected languages should generate +these intrinsics to make use of the LLVM garbage collectors. For more +details, see `Accurate Garbage Collection with +LLVM `_. + +The garbage collection intrinsics only operate on objects in the generic +address space (address space zero). + +.. _int_gcroot: + +'``llvm.gcroot``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.gcroot(i8** %ptrloc, i8* %metadata) + +Overview: +""""""""" + +The '``llvm.gcroot``' intrinsic declares the existence of a GC root to +the code generator, and allows some metadata to be associated with it. + +Arguments: +"""""""""" + +The first argument specifies the address of a stack object that contains +the root pointer. The second pointer (which must be either a constant or +a global value address) contains the meta-data to be associated with the +root. + +Semantics: +"""""""""" + +At runtime, a call to this intrinsic stores a null pointer into the +"ptrloc" location. At compile-time, the code generator generates +information to allow the runtime to find the pointer at GC safe points. +The '``llvm.gcroot``' intrinsic may only be used in a function which +:ref:`specifies a GC algorithm `. + +.. _int_gcread: + +'``llvm.gcread``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare i8* @llvm.gcread(i8* %ObjPtr, i8** %Ptr) + +Overview: +""""""""" + +The '``llvm.gcread``' intrinsic identifies reads of references from heap +locations, allowing garbage collector implementations that require read +barriers. + +Arguments: +"""""""""" + +The second argument is the address to read from, which should be an +address allocated from the garbage collector. The first object is a +pointer to the start of the referenced object, if needed by the language +runtime (otherwise null). + +Semantics: +"""""""""" + +The '``llvm.gcread``' intrinsic has the same semantics as a load +instruction, but may be replaced with substantially more complex code by +the garbage collector runtime, as needed. The '``llvm.gcread``' +intrinsic may only be used in a function which :ref:`specifies a GC +algorithm `. + +.. _int_gcwrite: + +'``llvm.gcwrite``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.gcwrite(i8* %P1, i8* %Obj, i8** %P2) + +Overview: +""""""""" + +The '``llvm.gcwrite``' intrinsic identifies writes of references to heap +locations, allowing garbage collector implementations that require write +barriers (such as generational or reference counting collectors). + +Arguments: +"""""""""" + +The first argument is the reference to store, the second is the start of +the object to store it to, and the third is the address of the field of +Obj to store to. If the runtime does not require a pointer to the +object, Obj may be null. + +Semantics: +"""""""""" + +The '``llvm.gcwrite``' intrinsic has the same semantics as a store +instruction, but may be replaced with substantially more complex code by +the garbage collector runtime, as needed. The '``llvm.gcwrite``' +intrinsic may only be used in a function which :ref:`specifies a GC +algorithm `. + +Code Generator Intrinsics +------------------------- + +These intrinsics are provided by LLVM to expose special features that +may only be implemented with code generator support. + +'``llvm.returnaddress``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare i8 *@llvm.returnaddress(i32 ) + +Overview: +""""""""" + +The '``llvm.returnaddress``' intrinsic attempts to compute a +target-specific value indicating the return address of the current +function or one of its callers. + +Arguments: +"""""""""" + +The argument to this intrinsic indicates which function to return the +address for. Zero indicates the calling function, one indicates its +caller, etc. The argument is **required** to be a constant integer +value. + +Semantics: +"""""""""" + +The '``llvm.returnaddress``' intrinsic either returns a pointer +indicating the return address of the specified call frame, or zero if it +cannot be identified. The value returned by this intrinsic is likely to +be incorrect or 0 for arguments other than zero, so it should only be +used for debugging purposes. + +Note that calling this intrinsic does not prevent function inlining or +other aggressive transformations, so the value returned may not be that +of the obvious source-language caller. + +'``llvm.frameaddress``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare i8* @llvm.frameaddress(i32 ) + +Overview: +""""""""" + +The '``llvm.frameaddress``' intrinsic attempts to return the +target-specific frame pointer value for the specified stack frame. + +Arguments: +"""""""""" + +The argument to this intrinsic indicates which function to return the +frame pointer for. Zero indicates the calling function, one indicates +its caller, etc. The argument is **required** to be a constant integer +value. + +Semantics: +"""""""""" + +The '``llvm.frameaddress``' intrinsic either returns a pointer +indicating the frame address of the specified call frame, or zero if it +cannot be identified. The value returned by this intrinsic is likely to +be incorrect or 0 for arguments other than zero, so it should only be +used for debugging purposes. + +Note that calling this intrinsic does not prevent function inlining or +other aggressive transformations, so the value returned may not be that +of the obvious source-language caller. + +.. _int_stacksave: + +'``llvm.stacksave``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare i8* @llvm.stacksave() + +Overview: +""""""""" + +The '``llvm.stacksave``' intrinsic is used to remember the current state +of the function stack, for use with +:ref:`llvm.stackrestore `. This is useful for +implementing language features like scoped automatic variable sized +arrays in C99. + +Semantics: +"""""""""" + +This intrinsic returns a opaque pointer value that can be passed to +:ref:`llvm.stackrestore `. When an +``llvm.stackrestore`` intrinsic is executed with a value saved from +``llvm.stacksave``, it effectively restores the state of the stack to +the state it was in when the ``llvm.stacksave`` intrinsic executed. In +practice, this pops any :ref:`alloca ` blocks from the stack that +were allocated after the ``llvm.stacksave`` was executed. + +.. _int_stackrestore: + +'``llvm.stackrestore``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.stackrestore(i8* %ptr) + +Overview: +""""""""" + +The '``llvm.stackrestore``' intrinsic is used to restore the state of +the function stack to the state it was in when the corresponding +:ref:`llvm.stacksave ` intrinsic executed. This is +useful for implementing language features like scoped automatic variable +sized arrays in C99. + +Semantics: +"""""""""" + +See the description for :ref:`llvm.stacksave `. + +'``llvm.prefetch``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.prefetch(i8*
, i32 , i32 , i32 ) + +Overview: +""""""""" + +The '``llvm.prefetch``' intrinsic is a hint to the code generator to +insert a prefetch instruction if supported; otherwise, it is a noop. +Prefetches have no effect on the behavior of the program but can change +its performance characteristics. + +Arguments: +"""""""""" + +``address`` is the address to be prefetched, ``rw`` is the specifier +determining if the fetch should be for a read (0) or write (1), and +``locality`` is a temporal locality specifier ranging from (0) - no +locality, to (3) - extremely local keep in cache. The ``cache type`` +specifies whether the prefetch is performed on the data (1) or +instruction (0) cache. The ``rw``, ``locality`` and ``cache type`` +arguments must be constant integers. + +Semantics: +"""""""""" + +This intrinsic does not modify the behavior of the program. In +particular, prefetches cannot trap and do not produce a value. On +targets that support this intrinsic, the prefetch can provide hints to +the processor cache for better performance. + +'``llvm.pcmarker``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.pcmarker(i32 ) + +Overview: +""""""""" + +The '``llvm.pcmarker``' intrinsic is a method to export a Program +Counter (PC) in a region of code to simulators and other tools. The +method is target specific, but it is expected that the marker will use +exported symbols to transmit the PC of the marker. The marker makes no +guarantees that it will remain with any specific instruction after +optimizations. It is possible that the presence of a marker will inhibit +optimizations. The intended use is to be inserted after optimizations to +allow correlations of simulation runs. + +Arguments: +"""""""""" + +``id`` is a numerical id identifying the marker. + +Semantics: +"""""""""" + +This intrinsic does not modify the behavior of the program. Backends +that do not support this intrinsic may ignore it. + +'``llvm.readcyclecounter``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare i64 @llvm.readcyclecounter() + +Overview: +""""""""" + +The '``llvm.readcyclecounter``' intrinsic provides access to the cycle +counter register (or similar low latency, high accuracy clocks) on those +targets that support it. On X86, it should map to RDTSC. On Alpha, it +should map to RPCC. As the backing counters overflow quickly (on the +order of 9 seconds on alpha), this should only be used for small +timings. + +Semantics: +"""""""""" + +When directly supported, reading the cycle counter should not modify any +memory. Implementations are allowed to either return a application +specific value or a system wide value. On backends without support, this +is lowered to a constant 0. + +Note that runtime support may be conditional on the privilege-level code is +running at and the host platform. + +Standard C Library Intrinsics +----------------------------- + +LLVM provides intrinsics for a few important standard C library +functions. These intrinsics allow source-language front-ends to pass +information about the alignment of the pointer arguments to the code +generator, providing opportunity for more efficient code generation. + +.. _int_memcpy: + +'``llvm.memcpy``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.memcpy`` on any +integer bit width and for different address spaces. Not all targets +support all bit widths however. + +:: + + declare void @llvm.memcpy.p0i8.p0i8.i32(i8* , i8* , + i32 , i32 , i1 ) + declare void @llvm.memcpy.p0i8.p0i8.i64(i8* , i8* , + i64 , i32 , i1 ) + +Overview: +""""""""" + +The '``llvm.memcpy.*``' intrinsics copy a block of memory from the +source location to the destination location. + +Note that, unlike the standard libc function, the ``llvm.memcpy.*`` +intrinsics do not return a value, takes extra alignment/isvolatile +arguments and the pointers can be in specified address spaces. + +Arguments: +"""""""""" + +The first argument is a pointer to the destination, the second is a +pointer to the source. The third argument is an integer argument +specifying the number of bytes to copy, the fourth argument is the +alignment of the source and destination locations, and the fifth is a +boolean indicating a volatile access. + +If the call to this intrinsic has an alignment value that is not 0 or 1, +then the caller guarantees that both the source and destination pointers +are aligned to that boundary. + +If the ``isvolatile`` parameter is ``true``, the ``llvm.memcpy`` call is +a :ref:`volatile operation `. The detailed access behavior is not +very cleanly specified and it is unwise to depend on it. + +Semantics: +"""""""""" + +The '``llvm.memcpy.*``' intrinsics copy a block of memory from the +source location to the destination location, which are not allowed to +overlap. It copies "len" bytes of memory over. If the argument is known +to be aligned to some boundary, this can be specified as the fourth +argument, otherwise it should be set to 0 or 1 (both meaning no alignment). + +'``llvm.memmove``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use llvm.memmove on any integer +bit width and for different address space. Not all targets support all +bit widths however. + +:: + + declare void @llvm.memmove.p0i8.p0i8.i32(i8* , i8* , + i32 , i32 , i1 ) + declare void @llvm.memmove.p0i8.p0i8.i64(i8* , i8* , + i64 , i32 , i1 ) + +Overview: +""""""""" + +The '``llvm.memmove.*``' intrinsics move a block of memory from the +source location to the destination location. It is similar to the +'``llvm.memcpy``' intrinsic but allows the two memory locations to +overlap. + +Note that, unlike the standard libc function, the ``llvm.memmove.*`` +intrinsics do not return a value, takes extra alignment/isvolatile +arguments and the pointers can be in specified address spaces. + +Arguments: +"""""""""" + +The first argument is a pointer to the destination, the second is a +pointer to the source. The third argument is an integer argument +specifying the number of bytes to copy, the fourth argument is the +alignment of the source and destination locations, and the fifth is a +boolean indicating a volatile access. + +If the call to this intrinsic has an alignment value that is not 0 or 1, +then the caller guarantees that the source and destination pointers are +aligned to that boundary. + +If the ``isvolatile`` parameter is ``true``, the ``llvm.memmove`` call +is a :ref:`volatile operation `. The detailed access behavior is +not very cleanly specified and it is unwise to depend on it. + +Semantics: +"""""""""" + +The '``llvm.memmove.*``' intrinsics copy a block of memory from the +source location to the destination location, which may overlap. It +copies "len" bytes of memory over. If the argument is known to be +aligned to some boundary, this can be specified as the fourth argument, +otherwise it should be set to 0 or 1 (both meaning no alignment). + +'``llvm.memset.*``' Intrinsics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use llvm.memset on any integer +bit width and for different address spaces. However, not all targets +support all bit widths. + +:: + + declare void @llvm.memset.p0i8.i32(i8* , i8 , + i32 , i32 , i1 ) + declare void @llvm.memset.p0i8.i64(i8* , i8 , + i64 , i32 , i1 ) + +Overview: +""""""""" + +The '``llvm.memset.*``' intrinsics fill a block of memory with a +particular byte value. + +Note that, unlike the standard libc function, the ``llvm.memset`` +intrinsic does not return a value and takes extra alignment/volatile +arguments. Also, the destination can be in an arbitrary address space. + +Arguments: +"""""""""" + +The first argument is a pointer to the destination to fill, the second +is the byte value with which to fill it, the third argument is an +integer argument specifying the number of bytes to fill, and the fourth +argument is the known alignment of the destination location. + +If the call to this intrinsic has an alignment value that is not 0 or 1, +then the caller guarantees that the destination pointer is aligned to +that boundary. + +If the ``isvolatile`` parameter is ``true``, the ``llvm.memset`` call is +a :ref:`volatile operation `. The detailed access behavior is not +very cleanly specified and it is unwise to depend on it. + +Semantics: +"""""""""" + +The '``llvm.memset.*``' intrinsics fill "len" bytes of memory starting +at the destination location. If the argument is known to be aligned to +some boundary, this can be specified as the fourth argument, otherwise +it should be set to 0 or 1 (both meaning no alignment). + +'``llvm.sqrt.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.sqrt`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.sqrt.f32(float %Val) + declare double @llvm.sqrt.f64(double %Val) + declare x86_fp80 @llvm.sqrt.f80(x86_fp80 %Val) + declare fp128 @llvm.sqrt.f128(fp128 %Val) + declare ppc_fp128 @llvm.sqrt.ppcf128(ppc_fp128 %Val) + +Overview: +""""""""" + +The '``llvm.sqrt``' intrinsics return the sqrt of the specified operand, +returning the same value as the libm '``sqrt``' functions would. Unlike +``sqrt`` in libm, however, ``llvm.sqrt`` has undefined behavior for +negative numbers other than -0.0 (which allows for better optimization, +because there is no need to worry about errno being set). +``llvm.sqrt(-0.0)`` is defined to return -0.0 like IEEE sqrt. + +Arguments: +"""""""""" + +The argument and return value are floating point numbers of the same +type. + +Semantics: +"""""""""" + +This function returns the sqrt of the specified operand if it is a +nonnegative floating point number. + +'``llvm.powi.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.powi`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.powi.f32(float %Val, i32 %power) + declare double @llvm.powi.f64(double %Val, i32 %power) + declare x86_fp80 @llvm.powi.f80(x86_fp80 %Val, i32 %power) + declare fp128 @llvm.powi.f128(fp128 %Val, i32 %power) + declare ppc_fp128 @llvm.powi.ppcf128(ppc_fp128 %Val, i32 %power) + +Overview: +""""""""" + +The '``llvm.powi.*``' intrinsics return the first operand raised to the +specified (positive or negative) power. The order of evaluation of +multiplications is not defined. When a vector of floating point type is +used, the second argument remains a scalar integer value. + +Arguments: +"""""""""" + +The second argument is an integer power, and the first is a value to +raise to that power. + +Semantics: +"""""""""" + +This function returns the first value raised to the second power with an +unspecified sequence of rounding operations. + +'``llvm.sin.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.sin`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.sin.f32(float %Val) + declare double @llvm.sin.f64(double %Val) + declare x86_fp80 @llvm.sin.f80(x86_fp80 %Val) + declare fp128 @llvm.sin.f128(fp128 %Val) + declare ppc_fp128 @llvm.sin.ppcf128(ppc_fp128 %Val) + +Overview: +""""""""" + +The '``llvm.sin.*``' intrinsics return the sine of the operand. + +Arguments: +"""""""""" + +The argument and return value are floating point numbers of the same +type. + +Semantics: +"""""""""" + +This function returns the sine of the specified operand, returning the +same values as the libm ``sin`` functions would, and handles error +conditions in the same way. + +'``llvm.cos.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.cos`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.cos.f32(float %Val) + declare double @llvm.cos.f64(double %Val) + declare x86_fp80 @llvm.cos.f80(x86_fp80 %Val) + declare fp128 @llvm.cos.f128(fp128 %Val) + declare ppc_fp128 @llvm.cos.ppcf128(ppc_fp128 %Val) + +Overview: +""""""""" + +The '``llvm.cos.*``' intrinsics return the cosine of the operand. + +Arguments: +"""""""""" + +The argument and return value are floating point numbers of the same +type. + +Semantics: +"""""""""" + +This function returns the cosine of the specified operand, returning the +same values as the libm ``cos`` functions would, and handles error +conditions in the same way. + +'``llvm.pow.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.pow`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.pow.f32(float %Val, float %Power) + declare double @llvm.pow.f64(double %Val, double %Power) + declare x86_fp80 @llvm.pow.f80(x86_fp80 %Val, x86_fp80 %Power) + declare fp128 @llvm.pow.f128(fp128 %Val, fp128 %Power) + declare ppc_fp128 @llvm.pow.ppcf128(ppc_fp128 %Val, ppc_fp128 Power) + +Overview: +""""""""" + +The '``llvm.pow.*``' intrinsics return the first operand raised to the +specified (positive or negative) power. + +Arguments: +"""""""""" + +The second argument is a floating point power, and the first is a value +to raise to that power. + +Semantics: +"""""""""" + +This function returns the first value raised to the second power, +returning the same values as the libm ``pow`` functions would, and +handles error conditions in the same way. + +'``llvm.exp.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.exp`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.exp.f32(float %Val) + declare double @llvm.exp.f64(double %Val) + declare x86_fp80 @llvm.exp.f80(x86_fp80 %Val) + declare fp128 @llvm.exp.f128(fp128 %Val) + declare ppc_fp128 @llvm.exp.ppcf128(ppc_fp128 %Val) + +Overview: +""""""""" + +The '``llvm.exp.*``' intrinsics perform the exp function. + +Arguments: +"""""""""" + +The argument and return value are floating point numbers of the same +type. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``exp`` functions +would, and handles error conditions in the same way. + +'``llvm.exp2.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.exp2`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.exp2.f32(float %Val) + declare double @llvm.exp2.f64(double %Val) + declare x86_fp80 @llvm.exp2.f80(x86_fp80 %Val) + declare fp128 @llvm.exp2.f128(fp128 %Val) + declare ppc_fp128 @llvm.exp2.ppcf128(ppc_fp128 %Val) + +Overview: +""""""""" + +The '``llvm.exp2.*``' intrinsics perform the exp2 function. + +Arguments: +"""""""""" + +The argument and return value are floating point numbers of the same +type. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``exp2`` functions +would, and handles error conditions in the same way. + +'``llvm.log.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.log`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.log.f32(float %Val) + declare double @llvm.log.f64(double %Val) + declare x86_fp80 @llvm.log.f80(x86_fp80 %Val) + declare fp128 @llvm.log.f128(fp128 %Val) + declare ppc_fp128 @llvm.log.ppcf128(ppc_fp128 %Val) + +Overview: +""""""""" + +The '``llvm.log.*``' intrinsics perform the log function. + +Arguments: +"""""""""" + +The argument and return value are floating point numbers of the same +type. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``log`` functions +would, and handles error conditions in the same way. + +'``llvm.log10.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.log10`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.log10.f32(float %Val) + declare double @llvm.log10.f64(double %Val) + declare x86_fp80 @llvm.log10.f80(x86_fp80 %Val) + declare fp128 @llvm.log10.f128(fp128 %Val) + declare ppc_fp128 @llvm.log10.ppcf128(ppc_fp128 %Val) + +Overview: +""""""""" + +The '``llvm.log10.*``' intrinsics perform the log10 function. + +Arguments: +"""""""""" + +The argument and return value are floating point numbers of the same +type. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``log10`` functions +would, and handles error conditions in the same way. + +'``llvm.log2.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.log2`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.log2.f32(float %Val) + declare double @llvm.log2.f64(double %Val) + declare x86_fp80 @llvm.log2.f80(x86_fp80 %Val) + declare fp128 @llvm.log2.f128(fp128 %Val) + declare ppc_fp128 @llvm.log2.ppcf128(ppc_fp128 %Val) + +Overview: +""""""""" + +The '``llvm.log2.*``' intrinsics perform the log2 function. + +Arguments: +"""""""""" + +The argument and return value are floating point numbers of the same +type. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``log2`` functions +would, and handles error conditions in the same way. + +'``llvm.fma.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.fma`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.fma.f32(float %a, float %b, float %c) + declare double @llvm.fma.f64(double %a, double %b, double %c) + declare x86_fp80 @llvm.fma.f80(x86_fp80 %a, x86_fp80 %b, x86_fp80 %c) + declare fp128 @llvm.fma.f128(fp128 %a, fp128 %b, fp128 %c) + declare ppc_fp128 @llvm.fma.ppcf128(ppc_fp128 %a, ppc_fp128 %b, ppc_fp128 %c) + +Overview: +""""""""" + +The '``llvm.fma.*``' intrinsics perform the fused multiply-add +operation. + +Arguments: +"""""""""" + +The argument and return value are floating point numbers of the same +type. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``fma`` functions +would. + +'``llvm.fabs.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.fabs`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.fabs.f32(float %Val) + declare double @llvm.fabs.f64(double %Val) + declare x86_fp80 @llvm.fabs.f80(x86_fp80 %Val) + declare fp128 @llvm.fabs.f128(fp128 %Val) + declare ppc_fp128 @llvm.fabs.ppcf128(ppc_fp128 %Val) + +Overview: +""""""""" + +The '``llvm.fabs.*``' intrinsics return the absolute value of the +operand. + +Arguments: +"""""""""" + +The argument and return value are floating point numbers of the same +type. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``fabs`` functions +would, and handles error conditions in the same way. + +'``llvm.copysign.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.copysign`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.copysign.f32(float %Mag, float %Sgn) + declare double @llvm.copysign.f64(double %Mag, double %Sgn) + declare x86_fp80 @llvm.copysign.f80(x86_fp80 %Mag, x86_fp80 %Sgn) + declare fp128 @llvm.copysign.f128(fp128 %Mag, fp128 %Sgn) + declare ppc_fp128 @llvm.copysign.ppcf128(ppc_fp128 %Mag, ppc_fp128 %Sgn) + +Overview: +""""""""" + +The '``llvm.copysign.*``' intrinsics return a value with the magnitude of the +first operand and the sign of the second operand. + +Arguments: +"""""""""" + +The arguments and return value are floating point numbers of the same +type. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``copysign`` +functions would, and handles error conditions in the same way. + +'``llvm.floor.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.floor`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.floor.f32(float %Val) + declare double @llvm.floor.f64(double %Val) + declare x86_fp80 @llvm.floor.f80(x86_fp80 %Val) + declare fp128 @llvm.floor.f128(fp128 %Val) + declare ppc_fp128 @llvm.floor.ppcf128(ppc_fp128 %Val) + +Overview: +""""""""" + +The '``llvm.floor.*``' intrinsics return the floor of the operand. + +Arguments: +"""""""""" + +The argument and return value are floating point numbers of the same +type. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``floor`` functions +would, and handles error conditions in the same way. + +'``llvm.ceil.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.ceil`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.ceil.f32(float %Val) + declare double @llvm.ceil.f64(double %Val) + declare x86_fp80 @llvm.ceil.f80(x86_fp80 %Val) + declare fp128 @llvm.ceil.f128(fp128 %Val) + declare ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128 %Val) + +Overview: +""""""""" + +The '``llvm.ceil.*``' intrinsics return the ceiling of the operand. + +Arguments: +"""""""""" + +The argument and return value are floating point numbers of the same +type. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``ceil`` functions +would, and handles error conditions in the same way. + +'``llvm.trunc.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.trunc`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.trunc.f32(float %Val) + declare double @llvm.trunc.f64(double %Val) + declare x86_fp80 @llvm.trunc.f80(x86_fp80 %Val) + declare fp128 @llvm.trunc.f128(fp128 %Val) + declare ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 %Val) + +Overview: +""""""""" + +The '``llvm.trunc.*``' intrinsics returns the operand rounded to the +nearest integer not larger in magnitude than the operand. + +Arguments: +"""""""""" + +The argument and return value are floating point numbers of the same +type. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``trunc`` functions +would, and handles error conditions in the same way. + +'``llvm.rint.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.rint`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.rint.f32(float %Val) + declare double @llvm.rint.f64(double %Val) + declare x86_fp80 @llvm.rint.f80(x86_fp80 %Val) + declare fp128 @llvm.rint.f128(fp128 %Val) + declare ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 %Val) + +Overview: +""""""""" + +The '``llvm.rint.*``' intrinsics returns the operand rounded to the +nearest integer. It may raise an inexact floating-point exception if the +operand isn't an integer. + +Arguments: +"""""""""" + +The argument and return value are floating point numbers of the same +type. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``rint`` functions +would, and handles error conditions in the same way. + +'``llvm.nearbyint.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.nearbyint`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.nearbyint.f32(float %Val) + declare double @llvm.nearbyint.f64(double %Val) + declare x86_fp80 @llvm.nearbyint.f80(x86_fp80 %Val) + declare fp128 @llvm.nearbyint.f128(fp128 %Val) + declare ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128 %Val) + +Overview: +""""""""" + +The '``llvm.nearbyint.*``' intrinsics returns the operand rounded to the +nearest integer. + +Arguments: +"""""""""" + +The argument and return value are floating point numbers of the same +type. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``nearbyint`` +functions would, and handles error conditions in the same way. + +'``llvm.round.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.round`` on any +floating point or vector of floating point type. Not all targets support +all types however. + +:: + + declare float @llvm.round.f32(float %Val) + declare double @llvm.round.f64(double %Val) + declare x86_fp80 @llvm.round.f80(x86_fp80 %Val) + declare fp128 @llvm.round.f128(fp128 %Val) + declare ppc_fp128 @llvm.round.ppcf128(ppc_fp128 %Val) + +Overview: +""""""""" + +The '``llvm.round.*``' intrinsics returns the operand rounded to the +nearest integer. + +Arguments: +"""""""""" + +The argument and return value are floating point numbers of the same +type. + +Semantics: +"""""""""" + +This function returns the same values as the libm ``round`` +functions would, and handles error conditions in the same way. + +Bit Manipulation Intrinsics +--------------------------- + +LLVM provides intrinsics for a few important bit manipulation +operations. These allow efficient code generation for some algorithms. + +'``llvm.bswap.*``' Intrinsics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic function. You can use bswap on any +integer type that is an even number of bytes (i.e. BitWidth % 16 == 0). + +:: + + declare i16 @llvm.bswap.i16(i16 ) + declare i32 @llvm.bswap.i32(i32 ) + declare i64 @llvm.bswap.i64(i64 ) + +Overview: +""""""""" + +The '``llvm.bswap``' family of intrinsics is used to byte swap integer +values with an even number of bytes (positive multiple of 16 bits). +These are useful for performing operations on data that is not in the +target's native byte order. + +Semantics: +"""""""""" + +The ``llvm.bswap.i16`` intrinsic returns an i16 value that has the high +and low byte of the input i16 swapped. Similarly, the ``llvm.bswap.i32`` +intrinsic returns an i32 value that has the four bytes of the input i32 +swapped, so that if the input bytes are numbered 0, 1, 2, 3 then the +returned i32 will have its bytes in 3, 2, 1, 0 order. The +``llvm.bswap.i48``, ``llvm.bswap.i64`` and other intrinsics extend this +concept to additional even-byte lengths (6 bytes, 8 bytes and more, +respectively). + +'``llvm.ctpop.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use llvm.ctpop on any integer +bit width, or on any vector with integer elements. Not all targets +support all bit widths or vector types, however. + +:: + + declare i8 @llvm.ctpop.i8(i8 ) + declare i16 @llvm.ctpop.i16(i16 ) + declare i32 @llvm.ctpop.i32(i32 ) + declare i64 @llvm.ctpop.i64(i64 ) + declare i256 @llvm.ctpop.i256(i256 ) + declare <2 x i32> @llvm.ctpop.v2i32(<2 x i32> ) + +Overview: +""""""""" + +The '``llvm.ctpop``' family of intrinsics counts the number of bits set +in a value. + +Arguments: +"""""""""" + +The only argument is the value to be counted. The argument may be of any +integer type, or a vector with integer elements. The return type must +match the argument type. + +Semantics: +"""""""""" + +The '``llvm.ctpop``' intrinsic counts the 1's in a variable, or within +each element of a vector. + +'``llvm.ctlz.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.ctlz`` on any +integer bit width, or any vector whose elements are integers. Not all +targets support all bit widths or vector types, however. + +:: + + declare i8 @llvm.ctlz.i8 (i8 , i1 ) + declare i16 @llvm.ctlz.i16 (i16 , i1 ) + declare i32 @llvm.ctlz.i32 (i32 , i1 ) + declare i64 @llvm.ctlz.i64 (i64 , i1 ) + declare i256 @llvm.ctlz.i256(i256 , i1 ) + declase <2 x i32> @llvm.ctlz.v2i32(<2 x i32> , i1 ) + +Overview: +""""""""" + +The '``llvm.ctlz``' family of intrinsic functions counts the number of +leading zeros in a variable. + +Arguments: +"""""""""" + +The first argument is the value to be counted. This argument may be of +any integer type, or a vectory with integer element type. The return +type must match the first argument type. + +The second argument must be a constant and is a flag to indicate whether +the intrinsic should ensure that a zero as the first argument produces a +defined result. Historically some architectures did not provide a +defined result for zero values as efficiently, and many algorithms are +now predicated on avoiding zero-value inputs. + +Semantics: +"""""""""" + +The '``llvm.ctlz``' intrinsic counts the leading (most significant) +zeros in a variable, or within each element of the vector. If +``src == 0`` then the result is the size in bits of the type of ``src`` +if ``is_zero_undef == 0`` and ``undef`` otherwise. For example, +``llvm.ctlz(i32 2) = 30``. + +'``llvm.cttz.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.cttz`` on any +integer bit width, or any vector of integer elements. Not all targets +support all bit widths or vector types, however. + +:: + + declare i8 @llvm.cttz.i8 (i8 , i1 ) + declare i16 @llvm.cttz.i16 (i16 , i1 ) + declare i32 @llvm.cttz.i32 (i32 , i1 ) + declare i64 @llvm.cttz.i64 (i64 , i1 ) + declare i256 @llvm.cttz.i256(i256 , i1 ) + declase <2 x i32> @llvm.cttz.v2i32(<2 x i32> , i1 ) + +Overview: +""""""""" + +The '``llvm.cttz``' family of intrinsic functions counts the number of +trailing zeros. + +Arguments: +"""""""""" + +The first argument is the value to be counted. This argument may be of +any integer type, or a vectory with integer element type. The return +type must match the first argument type. + +The second argument must be a constant and is a flag to indicate whether +the intrinsic should ensure that a zero as the first argument produces a +defined result. Historically some architectures did not provide a +defined result for zero values as efficiently, and many algorithms are +now predicated on avoiding zero-value inputs. + +Semantics: +"""""""""" + +The '``llvm.cttz``' intrinsic counts the trailing (least significant) +zeros in a variable, or within each element of a vector. If ``src == 0`` +then the result is the size in bits of the type of ``src`` if +``is_zero_undef == 0`` and ``undef`` otherwise. For example, +``llvm.cttz(2) = 1``. + +Arithmetic with Overflow Intrinsics +----------------------------------- + +LLVM provides intrinsics for some arithmetic with overflow operations. + +'``llvm.sadd.with.overflow.*``' Intrinsics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.sadd.with.overflow`` +on any integer bit width. + +:: + + declare {i16, i1} @llvm.sadd.with.overflow.i16(i16 %a, i16 %b) + declare {i32, i1} @llvm.sadd.with.overflow.i32(i32 %a, i32 %b) + declare {i64, i1} @llvm.sadd.with.overflow.i64(i64 %a, i64 %b) + +Overview: +""""""""" + +The '``llvm.sadd.with.overflow``' family of intrinsic functions perform +a signed addition of the two arguments, and indicate whether an overflow +occurred during the signed summation. + +Arguments: +"""""""""" + +The arguments (%a and %b) and the first element of the result structure +may be of integer types of any bit width, but they must have the same +bit width. The second element of the result structure must be of type +``i1``. ``%a`` and ``%b`` are the two values that will undergo signed +addition. + +Semantics: +"""""""""" + +The '``llvm.sadd.with.overflow``' family of intrinsic functions perform +a signed addition of the two variables. They return a structure --- the +first element of which is the signed summation, and the second element +of which is a bit specifying if the signed summation resulted in an +overflow. + +Examples: +""""""""" + +.. code-block:: llvm + + %res = call {i32, i1} @llvm.sadd.with.overflow.i32(i32 %a, i32 %b) + %sum = extractvalue {i32, i1} %res, 0 + %obit = extractvalue {i32, i1} %res, 1 + br i1 %obit, label %overflow, label %normal + +'``llvm.uadd.with.overflow.*``' Intrinsics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.uadd.with.overflow`` +on any integer bit width. + +:: + + declare {i16, i1} @llvm.uadd.with.overflow.i16(i16 %a, i16 %b) + declare {i32, i1} @llvm.uadd.with.overflow.i32(i32 %a, i32 %b) + declare {i64, i1} @llvm.uadd.with.overflow.i64(i64 %a, i64 %b) + +Overview: +""""""""" + +The '``llvm.uadd.with.overflow``' family of intrinsic functions perform +an unsigned addition of the two arguments, and indicate whether a carry +occurred during the unsigned summation. + +Arguments: +"""""""""" + +The arguments (%a and %b) and the first element of the result structure +may be of integer types of any bit width, but they must have the same +bit width. The second element of the result structure must be of type +``i1``. ``%a`` and ``%b`` are the two values that will undergo unsigned +addition. + +Semantics: +"""""""""" + +The '``llvm.uadd.with.overflow``' family of intrinsic functions perform +an unsigned addition of the two arguments. They return a structure --- the +first element of which is the sum, and the second element of which is a +bit specifying if the unsigned summation resulted in a carry. + +Examples: +""""""""" + +.. code-block:: llvm + + %res = call {i32, i1} @llvm.uadd.with.overflow.i32(i32 %a, i32 %b) + %sum = extractvalue {i32, i1} %res, 0 + %obit = extractvalue {i32, i1} %res, 1 + br i1 %obit, label %carry, label %normal + +'``llvm.ssub.with.overflow.*``' Intrinsics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.ssub.with.overflow`` +on any integer bit width. + +:: + + declare {i16, i1} @llvm.ssub.with.overflow.i16(i16 %a, i16 %b) + declare {i32, i1} @llvm.ssub.with.overflow.i32(i32 %a, i32 %b) + declare {i64, i1} @llvm.ssub.with.overflow.i64(i64 %a, i64 %b) + +Overview: +""""""""" + +The '``llvm.ssub.with.overflow``' family of intrinsic functions perform +a signed subtraction of the two arguments, and indicate whether an +overflow occurred during the signed subtraction. + +Arguments: +"""""""""" + +The arguments (%a and %b) and the first element of the result structure +may be of integer types of any bit width, but they must have the same +bit width. The second element of the result structure must be of type +``i1``. ``%a`` and ``%b`` are the two values that will undergo signed +subtraction. + +Semantics: +"""""""""" + +The '``llvm.ssub.with.overflow``' family of intrinsic functions perform +a signed subtraction of the two arguments. They return a structure --- the +first element of which is the subtraction, and the second element of +which is a bit specifying if the signed subtraction resulted in an +overflow. + +Examples: +""""""""" + +.. code-block:: llvm + + %res = call {i32, i1} @llvm.ssub.with.overflow.i32(i32 %a, i32 %b) + %sum = extractvalue {i32, i1} %res, 0 + %obit = extractvalue {i32, i1} %res, 1 + br i1 %obit, label %overflow, label %normal + +'``llvm.usub.with.overflow.*``' Intrinsics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.usub.with.overflow`` +on any integer bit width. + +:: + + declare {i16, i1} @llvm.usub.with.overflow.i16(i16 %a, i16 %b) + declare {i32, i1} @llvm.usub.with.overflow.i32(i32 %a, i32 %b) + declare {i64, i1} @llvm.usub.with.overflow.i64(i64 %a, i64 %b) + +Overview: +""""""""" + +The '``llvm.usub.with.overflow``' family of intrinsic functions perform +an unsigned subtraction of the two arguments, and indicate whether an +overflow occurred during the unsigned subtraction. + +Arguments: +"""""""""" + +The arguments (%a and %b) and the first element of the result structure +may be of integer types of any bit width, but they must have the same +bit width. The second element of the result structure must be of type +``i1``. ``%a`` and ``%b`` are the two values that will undergo unsigned +subtraction. + +Semantics: +"""""""""" + +The '``llvm.usub.with.overflow``' family of intrinsic functions perform +an unsigned subtraction of the two arguments. They return a structure --- +the first element of which is the subtraction, and the second element of +which is a bit specifying if the unsigned subtraction resulted in an +overflow. + +Examples: +""""""""" + +.. code-block:: llvm + + %res = call {i32, i1} @llvm.usub.with.overflow.i32(i32 %a, i32 %b) + %sum = extractvalue {i32, i1} %res, 0 + %obit = extractvalue {i32, i1} %res, 1 + br i1 %obit, label %overflow, label %normal + +'``llvm.smul.with.overflow.*``' Intrinsics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.smul.with.overflow`` +on any integer bit width. + +:: + + declare {i16, i1} @llvm.smul.with.overflow.i16(i16 %a, i16 %b) + declare {i32, i1} @llvm.smul.with.overflow.i32(i32 %a, i32 %b) + declare {i64, i1} @llvm.smul.with.overflow.i64(i64 %a, i64 %b) + +Overview: +""""""""" + +The '``llvm.smul.with.overflow``' family of intrinsic functions perform +a signed multiplication of the two arguments, and indicate whether an +overflow occurred during the signed multiplication. + +Arguments: +"""""""""" + +The arguments (%a and %b) and the first element of the result structure +may be of integer types of any bit width, but they must have the same +bit width. The second element of the result structure must be of type +``i1``. ``%a`` and ``%b`` are the two values that will undergo signed +multiplication. + +Semantics: +"""""""""" + +The '``llvm.smul.with.overflow``' family of intrinsic functions perform +a signed multiplication of the two arguments. They return a structure --- +the first element of which is the multiplication, and the second element +of which is a bit specifying if the signed multiplication resulted in an +overflow. + +Examples: +""""""""" + +.. code-block:: llvm + + %res = call {i32, i1} @llvm.smul.with.overflow.i32(i32 %a, i32 %b) + %sum = extractvalue {i32, i1} %res, 0 + %obit = extractvalue {i32, i1} %res, 1 + br i1 %obit, label %overflow, label %normal + +'``llvm.umul.with.overflow.*``' Intrinsics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use ``llvm.umul.with.overflow`` +on any integer bit width. + +:: + + declare {i16, i1} @llvm.umul.with.overflow.i16(i16 %a, i16 %b) + declare {i32, i1} @llvm.umul.with.overflow.i32(i32 %a, i32 %b) + declare {i64, i1} @llvm.umul.with.overflow.i64(i64 %a, i64 %b) + +Overview: +""""""""" + +The '``llvm.umul.with.overflow``' family of intrinsic functions perform +a unsigned multiplication of the two arguments, and indicate whether an +overflow occurred during the unsigned multiplication. + +Arguments: +"""""""""" + +The arguments (%a and %b) and the first element of the result structure +may be of integer types of any bit width, but they must have the same +bit width. The second element of the result structure must be of type +``i1``. ``%a`` and ``%b`` are the two values that will undergo unsigned +multiplication. + +Semantics: +"""""""""" + +The '``llvm.umul.with.overflow``' family of intrinsic functions perform +an unsigned multiplication of the two arguments. They return a structure --- +the first element of which is the multiplication, and the second +element of which is a bit specifying if the unsigned multiplication +resulted in an overflow. + +Examples: +""""""""" + +.. code-block:: llvm + + %res = call {i32, i1} @llvm.umul.with.overflow.i32(i32 %a, i32 %b) + %sum = extractvalue {i32, i1} %res, 0 + %obit = extractvalue {i32, i1} %res, 1 + br i1 %obit, label %overflow, label %normal + +Specialised Arithmetic Intrinsics +--------------------------------- + +'``llvm.fmuladd.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare float @llvm.fmuladd.f32(float %a, float %b, float %c) + declare double @llvm.fmuladd.f64(double %a, double %b, double %c) + +Overview: +""""""""" + +The '``llvm.fmuladd.*``' intrinsic functions represent multiply-add +expressions that can be fused if the code generator determines that (a) the +target instruction set has support for a fused operation, and (b) that the +fused operation is more efficient than the equivalent, separate pair of mul +and add instructions. + +Arguments: +"""""""""" + +The '``llvm.fmuladd.*``' intrinsics each take three arguments: two +multiplicands, a and b, and an addend c. + +Semantics: +"""""""""" + +The expression: + +:: + + %0 = call float @llvm.fmuladd.f32(%a, %b, %c) + +is equivalent to the expression a \* b + c, except that rounding will +not be performed between the multiplication and addition steps if the +code generator fuses the operations. Fusion is not guaranteed, even if +the target platform supports it. If a fused multiply-add is required the +corresponding llvm.fma.\* intrinsic function should be used instead. + +Examples: +""""""""" + +.. code-block:: llvm + + %r2 = call float @llvm.fmuladd.f32(float %a, float %b, float %c) ; yields {float}:r2 = (a * b) + c + +Half Precision Floating Point Intrinsics +---------------------------------------- + +For most target platforms, half precision floating point is a +storage-only format. This means that it is a dense encoding (in memory) +but does not support computation in the format. + +This means that code must first load the half-precision floating point +value as an i16, then convert it to float with +:ref:`llvm.convert.from.fp16 `. Computation can +then be performed on the float value (including extending to double +etc). To store the value back to memory, it is first converted to float +if needed, then converted to i16 with +:ref:`llvm.convert.to.fp16 `, then storing as an +i16 value. + +.. _int_convert_to_fp16: + +'``llvm.convert.to.fp16``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare i16 @llvm.convert.to.fp16(f32 %a) + +Overview: +""""""""" + +The '``llvm.convert.to.fp16``' intrinsic function performs a conversion +from single precision floating point format to half precision floating +point format. + +Arguments: +"""""""""" + +The intrinsic function contains single argument - the value to be +converted. + +Semantics: +"""""""""" + +The '``llvm.convert.to.fp16``' intrinsic function performs a conversion +from single precision floating point format to half precision floating +point format. The return value is an ``i16`` which contains the +converted number. + +Examples: +""""""""" + +.. code-block:: llvm + + %res = call i16 @llvm.convert.to.fp16(f32 %a) + store i16 %res, i16* @x, align 2 + +.. _int_convert_from_fp16: + +'``llvm.convert.from.fp16``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare f32 @llvm.convert.from.fp16(i16 %a) + +Overview: +""""""""" + +The '``llvm.convert.from.fp16``' intrinsic function performs a +conversion from half precision floating point format to single precision +floating point format. + +Arguments: +"""""""""" + +The intrinsic function contains single argument - the value to be +converted. + +Semantics: +"""""""""" + +The '``llvm.convert.from.fp16``' intrinsic function performs a +conversion from half single precision floating point format to single +precision floating point format. The input half-float value is +represented by an ``i16`` value. + +Examples: +""""""""" + +.. code-block:: llvm + + %a = load i16* @x, align 2 + %res = call f32 @llvm.convert.from.fp16(i16 %a) + +Debugger Intrinsics +------------------- + +The LLVM debugger intrinsics (which all start with ``llvm.dbg.`` +prefix), are described in the `LLVM Source Level +Debugging `_ +document. + +Exception Handling Intrinsics +----------------------------- + +The LLVM exception handling intrinsics (which all start with +``llvm.eh.`` prefix), are described in the `LLVM Exception +Handling `_ document. + +.. _int_trampoline: + +Trampoline Intrinsics +--------------------- + +These intrinsics make it possible to excise one parameter, marked with +the :ref:`nest ` attribute, from a function. The result is a +callable function pointer lacking the nest parameter - the caller does +not need to provide a value for it. Instead, the value to use is stored +in advance in a "trampoline", a block of memory usually allocated on the +stack, which also contains code to splice the nest value into the +argument list. This is used to implement the GCC nested function address +extension. + +For example, if the function is ``i32 f(i8* nest %c, i32 %x, i32 %y)`` +then the resulting function pointer has signature ``i32 (i32, i32)*``. +It can be created as follows: + +.. code-block:: llvm + + %tramp = alloca [10 x i8], align 4 ; size and alignment only correct for X86 + %tramp1 = getelementptr [10 x i8]* %tramp, i32 0, i32 0 + call i8* @llvm.init.trampoline(i8* %tramp1, i8* bitcast (i32 (i8*, i32, i32)* @f to i8*), i8* %nval) + %p = call i8* @llvm.adjust.trampoline(i8* %tramp1) + %fp = bitcast i8* %p to i32 (i32, i32)* + +The call ``%val = call i32 %fp(i32 %x, i32 %y)`` is then equivalent to +``%val = call i32 %f(i8* %nval, i32 %x, i32 %y)``. + +.. _int_it: + +'``llvm.init.trampoline``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.init.trampoline(i8* , i8* , i8* ) + +Overview: +""""""""" + +This fills the memory pointed to by ``tramp`` with executable code, +turning it into a trampoline. + +Arguments: +"""""""""" + +The ``llvm.init.trampoline`` intrinsic takes three arguments, all +pointers. The ``tramp`` argument must point to a sufficiently large and +sufficiently aligned block of memory; this memory is written to by the +intrinsic. Note that the size and the alignment are target-specific - +LLVM currently provides no portable way of determining them, so a +front-end that generates this intrinsic needs to have some +target-specific knowledge. The ``func`` argument must hold a function +bitcast to an ``i8*``. + +Semantics: +"""""""""" + +The block of memory pointed to by ``tramp`` is filled with target +dependent code, turning it into a function. Then ``tramp`` needs to be +passed to :ref:`llvm.adjust.trampoline ` to get a pointer which can +be :ref:`bitcast (to a new function) and called `. The new +function's signature is the same as that of ``func`` with any arguments +marked with the ``nest`` attribute removed. At most one such ``nest`` +argument is allowed, and it must be of pointer type. Calling the new +function is equivalent to calling ``func`` with the same argument list, +but with ``nval`` used for the missing ``nest`` argument. If, after +calling ``llvm.init.trampoline``, the memory pointed to by ``tramp`` is +modified, then the effect of any later call to the returned function +pointer is undefined. + +.. _int_at: + +'``llvm.adjust.trampoline``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare i8* @llvm.adjust.trampoline(i8* ) + +Overview: +""""""""" + +This performs any required machine-specific adjustment to the address of +a trampoline (passed as ``tramp``). + +Arguments: +"""""""""" + +``tramp`` must point to a block of memory which already has trampoline +code filled in by a previous call to +:ref:`llvm.init.trampoline `. + +Semantics: +"""""""""" + +On some architectures the address of the code to be executed needs to be +different to the address where the trampoline is actually stored. This +intrinsic returns the executable address corresponding to ``tramp`` +after performing the required machine specific adjustments. The pointer +returned can then be :ref:`bitcast and executed `. + +Memory Use Markers +------------------ + +This class of intrinsics exists to information about the lifetime of +memory objects and ranges where variables are immutable. + +'``llvm.lifetime.start``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.lifetime.start(i64 , i8* nocapture ) + +Overview: +""""""""" + +The '``llvm.lifetime.start``' intrinsic specifies the start of a memory +object's lifetime. + +Arguments: +"""""""""" + +The first argument is a constant integer representing the size of the +object, or -1 if it is variable sized. The second argument is a pointer +to the object. + +Semantics: +"""""""""" + +This intrinsic indicates that before this point in the code, the value +of the memory pointed to by ``ptr`` is dead. This means that it is known +to never be used and has an undefined value. A load from the pointer +that precedes this intrinsic can be replaced with ``'undef'``. + +'``llvm.lifetime.end``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.lifetime.end(i64 , i8* nocapture ) + +Overview: +""""""""" + +The '``llvm.lifetime.end``' intrinsic specifies the end of a memory +object's lifetime. + +Arguments: +"""""""""" + +The first argument is a constant integer representing the size of the +object, or -1 if it is variable sized. The second argument is a pointer +to the object. + +Semantics: +"""""""""" + +This intrinsic indicates that after this point in the code, the value of +the memory pointed to by ``ptr`` is dead. This means that it is known to +never be used and has an undefined value. Any stores into the memory +object following this intrinsic may be removed as dead. + +'``llvm.invariant.start``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare {}* @llvm.invariant.start(i64 , i8* nocapture ) + +Overview: +""""""""" + +The '``llvm.invariant.start``' intrinsic specifies that the contents of +a memory object will not change. + +Arguments: +"""""""""" + +The first argument is a constant integer representing the size of the +object, or -1 if it is variable sized. The second argument is a pointer +to the object. + +Semantics: +"""""""""" + +This intrinsic indicates that until an ``llvm.invariant.end`` that uses +the return value, the referenced memory location is constant and +unchanging. + +'``llvm.invariant.end``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.invariant.end({}* , i64 , i8* nocapture ) + +Overview: +""""""""" + +The '``llvm.invariant.end``' intrinsic specifies that the contents of a +memory object are mutable. + +Arguments: +"""""""""" + +The first argument is the matching ``llvm.invariant.start`` intrinsic. +The second argument is a constant integer representing the size of the +object, or -1 if it is variable sized and the third argument is a +pointer to the object. + +Semantics: +"""""""""" + +This intrinsic indicates that the memory is mutable again. + +General Intrinsics +------------------ + +This class of intrinsics is designed to be generic and has no specific +purpose. + +'``llvm.var.annotation``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.var.annotation(i8* , i8* , i8* , i32 ) + +Overview: +""""""""" + +The '``llvm.var.annotation``' intrinsic. + +Arguments: +"""""""""" + +The first argument is a pointer to a value, the second is a pointer to a +global string, the third is a pointer to a global string which is the +source file name, and the last argument is the line number. + +Semantics: +"""""""""" + +This intrinsic allows annotation of local variables with arbitrary +strings. This can be useful for special purpose optimizations that want +to look for these annotations. These have no other defined use; they are +ignored by code generation and optimization. + +'``llvm.ptr.annotation.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use '``llvm.ptr.annotation``' on a +pointer to an integer of any width. *NOTE* you must specify an address space for +the pointer. The identifier for the default address space is the integer +'``0``'. + +:: + + declare i8* @llvm.ptr.annotation.p
i8(i8* , i8* , i8* , i32 ) + declare i16* @llvm.ptr.annotation.p
i16(i16* , i8* , i8* , i32 ) + declare i32* @llvm.ptr.annotation.p
i32(i32* , i8* , i8* , i32 ) + declare i64* @llvm.ptr.annotation.p
i64(i64* , i8* , i8* , i32 ) + declare i256* @llvm.ptr.annotation.p
i256(i256* , i8* , i8* , i32 ) + +Overview: +""""""""" + +The '``llvm.ptr.annotation``' intrinsic. + +Arguments: +"""""""""" + +The first argument is a pointer to an integer value of arbitrary bitwidth +(result of some expression), the second is a pointer to a global string, the +third is a pointer to a global string which is the source file name, and the +last argument is the line number. It returns the value of the first argument. + +Semantics: +"""""""""" + +This intrinsic allows annotation of a pointer to an integer with arbitrary +strings. This can be useful for special purpose optimizations that want to look +for these annotations. These have no other defined use; they are ignored by code +generation and optimization. + +'``llvm.annotation.*``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +This is an overloaded intrinsic. You can use '``llvm.annotation``' on +any integer bit width. + +:: + + declare i8 @llvm.annotation.i8(i8 , i8* , i8* , i32 ) + declare i16 @llvm.annotation.i16(i16 , i8* , i8* , i32 ) + declare i32 @llvm.annotation.i32(i32 , i8* , i8* , i32 ) + declare i64 @llvm.annotation.i64(i64 , i8* , i8* , i32 ) + declare i256 @llvm.annotation.i256(i256 , i8* , i8* , i32 ) + +Overview: +""""""""" + +The '``llvm.annotation``' intrinsic. + +Arguments: +"""""""""" + +The first argument is an integer value (result of some expression), the +second is a pointer to a global string, the third is a pointer to a +global string which is the source file name, and the last argument is +the line number. It returns the value of the first argument. + +Semantics: +"""""""""" + +This intrinsic allows annotations to be put on arbitrary expressions +with arbitrary strings. This can be useful for special purpose +optimizations that want to look for these annotations. These have no +other defined use; they are ignored by code generation and optimization. + +'``llvm.trap``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.trap() noreturn nounwind + +Overview: +""""""""" + +The '``llvm.trap``' intrinsic. + +Arguments: +"""""""""" + +None. + +Semantics: +"""""""""" + +This intrinsic is lowered to the target dependent trap instruction. If +the target does not have a trap instruction, this intrinsic will be +lowered to a call of the ``abort()`` function. + +'``llvm.debugtrap``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.debugtrap() nounwind + +Overview: +""""""""" + +The '``llvm.debugtrap``' intrinsic. + +Arguments: +"""""""""" + +None. + +Semantics: +"""""""""" + +This intrinsic is lowered to code which is intended to cause an +execution trap with the intention of requesting the attention of a +debugger. + +'``llvm.stackprotector``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.stackprotector(i8* , i8** ) + +Overview: +""""""""" + +The ``llvm.stackprotector`` intrinsic takes the ``guard`` and stores it +onto the stack at ``slot``. The stack slot is adjusted to ensure that it +is placed on the stack before local variables. + +Arguments: +"""""""""" + +The ``llvm.stackprotector`` intrinsic requires two pointer arguments. +The first argument is the value loaded from the stack guard +``@__stack_chk_guard``. The second variable is an ``alloca`` that has +enough space to hold the value of the guard. + +Semantics: +"""""""""" + +This intrinsic causes the prologue/epilogue inserter to force the position of +the ``AllocaInst`` stack slot to be before local variables on the stack. This is +to ensure that if a local variable on the stack is overwritten, it will destroy +the value of the guard. When the function exits, the guard on the stack is +checked against the original guard by ``llvm.stackprotectorcheck``. If they are +different, then ``llvm.stackprotectorcheck`` causes the program to abort by +calling the ``__stack_chk_fail()`` function. + +'``llvm.stackprotectorcheck``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.stackprotectorcheck(i8** ) + +Overview: +""""""""" + +The ``llvm.stackprotectorcheck`` intrinsic compares ``guard`` against an already +created stack protector and if they are not equal calls the +``__stack_chk_fail()`` function. + +Arguments: +"""""""""" + +The ``llvm.stackprotectorcheck`` intrinsic requires one pointer argument, the +the variable ``@__stack_chk_guard``. + +Semantics: +"""""""""" + +This intrinsic is provided to perform the stack protector check by comparing +``guard`` with the stack slot created by ``llvm.stackprotector`` and if the +values do not match call the ``__stack_chk_fail()`` function. + +The reason to provide this as an IR level intrinsic instead of implementing it +via other IR operations is that in order to perform this operation at the IR +level without an intrinsic, one would need to create additional basic blocks to +handle the success/failure cases. This makes it difficult to stop the stack +protector check from disrupting sibling tail calls in Codegen. With this +intrinsic, we are able to generate the stack protector basic blocks late in +codegen after the tail call decision has occurred. + +'``llvm.objectsize``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare i32 @llvm.objectsize.i32(i8* , i1 ) + declare i64 @llvm.objectsize.i64(i8* , i1 ) + +Overview: +""""""""" + +The ``llvm.objectsize`` intrinsic is designed to provide information to +the optimizers to determine at compile time whether a) an operation +(like memcpy) will overflow a buffer that corresponds to an object, or +b) that a runtime check for overflow isn't necessary. An object in this +context means an allocation of a specific class, structure, array, or +other object. + +Arguments: +"""""""""" + +The ``llvm.objectsize`` intrinsic takes two arguments. The first +argument is a pointer to or into the ``object``. The second argument is +a boolean and determines whether ``llvm.objectsize`` returns 0 (if true) +or -1 (if false) when the object size is unknown. The second argument +only accepts constants. + +Semantics: +"""""""""" + +The ``llvm.objectsize`` intrinsic is lowered to a constant representing +the size of the object concerned. If the size cannot be determined at +compile time, ``llvm.objectsize`` returns ``i32/i64 -1 or 0`` (depending +on the ``min`` argument). + +'``llvm.expect``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare i32 @llvm.expect.i32(i32 , i32 ) + declare i64 @llvm.expect.i64(i64 , i64 ) + +Overview: +""""""""" + +The ``llvm.expect`` intrinsic provides information about expected (the +most probable) value of ``val``, which can be used by optimizers. + +Arguments: +"""""""""" + +The ``llvm.expect`` intrinsic takes two arguments. The first argument is +a value. The second argument is an expected value, this needs to be a +constant value, variables are not allowed. + +Semantics: +"""""""""" + +This intrinsic is lowered to the ``val``. + +'``llvm.donothing``' Intrinsic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +:: + + declare void @llvm.donothing() nounwind readnone + +Overview: +""""""""" + +The ``llvm.donothing`` intrinsic doesn't perform any operation. It's the +only intrinsic that can be called with an invoke instruction. + +Arguments: +"""""""""" + +None. + +Semantics: +"""""""""" + +This intrinsic does nothing, and it's removed by optimizers and ignored +by codegen. diff --git a/docs/Lexicon.rst b/docs/Lexicon.rst new file mode 100644 index 00000000..11f1341f --- /dev/null +++ b/docs/Lexicon.rst @@ -0,0 +1,222 @@ +================ +The LLVM Lexicon +================ + +.. note:: + + This document is a work in progress! + +Definitions +=========== + +A +- + +**ADCE** + Aggressive Dead Code Elimination + +**AST** + Abstract Syntax Tree. + + Due to Clang's influence (mostly the fact that parsing and semantic + analysis are so intertwined for C and especially C++), the typical + working definition of AST in the LLVM community is roughly "the + compiler's first complete symbolic (as opposed to textual) + representation of an input program". + As such, an "AST" might be a more general graph instead of a "tree" + (consider the symbolic representation for the type of a typical "linked + list node"). This working definition is closer to what some authors + call an "annotated abstract syntax tree". + + Consult your favorite compiler book or search engine for more details. + +B +- + +.. _lexicon-bb-vectorization: + +**BB Vectorization** + Basic-Block Vectorization + +**BURS** + Bottom Up Rewriting System --- A method of instruction selection for code + generation. An example is the `BURG + `_ tool. + +C +- + +**CSE** + Common Subexpression Elimination. An optimization that removes common + subexpression compuation. For example ``(a+b)*(a+b)`` has two subexpressions + that are the same: ``(a+b)``. This optimization would perform the addition + only once and then perform the multiply (but only if it's compulationally + correct/safe). + +D +- + +**DAG** + Directed Acyclic Graph + +.. _derived pointer: +.. _derived pointers: + +**Derived Pointer** + A pointer to the interior of an object, such that a garbage collector is + unable to use the pointer for reachability analysis. While a derived pointer + is live, the corresponding object pointer must be kept in a root, otherwise + the collector might free the referenced object. With copying collectors, + derived pointers pose an additional hazard that they may be invalidated at + any `safe point`_. This term is used in opposition to `object pointer`_. + +**DSA** + Data Structure Analysis + +**DSE** + Dead Store Elimination + +F +- + +**FCA** + First Class Aggregate + +G +- + +**GC** + Garbage Collection. The practice of using reachability analysis instead of + explicit memory management to reclaim unused memory. + +H +- + +.. _heap: + +**Heap** + In garbage collection, the region of memory which is managed using + reachability analysis. + +I +- + +**IPA** + Inter-Procedural Analysis. Refers to any variety of code analysis that + occurs between procedures, functions or compilation units (modules). + +**IPO** + Inter-Procedural Optimization. Refers to any variety of code optimization + that occurs between procedures, functions or compilation units (modules). + +**ISel** + Instruction Selection + +L +- + +**LCSSA** + Loop-Closed Static Single Assignment Form + +**LICM** + Loop Invariant Code Motion + +**Load-VN** + Load Value Numbering + +**LTO** + Link-Time Optimization + +M +- + +**MC** + Machine Code + +O +- +.. _object pointer: +.. _object pointers: + +**Object Pointer** + A pointer to an object such that the garbage collector is able to trace + references contained within the object. This term is used in opposition to + `derived pointer`_. + +P +- + +**PRE** + Partial Redundancy Elimination + +R +- + +**RAUW** + + Replace All Uses With. The functions ``User::replaceUsesOfWith()``, + ``Value::replaceAllUsesWith()``, and + ``Constant::replaceUsesOfWithOnConstant()`` implement the replacement of one + Value with another by iterating over its def/use chain and fixing up all of + the pointers to point to the new value. See + also `def/use chains `_. + +**Reassociation** + Rearranging associative expressions to promote better redundancy elimination + and other optimization. For example, changing ``(A+B-A)`` into ``(B+A-A)``, + permitting it to be optimized into ``(B+0)`` then ``(B)``. + +.. _roots: +.. _stack roots: + +**Root** + In garbage collection, a pointer variable lying outside of the `heap`_ from + which the collector begins its reachability analysis. In the context of code + generation, "root" almost always refers to a "stack root" --- a local or + temporary variable within an executing function. + +**RPO** + Reverse postorder + +S +- + +.. _safe point: + +**Safe Point** + In garbage collection, it is necessary to identify `stack roots`_ so that + reachability analysis may proceed. It may be infeasible to provide this + information for every instruction, so instead the information may is + calculated only at designated safe points. With a copying collector, + `derived pointers`_ must not be retained across safe points and `object + pointers`_ must be reloaded from stack roots. + +**SDISel** + Selection DAG Instruction Selection. + +**SCC** + Strongly Connected Component + +**SCCP** + Sparse Conditional Constant Propagation + +**SLP** + Superword-Level Parallelism, same as :ref:`Basic-Block Vectorization + `. + +**SRoA** + Scalar Replacement of Aggregates + +**SSA** + Static Single Assignment + +**Stack Map** + In garbage collection, metadata emitted by the code generator which + identifies `roots`_ within the stack frame of an executing function. + +T +- + +**TBAA** + Type-Based Alias Analysis + diff --git a/docs/LinkTimeOptimization.rst b/docs/LinkTimeOptimization.rst new file mode 100644 index 00000000..c15abd32 --- /dev/null +++ b/docs/LinkTimeOptimization.rst @@ -0,0 +1,299 @@ +====================================================== +LLVM Link Time Optimization: Design and Implementation +====================================================== + +.. contents:: + :local: + +Description +=========== + +LLVM features powerful intermodular optimizations which can be used at link +time. Link Time Optimization (LTO) is another name for intermodular +optimization when performed during the link stage. This document describes the +interface and design between the LTO optimizer and the linker. + +Design Philosophy +================= + +The LLVM Link Time Optimizer provides complete transparency, while doing +intermodular optimization, in the compiler tool chain. Its main goal is to let +the developer take advantage of intermodular optimizations without making any +significant changes to the developer's makefiles or build system. This is +achieved through tight integration with the linker. In this model, the linker +treates LLVM bitcode files like native object files and allows mixing and +matching among them. The linker uses `libLTO`_, a shared object, to handle LLVM +bitcode files. This tight integration between the linker and LLVM optimizer +helps to do optimizations that are not possible in other models. The linker +input allows the optimizer to avoid relying on conservative escape analysis. + +.. _libLTO-example: + +Example of link time optimization +--------------------------------- + +The following example illustrates the advantages of LTO's integrated approach +and clean interface. This example requires a system linker which supports LTO +through the interface described in this document. Here, clang transparently +invokes system linker. + +* Input source file ``a.c`` is compiled into LLVM bitcode form. +* Input source file ``main.c`` is compiled into native object code. + +.. code-block:: c++ + + --- a.h --- + extern int foo1(void); + extern void foo2(void); + extern void foo4(void); + + --- a.c --- + #include "a.h" + + static signed int i = 0; + + void foo2(void) { + i = -1; + } + + static int foo3() { + foo4(); + return 10; + } + + int foo1(void) { + int data = 0; + + if (i < 0) + data = foo3(); + + data = data + 42; + return data; + } + + --- main.c --- + #include + #include "a.h" + + void foo4(void) { + printf("Hi\n"); + } + + int main() { + return foo1(); + } + +To compile, run: + +.. code-block:: console + + % clang -emit-llvm -c a.c -o a.o # <-- a.o is LLVM bitcode file + % clang -c main.c -o main.o # <-- main.o is native object file + % clang a.o main.o -o main # <-- standard link command without modifications + +* In this example, the linker recognizes that ``foo2()`` is an externally + visible symbol defined in LLVM bitcode file. The linker completes its usual + symbol resolution pass and finds that ``foo2()`` is not used + anywhere. This information is used by the LLVM optimizer and it + removes ``foo2()``. + +* As soon as ``foo2()`` is removed, the optimizer recognizes that condition ``i + < 0`` is always false, which means ``foo3()`` is never used. Hence, the + optimizer also removes ``foo3()``. + +* And this in turn, enables linker to remove ``foo4()``. + +This example illustrates the advantage of tight integration with the +linker. Here, the optimizer can not remove ``foo3()`` without the linker's +input. + +Alternative Approaches +---------------------- + +**Compiler driver invokes link time optimizer separately.** + In this model the link time optimizer is not able to take advantage of + information collected during the linker's normal symbol resolution phase. + In the above example, the optimizer can not remove ``foo2()`` without the + linker's input because it is externally visible. This in turn prohibits the + optimizer from removing ``foo3()``. + +**Use separate tool to collect symbol information from all object files.** + In this model, a new, separate, tool or library replicates the linker's + capability to collect information for link time optimization. Not only is + this code duplication difficult to justify, but it also has several other + disadvantages. For example, the linking semantics and the features provided + by the linker on various platform are not unique. This means, this new tool + needs to support all such features and platforms in one super tool or a + separate tool per platform is required. This increases maintenance cost for + link time optimizer significantly, which is not necessary. This approach + also requires staying synchronized with linker developements on various + platforms, which is not the main focus of the link time optimizer. Finally, + this approach increases end user's build time due to the duplication of work + done by this separate tool and the linker itself. + +Multi-phase communication between ``libLTO`` and linker +======================================================= + +The linker collects information about symbol defininitions and uses in various +link objects which is more accurate than any information collected by other +tools during typical build cycles. The linker collects this information by +looking at the definitions and uses of symbols in native .o files and using +symbol visibility information. The linker also uses user-supplied information, +such as a list of exported symbols. LLVM optimizer collects control flow +information, data flow information and knows much more about program structure +from the optimizer's point of view. Our goal is to take advantage of tight +integration between the linker and the optimizer by sharing this information +during various linking phases. + +Phase 1 : Read LLVM Bitcode Files +--------------------------------- + +The linker first reads all object files in natural order and collects symbol +information. This includes native object files as well as LLVM bitcode files. +To minimize the cost to the linker in the case that all .o files are native +object files, the linker only calls ``lto_module_create()`` when a supplied +object file is found to not be a native object file. If ``lto_module_create()`` +returns that the file is an LLVM bitcode file, the linker then iterates over the +module using ``lto_module_get_symbol_name()`` and +``lto_module_get_symbol_attribute()`` to get all symbols defined and referenced. +This information is added to the linker's global symbol table. + + +The lto* functions are all implemented in a shared object libLTO. This allows +the LLVM LTO code to be updated independently of the linker tool. On platforms +that support it, the shared object is lazily loaded. + +Phase 2 : Symbol Resolution +--------------------------- + +In this stage, the linker resolves symbols using global symbol table. It may +report undefined symbol errors, read archive members, replace weak symbols, etc. +The linker is able to do this seamlessly even though it does not know the exact +content of input LLVM bitcode files. If dead code stripping is enabled then the +linker collects the list of live symbols. + +Phase 3 : Optimize Bitcode Files +-------------------------------- + +After symbol resolution, the linker tells the LTO shared object which symbols +are needed by native object files. In the example above, the linker reports +that only ``foo1()`` is used by native object files using +``lto_codegen_add_must_preserve_symbol()``. Next the linker invokes the LLVM +optimizer and code generators using ``lto_codegen_compile()`` which returns a +native object file creating by merging the LLVM bitcode files and applying +various optimization passes. + +Phase 4 : Symbol Resolution after optimization +---------------------------------------------- + +In this phase, the linker reads optimized a native object file and updates the +internal global symbol table to reflect any changes. The linker also collects +information about any changes in use of external symbols by LLVM bitcode +files. In the example above, the linker notes that ``foo4()`` is not used any +more. If dead code stripping is enabled then the linker refreshes the live +symbol information appropriately and performs dead code stripping. + +After this phase, the linker continues linking as if it never saw LLVM bitcode +files. + +.. _libLTO: + +``libLTO`` +========== + +``libLTO`` is a shared object that is part of the LLVM tools, and is intended +for use by a linker. ``libLTO`` provides an abstract C interface to use the LLVM +interprocedural optimizer without exposing details of LLVM's internals. The +intention is to keep the interface as stable as possible even when the LLVM +optimizer continues to evolve. It should even be possible for a completely +different compilation technology to provide a different libLTO that works with +their object files and the standard linker tool. + +``lto_module_t`` +---------------- + +A non-native object file is handled via an ``lto_module_t``. The following +functions allow the linker to check if a file (on disk or in a memory buffer) is +a file which libLTO can process: + +.. code-block:: c + + lto_module_is_object_file(const char*) + lto_module_is_object_file_for_target(const char*, const char*) + lto_module_is_object_file_in_memory(const void*, size_t) + lto_module_is_object_file_in_memory_for_target(const void*, size_t, const char*) + +If the object file can be processed by ``libLTO``, the linker creates a +``lto_module_t`` by using one of: + +.. code-block:: c + + lto_module_create(const char*) + lto_module_create_from_memory(const void*, size_t) + +and when done, the handle is released via + +.. code-block:: c + + lto_module_dispose(lto_module_t) + + +The linker can introspect the non-native object file by getting the number of +symbols and getting the name and attributes of each symbol via: + +.. code-block:: c + + lto_module_get_num_symbols(lto_module_t) + lto_module_get_symbol_name(lto_module_t, unsigned int) + lto_module_get_symbol_attribute(lto_module_t, unsigned int) + +The attributes of a symbol include the alignment, visibility, and kind. + +``lto_code_gen_t`` +------------------ + +Once the linker has loaded each non-native object files into an +``lto_module_t``, it can request ``libLTO`` to process them all and generate a +native object file. This is done in a couple of steps. First, a code generator +is created with: + +.. code-block:: c + + lto_codegen_create() + +Then, each non-native object file is added to the code generator with: + +.. code-block:: c + + lto_codegen_add_module(lto_code_gen_t, lto_module_t) + +The linker then has the option of setting some codegen options. Whether or not +to generate DWARF debug info is set with: + +.. code-block:: c + + lto_codegen_set_debug_model(lto_code_gen_t) + +Which kind of position independence is set with: + +.. code-block:: c + + lto_codegen_set_pic_model(lto_code_gen_t) + +And each symbol that is referenced by a native object file or otherwise must not +be optimized away is set with: + +.. code-block:: c + + lto_codegen_add_must_preserve_symbol(lto_code_gen_t, const char*) + +After all these settings are done, the linker requests that a native object file +be created from the modules with the settings using: + +.. code-block:: c + + lto_codegen_compile(lto_code_gen_t, size*) + +which returns a pointer to a buffer containing the generated native object file. +The linker then parses that and links it with the rest of the native object +files. diff --git a/docs/MCJIT-creation.png b/docs/MCJIT-creation.png new file mode 100644 index 0000000000000000000000000000000000000000..7abdb9df28a97a121d6ee8097157ed5dd6ff8ddf GIT binary patch literal 26456 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

clw9^tEj)&e?ZrQAB6*H1mFnK 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
T)A_q6*jAj2}I{Exc8pTKpqAEA&XB;1Esel9w_i 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 XmyyrIKmL~2z!yweOQ}fV*}MM%;IMs~ literal 0 HcmV?d00001 diff --git a/docs/MCJIT-resolve-relocations.png b/docs/MCJIT-resolve-relocations.png new file mode 100644 index 0000000000000000000000000000000000000000..fedeacc4a92fe05330dbc675ff34ae4e3fe419a7 GIT binary patch literal 57621 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
-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 z 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 U*4zr=iu=Ildj}VL2FjoEFV~TDtpET3 literal 0 HcmV?d00001 diff --git a/docs/MCJITDesignAndImplementation.rst b/docs/MCJITDesignAndImplementation.rst new file mode 100644 index 00000000..2cb62964 --- /dev/null +++ b/docs/MCJITDesignAndImplementation.rst @@ -0,0 +1,180 @@ +=============================== +MCJIT Design and Implementation +=============================== + +Introduction +============ + +This document describes the internal workings of the MCJIT execution +engine and the RuntimeDyld component. It is intended as a high level +overview of the implementation, showing the flow and interactions of +objects throughout the code generation and dynamic loading process. + +Engine Creation +=============== + +In most cases, an EngineBuilder object is used to create an instance of +the MCJIT execution engine. The EngineBuilder takes an llvm::Module +object as an argument to its constructor. The client may then set various +options that we control the later be passed along to the MCJIT engine, +including the selection of MCJIT as the engine type to be created. +Of particular interest is the EngineBuilder::setMCJITMemoryManager +function. If the client does not explicitly create a memory manager at +this time, a default memory manager (specifically SectionMemoryManager) +will be created when the MCJIT engine is instantiated. + +Once the options have been set, a client calls EngineBuilder::create to +create an instance of the MCJIT engine. If the client does not use the +form of this function that takes a TargetMachine as a parameter, a new +TargetMachine will be created based on the target triple associated with +the Module that was used to create the EngineBuilder. + +.. image:: MCJIT-engine-builder.png + +EngineBuilder::create will call the static MCJIT::createJIT function, +passing in its pointers to the module, memory manager and target machine +objects, all of which will subsequently be owned by the MCJIT object. + +The MCJIT class has a member variable, Dyld, which contains an instance of +the RuntimeDyld wrapper class. This member will be used for +communications between MCJIT and the actual RuntimeDyldImpl object that +gets created when an object is loaded. + +.. image:: MCJIT-creation.png + +Upon creation, MCJIT holds a pointer to the Module object that it received +from EngineBuilder but it does not immediately generate code for this +module. Code generation is deferred until either the +MCJIT::finalizeObject method is called explicitly or a function such as +MCJIT::getPointerToFunction is called which requires the code to have been +generated. + +Code Generation +=============== + +When code generation is triggered, as described above, MCJIT will first +attempt to retrieve an object image from its ObjectCache member, if one +has been set. If a cached object image cannot be retrieved, MCJIT will +call its emitObject method. MCJIT::emitObject uses a local PassManager +instance and creates a new ObjectBufferStream instance, both of which it +passes to TargetManager::addPassesToEmitMC before calling PassManager::run +on the Module with which it was created. + +.. image:: MCJIT-load.png + +The PassManager::run call causes the MC code generation mechanisms to emit +a complete relocatable binary object image (either in either ELF or MachO +format, depending on the target) into the ObjectBufferStream object, which +is flushed to complete the process. If an ObjectCache is being used, the +image will be passed to the ObjectCache here. + +At this point, the ObjectBufferStream contains the raw object image. +Before the code can be executed, the code and data sections from this +image must be loaded into suitable memory, relocations must be applied and +memory permission and code cache invalidation (if required) must be completed. + +Object Loading +============== + +Once an object image has been obtained, either through code generation or +having been retrieved from an ObjectCache, it is passed to RuntimeDyld to +be loaded. The RuntimeDyld wrapper class examines the object to determine +its file format and creates an instance of either RuntimeDyldELF or +RuntimeDyldMachO (both of which derive from the RuntimeDyldImpl base +class) and calls the RuntimeDyldImpl::loadObject method to perform that +actual loading. + +.. image:: MCJIT-dyld-load.png + +RuntimeDyldImpl::loadObject begins by creating an ObjectImage instance +from the ObjectBuffer it received. ObjectImage, which wraps the +ObjectFile class, is a helper class which parses the binary object image +and provides access to the information contained in the format-specific +headers, including section, symbol and relocation information. + +RuntimeDyldImpl::loadObject then iterates through the symbols in the +image. Information about common symbols is collected for later use. For +each function or data symbol, the associated section is loaded into memory +and the symbol is stored in a symbol table map data structure. When the +iteration is complete, a section is emitted for the common symbols. + +Next, RuntimeDyldImpl::loadObject iterates through the sections in the +object image and for each section iterates through the relocations for +that sections. For each relocation, it calls the format-specific +processRelocationRef method, which will examine the relocation and store +it in one of two data structures, a section-based relocation list map and +an external symbol relocation map. + +.. image:: MCJIT-load-object.png + +When RuntimeDyldImpl::loadObject returns, all of the code and data +sections for the object will have been loaded into memory allocated by the +memory manager and relocation information will have been prepared, but the +relocations have not yet been applied and the generated code is still not +ready to be executed. + +[Currently (as of August 2013) the MCJIT engine will immediately apply +relocations when loadObject completes. However, this shouldn't be +happening. Because the code may have been generated for a remote target, +the client should be given a chance to re-map the section addresses before +relocations are applied. It is possible to apply relocations multiple +times, but in the case where addresses are to be re-mapped, this first +application is wasted effort.] + +Address Remapping +================= + +At any time after initial code has been generated and before +finalizeObject is called, the client can remap the address of sections in +the object. Typically this is done because the code was generated for an +external process and is being mapped into that process' address space. +The client remaps the section address by calling MCJIT::mapSectionAddress. +This should happen before the section memory is copied to its new +location. + +When MCJIT::mapSectionAddress is called, MCJIT passes the call on to +RuntimeDyldImpl (via its Dyld member). RuntimeDyldImpl stores the new +address in an internal data structure but does not update the code at this +time, since other sections are likely to change. + +When the client is finished remapping section addresses, it will call +MCJIT::finalizeObject to complete the remapping process. + +Final Preparations +================== + +When MCJIT::finalizeObject is called, MCJIT calls +RuntimeDyld::resolveRelocations. This function will attempt to locate any +external symbols and then apply all relocations for the object. + +External symbols are resolved by calling the memory manager's +getPointerToNamedFunction method. The memory manager will return the +address of the requested symbol in the target address space. (Note, this +may not be a valid pointer in the host process.) RuntimeDyld will then +iterate through the list of relocations it has stored which are associated +with this symbol and invoke the resolveRelocation method which, through an +format-specific implementation, will apply the relocation to the loaded +section memory. + +Next, RuntimeDyld::resolveRelocations iterates through the list of +sections and for each section iterates through a list of relocations that +have been saved which reference that symbol and call resolveRelocation for +each entry in this list. The relocation list here is a list of +relocations for which the symbol associated with the relocation is located +in the section associated with the list. Each of these locations will +have a target location at which the relocation will be applied that is +likely located in a different section. + +.. image:: MCJIT-resolve-relocations.png + +Once relocations have been applied as described above, MCJIT calls +RuntimeDyld::getEHFrameSection, and if a non-zero result is returned +passes the section data to the memory manager's registerEHFrames method. +This allows the memory manager to call any desired target-specific +functions, such as registering the EH frame information with a debugger. + +Finally, MCJIT calls the memory manager's finalizeMemory method. In this +method, the memory manager will invalidate the target code cache, if +necessary, and apply final permissions to the memory pages it has +allocated for code and data memory. + diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 00000000..d973af58 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,128 @@ +##===- docs/Makefile ---------------------------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +LEVEL := .. +DIRS := + +ifdef BUILD_FOR_WEBSITE +PROJ_OBJ_DIR = . +DOXYGEN = doxygen + +$(PROJ_OBJ_DIR)/doxygen.cfg: doxygen.cfg.in + cat $< | sed \ + -e 's/@abs_top_srcdir@/../g' \ + -e 's/@DOT@/dot/g' \ + -e 's/@PACKAGE_VERSION@/mainline/' \ + -e 's/@abs_top_builddir@/../g' \ + -e 's/@enable_searchengine@/NO/g' \ + -e 's/@searchengine_url@//g' \ + -e 's/@enable_server_based_search@/NO/g' \ + -e 's/@enable_external_search@/NO/g' \ + -e 's/@extra_search_mappings@//g' > $@ +endif + +include $(LEVEL)/Makefile.common + +HTML := $(wildcard $(PROJ_SRC_DIR)/*.html) \ + $(wildcard $(PROJ_SRC_DIR)/*.css) +DOXYFILES := doxygen.cfg.in doxygen.css doxygen.footer doxygen.header \ + doxygen.intro +EXTRA_DIST := $(HTML) $(DOXYFILES) llvm.css CommandGuide + +.PHONY: install-html install-doxygen doxygen install-ocamldoc ocamldoc generated + +install_targets := install-html +ifeq ($(ENABLE_DOXYGEN),1) +install_targets += install-doxygen +endif +ifdef OCAMLDOC +ifneq (,$(filter ocaml,$(BINDINGS_TO_BUILD))) +install_targets += install-ocamldoc +endif +endif +install-local:: $(install_targets) + +generated_targets := doxygen +ifdef OCAMLDOC +generated_targets += ocamldoc +endif + +# Live documentation is generated for the web site using this target: +# 'make generated BUILD_FOR_WEBSITE=1' +generated:: $(generated_targets) + +install-html: $(PROJ_OBJ_DIR)/html.tar.gz + $(Echo) Installing HTML documentation + $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html + $(Verb) $(DataInstall) $(HTML) $(DESTDIR)$(PROJ_docsdir)/html + $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(DESTDIR)$(PROJ_docsdir) + +$(PROJ_OBJ_DIR)/html.tar.gz: $(HTML) + $(Echo) Packaging HTML documentation + $(Verb) $(RM) -rf $@ $(PROJ_OBJ_DIR)/html.tar + $(Verb) cd $(PROJ_SRC_DIR) && \ + $(TAR) cf $(PROJ_OBJ_DIR)/html.tar *.html + $(Verb) $(GZIPBIN) $(PROJ_OBJ_DIR)/html.tar + +install-doxygen: doxygen + $(Echo) Installing doxygen documentation + $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/doxygen + $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(DESTDIR)$(PROJ_docsdir) + $(Verb) cd $(PROJ_OBJ_DIR)/doxygen && \ + $(FIND) . -type f -exec \ + $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/html/doxygen \; + +doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz + +regendoc: + $(Echo) Building doxygen documentation + $(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/doxygen + $(Verb) $(DOXYGEN) $(PROJ_OBJ_DIR)/doxygen.cfg + +$(PROJ_OBJ_DIR)/doxygen.tar.gz: $(DOXYFILES) $(PROJ_OBJ_DIR)/doxygen.cfg + $(Echo) Packaging doxygen documentation + $(Verb) $(RM) -rf $@ $(PROJ_OBJ_DIR)/doxygen.tar + $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/doxygen.tar doxygen + $(Verb) $(GZIPBIN) $(PROJ_OBJ_DIR)/doxygen.tar + $(Verb) $(CP) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(PROJ_OBJ_DIR)/doxygen/html/ + +userloc: $(LLVM_SRC_ROOT)/docs/userloc.html + +$(LLVM_SRC_ROOT)/docs/userloc.html: + $(Echo) Making User LOC Table + $(Verb) cd $(LLVM_SRC_ROOT) ; ./utils/userloc.pl -details -recurse \ + -html lib include tools runtime utils examples autoconf test > docs/userloc.html + +install-ocamldoc: ocamldoc + $(Echo) Installing ocamldoc documentation + $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html + $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(DESTDIR)$(PROJ_docsdir) + $(Verb) cd $(PROJ_OBJ_DIR)/ocamldoc && \ + $(FIND) . -type f -exec \ + $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html \; + +ocamldoc: regen-ocamldoc + $(Echo) Packaging ocamldoc documentation + $(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/ocamldoc.tar* + $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/ocamldoc.tar ocamldoc + $(Verb) $(GZIPBIN) $(PROJ_OBJ_DIR)/ocamldoc.tar + $(Verb) $(CP) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(PROJ_OBJ_DIR)/ocamldoc/html/ + +regen-ocamldoc: + $(Echo) Building ocamldoc documentation + $(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/ocamldoc + $(Verb) $(MAKE) -C $(LEVEL)/bindings/ocaml ocamldoc + $(Verb) $(MKDIR) $(PROJ_OBJ_DIR)/ocamldoc/html + $(Verb) \ + $(OCAMLDOC) -d $(PROJ_OBJ_DIR)/ocamldoc/html -sort -colorize-code -html \ + `$(FIND) $(LEVEL)/bindings/ocaml -name "*.odoc" -exec echo -load '{}' ';'` + +uninstall-local:: + $(Echo) Uninstalling Documentation + $(Verb) $(RM) -rf $(DESTDIR)$(PROJ_docsdir) diff --git a/docs/Makefile.sphinx b/docs/Makefile.sphinx new file mode 100644 index 00000000..21f66488 --- /dev/null +++ b/docs/Makefile.sphinx @@ -0,0 +1,155 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +all: html + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/llvm.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/llvm.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/llvm" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/llvm" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff --git a/docs/MakefileGuide.rst b/docs/MakefileGuide.rst new file mode 100644 index 00000000..120c108d --- /dev/null +++ b/docs/MakefileGuide.rst @@ -0,0 +1,918 @@ +=================== +LLVM Makefile Guide +=================== + +.. contents:: + :local: + +Introduction +============ + +This document provides *usage* information about the LLVM makefile system. While +loosely patterned after the BSD makefile system, LLVM has taken a departure from +BSD in order to implement additional features needed by LLVM. Although makefile +systems, such as ``automake``, were attempted at one point, it has become clear +that the features needed by LLVM and the ``Makefile`` norm are too great to use +a more limited tool. Consequently, LLVM requires simply GNU Make 3.79, a widely +portable makefile processor. LLVM unabashedly makes heavy use of the features of +GNU Make so the dependency on GNU Make is firm. If you're not familiar with +``make``, it is recommended that you read the `GNU Makefile Manual +`_. + +While this document is rightly part of the `LLVM Programmer's +Manual `_, it is treated separately here because of the +volume of content and because it is often an early source of bewilderment for +new developers. + +General Concepts +================ + +The LLVM Makefile System is the component of LLVM that is responsible for +building the software, testing it, generating distributions, checking those +distributions, installing and uninstalling, etc. It consists of a several files +throughout the source tree. These files and other general concepts are described +in this section. + +Projects +-------- + +The LLVM Makefile System is quite generous. It not only builds its own software, +but it can build yours too. Built into the system is knowledge of the +``llvm/projects`` directory. Any directory under ``projects`` that has both a +``configure`` script and a ``Makefile`` is assumed to be a project that uses the +LLVM Makefile system. Building software that uses LLVM does not require the +LLVM Makefile System nor even placement in the ``llvm/projects`` +directory. However, doing so will allow your project to get up and running +quickly by utilizing the built-in features that are used to compile LLVM. LLVM +compiles itself using the same features of the makefile system as used for +projects. + +For complete details on setting up your projects configuration, simply mimic the +``llvm/projects/sample`` project. Or for further details, consult the +`Projects `_ page. + +Variable Values +--------------- + +To use the makefile system, you simply create a file named ``Makefile`` in your +directory and declare values for certain variables. The variables and values +that you select determine what the makefile system will do. These variables +enable rules and processing in the makefile system that automatically Do The +Right Thing (C). + +Including Makefiles +------------------- + +Setting variables alone is not enough. You must include into your Makefile +additional files that provide the rules of the LLVM Makefile system. The various +files involved are described in the sections that follow. + +``Makefile`` +^^^^^^^^^^^^ + +Each directory to participate in the build needs to have a file named +``Makefile``. This is the file first read by ``make``. It has three +sections: + +#. Settable Variables --- Required that must be set first. +#. ``include $(LEVEL)/Makefile.common`` --- include the LLVM Makefile system. +#. Override Variables --- Override variables set by the LLVM Makefile system. + +.. _$(LEVEL)/Makefile.common: + +``Makefile.common`` +^^^^^^^^^^^^^^^^^^^ + +Every project must have a ``Makefile.common`` file at its top source +directory. This file serves three purposes: + +#. It includes the project's configuration makefile to obtain values determined + by the ``configure`` script. This is done by including the + `$(LEVEL)/Makefile.config`_ file. + +#. It specifies any other (static) values that are needed throughout the + project. Only values that are used in all or a large proportion of the + project's directories should be placed here. + +#. It includes the standard rules for the LLVM Makefile system, + `$(LLVM_SRC_ROOT)/Makefile.rules`_. This file is the *guts* of the LLVM + ``Makefile`` system. + +.. _$(LEVEL)/Makefile.config: + +``Makefile.config`` +^^^^^^^^^^^^^^^^^^^ + +Every project must have a ``Makefile.config`` at the top of its *build* +directory. This file is **generated** by the ``configure`` script from the +pattern provided by the ``Makefile.config.in`` file located at the top of the +project's *source* directory. The contents of this file depend largely on what +configuration items the project uses, however most projects can get what they +need by just relying on LLVM's configuration found in +``$(LLVM_OBJ_ROOT)/Makefile.config``. + +.. _$(LLVM_SRC_ROOT)/Makefile.rules: + +``Makefile.rules`` +^^^^^^^^^^^^^^^^^^ + +This file, located at ``$(LLVM_SRC_ROOT)/Makefile.rules`` is the heart of the +LLVM Makefile System. It provides all the logic, dependencies, and rules for +building the targets supported by the system. What it does largely depends on +the values of ``make`` `variables`_ that have been set *before* +``Makefile.rules`` is included. + +Comments +^^^^^^^^ + +User ``Makefile``\s need not have comments in them unless the construction is +unusual or it does not strictly follow the rules and patterns of the LLVM +makefile system. Makefile comments are invoked with the pound (``#``) character. +The ``#`` character and any text following it, to the end of the line, are +ignored by ``make``. + +Tutorial +======== + +This section provides some examples of the different kinds of modules you can +build with the LLVM makefile system. In general, each directory you provide will +build a single object although that object may be composed of additionally +compiled components. + +Libraries +--------- + +Only a few variable definitions are needed to build a regular library. +Normally, the makefile system will build all the software into a single +``libname.o`` (pre-linked) object. This means the library is not searchable and +that the distinction between compilation units has been dissolved. Optionally, +you can ask for a shared library (.so) or archive library (.a) built. Archive +libraries are the default. For example: + +.. code-block:: makefile + + LIBRARYNAME = mylib + SHARED_LIBRARY = 1 + BUILD_ARCHIVE = 1 + +says to build a library named ``mylib`` with both a shared library +(``mylib.so``) and an archive library (``mylib.a``) version. The contents of all +the libraries produced will be the same, they are just constructed differently. +Note that you normally do not need to specify the sources involved. The LLVM +Makefile system will infer the source files from the contents of the source +directory. + +The ``LOADABLE_MODULE=1`` directive can be used in conjunction with +``SHARED_LIBRARY=1`` to indicate that the resulting shared library should be +openable with the ``dlopen`` function and searchable with the ``dlsym`` function +(or your operating system's equivalents). While this isn't strictly necessary on +Linux and a few other platforms, it is required on systems like HP-UX and +Darwin. You should use ``LOADABLE_MODULE`` for any shared library that you +intend to be loaded into an tool via the ``-load`` option. :ref:`Pass +documentation ` has an example of why you might +want to do this. + +Loadable Modules +^^^^^^^^^^^^^^^^ + +In some situations, you need to create a loadable module. Loadable modules can +be loaded into programs like ``opt`` or ``llc`` to specify additional passes to +run or targets to support. Loadable modules are also useful for debugging a +pass or providing a pass with another package if that pass can't be included in +LLVM. + +LLVM provides complete support for building such a module. All you need to do is +use the ``LOADABLE_MODULE`` variable in your ``Makefile``. For example, to build +a loadable module named ``MyMod`` that uses the LLVM libraries ``LLVMSupport.a`` +and ``LLVMSystem.a``, you would specify: + +.. code-block:: makefile + + LIBRARYNAME := MyMod + LOADABLE_MODULE := 1 + LINK_COMPONENTS := support system + +Use of the ``LOADABLE_MODULE`` facility implies several things: + +#. There will be no "``lib``" prefix on the module. This differentiates it from + a standard shared library of the same name. + +#. The `SHARED_LIBRARY`_ variable is turned on. + +#. The `LINK_LIBS_IN_SHARED`_ variable is turned on. + +A loadable module is loaded by LLVM via the facilities of libtool's libltdl +library which is part of ``lib/System`` implementation. + +Tools +----- + +For building executable programs (tools), you must provide the name of the tool +and the names of the libraries you wish to link with the tool. For example: + +.. code-block:: makefile + + TOOLNAME = mytool + USEDLIBS = mylib + LINK_COMPONENTS = support system + +says that we are to build a tool name ``mytool`` and that it requires three +libraries: ``mylib``, ``LLVMSupport.a`` and ``LLVMSystem.a``. + +Note that two different variables are used to indicate which libraries are +linked: ``USEDLIBS`` and ``LLVMLIBS``. This distinction is necessary to support +projects. ``LLVMLIBS`` refers to the LLVM libraries found in the LLVM object +directory. ``USEDLIBS`` refers to the libraries built by your project. In the +case of building LLVM tools, ``USEDLIBS`` and ``LLVMLIBS`` can be used +interchangeably since the "project" is LLVM itself and ``USEDLIBS`` refers to +the same place as ``LLVMLIBS``. + +Also note that there are two different ways of specifying a library: with a +``.a`` suffix and without. Without the suffix, the entry refers to the re-linked +(.o) file which will include *all* symbols of the library. This is +useful, for example, to include all passes from a library of passes. If the +``.a`` suffix is used then the library is linked as a searchable library (with +the ``-l`` option). In this case, only the symbols that are unresolved *at +that point* will be resolved from the library, if they exist. Other +(unreferenced) symbols will not be included when the ``.a`` syntax is used. Note +that in order to use the ``.a`` suffix, the library in question must have been +built with the ``BUILD_ARCHIVE`` option set. + +JIT Tools +^^^^^^^^^ + +Many tools will want to use the JIT features of LLVM. To do this, you simply +specify that you want an execution 'engine', and the makefiles will +automatically link in the appropriate JIT for the host or an interpreter if none +is available: + +.. code-block:: makefile + + TOOLNAME = my_jit_tool + USEDLIBS = mylib + LINK_COMPONENTS = engine + +Of course, any additional libraries may be listed as other components. To get a +full understanding of how this changes the linker command, it is recommended +that you: + +.. code-block:: bash + + % cd examples/Fibonacci + % make VERBOSE=1 + +Targets Supported +================= + +This section describes each of the targets that can be built using the LLVM +Makefile system. Any target can be invoked from any directory but not all are +applicable to a given directory (e.g. "check", "dist" and "install" will always +operate as if invoked from the top level directory). + +================= =============== ================== +Target Name Implied Targets Target Description +================= =============== ================== +``all`` \ Compile the software recursively. Default target. +``all-local`` \ Compile the software in the local directory only. +``check`` \ Change to the ``test`` directory in a project and run the test suite there. +``check-local`` \ Run a local test suite. Generally this is only defined in the ``Makefile`` of the project's ``test`` directory. +``clean`` \ Remove built objects recursively. +``clean-local`` \ Remove built objects from the local directory only. +``dist`` ``all`` Prepare a source distribution tarball. +``dist-check`` ``all`` Prepare a source distribution tarball and check that it builds. +``dist-clean`` ``clean`` Clean source distribution tarball temporary files. +``install`` ``all`` Copy built objects to installation directory. +``preconditions`` ``all`` Check to make sure configuration and makefiles are up to date. +``printvars`` ``all`` Prints variables defined by the makefile system (for debugging). +``tags`` \ Make C and C++ tags files for emacs and vi. +``uninstall`` \ Remove built objects from installation directory. +================= =============== ================== + +.. _all: + +``all`` (default) +----------------- + +When you invoke ``make`` with no arguments, you are implicitly instructing it to +seek the ``all`` target (goal). This target is used for building the software +recursively and will do different things in different directories. For example, +in a ``lib`` directory, the ``all`` target will compile source files and +generate libraries. But, in a ``tools`` directory, it will link libraries and +generate executables. + +``all-local`` +------------- + +This target is the same as `all`_ but it operates only on the current directory +instead of recursively. + +``check`` +--------- + +This target can be invoked from anywhere within a project's directories but +always invokes the `check-local`_ target in the project's ``test`` directory, if +it exists and has a ``Makefile``. A warning is produced otherwise. If +`TESTSUITE`_ is defined on the ``make`` command line, it will be passed down to +the invocation of ``make check-local`` in the ``test`` directory. The intended +usage for this is to assist in running specific suites of tests. If +``TESTSUITE`` is not set, the implementation of ``check-local`` should run all +normal tests. It is up to the project to define what different values for +``TESTSUTE`` will do. See the :doc:`Testing Guide ` for further +details. + +``check-local`` +--------------- + +This target should be implemented by the ``Makefile`` in the project's ``test`` +directory. It is invoked by the ``check`` target elsewhere. Each project is +free to define the actions of ``check-local`` as appropriate for that +project. The LLVM project itself uses the :doc:`Lit ` testing +tool to run a suite of feature and regression tests. Other projects may choose +to use :program:`lit` or any other testing mechanism. + +``clean`` +--------- + +This target cleans the build directory, recursively removing all things that the +Makefile builds. The cleaning rules have been made guarded so they shouldn't go +awry (via ``rm -f $(UNSET_VARIABLE)/*`` which will attempt to erase the entire +directory structure). + +``clean-local`` +--------------- + +This target does the same thing as ``clean`` but only for the current (local) +directory. + +``dist`` +-------- + +This target builds a distribution tarball. It first builds the entire project +using the ``all`` target and then tars up the necessary files and compresses +it. The generated tarball is sufficient for a casual source distribution, but +probably not for a release (see ``dist-check``). + +``dist-check`` +-------------- + +This target does the same thing as the ``dist`` target but also checks the +distribution tarball. The check is made by unpacking the tarball to a new +directory, configuring it, building it, installing it, and then verifying that +the installation results are correct (by comparing to the original build). This +target can take a long time to run but should be done before a release goes out +to make sure that the distributed tarball can actually be built into a working +release. + +``dist-clean`` +-------------- + +This is a special form of the ``clean`` clean target. It performs a normal +``clean`` but also removes things pertaining to building the distribution. + +``install`` +----------- + +This target finalizes shared objects and executables and copies all libraries, +headers, executables and documentation to the directory given with the +``--prefix`` option to ``configure``. When completed, the prefix directory will +have everything needed to **use** LLVM. + +The LLVM makefiles can generate complete **internal** documentation for all the +classes by using ``doxygen``. By default, this feature is **not** enabled +because it takes a long time and generates a massive amount of data (>100MB). If +you want this feature, you must configure LLVM with the --enable-doxygen switch +and ensure that a modern version of doxygen (1.3.7 or later) is available in +your ``PATH``. You can download doxygen from `here +`_. + +``preconditions`` +----------------- + +This utility target checks to see if the ``Makefile`` in the object directory is +older than the ``Makefile`` in the source directory and copies it if so. It also +reruns the ``configure`` script if that needs to be done and rebuilds the +``Makefile.config`` file similarly. Users may overload this target to ensure +that sanity checks are run *before* any building of targets as all the targets +depend on ``preconditions``. + +``printvars`` +------------- + +This utility target just causes the LLVM makefiles to print out some of the +makefile variables so that you can double check how things are set. + +``reconfigure`` +--------------- + +This utility target will force a reconfigure of LLVM or your project. It simply +runs ``$(PROJ_OBJ_ROOT)/config.status --recheck`` to rerun the configuration +tests and rebuild the configured files. This isn't generally useful as the +makefiles will reconfigure themselves whenever its necessary. + +``spotless`` +------------ + +.. warning:: + + Use with caution! + +This utility target, only available when ``$(PROJ_OBJ_ROOT)`` is not the same as +``$(PROJ_SRC_ROOT)``, will completely clean the ``$(PROJ_OBJ_ROOT)`` directory +by removing its content entirely and reconfiguring the directory. This returns +the ``$(PROJ_OBJ_ROOT)`` directory to a completely fresh state. All content in +the directory except configured files and top-level makefiles will be lost. + +``tags`` +-------- + +This target will generate a ``TAGS`` file in the top-level source directory. It +is meant for use with emacs, XEmacs, or ViM. The TAGS file provides an index of +symbol definitions so that the editor can jump you to the definition +quickly. + +``uninstall`` +------------- + +This target is the opposite of the ``install`` target. It removes the header, +library and executable files from the installation directories. Note that the +directories themselves are not removed because it is not guaranteed that LLVM is +the only thing installing there (e.g. ``--prefix=/usr``). + +.. _variables: + +Variables +========= + +Variables are used to tell the LLVM Makefile System what to do and to obtain +information from it. Variables are also used internally by the LLVM Makefile +System. Variable names that contain only the upper case alphabetic letters and +underscore are intended for use by the end user. All other variables are +internal to the LLVM Makefile System and should not be relied upon nor +modified. The sections below describe how to use the LLVM Makefile +variables. + +Control Variables +----------------- + +Variables listed in the table below should be set *before* the inclusion of +`$(LEVEL)/Makefile.common`_. These variables provide input to the LLVM make +system that tell it what to do for the current directory. + +``BUILD_ARCHIVE`` + If set to any value, causes an archive (.a) library to be built. + +``BUILT_SOURCES`` + Specifies a set of source files that are generated from other source + files. These sources will be built before any other target processing to + ensure they are present. + +``CONFIG_FILES`` + Specifies a set of configuration files to be installed. + +``DEBUG_SYMBOLS`` + If set to any value, causes the build to include debugging symbols even in + optimized objects, libraries and executables. This alters the flags + specified to the compilers and linkers. Debugging isn't fun in an optimized + build, but it is possible. + +``DIRS`` + Specifies a set of directories, usually children of the current directory, + that should also be made using the same goal. These directories will be + built serially. + +``DISABLE_AUTO_DEPENDENCIES`` + If set to any value, causes the makefiles to **not** automatically generate + dependencies when running the compiler. Use of this feature is discouraged + and it may be removed at a later date. + +``ENABLE_OPTIMIZED`` + If set to 1, causes the build to generate optimized objects, libraries and + executables. This alters the flags specified to the compilers and + linkers. Generally debugging won't be a fun experience with an optimized + build. + +``ENABLE_PROFILING`` + If set to 1, causes the build to generate both optimized and profiled + objects, libraries and executables. This alters the flags specified to the + compilers and linkers to ensure that profile data can be collected from the + tools built. Use the ``gprof`` tool to analyze the output from the profiled + tools (``gmon.out``). + +``DISABLE_ASSERTIONS`` + If set to 1, causes the build to disable assertions, even if building a + debug or profile build. This will exclude all assertion check code from the + build. LLVM will execute faster, but with little help when things go + wrong. + +``EXPERIMENTAL_DIRS`` + Specify a set of directories that should be built, but if they fail, it + should not cause the build to fail. Note that this should only be used + temporarily while code is being written. + +``EXPORTED_SYMBOL_FILE`` + Specifies the name of a single file that contains a list of the symbols to + be exported by the linker. One symbol per line. + +``EXPORTED_SYMBOL_LIST`` + Specifies a set of symbols to be exported by the linker. + +``EXTRA_DIST`` + Specifies additional files that should be distributed with LLVM. All source + files, all built sources, all Makefiles, and most documentation files will + be automatically distributed. Use this variable to distribute any files that + are not automatically distributed. + +``KEEP_SYMBOLS`` + If set to any value, specifies that when linking executables the makefiles + should retain debug symbols in the executable. Normally, symbols are + stripped from the executable. + +``LEVEL`` (required) + Specify the level of nesting from the top level. This variable must be set + in each makefile as it is used to find the top level and thus the other + makefiles. + +``LIBRARYNAME`` + Specify the name of the library to be built. (Required For Libraries) + +``LINK_COMPONENTS`` + When specified for building a tool, the value of this variable will be + passed to the ``llvm-config`` tool to generate a link line for the + tool. Unlike ``USEDLIBS`` and ``LLVMLIBS``, not all libraries need to be + specified. The ``llvm-config`` tool will figure out the library dependencies + and add any libraries that are needed. The ``USEDLIBS`` variable can still + be used in conjunction with ``LINK_COMPONENTS`` so that additional + project-specific libraries can be linked with the LLVM libraries specified + by ``LINK_COMPONENTS``. + +.. _LINK_LIBS_IN_SHARED: + +``LINK_LIBS_IN_SHARED`` + By default, shared library linking will ignore any libraries specified with + the `LLVMLIBS`_ or `USEDLIBS`_. This prevents shared libs from including + things that will be in the LLVM tool the shared library will be loaded + into. However, sometimes it is useful to link certain libraries into your + shared library and this option enables that feature. + +.. _LLVMLIBS: + +``LLVMLIBS`` + Specifies the set of libraries from the LLVM ``$(ObjDir)`` that will be + linked into the tool or library. + +``LOADABLE_MODULE`` + If set to any value, causes the shared library being built to also be a + loadable module. Loadable modules can be opened with the dlopen() function + and searched with dlsym (or the operating system's equivalent). Note that + setting this variable without also setting ``SHARED_LIBRARY`` will have no + effect. + +``NO_INSTALL`` + Specifies that the build products of the directory should not be installed + but should be built even if the ``install`` target is given. This is handy + for directories that build libraries or tools that are only used as part of + the build process, such as code generators (e.g. ``tblgen``). + +``OPTIONAL_DIRS`` + Specify a set of directories that may be built, if they exist, but it is + not an error for them not to exist. + +``PARALLEL_DIRS`` + Specify a set of directories to build recursively and in parallel if the + ``-j`` option was used with ``make``. + +.. _SHARED_LIBRARY: + +``SHARED_LIBRARY`` + If set to any value, causes a shared library (``.so``) to be built in + addition to any other kinds of libraries. Note that this option will cause + all source files to be built twice: once with options for position + independent code and once without. Use it only where you really need a + shared library. + +``SOURCES`` (optional) + Specifies the list of source files in the current directory to be + built. Source files of any type may be specified (programs, documentation, + config files, etc.). If not specified, the makefile system will infer the + set of source files from the files present in the current directory. + +``SUFFIXES`` + Specifies a set of filename suffixes that occur in suffix match rules. Only + set this if your local ``Makefile`` specifies additional suffix match + rules. + +``TARGET`` + Specifies the name of the LLVM code generation target that the current + directory builds. Setting this variable enables additional rules to build + ``.inc`` files from ``.td`` files. + +.. _TESTSUITE: + +``TESTSUITE`` + Specifies the directory of tests to run in ``llvm/test``. + +``TOOLNAME`` + Specifies the name of the tool that the current directory should build. + +``TOOL_VERBOSE`` + Implies ``VERBOSE`` and also tells each tool invoked to be verbose. This is + handy when you're trying to see the sub-tools invoked by each tool invoked + by the makefile. For example, this will pass ``-v`` to the GCC compilers + which causes it to print out the command lines it uses to invoke sub-tools + (compiler, assembler, linker). + +.. _USEDLIBS: + +``USEDLIBS`` + Specifies the list of project libraries that will be linked into the tool or + library. + +``VERBOSE`` + Tells the Makefile system to produce detailed output of what it is doing + instead of just summary comments. This will generate a LOT of output. + +Override Variables +------------------ + +Override variables can be used to override the default values provided by the +LLVM makefile system. These variables can be set in several ways: + +* In the environment (e.g. setenv, export) --- not recommended. +* On the ``make`` command line --- recommended. +* On the ``configure`` command line. +* In the Makefile (only *after* the inclusion of `$(LEVEL)/Makefile.common`_). + +The override variables are given below: + +``AR`` (defaulted) + Specifies the path to the ``ar`` tool. + +``PROJ_OBJ_DIR`` + The directory into which the products of build rules will be placed. This + might be the same as `PROJ_SRC_DIR`_ but typically is not. + +.. _PROJ_SRC_DIR: + +``PROJ_SRC_DIR`` + The directory which contains the source files to be built. + +``BUILD_EXAMPLES`` + If set to 1, build examples in ``examples`` and (if building Clang) + ``tools/clang/examples`` directories. + +``BZIP2`` (configured) + The path to the ``bzip2`` tool. + +``CC`` (configured) + The path to the 'C' compiler. + +``CFLAGS`` + Additional flags to be passed to the 'C' compiler. + +``CPPFLAGS`` + Additional flags passed to the C/C++ preprocessor. + +``CXX`` + Specifies the path to the C++ compiler. + +``CXXFLAGS`` + Additional flags to be passed to the C++ compiler. + +``DATE`` (configured) + Specifies the path to the ``date`` program or any program that can generate + the current date and time on its standard output. + +``DOT`` (configured) + Specifies the path to the ``dot`` tool or ``false`` if there isn't one. + +``ECHO`` (configured) + Specifies the path to the ``echo`` tool for printing output. + +``EXEEXT`` (configured) + Provides the extension to be used on executables built by the makefiles. + The value may be empty on platforms that do not use file extensions for + executables (e.g. Unix). + +``INSTALL`` (configured) + Specifies the path to the ``install`` tool. + +``LDFLAGS`` (configured) + Allows users to specify additional flags to pass to the linker. + +``LIBS`` (configured) + The list of libraries that should be linked with each tool. + +``LIBTOOL`` (configured) + Specifies the path to the ``libtool`` tool. This tool is renamed ``mklib`` + by the ``configure`` script. + +``LLVMAS`` (defaulted) + Specifies the path to the ``llvm-as`` tool. + +``LLVMGCC`` (defaulted) + Specifies the path to the LLVM version of the GCC 'C' Compiler. + +``LLVMGXX`` (defaulted) + Specifies the path to the LLVM version of the GCC C++ Compiler. + +``LLVMLD`` (defaulted) + Specifies the path to the LLVM bitcode linker tool + +``LLVM_OBJ_ROOT`` (configured) + Specifies the top directory into which the output of the build is placed. + +``LLVM_SRC_ROOT`` (configured) + Specifies the top directory in which the sources are found. + +``LLVM_TARBALL_NAME`` (configured) + Specifies the name of the distribution tarball to create. This is configured + from the name of the project and its version number. + +``MKDIR`` (defaulted) + Specifies the path to the ``mkdir`` tool that creates directories. + +``ONLY_TOOLS`` + If set, specifies the list of tools to build. + +``PLATFORMSTRIPOPTS`` + The options to provide to the linker to specify that a stripped (no symbols) + executable should be built. + +``RANLIB`` (defaulted) + Specifies the path to the ``ranlib`` tool. + +``RM`` (defaulted) + Specifies the path to the ``rm`` tool. + +``SED`` (defaulted) + Specifies the path to the ``sed`` tool. + +``SHLIBEXT`` (configured) + Provides the filename extension to use for shared libraries. + +``TBLGEN`` (defaulted) + Specifies the path to the ``tblgen`` tool. + +``TAR`` (defaulted) + Specifies the path to the ``tar`` tool. + +``ZIP`` (defaulted) + Specifies the path to the ``zip`` tool. + +Readable Variables +------------------ + +Variables listed in the table below can be used by the user's Makefile but +should not be changed. Changing the value will generally cause the build to go +wrong, so don't do it. + +``bindir`` + The directory into which executables will ultimately be installed. This + value is derived from the ``--prefix`` option given to ``configure``. + +``BuildMode`` + The name of the type of build being performed: Debug, Release, or + Profile. + +``bytecode_libdir`` + The directory into which bitcode libraries will ultimately be installed. + This value is derived from the ``--prefix`` option given to ``configure``. + +``ConfigureScriptFLAGS`` + Additional flags given to the ``configure`` script when reconfiguring. + +``DistDir`` + The *current* directory for which a distribution copy is being made. + +.. _Echo: + +``Echo`` + The LLVM Makefile System output command. This provides the ``llvm[n]`` + prefix and starts with ``@`` so the command itself is not printed by + ``make``. + +``EchoCmd`` + Same as `Echo`_ but without the leading ``@``. + +``includedir`` + The directory into which include files will ultimately be installed. This + value is derived from the ``--prefix`` option given to ``configure``. + +``libdir`` + The directory into which native libraries will ultimately be installed. + This value is derived from the ``--prefix`` option given to + ``configure``. + +``LibDir`` + The configuration specific directory into which libraries are placed before + installation. + +``MakefileConfig`` + Full path of the ``Makefile.config`` file. + +``MakefileConfigIn`` + Full path of the ``Makefile.config.in`` file. + +``ObjDir`` + The configuration and directory specific directory where build objects + (compilation results) are placed. + +``SubDirs`` + The complete list of sub-directories of the current directory as + specified by other variables. + +``Sources`` + The complete list of source files. + +``sysconfdir`` + The directory into which configuration files will ultimately be + installed. This value is derived from the ``--prefix`` option given to + ``configure``. + +``ToolDir`` + The configuration specific directory into which executables are placed + before they are installed. + +``TopDistDir`` + The top most directory into which the distribution files are copied. + +``Verb`` + Use this as the first thing on your build script lines to enable or disable + verbose mode. It expands to either an ``@`` (quiet mode) or nothing (verbose + mode). + +Internal Variables +------------------ + +Variables listed below are used by the LLVM Makefile System and considered +internal. You should not use these variables under any circumstances. + +.. code-block:: makefile + + Archive + AR.Flags + BaseNameSources + BCLinkLib + C.Flags + Compile.C + CompileCommonOpts + Compile.CXX + ConfigStatusScript + ConfigureScript + CPP.Flags + CPP.Flags + CXX.Flags + DependFiles + DestArchiveLib + DestBitcodeLib + DestModule + DestSharedLib + DestTool + DistAlways + DistCheckDir + DistCheckTop + DistFiles + DistName + DistOther + DistSources + DistSubDirs + DistTarBZ2 + DistTarGZip + DistZip + ExtraLibs + FakeSources + INCFiles + InternalTargets + LD.Flags + LibName.A + LibName.BC + LibName.LA + LibName.O + LibTool.Flags + Link + LinkModule + LLVMLibDir + LLVMLibsOptions + LLVMLibsPaths + LLVMToolDir + LLVMUsedLibs + LocalTargets + Module + ObjectsLO + ObjectsO + ObjMakefiles + ParallelTargets + PreConditions + ProjLibsOptions + ProjLibsPaths + ProjUsedLibs + Ranlib + RecursiveTargets + SrcMakefiles + Strip + StripWarnMsg + TableGen + TDFiles + ToolBuildPath + TopLevelTargets + UserTargets diff --git a/docs/MarkedUpDisassembly.rst b/docs/MarkedUpDisassembly.rst new file mode 100644 index 00000000..cc4dbc81 --- /dev/null +++ b/docs/MarkedUpDisassembly.rst @@ -0,0 +1,86 @@ +======================================= +LLVM's Optional Rich Disassembly Output +======================================= + +.. contents:: + :local: + +Introduction +============ + +LLVM's default disassembly output is raw text. To allow consumers more ability +to introspect the instructions' textual representation or to reformat for a more +user friendly display there is an optional rich disassembly output. + +This optional output is sufficient to reference into individual portions of the +instruction text. This is intended for clients like disassemblers, list file +generators, and pretty-printers, which need more than the raw instructions and +the ability to print them. + +To provide this functionality the assembly text is marked up with annotations. +The markup is simple enough in syntax to be robust even in the case of version +mismatches between consumers and producers. That is, the syntax generally does +not carry semantics beyond "this text has an annotation," so consumers can +simply ignore annotations they do not understand or do not care about. + +After calling ``LLVMCreateDisasm()`` to create a disassembler context the +optional output is enable with this call: + +.. code-block:: c + + LLVMSetDisasmOptions(DC, LLVMDisassembler_Option_UseMarkup); + +Then subsequent calls to ``LLVMDisasmInstruction()`` will return output strings +with the marked up annotations. + +Instruction Annotations +======================= + +.. _contextual markups: + +Contextual markups +------------------ + +Annoated assembly display will supply contextual markup to help clients more +efficiently implement things like pretty printers. Most markup will be target +independent, so clients can effectively provide good display without any target +specific knowledge. + +Annotated assembly goes through the normal instruction printer, but optionally +includes contextual tags on portions of the instruction string. An annotation +is any '<' '>' delimited section of text(1). + +.. code-block:: bat + + annotation: '<' tag-name tag-modifier-list ':' annotated-text '>' + tag-name: identifier + tag-modifier-list: comma delimited identifier list + +The tag-name is an identifier which gives the type of the annotation. For the +first pass, this will be very simple, with memory references, registers, and +immediates having the tag names "mem", "reg", and "imm", respectively. + +The tag-modifier-list is typically additional target-specific context, such as +register class. + +Clients should accept and ignore any tag-names or tag-modifiers they do not +understand, allowing the annotations to grow in richness without breaking older +clients. + +For example, a possible annotation of an ARM load of a stack-relative location +might be annotated as: + +.. code-block:: nasm + + ldr , , ]> + + +1: For assembly dialects in which '<' and/or '>' are legal tokens, a literal token is escaped by following immediately with a repeat of the character. For example, a literal '<' character is output as '<<' in an annotated assembly string. + +C API Details +------------- + +The intended consumers of this information use the C API, therefore the new C +API function for the disassembler will be added to provide an option to produce +disassembled instructions with annotations, ``LLVMSetDisasmOptions()`` and the +``LLVMDisassembler_Option_UseMarkup`` option (see above). diff --git a/docs/NVPTXUsage.rst b/docs/NVPTXUsage.rst new file mode 100644 index 00000000..a9065ce7 --- /dev/null +++ b/docs/NVPTXUsage.rst @@ -0,0 +1,980 @@ +============================= +User Guide for NVPTX Back-end +============================= + +.. contents:: + :local: + :depth: 3 + + +Introduction +============ + +To support GPU programming, the NVPTX back-end supports a subset of LLVM IR +along with a defined set of conventions used to represent GPU programming +concepts. This document provides an overview of the general usage of the back- +end, including a description of the conventions used and the set of accepted +LLVM IR. + +.. note:: + + This document assumes a basic familiarity with CUDA and the PTX + assembly language. Information about the CUDA Driver API and the PTX assembly + language can be found in the `CUDA documentation + `_. + + + +Conventions +=========== + +Marking Functions as Kernels +---------------------------- + +In PTX, there are two types of functions: *device functions*, which are only +callable by device code, and *kernel functions*, which are callable by host +code. By default, the back-end will emit device functions. Metadata is used to +declare a function as a kernel function. This metadata is attached to the +``nvvm.annotations`` named metadata object, and has the following format: + +.. code-block:: llvm + + !0 = metadata !{, metadata !"kernel", i32 1} + +The first parameter is a reference to the kernel function. The following +example shows a kernel function calling a device function in LLVM IR. The +function ``@my_kernel`` is callable from host code, but ``@my_fmad`` is not. + +.. code-block:: llvm + + define float @my_fmad(float %x, float %y, float %z) { + %mul = fmul float %x, %y + %add = fadd float %mul, %z + ret float %add + } + + define void @my_kernel(float* %ptr) { + %val = load float* %ptr + %ret = call float @my_fmad(float %val, float %val, float %val) + store float %ret, float* %ptr + ret void + } + + !nvvm.annotations = !{!1} + !1 = metadata !{void (float*)* @my_kernel, metadata !"kernel", i32 1} + +When compiled, the PTX kernel functions are callable by host-side code. + + +.. _address_spaces: + +Address Spaces +-------------- + +The NVPTX back-end uses the following address space mapping: + + ============= ====================== + Address Space Memory Space + ============= ====================== + 0 Generic + 1 Global + 2 Internal Use + 3 Shared + 4 Constant + 5 Local + ============= ====================== + +Every global variable and pointer type is assigned to one of these address +spaces, with 0 being the default address space. Intrinsics are provided which +can be used to convert pointers between the generic and non-generic address +spaces. + +As an example, the following IR will define an array ``@g`` that resides in +global device memory. + +.. code-block:: llvm + + @g = internal addrspace(1) global [4 x i32] [ i32 0, i32 1, i32 2, i32 3 ] + +LLVM IR functions can read and write to this array, and host-side code can +copy data to it by name with the CUDA Driver API. + +Note that since address space 0 is the generic space, it is illegal to have +global variables in address space 0. Address space 0 is the default address +space in LLVM, so the ``addrspace(N)`` annotation is *required* for global +variables. + + +Triples +------- + +The NVPTX target uses the module triple to select between 32/64-bit code +generation and the driver-compiler interface to use. The triple architecture +can be one of ``nvptx`` (32-bit PTX) or ``nvptx64`` (64-bit PTX). The +operating system should be one of ``cuda`` or ``nvcl``, which determines the +interface used by the generated code to communicate with the driver. Most +users will want to use ``cuda`` as the operating system, which makes the +generated PTX compatible with the CUDA Driver API. + +Example: 32-bit PTX for CUDA Driver API: ``nvptx-nvidia-cuda`` + +Example: 64-bit PTX for CUDA Driver API: ``nvptx64-nvidia-cuda`` + + + +.. _nvptx_intrinsics: + +NVPTX Intrinsics +================ + +Address Space Conversion +------------------------ + +'``llvm.nvvm.ptr.*.to.gen``' Intrinsics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +These are overloaded intrinsics. You can use these on any pointer types. + +.. code-block:: llvm + + declare i8* @llvm.nvvm.ptr.global.to.gen.p0i8.p1i8(i8 addrspace(1)*) + declare i8* @llvm.nvvm.ptr.shared.to.gen.p0i8.p3i8(i8 addrspace(3)*) + declare i8* @llvm.nvvm.ptr.constant.to.gen.p0i8.p4i8(i8 addrspace(4)*) + declare i8* @llvm.nvvm.ptr.local.to.gen.p0i8.p5i8(i8 addrspace(5)*) + +Overview: +""""""""" + +The '``llvm.nvvm.ptr.*.to.gen``' intrinsics convert a pointer in a non-generic +address space to a generic address space pointer. + +Semantics: +"""""""""" + +These intrinsics modify the pointer value to be a valid generic address space +pointer. + + +'``llvm.nvvm.ptr.gen.to.*``' Intrinsics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +These are overloaded intrinsics. You can use these on any pointer types. + +.. code-block:: llvm + + declare i8* @llvm.nvvm.ptr.gen.to.global.p1i8.p0i8(i8 addrspace(1)*) + declare i8* @llvm.nvvm.ptr.gen.to.shared.p3i8.p0i8(i8 addrspace(3)*) + declare i8* @llvm.nvvm.ptr.gen.to.constant.p4i8.p0i8(i8 addrspace(4)*) + declare i8* @llvm.nvvm.ptr.gen.to.local.p5i8.p0i8(i8 addrspace(5)*) + +Overview: +""""""""" + +The '``llvm.nvvm.ptr.gen.to.*``' intrinsics convert a pointer in the generic +address space to a pointer in the target address space. Note that these +intrinsics are only useful if the address space of the target address space of +the pointer is known. It is not legal to use address space conversion +intrinsics to convert a pointer from one non-generic address space to another +non-generic address space. + +Semantics: +"""""""""" + +These intrinsics modify the pointer value to be a valid pointer in the target +non-generic address space. + + +Reading PTX Special Registers +----------------------------- + +'``llvm.nvvm.read.ptx.sreg.*``' +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +.. code-block:: llvm + + declare i32 @llvm.nvvm.read.ptx.sreg.tid.x() + declare i32 @llvm.nvvm.read.ptx.sreg.tid.y() + declare i32 @llvm.nvvm.read.ptx.sreg.tid.z() + declare i32 @llvm.nvvm.read.ptx.sreg.ntid.x() + declare i32 @llvm.nvvm.read.ptx.sreg.ntid.y() + declare i32 @llvm.nvvm.read.ptx.sreg.ntid.z() + declare i32 @llvm.nvvm.read.ptx.sreg.ctaid.x() + declare i32 @llvm.nvvm.read.ptx.sreg.ctaid.y() + declare i32 @llvm.nvvm.read.ptx.sreg.ctaid.z() + declare i32 @llvm.nvvm.read.ptx.sreg.nctaid.x() + declare i32 @llvm.nvvm.read.ptx.sreg.nctaid.y() + declare i32 @llvm.nvvm.read.ptx.sreg.nctaid.z() + declare i32 @llvm.nvvm.read.ptx.sreg.warpsize() + +Overview: +""""""""" + +The '``@llvm.nvvm.read.ptx.sreg.*``' intrinsics provide access to the PTX +special registers, in particular the kernel launch bounds. These registers +map in the following way to CUDA builtins: + + ============ ===================================== + CUDA Builtin PTX Special Register Intrinsic + ============ ===================================== + ``threadId`` ``@llvm.nvvm.read.ptx.sreg.tid.*`` + ``blockIdx`` ``@llvm.nvvm.read.ptx.sreg.ctaid.*`` + ``blockDim`` ``@llvm.nvvm.read.ptx.sreg.ntid.*`` + ``gridDim`` ``@llvm.nvvm.read.ptx.sreg.nctaid.*`` + ============ ===================================== + + +Barriers +-------- + +'``llvm.nvvm.barrier0``' +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" + +.. code-block:: llvm + + declare void @llvm.nvvm.barrier0() + +Overview: +""""""""" + +The '``@llvm.nvvm.barrier0()``' intrinsic emits a PTX ``bar.sync 0`` +instruction, equivalent to the ``__syncthreads()`` call in CUDA. + + +Other Intrinsics +---------------- + +For the full set of NVPTX intrinsics, please see the +``include/llvm/IR/IntrinsicsNVVM.td`` file in the LLVM source tree. + + +.. _libdevice: + +Linking with Libdevice +====================== + +The CUDA Toolkit comes with an LLVM bitcode library called ``libdevice`` that +implements many common mathematical functions. This library can be used as a +high-performance math library for any compilers using the LLVM NVPTX target. +The library can be found under ``nvvm/libdevice/`` in the CUDA Toolkit and +there is a separate version for each compute architecture. + +For a list of all math functions implemented in libdevice, see +`libdevice Users Guide `_. + +To accomodate various math-related compiler flags that can affect code +generation of libdevice code, the library code depends on a special LLVM IR +pass (``NVVMReflect``) to handle conditional compilation within LLVM IR. This +pass looks for calls to the ``@__nvvm_reflect`` function and replaces them +with constants based on the defined reflection parameters. Such conditional +code often follows a pattern: + +.. code-block:: c++ + + float my_function(float a) { + if (__nvvm_reflect("FASTMATH")) + return my_function_fast(a); + else + return my_function_precise(a); + } + +The default value for all unspecified reflection parameters is zero. + +The ``NVVMReflect`` pass should be executed early in the optimization +pipeline, immediately after the link stage. The ``internalize`` pass is also +recommended to remove unused math functions from the resulting PTX. For an +input IR module ``module.bc``, the following compilation flow is recommended: + +1. Save list of external functions in ``module.bc`` +2. Link ``module.bc`` with ``libdevice.compute_XX.YY.bc`` +3. Internalize all functions not in list from (1) +4. Eliminate all unused internal functions +5. Run ``NVVMReflect`` pass +6. Run standard optimization pipeline + +.. note:: + + ``linkonce`` and ``linkonce_odr`` linkage types are not suitable for the + libdevice functions. It is possible to link two IR modules that have been + linked against libdevice using different reflection variables. + +Since the ``NVVMReflect`` pass replaces conditionals with constants, it will +often leave behind dead code of the form: + +.. code-block:: llvm + + entry: + .. + br i1 true, label %foo, label %bar + foo: + .. + bar: + ; Dead code + .. + +Therefore, it is recommended that ``NVVMReflect`` is executed early in the +optimization pipeline before dead-code elimination. + + +Reflection Parameters +--------------------- + +The libdevice library currently uses the following reflection parameters to +control code generation: + +==================== ====================================================== +Flag Description +==================== ====================================================== +``__CUDA_FTZ=[0,1]`` Use optimized code paths that flush subnormals to zero +==================== ====================================================== + + +Invoking NVVMReflect +-------------------- + +To ensure that all dead code caused by the reflection pass is eliminated, it +is recommended that the reflection pass is executed early in the LLVM IR +optimization pipeline. The pass takes an optional mapping of reflection +parameter name to an integer value. This mapping can be specified as either a +command-line option to ``opt`` or as an LLVM ``StringMap`` object when +programmatically creating a pass pipeline. + +With ``opt``: + +.. code-block:: text + + # opt -nvvm-reflect -nvvm-reflect-list==,= module.bc -o module.reflect.bc + + +With programmatic pass pipeline: + +.. code-block:: c++ + + extern ModulePass *llvm::createNVVMReflectPass(const StringMap& Mapping); + + StringMap ReflectParams; + ReflectParams["__CUDA_FTZ"] = 1; + Passes.add(createNVVMReflectPass(ReflectParams)); + + + +Executing PTX +============= + +The most common way to execute PTX assembly on a GPU device is to use the CUDA +Driver API. This API is a low-level interface to the GPU driver and allows for +JIT compilation of PTX code to native GPU machine code. + +Initializing the Driver API: + +.. code-block:: c++ + + CUdevice device; + CUcontext context; + + // Initialize the driver API + cuInit(0); + // Get a handle to the first compute device + cuDeviceGet(&device, 0); + // Create a compute device context + cuCtxCreate(&context, 0, device); + +JIT compiling a PTX string to a device binary: + +.. code-block:: c++ + + CUmodule module; + CUfunction funcion; + + // JIT compile a null-terminated PTX string + cuModuleLoadData(&module, (void*)PTXString); + + // Get a handle to the "myfunction" kernel function + cuModuleGetFunction(&function, module, "myfunction"); + +For full examples of executing PTX assembly, please see the `CUDA Samples +`_ distribution. + + +Common Issues +============= + +ptxas complains of undefined function: __nvvm_reflect +----------------------------------------------------- + +When linking with libdevice, the ``NVVMReflect`` pass must be used. See +:ref:`libdevice` for more information. + + +Tutorial: A Simple Compute Kernel +================================= + +To start, let us take a look at a simple compute kernel written directly in +LLVM IR. The kernel implements vector addition, where each thread computes one +element of the output vector C from the input vectors A and B. To make this +easier, we also assume that only a single CTA (thread block) will be launched, +and that it will be one dimensional. + + +The Kernel +---------- + +.. code-block:: llvm + + target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64" + target triple = "nvptx64-nvidia-cuda" + + ; Intrinsic to read X component of thread ID + declare i32 @llvm.nvvm.read.ptx.sreg.tid.x() readnone nounwind + + define void @kernel(float addrspace(1)* %A, + float addrspace(1)* %B, + float addrspace(1)* %C) { + entry: + ; What is my ID? + %id = tail call i32 @llvm.nvvm.read.ptx.sreg.tid.x() readnone nounwind + + ; Compute pointers into A, B, and C + %ptrA = getelementptr float addrspace(1)* %A, i32 %id + %ptrB = getelementptr float addrspace(1)* %B, i32 %id + %ptrC = getelementptr float addrspace(1)* %C, i32 %id + + ; Read A, B + %valA = load float addrspace(1)* %ptrA, align 4 + %valB = load float addrspace(1)* %ptrB, align 4 + + ; Compute C = A + B + %valC = fadd float %valA, %valB + + ; Store back to C + store float %valC, float addrspace(1)* %ptrC, align 4 + + ret void + } + + !nvvm.annotations = !{!0} + !0 = metadata !{void (float addrspace(1)*, + float addrspace(1)*, + float addrspace(1)*)* @kernel, metadata !"kernel", i32 1} + + +We can use the LLVM ``llc`` tool to directly run the NVPTX code generator: + +.. code-block:: text + + # llc -mcpu=sm_20 kernel.ll -o kernel.ptx + + +.. note:: + + If you want to generate 32-bit code, change ``p:64:64:64`` to ``p:32:32:32`` + in the module data layout string and use ``nvptx-nvidia-cuda`` as the + target triple. + + +The output we get from ``llc`` (as of LLVM 3.4): + +.. code-block:: text + + // + // Generated by LLVM NVPTX Back-End + // + + .version 3.1 + .target sm_20 + .address_size 64 + + // .globl kernel + // @kernel + .visible .entry kernel( + .param .u64 kernel_param_0, + .param .u64 kernel_param_1, + .param .u64 kernel_param_2 + ) + { + .reg .f32 %f<4>; + .reg .s32 %r<2>; + .reg .s64 %rl<8>; + + // BB#0: // %entry + ld.param.u64 %rl1, [kernel_param_0]; + mov.u32 %r1, %tid.x; + mul.wide.s32 %rl2, %r1, 4; + add.s64 %rl3, %rl1, %rl2; + ld.param.u64 %rl4, [kernel_param_1]; + add.s64 %rl5, %rl4, %rl2; + ld.param.u64 %rl6, [kernel_param_2]; + add.s64 %rl7, %rl6, %rl2; + ld.global.f32 %f1, [%rl3]; + ld.global.f32 %f2, [%rl5]; + add.f32 %f3, %f1, %f2; + st.global.f32 [%rl7], %f3; + ret; + } + + +Dissecting the Kernel +--------------------- + +Now let us dissect the LLVM IR that makes up this kernel. + +Data Layout +^^^^^^^^^^^ + +The data layout string determines the size in bits of common data types, their +ABI alignment, and their storage size. For NVPTX, you should use one of the +following: + +32-bit PTX: + +.. code-block:: llvm + + target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64" + +64-bit PTX: + +.. code-block:: llvm + + target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64" + + +Target Intrinsics +^^^^^^^^^^^^^^^^^ + +In this example, we use the ``@llvm.nvvm.read.ptx.sreg.tid.x`` intrinsic to +read the X component of the current thread's ID, which corresponds to a read +of register ``%tid.x`` in PTX. The NVPTX back-end supports a large set of +intrinsics. A short list is shown below; please see +``include/llvm/IR/IntrinsicsNVVM.td`` for the full list. + + +================================================ ==================== +Intrinsic CUDA Equivalent +================================================ ==================== +``i32 @llvm.nvvm.read.ptx.sreg.tid.{x,y,z}`` threadIdx.{x,y,z} +``i32 @llvm.nvvm.read.ptx.sreg.ctaid.{x,y,z}`` blockIdx.{x,y,z} +``i32 @llvm.nvvm.read.ptx.sreg.ntid.{x,y,z}`` blockDim.{x,y,z} +``i32 @llvm.nvvm.read.ptx.sreg.nctaid.{x,y,z}`` gridDim.{x,y,z} +``void @llvm.cuda.syncthreads()`` __syncthreads() +================================================ ==================== + + +Address Spaces +^^^^^^^^^^^^^^ + +You may have noticed that all of the pointer types in the LLVM IR example had +an explicit address space specifier. What is address space 1? NVIDIA GPU +devices (generally) have four types of memory: + +- Global: Large, off-chip memory +- Shared: Small, on-chip memory shared among all threads in a CTA +- Local: Per-thread, private memory +- Constant: Read-only memory shared across all threads + +These different types of memory are represented in LLVM IR as address spaces. +There is also a fifth address space used by the NVPTX code generator that +corresponds to the "generic" address space. This address space can represent +addresses in any other address space (with a few exceptions). This allows +users to write IR functions that can load/store memory using the same +instructions. Intrinsics are provided to convert pointers between the generic +and non-generic address spaces. + +See :ref:`address_spaces` and :ref:`nvptx_intrinsics` for more information. + + +Kernel Metadata +^^^^^^^^^^^^^^^ + +In PTX, a function can be either a `kernel` function (callable from the host +program), or a `device` function (callable only from GPU code). You can think +of `kernel` functions as entry-points in the GPU program. To mark an LLVM IR +function as a `kernel` function, we make use of special LLVM metadata. The +NVPTX back-end will look for a named metadata node called +``nvvm.annotations``. This named metadata must contain a list of metadata that +describe the IR. For our purposes, we need to declare a metadata node that +assigns the "kernel" attribute to the LLVM IR function that should be emitted +as a PTX `kernel` function. These metadata nodes take the form: + +.. code-block:: text + + metadata !{, metadata !"kernel", i32 1} + +For the previous example, we have: + +.. code-block:: llvm + + !nvvm.annotations = !{!0} + !0 = metadata !{void (float addrspace(1)*, + float addrspace(1)*, + float addrspace(1)*)* @kernel, metadata !"kernel", i32 1} + +Here, we have a single metadata declaration in ``nvvm.annotations``. This +metadata annotates our ``@kernel`` function with the ``kernel`` attribute. + + +Running the Kernel +------------------ + +Generating PTX from LLVM IR is all well and good, but how do we execute it on +a real GPU device? The CUDA Driver API provides a convenient mechanism for +loading and JIT compiling PTX to a native GPU device, and launching a kernel. +The API is similar to OpenCL. A simple example showing how to load and +execute our vector addition code is shown below. Note that for brevity this +code does not perform much error checking! + +.. note:: + + You can also use the ``ptxas`` tool provided by the CUDA Toolkit to offline + compile PTX to machine code (SASS) for a specific GPU architecture. Such + binaries can be loaded by the CUDA Driver API in the same way as PTX. This + can be useful for reducing startup time by precompiling the PTX kernels. + + +.. code-block:: c++ + + #include + #include + #include + #include "cuda.h" + + + void checkCudaErrors(CUresult err) { + assert(err == CUDA_SUCCESS); + } + + /// main - Program entry point + int main(int argc, char **argv) { + CUdevice device; + CUmodule cudaModule; + CUcontext context; + CUfunction function; + CUlinkState linker; + int devCount; + + // CUDA initialization + checkCudaErrors(cuInit(0)); + checkCudaErrors(cuDeviceGetCount(&devCount)); + checkCudaErrors(cuDeviceGet(&device, 0)); + + char name[128]; + checkCudaErrors(cuDeviceGetName(name, 128, device)); + std::cout << "Using CUDA Device [0]: " << name << "\n"; + + int devMajor, devMinor; + checkCudaErrors(cuDeviceComputeCapability(&devMajor, &devMinor, device)); + std::cout << "Device Compute Capability: " + << devMajor << "." << devMinor << "\n"; + if (devMajor < 2) { + std::cerr << "ERROR: Device 0 is not SM 2.0 or greater\n"; + return 1; + } + + std::ifstream t("kernel.ptx"); + if (!t.is_open()) { + std::cerr << "kernel.ptx not found\n"; + return 1; + } + std::string str((std::istreambuf_iterator(t)), + std::istreambuf_iterator()); + + // Create driver context + checkCudaErrors(cuCtxCreate(&context, 0, device)); + + // Create module for object + checkCudaErrors(cuModuleLoadDataEx(&cudaModule, str.c_str(), 0, 0, 0)); + + // Get kernel function + checkCudaErrors(cuModuleGetFunction(&function, cudaModule, "kernel")); + + // Device data + CUdeviceptr devBufferA; + CUdeviceptr devBufferB; + CUdeviceptr devBufferC; + + checkCudaErrors(cuMemAlloc(&devBufferA, sizeof(float)*16)); + checkCudaErrors(cuMemAlloc(&devBufferB, sizeof(float)*16)); + checkCudaErrors(cuMemAlloc(&devBufferC, sizeof(float)*16)); + + float* hostA = new float[16]; + float* hostB = new float[16]; + float* hostC = new float[16]; + + // Populate input + for (unsigned i = 0; i != 16; ++i) { + hostA[i] = (float)i; + hostB[i] = (float)(2*i); + hostC[i] = 0.0f; + } + + checkCudaErrors(cuMemcpyHtoD(devBufferA, &hostA[0], sizeof(float)*16)); + checkCudaErrors(cuMemcpyHtoD(devBufferB, &hostB[0], sizeof(float)*16)); + + + unsigned blockSizeX = 16; + unsigned blockSizeY = 1; + unsigned blockSizeZ = 1; + unsigned gridSizeX = 1; + unsigned gridSizeY = 1; + unsigned gridSizeZ = 1; + + // Kernel parameters + void *KernelParams[] = { &devBufferA, &devBufferB, &devBufferC }; + + std::cout << "Launching kernel\n"; + + // Kernel launch + checkCudaErrors(cuLaunchKernel(function, gridSizeX, gridSizeY, gridSizeZ, + blockSizeX, blockSizeY, blockSizeZ, + 0, NULL, KernelParams, NULL)); + + // Retrieve device data + checkCudaErrors(cuMemcpyDtoH(&hostC[0], devBufferC, sizeof(float)*16)); + + + std::cout << "Results:\n"; + for (unsigned i = 0; i != 16; ++i) { + std::cout << hostA[i] << " + " << hostB[i] << " = " << hostC[i] << "\n"; + } + + + // Clean up after ourselves + delete [] hostA; + delete [] hostB; + delete [] hostC; + + // Clean-up + checkCudaErrors(cuMemFree(devBufferA)); + checkCudaErrors(cuMemFree(devBufferB)); + checkCudaErrors(cuMemFree(devBufferC)); + checkCudaErrors(cuModuleUnload(cudaModule)); + checkCudaErrors(cuCtxDestroy(context)); + + return 0; + } + + +You will need to link with the CUDA driver and specify the path to cuda.h. + +.. code-block:: text + + # clang++ sample.cpp -o sample -O2 -g -I/usr/local/cuda-5.5/include -lcuda + +We don't need to specify a path to ``libcuda.so`` since this is installed in a +system location by the driver, not the CUDA toolkit. + +If everything goes as planned, you should see the following output when +running the compiled program: + +.. code-block:: text + + Using CUDA Device [0]: GeForce GTX 680 + Device Compute Capability: 3.0 + Launching kernel + Results: + 0 + 0 = 0 + 1 + 2 = 3 + 2 + 4 = 6 + 3 + 6 = 9 + 4 + 8 = 12 + 5 + 10 = 15 + 6 + 12 = 18 + 7 + 14 = 21 + 8 + 16 = 24 + 9 + 18 = 27 + 10 + 20 = 30 + 11 + 22 = 33 + 12 + 24 = 36 + 13 + 26 = 39 + 14 + 28 = 42 + 15 + 30 = 45 + +.. note:: + + You will likely see a different device identifier based on your hardware + + +Tutorial: Linking with Libdevice +================================ + +In this tutorial, we show a simple example of linking LLVM IR with the +libdevice library. We will use the same kernel as the previous tutorial, +except that we will compute ``C = pow(A, B)`` instead of ``C = A + B``. +Libdevice provides an ``__nv_powf`` function that we will use. + +.. code-block:: llvm + + target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64" + target triple = "nvptx64-nvidia-cuda" + + ; Intrinsic to read X component of thread ID + declare i32 @llvm.nvvm.read.ptx.sreg.tid.x() readnone nounwind + ; libdevice function + declare float @__nv_powf(float, float) + + define void @kernel(float addrspace(1)* %A, + float addrspace(1)* %B, + float addrspace(1)* %C) { + entry: + ; What is my ID? + %id = tail call i32 @llvm.nvvm.read.ptx.sreg.tid.x() readnone nounwind + + ; Compute pointers into A, B, and C + %ptrA = getelementptr float addrspace(1)* %A, i32 %id + %ptrB = getelementptr float addrspace(1)* %B, i32 %id + %ptrC = getelementptr float addrspace(1)* %C, i32 %id + + ; Read A, B + %valA = load float addrspace(1)* %ptrA, align 4 + %valB = load float addrspace(1)* %ptrB, align 4 + + ; Compute C = pow(A, B) + %valC = call float @__nv_exp2f(float %valA, float %valB) + + ; Store back to C + store float %valC, float addrspace(1)* %ptrC, align 4 + + ret void + } + + !nvvm.annotations = !{!0} + !0 = metadata !{void (float addrspace(1)*, + float addrspace(1)*, + float addrspace(1)*)* @kernel, metadata !"kernel", i32 1}% + + +To compile this kernel, we perform the following steps: + +1. Link with libdevice +2. Internalize all but the public kernel function +3. Run ``NVVMReflect`` and set ``__CUDA_FTZ`` to 0 +4. Optimize the linked module +5. Codegen the module + + +These steps can be performed by the LLVM ``llvm-link``, ``opt``, and ``llc`` +tools. In a complete compiler, these steps can also be performed entirely +programmatically by setting up an appropriate pass configuration (see +:ref:`libdevice`). + +.. code-block:: text + + # llvm-link t2.bc libdevice.compute_20.10.bc -o t2.linked.bc + # opt -internalize -internalize-public-api-list=kernel -nvvm-reflect-list=__CUDA_FTZ=0 -nvvm-reflect -O3 t2.linked.bc -o t2.opt.bc + # llc -mcpu=sm_20 t2.opt.bc -o t2.ptx + +.. note:: + + The ``-nvvm-reflect-list=_CUDA_FTZ=0`` is not strictly required, as any + undefined variables will default to zero. It is shown here for evaluation + purposes. + + +This gives us the following PTX (excerpt): + +.. code-block:: text + + // + // Generated by LLVM NVPTX Back-End + // + + .version 3.1 + .target sm_20 + .address_size 64 + + // .globl kernel + // @kernel + .visible .entry kernel( + .param .u64 kernel_param_0, + .param .u64 kernel_param_1, + .param .u64 kernel_param_2 + ) + { + .reg .pred %p<30>; + .reg .f32 %f<111>; + .reg .s32 %r<21>; + .reg .s64 %rl<8>; + + // BB#0: // %entry + ld.param.u64 %rl2, [kernel_param_0]; + mov.u32 %r3, %tid.x; + ld.param.u64 %rl3, [kernel_param_1]; + mul.wide.s32 %rl4, %r3, 4; + add.s64 %rl5, %rl2, %rl4; + ld.param.u64 %rl6, [kernel_param_2]; + add.s64 %rl7, %rl3, %rl4; + add.s64 %rl1, %rl6, %rl4; + ld.global.f32 %f1, [%rl5]; + ld.global.f32 %f2, [%rl7]; + setp.eq.f32 %p1, %f1, 0f3F800000; + setp.eq.f32 %p2, %f2, 0f00000000; + or.pred %p3, %p1, %p2; + @%p3 bra BB0_1; + bra.uni BB0_2; + BB0_1: + mov.f32 %f110, 0f3F800000; + st.global.f32 [%rl1], %f110; + ret; + BB0_2: // %__nv_isnanf.exit.i + abs.f32 %f4, %f1; + setp.gtu.f32 %p4, %f4, 0f7F800000; + @%p4 bra BB0_4; + // BB#3: // %__nv_isnanf.exit5.i + abs.f32 %f5, %f2; + setp.le.f32 %p5, %f5, 0f7F800000; + @%p5 bra BB0_5; + BB0_4: // %.critedge1.i + add.f32 %f110, %f1, %f2; + st.global.f32 [%rl1], %f110; + ret; + BB0_5: // %__nv_isinff.exit.i + + ... + + BB0_26: // %__nv_truncf.exit.i.i.i.i.i + mul.f32 %f90, %f107, 0f3FB8AA3B; + cvt.rzi.f32.f32 %f91, %f90; + mov.f32 %f92, 0fBF317200; + fma.rn.f32 %f93, %f91, %f92, %f107; + mov.f32 %f94, 0fB5BFBE8E; + fma.rn.f32 %f95, %f91, %f94, %f93; + mul.f32 %f89, %f95, 0f3FB8AA3B; + // inline asm + ex2.approx.ftz.f32 %f88,%f89; + // inline asm + add.f32 %f96, %f91, 0f00000000; + ex2.approx.f32 %f97, %f96; + mul.f32 %f98, %f88, %f97; + setp.lt.f32 %p15, %f107, 0fC2D20000; + selp.f32 %f99, 0f00000000, %f98, %p15; + setp.gt.f32 %p16, %f107, 0f42D20000; + selp.f32 %f110, 0f7F800000, %f99, %p16; + setp.eq.f32 %p17, %f110, 0f7F800000; + @%p17 bra BB0_28; + // BB#27: + fma.rn.f32 %f110, %f110, %f108, %f110; + BB0_28: // %__internal_accurate_powf.exit.i + setp.lt.f32 %p18, %f1, 0f00000000; + setp.eq.f32 %p19, %f3, 0f3F800000; + and.pred %p20, %p18, %p19; + @!%p20 bra BB0_30; + bra.uni BB0_29; + BB0_29: + mov.b32 %r9, %f110; + xor.b32 %r10, %r9, -2147483648; + mov.b32 %f110, %r10; + BB0_30: // %__nv_powf.exit + st.global.f32 [%rl1], %f110; + ret; + } + diff --git a/docs/Packaging.rst b/docs/Packaging.rst new file mode 100644 index 00000000..7c2dc956 --- /dev/null +++ b/docs/Packaging.rst @@ -0,0 +1,73 @@ +======================== +Advice on Packaging LLVM +======================== + +.. contents:: + :local: + +Overview +======== + +LLVM sets certain default configure options to make sure our developers don't +break things for constrained platforms. These settings are not optimal for most +desktop systems, and we hope that packagers (e.g., Redhat, Debian, MacPorts, +etc.) will tweak them. This document lists settings we suggest you tweak. + +LLVM's API changes with each release, so users are likely to want, for example, +both LLVM-2.6 and LLVM-2.7 installed at the same time to support apps developed +against each. + +Compile Flags +============= + +LLVM runs much more quickly when it's optimized and assertions are removed. +However, such a build is currently incompatible with users who build without +defining ``NDEBUG``, and the lack of assertions makes it hard to debug problems +in user code. We recommend allowing users to install both optimized and debug +versions of LLVM in parallel. The following configure flags are relevant: + +``--disable-assertions`` + Builds LLVM with ``NDEBUG`` defined. Changes the LLVM ABI. Also available + by setting ``DISABLE_ASSERTIONS=0|1`` in ``make``'s environment. This + defaults to enabled regardless of the optimization setting, but it slows + things down. + +``--enable-debug-symbols`` + Builds LLVM with ``-g``. Also available by setting ``DEBUG_SYMBOLS=0|1`` in + ``make``'s environment. This defaults to disabled when optimizing, so you + should turn it back on to let users debug their programs. + +``--enable-optimized`` + (For svn checkouts) Builds LLVM with ``-O2`` and, by default, turns off + debug symbols. Also available by setting ``ENABLE_OPTIMIZED=0|1`` in + ``make``'s environment. This defaults to enabled when not in a + checkout. + +C++ Features +============ + +RTTI + LLVM disables RTTI by default. Add ``REQUIRES_RTTI=1`` to your environment + while running ``make`` to re-enable it. This will allow users to build with + RTTI enabled and still inherit from LLVM classes. + +Shared Library +============== + +Configure with ``--enable-shared`` to build +``libLLVM-..(so|dylib)`` and link the tools against it. This +saves lots of binary size at the cost of some startup time. + +Dependencies +============ + +``--enable-libffi`` + Depend on `libffi `_ to allow the LLVM + interpreter to call external functions. + +``--with-oprofile`` + + Depend on `libopagent + `_ (>=version 0.9.4) + to let the LLVM JIT tell oprofile about function addresses and line + numbers. diff --git a/docs/Passes.rst b/docs/Passes.rst new file mode 100644 index 00000000..029e472b --- /dev/null +++ b/docs/Passes.rst @@ -0,0 +1,1261 @@ +.. + If Passes.html is up to date, the following "one-liner" should print + an empty diff. + + egrep -e '^-.*.*$' \ + -e '^ .*$' < Passes.html >html; \ + perl >help <<'EOT' && diff -u help html; rm -f help html + open HTML, ") { + m:^-.*.*$: or next; + $order{$1} = sprintf("%03d", 1 + int %order); + } + open HELP, "../Release/bin/opt -help|" or die "open: opt -help: $!\n"; + while () { + m:^ -([^ ]+) +- (.*)$: or next; + my $o = $order{$1}; + $o = "000" unless defined $o; + push @x, "$o-$1$2\n"; + push @y, "$o -$1: $2\n"; + } + @x = map { s/^\d\d\d//; $_ } sort @x; + @y = map { s/^\d\d\d//; $_ } sort @y; + print @x, @y; + EOT + + This (real) one-liner can also be helpful when converting comments to HTML: + + perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if !$on && $_ =~ /\S/; print "

\n" if $on && $_ =~ /^\s*$/; print " $_\n"; $on = ($_ =~ /\S/); } print "

\n" if $on' + +==================================== +LLVM's Analysis and Transform Passes +==================================== + +.. contents:: + :local: + +Introduction +============ + +This document serves as a high level summary of the optimization features that +LLVM provides. Optimizations are implemented as Passes that traverse some +portion of a program to either collect information or transform the program. +The table below divides the passes that LLVM provides into three categories. +Analysis passes compute information that other passes can use or for debugging +or program visualization purposes. Transform passes can use (or invalidate) +the analysis passes. Transform passes all mutate the program in some way. +Utility passes provides some utility but don't otherwise fit categorization. +For example passes to extract functions to bitcode or write a module to bitcode +are neither analysis nor transform passes. The table of contents above +provides a quick summary of each pass and links to the more complete pass +description later in the document. + +Analysis Passes +=============== + +This section describes the LLVM Analysis Passes. + +``-aa-eval``: Exhaustive Alias Analysis Precision Evaluator +----------------------------------------------------------- + +This is a simple N^2 alias analysis accuracy evaluator. Basically, for each +function in the program, it simply queries to see how the alias analysis +implementation answers alias queries between each pair of pointers in the +function. + +This is inspired and adapted from code by: Naveen Neelakantam, Francesco +Spadini, and Wojciech Stryjewski. + +``-basicaa``: Basic Alias Analysis (stateless AA impl) +------------------------------------------------------ + +A basic alias analysis pass that implements identities (two different globals +cannot alias, etc), but does no stateful analysis. + +``-basiccg``: Basic CallGraph Construction +------------------------------------------ + +Yet to be written. + +``-count-aa``: Count Alias Analysis Query Responses +--------------------------------------------------- + +A pass which can be used to count how many alias queries are being made and how +the alias analysis implementation being used responds. + +``-da``: Dependence Analysis +---------------------------- + +Dependence analysis framework, which is used to detect dependences in memory +accesses. + +``-debug-aa``: AA use debugger +------------------------------ + +This simple pass checks alias analysis users to ensure that if they create a +new value, they do not query AA without informing it of the value. It acts as +a shim over any other AA pass you want. + +Yes keeping track of every value in the program is expensive, but this is a +debugging pass. + +``-domfrontier``: Dominance Frontier Construction +------------------------------------------------- + +This pass is a simple dominator construction algorithm for finding forward +dominator frontiers. + +``-domtree``: Dominator Tree Construction +----------------------------------------- + +This pass is a simple dominator construction algorithm for finding forward +dominators. + + +``-dot-callgraph``: Print Call Graph to "dot" file +-------------------------------------------------- + +This pass, only available in ``opt``, prints the call graph into a ``.dot`` +graph. This graph can then be processed with the "dot" tool to convert it to +postscript or some other suitable format. + +``-dot-cfg``: Print CFG of function to "dot" file +------------------------------------------------- + +This pass, only available in ``opt``, prints the control flow graph into a +``.dot`` graph. This graph can then be processed with the :program:`dot` tool +to convert it to postscript or some other suitable format. + +``-dot-cfg-only``: Print CFG of function to "dot" file (with no function bodies) +-------------------------------------------------------------------------------- + +This pass, only available in ``opt``, prints the control flow graph into a +``.dot`` graph, omitting the function bodies. This graph can then be processed +with the :program:`dot` tool to convert it to postscript or some other suitable +format. + +``-dot-dom``: Print dominance tree of function to "dot" file +------------------------------------------------------------ + +This pass, only available in ``opt``, prints the dominator tree into a ``.dot`` +graph. This graph can then be processed with the :program:`dot` tool to +convert it to postscript or some other suitable format. + +``-dot-dom-only``: Print dominance tree of function to "dot" file (with no function bodies) +------------------------------------------------------------------------------------------- + +This pass, only available in ``opt``, prints the dominator tree into a ``.dot`` +graph, omitting the function bodies. This graph can then be processed with the +:program:`dot` tool to convert it to postscript or some other suitable format. + +``-dot-postdom``: Print postdominance tree of function to "dot" file +-------------------------------------------------------------------- + +This pass, only available in ``opt``, prints the post dominator tree into a +``.dot`` graph. This graph can then be processed with the :program:`dot` tool +to convert it to postscript or some other suitable format. + +``-dot-postdom-only``: Print postdominance tree of function to "dot" file (with no function bodies) +--------------------------------------------------------------------------------------------------- + +This pass, only available in ``opt``, prints the post dominator tree into a +``.dot`` graph, omitting the function bodies. This graph can then be processed +with the :program:`dot` tool to convert it to postscript or some other suitable +format. + +``-globalsmodref-aa``: Simple mod/ref analysis for globals +---------------------------------------------------------- + +This simple pass provides alias and mod/ref information for global values that +do not have their address taken, and keeps track of whether functions read or +write memory (are "pure"). For this simple (but very common) case, we can +provide pretty accurate and useful information. + +``-instcount``: Counts the various types of ``Instruction``\ s +-------------------------------------------------------------- + +This pass collects the count of all instructions and reports them. + +``-intervals``: Interval Partition Construction +----------------------------------------------- + +This analysis calculates and represents the interval partition of a function, +or a preexisting interval partition. + +In this way, the interval partition may be used to reduce a flow graph down to +its degenerate single node interval partition (unless it is irreducible). + +``-iv-users``: Induction Variable Users +--------------------------------------- + +Bookkeeping for "interesting" users of expressions computed from induction +variables. + +``-lazy-value-info``: Lazy Value Information Analysis +----------------------------------------------------- + +Interface for lazy computation of value constraint information. + +``-libcall-aa``: LibCall Alias Analysis +--------------------------------------- + +LibCall Alias Analysis. + +``-lint``: Statically lint-checks LLVM IR +----------------------------------------- + +This pass statically checks for common and easily-identified constructs which +produce undefined or likely unintended behavior in LLVM IR. + +It is not a guarantee of correctness, in two ways. First, it isn't +comprehensive. There are checks which could be done statically which are not +yet implemented. Some of these are indicated by TODO comments, but those +aren't comprehensive either. Second, many conditions cannot be checked +statically. This pass does no dynamic instrumentation, so it can't check for +all possible problems. + +Another limitation is that it assumes all code will be executed. A store +through a null pointer in a basic block which is never reached is harmless, but +this pass will warn about it anyway. + +Optimization passes may make conditions that this pass checks for more or less +obvious. If an optimization pass appears to be introducing a warning, it may +be that the optimization pass is merely exposing an existing condition in the +code. + +This code may be run before :ref:`instcombine `. In many +cases, instcombine checks for the same kinds of things and turns instructions +with undefined behavior into unreachable (or equivalent). Because of this, +this pass makes some effort to look through bitcasts and so on. + +``-loops``: Natural Loop Information +------------------------------------ + +This analysis is used to identify natural loops and determine the loop depth of +various nodes of the CFG. Note that the loops identified may actually be +several natural loops that share the same header node... not just a single +natural loop. + +``-memdep``: Memory Dependence Analysis +--------------------------------------- + +An analysis that determines, for a given memory operation, what preceding +memory operations it depends on. It builds on alias analysis information, and +tries to provide a lazy, caching interface to a common kind of alias +information query. + +``-module-debuginfo``: Decodes module-level debug info +------------------------------------------------------ + +This pass decodes the debug info metadata in a module and prints in a +(sufficiently-prepared-) human-readable form. + +For example, run this pass from ``opt`` along with the ``-analyze`` option, and +it'll print to standard output. + +``-no-aa``: No Alias Analysis (always returns 'may' alias) +---------------------------------------------------------- + +This is the default implementation of the Alias Analysis interface. It always +returns "I don't know" for alias queries. NoAA is unlike other alias analysis +implementations, in that it does not chain to a previous analysis. As such it +doesn't follow many of the rules that other alias analyses must. + +``-no-profile``: No Profile Information +--------------------------------------- + +The default "no profile" implementation of the abstract ``ProfileInfo`` +interface. + +``-postdomfrontier``: Post-Dominance Frontier Construction +---------------------------------------------------------- + +This pass is a simple post-dominator construction algorithm for finding +post-dominator frontiers. + +``-postdomtree``: Post-Dominator Tree Construction +-------------------------------------------------- + +This pass is a simple post-dominator construction algorithm for finding +post-dominators. + +``-print-alias-sets``: Alias Set Printer +---------------------------------------- + +Yet to be written. + +``-print-callgraph``: Print a call graph +---------------------------------------- + +This pass, only available in ``opt``, prints the call graph to standard error +in a human-readable form. + +``-print-callgraph-sccs``: Print SCCs of the Call Graph +------------------------------------------------------- + +This pass, only available in ``opt``, prints the SCCs of the call graph to +standard error in a human-readable form. + +``-print-cfg-sccs``: Print SCCs of each function CFG +---------------------------------------------------- + +This pass, only available in ``opt``, printsthe SCCs of each function CFG to +standard error in a human-readable fom. + +``-print-dbginfo``: Print debug info in human readable form +----------------------------------------------------------- + +Pass that prints instructions, and associated debug info: + +#. source/line/col information +#. original variable name +#. original type name + +``-print-dom-info``: Dominator Info Printer +------------------------------------------- + +Dominator Info Printer. + +``-print-externalfnconstants``: Print external fn callsites passed constants +---------------------------------------------------------------------------- + +This pass, only available in ``opt``, prints out call sites to external +functions that are called with constant arguments. This can be useful when +looking for standard library functions we should constant fold or handle in +alias analyses. + +``-print-function``: Print function to stderr +--------------------------------------------- + +The ``PrintFunctionPass`` class is designed to be pipelined with other +``FunctionPasses``, and prints out the functions of the module as they are +processed. + +``-print-module``: Print module to stderr +----------------------------------------- + +This pass simply prints out the entire module when it is executed. + +.. _passes-print-used-types: + +``-print-used-types``: Find Used Types +-------------------------------------- + +This pass is used to seek out all of the types in use by the program. Note +that this analysis explicitly does not include types only used by the symbol +table. + +``-profile-estimator``: Estimate profiling information +------------------------------------------------------ + +Profiling information that estimates the profiling information in a very crude +and unimaginative way. + +``-profile-loader``: Load profile information from ``llvmprof.out`` +------------------------------------------------------------------- + +A concrete implementation of profiling information that loads the information +from a profile dump file. + +``-profile-verifier``: Verify profiling information +--------------------------------------------------- + +Pass that checks profiling information for plausibility. + +``-regions``: Detect single entry single exit regions +----------------------------------------------------- + +The ``RegionInfo`` pass detects single entry single exit regions in a function, +where a region is defined as any subgraph that is connected to the remaining +graph at only two spots. Furthermore, an hierarchical region tree is built. + +``-scalar-evolution``: Scalar Evolution Analysis +------------------------------------------------ + +The ``ScalarEvolution`` analysis can be used to analyze and catagorize scalar +expressions in loops. It specializes in recognizing general induction +variables, representing them with the abstract and opaque ``SCEV`` class. +Given this analysis, trip counts of loops and other important properties can be +obtained. + +This analysis is primarily useful for induction variable substitution and +strength reduction. + +``-scev-aa``: ScalarEvolution-based Alias Analysis +-------------------------------------------------- + +Simple alias analysis implemented in terms of ``ScalarEvolution`` queries. + +This differs from traditional loop dependence analysis in that it tests for +dependencies within a single iteration of a loop, rather than dependencies +between different iterations. + +``ScalarEvolution`` has a more complete understanding of pointer arithmetic +than ``BasicAliasAnalysis``' collection of ad-hoc analyses. + +``-targetdata``: Target Data Layout +----------------------------------- + +Provides other passes access to information on how the size and alignment +required by the target ABI for various data types. + +Transform Passes +================ + +This section describes the LLVM Transform Passes. + +``-adce``: Aggressive Dead Code Elimination +------------------------------------------- + +ADCE aggressively tries to eliminate code. This pass is similar to :ref:`DCE +` but it assumes that values are dead until proven otherwise. This +is similar to :ref:`SCCP `, except applied to the liveness of +values. + +``-always-inline``: Inliner for ``always_inline`` functions +----------------------------------------------------------- + +A custom inliner that handles only functions that are marked as "always +inline". + +``-argpromotion``: Promote 'by reference' arguments to scalars +-------------------------------------------------------------- + +This pass promotes "by reference" arguments to be "by value" arguments. In +practice, this means looking for internal functions that have pointer +arguments. If it can prove, through the use of alias analysis, that an +argument is *only* loaded, then it can pass the value into the function instead +of the address of the value. This can cause recursive simplification of code +and lead to the elimination of allocas (especially in C++ template code like +the STL). + +This pass also handles aggregate arguments that are passed into a function, +scalarizing them if the elements of the aggregate are only loaded. Note that +it refuses to scalarize aggregates which would require passing in more than +three operands to the function, because passing thousands of operands for a +large array or structure is unprofitable! + +Note that this transformation could also be done for arguments that are only +stored to (returning the value instead), but does not currently. This case +would be best handled when and if LLVM starts supporting multiple return values +from functions. + +``-bb-vectorize``: Basic-Block Vectorization +-------------------------------------------- + +This pass combines instructions inside basic blocks to form vector +instructions. It iterates over each basic block, attempting to pair compatible +instructions, repeating this process until no additional pairs are selected for +vectorization. When the outputs of some pair of compatible instructions are +used as inputs by some other pair of compatible instructions, those pairs are +part of a potential vectorization chain. Instruction pairs are only fused into +vector instructions when they are part of a chain longer than some threshold +length. Moreover, the pass attempts to find the best possible chain for each +pair of compatible instructions. These heuristics are intended to prevent +vectorization in cases where it would not yield a performance increase of the +resulting code. + +``-block-placement``: Profile Guided Basic Block Placement +---------------------------------------------------------- + +This pass is a very simple profile guided basic block placement algorithm. The +idea is to put frequently executed blocks together at the start of the function +and hopefully increase the number of fall-through conditional branches. If +there is no profile information for a particular function, this pass basically +orders blocks in depth-first order. + +``-break-crit-edges``: Break critical edges in CFG +-------------------------------------------------- + +Break all of the critical edges in the CFG by inserting a dummy basic block. +It may be "required" by passes that cannot deal with critical edges. This +transformation obviously invalidates the CFG, but can update forward dominator +(set, immediate dominators, tree, and frontier) information. + +``-codegenprepare``: Optimize for code generation +------------------------------------------------- + +This pass munges the code in the input function to better prepare it for +SelectionDAG-based code generation. This works around limitations in its +basic-block-at-a-time approach. It should eventually be removed. + +``-constmerge``: Merge Duplicate Global Constants +------------------------------------------------- + +Merges duplicate global constants together into a single constant that is +shared. This is useful because some passes (i.e., TraceValues) insert a lot of +string constants into the program, regardless of whether or not an existing +string is available. + +``-constprop``: Simple constant propagation +------------------------------------------- + +This pass implements constant propagation and merging. It looks for +instructions involving only constant operands and replaces them with a constant +value instead of an instruction. For example: + +.. code-block:: llvm + + add i32 1, 2 + +becomes + +.. code-block:: llvm + + i32 3 + +NOTE: this pass has a habit of making definitions be dead. It is a good idea +to run a :ref:`Dead Instruction Elimination ` pass sometime after +running this pass. + +.. _passes-dce: + +``-dce``: Dead Code Elimination +------------------------------- + +Dead code elimination is similar to :ref:`dead instruction elimination +`, but it rechecks instructions that were used by removed +instructions to see if they are newly dead. + +``-deadargelim``: Dead Argument Elimination +------------------------------------------- + +This pass deletes dead arguments from internal functions. Dead argument +elimination removes arguments which are directly dead, as well as arguments +only passed into function calls as dead arguments of other functions. This +pass also deletes dead arguments in a similar way. + +This pass is often useful as a cleanup pass to run after aggressive +interprocedural passes, which add possibly-dead arguments. + +``-deadtypeelim``: Dead Type Elimination +---------------------------------------- + +This pass is used to cleanup the output of GCC. It eliminate names for types +that are unused in the entire translation unit, using the :ref:`find used types +` pass. + +.. _passes-die: + +``-die``: Dead Instruction Elimination +-------------------------------------- + +Dead instruction elimination performs a single pass over the function, removing +instructions that are obviously dead. + +``-dse``: Dead Store Elimination +-------------------------------- + +A trivial dead store elimination that only considers basic-block local +redundant stores. + +``-functionattrs``: Deduce function attributes +---------------------------------------------- + +A simple interprocedural pass which walks the call-graph, looking for functions +which do not access or only read non-local memory, and marking them +``readnone``/``readonly``. In addition, it marks function arguments (of +pointer type) "``nocapture``" if a call to the function does not create any +copies of the pointer value that outlive the call. This more or less means +that the pointer is only dereferenced, and not returned from the function or +stored in a global. This pass is implemented as a bottom-up traversal of the +call-graph. + +``-globaldce``: Dead Global Elimination +--------------------------------------- + +This transform is designed to eliminate unreachable internal globals from the +program. It uses an aggressive algorithm, searching out globals that are known +to be alive. After it finds all of the globals which are needed, it deletes +whatever is left over. This allows it to delete recursive chunks of the +program which are unreachable. + +``-globalopt``: Global Variable Optimizer +----------------------------------------- + +This pass transforms simple global variables that never have their address +taken. If obviously true, it marks read/write globals as constant, deletes +variables only stored to, etc. + +``-gvn``: Global Value Numbering +-------------------------------- + +This pass performs global value numbering to eliminate fully and partially +redundant instructions. It also performs redundant load elimination. + +.. _passes-indvars: + +``-indvars``: Canonicalize Induction Variables +---------------------------------------------- + +This transformation analyzes and transforms the induction variables (and +computations derived from them) into simpler forms suitable for subsequent +analysis and transformation. + +This transformation makes the following changes to each loop with an +identifiable induction variable: + +* All loops are transformed to have a *single* canonical induction variable + which starts at zero and steps by one. +* The canonical induction variable is guaranteed to be the first PHI node in + the loop header block. +* Any pointer arithmetic recurrences are raised to use array subscripts. + +If the trip count of a loop is computable, this pass also makes the following +changes: + +* The exit condition for the loop is canonicalized to compare the induction + value against the exit value. This turns loops like: + + .. code-block:: c++ + + for (i = 7; i*i < 1000; ++i) + + into + + .. code-block:: c++ + + for (i = 0; i != 25; ++i) + +* Any use outside of the loop of an expression derived from the indvar is + changed to compute the derived value outside of the loop, eliminating the + dependence on the exit value of the induction variable. If the only purpose + of the loop is to compute the exit value of some derived expression, this + transformation will make the loop dead. + +This transformation should be followed by strength reduction after all of the +desired loop transformations have been performed. Additionally, on targets +where it is profitable, the loop could be transformed to count down to zero +(the "do loop" optimization). + +``-inline``: Function Integration/Inlining +------------------------------------------ + +Bottom-up inlining of functions into callees. + +``-insert-edge-profiling``: Insert instrumentation for edge profiling +--------------------------------------------------------------------- + +This pass instruments the specified program with counters for edge profiling. +Edge profiling can give a reasonable approximation of the hot paths through a +program, and is used for a wide variety of program transformations. + +Note that this implementation is very naïve. It inserts a counter for *every* +edge in the program, instead of using control flow information to prune the +number of counters inserted. + +``-insert-optimal-edge-profiling``: Insert optimal instrumentation for edge profiling +------------------------------------------------------------------------------------- + +This pass instruments the specified program with counters for edge profiling. +Edge profiling can give a reasonable approximation of the hot paths through a +program, and is used for a wide variety of program transformations. + +.. _passes-instcombine: + +``-instcombine``: Combine redundant instructions +------------------------------------------------ + +Combine instructions to form fewer, simple instructions. This pass does not +modify the CFG This pass is where algebraic simplification happens. + +This pass combines things like: + +.. code-block:: llvm + + %Y = add i32 %X, 1 + %Z = add i32 %Y, 1 + +into: + +.. code-block:: llvm + + %Z = add i32 %X, 2 + +This is a simple worklist driven algorithm. + +This pass guarantees that the following canonicalizations are performed on the +program: + +#. If a binary operator has a constant operand, it is moved to the right-hand + side. +#. Bitwise operators with constant operands are always grouped so that shifts + are performed first, then ``or``\ s, then ``and``\ s, then ``xor``\ s. +#. Compare instructions are converted from ``<``, ``>``, ``≤``, or ``≥`` to + ``=`` or ``≠`` if possible. +#. All ``cmp`` instructions on boolean values are replaced with logical + operations. +#. ``add X, X`` is represented as ``mul X, 2`` ⇒ ``shl X, 1`` +#. Multiplies with a constant power-of-two argument are transformed into + shifts. +#. … etc. + +``-internalize``: Internalize Global Symbols +-------------------------------------------- + +This pass loops over all of the functions in the input module, looking for a +main function. If a main function is found, all other functions and all global +variables with initializers are marked as internal. + +``-ipconstprop``: Interprocedural constant propagation +------------------------------------------------------ + +This pass implements an *extremely* simple interprocedural constant propagation +pass. It could certainly be improved in many different ways, like using a +worklist. This pass makes arguments dead, but does not remove them. The +existing dead argument elimination pass should be run after this to clean up +the mess. + +``-ipsccp``: Interprocedural Sparse Conditional Constant Propagation +-------------------------------------------------------------------- + +An interprocedural variant of :ref:`Sparse Conditional Constant Propagation +`. + +``-jump-threading``: Jump Threading +----------------------------------- + +Jump threading tries to find distinct threads of control flow running through a +basic block. This pass looks at blocks that have multiple predecessors and +multiple successors. If one or more of the predecessors of the block can be +proven to always cause a jump to one of the successors, we forward the edge +from the predecessor to the successor by duplicating the contents of this +block. + +An example of when this can occur is code like this: + +.. code-block:: c++ + + if () { ... + X = 4; + } + if (X < 3) { + +In this case, the unconditional branch at the end of the first if can be +revectored to the false side of the second if. + +``-lcssa``: Loop-Closed SSA Form Pass +------------------------------------- + +This pass transforms loops by placing phi nodes at the end of the loops for all +values that are live across the loop boundary. For example, it turns the left +into the right code: + +.. code-block:: c++ + + for (...) for (...) + if (c) if (c) + X1 = ... X1 = ... + else else + X2 = ... X2 = ... + X3 = phi(X1, X2) X3 = phi(X1, X2) + ... = X3 + 4 X4 = phi(X3) + ... = X4 + 4 + +This is still valid LLVM; the extra phi nodes are purely redundant, and will be +trivially eliminated by ``InstCombine``. The major benefit of this +transformation is that it makes many other loop optimizations, such as +``LoopUnswitch``\ ing, simpler. + +.. _passes-licm: + +``-licm``: Loop Invariant Code Motion +------------------------------------- + +This pass performs loop invariant code motion, attempting to remove as much +code from the body of a loop as possible. It does this by either hoisting code +into the preheader block, or by sinking code to the exit blocks if it is safe. +This pass also promotes must-aliased memory locations in the loop to live in +registers, thus hoisting and sinking "invariant" loads and stores. + +This pass uses alias analysis for two purposes: + +#. Moving loop invariant loads and calls out of loops. If we can determine + that a load or call inside of a loop never aliases anything stored to, we + can hoist it or sink it like any other instruction. + +#. Scalar Promotion of Memory. If there is a store instruction inside of the + loop, we try to move the store to happen AFTER the loop instead of inside of + the loop. This can only happen if a few conditions are true: + + #. The pointer stored through is loop invariant. + #. There are no stores or loads in the loop which *may* alias the pointer. + There are no calls in the loop which mod/ref the pointer. + + If these conditions are true, we can promote the loads and stores in the + loop of the pointer to use a temporary alloca'd variable. We then use the + :ref:`mem2reg ` functionality to construct the appropriate + SSA form for the variable. + +``-loop-deletion``: Delete dead loops +------------------------------------- + +This file implements the Dead Loop Deletion Pass. This pass is responsible for +eliminating loops with non-infinite computable trip counts that have no side +effects or volatile instructions, and do not contribute to the computation of +the function's return value. + +.. _passes-loop-extract: + +``-loop-extract``: Extract loops into new functions +--------------------------------------------------- + +A pass wrapper around the ``ExtractLoop()`` scalar transformation to extract +each top-level loop into its own new function. If the loop is the *only* loop +in a given function, it is not touched. This is a pass most useful for +debugging via bugpoint. + +``-loop-extract-single``: Extract at most one loop into a new function +---------------------------------------------------------------------- + +Similar to :ref:`Extract loops into new functions `, this +pass extracts one natural loop from the program into a function if it can. +This is used by :program:`bugpoint`. + +``-loop-reduce``: Loop Strength Reduction +----------------------------------------- + +This pass performs a strength reduction on array references inside loops that +have as one or more of their components the loop induction variable. This is +accomplished by creating a new value to hold the initial value of the array +access for the first iteration, and then creating a new GEP instruction in the +loop to increment the value by the appropriate amount. + +``-loop-rotate``: Rotate Loops +------------------------------ + +A simple loop rotation transformation. + +``-loop-simplify``: Canonicalize natural loops +---------------------------------------------- + +This pass performs several transformations to transform natural loops into a +simpler form, which makes subsequent analyses and transformations simpler and +more effective. + +Loop pre-header insertion guarantees that there is a single, non-critical entry +edge from outside of the loop to the loop header. This simplifies a number of +analyses and transformations, such as :ref:`LICM `. + +Loop exit-block insertion guarantees that all exit blocks from the loop (blocks +which are outside of the loop that have predecessors inside of the loop) only +have predecessors from inside of the loop (and are thus dominated by the loop +header). This simplifies transformations such as store-sinking that are built +into LICM. + +This pass also guarantees that loops will have exactly one backedge. + +Note that the :ref:`simplifycfg ` pass will clean up blocks +which are split out but end up being unnecessary, so usage of this pass should +not pessimize generated code. + +This pass obviously modifies the CFG, but updates loop information and +dominator information. + +``-loop-unroll``: Unroll loops +------------------------------ + +This pass implements a simple loop unroller. It works best when loops have +been canonicalized by the :ref:`indvars ` pass, allowing it to +determine the trip counts of loops easily. + +``-loop-unswitch``: Unswitch loops +---------------------------------- + +This pass transforms loops that contain branches on loop-invariant conditions +to have multiple loops. For example, it turns the left into the right code: + +.. code-block:: c++ + + for (...) if (lic) + A for (...) + if (lic) A; B; C + B else + C for (...) + A; C + +This can increase the size of the code exponentially (doubling it every time a +loop is unswitched) so we only unswitch if the resultant code will be smaller +than a threshold. + +This pass expects :ref:`LICM ` to be run before it to hoist +invariant conditions out of the loop, to make the unswitching opportunity +obvious. + +``-loweratomic``: Lower atomic intrinsics to non-atomic form +------------------------------------------------------------ + +This pass lowers atomic intrinsics to non-atomic form for use in a known +non-preemptible environment. + +The pass does not verify that the environment is non-preemptible (in general +this would require knowledge of the entire call graph of the program including +any libraries which may not be available in bitcode form); it simply lowers +every atomic intrinsic. + +``-lowerinvoke``: Lower invoke and unwind, for unwindless code generators +------------------------------------------------------------------------- + +This transformation is designed for use by code generators which do not yet +support stack unwinding. This pass supports two models of exception handling +lowering, the "cheap" support and the "expensive" support. + +"Cheap" exception handling support gives the program the ability to execute any +program which does not "throw an exception", by turning "``invoke``" +instructions into calls and by turning "``unwind``" instructions into calls to +``abort()``. If the program does dynamically use the "``unwind``" instruction, +the program will print a message then abort. + +"Expensive" exception handling support gives the full exception handling +support to the program at the cost of making the "``invoke``" instruction +really expensive. It basically inserts ``setjmp``/``longjmp`` calls to emulate +the exception handling as necessary. + +Because the "expensive" support slows down programs a lot, and EH is only used +for a subset of the programs, it must be specifically enabled by the +``-enable-correct-eh-support`` option. + +Note that after this pass runs the CFG is not entirely accurate (exceptional +control flow edges are not correct anymore) so only very simple things should +be done after the ``lowerinvoke`` pass has run (like generation of native +code). This should not be used as a general purpose "my LLVM-to-LLVM pass +doesn't support the ``invoke`` instruction yet" lowering pass. + +``-lowerswitch``: Lower ``SwitchInst``\ s to branches +----------------------------------------------------- + +Rewrites switch instructions with a sequence of branches, which allows targets +to get away with not implementing the switch instruction until it is +convenient. + +.. _passes-mem2reg: + +``-mem2reg``: Promote Memory to Register +---------------------------------------- + +This file promotes memory references to be register references. It promotes +alloca instructions which only have loads and stores as uses. An ``alloca`` is +transformed by using dominator frontiers to place phi nodes, then traversing +the function in depth-first order to rewrite loads and stores as appropriate. +This is just the standard SSA construction algorithm to construct "pruned" SSA +form. + +``-memcpyopt``: MemCpy Optimization +----------------------------------- + +This pass performs various transformations related to eliminating ``memcpy`` +calls, or transforming sets of stores into ``memset``\ s. + +``-mergefunc``: Merge Functions +------------------------------- + +This pass looks for equivalent functions that are mergable and folds them. + +A hash is computed from the function, based on its type and number of basic +blocks. + +Once all hashes are computed, we perform an expensive equality comparison on +each function pair. This takes n^2/2 comparisons per bucket, so it's important +that the hash function be high quality. The equality comparison iterates +through each instruction in each basic block. + +When a match is found the functions are folded. If both functions are +overridable, we move the functionality into a new internal function and leave +two overridable thunks to it. + +``-mergereturn``: Unify function exit nodes +------------------------------------------- + +Ensure that functions have at most one ``ret`` instruction in them. +Additionally, it keeps track of which node is the new exit node of the CFG. + +``-partial-inliner``: Partial Inliner +------------------------------------- + +This pass performs partial inlining, typically by inlining an ``if`` statement +that surrounds the body of the function. + +``-prune-eh``: Remove unused exception handling info +---------------------------------------------------- + +This file implements a simple interprocedural pass which walks the call-graph, +turning invoke instructions into call instructions if and only if the callee +cannot throw an exception. It implements this as a bottom-up traversal of the +call-graph. + +``-reassociate``: Reassociate expressions +----------------------------------------- + +This pass reassociates commutative expressions in an order that is designed to +promote better constant propagation, GCSE, :ref:`LICM `, PRE, etc. + +For example: 4 + (x + 5) ⇒ x + (4 + 5) + +In the implementation of this algorithm, constants are assigned rank = 0, +function arguments are rank = 1, and other values are assigned ranks +corresponding to the reverse post order traversal of current function (starting +at 2), which effectively gives values in deep loops higher rank than values not +in loops. + +``-reg2mem``: Demote all values to stack slots +---------------------------------------------- + +This file demotes all registers to memory references. It is intended to be the +inverse of :ref:`mem2reg `. By converting to ``load`` +instructions, the only values live across basic blocks are ``alloca`` +instructions and ``load`` instructions before ``phi`` nodes. It is intended +that this should make CFG hacking much easier. To make later hacking easier, +the entry block is split into two, such that all introduced ``alloca`` +instructions (and nothing else) are in the entry block. + +``-scalarrepl``: Scalar Replacement of Aggregates (DT) +------------------------------------------------------ + +The well-known scalar replacement of aggregates transformation. This transform +breaks up ``alloca`` instructions of aggregate type (structure or array) into +individual ``alloca`` instructions for each member if possible. Then, if +possible, it transforms the individual ``alloca`` instructions into nice clean +scalar SSA form. + +This combines a simple scalar replacement of aggregates algorithm with the +:ref:`mem2reg ` algorithm because they often interact, +especially for C++ programs. As such, iterating between ``scalarrepl``, then +:ref:`mem2reg ` until we run out of things to promote works +well. + +.. _passes-sccp: + +``-sccp``: Sparse Conditional Constant Propagation +-------------------------------------------------- + +Sparse conditional constant propagation and merging, which can be summarized +as: + +* Assumes values are constant unless proven otherwise +* Assumes BasicBlocks are dead unless proven otherwise +* Proves values to be constant, and replaces them with constants +* Proves conditional branches to be unconditional + +Note that this pass has a habit of making definitions be dead. It is a good +idea to run a :ref:`DCE ` pass sometime after running this pass. + +``-simplify-libcalls``: Simplify well-known library calls +--------------------------------------------------------- + +Applies a variety of small optimizations for calls to specific well-known +function calls (e.g. runtime library functions). For example, a call +``exit(3)`` that occurs within the ``main()`` function can be transformed into +simply ``return 3``. + +.. _passes-simplifycfg: + +``-simplifycfg``: Simplify the CFG +---------------------------------- + +Performs dead code elimination and basic block merging. Specifically: + +* Removes basic blocks with no predecessors. +* Merges a basic block into its predecessor if there is only one and the + predecessor only has one successor. +* Eliminates PHI nodes for basic blocks with a single predecessor. +* Eliminates a basic block that only contains an unconditional branch. + +``-sink``: Code sinking +----------------------- + +This pass moves instructions into successor blocks, when possible, so that they +aren't executed on paths where their results aren't needed. + +``-strip``: Strip all symbols from a module +------------------------------------------- + +Performs code stripping. This transformation can delete: + +* names for virtual registers +* symbols for internal globals and functions +* debug information + +Note that this transformation makes code much less readable, so it should only +be used in situations where the strip utility would be used, such as reducing +code size or making it harder to reverse engineer code. + +``-strip-dead-debug-info``: Strip debug info for unused symbols +--------------------------------------------------------------- + +.. FIXME: this description is the same as for -strip + +performs code stripping. this transformation can delete: + +* names for virtual registers +* symbols for internal globals and functions +* debug information + +note that this transformation makes code much less readable, so it should only +be used in situations where the strip utility would be used, such as reducing +code size or making it harder to reverse engineer code. + +``-strip-dead-prototypes``: Strip Unused Function Prototypes +------------------------------------------------------------ + +This pass loops over all of the functions in the input module, looking for dead +declarations and removes them. Dead declarations are declarations of functions +for which no implementation is available (i.e., declarations for unused library +functions). + +``-strip-debug-declare``: Strip all ``llvm.dbg.declare`` intrinsics +------------------------------------------------------------------- + +.. FIXME: this description is the same as for -strip + +This pass implements code stripping. Specifically, it can delete: + +#. names for virtual registers +#. symbols for internal globals and functions +#. debug information + +Note that this transformation makes code much less readable, so it should only +be used in situations where the 'strip' utility would be used, such as reducing +code size or making it harder to reverse engineer code. + +``-strip-nondebug``: Strip all symbols, except dbg symbols, from a module +------------------------------------------------------------------------- + +.. FIXME: this description is the same as for -strip + +This pass implements code stripping. Specifically, it can delete: + +#. names for virtual registers +#. symbols for internal globals and functions +#. debug information + +Note that this transformation makes code much less readable, so it should only +be used in situations where the 'strip' utility would be used, such as reducing +code size or making it harder to reverse engineer code. + +``-tailcallelim``: Tail Call Elimination +---------------------------------------- + +This file transforms calls of the current function (self recursion) followed by +a return instruction with a branch to the entry of the function, creating a +loop. This pass also implements the following extensions to the basic +algorithm: + +#. Trivial instructions between the call and return do not prevent the + transformation from taking place, though currently the analysis cannot + support moving any really useful instructions (only dead ones). +#. This pass transforms functions that are prevented from being tail recursive + by an associative expression to use an accumulator variable, thus compiling + the typical naive factorial or fib implementation into efficient code. +#. TRE is performed if the function returns void, if the return returns the + result returned by the call, or if the function returns a run-time constant + on all exits from the function. It is possible, though unlikely, that the + return returns something else (like constant 0), and can still be TRE'd. It + can be TRE'd if *all other* return instructions in the function return the + exact same value. +#. If it can prove that callees do not access theier caller stack frame, they + are marked as eligible for tail call elimination (by the code generator). + +Utility Passes +============== + +This section describes the LLVM Utility Passes. + +``-deadarghaX0r``: Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE) +------------------------------------------------------------------------ + +Same as dead argument elimination, but deletes arguments to functions which are +external. This is only for use by :doc:`bugpoint `. + +``-extract-blocks``: Extract Basic Blocks From Module (for bugpoint use) +------------------------------------------------------------------------ + +This pass is used by bugpoint to extract all blocks from the module into their +own functions. + +``-instnamer``: Assign names to anonymous instructions +------------------------------------------------------ + +This is a little utility pass that gives instructions names, this is mostly +useful when diffing the effect of an optimization because deleting an unnamed +instruction can change all other instruction numbering, making the diff very +noisy. + +``-preverify``: Preliminary module verification +----------------------------------------------- + +Ensures that the module is in the form required by the :ref:`Module Verifier +` pass. Running the verifier runs this pass automatically, so +there should be no need to use it directly. + +.. _passes-verify: + +``-verify``: Module Verifier +---------------------------- + +Verifies an LLVM IR code. This is useful to run after an optimization which is +undergoing testing. Note that llvm-as verifies its input before emitting +bitcode, and also that malformed bitcode is likely to make LLVM crash. All +language front-ends are therefore encouraged to verify their output before +performing optimizing transformations. + +#. Both of a binary operator's parameters are of the same type. +#. Verify that the indices of mem access instructions match other operands. +#. Verify that arithmetic and other things are only performed on first-class + types. Verify that shifts and logicals only happen on integrals f.e. +#. All of the constants in a switch statement are of the correct type. +#. The code is in valid SSA form. +#. It is illegal to put a label into any other type (like a structure) or to + return one. +#. Only phi nodes can be self referential: ``%x = add i32 %x``, ``%x`` is + invalid. +#. PHI nodes must have an entry for each predecessor, with no extras. +#. PHI nodes must be the first thing in a basic block, all grouped together. +#. PHI nodes must have at least one entry. +#. All basic blocks should only end with terminator insts, not contain them. +#. The entry node to a function must not have predecessors. +#. All Instructions must be embedded into a basic block. +#. Functions cannot take a void-typed parameter. +#. Verify that a function's argument list agrees with its declared type. +#. It is illegal to specify a name for a void value. +#. It is illegal to have an internal global value with no initializer. +#. It is illegal to have a ``ret`` instruction that returns a value that does + not agree with the function return value type. +#. Function call argument types match the function prototype. +#. All other things that are tested by asserts spread about the code. + +Note that this does not provide full security verification (like Java), but +instead just tries to ensure that code is well-formed. + +``-view-cfg``: View CFG of function +----------------------------------- + +Displays the control flow graph using the GraphViz tool. + +``-view-cfg-only``: View CFG of function (with no function bodies) +------------------------------------------------------------------ + +Displays the control flow graph using the GraphViz tool, but omitting function +bodies. + +``-view-dom``: View dominance tree of function +---------------------------------------------- + +Displays the dominator tree using the GraphViz tool. + +``-view-dom-only``: View dominance tree of function (with no function bodies) +----------------------------------------------------------------------------- + +Displays the dominator tree using the GraphViz tool, but omitting function +bodies. + +``-view-postdom``: View postdominance tree of function +------------------------------------------------------ + +Displays the post dominator tree using the GraphViz tool. + +``-view-postdom-only``: View postdominance tree of function (with no function bodies) +------------------------------------------------------------------------------------- + +Displays the post dominator tree using the GraphViz tool, but omitting function +bodies. + diff --git a/docs/Phabricator.rst b/docs/Phabricator.rst new file mode 100644 index 00000000..6fdea1f9 --- /dev/null +++ b/docs/Phabricator.rst @@ -0,0 +1,106 @@ +============================= +Code Reviews with Phabricator +============================= + +.. contents:: + :local: + +If you prefer to use a web user interface for code reviews, +you can now submit your patches for Clang and LLVM at +`LLVM's Phabricator`_. + +Sign up +------- + +There are two options to get an account on Phabricator. You can sign up +immediately with one of the supported OAuth account types if you're comfortable +with OAuth, but you can also email chandlerc@gmail.com to request an account to +be created manually without using OAuth. We're working to get support in +Phabricator to directly create new accounts, but currently this is a manual +process. + +Note that if you use your Subversion user name as Phabricator user name, +Phabricator will automatically connect your submits to your Phabricator user in +the `Code Repository Browser`_. + + +Requesting a review via the command line +---------------------------------------- + +Phabricator has a tool called *Arcanist* to upload patches from +the command line. To get you set up, follow the +`Arcanist Quick Start`_ instructions. + +You can learn more about how to use arc to interact with +Phabricator in the `Arcanist User Guide`_. + +Requesting a review via the web interface +----------------------------------------- + +The tool to create and review patches in Phabricator is called +*Differential*. + +Note that you can upload patches created through various diff tools, +including git and svn. To make reviews easier, please always include +**as much context as possible** with your diff! Don't worry, Phabricator +will automatically send a diff with a smaller context in the review +email, but having the full file in the web interface will help the +reviewer understand your code. + +To get a full diff, use one of the following commands (or just use Arcanist +to upload your patch): + +* ``git diff -U999999 other-branch`` +* ``svn diff --diff-cmd=diff -x -U999999`` + +To upload a new patch: + +* Click *Differential*. +* Click *Create Diff*. +* Paste the text diff or upload the patch file. + Note that TODO +* Leave the drop down on *Create a new Revision...* and click *Continue*. +* Enter a descriptive title and summary; add reviewers and mailing + lists that you want to be included in the review. If your patch is + for LLVM, cc llvm-commits; if your patch is for Clang, cc cfe-commits. +* Click *Save*. + +To submit an updated patch: + +* Click *Differential*. +* Click *Create Diff*. +* Paste the updated diff. +* Select the review you want to from the *Attach To* dropdown and click + *Continue*. +* Click *Save*. + +Reviewing code with Phabricator +------------------------------- + +Phabricator allows you to add inline comments as well as overall comments +to a revision. To add an inline comment, select the lines of code you want +to comment on by clicking and dragging the line numbers in the diff pane. + +You can add overall comments or submit your comments at the bottom of the page. + +Phabricator has many useful features, for example allowing you to select +diffs between different versions of the patch as it was reviewed in the +*Revision Update History*. Most features are self descriptive - explore, and +if you have a question, drop by on #llvm in IRC to get help. + +Note that as e-mail is the system of reference for code reviews, and some +people prefer it over a web interface, we do not generate automated mail +when a review changes state, for example by clicking "Accept Revision" in +the web interface. Thus, please type LGTM into the comment box to accept +a change from Phabricator. + +Status +------ + +Currently, we're testing Phabricator for use with Clang/LLVM. Please let us +know whether you like it and what could be improved! + +.. _LLVM's Phabricator: http://llvm-reviews.chandlerc.com +.. _Code Repository Browser: http://llvm-reviews.chandlerc.com/diffusion/ +.. _Arcanist Quick Start: http://www.phabricator.com/docs/phabricator/article/Arcanist_Quick_Start.html +.. _Arcanist User Guide: http://www.phabricator.com/docs/phabricator/article/Arcanist_User_Guide.html diff --git a/docs/ProgrammersManual.rst b/docs/ProgrammersManual.rst new file mode 100644 index 00000000..99aa5c78 --- /dev/null +++ b/docs/ProgrammersManual.rst @@ -0,0 +1,3204 @@ +======================== +LLVM Programmer's Manual +======================== + +.. contents:: + :local: + +.. warning:: + This is always a work in progress. + +.. _introduction: + +Introduction +============ + +This document is meant to highlight some of the important classes and interfaces +available in the LLVM source-base. This manual is not intended to explain what +LLVM is, how it works, and what LLVM code looks like. It assumes that you know +the basics of LLVM and are interested in writing transformations or otherwise +analyzing or manipulating the code. + +This document should get you oriented so that you can find your way in the +continuously growing source code that makes up the LLVM infrastructure. Note +that this manual is not intended to serve as a replacement for reading the +source code, so if you think there should be a method in one of these classes to +do something, but it's not listed, check the source. Links to the `doxygen +`__ sources are provided to make this as easy as +possible. + +The first section of this document describes general information that is useful +to know when working in the LLVM infrastructure, and the second describes the +Core LLVM classes. In the future this manual will be extended with information +describing how to use extension libraries, such as dominator information, CFG +traversal routines, and useful utilities like the ``InstVisitor`` (`doxygen +`__) template. + +.. _general: + +General Information +=================== + +This section contains general information that is useful if you are working in +the LLVM source-base, but that isn't specific to any particular API. + +.. _stl: + +The C++ Standard Template Library +--------------------------------- + +LLVM makes heavy use of the C++ Standard Template Library (STL), perhaps much +more than you are used to, or have seen before. Because of this, you might want +to do a little background reading in the techniques used and capabilities of the +library. There are many good pages that discuss the STL, and several books on +the subject that you can get, so it will not be discussed in this document. + +Here are some useful links: + +#. `cppreference.com + `_ - an excellent + reference for the STL and other parts of the standard C++ library. + +#. `C++ In a Nutshell `_ - This is an O'Reilly + book in the making. It has a decent Standard Library Reference that rivals + Dinkumware's, and is unfortunately no longer free since the book has been + published. + +#. `C++ Frequently Asked Questions `_. + +#. `SGI's STL Programmer's Guide `_ - Contains a + useful `Introduction to the STL + `_. + +#. `Bjarne Stroustrup's C++ Page + `_. + +#. `Bruce Eckel's Thinking in C++, 2nd ed. Volume 2 Revision 4.0 + (even better, get the book) + `_. + +You are also encouraged to take a look at the :doc:`LLVM Coding Standards +` guide which focuses on how to write maintainable code more +than where to put your curly braces. + +.. _resources: + +Other useful references +----------------------- + +#. `Using static and shared libraries across platforms + `_ + +.. _apis: + +Important and useful LLVM APIs +============================== + +Here we highlight some LLVM APIs that are generally useful and good to know +about when writing transformations. + +.. _isa: + +The ``isa<>``, ``cast<>`` and ``dyn_cast<>`` templates +------------------------------------------------------ + +The LLVM source-base makes extensive use of a custom form of RTTI. These +templates have many similarities to the C++ ``dynamic_cast<>`` operator, but +they don't have some drawbacks (primarily stemming from the fact that +``dynamic_cast<>`` only works on classes that have a v-table). Because they are +used so often, you must know what they do and how they work. All of these +templates are defined in the ``llvm/Support/Casting.h`` (`doxygen +`__) file (note that you very +rarely have to include this file directly). + +``isa<>``: + The ``isa<>`` operator works exactly like the Java "``instanceof``" operator. + It returns true or false depending on whether a reference or pointer points to + an instance of the specified class. This can be very useful for constraint + checking of various sorts (example below). + +``cast<>``: + The ``cast<>`` operator is a "checked cast" operation. It converts a pointer + or reference from a base class to a derived class, causing an assertion + failure if it is not really an instance of the right type. This should be + used in cases where you have some information that makes you believe that + something is of the right type. An example of the ``isa<>`` and ``cast<>`` + template is: + + .. code-block:: c++ + + static bool isLoopInvariant(const Value *V, const Loop *L) { + if (isa(V) || isa(V) || isa(V)) + return true; + + // Otherwise, it must be an instruction... + return !L->contains(cast(V)->getParent()); + } + + Note that you should **not** use an ``isa<>`` test followed by a ``cast<>``, + for that use the ``dyn_cast<>`` operator. + +``dyn_cast<>``: + The ``dyn_cast<>`` operator is a "checking cast" operation. It checks to see + if the operand is of the specified type, and if so, returns a pointer to it + (this operator does not work with references). If the operand is not of the + correct type, a null pointer is returned. Thus, this works very much like + the ``dynamic_cast<>`` operator in C++, and should be used in the same + circumstances. Typically, the ``dyn_cast<>`` operator is used in an ``if`` + statement or some other flow control statement like this: + + .. code-block:: c++ + + if (AllocationInst *AI = dyn_cast(Val)) { + // ... + } + + This form of the ``if`` statement effectively combines together a call to + ``isa<>`` and a call to ``cast<>`` into one statement, which is very + convenient. + + Note that the ``dyn_cast<>`` operator, like C++'s ``dynamic_cast<>`` or Java's + ``instanceof`` operator, can be abused. In particular, you should not use big + chained ``if/then/else`` blocks to check for lots of different variants of + classes. If you find yourself wanting to do this, it is much cleaner and more + efficient to use the ``InstVisitor`` class to dispatch over the instruction + type directly. + +``cast_or_null<>``: + The ``cast_or_null<>`` operator works just like the ``cast<>`` operator, + except that it allows for a null pointer as an argument (which it then + propagates). This can sometimes be useful, allowing you to combine several + null checks into one. + +``dyn_cast_or_null<>``: + The ``dyn_cast_or_null<>`` operator works just like the ``dyn_cast<>`` + operator, except that it allows for a null pointer as an argument (which it + then propagates). This can sometimes be useful, allowing you to combine + several null checks into one. + +These five templates can be used with any classes, whether they have a v-table +or not. If you want to add support for these templates, see the document +:doc:`How to set up LLVM-style RTTI for your class hierarchy +` + +.. _string_apis: + +Passing strings (the ``StringRef`` and ``Twine`` classes) +--------------------------------------------------------- + +Although LLVM generally does not do much string manipulation, we do have several +important APIs which take strings. Two important examples are the Value class +-- which has names for instructions, functions, etc. -- and the ``StringMap`` +class which is used extensively in LLVM and Clang. + +These are generic classes, and they need to be able to accept strings which may +have embedded null characters. Therefore, they cannot simply take a ``const +char *``, and taking a ``const std::string&`` requires clients to perform a heap +allocation which is usually unnecessary. Instead, many LLVM APIs use a +``StringRef`` or a ``const Twine&`` for passing strings efficiently. + +.. _StringRef: + +The ``StringRef`` class +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``StringRef`` data type represents a reference to a constant string (a +character array and a length) and supports the common operations available on +``std::string``, but does not require heap allocation. + +It can be implicitly constructed using a C style null-terminated string, an +``std::string``, or explicitly with a character pointer and length. For +example, the ``StringRef`` find function is declared as: + +.. code-block:: c++ + + iterator find(StringRef Key); + +and clients can call it using any one of: + +.. code-block:: c++ + + Map.find("foo"); // Lookup "foo" + Map.find(std::string("bar")); // Lookup "bar" + Map.find(StringRef("\0baz", 4)); // Lookup "\0baz" + +Similarly, APIs which need to return a string may return a ``StringRef`` +instance, which can be used directly or converted to an ``std::string`` using +the ``str`` member function. See ``llvm/ADT/StringRef.h`` (`doxygen +`__) for more +information. + +You should rarely use the ``StringRef`` class directly, because it contains +pointers to external memory it is not generally safe to store an instance of the +class (unless you know that the external storage will not be freed). +``StringRef`` is small and pervasive enough in LLVM that it should always be +passed by value. + +The ``Twine`` class +^^^^^^^^^^^^^^^^^^^ + +The ``Twine`` (`doxygen `__) +class is an efficient way for APIs to accept concatenated strings. For example, +a common LLVM paradigm is to name one instruction based on the name of another +instruction with a suffix, for example: + +.. code-block:: c++ + + New = CmpInst::Create(..., SO->getName() + ".cmp"); + +The ``Twine`` class is effectively a lightweight `rope +`_ which points to +temporary (stack allocated) objects. Twines can be implicitly constructed as +the result of the plus operator applied to strings (i.e., a C strings, an +``std::string``, or a ``StringRef``). The twine delays the actual concatenation +of strings until it is actually required, at which point it can be efficiently +rendered directly into a character array. This avoids unnecessary heap +allocation involved in constructing the temporary results of string +concatenation. See ``llvm/ADT/Twine.h`` (`doxygen +`__) and :ref:`here ` +for more information. + +As with a ``StringRef``, ``Twine`` objects point to external memory and should +almost never be stored or mentioned directly. They are intended solely for use +when defining a function which should be able to efficiently accept concatenated +strings. + +.. _DEBUG: + +The ``DEBUG()`` macro and ``-debug`` option +------------------------------------------- + +Often when working on your pass you will put a bunch of debugging printouts and +other code into your pass. After you get it working, you want to remove it, but +you may need it again in the future (to work out new bugs that you run across). + +Naturally, because of this, you don't want to delete the debug printouts, but +you don't want them to always be noisy. A standard compromise is to comment +them out, allowing you to enable them if you need them in the future. + +The ``llvm/Support/Debug.h`` (`doxygen +`__) file provides a macro named +``DEBUG()`` that is a much nicer solution to this problem. Basically, you can +put arbitrary code into the argument of the ``DEBUG`` macro, and it is only +executed if '``opt``' (or any other tool) is run with the '``-debug``' command +line argument: + +.. code-block:: c++ + + DEBUG(errs() << "I am here!\n"); + +Then you can run your pass like this: + +.. code-block:: none + + $ opt < a.bc > /dev/null -mypass + + $ opt < a.bc > /dev/null -mypass -debug + I am here! + +Using the ``DEBUG()`` macro instead of a home-brewed solution allows you to not +have to create "yet another" command line option for the debug output for your +pass. Note that ``DEBUG()`` macros are disabled for optimized builds, so they +do not cause a performance impact at all (for the same reason, they should also +not contain side-effects!). + +One additional nice thing about the ``DEBUG()`` macro is that you can enable or +disable it directly in gdb. Just use "``set DebugFlag=0``" or "``set +DebugFlag=1``" from the gdb if the program is running. If the program hasn't +been started yet, you can always just run it with ``-debug``. + +.. _DEBUG_TYPE: + +Fine grained debug info with ``DEBUG_TYPE`` and the ``-debug-only`` option +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Sometimes you may find yourself in a situation where enabling ``-debug`` just +turns on **too much** information (such as when working on the code generator). +If you want to enable debug information with more fine-grained control, you +define the ``DEBUG_TYPE`` macro and the ``-debug`` only option as follows: + +.. code-block:: c++ + + #undef DEBUG_TYPE + DEBUG(errs() << "No debug type\n"); + #define DEBUG_TYPE "foo" + DEBUG(errs() << "'foo' debug type\n"); + #undef DEBUG_TYPE + #define DEBUG_TYPE "bar" + DEBUG(errs() << "'bar' debug type\n")); + #undef DEBUG_TYPE + #define DEBUG_TYPE "" + DEBUG(errs() << "No debug type (2)\n"); + +Then you can run your pass like this: + +.. code-block:: none + + $ opt < a.bc > /dev/null -mypass + + $ opt < a.bc > /dev/null -mypass -debug + No debug type + 'foo' debug type + 'bar' debug type + No debug type (2) + $ opt < a.bc > /dev/null -mypass -debug-only=foo + 'foo' debug type + $ opt < a.bc > /dev/null -mypass -debug-only=bar + 'bar' debug type + +Of course, in practice, you should only set ``DEBUG_TYPE`` at the top of a file, +to specify the debug type for the entire module (if you do this before you +``#include "llvm/Support/Debug.h"``, you don't have to insert the ugly +``#undef``'s). Also, you should use names more meaningful than "foo" and "bar", +because there is no system in place to ensure that names do not conflict. If +two different modules use the same string, they will all be turned on when the +name is specified. This allows, for example, all debug information for +instruction scheduling to be enabled with ``-debug-type=InstrSched``, even if +the source lives in multiple files. + +The ``DEBUG_WITH_TYPE`` macro is also available for situations where you would +like to set ``DEBUG_TYPE``, but only for one specific ``DEBUG`` statement. It +takes an additional first parameter, which is the type to use. For example, the +preceding example could be written as: + +.. code-block:: c++ + + DEBUG_WITH_TYPE("", errs() << "No debug type\n"); + DEBUG_WITH_TYPE("foo", errs() << "'foo' debug type\n"); + DEBUG_WITH_TYPE("bar", errs() << "'bar' debug type\n")); + DEBUG_WITH_TYPE("", errs() << "No debug type (2)\n"); + +.. _Statistic: + +The ``Statistic`` class & ``-stats`` option +------------------------------------------- + +The ``llvm/ADT/Statistic.h`` (`doxygen +`__) file provides a class +named ``Statistic`` that is used as a unified way to keep track of what the LLVM +compiler is doing and how effective various optimizations are. It is useful to +see what optimizations are contributing to making a particular program run +faster. + +Often you may run your pass on some big program, and you're interested to see +how many times it makes a certain transformation. Although you can do this with +hand inspection, or some ad-hoc method, this is a real pain and not very useful +for big programs. Using the ``Statistic`` class makes it very easy to keep +track of this information, and the calculated information is presented in a +uniform manner with the rest of the passes being executed. + +There are many examples of ``Statistic`` uses, but the basics of using it are as +follows: + +#. Define your statistic like this: + + .. code-block:: c++ + + #define DEBUG_TYPE "mypassname" // This goes before any #includes. + STATISTIC(NumXForms, "The # of times I did stuff"); + + The ``STATISTIC`` macro defines a static variable, whose name is specified by + the first argument. The pass name is taken from the ``DEBUG_TYPE`` macro, and + the description is taken from the second argument. The variable defined + ("NumXForms" in this case) acts like an unsigned integer. + +#. Whenever you make a transformation, bump the counter: + + .. code-block:: c++ + + ++NumXForms; // I did stuff! + +That's all you have to do. To get '``opt``' to print out the statistics +gathered, use the '``-stats``' option: + +.. code-block:: none + + $ opt -stats -mypassname < program.bc > /dev/null + ... statistics output ... + +When running ``opt`` on a C file from the SPEC benchmark suite, it gives a +report that looks like this: + +.. code-block:: none + + 7646 bitcodewriter - Number of normal instructions + 725 bitcodewriter - Number of oversized instructions + 129996 bitcodewriter - Number of bitcode bytes written + 2817 raise - Number of insts DCEd or constprop'd + 3213 raise - Number of cast-of-self removed + 5046 raise - Number of expression trees converted + 75 raise - Number of other getelementptr's formed + 138 raise - Number of load/store peepholes + 42 deadtypeelim - Number of unused typenames removed from symtab + 392 funcresolve - Number of varargs functions resolved + 27 globaldce - Number of global variables removed + 2 adce - Number of basic blocks removed + 134 cee - Number of branches revectored + 49 cee - Number of setcc instruction eliminated + 532 gcse - Number of loads removed + 2919 gcse - Number of instructions removed + 86 indvars - Number of canonical indvars added + 87 indvars - Number of aux indvars removed + 25 instcombine - Number of dead inst eliminate + 434 instcombine - Number of insts combined + 248 licm - Number of load insts hoisted + 1298 licm - Number of insts hoisted to a loop pre-header + 3 licm - Number of insts hoisted to multiple loop preds (bad, no loop pre-header) + 75 mem2reg - Number of alloca's promoted + 1444 cfgsimplify - Number of blocks simplified + +Obviously, with so many optimizations, having a unified framework for this stuff +is very nice. Making your pass fit well into the framework makes it more +maintainable and useful. + +.. _ViewGraph: + +Viewing graphs while debugging code +----------------------------------- + +Several of the important data structures in LLVM are graphs: for example CFGs +made out of LLVM :ref:`BasicBlocks `, CFGs made out of LLVM +:ref:`MachineBasicBlocks `, and :ref:`Instruction Selection +DAGs `. In many cases, while debugging various parts of the +compiler, it is nice to instantly visualize these graphs. + +LLVM provides several callbacks that are available in a debug build to do +exactly that. If you call the ``Function::viewCFG()`` method, for example, the +current LLVM tool will pop up a window containing the CFG for the function where +each basic block is a node in the graph, and each node contains the instructions +in the block. Similarly, there also exists ``Function::viewCFGOnly()`` (does +not include the instructions), the ``MachineFunction::viewCFG()`` and +``MachineFunction::viewCFGOnly()``, and the ``SelectionDAG::viewGraph()`` +methods. Within GDB, for example, you can usually use something like ``call +DAG.viewGraph()`` to pop up a window. Alternatively, you can sprinkle calls to +these functions in your code in places you want to debug. + +Getting this to work requires a small amount of configuration. On Unix systems +with X11, install the `graphviz `_ toolkit, and make +sure 'dot' and 'gv' are in your path. If you are running on Mac OS/X, download +and install the Mac OS/X `Graphviz program +`_ and add +``/Applications/Graphviz.app/Contents/MacOS/`` (or wherever you install it) to +your path. Once in your system and path are set up, rerun the LLVM configure +script and rebuild LLVM to enable this functionality. + +``SelectionDAG`` has been extended to make it easier to locate *interesting* +nodes in large complex graphs. From gdb, if you ``call DAG.setGraphColor(node, +"color")``, then the next ``call DAG.viewGraph()`` would highlight the node in +the specified color (choices of colors can be found at `colors +`_.) More complex node attributes +can be provided with ``call DAG.setGraphAttrs(node, "attributes")`` (choices can +be found at `Graph attributes `_.) +If you want to restart and clear all the current graph attributes, then you can +``call DAG.clearGraphAttrs()``. + +Note that graph visualization features are compiled out of Release builds to +reduce file size. This means that you need a Debug+Asserts or Release+Asserts +build to use these features. + +.. _datastructure: + +Picking the Right Data Structure for a Task +=========================================== + +LLVM has a plethora of data structures in the ``llvm/ADT/`` directory, and we +commonly use STL data structures. This section describes the trade-offs you +should consider when you pick one. + +The first step is a choose your own adventure: do you want a sequential +container, a set-like container, or a map-like container? The most important +thing when choosing a container is the algorithmic properties of how you plan to +access the container. Based on that, you should use: + + +* a :ref:`map-like ` container if you need efficient look-up of a + value based on another value. Map-like containers also support efficient + queries for containment (whether a key is in the map). Map-like containers + generally do not support efficient reverse mapping (values to keys). If you + need that, use two maps. Some map-like containers also support efficient + iteration through the keys in sorted order. Map-like containers are the most + expensive sort, only use them if you need one of these capabilities. + +* a :ref:`set-like ` container if you need to put a bunch of stuff into + a container that automatically eliminates duplicates. Some set-like + containers support efficient iteration through the elements in sorted order. + Set-like containers are more expensive than sequential containers. + +* a :ref:`sequential ` container provides the most efficient way + to add elements and keeps track of the order they are added to the collection. + They permit duplicates and support efficient iteration, but do not support + efficient look-up based on a key. + +* a :ref:`string ` container is a specialized sequential container or + reference structure that is used for character or byte arrays. + +* a :ref:`bit ` container provides an efficient way to store and + perform set operations on sets of numeric id's, while automatically + eliminating duplicates. Bit containers require a maximum of 1 bit for each + identifier you want to store. + +Once the proper category of container is determined, you can fine tune the +memory use, constant factors, and cache behaviors of access by intelligently +picking a member of the category. Note that constant factors and cache behavior +can be a big deal. If you have a vector that usually only contains a few +elements (but could contain many), for example, it's much better to use +:ref:`SmallVector ` than :ref:`vector `. Doing so +avoids (relatively) expensive malloc/free calls, which dwarf the cost of adding +the elements to the container. + +.. _ds_sequential: + +Sequential Containers (std::vector, std::list, etc) +--------------------------------------------------- + +There are a variety of sequential containers available for you, based on your +needs. Pick the first in this section that will do what you want. + +.. _dss_arrayref: + +llvm/ADT/ArrayRef.h +^^^^^^^^^^^^^^^^^^^ + +The ``llvm::ArrayRef`` class is the preferred class to use in an interface that +accepts a sequential list of elements in memory and just reads from them. By +taking an ``ArrayRef``, the API can be passed a fixed size array, an +``std::vector``, an ``llvm::SmallVector`` and anything else that is contiguous +in memory. + +.. _dss_fixedarrays: + +Fixed Size Arrays +^^^^^^^^^^^^^^^^^ + +Fixed size arrays are very simple and very fast. They are good if you know +exactly how many elements you have, or you have a (low) upper bound on how many +you have. + +.. _dss_heaparrays: + +Heap Allocated Arrays +^^^^^^^^^^^^^^^^^^^^^ + +Heap allocated arrays (``new[]`` + ``delete[]``) are also simple. They are good +if the number of elements is variable, if you know how many elements you will +need before the array is allocated, and if the array is usually large (if not, +consider a :ref:`SmallVector `). The cost of a heap allocated +array is the cost of the new/delete (aka malloc/free). Also note that if you +are allocating an array of a type with a constructor, the constructor and +destructors will be run for every element in the array (re-sizable vectors only +construct those elements actually used). + +.. _dss_tinyptrvector: + +llvm/ADT/TinyPtrVector.h +^^^^^^^^^^^^^^^^^^^^^^^^ + +``TinyPtrVector`` is a highly specialized collection class that is +optimized to avoid allocation in the case when a vector has zero or one +elements. It has two major restrictions: 1) it can only hold values of pointer +type, and 2) it cannot hold a null pointer. + +Since this container is highly specialized, it is rarely used. + +.. _dss_smallvector: + +llvm/ADT/SmallVector.h +^^^^^^^^^^^^^^^^^^^^^^ + +``SmallVector`` is a simple class that looks and smells just like +``vector``: it supports efficient iteration, lays out elements in memory +order (so you can do pointer arithmetic between elements), supports efficient +push_back/pop_back operations, supports efficient random access to its elements, +etc. + +The advantage of SmallVector is that it allocates space for some number of +elements (N) **in the object itself**. Because of this, if the SmallVector is +dynamically smaller than N, no malloc is performed. This can be a big win in +cases where the malloc/free call is far more expensive than the code that +fiddles around with the elements. + +This is good for vectors that are "usually small" (e.g. the number of +predecessors/successors of a block is usually less than 8). On the other hand, +this makes the size of the SmallVector itself large, so you don't want to +allocate lots of them (doing so will waste a lot of space). As such, +SmallVectors are most useful when on the stack. + +SmallVector also provides a nice portable and efficient replacement for +``alloca``. + +.. note:: + + Prefer to use ``SmallVectorImpl`` as a parameter type. + + In APIs that don't care about the "small size" (most?), prefer to use + the ``SmallVectorImpl`` class, which is basically just the "vector + header" (and methods) without the elements allocated after it. Note that + ``SmallVector`` inherits from ``SmallVectorImpl`` so the + conversion is implicit and costs nothing. E.g. + + .. code-block:: c++ + + // BAD: Clients cannot pass e.g. SmallVector. + hardcodedSmallSize(SmallVector &Out); + // GOOD: Clients can pass any SmallVector. + allowsAnySmallSize(SmallVectorImpl &Out); + + void someFunc() { + SmallVector Vec; + hardcodedSmallSize(Vec); // Error. + allowsAnySmallSize(Vec); // Works. + } + + Even though it has "``Impl``" in the name, this is so widely used that + it really isn't "private to the implementation" anymore. A name like + ``SmallVectorHeader`` would be more appropriate. + +.. _dss_vector: + + +^^^^^^^^ + +``std::vector`` is well loved and respected. It is useful when SmallVector +isn't: when the size of the vector is often large (thus the small optimization +will rarely be a benefit) or if you will be allocating many instances of the +vector itself (which would waste space for elements that aren't in the +container). vector is also useful when interfacing with code that expects +vectors :). + +One worthwhile note about std::vector: avoid code like this: + +.. code-block:: c++ + + for ( ... ) { + std::vector V; + // make use of V. + } + +Instead, write this as: + +.. code-block:: c++ + + std::vector V; + for ( ... ) { + // make use of V. + V.clear(); + } + +Doing so will save (at least) one heap allocation and free per iteration of the +loop. + +.. _dss_deque: + + +^^^^^^^ + +``std::deque`` is, in some senses, a generalized version of ``std::vector``. +Like ``std::vector``, it provides constant time random access and other similar +properties, but it also provides efficient access to the front of the list. It +does not guarantee continuity of elements within memory. + +In exchange for this extra flexibility, ``std::deque`` has significantly higher +constant factor costs than ``std::vector``. If possible, use ``std::vector`` or +something cheaper. + +.. _dss_list: + + +^^^^^^ + +``std::list`` is an extremely inefficient class that is rarely useful. It +performs a heap allocation for every element inserted into it, thus having an +extremely high constant factor, particularly for small data types. +``std::list`` also only supports bidirectional iteration, not random access +iteration. + +In exchange for this high cost, std::list supports efficient access to both ends +of the list (like ``std::deque``, but unlike ``std::vector`` or +``SmallVector``). In addition, the iterator invalidation characteristics of +std::list are stronger than that of a vector class: inserting or removing an +element into the list does not invalidate iterator or pointers to other elements +in the list. + +.. _dss_ilist: + +llvm/ADT/ilist.h +^^^^^^^^^^^^^^^^ + +``ilist`` implements an 'intrusive' doubly-linked list. It is intrusive, +because it requires the element to store and provide access to the prev/next +pointers for the list. + +``ilist`` has the same drawbacks as ``std::list``, and additionally requires an +``ilist_traits`` implementation for the element type, but it provides some novel +characteristics. In particular, it can efficiently store polymorphic objects, +the traits class is informed when an element is inserted or removed from the +list, and ``ilist``\ s are guaranteed to support a constant-time splice +operation. + +These properties are exactly what we want for things like ``Instruction``\ s and +basic blocks, which is why these are implemented with ``ilist``\ s. + +Related classes of interest are explained in the following subsections: + +* :ref:`ilist_traits ` + +* :ref:`iplist ` + +* :ref:`llvm/ADT/ilist_node.h ` + +* :ref:`Sentinels ` + +.. _dss_packedvector: + +llvm/ADT/PackedVector.h +^^^^^^^^^^^^^^^^^^^^^^^ + +Useful for storing a vector of values using only a few number of bits for each +value. Apart from the standard operations of a vector-like container, it can +also perform an 'or' set operation. + +For example: + +.. code-block:: c++ + + enum State { + None = 0x0, + FirstCondition = 0x1, + SecondCondition = 0x2, + Both = 0x3 + }; + + State get() { + PackedVector Vec1; + Vec1.push_back(FirstCondition); + + PackedVector Vec2; + Vec2.push_back(SecondCondition); + + Vec1 |= Vec2; + return Vec1[0]; // returns 'Both'. + } + +.. _dss_ilist_traits: + +ilist_traits +^^^^^^^^^^^^ + +``ilist_traits`` is ``ilist``'s customization mechanism. ``iplist`` +(and consequently ``ilist``) publicly derive from this traits class. + +.. _dss_iplist: + +iplist +^^^^^^ + +``iplist`` is ``ilist``'s base and as such supports a slightly narrower +interface. Notably, inserters from ``T&`` are absent. + +``ilist_traits`` is a public base of this class and can be used for a wide +variety of customizations. + +.. _dss_ilist_node: + +llvm/ADT/ilist_node.h +^^^^^^^^^^^^^^^^^^^^^ + +``ilist_node`` implements a the forward and backward links that are expected +by the ``ilist`` (and analogous containers) in the default manner. + +``ilist_node``\ s are meant to be embedded in the node type ``T``, usually +``T`` publicly derives from ``ilist_node``. + +.. _dss_ilist_sentinel: + +Sentinels +^^^^^^^^^ + +``ilist``\ s have another specialty that must be considered. To be a good +citizen in the C++ ecosystem, it needs to support the standard container +operations, such as ``begin`` and ``end`` iterators, etc. Also, the +``operator--`` must work correctly on the ``end`` iterator in the case of +non-empty ``ilist``\ s. + +The only sensible solution to this problem is to allocate a so-called *sentinel* +along with the intrusive list, which serves as the ``end`` iterator, providing +the back-link to the last element. However conforming to the C++ convention it +is illegal to ``operator++`` beyond the sentinel and it also must not be +dereferenced. + +These constraints allow for some implementation freedom to the ``ilist`` how to +allocate and store the sentinel. The corresponding policy is dictated by +``ilist_traits``. By default a ``T`` gets heap-allocated whenever the need +for a sentinel arises. + +While the default policy is sufficient in most cases, it may break down when +``T`` does not provide a default constructor. Also, in the case of many +instances of ``ilist``\ s, the memory overhead of the associated sentinels is +wasted. To alleviate the situation with numerous and voluminous +``T``-sentinels, sometimes a trick is employed, leading to *ghostly sentinels*. + +Ghostly sentinels are obtained by specially-crafted ``ilist_traits`` which +superpose the sentinel with the ``ilist`` instance in memory. Pointer +arithmetic is used to obtain the sentinel, which is relative to the ``ilist``'s +``this`` pointer. The ``ilist`` is augmented by an extra pointer, which serves +as the back-link of the sentinel. This is the only field in the ghostly +sentinel which can be legally accessed. + +.. _dss_other: + +Other Sequential Container options +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Other STL containers are available, such as ``std::string``. + +There are also various STL adapter classes such as ``std::queue``, +``std::priority_queue``, ``std::stack``, etc. These provide simplified access +to an underlying container but don't affect the cost of the container itself. + +.. _ds_string: + +String-like containers +---------------------- + +There are a variety of ways to pass around and use strings in C and C++, and +LLVM adds a few new options to choose from. Pick the first option on this list +that will do what you need, they are ordered according to their relative cost. + +Note that is is generally preferred to *not* pass strings around as ``const +char*``'s. These have a number of problems, including the fact that they +cannot represent embedded nul ("\0") characters, and do not have a length +available efficiently. The general replacement for '``const char*``' is +StringRef. + +For more information on choosing string containers for APIs, please see +:ref:`Passing Strings `. + +.. _dss_stringref: + +llvm/ADT/StringRef.h +^^^^^^^^^^^^^^^^^^^^ + +The StringRef class is a simple value class that contains a pointer to a +character and a length, and is quite related to the :ref:`ArrayRef +` class (but specialized for arrays of characters). Because +StringRef carries a length with it, it safely handles strings with embedded nul +characters in it, getting the length does not require a strlen call, and it even +has very convenient APIs for slicing and dicing the character range that it +represents. + +StringRef is ideal for passing simple strings around that are known to be live, +either because they are C string literals, std::string, a C array, or a +SmallVector. Each of these cases has an efficient implicit conversion to +StringRef, which doesn't result in a dynamic strlen being executed. + +StringRef has a few major limitations which make more powerful string containers +useful: + +#. You cannot directly convert a StringRef to a 'const char*' because there is + no way to add a trailing nul (unlike the .c_str() method on various stronger + classes). + +#. StringRef doesn't own or keep alive the underlying string bytes. + As such it can easily lead to dangling pointers, and is not suitable for + embedding in datastructures in most cases (instead, use an std::string or + something like that). + +#. For the same reason, StringRef cannot be used as the return value of a + method if the method "computes" the result string. Instead, use std::string. + +#. StringRef's do not allow you to mutate the pointed-to string bytes and it + doesn't allow you to insert or remove bytes from the range. For editing + operations like this, it interoperates with the :ref:`Twine ` + class. + +Because of its strengths and limitations, it is very common for a function to +take a StringRef and for a method on an object to return a StringRef that points +into some string that it owns. + +.. _dss_twine: + +llvm/ADT/Twine.h +^^^^^^^^^^^^^^^^ + +The Twine class is used as an intermediary datatype for APIs that want to take a +string that can be constructed inline with a series of concatenations. Twine +works by forming recursive instances of the Twine datatype (a simple value +object) on the stack as temporary objects, linking them together into a tree +which is then linearized when the Twine is consumed. Twine is only safe to use +as the argument to a function, and should always be a const reference, e.g.: + +.. code-block:: c++ + + void foo(const Twine &T); + ... + StringRef X = ... + unsigned i = ... + foo(X + "." + Twine(i)); + +This example forms a string like "blarg.42" by concatenating the values +together, and does not form intermediate strings containing "blarg" or "blarg.". + +Because Twine is constructed with temporary objects on the stack, and because +these instances are destroyed at the end of the current statement, it is an +inherently dangerous API. For example, this simple variant contains undefined +behavior and will probably crash: + +.. code-block:: c++ + + void foo(const Twine &T); + ... + StringRef X = ... + unsigned i = ... + const Twine &Tmp = X + "." + Twine(i); + foo(Tmp); + +... because the temporaries are destroyed before the call. That said, Twine's +are much more efficient than intermediate std::string temporaries, and they work +really well with StringRef. Just be aware of their limitations. + +.. _dss_smallstring: + +llvm/ADT/SmallString.h +^^^^^^^^^^^^^^^^^^^^^^ + +SmallString is a subclass of :ref:`SmallVector ` that adds some +convenience APIs like += that takes StringRef's. SmallString avoids allocating +memory in the case when the preallocated space is enough to hold its data, and +it calls back to general heap allocation when required. Since it owns its data, +it is very safe to use and supports full mutation of the string. + +Like SmallVector's, the big downside to SmallString is their sizeof. While they +are optimized for small strings, they themselves are not particularly small. +This means that they work great for temporary scratch buffers on the stack, but +should not generally be put into the heap: it is very rare to see a SmallString +as the member of a frequently-allocated heap data structure or returned +by-value. + +.. _dss_stdstring: + +std::string +^^^^^^^^^^^ + +The standard C++ std::string class is a very general class that (like +SmallString) owns its underlying data. sizeof(std::string) is very reasonable +so it can be embedded into heap data structures and returned by-value. On the +other hand, std::string is highly inefficient for inline editing (e.g. +concatenating a bunch of stuff together) and because it is provided by the +standard library, its performance characteristics depend a lot of the host +standard library (e.g. libc++ and MSVC provide a highly optimized string class, +GCC contains a really slow implementation). + +The major disadvantage of std::string is that almost every operation that makes +them larger can allocate memory, which is slow. As such, it is better to use +SmallVector or Twine as a scratch buffer, but then use std::string to persist +the result. + +.. _ds_set: + +Set-Like Containers (std::set, SmallSet, SetVector, etc) +-------------------------------------------------------- + +Set-like containers are useful when you need to canonicalize multiple values +into a single representation. There are several different choices for how to do +this, providing various trade-offs. + +.. _dss_sortedvectorset: + +A sorted 'vector' +^^^^^^^^^^^^^^^^^ + +If you intend to insert a lot of elements, then do a lot of queries, a great +approach is to use a vector (or other sequential container) with +std::sort+std::unique to remove duplicates. This approach works really well if +your usage pattern has these two distinct phases (insert then query), and can be +coupled with a good choice of :ref:`sequential container `. + +This combination provides the several nice properties: the result data is +contiguous in memory (good for cache locality), has few allocations, is easy to +address (iterators in the final vector are just indices or pointers), and can be +efficiently queried with a standard binary search (e.g. +``std::lower_bound``; if you want the whole range of elements comparing +equal, use ``std::equal_range``). + +.. _dss_smallset: + +llvm/ADT/SmallSet.h +^^^^^^^^^^^^^^^^^^^ + +If you have a set-like data structure that is usually small and whose elements +are reasonably small, a ``SmallSet`` is a good choice. This set has +space for N elements in place (thus, if the set is dynamically smaller than N, +no malloc traffic is required) and accesses them with a simple linear search. +When the set grows beyond 'N' elements, it allocates a more expensive +representation that guarantees efficient access (for most types, it falls back +to std::set, but for pointers it uses something far better, :ref:`SmallPtrSet +`. + +The magic of this class is that it handles small sets extremely efficiently, but +gracefully handles extremely large sets without loss of efficiency. The +drawback is that the interface is quite small: it supports insertion, queries +and erasing, but does not support iteration. + +.. _dss_smallptrset: + +llvm/ADT/SmallPtrSet.h +^^^^^^^^^^^^^^^^^^^^^^ + +SmallPtrSet has all the advantages of ``SmallSet`` (and a ``SmallSet`` of +pointers is transparently implemented with a ``SmallPtrSet``), but also supports +iterators. If more than 'N' insertions are performed, a single quadratically +probed hash table is allocated and grows as needed, providing extremely +efficient access (constant time insertion/deleting/queries with low constant +factors) and is very stingy with malloc traffic. + +Note that, unlike ``std::set``, the iterators of ``SmallPtrSet`` are invalidated +whenever an insertion occurs. Also, the values visited by the iterators are not +visited in sorted order. + +.. _dss_denseset: + +llvm/ADT/DenseSet.h +^^^^^^^^^^^^^^^^^^^ + +DenseSet is a simple quadratically probed hash table. It excels at supporting +small values: it uses a single allocation to hold all of the pairs that are +currently inserted in the set. DenseSet is a great way to unique small values +that are not simple pointers (use :ref:`SmallPtrSet ` for +pointers). Note that DenseSet has the same requirements for the value type that +:ref:`DenseMap ` has. + +.. _dss_sparseset: + +llvm/ADT/SparseSet.h +^^^^^^^^^^^^^^^^^^^^ + +SparseSet holds a small number of objects identified by unsigned keys of +moderate size. It uses a lot of memory, but provides operations that are almost +as fast as a vector. Typical keys are physical registers, virtual registers, or +numbered basic blocks. + +SparseSet is useful for algorithms that need very fast clear/find/insert/erase +and fast iteration over small sets. It is not intended for building composite +data structures. + +.. _dss_sparsemultiset: + +llvm/ADT/SparseMultiSet.h +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +SparseMultiSet adds multiset behavior to SparseSet, while retaining SparseSet's +desirable attributes. Like SparseSet, it typically uses a lot of memory, but +provides operations that are almost as fast as a vector. Typical keys are +physical registers, virtual registers, or numbered basic blocks. + +SparseMultiSet is useful for algorithms that need very fast +clear/find/insert/erase of the entire collection, and iteration over sets of +elements sharing a key. It is ofte