Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updating branches/google/stable to r243773

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/google/stable@244149 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information...
commit 99e9f85ef4f39d64e7c91dd090f847840605c5bc 2 parents cb3f5d3 + 48db91b
@vonosmas vonosmas authored
Showing with 12,323 additions and 5,322 deletions.
  1. +1 −1  .gitignore
  2. +3 −3 CMakeLists.txt
  3. +4 −0 CODE_OWNERS.TXT
  4. +2 −1  CREDITS.TXT
  5. +1 −12 Makefile.config.in
  6. +3 −0  autoconf/config.guess
  7. +14 −14 autoconf/configure.ac
  8. +9 −4 bindings/go/llvm/DIBuilderBindings.cpp
  9. +8 −3 bindings/go/llvm/ir.go
  10. +2 −0  bindings/go/llvm/ir_test.go
  11. +2 −0  bindings/ocaml/Makefile.ocaml
  12. +5 −5 bindings/ocaml/executionengine/llvm_executionengine.ml
  13. +0 −11 bindings/python/llvm/object.py
  14. +7 −5 cmake/config-ix.cmake
  15. +89 −48 cmake/modules/AddLLVM.cmake
  16. +36 −6 cmake/modules/CheckAtomic.cmake
  17. +6 −3 cmake/modules/HandleLLVMOptions.cmake
  18. +0 −80 cmake/modules/LLVMParseArguments.cmake
  19. +34 −9 cmake/modules/Makefile
  20. +101 −29 configure
  21. +83 −0 docs/AMDGPUUsage.rst
  22. +2 −2 docs/AliasAnalysis.rst
  23. +3 −1 docs/BitCodeFormat.rst
  24. +2 −2 docs/CMake.rst
  25. +3 −1 docs/CMakeLists.txt
  26. +2 −2 docs/CodeGenerator.rst
  27. +1 −0  docs/CommandGuide/index.rst
  28. +1 −1  docs/CommandGuide/lit.rst
  29. +44 −124 docs/CommandGuide/lli.rst
  30. +2 −2 docs/CommandGuide/llvm-dwarfdump.rst
  31. +31 −0 docs/CommandGuide/llvm-lib.rst
  32. +1 −0  docs/CommandLine.rst
  33. +1 −1  docs/CoverageMappingFormat.rst
  34. +1 −1  docs/DeveloperPolicy.rst
  35. +6 −6 docs/ExceptionHandling.rst
  36. +74 −1 docs/FaultMaps.rst
  37. +5 −1 docs/GettingStarted.rst
  38. +10 −47 docs/HowToReleaseLLVM.rst
  39. +1,249 −65 docs/LangRef.rst
  40. +1 −1  docs/LibFuzzer.rst
  41. +11 −9 docs/Phabricator.rst
  42. +1 −1  docs/ProgrammersManual.rst
  43. +5 −17 docs/ReleaseNotes.rst
  44. +14 −6 docs/StackMaps.rst
  45. +11 −3 docs/Statepoints.rst
  46. +97 −0 docs/_ocamldoc/style.css
  47. +2 −2 docs/conf.py
  48. +2 −3 docs/tutorial/LangImpl8.rst
  49. +1 −0  docs/yaml2obj.rst
  50. +1 −1  examples/Kaleidoscope/Chapter4/toy.cpp
  51. +1 −1  examples/Kaleidoscope/Chapter5/toy.cpp
  52. +1 −1  examples/Kaleidoscope/Chapter6/toy.cpp
  53. +1 −1  examples/Kaleidoscope/Chapter7/toy.cpp
  54. +3 −4 examples/Kaleidoscope/Chapter8/toy.cpp
  55. +3 −4 examples/Kaleidoscope/Orc/fully_lazy/toy.cpp
  56. +5 −6 examples/Kaleidoscope/Orc/initial/toy.cpp
  57. +6 −7 examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp
  58. +3 −4 examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp
  59. +37 −11 include/llvm-c/Core.h
  60. +0 −1  include/llvm-c/Object.h
  61. +8 −31 include/llvm-c/lto.h
  62. +4 −0 include/llvm/ADT/APFloat.h
  63. +16 −8 include/llvm/ADT/APInt.h
  64. +9 −0 include/llvm/ADT/APSInt.h
  65. +6 −1 include/llvm/ADT/ArrayRef.h
  66. +27 −0 include/llvm/ADT/DenseMapInfo.h
  67. +35 −0 include/llvm/ADT/STLExtras.h
  68. +22 −0 include/llvm/ADT/SetVector.h
  69. +31 −1 include/llvm/ADT/SparseBitVector.h
  70. +21 −2 include/llvm/ADT/Triple.h
  71. +23 −22 include/llvm/ADT/edit_distance.h
  72. +2 −0  include/llvm/ADT/iterator.h
  73. +12 −0 include/llvm/ADT/iterator_range.h
  74. +321 −313 include/llvm/Analysis/AliasAnalysis.h
  75. +26 −20 include/llvm/Analysis/AliasSetTracker.h
  76. +2 −2 include/llvm/Analysis/AssumptionCache.h
  77. +29 −10 include/llvm/Analysis/BlockFrequencyInfo.h
  78. +52 −23 include/llvm/Analysis/BlockFrequencyInfoImpl.h
  79. +31 −17 include/llvm/Analysis/BranchProbabilityInfo.h
  80. +11 −0 include/llvm/Analysis/CFG.h
  81. +3 −1 include/llvm/Analysis/CallGraph.h
  82. +5 −2 include/llvm/Analysis/CaptureTracking.h
  83. +11 −0 include/llvm/Analysis/ConstantFolding.h
  84. +2 −2 include/llvm/Analysis/DominanceFrontier.h
  85. +6 −1 include/llvm/Analysis/IVUsers.h
  86. +19 −1 include/llvm/Analysis/InstructionSimplify.h
  87. +0 −71 include/llvm/Analysis/JumpInstrTableInfo.h
  88. +1 −1  include/llvm/Analysis/LazyCallGraph.h
  89. +8 −9 include/llvm/Analysis/LazyValueInfo.h
  90. +8 −8 include/llvm/Analysis/LibCallAliasAnalysis.h
  91. +17 −6 include/llvm/Analysis/LibCallSemantics.h
  92. +171 −70 include/llvm/Analysis/LoopAccessAnalysis.h
  93. +4 −7 include/llvm/Analysis/LoopInfo.h
  94. +3 −3 include/llvm/Analysis/LoopInfoImpl.h
  95. +7 −9 include/llvm/Analysis/MemoryDependenceAnalysis.h
  96. +5 −0 include/llvm/Analysis/MemoryLocation.h
  97. +66 −0 include/llvm/Analysis/OrderedBasicBlock.h
  98. +3 −3 include/llvm/Analysis/RegionInfo.h
  99. +120 −5 include/llvm/Analysis/ScalarEvolution.h
  100. +0 −78 include/llvm/Analysis/ScalarEvolutionExpressions.h
  101. +3 −3 include/llvm/Analysis/TargetLibraryInfo.h
  102. +31 −6 include/llvm/Analysis/TargetTransformInfo.h
  103. +75 −41 include/llvm/Analysis/TargetTransformInfoImpl.h
  104. +50 −3 include/llvm/Analysis/ValueTracking.h
  105. +84 −0 include/llvm/Analysis/VectorUtils.h
  106. +42 −21 include/llvm/AsmParser/Parser.h
  107. +34 −0 include/llvm/AsmParser/SlotMapping.h
  108. +5 −10 include/llvm/Bitcode/BitstreamWriter.h
  109. +12 −1 include/llvm/Bitcode/LLVMBitCodes.h
  110. +9 −13 include/llvm/Bitcode/ReaderWriter.h
  111. +1 −1  include/llvm/CodeGen/Analysis.h
  112. +20 −8 include/llvm/CodeGen/AsmPrinter.h
  113. +22 −38 include/llvm/CodeGen/BasicTTIImpl.h
  114. +21 −1 include/llvm/CodeGen/CommandFlags.h
  115. +1 −1  include/llvm/CodeGen/DFAPacketizer.h
  116. +211 −35 include/llvm/CodeGen/DIE.h
  117. +14 −7 include/llvm/CodeGen/FastISel.h
  118. +149 −2 include/llvm/CodeGen/FaultMaps.h
  119. +18 −5 include/llvm/CodeGen/ISDOpcodes.h
  120. +8 −7 include/llvm/CodeGen/LiveIntervalAnalysis.h
  121. +5 −0 include/llvm/CodeGen/LiveIntervalUnion.h
  122. +9 −13 include/llvm/CodeGen/LivePhysRegs.h
  123. +3 −2 include/llvm/CodeGen/LiveRegMatrix.h
  124. +394 −0 include/llvm/CodeGen/MIRYamlMapping.h
  125. +20 −2 include/llvm/CodeGen/MachineBasicBlock.h
  126. +5 −4 include/llvm/CodeGen/MachineConstantPool.h
  127. +17 −2 include/llvm/CodeGen/MachineDominators.h
  128. +112 −143 include/llvm/CodeGen/MachineFrameInfo.h
  129. +6 −0 include/llvm/CodeGen/MachineFunction.h
  130. +8 −0 include/llvm/CodeGen/MachineInstr.h
  131. +23 −36 include/llvm/CodeGen/MachineInstrBuilder.h
  132. +2 −7 include/llvm/CodeGen/MachineLoopInfo.h
  133. +11 −1 include/llvm/CodeGen/MachineMemOperand.h
  134. +5 −2 include/llvm/CodeGen/MachineModuleInfo.h
  135. +15 −7 include/llvm/CodeGen/MachineOperand.h
  136. +3 −4 include/llvm/CodeGen/MachineRegionInfo.h
  137. +11 −56 include/llvm/CodeGen/MachineRegisterInfo.h
  138. +1 −1  include/llvm/CodeGen/MachineScheduler.h
  139. +25 −12 include/llvm/CodeGen/Passes.h
  140. +1 −2  include/llvm/CodeGen/PseudoSourceValue.h
  141. +2 −0  include/llvm/CodeGen/RegisterPressure.h
  142. +1 −1  include/llvm/CodeGen/ScheduleDAG.h
  143. +0 −6 include/llvm/CodeGen/SchedulerRegistry.h
  144. +16 −5 include/llvm/CodeGen/SelectionDAG.h
  145. +47 −10 include/llvm/CodeGen/SelectionDAGNodes.h
  146. +27 −31 include/llvm/CodeGen/StackMaps.h
  147. +6 −11 include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
  148. +6 −0 include/llvm/CodeGen/TargetSchedule.h
  149. +2 −2 include/llvm/CodeGen/WinEHFuncInfo.h
  150. +96 −5 include/llvm/Config/config.h.cmake
  151. +6 −3 include/llvm/Config/config.h.in
  152. +4 −4 include/llvm/Config/llvm-config.h.cmake
  153. +3 −3 include/llvm/Config/llvm-config.h.in
  154. +6 −5 include/llvm/DebugInfo/DIContext.h
  155. +24 −9 include/llvm/ExecutionEngine/ExecutionEngine.h
  156. +1 −2  include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
  157. +1 −1  include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h
  158. +36 −0 include/llvm/ExecutionEngine/Orc/NullResolver.h
  159. +112 −0 include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h
  160. +17 −10 include/llvm/ExecutionEngine/RuntimeDyld.h
  161. +2 −0  include/llvm/IR/Attributes.h
  162. +5 −0 include/llvm/IR/BasicBlock.h
  163. +34 −2 include/llvm/IR/CallSite.h
  164. +3 −0  include/llvm/IR/CallingConv.h
  165. +9 −20 include/llvm/IR/Constant.h
  166. +54 −23 include/llvm/IR/Constants.h
  167. +357 −321 include/llvm/IR/DIBuilder.h
  168. +3 −1 include/llvm/IR/DataLayout.h
  169. +0 −3  include/llvm/IR/DebugInfo.h
  170. +1 −0  include/llvm/IR/DebugInfoFlags.def
  171. +134 −115 include/llvm/IR/DebugInfoMetadata.h
  172. +2 −1  include/llvm/IR/DerivedTypes.h
  173. +1 −1  include/llvm/IR/DiagnosticPrinter.h
  174. +36 −12 include/llvm/IR/Dominators.h
  175. +28 −1 include/llvm/IR/Function.h
  176. +1 −1  include/llvm/IR/GetElementPtrTypeIterator.h
  177. +13 −7 include/llvm/IR/GlobalValue.h
  178. +0 −5 include/llvm/IR/GlobalVariable.h
  179. +87 −56 include/llvm/IR/IRBuilder.h
  180. +6 −0 include/llvm/IR/IRPrintingPasses.h
  181. +2 −1  include/llvm/IR/InlineAsm.h
  182. +6 −0 include/llvm/IR/InstVisitor.h
  183. +21 −1 include/llvm/IR/InstrTypes.h
  184. +74 −68 include/llvm/IR/Instruction.def
  185. +18 −2 include/llvm/IR/Instruction.h
  186. +713 −62 include/llvm/IR/Instructions.h
  187. +5 −0 include/llvm/IR/Intrinsics.h
  188. +23 −5 include/llvm/IR/Intrinsics.td
  189. +3 −0  include/llvm/IR/IntrinsicsAArch64.td
  190. +1 −1  include/llvm/IR/{IntrinsicsR600.td → IntrinsicsAMDGPU.td}
  191. +0 −2  include/llvm/IR/IntrinsicsARM.td
  192. +41 −0 include/llvm/IR/IntrinsicsPowerPC.td
  193. +16 −0 include/llvm/IR/IntrinsicsWebAssembly.td
  194. +2,496 −253 include/llvm/IR/IntrinsicsX86.td
  195. +8 −21 include/llvm/IR/Mangler.h
  196. +1 −2  include/llvm/IR/Metadata.def
  197. +12 −0 include/llvm/IR/Metadata.h
  198. +1 −1  include/llvm/IR/Module.h
  199. +76 −0 include/llvm/IR/ModuleSlotTracker.h
  200. +2 −1  include/llvm/IR/Operator.h
  201. +126 −66 include/llvm/IR/Statepoint.h
  202. +19 −0 include/llvm/IR/User.h
  203. +90 −0 include/llvm/IR/Value.def
  204. +36 −46 include/llvm/IR/Value.h
  205. +7 −5 include/llvm/IR/ValueHandle.h
  206. +4 −2 include/llvm/InitializePasses.h
  207. +8 −23 include/llvm/LTO/LTOModule.h
  208. +3 −1 include/llvm/LibDriver/LibDriver.h
  209. +1 −0  include/llvm/LinkAllPasses.h
  210. +96 −141 include/llvm/MC/MCAssembler.h
  211. +5 −4 include/llvm/MC/MCContext.h
  212. +18 −9 include/llvm/MC/MCDwarf.h
  213. +1 −1  include/llvm/MC/MCELFStreamer.h
  214. +2 −0  include/llvm/MC/MCFixedLenDisassembler.h
  215. +3 −2 include/llvm/MC/MCInstrDesc.h
  216. +1 −1  include/llvm/MC/MCLinkerOptimizationHint.h
  217. +7 −3 include/llvm/MC/MCObjectFileInfo.h
  218. +11 −0 include/llvm/MC/MCParser/MCAsmParser.h
  219. +33 −0 include/llvm/MC/MCParser/MCAsmParserUtils.h
  220. +6 −19 include/llvm/MC/MCSchedule.h
  221. +12 −0 include/llvm/MC/MCSection.h
  222. +6 −1 include/llvm/MC/MCStreamer.h
  223. +25 −18 include/llvm/MC/MCSubtargetInfo.h
  224. +92 −41 include/llvm/MC/MCSymbol.h
  225. +0 −3  include/llvm/MC/MCSymbolELF.h
  226. +1 −1  include/llvm/MC/MCSymbolMachO.h
  227. +2 −2 include/llvm/MC/MCTargetAsmParser.h
  228. +3 −1 include/llvm/MC/MCTargetOptions.h
  229. +8 −0 include/llvm/MC/MCTargetOptionsCommandFlags.h
  230. +1 −1  include/llvm/MC/SubtargetFeature.h
  231. +11 −3 include/llvm/Object/Archive.h
  232. +3 −6 include/llvm/Object/ArchiveWriter.h
  233. +56 −19 include/llvm/Object/COFF.h
  234. +182 −468 include/llvm/Object/ELF.h
  235. +331 −346 include/llvm/Object/ELFObjectFile.h
  236. +69 −74 include/llvm/Object/ELFTypes.h
  237. +15 −1 include/llvm/Object/ELFYAML.h
  238. +2 −0  include/llvm/Object/Error.h
  239. +17 −20 include/llvm/Object/MachO.h
  240. +1 −1  include/llvm/Object/MachOUniversal.h
  241. +59 −90 include/llvm/Object/ObjectFile.h
  242. +36 −67 include/llvm/Object/RelocVisitor.h
  243. +442 −0 include/llvm/Object/StackMapParser.h
  244. +23 −0 include/llvm/Object/SymbolSize.h
  245. +7 −2 include/llvm/Object/SymbolicFile.h
  246. +2 −3 include/llvm/Option/Arg.h
  247. +39 −15 include/llvm/Option/ArgList.h
  248. +4 −8 include/llvm/Option/OptTable.h
  249. +36 −39 include/llvm/PassAnalysisSupport.h
  250. +1 −1  include/llvm/ProfileData/CoverageMapping.h
  251. +1 −1  include/llvm/ProfileData/CoverageMappingReader.h
  252. +13 −0 include/llvm/ProfileData/InstrProf.h
  253. +10 −40 include/llvm/ProfileData/InstrProfReader.h
  254. +14 −1 include/llvm/Support/AlignOf.h
  255. +3 −0  include/llvm/Support/COFF.h
  256. +14 −14 include/llvm/Support/CommandLine.h
  257. +0 −13 include/llvm/Support/Compiler.h
  258. +3 −3 include/llvm/Support/DataStream.h
  259. +5 −0 include/llvm/Support/Dwarf.h
  260. +6 −4 include/llvm/Support/ELF.h
  261. +2 −2 include/llvm/Support/ELFRelocs/Sparc.def
  262. +1 −1  include/llvm/Support/GraphWriter.h
  263. +1 −1  include/llvm/Support/MemoryBuffer.h
  264. +11 −5 include/llvm/Support/OnDiskHashTable.h
  265. +0 −2  include/llvm/Support/Path.h
  266. +3 −0  include/llvm/Support/Signals.h
  267. +1 −1  include/llvm/Support/StreamingMemoryObject.h
  268. +38 −16 include/llvm/Support/TargetParser.h
  269. +23 −21 include/llvm/Support/TargetRegistry.h
  270. +4 −2 include/llvm/Support/raw_ostream.h
  271. +8 −9 include/llvm/TableGen/Record.h
  272. +27 −2 include/llvm/Target/Target.td
  273. +10 −7 include/llvm/Target/TargetFrameLowering.h
  274. +17 −11 include/llvm/Target/TargetInstrInfo.h
  275. +92 −49 include/llvm/Target/TargetLowering.h
  276. +9 −13 include/llvm/Target/TargetLoweringObjectFile.h
  277. +27 −10 include/llvm/Target/TargetMachine.h
  278. +4 −4 include/llvm/Target/TargetOpcodes.h
  279. +5 −7 include/llvm/Target/TargetOptions.h
  280. +31 −6 include/llvm/Target/TargetRegisterInfo.h
  281. +18 −0 include/llvm/Target/TargetSelectionDAG.td
  282. +1 −8 include/llvm/Target/TargetSelectionDAGInfo.h
  283. +15 −1 include/llvm/Target/TargetSubtargetInfo.h
  284. +6 −0 include/llvm/Transforms/IPO.h
  285. +3 −0  include/llvm/Transforms/IPO/LowerBitSets.h
  286. +6 −0 include/llvm/Transforms/IPO/PassManagerBuilder.h
  287. +2 −2 include/llvm/Transforms/Instrumentation.h
  288. +15 −31 include/llvm/Transforms/Utils/BasicBlockUtils.h
  289. +16 −0 include/llvm/Transforms/Utils/Cloning.h
  290. +81 −74 include/llvm/Transforms/Utils/LoopUtils.h
  291. +104 −0 include/llvm/Transforms/Utils/LoopVersioning.h
  292. +3 −1 include/llvm/Transforms/Utils/ModuleUtils.h
  293. +0 −205 include/llvm/Transforms/Utils/VectorUtils.h
  294. +4 −0 include/llvm/module.modulemap
  295. +124 −135 lib/Analysis/AliasAnalysis.cpp
  296. +35 −21 lib/Analysis/AliasAnalysisCounter.cpp
  297. +95 −71 lib/Analysis/AliasAnalysisEvaluator.cpp
  298. +8 −16 lib/Analysis/AliasDebugger.cpp
  299. +44 −61 lib/Analysis/AliasSetTracker.cpp
  300. +2 −2 lib/Analysis/Analysis.cpp
Sorry, we could not display the entire diff because too many files (2,643) changed.
View
2  .gitignore
@@ -44,7 +44,7 @@ autoconf/autom4te.cache
#==============================================================================#
# External projects that are tracked independently.
projects/*
-!projects/CMakeLists.txt
+!projects/*.*
!projects/Makefile
# Clang, which is tracked independently.
tools/clang
View
6 CMakeLists.txt
@@ -26,7 +26,7 @@ else()
set(cmake_3_2_USES_TERMINAL USES_TERMINAL)
endif()
-project(LLVM)
+project(LLVM C CXX ASM)
# The following only works with the Ninja generator in CMake >= 3.0.
set(LLVM_PARALLEL_COMPILE_JOBS "" CACHE STRING
@@ -59,7 +59,7 @@ set(CMAKE_MODULE_PATH
)
set(LLVM_VERSION_MAJOR 3)
-set(LLVM_VERSION_MINOR 7)
+set(LLVM_VERSION_MINOR 8)
set(LLVM_VERSION_PATCH 0)
set(LLVM_VERSION_SUFFIX svn)
@@ -530,7 +530,7 @@ endif()
# check its symbols. This is wasteful (the check was done when foo.so
# was created) and can fail since it is not the dynamic linker and
# doesn't know how to handle search paths correctly.
-if (UNIX AND NOT APPLE)
+if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} -Wl,-allow-shlib-undefined")
endif()
View
4 CODE_OWNERS.TXT
@@ -65,6 +65,10 @@ N: Hal Finkel
E: hfinkel@anl.gov
D: BBVectorize, the loop reroller, alias analysis and the PowerPC target
+N: Dan Gohman
+E: sunfish@mozilla.com
+D: WebAssembly Backend (lib/Target/WebAssembly/*)
+
N: Renato Golin
E: renato.golin@linaro.org
D: ARM Linux support
View
3  CREDITS.TXT
@@ -152,8 +152,9 @@ E: foldr@codedgers.com
D: Author of llvmc2
N: Dan Gohman
-E: dan433584@gmail.com
+E: sunfish@mozilla.com
D: Miscellaneous bug fixes
+D: WebAssembly Backend
N: David Goodwin
E: david@goodwinz.net
View
13 Makefile.config.in
@@ -58,20 +58,9 @@ LLVM_OBJ_ROOT := $(call realpath, @abs_top_builddir@)
PROJ_SRC_ROOT := $(LLVM_SRC_ROOT)
PROJ_SRC_DIR := $(LLVM_SRC_ROOT)$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))
-# FIXME: This is temporary during the grace period where in-source builds are
-# deprecated. Convert to a hard error when that period is up.
-#
# See: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150323/268067.html
ifeq ($(LLVM_SRC_ROOT), $(LLVM_OBJ_ROOT))
- $(warning ######################################################################################)
- $(warning # #)
- $(warning # WARNING #)
- $(warning # #)
- $(warning # In-source builds are deprecated. #)
- $(warning # #)
- $(warning # Please configure from a separate build directory! #)
- $(warning # #)
- $(warning ######################################################################################)
+ $(error In-source builds are not allowed. Please configure from a separate build directory!)
endif
ifneq ($(CLANG_SRC_ROOT),)
View
3  autoconf/config.guess
@@ -810,6 +810,9 @@ EOF
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
+ *:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
View
28 autoconf/configure.ac
@@ -32,10 +32,10 @@ dnl===-----------------------------------------------------------------------===
dnl Initialize autoconf and define the package name, version number and
dnl address for reporting bugs.
-AC_INIT([LLVM],[3.7.0svn],[http://llvm.org/bugs/])
+AC_INIT([LLVM],[3.8.0svn],[http://llvm.org/bugs/])
LLVM_VERSION_MAJOR=3
-LLVM_VERSION_MINOR=7
+LLVM_VERSION_MINOR=8
LLVM_VERSION_PATCH=0
LLVM_VERSION_SUFFIX=svn
@@ -75,15 +75,7 @@ fi
dnl Quit if it is an in-source build
if test ${srcdir} == "." ; then
- AC_MSG_WARN([**************************************************************************************])
- AC_MSG_WARN([* *])
- AC_MSG_WARN([* WARNING *])
- AC_MSG_WARN([* *])
- AC_MSG_WARN([* In-source builds are deprecated. *])
- AC_MSG_WARN([* *])
- AC_MSG_WARN([* Please configure from a separate build directory! *])
- AC_MSG_WARN([* *])
- AC_MSG_WARN([**************************************************************************************])
+ AC_MSG_ERROR([In-source builds are not allowed. Please configure from a separate build directory!])
fi
dnl Default to empty (i.e. assigning the null string to) CFLAGS and CXXFLAGS,
@@ -445,6 +437,7 @@ AC_CACHE_CHECK([target architecture],[llvm_cv_target_arch],
hexagon-*) llvm_cv_target_arch="Hexagon" ;;
nvptx-*) llvm_cv_target_arch="NVPTX" ;;
s390x-*) llvm_cv_target_arch="SystemZ" ;;
+ wasm*-*) llvm_cv_target_arch="WebAssembly" ;;
*) llvm_cv_target_arch="Unknown" ;;
esac])
@@ -480,6 +473,7 @@ case $host in
msp430-*) host_arch="MSP430" ;;
hexagon-*) host_arch="Hexagon" ;;
s390x-*) host_arch="SystemZ" ;;
+ wasm*-*) host_arch="WebAssembly" ;;
*) host_arch="Unknown" ;;
esac
@@ -812,6 +806,7 @@ else
Hexagon) AC_SUBST(TARGET_HAS_JIT,0) ;;
NVPTX) AC_SUBST(TARGET_HAS_JIT,0) ;;
SystemZ) AC_SUBST(TARGET_HAS_JIT,1) ;;
+ WebAssembly) AC_SUBST(TARGET_HAS_JIT,0) ;;
*) AC_SUBST(TARGET_HAS_JIT,0) ;;
esac
fi
@@ -1105,7 +1100,7 @@ TARGETS_TO_BUILD=""
AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets],
[Build specific host targets: all or target1,target2,... Valid targets are:
host, x86, x86_64, sparc, powerpc, arm64, arm, aarch64, mips, hexagon,
- xcore, msp430, nvptx, systemz, r600, bpf, and cpp (default=all)]),,
+ xcore, msp430, nvptx, systemz, r600, bpf, wasm, and cpp (default=all)]),,
enableval=all)
if test "$enableval" = host-only ; then
enableval=host
@@ -1134,6 +1129,7 @@ case "$enableval" in
systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
amdgpu) TARGETS_TO_BUILD="AMDGPU $TARGETS_TO_BUILD" ;;
r600) TARGETS_TO_BUILD="AMDGPU $TARGETS_TO_BUILD" ;;
+ wasm) TARGETS_TO_BUILD="WebAssembly $TARGETS_TO_BUILD" ;;
host) case "$llvm_cv_target_arch" in
x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
@@ -1147,6 +1143,7 @@ case "$enableval" in
Hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;;
NVPTX) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;;
SystemZ) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
+ WebAssembly) TARGETS_TO_BUILD="WebAssembly $TARGETS_TO_BUILD" ;;
*) AC_MSG_ERROR([Can not set target to build]) ;;
esac ;;
*) AC_MSG_ERROR([Unrecognized target $a_target]) ;;
@@ -1631,7 +1628,7 @@ dnl===-----------------------------------------------------------------------===
AC_CHECK_LIB(m,sin)
if test "$llvm_cv_os_type" = "MingW" ; then
- AC_CHECK_LIB(imagehlp, main)
+ AC_CHECK_LIB(ole32, main)
AC_CHECK_LIB(psapi, main)
AC_CHECK_LIB(shell32, main)
fi
@@ -2172,7 +2169,10 @@ dnl contains the same list of files as AC_CONFIG_HEADERS below. This ensures the
dnl files can be updated automatically when their *.in sources change.
AC_CONFIG_HEADERS([include/llvm/Config/config.h include/llvm/Config/llvm-config.h])
AH_TOP([#ifndef CONFIG_H
-#define CONFIG_H])
+#define CONFIG_H
+
+/* Exported configuration */
+#include "llvm/Config/llvm-config.h"])
AH_BOTTOM([#endif])
AC_CONFIG_FILES([include/llvm/Config/Targets.def])
View
13 bindings/go/llvm/DIBuilderBindings.cpp
@@ -84,13 +84,18 @@ LLVMMetadataRef LLVMDIBuilderCreateFunction(
}
LLVMMetadataRef LLVMDIBuilderCreateLocalVariable(
- LLVMDIBuilderRef Dref, unsigned Tag, LLVMMetadataRef Scope,
+ LLVMDIBuilderRef Dref, unsigned, LLVMMetadataRef Scope,
const char *Name, LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty,
int AlwaysPreserve, unsigned Flags, unsigned ArgNo) {
DIBuilder *D = unwrap(Dref);
- return wrap(D->createLocalVariable(
- Tag, unwrap<DIScope>(Scope), Name, unwrap<DIFile>(File), Line,
- unwrap<DIType>(Ty), AlwaysPreserve, Flags, ArgNo));
+ // FIXME: Update the Go bindings to match the DIBuilder API.
+ if (ArgNo)
+ return wrap(D->createParameterVariable(
+ unwrap<DIScope>(Scope), Name, ArgNo, unwrap<DIFile>(File), Line,
+ unwrap<DIType>(Ty), AlwaysPreserve, Flags));
+ return wrap(D->createAutoVariable(unwrap<DIScope>(Scope), Name,
+ unwrap<DIFile>(File), Line,
+ unwrap<DIType>(Ty), AlwaysPreserve, Flags));
}
LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef Dref,
View
11 bindings/go/llvm/ir.go
@@ -160,6 +160,8 @@ const (
InAllocaAttribute Attribute = 1 << 43
NonNullAttribute Attribute = 1 << 44
JumpTableAttribute Attribute = 1 << 45
+ ConvergentAttribute Attribute = 1 << 46
+ SafeStackAttribute Attribute = 1 << 47
)
//-------------------------------------------------------------------------
@@ -1052,6 +1054,9 @@ func (v Value) AddTargetDependentFunctionAttr(attr, value string) {
defer C.free(unsafe.Pointer(cvalue))
C.LLVMAddTargetDependentFunctionAttr(v.C, cattr, cvalue)
}
+func (v Value) SetPersonality(p Value) {
+ C.LLVMSetPersonalityFn(v.C, p.C)
+}
// Operations on parameters
func (v Value) ParamsCount() int { return int(C.LLVMCountParams(v.C)) }
@@ -1204,7 +1209,7 @@ func (b Builder) Dispose() { C.LLVMDisposeBuilder(b.C) }
func (b Builder) SetCurrentDebugLocation(line, col uint, scope, inlinedAt Metadata) {
C.LLVMSetCurrentDebugLocation2(b.C, C.unsigned(line), C.unsigned(col), scope.C, inlinedAt.C)
}
-func (b Builder) SetInstDebugLocation(v Value) { C.LLVMSetInstDebugLocation(b.C, v.C) }
+func (b Builder) SetInstDebugLocation(v Value) { C.LLVMSetInstDebugLocation(b.C, v.C) }
func (b Builder) InsertDeclare(module Module, storage Value, md Value) Value {
f := module.NamedFunction("llvm.dbg.declare")
if f.IsNil() {
@@ -1723,10 +1728,10 @@ func (b Builder) CreatePtrDiff(lhs, rhs Value, name string) (v Value) {
return
}
-func (b Builder) CreateLandingPad(t Type, personality Value, nclauses int, name string) (l Value) {
+func (b Builder) CreateLandingPad(t Type, nclauses int, name string) (l Value) {
cname := C.CString(name)
defer C.free(unsafe.Pointer(cname))
- l.C = C.LLVMBuildLandingPad(b.C, t.C, personality.C, C.unsigned(nclauses), cname)
+ l.C = C.LLVMBuildLandingPad(b.C, t.C, nil, C.unsigned(nclauses), cname)
return l
}
View
2  bindings/go/llvm/ir_test.go
@@ -53,6 +53,7 @@ func TestAttributes(t *testing.T) {
{AlwaysInlineAttribute, "alwaysinline"},
{BuiltinAttribute, "builtin"},
{ByValAttribute, "byval"},
+ {ConvergentAttribute, "convergent"},
{InAllocaAttribute, "inalloca"},
{InlineHintAttribute, "inlinehint"},
{InRegAttribute, "inreg"},
@@ -78,6 +79,7 @@ func TestAttributes(t *testing.T) {
{ReturnedAttribute, "returned"},
{ReturnsTwiceAttribute, "returns_twice"},
{SExtAttribute, "signext"},
+ {SafeStackAttribute, "safestack"},
{StackProtectAttribute, "ssp"},
{StackProtectReqAttribute, "sspreq"},
{StackProtectStrongAttribute, "sspstrong"},
View
2  bindings/ocaml/Makefile.ocaml
@@ -277,6 +277,8 @@ uninstall-local:: uninstall-deplibs
build-deplibs: $(OutputLibs)
+$(OcamlDir)/%.so: $(LibDir)/%.so
+ $(Verb) ln -sf $< $@
$(OcamlDir)/%.a: $(LibDir)/%.a
$(Verb) ln -sf $< $@
View
10 bindings/ocaml/executionengine/llvm_executionengine.ml
@@ -43,11 +43,11 @@ external run_static_dtors : llexecutionengine -> unit
= "llvm_ee_run_static_dtors"
external data_layout : llexecutionengine -> Llvm_target.DataLayout.t
= "llvm_ee_get_data_layout"
-external add_global_mapping_ : Llvm.llvalue -> int64 -> llexecutionengine -> unit
+external add_global_mapping_ : Llvm.llvalue -> nativeint -> llexecutionengine -> unit
= "llvm_ee_add_global_mapping"
-external get_global_value_address_ : string -> llexecutionengine -> int64
+external get_global_value_address_ : string -> llexecutionengine -> nativeint
= "llvm_ee_get_global_value_address"
-external get_function_address_ : string -> llexecutionengine -> int64
+external get_function_address_ : string -> llexecutionengine -> nativeint
= "llvm_ee_get_function_address"
let add_global_mapping llval ptr ee =
@@ -55,14 +55,14 @@ let add_global_mapping llval ptr ee =
let get_global_value_address name typ ee =
let vptr = get_global_value_address_ name ee in
- if Int64.to_int vptr <> 0 then
+ if Nativeint.to_int vptr <> 0 then
let open Ctypes in !@ (coerce (ptr void) (ptr typ) (ptr_of_raw_address vptr))
else
raise (Error ("Value " ^ name ^ " not found"))
let get_function_address name typ ee =
let fptr = get_function_address_ name ee in
- if Int64.to_int fptr <> 0 then
+ if Nativeint.to_int fptr <> 0 then
let open Ctypes in coerce (ptr void) typ (ptr_of_raw_address fptr)
else
raise (Error ("Function " ^ name ^ " not found"))
View
11 bindings/python/llvm/object.py
@@ -372,14 +372,6 @@ def __init__(self, ptr):
self.expired = False
@CachedProperty
- def address(self):
- """The address of this relocation, in long bytes."""
- if self.expired:
- raise Exception('Relocation instance has expired.')
-
- return lib.LLVMGetRelocationAddress(self)
-
- @CachedProperty
def offset(self):
"""The offset of this relocation, in long bytes."""
if self.expired:
@@ -498,9 +490,6 @@ def register_library(library):
library.LLVMGetSymbolSize.argtypes = [Symbol]
library.LLVMGetSymbolSize.restype = c_uint64
- library.LLVMGetRelocationAddress.argtypes = [c_object_p]
- library.LLVMGetRelocationAddress.restype = c_uint64
-
library.LLVMGetRelocationOffset.argtypes = [c_object_p]
library.LLVMGetRelocationOffset.restype = c_uint64
View
12 cmake/config-ix.cmake
@@ -358,6 +358,10 @@ elseif (LLVM_NATIVE_ARCH MATCHES "hexagon")
set(LLVM_NATIVE_ARCH Hexagon)
elseif (LLVM_NATIVE_ARCH MATCHES "s390x")
set(LLVM_NATIVE_ARCH SystemZ)
+elseif (LLVM_NATIVE_ARCH MATCHES "wasm32")
+ set(LLVM_NATIVE_ARCH WebAssembly)
+elseif (LLVM_NATIVE_ARCH MATCHES "wasm64")
+ set(LLVM_NATIVE_ARCH WebAssembly)
else ()
message(FATAL_ERROR "Unknown architecture ${LLVM_NATIVE_ARCH}")
endif ()
@@ -393,12 +397,10 @@ else ()
endif ()
if( MINGW )
- set(HAVE_LIBIMAGEHLP 1)
set(HAVE_LIBPSAPI 1)
set(HAVE_LIBSHELL32 1)
# TODO: Check existence of libraries.
# include(CheckLibraryExists)
- # CHECK_LIBRARY_EXISTS(imagehlp ??? . HAVE_LIBIMAGEHLP)
endif( MINGW )
if (NOT HAVE_STRTOLL)
@@ -489,7 +491,7 @@ if (LLVM_ENABLE_DOXYGEN)
option(LLVM_DOXYGEN_EXTERNAL_SEARCH "Enable doxygen external search." OFF)
if (LLVM_DOXYGEN_EXTERNAL_SEARCH)
- set(LLVM_DOXYGEN_SEARCHENGINE_URL "" CACHE STRING "URL to use for external searhc.")
+ set(LLVM_DOXYGEN_SEARCHENGINE_URL "" CACHE STRING "URL to use for external search.")
set(LLVM_DOXYGEN_SEARCH_MAPPINGS "" CACHE STRING "Doxygen Search Mappings")
endif()
endif()
@@ -546,13 +548,13 @@ else()
if( OCAML_VERSION VERSION_LESS "4.00.0" )
message(STATUS "OCaml bindings disabled, need OCaml >=4.00.0.")
else()
- find_ocamlfind_package(ctypes VERSION 0.3 OPTIONAL)
+ find_ocamlfind_package(ctypes VERSION 0.4 OPTIONAL)
if( HAVE_OCAML_CTYPES )
message(STATUS "OCaml bindings enabled.")
find_ocamlfind_package(oUnit VERSION 2 OPTIONAL)
set(LLVM_BINDINGS "${LLVM_BINDINGS} ocaml")
else()
- message(STATUS "OCaml bindings disabled, need ctypes >=0.3.")
+ message(STATUS "OCaml bindings disabled, need ctypes >=0.4.")
endif()
endif()
endif()
View
137 cmake/modules/AddLLVM.cmake
@@ -1,4 +1,3 @@
-include(LLVMParseArguments)
include(LLVMProcessSources)
include(LLVM-Config)
@@ -84,25 +83,19 @@ function(add_llvm_symbol_exports target_name export_file)
DEPENDS ${export_file}
VERBATIM
COMMENT "Creating export file for ${target_name}")
- set_property(TARGET ${target_name} APPEND_STRING PROPERTY
- LINK_FLAGS " -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
+ if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+ set_property(TARGET ${target_name} APPEND_STRING PROPERTY
+ LINK_FLAGS " -Wl,-M,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
+ else()
+ set_property(TARGET ${target_name} APPEND_STRING PROPERTY
+ LINK_FLAGS " -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
+ endif()
else()
set(native_export_file "${target_name}.def")
- set(CAT "cat")
- set(export_file_nativeslashes ${export_file})
- if(WIN32 AND NOT CYGWIN AND NOT MSYS)
- set(CAT "type")
- # Convert ${export_file} to native format (backslashes) for "type"
- # Does not use file(TO_NATIVE_PATH) as it doesn't create a native
- # path but a build-system specific format (see CMake bug
- # http://public.kitware.com/Bug/print_bug_page.php?bug_id=5939 )
- string(REPLACE / \\ export_file_nativeslashes ${export_file})
- endif()
-
add_custom_command(OUTPUT ${native_export_file}
- COMMAND ${CMAKE_COMMAND} -E echo "EXPORTS" > ${native_export_file}
- COMMAND ${CAT} ${export_file_nativeslashes} >> ${native_export_file}
+ COMMAND ${PYTHON_EXECUTABLE} -c "import sys;print(''.join(['EXPORTS\\n']+sys.stdin.readlines(),))"
+ < ${export_file} > ${native_export_file}
DEPENDS ${export_file}
VERBATIM
COMMENT "Creating export file for ${target_name}")
@@ -164,7 +157,7 @@ function(add_link_opts target_name)
# Pass -O3 to the linker. This enabled different optimizations on different
# linkers.
- if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32))
+ if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin|SunOS" OR WIN32))
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-O3")
endif()
@@ -182,6 +175,9 @@ function(add_link_opts target_name)
# ld64's implementation of -dead_strip breaks tools that use plugins.
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-dead_strip")
+ elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+ set_property(TARGET ${target_name} APPEND_STRING PROPERTY
+ LINK_FLAGS " -Wl,-z -Wl,discard-unused=sections")
elseif(NOT WIN32 AND NOT LLVM_LINKER_IS_GOLD)
# Object files are compiled with -ffunction-data-sections.
# Versions of bfd ld < 2.23.1 have a bug in --gc-sections that breaks
@@ -287,6 +283,8 @@ function(set_windows_version_resource_properties name resource_file)
endif()
set_property(SOURCE ${resource_file}
+ PROPERTY COMPILE_FLAGS /nologo)
+ set_property(SOURCE ${resource_file}
PROPERTY COMPILE_DEFINITIONS
"RC_VERSION_FIELD_1=${ARG_VERSION_MAJOR}"
"RC_VERSION_FIELD_2=${ARG_VERSION_MINOR}"
@@ -494,11 +492,17 @@ macro(add_llvm_library name)
else()
llvm_add_library(${name} ${ARGN})
endif()
- set_property( GLOBAL APPEND PROPERTY LLVM_LIBS ${name} )
+ # The gtest libraries should not be installed or exported as a target
+ if ("${name}" STREQUAL gtest OR "${name}" STREQUAL gtest_main)
+ set(_is_gtest TRUE)
+ else()
+ set(_is_gtest FALSE)
+ set_property( GLOBAL APPEND PROPERTY LLVM_LIBS ${name} )
+ endif()
if( EXCLUDE_FROM_ALL )
set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON)
- else()
+ elseif(NOT _is_gtest)
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LTO")
if(ARG_SHARED OR BUILD_SHARED_LIBS)
if(WIN32 OR CYGWIN)
@@ -672,6 +676,13 @@ macro(add_llvm_target target_name)
set( CURRENT_LLVM_TARGET LLVM${target_name} )
endmacro(add_llvm_target)
+function(canonicalize_tool_name name output)
+ string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" nameStrip ${name})
+ string(REPLACE "-" "_" nameUNDERSCORE ${nameStrip})
+ string(TOUPPER ${nameUNDERSCORE} nameUPPER)
+ set(${output} "${nameUPPER}" PARENT_SCOPE)
+endfunction(canonicalize_tool_name)
+
# Add external project that may want to be built as part of llvm such as Clang,
# lld, and Polly. This adds two options. One for the source directory of the
# project, which defaults to ${CMAKE_CURRENT_SOURCE_DIR}/${name}. Another to
@@ -682,38 +693,68 @@ macro(add_llvm_external_project name)
if("${add_llvm_external_dir}" STREQUAL "")
set(add_llvm_external_dir ${name})
endif()
- list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}")
- string(REPLACE "-" "_" nameUNDERSCORE ${name})
- string(TOUPPER ${nameUNDERSCORE} nameUPPER)
- set(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}"
- CACHE PATH "Path to ${name} source directory")
- if (NOT ${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR} STREQUAL ""
- AND EXISTS ${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR}/CMakeLists.txt)
- option(LLVM_EXTERNAL_${nameUPPER}_BUILD
- "Whether to build ${name} as part of LLVM" ON)
- if (LLVM_EXTERNAL_${nameUPPER}_BUILD)
+ canonicalize_tool_name(${name} nameUPPER)
+ if(NOT DEFINED LLVM_TOOL_${nameUPPER}_BUILD)
+ option(LLVM_TOOL_${nameUPPER}_BUILD
+ "Whether to build ${name} as part of LLVM" On)
+ endif()
+ if (LLVM_TOOL_${nameUPPER}_BUILD)
+ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}/CMakeLists.txt)
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir} ${add_llvm_external_dir})
+ set(LLVM_TOOL_${nameUPPER}_BUILD Off)
+ elseif(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR)
+ set(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR
+ "${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR}"
+ CACHE PATH "Path to ${name} source directory")
+ mark_as_advanced(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR)
add_subdirectory(${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR} ${add_llvm_external_dir})
+ set(LLVM_TOOL_${nameUPPER}_BUILD Off)
endif()
endif()
endmacro(add_llvm_external_project)
macro(add_llvm_tool_subdirectory name)
- list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${CMAKE_CURRENT_SOURCE_DIR}/${name}")
- add_subdirectory(${name})
+ add_llvm_external_project(${name})
endmacro(add_llvm_tool_subdirectory)
-macro(ignore_llvm_tool_subdirectory name)
- list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${CMAKE_CURRENT_SOURCE_DIR}/${name}")
-endmacro(ignore_llvm_tool_subdirectory)
+function(get_project_name_from_src_var var output)
+ string(REGEX MATCH "LLVM_EXTERNAL_(.*)_SOURCE_DIR"
+ MACHED_TOOL "${var}")
+ if(MACHED_TOOL)
+ set(${output} ${CMAKE_MATCH_1} PARENT_SCOPE)
+ else()
+ set(${output} PARENT_SCOPE)
+ endif()
+endfunction()
+
+function(create_llvm_tool_options)
+ file(GLOB sub-dirs "${CMAKE_CURRENT_SOURCE_DIR}/*")
+ foreach(dir ${sub-dirs})
+ if(IS_DIRECTORY "${dir}" AND EXISTS "${dir}/CMakeLists.txt")
+ canonicalize_tool_name(${dir} name)
+ option(LLVM_TOOL_${name}_BUILD
+ "Whether to build ${name} as part of LLVM" On)
+ mark_as_advanced(LLVM_TOOL_${name}_BUILD)
+ endif()
+ endforeach()
+ get_cmake_property(variableNames VARIABLES)
+ foreach (variableName ${variableNames})
+ get_project_name_from_src_var(${variableName} projectName)
+ if(projectName)
+ option(LLVM_TOOL_${projectName}_BUILD
+ "Whether to build ${name} as part of LLVM" On)
+ mark_as_advanced(LLVM_TOOL_${name}_BUILD)
+ endif()
+ endforeach()
+endfunction(create_llvm_tool_options)
-function(add_llvm_implicit_external_projects)
+function(add_llvm_implicit_projects)
set(list_of_implicit_subdirs "")
file(GLOB sub-dirs "${CMAKE_CURRENT_SOURCE_DIR}/*")
foreach(dir ${sub-dirs})
- if(IS_DIRECTORY "${dir}")
- list(FIND LLVM_IMPLICIT_PROJECT_IGNORE "${dir}" tool_subdir_ignore)
- if( tool_subdir_ignore EQUAL -1
- AND EXISTS "${dir}/CMakeLists.txt")
+ if(IS_DIRECTORY "${dir}" AND EXISTS "${dir}/CMakeLists.txt")
+ canonicalize_tool_name(${dir} name)
+ if (LLVM_TOOL_${name}_BUILD)
get_filename_component(fn "${dir}" NAME)
list(APPEND list_of_implicit_subdirs "${fn}")
endif()
@@ -723,7 +764,7 @@ function(add_llvm_implicit_external_projects)
foreach(external_proj ${list_of_implicit_subdirs})
add_llvm_external_project("${external_proj}")
endforeach()
-endfunction(add_llvm_implicit_external_projects)
+endfunction(add_llvm_implicit_projects)
# Generic support for adding a unittest.
function(add_unittest test_suite test_name)
@@ -774,7 +815,7 @@ function(llvm_add_go_executable binary pkgpath)
endforeach(d)
set(ldflags "${CMAKE_EXE_LINKER_FLAGS}")
add_custom_command(OUTPUT ${binpath}
- COMMAND ${CMAKE_BINARY_DIR}/bin/llvm-go "cc=${cc}" "cxx=${cxx}" "cppflags=${cppflags}" "ldflags=${ldflags}"
+ COMMAND ${CMAKE_BINARY_DIR}/bin/llvm-go "go=${GO_EXECUTABLE}" "cc=${cc}" "cxx=${cxx}" "cppflags=${cppflags}" "ldflags=${ldflags}"
${ARG_GOFLAGS} build -o ${binpath} ${pkgpath}
DEPENDS llvm-config ${CMAKE_BINARY_DIR}/bin/llvm-go${CMAKE_EXECUTABLE_SUFFIX}
${llvmlibs} ${ARG_DEPENDS}
@@ -845,7 +886,7 @@ endfunction()
# A raw function to create a lit target. This is used to implement the testuite
# management functions.
function(add_lit_target target comment)
- parse_arguments(ARG "PARAMS;DEPENDS;ARGS" "" ${ARGN})
+ cmake_parse_arguments(ARG "" "" "PARAMS;DEPENDS;ARGS" ${ARGN})
set(LIT_ARGS "${ARG_ARGS} ${LLVM_LIT_ARGS}")
separate_arguments(LIT_ARGS)
if (NOT CMAKE_CFG_INTDIR STREQUAL ".")
@@ -860,9 +901,9 @@ function(add_lit_target target comment)
foreach(param ${ARG_PARAMS})
list(APPEND LIT_COMMAND --param ${param})
endforeach()
- if (ARG_DEFAULT_ARGS)
+ if (ARG_UNPARSED_ARGUMENTS)
add_custom_target(${target}
- COMMAND ${LIT_COMMAND} ${ARG_DEFAULT_ARGS}
+ COMMAND ${LIT_COMMAND} ${ARG_UNPARSED_ARGUMENTS}
COMMENT "${comment}"
${cmake_3_2_USES_TERMINAL}
)
@@ -881,12 +922,12 @@ endfunction()
# A function to add a set of lit test suites to be driven through 'check-*' targets.
function(add_lit_testsuite target comment)
- parse_arguments(ARG "PARAMS;DEPENDS;ARGS" "" ${ARGN})
+ cmake_parse_arguments(ARG "" "" "PARAMS;DEPENDS;ARGS" ${ARGN})
# EXCLUDE_FROM_ALL excludes the test ${target} out of check-all.
if(NOT EXCLUDE_FROM_ALL)
# Register the testsuites, params and depends for the global check rule.
- set_property(GLOBAL APPEND PROPERTY LLVM_LIT_TESTSUITES ${ARG_DEFAULT_ARGS})
+ set_property(GLOBAL APPEND PROPERTY LLVM_LIT_TESTSUITES ${ARG_UNPARSED_ARGUMENTS})
set_property(GLOBAL APPEND PROPERTY LLVM_LIT_PARAMS ${ARG_PARAMS})
set_property(GLOBAL APPEND PROPERTY LLVM_LIT_DEPENDS ${ARG_DEPENDS})
set_property(GLOBAL APPEND PROPERTY LLVM_LIT_EXTRA_ARGS ${ARG_ARGS})
@@ -894,7 +935,7 @@ function(add_lit_testsuite target comment)
# Produce a specific suffixed check rule.
add_lit_target(${target} ${comment}
- ${ARG_DEFAULT_ARGS}
+ ${ARG_UNPARSED_ARGUMENTS}
PARAMS ${ARG_PARAMS}
DEPENDS ${ARG_DEPENDS}
ARGS ${ARG_ARGS}
@@ -903,7 +944,7 @@ endfunction()
function(add_lit_testsuites project directory)
if (NOT CMAKE_CONFIGURATION_TYPES)
- parse_arguments(ARG "PARAMS;DEPENDS;ARGS" "" ${ARGN})
+ cmake_parse_arguments(ARG "" "" "PARAMS;DEPENDS;ARGS" ${ARGN})
file(GLOB_RECURSE litCfg ${directory}/lit*.cfg)
set(lit_suites)
foreach(f ${litCfg})
View
42 cmake/modules/CheckAtomic.cmake
@@ -2,15 +2,45 @@
INCLUDE(CheckCXXSourceCompiles)
-check_function_exists(__atomic_fetch_add_4 HAVE___ATOMIC_FETCH_ADD_4)
-if( NOT HAVE___ATOMIC_FETCH_ADD_4 )
- check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC)
- set(HAVE_LIBATOMIC False)
- if( HAVE_LIBATOMIC )
- list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
+# Sometimes linking against libatomic is required for atomic ops, if
+# the platform doesn't support lock-free atomics.
+
+function(check_working_cxx_atomics varname)
+ set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
+ set(CMAKE_REQUIRED_FLAGS "-std=c++11")
+ CHECK_CXX_SOURCE_COMPILES("
+#include <atomic>
+std::atomic<int> x;
+int main() {
+ return x;
+}
+" ${varname})
+ set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
+endfunction(check_working_cxx_atomics)
+
+# This isn't necessary on MSVC, so avoid command-line switch annoyance
+# by only running on GCC-like hosts.
+if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
+ # First check if atomics work without the library.
+ check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITHOUT_LIB)
+ # If not, check if the library exists, and atomics work with it.
+ if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
+ check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC)
+ if( HAVE_LIBATOMIC )
+ list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
+ check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITH_LIB)
+ if (NOT HAVE_CXX_ATOMICS_WITH_LIB)
+ message(FATAL_ERROR "Host compiler must support std::atomic!")
+ endif()
+ else()
+ message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.")
+ endif()
endif()
endif()
+## TODO: This define is only used for the legacy atomic operations in
+## llvm's Atomic.h, which should be replaced. Other code simply
+## assumes C++11 <atomic> works.
CHECK_CXX_SOURCE_COMPILES("
#ifdef _MSC_VER
#include <Intrin.h> /* Workaround for PR19898. */
View
9 cmake/modules/HandleLLVMOptions.cmake
@@ -131,7 +131,7 @@ endif()
# Pass -Wl,-z,defs. This makes sure all symbols are defined. Otherwise a DSO
# build might work on ELF but fail on MachO/COFF.
-if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR
+if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR
${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") AND
NOT LLVM_USE_SANITIZER)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
@@ -166,6 +166,7 @@ function(add_flag_or_print_warning flag name)
message(STATUS "Building with ${flag}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}" PARENT_SCOPE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}" PARENT_SCOPE)
+ set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${flag}" PARENT_SCOPE)
else()
message(WARNING "${flag} is not supported.")
endif()
@@ -307,10 +308,12 @@ if( MSVC )
-wd4611 # Suppress 'interaction between '_setjmp' and C++ object destruction is non-portable'
-wd4805 # Suppress 'unsafe mix of type <type> and type <type> in operation'
-wd4204 # Suppress 'nonstandard extension used : non-constant aggregate initializer'
+ -wd4577 # Suppress 'noexcept used with no exception handling mode specified; termination on exception is not guaranteed'
+ -wd4091 # Suppress 'typedef: ignored on left of '' when no variable is declared'
- # Idelly, we'd like this warning to be enabled, but MSVC 2013 doesn't
+ # Ideally, we'd like this warning to be enabled, but MSVC 2013 doesn't
# support the 'aligned' attribute in the way that clang sources requires (for
- # any code that uses the LLVM_ALIGNAS marco), so this is must be disabled to
+ # any code that uses the LLVM_ALIGNAS macro), so this is must be disabled to
# avoid unwanted alignment warnings.
# When we switch to requiring a version of MSVC that supports the 'alignas'
# specifier (MSVC 2015?) this warning can be re-enabled.
View
80 cmake/modules/LLVMParseArguments.cmake
@@ -1,80 +0,0 @@
-# Copied from http://www.itk.org/Wiki/CMakeMacroParseArguments under
-# http://creativecommons.org/licenses/by/2.5/.
-#
-# The PARSE_ARGUMENTS macro will take the arguments of another macro and define
-# several variables. The first argument to PARSE_ARGUMENTS is a prefix to put on
-# all variables it creates. The second argument is a list of names, and the
-# third argument is a list of options. Both of these lists should be quoted. The
-# rest of PARSE_ARGUMENTS are arguments from another macro to be parsed.
-#
-# PARSE_ARGUMENTS(prefix arg_names options arg1 arg2...)
-#
-# For each item in options, PARSE_ARGUMENTS will create a variable with that
-# name, prefixed with prefix_. So, for example, if prefix is MY_MACRO and
-# options is OPTION1;OPTION2, then PARSE_ARGUMENTS will create the variables
-# MY_MACRO_OPTION1 and MY_MACRO_OPTION2. These variables will be set to true if
-# the option exists in the command line or false otherwise.
-#
-#For each item in arg_names, PARSE_ARGUMENTS will create a variable with that
-#name, prefixed with prefix_. Each variable will be filled with the arguments
-#that occur after the given arg_name is encountered up to the next arg_name or
-#the end of the arguments. All options are removed from these
-#lists. PARSE_ARGUMENTS also creates a prefix_DEFAULT_ARGS variable containing
-#the list of all arguments up to the first arg_name encountered.
-#
-#Here is a simple, albeit impractical, example of using PARSE_ARGUMENTS that
-#demonstrates its behavior.
-#
-# SET(arguments
-# hello OPTION3 world
-# LIST3 foo bar
-# OPTION2
-# LIST1 fuz baz
-# )
-#
-# PARSE_ARGUMENTS(ARG "LIST1;LIST2;LIST3" "OPTION1;OPTION2;OPTION3" ${arguments})
-#
-# PARSE_ARGUMENTS creates 7 variables and sets them as follows:
-# ARG_DEFAULT_ARGS: hello;world
-# ARG_LIST1: fuz;baz
-# ARG_LIST2:
-# ARG_LIST3: foo;bar
-# ARG_OPTION1: FALSE
-# ARG_OPTION2: TRUE
-# ARG_OPTION3: TRUE
-#
-# If you don't have any options, use an empty string in its place.
-# PARSE_ARGUMENTS(ARG "LIST1;LIST2;LIST3" "" ${arguments})
-# Likewise if you have no lists.
-# PARSE_ARGUMENTS(ARG "" "OPTION1;OPTION2;OPTION3" ${arguments})
-
-MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
- SET(DEFAULT_ARGS)
- FOREACH(arg_name ${arg_names})
- SET(${prefix}_${arg_name})
- ENDFOREACH(arg_name)
- FOREACH(option ${option_names})
- SET(${prefix}_${option} FALSE)
- ENDFOREACH(option)
-
- SET(current_arg_name DEFAULT_ARGS)
- SET(current_arg_list)
- FOREACH(arg ${ARGN})
- SET(larg_names ${arg_names})
- LIST(FIND larg_names "${arg}" is_arg_name)
- IF (is_arg_name GREATER -1)
- SET(${prefix}_${current_arg_name} ${current_arg_list})
- SET(current_arg_name ${arg})
- SET(current_arg_list)
- ELSE (is_arg_name GREATER -1)
- SET(loption_names ${option_names})
- LIST(FIND loption_names "${arg}" is_option)
- IF (is_option GREATER -1)
- SET(${prefix}_${arg} TRUE)
- ELSE (is_option GREATER -1)
- SET(current_arg_list ${current_arg_list} ${arg})
- ENDIF (is_option GREATER -1)
- ENDIF (is_arg_name GREATER -1)
- ENDFOREACH(arg)
- SET(${prefix}_${current_arg_name} ${current_arg_list})
-ENDMACRO(PARSE_ARGUMENTS)
View
43 cmake/modules/Makefile
@@ -47,6 +47,12 @@ ifeq ($(LLVM_LIBS_TO_EXPORT),Error)
$(error llvm-config --libs failed)
endif
+# Strip out gtest and gtest_main from LLVM_LIBS_TO_EXPORT, these are not
+# installed and won't be available from the install tree.
+# FIXME: If we used llvm-config from the install tree this wouldn't be
+# necessary.
+LLVM_LIBS_TO_EXPORT := $(filter-out gtest gtest_main,$(LLVM_LIBS_TO_EXPORT))
+
ifndef LLVM_LIBS_TO_EXPORT
$(error LLVM_LIBS_TO_EXPORT cannot be empty)
endif
@@ -54,11 +60,27 @@ endif
OBJMODS := LLVMConfig.cmake LLVMConfigVersion.cmake LLVMExports.cmake
+LLVM_CONFIG_CODE := \
+\# Compute the CMake directory from the LLVMConfig.cmake file location.\n\
+get_filename_component(_LLVM_CMAKE_DIR "$${CMAKE_CURRENT_LIST_FILE}" PATH)\n\
+\# Compute the installation prefix from the LLVMConfig.cmake file location.\n\
+get_filename_component(LLVM_INSTALL_PREFIX "$${CMAKE_CURRENT_LIST_FILE}" PATH)\n
+
+# Compute number of levels (typically 3 - ``share/llvm/cmake/``) to PROJ_prefix
+# from PROJ_cmake, then emit the appropriate number of calls to
+# get_filename_components(). Note this assumes there are no spaces in the
+# cmake_path_suffix variable.
+cmake_path_suffix := $(subst $(PROJ_prefix),,$(subst $(DESTDIR),,$(PROJ_cmake)))
+cmake_path_dirs := $(subst /, ,$(cmake_path_suffix))
+LLVM_CONFIG_CODE += $(foreach __not_used,$(cmake_path_dirs),get_filename_component(LLVM_INSTALL_PREFIX "$${LLVM_INSTALL_PREFIX}" PATH)\n)
+
+LLVM_CONFIG_CODE += set(_LLVM_LIBRARY_DIR "$${LLVM_INSTALL_PREFIX}\/lib")
+
$(PROJ_OBJ_DIR)/LLVMConfig.cmake: LLVMConfig.cmake.in Makefile $(LLVMBuildCMakeFrag)
$(Echo) 'Generating LLVM CMake package config file'
$(Verb) ( \
cat $< | sed \
- -e 's/@LLVM_CONFIG_CODE@/set(LLVM_INSTALL_PREFIX "'"$(subst /,\/,$(PROJ_prefix))"'")/' \
+ -e 's/@LLVM_CONFIG_CODE@/$(LLVM_CONFIG_CODE)/' \
-e 's/@LLVM_VERSION_MAJOR@/'"$(LLVM_VERSION_MAJOR)"'/' \
-e 's/@LLVM_VERSION_MINOR@/'"$(LLVM_VERSION_MINOR)"'/' \
-e 's/@LLVM_VERSION_PATCH@/'"$(LLVM_VERSION_PATCH)"'/' \
@@ -81,17 +103,20 @@ $(PROJ_OBJ_DIR)/LLVMConfig.cmake: LLVMConfig.cmake.in Makefile $(LLVMBuildCMakeF
-e 's/@LLVM_ON_UNIX@/'"$(LLVM_ON_UNIX)"'/' \
-e 's/@LLVM_ON_WIN32@/'"$(LLVM_ON_WIN32)"'/' \
-e 's/@LLVM_LIBDIR_SUFFIX@//' \
- -e 's/@LLVM_CONFIG_INCLUDE_DIRS@/'"$(subst /,\/,$(PROJ_includedir))"'/' \
- -e 's/@LLVM_CONFIG_LIBRARY_DIRS@/'"$(subst /,\/,$(PROJ_libdir))"'/' \
- -e 's/@LLVM_CONFIG_CMAKE_DIR@/'"$(subst /,\/,$(PROJ_cmake))"'/' \
- -e 's/@LLVM_CONFIG_TOOLS_BINARY_DIR@/'"$(subst /,\/,$(PROJ_bindir))"'/' \
+ -e 's#@LLVM_CONFIG_INCLUDE_DIRS@#$${LLVM_INSTALL_PREFIX}/include#' \
+ -e 's#@LLVM_CONFIG_LIBRARY_DIRS@#$${_LLVM_LIBRARY_DIR}#' \
+ -e 's#@LLVM_CONFIG_CMAKE_DIR@#$${_LLVM_CMAKE_DIR}#' \
+ -e 's#@LLVM_CONFIG_TOOLS_BINARY_DIR@#$${LLVM_INSTALL_PREFIX}/bin#' \
-e 's/@LLVM_CONFIG_EXPORTS_FILE@/$${LLVM_CMAKE_DIR}\/LLVMExports.cmake/' \
-e 's/@all_llvm_lib_deps@//' \
&& \
- grep '^set_property.*LLVMBUILD_LIB_DEPS_' "$(LLVMBuildCMakeFrag)" \
+ ( grep '^set_property.*LLVMBUILD_LIB_DEPS_' "$(LLVMBuildCMakeFrag)" | \
+ grep -v LLVMBUILD_LIB_DEPS_gtest ) && \
+ echo 'unset(_LLVM_CMAKE_DIR)' && \
+ echo 'unset(_LLVM_LIBRARY_DIR)' \
) > $@
-$(PROJ_OBJ_DIR)/LLVMConfigVersion.cmake: LLVMConfigVersion.cmake.in
+$(PROJ_OBJ_DIR)/LLVMConfigVersion.cmake: LLVMConfigVersion.cmake.in Makefile
$(Echo) 'Generating LLVM CMake package version file'
$(Verb) cat $< | sed \
-e 's/@PACKAGE_VERSION@/'"$(LLVMVersion)"'/' \
@@ -100,13 +125,13 @@ $(PROJ_OBJ_DIR)/LLVMConfigVersion.cmake: LLVMConfigVersion.cmake.in
-e 's/@LLVM_VERSION_PATCH@/'"$(LLVM_VERSION_PATCH)"'/' \
> $@
-$(PROJ_OBJ_DIR)/LLVMExports.cmake: $(LLVMBuildCMakeExportsFrag)
+$(PROJ_OBJ_DIR)/LLVMExports.cmake: $(LLVMBuildCMakeExportsFrag) Makefile
$(Echo) 'Generating LLVM CMake target exports file'
$(Verb) ( \
echo '# LLVM CMake target exports. Do not include directly.' && \
for lib in $(LLVM_LIBS_TO_EXPORT); do \
echo 'add_library('"$$lib"' STATIC IMPORTED)' && \
- echo 'set_property(TARGET '"$$lib"' PROPERTY IMPORTED_LOCATION "'"$(PROJ_libdir)/lib$$lib.a"'")' ; \
+ echo 'set_property(TARGET '"$$lib"' PROPERTY IMPORTED_LOCATION "$${_LLVM_LIBRARY_DIR}/'lib$$lib.a'")' ; \
done && \
cat "$(LLVMBuildCMakeExportsFrag)" && \
echo 'set_property(TARGET LLVMSupport APPEND PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES '"$(subst -l,,$(LIBS))"')' \
View
130 configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for LLVM 3.7.0svn.
+# Generated by GNU Autoconf 2.60 for LLVM 3.8.0svn.
#
# Report bugs to <http://llvm.org/bugs/>.
#
@@ -561,8 +561,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='LLVM'
PACKAGE_TARNAME='llvm'
-PACKAGE_VERSION='3.7.0svn'
-PACKAGE_STRING='LLVM 3.7.0svn'
+PACKAGE_VERSION='3.8.0svn'
+PACKAGE_STRING='LLVM 3.8.0svn'
PACKAGE_BUGREPORT='http://llvm.org/bugs/'
ac_unique_file="lib/IR/Module.cpp"
@@ -1333,7 +1333,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures LLVM 3.7.0svn to adapt to many kinds of systems.
+\`configure' configures LLVM 3.8.0svn to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1399,7 +1399,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of LLVM 3.7.0svn:";;
+ short | recursive ) echo "Configuration of LLVM 3.8.0svn:";;
esac
cat <<\_ACEOF
@@ -1463,7 +1463,7 @@ Optional Features:
target1,target2,... Valid targets are: host, x86,
x86_64, sparc, powerpc, arm64, arm, aarch64, mips,
hexagon, xcore, msp430, nvptx, systemz, r600, bpf,
- and cpp (default=all)
+ wasm, and cpp (default=all)
--enable-experimental-targets
Build experimental host targets: disable or
target1,target2,... (default=disable)
@@ -1583,7 +1583,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-LLVM configure 3.7.0svn
+LLVM configure 3.8.0svn
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1599,7 +1599,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by LLVM $as_me 3.7.0svn, which was
+It was created by LLVM $as_me 3.8.0svn, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -1954,7 +1954,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
LLVM_VERSION_MAJOR=3
-LLVM_VERSION_MINOR=7
+LLVM_VERSION_MINOR=8
LLVM_VERSION_PATCH=0
LLVM_VERSION_SUFFIX=svn
@@ -2033,24 +2033,9 @@ echo "$as_me: error: Already configured in ${srcdir}" >&2;}
fi
if test ${srcdir} == "." ; then
- { echo "$as_me:$LINENO: WARNING: **************************************************************************************" >&5
-echo "$as_me: WARNING: **************************************************************************************" >&2;}
- { echo "$as_me:$LINENO: WARNING: * *" >&5
-echo "$as_me: WARNING: * *" >&2;}
- { echo "$as_me:$LINENO: WARNING: * WARNING *" >&5
-echo "$as_me: WARNING: * WARNING *" >&2;}
- { echo "$as_me:$LINENO: WARNING: * *" >&5
-echo "$as_me: WARNING: * *" >&2;}
- { echo "$as_me:$LINENO: WARNING: * In-source builds are deprecated. *" >&5
-echo "$as_me: WARNING: * In-source builds are deprecated. *" >&2;}
- { echo "$as_me:$LINENO: WARNING: * *" >&5
-echo "$as_me: WARNING: * *" >&2;}
- { echo "$as_me:$LINENO: WARNING: * Please configure from a separate build directory! *" >&5
-echo "$as_me: WARNING: * Please configure from a separate build directory! *" >&2;}
- { echo "$as_me:$LINENO: WARNING: * *" >&5
-echo "$as_me: WARNING: * *" >&2;}
- { echo "$as_me:$LINENO: WARNING: **************************************************************************************" >&5
-echo "$as_me: WARNING: **************************************************************************************" >&2;}
+ { { echo "$as_me:$LINENO: error: In-source builds are not allowed. Please configure from a separate build directory!" >&5
+echo "$as_me: error: In-source builds are not allowed. Please configure from a separate build directory!" >&2;}
+ { (exit 1); exit 1; }; }
fi
: ${CFLAGS=}
@@ -4207,6 +4192,7 @@ else
hexagon-*) llvm_cv_target_arch="Hexagon" ;;
nvptx-*) llvm_cv_target_arch="NVPTX" ;;
s390x-*) llvm_cv_target_arch="SystemZ" ;;
+ wasm*-*) llvm_cv_target_arch="WebAssembly" ;;
*) llvm_cv_target_arch="Unknown" ;;
esac
fi
@@ -4243,6 +4229,7 @@ case $host in
msp430-*) host_arch="MSP430" ;;
hexagon-*) host_arch="Hexagon" ;;
s390x-*) host_arch="SystemZ" ;;
+ wasm*-*) host_arch="WebAssembly" ;;
*) host_arch="Unknown" ;;
esac
@@ -5170,6 +5157,8 @@ else
;;
SystemZ) TARGET_HAS_JIT=1
;;
+ WebAssembly) TARGET_HAS_JIT=0
+ ;;
*) TARGET_HAS_JIT=0
;;
esac
@@ -5667,6 +5656,7 @@ case "$enableval" in
systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
amdgpu) TARGETS_TO_BUILD="AMDGPU $TARGETS_TO_BUILD" ;;
r600) TARGETS_TO_BUILD="AMDGPU $TARGETS_TO_BUILD" ;;
+ wasm) TARGETS_TO_BUILD="WebAssembly $TARGETS_TO_BUILD" ;;
host) case "$llvm_cv_target_arch" in
x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
@@ -5680,6 +5670,7 @@ case "$enableval" in
Hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;;
NVPTX) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;;
SystemZ) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
+ WebAssembly) TARGETS_TO_BUILD="WebAssembly $TARGETS_TO_BUILD" ;;
*) { { echo "$as_me:$LINENO: error: Can not set target to build" >&5
echo "$as_me: error: Can not set target to build" >&2;}
{ (exit 1); exit 1; }; } ;;
@@ -8733,6 +8724,87 @@ _ACEOF
fi
+{ echo "$as_me:$LINENO: checking for main in -lole32" >&5
+echo $ECHO_N "checking for main in -lole32... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ole32_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lole32 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+return main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ole32_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_ole32_main=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ole32_main" >&5
+echo "${ECHO_T}$ac_cv_lib_ole32_main" >&6; }
+if test $ac_cv_lib_ole32_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBOLE32 1
+_ACEOF
+
+ LIBS="-lole32 $LIBS"
+
+fi
+
+
{ echo "$as_me:$LINENO: checking for main in -lpsapi" >&5
echo $ECHO_N "checking for main in -lpsapi... $ECHO_C" >&6; }
if test "${ac_cv_lib_psapi_main+set}" = set; then
@@ -18538,7 +18610,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by LLVM $as_me 3.7.0svn, which was
+This file was extended by LLVM $as_me 3.8.0svn, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -18591,7 +18663,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-LLVM config.status 3.7.0svn
+LLVM config.status 3.8.0svn
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
View
83 docs/AMDGPUUsage.rst
@@ -92,3 +92,86 @@ strings:
v_mul_i32_i24 v1, v2, v3
v_mul_i32_i24_e32 v1, v2, v3
v_mul_i32_i24_e64 v1, v2, v3
+
+Assembler Directives
+--------------------
+
+.hsa_code_object_version major, minor
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+*major* and *minor* are integers that specify the version of the HSA code
+object that will be generated by the assembler. This value will be stored
+in an entry of the .note section.
+
+.hsa_code_object_isa [major, minor, stepping, vendor, arch]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+*major*, *minor*, and *stepping* are all integers that describe the instruction
+set architecture (ISA) version of the assembly program.
+
+*vendor* and *arch* are quoted strings. *vendor* should always be equal to
+"AMD" and *arch* should always be equal to "AMDGPU".
+
+If no arguments are specified, then the assembler will derive the ISA version,
+*vendor*, and *arch* from the value of the -mcpu option that is passed to the
+assembler.
+
+ISA version, *vendor*, and *arch* will all be stored in a single entry of the
+.note section.
+
+.amd_kernel_code_t
+^^^^^^^^^^^^^^^^^^
+
+This directive marks the beginning of a list of key / value pairs that are used
+to specify the amd_kernel_code_t object that will be emitted by the assembler.
+The list must be terminated by the *.end_amd_kernel_code_t* directive. For
+any amd_kernel_code_t values that are unspecified a default value will be
+used. The default value for all keys is 0, with the following exceptions:
+
+- *kernel_code_version_major* defaults to 1.
+- *machine_kind* defaults to 1.
+- *machine_version_major*, *machine_version_minor*, and
+ *machine_version_stepping* are derived from the value of the -mcpu option
+ that is passed to the assembler.
+- *kernel_code_entry_byte_offset* defaults to 256.
+- *wavefront_size* defaults to 6.
+- *kernarg_segment_alignment*, *group_segment_alignment*, and
+ *private_segment_alignment* default to 4. Note that alignments are specified
+ as a power of two, so a value of **n** means an alignment of 2^ **n**.
+
+The *.amd_kernel_code_t* directive must be placed immediately after the
+function label and before any instructions.
+
+For a full list of amd_kernel_code_t keys, see the examples in
+test/CodeGen/AMDGPU/hsa.s. For an explanation of the meanings of the different
+keys, see the comments in lib/Target/AMDGPU/AmdKernelCodeT.h
+
+Here is an example of a minimal amd_kernel_code_t specification:
+
+.. code-block:: nasm
+
+ .hsa_code_object_version 1,0
+ .hsa_code_object_isa
+
+ .text
+
+ hello_world:
+
+ .amd_kernel_code_t
+ enable_sgpr_kernarg_segment_ptr = 1
+ is_ptr64 = 1
+ compute_pgm_rsrc1_vgprs = 0
+ compute_pgm_rsrc1_sgprs = 0
+ compute_pgm_rsrc2_user_sgpr = 2
+ kernarg_segment_byte_size = 8
+ wavefront_sgpr_count = 2
+ workitem_vgpr_count = 3
+ .end_amd_kernel_code_t
+
+ s_load_dwordx2 s[0:1], s[0:1] 0x0
+ v_mov_b32 v0, 3.14159
+ s_waitcnt lgkmcnt(0)
+ v_mov_b32 v1, s0
+ v_mov_b32 v2, s1
+ flat_store_dword v0, v[1:2]
+ s_endpgm
View
4 docs/AliasAnalysis.rst
@@ -286,8 +286,8 @@ Mod/Ref result, simply return whatever the superclass computes. For example:
.. code-block:: c++
- AliasAnalysis::AliasResult alias(const Value *V1, unsigned V1Size,
- const Value *V2, unsigned V2Size) {
+ AliasResult alias(const Value *V1, unsigned V1Size,
+ const Value *V2, unsigned V2Size) {
if (...)
return NoAlias;
...
View
4 docs/BitCodeFormat.rst
@@ -741,7 +741,7 @@ global variable. The operand fields are:
MODULE_CODE_FUNCTION Record
^^^^^^^^^^^^^^^^^^^^^^^^^^^
-``[FUNCTION, type, callingconv, isproto, linkage, paramattr, alignment, section, visibility, gc, prologuedata, dllstorageclass, comdat, prefixdata]``
+``[FUNCTION, type, callingconv, isproto, linkage, paramattr, alignment, section, visibility, gc, prologuedata, dllstorageclass, comdat, prefixdata, personalityfn]``
The ``FUNCTION`` record (code 8) marks the declaration or definition of a
function. The operand fields are:
@@ -795,6 +795,8 @@ function. The operand fields are:
* *prefixdata*: If non-zero, the value index of the prefix data for this function,
plus 1.
+* *personalityfn*: If non-zero, the value index of the personality function for this function,
+ plus 1.
MODULE_CODE_ALIAS Record
^^^^^^^^^^^^^^^^^^^^^^^^
View
4 docs/CMake.rst
@@ -327,8 +327,8 @@ LLVM-specific variables
**LLVM_USE_SANITIZER**:STRING
Define the sanitizer used to build LLVM binaries and tests. Possible values
- are ``Address``, ``Memory``, ``MemoryWithOrigins`` and ``Undefined``.
- Defaults to empty string.
+ are ``Address``, ``Memory``, ``MemoryWithOrigins``, ``Undefined``, ``Thread``,
+ and ``Address;Undefined``. Defaults to empty string.
**LLVM_PARALLEL_COMPILE_JOBS**:STRING
Define the maximum number of concurrent compilation jobs.
View
4 docs/CMakeLists.txt
@@ -138,7 +138,9 @@ if( NOT uses_ocaml LESS 0 )
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html
COMMAND ${OCAMLFIND} ocamldoc -d ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html
- -sort -colorize-code -html ${odoc_files})
+ -sort -colorize-code -html ${odoc_files}
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/_ocamldoc/style.css
+ ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html)
add_dependencies(ocaml_doc ${doc_targets})
View
4 docs/CodeGenerator.rst
@@ -749,7 +749,7 @@ The SelectionDAG is a Directed-Acyclic-Graph whose nodes are instances of the
``SDNode`` class. The primary payload of the ``SDNode`` is its operation code
(Opcode) that indicates what operation the node performs and the operands to the
operation. The various operation node types are described at the top of the
-``include/llvm/CodeGen/SelectionDAGNodes.h`` file.
+``include/llvm/CodeGen/ISDOpcodes.h`` file.
Although most operations define a single value, each node in the graph may
define multiple values. For example, a combined div/rem operation will define
@@ -829,7 +829,7 @@ One great way to visualize what is going on here is to take advantage of a few
LLC command line options. The following options pop up a window displaying the
SelectionDAG at specific times (if you only get errors printed to the console
while using this, you probably `need to configure your
-system <ProgrammersManual.html#ViewGraph>`_ to add support for it).
+system <ProgrammersManual.html#viewing-graphs-while-debugging-code>`_ to add support for it).
* ``-view-dag-combine1-dags`` displays the DAG after being built, before the
first optimization pass.
View
1  docs/CommandGuide/index.rst
@@ -21,6 +21,7 @@ Basic Commands
lli
llvm-link
llvm-ar
+ llvm-lib
llvm-nm
llvm-config
llvm-diff
View
2  docs/CommandGuide/lit.rst
@@ -161,7 +161,7 @@ ADDITIONAL OPTIONS
.. option:: --show-tests
- List all of the the discovered tests and exit.
+ List all of the discovered tests and exit.
EXIT STATUS
-----------
View
168 docs/CommandGuide/lli.rst
@@ -1,172 +1,127 @@
lli - directly execute programs from LLVM bitcode
=================================================
-
SYNOPSIS
--------
-
-**lli** [*options*] [*filename*] [*program args*]
-
+:program:`lli` [*options*] [*filename*] [*program args*]
DESCRIPTION
-----------
+:program:`lli` directly executes programs in LLVM bitcode format. It takes a program
+in LLVM bitcode format and executes it using a just-in-time compiler or an
+interpreter.
-**lli** directly executes programs in LLVM bitcode format. It takes a program
-in LLVM bitcode format and executes it using a just-in-time compiler, if one is
-available for the current architecture, or an interpreter. **lli** takes all of
-the same code generator options as llc|llc, but they are only effective when
-**lli** is using the just-in-time compiler.
+:program:`lli` is *not* an emulator. It will not execute IR of different architectures
+and it can only interpret (or JIT-compile) for the host architecture.
-If *filename* is not specified, then **lli** reads the LLVM bitcode for the
+The JIT compiler takes the same arguments as other tools, like :program:`llc`,
+but they don't necessarily work for the interpreter.
+
+If `filename` is not specified, then :program:`lli` reads the LLVM bitcode for the
program from standard input.
The optional *args* specified on the command line are passed to the program as
arguments.
-
GENERAL OPTIONS
---------------
-
-
-**-fake-argv0**\ =\ *executable*
+.. option:: -fake-argv0=executable
Override the ``argv[0]`` value passed into the executing program.
-
-
-**-force-interpreter**\ =\ *{false,true}*
+.. option:: -force-interpreter={false,true}
If set to true, use the interpreter even if a just-in-time compiler is available
for this architecture. Defaults to false.
-
-
-**-help**
+.. option:: -help
Print a summary of command line options.
+.. option:: -load=pluginfilename
-
-**-load**\ =\ *pluginfilename*
-
- Causes **lli** to load the plugin (shared object) named *pluginfilename* and use
+ Causes :program:`lli` to load the plugin (shared object) named *pluginfilename* and use
it for optimization.
-
-
-**-stats**
+.. option:: -stats
Print statistics from the code-generation passes. This is only meaningful for
the just-in-time compiler, at present.
-
-
-**-time-passes**
+.. option:: -time-passes
Record the amount of time needed for each code-generation pass and print it to
standard error.
+.. option:: -version
-
-**-version**
-
- Print out the version of **lli** and exit without doing anything else.
-
-
-
+ Print out the version of :program:`lli` and exit without doing anything else.
TARGET OPTIONS
--------------
-
-
-**-mtriple**\ =\ *target triple*
+.. option:: -mtriple=target triple
Override the target triple specified in the input bitcode file with the
specified string. This may result in a crash if you pick an
architecture which is not compatible with the current system.
-
-
-**-march**\ =\ *arch*
+.. option:: -march=arch
Specify the architecture for which to generate assembly, overriding the target
encoded in the bitcode file. See the output of **llc -help** for a list of
valid architectures. By default this is inferred from the target triple or
autodetected to the current architecture.
-
-
-**-mcpu**\ =\ *cpuname*
+.. option:: -mcpu=cpuname
Specify a specific chip in the current architecture to generate code for.
By default this is inferred from the target triple and autodetected to
the current architecture. For a list of available CPUs, use:
**llvm-as < /dev/null | llc -march=xyz -mcpu=help**
-
-
-**-mattr**\ =\ *a1,+a2,-a3,...*
+.. option:: -mattr=a1,+a2,-a3,...
Override or control specific attributes of the target, such as whether SIMD
operations are enabled or not. The default set of attributes is set by the
current CPU. For a list of available attributes, use:
**llvm-as < /dev/null | llc -march=xyz -mattr=help**
-
-
-
FLOATING POINT OPTIONS
----------------------
-
-
-**-disable-excess-fp-precision**
+.. option:: -disable-excess-fp-precision
Disable optimizations that may increase floating point precision.
-
-
-**-enable-no-infs-fp-math**
+.. option:: -enable-no-infs-fp-math
Enable optimizations that assume no Inf values.
-
-
-**-enable-no-nans-fp-math**
+.. option:: -enable-no-nans-fp-math
Enable optimizations that assume no NAN values.
+.. option:: -enable-unsafe-fp-math
-