From 36bf506ad3c99a309ca8bd73bd03563d8d068ac0 Mon Sep 17 00:00:00 2001
From: Roman Divacky
Date: Wed, 4 Nov 2009 14:58:56 +0000
Subject: [PATCH] Update LLVM to r86025.
---
CMakeLists.txt | 24 +-
Makefile | 10 +-
Makefile.config.in | 9 +
Makefile.rules | 14 +-
autoconf/configure.ac | 25 +-
cmake/config-ix.cmake | 10 +-
cmake/modules/LLVMLibDeps.cmake | 1 -
cmake/modules/LLVMProcessSources.cmake | 15 +
configure | 96 +-
docs/BitCodeFormat.html | 501 ++++-
docs/CommandGuide/lit.pod | 5 +
docs/CompilerDriver.html | 105 +-
docs/GettingStarted.html | 4 +-
docs/LangRef.html | 342 ++--
docs/Passes.html | 18 +-
docs/ReleaseNotes.html | 4 +-
docs/TableGenFundamentals.html | 4 +-
docs/tutorial/LangImpl4.html | 33 +-
docs/tutorial/OCamlLangImpl4.html | 29 +-
examples/BrainF/BrainF.cpp | 4 +-
include/llvm-c/Core.h | 6 +-
include/llvm-c/Transforms/IPO.h | 2 +-
include/llvm/ADT/DenseMap.h | 4 +-
include/llvm/ADT/EquivalenceClasses.h | 2 +-
include/llvm/ADT/FoldingSet.h | 2 +-
include/llvm/ADT/ImmutableList.h | 2 +-
include/llvm/ADT/ImmutableSet.h | 2 +-
include/llvm/ADT/SmallPtrSet.h | 2 +-
include/llvm/ADT/SparseBitVector.h | 2 +-
include/llvm/ADT/StringExtras.h | 2 +-
include/llvm/ADT/StringSwitch.h | 83 +
include/llvm/ADT/Twine.h | 2 +-
include/llvm/ADT/ValueMap.h | 54 +-
include/llvm/Analysis/AliasSetTracker.h | 3 -
include/llvm/Analysis/DebugInfo.h | 29 +
include/llvm/Analysis/Dominators.h | 4 +-
include/llvm/Analysis/LoopInfo.h | 6 +-
include/llvm/Analysis/MemoryBuiltins.h | 79 +
include/llvm/Analysis/ScalarEvolution.h | 11 +-
include/llvm/Analysis/ValueTracking.h | 2 +-
include/llvm/BasicBlock.h | 26 +-
include/llvm/Bitcode/BitCodes.h | 2 +-
include/llvm/Bitcode/Deserialize.h | 2 +-
include/llvm/Bitcode/LLVMBitCodes.h | 8 +-
include/llvm/CodeGen/AsmPrinter.h | 7 +
include/llvm/CodeGen/BinaryObject.h | 2 +-
include/llvm/CodeGen/ELFRelocation.h | 2 +-
include/llvm/CodeGen/JITCodeEmitter.h | 2 +-
include/llvm/CodeGen/LatencyPriorityQueue.h | 21 +-
include/llvm/CodeGen/LiveInterval.h | 296 +--
include/llvm/CodeGen/LiveIntervalAnalysis.h | 298 +--
include/llvm/CodeGen/LiveStackAnalysis.h | 2 -
include/llvm/CodeGen/MachineBasicBlock.h | 12 +
include/llvm/CodeGen/MachineCodeEmitter.h | 2 +-
include/llvm/CodeGen/MachineFrameInfo.h | 2 +-
include/llvm/CodeGen/MachineInstrBuilder.h | 7 -
include/llvm/CodeGen/MachineModuleInfo.h | 2 +-
include/llvm/CodeGen/MachineOperand.h | 37 +-
include/llvm/CodeGen/MachineRelocation.h | 2 +-
include/llvm/CodeGen/ProcessImplicitDefs.h | 41 +
include/llvm/CodeGen/PseudoSourceValue.h | 4 +
include/llvm/CodeGen/ScheduleDAG.h | 38 +-
include/llvm/CodeGen/SelectionDAG.h | 2 +
include/llvm/CodeGen/SelectionDAGISel.h | 8 +
include/llvm/CodeGen/SelectionDAGNodes.h | 23 +-
include/llvm/CodeGen/SlotIndexes.h | 740 +++++++
include/llvm/CodeGen/ValueTypes.h | 2 +-
include/llvm/Constant.h | 23 +-
include/llvm/Constants.h | 40 +
.../llvm/ExecutionEngine/ExecutionEngine.h | 76 +-
include/llvm/ExecutionEngine/GenericValue.h | 2 +-
.../llvm/ExecutionEngine/JITEventListener.h | 9 +-
.../llvm/ExecutionEngine/JITMemoryManager.h | 2 +-
include/llvm/InstrTypes.h | 37 +-
include/llvm/Instruction.def | 52 +-
include/llvm/Instruction.h | 3 +-
include/llvm/Instructions.h | 425 ++--
include/llvm/Intrinsics.td | 5 +
include/llvm/LinkAllPasses.h | 6 +-
include/llvm/MC/MCAsmLexer.h | 2 +-
include/llvm/MC/MCAsmParser.h | 2 +-
include/llvm/MC/MCAssembler.h | 2 +-
include/llvm/MC/MCDisassembler.h | 2 +-
include/llvm/MC/MCExpr.h | 2 +-
include/llvm/MC/MCInst.h | 3 +-
include/llvm/MC/MCStreamer.h | 2 +-
include/llvm/MC/MCSymbol.h | 2 +-
include/llvm/MC/MCValue.h | 2 +-
include/llvm/Metadata.h | 4 +-
include/llvm/Module.h | 3 +-
include/llvm/Pass.h | 2 +-
include/llvm/Support/Allocator.h | 2 +-
include/llvm/Support/ConstantRange.h | 2 +-
include/llvm/Support/Debug.h | 67 +-
include/llvm/Support/ELF.h | 2 +-
include/llvm/Support/IRBuilder.h | 24 +-
include/llvm/Support/InstVisitor.h | 5 +-
include/llvm/Support/MathExtras.h | 2 +-
include/llvm/Support/MemoryBuffer.h | 2 +-
include/llvm/Support/MemoryObject.h | 2 +-
include/llvm/Support/PointerLikeTypeTraits.h | 4 +-
include/llvm/Support/SlowOperationInformer.h | 2 +-
include/llvm/Support/StandardPasses.h | 39 +-
include/llvm/Support/TargetFolder.h | 10 +
include/llvm/Support/Timer.h | 2 +-
include/llvm/Support/raw_ostream.h | 2 +-
include/llvm/System/AIXDataTypesFix.h | 25 +
include/llvm/System/Atomic.h | 2 +-
include/llvm/System/DataTypes.h.cmake | 152 ++
include/llvm/System/DataTypes.h.in | 147 ++
include/llvm/System/Disassembler.h | 2 +-
include/llvm/System/Memory.h | 2 +-
include/llvm/System/TimeValue.h | 2 +-
include/llvm/Target/SubtargetFeature.h | 2 +-
include/llvm/Target/Target.td | 2 +-
include/llvm/Target/TargetData.h | 2 +-
include/llvm/Target/TargetInstrDesc.h | 8 +-
include/llvm/Target/TargetInstrInfo.h | 32 +-
include/llvm/Target/TargetJITInfo.h | 2 +-
include/llvm/Target/TargetLowering.h | 26 +-
include/llvm/Target/TargetSelectionDAG.td | 6 +
include/llvm/Transforms/IPO.h | 7 -
include/llvm/Transforms/Scalar.h | 35 +-
.../llvm/Transforms/Utils/BasicBlockUtils.h | 12 +-
include/llvm/Transforms/Utils/SSAUpdater.h | 2 +-
include/llvm/Transforms/Utils/ValueMapper.h | 3 +-
include/llvm/Type.h | 4 +-
include/llvm/TypeSymbolTable.h | 9 +-
include/llvm/Value.h | 1 +
include/llvm/ValueSymbolTable.h | 2 +-
lib/Analysis/AliasAnalysis.cpp | 2 +-
lib/Analysis/AliasAnalysisCounter.cpp | 4 +-
lib/Analysis/AliasAnalysisEvaluator.cpp | 3 +-
lib/Analysis/AliasDebugger.cpp | 4 +-
lib/Analysis/AliasSetTracker.cpp | 20 +-
lib/Analysis/BasicAliasAnalysis.cpp | 93 +-
lib/Analysis/CFGPrinter.cpp | 9 +-
lib/Analysis/CMakeLists.txt | 2 +-
lib/Analysis/CaptureTracking.cpp | 3 -
lib/Analysis/ConstantFolding.cpp | 277 +--
lib/Analysis/DbgInfoPrinter.cpp | 2 +-
lib/Analysis/DebugInfo.cpp | 105 +-
lib/Analysis/IPA/Andersens.cpp | 27 +-
lib/Analysis/IPA/CallGraph.cpp | 3 +-
lib/Analysis/IPA/GlobalsModRef.cpp | 15 +-
lib/Analysis/InlineCost.cpp | 26 +-
lib/Analysis/InstCount.cpp | 8 +-
lib/Analysis/MallocHelper.cpp | 265 ---
lib/Analysis/MemoryBuiltins.cpp | 277 +++
lib/Analysis/MemoryDependenceAnalysis.cpp | 76 +-
lib/Analysis/PointerTracking.cpp | 4 +-
lib/Analysis/ProfileEstimatorPass.cpp | 3 +-
lib/Analysis/ProfileInfo.cpp | 4 +-
lib/Analysis/ProfileInfoLoaderPass.cpp | 11 +-
lib/Analysis/ProfileVerifierPass.cpp | 5 +-
lib/Analysis/ScalarEvolution.cpp | 19 +-
lib/Analysis/ScalarEvolutionAliasAnalysis.cpp | 28 +-
lib/Analysis/SparsePropagation.cpp | 5 +
lib/Analysis/ValueTracking.cpp | 2 +-
lib/AsmParser/LLLexer.cpp | 7 +-
lib/AsmParser/LLParser.cpp | 289 ++-
lib/AsmParser/LLParser.h | 66 +-
lib/AsmParser/LLToken.h | 5 +-
lib/Bitcode/Reader/BitcodeReader.cpp | 67 +-
lib/Bitcode/Reader/BitcodeReader.h | 10 +-
lib/Bitcode/Writer/BitcodeWriter.cpp | 29 +-
lib/Bitcode/Writer/ValueEnumerator.cpp | 45 +-
lib/Bitcode/Writer/ValueEnumerator.h | 9 +
lib/CodeGen/AggressiveAntiDepBreaker.cpp | 794 ++++++++
lib/CodeGen/AggressiveAntiDepBreaker.h | 176 ++
lib/CodeGen/AntiDepBreaker.h | 73 +
lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 40 +
lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 46 +-
lib/CodeGen/AsmPrinter/DwarfDebug.h | 10 +-
lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp | 3 +-
lib/CodeGen/BranchFolding.cpp | 58 +-
lib/CodeGen/CMakeLists.txt | 4 +
lib/CodeGen/CriticalAntiDepBreaker.cpp | 540 +++++
lib/CodeGen/CriticalAntiDepBreaker.h | 103 +
lib/CodeGen/DeadMachineInstructionElim.cpp | 4 +-
lib/CodeGen/DwarfEHPrepare.cpp | 3 +-
lib/CodeGen/ELF.h | 2 +-
lib/CodeGen/ExactHazardRecognizer.cpp | 2 +-
lib/CodeGen/GCMetadata.cpp | 5 +-
lib/CodeGen/GCStrategy.cpp | 5 +-
lib/CodeGen/IfConversion.cpp | 2 +-
lib/CodeGen/LLVMTargetMachine.cpp | 69 +-
lib/CodeGen/LatencyPriorityQueue.cpp | 9 +-
lib/CodeGen/LiveInterval.cpp | 89 +-
lib/CodeGen/LiveIntervalAnalysis.cpp | 793 ++------
lib/CodeGen/LiveStackAnalysis.cpp | 9 +-
lib/CodeGen/LowerSubregs.cpp | 79 +-
lib/CodeGen/MachineBasicBlock.cpp | 33 +-
lib/CodeGen/MachineFunction.cpp | 125 +-
lib/CodeGen/MachineInstr.cpp | 49 +-
lib/CodeGen/MachineLICM.cpp | 161 +-
lib/CodeGen/MachineSink.cpp | 3 +-
lib/CodeGen/MachineVerifier.cpp | 9 +-
lib/CodeGen/OcamlGC.cpp | 3 +-
lib/CodeGen/PostRASchedulerList.cpp | 747 ++-----
lib/CodeGen/PreAllocSplitting.cpp | 200 +-
lib/CodeGen/ProcessImplicitDefs.cpp | 231 +++
lib/CodeGen/PrologEpilogInserter.cpp | 4 +-
lib/CodeGen/PseudoSourceValue.cpp | 22 +-
lib/CodeGen/RegAllocLinearScan.cpp | 58 +-
lib/CodeGen/RegAllocLocal.cpp | 3 +-
lib/CodeGen/RegAllocPBQP.cpp | 8 +-
lib/CodeGen/RegisterScavenging.cpp | 51 +-
lib/CodeGen/ScheduleDAG.cpp | 16 +-
lib/CodeGen/ScheduleDAGEmit.cpp | 12 +-
lib/CodeGen/ScheduleDAGInstrs.cpp | 89 +-
lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 34 +-
lib/CodeGen/SelectionDAG/InstrEmitter.cpp | 10 +-
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 13 +-
lib/CodeGen/SelectionDAG/LegalizeTypes.cpp | 3 +-
lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp | 5 +-
lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp | 3 +-
.../SelectionDAG/ScheduleDAGRRList.cpp | 6 +-
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h | 1 +
lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 78 +-
.../SelectionDAG/SelectionDAGBuild.cpp | 66 +-
lib/CodeGen/SelectionDAG/SelectionDAGBuild.h | 4 +-
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 63 +-
lib/CodeGen/SelectionDAG/TargetLowering.cpp | 2 +-
lib/CodeGen/ShadowStackGC.cpp | 5 +-
lib/CodeGen/SimpleRegisterCoalescing.cpp | 234 ++-
lib/CodeGen/SimpleRegisterCoalescing.h | 13 +-
lib/CodeGen/SjLjEHPrepare.cpp | 3 +-
lib/CodeGen/SlotIndexes.cpp | 189 ++
lib/CodeGen/Spiller.cpp | 68 +-
lib/CodeGen/StackProtector.cpp | 2 +-
lib/CodeGen/StackSlotColoring.cpp | 5 +-
lib/CodeGen/StrongPHIElimination.cpp | 58 +-
lib/CodeGen/TwoAddressInstructionPass.cpp | 4 +-
lib/CodeGen/UnreachableBlockElim.cpp | 6 +-
lib/CodeGen/VirtRegMap.cpp | 2 +-
lib/CodeGen/VirtRegMap.h | 10 +-
lib/CodeGen/VirtRegRewriter.cpp | 23 +-
lib/ExecutionEngine/ExecutionEngine.cpp | 49 +-
lib/ExecutionEngine/Interpreter/Execution.cpp | 41 +-
lib/ExecutionEngine/Interpreter/Interpreter.h | 7 +-
lib/ExecutionEngine/JIT/JIT.cpp | 10 +-
lib/ExecutionEngine/JIT/JIT.h | 7 +-
lib/ExecutionEngine/JIT/JITDebugRegisterer.h | 2 +-
lib/ExecutionEngine/JIT/JITEmitter.cpp | 111 +-
.../JIT/MacOSJITEventListener.cpp | 172 --
.../JIT/OProfileJITEventListener.cpp | 12 +-
lib/Linker/LinkModules.cpp | 30 +-
lib/MC/MCAsmInfo.cpp | 2 +-
lib/Support/APFloat.cpp | 24 +-
lib/Support/Allocator.cpp | 2 +-
lib/Support/Debug.cpp | 11 +
lib/Support/MemoryBuffer.cpp | 2 +-
lib/System/DynamicLibrary.cpp | 1 -
lib/System/Path.cpp | 1 -
lib/System/Unix/Memory.inc | 2 +-
lib/System/Unix/Process.inc | 4 +-
lib/System/Unix/Signals.inc | 2 +-
lib/System/Win32/Memory.inc | 2 +-
lib/Target/ARM/ARM.h | 1 +
lib/Target/ARM/ARM.td | 8 +-
lib/Target/ARM/ARMBaseInstrInfo.cpp | 101 +-
lib/Target/ARM/ARMBaseInstrInfo.h | 17 +-
lib/Target/ARM/ARMBaseRegisterInfo.cpp | 164 +-
lib/Target/ARM/ARMBaseRegisterInfo.h | 9 +
lib/Target/ARM/ARMCallingConv.td | 1 +
lib/Target/ARM/ARMCodeEmitter.cpp | 5 +-
lib/Target/ARM/ARMConstantIslandPass.cpp | 67 +-
lib/Target/ARM/ARMConstantPoolValue.cpp | 30 +-
lib/Target/ARM/ARMConstantPoolValue.h | 25 +-
lib/Target/ARM/ARMISelDAGToDAG.cpp | 3 +-
lib/Target/ARM/ARMISelLowering.cpp | 215 +-
lib/Target/ARM/ARMISelLowering.h | 14 +
lib/Target/ARM/ARMInstrFormats.td | 55 +-
lib/Target/ARM/ARMInstrInfo.cpp | 3 +-
lib/Target/ARM/ARMInstrInfo.h | 1 -
lib/Target/ARM/ARMInstrInfo.td | 351 ++--
lib/Target/ARM/ARMInstrNEON.td | 27 +-
lib/Target/ARM/ARMInstrThumb.td | 210 +-
lib/Target/ARM/ARMInstrThumb2.td | 276 +--
lib/Target/ARM/ARMInstrVFP.td | 161 +-
lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 5 +-
lib/Target/ARM/ARMRegisterInfo.td | 30 +-
lib/Target/ARM/ARMSubtarget.h | 2 +-
lib/Target/ARM/ARMTargetMachine.cpp | 8 +-
lib/Target/ARM/ARMTargetMachine.h | 2 +-
lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 291 ++-
lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp | 51 +-
lib/Target/ARM/AsmPrinter/ARMInstPrinter.h | 2 +
lib/Target/ARM/AsmPrinter/ARMMCInstLower.cpp | 4 +
lib/Target/ARM/CMakeLists.txt | 3 +-
lib/Target/ARM/NEONMoveFix.cpp | 141 ++
lib/Target/ARM/NEONPreAllocPass.cpp | 2 +-
lib/Target/ARM/README.txt | 31 +-
lib/Target/ARM/Thumb1InstrInfo.cpp | 24 +-
lib/Target/ARM/Thumb1RegisterInfo.cpp | 12 -
lib/Target/ARM/Thumb1RegisterInfo.h | 3 -
lib/Target/ARM/Thumb2ITBlockPass.cpp | 3 +-
lib/Target/ARM/Thumb2InstrInfo.cpp | 24 +-
lib/Target/ARM/Thumb2RegisterInfo.cpp | 10 +-
lib/Target/ARM/Thumb2RegisterInfo.h | 2 -
lib/Target/ARM/Thumb2SizeReduction.cpp | 3 +-
lib/Target/Alpha/AlphaBranchSelector.cpp | 3 +-
lib/Target/Alpha/AlphaCodeEmitter.cpp | 4 +-
lib/Target/Alpha/AlphaISelLowering.cpp | 15 +-
lib/Target/Alpha/AlphaISelLowering.h | 5 +
lib/Target/Alpha/AlphaInstrInfo.td | 2 +-
.../Alpha/AsmPrinter/AlphaAsmPrinter.cpp | 3 +-
.../AsmPrinter/BlackfinAsmPrinter.cpp | 2 +-
lib/Target/Blackfin/BlackfinInstrInfo.td | 10 +-
lib/Target/CBackend/CBackend.cpp | 15 +-
.../CellSPU/AsmPrinter/SPUAsmPrinter.cpp | 5 +-
lib/Target/CellSPU/SPU.h | 2 +-
lib/Target/CppBackend/CPPBackend.cpp | 22 +-
lib/Target/MSIL/MSILWriter.cpp | 8 +-
lib/Target/MSP430/AsmPrinter/CMakeLists.txt | 2 +-
.../MSP430/AsmPrinter/MSP430AsmPrinter.cpp | 3 +-
lib/Target/MSP430/MSP430InstrInfo.td | 2 +-
lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp | 2 +-
lib/Target/Mips/MipsISelDAGToDAG.cpp | 3 +-
lib/Target/Mips/MipsISelLowering.cpp | 9 +-
lib/Target/Mips/MipsISelLowering.h | 5 +
lib/Target/Mips/MipsInstrFPU.td | 2 +-
lib/Target/Mips/MipsInstrInfo.td | 2 +-
.../PIC16/AsmPrinter/PIC16AsmPrinter.cpp | 6 +
lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h | 1 +
lib/Target/PIC16/MCSectionPIC16.h | 88 -
lib/Target/PIC16/PIC16ABINames.h | 6 +
lib/Target/PIC16/PIC16InstrInfo.cpp | 22 +
lib/Target/PIC16/PIC16InstrInfo.h | 5 +-
lib/Target/PIC16/PIC16InstrInfo.td | 6 +-
lib/Target/PIC16/PIC16MemSelOpt.cpp | 11 +-
lib/Target/PIC16/PIC16Passes/Makefile | 2 -
lib/Target/PIC16/PIC16TargetObjectFile.cpp | 26 +-
lib/Target/PIC16/PIC16TargetObjectFile.h | 8 +
.../PowerPC/AsmPrinter/PPCAsmPrinter.cpp | 7 +-
lib/Target/PowerPC/PPCBranchSelector.cpp | 3 +-
lib/Target/PowerPC/PPCCodeEmitter.cpp | 4 +-
lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 3 +-
lib/Target/PowerPC/PPCInstr64Bit.td | 2 +-
lib/Target/PowerPC/PPCInstrInfo.td | 8 +-
lib/Target/README.txt | 103 +-
.../Sparc/AsmPrinter/SparcAsmPrinter.cpp | 2 +-
lib/Target/Sparc/SparcInstrInfo.td | 8 +-
.../SystemZ/AsmPrinter/SystemZAsmPrinter.cpp | 3 +-
lib/Target/SystemZ/SystemZISelLowering.cpp | 26 +-
lib/Target/SystemZ/SystemZISelLowering.h | 5 +
lib/Target/SystemZ/SystemZInstrFP.td | 6 +-
lib/Target/SystemZ/SystemZInstrInfo.td | 50 +-
lib/Target/X86/AsmPrinter/X86MCInstLower.cpp | 4 +
lib/Target/X86/README.txt | 2 +
lib/Target/X86/X86CodeEmitter.cpp | 4 +-
lib/Target/X86/X86FloatingPoint.cpp | 3 +-
lib/Target/X86/X86FloatingPointRegKill.cpp | 3 +-
lib/Target/X86/X86ISelDAGToDAG.cpp | 23 +-
lib/Target/X86/X86ISelLowering.cpp | 32 +
lib/Target/X86/X86ISelLowering.h | 15 +
lib/Target/X86/X86Instr64bit.td | 31 +-
lib/Target/X86/X86InstrFPStack.td | 2 +-
lib/Target/X86/X86InstrInfo.cpp | 5 +-
lib/Target/X86/X86InstrInfo.h | 7 +-
lib/Target/X86/X86InstrInfo.td | 43 +-
lib/Target/X86/X86InstrMMX.td | 7 +-
lib/Target/X86/X86InstrSSE.td | 64 +-
lib/Target/X86/X86RegisterInfo.cpp | 3 +-
.../XCore/AsmPrinter/XCoreAsmPrinter.cpp | 2 +-
lib/Target/XCore/XCoreInstrInfo.td | 6 +-
lib/Transforms/IPO/ArgumentPromotion.cpp | 3 +-
lib/Transforms/IPO/CMakeLists.txt | 1 -
lib/Transforms/IPO/ConstantMerge.cpp | 3 +-
.../IPO/DeadArgumentElimination.cpp | 3 +-
lib/Transforms/IPO/DeadTypeElimination.cpp | 3 +-
lib/Transforms/IPO/ExtractGV.cpp | 3 +-
lib/Transforms/IPO/FunctionAttrs.cpp | 5 +-
lib/Transforms/IPO/GlobalDCE.cpp | 38 +-
lib/Transforms/IPO/GlobalOpt.cpp | 43 +-
lib/Transforms/IPO/IPConstantPropagation.cpp | 6 +-
lib/Transforms/IPO/IPO.cpp | 2 +-
lib/Transforms/IPO/InlineAlways.cpp | 3 +-
lib/Transforms/IPO/InlineSimple.cpp | 3 +-
lib/Transforms/IPO/Internalize.cpp | 3 +-
lib/Transforms/IPO/LoopExtractor.cpp | 3 +-
lib/Transforms/IPO/LowerSetJmp.cpp | 37 +-
lib/Transforms/IPO/MergeFunctions.cpp | 3 +-
lib/Transforms/IPO/PartialInlining.cpp | 3 +-
lib/Transforms/IPO/PartialSpecialization.cpp | 3 +-
lib/Transforms/IPO/PruneEH.cpp | 3 +-
lib/Transforms/IPO/RaiseAllocations.cpp | 173 --
lib/Transforms/IPO/StripDeadPrototypes.cpp | 3 +-
lib/Transforms/IPO/StripSymbols.cpp | 18 +-
lib/Transforms/IPO/StructRetPromotion.cpp | 3 +-
.../Instrumentation/BlockProfiling.cpp | 3 +-
.../Instrumentation/EdgeProfiling.cpp | 3 +-
.../Instrumentation/OptimalEdgeProfiling.cpp | 3 +-
.../Instrumentation/RSProfiling.cpp | 13 +-
lib/Transforms/Scalar/ABCD.cpp | 1104 ++++++++++
lib/Transforms/Scalar/CMakeLists.txt | 6 +-
lib/Transforms/Scalar/CodeGenLICM.cpp | 112 --
lib/Transforms/Scalar/CodeGenPrepare.cpp | 3 +-
lib/Transforms/Scalar/CondPropagate.cpp | 24 +-
.../Scalar/DeadStoreElimination.cpp | 33 +-
lib/Transforms/Scalar/GEPSplitter.cpp | 81 +
lib/Transforms/Scalar/GVN.cpp | 42 +-
lib/Transforms/Scalar/IndVarSimplify.cpp | 4 +-
.../Scalar/InstructionCombining.cpp | 753 ++++---
lib/Transforms/Scalar/LoopDeletion.cpp | 30 +-
lib/Transforms/Scalar/LoopIndexSplit.cpp | 8 +-
lib/Transforms/Scalar/LoopRotation.cpp | 288 +--
lib/Transforms/Scalar/LoopStrengthReduce.cpp | 8 +-
lib/Transforms/Scalar/LoopUnrollPass.cpp | 151 ++
lib/Transforms/Scalar/LoopUnswitch.cpp | 3 +-
lib/Transforms/Scalar/SCCP.cpp | 1786 +++++++++--------
lib/Transforms/Scalar/SCCVN.cpp | 721 +++++++
.../Scalar/ScalarReplAggregates.cpp | 61 +-
lib/Transforms/Scalar/SimplifyCFGPass.cpp | 3 +
lib/Transforms/Scalar/SimplifyLibCalls.cpp | 25 +
lib/Transforms/Scalar/TailDuplication.cpp | 2 +-
lib/Transforms/Utils/BasicBlockUtils.cpp | 17 +-
lib/Transforms/Utils/BasicInliner.cpp | 2 +-
lib/Transforms/Utils/BreakCriticalEdges.cpp | 30 +-
lib/Transforms/Utils/CMakeLists.txt | 3 +-
lib/Transforms/Utils/CloneFunction.cpp | 10 +-
lib/Transforms/Utils/CloneModule.cpp | 5 +-
lib/Transforms/Utils/CodeExtractor.cpp | 3 +-
lib/Transforms/Utils/InlineFunction.cpp | 9 +
lib/Transforms/Utils/Local.cpp | 60 +-
lib/Transforms/Utils/LoopSimplify.cpp | 3 +-
.../Utils/{UnrollLoop.cpp => LoopUnroll.cpp} | 4 +-
lib/Transforms/Utils/LowerInvoke.cpp | 4 +-
lib/Transforms/Utils/LowerSwitch.cpp | 5 +-
lib/Transforms/Utils/Mem2Reg.cpp | 4 +-
.../Utils/PromoteMemoryToRegister.cpp | 14 +-
lib/Transforms/Utils/SSI.cpp | 2 +-
lib/Transforms/Utils/SimplifyCFG.cpp | 66 +
lib/Transforms/Utils/ValueMapper.cpp | 162 +-
lib/VMCore/AsmWriter.cpp | 26 +-
lib/VMCore/BasicBlock.cpp | 19 +
lib/VMCore/ConstantFold.cpp | 39 +-
lib/VMCore/Constants.cpp | 124 +-
lib/VMCore/ConstantsContext.h | 20 +-
lib/VMCore/Core.cpp | 3 +-
lib/VMCore/Dominators.cpp | 8 +-
lib/VMCore/Function.cpp | 15 +-
lib/VMCore/Globals.cpp | 1 +
lib/VMCore/Instruction.cpp | 41 +-
lib/VMCore/Instructions.cpp | 645 +++---
lib/VMCore/LLVMContextImpl.h | 31 +-
lib/VMCore/LeakDetector.cpp | 3 -
lib/VMCore/LeaksContext.h | 1 -
lib/VMCore/Metadata.cpp | 10 +-
lib/VMCore/PassManager.cpp | 5 +-
lib/VMCore/PrintModulePass.cpp | 3 +-
lib/VMCore/Type.cpp | 21 -
lib/VMCore/TypeSymbolTable.cpp | 31 -
lib/VMCore/Value.cpp | 2 -
lib/VMCore/Verifier.cpp | 13 +-
projects/sample/lib/sample/sample.c | 2 +-
.../BasicAA/2006-03-03-BadArraySubscript.ll | 1 +
.../BasicAA/2009-10-13-AtomicModRef.ll | 1 +
test/Analysis/BasicAA/featuretest.ll | 1 +
test/Analysis/BasicAA/global-size.ll | 1 +
test/Analysis/BasicAA/modref.ll | 3 +-
test/Analysis/BasicAA/phi-and-select.ll | 73 +
test/Analysis/BasicAA/store-promote.ll | 1 +
.../LoopInfo/2003-05-15-NestingProblem.ll | 2 +-
.../2007-11-18-OrInstruction.ll | 5 +-
.../2008-07-29-SGTTripCount.ll | 5 +-
.../ScalarEvolution/2008-07-29-SMinExpr.ll | 6 +-
.../ScalarEvolution/2008-08-04-IVOverflow.ll | 4 +-
.../ScalarEvolution/2008-08-04-LongAddRec.ll | 4 +-
.../2009-05-09-PointerEdgeCount.ll | 1 +
test/CodeGen/ARM/2009-10-02-NEONSubregsBug.ll | 63 +
test/CodeGen/ARM/2009-10-27-double-align.ll | 14 +
test/CodeGen/ARM/2009-10-30.ll | 17 +
test/CodeGen/ARM/2009-11-01-NeonMoves.ll | 37 +
test/CodeGen/ARM/2009-11-02-NegativeLane.ll | 20 +
test/CodeGen/ARM/alloca.ll | 7 +-
test/CodeGen/ARM/arguments.ll | 8 +-
test/CodeGen/ARM/arguments_f64_backfill.ll | 3 +-
test/CodeGen/ARM/arm-negative-stride.ll | 3 +-
test/CodeGen/ARM/bfc.ll | 8 +-
test/CodeGen/ARM/call.ll | 9 +-
test/CodeGen/ARM/carry.ll | 11 +-
test/CodeGen/ARM/constants.ll | 25 +-
test/CodeGen/ARM/fmacs.ll | 4 +-
test/CodeGen/ARM/fnmacs.ll | 17 +-
test/CodeGen/ARM/fpconsts.ll | 33 +
test/CodeGen/ARM/fpmem.ll | 13 +-
test/CodeGen/ARM/ispositive.ll | 3 +-
test/CodeGen/ARM/ldm.ll | 14 +-
test/CodeGen/ARM/ldr.ll | 22 +-
test/CodeGen/ARM/long.ll | 34 +-
test/CodeGen/ARM/long_shift.ll | 27 +-
test/CodeGen/ARM/remat.ll | 2 +-
test/CodeGen/ARM/str_post.ll | 9 +-
test/CodeGen/ARM/tls2.ll | 18 +-
test/CodeGen/CPP/llvm2cpp.ll | 2 +-
test/CodeGen/Generic/intrinsics.ll | 8 +-
.../Thumb2/2009-08-04-SubregLoweringBug.ll | 2 +-
.../Thumb2/2009-11-01-CopyReg2RegBug.ll | 29 +
test/CodeGen/Thumb2/cross-rc-coalescing-1.ll | 52 +
test/CodeGen/Thumb2/cross-rc-coalescing-2.ll | 67 +
test/CodeGen/Thumb2/ldr-str-imm12.ll | 75 +
test/CodeGen/Thumb2/machine-licm.ll | 36 +
test/CodeGen/Thumb2/thumb2-bcc.ll | 4 +-
test/CodeGen/Thumb2/thumb2-bfc.ll | 9 +-
test/CodeGen/Thumb2/thumb2-branch.ll | 10 +-
test/CodeGen/Thumb2/thumb2-cbnz.ll | 32 +
test/CodeGen/Thumb2/thumb2-clz.ll | 4 +-
test/CodeGen/Thumb2/thumb2-cmn2.ll | 10 +-
test/CodeGen/Thumb2/thumb2-eor2.ll | 12 +-
test/CodeGen/Thumb2/thumb2-mov.ll | 165 +-
test/CodeGen/Thumb2/thumb2-str_post.ll | 9 +-
.../CodeGen/X86/2007-11-30-LoadFolding-Bug.ll | 8 +-
test/CodeGen/X86/2008-02-18-TailMergingBug.ll | 2 +-
test/CodeGen/X86/2008-05-12-tailmerge-5.ll | 2 +-
test/CodeGen/X86/2009-10-25-RewriterBug.ll | 171 ++
.../X86/2009-11-04-SubregCoalescingBug.ll | 15 +
test/CodeGen/X86/break-anti-dependencies.ll | 4 +-
test/CodeGen/X86/constant-pool-sharing.ll | 19 +
.../X86/convert-2-addr-3-addr-inc64.ll | 2 +-
test/CodeGen/X86/large-gep-scale.ll | 12 +
.../X86/negative-stride-fptosi-user.ll | 25 +
test/CodeGen/X86/palignr-2.ll | 28 +
test/CodeGen/X86/pic-load-remat.ll | 6 +
test/CodeGen/X86/sink-hoist.ll | 107 +-
test/CodeGen/X86/vec_ins_extract.ll | 1 +
test/CodeGen/X86/x86-64-jumps.ll | 16 +
test/CodeGen/X86/x86-64-pic-10.ll | 2 +-
.../2009-11-03-InsertExtractValue.ll | 11 +
test/Feature/terminators.ll | 43 +
test/FrontendC++/2009-10-27-crash.cpp | 43 +
test/FrontendC++/integration-O2.cpp | 19 +
test/LLVMC/OptionPreprocessor.td | 42 +
test/Makefile | 8 +-
test/Other/2003-02-19-LoopInfoNestingBug.ll | 2 +-
test/Scripts/macho-dump | 3 +
.../ArgumentPromotion/aggregate-promote.ll | 1 +
.../Transforms/ArgumentPromotion/basictest.ll | 1 +
test/Transforms/ArgumentPromotion/byval.ll | 1 +
test/Transforms/ArgumentPromotion/chained.ll | 1 +
.../ArgumentPromotion/control-flow2.ll | 1 +
.../Transforms/ConstProp/float-to-ptr-cast.ll | 7 +-
test/Transforms/ConstProp/loads.ll | 62 +-
.../2008-07-28-load-store.ll | 1 +
.../DeadStoreElimination/PartialStore.ll | 1 +
.../DeadStoreElimination/context-sensitive.ll | 1 +
.../DeadStoreElimination/lifetime-simple.ll | 18 +
.../Transforms/DeadStoreElimination/simple.ll | 1 +
test/Transforms/GVN/invariant-simple.ll | 36 +
test/Transforms/GVN/lifetime-simple.ll | 20 +
.../Transforms/GlobalOpt/globalsra-partial.ll | 1 +
test/Transforms/GlobalOpt/globalsra.ll | 1 +
test/Transforms/GlobalOpt/heap-sra-3.ll | 41 +
test/Transforms/GlobalOpt/heap-sra-4.ll | 41 +
test/Transforms/GlobalOpt/malloc-promote-1.ll | 1 +
.../preserve-gep-loop-variant.ll | 1 +
.../IndVarSimplify/preserve-gep-remainder.ll | 1 +
test/Transforms/Inline/basictest.ll | 45 +-
test/Transforms/Inline/callgraph-update.ll | 2 +-
.../2003-11-13-ConstExprCastCall.ll | 1 +
.../InstCombine/2007-10-10-EliminateMemCpy.ll | 1 +
test/Transforms/InstCombine/add-shrink.ll | 2 +-
test/Transforms/InstCombine/add-sitofp.ll | 2 +-
test/Transforms/InstCombine/align-2d-gep.ll | 1 +
test/Transforms/InstCombine/align-addr.ll | 1 +
test/Transforms/InstCombine/align-inc.ll | 1 +
test/Transforms/InstCombine/alloca.ll | 1 +
test/Transforms/InstCombine/call.ll | 1 +
test/Transforms/InstCombine/cast-load-gep.ll | 1 +
test/Transforms/InstCombine/cast.ll | 1 +
test/Transforms/InstCombine/cast2.ll | 1 +
.../InstCombine/constant-fold-gep.ll | 1 +
.../InstCombine/fold-bin-operand.ll | 1 +
test/Transforms/InstCombine/fp-ret-bitcast.ll | 1 +
.../InstCombine/loadstore-alignment.ll | 1 +
.../InstCombine/malloc-free-delete.ll | 6 +-
test/Transforms/InstCombine/or.ll | 200 +-
test/Transforms/InstCombine/phi.ll | 149 +-
.../InstCombine/preserve-sminmax.ll | 12 +-
test/Transforms/InstCombine/ptr-int-cast.ll | 1 +
test/Transforms/InstCombine/store.ll | 71 +-
test/Transforms/InstCombine/sub.ll | 216 +-
.../JumpThreading/no-irreducible-loops.ll | 2 +-
.../LICM/2008-07-22-LoadGlobalConstant.ll | 18 +-
test/Transforms/LICM/Preserve-LCSSA.ll | 2 +-
.../LoopDeletion/multiple-exit-conditions.ll | 27 +
.../LoopRotate/2009-01-25-SingleEntryPhi.ll | 2 +-
test/Transforms/LoopRotate/LRCrash-1.ll | 2 +-
test/Transforms/LoopRotate/LRCrash-2.ll | 2 +-
test/Transforms/LoopRotate/LRCrash-3.ll | 2 +-
test/Transforms/LoopRotate/LRCrash-4.ll | 2 +-
test/Transforms/LoopRotate/LRCrash-5.ll | 2 +-
test/Transforms/LoopRotate/PhiRename-1.ll | 2 +-
.../LoopRotate/PhiSelfRefernce-1.ll | 2 +-
test/Transforms/LoopRotate/pr2639.ll | 2 +-
test/Transforms/LoopRotate/preserve-scev.ll | 2 +-
test/Transforms/LoopSimplify/merge-exits.ll | 2 +-
test/Transforms/Mem2Reg/crash.ll | 23 +-
.../MemCpyOpt/2008-03-13-ReturnSlotBitcast.ll | 1 +
test/Transforms/MemCpyOpt/align.ll | 1 +
test/Transforms/SCCP/crash.ll | 24 +
test/Transforms/SCCP/ipsccp-basic.ll | 72 +-
test/Transforms/SCCP/loadtest.ll | 11 +-
.../ScalarRepl/2003-05-29-ArrayFail.ll | 1 +
.../2006-11-07-InvalidArrayPromote.ll | 1 +
.../ScalarRepl/2008-06-05-loadstore-agg.ll | 1 +
.../ScalarRepl/2008-09-22-vector-gep.ll | 1 +
.../ScalarRepl/2009-03-04-MemCpyAlign.ll | 1 +
test/Transforms/ScalarRepl/DifferingTypes.ll | 1 +
test/Transforms/ScalarRepl/arraytest.ll | 1 +
test/Transforms/ScalarRepl/basictest.ll | 1 +
test/Transforms/ScalarRepl/bitfield-sroa.ll | 1 +
test/Transforms/ScalarRepl/copy-aggregate.ll | 1 +
test/Transforms/ScalarRepl/debuginfo.ll | 1 +
.../ScalarRepl/load-store-aggregate.ll | 1 +
.../ScalarRepl/memcpy-from-global.ll | 1 +
test/Transforms/ScalarRepl/not-a-vector.ll | 1 +
test/Transforms/ScalarRepl/union-fp-int.ll | 1 +
test/Transforms/ScalarRepl/union-packed.ll | 1 +
test/Transforms/ScalarRepl/vector_memcpy.ll | 1 +
test/Transforms/ScalarRepl/vector_promote.ll | 1 +
test/Transforms/SimplifyCFG/basictest.ll | 9 +-
test/Transforms/SimplifyCFG/duplicate-phis.ll | 21 +
test/lit.cfg | 1 +
tools/gold/gold-plugin.cpp | 64 +-
tools/lli/lli.cpp | 3 +-
tools/llvm-mc/AsmLexer.h | 2 +-
tools/llvm-mc/llvm-mc.cpp | 6 +-
tools/llvmc/doc/LLVMC-Reference.rst | 74 +-
tools/opt/opt.cpp | 6 +-
unittests/ADT/StringMapTest.cpp | 2 +-
unittests/ADT/ValueMapTest.cpp | 8 +-
.../JIT/JITEventListenerTest.cpp | 11 +-
.../JIT/JITMemoryManagerTest.cpp | 1 +
unittests/ExecutionEngine/JIT/JITTest.cpp | 198 +-
unittests/ExecutionEngine/JIT/Makefile | 2 +-
unittests/Makefile.unittest | 2 +-
unittests/Support/ValueHandleTest.cpp | 1 +
unittests/Transforms/Utils/Cloning.cpp | 57 +-
unittests/VMCore/MetadataTest.cpp | 1 +
utils/TableGen/CodeGenDAGPatterns.cpp | 1 -
utils/TableGen/CodeGenInstruction.cpp | 2 +-
utils/TableGen/CodeGenInstruction.h | 2 +-
utils/TableGen/DAGISelEmitter.cpp | 61 +-
utils/TableGen/InstrInfoEmitter.cpp | 3 +-
utils/TableGen/LLVMCConfigurationEmitter.cpp | 18 +-
utils/TableGen/Record.cpp | 2 +-
utils/TableGen/Record.h | 2 +-
utils/TableGen/TGLexer.h | 2 +-
utils/UpdateCMakeLists.pl | 2 +-
utils/buildit/build_llvm | 84 +-
utils/findoptdiff | 2 +-
utils/lit/TestRunner.py | 68 +-
utils/lit/Util.py | 2 +-
utils/lit/lit.py | 27 +-
utils/unittest/UnitTestMain/Makefile | 2 -
utils/unittest/googletest/Makefile | 2 -
utils/vim/llvm.vim | 3 +-
659 files changed, 17770 insertions(+), 8583 deletions(-)
create mode 100644 include/llvm/ADT/StringSwitch.h
create mode 100644 include/llvm/Analysis/MemoryBuiltins.h
create mode 100644 include/llvm/CodeGen/ProcessImplicitDefs.h
create mode 100644 include/llvm/CodeGen/SlotIndexes.h
create mode 100644 include/llvm/System/AIXDataTypesFix.h
create mode 100644 include/llvm/System/DataTypes.h.cmake
create mode 100644 include/llvm/System/DataTypes.h.in
delete mode 100644 lib/Analysis/MallocHelper.cpp
create mode 100644 lib/Analysis/MemoryBuiltins.cpp
create mode 100644 lib/CodeGen/AggressiveAntiDepBreaker.cpp
create mode 100644 lib/CodeGen/AggressiveAntiDepBreaker.h
create mode 100644 lib/CodeGen/AntiDepBreaker.h
create mode 100644 lib/CodeGen/CriticalAntiDepBreaker.cpp
create mode 100644 lib/CodeGen/CriticalAntiDepBreaker.h
create mode 100644 lib/CodeGen/ProcessImplicitDefs.cpp
create mode 100644 lib/CodeGen/SlotIndexes.cpp
delete mode 100644 lib/ExecutionEngine/JIT/MacOSJITEventListener.cpp
create mode 100644 lib/Target/ARM/NEONMoveFix.cpp
delete mode 100644 lib/Target/PIC16/MCSectionPIC16.h
delete mode 100644 lib/Transforms/IPO/RaiseAllocations.cpp
create mode 100644 lib/Transforms/Scalar/ABCD.cpp
delete mode 100644 lib/Transforms/Scalar/CodeGenLICM.cpp
create mode 100644 lib/Transforms/Scalar/GEPSplitter.cpp
create mode 100644 lib/Transforms/Scalar/LoopUnrollPass.cpp
create mode 100644 lib/Transforms/Scalar/SCCVN.cpp
rename lib/Transforms/Utils/{UnrollLoop.cpp => LoopUnroll.cpp} (99%)
create mode 100644 test/Analysis/BasicAA/phi-and-select.ll
create mode 100644 test/CodeGen/ARM/2009-10-02-NEONSubregsBug.ll
create mode 100644 test/CodeGen/ARM/2009-10-27-double-align.ll
create mode 100644 test/CodeGen/ARM/2009-10-30.ll
create mode 100644 test/CodeGen/ARM/2009-11-01-NeonMoves.ll
create mode 100644 test/CodeGen/ARM/2009-11-02-NegativeLane.ll
create mode 100644 test/CodeGen/ARM/fpconsts.ll
create mode 100644 test/CodeGen/Thumb2/2009-11-01-CopyReg2RegBug.ll
create mode 100644 test/CodeGen/Thumb2/cross-rc-coalescing-1.ll
create mode 100644 test/CodeGen/Thumb2/cross-rc-coalescing-2.ll
create mode 100644 test/CodeGen/Thumb2/ldr-str-imm12.ll
create mode 100644 test/CodeGen/Thumb2/machine-licm.ll
create mode 100644 test/CodeGen/Thumb2/thumb2-cbnz.ll
create mode 100644 test/CodeGen/X86/2009-10-25-RewriterBug.ll
create mode 100644 test/CodeGen/X86/2009-11-04-SubregCoalescingBug.ll
create mode 100644 test/CodeGen/X86/constant-pool-sharing.ll
create mode 100644 test/CodeGen/X86/large-gep-scale.ll
create mode 100644 test/CodeGen/X86/negative-stride-fptosi-user.ll
create mode 100644 test/CodeGen/X86/palignr-2.ll
create mode 100644 test/CodeGen/X86/x86-64-jumps.ll
create mode 100644 test/DebugInfo/2009-11-03-InsertExtractValue.ll
create mode 100644 test/Feature/terminators.ll
create mode 100644 test/FrontendC++/2009-10-27-crash.cpp
create mode 100644 test/FrontendC++/integration-O2.cpp
create mode 100644 test/LLVMC/OptionPreprocessor.td
create mode 100644 test/Transforms/DeadStoreElimination/lifetime-simple.ll
create mode 100644 test/Transforms/GVN/invariant-simple.ll
create mode 100644 test/Transforms/GVN/lifetime-simple.ll
create mode 100644 test/Transforms/GlobalOpt/heap-sra-3.ll
create mode 100644 test/Transforms/GlobalOpt/heap-sra-4.ll
create mode 100644 test/Transforms/LoopDeletion/multiple-exit-conditions.ll
create mode 100644 test/Transforms/SCCP/crash.ll
create mode 100644 test/Transforms/SimplifyCFG/duplicate-phis.ll
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f7126584ba78..5b30309bf331 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -319,16 +319,26 @@ if(LLVM_BUILD_EXAMPLES)
add_subdirectory(examples)
endif ()
-install(DIRECTORY include
- DESTINATION .
+install(DIRECTORY include/
+ DESTINATION include
+ FILES_MATCHING
+ PATTERN "*.def"
+ PATTERN "*.h"
+ PATTERN "*.td"
+ PATTERN "*.inc"
PATTERN ".svn" EXCLUDE
- PATTERN "*.cmake" EXCLUDE
- PATTERN "*.in" EXCLUDE
- PATTERN "*.tmp" EXCLUDE
)
-install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include
- DESTINATION .
+install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
+ DESTINATION include
+ FILES_MATCHING
+ PATTERN "*.def"
+ PATTERN "*.h"
+ PATTERN "*.gen"
+ PATTERN "*.inc"
+ # Exclude include/llvm/CMakeFiles/intrinsics_gen.dir, matched by "*.def"
+ PATTERN "CMakeFiles" EXCLUDE
+ PATTERN ".svn" EXCLUDE
)
# TODO: make and install documentation.
diff --git a/Makefile b/Makefile
index d2000b48387a..671f92c77e87 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,8 @@ LEVEL := .
# "llvmCore", then this is an "Apple-style" build; search for
# "Apple-style" in the comments for more info. Anything else is a
# normal build.
-ifneq ($(RC_ProjectName),llvmCore) # Normal build (not "Apple-style").
+ifneq ($(findstring llvmCore, $(RC_ProjectName)),llvmCore) # Normal build (not "Apple-style").
+
ifeq ($(BUILD_DIRS_ONLY),1)
DIRS := lib/System lib/Support utils
OPTIONAL_DIRS :=
@@ -94,6 +95,8 @@ cross-compile-build-tools:
$(Verb) if [ ! -f BuildTools/Makefile ]; then \
$(MKDIR) BuildTools; \
cd BuildTools ; \
+ unset CFLAGS ; \
+ unset CXXFLAGS ; \
$(PROJ_SRC_DIR)/configure --build=$(BUILD_TRIPLE) \
--host=$(BUILD_TRIPLE) --target=$(BUILD_TRIPLE); \
cd .. ; \
@@ -133,8 +136,7 @@ dist-hook::
$(Echo) Eliminating files constructed by configure
$(Verb) $(RM) -f \
$(TopDistDir)/include/llvm/Config/config.h \
- $(TopDistDir)/include/llvm/Support/DataTypes.h \
- $(TopDistDir)/include/llvm/Support/ThreadSupport.h
+ $(TopDistDir)/include/llvm/System/DataTypes.h
clang-only: all
tools-only: all
@@ -150,7 +152,7 @@ FilesToConfig := \
include/llvm/Config/config.h \
include/llvm/Config/Targets.def \
include/llvm/Config/AsmPrinters.def \
- include/llvm/Support/DataTypes.h \
+ include/llvm/System/DataTypes.h \
tools/llvmc/plugins/Base/Base.td
FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
diff --git a/Makefile.config.in b/Makefile.config.in
index fc84c0bcb1b4..2b9bbfd26bc9 100644
--- a/Makefile.config.in
+++ b/Makefile.config.in
@@ -250,6 +250,9 @@ RDYNAMIC := @RDYNAMIC@
#DEBUG_SYMBOLS = 1
@DEBUG_SYMBOLS@
+# The compiler flags to use for optimized builds.
+OPTIMIZE_OPTION := @OPTIMIZE_OPTION@
+
# When ENABLE_PROFILING is enabled, the llvm source base is built with profile
# information to allow gprof to be used to get execution frequencies.
#ENABLE_PROFILING = 1
@@ -320,3 +323,9 @@ ENABLE_LLVMC_DYNAMIC = 0
# support (via the -load option).
ENABLE_LLVMC_DYNAMIC_PLUGINS = 1
#@ENABLE_LLVMC_DYNAMIC_PLUGINS@
+
+# Optional flags supported by the compiler
+# -Wno-missing-field-initializers
+NO_MISSING_FIELD_INITIALIZERS = @NO_MISSING_FIELD_INITIALIZERS@
+# -Wno-variadic-macros
+NO_VARIADIC_MACROS = @NO_VARIADIC_MACROS@
diff --git a/Makefile.rules b/Makefile.rules
index 4e0bd5cc0237..b4a5a3798c07 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -312,16 +312,6 @@ endif
#--------------------------------------------------------------------
CPP.Defines :=
-# OPTIMIZE_OPTION - The optimization level option we want to build LLVM with
-# this can be overridden on the make command line.
-ifndef OPTIMIZE_OPTION
- ifneq ($(HOST_OS),MingW)
- OPTIMIZE_OPTION := -O3
- else
- OPTIMIZE_OPTION := -O2
- endif
-endif
-
ifeq ($(ENABLE_OPTIMIZED),1)
BuildMode := Release
# Don't use -fomit-frame-pointer on Darwin or FreeBSD.
@@ -566,6 +556,8 @@ endif
ifeq ($(TARGET_OS),Darwin)
ifneq ($(ARCH),ARM)
TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
+ else
+ TargetCommonOpts += -marm
endif
endif
@@ -1238,7 +1230,7 @@ endif
endif
ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD))
-LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map
+ LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map
endif
endif
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index f1b060e9487a..7d0a9bbf82fb 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -607,6 +607,23 @@ if test -n "$LLVMGXX" && test -z "$LLVMGCC"; then
AC_MSG_ERROR([Invalid llvm-gcc. Use --with-llvmgcc when --with-llvmgxx is used]);
fi
+dnl Override the option to use for optimized builds.
+AC_ARG_WITH(optimize-option,
+ AS_HELP_STRING([--with-optimize-option],
+ [Select the compiler options to use for optimized builds]),,
+ withval=default)
+AC_MSG_CHECKING([optimization flags])
+case "$withval" in
+ default)
+ case "$llvm_cv_os_type" in
+ MingW) optimize_option=-O3 ;;
+ *) optimize_option=-O2 ;;
+ esac ;;
+ *) optimize_option="$withval" ;;
+esac
+AC_SUBST(OPTIMIZE_OPTION,$optimize_option)
+AC_MSG_RESULT([$optimize_option])
+
dnl Specify extra build options
AC_ARG_WITH(extra-options,
AS_HELP_STRING([--with-extra-options],
@@ -943,6 +960,12 @@ fi
dnl Tool compatibility is okay if we make it here.
AC_MSG_RESULT([ok])
+dnl Check optional compiler flags.
+AC_MSG_CHECKING([optional compiler flags])
+CXX_FLAG_CHECK(NO_VARIADIC_MACROS, [-Wno-variadic-macros])
+CXX_FLAG_CHECK(NO_MISSING_FIELD_INITIALIZERS, [-Wno-missing-field-initializers])
+AC_MSG_RESULT([$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS])
+
dnl===-----------------------------------------------------------------------===
dnl===
dnl=== SECTION 5: Check for libraries
@@ -1349,7 +1372,7 @@ AC_CONFIG_HEADERS([include/llvm/Config/config.h])
AC_CONFIG_FILES([include/llvm/Config/Targets.def])
AC_CONFIG_FILES([include/llvm/Config/AsmPrinters.def])
AC_CONFIG_FILES([include/llvm/Config/AsmParsers.def])
-AC_CONFIG_HEADERS([include/llvm/Support/DataTypes.h])
+AC_CONFIG_HEADERS([include/llvm/System/DataTypes.h])
dnl Configure the makefile's configuration data
AC_CONFIG_FILES([Makefile.config])
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 320335cf0fe0..acf3a2ee7027 100755
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -83,9 +83,9 @@ check_symbol_exists(floorf math.h HAVE_FLOORF)
check_symbol_exists(mallinfo malloc.h HAVE_MALLINFO)
check_symbol_exists(malloc_zone_statistics malloc/malloc.h
HAVE_MALLOC_ZONE_STATISTICS)
-check_symbol_exists(mkdtemp unistd.h HAVE_MKDTEMP)
-check_symbol_exists(mkstemp unistd.h HAVE_MKSTEMP)
-check_symbol_exists(mktemp unistd.h HAVE_MKTEMP)
+check_symbol_exists(mkdtemp "stdlib.h;unistd.h" HAVE_MKDTEMP)
+check_symbol_exists(mkstemp "stdlib.h;unistd.h" HAVE_MKSTEMP)
+check_symbol_exists(mktemp "stdlib.h;unistd.h" HAVE_MKTEMP)
check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)
check_symbol_exists(sbrk unistd.h HAVE_SBRK)
check_symbol_exists(strtoll stdlib.h HAVE_STRTOLL)
@@ -229,7 +229,7 @@ configure_file(
)
configure_file(
- ${LLVM_MAIN_INCLUDE_DIR}/llvm/Support/DataTypes.h.cmake
- ${LLVM_BINARY_DIR}/include/llvm/Support/DataTypes.h
+ ${LLVM_MAIN_INCLUDE_DIR}/llvm/System/DataTypes.h.cmake
+ ${LLVM_BINARY_DIR}/include/llvm/System/DataTypes.h
)
diff --git a/cmake/modules/LLVMLibDeps.cmake b/cmake/modules/LLVMLibDeps.cmake
index 1a4aa34a68e6..655e23ee6536 100644
--- a/cmake/modules/LLVMLibDeps.cmake
+++ b/cmake/modules/LLVMLibDeps.cmake
@@ -23,7 +23,6 @@ set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalysis LLVMCore LLVMMC LLVMScalarOpts LLVMSu
set(MSVC_LIB_DEPS_LLVMCore LLVMSupport LLVMSystem)
set(MSVC_LIB_DEPS_LLVMCppBackend LLVMCore LLVMCppBackendInfo LLVMSupport LLVMSystem LLVMTarget)
set(MSVC_LIB_DEPS_LLVMCppBackendInfo LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMDebugger LLVMAnalysis LLVMBitReader LLVMCore LLVMSupport LLVMSystem)
set(MSVC_LIB_DEPS_LLVMExecutionEngine LLVMCore LLVMSupport LLVMSystem LLVMTarget)
set(MSVC_LIB_DEPS_LLVMHello LLVMCore LLVMSupport LLVMSystem)
set(MSVC_LIB_DEPS_LLVMInstrumentation LLVMAnalysis LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTransformUtils)
diff --git a/cmake/modules/LLVMProcessSources.cmake b/cmake/modules/LLVMProcessSources.cmake
index 12a8968c724b..b753735cd55e 100644
--- a/cmake/modules/LLVMProcessSources.cmake
+++ b/cmake/modules/LLVMProcessSources.cmake
@@ -22,6 +22,7 @@ endmacro(add_header_files)
function(llvm_process_sources OUT_VAR)
set( sources ${ARGN} )
+ llvm_check_source_file_list( ${sources} )
# Create file dependencies on the tablegenned files, if any. Seems
# that this is not strictly needed, as dependencies of the .cpp
# sources on the tablegenned .inc files are detected and handled,
@@ -37,3 +38,17 @@ function(llvm_process_sources OUT_VAR)
endif()
set( ${OUT_VAR} ${sources} PARENT_SCOPE )
endfunction(llvm_process_sources)
+
+
+function(llvm_check_source_file_list)
+ set(listed ${ARGN})
+ file(GLOB globbed *.cpp)
+ foreach(g ${globbed})
+ get_filename_component(fn ${g} NAME)
+ list(FIND listed ${fn} idx)
+ if( idx LESS 0 )
+ message(SEND_ERROR "Found unknown source file ${g}
+Please update ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt\n")
+ endif()
+ endforeach()
+endfunction(llvm_check_source_file_list)
diff --git a/configure b/configure
index 102d3f033a38..e671329b792f 100755
--- a/configure
+++ b/configure
@@ -848,6 +848,7 @@ LLVM_ENUM_TARGETS
LLVM_ENUM_ASM_PRINTERS
LLVM_ENUM_ASM_PARSERS
ENABLE_CBE_PRINTF_A
+OPTIMIZE_OPTION
EXTRA_OPTIONS
BINUTILS_INCDIR
ENABLE_LLVMC_DYNAMIC
@@ -913,6 +914,8 @@ LLVMGCCCOMMAND
LLVMGXXCOMMAND
LLVMGCC
LLVMGXX
+NO_VARIADIC_MACROS
+NO_MISSING_FIELD_INITIALIZERS
USE_UDIS86
USE_OPROFILE
HAVE_PTHREAD
@@ -1595,6 +1598,8 @@ Optional Packages:
searches PATH)
--with-llvmgxx Specify location of llvm-g++ driver (default
searches PATH)
+ --with-optimize-option Select the compiler options to use for optimized
+ builds
--with-extra-options Specify additional options to compile LLVM with
--with-ocaml-libdir Specify install location for ocaml bindings (default
is stdlib)
@@ -5190,6 +5195,29 @@ echo "$as_me: error: Invalid llvm-gcc. Use --with-llvmgcc when --with-llvmgxx is
fi
+# Check whether --with-optimize-option was given.
+if test "${with_optimize_option+set}" = set; then
+ withval=$with_optimize_option;
+else
+ withval=default
+fi
+
+{ echo "$as_me:$LINENO: checking optimization flags" >&5
+echo $ECHO_N "checking optimization flags... $ECHO_C" >&6; }
+case "$withval" in
+ default)
+ case "$llvm_cv_os_type" in
+ MingW) optimize_option=-O3 ;;
+ *) optimize_option=-O2 ;;
+ esac ;;
+ *) optimize_option="$withval" ;;
+esac
+OPTIMIZE_OPTION=$optimize_option
+
+{ echo "$as_me:$LINENO: result: $optimize_option" >&5
+echo "${ECHO_T}$optimize_option" >&6; }
+
+
# Check whether --with-extra-options was given.
if test "${with_extra_options+set}" = set; then
withval=$with_extra_options;
@@ -11008,7 +11036,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext < conftest.$ac_ext
+ echo '#line 13183 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -14870,11 +14898,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14873: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14901: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14877: \$? = $ac_status" >&5
+ echo "$as_me:14905: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -15138,11 +15166,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15141: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15169: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15145: \$? = $ac_status" >&5
+ echo "$as_me:15173: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -15242,11 +15270,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15245: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15273: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:15249: \$? = $ac_status" >&5
+ echo "$as_me:15277: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17694,7 +17722,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext < conftest.$ac_ext <&5)
+ (eval echo "\"\$as_me:20193: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:20169: \$? = $ac_status" >&5
+ echo "$as_me:20197: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -20266,11 +20294,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:20269: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:20297: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:20273: \$? = $ac_status" >&5
+ echo "$as_me:20301: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -21836,11 +21864,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:21839: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:21867: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:21843: \$? = $ac_status" >&5
+ echo "$as_me:21871: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -21940,11 +21968,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:21943: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:21971: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:21947: \$? = $ac_status" >&5
+ echo "$as_me:21975: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -24175,11 +24203,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:24178: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:24206: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:24182: \$? = $ac_status" >&5
+ echo "$as_me:24210: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -24443,11 +24471,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:24446: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:24474: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:24450: \$? = $ac_status" >&5
+ echo "$as_me:24478: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -24547,11 +24575,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:24550: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:24578: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:24554: \$? = $ac_status" >&5
+ echo "$as_me:24582: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -27459,6 +27487,15 @@ fi
{ echo "$as_me:$LINENO: result: ok" >&5
echo "${ECHO_T}ok" >&6; }
+{ echo "$as_me:$LINENO: checking optional compiler flags" >&5
+echo $ECHO_N "checking optional compiler flags... $ECHO_C" >&6; }
+NO_VARIADIC_MACROS=`$CXX -Wno-variadic-macros -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-variadic-macros`
+
+NO_MISSING_FIELD_INITIALIZERS=`$CXX -Wno-missing-field-initializers -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-missing-field-initializers`
+
+{ echo "$as_me:$LINENO: result: $NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS" >&5
+echo "${ECHO_T}$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS" >&6; }
+
{ echo "$as_me:$LINENO: checking for sin in -lm" >&5
@@ -35260,7 +35297,7 @@ ac_config_files="$ac_config_files include/llvm/Config/AsmPrinters.def"
ac_config_files="$ac_config_files include/llvm/Config/AsmParsers.def"
-ac_config_headers="$ac_config_headers include/llvm/Support/DataTypes.h"
+ac_config_headers="$ac_config_headers include/llvm/System/DataTypes.h"
ac_config_files="$ac_config_files Makefile.config"
@@ -35887,7 +35924,7 @@ do
"include/llvm/Config/Targets.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/Targets.def" ;;
"include/llvm/Config/AsmPrinters.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/AsmPrinters.def" ;;
"include/llvm/Config/AsmParsers.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/AsmParsers.def" ;;
- "include/llvm/Support/DataTypes.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/Support/DataTypes.h" ;;
+ "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" ;;
"docs/doxygen.cfg") CONFIG_FILES="$CONFIG_FILES docs/doxygen.cfg" ;;
@@ -36061,11 +36098,11 @@ LLVM_ENUM_TARGETS!$LLVM_ENUM_TARGETS$ac_delim
LLVM_ENUM_ASM_PRINTERS!$LLVM_ENUM_ASM_PRINTERS$ac_delim
LLVM_ENUM_ASM_PARSERS!$LLVM_ENUM_ASM_PARSERS$ac_delim
ENABLE_CBE_PRINTF_A!$ENABLE_CBE_PRINTF_A$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
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -36107,6 +36144,7 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+CXX!$CXX$ac_delim
CXXFLAGS!$CXXFLAGS$ac_delim
ac_ct_CXX!$ac_ct_CXX$ac_delim
NM!$NM$ac_delim
@@ -36167,6 +36205,8 @@ LLVMGCCCOMMAND!$LLVMGCCCOMMAND$ac_delim
LLVMGXXCOMMAND!$LLVMGXXCOMMAND$ac_delim
LLVMGCC!$LLVMGCC$ac_delim
LLVMGXX!$LLVMGXX$ac_delim
+NO_VARIADIC_MACROS!$NO_VARIADIC_MACROS$ac_delim
+NO_MISSING_FIELD_INITIALIZERS!$NO_MISSING_FIELD_INITIALIZERS$ac_delim
USE_UDIS86!$USE_UDIS86$ac_delim
USE_OPROFILE!$USE_OPROFILE$ac_delim
HAVE_PTHREAD!$HAVE_PTHREAD$ac_delim
@@ -36201,7 +36241,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` = 92; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 95; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/docs/BitCodeFormat.html b/docs/BitCodeFormat.html
index e75887b73902..7a46d90dc927 100644
--- a/docs/BitCodeFormat.html
+++ b/docs/BitCodeFormat.html
@@ -27,6 +27,15 @@
LLVM IR Encoding
- Basics
+ - MODULE_BLOCK Contents
+ - PARAMATTR_BLOCK Contents
+ - TYPE_BLOCK Contents
+ - CONSTANTS_BLOCK Contents
+ - FUNCTION_BLOCK Contents
+ - TYPE_SYMTAB_BLOCK Contents
+ - VALUE_SYMTAB_BLOCK Contents
+ - METADATA_BLOCK Contents
+ - METADATA_ATTACHMENT Contents
@@ -220,7 +229,7 @@ A bitstream is a sequential series of Blocks and
abbreviation ID encoded as a fixed-bitwidth field. The width is specified by
the current block, as described below. The value of the abbreviation ID
specifies either a builtin ID (which have special meanings, defined below) or
-one of the abbreviation IDs defined by the stream itself.
+one of the abbreviation IDs defined for the current block by the stream itself.
@@ -258,7 +267,7 @@ application specific. Nested blocks capture the hierarchical structure of the da
encoded in it, and various properties are associated with blocks as the file is
parsed. Block definitions allow the reader to efficiently skip blocks
in constant time if the reader wants a summary of blocks, or if it wants to
-efficiently skip data they do not understand. The LLVM IR reader uses this
+efficiently skip data it does not understand. The LLVM IR reader uses this
mechanism to skip function bodies, lazily reading them on demand.
@@ -268,7 +277,8 @@ block. In particular, each block maintains:
-- A current abbrev id width. This value starts at 2, and is set every time a
+
- A current abbrev id width. This value starts at 2 at the beginning of
+ the stream, and is set every time a
block record is entered. The block entry specifies the abbrev id width for
the body of the block.
@@ -335,13 +345,14 @@ an even multiple of 32-bits.
-Data records consist of a record code and a number of (up to) 64-bit integer
-values. The interpretation of the code and values is application specific and
-there are multiple different ways to encode a record (with an unabbrev record or
-with an abbreviation). In the LLVM IR format, for example, there is a record
+Data records consist of a record code and a number of (up to) 64-bit
+integer values. The interpretation of the code and values is
+application specific and may vary between different block types.
+Records can be encoded either using an unabbrev record, or with an
+abbreviation. In the LLVM IR format, for example, there is a record
which encodes the target triple of a module. The code is
-MODULE_CODE_TRIPLE, and the values of the record are the ASCII codes
-for the characters in the string.
+MODULE_CODE_TRIPLE, and the values of the record are the
+ASCII codes for the characters in the string.
@@ -358,7 +369,7 @@ Encoding
An UNABBREV_RECORD provides a default fallback encoding, which is both
completely general and extremely inefficient. It can describe an arbitrary
-record by emitting the code and operands as vbrs.
+record by emitting the code and operands as VBRs.
@@ -391,6 +402,11 @@ allows the files to be completely self describing. The actual encoding of
abbreviations is defined below.
+The record code, which is the first field of an abbreviated record,
+may be encoded in the abbreviation definition (as a literal
+operand) or supplied in the abbreviated record (as a Fixed or VBR
+operand value).
+
@@ -409,8 +425,9 @@ emitted.
Abbreviations can be determined dynamically per client, per file. Because the
abbreviations are stored in the bitstream itself, different streams of the same
-format can contain different sets of abbreviations if the specific stream does
-not need it. As a concrete example, LLVM IR files usually emit an abbreviation
+format can contain different sets of abbreviations according to the needs
+of the specific stream.
+As a concrete example, LLVM IR files usually emit an abbreviation
for binary operators. If a specific LLVM module contained no or few binary
operators, the abbreviation does not need to be emitted.
@@ -431,7 +448,8 @@ defined abbreviations in the scope of this block. This definition only exists
inside this immediate block — it is not visible in subblocks or enclosing
blocks. Abbreviations are implicitly assigned IDs sequentially starting from 4
(the first application-defined abbreviation ID). Any abbreviations defined in a
-BLOCKINFO record receive IDs first, in order, followed by any
+BLOCKINFO record for the particular block type
+receive IDs first, in order, followed by any
abbreviations defined within the block itself. Abbreviated data records
reference this ID to indicate what abbreviation they are invoking.
@@ -461,31 +479,32 @@ emitted as their code, followed by the extra data.
The possible operand encodings are:
-
-- Fixed: The field should be emitted as
+
+- Fixed (code 1): The field should be emitted as
a fixed-width value, whose width is specified by
the operand's extra data.
-- VBR: The field should be emitted as
+
- VBR (code 2): The field should be emitted as
a variable-width value, whose width is
specified by the operand's extra data.
-- Array: This field is an array of values. The array operand
- has no extra data, but expects another operand to follow it which indicates
+
- Array (code 3): This field is an array of values. The array operand
+ has no extra data, but expects another operand to follow it, indicating
the element type of the array. When reading an array in an abbreviated
record, the first integer is a vbr6 that indicates the array length,
followed by the encoded elements of the array. An array may only occur as
the last operand of an abbreviation (except for the one final operand that
gives the array's type).
-- Char6: This field should be emitted as
+
- Char6 (code 4): This field should be emitted as
a char6-encoded value. This operand type takes no
- extra data.
-- Blob: This field is emitted as a vbr6, followed by padding to a
+ extra data. Char6 encoding is normally used as an array element type.
+
+- Blob (code 5): This field is emitted as a vbr6, followed by padding to a
32-bit boundary (for alignment) and an array of 8-bit objects. The array of
bytes is further followed by tail padding to ensure that its total length is
a multiple of 4 bytes. This makes it very efficient for the reader to
decode the data without having to make a copy of it: it can use a pointer to
the data in the mapped in file and poke directly at it. A blob may only
occur as the last operand of an abbreviation.
-
+
For example, target triples in LLVM modules are encoded as a record of the
@@ -517,7 +536,7 @@ as:
- The first value, 4, is the abbreviation ID for this abbreviation.
-- The second value, 2, is the code for TRIPLE in LLVM IR files.
+- The second value, 2, is the record code for TRIPLE records within LLVM IR file MODULE_BLOCK blocks.
- The third value, 4, is the length of the array.
- The rest of the values are the char6 encoded values
for "abcd".
@@ -541,7 +560,7 @@ used for any other string value.
In addition to the basic block structure and record encodings, the bitstream
-also defines specific builtin block types. These block types specify how the
+also defines specific built-in block types. These block types specify how the
stream is to be decoded or other metadata. In the future, new standard blocks
may be added. Block IDs 0-7 are reserved for standard blocks.
@@ -569,7 +588,7 @@ blocks. The currently specified records are:
-The SETBID record indicates which block ID is being
+The SETBID record (code 1) indicates which block ID is being
described. SETBID records can occur multiple times throughout the
block to change which block ID is being described. There must be
a SETBID record prior to any other records.
@@ -584,13 +603,13 @@ in BLOCKINFO blocks receive abbreviation IDs as described
in DEFINE_ABBREV.
-The BLOCKNAME can optionally occur in this block. The elements of
-the record are the bytes for the string name of the block. llvm-bcanalyzer uses
+
The BLOCKNAME record (code 2) can optionally occur in this block. The elements of
+the record are the bytes of the string name of the block. llvm-bcanalyzer can use
this to dump out bitcode files symbolically.
-The SETRECORDNAME record can optionally occur in this block. The
-first entry is a record ID number and the rest of the elements of the record are
-the bytes for the string name of the record. llvm-bcanalyzer uses
+
The SETRECORDNAME record (code 3) can also optionally occur in this block. The
+first operand value is a record ID number, and the rest of the elements of the record are
+the bytes for the string name of the record. llvm-bcanalyzer can use
this to dump out bitcode files symbolically.
@@ -626,7 +645,7 @@ Each of the fields are 32-bit fields stored in little endian form (as with
the rest of the bitcode file fields). The Magic number is always
0x0B17C0DE and the version is currently always 0. The Offset
field is the offset in bytes to the start of the bitcode stream in the file, and
-the Size field is a size in bytes of the stream. CPUType is a target-specific
+the Size field is the size in bytes of the stream. CPUType is a target-specific
value that can be used to encode the CPU of the target.
@@ -681,26 +700,28 @@ When combined with the bitcode magic number and viewed as bytes, this is
-Variable Width Integers are an efficient way to
-encode arbitrary sized unsigned values, but is an extremely inefficient way to
-encode signed values (as signed values are otherwise treated as maximally large
-unsigned values).
+Variable Width Integer encoding is an efficient way to
+encode arbitrary sized unsigned values, but is an extremely inefficient for
+encoding signed values, as signed values are otherwise treated as maximally large
+unsigned values.
-As such, signed vbr values of a specific width are emitted as follows:
+As such, signed VBR values of a specific width are emitted as follows:
-- Positive values are emitted as vbrs of the specified width, but with their
+
- Positive values are emitted as VBRs of the specified width, but with their
value shifted left by one.
-- Negative values are emitted as vbrs of the specified width, but the negated
+
- Negative values are emitted as VBRs of the specified width, but the negated
value is shifted left by one, and the low bit is set.
-With this encoding, small positive and small negative values can both be emitted
-efficiently.
+With this encoding, small positive and small negative values can both
+be emitted efficiently. Signed VBR encoding is used in
+CST_CODE_INTEGER and CST_CODE_WIDE_INTEGER records
+within CONSTANTS_BLOCK blocks.
@@ -716,21 +737,23 @@ LLVM IR is defined with the following blocks:
-- 8 — MODULE_BLOCK — This is the top-level block that
+
- 8 — MODULE_BLOCK — This is the top-level block that
contains the entire module, and describes a variety of per-module
information.
-- 9 — PARAMATTR_BLOCK — This enumerates the parameter
+
- 9 — PARAMATTR_BLOCK — This enumerates the parameter
attributes.
-- 10 — TYPE_BLOCK — This describes all of the types in
+
- 10 — TYPE_BLOCK — This describes all of the types in
the module.
-- 11 — CONSTANTS_BLOCK — This describes constants for a
+
- 11 — CONSTANTS_BLOCK — This describes constants for a
module or function.
-- 12 — FUNCTION_BLOCK — This describes a function
+
- 12 — FUNCTION_BLOCK — This describes a function
body.
-- 13 — TYPE_SYMTAB_BLOCK — This describes the type symbol
+
- 13 — TYPE_SYMTAB_BLOCK — This describes the type symbol
table.
-- 14 — VALUE_SYMTAB_BLOCK — This describes a value symbol
+
- 14 — VALUE_SYMTAB_BLOCK — This describes a value symbol
table.
+- 15 — METADATA_BLOCK — This describes metadata items.
+- 16 — METADATA_ATTACHMENT — This contains records associating metadata with function instruction values.
@@ -741,7 +764,387 @@ LLVM IR is defined with the following blocks:
-
+
The MODULE_BLOCK block (id 8) is the top-level block for LLVM
+bitcode files, and each bitcode file must contain exactly one. In
+addition to records (described below) containing information
+about the module, a MODULE_BLOCK block may contain the
+following sub-blocks:
+
+
+
+
+
+
+
+
+
+
+
+
[VERSION, version#]
+
+
The VERSION record (code 1) contains a single value
+indicating the format version. Only version 0 is supported at this
+time.
+
+
+
+
+
+
+
[TRIPLE, ...string...]
+
+
The TRIPLE record (code 2) contains a variable number of
+values representing the bytes of the target triple
+specification string.
+
+
+
+
+
+
+
[DATALAYOUT, ...string...]
+
+
The DATALAYOUT record (code 3) contains a variable number of
+values representing the bytes of the target datalayout
+specification string.
+
+
+
+
+
+
+
[ASM, ...string...]
+
+
The ASM record (code 4) contains a variable number of
+values representing the bytes of module asm strings, with
+individual assembly blocks separated by newline (ASCII 10) characters.
+
+
+
+
+
+
+
[SECTIONNAME, ...string...]
+
+
The SECTIONNAME record (code 5) contains a variable number
+of values representing the bytes of a single section name
+string. There should be one SECTIONNAME record for each
+section name referenced (e.g., in global variable or function
+section attributes) within the module. These records can be
+referenced by the 1-based index in the section fields of
+GLOBALVAR or FUNCTION records.
+
+
+
+
+
+
+
[DEPLIB, ...string...]
+
+
The DEPLIB record (code 6) contains a variable number of
+values representing the bytes of a single dependent library name
+string, one of the libraries mentioned in a deplibs
+declaration. There should be one DEPLIB record for each
+library name referenced.
+
+
+
+
+
+
+
[GLOBALVAR, pointer type, isconst, initid, linkage, alignment, section, visibility, threadlocal]
+
+
The GLOBALVAR record (code 7) marks the declaration or
+definition of a global variable. The operand fields are:
+
+
+- pointer type: The type index of the pointer type used to point to
+this global variable
+
+- isconst: Non-zero if the variable is treated as constant within
+the module, or zero if it is not
+
+- initid: If non-zero, the value index of the initializer for this
+variable, plus 1.
+
+- linkage: An encoding of the linkage
+type for this variable:
+
+ - external: code 0
+ - weak: code 1
+ - appending: code 2
+ - internal: code 3
+ - linkonce: code 4
+ - dllimport: code 5
+ - dllexport: code 6
+ - extern_weak: code 7
+ - common: code 8
+ - private: code 9
+ - weak_odr: code 10
+ - linkonce_odr: code 11
+ - available_externally: code 12
+ - linker_private: code 13
+
+
+
+- alignment: The logarithm base 2 of the variable's requested
+alignment, plus 1
+
+- section: If non-zero, the 1-based section index in the
+table of MODULE_CODE_SECTIONNAME
+entries.
+
+- visibility: If present, an
+encoding of the visibility of this variable:
+
+ - default: code 0
+ - hidden: code 1
+ - protected: code 2
+
+
+
+- threadlocal: If present and non-zero, indicates that the variable
+is thread_local
+
+
+
+
+
+
+
+
+
+
[FUNCTION, type, callingconv, isproto, linkage, paramattr, alignment, section, visibility, gc]
+
+
The FUNCTION record (code 8) marks the declaration or
+definition of a function. The operand fields are:
+
+
+- type: The type index of the function type describing this function
+
+- callingconv: The calling convention number:
+
+ - ccc: code 0
+ - fastcc: code 8
+ - coldcc: code 9
+ - x86_stdcallcc: code 64
+ - x86_fastcallcc: code 65
+ - arm_apcscc: code 66
+ - arm_aapcscc: code 67
+ - arm_aapcs_vfpcc: code 68
+
+
+
+- isproto: Non-zero if this entry represents a declaration
+rather than a definition
+
+- linkage: An encoding of the linkage type
+for this function
+
+- paramattr: If nonzero, the 1-based parameter attribute index
+into the table of PARAMATTR_CODE_ENTRY
+entries.
+
+- alignment: The logarithm base 2 of the function's requested
+alignment, plus 1
+
+- section: If non-zero, the 1-based section index in the
+table of MODULE_CODE_SECTIONNAME
+entries.
+
+- visibility: An encoding of the visibility
+ of this function
+
+- gc: If present and nonzero, the 1-based garbage collector
+index in the table of
+MODULE_CODE_GCNAME entries.
+
+
+
+
+
+
+
+
+
[ALIAS, alias type, aliasee val#, linkage, visibility]
+
+
The ALIAS record (code 9) marks the definition of an
+alias. The operand fields are
+
+
+- alias type: The type index of the alias
+
+- aliasee val#: The value index of the aliased value
+
+- linkage: An encoding of the linkage type
+for this alias
+
+- visibility: If present, an encoding of the
+visibility of the alias
+
+
+
+
+
+
+
+
+
[PURGEVALS, numvals]
+
+
The PURGEVALS record (code 10) resets the module-level
+value list to the size given by the single operand value. Module-level
+value list items are added by GLOBALVAR, FUNCTION,
+and ALIAS records. After a PURGEVALS record is seen,
+new value indices will start from the given numvals value.
+
+
+
+
+
+
+
[GCNAME, ...string...]
+
+
The GCNAME record (code 11) contains a variable number of
+values representing the bytes of a single garbage collector name
+string. There should be one GCNAME record for each garbage
+collector name referenced in function gc attributes within
+the module. These records can be referenced by 1-based index in the gc
+fields of FUNCTION records.
+
+
+
+
+
+
+
+
The PARAMATTR_BLOCK block (id 9) ...
+
+
+
+
+
+
+
+
+
+
+
[ENTRY, paramidx0, attr0, paramidx1, attr1...]
+
+
The ENTRY record (code 1) ...
+
+
+
+
+
+
+
+
+
The TYPE_BLOCK block (id 10) ...
+
+
+
+
+
+
+
+
+
+
+
The CONSTANTS_BLOCK block (id 11) ...
+
+
+
+
+
+
+
+
+
+
+
The FUNCTION_BLOCK block (id 12) ...
+
+
+
In addition to the record types described below, a
+FUNCTION_BLOCK block may contain the following sub-blocks:
+
+
+
+
+
+
+
+
+
+
+
+
+
The TYPE_SYMTAB_BLOCK block (id 13) ...
+
+
+
+
+
+
+
+
+
+
+
The VALUE_SYMTAB_BLOCK block (id 14) ...
+
+
+
+
+
+
+
+
+
+
+
The METADATA_BLOCK block (id 15) ...
+
+
+
+
+
+
+
+
+
+
+
The METADATA_ATTACHMENT block (id 16) ...
@@ -755,7 +1158,7 @@ LLVM IR is defined with the following blocks:
src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01">
Chris Lattner
The LLVM Compiler Infrastructure
-Last modified: $Date: 2009-10-12 16:46:08 +0200 (Mon, 12 Oct 2009) $
+Last modified: $Date: 2009-10-29 05:25:46 +0100 (Thu, 29 Oct 2009) $