svn commit: r201360 - in vendor/llvm/dist: bindings/ocaml
cmake/modules docs include/llvm include/llvm-c
include/llvm/ADT include/llvm/Analysis include/llvm/Bitcode
include/llvm/CodeGen include/llv...
Roman Divacky
rdivacky at FreeBSD.org
Fri Jan 1 10:31:25 UTC 2010
Author: rdivacky
Date: Fri Jan 1 10:31:22 2010
New Revision: 201360
URL: http://svn.freebsd.org/changeset/base/201360
Log:
Update LLVM to 92395.
Added:
vendor/llvm/dist/include/llvm/Support/circular_raw_ostream.h
vendor/llvm/dist/lib/CodeGen/SelectionDAG/SDNodeOrdering.h
vendor/llvm/dist/lib/Support/SmallVector.cpp
vendor/llvm/dist/lib/Support/circular_raw_ostream.cpp
vendor/llvm/dist/lib/Target/X86/Disassembler/X86Disassembler.h
vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c
vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h
vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h
vendor/llvm/dist/lib/VMCore/IRBuilder.cpp
vendor/llvm/dist/test/Assembler/metadata.ll
vendor/llvm/dist/test/CodeGen/MSP430/2009-12-21-FrameAddr.ll
vendor/llvm/dist/test/CodeGen/MSP430/2009-12-22-InlineAsm.ll
vendor/llvm/dist/test/CodeGen/PIC16/C16-11.ll
vendor/llvm/dist/test/CodeGen/PIC16/C16-15.ll
vendor/llvm/dist/test/CodeGen/PIC16/C16-49.ll
vendor/llvm/dist/test/CodeGen/PIC16/check_inc_files.ll
vendor/llvm/dist/test/CodeGen/PIC16/result_direction.ll
vendor/llvm/dist/test/CodeGen/PIC16/test_indf_name.ll
vendor/llvm/dist/test/CodeGen/Thumb/2009-12-17-pre-regalloc-taildup.ll
vendor/llvm/dist/test/CodeGen/X86/brcond-srl.ll
vendor/llvm/dist/test/CodeGen/X86/break-sse-dep.ll
vendor/llvm/dist/test/CodeGen/X86/memcmp.ll
vendor/llvm/dist/test/CodeGen/X86/phys-reg-local-regalloc.ll
vendor/llvm/dist/test/CodeGen/X86/powi.ll
vendor/llvm/dist/test/FrontendC++/2009-12-23-MissingSext.cpp
vendor/llvm/dist/test/MC/Disassembler/
vendor/llvm/dist/test/MC/Disassembler/dg.exp
vendor/llvm/dist/test/MC/Disassembler/simple-tests.txt
vendor/llvm/dist/test/TableGen/subst2.td
vendor/llvm/dist/test/Transforms/InstCombine/2009-12-17-CmpSelectNull.ll
vendor/llvm/dist/test/Transforms/InstCombine/constant-fold-compare.ll
vendor/llvm/dist/test/Transforms/InstCombine/memcpy.ll
vendor/llvm/dist/test/Transforms/LoopRotate/phi-duplicate.ll
vendor/llvm/dist/test/Transforms/ScalarRepl/2009-12-11-NeonTypes.ll
vendor/llvm/dist/test/Transforms/ScalarRepl/nonzero-first-index.ll
vendor/llvm/dist/test/Transforms/SimplifyLibCalls/StrStr.ll
vendor/llvm/dist/tools/llvm-mc/Disassembler.cpp
vendor/llvm/dist/tools/llvm-mc/Disassembler.h
vendor/llvm/dist/tools/llvm-mc/HexDisassembler.cpp
vendor/llvm/dist/tools/llvm-mc/HexDisassembler.h
vendor/llvm/dist/unittests/Support/LeakDetectorTest.cpp
vendor/llvm/dist/unittests/VMCore/DerivedTypesTest.cpp
vendor/llvm/dist/utils/TableGen/X86DisassemblerShared.h
vendor/llvm/dist/utils/TableGen/X86DisassemblerTables.cpp
vendor/llvm/dist/utils/TableGen/X86DisassemblerTables.h
vendor/llvm/dist/utils/TableGen/X86ModRMFilters.h
vendor/llvm/dist/utils/TableGen/X86RecognizableInstr.cpp
vendor/llvm/dist/utils/TableGen/X86RecognizableInstr.h
vendor/llvm/dist/utils/lit/lit/
vendor/llvm/dist/utils/lit/lit/ExampleTests/
vendor/llvm/dist/utils/lit/lit/ExampleTests.ObjDir/
vendor/llvm/dist/utils/lit/lit/ExampleTests.ObjDir/lit.site.cfg
vendor/llvm/dist/utils/lit/lit/ExampleTests/Clang/
vendor/llvm/dist/utils/lit/lit/ExampleTests/Clang/fsyntax-only.c
vendor/llvm/dist/utils/lit/lit/ExampleTests/Clang/lit.cfg
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.InTree/
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.InTree/test/
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.InTree/test/Bar/
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.InTree/test/Bar/bar-test.ll
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.InTree/test/Bar/dg.exp
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.InTree/test/lit.cfg
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.InTree/test/lit.site.cfg
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.InTree/test/site.exp
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.OutOfTree/
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.OutOfTree/lit.local.cfg
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/Foo/
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/Foo/lit.local.cfg
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/lit.site.cfg
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.OutOfTree/obj/test/site.exp
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.OutOfTree/src/
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.OutOfTree/src/test/
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.OutOfTree/src/test/Foo/
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.OutOfTree/src/test/Foo/data.txt
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.OutOfTree/src/test/Foo/dg.exp
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.OutOfTree/src/test/Foo/pct-S.ll
vendor/llvm/dist/utils/lit/lit/ExampleTests/LLVM.OutOfTree/src/test/lit.cfg
vendor/llvm/dist/utils/lit/lit/ExampleTests/ShExternal/
vendor/llvm/dist/utils/lit/lit/ExampleTests/ShExternal/lit.local.cfg
vendor/llvm/dist/utils/lit/lit/ExampleTests/ShInternal/
vendor/llvm/dist/utils/lit/lit/ExampleTests/ShInternal/lit.local.cfg
vendor/llvm/dist/utils/lit/lit/ExampleTests/TclTest/
vendor/llvm/dist/utils/lit/lit/ExampleTests/TclTest/lit.local.cfg
vendor/llvm/dist/utils/lit/lit/ExampleTests/TclTest/stderr-pipe.ll
vendor/llvm/dist/utils/lit/lit/ExampleTests/TclTest/tcl-redir-1.ll
vendor/llvm/dist/utils/lit/lit/ExampleTests/fail.c
vendor/llvm/dist/utils/lit/lit/ExampleTests/lit.cfg
vendor/llvm/dist/utils/lit/lit/ExampleTests/pass.c
vendor/llvm/dist/utils/lit/lit/ExampleTests/xfail.c
vendor/llvm/dist/utils/lit/lit/ExampleTests/xpass.c
vendor/llvm/dist/utils/lit/lit/LitConfig.py
vendor/llvm/dist/utils/lit/lit/LitFormats.py
vendor/llvm/dist/utils/lit/lit/ProgressBar.py
vendor/llvm/dist/utils/lit/lit/ShCommands.py
vendor/llvm/dist/utils/lit/lit/ShUtil.py
vendor/llvm/dist/utils/lit/lit/TclUtil.py
vendor/llvm/dist/utils/lit/lit/Test.py
vendor/llvm/dist/utils/lit/lit/TestFormats.py
vendor/llvm/dist/utils/lit/lit/TestRunner.py
vendor/llvm/dist/utils/lit/lit/TestingConfig.py
vendor/llvm/dist/utils/lit/lit/Util.py
vendor/llvm/dist/utils/lit/lit/__init__.py
vendor/llvm/dist/utils/lit/lit/lit.py (contents, props changed)
vendor/llvm/dist/utils/lit/setup.py
vendor/llvm/dist/utils/unittest/googletest/tempfile.tmp
Deleted:
vendor/llvm/dist/include/llvm/Bitcode/Deserialize.h
vendor/llvm/dist/include/llvm/Bitcode/Serialization.h
vendor/llvm/dist/include/llvm/Bitcode/SerializationFwd.h
vendor/llvm/dist/include/llvm/Bitcode/Serialize.h
vendor/llvm/dist/lib/Bitcode/Reader/Deserialize.cpp
vendor/llvm/dist/lib/Bitcode/Reader/DeserializeAPFloat.cpp
vendor/llvm/dist/lib/Bitcode/Reader/DeserializeAPInt.cpp
vendor/llvm/dist/lib/Bitcode/Writer/Serialize.cpp
vendor/llvm/dist/lib/Bitcode/Writer/SerializeAPFloat.cpp
vendor/llvm/dist/lib/Bitcode/Writer/SerializeAPInt.cpp
vendor/llvm/dist/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst.ll
vendor/llvm/dist/test/Transforms/Reassociate/basictest2.ll
vendor/llvm/dist/test/Transforms/Reassociate/basictest3.ll
vendor/llvm/dist/test/Transforms/Reassociate/basictest4.ll
vendor/llvm/dist/test/Transforms/Reassociate/mul-factor3.ll
vendor/llvm/dist/test/Transforms/Reassociate/mul-neg-add.ll
Modified:
vendor/llvm/dist/bindings/ocaml/Makefile.ocaml
vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake
vendor/llvm/dist/docs/CompilerDriver.html
vendor/llvm/dist/docs/GettingStarted.html
vendor/llvm/dist/docs/LangRef.html
vendor/llvm/dist/include/llvm-c/Target.h
vendor/llvm/dist/include/llvm/ADT/APFloat.h
vendor/llvm/dist/include/llvm/ADT/DenseMap.h
vendor/llvm/dist/include/llvm/ADT/SCCIterator.h
vendor/llvm/dist/include/llvm/ADT/SmallVector.h
vendor/llvm/dist/include/llvm/ADT/StringRef.h
vendor/llvm/dist/include/llvm/Analysis/DebugInfo.h
vendor/llvm/dist/include/llvm/Analysis/LoopInfo.h
vendor/llvm/dist/include/llvm/Analysis/MemoryDependenceAnalysis.h
vendor/llvm/dist/include/llvm/Analysis/ProfileInfo.h
vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h
vendor/llvm/dist/include/llvm/Analysis/SparsePropagation.h
vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h
vendor/llvm/dist/include/llvm/Argument.h
vendor/llvm/dist/include/llvm/BasicBlock.h
vendor/llvm/dist/include/llvm/CodeGen/JITCodeEmitter.h
vendor/llvm/dist/include/llvm/CodeGen/MachineCodeEmitter.h
vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h
vendor/llvm/dist/include/llvm/CodeGen/MachinePassRegistry.h
vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h
vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h
vendor/llvm/dist/include/llvm/CodeGen/SlotIndexes.h
vendor/llvm/dist/include/llvm/CodeGen/ValueTypes.h
vendor/llvm/dist/include/llvm/CompilerDriver/Common.td
vendor/llvm/dist/include/llvm/Constants.h
vendor/llvm/dist/include/llvm/DerivedTypes.h
vendor/llvm/dist/include/llvm/Function.h
vendor/llvm/dist/include/llvm/GlobalAlias.h
vendor/llvm/dist/include/llvm/GlobalValue.h
vendor/llvm/dist/include/llvm/GlobalVariable.h
vendor/llvm/dist/include/llvm/InstrTypes.h
vendor/llvm/dist/include/llvm/Instruction.h
vendor/llvm/dist/include/llvm/Instructions.h
vendor/llvm/dist/include/llvm/IntrinsicInst.h
vendor/llvm/dist/include/llvm/Intrinsics.td
vendor/llvm/dist/include/llvm/LLVMContext.h
vendor/llvm/dist/include/llvm/MC/MCAssembler.h
vendor/llvm/dist/include/llvm/Metadata.h
vendor/llvm/dist/include/llvm/Module.h
vendor/llvm/dist/include/llvm/Support/Casting.h
vendor/llvm/dist/include/llvm/Support/Compiler.h
vendor/llvm/dist/include/llvm/Support/ConstantFolder.h
vendor/llvm/dist/include/llvm/Support/Debug.h
vendor/llvm/dist/include/llvm/Support/Format.h
vendor/llvm/dist/include/llvm/Support/FormattedStream.h
vendor/llvm/dist/include/llvm/Support/IRBuilder.h
vendor/llvm/dist/include/llvm/Support/NoFolder.h
vendor/llvm/dist/include/llvm/Support/StandardPasses.h
vendor/llvm/dist/include/llvm/Support/TargetFolder.h
vendor/llvm/dist/include/llvm/Support/raw_os_ostream.h
vendor/llvm/dist/include/llvm/Support/raw_ostream.h
vendor/llvm/dist/include/llvm/System/Path.h
vendor/llvm/dist/include/llvm/Target/TargetInstrDesc.h
vendor/llvm/dist/include/llvm/Target/TargetLowering.h
vendor/llvm/dist/include/llvm/Target/TargetMachine.h
vendor/llvm/dist/include/llvm/Target/TargetOptions.h
vendor/llvm/dist/include/llvm/Transforms/Utils/Cloning.h
vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h
vendor/llvm/dist/include/llvm/Transforms/Utils/SSAUpdater.h
vendor/llvm/dist/include/llvm/Type.h
vendor/llvm/dist/include/llvm/Value.h
vendor/llvm/dist/lib/Analysis/AliasAnalysisCounter.cpp
vendor/llvm/dist/lib/Analysis/AliasAnalysisEvaluator.cpp
vendor/llvm/dist/lib/Analysis/AliasSetTracker.cpp
vendor/llvm/dist/lib/Analysis/DbgInfoPrinter.cpp
vendor/llvm/dist/lib/Analysis/DebugInfo.cpp
vendor/llvm/dist/lib/Analysis/IPA/Andersens.cpp
vendor/llvm/dist/lib/Analysis/IPA/CallGraph.cpp
vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp
vendor/llvm/dist/lib/Analysis/IVUsers.cpp
vendor/llvm/dist/lib/Analysis/InstCount.cpp
vendor/llvm/dist/lib/Analysis/LazyValueInfo.cpp
vendor/llvm/dist/lib/Analysis/LoopDependenceAnalysis.cpp
vendor/llvm/dist/lib/Analysis/LoopInfo.cpp
vendor/llvm/dist/lib/Analysis/MemoryDependenceAnalysis.cpp
vendor/llvm/dist/lib/Analysis/PHITransAddr.cpp
vendor/llvm/dist/lib/Analysis/PostDominators.cpp
vendor/llvm/dist/lib/Analysis/ProfileEstimatorPass.cpp
vendor/llvm/dist/lib/Analysis/ProfileInfo.cpp
vendor/llvm/dist/lib/Analysis/ProfileInfoLoaderPass.cpp
vendor/llvm/dist/lib/Analysis/ProfileVerifierPass.cpp
vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp
vendor/llvm/dist/lib/Analysis/SparsePropagation.cpp
vendor/llvm/dist/lib/Analysis/Trace.cpp
vendor/llvm/dist/lib/Analysis/ValueTracking.cpp
vendor/llvm/dist/lib/AsmParser/LLLexer.cpp
vendor/llvm/dist/lib/AsmParser/LLLexer.h
vendor/llvm/dist/lib/AsmParser/LLParser.cpp
vendor/llvm/dist/lib/AsmParser/LLParser.h
vendor/llvm/dist/lib/AsmParser/LLToken.h
vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp
vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.h
vendor/llvm/dist/lib/Bitcode/Reader/CMakeLists.txt
vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp
vendor/llvm/dist/lib/Bitcode/Writer/CMakeLists.txt
vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.cpp
vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.cpp
vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp
vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.h
vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h
vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.cpp
vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp
vendor/llvm/dist/lib/CodeGen/CalcSpillWeights.cpp
vendor/llvm/dist/lib/CodeGen/CodePlacementOpt.cpp
vendor/llvm/dist/lib/CodeGen/ELF.h
vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp
vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp
vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp
vendor/llvm/dist/lib/CodeGen/MachineDominators.cpp
vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp
vendor/llvm/dist/lib/CodeGen/MachineLICM.cpp
vendor/llvm/dist/lib/CodeGen/MachineLoopInfo.cpp
vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp
vendor/llvm/dist/lib/CodeGen/PBQP/AnnotatedGraph.h
vendor/llvm/dist/lib/CodeGen/PBQP/GraphBase.h
vendor/llvm/dist/lib/CodeGen/PBQP/HeuristicSolver.h
vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp
vendor/llvm/dist/lib/CodeGen/PHIElimination.h
vendor/llvm/dist/lib/CodeGen/PreAllocSplitting.cpp
vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp
vendor/llvm/dist/lib/CodeGen/RegAllocLinearScan.cpp
vendor/llvm/dist/lib/CodeGen/RegAllocLocal.cpp
vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp
vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp
vendor/llvm/dist/lib/CodeGen/SimpleRegisterCoalescing.cpp
vendor/llvm/dist/lib/CodeGen/SimpleRegisterCoalescing.h
vendor/llvm/dist/lib/CodeGen/SlotIndexes.cpp
vendor/llvm/dist/lib/CodeGen/Spiller.cpp
vendor/llvm/dist/lib/CompilerDriver/CompilationGraph.cpp
vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.cpp
vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.h
vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp
vendor/llvm/dist/lib/ExecutionEngine/JIT/JITEmitter.cpp
vendor/llvm/dist/lib/Linker/LinkModules.cpp
vendor/llvm/dist/lib/Support/APFloat.cpp
vendor/llvm/dist/lib/Support/APInt.cpp
vendor/llvm/dist/lib/Support/CMakeLists.txt
vendor/llvm/dist/lib/Support/Debug.cpp
vendor/llvm/dist/lib/Support/Dwarf.cpp
vendor/llvm/dist/lib/Support/MemoryBuffer.cpp
vendor/llvm/dist/lib/Support/StringRef.cpp
vendor/llvm/dist/lib/Support/raw_os_ostream.cpp
vendor/llvm/dist/lib/Support/raw_ostream.cpp
vendor/llvm/dist/lib/System/DynamicLibrary.cpp
vendor/llvm/dist/lib/System/Path.cpp
vendor/llvm/dist/lib/System/Unix/Path.inc
vendor/llvm/dist/lib/System/Unix/Process.inc
vendor/llvm/dist/lib/System/Win32/Path.inc
vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp
vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.cpp
vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp
vendor/llvm/dist/lib/Target/ARM/ARMInstrFormats.td
vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td
vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb.td
vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td
vendor/llvm/dist/lib/Target/ARM/ARMJITInfo.cpp
vendor/llvm/dist/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
vendor/llvm/dist/lib/Target/ARM/ARMRegisterInfo.td
vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.cpp
vendor/llvm/dist/lib/Target/Alpha/AlphaISelLowering.cpp
vendor/llvm/dist/lib/Target/Alpha/AlphaJITInfo.cpp
vendor/llvm/dist/lib/Target/Blackfin/BlackfinISelDAGToDAG.cpp
vendor/llvm/dist/lib/Target/CBackend/CBackend.cpp
vendor/llvm/dist/lib/Target/CellSPU/SPUISelLowering.cpp
vendor/llvm/dist/lib/Target/MSIL/MSILWriter.cpp
vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430MCInstLower.cpp
vendor/llvm/dist/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp
vendor/llvm/dist/lib/Target/MSP430/MSP430RegisterInfo.cpp
vendor/llvm/dist/lib/Target/Mips/MipsSubtarget.h
vendor/llvm/dist/lib/Target/Mips/MipsTargetMachine.cpp
vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp
vendor/llvm/dist/lib/Target/PIC16/PIC16ISelDAGToDAG.h
vendor/llvm/dist/lib/Target/PIC16/PIC16ISelLowering.cpp
vendor/llvm/dist/lib/Target/PIC16/PIC16ISelLowering.h
vendor/llvm/dist/lib/Target/PIC16/PIC16InstrInfo.td
vendor/llvm/dist/lib/Target/PowerPC/PPCFrameInfo.h
vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp
vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h
vendor/llvm/dist/lib/Target/PowerPC/PPCInstr64Bit.td
vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td
vendor/llvm/dist/lib/Target/PowerPC/PPCJITInfo.cpp
vendor/llvm/dist/lib/Target/README.txt
vendor/llvm/dist/lib/Target/Target.cpp
vendor/llvm/dist/lib/Target/TargetData.cpp
vendor/llvm/dist/lib/Target/TargetMachine.cpp
vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp
vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
vendor/llvm/dist/lib/Target/X86/CMakeLists.txt
vendor/llvm/dist/lib/Target/X86/Disassembler/CMakeLists.txt
vendor/llvm/dist/lib/Target/X86/Disassembler/X86Disassembler.cpp
vendor/llvm/dist/lib/Target/X86/Makefile
vendor/llvm/dist/lib/Target/X86/README.txt
vendor/llvm/dist/lib/Target/X86/X86.td
vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp
vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp
vendor/llvm/dist/lib/Target/X86/X86Instr64bit.td
vendor/llvm/dist/lib/Target/X86/X86InstrFPStack.td
vendor/llvm/dist/lib/Target/X86/X86InstrFormats.td
vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp
vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td
vendor/llvm/dist/lib/Target/X86/X86InstrMMX.td
vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td
vendor/llvm/dist/lib/Target/X86/X86JITInfo.cpp
vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.td
vendor/llvm/dist/lib/Target/X86/X86Subtarget.h
vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp
vendor/llvm/dist/lib/Target/X86/X86TargetMachine.h
vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.cpp
vendor/llvm/dist/lib/Transforms/Hello/Hello.cpp
vendor/llvm/dist/lib/Transforms/IPO/StripSymbols.cpp
vendor/llvm/dist/lib/Transforms/Scalar/CodeGenPrepare.cpp
vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp
vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp
vendor/llvm/dist/lib/Transforms/Scalar/InstructionCombining.cpp
vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp
vendor/llvm/dist/lib/Transforms/Scalar/LICM.cpp
vendor/llvm/dist/lib/Transforms/Scalar/LoopIndexSplit.cpp
vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp
vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp
vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp
vendor/llvm/dist/lib/Transforms/Scalar/SCCVN.cpp
vendor/llvm/dist/lib/Transforms/Scalar/ScalarReplAggregates.cpp
vendor/llvm/dist/lib/Transforms/Scalar/SimplifyCFGPass.cpp
vendor/llvm/dist/lib/Transforms/Scalar/SimplifyLibCalls.cpp
vendor/llvm/dist/lib/Transforms/Utils/BreakCriticalEdges.cpp
vendor/llvm/dist/lib/Transforms/Utils/CloneFunction.cpp
vendor/llvm/dist/lib/Transforms/Utils/Local.cpp
vendor/llvm/dist/lib/Transforms/Utils/LoopSimplify.cpp
vendor/llvm/dist/lib/Transforms/Utils/LoopUnroll.cpp
vendor/llvm/dist/lib/Transforms/Utils/SSAUpdater.cpp
vendor/llvm/dist/lib/VMCore/AsmWriter.cpp
vendor/llvm/dist/lib/VMCore/BasicBlock.cpp
vendor/llvm/dist/lib/VMCore/CMakeLists.txt
vendor/llvm/dist/lib/VMCore/ConstantFold.cpp
vendor/llvm/dist/lib/VMCore/Constants.cpp
vendor/llvm/dist/lib/VMCore/Dominators.cpp
vendor/llvm/dist/lib/VMCore/Function.cpp
vendor/llvm/dist/lib/VMCore/Instruction.cpp
vendor/llvm/dist/lib/VMCore/Instructions.cpp
vendor/llvm/dist/lib/VMCore/IntrinsicInst.cpp
vendor/llvm/dist/lib/VMCore/LLVMContext.cpp
vendor/llvm/dist/lib/VMCore/LLVMContextImpl.h
vendor/llvm/dist/lib/VMCore/LeaksContext.h
vendor/llvm/dist/lib/VMCore/Metadata.cpp
vendor/llvm/dist/lib/VMCore/Module.cpp
vendor/llvm/dist/lib/VMCore/PassManager.cpp
vendor/llvm/dist/lib/VMCore/Type.cpp
vendor/llvm/dist/lib/VMCore/Value.cpp
vendor/llvm/dist/lib/VMCore/Verifier.cpp
vendor/llvm/dist/test/CodeGen/ARM/fpowi.ll
vendor/llvm/dist/test/CodeGen/ARM/inlineasm3.ll
vendor/llvm/dist/test/CodeGen/CellSPU/and_ops.ll
vendor/llvm/dist/test/CodeGen/PowerPC/2007-04-30-InlineAsmEarlyClobber.ll
vendor/llvm/dist/test/CodeGen/Thumb2/large-stack.ll
vendor/llvm/dist/test/CodeGen/X86/2007-09-27-LDIntrinsics.ll
vendor/llvm/dist/test/CodeGen/X86/2009-11-04-SubregCoalescingBug.ll
vendor/llvm/dist/test/CodeGen/X86/abi-isel.ll
vendor/llvm/dist/test/CodeGen/X86/bss_pagealigned.ll
vendor/llvm/dist/test/CodeGen/X86/cmov.ll
vendor/llvm/dist/test/CodeGen/X86/live-out-reg-info.ll
vendor/llvm/dist/test/CodeGen/X86/loop-blocks.ll
vendor/llvm/dist/test/CodeGen/X86/object-size.ll
vendor/llvm/dist/test/CodeGen/X86/peep-test-3.ll
vendor/llvm/dist/test/CodeGen/X86/select-aggregate.ll
vendor/llvm/dist/test/CodeGen/X86/setcc.ll
vendor/llvm/dist/test/CodeGen/X86/tail-opts.ll
vendor/llvm/dist/test/CodeGen/X86/tailcall1.ll
vendor/llvm/dist/test/CodeGen/X86/widen_load-1.ll
vendor/llvm/dist/test/CodeGen/X86/x86-64-pic-1.ll
vendor/llvm/dist/test/CodeGen/X86/x86-64-pic-10.ll
vendor/llvm/dist/test/CodeGen/X86/x86-64-pic-11.ll
vendor/llvm/dist/test/CodeGen/X86/x86-64-pic-2.ll
vendor/llvm/dist/test/CodeGen/X86/x86-64-pic-3.ll
vendor/llvm/dist/test/DebugInfo/2009-12-01-CurrentFn.ll
vendor/llvm/dist/test/FrontendC++/m64-ptr.cpp
vendor/llvm/dist/test/LLVMC/OptionPreprocessor.td
vendor/llvm/dist/test/Transforms/GVN/rle-phi-translate.ll
vendor/llvm/dist/test/Transforms/GlobalOpt/heap-sra-3.ll
vendor/llvm/dist/test/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll
vendor/llvm/dist/test/Transforms/InstCombine/cast_ptr.ll
vendor/llvm/dist/test/Transforms/InstCombine/crash.ll
vendor/llvm/dist/test/Transforms/InstCombine/icmp.ll
vendor/llvm/dist/test/Transforms/InstCombine/intrinsics.ll
vendor/llvm/dist/test/Transforms/InstCombine/select.ll
vendor/llvm/dist/test/Transforms/Reassociate/basictest.ll
vendor/llvm/dist/test/Transforms/SimplifyCFG/basictest.ll
vendor/llvm/dist/test/Transforms/SimplifyCFG/duplicate-phis.ll
vendor/llvm/dist/test/Transforms/SimplifyLibCalls/memcmp.ll
vendor/llvm/dist/tools/llvm-mc/AsmParser.cpp
vendor/llvm/dist/tools/llvm-mc/CMakeLists.txt
vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp
vendor/llvm/dist/tools/llvmc/doc/LLVMC-Reference.rst
vendor/llvm/dist/tools/llvmc/doc/Makefile
vendor/llvm/dist/tools/llvmc/example/mcc16/plugins/PIC16Base/PIC16Base.td
vendor/llvm/dist/tools/llvmc/plugins/Base/Base.td.in
vendor/llvm/dist/tools/lto/LTOCodeGenerator.h
vendor/llvm/dist/tools/lto/LTOModule.h
vendor/llvm/dist/unittests/ADT/APFloatTest.cpp
vendor/llvm/dist/unittests/ADT/DeltaAlgorithmTest.cpp
vendor/llvm/dist/unittests/ADT/StringRefTest.cpp
vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITTest.cpp
vendor/llvm/dist/unittests/ExecutionEngine/JIT/Makefile
vendor/llvm/dist/unittests/VMCore/MetadataTest.cpp
vendor/llvm/dist/utils/TableGen/CMakeLists.txt
vendor/llvm/dist/utils/TableGen/CodeEmitterGen.cpp
vendor/llvm/dist/utils/TableGen/CodeEmitterGen.h
vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp
vendor/llvm/dist/utils/TableGen/CodeGenInstruction.cpp
vendor/llvm/dist/utils/TableGen/DAGISelEmitter.cpp
vendor/llvm/dist/utils/TableGen/DisassemblerEmitter.cpp
vendor/llvm/dist/utils/TableGen/LLVMCConfigurationEmitter.cpp
vendor/llvm/dist/utils/TableGen/Record.cpp
vendor/llvm/dist/utils/buildit/build_llvm
vendor/llvm/dist/utils/emacs/llvm-mode.el
vendor/llvm/dist/utils/lit/TestFormats.py
vendor/llvm/dist/utils/lit/lit.py
vendor/llvm/dist/utils/llvmdo
vendor/llvm/dist/utils/unittest/googletest/gtest.cc
vendor/llvm/dist/utils/unittest/googletest/include/gtest/gtest-param-test.h
Modified: vendor/llvm/dist/bindings/ocaml/Makefile.ocaml
==============================================================================
--- vendor/llvm/dist/bindings/ocaml/Makefile.ocaml Fri Jan 1 03:58:21 2010 (r201359)
+++ vendor/llvm/dist/bindings/ocaml/Makefile.ocaml Fri Jan 1 10:31:22 2010 (r201360)
@@ -163,6 +163,7 @@ clean-deplibs:
$(Verb) rm -f $(OutputLibs)
install-deplibs:
+ $(Verb) $(MKDIR) $(PROJ_libocamldir)
$(Verb) for i in $(DestLibs:$(PROJ_libocamldir)/%=%); do \
ln -sf "$(PROJ_libdir)/$$i" "$(PROJ_libocamldir)/$$i"; \
done
Modified: vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake
==============================================================================
--- vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake Fri Jan 1 03:58:21 2010 (r201359)
+++ vendor/llvm/dist/cmake/modules/LLVMLibDeps.cmake Fri Jan 1 10:31:22 2010 (r201360)
@@ -57,8 +57,8 @@ set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LL
set(MSVC_LIB_DEPS_LLVMTransformUtils LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMipa)
set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMX86Info)
set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget LLVMX86CodeGen LLVMX86Info)
-set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86Info)
-set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMX86Info)
+set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86Disassembler LLVMX86Info)
+set(MSVC_LIB_DEPS_LLVMX86Disassembler )
set(MSVC_LIB_DEPS_LLVMX86Info LLVMSupport)
set(MSVC_LIB_DEPS_LLVMXCore LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMXCoreInfo)
set(MSVC_LIB_DEPS_LLVMXCoreAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget LLVMXCoreInfo)
Modified: vendor/llvm/dist/docs/CompilerDriver.html
==============================================================================
--- vendor/llvm/dist/docs/CompilerDriver.html Fri Jan 1 03:58:21 2010 (r201359)
+++ vendor/llvm/dist/docs/CompilerDriver.html Fri Jan 1 10:31:22 2010 (r201360)
@@ -334,8 +334,8 @@ once). Incompatible with <tt class="docu
only for list options in conjunction with <tt class="docutils literal"><span class="pre">multi_val</span></tt>; for ordinary lists
it is synonymous with <tt class="docutils literal"><span class="pre">required</span></tt>. Incompatible with <tt class="docutils literal"><span class="pre">required</span></tt> and
<tt class="docutils literal"><span class="pre">zero_or_one</span></tt>.</li>
-<li><tt class="docutils literal"><span class="pre">zero_or_one</span></tt> - the option can be specified zero or one times. Useful
-only for list options in conjunction with <tt class="docutils literal"><span class="pre">multi_val</span></tt>. Incompatible with
+<li><tt class="docutils literal"><span class="pre">optional</span></tt> - the option can be specified zero or one times. Useful only
+for list options in conjunction with <tt class="docutils literal"><span class="pre">multi_val</span></tt>. Incompatible with
<tt class="docutils literal"><span class="pre">required</span></tt> and <tt class="docutils literal"><span class="pre">one_or_more</span></tt>.</li>
<li><tt class="docutils literal"><span class="pre">hidden</span></tt> - the description of this option will not appear in
the <tt class="docutils literal"><span class="pre">--help</span></tt> output (but will appear in the <tt class="docutils literal"><span class="pre">--help-hidden</span></tt>
@@ -350,13 +350,14 @@ gcc's <tt class="docutils literal"><span
<li><tt class="docutils literal"><span class="pre">multi_val</span> <span class="pre">n</span></tt> - this option takes <em>n</em> arguments (can be useful in some
special cases). Usage example: <tt class="docutils literal"><span class="pre">(parameter_list_option</span> <span class="pre">"foo",</span> <span class="pre">(multi_val</span>
<span class="pre">3))</span></tt>; the command-line syntax is '-foo a b c'. Only list options can have
-this attribute; you can, however, use the <tt class="docutils literal"><span class="pre">one_or_more</span></tt>, <tt class="docutils literal"><span class="pre">zero_or_one</span></tt>
+this attribute; you can, however, use the <tt class="docutils literal"><span class="pre">one_or_more</span></tt>, <tt class="docutils literal"><span class="pre">optional</span></tt>
and <tt class="docutils literal"><span class="pre">required</span></tt> properties.</li>
<li><tt class="docutils literal"><span class="pre">init</span></tt> - this option has a default value, either a string (if it is a
-parameter), or a boolean (if it is a switch; boolean constants are called
-<tt class="docutils literal"><span class="pre">true</span></tt> and <tt class="docutils literal"><span class="pre">false</span></tt>). List options can't have this attribute. Usage
-examples: <tt class="docutils literal"><span class="pre">(switch_option</span> <span class="pre">"foo",</span> <span class="pre">(init</span> <span class="pre">true))</span></tt>; <tt class="docutils literal"><span class="pre">(prefix_option</span> <span class="pre">"bar",</span>
-<span class="pre">(init</span> <span class="pre">"baz"))</span></tt>.</li>
+parameter), or a boolean (if it is a switch; as in C++, boolean constants
+are called <tt class="docutils literal"><span class="pre">true</span></tt> and <tt class="docutils literal"><span class="pre">false</span></tt>). List options can't have <tt class="docutils literal"><span class="pre">init</span></tt>
+attribute.
+Usage examples: <tt class="docutils literal"><span class="pre">(switch_option</span> <span class="pre">"foo",</span> <span class="pre">(init</span> <span class="pre">true))</span></tt>; <tt class="docutils literal"><span class="pre">(prefix_option</span>
+<span class="pre">"bar",</span> <span class="pre">(init</span> <span class="pre">"baz"))</span></tt>.</li>
<li><tt class="docutils literal"><span class="pre">extern</span></tt> - this option is defined in some other plugin, see <a class="reference internal" href="#extern">below</a>.</li>
</ul>
</blockquote>
@@ -604,10 +605,10 @@ def LanguageMap : LanguageMap<
$ llvmc hello.cpp
llvmc: Unknown suffix: cpp
</pre>
-<p>The language map entries should be added only for tools that are
-linked with the root node. Since tools are not allowed to have
-multiple output languages, for nodes "inside" the graph the input and
-output languages should match. This is enforced at compile-time.</p>
+<p>The language map entries are needed only for the tools that are linked from the
+root node. Since a tool can't have multiple output languages, for inner nodes of
+the graph the input and output languages should match. This is enforced at
+compile-time.</p>
</div>
<div class="section" id="option-preprocessor">
<h1><a class="toc-backref" href="#id20">Option preprocessor</a></h1>
@@ -619,22 +620,30 @@ the driver with both of these options en
occasions. Example (adapted from the built-in Base plugin):</p>
<pre class="literal-block">
def Preprocess : OptionPreprocessor<
-(case (and (switch_on "O3"), (any_switch_on ["O0", "O1", "O2"])),
- [(unset_option ["O0", "O1", "O2"]),
- (warning "Multiple -O options specified, defaulted to -O3.")],
+(case (not (any_switch_on ["O0", "O1", "O2", "O3"])),
+ (set_option "O2"),
+ (and (switch_on "O3"), (any_switch_on ["O0", "O1", "O2"])),
+ (unset_option ["O0", "O1", "O2"]),
(and (switch_on "O2"), (any_switch_on ["O0", "O1"])),
(unset_option ["O0", "O1"]),
(and (switch_on "O1"), (switch_on "O0")),
(unset_option "O0"))
>;
</pre>
-<p>Here, <tt class="docutils literal"><span class="pre">OptionPreprocessor</span></tt> is used to unset all spurious optimization options
-(so that they are not forwarded to the compiler).</p>
+<p>Here, <tt class="docutils literal"><span class="pre">OptionPreprocessor</span></tt> is used to unset all spurious <tt class="docutils literal"><span class="pre">-O</span></tt> options so
+that they are not forwarded to the compiler. If no optimization options are
+specified, <tt class="docutils literal"><span class="pre">-O2</span></tt> is enabled.</p>
<p><tt class="docutils literal"><span class="pre">OptionPreprocessor</span></tt> is basically a single big <tt class="docutils literal"><span class="pre">case</span></tt> expression, which is
evaluated only once right after the plugin is loaded. The only allowed actions
-in <tt class="docutils literal"><span class="pre">OptionPreprocessor</span></tt> are <tt class="docutils literal"><span class="pre">error</span></tt>, <tt class="docutils literal"><span class="pre">warning</span></tt> and a special action
-<tt class="docutils literal"><span class="pre">unset_option</span></tt>, which, as the name suggests, unsets a given option. For
-convenience, <tt class="docutils literal"><span class="pre">unset_option</span></tt> also works on lists.</p>
+in <tt class="docutils literal"><span class="pre">OptionPreprocessor</span></tt> are <tt class="docutils literal"><span class="pre">error</span></tt>, <tt class="docutils literal"><span class="pre">warning</span></tt>, and two special actions:
+<tt class="docutils literal"><span class="pre">unset_option</span></tt> and <tt class="docutils literal"><span class="pre">set_option</span></tt>. As their names suggest, they can be used to
+set or unset a given option. To set an option with <tt class="docutils literal"><span class="pre">set_option</span></tt>, use the
+two-argument form: <tt class="docutils literal"><span class="pre">(set_option</span> <span class="pre">"parameter",</span> <span class="pre">VALUE)</span></tt>. Here, <tt class="docutils literal"><span class="pre">VALUE</span></tt> can be
+either a string, a string list, or a boolean constant.</p>
+<p>For convenience, <tt class="docutils literal"><span class="pre">set_option</span></tt> and <tt class="docutils literal"><span class="pre">unset_option</span></tt> also work on lists. That
+is, instead of <tt class="docutils literal"><span class="pre">[(unset_option</span> <span class="pre">"A"),</span> <span class="pre">(unset_option</span> <span class="pre">"B")]</span></tt> you can use
+<tt class="docutils literal"><span class="pre">(unset_option</span> <span class="pre">["A",</span> <span class="pre">"B"])</span></tt>. Obviously, <tt class="docutils literal"><span class="pre">(set_option</span> <span class="pre">["A",</span> <span class="pre">"B"])</span></tt> is valid
+only if both <tt class="docutils literal"><span class="pre">A</span></tt> and <tt class="docutils literal"><span class="pre">B</span></tt> are switches.</p>
</div>
<div class="section" id="more-advanced-topics">
<h1><a class="toc-backref" href="#id21">More advanced topics</a></h1>
@@ -739,7 +748,7 @@ the <tt class="docutils literal"><span c
<a href="mailto:foldr at codedgers.com">Mikhail Glushenkov</a><br />
<a href="http://llvm.org">LLVM Compiler Infrastructure</a><br />
-Last modified: $Date: 2009-12-07 19:26:24 +0100 (Mon, 07 Dec 2009) $
+Last modified: $Date: 2009-12-23 13:49:51 +0100 (Wed, 23 Dec 2009) $
</address></div>
</div>
</div>
Modified: vendor/llvm/dist/docs/GettingStarted.html
==============================================================================
--- vendor/llvm/dist/docs/GettingStarted.html Fri Jan 1 03:58:21 2010 (r201359)
+++ vendor/llvm/dist/docs/GettingStarted.html Fri Jan 1 10:31:22 2010 (r201360)
@@ -114,13 +114,15 @@ and performance.
<li>Read the documentation.</li>
<li>Read the documentation.</li>
<li>Remember that you were warned twice about reading the documentation.</li>
- <li>Install the llvm-gcc-4.2 front end if you intend to compile C or C++:
+ <li>Install the llvm-gcc-4.2 front end if you intend to compile C or C++
+ (see <a href="#installcf">Install the GCC Front End</a> for details):</li>
<ol>
<li><tt>cd <i>where-you-want-the-C-front-end-to-live</i></tt></li>
- <li><tt>gunzip --stdout llvm-gcc-4.2-<i>version</i>-<i>platform</i>.tar.gz | tar -xvf -</tt>
- </li>
- <li>Note: If the binary extension is ".bz" use bunzip2 instead of gunzip.</li>
- <li>Add llvm-gcc's "bin" directory to your PATH variable.</li>
+ <li><tt>gunzip --stdout llvm-gcc-4.2-<i>version</i>-<i>platform</i>.tar.gz | tar -xvf -</tt></li>
+ <li><tt><i>install-binutils-binary-from-MinGW</i></tt> (Windows only)</li>
+ <li>Note: If the binary extension is "<tt>.bz</tt>" use <tt>bunzip2</tt> instead of <tt>gunzip</tt>.</li>
+ <li>Note: On Windows, use <a href="http://www.7-zip.org">7-Zip</a> or a similar archiving tool.</li>
+ <li>Add <tt>llvm-gcc</tt>'s "<tt>bin</tt>" directory to your <tt>PATH</tt> environment variable.</li>
</ol></li>
<li>Get the LLVM Source Code
@@ -774,13 +776,14 @@ instructions</a> to successfully get and
<div class="doc_text">
-<p>Before configuring and compiling the LLVM suite, you can optionally extract the
-LLVM GCC front end from the binary distribution. It is used for running the
-llvm-test testsuite and for compiling C/C++ programs. Note that you can optionally
-<a href="GCCFEBuildInstrs.html">build llvm-gcc yourself</a> after building the
+<p>Before configuring and compiling the LLVM suite (or if you want to use just the LLVM
+GCC front end) you can optionally extract the front end from the binary distribution.
+It is used for running the llvm-test testsuite and for compiling C/C++ programs. Note that
+you can optionally <a href="GCCFEBuildInstrs.html">build llvm-gcc yourself</a> after building the
main LLVM repository.</p>
-<p>To install the GCC front end, do the following:</p>
+<p>To install the GCC front end, do the following (on Windows, use an archival tool
+like <a href="http://www.7-zip.org">7-zip</a> that understands gzipped tars):</p>
<ol>
<li><tt>cd <i>where-you-want-the-front-end-to-live</i></tt></li>
@@ -788,22 +791,51 @@ main LLVM repository.</p>
-</tt></li>
</ol>
-<p>Once the binary is uncompressed, you should add a symlink for llvm-gcc and
-llvm-g++ to some directory in your path. When you configure LLVM, it will
-automatically detect llvm-gcc's presence (if it is in your path) enabling its
-use in llvm-test. Note that you can always build or install llvm-gcc at any
-pointer after building the main LLVM repository: just reconfigure llvm and
+<p>Once the binary is uncompressed, if you're using a *nix-based system, add a symlink for
+<tt>llvm-gcc</tt> and <tt>llvm-g++</tt> to some directory in your path. If you're using a
+Windows-based system, add the <tt>bin</tt> subdirectory of your front end installation directory
+to your <tt>PATH</tt> environment variable. For example, if you uncompressed the binary to
+<tt>c:\llvm-gcc</tt>, add <tt>c:\llvm-gcc\bin</tt> to your <tt>PATH</tt>.</p>
+
+<p>If you now want to build LLVM from source, when you configure LLVM, it will
+automatically detect <tt>llvm-gcc</tt>'s presence (if it is in your path) enabling its
+use in llvm-test. Note that you can always build or install <tt>llvm-gcc</tt> at any
+point after building the main LLVM repository: just reconfigure llvm and
llvm-test will pick it up.
</p>
-<p>The binary versions of the GCC front end may not suit all of your needs. For
-example, the binary distribution may include an old version of a system header
-file, not "fix" a header file that needs to be fixed for GCC, or it may be
-linked with libraries not available on your system.</p>
+<p>As a convenience for Windows users, the front end binaries for MinGW/x86 include
+versions of the required w32api and mingw-runtime binaries. The last remaining step for
+Windows users is to simply uncompress the binary binutils package from
+<a href="http://mingw.org/">MinGW</a> into your front end installation directory. While the
+front end installation steps are not quite the same as a typical manual MinGW installation,
+they should be similar enough to those who have previously installed MinGW on Windows systems.</p>
+
+<p>To install binutils on Windows:</p>
-<p>In cases like these, you may want to try <a
-href="GCCFEBuildInstrs.html">building the GCC front end from source.</a> This is
-much easier now than it was in the past.</p>
+<ol>
+ <li><tt><i>download GNU Binutils from <a href="http://sourceforge.net/projects/mingw/files/">MinGW Downloads</a></i></tt></li>
+ <li><tt>cd <i>where-you-uncompressed-the-front-end</i></tt></li>
+ <li><tt><i>uncompress archived binutils directories (not the tar file) into the current directory</i></tt></li>
+</ol>
+
+<p>The binary versions of the LLVM GCC front end may not suit all of your needs. For
+example, the binary distribution may include an old version of a system header
+file, not "fix" a header file that needs to be fixed for GCC, or it may be linked with
+libraries not available on your system. In cases like these, you may want to try
+<a href="GCCFEBuildInstrs.html">building the GCC front end from source</a>. Thankfully,
+this is much easier now than it was in the past.</p>
+
+<p>We also do not currently support updating of the GCC front end by manually overlaying
+newer versions of the w32api and mingw-runtime binary packages that may become available
+from MinGW. At this time, it's best to think of the MinGW LLVM GCC front end binary as
+a self-contained convenience package that requires Windows users to simply download and
+uncompress the GNU Binutils binary package from the MinGW project.</p>
+
+<p>Regardless of your platform, if you discover that installing the LLVM GCC front end
+binaries is not as easy as previously described, or you would like to suggest improvements,
+please let us know how you would like to see things improved by dropping us a note on our
+<a href="http://llvm.org/docs/#maillist">mailing list</a>.</p>
</div>
@@ -1171,7 +1203,6 @@ Cummings for pointing this out!
</div>
-
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="layout"><b>Program Layout</b></a>
@@ -1640,7 +1671,7 @@ out:</p>
<a href="mailto:sabre at nondot.org">Chris Lattner</a><br>
<a href="http://llvm.x10sys.com/rspencer/">Reid Spencer</a><br>
<a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
- Last modified: $Date: 2009-12-09 18:26:02 +0100 (Wed, 09 Dec 2009) $
+ Last modified: $Date: 2009-12-17 18:18:11 +0100 (Thu, 17 Dec 2009) $
</address>
</body>
</html>
Modified: vendor/llvm/dist/docs/LangRef.html
==============================================================================
--- vendor/llvm/dist/docs/LangRef.html Fri Jan 1 03:58:21 2010 (r201359)
+++ vendor/llvm/dist/docs/LangRef.html Fri Jan 1 10:31:22 2010 (r201360)
@@ -7257,8 +7257,8 @@ LLVM</a>.</p>
<h5>Syntax:</h5>
<pre>
- declare i32 @llvm.objectsize.i32( i8* <ptr>, i32 <type> )
- declare i64 @llvm.objectsize.i64( i8* <ptr>, i32 <type> )
+ declare i32 @llvm.objectsize.i32( i8* <object>, i1 <type> )
+ declare i64 @llvm.objectsize.i64( i8* <object>, i1 <type> )
</pre>
<h5>Overview:</h5>
@@ -7267,34 +7267,15 @@ LLVM</a>.</p>
operation like memcpy will either overflow a buffer that corresponds to
an object, or b) to determine that a runtime check for overflow isn't
necessary. An object in this context means an allocation of a
- specific <a href="#typesystem">type</a>.</p>
+ specific class, structure, array, or other object.</p>
<h5>Arguments:</h5>
<p>The <tt>llvm.objectsize</tt> intrinsic takes two arguments. The first
- argument is a pointer to the object <tt>ptr</tt>. The second argument
- is an integer <tt>type</tt> which ranges from 0 to 3. The first bit in
- the type corresponds to a return value based on whole objects,
- and the second bit whether or not we return the maximum or minimum
- remaining bytes computed.</p>
-<table class="layout">
- <tr class="layout">
- <td class="left"><tt>00</tt></td>
- <td class="left">whole object, maximum number of bytes</td>
- </tr>
- <tr class="layout">
- <td class="left"><tt>01</tt></td>
- <td class="left">partial object, maximum number of bytes</td>
- </tr>
- <tr class="layout">
- <td class="left"><tt>10</tt></td>
- <td class="left">whole object, minimum number of bytes</td>
- </tr>
- <tr class="layout">
- <td class="left"><tt>11</tt></td>
- <td class="left">partial object, minimum number of bytes</td>
- </tr>
-</table>
-
+ argument is a pointer to or into the <tt>object</tt>. The second argument
+ is a boolean 0 or 1. This argument determines whether you want the
+ maximum (0) or minimum (1) bytes remaining. This needs to be a literal 0 or
+ 1, variables are not allowed.</p>
+
<h5>Semantics:</h5>
<p>The <tt>llvm.objectsize</tt> intrinsic is lowered to either a constant
representing the size of the object concerned or <tt>i32/i64 -1 or 0</tt>
@@ -7313,7 +7294,7 @@ LLVM</a>.</p>
<a href="mailto:sabre at nondot.org">Chris Lattner</a><br>
<a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
- Last modified: $Date: 2009-12-05 03:46:03 +0100 (Sat, 05 Dec 2009) $
+ Last modified: $Date: 2009-12-23 01:29:49 +0100 (Wed, 23 Dec 2009) $
</address>
</body>
Modified: vendor/llvm/dist/include/llvm-c/Target.h
==============================================================================
--- vendor/llvm/dist/include/llvm-c/Target.h Fri Jan 1 03:58:21 2010 (r201359)
+++ vendor/llvm/dist/include/llvm-c/Target.h Fri Jan 1 10:31:22 2010 (r201360)
@@ -35,9 +35,11 @@ typedef struct LLVMStructLayout *LLVMStr
/* Declare all of the target-initialization functions that are available. */
#define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##TargetInfo();
#include "llvm/Config/Targets.def"
-
+#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
+
#define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##Target();
#include "llvm/Config/Targets.def"
+#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
/** LLVMInitializeAllTargetInfos - The main program should call this function if
it wants access to all available targets that LLVM is configured to
@@ -45,6 +47,7 @@ typedef struct LLVMStructLayout *LLVMStr
static inline void LLVMInitializeAllTargetInfos() {
#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetInfo();
#include "llvm/Config/Targets.def"
+#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
}
/** LLVMInitializeAllTargets - The main program should call this function if it
@@ -53,6 +56,7 @@ static inline void LLVMInitializeAllTarg
static inline void LLVMInitializeAllTargets() {
#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##Target();
#include "llvm/Config/Targets.def"
+#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
}
/** LLVMInitializeNativeTarget - The main program should call this function to
Modified: vendor/llvm/dist/include/llvm/ADT/APFloat.h
==============================================================================
--- vendor/llvm/dist/include/llvm/ADT/APFloat.h Fri Jan 1 03:58:21 2010 (r201359)
+++ vendor/llvm/dist/include/llvm/ADT/APFloat.h Fri Jan 1 10:31:22 2010 (r201360)
@@ -191,6 +191,7 @@ namespace llvm {
static APFloat getInf(const fltSemantics &Sem, bool Negative = false) {
return APFloat(Sem, fcInfinity, Negative);
}
+
/// getNaN - Factory for QNaN values.
///
/// \param Negative - True iff the NaN generated should be negative.
@@ -201,6 +202,26 @@ namespace llvm {
return APFloat(Sem, fcNaN, Negative, type);
}
+ /// getLargest - Returns the largest finite number in the given
+ /// semantics.
+ ///
+ /// \param Negative - True iff the number should be negative
+ static APFloat getLargest(const fltSemantics &Sem, bool Negative = false);
+
+ /// getSmallest - Returns the smallest (by magnitude) finite number
+ /// in the given semantics. Might be denormalized, which implies a
+ /// relative loss of precision.
+ ///
+ /// \param Negative - True iff the number should be negative
+ static APFloat getSmallest(const fltSemantics &Sem, bool Negative = false);
+
+ /// getSmallestNormalized - Returns the smallest (by magnitude)
+ /// normalized finite number in the given semantics.
+ ///
+ /// \param Negative - True iff the number should be negative
+ static APFloat getSmallestNormalized(const fltSemantics &Sem,
+ bool Negative = false);
+
/// Profile - Used to insert APFloat objects, or objects that contain
/// APFloat objects, into FoldingSets.
void Profile(FoldingSetNodeID& NID) const;
@@ -277,6 +298,30 @@ namespace llvm {
/* Return an arbitrary integer value usable for hashing. */
uint32_t getHashValue() const;
+ /// Converts this value into a decimal string.
+ ///
+ /// \param FormatPrecision The maximum number of digits of
+ /// precision to output. If there are fewer digits available,
+ /// zero padding will not be used unless the value is
+ /// integral and small enough to be expressed in
+ /// FormatPrecision digits. 0 means to use the natural
+ /// precision of the number.
+ /// \param FormatMaxPadding The maximum number of zeros to
+ /// consider inserting before falling back to scientific
+ /// notation. 0 means to always use scientific notation.
+ ///
+ /// Number Precision MaxPadding Result
+ /// ------ --------- ---------- ------
+ /// 1.01E+4 5 2 10100
+ /// 1.01E+4 4 2 1.01E+4
+ /// 1.01E+4 5 1 1.01E+4
+ /// 1.01E-2 5 2 0.0101
+ /// 1.01E-2 4 2 0.0101
+ /// 1.01E-2 4 1 1.01E-2
+ void toString(SmallVectorImpl<char> &Str,
+ unsigned FormatPrecision = 0,
+ unsigned FormatMaxPadding = 3);
+
private:
/* Trivial queries. */
Modified: vendor/llvm/dist/include/llvm/ADT/DenseMap.h
==============================================================================
--- vendor/llvm/dist/include/llvm/ADT/DenseMap.h Fri Jan 1 03:58:21 2010 (r201359)
+++ vendor/llvm/dist/include/llvm/ADT/DenseMap.h Fri Jan 1 10:31:22 2010 (r201360)
@@ -46,7 +46,7 @@ public:
typedef ValueT mapped_type;
typedef BucketT value_type;
- DenseMap(const DenseMap& other) {
+ DenseMap(const DenseMap &other) {
NumBuckets = 0;
CopyFrom(other);
}
@@ -55,6 +55,12 @@ public:
init(NumInitBuckets);
}
+ template<typename InputIt>
+ DenseMap(const InputIt &I, const InputIt &E) {
+ init(64);
+ insert(I, E);
+ }
+
~DenseMap() {
const KeyT EmptyKey = getEmptyKey(), TombstoneKey = getTombstoneKey();
for (BucketT *P = Buckets, *E = Buckets+NumBuckets; P != E; ++P) {
Modified: vendor/llvm/dist/include/llvm/ADT/SCCIterator.h
==============================================================================
--- vendor/llvm/dist/include/llvm/ADT/SCCIterator.h Fri Jan 1 03:58:21 2010 (r201359)
+++ vendor/llvm/dist/include/llvm/ADT/SCCIterator.h Fri Jan 1 10:31:22 2010 (r201360)
@@ -72,7 +72,7 @@ class scc_iterator
SCCNodeStack.push_back(N);
MinVisitNumStack.push_back(visitNum);
VisitStack.push_back(std::make_pair(N, GT::child_begin(N)));
- //errs() << "TarjanSCC: Node " << N <<
+ //dbgs() << "TarjanSCC: Node " << N <<
// " : visitNum = " << visitNum << "\n";
}
@@ -107,7 +107,7 @@ class scc_iterator
if (!MinVisitNumStack.empty() && MinVisitNumStack.back() > minVisitNum)
MinVisitNumStack.back() = minVisitNum;
- //errs() << "TarjanSCC: Popped node " << visitingN <<
+ //dbgs() << "TarjanSCC: Popped node " << visitingN <<
// " : minVisitNum = " << minVisitNum << "; Node visit num = " <<
// nodeVisitNumbers[visitingN] << "\n";
Modified: vendor/llvm/dist/include/llvm/ADT/SmallVector.h
==============================================================================
--- vendor/llvm/dist/include/llvm/ADT/SmallVector.h Fri Jan 1 03:58:21 2010 (r201359)
+++ vendor/llvm/dist/include/llvm/ADT/SmallVector.h Fri Jan 1 10:31:22 2010 (r201360)
@@ -80,55 +80,56 @@ protected:
return BeginX == static_cast<const void*>(&FirstEl);
}
+ /// size_in_bytes - This returns size()*sizeof(T).
+ size_t size_in_bytes() const {
+ return size_t((char*)EndX - (char*)BeginX);
+ }
+
+ /// capacity_in_bytes - This returns capacity()*sizeof(T).
+ size_t capacity_in_bytes() const {
+ return size_t((char*)CapacityX - (char*)BeginX);
+ }
+
+ /// grow_pod - This is an implementation of the grow() method which only works
+ /// on POD-like datatypes and is out of line to reduce code duplication.
+ void grow_pod(size_t MinSizeInBytes, size_t TSize);
public:
bool empty() const { return BeginX == EndX; }
};
-/// SmallVectorImpl - This class consists of common code factored out of the
-/// SmallVector class to reduce code duplication based on the SmallVector 'N'
-/// template parameter.
+
template <typename T>
-class SmallVectorImpl : public SmallVectorBase {
- void setEnd(T *P) { EndX = P; }
+class SmallVectorTemplateCommon : public SmallVectorBase {
+protected:
+ void setEnd(T *P) { this->EndX = P; }
public:
- // Default ctor - Initialize to empty.
- explicit SmallVectorImpl(unsigned N) : SmallVectorBase(N*sizeof(T)) {
- }
-
- ~SmallVectorImpl() {
- // Destroy the constructed elements in the vector.
- destroy_range(begin(), end());
-
- // If this wasn't grown from the inline copy, deallocate the old space.
- if (!isSmall())
- operator delete(begin());
- }
-
+ SmallVectorTemplateCommon(size_t Size) : SmallVectorBase(Size) {}
+
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef T value_type;
typedef T *iterator;
typedef const T *const_iterator;
-
+
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
typedef std::reverse_iterator<iterator> reverse_iterator;
-
+
typedef T &reference;
typedef const T &const_reference;
typedef T *pointer;
typedef const T *const_pointer;
-
+
// forward iterator creation methods.
- iterator begin() { return (iterator)BeginX; }
- const_iterator begin() const { return (const_iterator)BeginX; }
- iterator end() { return (iterator)EndX; }
- const_iterator end() const { return (const_iterator)EndX; }
-private:
- iterator capacity_ptr() { return (iterator)CapacityX; }
- const_iterator capacity_ptr() const { return (const_iterator)CapacityX; }
+ iterator begin() { return (iterator)this->BeginX; }
+ const_iterator begin() const { return (const_iterator)this->BeginX; }
+ iterator end() { return (iterator)this->EndX; }
+ const_iterator end() const { return (const_iterator)this->EndX; }
+protected:
+ iterator capacity_ptr() { return (iterator)this->CapacityX; }
+ const_iterator capacity_ptr() const { return (const_iterator)this->CapacityX;}
public:
-
+
// reverse iterator creation methods.
reverse_iterator rbegin() { return reverse_iterator(end()); }
const_reverse_iterator rbegin() const{ return const_reverse_iterator(end()); }
@@ -169,248 +170,359 @@ public:
const_reference back() const {
return end()[-1];
}
+};
+
+/// SmallVectorTemplateBase<isPodLike = false> - This is where we put method
+/// implementations that are designed to work with non-POD-like T's.
+template <typename T, bool isPodLike>
+class SmallVectorTemplateBase : public SmallVectorTemplateCommon<T> {
+public:
+ SmallVectorTemplateBase(size_t Size) : SmallVectorTemplateCommon<T>(Size) {}
- void push_back(const_reference Elt) {
- if (EndX < CapacityX) {
- Retry:
- new (end()) T(Elt);
- setEnd(end()+1);
- return;
+ static void destroy_range(T *S, T *E) {
+ while (S != E) {
+ --E;
+ E->~T();
}
- grow();
- goto Retry;
}
-
- void pop_back() {
- setEnd(end()-1);
- end()->~T();
+
+ /// uninitialized_copy - Copy the range [I, E) onto the uninitialized memory
+ /// starting with "Dest", constructing elements into it as needed.
+ template<typename It1, typename It2>
+ static void uninitialized_copy(It1 I, It1 E, It2 Dest) {
+ std::uninitialized_copy(I, E, Dest);
}
+
+ /// grow - double the size of the allocated memory, guaranteeing space for at
+ /// least one more element or MinSize if specified.
+ void grow(size_t MinSize = 0);
+};
- T pop_back_val() {
- T Result = back();
- pop_back();
- return Result;
+// Define this out-of-line to dissuade the C++ compiler from inlining it.
+template <typename T, bool isPodLike>
+void SmallVectorTemplateBase<T, isPodLike>::grow(size_t MinSize) {
+ size_t CurCapacity = this->capacity();
+ size_t CurSize = this->size();
+ size_t NewCapacity = 2*CurCapacity;
+ if (NewCapacity < MinSize)
+ NewCapacity = MinSize;
+ T *NewElts = static_cast<T*>(operator new(NewCapacity*sizeof(T)));
+
+ // Copy the elements over.
+ this->uninitialized_copy(this->begin(), this->end(), NewElts);
+
+ // Destroy the original elements.
+ destroy_range(this->begin(), this->end());
+
+ // If this wasn't grown from the inline copy, deallocate the old space.
+ if (!this->isSmall())
+ operator delete(this->begin());
+
+ this->setEnd(NewElts+CurSize);
+ this->BeginX = NewElts;
+ this->CapacityX = this->begin()+NewCapacity;
+}
+
+
+/// SmallVectorTemplateBase<isPodLike = true> - This is where we put method
+/// implementations that are designed to work with POD-like T's.
+template <typename T>
+class SmallVectorTemplateBase<T, true> : public SmallVectorTemplateCommon<T> {
+public:
+ SmallVectorTemplateBase(size_t Size) : SmallVectorTemplateCommon<T>(Size) {}
+
+ // No need to do a destroy loop for POD's.
+ static void destroy_range(T *, T *) {}
+
+ /// uninitialized_copy - Copy the range [I, E) onto the uninitialized memory
+ /// starting with "Dest", constructing elements into it as needed.
+ template<typename It1, typename It2>
+ static void uninitialized_copy(It1 I, It1 E, It2 Dest) {
+ // Use memcpy for PODs: std::uninitialized_copy optimizes to memmove, memcpy
+ // is better.
+ memcpy(&*Dest, &*I, (E-I)*sizeof(T));
}
-
+
+ /// grow - double the size of the allocated memory, guaranteeing space for at
+ /// least one more element or MinSize if specified.
+ void grow(size_t MinSize = 0) {
+ this->grow_pod(MinSize*sizeof(T), sizeof(T));
+ }
+};
+
+
+/// SmallVectorImpl - This class consists of common code factored out of the
+/// SmallVector class to reduce code duplication based on the SmallVector 'N'
+/// template parameter.
+template <typename T>
+class SmallVectorImpl : public SmallVectorTemplateBase<T, isPodLike<T>::value> {
+ typedef SmallVectorTemplateBase<T, isPodLike<T>::value > SuperClass;
+public:
+ typedef typename SuperClass::iterator iterator;
+ typedef typename SuperClass::size_type size_type;
+
+ // Default ctor - Initialize to empty.
+ explicit SmallVectorImpl(unsigned N)
+ : SmallVectorTemplateBase<T, isPodLike<T>::value>(N*sizeof(T)) {
+ }
+
+ ~SmallVectorImpl() {
+ // Destroy the constructed elements in the vector.
+ this->destroy_range(this->begin(), this->end());
+
+ // If this wasn't grown from the inline copy, deallocate the old space.
+ if (!this->isSmall())
+ operator delete(this->begin());
+ }
+
+
void clear() {
- destroy_range(begin(), end());
- EndX = BeginX;
+ this->destroy_range(this->begin(), this->end());
+ this->EndX = this->BeginX;
}
void resize(unsigned N) {
- if (N < size()) {
- destroy_range(begin()+N, end());
- setEnd(begin()+N);
- } else if (N > size()) {
- if (capacity() < N)
- grow(N);
- construct_range(end(), begin()+N, T());
- setEnd(begin()+N);
+ if (N < this->size()) {
+ this->destroy_range(this->begin()+N, this->end());
+ this->setEnd(this->begin()+N);
+ } else if (N > this->size()) {
+ if (this->capacity() < N)
+ this->grow(N);
+ this->construct_range(this->end(), this->begin()+N, T());
+ this->setEnd(this->begin()+N);
}
}
void resize(unsigned N, const T &NV) {
- if (N < size()) {
- destroy_range(begin()+N, end());
- setEnd(begin()+N);
- } else if (N > size()) {
- if (capacity() < N)
- grow(N);
- construct_range(end(), begin()+N, NV);
- setEnd(begin()+N);
+ if (N < this->size()) {
+ this->destroy_range(this->begin()+N, this->end());
+ this->setEnd(this->begin()+N);
+ } else if (N > this->size()) {
+ if (this->capacity() < N)
+ this->grow(N);
+ construct_range(this->end(), this->begin()+N, NV);
+ this->setEnd(this->begin()+N);
}
}
void reserve(unsigned N) {
- if (capacity() < N)
- grow(N);
+ if (this->capacity() < N)
+ this->grow(N);
}
-
+
+ void push_back(const T &Elt) {
+ if (this->EndX < this->CapacityX) {
+ Retry:
+ new (this->end()) T(Elt);
+ this->setEnd(this->end()+1);
+ return;
+ }
+ this->grow();
+ goto Retry;
+ }
+
+ void pop_back() {
+ this->setEnd(this->end()-1);
+ this->end()->~T();
+ }
+
+ T pop_back_val() {
+ T Result = this->back();
+ pop_back();
+ return Result;
+ }
+
+
void swap(SmallVectorImpl &RHS);
-
+
/// append - Add the specified range to the end of the SmallVector.
///
template<typename in_iter>
void append(in_iter in_start, in_iter in_end) {
size_type NumInputs = std::distance(in_start, in_end);
// Grow allocated space if needed.
- if (NumInputs > size_type(capacity_ptr()-end()))
- grow(size()+NumInputs);
-
+ if (NumInputs > size_type(this->capacity_ptr()-this->end()))
+ this->grow(this->size()+NumInputs);
+
// Copy the new elements over.
- std::uninitialized_copy(in_start, in_end, end());
- setEnd(end() + NumInputs);
+ // TODO: NEED To compile time dispatch on whether in_iter is a random access
+ // iterator to use the fast uninitialized_copy.
+ std::uninitialized_copy(in_start, in_end, this->end());
+ this->setEnd(this->end() + NumInputs);
}
-
+
/// append - Add the specified range to the end of the SmallVector.
///
void append(size_type NumInputs, const T &Elt) {
// Grow allocated space if needed.
- if (NumInputs > size_type(capacity_ptr()-end()))
- grow(size()+NumInputs);
-
+ if (NumInputs > size_type(this->capacity_ptr()-this->end()))
+ this->grow(this->size()+NumInputs);
+
// Copy the new elements over.
- std::uninitialized_fill_n(end(), NumInputs, Elt);
- setEnd(end() + NumInputs);
+ std::uninitialized_fill_n(this->end(), NumInputs, Elt);
+ this->setEnd(this->end() + NumInputs);
}
-
+
void assign(unsigned NumElts, const T &Elt) {
clear();
- if (capacity() < NumElts)
- grow(NumElts);
- setEnd(begin()+NumElts);
- construct_range(begin(), end(), Elt);
+ if (this->capacity() < NumElts)
+ this->grow(NumElts);
+ this->setEnd(this->begin()+NumElts);
+ construct_range(this->begin(), this->end(), Elt);
}
-
+
iterator erase(iterator I) {
iterator N = I;
// Shift all elts down one.
- std::copy(I+1, end(), I);
+ std::copy(I+1, this->end(), I);
// Drop the last elt.
pop_back();
return(N);
}
-
+
iterator erase(iterator S, iterator E) {
iterator N = S;
// Shift all elts down.
- iterator I = std::copy(E, end(), S);
+ iterator I = std::copy(E, this->end(), S);
// Drop the last elts.
- destroy_range(I, end());
- setEnd(I);
+ this->destroy_range(I, this->end());
+ this->setEnd(I);
return(N);
}
-
+
iterator insert(iterator I, const T &Elt) {
- if (I == end()) { // Important special case for empty vector.
+ if (I == this->end()) { // Important special case for empty vector.
push_back(Elt);
- return end()-1;
+ return this->end()-1;
}
-
- if (EndX < CapacityX) {
- Retry:
- new (end()) T(back());
- setEnd(end()+1);
+
+ if (this->EndX < this->CapacityX) {
+ Retry:
+ new (this->end()) T(this->back());
+ this->setEnd(this->end()+1);
// Push everything else over.
- std::copy_backward(I, end()-1, end());
+ std::copy_backward(I, this->end()-1, this->end());
*I = Elt;
return I;
}
- size_t EltNo = I-begin();
- grow();
- I = begin()+EltNo;
+ size_t EltNo = I-this->begin();
+ this->grow();
+ I = this->begin()+EltNo;
goto Retry;
}
-
+
iterator insert(iterator I, size_type NumToInsert, const T &Elt) {
- if (I == end()) { // Important special case for empty vector.
+ if (I == this->end()) { // Important special case for empty vector.
append(NumToInsert, Elt);
- return end()-1;
+ return this->end()-1;
}
-
+
// Convert iterator to elt# to avoid invalidating iterator when we reserve()
- size_t InsertElt = I-begin();
-
+ size_t InsertElt = I - this->begin();
+
// Ensure there is enough space.
- reserve(static_cast<unsigned>(size() + NumToInsert));
-
+ reserve(static_cast<unsigned>(this->size() + NumToInsert));
+
// Uninvalidate the iterator.
- I = begin()+InsertElt;
-
+ I = this->begin()+InsertElt;
+
// If there are more elements between the insertion point and the end of the
// range than there are being inserted, we can use a simple approach to
// insertion. Since we already reserved space, we know that this won't
// reallocate the vector.
- if (size_t(end()-I) >= NumToInsert) {
- T *OldEnd = end();
- append(end()-NumToInsert, end());
-
+ if (size_t(this->end()-I) >= NumToInsert) {
+ T *OldEnd = this->end();
+ append(this->end()-NumToInsert, this->end());
+
// Copy the existing elements that get replaced.
std::copy_backward(I, OldEnd-NumToInsert, OldEnd);
-
+
std::fill_n(I, NumToInsert, Elt);
return I;
}
-
+
// Otherwise, we're inserting more elements than exist already, and we're
// not inserting at the end.
-
+
// Copy over the elements that we're about to overwrite.
- T *OldEnd = end();
- setEnd(end() + NumToInsert);
+ T *OldEnd = this->end();
+ this->setEnd(this->end() + NumToInsert);
size_t NumOverwritten = OldEnd-I;
- std::uninitialized_copy(I, OldEnd, end()-NumOverwritten);
-
+ this->uninitialized_copy(I, OldEnd, this->end()-NumOverwritten);
+
// Replace the overwritten part.
std::fill_n(I, NumOverwritten, Elt);
-
+
// Insert the non-overwritten middle part.
std::uninitialized_fill_n(OldEnd, NumToInsert-NumOverwritten, Elt);
return I;
}
-
+
template<typename ItTy>
iterator insert(iterator I, ItTy From, ItTy To) {
- if (I == end()) { // Important special case for empty vector.
+ if (I == this->end()) { // Important special case for empty vector.
append(From, To);
- return end()-1;
+ return this->end()-1;
}
-
+
size_t NumToInsert = std::distance(From, To);
// Convert iterator to elt# to avoid invalidating iterator when we reserve()
- size_t InsertElt = I-begin();
-
+ size_t InsertElt = I - this->begin();
+
// Ensure there is enough space.
- reserve(static_cast<unsigned>(size() + NumToInsert));
-
+ reserve(static_cast<unsigned>(this->size() + NumToInsert));
+
// Uninvalidate the iterator.
- I = begin()+InsertElt;
-
+ I = this->begin()+InsertElt;
+
// If there are more elements between the insertion point and the end of the
// range than there are being inserted, we can use a simple approach to
// insertion. Since we already reserved space, we know that this won't
// reallocate the vector.
- if (size_t(end()-I) >= NumToInsert) {
- T *OldEnd = end();
- append(end()-NumToInsert, end());
-
+ if (size_t(this->end()-I) >= NumToInsert) {
+ T *OldEnd = this->end();
+ append(this->end()-NumToInsert, this->end());
+
// Copy the existing elements that get replaced.
std::copy_backward(I, OldEnd-NumToInsert, OldEnd);
-
+
std::copy(From, To, I);
return I;
}
-
+
// Otherwise, we're inserting more elements than exist already, and we're
// not inserting at the end.
-
+
// Copy over the elements that we're about to overwrite.
- T *OldEnd = end();
- setEnd(end() + NumToInsert);
+ T *OldEnd = this->end();
+ this->setEnd(this->end() + NumToInsert);
size_t NumOverwritten = OldEnd-I;
- std::uninitialized_copy(I, OldEnd, end()-NumOverwritten);
-
+ this->uninitialized_copy(I, OldEnd, this->end()-NumOverwritten);
+
// Replace the overwritten part.
std::copy(From, From+NumOverwritten, I);
-
+
// Insert the non-overwritten middle part.
- std::uninitialized_copy(From+NumOverwritten, To, OldEnd);
+ this->uninitialized_copy(From+NumOverwritten, To, OldEnd);
return I;
}
-
- const SmallVectorImpl &operator=(const SmallVectorImpl &RHS);
-
+
+ const SmallVectorImpl
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-all
mailing list