From d39c594d39df7f283c2fb8a704a3f31c501180d9 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 17 Sep 2010 15:48:55 +0000 Subject: Vendor import of llvm r114020 (from the release_28 branch): http://llvm.org/svn/llvm-project/llvm/branches/release_28@114020 Approved by: rpaulo (mentor) --- CMakeLists.txt | 44 +- CREDITS.TXT | 32 +- Makefile | 14 +- Makefile.config.in | 18 +- Makefile.rules | 264 +- README.txt | 3 +- autoconf/configure.ac | 86 +- autoconf/m4/link_options.m4 | 21 + bindings/ada/llvm/llvm.ads | 36 +- bindings/ocaml/llvm/llvm.ml | 12 +- bindings/ocaml/llvm/llvm.mli | 28 +- bindings/ocaml/llvm/llvm_ocaml.c | 30 +- cmake/config-ix.cmake | 10 + cmake/modules/CMakeLists.txt | 12 + cmake/modules/ChooseMSVCCRT.cmake | 106 + cmake/modules/LLVM.cmake | 29 + cmake/modules/LLVMConfig.cmake | 48 +- cmake/modules/LLVMLibDeps.cmake | 33 +- cmake/modules/VersionFromVCS.cmake | 33 + configure | 155 +- docs/AliasAnalysis.html | 10 +- docs/BitCodeFormat.html | 17 +- docs/CMake.html | 45 +- docs/CodeGenerator.html | 6 +- docs/CommandGuide/bugpoint.pod | 4 + docs/CommandGuide/index.html | 5 +- docs/CommandGuide/llvm-diff.pod | 53 + docs/DeveloperPolicy.html | 54 +- docs/GCCFEBuildInstrs.html | 16 +- docs/GetElementPtr.html | 13 +- docs/GoldPlugin.html | 8 +- docs/LangRef.html | 129 +- docs/MakefileGuide.html | 5 +- docs/Passes.html | 49 +- docs/ProgrammersManual.html | 6 +- docs/ReleaseNotes.html | 598 +--- docs/TestingGuide.html | 223 +- docs/WritingAnLLVMBackend.html | 5 +- docs/WritingAnLLVMPass.html | 59 +- docs/tutorial/LangImpl3.html | 10 +- docs/tutorial/LangImpl5.html | 6 +- docs/tutorial/LangImpl6.html | 4 +- docs/tutorial/LangImpl7.html | 6 +- examples/BrainF/BrainF.cpp | 11 +- examples/Fibonacci/fibonacci.cpp | 14 +- examples/Makefile | 9 +- include/llvm-c/Core.h | 20 +- include/llvm-c/EnhancedDisassembly.h | 17 +- include/llvm-c/ExecutionEngine.h | 2 + include/llvm-c/Target.h | 47 +- include/llvm-c/lto.h | 24 +- include/llvm/ADT/APInt.h | 4 +- include/llvm/ADT/DenseMap.h | 3 +- include/llvm/ADT/DenseSet.h | 6 + include/llvm/ADT/DepthFirstIterator.h | 10 + include/llvm/ADT/FoldingSet.h | 177 +- include/llvm/ADT/ImmutableIntervalMap.h | 10 +- include/llvm/ADT/NullablePtr.h | 52 + include/llvm/ADT/STLExtras.h | 4 +- include/llvm/ADT/ScopedHashTable.h | 7 +- include/llvm/ADT/SmallVector.h | 32 +- include/llvm/ADT/StringMap.h | 4 + include/llvm/ADT/StringRef.h | 13 +- include/llvm/ADT/StringSet.h | 7 +- include/llvm/ADT/StringSwitch.h | 20 + include/llvm/ADT/Triple.h | 32 +- include/llvm/ADT/ValueMap.h | 18 +- include/llvm/ADT/ilist.h | 1 - include/llvm/Analysis/AliasAnalysis.h | 109 +- include/llvm/Analysis/AliasSetTracker.h | 10 +- include/llvm/Analysis/DOTGraphTraitsPass.h | 4 +- include/llvm/Analysis/DebugInfo.h | 61 +- include/llvm/Analysis/Dominators.h | 9 +- include/llvm/Analysis/FindUsedTypes.h | 2 +- include/llvm/Analysis/IntervalPartition.h | 2 +- include/llvm/Analysis/LazyValueInfo.h | 12 +- include/llvm/Analysis/LibCallAliasAnalysis.h | 25 +- include/llvm/Analysis/LibCallSemantics.h | 5 +- include/llvm/Analysis/LoopDependenceAnalysis.h | 2 +- include/llvm/Analysis/LoopInfo.h | 26 +- include/llvm/Analysis/LoopPass.h | 12 +- include/llvm/Analysis/Passes.h | 18 +- include/llvm/Analysis/PointerTracking.h | 1 + include/llvm/Analysis/PostDominators.h | 4 +- include/llvm/Analysis/RegionInfo.h | 630 ++++ include/llvm/Analysis/RegionIterator.h | 342 ++ include/llvm/Analysis/RegionPrinter.h | 26 + include/llvm/Analysis/ScalarEvolution.h | 47 +- include/llvm/Analysis/ScalarEvolutionExpander.h | 14 +- include/llvm/Analysis/ScalarEvolutionExpressions.h | 48 +- include/llvm/Analysis/ValueTracking.h | 19 - include/llvm/Assembly/AsmAnnotationWriter.h | 58 - include/llvm/Assembly/AssemblyAnnotationWriter.h | 63 + include/llvm/AutoUpgrade.h | 5 + include/llvm/Bitcode/Archive.h | 6 +- include/llvm/Bitcode/BitstreamWriter.h | 8 +- include/llvm/Bitcode/LLVMBitCodes.h | 31 +- include/llvm/CallGraphSCCPass.h | 5 +- include/llvm/CodeGen/AsmPrinter.h | 13 +- include/llvm/CodeGen/CalcSpillWeights.h | 29 +- include/llvm/CodeGen/CallingConvLower.h | 6 + include/llvm/CodeGen/FunctionLoweringInfo.h | 10 + include/llvm/CodeGen/ISDOpcodes.h | 9 +- include/llvm/CodeGen/LiveInterval.h | 37 +- include/llvm/CodeGen/LiveIntervalAnalysis.h | 48 +- include/llvm/CodeGen/LiveStackAnalysis.h | 2 +- include/llvm/CodeGen/LiveVariables.h | 2 +- include/llvm/CodeGen/MachineFrameInfo.h | 167 +- include/llvm/CodeGen/MachineFunction.h | 2 +- include/llvm/CodeGen/MachineFunctionPass.h | 3 +- include/llvm/CodeGen/MachineInstr.h | 6 +- include/llvm/CodeGen/MachineLoopInfo.h | 2 +- include/llvm/CodeGen/MachineModuleInfo.h | 2 +- include/llvm/CodeGen/Passes.h | 62 +- include/llvm/CodeGen/ProcessImplicitDefs.h | 2 +- include/llvm/CodeGen/SchedulerRegistry.h | 13 +- include/llvm/CodeGen/SelectionDAG.h | 4 - include/llvm/CodeGen/SlotIndexes.h | 45 +- .../llvm/CodeGen/TargetLoweringObjectFileImpl.h | 1 - include/llvm/CodeGen/ValueTypes.h | 110 +- include/llvm/CompilerDriver/Action.h | 16 +- include/llvm/CompilerDriver/AutoGenerated.h | 40 + include/llvm/CompilerDriver/BuiltinOptions.h | 4 + include/llvm/CompilerDriver/Common.td | 41 +- include/llvm/CompilerDriver/CompilationGraph.h | 95 +- include/llvm/CompilerDriver/Error.h | 20 +- include/llvm/CompilerDriver/ForceLinkage.h | 122 - include/llvm/CompilerDriver/ForceLinkageMacros.h | 29 - include/llvm/CompilerDriver/Main.h | 21 + include/llvm/CompilerDriver/Main.inc | 14 +- include/llvm/CompilerDriver/Plugin.h | 81 - include/llvm/CompilerDriver/Tool.h | 40 +- include/llvm/Config/config.h.cmake | 20 +- include/llvm/Config/config.h.in | 17 + include/llvm/Config/llvm-config.h.cmake | 97 + include/llvm/Config/llvm-config.h.in | 97 + include/llvm/Constants.h | 44 - include/llvm/DerivedTypes.h | 66 +- include/llvm/ExecutionEngine/JITMemoryManager.h | 9 +- include/llvm/GlobalValue.h | 46 +- include/llvm/Instruction.h | 12 +- include/llvm/Instructions.h | 96 +- include/llvm/IntrinsicInst.h | 16 +- include/llvm/Intrinsics.td | 69 +- include/llvm/IntrinsicsARM.td | 119 +- include/llvm/IntrinsicsPowerPC.td | 47 +- include/llvm/IntrinsicsX86.td | 482 ++- include/llvm/LLVMContext.h | 5 +- include/llvm/LinkAllPasses.h | 12 +- include/llvm/LinkAllVMCore.h | 1 - include/llvm/Linker.h | 1 - include/llvm/MC/ELFObjectWriter.h | 46 + include/llvm/MC/MCAsmInfo.h | 14 + include/llvm/MC/MCAssembler.h | 23 +- include/llvm/MC/MCContext.h | 60 +- include/llvm/MC/MCDwarf.h | 156 + include/llvm/MC/MCELFSymbolFlags.h | 54 + include/llvm/MC/MCObjectStreamer.h | 11 + include/llvm/MC/MCObjectWriter.h | 2 +- include/llvm/MC/MCParser/AsmParser.h | 152 - include/llvm/MC/MCParser/MCAsmParser.h | 30 +- include/llvm/MC/MCParser/MCAsmParserExtension.h | 18 +- include/llvm/MC/MCParser/MCParsedAsmOperand.h | 8 +- include/llvm/MC/MCSectionELF.h | 10 +- include/llvm/MC/MCStreamer.h | 30 +- include/llvm/Metadata.h | 54 +- include/llvm/Module.h | 29 +- include/llvm/Pass.h | 71 +- include/llvm/PassAnalysisSupport.h | 50 +- include/llvm/PassManager.h | 1 - include/llvm/PassManagers.h | 58 +- include/llvm/PassRegistry.h | 71 + include/llvm/PassSupport.h | 41 +- include/llvm/Support/COFF.h | 87 +- include/llvm/Support/CallSite.h | 63 +- include/llvm/Support/Casting.h | 67 - include/llvm/Support/CommandLine.h | 27 +- include/llvm/Support/Compiler.h | 5 +- include/llvm/Support/ConstantRange.h | 38 +- include/llvm/Support/CrashRecoveryContext.h | 84 + include/llvm/Support/DataFlow.h | 2 +- include/llvm/Support/ELF.h | 83 +- include/llvm/Support/ErrorHandling.h | 12 + include/llvm/Support/GraphWriter.h | 12 +- include/llvm/Support/IRBuilder.h | 20 - include/llvm/Support/IRReader.h | 10 +- include/llvm/Support/MachO.h | 638 ++++ include/llvm/Support/MathExtras.h | 6 +- include/llvm/Support/PassNameParser.h | 24 +- include/llvm/Support/PatternMatch.h | 7 + include/llvm/Support/PrettyStackTrace.h | 14 +- include/llvm/Support/Regex.h | 15 +- include/llvm/Support/Registry.h | 2 + include/llvm/Support/SlowOperationInformer.h | 65 - include/llvm/Support/SourceMgr.h | 4 +- include/llvm/Support/StandardPasses.h | 3 +- include/llvm/Support/SystemUtils.h | 7 +- include/llvm/Support/TypeBuilder.h | 2 +- include/llvm/Support/raw_ostream.h | 125 +- include/llvm/System/Memory.h | 1 - include/llvm/System/Path.h | 5 +- include/llvm/System/Process.h | 2 - include/llvm/System/Program.h | 3 - include/llvm/System/Signals.h | 4 + include/llvm/System/ThreadLocal.h | 13 + include/llvm/Target/Target.td | 7 +- include/llvm/Target/TargetAsmParser.h | 14 +- include/llvm/Target/TargetCallingConv.td | 9 +- include/llvm/Target/TargetData.h | 42 +- include/llvm/Target/TargetInstrDesc.h | 14 +- include/llvm/Target/TargetInstrInfo.h | 53 +- include/llvm/Target/TargetLowering.h | 140 +- include/llvm/Target/TargetMachine.h | 38 +- include/llvm/Target/TargetOpcodes.h | 2 +- include/llvm/Target/TargetOptions.h | 23 +- include/llvm/Target/TargetRegisterInfo.h | 67 +- include/llvm/Target/TargetRegistry.h | 17 +- include/llvm/Target/TargetSelect.h | 25 +- include/llvm/Transforms/IPO.h | 5 +- include/llvm/Transforms/IPO/InlinerPass.h | 4 +- include/llvm/Transforms/Scalar.h | 39 +- include/llvm/Transforms/Utils/Cloning.h | 15 +- include/llvm/Transforms/Utils/Local.h | 2 - include/llvm/Transforms/Utils/SSAUpdater.h | 18 +- include/llvm/Transforms/Utils/SSI.h | 93 - .../llvm/Transforms/Utils/UnifyFunctionExitNodes.h | 2 +- include/llvm/Transforms/Utils/ValueMapper.h | 31 + include/llvm/Type.h | 18 +- include/llvm/Use.h | 24 - include/llvm/Value.h | 6 +- include/llvm/ValueSymbolTable.h | 88 - lib/Analysis/AliasAnalysis.cpp | 233 +- lib/Analysis/AliasAnalysisCounter.cpp | 20 +- lib/Analysis/AliasAnalysisEvaluator.cpp | 50 +- lib/Analysis/AliasDebugger.cpp | 17 +- lib/Analysis/AliasSetTracker.cpp | 157 +- lib/Analysis/BasicAliasAnalysis.cpp | 584 +++- lib/Analysis/CFGPrinter.cpp | 30 +- lib/Analysis/CMakeLists.txt | 3 + lib/Analysis/CaptureTracking.cpp | 2 +- lib/Analysis/ConstantFolding.cpp | 4 +- lib/Analysis/DbgInfoPrinter.cpp | 6 +- lib/Analysis/DebugInfo.cpp | 192 +- lib/Analysis/DomPrinter.cpp | 65 +- lib/Analysis/IPA/CallGraph.cpp | 15 +- lib/Analysis/IPA/CallGraphSCCPass.cpp | 12 +- lib/Analysis/IPA/FindUsedTypes.cpp | 4 +- lib/Analysis/IPA/GlobalsModRef.cpp | 81 +- lib/Analysis/IVUsers.cpp | 39 +- lib/Analysis/InlineCost.cpp | 8 +- lib/Analysis/InstCount.cpp | 6 +- lib/Analysis/IntervalPartition.cpp | 6 +- lib/Analysis/LazyValueInfo.cpp | 583 +++- lib/Analysis/LibCallAliasAnalysis.cpp | 14 +- lib/Analysis/LibCallSemantics.cpp | 3 +- lib/Analysis/Lint.cpp | 11 +- lib/Analysis/LiveValues.cpp | 6 +- lib/Analysis/LoopDependenceAnalysis.cpp | 4 +- lib/Analysis/LoopInfo.cpp | 45 +- lib/Analysis/LoopPass.cpp | 16 +- lib/Analysis/MemoryDependenceAnalysis.cpp | 44 +- lib/Analysis/ModuleDebugInfoPrinter.cpp | 7 +- lib/Analysis/PointerTracking.cpp | 55 +- lib/Analysis/PostDominators.cpp | 8 +- lib/Analysis/ProfileEstimatorPass.cpp | 14 +- lib/Analysis/ProfileInfo.cpp | 13 +- lib/Analysis/ProfileInfoLoaderPass.cpp | 14 +- lib/Analysis/ProfileVerifierPass.cpp | 8 +- lib/Analysis/RegionInfo.cpp | 749 +++++ lib/Analysis/RegionPrinter.cpp | 186 ++ lib/Analysis/ScalarEvolution.cpp | 743 +++-- lib/Analysis/ScalarEvolutionAliasAnalysis.cpp | 17 +- lib/Analysis/ScalarEvolutionExpander.cpp | 74 +- lib/Analysis/ScalarEvolutionNormalization.cpp | 114 +- lib/Analysis/TypeBasedAliasAnalysis.cpp | 191 ++ lib/Analysis/ValueTracking.cpp | 238 +- lib/AsmParser/LLLexer.cpp | 2 +- lib/AsmParser/LLParser.cpp | 161 +- lib/AsmParser/LLParser.h | 14 +- lib/AsmParser/LLToken.h | 4 +- lib/AsmParser/Parser.cpp | 3 +- lib/Bitcode/Reader/BitcodeReader.cpp | 119 +- lib/Bitcode/Reader/BitcodeReader.h | 12 +- lib/Bitcode/Writer/BitcodeWriter.cpp | 136 +- lib/Bitcode/Writer/BitcodeWriterPass.cpp | 2 +- lib/Bitcode/Writer/ValueEnumerator.cpp | 139 +- lib/Bitcode/Writer/ValueEnumerator.h | 9 +- lib/CodeGen/AggressiveAntiDepBreaker.cpp | 32 +- lib/CodeGen/AggressiveAntiDepBreaker.h | 10 +- lib/CodeGen/Analysis.cpp | 4 +- lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 88 +- lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp | 4 +- lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp | 13 +- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 862 ++--- lib/CodeGen/AsmPrinter/DwarfDebug.h | 28 +- lib/CodeGen/AsmPrinter/DwarfException.cpp | 2 +- lib/CodeGen/BranchFolding.cpp | 2 +- lib/CodeGen/CMakeLists.txt | 6 +- lib/CodeGen/CalcSpillWeights.cpp | 276 +- lib/CodeGen/CodePlacementOpt.cpp | 2 +- lib/CodeGen/CriticalAntiDepBreaker.cpp | 27 +- lib/CodeGen/CriticalAntiDepBreaker.h | 7 +- lib/CodeGen/DeadMachineInstructionElim.cpp | 21 +- lib/CodeGen/DwarfEHPrepare.cpp | 282 +- lib/CodeGen/ELF.h | 120 +- lib/CodeGen/ELFCodeEmitter.cpp | 2 +- lib/CodeGen/ELFWriter.cpp | 30 +- lib/CodeGen/ELFWriter.h | 13 +- lib/CodeGen/GCMetadata.cpp | 12 +- lib/CodeGen/GCStrategy.cpp | 9 +- lib/CodeGen/IfConversion.cpp | 5 +- lib/CodeGen/InlineSpiller.cpp | 118 +- lib/CodeGen/IntrinsicLowering.cpp | 3 +- lib/CodeGen/LLVMTargetMachine.cpp | 81 +- lib/CodeGen/LiveInterval.cpp | 164 +- lib/CodeGen/LiveIntervalAnalysis.cpp | 79 +- lib/CodeGen/LiveStackAnalysis.cpp | 3 +- lib/CodeGen/LiveVariables.cpp | 18 +- lib/CodeGen/LocalStackSlotAllocation.cpp | 354 +++ lib/CodeGen/LowerSubregs.cpp | 22 +- lib/CodeGen/MachineBasicBlock.cpp | 32 +- lib/CodeGen/MachineCSE.cpp | 41 +- lib/CodeGen/MachineDominators.cpp | 8 +- lib/CodeGen/MachineFunction.cpp | 3 +- lib/CodeGen/MachineFunctionAnalysis.cpp | 4 +- lib/CodeGen/MachineFunctionPrinterPass.cpp | 2 +- lib/CodeGen/MachineInstr.cpp | 33 +- lib/CodeGen/MachineLICM.cpp | 21 +- lib/CodeGen/MachineLoopInfo.cpp | 6 +- lib/CodeGen/MachineModuleInfo.cpp | 15 +- lib/CodeGen/MachineSink.cpp | 138 +- lib/CodeGen/MachineVerifier.cpp | 230 +- lib/CodeGen/OptimizeExts.cpp | 220 -- lib/CodeGen/OptimizePHIs.cpp | 20 +- lib/CodeGen/PBQP/HeuristicBase.h | 8 +- lib/CodeGen/PBQP/HeuristicSolver.h | 9 + lib/CodeGen/PBQP/Heuristics/Briggs.h | 8 +- lib/CodeGen/PBQP/Solution.h | 31 + lib/CodeGen/PHIElimination.cpp | 36 +- lib/CodeGen/PHIElimination.h | 10 +- lib/CodeGen/PeepholeOptimizer.cpp | 287 ++ lib/CodeGen/PostRASchedulerList.cpp | 7 +- lib/CodeGen/PreAllocSplitting.cpp | 15 +- lib/CodeGen/ProcessImplicitDefs.cpp | 18 +- lib/CodeGen/PrologEpilogInserter.cpp | 243 +- lib/CodeGen/PrologEpilogInserter.h | 9 +- lib/CodeGen/RegAllocFast.cpp | 136 +- lib/CodeGen/RegAllocLinearScan.cpp | 154 +- lib/CodeGen/RegAllocPBQP.cpp | 47 +- lib/CodeGen/RegisterCoalescer.cpp | 3 +- lib/CodeGen/RegisterScavenging.cpp | 34 +- lib/CodeGen/RenderMachineFunction.cpp | 1014 ++++++ lib/CodeGen/RenderMachineFunction.h | 336 ++ lib/CodeGen/ScheduleDAGInstrs.cpp | 9 +- lib/CodeGen/ScheduleDAGInstrs.h | 4 +- lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 15 +- lib/CodeGen/SelectionDAG/FastISel.cpp | 17 +- lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 67 +- lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 26 +- lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | 20 +- lib/CodeGen/SelectionDAG/LegalizeTypes.h | 24 +- lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | 390 +-- lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp | 74 +- lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 421 ++- lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp | 5 +- lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 40 +- lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 638 ++-- lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h | 37 +- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 44 +- lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp | 2 +- lib/CodeGen/SelectionDAG/TargetLowering.cpp | 182 +- lib/CodeGen/SimpleRegisterCoalescing.cpp | 161 +- lib/CodeGen/SimpleRegisterCoalescing.h | 3 +- lib/CodeGen/SjLjEHPrepare.cpp | 2 +- lib/CodeGen/SlotIndexes.cpp | 3 +- lib/CodeGen/Spiller.cpp | 98 +- lib/CodeGen/Spiller.h | 19 +- lib/CodeGen/SplitKit.cpp | 1097 +++++++ lib/CodeGen/SplitKit.h | 321 ++ lib/CodeGen/Splitter.cpp | 817 +++++ lib/CodeGen/Splitter.h | 99 + lib/CodeGen/StackProtector.cpp | 8 +- lib/CodeGen/StackSlotColoring.cpp | 9 +- lib/CodeGen/StrongPHIElimination.cpp | 9 +- lib/CodeGen/TailDuplication.cpp | 19 +- lib/CodeGen/TargetInstrInfoImpl.cpp | 13 - lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 6 +- lib/CodeGen/TwoAddressInstructionPass.cpp | 50 +- lib/CodeGen/UnreachableBlockElim.cpp | 15 +- lib/CodeGen/VirtRegMap.cpp | 3 +- lib/CodeGen/VirtRegMap.h | 7 +- lib/CodeGen/VirtRegRewriter.cpp | 103 +- lib/CompilerDriver/Action.cpp | 13 +- lib/CompilerDriver/BuiltinOptions.cpp | 4 +- lib/CompilerDriver/CompilationGraph.cpp | 289 +- lib/CompilerDriver/Main.cpp | 123 +- lib/CompilerDriver/Makefile | 36 +- lib/CompilerDriver/Plugin.cpp | 78 - lib/ExecutionEngine/ExecutionEngineBindings.cpp | 4 + lib/ExecutionEngine/JIT/Intercept.cpp | 12 + lib/ExecutionEngine/JIT/JIT.cpp | 10 +- lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp | 10 +- lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp | 440 --- lib/ExecutionEngine/JIT/JITDwarfEmitter.h | 16 - lib/ExecutionEngine/JIT/JITEmitter.cpp | 307 +- lib/Linker/LinkModules.cpp | 180 +- lib/MC/CMakeLists.txt | 3 + lib/MC/ELFObjectWriter.cpp | 973 ++++++ lib/MC/MCAsmInfo.cpp | 2 + lib/MC/MCAsmInfoDarwin.cpp | 3 + lib/MC/MCAsmStreamer.cpp | 3 +- lib/MC/MCAssembler.cpp | 74 +- lib/MC/MCContext.cpp | 88 +- lib/MC/MCDisassembler/CMakeLists.txt | 7 + lib/MC/MCDisassembler/EDDisassembler.cpp | 402 +++ lib/MC/MCDisassembler/EDDisassembler.h | 271 ++ lib/MC/MCDisassembler/EDInfo.h | 73 + lib/MC/MCDisassembler/EDInst.cpp | 207 ++ lib/MC/MCDisassembler/EDInst.h | 182 ++ lib/MC/MCDisassembler/EDOperand.cpp | 282 ++ lib/MC/MCDisassembler/EDOperand.h | 91 + lib/MC/MCDisassembler/EDToken.cpp | 206 ++ lib/MC/MCDisassembler/EDToken.h | 139 + lib/MC/MCDisassembler/Makefile | 14 + lib/MC/MCDwarf.cpp | 21 + lib/MC/MCELFStreamer.cpp | 408 +++ lib/MC/MCMachOStreamer.cpp | 277 +- lib/MC/MCNullStreamer.cpp | 1 + lib/MC/MCObjectStreamer.cpp | 48 + lib/MC/MCParser/AsmLexer.cpp | 28 +- lib/MC/MCParser/AsmParser.cpp | 700 ++++- lib/MC/MCParser/DarwinAsmParser.cpp | 237 +- lib/MC/MCParser/ELFAsmParser.cpp | 235 +- lib/MC/MCParser/MCAsmParser.cpp | 15 +- lib/MC/MCParser/TargetAsmParser.cpp | 2 +- lib/MC/MCStreamer.cpp | 3 +- lib/MC/MachObjectWriter.cpp | 2 +- lib/MC/Makefile | 2 +- lib/MC/WinCOFFObjectWriter.cpp | 737 ++++- lib/MC/WinCOFFStreamer.cpp | 229 +- lib/Support/APFloat.cpp | 1 + lib/Support/APInt.cpp | 13 +- lib/Support/CMakeLists.txt | 2 +- lib/Support/ConstantRange.cpp | 124 +- lib/Support/CrashRecoveryContext.cpp | 204 ++ lib/Support/ErrorHandling.cpp | 34 +- lib/Support/FoldingSet.cpp | 89 +- lib/Support/PrettyStackTrace.cpp | 5 +- lib/Support/SlowOperationInformer.cpp | 67 - lib/Support/SmallVector.cpp | 2 +- lib/Support/Statistic.cpp | 14 +- lib/Support/StringRef.cpp | 27 +- lib/Support/SystemUtils.cpp | 10 + lib/Support/Triple.cpp | 243 +- lib/Support/raw_ostream.cpp | 97 +- lib/System/DynamicLibrary.cpp | 6 + lib/System/Path.cpp | 40 +- lib/System/RWMutex.cpp | 18 +- lib/System/ThreadLocal.cpp | 5 + lib/System/Unix/Path.inc | 12 +- lib/System/Unix/Signals.inc | 44 + lib/System/Unix/ThreadLocal.inc | 1 + lib/System/Win32/Path.inc | 16 +- lib/System/Win32/Signals.inc | 14 + lib/System/Win32/ThreadLocal.inc | 4 + lib/Target/ARM/ARM.h | 60 +- lib/Target/ARM/ARM.td | 76 +- lib/Target/ARM/ARMAddressingModes.h | 20 +- lib/Target/ARM/ARMAsmPrinter.cpp | 1491 +++++++++ lib/Target/ARM/ARMBaseInstrInfo.cpp | 134 +- lib/Target/ARM/ARMBaseInstrInfo.h | 81 +- lib/Target/ARM/ARMBaseRegisterInfo.cpp | 563 +++- lib/Target/ARM/ARMBaseRegisterInfo.h | 29 +- lib/Target/ARM/ARMCallingConv.td | 4 +- lib/Target/ARM/ARMCodeEmitter.cpp | 72 +- lib/Target/ARM/ARMConstantIslandPass.cpp | 96 +- lib/Target/ARM/ARMExpandPseudoInsts.cpp | 359 ++- lib/Target/ARM/ARMFastISel.cpp | 665 ++++ lib/Target/ARM/ARMGlobalMerge.cpp | 212 ++ lib/Target/ARM/ARMISelDAGToDAG.cpp | 371 +-- lib/Target/ARM/ARMISelLowering.cpp | 635 ++-- lib/Target/ARM/ARMISelLowering.h | 42 +- lib/Target/ARM/ARMInstrFormats.td | 296 +- lib/Target/ARM/ARMInstrInfo.td | 406 +-- lib/Target/ARM/ARMInstrNEON.td | 627 +++- lib/Target/ARM/ARMInstrThumb.td | 19 +- lib/Target/ARM/ARMInstrThumb2.td | 730 +++-- lib/Target/ARM/ARMInstrVFP.td | 76 +- lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 139 +- lib/Target/ARM/ARMMCInstLower.cpp | 162 + lib/Target/ARM/ARMMCInstLower.h | 56 + lib/Target/ARM/ARMMachineFunctionInfo.h | 11 +- lib/Target/ARM/ARMRegisterInfo.td | 160 +- lib/Target/ARM/ARMSubtarget.cpp | 5 + lib/Target/ARM/ARMSubtarget.h | 22 +- lib/Target/ARM/ARMTargetMachine.cpp | 14 +- lib/Target/ARM/ARMTargetMachine.h | 1 + lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 245 +- lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp | 1438 --------- lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp | 66 +- lib/Target/ARM/AsmPrinter/ARMInstPrinter.h | 2 + lib/Target/ARM/AsmPrinter/ARMMCInstLower.cpp | 162 - lib/Target/ARM/AsmPrinter/ARMMCInstLower.h | 56 - lib/Target/ARM/AsmPrinter/CMakeLists.txt | 2 - lib/Target/ARM/CMakeLists.txt | 10 +- lib/Target/ARM/Disassembler/ARMDisassembler.cpp | 13 +- .../ARM/Disassembler/ARMDisassemblerCore.cpp | 183 +- lib/Target/ARM/Disassembler/ARMDisassemblerCore.h | 66 +- .../ARM/Disassembler/ThumbDisassemblerCore.h | 227 +- lib/Target/ARM/Makefile | 5 +- lib/Target/ARM/NEONMoveFix.cpp | 2 +- lib/Target/ARM/NEONPreAllocPass.cpp | 147 +- lib/Target/ARM/README.txt | 42 +- lib/Target/ARM/Thumb1RegisterInfo.cpp | 279 +- lib/Target/ARM/Thumb1RegisterInfo.h | 22 +- lib/Target/ARM/Thumb2ITBlockPass.cpp | 68 +- lib/Target/ARM/Thumb2InstrInfo.cpp | 8 +- lib/Target/ARM/Thumb2SizeReduction.cpp | 14 +- lib/Target/Alpha/AlphaBranchSelector.cpp | 2 +- lib/Target/Alpha/AlphaCodeEmitter.cpp | 2 +- lib/Target/Alpha/AlphaISelDAGToDAG.cpp | 4 +- lib/Target/Alpha/AlphaInstrInfo.cpp | 26 - lib/Target/Alpha/AlphaInstrInfo.h | 6 - lib/Target/Alpha/AlphaLLRP.cpp | 2 +- lib/Target/Alpha/AlphaRegisterInfo.cpp | 6 +- lib/Target/Alpha/AlphaRegisterInfo.h | 5 +- lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp | 2 - lib/Target/Blackfin/BlackfinInstrInfo.cpp | 28 - lib/Target/Blackfin/BlackfinInstrInfo.h | 4 - lib/Target/Blackfin/BlackfinRegisterInfo.cpp | 16 +- lib/Target/Blackfin/BlackfinRegisterInfo.h | 7 +- lib/Target/CBackend/CBackend.cpp | 12 +- lib/Target/CellSPU/SPUCallingConv.td | 24 +- lib/Target/CellSPU/SPUISelDAGToDAG.cpp | 44 +- lib/Target/CellSPU/SPUISelLowering.cpp | 105 +- lib/Target/CellSPU/SPUInstrInfo.cpp | 142 - lib/Target/CellSPU/SPUInstrInfo.h | 6 - lib/Target/CellSPU/SPUInstrInfo.td | 156 +- lib/Target/CellSPU/SPUOperands.td | 6 - lib/Target/CellSPU/SPURegisterInfo.cpp | 11 +- lib/Target/CellSPU/SPURegisterInfo.h | 5 +- lib/Target/CellSPU/SPURegisterInfo.td | 2 +- lib/Target/CppBackend/CPPBackend.cpp | 17 +- lib/Target/MBlaze/AsmPrinter/MBlazeAsmPrinter.cpp | 10 - lib/Target/MBlaze/MBlaze.td | 2 +- lib/Target/MBlaze/MBlazeCallingConv.td | 2 +- lib/Target/MBlaze/MBlazeDelaySlotFiller.cpp | 2 +- lib/Target/MBlaze/MBlazeISelDAGToDAG.cpp | 2 +- lib/Target/MBlaze/MBlazeInstrFPU.td | 2 +- lib/Target/MBlaze/MBlazeInstrFSL.td | 2 +- lib/Target/MBlaze/MBlazeInstrFormats.td | 2 +- lib/Target/MBlaze/MBlazeInstrInfo.cpp | 35 - lib/Target/MBlaze/MBlazeInstrInfo.h | 6 - lib/Target/MBlaze/MBlazeInstrInfo.td | 2 +- lib/Target/MBlaze/MBlazeIntrinsics.td | 12 +- lib/Target/MBlaze/MBlazeRegisterInfo.cpp | 5 +- lib/Target/MBlaze/MBlazeRegisterInfo.h | 5 +- lib/Target/MBlaze/MBlazeRegisterInfo.td | 2 +- lib/Target/MBlaze/MBlazeSchedule.td | 2 +- lib/Target/MSIL/CMakeLists.txt | 3 - lib/Target/MSIL/MSILWriter.cpp | 1706 ---------- lib/Target/MSIL/MSILWriter.h | 258 -- lib/Target/MSIL/Makefile | 16 - lib/Target/MSIL/README.TXT | 26 - lib/Target/MSIL/TargetInfo/CMakeLists.txt | 6 - lib/Target/MSIL/TargetInfo/MSILTargetInfo.cpp | 26 - lib/Target/MSIL/TargetInfo/Makefile | 15 - lib/Target/MSP430/MSP430BranchSelector.cpp | 7 +- lib/Target/MSP430/MSP430InstrInfo.cpp | 23 +- lib/Target/MSP430/MSP430InstrInfo.h | 4 - lib/Target/MSP430/MSP430RegisterInfo.cpp | 12 +- lib/Target/MSP430/MSP430RegisterInfo.h | 7 +- lib/Target/Mangler.cpp | 3 +- lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp | 20 + lib/Target/Mips/Mips.td | 2 +- lib/Target/Mips/MipsCallingConv.td | 2 +- lib/Target/Mips/MipsDelaySlotFiller.cpp | 2 +- lib/Target/Mips/MipsISelDAGToDAG.cpp | 11 +- lib/Target/Mips/MipsISelLowering.cpp | 8 +- lib/Target/Mips/MipsInstrFPU.td | 2 +- lib/Target/Mips/MipsInstrFormats.td | 2 +- lib/Target/Mips/MipsInstrInfo.cpp | 47 - lib/Target/Mips/MipsInstrInfo.h | 6 - lib/Target/Mips/MipsInstrInfo.td | 9 +- lib/Target/Mips/MipsRegisterInfo.cpp | 6 +- lib/Target/Mips/MipsRegisterInfo.h | 5 +- lib/Target/Mips/MipsRegisterInfo.td | 2 +- lib/Target/Mips/MipsSchedule.td | 2 +- lib/Target/PIC16/CMakeLists.txt | 2 +- lib/Target/PIC16/PIC16.h | 7 +- lib/Target/PIC16/PIC16ISelLowering.cpp | 10 + lib/Target/PIC16/PIC16ISelLowering.h | 5 +- lib/Target/PIC16/PIC16InstrInfo.cpp | 15 - lib/Target/PIC16/PIC16InstrInfo.h | 4 - lib/Target/PIC16/PIC16MemSelOpt.cpp | 2 +- lib/Target/PIC16/PIC16Passes/PIC16Cloner.cpp | 2 +- lib/Target/PIC16/PIC16Passes/PIC16Cloner.h | 2 +- lib/Target/PIC16/PIC16Passes/PIC16Overlay.cpp | 5 +- lib/Target/PIC16/PIC16Passes/PIC16Overlay.h | 2 +- lib/Target/PIC16/PIC16RegisterInfo.cpp | 9 +- lib/Target/PIC16/PIC16RegisterInfo.h | 5 +- lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp | 14 + lib/Target/PowerPC/PPCBranchSelector.cpp | 7 +- lib/Target/PowerPC/PPCCallingConv.td | 2 +- lib/Target/PowerPC/PPCCodeEmitter.cpp | 4 +- lib/Target/PowerPC/PPCISelLowering.cpp | 39 +- lib/Target/PowerPC/PPCInstrInfo.cpp | 82 +- lib/Target/PowerPC/PPCInstrInfo.h | 6 - lib/Target/PowerPC/PPCInstrInfo.td | 19 +- lib/Target/PowerPC/PPCRegisterInfo.cpp | 22 +- lib/Target/PowerPC/PPCRegisterInfo.h | 5 +- lib/Target/PowerPC/PPCSubtarget.cpp | 4 + lib/Target/PowerPC/PPCSubtarget.h | 4 + lib/Target/README.txt | 16 + lib/Target/Sparc/DelaySlotFiller.cpp | 2 +- lib/Target/Sparc/FPMover.cpp | 2 +- lib/Target/Sparc/Sparc.td | 2 +- lib/Target/Sparc/SparcISelDAGToDAG.cpp | 8 +- lib/Target/Sparc/SparcInstrInfo.cpp | 40 - lib/Target/Sparc/SparcInstrInfo.h | 6 - lib/Target/Sparc/SparcInstrInfo.td | 12 +- lib/Target/Sparc/SparcRegisterInfo.cpp | 6 +- lib/Target/Sparc/SparcRegisterInfo.h | 5 +- lib/Target/SystemZ/SystemZInstrInfo.cpp | 25 - lib/Target/SystemZ/SystemZInstrInfo.h | 3 - lib/Target/SystemZ/SystemZRegisterInfo.cpp | 9 +- lib/Target/SystemZ/SystemZRegisterInfo.h | 7 +- lib/Target/TargetData.cpp | 62 +- lib/Target/TargetMachine.cpp | 20 +- lib/Target/TargetRegisterInfo.cpp | 14 +- lib/Target/X86/AsmParser/X86AsmParser.cpp | 274 +- lib/Target/X86/AsmPrinter/CMakeLists.txt | 3 +- lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp | 5 + lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h | 3 + lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp | 680 ---- lib/Target/X86/AsmPrinter/X86AsmPrinter.h | 89 - lib/Target/X86/AsmPrinter/X86InstComments.cpp | 232 ++ lib/Target/X86/AsmPrinter/X86InstComments.h | 25 + lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp | 5 + lib/Target/X86/AsmPrinter/X86IntelInstPrinter.h | 4 + lib/Target/X86/AsmPrinter/X86MCInstLower.cpp | 632 ---- lib/Target/X86/AsmPrinter/X86MCInstLower.h | 51 - lib/Target/X86/CMakeLists.txt | 10 +- lib/Target/X86/README-FPStack.txt | 4 +- lib/Target/X86/README-SSE.txt | 42 +- lib/Target/X86/README.txt | 104 +- lib/Target/X86/SSEDomainFix.cpp | 2 +- lib/Target/X86/X86.h | 5 - lib/Target/X86/X86.td | 4 +- lib/Target/X86/X86AsmBackend.cpp | 45 +- lib/Target/X86/X86AsmPrinter.cpp | 727 +++++ lib/Target/X86/X86AsmPrinter.h | 89 + lib/Target/X86/X86CallingConv.td | 32 +- lib/Target/X86/X86CodeEmitter.cpp | 119 +- lib/Target/X86/X86FastISel.cpp | 29 +- lib/Target/X86/X86FloatingPoint.cpp | 473 ++- lib/Target/X86/X86FloatingPointRegKill.cpp | 153 - lib/Target/X86/X86ISelDAGToDAG.cpp | 37 +- lib/Target/X86/X86ISelLowering.cpp | 1207 ++++++- lib/Target/X86/X86ISelLowering.h | 58 +- lib/Target/X86/X86Instr64bit.td | 156 +- lib/Target/X86/X86InstrFMA.td | 60 + lib/Target/X86/X86InstrFPStack.td | 6 +- lib/Target/X86/X86InstrFormats.td | 33 +- lib/Target/X86/X86InstrFragmentsSIMD.td | 80 +- lib/Target/X86/X86InstrInfo.cpp | 692 +--- lib/Target/X86/X86InstrInfo.h | 30 +- lib/Target/X86/X86InstrInfo.td | 145 +- lib/Target/X86/X86InstrMMX.td | 2 +- lib/Target/X86/X86InstrSSE.td | 1945 +++++++++--- lib/Target/X86/X86MCAsmInfo.cpp | 3 + lib/Target/X86/X86MCCodeEmitter.cpp | 57 +- lib/Target/X86/X86MCInstLower.cpp | 609 ++++ lib/Target/X86/X86MCInstLower.h | 54 + lib/Target/X86/X86RegisterInfo.cpp | 103 +- lib/Target/X86/X86RegisterInfo.h | 9 +- lib/Target/X86/X86RegisterInfo.td | 17 +- lib/Target/X86/X86ShuffleDecode.h | 155 + lib/Target/X86/X86Subtarget.cpp | 10 +- lib/Target/X86/X86Subtarget.h | 8 + lib/Target/X86/X86TargetMachine.cpp | 44 +- lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp | 12 +- lib/Target/XCore/CMakeLists.txt | 2 +- lib/Target/XCore/XCoreISelDAGToDAG.cpp | 21 +- lib/Target/XCore/XCoreInstrInfo.cpp | 29 +- lib/Target/XCore/XCoreInstrInfo.h | 6 - lib/Target/XCore/XCoreInstrInfo.td | 12 +- lib/Target/XCore/XCoreRegisterInfo.cpp | 14 +- lib/Target/XCore/XCoreRegisterInfo.h | 5 +- lib/Transforms/Hello/Hello.cpp | 11 +- lib/Transforms/IPO/ArgumentPromotion.cpp | 13 +- lib/Transforms/IPO/ConstantMerge.cpp | 34 +- lib/Transforms/IPO/DeadArgumentElimination.cpp | 26 +- lib/Transforms/IPO/DeadTypeElimination.cpp | 4 +- lib/Transforms/IPO/ExtractGV.cpp | 157 +- lib/Transforms/IPO/FunctionAttrs.cpp | 12 +- lib/Transforms/IPO/GlobalDCE.cpp | 5 +- lib/Transforms/IPO/GlobalOpt.cpp | 12 +- lib/Transforms/IPO/IPConstantPropagation.cpp | 10 +- lib/Transforms/IPO/InlineAlways.cpp | 6 +- lib/Transforms/IPO/InlineSimple.cpp | 8 +- lib/Transforms/IPO/Inliner.cpp | 12 +- lib/Transforms/IPO/Internalize.cpp | 8 +- lib/Transforms/IPO/LoopExtractor.cpp | 23 +- lib/Transforms/IPO/LowerSetJmp.cpp | 4 +- lib/Transforms/IPO/MergeFunctions.cpp | 658 ++-- lib/Transforms/IPO/PartialInlining.cpp | 10 +- lib/Transforms/IPO/PartialSpecialization.cpp | 46 +- lib/Transforms/IPO/PruneEH.cpp | 6 +- lib/Transforms/IPO/StripDeadPrototypes.cpp | 6 +- lib/Transforms/IPO/StripSymbols.cpp | 36 +- lib/Transforms/IPO/StructRetPromotion.cpp | 26 +- lib/Transforms/InstCombine/InstCombine.h | 2 +- lib/Transforms/InstCombine/InstCombineAndOrXor.cpp | 46 +- lib/Transforms/InstCombine/InstCombineCalls.cpp | 35 +- lib/Transforms/InstCombine/InstCombineCasts.cpp | 287 +- lib/Transforms/InstCombine/InstCombineCompares.cpp | 2 +- .../InstCombine/InstCombineLoadStoreAlloca.cpp | 22 +- lib/Transforms/InstCombine/InstCombineSelect.cpp | 28 - lib/Transforms/InstCombine/InstCombineShifts.cpp | 307 +- .../InstCombine/InstructionCombining.cpp | 4 +- lib/Transforms/Instrumentation/EdgeProfiling.cpp | 6 +- .../Instrumentation/OptimalEdgeProfiling.cpp | 8 +- lib/Transforms/Scalar/ABCD.cpp | 1112 ------- lib/Transforms/Scalar/ADCE.cpp | 4 +- lib/Transforms/Scalar/BasicBlockPlacement.cpp | 6 +- lib/Transforms/Scalar/CMakeLists.txt | 3 +- lib/Transforms/Scalar/CodeGenPrepare.cpp | 36 +- lib/Transforms/Scalar/ConstantProp.cpp | 6 +- .../Scalar/CorrelatedValuePropagation.cpp | 200 ++ lib/Transforms/Scalar/DCE.cpp | 10 +- lib/Transforms/Scalar/DeadStoreElimination.cpp | 7 +- lib/Transforms/Scalar/GEPSplitter.cpp | 6 +- lib/Transforms/Scalar/GVN.cpp | 15 +- lib/Transforms/Scalar/IndVarSimplify.cpp | 18 +- lib/Transforms/Scalar/JumpThreading.cpp | 217 +- lib/Transforms/Scalar/LICM.cpp | 728 +++-- lib/Transforms/Scalar/LoopDeletion.cpp | 7 +- lib/Transforms/Scalar/LoopIndexSplit.cpp | 12 +- lib/Transforms/Scalar/LoopRotation.cpp | 34 +- lib/Transforms/Scalar/LoopStrengthReduce.cpp | 182 +- lib/Transforms/Scalar/LoopUnrollPass.cpp | 21 +- lib/Transforms/Scalar/LoopUnswitch.cpp | 30 +- lib/Transforms/Scalar/LowerAtomic.cpp | 161 + lib/Transforms/Scalar/MemCpyOptimizer.cpp | 21 +- lib/Transforms/Scalar/Reassociate.cpp | 5 +- lib/Transforms/Scalar/Reg2Mem.cpp | 8 +- lib/Transforms/Scalar/SCCP.cpp | 41 +- lib/Transforms/Scalar/ScalarReplAggregates.cpp | 49 +- lib/Transforms/Scalar/SimplifyCFGPass.cpp | 10 +- lib/Transforms/Scalar/SimplifyHalfPowrLibCalls.cpp | 6 +- lib/Transforms/Scalar/SimplifyLibCalls.cpp | 27 +- lib/Transforms/Scalar/Sink.cpp | 5 +- lib/Transforms/Scalar/TailDuplication.cpp | 4 +- lib/Transforms/Scalar/TailRecursionElimination.cpp | 68 +- lib/Transforms/Utils/BasicBlockUtils.cpp | 25 +- lib/Transforms/Utils/BasicInliner.cpp | 4 +- lib/Transforms/Utils/BreakCriticalEdges.cpp | 10 +- lib/Transforms/Utils/BuildLibCalls.cpp | 21 +- lib/Transforms/Utils/CMakeLists.txt | 1 - lib/Transforms/Utils/CloneFunction.cpp | 86 +- lib/Transforms/Utils/CloneModule.cpp | 30 +- lib/Transforms/Utils/InlineFunction.cpp | 11 +- lib/Transforms/Utils/InstructionNamer.cpp | 8 +- lib/Transforms/Utils/LCSSA.cpp | 27 +- lib/Transforms/Utils/Local.cpp | 3 + lib/Transforms/Utils/LoopSimplify.cpp | 40 +- lib/Transforms/Utils/LoopUnroll.cpp | 6 + lib/Transforms/Utils/LowerInvoke.cpp | 11 +- lib/Transforms/Utils/LowerSwitch.cpp | 16 +- lib/Transforms/Utils/Mem2Reg.cpp | 7 +- lib/Transforms/Utils/PromoteMemoryToRegister.cpp | 17 +- lib/Transforms/Utils/SSAUpdater.cpp | 40 +- lib/Transforms/Utils/SSI.cpp | 432 --- lib/Transforms/Utils/SimplifyCFG.cpp | 56 +- lib/Transforms/Utils/UnifyFunctionExitNodes.cpp | 6 +- lib/Transforms/Utils/ValueMapper.cpp | 84 +- lib/Transforms/Utils/ValueMapper.h | 29 - lib/VMCore/AsmWriter.cpp | 167 +- lib/VMCore/AutoUpgrade.cpp | 217 +- lib/VMCore/CMakeLists.txt | 1 + lib/VMCore/ConstantFold.cpp | 40 - lib/VMCore/Constants.cpp | 121 +- lib/VMCore/ConstantsContext.h | 16 +- lib/VMCore/Core.cpp | 92 +- lib/VMCore/Dominators.cpp | 147 +- lib/VMCore/Globals.cpp | 9 +- lib/VMCore/InlineAsm.cpp | 2 +- lib/VMCore/Instruction.cpp | 4 +- lib/VMCore/Instructions.cpp | 49 +- lib/VMCore/LLVMContext.cpp | 13 +- lib/VMCore/LLVMContextImpl.cpp | 3 - lib/VMCore/LLVMContextImpl.h | 5 - lib/VMCore/Metadata.cpp | 170 +- lib/VMCore/Module.cpp | 23 +- lib/VMCore/Pass.cpp | 293 +- lib/VMCore/PassManager.cpp | 330 +- lib/VMCore/PassRegistry.cpp | 159 + lib/VMCore/PrintModulePass.cpp | 18 +- lib/VMCore/Type.cpp | 265 +- lib/VMCore/TypesContext.h | 72 +- lib/VMCore/Use.cpp | 19 +- lib/VMCore/Value.cpp | 35 +- lib/VMCore/ValueSymbolTable.cpp | 2 - lib/VMCore/Verifier.cpp | 125 +- runtime/libprofile/Makefile | 8 +- runtime/libprofile/exported_symbols.lst | 4 - runtime/libprofile/libprofile.exports | 4 + test/Analysis/BasicAA/args-rets-allocas-loads.ll | 220 +- test/Analysis/BasicAA/constant-over-index.ll | 5 +- test/Analysis/BasicAA/featuretest.ll | 50 +- test/Analysis/BasicAA/gep-alias.ll | 12 +- test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll | 26 + test/Analysis/BasicAA/modref.ll | 11 + .../RegionInfo/20100809_bb_not_in_domtree.ll | 20 + test/Analysis/RegionInfo/block_sort.ll | 42 + test/Analysis/RegionInfo/cond_loop.ll | 33 + test/Analysis/RegionInfo/condition_complicated.ll | 60 + .../Analysis/RegionInfo/condition_complicated_2.ll | 44 + test/Analysis/RegionInfo/condition_forward_edge.ll | 26 + test/Analysis/RegionInfo/condition_same_exit.ll | 31 + test/Analysis/RegionInfo/condition_simple.ll | 28 + test/Analysis/RegionInfo/dg.exp | 3 + test/Analysis/RegionInfo/exit_in_condition.ll | 38 + test/Analysis/RegionInfo/infinite_loop.ll | 20 + test/Analysis/RegionInfo/infinite_loop_2.ll | 36 + test/Analysis/RegionInfo/infinite_loop_3.ll | 52 + test/Analysis/RegionInfo/infinite_loop_4.ll | 48 + test/Analysis/RegionInfo/loop_with_condition.ll | 46 + test/Analysis/RegionInfo/loops_1.ll | 40 + test/Analysis/RegionInfo/loops_2.ll | 49 + test/Analysis/RegionInfo/mix_1.ll | 69 + test/Analysis/RegionInfo/multiple_exiting_edge.ll | 38 + test/Analysis/RegionInfo/nested_loops.ll | 33 + test/Analysis/RegionInfo/next.ll | 49 + test/Analysis/RegionInfo/paper.ll | 55 + test/Analysis/RegionInfo/two_loops_same_header.ll | 46 + test/Analysis/ScalarEvolution/avoid-smax-1.ll | 2 +- test/Analysis/ScalarEvolution/max-trip-count.ll | 42 +- test/Archive/README.txt | 2 +- test/Assembler/2010-01-06-UnionType.ll | 3 - 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/comment.ll | 20 + test/Assembler/getelementptr.ll | 4 +- test/Bindings/Ocaml/analysis.ml | 2 +- test/Bindings/Ocaml/bitreader.ml | 2 +- test/Bindings/Ocaml/bitwriter.ml | 2 +- test/Bindings/Ocaml/executionengine.ml | 2 +- test/Bindings/Ocaml/scalar_opts.ml | 6 +- test/Bindings/Ocaml/target.ml | 7 +- test/Bindings/Ocaml/vmcore.ml | 42 +- test/Bitcode/AutoUpgradeGlobals.ll | 3 + test/Bitcode/AutoUpgradeGlobals.ll.bc | Bin 0 -> 312 bytes test/Bitcode/neon-intrinsics.ll | 213 ++ test/Bitcode/neon-intrinsics.ll.bc | Bin 0 -> 5764 bytes test/BugPoint/crash-narrowfunctiontest.ll | 4 +- test/BugPoint/metadata.ll | 35 + test/BugPoint/remove_arguments_test.ll | 4 +- test/CMakeLists.txt | 17 + test/CodeGen/ARM/2007-01-19-InfiniteLoop.ll | 6 +- test/CodeGen/ARM/2007-03-26-RegScavengerAssert.ll | 2 +- .../ARM/2007-05-31-RegScavengerInfiniteLoop.ll | 2 +- test/CodeGen/ARM/2009-12-02-vtrn-undef.ll | 14 + test/CodeGen/ARM/2010-05-20-NEONSpillCrash.ll | 22 +- test/CodeGen/ARM/2010-05-21-BuildVector.ll | 4 +- test/CodeGen/ARM/2010-06-11-vmovdrr-bitcast.ll | 4 +- test/CodeGen/ARM/2010-06-21-nondarwin-tc.ll | 1 + .../ARM/2010-06-29-PartialRedefFastAlloc.ll | 4 +- test/CodeGen/ARM/2010-07-26-GlobalMerge.ll | 95 + test/CodeGen/ARM/2010-08-04-EHCrash.ll | 65 + test/CodeGen/ARM/arguments.ll | 42 +- test/CodeGen/ARM/bfi.ll | 40 + test/CodeGen/ARM/call-tc.ll | 1 + test/CodeGen/ARM/code-placement.ll | 29 + test/CodeGen/ARM/div.ll | 10 - test/CodeGen/ARM/fast-isel.ll | 39 + test/CodeGen/ARM/fnmuls.ll | 12 +- test/CodeGen/ARM/fpcmp-opt.ll | 2 +- test/CodeGen/ARM/fpowi.ll | 2 +- test/CodeGen/ARM/long_shift.ll | 6 +- test/CodeGen/ARM/lsr-on-unrolled-loops.ll | 19 +- test/CodeGen/ARM/pack.ll | 32 +- test/CodeGen/ARM/reg_sequence.ll | 73 +- test/CodeGen/ARM/remat.ll | 2 +- test/CodeGen/ARM/select.ll | 25 + test/CodeGen/ARM/spill-q.ll | 8 +- test/CodeGen/ARM/t2-imm.ll | 6 +- test/CodeGen/ARM/vaba.ll | 128 +- test/CodeGen/ARM/vabd.ll | 38 +- test/CodeGen/ARM/vadd.ll | 82 +- test/CodeGen/ARM/vext.ll | 20 + test/CodeGen/ARM/vld1.ll | 53 +- test/CodeGen/ARM/vld2.ll | 36 +- test/CodeGen/ARM/vld3.ll | 36 +- test/CodeGen/ARM/vld4.ll | 36 +- test/CodeGen/ARM/vldlane.ll | 84 +- test/CodeGen/ARM/vmla.ll | 78 +- test/CodeGen/ARM/vmls.ll | 78 +- test/CodeGen/ARM/vmov.ll | 30 +- test/CodeGen/ARM/vmul.ll | 68 +- test/CodeGen/ARM/vrev.ll | 18 + test/CodeGen/ARM/vst1.ll | 40 +- test/CodeGen/ARM/vst2.ll | 36 +- test/CodeGen/ARM/vst3.ll | 38 +- test/CodeGen/ARM/vst4.ll | 36 +- test/CodeGen/ARM/vstlane.ll | 84 +- test/CodeGen/ARM/vsub.ll | 82 +- test/CodeGen/ARM/vtrn.ll | 27 + test/CodeGen/ARM/vuzp.ll | 27 + test/CodeGen/ARM/vzip.ll | 27 + test/CodeGen/Alpha/2010-08-01-mulreduce64.ll | 11 + test/CodeGen/CellSPU/arg_ret.ll | 33 + test/CodeGen/CellSPU/bigstack.ll | 6 +- test/CodeGen/CellSPU/call.ll | 26 +- test/CodeGen/CellSPU/call_indirect.ll | 2 +- test/CodeGen/CellSPU/shuffles.ll | 23 + test/CodeGen/CellSPU/v2f32.ll | 75 + test/CodeGen/CellSPU/v2i32.ll | 64 + test/CodeGen/Generic/2010-07-27-DAGCombineCrash.ll | 6 + test/CodeGen/Mips/2008-06-05-Carry.ll | 2 +- test/CodeGen/Mips/2008-07-03-SRet.ll | 2 +- test/CodeGen/Mips/2008-07-05-ByVal.ll | 2 +- test/CodeGen/Mips/2008-07-06-fadd64.ll | 2 +- test/CodeGen/Mips/2008-07-07-FPExtend.ll | 2 +- test/CodeGen/Mips/2008-07-07-Float2Int.ll | 2 +- .../Mips/2008-07-07-IntDoubleConvertions.ll | 2 +- test/CodeGen/Mips/2008-07-15-InternalConstant.ll | 2 +- test/CodeGen/Mips/2008-07-15-SmallSection.ll | 2 +- test/CodeGen/Mips/2008-07-16-SignExtInReg.ll | 2 +- test/CodeGen/Mips/2008-07-22-Cstpool.ll | 2 +- test/CodeGen/Mips/2008-07-23-fpcmp.ll | 2 +- test/CodeGen/Mips/2008-07-29-icmp.ll | 2 +- test/CodeGen/Mips/2008-07-31-fcopysign.ll | 2 +- test/CodeGen/Mips/2008-08-01-AsmInline.ll | 2 +- test/CodeGen/Mips/2008-08-03-fabs64.ll | 2 +- test/CodeGen/Mips/2008-08-04-Bitconvert.ll | 2 +- test/CodeGen/Mips/2008-08-06-Alloca.ll | 2 +- test/CodeGen/Mips/2008-08-07-CC.ll | 2 +- test/CodeGen/Mips/2008-08-07-FPRound.ll | 2 +- test/CodeGen/Mips/2008-08-08-ctlz.ll | 2 +- test/CodeGen/Mips/2010-07-20-Select.ll | 21 + test/CodeGen/Mips/2010-07-20-Switch.ll | 33 + test/CodeGen/PowerPC/2008-01-25-EmptyFunction.ll | 8 - test/CodeGen/PowerPC/empty-functions.ll | 12 + test/CodeGen/PowerPC/vec_constants.ll | 18 +- test/CodeGen/SystemZ/05-MemLoadsStores.ll | 2 +- test/CodeGen/SystemZ/05-MemLoadsStores16.ll | 2 +- test/CodeGen/SystemZ/07-BrUnCond.ll | 2 +- test/CodeGen/SystemZ/09-DynamicAlloca.ll | 2 +- test/CodeGen/SystemZ/09-Globals.ll | 2 +- test/CodeGen/SystemZ/10-FuncsPic.ll | 2 +- test/CodeGen/SystemZ/10-GlobalsPic.ll | 2 +- test/CodeGen/SystemZ/11-BSwap.ll | 2 +- test/CodeGen/SystemZ/2009-06-02-Rotate.ll | 2 +- test/CodeGen/SystemZ/2009-07-04-Shl32.ll | 2 +- test/CodeGen/SystemZ/2009-07-05-Shifts.ll | 2 +- .../SystemZ/2009-07-10-BadIncomingArgOffset.ll | 2 +- test/CodeGen/SystemZ/2009-07-11-FloatBitConvert.ll | 2 +- test/CodeGen/SystemZ/2009-07-11-InvalidRIISel.ll | 2 +- test/CodeGen/Thumb/2007-05-05-InvalidPushPop.ll | 2 +- test/CodeGen/Thumb/2010-07-15-debugOrdering.ll | 147 + test/CodeGen/Thumb/barrier.ll | 24 + test/CodeGen/Thumb/dyn-stackalloc.ll | 2 +- test/CodeGen/Thumb/large-stack.ll | 29 +- test/CodeGen/Thumb/vargs.ll | 2 +- test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll | 4 +- test/CodeGen/Thumb2/2010-04-15-DynAllocBug.ll | 13 +- .../CodeGen/Thumb2/2010-08-10-VarSizedAllocaBug.ll | 53 + test/CodeGen/Thumb2/bfi.ll | 40 + test/CodeGen/Thumb2/cortex-fp.ll | 24 + test/CodeGen/Thumb2/crash.ll | 6 +- test/CodeGen/Thumb2/div.ll | 2 +- test/CodeGen/Thumb2/ldr-str-imm12.ll | 8 +- test/CodeGen/Thumb2/lsr-deficiency.ll | 4 +- test/CodeGen/Thumb2/machine-licm-vdup.ll | 38 + test/CodeGen/Thumb2/machine-licm.ll | 8 +- test/CodeGen/Thumb2/thumb2-and2.ll | 2 +- test/CodeGen/Thumb2/thumb2-badreg-operands.ll | 15 + test/CodeGen/Thumb2/thumb2-barrier.ll | 17 + test/CodeGen/Thumb2/thumb2-call-tc.ll | 1 + test/CodeGen/Thumb2/thumb2-cmp.ll | 14 + test/CodeGen/Thumb2/thumb2-ifcvt1-tc.ll | 1 + test/CodeGen/Thumb2/thumb2-pack.ll | 32 +- test/CodeGen/Thumb2/thumb2-spill-q.ll | 8 +- test/CodeGen/Thumb2/thumb2-uxtb.ll | 2 +- test/CodeGen/X86/2006-05-22-FPSetEQ.ll | 2 +- test/CodeGen/X86/2007-06-14-branchfold.ll | 133 - test/CodeGen/X86/2008-01-25-EmptyFunction.ll | 8 - test/CodeGen/X86/2008-08-06-CmpStride.ll | 23 + test/CodeGen/X86/2009-02-09-ivs-different-sizes.ll | 33 + test/CodeGen/X86/2009-02-26-MachineLICMBug.ll | 2 +- test/CodeGen/X86/2009-03-13-PHIElimBug.ll | 2 +- test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll | 2 +- test/CodeGen/X86/2009-03-23-MultiUseSched.ll | 2 +- test/CodeGen/X86/2010-01-18-DbgValue.ll | 48 + test/CodeGen/X86/2010-02-01-DbgValueCrash.ll | 33 + test/CodeGen/X86/2010-05-25-DotDebugLoc.ll | 239 ++ test/CodeGen/X86/2010-05-28-Crash.ll | 44 + test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll | 53 + test/CodeGen/X86/2010-07-11-FPStackLoneUse.ll | 28 + test/CodeGen/X86/2010-07-15-Crash.ll | 12 + test/CodeGen/X86/2010-07-29-SetccSimplify.ll | 14 + test/CodeGen/X86/2010-08-04-MaskedSignedCompare.ll | 36 + test/CodeGen/X86/2010-08-04-MingWCrash.ll | 39 + test/CodeGen/X86/2010-08-10-DbgConstant.ll | 25 + .../X86/2010-09-01-RemoveCopyByCommutingDef.ll | 28 + test/CodeGen/X86/GC/dg.exp | 4 +- test/CodeGen/X86/MachineSink-PHIUse.ll | 39 + test/CodeGen/X86/avx-128.ll | 12 + test/CodeGen/X86/avx-256.ll | 15 + test/CodeGen/X86/avx-intrinsics-x86.ll | 2587 +++++++++++++++ test/CodeGen/X86/avx-intrinsics-x86_64.ll | 50 + test/CodeGen/X86/barrier-sse.ll | 21 + test/CodeGen/X86/barrier.ll | 7 + test/CodeGen/X86/call-imm.ll | 2 +- .../X86/change-compare-stride-trickiness-0.ll | 29 + .../X86/change-compare-stride-trickiness-1.ll | 28 + .../X86/change-compare-stride-trickiness-2.ll | 58 + test/CodeGen/X86/constant-pool-remat-0.ll | 4 +- test/CodeGen/X86/critical-edge-split.ll | 2 +- test/CodeGen/X86/dllexport.ll | 2 +- test/CodeGen/X86/dyn-stackalloc.ll | 6 +- test/CodeGen/X86/empty-functions.ll | 15 + test/CodeGen/X86/fabs.ll | 2 +- test/CodeGen/X86/fast-isel-atomic.ll | 17 + test/CodeGen/X86/fast-isel-cmp-branch.ll | 29 + test/CodeGen/X86/fast-isel-gep.ll | 4 +- test/CodeGen/X86/fast-isel-shift-imm.ll | 2 +- test/CodeGen/X86/force-align-stack.ll | 21 + test/CodeGen/X86/insert-positions.ll | 69 + test/CodeGen/X86/int-intrinsic.ll | 20 + test/CodeGen/X86/licm-nested.ll | 2 +- test/CodeGen/X86/lock-inst-encoding.ll | 22 + test/CodeGen/X86/loop-strength-reduce4.ll | 4 +- test/CodeGen/X86/lsr-interesting-step.ll | 51 + test/CodeGen/X86/lsr-normalization.ll | 99 + test/CodeGen/X86/lsr-reuse.ll | 4 +- test/CodeGen/X86/lsr-static-addr.ll | 31 + test/CodeGen/X86/lsr-wrap.ll | 2 +- test/CodeGen/X86/narrow_op-2.ll | 25 - test/CodeGen/X86/phi-immediate-factoring.ll | 2 +- test/CodeGen/X86/pr7882.ll | 17 + test/CodeGen/X86/shl-anyext.ll | 40 + test/CodeGen/X86/sibcall.ll | 2 + test/CodeGen/X86/sse-minmax.ll | 4 +- test/CodeGen/X86/sse1.ll | 45 + test/CodeGen/X86/sse2.ll | 168 +- test/CodeGen/X86/sse41.ll | 25 + test/CodeGen/X86/stack-color-with-reg.ll | 361 --- test/CodeGen/X86/stdcall.ll | 2 +- test/CodeGen/X86/store-narrow.ll | 31 +- test/CodeGen/X86/tailcall-fastisel.ll | 14 +- test/CodeGen/X86/twoaddr-coalesce.ll | 2 +- test/CodeGen/X86/v2f32.ll | 57 +- test/CodeGen/X86/vec_cast.ll | 21 +- test/CodeGen/X86/vec_insert-6.ll | 2 +- test/CodeGen/X86/vec_insert-9.ll | 2 +- test/CodeGen/X86/vec_shift4.ll | 25 + test/CodeGen/X86/vec_shuffle-10.ll | 25 - test/CodeGen/X86/vec_shuffle-19.ll | 2 +- test/CodeGen/X86/vec_shuffle-20.ll | 2 +- test/CodeGen/X86/vec_shuffle-24.ll | 3 +- test/CodeGen/X86/vec_shuffle-3.ll | 20 - test/CodeGen/X86/vec_shuffle-37.ll | 14 + test/CodeGen/X86/vec_shuffle-4.ll | 12 - test/CodeGen/X86/vec_shuffle-5.ll | 13 - test/CodeGen/X86/vec_shuffle-6.ll | 42 - test/CodeGen/X86/vec_shuffle-7.ll | 11 - test/CodeGen/X86/vec_shuffle-8.ll | 10 - test/CodeGen/X86/vec_shuffle-9.ll | 21 - test/CodeGen/X86/widen_shuffle-1.ll | 8 +- test/CodeGen/X86/win_chkstk.ll | 45 + test/CodeGen/X86/zero-remat.ll | 2 +- test/DebugInfo/2010-01-18-DbgValue.ll | 51 - test/DebugInfo/2010-02-01-DbgValueCrash.ll | 34 - test/DebugInfo/2010-05-25-DotDebugLoc.ll | 239 -- test/DebugInfo/2010-05-28-Crash.ll | 44 - test/DebugInfo/2010-06-01-DeadArg-DbgInfo.ll | 53 - test/DebugInfo/2010-07-19-Crash.ll | 24 + test/DebugInfo/2010-08-04-StackVariable.ll | 124 + test/DebugInfo/printdbginfo2.ll | 2 +- test/Feature/NamedMDNode.ll | 2 +- test/Feature/linker_private_linkages.ll | 1 + test/Feature/metadata.ll | 6 +- test/Feature/unions.ll | 14 - test/FrontendC++/2009-07-15-LineNumbers.cpp | 2 +- test/FrontendC++/2010-07-19-nowarn.cpp | 21 + test/FrontendC++/2010-07-23-DeclLoc.cpp | 86 + test/FrontendC++/2010-08-31-ByValArg.cpp | 53 + test/FrontendC/2008-03-24-BitField-And-Alloca.c | 2 +- test/FrontendC/2010-05-18-asmsched.c | 4 +- test/FrontendC/2010-07-14-overconservative-align.c | 4 +- test/FrontendC/2010-07-14-ref-off-end.c | 4 +- test/FrontendC/2010-07-27-MinNoFoldConst.c | 18 + test/FrontendC/2010-08-12-asm-aggr-arg.c | 16 + test/FrontendC/asm-reg-var-local.c | 32 + test/FrontendC/cstring-align.c | 14 +- test/FrontendC/misaligned-param.c | 15 + test/FrontendC/vla-1.c | 5 +- test/FrontendC/vla-2.c | 10 + .../FrontendObjC++/2010-08-02-NonPODObjectValue.mm | 27 + test/FrontendObjC++/2010-08-04-Template.mm | 10 + test/FrontendObjC++/2010-08-06-X.Y-syntax.mm | 16 + test/FrontendObjC/2009-08-17-DebugInfo.m | 2 +- test/Integer/a15.ll | 27 - test/Integer/a15.ll.out | 21 - test/Integer/a17.ll | 25 - test/Integer/a17.ll.out | 20 - test/Integer/a31.ll | 25 - test/Integer/a31.ll.out | 20 - test/Integer/a33.ll | 26 - test/Integer/a33.ll.out | 20 - test/Integer/a63.ll | 25 - test/Integer/a63.ll.out | 20 - test/Integer/a7.ll | 31 - test/Integer/a7.ll.out | 25 - test/Integer/a9.ll | 25 - test/Integer/a9.ll.out | 19 - test/LLVMC/Alias.td | 24 + test/LLVMC/AppendCmdHook.td | 4 +- test/LLVMC/EmptyCompilationGraph.td | 2 +- test/LLVMC/EnvParentheses.td | 4 +- test/LLVMC/ExternOptions.td | 26 - test/LLVMC/ForwardAs.td | 6 +- test/LLVMC/ForwardTransformedValue.td | 12 +- test/LLVMC/ForwardValue.td | 12 +- test/LLVMC/HookWithArguments.td | 4 +- test/LLVMC/HookWithInFile.td | 4 +- test/LLVMC/Init.td | 4 +- test/LLVMC/LanguageMap.td | 29 + test/LLVMC/MultiValuedOption.td | 6 +- test/LLVMC/MultipleCompilationGraphs.td | 2 +- test/LLVMC/MultiplePluginPriorities.td | 17 - test/LLVMC/NoActions.td | 4 +- test/LLVMC/NoCompilationGraph.td | 2 +- test/LLVMC/OneOrMore.td | 4 +- test/LLVMC/OptionPreprocessor.td | 4 +- test/LLVMC/OutputSuffixHook.td | 8 +- test/LLVMC/TestWarnings.td | 2 +- test/Linker/metadata-a.ll | 15 + test/Linker/metadata-b.ll | 9 + test/MC/AsmParser/ARM/arm_instructions.s | 8 + test/MC/AsmParser/ELF/dg.exp | 6 + test/MC/AsmParser/ELF/directive_previous.s | 13 + test/MC/AsmParser/ELF/directive_section.s | 23 + test/MC/AsmParser/X86/x86_32-avx-clmul-encoding.s | 42 + test/MC/AsmParser/X86/x86_32-avx-encoding.s | 3241 +++++++++++++++++++ test/MC/AsmParser/X86/x86_32-encoding.s | 2889 +---------------- test/MC/AsmParser/X86/x86_32-fma3-encoding.s | 674 ++++ test/MC/AsmParser/X86/x86_32-new-encoder.s | 8 + test/MC/AsmParser/X86/x86_64-avx-clmul-encoding.s | 42 + test/MC/AsmParser/X86/x86_64-avx-encoding.s | 3318 ++++++++++++++++++++ test/MC/AsmParser/X86/x86_64-encoding.s | 2892 +---------------- test/MC/AsmParser/X86/x86_64-fma3-encoding.s | 674 ++++ test/MC/AsmParser/X86/x86_64-new-encoder.s | 13 +- test/MC/AsmParser/X86/x86_instruction_errors.s | 5 + test/MC/AsmParser/X86/x86_instructions.s | 26 +- test/MC/AsmParser/X86/x86_operands.s | 2 - test/MC/AsmParser/dg.exp | 5 +- test/MC/AsmParser/directive_abort.s | 6 +- test/MC/AsmParser/directive_elf_size.s | 8 + test/MC/AsmParser/directive_values.s | 17 + test/MC/AsmParser/dollars-in-identifiers.s | 7 + test/MC/AsmParser/macro-def-in-instantiation.s | 13 + test/MC/AsmParser/macros-parsing.s | 23 + test/MC/AsmParser/macros.s | 39 + test/MC/COFF/basic-coff.ll | 136 + test/MC/COFF/dg.exp | 5 + test/MC/COFF/switch-relocations.ll | 34 + test/MC/COFF/symbol-fragment-offset.ll | 182 ++ test/MC/Disassembler/arm-tests.txt | 34 + test/MC/Disassembler/neon-tests.txt | 3 + test/MC/Disassembler/thumb-tests.txt | 12 + test/MC/ELF/bss.ll | 8 + test/MC/ELF/dg.exp | 5 + test/Makefile | 39 +- test/Other/close-stderr.ll | 9 + test/Other/constant-fold-gep.ll | 42 - test/Other/inline-asm-newline-terminator.ll | 1 - test/Other/lint.ll | 4 +- test/Scripts/coff-dump.py | 566 ++++ test/Scripts/coff-dump.py.bat | 4 + test/TableGen/FieldAccess.td | 14 + test/TableGen/ListManip.td | 10 + test/TestRunner.sh | 37 +- test/Transforms/ABCD/basic.ll | 27 - test/Transforms/ABCD/dg.exp | 3 - test/Transforms/ConstProp/constant-expr.ll | 4 +- test/Transforms/ConstantMerge/dont-merge.ll | 14 + .../CorrelatedValuePropagation/2010-09-02-Trunc.ll | 25 + .../Transforms/CorrelatedValuePropagation/basic.ll | 83 + test/Transforms/CorrelatedValuePropagation/dg.exp | 3 + test/Transforms/GVN/2009-07-13-MemDepSortFail.ll | 2 +- test/Transforms/GlobalOpt/2008-07-17-addrspace.ll | 2 +- test/Transforms/GlobalOpt/crash.ll | 15 + .../IPConstantProp/2009-09-24-byval-ptr.ll | 4 +- .../IndVarSimplify/2003-12-10-IndVarDeadCode.ll | 25 - .../IndVarSimplify/2009-05-24-useafterfree.ll | 2 +- test/Transforms/IndVarSimplify/crash.ll | 36 + test/Transforms/IndVarSimplify/loop_evaluate10.ll | 2 +- test/Transforms/IndVarSimplify/uglygep.ll | 40 + test/Transforms/InstCombine/align-addr.ll | 33 +- test/Transforms/InstCombine/align-inc.ll | 12 - test/Transforms/InstCombine/bit-checks.ll | 11 + .../InstCombine/bitcast-scalar-to-vector.ll | 14 - test/Transforms/InstCombine/bitcast.ll | 105 + test/Transforms/InstCombine/intrinsics.ll | 34 +- test/Transforms/InstCombine/phi.ll | 21 + test/Transforms/InstCombine/shift-simplify.ll | 42 - test/Transforms/InstCombine/shift-trunc-shift.ll | 10 - test/Transforms/InstCombine/shift.ll | 102 +- test/Transforms/InstCombine/sqrt.ll | 32 + test/Transforms/InstCombine/trunc-mask-ext.ll | 38 - test/Transforms/InstCombine/trunc.ll | 99 + test/Transforms/InstCombine/urem-simplify-bug.ll | 2 +- test/Transforms/JumpThreading/2010-08-26-and.ll | 162 + test/Transforms/JumpThreading/basic.ll | 68 +- test/Transforms/JumpThreading/crash.ll | 50 + test/Transforms/JumpThreading/lvi-load.ll | 49 + .../LCSSA/2006-06-03-IncorrectIDFPhis.ll | 4 +- test/Transforms/LICM/crash.ll | 61 + test/Transforms/LICM/hoisting.ll | 16 + test/Transforms/LICM/scalar_promote.ll | 59 +- test/Transforms/LICM/sinking.ll | 14 + test/Transforms/LoopRotate/phi-duplicate.ll | 22 +- .../2010-07-15-IncorrectDomFrontierUpdate.ll | 20 + .../Transforms/LoopSimplify/indirectbr-backedge.ll | 35 + test/Transforms/LoopSimplify/preserve-scev.ll | 50 + .../LoopStrengthReduce/2008-08-06-CmpStride.ll | 23 - .../2009-02-09-ivs-different-sizes.ll | 33 - .../change-compare-stride-trickiness-0.ll | 29 - .../change-compare-stride-trickiness-1.ll | 28 - .../change-compare-stride-trickiness-2.ll | 58 - .../LoopStrengthReduce/insert-positions.ll | 69 - test/Transforms/LoopStrengthReduce/pr3571.ll | 2 +- test/Transforms/LoopStrengthReduce/uglygep.ll | 1 - test/Transforms/LoopUnswitch/infinite-loop.ll | 53 + test/Transforms/LowerAtomic/atomic-load.ll | 40 + test/Transforms/LowerAtomic/atomic-swap.ll | 26 + test/Transforms/LowerAtomic/barrier.ll | 10 + test/Transforms/LowerAtomic/dg.exp | 3 + test/Transforms/MergeFunc/vectors-and-arrays.ll | 18 + .../PartialSpecialize/two-specializations.ll | 22 +- test/Transforms/SCCP/ipsccp-addr-taken.ll | 28 + test/Transforms/SSI/2009-07-09-Invoke.ll | 71 - test/Transforms/SSI/2009-08-15-UnreachableBB.ll | 19 - test/Transforms/SSI/2009-08-17-CritEdge.ll | 15 - test/Transforms/SSI/2009-08-19-UnreachableBB2.ll | 22 - test/Transforms/SSI/dg.exp | 3 - test/Transforms/SSI/ssiphi.ll | 22 - test/Transforms/ScalarRepl/vector_promote.ll | 43 +- .../SimplifyCFG/2008-04-27-MultipleReturnCrash.ll | 2 +- test/Transforms/SimplifyCFG/basictest.ll | 1 - test/Transforms/SimplifyCFG/indirectbr.ll | 64 + test/Transforms/StripSymbols/2010-08-25-crash.ll | 19 + test/Transforms/TailCallElim/accum_recursion.ll | 65 +- .../TailCallElim/accum_recursion_constant_arg.ll | 20 - test/Transforms/TailCallElim/switch.ll | 34 - .../TailDup/2008-06-11-AvoidDupLoopHeader.ll | 2 +- test/Verifier/2010-08-07-PointerIntrinsic.ll | 21 + test/lit.cfg | 21 +- tools/CMakeLists.txt | 2 + tools/Makefile | 20 +- tools/bugpoint-passes/CMakeLists.txt | 3 + tools/bugpoint-passes/Makefile | 23 + tools/bugpoint-passes/TestPasses.cpp | 75 + tools/bugpoint-passes/bugpoint.exports | 0 tools/bugpoint/BugDriver.cpp | 29 +- tools/bugpoint/BugDriver.h | 67 +- tools/bugpoint/CMakeLists.txt | 1 - tools/bugpoint/CrashDebugger.cpp | 73 +- tools/bugpoint/ExecutionDriver.cpp | 24 +- tools/bugpoint/ExtractFunction.cpp | 93 +- tools/bugpoint/FindBugs.cpp | 8 +- tools/bugpoint/Miscompilation.cpp | 157 +- tools/bugpoint/OptimizerDriver.cpp | 113 +- tools/bugpoint/TestPasses.cpp | 75 - tools/bugpoint/ToolRunner.cpp | 12 +- tools/bugpoint/bugpoint.cpp | 26 +- tools/edis/CMakeLists.txt | 14 +- tools/edis/EDDisassembler.cpp | 407 --- tools/edis/EDDisassembler.h | 256 -- tools/edis/EDInfo.td | 1 - tools/edis/EDInst.cpp | 207 -- tools/edis/EDInst.h | 175 -- tools/edis/EDMain.cpp | 158 +- tools/edis/EDOperand.cpp | 284 -- tools/edis/EDOperand.h | 78 - tools/edis/EDToken.cpp | 208 -- tools/edis/EDToken.h | 135 - tools/edis/Makefile | 30 +- tools/gold/README.txt | 4 +- tools/gold/gold-plugin.cpp | 40 +- tools/llc/llc.cpp | 153 +- tools/lli/lli.cpp | 3 +- tools/llvm-as/llvm-as.cpp | 18 +- tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp | 17 +- tools/llvm-config/CMakeLists.txt | 2 +- tools/llvm-diff/CMakeLists.txt | 6 + tools/llvm-diff/DifferenceEngine.cpp | 676 ++++ tools/llvm-diff/DifferenceEngine.h | 179 ++ tools/llvm-diff/Makefile | 17 + tools/llvm-diff/llvm-diff.cpp | 331 ++ tools/llvm-dis/llvm-dis.cpp | 47 +- tools/llvm-extract/llvm-extract.cpp | 38 +- tools/llvm-ld/llvm-ld.cpp | 38 +- tools/llvm-link/llvm-link.cpp | 19 +- tools/llvm-mc/CMakeLists.txt | 3 +- tools/llvm-mc/Disassembler.cpp | 182 +- tools/llvm-mc/Disassembler.h | 7 +- tools/llvm-mc/Makefile | 4 +- tools/llvm-mc/llvm-mc.cpp | 177 +- tools/llvm-nm/llvm-nm.cpp | 15 +- tools/llvm-prof/llvm-prof.cpp | 15 +- tools/llvm-shlib/Makefile | 53 +- tools/llvmc/CMakeLists.txt | 2 +- tools/llvmc/Makefile | 8 +- tools/llvmc/doc/LLVMC-Reference.rst | 9 +- tools/llvmc/driver/Main.cpp | 14 - tools/llvmc/driver/Makefile | 13 - tools/llvmc/example/Hello/Hello.cpp | 33 - tools/llvmc/example/Hello/Makefile | 14 - tools/llvmc/example/Simple/Makefile | 15 - tools/llvmc/example/Simple/PluginMain.cpp | 1 - tools/llvmc/example/Simple/Simple.td | 37 - tools/llvmc/example/Skeleton/Makefile | 24 - tools/llvmc/example/Skeleton/README | 6 - tools/llvmc/example/Skeleton/driver/Main.cpp | 14 - tools/llvmc/example/Skeleton/driver/Makefile | 13 - tools/llvmc/example/Skeleton/plugins/Makefile | 18 - .../llvmc/example/Skeleton/plugins/Plugin/Makefile | 17 - .../example/Skeleton/plugins/Plugin/Plugin.td | 7 - .../example/Skeleton/plugins/Plugin/PluginMain.cpp | 1 - tools/llvmc/example/mcc16/Makefile | 18 - tools/llvmc/example/mcc16/README | 75 - tools/llvmc/example/mcc16/driver/Main.cpp | 54 - tools/llvmc/example/mcc16/driver/Makefile | 13 - tools/llvmc/example/mcc16/plugins/Makefile | 18 - .../llvmc/example/mcc16/plugins/PIC16Base/Makefile | 17 - .../example/mcc16/plugins/PIC16Base/PIC16Base.td | 234 -- .../example/mcc16/plugins/PIC16Base/PluginMain.cpp | 106 - tools/llvmc/examples/Hello/Hello.cpp | 29 + tools/llvmc/examples/Hello/Makefile | 14 + tools/llvmc/examples/Makefile | 14 + tools/llvmc/examples/Simple/Makefile | 15 + tools/llvmc/examples/Simple/Simple.cpp | 2 + tools/llvmc/examples/Simple/Simple.td | 41 + tools/llvmc/examples/Skeleton/AutoGenerated.td | 7 + tools/llvmc/examples/Skeleton/Hooks.cpp | 12 + tools/llvmc/examples/Skeleton/Main.cpp | 15 + tools/llvmc/examples/Skeleton/Makefile | 20 + tools/llvmc/examples/Skeleton/README | 6 + tools/llvmc/examples/mcc16/Hooks.cpp | 109 + tools/llvmc/examples/mcc16/Main.cpp | 57 + tools/llvmc/examples/mcc16/Makefile | 15 + tools/llvmc/examples/mcc16/PIC16.td | 234 ++ tools/llvmc/examples/mcc16/README | 75 + tools/llvmc/plugins/Base/Base.td.in | 377 --- tools/llvmc/plugins/Base/Hooks.cpp | 33 - tools/llvmc/plugins/Base/Makefile | 15 - tools/llvmc/plugins/Base/PluginMain.cpp | 1 - tools/llvmc/plugins/Clang/Clang.td | 101 - tools/llvmc/plugins/Clang/Makefile | 15 - tools/llvmc/plugins/Clang/PluginMain.cpp | 1 - tools/llvmc/plugins/Makefile | 18 - tools/llvmc/src/AutoGenerated.td | 17 + tools/llvmc/src/Base.td.in | 382 +++ tools/llvmc/src/Clang.td | 87 + tools/llvmc/src/Hooks.cpp | 33 + tools/llvmc/src/Main.cpp | 16 + tools/llvmc/src/Makefile | 14 + tools/lto/LTOCodeGenerator.cpp | 50 +- tools/lto/LTOCodeGenerator.h | 6 +- tools/lto/LTOModule.cpp | 805 +++-- tools/lto/LTOModule.h | 1 + tools/lto/Makefile | 13 +- tools/lto/lto.cpp | 28 +- tools/lto/lto.exports | 3 + tools/opt/AnalysisWrappers.cpp | 22 +- tools/opt/GraphPrinters.cpp | 40 +- tools/opt/PrintSCC.cpp | 38 +- tools/opt/opt.cpp | 139 +- unittests/ADT/SmallVectorTest.cpp | 4 +- unittests/ADT/StringRefTest.cpp | 9 + unittests/ADT/TripleTest.cpp | 117 +- unittests/Analysis/Makefile | 15 + unittests/Analysis/ScalarEvolutionTest.cpp | 82 + unittests/ExecutionEngine/JIT/JITTest.cpp | 27 - unittests/Makefile | 2 +- unittests/Makefile.unittest | 4 +- unittests/Support/Casting.cpp | 154 + unittests/Support/ConstantRangeTest.cpp | 69 +- unittests/Support/ValueHandleTest.cpp | 1 - unittests/VMCore/DerivedTypesTest.cpp | 57 +- unittests/VMCore/InstructionsTest.cpp | 4 +- unittests/VMCore/MetadataTest.cpp | 7 +- unittests/VMCore/PassManagerTest.cpp | 12 +- utils/FileCheck/FileCheck.cpp | 160 +- utils/FileUpdate/FileUpdate.cpp | 24 +- utils/Makefile | 7 +- utils/RegressionFinder.pl | 186 -- utils/TableGen/ARMDecoderEmitter.cpp | 61 +- utils/TableGen/AsmMatcherEmitter.cpp | 164 +- utils/TableGen/AsmWriterEmitter.cpp | 2 +- utils/TableGen/CallingConvEmitter.cpp | 2 + utils/TableGen/ClangAttrEmitter.cpp | 582 +++- utils/TableGen/ClangAttrEmitter.h | 39 + utils/TableGen/CodeGenDAGPatterns.cpp | 4 +- utils/TableGen/CodeGenInstruction.cpp | 1 + utils/TableGen/CodeGenInstruction.h | 1 + utils/TableGen/CodeGenIntrinsics.h | 2 +- utils/TableGen/CodeGenRegisters.h | 32 + utils/TableGen/CodeGenTarget.cpp | 10 +- utils/TableGen/DAGISelEmitter.cpp | 48 - utils/TableGen/DAGISelEmitter.h | 2 - utils/TableGen/DAGISelMatcherEmitter.cpp | 2 +- utils/TableGen/DAGISelMatcherGen.cpp | 7 +- utils/TableGen/EDEmitter.cpp | 59 +- utils/TableGen/EDEmitter.h | 3 - utils/TableGen/FastISelEmitter.cpp | 24 +- utils/TableGen/InstrInfoEmitter.cpp | 1 + utils/TableGen/IntrinsicEmitter.cpp | 4 +- utils/TableGen/LLVMCConfigurationEmitter.cpp | 646 ++-- utils/TableGen/NeonEmitter.cpp | 11 +- utils/TableGen/Record.cpp | 28 +- utils/TableGen/Record.h | 12 +- utils/TableGen/RegisterInfoEmitter.cpp | 30 +- utils/TableGen/TableGen.cpp | 98 +- utils/buildit/GNUmakefile | 16 +- utils/buildit/build_llvm | 33 +- utils/lit/lit/ExampleTests/lit.cfg | 3 + utils/lit/lit/ExampleTests/required-and-missing.c | 4 + utils/lit/lit/ExampleTests/required-and-present.c | 2 + utils/lit/lit/TestFormats.py | 7 + utils/lit/lit/TestRunner.py | 86 +- utils/lit/lit/TestingConfig.py | 9 +- utils/lit/lit/lit.py | 5 +- utils/llvm-lit/Makefile | 21 + utils/llvm-lit/llvm-lit.in | 21 + utils/llvm.grm | 4 + utils/llvmdo | 4 - utils/mkpatch | 37 - utils/userloc.pl | 216 -- utils/valgrind/i386-pc-linux-gnu.supp | 34 + utils/valgrind/x86_64-pc-linux-gnu.supp | 43 +- utils/vim/llvm.vim | 10 +- utils/vim/vimrc | 129 +- 1450 files changed, 67197 insertions(+), 39884 deletions(-) create mode 100644 cmake/modules/CMakeLists.txt create mode 100644 cmake/modules/ChooseMSVCCRT.cmake create mode 100644 cmake/modules/LLVM.cmake create mode 100644 cmake/modules/VersionFromVCS.cmake create mode 100644 docs/CommandGuide/llvm-diff.pod create mode 100644 include/llvm/ADT/NullablePtr.h create mode 100644 include/llvm/Analysis/RegionInfo.h create mode 100644 include/llvm/Analysis/RegionIterator.h create mode 100644 include/llvm/Analysis/RegionPrinter.h delete mode 100644 include/llvm/Assembly/AsmAnnotationWriter.h create mode 100644 include/llvm/Assembly/AssemblyAnnotationWriter.h create mode 100644 include/llvm/CompilerDriver/AutoGenerated.h delete mode 100644 include/llvm/CompilerDriver/ForceLinkage.h delete mode 100644 include/llvm/CompilerDriver/ForceLinkageMacros.h create mode 100644 include/llvm/CompilerDriver/Main.h delete mode 100644 include/llvm/CompilerDriver/Plugin.h 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/MC/ELFObjectWriter.h create mode 100644 include/llvm/MC/MCDwarf.h create mode 100644 include/llvm/MC/MCELFSymbolFlags.h delete mode 100644 include/llvm/MC/MCParser/AsmParser.h create mode 100644 include/llvm/PassRegistry.h create mode 100644 include/llvm/Support/CrashRecoveryContext.h delete mode 100644 include/llvm/Support/SlowOperationInformer.h delete mode 100644 include/llvm/Transforms/Utils/SSI.h create mode 100644 include/llvm/Transforms/Utils/ValueMapper.h create mode 100644 lib/Analysis/RegionInfo.cpp create mode 100644 lib/Analysis/RegionPrinter.cpp create mode 100644 lib/Analysis/TypeBasedAliasAnalysis.cpp create mode 100644 lib/CodeGen/LocalStackSlotAllocation.cpp delete mode 100644 lib/CodeGen/OptimizeExts.cpp create mode 100644 lib/CodeGen/PeepholeOptimizer.cpp create mode 100644 lib/CodeGen/RenderMachineFunction.cpp create mode 100644 lib/CodeGen/RenderMachineFunction.h create mode 100644 lib/CodeGen/SplitKit.cpp create mode 100644 lib/CodeGen/SplitKit.h create mode 100644 lib/CodeGen/Splitter.cpp create mode 100644 lib/CodeGen/Splitter.h delete mode 100644 lib/CompilerDriver/Plugin.cpp create mode 100644 lib/MC/ELFObjectWriter.cpp create mode 100644 lib/MC/MCDisassembler/CMakeLists.txt create mode 100644 lib/MC/MCDisassembler/EDDisassembler.cpp create mode 100644 lib/MC/MCDisassembler/EDDisassembler.h create mode 100644 lib/MC/MCDisassembler/EDInfo.h create mode 100644 lib/MC/MCDisassembler/EDInst.cpp create mode 100644 lib/MC/MCDisassembler/EDInst.h create mode 100644 lib/MC/MCDisassembler/EDOperand.cpp create mode 100644 lib/MC/MCDisassembler/EDOperand.h create mode 100644 lib/MC/MCDisassembler/EDToken.cpp create mode 100644 lib/MC/MCDisassembler/EDToken.h create mode 100644 lib/MC/MCDisassembler/Makefile create mode 100644 lib/MC/MCDwarf.cpp create mode 100644 lib/MC/MCELFStreamer.cpp create mode 100644 lib/Support/CrashRecoveryContext.cpp delete mode 100644 lib/Support/SlowOperationInformer.cpp create mode 100644 lib/Target/ARM/ARMAsmPrinter.cpp create mode 100644 lib/Target/ARM/ARMFastISel.cpp create mode 100644 lib/Target/ARM/ARMGlobalMerge.cpp create mode 100644 lib/Target/ARM/ARMMCInstLower.cpp create mode 100644 lib/Target/ARM/ARMMCInstLower.h delete mode 100644 lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp delete mode 100644 lib/Target/ARM/AsmPrinter/ARMMCInstLower.cpp delete mode 100644 lib/Target/ARM/AsmPrinter/ARMMCInstLower.h delete mode 100644 lib/Target/MSIL/CMakeLists.txt delete mode 100644 lib/Target/MSIL/MSILWriter.cpp delete mode 100644 lib/Target/MSIL/MSILWriter.h delete mode 100644 lib/Target/MSIL/Makefile delete mode 100644 lib/Target/MSIL/README.TXT delete mode 100644 lib/Target/MSIL/TargetInfo/CMakeLists.txt delete mode 100644 lib/Target/MSIL/TargetInfo/MSILTargetInfo.cpp delete mode 100644 lib/Target/MSIL/TargetInfo/Makefile delete mode 100644 lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp delete mode 100644 lib/Target/X86/AsmPrinter/X86AsmPrinter.h create mode 100644 lib/Target/X86/AsmPrinter/X86InstComments.cpp create mode 100644 lib/Target/X86/AsmPrinter/X86InstComments.h delete mode 100644 lib/Target/X86/AsmPrinter/X86MCInstLower.cpp delete mode 100644 lib/Target/X86/AsmPrinter/X86MCInstLower.h create mode 100644 lib/Target/X86/X86AsmPrinter.cpp create mode 100644 lib/Target/X86/X86AsmPrinter.h delete mode 100644 lib/Target/X86/X86FloatingPointRegKill.cpp create mode 100644 lib/Target/X86/X86InstrFMA.td create mode 100644 lib/Target/X86/X86MCInstLower.cpp create mode 100644 lib/Target/X86/X86MCInstLower.h create mode 100644 lib/Target/X86/X86ShuffleDecode.h delete mode 100644 lib/Transforms/Scalar/ABCD.cpp create mode 100644 lib/Transforms/Scalar/CorrelatedValuePropagation.cpp create mode 100644 lib/Transforms/Scalar/LowerAtomic.cpp delete mode 100644 lib/Transforms/Utils/SSI.cpp delete mode 100644 lib/Transforms/Utils/ValueMapper.h create mode 100644 lib/VMCore/PassRegistry.cpp delete mode 100644 runtime/libprofile/exported_symbols.lst create mode 100644 runtime/libprofile/libprofile.exports create mode 100644 test/Analysis/BasicAA/getmodrefinfo-cs-cs.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/dg.exp 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 delete mode 100644 test/Assembler/2010-01-06-UnionType.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/comment.ll create mode 100644 test/Bitcode/AutoUpgradeGlobals.ll create mode 100644 test/Bitcode/AutoUpgradeGlobals.ll.bc create mode 100644 test/Bitcode/neon-intrinsics.ll create mode 100644 test/Bitcode/neon-intrinsics.ll.bc create mode 100644 test/BugPoint/metadata.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/bfi.ll create mode 100644 test/CodeGen/ARM/code-placement.ll create mode 100644 test/CodeGen/ARM/fast-isel.ll create mode 100644 test/CodeGen/Alpha/2010-08-01-mulreduce64.ll create mode 100644 test/CodeGen/CellSPU/arg_ret.ll create mode 100644 test/CodeGen/CellSPU/v2f32.ll create mode 100644 test/CodeGen/CellSPU/v2i32.ll create mode 100644 test/CodeGen/Generic/2010-07-27-DAGCombineCrash.ll create mode 100644 test/CodeGen/Mips/2010-07-20-Select.ll create mode 100644 test/CodeGen/Mips/2010-07-20-Switch.ll delete mode 100644 test/CodeGen/PowerPC/2008-01-25-EmptyFunction.ll create mode 100644 test/CodeGen/PowerPC/empty-functions.ll create mode 100644 test/CodeGen/Thumb/2010-07-15-debugOrdering.ll create mode 100644 test/CodeGen/Thumb/barrier.ll create mode 100644 test/CodeGen/Thumb2/2010-08-10-VarSizedAllocaBug.ll create mode 100644 test/CodeGen/Thumb2/bfi.ll create mode 100644 test/CodeGen/Thumb2/cortex-fp.ll create mode 100644 test/CodeGen/Thumb2/machine-licm-vdup.ll create mode 100644 test/CodeGen/Thumb2/thumb2-badreg-operands.ll create mode 100644 test/CodeGen/Thumb2/thumb2-barrier.ll delete mode 100644 test/CodeGen/X86/2007-06-14-branchfold.ll delete mode 100644 test/CodeGen/X86/2008-01-25-EmptyFunction.ll create mode 100644 test/CodeGen/X86/2008-08-06-CmpStride.ll create mode 100644 test/CodeGen/X86/2009-02-09-ivs-different-sizes.ll create mode 100644 test/CodeGen/X86/2010-01-18-DbgValue.ll create mode 100644 test/CodeGen/X86/2010-02-01-DbgValueCrash.ll create mode 100644 test/CodeGen/X86/2010-05-25-DotDebugLoc.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-07-11-FPStackLoneUse.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-10-DbgConstant.ll create mode 100644 test/CodeGen/X86/2010-09-01-RemoveCopyByCommutingDef.ll create mode 100644 test/CodeGen/X86/MachineSink-PHIUse.ll create mode 100644 test/CodeGen/X86/avx-128.ll create mode 100644 test/CodeGen/X86/avx-256.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/barrier-sse.ll create mode 100644 test/CodeGen/X86/barrier.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/empty-functions.ll create mode 100644 test/CodeGen/X86/fast-isel-atomic.ll create mode 100644 test/CodeGen/X86/fast-isel-cmp-branch.ll create mode 100644 test/CodeGen/X86/force-align-stack.ll create mode 100644 test/CodeGen/X86/insert-positions.ll create mode 100644 test/CodeGen/X86/int-intrinsic.ll create mode 100644 test/CodeGen/X86/lock-inst-encoding.ll create mode 100644 test/CodeGen/X86/lsr-interesting-step.ll create mode 100644 test/CodeGen/X86/lsr-normalization.ll create mode 100644 test/CodeGen/X86/lsr-static-addr.ll delete mode 100644 test/CodeGen/X86/narrow_op-2.ll create mode 100644 test/CodeGen/X86/pr7882.ll create mode 100644 test/CodeGen/X86/shl-anyext.ll create mode 100644 test/CodeGen/X86/sse1.ll delete mode 100644 test/CodeGen/X86/stack-color-with-reg.ll create mode 100644 test/CodeGen/X86/vec_shift4.ll delete mode 100644 test/CodeGen/X86/vec_shuffle-10.ll delete mode 100644 test/CodeGen/X86/vec_shuffle-3.ll create mode 100644 test/CodeGen/X86/vec_shuffle-37.ll delete mode 100644 test/CodeGen/X86/vec_shuffle-4.ll delete mode 100644 test/CodeGen/X86/vec_shuffle-5.ll delete mode 100644 test/CodeGen/X86/vec_shuffle-6.ll delete mode 100644 test/CodeGen/X86/vec_shuffle-7.ll delete mode 100644 test/CodeGen/X86/vec_shuffle-8.ll delete mode 100644 test/CodeGen/X86/vec_shuffle-9.ll create mode 100644 test/CodeGen/X86/win_chkstk.ll delete mode 100644 test/DebugInfo/2010-01-18-DbgValue.ll delete mode 100644 test/DebugInfo/2010-02-01-DbgValueCrash.ll delete mode 100644 test/DebugInfo/2010-05-25-DotDebugLoc.ll delete mode 100644 test/DebugInfo/2010-05-28-Crash.ll delete mode 100644 test/DebugInfo/2010-06-01-DeadArg-DbgInfo.ll create mode 100644 test/DebugInfo/2010-07-19-Crash.ll create mode 100644 test/DebugInfo/2010-08-04-StackVariable.ll delete mode 100644 test/Feature/unions.ll create mode 100644 test/FrontendC++/2010-07-19-nowarn.cpp create mode 100644 test/FrontendC++/2010-07-23-DeclLoc.cpp create mode 100644 test/FrontendC++/2010-08-31-ByValArg.cpp create mode 100644 test/FrontendC/2010-07-27-MinNoFoldConst.c create mode 100644 test/FrontendC/2010-08-12-asm-aggr-arg.c create mode 100644 test/FrontendC/asm-reg-var-local.c create mode 100644 test/FrontendC/misaligned-param.c create mode 100644 test/FrontendC/vla-2.c create mode 100644 test/FrontendObjC++/2010-08-02-NonPODObjectValue.mm create mode 100644 test/FrontendObjC++/2010-08-04-Template.mm create mode 100644 test/FrontendObjC++/2010-08-06-X.Y-syntax.mm delete mode 100644 test/Integer/a15.ll delete mode 100644 test/Integer/a15.ll.out delete mode 100644 test/Integer/a17.ll delete mode 100644 test/Integer/a17.ll.out delete mode 100644 test/Integer/a31.ll delete mode 100644 test/Integer/a31.ll.out delete mode 100644 test/Integer/a33.ll delete mode 100644 test/Integer/a33.ll.out delete mode 100644 test/Integer/a63.ll delete mode 100644 test/Integer/a63.ll.out delete mode 100644 test/Integer/a7.ll delete mode 100644 test/Integer/a7.ll.out delete mode 100644 test/Integer/a9.ll delete mode 100644 test/Integer/a9.ll.out create mode 100644 test/LLVMC/Alias.td delete mode 100644 test/LLVMC/ExternOptions.td create mode 100644 test/LLVMC/LanguageMap.td delete mode 100644 test/LLVMC/MultiplePluginPriorities.td create mode 100644 test/Linker/metadata-a.ll create mode 100644 test/Linker/metadata-b.ll create mode 100644 test/MC/AsmParser/ARM/arm_instructions.s create mode 100644 test/MC/AsmParser/ELF/dg.exp create mode 100644 test/MC/AsmParser/ELF/directive_previous.s create mode 100644 test/MC/AsmParser/ELF/directive_section.s create mode 100644 test/MC/AsmParser/X86/x86_32-avx-clmul-encoding.s create mode 100644 test/MC/AsmParser/X86/x86_32-avx-encoding.s create mode 100644 test/MC/AsmParser/X86/x86_32-fma3-encoding.s create mode 100644 test/MC/AsmParser/X86/x86_64-avx-clmul-encoding.s create mode 100644 test/MC/AsmParser/X86/x86_64-avx-encoding.s create mode 100644 test/MC/AsmParser/X86/x86_64-fma3-encoding.s create mode 100644 test/MC/AsmParser/X86/x86_instruction_errors.s create mode 100644 test/MC/AsmParser/directive_elf_size.s create mode 100644 test/MC/AsmParser/dollars-in-identifiers.s create mode 100644 test/MC/AsmParser/macro-def-in-instantiation.s create mode 100644 test/MC/AsmParser/macros-parsing.s create mode 100644 test/MC/AsmParser/macros.s create mode 100644 test/MC/COFF/basic-coff.ll create mode 100644 test/MC/COFF/dg.exp create mode 100644 test/MC/COFF/switch-relocations.ll create mode 100644 test/MC/COFF/symbol-fragment-offset.ll create mode 100644 test/MC/ELF/bss.ll create mode 100644 test/MC/ELF/dg.exp create mode 100644 test/Other/close-stderr.ll create mode 100755 test/Scripts/coff-dump.py create mode 100644 test/Scripts/coff-dump.py.bat create mode 100644 test/TableGen/FieldAccess.td create mode 100644 test/TableGen/ListManip.td delete mode 100644 test/Transforms/ABCD/basic.ll delete mode 100644 test/Transforms/ABCD/dg.exp create mode 100644 test/Transforms/CorrelatedValuePropagation/2010-09-02-Trunc.ll create mode 100644 test/Transforms/CorrelatedValuePropagation/basic.ll create mode 100644 test/Transforms/CorrelatedValuePropagation/dg.exp delete mode 100644 test/Transforms/IndVarSimplify/2003-12-10-IndVarDeadCode.ll create mode 100644 test/Transforms/IndVarSimplify/uglygep.ll delete mode 100644 test/Transforms/InstCombine/align-inc.ll delete mode 100644 test/Transforms/InstCombine/bitcast-scalar-to-vector.ll create mode 100644 test/Transforms/InstCombine/bitcast.ll delete mode 100644 test/Transforms/InstCombine/shift-simplify.ll delete mode 100644 test/Transforms/InstCombine/shift-trunc-shift.ll create mode 100644 test/Transforms/InstCombine/sqrt.ll delete mode 100644 test/Transforms/InstCombine/trunc-mask-ext.ll create mode 100644 test/Transforms/InstCombine/trunc.ll create mode 100644 test/Transforms/JumpThreading/2010-08-26-and.ll create mode 100644 test/Transforms/JumpThreading/lvi-load.ll create mode 100644 test/Transforms/LICM/crash.ll create mode 100644 test/Transforms/LoopSimplify/2010-07-15-IncorrectDomFrontierUpdate.ll create mode 100644 test/Transforms/LoopSimplify/indirectbr-backedge.ll create mode 100644 test/Transforms/LoopSimplify/preserve-scev.ll delete mode 100644 test/Transforms/LoopStrengthReduce/2008-08-06-CmpStride.ll delete mode 100644 test/Transforms/LoopStrengthReduce/2009-02-09-ivs-different-sizes.ll delete mode 100644 test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-0.ll delete mode 100644 test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-1.ll delete mode 100644 test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-2.ll delete mode 100644 test/Transforms/LoopStrengthReduce/insert-positions.ll create mode 100644 test/Transforms/LoopUnswitch/infinite-loop.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/LowerAtomic/dg.exp create mode 100644 test/Transforms/MergeFunc/vectors-and-arrays.ll create mode 100644 test/Transforms/SCCP/ipsccp-addr-taken.ll delete mode 100644 test/Transforms/SSI/2009-07-09-Invoke.ll delete mode 100644 test/Transforms/SSI/2009-08-15-UnreachableBB.ll delete mode 100644 test/Transforms/SSI/2009-08-17-CritEdge.ll delete mode 100644 test/Transforms/SSI/2009-08-19-UnreachableBB2.ll delete mode 100644 test/Transforms/SSI/dg.exp delete mode 100644 test/Transforms/SSI/ssiphi.ll create mode 100644 test/Transforms/SimplifyCFG/indirectbr.ll create mode 100644 test/Transforms/StripSymbols/2010-08-25-crash.ll delete mode 100644 test/Transforms/TailCallElim/accum_recursion_constant_arg.ll delete mode 100644 test/Transforms/TailCallElim/switch.ll create mode 100644 test/Verifier/2010-08-07-PointerIntrinsic.ll 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 delete mode 100644 tools/bugpoint/TestPasses.cpp delete mode 100644 tools/edis/EDDisassembler.cpp delete mode 100644 tools/edis/EDDisassembler.h delete mode 100644 tools/edis/EDInfo.td delete mode 100644 tools/edis/EDInst.cpp delete mode 100644 tools/edis/EDInst.h delete mode 100644 tools/edis/EDOperand.cpp delete mode 100644 tools/edis/EDOperand.h delete mode 100644 tools/edis/EDToken.cpp delete mode 100644 tools/edis/EDToken.h create mode 100644 tools/llvm-diff/CMakeLists.txt create mode 100644 tools/llvm-diff/DifferenceEngine.cpp create mode 100644 tools/llvm-diff/DifferenceEngine.h create mode 100644 tools/llvm-diff/Makefile create mode 100644 tools/llvm-diff/llvm-diff.cpp delete mode 100644 tools/llvmc/driver/Main.cpp delete mode 100644 tools/llvmc/driver/Makefile delete mode 100644 tools/llvmc/example/Hello/Hello.cpp delete mode 100644 tools/llvmc/example/Hello/Makefile delete mode 100644 tools/llvmc/example/Simple/Makefile delete mode 100644 tools/llvmc/example/Simple/PluginMain.cpp delete mode 100644 tools/llvmc/example/Simple/Simple.td delete mode 100644 tools/llvmc/example/Skeleton/Makefile delete mode 100644 tools/llvmc/example/Skeleton/README delete mode 100644 tools/llvmc/example/Skeleton/driver/Main.cpp delete mode 100644 tools/llvmc/example/Skeleton/driver/Makefile delete mode 100644 tools/llvmc/example/Skeleton/plugins/Makefile delete mode 100644 tools/llvmc/example/Skeleton/plugins/Plugin/Makefile delete mode 100644 tools/llvmc/example/Skeleton/plugins/Plugin/Plugin.td delete mode 100644 tools/llvmc/example/Skeleton/plugins/Plugin/PluginMain.cpp delete mode 100644 tools/llvmc/example/mcc16/Makefile delete mode 100644 tools/llvmc/example/mcc16/README delete mode 100644 tools/llvmc/example/mcc16/driver/Main.cpp delete mode 100644 tools/llvmc/example/mcc16/driver/Makefile delete mode 100644 tools/llvmc/example/mcc16/plugins/Makefile delete mode 100644 tools/llvmc/example/mcc16/plugins/PIC16Base/Makefile delete mode 100644 tools/llvmc/example/mcc16/plugins/PIC16Base/PIC16Base.td delete mode 100644 tools/llvmc/example/mcc16/plugins/PIC16Base/PluginMain.cpp create mode 100644 tools/llvmc/examples/Hello/Hello.cpp create mode 100644 tools/llvmc/examples/Hello/Makefile create mode 100644 tools/llvmc/examples/Makefile create mode 100644 tools/llvmc/examples/Simple/Makefile create mode 100644 tools/llvmc/examples/Simple/Simple.cpp create mode 100644 tools/llvmc/examples/Simple/Simple.td create mode 100644 tools/llvmc/examples/Skeleton/AutoGenerated.td create mode 100644 tools/llvmc/examples/Skeleton/Hooks.cpp create mode 100644 tools/llvmc/examples/Skeleton/Main.cpp create mode 100644 tools/llvmc/examples/Skeleton/Makefile create mode 100644 tools/llvmc/examples/Skeleton/README create mode 100644 tools/llvmc/examples/mcc16/Hooks.cpp create mode 100644 tools/llvmc/examples/mcc16/Main.cpp create mode 100644 tools/llvmc/examples/mcc16/Makefile create mode 100644 tools/llvmc/examples/mcc16/PIC16.td create mode 100644 tools/llvmc/examples/mcc16/README delete mode 100644 tools/llvmc/plugins/Base/Base.td.in delete mode 100644 tools/llvmc/plugins/Base/Hooks.cpp delete mode 100644 tools/llvmc/plugins/Base/Makefile delete mode 100644 tools/llvmc/plugins/Base/PluginMain.cpp delete mode 100644 tools/llvmc/plugins/Clang/Clang.td delete mode 100644 tools/llvmc/plugins/Clang/Makefile delete mode 100644 tools/llvmc/plugins/Clang/PluginMain.cpp delete mode 100644 tools/llvmc/plugins/Makefile create mode 100644 tools/llvmc/src/AutoGenerated.td create mode 100644 tools/llvmc/src/Base.td.in create mode 100644 tools/llvmc/src/Clang.td create mode 100644 tools/llvmc/src/Hooks.cpp create mode 100644 tools/llvmc/src/Main.cpp create mode 100644 tools/llvmc/src/Makefile create mode 100644 unittests/Analysis/Makefile create mode 100644 unittests/Analysis/ScalarEvolutionTest.cpp create mode 100644 unittests/Support/Casting.cpp delete mode 100755 utils/RegressionFinder.pl create mode 100644 utils/lit/lit/ExampleTests/required-and-missing.c create mode 100644 utils/lit/lit/ExampleTests/required-and-present.c create mode 100644 utils/llvm-lit/Makefile create mode 100644 utils/llvm-lit/llvm-lit.in delete mode 100755 utils/mkpatch delete mode 100755 utils/userloc.pl diff --git a/CMakeLists.txt b/CMakeLists.txt index d4f2221c9fdd5..a6099d17c56a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,20 @@ # See docs/CMake.html for instructions about how to build LLVM with CMake. project(LLVM) -cmake_minimum_required(VERSION 2.6.1) +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(PACKAGE_VERSION "2.8") +include(VersionFromVCS) +add_version_info_from_vcs(PACKAGE_VERSION) set(PACKAGE_NAME llvm) -set(PACKAGE_VERSION 2.8svn) set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "llvmbugs@cs.uiuc.edu") @@ -53,7 +63,6 @@ set(LLVM_ALL_TARGETS CppBackend Mips MBlaze - MSIL MSP430 PIC16 PowerPC @@ -124,13 +133,6 @@ configure_file( set(llvm_builded_incs_dir ${LLVM_BINARY_DIR}/include/llvm) -# Add path for custom modules -set(CMAKE_MODULE_PATH - ${CMAKE_MODULE_PATH} - "${LLVM_MAIN_SRC_DIR}/cmake" - "${LLVM_MAIN_SRC_DIR}/cmake/modules" - ) - include(AddLLVMDefinitions) if(WIN32) @@ -214,14 +216,8 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) if( MSVC ) - # List of valid CRTs for MSVC - set(MSVC_CRT - MD - MDd - MT - MTd) - - set(LLVM_USE_CRT "" CACHE STRING "Specify VC++ CRT to use for debug/release configurations.") + include(ChooseMSVCCRT) + add_llvm_definitions( -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS ) add_llvm_definitions( -D_SCL_SECURE_NO_WARNINGS -DCRT_NONSTDC_NO_WARNINGS ) add_llvm_definitions( -D_SCL_SECURE_NO_DEPRECATE ) @@ -231,15 +227,6 @@ if( MSVC ) # Suppress 'new behavior: elements of array 'array' will be default initialized' add_llvm_definitions( -wd4351 ) - if (NOT ${LLVM_USE_CRT} STREQUAL "") - list(FIND MSVC_CRT ${LLVM_USE_CRT} idx) - if (idx LESS 0) - message(FATAL_ERROR "Invalid value for LLVM_USE_CRT: ${LLVM_USE_CRT}. Valid options are one of: ${MSVC_CRT}") - endif (idx LESS 0) - add_llvm_definitions("/${LLVM_USE_CRT}") - message(STATUS "Using VC++ CRT: ${LLVM_USE_CRT}") - endif (NOT ${LLVM_USE_CRT} STREQUAL "") - # Enable warnings if (LLVM_ENABLE_WARNINGS) add_llvm_definitions( /W4 /Wall ) @@ -308,6 +295,7 @@ add_subdirectory(lib/Analysis) add_subdirectory(lib/Analysis/IPA) add_subdirectory(lib/MC) add_subdirectory(lib/MC/MCParser) +add_subdirectory(lib/MC/MCDisassembler) add_subdirectory(test) add_subdirectory(utils/FileCheck) @@ -372,6 +360,8 @@ add_subdirectory(tools) option(LLVM_BUILD_EXAMPLES "Build LLVM example programs." OFF) add_subdirectory(examples) +add_subdirectory(cmake/modules) + install(DIRECTORY include/ DESTINATION include FILES_MATCHING diff --git a/CREDITS.TXT b/CREDITS.TXT index e58b85fdbd9c6..aeecfe2e21e1d 100644 --- a/CREDITS.TXT +++ b/CREDITS.TXT @@ -134,6 +134,11 @@ 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 + N: Lang Hames E: lhames@gmail.com D: PBQP-based register allocator @@ -247,6 +252,12 @@ N: Scott Michel E: scottm@aero.org D: Added STI Cell SPU backend. +N: Takumi Nakamura +E: geek4civic@gmail.com +E: chapuni@hf.rim.or.jp +D: Cygwin and MinGW support. +S: Yokohama, Japan + N: Edward O'Callaghan E: eocallaghan@auroraux.org W: http://www.auroraux.org @@ -277,6 +288,11 @@ N: Sandeep Patel E: deeppatel1987@gmail.com D: ARM calling conventions rewrite, hard float support +N: Wesley Peck +E: peckw@wesleypeck.com +W: http://wesleypeck.com/ +D: MicroBlaze backend + N: Vladimir Prus W: http://vladimir_prus.blogspot.com E: ghost@cs.msu.su @@ -288,7 +304,10 @@ D: MSIL backend N: Duncan Sands E: baldrick@free.fr -D: Ada front-end, exception handling improvements +D: Ada support in llvm-gcc +D: Dragonegg plugin +D: Exception handling improvements +D: Type legalizer rewrite N: Ruchira Sasanka E: sasanka@uiuc.edu @@ -306,6 +325,10 @@ 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. + N: Reid Spencer E: rspencer@reidspencer.com W: http://reidspencer.com/ @@ -329,14 +352,9 @@ E: xerxes@zafena.se D: Cmake dependency chain and various bug fixes N: Bill Wendling -E: isanbard@gmail.com +E: wendling@apple.com D: Bunches of stuff N: Bob Wilson E: bob.wilson@acm.org D: Advanced SIMD (NEON) support in the ARM backend - -N: Wesley Peck -E: peckw@wesleypeck.com -W: http://wesleypeck.com/ -D: MicroBlaze backend diff --git a/Makefile b/Makefile index d42f887b6b18f..ae650b7f2d938 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,8 @@ endif ifeq ($(MAKECMDGOALS),install-clang) DIRS := tools/clang/tools/driver tools/clang/lib/Headers \ - tools/clang/runtime tools/clang/docs + tools/clang/runtime tools/clang/docs \ + tools/lto OPTIONAL_DIRS := NO_INSTALL = 1 endif @@ -78,7 +79,8 @@ ifeq ($(MAKECMDGOALS),install-clang-c) endif ifeq ($(MAKECMDGOALS),clang-only) - DIRS := $(filter-out tools runtime docs unittests, $(DIRS)) tools/clang + DIRS := $(filter-out tools runtime docs unittests, $(DIRS)) \ + tools/clang tools/lto OPTIONAL_DIRS := endif @@ -110,7 +112,8 @@ cross-compile-build-tools: --host=$(BUILD_TRIPLE) --target=$(BUILD_TRIPLE); \ cd .. ; \ fi; \ - ($(MAKE) -C BuildTools \ + (unset SDKROOT; \ + $(MAKE) -C BuildTools \ BUILD_DIRS_ONLY=1 \ UNIVERSAL= \ ENABLE_OPTIMIZED=$(ENABLE_OPTIMIZED) \ @@ -167,7 +170,7 @@ FilesToConfig := \ include/llvm/Config/AsmParsers.def \ include/llvm/Config/Disassemblers.def \ include/llvm/System/DataTypes.h \ - tools/llvmc/plugins/Base/Base.td + tools/llvmc/src/Base.td FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig)) all-local:: $(FilesToConfigPATH) @@ -192,9 +195,6 @@ endif check-llvm2cpp: $(Verb)$(MAKE) check TESTSUITE=Feature RUNLLVM2CPP=1 -check-one: - $(Verb)$(MAKE) -C test check-one TESTONE=$(TESTONE) - srpm: $(LLVM_OBJ_ROOT)/llvm.spec rpmbuild -bs $(LLVM_OBJ_ROOT)/llvm.spec diff --git a/Makefile.config.in b/Makefile.config.in index 1d54b317c3e1a..5ebd80384fb0b 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -39,14 +39,18 @@ ifndef PROJECT_NAME PROJECT_NAME := $(LLVMPackageName) endif -PROJ_OBJ_DIR := $(shell $(PWD)) -PROJ_OBJ_ROOT := $(shell cd $(PROJ_OBJ_DIR)/$(LEVEL); $(PWD)) +# 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)) ifeq ($(PROJECT_NAME),llvm) -LLVM_SRC_ROOT := $(shell cd @abs_top_srcdir@; $(PWD)) -LLVM_OBJ_ROOT := $(shell cd @abs_top_builddir@; $(PWD)) -PROJ_SRC_ROOT := $(shell cd $(LLVM_SRC_ROOT); $(PWD)) -PROJ_SRC_DIR := $(shell cd $(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)); $(PWD)) +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 := $(call realpath, $(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))) prefix := @prefix@ PROJ_prefix := $(prefix) PROJ_VERSION := $(LLVMVersion) @@ -66,7 +70,7 @@ endif ifndef LLVM_OBJ_ROOT $(error Projects must define LLVM_OBJ_ROOT) endif -PROJ_SRC_DIR := $(shell cd $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)); $(PWD)) +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 diff --git a/Makefile.rules b/Makefile.rules index 12582f6f91d2b..2e18c66e2b7a1 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -196,105 +196,15 @@ install-local:: all-local install-bytecode:: install-bytecode-local ############################################################################### -# LLVMC: Provide rules for compiling llvmc plugins +# LLVMC: Provide rules for compiling llvmc-based driver ############################################################################### -ifdef LLVMC_PLUGIN - -LIBRARYNAME := $(patsubst %,plugin_llvmc_%,$(LLVMC_PLUGIN)) -CPP.Flags += -DLLVMC_PLUGIN_NAME=$(LLVMC_PLUGIN) -REQUIRES_EH := 1 - -ifeq ($(ENABLE_LLVMC_DYNAMIC),1) - LD.Flags += -lCompilerDriver -endif - -# Build a dynamic library if the user runs `make` directly from the plugin -# directory. -ifndef LLVMC_BUILTIN_PLUGIN - LOADABLE_MODULE = 1 -endif - -# TableGen stuff... -ifneq ($(BUILT_SOURCES),) - LLVMC_BUILD_AUTOGENERATED_INC=1 -endif - -endif # LLVMC_PLUGIN - ifdef LLVMC_BASED_DRIVER TOOLNAME = $(LLVMC_BASED_DRIVER) -REQUIRES_EH := 1 - -ifeq ($(ENABLE_LLVMC_DYNAMIC),1) - LD.Flags += -lCompilerDriver -else - LLVMLIBS = CompilerDriver.a - LINK_COMPONENTS = support system -endif - -# Preprocessor magic that generates references to static variables in built-in -# plugins. -ifneq ($(LLVMC_BUILTIN_PLUGINS),) - -USEDLIBS += $(patsubst %,plugin_llvmc_%.a,$(LLVMC_BUILTIN_PLUGINS)) - -LLVMC_BUILTIN_PLUGIN_1 = $(word 1, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_2 = $(word 2, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_3 = $(word 3, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_4 = $(word 4, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_5 = $(word 5, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_6 = $(word 6, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_7 = $(word 7, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_8 = $(word 8, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_9 = $(word 9, $(LLVMC_BUILTIN_PLUGINS)) -LLVMC_BUILTIN_PLUGIN_10 = $(word 10, $(LLVMC_BUILTIN_PLUGINS)) - - -ifneq ($(LLVMC_BUILTIN_PLUGIN_1),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_1=$(LLVMC_BUILTIN_PLUGIN_1) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_2),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_2=$(LLVMC_BUILTIN_PLUGIN_2) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_3),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_3=$(LLVMC_BUILTIN_PLUGIN_3) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_4),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_4=$(LLVMC_BUILTIN_PLUGIN_4) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_5),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_5) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_6),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_6) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_7),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_7) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_8),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_8) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_9),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_9) -endif - -ifneq ($(LLVMC_BUILTIN_PLUGIN_10),) -CPP.Flags += -DLLVMC_BUILTIN_PLUGIN_5=$(LLVMC_BUILTIN_PLUGIN_10) -endif - - -endif +LLVMLIBS = CompilerDriver.a +LINK_COMPONENTS = support system endif # LLVMC_BASED_DRIVER @@ -500,6 +410,26 @@ 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 + #-------------------------------------------------------------------- # LLVM Capable Compiler #-------------------------------------------------------------------- @@ -573,12 +503,7 @@ ifeq ($(HOST_OS),Darwin) SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION) endif else - ifeq ($(HOST_OS),Cygwin) - SharedLinkOptions=-shared -nostdlib -Wl,--export-all-symbols \ - -Wl,--enable-auto-import -Wl,--enable-auto-image-base - else - SharedLinkOptions=-shared - endif + SharedLinkOptions=-shared endif ifeq ($(TARGET_OS),Darwin) @@ -588,11 +513,13 @@ ifeq ($(TARGET_OS),Darwin) endif ifdef SHARED_LIBRARY +ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) ifneq ($(HOST_OS),Darwin) LD.Flags += $(RPATH) -Wl,'$$ORIGIN' else ifneq ($(DARWIN_MAJVERS),4) - LD.Flags += $(RPATH) -Wl,$(LibDir) + LD.Flags += $(RPATH) -Wl,$(SharedLibDir) +endif endif endif endif @@ -621,8 +548,8 @@ ifndef KEEP_SYMBOLS endif # Adjust linker flags for building an executable -ifneq ($(HOST_OS),Darwin) -ifneq ($(DARWIN_MAJVERS),4) +ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +ifneq ($(HOST_OS), Darwin) ifdef TOOLNAME LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' ifdef EXAMPLE_TOOL @@ -631,12 +558,12 @@ ifdef TOOLNAME LD.Flags += $(RPATH) -Wl,$(ToolDir) $(RDYNAMIC) endif endif -endif else ifneq ($(DARWIN_MAJVERS),4) LD.Flags += $(RPATH) -Wl,@executable_path/../lib endif endif +endif #---------------------------------------------------------- @@ -963,6 +890,13 @@ LLVMUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(LLVMLIBS))) LLVMLibsPaths := $(addprefix $(LLVMLibDir)/,$(LLVMUsedLibs)) endif +# Win32.DLL may refer to other components. +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) + ifdef LOADABLE_MODULE + LINK_COMPONENTS := all + endif +endif + ifndef IS_CLEANING_TARGET ifdef LINK_COMPONENTS @@ -975,12 +909,28 @@ $(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 += $(LibDir)/libLLVM-$(LLVMVersion)$(SHLIBEXT) +LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)LLVM-$(LLVMVersion)$(SHLIBEXT) else -LLVMLibsOptions += $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS)) -LLVMLibsPaths += $(LLVM_CONFIG) \ - $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS)) + +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 @@ -1011,12 +961,25 @@ $(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir 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 @@ -1026,6 +989,12 @@ 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 ############################################################################### @@ -1100,10 +1069,10 @@ ifdef LIBRARYNAME LIBRARYNAME := $(strip $(LIBRARYNAME)) ifdef LOADABLE_MODULE LibName.A := $(LibDir)/$(LIBRARYNAME).a -LibName.SO := $(LibDir)/$(LIBRARYNAME)$(SHLIBEXT) +LibName.SO := $(SharedLibDir)/$(LIBRARYNAME)$(SHLIBEXT) else LibName.A := $(LibDir)/lib$(LIBRARYNAME).a -LibName.SO := $(LibDir)/lib$(LIBRARYNAME)$(SHLIBEXT) +LibName.SO := $(SharedLibDir)/$(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT) endif LibName.O := $(LibDir)/$(LIBRARYNAME).o LibName.BCA:= $(LibDir)/lib$(LIBRARYNAME).bca @@ -1128,14 +1097,14 @@ SharedLibKindMessage := "Loadable Module" else SharedLibKindMessage := "Shared Library" endif -$(LibName.SO): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) $(LibDir)/.dir +$(LibName.SO): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) $(SharedLibDir)/.dir $(Echo) Linking $(BuildMode) $(SharedLibKindMessage) \ - $(LIBRARYNAME)$(SHLIBEXT) + $(notdir $@) $(Verb) $(Link) $(SharedLinkOptions) -o $@ $(ObjectsO) \ $(ProjLibsOptions) $(LLVMLibsOptions) $(LIBS) else -$(LibName.SO): $(ObjectsO) $(LibDir)/.dir - $(Echo) Linking $(BuildMode) Shared Library $(basename $@) +$(LibName.SO): $(ObjectsO) $(SharedLibDir)/.dir + $(Echo) Linking $(BuildMode) Shared Library $(notdir $@) $(Verb) $(Link) $(SharedLinkOptions) -o $@ $(ObjectsO) endif @@ -1151,21 +1120,23 @@ uninstall-local:: $(Echo) Uninstall circumvented with NO_INSTALL else -ifdef LOADABLE_MODULE -DestSharedLib = $(DESTDIR)$(PROJ_libdir)/$(LIBRARYNAME)$(SHLIBEXT) +# Win32.DLL prefers to be located on the "PATH" of binaries. +ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) +DestSharedLibDir := $(DESTDIR)$(PROJ_bindir) else -DestSharedLib = $(DESTDIR)$(PROJ_libdir)/lib$(LIBRARYNAME)$(SHLIBEXT) +DestSharedLibDir := $(DESTDIR)$(PROJ_libdir) endif +DestSharedLib := $(DestSharedLibDir)/$(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT) install-local:: $(DestSharedLib) -$(DestSharedLib): $(LibName.SO) $(DESTDIR)$(PROJ_libdir) +$(DestSharedLib): $(LibName.SO) $(DestSharedLibDir) $(Echo) Installing $(BuildMode) Shared Library $(DestSharedLib) $(Verb) $(INSTALL) $(LibName.SO) $(DestSharedLib) uninstall-local:: $(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib) - -$(Verb) $(RM) -f $(DESTDIR)$(PROJ_libdir)/lib$(LIBRARYNAME).* + -$(Verb) $(RM) -f $(DestSharedLibDir)/$(SharedPrefix)$(LIBRARYNAME).* endif endif @@ -1341,10 +1312,33 @@ endif endif ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD)) +ifneq ($(ARCH), Mips) LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map endif 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 @@ -1377,7 +1371,7 @@ $(ToolAliasBuildPath): $(ToolBuildPath) $(Echo) Creating $(BuildMode) Alias $(TOOLALIAS) $(StripWarnMsg) $(Verb) $(RM) -f $(ToolAliasBuildPath) $(Verb) $(AliasTool) $(TOOLEXENAME) $(ToolAliasBuildPath) - $(Echo) ======= Finished Creating $(BuildMode) Alias $(TOOLNAME) \ + $(Echo) ======= Finished Creating $(BuildMode) Alias $(TOOLALIAS) \ $(StripWarnMsg) endif @@ -1626,7 +1620,7 @@ ifdef TARGET TABLEGEN_INC_FILES_COMMON = 1 endif -ifdef LLVMC_BUILD_AUTOGENERATED_INC +ifdef LLVMC_BASED_DRIVER TABLEGEN_INC_FILES_COMMON = 1 endif @@ -1750,20 +1744,26 @@ clean-local:: endif # TARGET -ifdef LLVMC_BUILD_AUTOGENERATED_INC +ifdef LLVMC_BASED_DRIVER + +TDSrc := $(sort $(strip $(wildcard $(PROJ_SRC_DIR)/*.td)) \ + $(strip $(wildcard $(PROJ_OBJ_DIR)/*.td))) + +TDCommon := $(strip $(wildcard \ + $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td)) -LLVMCPluginSrc := $(sort $(strip $(wildcard $(PROJ_SRC_DIR)/*.td)) \ - $(strip $(wildcard $(PROJ_OBJ_DIR)/*.td))) +TDFiles := $(TDSrc) $(TDCommon) -TDFiles := $(LLVMCPluginSrc) \ - $(strip $(wildcard $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td)) +$(INCTMPFiles) : $(TBLGEN) $(TDFiles) -$(ObjDir)/AutoGenerated.inc.tmp: $(LLVMCPluginSrc) $(ObjDir)/.dir \ - $(TBLGEN) $(TD_COMMON) - $(Echo) "Building LLVMC configuration library with tblgen" +$(ObjDir)/%.inc.tmp: %.td $(ObjDir)/.dir + $(Echo) "Building LLVMC compilation graph description with tblgen" $(Verb) $(TableGen) -gen-llvmc -o $(call SYSPATH, $@) $< -endif # LLVMC_BUILD_AUTOGENERATED_INC +clean-local:: + -$(Verb) $(RM) -f $(INCFiles) + +endif # LLVMC_BASED_DRIVER ############################################################################### # OTHER RULES: Other rules needed @@ -1840,11 +1840,13 @@ check:: $(EchoCmd) No test directory ; \ fi -check-lit:: +check-lit:: check + +check-dg:: $(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-lit ; \ + $(MAKE) -C $(PROJ_OBJ_ROOT)/test check-local-dg ; \ else \ $(EchoCmd) No Makefile in test directory ; \ fi ; \ diff --git a/README.txt b/README.txt index 2ebe271b8e514..f54f5bf1b372a 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -Low Level Virtual Machine (LLVM) +\Low Level Virtual Machine (LLVM) ================================ This directory and its subdirectories contain source code for the Low Level @@ -13,3 +13,4 @@ assistance with LLVM. If you're writing a package for LLVM, see docs/Packaging.html for our suggestions. + diff --git a/autoconf/configure.ac b/autoconf/configure.ac index be320cf3981ce..de327449e23d6 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -31,7 +31,7 @@ dnl=== dnl===-----------------------------------------------------------------------=== dnl Initialize autoconf and define the package name, version number and dnl email address for reporting bugs. -AC_INIT([[llvm]],[[2.8svn]],[llvmbugs@cs.uiuc.edu]) +AC_INIT([[llvm]],[[2.8rc]],[llvmbugs@cs.uiuc.edu]) dnl Provide a copyright substitution and ensure the copyright notice is included dnl in the output of --version option of the generated configure script. @@ -101,7 +101,6 @@ for i in `ls ${srcdir}/projects` do if test -d ${srcdir}/projects/${i} ; then case ${i} in - CVS) ;; sample) AC_CONFIG_SUBDIRS([projects/sample]) ;; privbracket) AC_CONFIG_SUBDIRS([projects/privbracket]) ;; llvm-stacker) AC_CONFIG_SUBDIRS([projects/llvm-stacker]) ;; @@ -299,7 +298,7 @@ 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_cvs_platform_type +dnl Set the "LLVM_ON_*" variables based on llvm_cv_platform_type dnl This is used by lib/System to determine the basic kind of implementation dnl to use. case $llvm_cv_platform_type in @@ -369,13 +368,13 @@ else AC_SUBST(LLVM_CROSS_COMPILING, [0]) fi -dnl Check to see if there's a "CVS" (or .svn or .git) directory indicating -dnl that this build is being done from a checkout. This sets up several -dnl defaults for the command line switches. When we build with a CVS directory, +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 "CVS" -o -d "${srcdir}/CVS" -o -d ".svn" -o -d "${srcdir}/.svn" -o -d ".git" -o -d "${srcdir}/.git"; then +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]]) @@ -392,7 +391,7 @@ dnl===-----------------------------------------------------------------------=== 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) + --enable-optimized,[Compile with optimizations enabled (default is YES)]),,enableval="yes") if test ${enableval} = "no" ; then AC_SUBST(ENABLE_OPTIMIZED,[[]]) else @@ -410,7 +409,7 @@ 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") + --enable-assertions,[Compile with assertion checks enabled (default is NO)]),, enableval="no") if test ${enableval} = "yes" ; then AC_SUBST(DISABLE_ASSERTIONS,[[]]) else @@ -544,13 +543,13 @@ 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, alpha, arm, mips, spu, pic16, - xcore, msp430, systemz, blackfin, cbe, msil, and cpp (default=all)]),, + xcore, msp430, systemz, blackfin, cbe, 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 Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend MSIL CppBackend MBlaze" ;; + all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend CppBackend MBlaze" ;; *)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do case "$a_target" in x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; @@ -567,7 +566,6 @@ case "$enableval" in systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; blackfin) TARGETS_TO_BUILD="Blackfin $TARGETS_TO_BUILD" ;; cbe) TARGETS_TO_BUILD="CBackend $TARGETS_TO_BUILD" ;; - msil) TARGETS_TO_BUILD="MSIL $TARGETS_TO_BUILD" ;; cpp) TARGETS_TO_BUILD="CppBackend $TARGETS_TO_BUILD" ;; mblaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;; host) case "$llvm_cv_target_arch" in @@ -598,9 +596,17 @@ AC_SUBST(TARGETS_TO_BUILD,$TARGETS_TO_BUILD) # 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 - LLVM_NATIVE_ARCHTARGET="${LLVM_NATIVE_ARCH}Target" - AC_DEFINE_UNQUOTED(LLVM_NATIVE_ARCH,$LLVM_NATIVE_ARCHTARGET, + 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_ASMPRINTER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter" + 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_ASMPRINTER, $LLVM_NATIVE_ASMPRINTER, + [LLVM name for the native AsmPrinter init function, if available]) fi done @@ -857,35 +863,6 @@ AC_ARG_ENABLE(libffi,AS_HELP_STRING( esac], llvm_cv_enable_libffi=no) -dnl Only Windows needs dynamic libCompilerDriver to support plugins. -if test "$llvm_cv_os_type" = "Win32" ; then - llvmc_dynamic="yes" -else - llvmc_dynamic="no" -fi - -dnl --enable-llvmc-dynamic : should LLVMC link libCompilerDriver dynamically? -AC_ARG_ENABLE(llvmc-dynamic,AS_HELP_STRING( ---enable-llvmc-dynamic, -[Link LLVMC dynamically (default is NO, unless on Win32)]),, -enableval=$llvmc_dynamic) -if test ${enableval} = "yes" && test "$ENABLE_PIC" -eq 1 ; then - AC_SUBST(ENABLE_LLVMC_DYNAMIC,[[ENABLE_LLVMC_DYNAMIC=1]]) -else - AC_SUBST(ENABLE_LLVMC_DYNAMIC,[[]]) -fi - -dnl --enable-llvmc-dynamic-plugins : should LLVMC support dynamic plugins? -AC_ARG_ENABLE(llvmc-dynamic-plugins,AS_HELP_STRING( ---enable-llvmc-dynamic-plugins, -[Enable dynamic LLVMC plugins (default is YES)]),, -enableval=yes) -if test ${enableval} = "yes" ; then - AC_SUBST(ENABLE_LLVMC_DYNAMIC_PLUGINS,[[ENABLE_LLVMC_DYNAMIC_PLUGINS=1]]) -else - AC_SUBST(ENABLE_LLVMC_DYNAMIC_PLUGINS,[[]]) -fi - dnl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 4: Check for programs we need and that they are the right version @@ -1011,6 +988,13 @@ 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 @@ -1033,6 +1017,9 @@ 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 @@ -1345,6 +1332,9 @@ 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() { @@ -1356,13 +1346,13 @@ AC_LINK_IFELSE( return 0; } ]]), + AC_LANG_POP([C++]) AC_MSG_RESULT(yes) AC_DEFINE(LLVM_MULTITHREADED, 1, Build multithreading support into LLVM), AC_MSG_RESULT(no) AC_DEFINE(LLVM_MULTITHREADED, 0, Build multithreading support into LLVM) AC_MSG_WARN([LLVM will be built thread-unsafe because atomic builtins are missing])) - dnl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 9: Additional checks, variables, etc. @@ -1549,7 +1539,11 @@ dnl WARNING: dnl If you add or remove any of the following config headers, then dnl you MUST also update Makefile.rules 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]) +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]) @@ -1563,7 +1557,7 @@ dnl Configure the RPM spec file for LLVM AC_CONFIG_FILES([llvm.spec]) dnl Configure llvmc's Base plugin -AC_CONFIG_FILES([tools/llvmc/plugins/Base/Base.td]) +AC_CONFIG_FILES([tools/llvmc/src/Base.td]) dnl Do the first stage of configuration for llvm-config.in. AC_CONFIG_FILES([tools/llvm-config/llvm-config.in]) diff --git a/autoconf/m4/link_options.m4 b/autoconf/m4/link_options.m4 index b48710c094d96..4c5f2f435d04e 100644 --- a/autoconf/m4/link_options.m4 +++ b/autoconf/m4/link_options.m4 @@ -1,3 +1,24 @@ +# +# 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-\([^ ]*\)#\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. # diff --git a/bindings/ada/llvm/llvm.ads b/bindings/ada/llvm/llvm.ads index ce74e670a685b..20fc940f8c246 100644 --- a/bindings/ada/llvm/llvm.ads +++ b/bindings/ada/llvm/llvm.ads @@ -317,25 +317,27 @@ package llvm is LLVMGhostLinkage, LLVMCommonLinkage, LLVMLinkerPrivateLinkage, - LLVMLinkerPrivateWeakLinkage); + LLVMLinkerPrivateWeakLinkage, + LinkerPrivateWeakDefAutoLinkage); for LLVMLinkage use - (LLVMExternalLinkage => 0, - LLVMAvailableExternallyLinkage => 1, - LLVMLinkOnceAnyLinkage => 2, - LLVMLinkOnceODRLinkage => 3, - LLVMWeakAnyLinkage => 4, - LLVMWeakODRLinkage => 5, - LLVMAppendingLinkage => 6, - LLVMInternalLinkage => 7, - LLVMPrivateLinkage => 8, - LLVMDLLImportLinkage => 9, - LLVMDLLExportLinkage => 10, - LLVMExternalWeakLinkage => 11, - LLVMGhostLinkage => 12, - LLVMCommonLinkage => 13, - LLVMLinkerPrivateLinkage => 14, - LLVMLinkerPrivateWeakLinkage => 15); + (LLVMExternalLinkage => 0, + LLVMAvailableExternallyLinkage => 1, + LLVMLinkOnceAnyLinkage => 2, + LLVMLinkOnceODRLinkage => 3, + LLVMWeakAnyLinkage => 4, + LLVMWeakODRLinkage => 5, + LLVMAppendingLinkage => 6, + LLVMInternalLinkage => 7, + LLVMPrivateLinkage => 8, + LLVMDLLImportLinkage => 9, + LLVMDLLExportLinkage => 10, + LLVMExternalWeakLinkage => 11, + LLVMGhostLinkage => 12, + LLVMCommonLinkage => 13, + LLVMLinkerPrivateLinkage => 14, + LLVMLinkerPrivateWeakLinkage => 15, + LinkerPrivateWeakDefAutoLinkage => 16); pragma Convention (C, LLVMLinkage); diff --git a/bindings/ocaml/llvm/llvm.ml b/bindings/ocaml/llvm/llvm.ml index 7ab6f51efb9f6..462eb201694bb 100644 --- a/bindings/ocaml/llvm/llvm.ml +++ b/bindings/ocaml/llvm/llvm.ml @@ -35,7 +35,6 @@ module TypeKind = struct | Opaque | Vector | Metadata - | Union end module Linkage = struct @@ -210,11 +209,6 @@ external struct_element_types : lltype -> lltype array = "llvm_struct_element_types" external is_packed : lltype -> bool = "llvm_is_packed" -(*--... Operations on union types ..........................................--*) -external union_type : llcontext -> lltype array -> lltype = "llvm_union_type" -external union_element_types : lltype -> lltype array - = "llvm_union_element_types" - (*--... Operations on pointer, vector, and array types .....................--*) external array_type : lltype -> int -> lltype = "llvm_array_type" external pointer_type : lltype -> lltype = "llvm_pointer_type" @@ -280,6 +274,8 @@ let fold_right_uses f 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" @@ -319,7 +315,6 @@ external const_struct : llcontext -> llvalue array -> llvalue external const_packed_struct : llcontext -> llvalue array -> llvalue = "llvm_const_packed_struct" external const_vector : llvalue array -> llvalue = "llvm_const_vector" -external const_union : lltype -> llvalue -> llvalue = "LLVMConstUnion" (*--... Constant expressions ...............................................--*) external align_of : lltype -> llvalue = "LLVMAlignOf" @@ -1050,9 +1045,6 @@ let rec string_of_lltype ty = if is_packed ty then "<" ^ s ^ ">" else s - | TypeKind.Union -> "union { " ^ (concat2 ", " ( - Array.map string_of_lltype (union_element_types ty) - )) ^ " }" | TypeKind.Array -> "[" ^ (string_of_int (array_length ty)) ^ " x " ^ (string_of_lltype (element_type ty)) ^ "]" | TypeKind.Vector -> "<" ^ (string_of_int (vector_size ty)) ^ diff --git a/bindings/ocaml/llvm/llvm.mli b/bindings/ocaml/llvm/llvm.mli index 742265cd3d5c9..ba3bbe248b716 100644 --- a/bindings/ocaml/llvm/llvm.mli +++ b/bindings/ocaml/llvm/llvm.mli @@ -72,7 +72,6 @@ module TypeKind : sig | Opaque | Vector | Metadata - | Union end (** The linkage of a global value, accessed with {!linkage} and @@ -408,19 +407,6 @@ external struct_element_types : lltype -> lltype array external is_packed : lltype -> bool = "llvm_is_packed" -(** {7 Operations on union types} *) - -(** [union_type context tys] returns the union type in the context [context] - containing the types in the array [tys]. See the method - [llvm::UnionType::get] *) -external union_type : llcontext -> lltype array -> lltype = "llvm_union_type" - -(** [union_element_types uty] returns the constituent types of the union type - [uty]. See the method [llvm::UnionType::getElementType]. *) -external union_element_types : lltype -> lltype array - = "llvm_union_element_types" - - (** {7 Operations on pointer, vector, and array types} *) (** [array_type ty n] returns the array type containing [n] elements of type @@ -557,6 +543,14 @@ val fold_right_uses : (lluse -> 'a -> 'a) -> llvalue -> 'a -> 'a method [llvm::User::getOperand]. *) external operand : llvalue -> int -> llvalue = "llvm_operand" +(** [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]. *) +external set_operand : llvalue -> int -> llvalue -> unit = "llvm_set_operand" + +(** [num_operands v] returns the number of operands for the value [v]. + See the method [llvm::User::getNumOperands]. *) +external num_operands : llvalue -> int = "llvm_num_operands" (** {7 Operations on constants of (mostly) any type} *) @@ -689,10 +683,6 @@ external const_packed_struct : llcontext -> llvalue array -> llvalue values [elts]. See the method [llvm::ConstantVector::get]. *) external const_vector : llvalue array -> llvalue = "llvm_const_vector" -(** [const_union ty v] returns the union constant of type [union_type tys] and - containing the value [v]. See the method [llvm::ConstantUnion::get]. *) -external const_union : lltype -> llvalue -> llvalue = "LLVMConstUnion" - (** {7 Constant expressions} *) @@ -991,7 +981,7 @@ external const_insertelement : llvalue -> llvalue -> llvalue -> llvalue = "LLVMConstInsertElement" (** [const_shufflevector a b mask] returns a constant [shufflevector]. - See the LLVM Language Reference for details on the [sufflevector] + See the LLVM Language Reference for details on the [shufflevector] instruction. See the method [llvm::ConstantExpr::getShuffleVector]. *) external const_shufflevector : llvalue -> llvalue -> llvalue -> llvalue diff --git a/bindings/ocaml/llvm/llvm_ocaml.c b/bindings/ocaml/llvm/llvm_ocaml.c index c4355ba2dbf11..ef2e3d66629cf 100644 --- a/bindings/ocaml/llvm/llvm_ocaml.c +++ b/bindings/ocaml/llvm/llvm_ocaml.c @@ -318,21 +318,6 @@ CAMLprim value llvm_is_packed(LLVMTypeRef StructTy) { return Val_bool(LLVMIsPackedStruct(StructTy)); } -/*--... Operations on union types ..........................................--*/ - -/* llcontext -> lltype array -> lltype */ -CAMLprim LLVMTypeRef llvm_union_type(LLVMContextRef C, value ElementTypes) { - return LLVMUnionTypeInContext(C, (LLVMTypeRef *) ElementTypes, - Wosize_val(ElementTypes)); -} - -/* lltype -> lltype array */ -CAMLprim value llvm_union_element_types(LLVMTypeRef UnionTy) { - value Tys = alloc(LLVMCountUnionElementTypes(UnionTy), 0); - LLVMGetUnionElementTypes(UnionTy, (LLVMTypeRef *) Tys); - return Tys; -} - /*--... Operations on array, pointer, and vector types .....................--*/ /* lltype -> int -> lltype */ @@ -452,6 +437,17 @@ 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 */ @@ -964,8 +960,8 @@ CAMLprim LLVMValueRef llvm_param(LLVMValueRef Fn, value Index) { return LLVMGetParam(Fn, Int_val(Index)); } -/* llvalue -> int -> llvalue */ -CAMLprim value llvm_params(LLVMValueRef Fn, value Index) { +/* llvalue -> llvalue */ +CAMLprim value llvm_params(LLVMValueRef Fn) { value Params = alloc(LLVMCountParams(Fn), 0); LLVMGetParams(Fn, (LLVMValueRef *) Op_val(Params)); return Params; diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index d9450d9258593..f75e5dfb26563 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -214,6 +214,9 @@ if (LLVM_NATIVE_ARCH) set(LLVM_NATIVE_ARCH) 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_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter) endif () endif() @@ -259,11 +262,18 @@ else( ENABLE_THREADS ) message(STATUS "Threads disabled.") endif() +set(LLVM_PREFIX ${CMAKE_INSTALL_PREFIX}) + 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/System/DataTypes.h.cmake ${LLVM_BINARY_DIR}/include/llvm/System/DataTypes.h diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt new file mode 100644 index 0000000000000..416d7f4785641 --- /dev/null +++ b/cmake/modules/CMakeLists.txt @@ -0,0 +1,12 @@ +set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm/cmake") + +configure_file( + LLVM.cmake + ${llvm_cmake_builddir}/LLVM.cmake + @ONLY) + +install(FILES + ${llvm_cmake_builddir}/LLVM.cmake + LLVMConfig.cmake + LLVMLibDeps.cmake + DESTINATION share/llvm/cmake) diff --git a/cmake/modules/ChooseMSVCCRT.cmake b/cmake/modules/ChooseMSVCCRT.cmake new file mode 100644 index 0000000000000..eb78f45c885a9 --- /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}) + 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}) + 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/LLVM.cmake b/cmake/modules/LLVM.cmake new file mode 100644 index 0000000000000..9621454f41191 --- /dev/null +++ b/cmake/modules/LLVM.cmake @@ -0,0 +1,29 @@ +# This file provides information and services to the final user. + +set(LLVM_COMMON_DEPENDS @LLVM_COMMON_DEPENDS@) + +set(llvm_libs @llvm_libs@) + +set(llvm_lib_targets @llvm_lib_targets@) + +set(LLVM_TARGETS_TO_BUILD @LLVM_TARGETS_TO_BUILD@) + +set(LLVM_TOOLS_BINARY_DIR @LLVM_TOOLS_BINARY_DIR@) + +set(LLVM_ENABLE_THREADS @LLVM_ENABLE_THREADS@) + +set(LLVM_NATIVE_ARCH @LLVM_NATIVE_ARCH@) + +# 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( LLVMConfig 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( LLVMConfig ) +endif() + diff --git a/cmake/modules/LLVMConfig.cmake b/cmake/modules/LLVMConfig.cmake index 0744b50d648f0..e5497084be841 100755 --- a/cmake/modules/LLVMConfig.cmake +++ b/cmake/modules/LLVMConfig.cmake @@ -16,6 +16,26 @@ function(get_system_libs return_var) endfunction(get_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 "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) @@ -29,6 +49,14 @@ function(explicit_llvm_config executable) 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} ) foreach(c ${link_components}) @@ -86,16 +114,24 @@ function(explicit_map_components_to_libraries out_libs) list(GET expanded_components 0 c) string(TOUPPER "${c}" capitalized) list(FIND capitalized_libs ${capitalized} idx) + set(add_it ON) if( idx LESS 0 ) - message(FATAL_ERROR "Library ${c} not found in list of llvm libraries.") + # The library is unkown. Maybe is an ommitted 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() + set(add_it OFF) endif( idx LESS 0 ) list(GET llvm_libs ${idx} canonical_lib) list(REMOVE_ITEM result ${canonical_lib}) - list(APPEND result ${canonical_lib}) foreach(c ${MSVC_LIB_DEPS_${canonical_lib}}) list(REMOVE_ITEM expanded_components ${c}) endforeach() - list(APPEND expanded_components ${MSVC_LIB_DEPS_${canonical_lib}}) + if( add_it ) + list(APPEND result ${canonical_lib}) + list(APPEND expanded_components ${MSVC_LIB_DEPS_${canonical_lib}}) + endif() list(REMOVE_AT expanded_components 0) list(LENGTH expanded_components lst_size) endwhile( 0 LESS ${lst_size} ) @@ -115,13 +151,13 @@ endfunction(explicit_map_components_to_libraries) # The format generated by GenLibDeps.pl -# LLVMARMAsmPrinter.o: LLVMARMCodeGen.o libLLVMAsmPrinter.a libLLVMCodeGen.a libLLVMCore.a libLLVMSupport.a libLLVMTarget.a +# libLLVMARMAsmPrinter.a: libLLVMMC.a libLLVMSupport.a # is translated to: -# set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMTarget) +# set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport) -# It is necessary to remove the `lib' prefix and the `.a'. +# It is necessary to remove the `lib' prefix and the `.a' suffix. # This 'sed' script should do the trick: # sed -e s'#\.a##g' -e 's#libLLVM#LLVM#g' -e 's#: # #' -e 's#\(.*\)#set(MSVC_LIB_DEPS_\1)#' ~/llvm/tools/llvm-config/LibDeps.txt diff --git a/cmake/modules/LLVMLibDeps.cmake b/cmake/modules/LLVMLibDeps.cmake index c9798485dec6a..e639b04e98007 100644 --- a/cmake/modules/LLVMLibDeps.cmake +++ b/cmake/modules/LLVMLibDeps.cmake @@ -1,6 +1,6 @@ -set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMInfo LLVMMCParser LLVMSupport) -set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMCodeGen LLVMARMInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget) -set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget) +set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport) +set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMInfo LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMARMInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMAlphaAsmPrinter LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMAlphaInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) @@ -8,9 +8,9 @@ set(MSVC_LIB_DEPS_LLVMAlphaInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem) set(MSVC_LIB_DEPS_LLVMAsmParser LLVMCore LLVMSupport) -set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMMCParser LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMBitReader LLVMCore LLVMSupport) -set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport LLVMSystem) +set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport) set(MSVC_LIB_DEPS_LLVMBlackfinAsmPrinter LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMBlackfinInfo LLVMSupport) @@ -27,29 +27,28 @@ set(MSVC_LIB_DEPS_LLVMExecutionEngine LLVMCore LLVMSupport LLVMSystem LLVMTarget set(MSVC_LIB_DEPS_LLVMInstCombine LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils) set(MSVC_LIB_DEPS_LLVMInstrumentation LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTransformUtils) set(MSVC_LIB_DEPS_LLVMInterpreter LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMSystem LLVMTarget) -set(MSVC_LIB_DEPS_LLVMJIT LLVMAnalysis LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMMC LLVMSupport LLVMSystem LLVMTarget) -set(MSVC_LIB_DEPS_LLVMLinker LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem) +set(MSVC_LIB_DEPS_LLVMJIT LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMMC LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMLinker LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem LLVMTransformUtils) set(MSVC_LIB_DEPS_LLVMMBlazeAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMMBlazeCodeGen LLVMCodeGen LLVMCore LLVMMBlazeInfo LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMMBlazeInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMMC LLVMSupport LLVMSystem) +set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMCodeGen LLVMARMInfo LLVMAlphaAsmPrinter LLVMAlphaCodeGen LLVMAlphaInfo LLVMBlackfinAsmPrinter LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUAsmPrinter LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmPrinter LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430AsmPrinter LLVMMSP430CodeGen LLVMMSP430Info LLVMMipsAsmPrinter LLVMMipsCodeGen LLVMMipsInfo LLVMPIC16AsmPrinter LLVMPIC16CodeGen LLVMPIC16Info LLVMPowerPCAsmPrinter LLVMPowerPCCodeGen LLVMPowerPCInfo LLVMSparcAsmPrinter LLVMSparcCodeGen LLVMSparcInfo LLVMSupport LLVMSystem LLVMSystemZAsmPrinter LLVMSystemZCodeGen LLVMSystemZInfo LLVMX86AsmParser LLVMX86CodeGen LLVMX86Disassembler LLVMX86Info LLVMXCoreAsmPrinter LLVMXCoreCodeGen LLVMXCoreInfo) set(MSVC_LIB_DEPS_LLVMMCParser LLVMMC LLVMSupport) -set(MSVC_LIB_DEPS_LLVMMSIL LLVMAnalysis LLVMCodeGen LLVMCore LLVMMSILInfo LLVMScalarOpts LLVMSupport LLVMTarget LLVMTransformUtils LLVMipa) -set(MSVC_LIB_DEPS_LLVMMSILInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMSupport) set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsCodeGen LLVMMipsInfo LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMMipsCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMipsInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMMipsInfo LLVMSupport) -set(MSVC_LIB_DEPS_LLVMPIC16 LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMPIC16Info LLVMSelectionDAG LLVMSupport LLVMTarget) -set(MSVC_LIB_DEPS_LLVMPIC16AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPIC16 LLVMPIC16Info LLVMSupport LLVMTarget) +set(MSVC_LIB_DEPS_LLVMPIC16AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPIC16CodeGen LLVMPIC16Info LLVMSupport LLVMTarget) +set(MSVC_LIB_DEPS_LLVMPIC16CodeGen LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMPIC16Info LLVMSelectionDAG LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMPIC16Info LLVMSupport) -set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSupport LLVMTarget) +set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMInstCombine LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils) -set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget) +set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSparcInfo LLVMSupport LLVMTarget) set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget) set(MSVC_LIB_DEPS_LLVMSparcInfo LLVMSupport) @@ -61,12 +60,12 @@ set(MSVC_LIB_DEPS_LLVMSystemZInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport) set(MSVC_LIB_DEPS_LLVMTransformUtils LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMipa) set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMMCParser LLVMSupport LLVMTarget LLVMX86Info) -set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget LLVMX86CodeGen LLVMX86Info) -set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86Info) +set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMMC LLVMSupport) +set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86AsmPrinter LLVMX86Info) set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMMC LLVMSupport LLVMX86Info) set(MSVC_LIB_DEPS_LLVMX86Info LLVMSupport) -set(MSVC_LIB_DEPS_LLVMXCore LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMXCoreInfo) set(MSVC_LIB_DEPS_LLVMXCoreAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget LLVMXCoreInfo) +set(MSVC_LIB_DEPS_LLVMXCoreCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMXCoreInfo) set(MSVC_LIB_DEPS_LLVMXCoreInfo LLVMSupport) set(MSVC_LIB_DEPS_LLVMipa LLVMAnalysis LLVMCore LLVMSupport LLVMSystem) -set(MSVC_LIB_DEPS_LLVMipo LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa) +set(MSVC_LIB_DEPS_LLVMipo LLVMAnalysis LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa) diff --git a/cmake/modules/VersionFromVCS.cmake b/cmake/modules/VersionFromVCS.cmake new file mode 100644 index 0000000000000..1016df22590da --- /dev/null +++ b/cmake/modules/VersionFromVCS.cmake @@ -0,0 +1,33 @@ +# 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) + set(result ${${VERS}}) + if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.svn ) + set(result "${result}svn") + find_package(Subversion) + if( Subversion_FOUND ) + subversion_wc_info( ${CMAKE_CURRENT_SOURCE_DIR} Project ) + if( Project_WC_REVISION ) + 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 + find_program(git_executable NAMES git git.exe git.cmd) + if( git_executable ) + execute_process(COMMAND ${git_executable} show-ref HEAD + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + TIMEOUT 5 + RESULT_VARIABLE git_result + OUTPUT_VARIABLE git_output) + if( git_result EQUAL 0 ) + string(SUBSTRING ${git_output} 0 7 git_ref_id) + set(result "${result}-${git_ref_id}") + endif() + endif() + endif() + set(${VERS} ${result} PARENT_SCOPE) +endfunction(add_version_info_from_vcs) diff --git a/configure b/configure index dc1b5b3fbe32a..d2b98bfe661fd 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for llvm 2.8svn. +# Generated by GNU Autoconf 2.60 for llvm 2.8rc. # # Report bugs to . # @@ -561,8 +561,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='llvm' PACKAGE_TARNAME='-llvm-' -PACKAGE_VERSION='2.8svn' -PACKAGE_STRING='llvm 2.8svn' +PACKAGE_VERSION='2.8rc' +PACKAGE_STRING='llvm 2.8rc' PACKAGE_BUGREPORT='llvmbugs@cs.uiuc.edu' ac_unique_file="lib/VMCore/Module.cpp" @@ -703,8 +703,6 @@ ENABLE_BUILT_CLANG OPTIMIZE_OPTION EXTRA_OPTIONS BINUTILS_INCDIR -ENABLE_LLVMC_DYNAMIC -ENABLE_LLVMC_DYNAMIC_PLUGINS CXX CXXFLAGS ac_ct_CXX @@ -1320,7 +1318,7 @@ 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 2.8svn to adapt to many kinds of systems. +\`configure' configures llvm 2.8rc to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1386,7 +1384,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of llvm 2.8svn:";; + short | recursive ) echo "Configuration of llvm 2.8rc:";; esac cat <<\_ACEOF @@ -1416,17 +1414,13 @@ Optional Features: --enable-targets Build specific host targets: all or target1,target2,... Valid targets are: host, x86, x86_64, sparc, powerpc, alpha, arm, mips, spu, - pic16, xcore, msp430, systemz, blackfin, cbe, msil, - and cpp (default=all) + pic16, xcore, msp430, systemz, blackfin, cbe, and + cpp (default=all) --enable-cbe-printf-a Enable C Backend output with hex floating point via %a (default is YES) --enable-bindings Build specific language bindings: all,auto,none,{binding-name} (default=auto) --enable-libffi Check for the presence of libffi (default is NO) - --enable-llvmc-dynamic Link LLVMC dynamically (default is NO, unless on - Win32) - --enable-llvmc-dynamic-plugins - Enable dynamic LLVMC plugins (default is YES) --enable-ltdl-install install libltdl Optional Packages: @@ -1539,7 +1533,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -llvm configure 2.8svn +llvm configure 2.8rc generated by GNU Autoconf 2.60 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1555,7 +1549,7 @@ 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 2.8svn, which was +It was created by llvm $as_me 2.8rc, which was generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ @@ -1988,7 +1982,6 @@ for i in `ls ${srcdir}/projects` do if test -d ${srcdir}/projects/${i} ; then case ${i} in - CVS) ;; sample) subdirs="$subdirs projects/sample" ;; privbracket) subdirs="$subdirs projects/privbracket" @@ -4691,7 +4684,7 @@ else fi -if test -d "CVS" -o -d "${srcdir}/CVS" -o -d ".svn" -o -d "${srcdir}/.svn" -o -d ".git" -o -d "${srcdir}/.git"; then +if test -d ".svn" -o -d "${srcdir}/.svn" -o -d ".git" -o -d "${srcdir}/.git"; then cvsbuild="yes" optimize="no" CVSBUILD=CVSBUILD=1 @@ -4706,7 +4699,7 @@ fi if test "${enable_optimized+set}" = set; then enableval=$enable_optimized; else - enableval=$optimize + enableval="yes" fi if test ${enableval} = "no" ; then @@ -4736,7 +4729,7 @@ fi if test "${enable_assertions+set}" = set; then enableval=$enable_assertions; else - enableval="yes" + enableval="no" fi if test ${enableval} = "yes" ; then @@ -4962,7 +4955,7 @@ if test "$enableval" = host-only ; then enableval=host fi case "$enableval" in - all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend MSIL CppBackend MBlaze" ;; + all) TARGETS_TO_BUILD="X86 Sparc PowerPC Alpha ARM Mips CellSPU PIC16 XCore MSP430 SystemZ Blackfin CBackend CppBackend MBlaze" ;; *)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do case "$a_target" in x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;; @@ -4979,7 +4972,6 @@ case "$enableval" in systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;; blackfin) TARGETS_TO_BUILD="Blackfin $TARGETS_TO_BUILD" ;; cbe) TARGETS_TO_BUILD="CBackend $TARGETS_TO_BUILD" ;; - msil) TARGETS_TO_BUILD="MSIL $TARGETS_TO_BUILD" ;; cpp) TARGETS_TO_BUILD="CppBackend $TARGETS_TO_BUILD" ;; mblaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;; host) case "$llvm_cv_target_arch" in @@ -5015,10 +5007,27 @@ TARGETS_TO_BUILD=$TARGETS_TO_BUILD # 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 - LLVM_NATIVE_ARCHTARGET="${LLVM_NATIVE_ARCH}Target" cat >>confdefs.h <<_ACEOF -#define LLVM_NATIVE_ARCH $LLVM_NATIVE_ARCHTARGET +#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_ASMPRINTER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter" + +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_ASMPRINTER $LLVM_NATIVE_ASMPRINTER _ACEOF fi @@ -5374,42 +5383,6 @@ else fi -if test "$llvm_cv_os_type" = "Win32" ; then - llvmc_dynamic="yes" -else - llvmc_dynamic="no" -fi - -# Check whether --enable-llvmc-dynamic was given. -if test "${enable_llvmc_dynamic+set}" = set; then - enableval=$enable_llvmc_dynamic; -else - enableval=$llvmc_dynamic -fi - -if test ${enableval} = "yes" && test "$ENABLE_PIC" -eq 1 ; then - ENABLE_LLVMC_DYNAMIC=ENABLE_LLVMC_DYNAMIC=1 - -else - ENABLE_LLVMC_DYNAMIC= - -fi - -# Check whether --enable-llvmc-dynamic-plugins was given. -if test "${enable_llvmc_dynamic_plugins+set}" = set; then - enableval=$enable_llvmc_dynamic_plugins; -else - enableval=yes -fi - -if test ${enableval} = "yes" ; then - ENABLE_LLVMC_DYNAMIC_PLUGINS=ENABLE_LLVMC_DYNAMIC_PLUGINS=1 - -else - ENABLE_LLVMC_DYNAMIC_PLUGINS= - -fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8004,6 +7977,10 @@ 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 @@ -8721,6 +8698,31 @@ fi 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-\([^ ]*\)#\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 @@ -11387,7 +11389,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&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 @@ -20041,6 +20049,12 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + 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: result: yes" >&5 echo "${ECHO_T}yes" >&6; } @@ -20067,7 +20081,6 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - 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; } @@ -20563,7 +20576,12 @@ fi -ac_config_headers="$ac_config_headers include/llvm/Config/config.h" +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" @@ -20582,7 +20600,7 @@ ac_config_files="$ac_config_files Makefile.config" ac_config_files="$ac_config_files llvm.spec" -ac_config_files="$ac_config_files tools/llvmc/plugins/Base/Base.td" +ac_config_files="$ac_config_files tools/llvmc/src/Base.td" ac_config_files="$ac_config_files tools/llvm-config/llvm-config.in" @@ -21027,7 +21045,7 @@ exec 6>&1 # 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 2.8svn, which was +This file was extended by llvm $as_me 2.8rc, which was generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21080,7 +21098,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -llvm config.status 2.8svn +llvm config.status 2.8rc configured by $0, generated by GNU Autoconf 2.60, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -21194,6 +21212,7 @@ 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" ;; @@ -21201,7 +21220,7 @@ do "include/llvm/System/DataTypes.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/System/DataTypes.h" ;; "Makefile.config") CONFIG_FILES="$CONFIG_FILES Makefile.config" ;; "llvm.spec") CONFIG_FILES="$CONFIG_FILES llvm.spec" ;; - "tools/llvmc/plugins/Base/Base.td") CONFIG_FILES="$CONFIG_FILES tools/llvmc/plugins/Base/Base.td" ;; + "tools/llvmc/src/Base.td") CONFIG_FILES="$CONFIG_FILES tools/llvmc/src/Base.td" ;; "tools/llvm-config/llvm-config.in") CONFIG_FILES="$CONFIG_FILES tools/llvm-config/llvm-config.in" ;; "setup") CONFIG_COMMANDS="$CONFIG_COMMANDS setup" ;; "Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile" ;; @@ -21421,8 +21440,6 @@ ENABLE_BUILT_CLANG!$ENABLE_BUILT_CLANG$ac_delim OPTIMIZE_OPTION!$OPTIMIZE_OPTION$ac_delim EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim -ENABLE_LLVMC_DYNAMIC!$ENABLE_LLVMC_DYNAMIC$ac_delim -ENABLE_LLVMC_DYNAMIC_PLUGINS!$ENABLE_LLVMC_DYNAMIC_PLUGINS$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim @@ -21514,7 +21531,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 95; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 93; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/docs/AliasAnalysis.html b/docs/AliasAnalysis.html index a23d90848e418..cffaa8206228e 100644 --- a/docs/AliasAnalysis.html +++ b/docs/AliasAnalysis.html @@ -238,10 +238,10 @@ 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 the two calls refer to disjoint -memory locations, 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 -accessed by CS2. Note that this relation is not commutative.

+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.

@@ -998,7 +998,7 @@ analysis directly.

Chris Lattner
LLVM Compiler Infrastructure
- Last modified: $Date: 2010-07-07 16:27:09 +0200 (Wed, 07 Jul 2010) $ + Last modified: $Date: 2010-08-31 01:47:24 +0200 (Tue, 31 Aug 2010) $ diff --git a/docs/BitCodeFormat.html b/docs/BitCodeFormat.html index f1f175d705537..bd53a1edd76c1 100644 --- a/docs/BitCodeFormat.html +++ b/docs/BitCodeFormat.html @@ -1367,21 +1367,6 @@ type to the type table.

- - - -
- -

[UNION, ...eltty...]

- -

The UNION record (code 17) adds a union type to -the type table. The eltty operand fields are zero or more type -indices representing the element types of the union. -

- -
- @@ -1489,7 +1474,7 @@ name. Each entry corresponds to a single named type. src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> Chris Lattner
The LLVM Compiler Infrastructure
-Last modified: $Date: 2010-05-22 00:20:54 +0200 (Sat, 22 May 2010) $ +Last modified: $Date: 2010-08-28 06:09:24 +0200 (Sat, 28 Aug 2010) $ diff --git a/docs/CMake.html b/docs/CMake.html index 40a2cec8e91bd..ca0b50f628e98 100644 --- a/docs/CMake.html +++ b/docs/CMake.html @@ -313,9 +313,15 @@
-

LLVM testing is not supported on Visual Studio.

+

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:

-

TODO

+
+

make check

+
+ +

Testing is not supported on Visual Studio.

@@ -348,7 +354,38 @@
-

TODO

+

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:

+ +
+
+    # 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(LLVM)
+    # Now set the header and library paths:
+    include_directories( ${LLVM_ROOT}/include )
+    link_directories( ${LLVM_ROOT}/lib )
+    # 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.)

@@ -377,7 +414,7 @@ Oscar Fuentes
LLVM Compiler Infrastructure
- Last modified: $Date: 2008-12-31 03:59:36 +0100 (Wed, 31 Dec 2008) $ + Last modified: $Date: 2010-08-09 03:59:36 +0100 (Mon, 9 Aug 2010) $ diff --git a/docs/CodeGenerator.html b/docs/CodeGenerator.html index 407178777a34c..4b2e261094bd6 100644 --- a/docs/CodeGenerator.html +++ b/docs/CodeGenerator.html @@ -1457,8 +1457,8 @@ bool RegMapping_Fer::compatible_class(MachineFunction &mf, 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 TargetRegisterInfo::storeRegToStackSlot(...), and to insert a - load instruction, use TargetRegisterInfo::loadRegFromStackSlot.

+ 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 @@ -2162,7 +2162,7 @@ MOVSX32rm16 -> movsx, 32-bit register, 16-bit memory Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2010-06-15 23:58:33 +0200 (Tue, 15 Jun 2010) $ + Last modified: $Date: 2010-09-01 00:01:07 +0200 (Wed, 01 Sep 2010) $ diff --git a/docs/CommandGuide/bugpoint.pod b/docs/CommandGuide/bugpoint.pod index 7afeea1aba5af..1870a0d84b604 100644 --- a/docs/CommandGuide/bugpoint.pod +++ b/docs/CommandGuide/bugpoint.pod @@ -67,6 +67,10 @@ tool. Pass all arguments specified after B<--gcc-tool-args> to the invocation of B. +=item B<--opt-args> I + +Pass all arguments specified after B<--opt-args> to the invocation of B. + =item B<--disable-{dce,simplifycfg}> Do not run the specified passes to clean up and reduce the size of the test diff --git a/docs/CommandGuide/index.html b/docs/CommandGuide/index.html index 62cb7765a47d0..67f0cfc1a110c 100644 --- a/docs/CommandGuide/index.html +++ b/docs/CommandGuide/index.html @@ -72,6 +72,9 @@ options) arguments to the tool you are interested in.

  • llvmc - a generic customizable compiler driver
  • +
  • llvm-diff - + structurally compare two modules
  • + @@ -148,7 +151,7 @@ options) arguments to the tool you are interested in.

    src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-05-11 18:47:42 +0200 (Tue, 11 May 2010) $ + Last modified: $Date: 2010-09-08 01:32:02 +0200 (Wed, 08 Sep 2010) $ diff --git a/docs/CommandGuide/llvm-diff.pod b/docs/CommandGuide/llvm-diff.pod new file mode 100644 index 0000000000000..c8cfdb3be94d8 --- /dev/null +++ b/docs/CommandGuide/llvm-diff.pod @@ -0,0 +1,53 @@ +=pod + +=head1 NAME + +llvm-diff - LLVM structural 'diff' + +=head1 SYNOPSIS + +B [I] I I [I] + +=head1 DESCRIPTION + +B 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. + +B 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. + +B is intended as a debugging tool for writers of LLVM +passes and frontends. It does not have a stable output format. + +=head1 EXIT STATUS + +If B finds no differences between the modules, it will exit +with 0 and produce no output. Otherwise it will exit with a non-zero +value. + +=head1 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. + +=head1 AUTHORS + +Maintained by the LLVM Team (L). + +=cut diff --git a/docs/DeveloperPolicy.html b/docs/DeveloperPolicy.html index 37bfb8990e01b..47352009ea043 100644 --- a/docs/DeveloperPolicy.html +++ b/docs/DeveloperPolicy.html @@ -43,7 +43,8 @@ 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.

    + making LLVM contributions. This policy covers all llvm.org subprojects, + including Clang, LLDB, etc.

    This policy is also designed to accomplish the following objectives:

      @@ -77,17 +78,28 @@
      -

      Developers should stay informed by reading at least the - llvmdev email - list. If you are doing anything more than just casual work on LLVM, it is - suggested that you also subscribe to the - llvm-commits - list and pay attention to changes being made by others.

      +

      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.

      + 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.

      @@ -107,18 +119,13 @@ patches may not apply correctly if the underlying code changes between the time the patch was created and the time it is applied. -
    1. Patches should be made with this command: -
      -
      -svn diff
      -
      -
      - or with the utility utils/mkpatch, which makes it easy to read - the diff.
    2. +
    3. 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.
    4. -
    5. Patches should not include differences in generated code such as the code - generated by autoconf or tblgen. The - utils/mkpatch utility takes care of this for you.
    6. +
    7. 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 @@ -239,8 +246,9 @@ svn diff them short. -

    Note that llvm/test is designed for regression and small feature tests - only. More extensive test cases (e.g., entire applications, benchmarks, etc) +

    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.

    @@ -263,7 +271,7 @@ svn diff testcase so we know if the fix/feature ever regresses in the future. -
  • Code must pass the dejagnu (llvm/test) test suite.
  • +
  • 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 @@ -601,7 +609,7 @@ Changes Written by the LLVM Oversight Group
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-05-07 02:28:04 +0200 (Fri, 07 May 2010) $ + Last modified: $Date: 2010-09-02 02:09:17 +0200 (Thu, 02 Sep 2010) $ diff --git a/docs/GCCFEBuildInstrs.html b/docs/GCCFEBuildInstrs.html index f4eccf79a2a5d..0b2827c9d5c17 100644 --- a/docs/GCCFEBuildInstrs.html +++ b/docs/GCCFEBuildInstrs.html @@ -84,7 +84,7 @@ top-level README.LLVM file, adding ",ada" to EXTRALANGS, for example:
  • The build requires having a compiler that supports Ada, C and C++. The Ada front-end is written in Ada so an Ada compiler is needed to build it. Compilers known to work with the - LLVM 2.5 release + LLVM 2.7 release are gcc-4.2 and the 2005, 2006 and 2007 versions of the GNAT GPL Edition. @@ -116,9 +116,9 @@ top-level README.LLVM file, adding ",ada" to EXTRALANGS, for example: and unpack it:

    -wget http://llvm.org/releases/2.5/llvm-2.5.tar.gz
    -tar xzf llvm-2.5.tar.gz
    -mv llvm-2.5 llvm
    +wget http://llvm.org/releases/2.7/llvm-2.7.tgz
    +tar xzf llvm-2.7.tgz
    +mv llvm-2.7 llvm
     

    or check out the @@ -133,9 +133,9 @@ mv llvm-2.5 llvm and unpack it:

    -wget http://llvm.org/releases/2.5/llvm-gcc-4.2-2.5.source.tar.gz
    -tar xzf llvm-gcc-4.2-2.5.source.tar.gz
    -mv llvm-gcc4.2-2.5.source llvm-gcc-4.2
    +wget http://llvm.org/releases/2.7/llvm-gcc-4.2-2.7.source.tgz
    +tar xzf llvm-gcc-4.2-2.7.source.tgz
    +mv llvm-gcc-4.2-2.7.source llvm-gcc-4.2
     

    or check out the @@ -272,7 +272,7 @@ More information is available in the FAQ. src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-05-07 02:28:04 +0200 (Fri, 07 May 2010) $ + Last modified: $Date: 2010-08-31 21:40:21 +0200 (Tue, 31 Aug 2010) $ diff --git a/docs/GetElementPtr.html b/docs/GetElementPtr.html index aa874ae4751d2..d840c9788ac1a 100644 --- a/docs/GetElementPtr.html +++ b/docs/GetElementPtr.html @@ -26,7 +26,6 @@

  • Why don't GEP x,0,0,1 and GEP x,1 alias?
  • Why do GEP x,1,0,0 and GEP x,1 alias?
  • Can GEP index into vector elements? -
  • Can GEP index into unions?
  • What effect do address spaces have on GEPs?
  • How is GEP different from ptrtoint, arithmetic, and inttoptr?
  • I'm writing a backend for a target which needs custom lowering for GEP. How do I do this? @@ -369,16 +368,6 @@ idx3 = (char*) &MyVar + 8 - -
    -

    Unknown.

    - -
    - - - @@ -730,7 +719,7 @@ idx3 = (char*) &MyVar + 8 Valid HTML 4.01 The LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-07-06 17:26:33 +0200 (Tue, 06 Jul 2010) $ + Last modified: $Date: 2010-08-28 06:09:24 +0200 (Sat, 28 Aug 2010) $ diff --git a/docs/GoldPlugin.html b/docs/GoldPlugin.html index 66e099bad0a08..3f2e9fb2e6402 100644 --- a/docs/GoldPlugin.html +++ b/docs/GoldPlugin.html @@ -79,7 +79,7 @@ placed. 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/libLLVMgold.so to test it out. Once you're + 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 can produce bitcode files from llvm-gcc using @@ -91,7 +91,7 @@ placed. linker, which is why you need gold to be the installed system linker in your path.

    If you want ar and nm to work seamlessly as well, install - libLLVMgold.so to /usr/lib/bfd-plugins. If you built your + LLVMgold.so to /usr/lib/bfd-plugins. If you built your own gold, be sure to install the ar and nm-new you built to /usr/bin.

    @@ -157,9 +157,9 @@ $ llvm-gcc -use-gold-plugin a.a b.o -o main # <-- link with LLVMgold plugin bitcode, everything is in place for an easy to use LTO build of autotooled projects:

      -
    • Follow the instructions on how to build libLLVMgold.so.
    • +
    • Follow the instructions on how to build LLVMgold.so.
    • Install the newly built binutils to $PREFIX
    • -
    • Copy Release/lib/libLLVMgold.so to +
    • Copy Release/lib/LLVMgold.so to $PREFIX/libexec/gcc/x86_64-unknown-linux-gnu/4.2.1/ and $PREFIX/lib/bfd-plugins/
    • Set environment variables ($PREFIX is where you installed llvm-gcc and diff --git a/docs/LangRef.html b/docs/LangRef.html index 4b4348d07f25c..b717531e34792 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -25,6 +25,7 @@
    • 'private' Linkage
    • 'linker_private' Linkage
    • 'linker_private_weak' Linkage
    • +
    • 'linker_private_weak_def_auto' Linkage
    • 'internal' Linkage
    • 'available_externally' Linkage
    • 'linkonce' Linkage
    • @@ -73,7 +74,6 @@
    • Array Type
    • Structure Type
    • Packed Structure Type
    • -
    • Union Type
    • Vector Type
    • @@ -491,20 +491,21 @@ the "hello world" module:

      -; Declare the string constant as a global constant.
      -@.LC0 = internal constant [13 x i8] c"hello world\0A\00"    ; [13 x i8]*
      +; Declare the string constant as a global constant. 
      +@.LC0 = internal constant [13 x i8] c"hello world\0A\00"      ; [13 x i8]* 
       
      -; External declaration of the puts function
      -declare i32 @puts(i8*)                                     ; i32 (i8*)* 
      +; External declaration of the puts function 
      +declare i32 @puts(i8*)                                      ; i32 (i8*)*  
       
       ; Definition of main function
      -define i32 @main() {                                        ; i32()* 
      -  ; Convert [13 x i8]* to i8  *...
      -  %cast210 = getelementptr [13 x i8]* @.LC0, i64 0, i64 0   ; i8*
      +define i32 @main() {   ; i32()*  
      +  ; Convert [13 x i8]* to i8  *... 
      +  %cast210 = getelementptr [13 x i8]* @.LC0, i64 0, i64 0   ; i8* 
       
      -  ; Call puts function to write out the string to stdout.
      -  call i32 @puts(i8* %cast210)                             ; i32
      -  ret i32 0
      } + ; Call puts function to write out the string to stdout.  + call i32 @puts(i8* %cast210) ; i32  + ret i32 0  +} ; Named metadata !1 = metadata !{i32 41} @@ -556,6 +557,15 @@ define i32 @main() { ; i32()* linker. The symbols are removed by the linker from the final linked image (executable or dynamic library). +
      linker_private_weak_def_auto
      +
      Similar to "linker_private_weak", but it's known that the address + of the object is not taken. For instance, functions that had an inline + definition, but the compiler decided not to inline it. Note, + unlike linker_private and linker_private_weak, + linker_private_weak_def_auto may have only default + visibility. 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 @@ -788,7 +798,7 @@ define i32 @main() { ; i32()*

      You may give a name to any type except - "void". Type name aliases may be used anywhere a type + "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, @@ -949,15 +959,17 @@ define [linkage] [visibility]

      Named metadata is a collection of metadata. Metadata - nodes (but not metadata strings) and null are the only valid operands for + nodes (but not metadata strings) are the only valid operands for a named metadata.

      Syntax:
      -; An unnamed metadata node, which is referenced by the named metadata.
      +; 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 = !{null, !1}
      +!name = !{!0, !1, !2}
       
      @@ -1462,7 +1474,6 @@ Classifications pointer, vector, structure, - union, array, label, metadata. @@ -1482,7 +1493,6 @@ Classifications pointer, structure, packed structure, - union, vector, opaque. @@ -1630,8 +1640,8 @@ Classifications

      Aggregate Types are a subset of derived types that can contain multiple member types. Arrays, - structs, vectors and - unions are aggregate types.

      + structs, and vectors are + aggregate types.

      @@ -1701,9 +1711,7 @@ Classifications
      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 scalar type, a void type, a struct type, or a union - type. If the return type is a struct type then all struct elements must be - of first class types, and the struct must have at least one element.

      + function type is a first class type or a void type.

      Syntax:
      @@ -1824,53 +1832,6 @@ Classifications 
       
       
       
      -
      -
      -
      -
      - -
      Overview:
      -

      A union type describes an object with size and alignment suitable for - an object of any one of a given set of types (also known as an "untagged" - union). It is similar in concept and usage to a - struct, except that all members of the union - have an offset of zero. The elements of a union may be any type that has a - size. Unions must have at least one member - empty unions are not allowed. -

      - -

      The size of the union as a whole will be the size of its largest member, - and the alignment requirements of the union as a whole will be the largest - alignment requirement of any member.

      - -

      Union members are accessed using 'load and - 'store' by getting a pointer to a field with - the 'getelementptr' instruction. - Since all members are at offset zero, the getelementptr instruction does - not affect the address, only the type of the resulting pointer.

      - -
      Syntax:
      -
      -  union { <type list> }
      -
      - -
      Examples:
      - - - - - - - - -
      union { i32, i32*, float }A union of three types: an i32, a pointer to - an i32, and a float.
      - union { float, i32 (i32) * }A union, where the first element is a float and the - second element is a pointer to a - function that takes an i32, returning - an i32.
      - -
      - @@ -2112,14 +2073,6 @@ Classifications the number and types of elements must match those specified by the type. -
      Union constants
      -
      Union constants are represented with notation similar to a structure with - a single element - that is, a single typed element surrounded - by braces ({})). For example: "{ i32 4 }". The - union type can be initialized with a single-element - struct as long as the type of the struct element matches the type of - one of the union members.
      -
      Array constants
      Array constants are represented with notation similar to array type definitions (a comma separated list of elements, surrounded by square @@ -4140,7 +4093,7 @@ Instruction
      Arguments:

      The first operand of an 'extractvalue' instruction is a value - of struct, union or + of struct or array type. The operands are constant indices to specify which value to extract in a similar manner as indices in a 'getelementptr' instruction.

      @@ -4174,7 +4127,7 @@ Instruction
      Arguments:

      The first operand of an 'insertvalue' instruction is a value - of struct, union or + of struct or 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 @@ -4407,12 +4360,12 @@ Instruction 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, structs and unions. Note that subsequent types being indexed into + 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 or union, only i32 + When indexing into a (optionally packed) structure, only i32 integer constants are allowed. When indexing into an array, pointer or vector, integers of any width are allowed, and they are not required to be constant.

      @@ -6117,8 +6070,8 @@ LLVM.

      Syntax:

      This is an overloaded intrinsic. You can use llvm.memset on any integer bit - width and for different address spaces. Not all targets support all bit - widths however.

      + width and for different address spaces. However, not all targets support all + bit widths.

         declare void @llvm.memset.p0i8.i32(i8* <dest>, i8 <val>,
      @@ -6132,14 +6085,14 @@ LLVM.

      particular byte value.

      Note that, unlike the standard libc function, the llvm.memset - intrinsic does not return a value, takes extra alignment/volatile arguments, - and the destination can be in an arbitrary address space.

      + 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 to fill it with, the third argument is an integer argument + 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 destination location.

      + 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 @@ -7746,7 +7699,7 @@ LLVM.

      Chris Lattner
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2010-07-13 21:48:13 +0200 (Tue, 13 Jul 2010) $ + Last modified: $Date: 2010-08-28 06:09:24 +0200 (Sat, 28 Aug 2010) $ diff --git a/docs/MakefileGuide.html b/docs/MakefileGuide.html index dd90478660058..38b7ae19fa64b 100644 --- a/docs/MakefileGuide.html +++ b/docs/MakefileGuide.html @@ -785,6 +785,9 @@ not.
      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)
      @@ -1025,7 +1028,7 @@ Reid Spencer
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2010-07-07 09:48:00 +0200 (Wed, 07 Jul 2010) $ + Last modified: $Date: 2010-07-24 19:54:00 +0200 (Sat, 24 Jul 2010) $ diff --git a/docs/Passes.html b/docs/Passes.html index 70d909796e687..0358745f79f7a 100644 --- a/docs/Passes.html +++ b/docs/Passes.html @@ -120,6 +120,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

      \n" if ! -print-used-typesFind Used Types -profile-estimatorEstimate profiling information -profile-loaderLoad profile information from llvmprof.out +-regionsDetect single entry single exit regions in a function -profile-verifierVerify profiling information -scalar-evolutionScalar Evolution Analysis -scev-aaScalarEvolution-based Alias Analysis @@ -166,6 +167,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

      \n" if ! -loop-unrollUnroll loops -loop-unswitchUnswitch loops -loopsimplifyCanonicalize natural loops +-loweratomicLower atomic intrinsics -lowerinvokeLower invoke and unwind, for unwindless code generators -lowersetjmpLower Set Jump -lowerswitchLower SwitchInst's to branches @@ -647,7 +649,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

      \n" if !

      This pass, only available in opt, prints the call graph to - standard output in a human-readable form. + standard error in a human-readable form.

      @@ -658,7 +660,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

      \n" if !

      This pass, only available in opt, prints the SCCs of the call - graph to standard output in a human-readable form. + graph to standard error in a human-readable form.

      @@ -669,7 +671,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

      \n" if !

      This pass, only available in opt, prints the SCCs of each - function CFG to standard output in a human-readable form. + function CFG to standard error in a human-readable form.

      @@ -678,15 +680,13 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

      \n" if ! -print-dbginfo: Print debug info in human readable form

      -

      Pass that prints instructions, and associated debug info: +

      Pass that prints instructions, and associated debug info:

      • source/line/col information
      • original variable name
      • original type name
      - -

      @@ -771,6 +771,17 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

      \n" if !

      Pass that checks profiling information for plausibility.

      + +
      +

      + 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. +

      +
      @@ -1535,6 +1546,24 @@ if (X < 3) {

      + + +
      +

      + 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. +

      +
      +
      -

      This pass implements code stripping. Specifically, it can delete: +

      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. @@ -1946,12 +1976,13 @@ if (X < 3) { -strip-nondebug: Strip all symbols, except dbg symbols, from a module

      -

      This pass implements code stripping. Specifically, it can delete: +

      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. @@ -2211,7 +2242,7 @@ if (X < 3) { Reid Spencer
      LLVM Compiler Infrastructure
      - Last modified: $Date: 2010-07-06 17:52:15 +0200 (Tue, 06 Jul 2010) $ + Last modified: $Date: 2010-08-20 03:03:44 +0200 (Fri, 20 Aug 2010) $ diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html index 9992cd91b6522..8fdd8a00b9bc6 100644 --- a/docs/ProgrammersManual.html +++ b/docs/ProgrammersManual.html @@ -309,8 +309,6 @@ to write maintainable code more than where to put your curly braces.

        -
      1. CVS -Branch and Tag Primer
      2. Using static and shared libraries across platforms
      @@ -1436,7 +1434,7 @@ to the key string for a value.

      The StringMap is very fast for several reasons: quadratic probing is very cache efficient for lookups, the hash value of strings in buckets is not -recomputed when lookup up an element, StringMap rarely has to touch the +recomputed when looking up an element, StringMap rarely has to touch the memory for unrelated objects when looking up a value (even when hash collisions happen), hash table growth does not recompute the hash values for strings already in the table, and each pair in the map is store in a single allocation @@ -3942,7 +3940,7 @@ arguments. An argument has a pointer to the parent Function.

      Dinakar Dhurjati and Chris Lattner
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2010-07-15 00:38:02 +0200 (Thu, 15 Jul 2010) $ + Last modified: $Date: 2010-08-04 17:59:16 +0200 (Wed, 04 Aug 2010) $ diff --git a/docs/ReleaseNotes.html b/docs/ReleaseNotes.html index a5a35dd84e670..d346e1ccb1f3e 100644 --- a/docs/ReleaseNotes.html +++ b/docs/ReleaseNotes.html @@ -67,9 +67,7 @@ Almost dead code. include/llvm/Analysis/LiveValues.h => Dan lib/Transforms/IPO/MergeFunctions.cpp => consider for 2.8. llvm/Analysis/PointerTracking.h => Edwin wants this, consider for 2.8. - ABCD, GEPSplitterPass - MSIL backend? - lib/Transforms/Utils/SSI.cpp -> ABCD depends on it. + GEPSplitterPass --> @@ -78,6 +76,7 @@ Almost dead code. strong phi elim llvm.dbg.value: variable debug info for optimized code loop dependence analysis + TBAA --> @@ -312,171 +251,13 @@ LLVM MC Project Blog Post.

      An exciting aspect of LLVM is that it is used as an enabling technology for a lot of other language and tools projects. This section lists some of the - projects that have already been updated to work with LLVM 2.7.

      -
      - - -
      -Pure -
      - -
      -

      -Pure -is an algebraic/functional programming language based on term rewriting. -Programs are collections of equations which are used to evaluate expressions in -a symbolic fashion. Pure offers dynamic typing, eager and lazy evaluation, -lexical closures, a hygienic macro system (also based on term rewriting), -built-in list and matrix support (including list and matrix comprehensions) and -an easy-to-use C interface. The interpreter uses LLVM as a backend to - JIT-compile Pure programs to fast native code.

      - -

      Pure versions 0.43 and later have been tested and are known to work with -LLVM 2.7 (and continue to work with older LLVM releases >= 2.5).

      - -
      - - - - -
      -

      -Roadsend PHP (rphp) is an open -source implementation of the PHP programming -language that uses LLVM for its optimizer, JIT and static compiler. This is a -reimplementation of an earlier project that is now based on LLVM. -

      -
      - - - - -
      -

      -Unladen Swallow is a -branch of Python intended to be fully -compatible and significantly faster. It uses LLVM's optimization passes and JIT -compiler. -

      -
      - - - - -
      -

      -TCE is a toolset for designing -application-specific processors (ASP) based on the Transport triggered -architecture (TTA). The toolset provides a complete co-design flow from C/C++ -programs down to synthesizable VHDL and parallel program binaries. Processor -customization points include the register files, function units, supported -operations, and the interconnection network.

      - -

      TCE uses llvm-gcc/Clang and LLVM for C/C++ language support, target -independent optimizations and also for parts of code generation. It generates -new LLVM-based code generators "on the fly" for the designed TTA processors and -loads them in to the compiler backend as runtime libraries to avoid per-target -recompilation of larger parts of the compiler chain.

      - -
      - - - - -
      -

      -SAFECode is a memory safe C -compiler built using LLVM. It takes standard, unannotated C code, analyzes the -code to ensure that memory accesses and array indexing operations are safe, and -instruments the code with run-time checks when safety cannot be proven -statically. -

      -
      - - - - -
      -

      -IcedTea provides a -harness to build OpenJDK using only free software build tools and to provide -replacements for the not-yet free parts of OpenJDK. One of the extensions that -IcedTea provides is a new JIT compiler named Shark which uses LLVM -to provide native code generation without introducing processor-dependent -code. -

      -

      Icedtea6 1.8 and later have been tested and are known to work with -LLVM 2.7 (and continue to work with older LLVM releases >= 2.6 as well). -

      -
      - - - - -
      -

      -LLVM-Lua uses LLVM - to add JIT and static compiling support to the Lua VM. Lua -bytecode is analyzed to remove type checks, then LLVM is used to compile the -bytecode down to machine code. -

      -

      LLVM-Lua 1.2.0 have been tested and is known to work with LLVM 2.7. -

      -
      - - - - -
      -

      -MacRuby is an implementation of Ruby based on -core Mac OS technologies, sponsored by Apple Inc. It uses LLVM at runtime for -optimization passes, JIT compilation and exception handling. It also allows -static (ahead-of-time) compilation of Ruby code straight to machine code. -

      -

      The upcoming MacRuby 0.6 release works with LLVM 2.7. -

      -
      - - - - -
      -

      -GHC is an open source, -state-of-the-art programming suite for Haskell, a standard lazy -functional programming language. It includes an optimizing static -compiler generating good code for a variety of platforms, together -with an interactive system for convenient, quick development.

      - -

      In addition to the existing C and native code generators, GHC now -supports an LLVM -code generator. GHC supports LLVM 2.7.

      - + projects that have already been updated to work with LLVM 2.8.

      @@ -496,29 +277,11 @@ in this section.
      -

      In addition to changes to the code, between LLVM 2.6 and 2.7, a number of +

      In addition to changes to the code, between LLVM 2.7 and 2.8, a number of organization changes have happened:

        -
      • LLVM has a new official logo!
      • - -
      • Ted Kremenek and Doug Gregor have stepped forward as Code Owners of the - Clang static analyzer and the Clang frontend, respectively.
      • - -
      • LLVM now has an official Blog at - http://blog.llvm.org. This is a great way - to learn about new LLVM-related features as they are implemented. Several - features in this release are already explained on the blog.
      • - -
      • The LLVM web pages are now checked into the SVN server, in the "www", - "www-pubs" and "www-releases" SVN modules. Previously they were hidden in a - largely inaccessible old CVS server.
      • - -
      • llvm.org is now hosted on a new (and much - faster) server. It is still graciously hosted at the University of Illinois - of Urbana Champaign.
      @@ -529,43 +292,10 @@ organization changes have happened:
      -

      LLVM 2.7 includes several major new capabilities:

      +

      LLVM 2.8 includes several major new capabilities:

        -
      • 2.7 includes initial support for the MicroBlaze target. - MicroBlaze is a soft processor core designed for Xilinx FPGAs.
      • - -
      • 2.7 includes a new LLVM IR "extensible metadata" feature. This feature - supports many different use cases, including allowing front-end authors to - encode source level information into LLVM IR, which is consumed by later - language-specific passes. This is a great way to do high-level optimizations - like devirtualization, type-based alias analysis, etc. See the - Extensible Metadata Blog Post for more information.
      • - -
      • 2.7 encodes debug information -in a completely new way, built on extensible metadata. The new implementation -is much more memory efficient and paves the way for improvements to optimized -code debugging experience.
      • - -
      • 2.7 now directly supports taking the address of a label and doing an - indirect branch through a pointer. This is particularly useful for - interpreter loops, and is used to implement the GCC "address of label" - extension. For more information, see the -Address of Label and Indirect Branches in LLVM IR Blog Post. - -
      • 2.7 is the first release to start supporting APIs for assembling and - disassembling target machine code. These APIs are useful for a variety of - low level clients, and are surfaced in the new "enhanced disassembly" API. - For more information see the The X86 - Disassembler Blog Post for more information.
      • - -
      • 2.7 includes major parts of the work required by the new MC Project, - see the MC update above for more information.
      • - +
      • .
      @@ -580,30 +310,56 @@ Address of Label and Indirect Branches in LLVM IR Blog Post. expose new optimization opportunities:

        -
      • LLVM IR now supports a 16-bit "half float" data type through two new intrinsics and APFloat support.
      • -
      • LLVM IR supports two new function - attributes: inlinehint and alignstack(n). The former is a hint to the - optimizer that a function was declared 'inline' and thus the inliner should - weight it higher when considering inlining it. The later - indicates to the code generator that the function diverges from the platform - ABI on stack alignment.
      • -
      • The new llvm.objectsize intrinsic - allows the optimizer to infer the sizes of memory objects in some cases. - This intrinsic is used to implement the GCC __builtin_object_size - extension.
      • -
      • LLVM IR now supports marking load and store instructions with "non-temporal" hints (building on the new - metadata feature). This hint encourages the code - generator to generate non-temporal accesses when possible, which are useful - for code that is carefully managing cache behavior. Currently, only the - X86 backend provides target support for this feature.
      • - -
      • LLVM 2.7 has pre-alpha support for unions in LLVM IR. - Unfortunately, this support is not really usable in 2.7, so if you're - interested in pushing it forward, please help contribute to LLVM mainline.
      • +
      • LLVM 2.8 changes the internal order of operands in InvokeInst + and CallInst. + To be portable across releases, resort to CallSite and the + high-level accessors, such as getCalledValue and setUnwindDest. +
      • +
      • + You can no longer pass use_iterators directly to cast<> (and similar), because + these routines tend to perform costly dereference operations more than once. You + have to dereference the iterators yourself and pass them in. +
      • +
      • + llvm.memcpy.*, llvm.memset.*, llvm.memmove.* (and possibly other?) intrinsics + take an extra parameter now (i1 isVolatile), totaling 5 parameters. + If you were creating these intrinsic calls and prototypes yourself (as opposed + to using Intrinsic::getDeclaration), you can use UpgradeIntrinsicFunction/UpgradeIntrinsicCall + to be portable accross releases. + Note that you cannot use Intrinsic::getDeclaration() in a backwards compatible + way (needs 2/3 types now, in 2.7 it needed just 1). +
      • +
      • + SetCurrentDebugLocation takes a DebugLoc now instead of a MDNode. + Change your code to use + SetCurrentDebugLocation(DebugLoc::getFromDILocation(...)). +
      • +
      • + VISIBILITY_HIDDEN is gone. +
      • +
      • + The RegisterPass and RegisterAnalysisGroup templates are + considered deprecated, but continue to function in LLVM 2.8. Clients are + strongly advised to use the upcoming INITIALIZE_PASS() and + INITIALIZE_AG_PASS() macros instead. +
      • + SMDiagnostic takes different parameters now. //FIXME: how to upgrade? +
      • +
      • + The constructor for the Triple class no longer tries to understand odd triple + specifications. Frontends should ensure that they only pass valid triples to + LLVM. The Triple::normalize utility method has been added to help front-ends + deal with funky triples. +
      • + Some APIs got renamed: +
          +
        • llvm_report_error -> report_fatal_error
        • +
        • llvm_install_error_handler -> install_fatal_error_handler
        • +
        • llvm::DwarfExceptionHandling -> llvm::JITExceptionHandling
        • +
        +
      @@ -620,48 +376,7 @@ release includes a few major enhancements and additions to the optimizers:

        -
      • The inliner now merges arrays stack objects in different callees when - inlining multiple call sites into one function. This reduces the stack size - of the resultant function.
      • -
      • The -basicaa alias analysis pass (which is the default) has been improved to - be less dependent on "type safe" pointers. It can now look through bitcasts - and other constructs more aggressively, allowing better load/store - optimization.
      • -
      • The load elimination optimization in the GVN Pass [intro - blog post] has been substantially improved to be more aggressive about - partial redundancy elimination and do more aggressive phi translation. Please - see the - Advanced Topics in Redundant Load Elimination with a Focus on PHI Translation - Blog Post for more details.
      • -
      • The module target data string now - includes a notion of 'native' integer data types for the target. This - helps mid-level optimizations avoid promoting complex sequences of - operations to data types that are not natively supported (e.g. converting - i32 operations to i64 on 32-bit chips).
      • -
      • The mid-level optimizer is now conservative when operating on a module with - no target data. Previously, it would default to SparcV9 settings, which is - not what most people expected.
      • -
      • Jump threading is now much more aggressive at simplifying correlated - conditionals and threading blocks with otherwise complex logic. It has - subsumed the old "Conditional Propagation" pass, and -condprop has been - removed from LLVM 2.7.
      • -
      • The -instcombine pass has been refactored from being one huge file to being - a library of its own. Internally, it uses a customized IRBuilder to clean - it up and simplify it.
      • - -
      • The optimal edge profiling pass is reliable and much more complete than in - 2.6. It can be used with the llvm-prof tool but isn't wired up to the - llvm-gcc and clang command line options yet.
      • - -
      • A new experimental alias analysis implementation, -scev-aa, has been added. - It uses LLVM's Scalar Evolution implementation to do symbolic analysis of - pointer offset expressions to disambiguate pointers. It can catch a few - cases that basicaa cannot, particularly in complex loop nests.
      • - -
      • The default pass ordering has been tweaked for improved optimization - effectiveness.
      • +
      @@ -676,19 +391,7 @@ href="http://blog.llvm.org/2009/12/introduction-to-load-elimination-in-gvn.html"
        -
      • The JIT now supports generating debug information and is compatible with -the new GDB 7.0 (and later) interfaces for registering dynamically generated -debug info.
      • - -
      • The JIT now defaults -to compiling eagerly to avoid a race condition in the lazy JIT. -Clients that still want the lazy JIT can switch it on by calling -ExecutionEngine::DisableLazyCompilation(false).
      • - -
      • It is now possible to create more than one JIT instance in the same process. -These JITs can generate machine code in parallel, -although you -still have to obey the other threading restrictions.
      • +
      @@ -706,49 +409,7 @@ infrastructure, which allows us to implement more aggressive algorithms and make it run faster:

        -
      • The 'llc -asm-verbose' option (which is now the default) has been enhanced - to emit many useful comments to .s files indicating information about spill - slots and loop nest structure. This should make it much easier to read and - understand assembly files. This is wired up in llvm-gcc and clang to - the -fverbose-asm option.
      • - -
      • New LSR with "full strength reduction" mode, which can reduce address - register pressure in loops where address generation is important.
      • - -
      • A new codegen level Common Subexpression Elimination pass (MachineCSE) - is available and enabled by default. It catches redundancies exposed by - lowering.
      • -
      • A new pre-register-allocation tail duplication pass is available and enabled - by default, it can substantially improve branch prediction quality in some - cases.
      • -
      • A new sign and zero extension optimization pass (OptimizeExtsPass) - is available and enabled by default. This pass can takes advantage - architecture features like x86-64 implicit zero extension behavior and - sub-registers.
      • -
      • The code generator now supports a mode where it attempts to preserve the - order of instructions in the input code. This is important for source that - is hand scheduled and extremely sensitive to scheduling. It is compatible - with the GCC -fno-schedule-insns option.
      • -
      • The target-independent code generator now supports generating code with - arbitrary numbers of result values. Returning more values than was - previously supported is handled by returning through a hidden pointer. In - 2.7, only the X86 and XCore targets have adopted support for this - though.
      • -
      • The code generator now supports generating code that follows the - Glasgow Haskell Compiler Calling - Convention and ABI.
      • -
      • The "DAG instruction - selection" phase of the code generator has been largely rewritten for - 2.7. Previously, tblgen spit out tons of C++ code which was compiled and - linked into the target to do the pattern matching, now it emits a much - smaller table which is read by the target-independent code. The primary - advantages of this approach is that the size and compile time of various - targets is much improved. The X86 code generator shrunk by 1.5MB of code, - for example.
      • -
      • Almost the entire code generator has switched to emitting code through the - MC interfaces instead of printing textually to the .s file. This led to a - number of cleanups and speedups. In 2.7, debug an exception handling - information does not go through MC yet.
      • +
      • MachO writer works.
      @@ -762,11 +423,9 @@ it run faster:

        -
      • The X86 backend now optimizes tails calls much more aggressively for - functions that use the standard C calling convention.
      • -
      • The X86 backend now models scalar SSE registers as subregs of the SSE vector - registers, making the code generator more aggressive in cases where scalars - and vector types are mixed.
      • +
      • The X86 backend now supports holding X87 floating point stack values + in registers across basic blocks, dramatically improving performance of code + that uses long double, and when targetting CPUs that don't support SSE.
      @@ -783,27 +442,7 @@ it run faster:

        -
      • The ARM backend now generates instructions in unified assembly syntax.
      • - -
      • llvm-gcc now has complete support for the ARM v7 NEON instruction set. This - support differs slightly from the GCC implementation. Please see the - - ARM Advanced SIMD (NEON) Intrinsics and Types in LLVM Blog Post for - helpful information if migrating code from GCC to LLVM-GCC.
      • - -
      • The ARM and Thumb code generators now use register scavenging for stack - object address materialization. This allows the use of R3 as a general - purpose register in Thumb1 code, as it was previous reserved for use in - stack address materialization. Secondly, sequential uses of the same - value will now re-use the materialized constant.
      • - -
      • The ARM backend now has good support for ARMv4 targets and has been tested - on StrongARM hardware. Previously, LLVM only supported ARMv4T and - newer chips.
      • - -
      • Atomic builtins are now supported for ARMv6 and ARMv7 (__sync_synchronize, - __sync_fetch_and_add, etc.).
      • +
      @@ -822,34 +461,7 @@ href="http://blog.llvm.org/2010/04/arm-advanced-simd-neon-intrinsics-and.html">

        -
      • The optimizer uses the new CodeMetrics class to measure the size of code. - Various passes (like the inliner, loop unswitcher, etc) all use this to make - more accurate estimates of the code size impact of various - optimizations.
      • -
      • A new - llvm/Analysis/InstructionSimplify.h interface is available for doing - symbolic simplification of instructions (e.g. a+0 -> a) - without requiring the instruction to exist. This centralizes a lot of - ad-hoc symbolic manipulation code scattered in various passes.
      • -
      • The optimizer now uses a new SSAUpdater - class which efficiently supports - doing unstructured SSA update operations. This centralized a bunch of code - scattered throughout various passes (e.g. jump threading, lcssa, - loop rotate, etc) for doing this sort of thing. The code generator has a - similar - MachineSSAUpdater class.
      • -
      • The - llvm/Support/Regex.h header exposes a platform independent regular - expression API. Building on this, the FileCheck utility now supports - regular exressions.
      • -
      • raw_ostream now supports a circular "debug stream" accessed with "dbgs()". - By default, this stream works the same way as "errs()", but if you pass - -debug-buffer-size=1000 to opt, the debug stream is capped to a - fixed sized circular buffer and the output is printed at the end of the - program's execution. This is helpful if you have a long lived compiler - process and you're interested in seeing snapshots in time.
      • +
      @@ -864,16 +476,7 @@ href="http://blog.llvm.org/2010/04/arm-advanced-simd-neon-intrinsics-and.html">

      Other miscellaneous features include:

        -
      • You can now build LLVM as a big dynamic library (e.g. "libllvm2.7.so"). To - get this, configure LLVM with the --enable-shared option.
      • - -
      • LLVM command line tools now overwrite their output by default. Previously, - they would only do this with -f. This makes them more convenient to use, and - behave more like standard unix tools.
      • - -
      • The opt and llc tools now autodetect whether their input is a .ll or .bc - file, and automatically do the right thing. This means you don't need to - explicitly use the llvm-as tool for most things.
      • +
      @@ -887,48 +490,21 @@ href="http://blog.llvm.org/2010/04/arm-advanced-simd-neon-intrinsics-and.html">

      If you're already an LLVM user or developer with out-of-tree changes based -on LLVM 2.6, this section lists some "gotchas" that you may run into upgrading +on LLVM 2.7, this section lists some "gotchas" that you may run into upgrading from the previous release.

        - -
      • -The Andersen's alias analysis ("anders-aa") pass, the Predicate Simplifier -("predsimplify") pass, the LoopVR pass, the GVNPRE pass, and the random sampling -profiling ("rsprofiling") passes have all been removed. They were not being -actively maintained and had substantial problems. If you are interested in -these components, you are welcome to ressurect them from SVN, fix the -correctness problems, and resubmit them to mainline.
      • - -
      • LLVM now defaults to building most libraries with RTTI turned off, providing -a code size reduction. Packagers who are interested in building LLVM to support -plugins that require RTTI information should build with "make REQUIRE_RTTI=1" -and should read the new Advice on Packaging LLVM -document.
      • - -
      • The LLVM interpreter now defaults to not using libffi even -if you have it installed. This makes it more likely that an LLVM built on one -system will work when copied to a similar system. To use libffi, -configure with --enable-libffi.
      • - -
      • Debug information uses a completely different representation, an LLVM 2.6 -.bc file should work with LLVM 2.7, but debug info won't come forward.
      • - -
      • The LLVM 2.6 (and earlier) "malloc" and "free" instructions got removed, - along with LowerAllocations pass. Now you should just use a call to the - malloc and free functions in libc. These calls are optimized as well as - the old instructions were.
      • +
      • .ll file doesn't produce #uses comments anymore, to get them, run a .bc file + through "llvm-dis --show-annotations".
      • +
      • MSIL Backend removed.
      • +
      • ABCD and SSI passes removed.
      • +
      • 'Union' LLVM IR feature removed.

      In addition, many APIs have changed in this release. Some of the major LLVM API changes are:

        - -
      • The add, sub, and mul instructions no longer -support floating-point operands. The fadd, fsub, and -fmul instructions should be used for this purpose instead.
      • -
      @@ -985,6 +561,9 @@ See: Broken versions of GCC and other to However, A Modern GCC Build for x86/x86-64 has been made available from the third party AuroraUX Project that has been meticulously tested for bootstrapping LLVM & Clang. +
    • There have been reports of Solaris and/or OpenSolaris build failures due +to an incompatibility in the nm program as well. The nm from binutils does seem +to work.
    @@ -1004,11 +583,10 @@ components, please contact us on the LLVMdev list.

      -
    • The MSIL, Alpha, SPU, MIPS, PIC16, Blackfin, MSP430, SystemZ and MicroBlaze +
    • The Alpha, SPU, MIPS, PIC16, Blackfin, MSP430, SystemZ and MicroBlaze backends are experimental.
    • llc "-filetype=asm" (the default) is the only - supported value for this option. The MachO writer is experimental, and - works much better in mainline SVN.
    • + supported value for this option. XXX Update me
    @@ -1025,8 +603,6 @@ href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list.

    all inline assembly that uses the X86 floating point stack. It supports the 'f' and 't' constraints, but not 'u'.
  • -
  • The X86 backend generates inefficient floating point code when configured - to generate code for systems that don't have SSE2.
  • Win64 code generation wasn't widely tested. Everything should work, but we expect small issues to happen. Also, llvm-gcc cannot build the mingw64 runtime currently due to lack of support for the 'u' inline assembly @@ -1230,7 +806,7 @@ lists.

    src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-05-07 02:28:04 +0200 (Fri, 07 May 2010) $ + Last modified: $Date: 2010-09-03 01:22:50 +0200 (Fri, 03 Sep 2010) $ diff --git a/docs/TestingGuide.html b/docs/TestingGuide.html index 3149f46cb5c57..c7353ebb0d436 100644 --- a/docs/TestingGuide.html +++ b/docs/TestingGuide.html @@ -16,22 +16,22 @@
  • Requirements
  • LLVM testing infrastructure organization
  • Quick start
  • -
  • DejaGNU structure +
  • Regression test structure
  • Test suite structure
  • @@ -43,12 +43,10 @@
  • Writing custom tests for llvm-test
  • -
  • Running the nightly tester
  • -

    Written by John T. Criswell, Reid Spencer, and Tanya Lattner

    +

    Written by John T. Criswell, Daniel Dunbar, Reid Spencer, and Tanya Lattner

    @@ -57,9 +55,9 @@
    -

    This document is the reference manual for the LLVM testing infrastructure. It documents -the structure of the LLVM testing infrastructure, the tools needed to use it, -and how to add and run tests.

    +

    This document is the reference manual for the LLVM testing infrastructure. It +documents the structure of the LLVM testing infrastructure, the tools needed to +use it, and how to add and run tests.

    @@ -69,17 +67,9 @@ and how to add and run tests.

    -

    In order to use the LLVM testing infrastructure, you will need all of the software -required to build LLVM, plus the following:

    - -
    -
    DejaGNU
    -
    The Feature and Regressions tests are organized and run by DejaGNU.
    -
    Expect
    -
    Expect is required by DejaGNU.
    -
    tcl
    -
    Tcl is required by DejaGNU.
    -
    +

    In order to use the LLVM testing infrastructure, you will need all of the +software required to build LLVM, as well +as Python 2.4 or later.

    @@ -89,29 +79,28 @@ required to build LLVM, plus the following:

    -

    The LLVM testing infrastructure contains two major categories of tests: code -fragments and whole programs. Code fragments are referred to as the "DejaGNU -tests" and are in the llvm module in subversion under the -llvm/test directory. The whole programs tests are referred to as the -"Test suite" and are in the test-suite module in subversion. +

    The LLVM testing infrastructure contains two major categories of tests: +regression tests and whole programs. The regression tests are contained inside +the LLVM repository itself under llvm/test and are expected to always +pass -- they should be run before every commit. The whole programs tests are +referred to as the "LLVM test suite" and are in the test-suite module +in subversion.

    - +
    -

    Code fragments are small pieces of code that test a specific -feature of LLVM or trigger a specific bug in LLVM. They are usually -written in LLVM assembly language, but can be written in other -languages if the test targets a particular language front end (and the -appropriate --with-llvmgcc options were used -at configure time of the llvm module). These tests -are driven by the DejaGNU testing framework, which is hidden behind a -few simple makefiles.

    +

    The regression tests are small pieces of code that test a specific feature of +LLVM or trigger a specific bug in LLVM. They are usually written in LLVM +assembly language, but can be written in other languages if the test targets a +particular language front end (and the appropriate --with-llvmgcc +options were used at configure time of the llvm module). These +tests are driven by the 'lit' testing tool, which is part of LLVM.

    These code fragments are not complete programs. The code generated from them is never executed to determine correct behavior.

    @@ -158,8 +147,8 @@ generates code.

    -

    The tests are located in two separate Subversion modules. The - DejaGNU tests are in the main "llvm" module under the directory +

    The tests are located in two separate Subversion modules. The regressions + tests are in the main "llvm" module under the directory llvm/test (so you get these tests for free with the main llvm tree). The more comprehensive test suite that includes whole programs in C and C++ is in the test-suite module. This module should @@ -171,10 +160,10 @@ the test-suite directory will be automatically configured. Alternatively, you can configure the test-suite module manually.

    - + -

    To run all of the simple tests in LLVM using DejaGNU, use the master Makefile - in the llvm/test directory:

    +

    To run all of the LLVM regression tests, use master Makefile in + the llvm/test directory:

    @@ -190,38 +179,47 @@ Alternatively, you can configure the test-suite module manually.

    -

    To run only a subdirectory of tests in llvm/test using DejaGNU (ie. -Transforms), just set the TESTSUITE variable to the path of the -subdirectory (relative to llvm/test):

    +

    If you have Clang checked out and built, +you can run the LLVM and Clang tests simultaneously using:

    + +

    or

    -% gmake TESTSUITE=Transforms check
    +% gmake check-all
     
    -

    Note: If you are running the tests with objdir != subdir, you -must have run the complete testsuite before you can specify a -subdirectory.

    +

    To run the tests with Valgrind (Memcheck by default), just append +VG=1 to the commands above, e.g.:

    -

    To run only a single test, set TESTONE to its path (relative to -llvm/test) and make the check-one target:

    +
    +
    +% gmake check VG=1
    +
    +
    + +

    To run individual tests or subsets of tests, you can use the 'llvm-lit' +script which is built as part of LLVM. For example, to run the +'Integer/BitCast.ll' test by itself you can run:

    -% gmake TESTONE=Feature/basictest.ll check-one
    +% llvm-lit ~/llvm/test/Integer/BitCast.ll 
     
    -

    To run the tests with Valgrind (Memcheck by default), just append -VG=1 to the commands above, e.g.:

    +

    or to run all of the ARM CodeGen tests:

    -% gmake check VG=1
    +% llvm-lit ~/llvm/test/CodeGen/ARM
     
    +

    For more information on using the 'lit' tool, see 'llvm-lit --help' or the +'lit' man page.

    + @@ -275,11 +273,11 @@ that subdirectory.

    - +
    -

    The LLVM DejaGNU tests are driven by DejaGNU together with GNU Make and are - located in the llvm/test directory. +

    The LLVM regression tests are driven by 'lit' and are located in + the llvm/test directory.

    This directory contains a large array of small tests that exercise various features of LLVM and to ensure that regressions do not @@ -302,23 +300,24 @@ that subdirectory.

    - +
    -

    The DejaGNU structure is very simple, but does require some information to - be set. This information is gathered via configure and is written - to a file, site.exp in llvm/test. The llvm/test - Makefile does this work for you.

    - -

    In order for DejaGNU to work, each directory of tests must have a - dg.exp file. DejaGNU looks for this file to determine how to run the - tests. This file is just a Tcl script and it can do anything you want, but - we've standardized it for the LLVM regression tests. If you're adding a +

    The regression test structure is very simple, but does require some + information to be set. This information is gathered via configure and + is written to a file, lit.site.cfg + in llvm/test. The llvm/test Makefile does this work for + you.

    + +

    In order for the regression tests to work, each directory of tests must + have a dg.exp file. Lit looks for this file to determine how to + run the tests. This file is just a Tcl script and it can do anything you want, + but we've standardized it for the LLVM regression tests. If you're adding a directory of tests, just copy dg.exp from another directory to get - running. The standard dg.exp simply loads a Tcl - library (test/lib/llvm.exp) and calls the llvm_runtests - function defined in that library with a list of file names to run. The names - are obtained by using Tcl's glob command. Any directory that contains only + running. The standard dg.exp simply loads a Tcl library + (test/lib/llvm.exp) and calls the llvm_runtests function + defined in that library with a list of file names to run. The names are + obtained by using Tcl's glob command. Any directory that contains only directories does not need the dg.exp file.

    The llvm-runtests function lookas at each file that is passed to @@ -379,7 +378,8 @@ that subdirectory.

    There are some quoting rules that you must pay attention to when writing your RUN lines. In general nothing needs to be quoted. Tcl won't strip off any - ' or " so they will get passed to the invoked program. For example:

    + quote characters so they will get passed to the invoked program. For + example:

    @@ -696,7 +696,7 @@ define two separate CHECK lines that match on the same line.
     
    -
    Variables and +
    @@ -792,7 +792,7 @@ substitutions
    - +

    To make RUN line writing easier, there are several shell scripts located @@ -818,7 +818,7 @@ substitutions

    Sometimes it is necessary to mark a test case as "expected fail" or XFAIL. You can easily mark a test as XFAIL just by including XFAIL: on a line near the top of the file. This signals that the test case should succeed - if the test fails. Such test cases are counted separately by DejaGnu. To + if the test fails. Such test cases are counted separately by the testing tool. To specify an expected fail, use the XFAIL keyword in the comments of the test program followed by a colon and one or more regular expressions (separated by a comma). The regular expressions allow you to XFAIL the test conditionally by @@ -906,9 +906,10 @@ benchmarks, regression tests, code that is strange grammatically, etc. These organizations should be relatively self explanatory.

    Some tests are known to fail. Some are bugs that we have not fixed yet; -others are features that we haven't added yet (or may never add). In DejaGNU, -the result for such tests will be XFAIL (eXpected FAILure). In this way, you -can tell the difference between an expected and unexpected failure.

    +others are features that we haven't added yet (or may never add). In the +regression tests, the result for such tests will be XFAIL (eXpected FAILure). +In this way, you can tell the difference between an expected and unexpected +failure.

    The tests in the test suite have no such feature at this time. If the test passes, only warnings and other miscellaneous output will be generated. If @@ -1135,66 +1136,6 @@ example reports that can do fancy stuff.

    - - - - -
    - -

    -The LLVM Nightly Testers -automatically check out an LLVM tree, build it, run the "nightly" -program test (described above), run all of the DejaGNU tests, -delete the checked out tree, and then submit the results to -http://llvm.org/nightlytest/. -After test results are submitted to -http://llvm.org/nightlytest/, -they are processed and displayed on the tests page. An email to - -llvm-testresults@cs.uiuc.edu summarizing the results is also generated. -This testing scheme is designed to ensure that programs don't break as well -as keep track of LLVM's progress over time.

    - -

    If you'd like to set up an instance of the nightly tester to run on your -machine, take a look at the comments at the top of the -utils/NewNightlyTest.pl file. If you decide to set up a nightly tester -please choose a unique nickname and invoke utils/NewNightlyTest.pl -with the "-nickname [yournickname]" command line option. - -

    You can create a shell script to encapsulate the running of the script. -The optimized x86 Linux nightly test is run from just such a script:

    - -
    -
    -#!/bin/bash
    -BASE=/proj/work/llvm/nightlytest
    -export BUILDDIR=$BASE/build 
    -export WEBDIR=$BASE/testresults 
    -export LLVMGCCDIR=/proj/work/llvm/cfrontend/install
    -export PATH=/proj/install/bin:$LLVMGCCDIR/bin:$PATH
    -export LD_LIBRARY_PATH=/proj/install/lib
    -cd $BASE
    -cp /proj/work/llvm/llvm/utils/NewNightlyTest.pl .
    -nice ./NewNightlyTest.pl -nice -release -verbose -parallel -enable-linscan \
    -   -nickname NightlyTester -noexternals > output.log 2>&1 
    -
    -
    - -

    It is also possible to specify the the location your nightly test results -are submitted. You can do this by passing the command line option -"-submit-server [server_address]" and "-submit-script [script_on_server]" to -utils/NewNightlyTest.pl. For example, to submit to the llvm.org -nightly test results page, you would invoke the nightly test script with -"-submit-server llvm.org -submit-script /nightlytest/NightlyTestAccept.cgi". -If these options are not specified, the nightly test script sends the results -to the llvm.org nightly test results page.

    - -

    Take a look at the NewNightlyTest.pl file to see what all of the -flags and strings do. If you start running the nightly tests, please let us -know. Thanks!

    - -
    -
    @@ -1204,9 +1145,9 @@ know. Thanks!

    Valid HTML 4.01 - John T. Criswell, Reid Spencer, and Tanya Lattner
    + John T. Criswell, Daniel Dunbar, Reid Spencer, and Tanya Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2010-05-07 02:28:04 +0200 (Fri, 07 May 2010) $ + Last modified: $Date: 2010-08-02 03:20:23 +0200 (Mon, 02 Aug 2010) $ diff --git a/docs/WritingAnLLVMBackend.html b/docs/WritingAnLLVMBackend.html index aa2612c2e9210..2dc0ef772cca2 100644 --- a/docs/WritingAnLLVMBackend.html +++ b/docs/WritingAnLLVMBackend.html @@ -1299,9 +1299,6 @@ implementation in SparcInstrInfo.cpp: