Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge with LLVM upstream (build is broken now)

  • Loading branch information...
commit 3966d8335e69e6c3c0500673e2066b2e63708048 2 parents fd04914 + 4949e98
@krasin krasin authored
Showing with 12,480 additions and 6,975 deletions.
  1. +5 −0 .gitignore
  2. +16 −12 CMakeLists.txt
  3. +27 −1 CREDITS.TXT
  4. +7 −0 Makefile.config.in
  5. +2 −4 Makefile.rules
  6. +16 −7 autoconf/configure.ac
  7. +2 −0  cmake/config-ix.cmake
  8. +18 −0 cmake/modules/AddLLVM.cmake
  9. +3 −3 cmake/modules/HandleLLVMOptions.cmake
  10. +37 −100 configure
  11. +1 −1  docs/AliasAnalysis.html
  12. +1 −1  docs/Atomics.html
  13. +1 −1  docs/BitCodeFormat.html
  14. +1 −1  docs/BranchWeightMetadata.html
  15. +81 −4 docs/Bugpoint.html
  16. +5 −5 docs/CMake.html
  17. +5 −5 docs/CodeGenerator.html
  18. +1 −1  docs/CodingStandards.html
  19. +152 −113 docs/CommandGuide/{FileCheck.pod → FileCheck.rst}
  20. +0 −103 docs/CommandGuide/Makefile
  21. +0 −186 docs/CommandGuide/bugpoint.pod
  22. +247 −0 docs/CommandGuide/bugpoint.rst
  23. +0 −256 docs/CommandGuide/html/manpage.css
  24. +0 −142 docs/CommandGuide/index.html
  25. +53 −0 docs/CommandGuide/index.rst
  26. +0 −404 docs/CommandGuide/lit.pod
  27. +474 −0 docs/CommandGuide/lit.rst
  28. +0 −201 docs/CommandGuide/llc.pod
  29. +251 −0 docs/CommandGuide/llc.rst
  30. +0 −219 docs/CommandGuide/lli.pod
  31. +300 −0 docs/CommandGuide/lli.rst
  32. +0 −406 docs/CommandGuide/llvm-ar.pod
  33. +482 −0 docs/CommandGuide/llvm-ar.rst
  34. +0 −77 docs/CommandGuide/llvm-as.pod
  35. +89 −0 docs/CommandGuide/llvm-as.rst
  36. +0 −315 docs/CommandGuide/llvm-bcanalyzer.pod
  37. +424 −0 docs/CommandGuide/llvm-bcanalyzer.rst
  38. +0 −86 docs/CommandGuide/llvm-build.pod
  39. +102 −0 docs/CommandGuide/llvm-build.rst
  40. +0 −131 docs/CommandGuide/llvm-config.pod
  41. +176 −0 docs/CommandGuide/llvm-config.rst
  42. +0 −45 docs/CommandGuide/llvm-cov.pod
  43. +51 −0 docs/CommandGuide/llvm-cov.rst
  44. +21 −18 docs/CommandGuide/{llvm-diff.pod → llvm-diff.rst}
  45. +0 −60 docs/CommandGuide/llvm-dis.pod
  46. +69 −0 docs/CommandGuide/llvm-dis.rst
  47. +0 −85 docs/CommandGuide/llvm-extract.pod
  48. +104 −0 docs/CommandGuide/llvm-extract.rst
  49. +0 −234 docs/CommandGuide/llvm-ld.pod
  50. +0 −79 docs/CommandGuide/llvm-link.pod
  51. +96 −0 docs/CommandGuide/llvm-link.rst
  52. +0 −122 docs/CommandGuide/llvm-nm.pod
  53. +154 −0 docs/CommandGuide/llvm-nm.rst
  54. +0 −57 docs/CommandGuide/llvm-prof.pod
  55. +63 −0 docs/CommandGuide/llvm-prof.rst
  56. +0 −52 docs/CommandGuide/llvm-ranlib.pod
  57. +61 −0 docs/CommandGuide/llvm-ranlib.rst
  58. +0 −42 docs/CommandGuide/llvm-stress.pod
  59. +48 −0 docs/CommandGuide/llvm-stress.rst
  60. +0 −256 docs/CommandGuide/manpage.css
  61. +0 −143 docs/CommandGuide/opt.pod
  62. +183 −0 docs/CommandGuide/opt.rst
  63. +0 −139 docs/CommandGuide/tblgen.pod
  64. +186 −0 docs/CommandGuide/tblgen.rst
  65. +1 −1  docs/CommandLine.html
  66. +1 −1  docs/CompilerWriterInfo.html
  67. +133 −102 docs/DebuggingJITedCode.html
  68. +1 −1  docs/DeveloperPolicy.html
  69. +1 −1  docs/ExceptionHandling.html
  70. +1 −1  docs/ExtendingLLVM.html
  71. +14 −201 docs/FAQ.html
  72. +1 −1  docs/GCCFEBuildInstrs.html
  73. +2 −2 docs/GarbageCollection.html
  74. +1 −1  docs/GetElementPtr.html
  75. +2 −8 docs/GettingStarted.html
  76. +1 −1  docs/GettingStartedVS.html
  77. +1 −1  docs/GoldPlugin.html
  78. +1 −1  docs/HowToAddABuilder.html
  79. +1 −1  docs/HowToReleaseLLVM.html
  80. +1 −4 docs/HowToSubmitABug.html
  81. +5 −5 docs/LLVMBuild.html
  82. +51 −20 docs/LangRef.html
  83. +1 −1  docs/Lexicon.html
  84. +1 −1  docs/LinkTimeOptimization.html
  85. +2 −5 docs/Makefile
  86. +155 −0 docs/Makefile.sphinx
  87. +1 −1  docs/MakefileGuide.html
  88. +1 −1  docs/Packaging.html
  89. +1 −1  docs/Passes.html
  90. +85 −1 docs/ProgrammersManual.html
  91. +1 −1  docs/Projects.html
  92. +12 −0 docs/README.txt
  93. +73 −1 docs/ReleaseNotes.html
  94. +1 −1  docs/SegmentedStacks.html
  95. +1 −5 docs/SourceLevelDebugging.html
  96. +1 −1  docs/SystemLibrary.html
  97. +1 −1  docs/TableGenFundamentals.html
  98. +1 −1  docs/TestSuiteMakefileGuide.html
  99. +19 −10 docs/TestingGuide.html
  100. +1 −1  docs/WritingAnLLVMBackend.html
  101. +1 −1  docs/WritingAnLLVMPass.html
  102. 0  docs/{img → _static}/lines.gif
  103. +2 −2 docs/{ → _static}/llvm.css
  104. +7 −0 docs/_templates/indexsidebar.html
  105. +13 −0 docs/_templates/layout.html
  106. +263 −0 docs/conf.py
  107. +31 −0 docs/design_and_overview.rst
  108. +24 −0 docs/development_process.rst
  109. +1 −1  docs/doxygen.css
  110. BIN  docs/img/Debugging.gif
  111. BIN  docs/img/libdeps.gif
  112. BIN  docs/img/objdeps.gif
  113. BIN  docs/img/venusflytrap.jpg
  114. +0 −286 docs/index.html
  115. +70 −0 docs/index.rst
  116. +23 −0 docs/llvm-theme/layout.html
  117. BIN  docs/llvm-theme/static/contents.png
  118. +345 −0 docs/llvm-theme/static/llvm-theme.css
  119. BIN  docs/llvm-theme/static/logo.png
  120. BIN  docs/llvm-theme/static/navigation.png
  121. +4 −0 docs/llvm-theme/theme.conf
  122. +35 −0 docs/mailing_lists.rst
  123. +190 −0 docs/make.bat
  124. +34 −0 docs/programming.rst
  125. +74 −0 docs/subsystems.rst
  126. +1 −1  docs/tutorial/LangImpl1.html
  127. +1 −1  docs/tutorial/LangImpl2.html
  128. +1 −1  docs/tutorial/LangImpl3.html
  129. +4 −5 docs/tutorial/LangImpl4.html
  130. +1 −1  docs/tutorial/LangImpl5.html
  131. +1 −1  docs/tutorial/LangImpl6.html
  132. +1 −1  docs/tutorial/LangImpl7.html
  133. +1 −1  docs/tutorial/LangImpl8.html
  134. +0 −30 docs/tutorial/Makefile
  135. +1 −1  docs/tutorial/OCamlLangImpl1.html
  136. +1 −1  docs/tutorial/OCamlLangImpl2.html
  137. +1 −1  docs/tutorial/OCamlLangImpl3.html
  138. +4 −5 docs/tutorial/OCamlLangImpl4.html
  139. +1 −1  docs/tutorial/OCamlLangImpl5.html
  140. +1 −1  docs/tutorial/OCamlLangImpl6.html
  141. +1 −1  docs/tutorial/OCamlLangImpl7.html
  142. +1 −1  docs/tutorial/OCamlLangImpl8.html
  143. +1 −1  docs/tutorial/index.html
  144. +85 −0 docs/userguides.rst
  145. +0 −1  examples/BrainF/BrainFDriver.cpp
  146. +9 −0 include/llvm-c/Core.h
  147. +42 −0 include/llvm-c/Linker.h
  148. +6 −6 include/llvm-c/Target.h
  149. +142 −0 include/llvm-c/TargetMachine.h
  150. +0 −2  include/llvm-c/lto.h
  151. +1 −0  include/llvm/ADT/APFloat.h
  152. +1 −1  include/llvm/ADT/ArrayRef.h
  153. +323 −0 include/llvm/ADT/FlatArrayMap.h
  154. +119 −14 include/llvm/ADT/FoldingSet.h
  155. +1 −1  include/llvm/ADT/ImmutableSet.h
  156. +2 −7 include/llvm/ADT/IndexedMap.h
  157. +550 −0 include/llvm/ADT/MultiImplMap.h
  158. +11 −1 include/llvm/ADT/STLExtras.h
  159. +37 −0 include/llvm/ADT/SmallMap.h
  160. +0 −3  include/llvm/ADT/SmallPtrSet.h
  161. +6 −1 include/llvm/ADT/SmallString.h
  162. +213 −15 include/llvm/ADT/SmallVector.h
  163. +76 −36 include/llvm/ADT/SparseSet.h
  164. +1 −1  include/llvm/ADT/StringMap.h
  165. +7 −0 include/llvm/ADT/Triple.h
  166. +5 −3 include/llvm/Analysis/CodeMetrics.h
  167. +2 −2 include/llvm/Analysis/DIBuilder.h
  168. +2 −2 include/llvm/Analysis/DebugInfo.h
  169. +3 −0  include/llvm/Analysis/Dominators.h
  170. +0 −4 include/llvm/Analysis/InlineCost.h
  171. +3 −0  include/llvm/Analysis/LoopInfo.h
  172. +11 −0 include/llvm/Analysis/MemoryBuiltins.h
  173. +58 −6 include/llvm/Analysis/RegionInfo.h
  174. +1 −1  include/llvm/Analysis/ScalarEvolution.h
  175. +8 −0 include/llvm/Analysis/ValueTracking.h
  176. +0 −3  include/llvm/Bitcode/LLVMBitCodes.h
  177. +2 −1  include/llvm/CodeGen/Analysis.h
  178. +32 −12 include/llvm/CodeGen/DFAPacketizer.h
  179. +3 −0  include/llvm/CodeGen/ISDOpcodes.h
  180. +1 −1  include/llvm/CodeGen/LexicalScopes.h
  181. +0 −28 include/llvm/CodeGen/LiveInterval.h
  182. +1 −15 include/llvm/CodeGen/LiveIntervalAnalysis.h
  183. +4 −1 include/llvm/CodeGen/MachineBasicBlock.h
  184. +10 −10 include/llvm/CodeGen/MachineJumpTableInfo.h
  185. +9 −8 include/llvm/CodeGen/MachinePassRegistry.h
  186. +8 −1 include/llvm/CodeGen/MachineScheduler.h
  187. +1 −1  include/llvm/CodeGen/Passes.h
  188. +11 −7 include/llvm/CodeGen/ScheduleDAGInstrs.h
  189. +46 −29 include/llvm/CodeGen/SelectionDAG.h
  190. +3 −34 include/llvm/CodeGen/SelectionDAGISel.h
  191. +66 −155 include/llvm/CodeGen/SlotIndexes.h
  192. +9 −6 include/llvm/CodeGen/ValueTypes.h
  193. +4 −7 include/llvm/Config/config.h.cmake
  194. +6 −0 include/llvm/Config/config.h.in
  195. +1 −1  include/llvm/ExecutionEngine/Interpreter.h
  196. +1 −1  include/llvm/ExecutionEngine/JIT.h
  197. +1 −1  include/llvm/ExecutionEngine/MCJIT.h
  198. +7 −4 include/llvm/ExecutionEngine/RuntimeDyld.h
  199. +2 −1  include/llvm/Instructions.h
  200. +5 −1 include/llvm/Intrinsics.td
  201. +872 −0 include/llvm/IntrinsicsNVVM.td
  202. +13 −33 include/llvm/IntrinsicsX86.td
  203. +1 −1  include/llvm/LLVMContext.h
  204. +2 −2 include/llvm/MC/EDInstInfo.h
  205. +0 −7 include/llvm/MC/MCAsmInfo.h
  206. +6 −6 include/llvm/MC/MCDisassembler.h
  207. +1 −1  include/llvm/MC/MCExpr.h
  208. +1 −1  include/llvm/MC/MCFixupKindInfo.h
  209. +13 −12 include/llvm/MC/MCObjectFileInfo.h
  210. +0 −3  include/llvm/MC/MCParser/AsmLexer.h
  211. +1 −2  include/llvm/MC/MCParser/MCAsmLexer.h
  212. +17 −17 include/llvm/MC/MCTargetAsmLexer.h
  213. +5 −5 include/llvm/MC/MachineLocation.h
  214. +11 −11 include/llvm/MC/SubtargetFeature.h
  215. +9 −9 include/llvm/Metadata.h
  216. +2 −1  include/llvm/Module.h
  217. +4 −0 include/llvm/Object/COFF.h
  218. +51 −13 include/llvm/Object/ELF.h
  219. +4 −0 include/llvm/Object/MachO.h
  220. +35 −12 include/llvm/Object/ObjectFile.h
  221. +27 −4 include/llvm/Operator.h
  222. +252 −0 include/llvm/Support/CRSBuilder.h
  223. +19 −0 include/llvm/Support/Compiler.h
  224. +272 −0 include/llvm/Support/ConstantRangesSet.h
  225. +4 −4 include/llvm/Support/FileSystem.h
  226. +60 −27 include/llvm/Support/IRBuilder.h
  227. +0 −448 include/llvm/Support/JSONParser.h
  228. +17 −0 include/llvm/Support/Locale.h
  229. +118 −0 include/llvm/Support/MDBuilder.h
  230. +9 −1 include/llvm/Support/Process.h
  231. +13 −3 include/llvm/Support/SourceMgr.h
  232. +15 −0 include/llvm/Support/TargetRegistry.h
  233. +22 −12 include/llvm/Support/YAMLParser.h
  234. +5 −0 include/llvm/Support/raw_ostream.h
  235. +15 −0 include/llvm/Support/type_traits.h
  236. +5 −0 include/llvm/TableGen/Error.h
  237. +2 −2 include/llvm/TableGen/Record.h
  238. 0  {utils → include/llvm}/TableGen/StringMatcher.h
  239. +13 −5 include/llvm/Target/Target.td
  240. +2 −1  include/llvm/Target/TargetInstrInfo.h
  241. +8 −2 include/llvm/Target/TargetLibraryInfo.h
  242. +14 −6 include/llvm/Target/TargetLowering.h
  243. +1 −1  include/llvm/Target/TargetOptions.h
  244. +145 −17 include/llvm/Target/TargetRegisterInfo.h
  245. +2 −0  include/llvm/Target/TargetSelectionDAG.td
  246. +2 −1  include/llvm/Transforms/Utils/BasicBlockUtils.h
  247. +127 −0 include/llvm/Transforms/Utils/CodeExtractor.h
  248. +0 −45 include/llvm/Transforms/Utils/FunctionUtils.h
  249. +9 −0 include/llvm/Transforms/Vectorize.h
  250. +3 −2 include/llvm/Value.h
  251. +1 −1  lib/Analysis/CaptureTracking.cpp
  252. +23 −3 lib/Analysis/CodeMetrics.cpp
  253. +31 −10 lib/Analysis/ConstantFolding.cpp
  254. +8 −7 lib/Analysis/DIBuilder.cpp
  255. +16 −39 lib/Analysis/InlineCost.cpp
  256. +11 −0 lib/Analysis/LoopInfo.cpp
  257. +40 −0 lib/Analysis/MemoryBuiltins.cpp
  258. +24 −6 lib/Analysis/RegionInfo.cpp
  259. +2 −1  lib/Analysis/RegionPass.cpp
  260. +3 −5 lib/Analysis/RegionPrinter.cpp
  261. +51 −36 lib/Analysis/ScalarEvolution.cpp
  262. +32 −1 lib/Analysis/ValueTracking.cpp
  263. +1 −51 lib/Bitcode/Reader/BitcodeReader.cpp
  264. +2 −2 lib/CodeGen/AggressiveAntiDepBreaker.cpp
  265. +2 −2 lib/CodeGen/Analysis.cpp
  266. +4 −4 lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
  267. +13 −36 lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
  268. +15 −22 lib/CodeGen/AsmPrinter/DwarfAccelTable.h
  269. +6 −4 lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  270. +5 −3 lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  271. +1 −1  lib/CodeGen/BranchFolding.cpp
  272. +1 −0  lib/CodeGen/CMakeLists.txt
  273. +2 −2 lib/CodeGen/CriticalAntiDepBreaker.cpp
  274. +36 −55 lib/CodeGen/DFAPacketizer.cpp
  275. +0 −37 lib/CodeGen/LiveInterval.cpp
  276. +6 −6 lib/CodeGen/LiveIntervalAnalysis.cpp
  277. +2 −1  lib/CodeGen/LocalStackSlotAllocation.cpp
  278. +34 −7 lib/CodeGen/MachineBasicBlock.cpp
  279. +195 −64 lib/CodeGen/MachineBlockPlacement.cpp
  280. +12 −4 lib/CodeGen/MachineInstr.cpp
  281. +138 −94 lib/CodeGen/MachineLICM.cpp
  282. +13 −0 lib/CodeGen/MachinePassRegistry.cpp
  283. +366 −38 lib/CodeGen/MachineScheduler.cpp
  284. +4 −3 lib/CodeGen/MachineVerifier.cpp
  285. +28 −27 lib/CodeGen/Passes.cpp
  286. +25 −16 lib/CodeGen/PeepholeOptimizer.cpp
  287. +4 −0 lib/CodeGen/PostRASchedulerList.cpp
  288. +1 −1  lib/CodeGen/RegAllocFast.cpp
  289. +200 −239 lib/CodeGen/RegisterCoalescer.cpp
  290. +726 −0 lib/CodeGen/RegisterPressure.cpp
  291. +234 −0 lib/CodeGen/RegisterPressure.h
  292. +29 −9 lib/CodeGen/ScheduleDAGInstrs.cpp
  293. +165 −107 lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  294. +5 −2 lib/CodeGen/SelectionDAG/FastISel.cpp
  295. +10 −6 lib/CodeGen/SelectionDAG/InstrEmitter.cpp
  296. +20 −14 lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  297. +4 −3 lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
  298. +2 −0  lib/CodeGen/SelectionDAG/LegalizeTypes.h
  299. +2 −1  lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
  300. +6 −5 lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
Sorry, we could not display the entire diff because too many files (1,126) changed.
View
5 .gitignore
@@ -41,3 +41,8 @@ tools/clang
# LLDB, which is tracked independently.
tools/lldb
cbuild/
+# lld, which is tracked independently.
+tools/lld
+# Sphinx build tree, if building in-source dir.
+docs/_build
+
View
28 CMakeLists.txt
@@ -11,11 +11,14 @@ set(CMAKE_MODULE_PATH
)
set(LLVM_VERSION_MAJOR 3)
-set(LLVM_VERSION_MINOR 1)
+set(LLVM_VERSION_MINOR 2)
set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}svn")
-set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+option(LLVM_USE_FOLDERS "Enable solution folders in Visual Studio. Disable for Express versions." ON)
+if ( LLVM_USE_FOLDERS )
+ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+endif()
include(VersionFromVCS)
@@ -79,6 +82,7 @@ set(LLVM_ALL_TARGETS
MBlaze
MSP430
DCPU16
+ NVPTX
PowerPC
PTX
Sparc
@@ -214,15 +218,6 @@ if( WIN32 AND NOT CYGWIN )
set(LLVM_LIT_TOOLS_DIR "" CACHE PATH "Path to GnuWin32 tools")
endif()
-# On Win32 using MS tools, provide an option to set the number of parallel jobs
-# to use.
-if( MSVC_IDE AND ( MSVC90 OR MSVC10 ) )
- # Only Visual Studio 2008 and 2010 officially supports /MP. Visual Studio
- # 2005 supports it but it is experimental.
- set(LLVM_COMPILER_JOBS "0" CACHE STRING
- "Number of parallel compiler jobs. 0 means use all processors. Default is 0.")
-endif()
-
# Define options to control the inclusion and default build behavior for
# components which may not strictly be necessary (tools, runtime, examples, and
# tests).
@@ -278,11 +273,21 @@ set(LLVMCONFIGLIBRARYDEPENDENCIESINC
"${LLVM_BINARY_DIR}/tools/llvm-config/LibraryDependencies.inc")
set(LLVMBUILDCMAKEFRAG
"${LLVM_BINARY_DIR}/LLVMBuild.cmake")
+
+# Create the list of optional components that are enabled
+if (LLVM_USE_INTEL_JITEVENTS)
+ set(LLVMOPTIONALCOMPONENTS IntelJITEvents)
+endif (LLVM_USE_INTEL_JITEVENTS)
+if (LLVM_USE_OPROFILE)
+ set(LLVMOPTIONALCOMPONENTS ${LLVMOPTIONALCOMPONENTS} OProfileJIT)
+endif (LLVM_USE_OPROFILE)
+
message(STATUS "Constructing LLVMBuild project information")
execute_process(
COMMAND ${PYTHON_EXECUTABLE} ${LLVMBUILDTOOL}
--native-target "${LLVM_NATIVE_ARCH}"
--enable-targets "${LLVM_TARGETS_TO_BUILD}"
+ --enable-optional-components "${LLVMOPTIONALCOMPONENTS}"
--write-library-table ${LLVMCONFIGLIBRARYDEPENDENCIESINC}
--write-cmake-fragment ${LLVMBUILDCMAKEFRAG}
ERROR_VARIABLE LLVMBUILDOUTPUT
@@ -397,7 +402,6 @@ add_subdirectory(utils/FileUpdate)
add_subdirectory(utils/count)
add_subdirectory(utils/not)
add_subdirectory(utils/llvm-lit)
-add_subdirectory(utils/json-bench)
add_subdirectory(utils/yaml-bench)
add_subdirectory(projects)
View
28 CREDITS.TXT
@@ -50,9 +50,15 @@ N: Cameron Buschardt
E: buschard@uiuc.edu
D: The `mem2reg' pass - promotes values stored in memory to registers
+N: Brendon Cahoon
+E: bcahoon@codeaurora.org
+D: Loop unrolling with run-time trip counts.
+
N: Chandler Carruth
E: chandlerc@gmail.com
-D: LinkTimeOptimizer for Linux, via binutils integration, and C API
+D: Hashing algorithms and interfaces
+D: Inline cost analysis
+D: Machine block placement pass
N: Casey Carter
E: ccarter@uiuc.edu
@@ -83,6 +89,10 @@ N: John T. Criswell
E: criswell@uiuc.edu
D: Original Autoconf support, documentation improvements, bug fixes
+N: Anshuman Dasgupta
+E: adasgupt@codeaurora.org
+D: Deterministic finite automaton based infrastructure for VLIW packetization
+
N: Stefanus Du Toit
E: stefanus.dutoit@rapidmind.com
D: Bug fixes and minor improvements
@@ -206,6 +216,10 @@ N: Benjamin Kramer
E: benny.kra@gmail.com
D: Miscellaneous bug fixes
+N: Sundeep Kushwaha
+E: sundeepk@codeaurora.org
+D: Implemented DFA-based target independent VLIW packetizer
+
N: Christopher Lamb
E: christopher.lamb@gmail.com
D: aligned load/store support, parts of noalias and restrict support
@@ -241,6 +255,10 @@ N: Nick Lewycky
E: nicholas@mxc.ca
D: PredicateSimplifier pass
+N: Tony Linthicum, et. al.
+E: tlinth@codeaurora.org
+D: Backend for Qualcomm's Hexagon VLIW processor.
+
N: Bruno Cardoso Lopes
E: bruno.cardoso@gmail.com
W: http://www.brunocardoso.org
@@ -267,6 +285,10 @@ N: Scott Michel
E: scottm@aero.org
D: Added STI Cell SPU backend.
+N: Kai Nacke
+E: kai@redstar.de
+D: Support for implicit TLS model used with MS VC runtime
+
N: Takumi Nakamura
E: geek4civic@gmail.com
E: chapuni@hf.rim.or.jp
@@ -320,6 +342,10 @@ W: http://vladimir_prus.blogspot.com
E: ghost@cs.msu.su
D: Made inst_iterator behave like a proper iterator, LowerConstantExprs pass
+N: Kalle Raiskila
+E: kalle.rasikila@nokia.com
+D: Some bugfixes to CellSPU
+
N: Xerxes Ranby
E: xerxes@zafena.se
D: Cmake dependency chain and various bug fixes
View
7 Makefile.config.in
@@ -351,3 +351,10 @@ INTEL_JITEVENTS_LIBDIR := @INTEL_JITEVENTS_LIBDIR@
# Flags to control building support for OProfile JIT API
USE_OPROFILE := @USE_OPROFILE@
+
+ifeq ($(USE_INTEL_JITEVENTS), 1)
+ OPTIONAL_COMPONENTS += IntelJITEvents
+endif
+ifeq ($(USE_OPROFILE), 1)
+ OPTIONAL_COMPONENTS += OProfileJIT
+endif
View
6 Makefile.rules
@@ -100,6 +100,7 @@ $(LLVMBuildMakeFrag): $(PROJ_SRC_ROOT)/Makefile.rules \
$(Verb) $(LLVMBuildTool) \
--native-target "$(TARGET_NATIVE_ARCH)" \
--enable-targets "$(TARGETS_TO_BUILD)" \
+ --enable-optional-components "$(OPTIONAL_COMPONENTS)" \
--write-library-table $(LLVMConfigLibraryDependenciesInc) \
--write-make-fragment $(LLVMBuildMakeFrag)
@@ -537,9 +538,6 @@ ifeq ($(LLVM_CROSS_COMPILING),1)
else
LLVM_CONFIG := $(LLVMToolDir)/llvm-config$(EXEEXT)
endif
-ifndef LLVMLD
-LLVMLD := $(LLVMToolDir)/llvm-ld$(EXEEXT)
-endif
ifndef LLVMDIS
LLVMDIS := $(LLVMToolDir)/llvm-dis$(EXEEXT)
endif
@@ -1432,7 +1430,7 @@ LD.Flags += -Wl,-exported_symbol,_main
endif
endif
-ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD))
+ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD GNU))
ifneq ($(ARCH), Mips)
LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map
endif
View
23 autoconf/configure.ac
@@ -31,9 +31,9 @@ dnl===
dnl===-----------------------------------------------------------------------===
dnl Initialize autoconf and define the package name, version number and
dnl address for reporting bugs.
-AC_INIT([LLVM],[3.1svn],[http://llvm.org/bugs/])
+AC_INIT([LLVM],[3.2svn],[http://llvm.org/bugs/])
AC_DEFINE([LLVM_VERSION_MAJOR], [3], [Major version of the LLVM API])
-AC_DEFINE([LLVM_VERSION_MINOR], [1], [Minor version of the LLVM API])
+AC_DEFINE([LLVM_VERSION_MINOR], [2], [Minor version of the LLVM API])
dnl Provide a copyright substitution and ensure the copyright notice is included
dnl in the output of --version option of the generated configure script.
@@ -371,6 +371,7 @@ AC_CACHE_CHECK([target architecture],[llvm_cv_target_arch],
hexagon-*) llvm_cv_target_arch="Hexagon" ;;
mblaze-*) llvm_cv_target_arch="MBlaze" ;;
ptx-*) llvm_cv_target_arch="PTX" ;;
+ nvptx-*) llvm_cv_target_arch="NVPTX" ;;
*) llvm_cv_target_arch="Unknown" ;;
esac])
@@ -519,6 +520,7 @@ else
Hexagon) AC_SUBST(TARGET_HAS_JIT,0) ;;
MBlaze) AC_SUBST(TARGET_HAS_JIT,0) ;;
PTX) AC_SUBST(TARGET_HAS_JIT,0) ;;
+ NVPTX) AC_SUBST(TARGET_HAS_JIT,0) ;;
*) AC_SUBST(TARGET_HAS_JIT,0) ;;
esac
fi
@@ -630,13 +632,13 @@ TARGETS_TO_BUILD=""
AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets],
[Build specific host targets: all or target1,target2,... Valid targets are:
host, x86, x86_64, sparc, powerpc, arm, mips, spu, hexagon,
- xcore, msp430, dcpu16, ptx, cbe, and cpp (default=all)]),,
+ xcore, msp430, dcpu16, ptx, nvptx, cbe, and cpp (default=all)]),,
enableval=all)
if test "$enableval" = host-only ; then
enableval=host
fi
case "$enableval" in
- all) TARGETS_TO_BUILD="X86 Sparc PowerPC ARM Mips CellSPU XCore MSP430 DCPU16 CppBackend MBlaze PTX Hexagon" ;;
+ all) TARGETS_TO_BUILD="X86 Sparc PowerPC ARM Mips CellSPU XCore MSP430 DCPU16 CppBackend MBlaze PTX NVPTX Hexagon" ;;
*)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do
case "$a_target" in
x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
@@ -654,6 +656,7 @@ case "$enableval" in
hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;;
mblaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;;
ptx) TARGETS_TO_BUILD="PTX $TARGETS_TO_BUILD" ;;
+ nvptx) TARGETS_TO_BUILD="NVPTX $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" ;;
@@ -668,6 +671,7 @@ case "$enableval" in
DCPU16) TARGETS_TO_BUILD="DCPU16 $TARGETS_TO_BUILD" ;;
Hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;;
PTX) TARGETS_TO_BUILD="PTX $TARGETS_TO_BUILD" ;;
+ NVPTX) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;;
*) AC_MSG_ERROR([Can not set target to build]) ;;
esac ;;
*) AC_MSG_ERROR([Unrecognized target $a_target]) ;;
@@ -842,6 +846,13 @@ AC_ARG_WITH(gcc-toolchain,
AC_DEFINE_UNQUOTED(GCC_INSTALL_PREFIX,"$withval",
[Directory where gcc is installed.])
+AC_ARG_WITH(default-sysroot,
+ AS_HELP_STRING([--with-default-sysroot],
+ [Add --sysroot=<path> to all compiler invocations.]),,
+ withval="")
+AC_DEFINE_UNQUOTED(DEFAULT_SYSROOT,"$withval",
+ [Default <path> to all compiler invocations for --sysroot=<path>.])
+
dnl Allow linking of LLVM with GPLv3 binutils code.
AC_ARG_WITH(binutils-include,
AS_HELP_STRING([--with-binutils-include],
@@ -1021,8 +1032,6 @@ AC_PATH_PROG(CAT, [cat])
AC_PATH_PROG(DOXYGEN, [doxygen])
AC_PATH_PROG(GROFF, [groff])
AC_PATH_PROG(GZIPBIN, [gzip])
-AC_PATH_PROG(POD2HTML, [pod2html])
-AC_PATH_PROG(POD2MAN, [pod2man])
AC_PATH_PROG(PDFROFF, [pdfroff])
AC_PATH_PROG(RUNTEST, [runtest])
DJ_AC_PATH_TCLSH
@@ -1339,7 +1348,7 @@ AC_CHECK_FUNCS([powf fmodf strtof round ])
AC_CHECK_FUNCS([getpagesize getrusage getrlimit setrlimit gettimeofday ])
AC_CHECK_FUNCS([isatty mkdtemp mkstemp ])
AC_CHECK_FUNCS([mktemp posix_spawn pread realpath sbrk setrlimit strdup ])
-AC_CHECK_FUNCS([strerror strerror_r setenv ])
+AC_CHECK_FUNCS([strerror strerror_r setenv arc4random ])
AC_CHECK_FUNCS([strtoll strtoq sysconf malloc_zone_statistics ])
AC_CHECK_FUNCS([setjmp longjmp sigsetjmp siglongjmp writev])
AC_C_PRINTF_A
View
2  cmake/config-ix.cmake
@@ -91,6 +91,7 @@ if( NOT PURE_WINDOWS )
endif()
# function checks
+check_symbol_exists(arc4random "stdlib.h" HAVE_ARC4RANDOM)
check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE)
check_symbol_exists(getrusage sys/resource.h HAVE_GETRUSAGE)
check_symbol_exists(setrlimit sys/resource.h HAVE_SETRLIMIT)
@@ -240,6 +241,7 @@ llvm_find_program(fdp)
llvm_find_program(dot)
llvm_find_program(dotty)
llvm_find_program(xdot.py)
+llvm_find_program(Graphviz)
if( LLVM_ENABLE_FFI )
find_path(FFI_INCLUDE_PATH ffi.h PATHS ${FFI_INCLUDE_DIR})
View
18 cmake/modules/AddLLVM.cmake
@@ -130,3 +130,21 @@ macro(add_llvm_target target_name)
add_llvm_library(LLVM${target_name} ${ARGN} ${TABLEGEN_OUTPUT})
set( CURRENT_LLVM_TARGET LLVM${target_name} )
endmacro(add_llvm_target)
+
+# Add external project that may want to be built as part of llvm such as Clang,
+# lld, and Polly. This adds two options. One for the source directory of the
+# project, which defaults to ${CMAKE_CURRENT_SOURCE_DIR}/${name}. Another to
+# enable or disable building it with everthing else.
+macro(add_llvm_external_project name)
+ string(TOUPPER ${name} nameUPPER)
+ set(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${name}"
+ CACHE PATH "Path to ${name} source directory")
+ if (NOT ${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR} STREQUAL ""
+ AND EXISTS ${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR}/CMakeLists.txt)
+ option(LLVM_EXTERNAL_${nameUPPER}_BUILD
+ "Whether to build ${name} as part of LLVM" ON)
+ if (LLVM_EXTERNAL_${nameUPPER}_BUILD)
+ add_subdirectory(${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR} ${name})
+ endif()
+ endif()
+endmacro(add_llvm_external_project)
View
6 cmake/modules/HandleLLVMOptions.cmake
@@ -110,9 +110,9 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
endif( LLVM_BUILD_32_BITS )
endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
-if( MSVC_IDE AND ( MSVC90 OR MSVC10 ) )
- # Only Visual Studio 2008 and 2010 officially supports /MP.
- # Visual Studio 2005 do support it but it's experimental there.
+# On Win32 using MS tools, provide an option to set the number of parallel jobs
+# to use.
+if( MSVC_IDE )
set(LLVM_COMPILER_JOBS "0" CACHE STRING
"Number of parallel compiler jobs. 0 means use all processors. Default is 0.")
if( NOT LLVM_COMPILER_JOBS STREQUAL "1" )
View
137 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.1svn.
+# Generated by GNU Autoconf 2.60 for LLVM 3.2svn.
#
# 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.1svn'
-PACKAGE_STRING='LLVM 3.1svn'
+PACKAGE_VERSION='3.2svn'
+PACKAGE_STRING='LLVM 3.2svn'
PACKAGE_BUGREPORT='http://llvm.org/bugs/'
ac_unique_file="lib/VMCore/Module.cpp"
@@ -743,8 +743,6 @@ CAT
DOXYGEN
GROFF
GZIPBIN
-POD2HTML
-POD2MAN
PDFROFF
RUNTEST
TCLSH
@@ -1318,7 +1316,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.1svn to adapt to many kinds of systems.
+\`configure' configures LLVM 3.2svn to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1384,7 +1382,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of LLVM 3.1svn:";;
+ short | recursive ) echo "Configuration of LLVM 3.2svn:";;
esac
cat <<\_ACEOF
@@ -1420,7 +1418,7 @@ Optional Features:
--enable-targets Build specific host targets: all or
target1,target2,... Valid targets are: host, x86,
x86_64, sparc, powerpc, arm, mips, spu, hexagon,
- xcore, msp430, dcpu16, ptx, cbe, and cpp (default=all)
+ xcore, msp430, dcpu16, ptx, nvptx, cbe, and cpp (default=all)
--enable-bindings Build specific language bindings:
all,auto,none,{binding-name} (default=auto)
--enable-libffi Check for the presence of libffi (default is NO)
@@ -1442,6 +1440,7 @@ Optional Packages:
--with-c-include-dirs Colon separated list of directories clang will
search for headers
--with-gcc-toolchain Directory where gcc is installed.
+ --with-default-sysroot Add --sysroot=<path> to all compiler invocations.
--with-binutils-include Specify path to binutils/include/ containing
plugin-api.h file for gold plugin.
--with-bug-report-url Specify the URL where bug reports should be
@@ -1531,7 +1530,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-LLVM configure 3.1svn
+LLVM configure 3.2svn
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1547,7 +1546,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.1svn, which was
+It was created by LLVM $as_me 3.2svn, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -1907,7 +1906,7 @@ _ACEOF
cat >>confdefs.h <<\_ACEOF
-#define LLVM_VERSION_MINOR 1
+#define LLVM_VERSION_MINOR 2
_ACEOF
@@ -3802,7 +3801,7 @@ else
llvm_cv_target_os_type="Darwin" ;;
*-*-minix*)
llvm_cv_target_os_type="Minix" ;;
- *-*-freebsd*| *-*-kfreebsd-gnu)
+ *-*-freebsd* | *-*-kfreebsd-gnu)
llvm_cv_target_os_type="FreeBSD" ;;
*-*-openbsd*)
llvm_cv_target_os_type="OpenBSD" ;;
@@ -3903,6 +3902,7 @@ else
hexagon-*) llvm_cv_target_arch="Hexagon" ;;
mblaze-*) llvm_cv_target_arch="MBlaze" ;;
ptx-*) llvm_cv_target_arch="PTX" ;;
+ nvptx-*) llvm_cv_target_arch="NVPTX" ;;
*) llvm_cv_target_arch="Unknown" ;;
esac
fi
@@ -5128,6 +5128,8 @@ else
;;
PTX) TARGET_HAS_JIT=0
;;
+ NVPTX) TARGET_HAS_JIT=0
+ ;;
*) TARGET_HAS_JIT=0
;;
esac
@@ -5312,7 +5314,7 @@ if test "$enableval" = host-only ; then
enableval=host
fi
case "$enableval" in
- all) TARGETS_TO_BUILD="X86 Sparc PowerPC ARM Mips CellSPU XCore MSP430 DCPU16 CppBackend MBlaze PTX Hexagon" ;;
+ all) TARGETS_TO_BUILD="X86 Sparc PowerPC ARM Mips CellSPU XCore MSP430 DCPU16 CppBackend MBlaze PTX NVPTX Hexagon" ;;
*)for a_target in `echo $enableval|sed -e 's/,/ /g' ` ; do
case "$a_target" in
x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
@@ -5330,6 +5332,7 @@ case "$enableval" in
hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;;
mblaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;;
ptx) TARGETS_TO_BUILD="PTX $TARGETS_TO_BUILD" ;;
+ nvptx) TARGETS_TO_BUILD="NVPTX $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" ;;
@@ -5344,6 +5347,7 @@ case "$enableval" in
DCPU16) TARGETS_TO_BUILD="DCPU16 $TARGETS_TO_BUILD" ;;
Hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;;
PTX) TARGETS_TO_BUILD="PTX $TARGETS_TO_BUILD" ;;
+ NVPTX) TARGETS_TO_BUILD="NVPTX $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; }; } ;;
@@ -5588,6 +5592,20 @@ _ACEOF
+# Check whether --with-default-sysroot was given.
+if test "${with_default_sysroot+set}" = set; then
+ withval=$with_default_sysroot;
+else
+ withval=""
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_SYSROOT "$withval"
+_ACEOF
+
+
+
# Check whether --with-binutils-include was given.
if test "${with_binutils_include+set}" = set; then
withval=$with_binutils_include;
@@ -7184,86 +7202,6 @@ echo "${ECHO_T}no" >&6; }
fi
-# Extract the first word of "pod2html", so it can be a program name with args.
-set dummy pod2html; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_POD2HTML+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $POD2HTML in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_POD2HTML="$POD2HTML" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_POD2HTML="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-POD2HTML=$ac_cv_path_POD2HTML
-if test -n "$POD2HTML"; then
- { echo "$as_me:$LINENO: result: $POD2HTML" >&5
-echo "${ECHO_T}$POD2HTML" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-# Extract the first word of "pod2man", so it can be a program name with args.
-set dummy pod2man; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_POD2MAN+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $POD2MAN in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_POD2MAN="$POD2MAN" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_POD2MAN="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-POD2MAN=$ac_cv_path_POD2MAN
-if test -n "$POD2MAN"; then
- { echo "$as_me:$LINENO: result: $POD2MAN" >&5
-echo "${ECHO_T}$POD2MAN" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
# Extract the first word of "pdfroff", so it can be a program name with args.
set dummy pdfroff; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -10391,7 +10329,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 10387 "configure"
+#line 10327 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -17507,7 +17445,8 @@ done
-for ac_func in strerror strerror_r setenv
+
+for ac_func in strerror strerror_r setenv arc4random
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -21775,7 +21714,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.1svn, which was
+This file was extended by LLVM $as_me 3.2svn, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21828,7 +21767,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-LLVM config.status 3.1svn
+LLVM config.status 3.2svn
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -22212,8 +22151,6 @@ CAT!$CAT$ac_delim
DOXYGEN!$DOXYGEN$ac_delim
GROFF!$GROFF$ac_delim
GZIPBIN!$GZIPBIN$ac_delim
-POD2HTML!$POD2HTML$ac_delim
-POD2MAN!$POD2MAN$ac_delim
PDFROFF!$PDFROFF$ac_delim
RUNTEST!$RUNTEST$ac_delim
TCLSH!$TCLSH$ac_delim
@@ -22262,7 +22199,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 92; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 90; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
View
2  docs/AliasAnalysis.html
@@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>LLVM Alias Analysis Infrastructure</title>
- <link rel="stylesheet" href="llvm.css" type="text/css">
+ <link rel="stylesheet" href="_static/llvm.css" type="text/css">
</head>
<body>
View
2  docs/Atomics.html
@@ -4,7 +4,7 @@
<head>
<title>LLVM Atomic Instructions and Concurrency Guide</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <link rel="stylesheet" href="llvm.css" type="text/css">
+ <link rel="stylesheet" href="_static/llvm.css" type="text/css">
</head>
<body>
View
2  docs/BitCodeFormat.html
@@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>LLVM Bitcode File Format</title>
- <link rel="stylesheet" href="llvm.css" type="text/css">
+ <link rel="stylesheet" href="_static/llvm.css" type="text/css">
</head>
<body>
<h1> LLVM Bitcode File Format</h1>
View
2  docs/BranchWeightMetadata.html
@@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>LLVM Branch Weight Metadata</title>
- <link rel="stylesheet" href="llvm.css" type="text/css">
+ <link rel="stylesheet" href="_static/llvm.css" type="text/css">
</head>
<body>
View
85 docs/Bugpoint.html
@@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>LLVM bugpoint tool: design and usage</title>
- <link rel="stylesheet" href="llvm.css" type="text/css">
+ <link rel="stylesheet" href="_static/llvm.css" type="text/css">
</head>
<h1>
@@ -21,6 +21,7 @@
<li><a href="#miscompilationdebug">Miscompilation debugger</a></li>
</ul></li>
<li><a href="#advice">Advice for using <tt>bugpoint</tt></a></li>
+ <li><a href="#notEnough">What to do when <tt>bugpoint</tt> isn't enough</a></li>
</ul>
<div class="doc_author">
@@ -44,9 +45,9 @@
causes the crash, and reduce the file down to a small example which triggers the
crash.</p>
-<p>For detailed case scenarios, such as debugging <tt>opt</tt>,
-<tt>llvm-ld</tt>, or one of the LLVM code generators, see <a
-href="HowToSubmitABug.html">How To Submit a Bug Report document</a>.</p>
+<p>For detailed case scenarios, such as debugging <tt>opt</tt>, or one of the
+LLVM code generators, see <a href="HowToSubmitABug.html">How To Submit a Bug
+Report document</a>.</p>
</div>
@@ -220,6 +221,82 @@
</ol>
</div>
+<!-- *********************************************************************** -->
+<h2>
+ <a name="notEnough">What to do when bugpoint isn't enough</a>
+</h2>
+<!-- *********************************************************************** -->
+
+<div>
+
+<p>Sometimes, <tt>bugpoint</tt> is not enough. In particular, InstCombine and
+TargetLowering both have visitor structured code with lots of potential
+transformations. If the process of using bugpoint has left you with
+still too much code to figure out and the problem seems
+to be in instcombine, the following steps may help. These same techniques
+are useful with TargetLowering as well.</p>
+
+<p>Turn on <tt>-debug-only=instcombine</tt> and see which transformations
+within instcombine are firing by selecting out lines with "<tt>IC</tt>"
+in them.</p>
+
+<p>At this point, you have a decision to make. Is the number
+of transformations small enough to step through them using a debugger?
+If so, then try that.</p>
+
+<p>If there are too many transformations, then a source modification
+approach may be helpful.
+In this approach, you can modify the source code of instcombine
+to disable just those transformations that are being performed on your
+test input and perform a binary search over the set of transformations.
+One set of places to modify are the "<tt>visit*</tt>" methods of
+<tt>InstCombiner</tt> (<I>e.g.</I> <tt>visitICmpInst</tt>) by adding a
+"<tt>return false</tt>" as the first line of the method.</p>
+
+<p>If that still doesn't remove enough, then change the caller of
+<tt>InstCombiner::DoOneIteration</tt>, <tt>InstCombiner::runOnFunction</tt>
+to limit the number of iterations.</p>
+
+<p>You may also find it useful to use "<tt>-stats</tt>" now to see what parts
+of instcombine are firing. This can guide where to put additional reporting
+code.</p>
+
+<p>At this point, if the amount of transformations is still too large, then
+inserting code to limit whether or not to execute the body of the code
+in the visit function can be helpful. Add a static counter which is
+incremented on every invocation of the function. Then add code which
+simply returns false on desired ranges. For example:</p>
+
+<div class="doc_code">
+<p><tt>static int calledCount = 0;</tt></p>
+<p><tt>calledCount++;</tt></p>
+<p><tt>DEBUG(if (calledCount &lt; 212) return false);</tt></p>
+<p><tt>DEBUG(if (calledCount &gt; 217) return false);</tt></p>
+<p><tt>DEBUG(if (calledCount == 213) return false);</tt></p>
+<p><tt>DEBUG(if (calledCount == 214) return false);</tt></p>
+<p><tt>DEBUG(if (calledCount == 215) return false);</tt></p>
+<p><tt>DEBUG(if (calledCount == 216) return false);</tt></p>
+<p><tt>DEBUG(dbgs() &lt;&lt; "visitXOR calledCount: " &lt;&lt; calledCount
+ &lt;&lt; "\n");</tt></p>
+<p><tt>DEBUG(dbgs() &lt;&lt; "I: "; I->dump());</tt></p>
+</div>
+
+<p>could be added to <tt>visitXOR</tt> to limit <tt>visitXor</tt> to being
+applied only to calls 212 and 217. This is from an actual test case and raises
+an important point---a simple binary search may not be sufficient, as
+transformations that interact may require isolating more than one call.
+In TargetLowering, use <tt>return SDNode();</tt> instead of
+<tt>return false;</tt>.</p>
+
+<p>Now that that the number of transformations is down to a manageable
+number, try examining the output to see if you can figure out which
+transformations are being done. If that can be figured out, then
+do the usual debugging. If which code corresponds to the transformation
+being performed isn't obvious, set a breakpoint after the call count
+based disabling and step through the code. Alternatively, you can use
+"printf" style debugging to report waypoints.</p>
+
+</div>
<!-- *********************************************************************** -->
View
10 docs/CMake.html
@@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Building LLVM with CMake</title>
- <link rel="stylesheet" href="llvm.css" type="text/css">
+ <link rel="stylesheet" href="_static/llvm.css" type="text/css">
</head>
<h1>
@@ -353,10 +353,10 @@
installed on a custom location, you can set the variables
FFI_INCLUDE_DIR and FFI_LIBRARY_DIR. Defaults to OFF.</dd>
- <dt><b>LLVM_CLANG_SOURCE_DIR</b>:PATH</dt>
- <dd>Path to Clang's source directory. Defaults to tools/clang.
- Clang will not be built when it is empty or it does not point valid
- path.</dd>
+ <dt><b>LLVM_EXTERNAL_{CLANG,LLD,POLLY}_SOURCE_DIR</b>:PATH</dt>
+ <dd>Path to {Clang,lld,Polly}'s source directory. Defaults to
+ tools/{clang,lld,polly}. {Clang,lld,Polly} will not be built when it is
+ empty or it does not point valid path.</dd>
<dt><b>LLVM_USE_OPROFILE</b>:BOOL</dt>
<dd> Enable building OProfile JIT support. Defaults to OFF</dd>
View
10 docs/CodeGenerator.html
@@ -4,7 +4,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>The LLVM Target-Independent Code Generator</title>
- <link rel="stylesheet" href="llvm.css" type="text/css">
+ <link rel="stylesheet" href="_static/llvm.css" type="text/css">
<style type="text/css">
.unknown { background-color: #C0C0C0; text-align: center; }
@@ -1617,9 +1617,9 @@
range from 1 to 1023. To see how this numbering is defined for a particular
architecture, you can read the <tt>GenRegisterNames.inc</tt> file for that
architecture. For instance, by
- inspecting <tt>lib/Target/X86/X86GenRegisterNames.inc</tt> we see that the
- 32-bit register <tt>EAX</tt> is denoted by 15, and the MMX register
- <tt>MM0</tt> is mapped to 48.</p>
+ inspecting <tt>lib/Target/X86/X86GenRegisterInfo.inc</tt> we see that the
+ 32-bit register <tt>EAX</tt> is denoted by 43, and the MMX register
+ <tt>MM0</tt> is mapped to 65.</p>
<p>Some architectures contain registers that share the same physical location. A
notable example is the X86 platform. For instance, in the X86 architecture,
@@ -1627,7 +1627,7 @@
bits. These physical registers are marked as <i>aliased</i> in LLVM. Given a
particular architecture, you can check which registers are aliased by
inspecting its <tt>RegisterInfo.td</tt> file. Moreover, the method
- <tt>TargetRegisterInfo::getAliasSet(p_reg)</tt> returns an array containing
+ <tt>MCRegisterInfo::getAliasSet(p_reg)</tt> returns an array containing
all the physical registers aliased to the register <tt>p_reg</tt>.</p>
<p>Physical registers, in LLVM, are grouped in <i>Register Classes</i>.
View
2  docs/CodingStandards.html
@@ -3,7 +3,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <link rel="stylesheet" href="llvm.css" type="text/css">
+ <link rel="stylesheet" href="_static/llvm.css" type="text/css">
<title>LLVM Coding Standards</title>
</head>
<body>
View
265 docs/CommandGuide/FileCheck.pod → docs/CommandGuide/FileCheck.rst
@@ -1,89 +1,113 @@
+FileCheck - Flexible pattern matching file verifier
+===================================================
-=pod
-=head1 NAME
+SYNOPSIS
+--------
-FileCheck - Flexible pattern matching file verifier
-=head1 SYNOPSIS
+**FileCheck** *match-filename* [*--check-prefix=XXX*] [*--strict-whitespace*]
-B<FileCheck> I<match-filename> [I<--check-prefix=XXX>] [I<--strict-whitespace>]
-=head1 DESCRIPTION
+DESCRIPTION
+-----------
-B<FileCheck> reads two files (one from standard input, and one specified on the
+
+**FileCheck** reads two files (one from standard input, and one specified on the
command line) and uses one to verify the other. This behavior is particularly
useful for the testsuite, which wants to verify that the output of some tool
(e.g. llc) contains the expected information (for example, a movsd from esp or
whatever is interesting). This is similar to using grep, but it is optimized
for matching multiple different inputs in one file in a specific order.
-The I<match-filename> file specifies the file that contains the patterns to
+The *match-filename* file specifies the file that contains the patterns to
match. The file to verify is always read from standard input.
-=head1 OPTIONS
-=over
+OPTIONS
+-------
+
+
+
+**-help**
+
+ Print a summary of command line options.
+
+
+
+**--check-prefix** *prefix*
+
+ FileCheck searches the contents of *match-filename* for patterns to match. By
+ default, these patterns are prefixed with "CHECK:". If you'd like to use a
+ different prefix (e.g. because the same input file is checking multiple
+ different tool or options), the **--check-prefix** argument allows you to specify
+ a specific prefix to match.
+
+
-=item B<-help>
+**--strict-whitespace**
-Print a summary of command line options.
+ By default, FileCheck canonicalizes input horizontal whitespace (spaces and
+ tabs) which causes it to ignore these differences (a space will match a tab).
+ The --strict-whitespace argument disables this behavior.
-=item B<--check-prefix> I<prefix>
-FileCheck searches the contents of I<match-filename> for patterns to match. By
-default, these patterns are prefixed with "CHECK:". If you'd like to use a
-different prefix (e.g. because the same input file is checking multiple
-different tool or options), the B<--check-prefix> argument allows you to specify
-a specific prefix to match.
-=item B<--strict-whitespace>
+**-version**
-By default, FileCheck canonicalizes input horizontal whitespace (spaces and
-tabs) which causes it to ignore these differences (a space will match a tab).
-The --strict-whitespace argument disables this behavior.
+ Show the version number of this program.
-=item B<-version>
-Show the version number of this program.
-=back
-=head1 EXIT STATUS
+EXIT STATUS
+-----------
-If B<FileCheck> verifies that the file matches the expected contents, it exits
+
+If **FileCheck** verifies that the file matches the expected contents, it exits
with 0. Otherwise, if not, or if an error occurs, it will exit with a non-zero
value.
-=head1 TUTORIAL
+
+TUTORIAL
+--------
+
FileCheck is typically used from LLVM regression tests, being invoked on the RUN
line of the test. A simple example of using FileCheck from a RUN line looks
like this:
- ; RUN: llvm-as < %s | llc -march=x86-64 | FileCheck %s
+
+.. code-block:: perl
+
+ ; RUN: llvm-as < %s | llc -march=x86-64 | FileCheck %s
+
This syntax says to pipe the current file ("%s") into llvm-as, pipe that into
llc, then pipe the output of llc into FileCheck. This means that FileCheck will
be verifying its standard input (the llc output) against the filename argument
specified (the original .ll file specified by "%s"). To see how this works,
-lets look at the rest of the .ll file (after the RUN line):
-
- define void @sub1(i32* %p, i32 %v) {
- entry:
- ; <b>CHECK: sub1:</b>
- ; <b>CHECK: subl</b>
- %0 = tail call i32 @llvm.atomic.load.sub.i32.p0i32(i32* %p, i32 %v)
- ret void
- }
-
- define void @inc4(i64* %p) {
- entry:
- ; <b>CHECK: inc4:</b>
- ; <b>CHECK: incq</b>
- %0 = tail call i64 @llvm.atomic.load.add.i64.p0i64(i64* %p, i64 1)
- ret void
- }
+let's look at the rest of the .ll file (after the RUN line):
+
+
+.. code-block:: perl
+
+ define void @sub1(i32* %p, i32 %v) {
+ entry:
+ ; CHECK: sub1:
+ ; CHECK: subl
+ %0 = tail call i32 @llvm.atomic.load.sub.i32.p0i32(i32* %p, i32 %v)
+ ret void
+ }
+
+ define void @inc4(i64* %p) {
+ entry:
+ ; CHECK: inc4:
+ ; CHECK: incq
+ %0 = tail call i64 @llvm.atomic.load.add.i64.p0i64(i64* %p, i64 1)
+ ret void
+ }
+
Here you can see some "CHECK:" lines specified in comments. Now you can see
how the file is piped into llvm-as, then llc, and the machine code output is
@@ -102,35 +126,40 @@ is a "subl" in between those labels. If it existed somewhere else in the file,
that would not count: "grep subl" matches if subl exists anywhere in the
file.
+The FileCheck -check-prefix option
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-=head2 The FileCheck -check-prefix option
-
The FileCheck -check-prefix option allows multiple test configurations to be
driven from one .ll file. This is useful in many circumstances, for example,
testing different architectural variants with llc. Here's a simple example:
- ; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin9 -mattr=sse41 \
- ; RUN: | <b>FileCheck %s -check-prefix=X32</b>
- ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin9 -mattr=sse41 \
- ; RUN: | <b>FileCheck %s -check-prefix=X64</b>
-
- define <4 x i32> @pinsrd_1(i32 %s, <4 x i32> %tmp) nounwind {
- %tmp1 = insertelement <4 x i32>; %tmp, i32 %s, i32 1
- ret <4 x i32> %tmp1
- ; <b>X32:</b> pinsrd_1:
- ; <b>X32:</b> pinsrd $1, 4(%esp), %xmm0
-
- ; <b>X64:</b> pinsrd_1:
- ; <b>X64:</b> pinsrd $1, %edi, %xmm0
- }
+
+.. code-block:: perl
+
+ ; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin9 -mattr=sse41 \
+ ; RUN: | FileCheck %s -check-prefix=X32>
+ ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin9 -mattr=sse41 \
+ ; RUN: | FileCheck %s -check-prefix=X64>
+
+ define <4 x i32> @pinsrd_1(i32 %s, <4 x i32> %tmp) nounwind {
+ %tmp1 = insertelement <4 x i32>; %tmp, i32 %s, i32 1
+ ret <4 x i32> %tmp1
+ ; X32: pinsrd_1:
+ ; X32: pinsrd $1, 4(%esp), %xmm0
+
+ ; X64: pinsrd_1:
+ ; X64: pinsrd $1, %edi, %xmm0
+ }
+
In this case, we're testing that we get the expected code generation with
both 32-bit and 64-bit code generation.
+The "CHECK-NEXT:" directive
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
-=head2 The "CHECK-NEXT:" directive
Sometimes you want to match lines and would like to verify that matches
happen on exactly consecutive lines with no other lines in between them. In
@@ -138,64 +167,78 @@ this case, you can use CHECK: and CHECK-NEXT: directives to specify this. If
you specified a custom check prefix, just use "<PREFIX>-NEXT:". For
example, something like this works as you'd expect:
- define void @t2(<2 x double>* %r, <2 x double&gt;* %A, double %B) {
- %tmp3 = load <2 x double&gt;* %A, align 16
- %tmp7 = insertelement <2 x double&gt; undef, double %B, i32 0
- %tmp9 = shufflevector <2 x double&gt; %tmp3,
- <2 x double&gt; %tmp7,
- <2 x i32&gt; < i32 0, i32 2 &gt;
- store <2 x double&gt; %tmp9, <2 x double&gt;* %r, align 16
- ret void
-
- ; <b>CHECK:</b> t2:
- ; <b>CHECK:</b> movl 8(%esp), %eax
- ; <b>CHECK-NEXT:</b> movapd (%eax), %xmm0
- ; <b>CHECK-NEXT:</b> movhpd 12(%esp), %xmm0
- ; <b>CHECK-NEXT:</b> movl 4(%esp), %eax
- ; <b>CHECK-NEXT:</b> movapd %xmm0, (%eax)
- ; <b>CHECK-NEXT:</b> ret
- }
+
+.. code-block:: perl
+
+ define void @t2(<2 x double>* %r, <2 x double&gt;* %A, double %B) {
+ %tmp3 = load <2 x double&gt;* %A, align 16
+ %tmp7 = insertelement <2 x double&gt; undef, double %B, i32 0
+ %tmp9 = shufflevector <2 x double&gt; %tmp3,
+ <2 x double&gt; %tmp7,
+ <2 x i32&gt; < i32 0, i32 2 &gt;
+ store <2 x double&gt; %tmp9, <2 x double&gt;* %r, align 16
+ ret void
+
+ ; CHECK: t2:
+ ; CHECK: movl 8(%esp), %eax
+ ; CHECK-NEXT: movapd (%eax), %xmm0
+ ; CHECK-NEXT: movhpd 12(%esp), %xmm0
+ ; CHECK-NEXT: movl 4(%esp), %eax
+ ; CHECK-NEXT: movapd %xmm0, (%eax)
+ ; CHECK-NEXT: ret
+ }
+
CHECK-NEXT: directives reject the input unless there is exactly one newline
between it an the previous directive. A CHECK-NEXT cannot be the first
directive in a file.
+The "CHECK-NOT:" directive
+~~~~~~~~~~~~~~~~~~~~~~~~~~
-=head2 The "CHECK-NOT:" directive
The CHECK-NOT: directive is used to verify that a string doesn't occur
between two matches (or before the first match, or after the last match). For
example, to verify that a load is removed by a transformation, a test like this
can be used:
- define i8 @coerce_offset0(i32 %V, i32* %P) {
- store i32 %V, i32* %P
-
- %P2 = bitcast i32* %P to i8*
- %P3 = getelementptr i8* %P2, i32 2
- %A = load i8* %P3
- ret i8 %A
- ; <b>CHECK:</b> @coerce_offset0
- ; <b>CHECK-NOT:</b> load
- ; <b>CHECK:</b> ret i8
- }
+.. code-block:: perl
+
+ define i8 @coerce_offset0(i32 %V, i32* %P) {
+ store i32 %V, i32* %P
+
+ %P2 = bitcast i32* %P to i8*
+ %P3 = getelementptr i8* %P2, i32 2
+
+ %A = load i8* %P3
+ ret i8 %A
+ ; CHECK: @coerce_offset0
+ ; CHECK-NOT: load
+ ; CHECK: ret i8
+ }
-=head2 FileCheck Pattern Matching Syntax
+FileCheck Pattern Matching Syntax
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
The CHECK: and CHECK-NOT: directives both take a pattern to match. For most
uses of FileCheck, fixed string matching is perfectly sufficient. For some
things, a more flexible form of matching is desired. To support this, FileCheck
allows you to specify regular expressions in matching strings, surrounded by
-double braces: B<{{yourregex}}>. Because we want to use fixed string
+double braces: **{{yourregex}}**. Because we want to use fixed string
matching for a majority of what we do, FileCheck has been designed to support
mixing and matching fixed string matching with regular expressions. This allows
you to write things like this:
- ; CHECK: movhpd <b>{{[0-9]+}}</b>(%esp), <b>{{%xmm[0-7]}}</b>
+
+.. code-block:: perl
+
+ ; CHECK: movhpd {{[0-9]+}}(%esp), {{%xmm[0-7]}}
+
In this case, any offset from the ESP register will be allowed, and any xmm
register will be allowed.
@@ -204,11 +247,12 @@ Because regular expressions are enclosed with double braces, they are
visually distinct, and you don't need to use escape characters within the double
braces like you would in C. In the rare case that you want to match double
braces explicitly from the input, you can use something ugly like
-B<{{[{][{]}}> as your pattern.
+**{{[{][{]}}** as your pattern.
+FileCheck Variables
+~~~~~~~~~~~~~~~~~~~
-=head2 FileCheck Variables
It is often useful to match a pattern and then verify that it occurs again
later in the file. For codegen tests, this can be useful to allow any register,
@@ -216,30 +260,25 @@ but verify that that register is used consistently later. To do this, FileCheck
allows named variables to be defined and substituted into patterns. Here is a
simple example:
- ; CHECK: test5:
- ; CHECK: notw <b>[[REGISTER:%[a-z]+]]</b>
- ; CHECK: andw {{.*}}<b>[[REGISTER]]</b>
-The first check line matches a regex (<tt>%[a-z]+</tt>) and captures it into
-the variables "REGISTER". The second line verifies that whatever is in REGISTER
+.. code-block:: perl
+
+ ; CHECK: test5:
+ ; CHECK: notw [[REGISTER:%[a-z]+]]
+ ; CHECK: andw {{.*}}[REGISTER]]
+
+
+The first check line matches a regex (**%[a-z]+**) and captures it into
+the variable "REGISTER". The second line verifies that whatever is in REGISTER
occurs later in the file after an "andw". FileCheck variable references are
-always contained in <tt>[[ ]]</tt> pairs, are named, and their names can be
-formed with the regex "<tt>[a-zA-Z_][a-zA-Z0-9_]*</tt>". If a colon follows the
+always contained in **[[ ]]** pairs, are named, and their names can be
name, then it is a definition of the variable, if not, it is a use.
FileCheck variables can be defined multiple times, and uses always get the
latest value. Note that variables are all read at the start of a "CHECK" line
and are all defined at the end. This means that if you have something like
-"<tt>CHECK: [[XYZ:.*]]x[[XYZ]]<tt>" that the check line will read the previous
+"**CHECK: [[XYZ:.\\*]]x[[XYZ]]**", the check line will read the previous
value of the XYZ variable and define a new one after the match is performed. If
you need to do something like this you can probably take advantage of the fact
that FileCheck is not actually line-oriented when it matches, this allows you to
define two separate CHECK lines that match on the same line.
-
-
-
-=head1 AUTHORS
-
-Maintained by The LLVM Team (L<http://llvm.org/>).
-
-=cut
View
103 docs/CommandGuide/Makefile
@@ -1,103 +0,0 @@
-##===- docs/CommandGuide/Makefile --------------------------*- Makefile -*-===##
-#
-# The LLVM Compiler Infrastructure
-#
-# This file is distributed under the University of Illinois Open Source
-# License. See LICENSE.TXT for details.
-#
-##===----------------------------------------------------------------------===##
-
-ifdef BUILD_FOR_WEBSITE
-# This special case is for keeping the CommandGuide on the LLVM web site
-# up to date automatically as the documents are checked in. It must build
-# the POD files to HTML only and keep them in the src directories. It must also
-# build in an unconfigured tree, hence the ifdef. To use this, run
-# make -s BUILD_FOR_WEBSITE=1 inside the cvs commit script.
-SRC_DOC_DIR=
-DST_HTML_DIR=html/
-DST_MAN_DIR=man/man1/
-DST_PS_DIR=ps/
-
-# If we are in BUILD_FOR_WEBSITE mode, default to the all target.
-all:: html man ps
-
-clean:
- rm -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
-
-# To create other directories, as needed, and timestamp their creation
-%/.dir:
- -mkdir $* > /dev/null
- date > $@
-
-else
-
-# Otherwise, if not in BUILD_FOR_WEBSITE mode, use the project info.
-LEVEL := ../..
-include $(LEVEL)/Makefile.common
-
-SRC_DOC_DIR=$(PROJ_SRC_DIR)/
-DST_HTML_DIR=$(PROJ_OBJ_DIR)/
-DST_MAN_DIR=$(PROJ_OBJ_DIR)/
-DST_PS_DIR=$(PROJ_OBJ_DIR)/
-
-endif
-
-
-POD := $(wildcard $(SRC_DOC_DIR)*.pod)
-HTML := $(patsubst $(SRC_DOC_DIR)%.pod, $(DST_HTML_DIR)%.html, $(POD))
-MAN := $(patsubst $(SRC_DOC_DIR)%.pod, $(DST_MAN_DIR)%.1, $(POD))
-PS := $(patsubst $(SRC_DOC_DIR)%.pod, $(DST_PS_DIR)%.ps, $(POD))
-
-# The set of man pages we will not install
-NO_INSTALL_MANS = $(DST_MAN_DIR)FileCheck.1 $(DST_MAN_DIR)llvm-build.1
-
-# The set of man pages that we will install
-INSTALL_MANS = $(filter-out $(NO_INSTALL_MANS), $(MAN))
-
-.SUFFIXES:
-.SUFFIXES: .html .pod .1 .ps
-
-$(DST_HTML_DIR)%.html: %.pod $(DST_HTML_DIR)/.dir
- pod2html --css=manpage.css --htmlroot=. \
- --podpath=. --noindex --infile=$< --outfile=$@ --title=$*
-
-$(DST_MAN_DIR)%.1: %.pod $(DST_MAN_DIR)/.dir
- pod2man --release=CVS --center="LLVM Command Guide" $< $@
-
-$(DST_PS_DIR)%.ps: $(DST_MAN_DIR)%.1 $(DST_PS_DIR)/.dir
- groff -Tps -man $< > $@
-
-
-html: $(HTML)
-man: $(MAN)
-ps: $(PS)
-
-EXTRA_DIST := $(POD) index.html
-
-clean-local::
- $(Verb) $(RM) -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
-
-HTML_DIR := $(DESTDIR)$(PROJ_docsdir)/html/CommandGuide
-MAN_DIR := $(DESTDIR)$(PROJ_mandir)/man1
-PS_DIR := $(DESTDIR)$(PROJ_docsdir)/ps
-
-install-local:: $(HTML) $(INSTALL_MANS) $(PS)
- $(Echo) Installing HTML CommandGuide Documentation
- $(Verb) $(MKDIR) $(HTML_DIR)
- $(Verb) $(DataInstall) $(HTML) $(HTML_DIR)
- $(Verb) $(DataInstall) $(PROJ_SRC_DIR)/index.html $(HTML_DIR)
- $(Verb) $(DataInstall) $(PROJ_SRC_DIR)/manpage.css $(HTML_DIR)
- $(Echo) Installing MAN CommandGuide Documentation
- $(Verb) $(MKDIR) $(MAN_DIR)
- $(Verb) $(DataInstall) $(INSTALL_MANS) $(MAN_DIR)
- $(Echo) Installing PS CommandGuide Documentation
- $(Verb) $(MKDIR) $(PS_DIR)
- $(Verb) $(DataInstall) $(PS) $(PS_DIR)
-
-uninstall-local::
- $(Echo) Uninstalling CommandGuide Documentation
- $(Verb) $(RM) -rf $(HTML_DIR) $(MAN_DIR) $(PS_DIR)
-
-printvars::
- $(Echo) "POD : " '$(POD)'
- $(Echo) "HTML : " '$(HTML)'
View
186 docs/CommandGuide/bugpoint.pod
@@ -1,186 +0,0 @@
-=pod
-
-=head1 NAME
-
-bugpoint - automatic test case reduction tool
-
-=head1 SYNOPSIS
-
-B<bugpoint> [I<options>] [I<input LLVM ll/bc files>] [I<LLVM passes>] B<--args>
-I<program arguments>
-
-=head1 DESCRIPTION
-
-B<bugpoint> narrows down the source of problems in LLVM tools and passes. It
-can be used to debug three types of failures: optimizer crashes, miscompilations
-by optimizers, or bad native code generation (including problems in the static
-and JIT compilers). It aims to reduce large test cases to small, useful ones.
-For more information on the design and inner workings of B<bugpoint>, as well as
-advice for using bugpoint, see F<llvm/docs/Bugpoint.html> in the LLVM
-distribution.
-
-=head1 OPTIONS
-
-=over
-
-=item B<--additional-so> F<library>
-
-Load the dynamic shared object F<library> into the test program whenever it is
-run. This is useful if you are debugging programs which depend on non-LLVM
-libraries (such as the X or curses libraries) to run.
-
-=item B<--append-exit-code>=I<{true,false}>
-
-Append the test programs exit code to the output file so that a change in exit
-code is considered a test failure. Defaults to false.
-
-=item B<--args> I<program args>
-
-Pass all arguments specified after -args to the test program whenever it runs.
-Note that if any of the I<program args> start with a '-', you should use:
-
- bugpoint [bugpoint args] --args -- [program args]
-
-The "--" right after the B<--args> option tells B<bugpoint> to consider any
-options starting with C<-> to be part of the B<--args> option, not as options to
-B<bugpoint> itself.
-
-=item B<--tool-args> I<tool args>
-
-Pass all arguments specified after --tool-args to the LLVM tool under test
-(B<llc>, B<lli>, etc.) whenever it runs. You should use this option in the
-following way:
-
- bugpoint [bugpoint args] --tool-args -- [tool args]
-
-The "--" right after the B<--tool-args> option tells B<bugpoint> to consider any
-options starting with C<-> to be part of the B<--tool-args> option, not as
-options to B<bugpoint> itself. (See B<--args>, above.)
-
-=item B<--safe-tool-args> I<tool args>
-
-Pass all arguments specified after B<--safe-tool-args> to the "safe" execution
-tool.
-
-=item B<--gcc-tool-args> I<gcc tool args>
-
-Pass all arguments specified after B<--gcc-tool-args> to the invocation of
-B<gcc>.
-
-=item B<--opt-args> I<opt args>
-
-Pass all arguments specified after B<--opt-args> to the invocation of B<opt>.
-
-=item B<--disable-{dce,simplifycfg}>
-
-Do not run the specified passes to clean up and reduce the size of the test
-program. By default, B<bugpoint> uses these passes internally when attempting to
-reduce test programs. If you're trying to find a bug in one of these passes,
-B<bugpoint> may crash.
-
-=item B<--enable-valgrind>
-
-Use valgrind to find faults in the optimization phase. This will allow
-bugpoint to find otherwise asymptomatic problems caused by memory
-mis-management.
-
-=item B<-find-bugs>
-
-Continually randomize the specified passes and run them on the test program
-until a bug is found or the user kills B<bugpoint>.
-
-=item B<-help>
-
-Print a summary of command line options.
-
-=item B<--input> F<filename>
-
-Open F<filename> and redirect the standard input of the test program, whenever
-it runs, to come from that file.
-
-=item B<--load> F<plugin>
-
-Load the dynamic object F<plugin> into B<bugpoint> itself. This object should
-register new optimization passes. Once loaded, the object will add new command
-line options to enable various optimizations. To see the new complete list of
-optimizations, use the B<-help> and B<--load> options together; for example:
-
- bugpoint --load myNewPass.so -help
-
-=item B<--mlimit> F<megabytes>
-
-Specifies an upper limit on memory usage of the optimization and codegen. Set
-to zero to disable the limit.
-
-=item B<--output> F<filename>
-
-Whenever the test program produces output on its standard output stream, it
-should match the contents of F<filename> (the "reference output"). If you
-do not use this option, B<bugpoint> will attempt to generate a reference output
-by compiling the program with the "safe" backend and running it.
-
-=item B<--profile-info-file> F<filename>
-
-Profile file loaded by B<--profile-loader>.
-
-=item B<--run-{int,jit,llc,cbe,custom}>
-
-Whenever the test program is compiled, B<bugpoint> should generate code for it
-using the specified code generator. These options allow you to choose the
-interpreter, the JIT compiler, the static native code compiler, the C
-backend, or a custom command (see B<--exec-command>) respectively.
-
-=item B<--safe-{llc,cbe,custom}>
-
-When debugging a code generator, B<bugpoint> should use the specified code
-generator as the "safe" code generator. This is a known-good code generator
-used to generate the "reference output" if it has not been provided, and to
-compile portions of the program that as they are excluded from the testcase.
-These options allow you to choose the
-static native code compiler, the C backend, or a custom command,
-(see B<--exec-command>) respectively. The interpreter and the JIT backends
-cannot currently be used as the "safe" backends.
-
-=item B<--exec-command> I<command>
-
-This option defines the command to use with the B<--run-custom> and
-B<--safe-custom> options to execute the bitcode testcase. This can
-be useful for cross-compilation.
-
-=item B<--compile-command> I<command>
-
-This option defines the command to use with the B<--compile-custom>
-option to compile the bitcode testcase. This can be useful for
-testing compiler output without running any link or execute stages. To
-generate a reduced unit test, you may add CHECK directives to the
-testcase and pass the name of an executable compile-command script in this form:
-
- #!/bin/sh
- llc "$@"
- not FileCheck [bugpoint input file].ll < bugpoint-test-program.s
-
-This script will "fail" as long as FileCheck passes. So the result
-will be the minimum bitcode that passes FileCheck.
-
-=item B<--safe-path> I<path>
-
-This option defines the path to the command to execute with the
-B<--safe-{int,jit,llc,cbe,custom}>
-option.
-
-=back
-
-=head1 EXIT STATUS
-
-If B<bugpoint> succeeds in finding a problem, it will exit with 0. Otherwise,
-if an error occurs, it will exit with a non-zero value.
-
-=head1 SEE ALSO
-
-L<opt|opt>
-
-=head1 AUTHOR
-
-Maintained by the LLVM Team (L<http://llvm.org/>).
-
-=cut
View
247 docs/CommandGuide/bugpoint.rst
@@ -0,0 +1,247 @@
+bugpoint - automatic test case reduction tool
+=============================================
+
+
+SYNOPSIS
+--------
+
+
+**bugpoint** [*options*] [*input LLVM ll/bc files*] [*LLVM passes*] **--args**
+*program arguments*
+
+
+DESCRIPTION
+-----------
+
+
+**bugpoint** narrows down the source of problems in LLVM tools and passes. It
+can be used to debug three types of failures: optimizer crashes, miscompilations
+by optimizers, or bad native code generation (including problems in the static
+and JIT compilers). It aims to reduce large test cases to small, useful ones.
+For more information on the design and inner workings of **bugpoint**, as well as
+advice for using bugpoint, see *llvm/docs/Bugpoint.html* in the LLVM
+distribution.
+
+
+OPTIONS
+-------
+
+
+
+**--additional-so** *library*
+
+ Load the dynamic shared object *library* into the test program whenever it is
+ run. This is useful if you are debugging programs which depend on non-LLVM
+ libraries (such as the X or curses libraries) to run.
+
+
+
+**--append-exit-code**\ =\ *{true,false}*
+
+ Append the test programs exit code to the output file so that a change in exit
+ code is considered a test failure. Defaults to false.
+
+
+
+**--args** *program args*
+
+ Pass all arguments specified after -args to the test program whenever it runs.
+ Note that if any of the *program args* start with a '-', you should use:
+
+
+ .. code-block:: perl
+
+ bugpoint [bugpoint args] --args -- [program args]
+
+
+ The "--" right after the **--args** option tells **bugpoint** to consider any
+ options starting with ``-`` to be part of the **--args** option, not as options to
+ **bugpoint** itself.
+
+
+
+**--tool-args** *tool args*
+
+ Pass all arguments specified after --tool-args to the LLVM tool under test
+ (**llc**, **lli**, etc.) whenever it runs. You should use this option in the
+ following way:
+
+
+ .. code-block:: perl
+
+ bugpoint [bugpoint args] --tool-args -- [tool args]
+
+
+ The "--" right after the **--tool-args** option tells **bugpoint** to consider any
+ options starting with ``-`` to be part of the **--tool-args** option, not as
+ options to **bugpoint** itself. (See **--args**, above.)
+
+
+
+**--safe-tool-args** *tool args*
+
+ Pass all arguments specified after **--safe-tool-args** to the "safe" execution
+ tool.
+
+
+
+**--gcc-tool-args** *gcc tool args*
+
+ Pass all arguments specified after **--gcc-tool-args** to the invocation of
+ **gcc**.
+
+
+
+**--opt-args** *opt args*
+
+ Pass all arguments specified after **--opt-args** to the invocation of **opt**.
+
+
+
+**--disable-{dce,simplifycfg}**
+
+ Do not run the specified passes to clean up and reduce the size of the test
+ program. By default, **bugpoint** uses these passes internally when attempting to
+ reduce test programs. If you're trying to find a bug in one of these passes,
+ **bugpoint** may crash.
+
+
+
+**--enable-valgrind**
+
+ Use valgrind to find faults in the optimization phase. This will allow
+ bugpoint to find otherwise asymptomatic problems caused by memory
+ mis-management.
+
+
+
+**-find-bugs**
+
+ Continually randomize the specified passes and run them on the test program
+ until a bug is found or the user kills **bugpoint**.
+
+
+
+**-help**
+
+ Print a summary of command line options.
+
+
+
+**--input** *filename*
+
+ Open *filename* and redirect the standard input of the test program, whenever
+ it runs, to come from that file.
+
+
+
+**--load** *plugin*
+
+ Load the dynamic object *plugin* into **bugpoint** itself. This object should
+ register new optimization passes. Once loaded, the object will add new command
+ line options to enable various optimizations. To see the new complete list of
+ optimizations, use the **-help** and **--load** options together; for example:
+
+
+ .. code-block:: perl
+
+ bugpoint --load myNewPass.so -help
+
+
+
+
+**--mlimit** *megabytes*
+
+ Specifies an upper limit on memory usage of the optimization and codegen. Set
+ to zero to disable the limit.
+
+
+
+**--output** *filename*
+
+ Whenever the test program produces output on its standard output stream, it
+ should match the contents of *filename* (the "reference output"). If you
+ do not use this option, **bugpoint** will attempt to generate a reference output
+ by compiling the program with the "safe" backend and running it.
+
+
+
+**--profile-info-file** *filename*
+
+ Profile file loaded by **--profile-loader**.
+
+
+
+**--run-{int,jit,llc,custom}**
+
+ Whenever the test program is compiled, **bugpoint** should generate code for it
+ using the specified code generator. These options allow you to choose the
+ interpreter, the JIT compiler, the static native code compiler, or a
+ custom command (see **--exec-command**) respectively.
+
+
+
+**--safe-{llc,custom}**
+
+ When debugging a code generator, **bugpoint** should use the specified code
+ generator as the "safe" code generator. This is a known-good code generator
+ used to generate the "reference output" if it has not been provided, and to
+ compile portions of the program that as they are excluded from the testcase.
+ These options allow you to choose the
+ static native code compiler, or a custom command, (see **--exec-command**)
+ respectively. The interpreter and the JIT backends cannot currently
+ be used as the "safe" backends.
+
+
+
+**--exec-command** *command*
+
+ This option defines the command to use with the **--run-custom** and
+ **--safe-custom** options to execute the bitcode testcase. This can
+ be useful for cross-compilation.
+
+
+
+**--compile-command** *command*
+
+ This option defines the command to use with the **--compile-custom**
+ option to compile the bitcode testcase. This can be useful for
+ testing compiler output without running any link or execute stages. To
+ generate a reduced unit test, you may add CHECK directives to the
+ testcase and pass the name of an executable compile-command script in this form:
+
+
+ .. code-block:: perl
+
+ #!/bin/sh
+ llc "$@"
+ not FileCheck [bugpoint input file].ll < bugpoint-test-program.s
+
+
+ This script will "fail" as long as FileCheck passes. So the result
+ will be the minimum bitcode that passes FileCheck.
+
+
+
+**--safe-path** *path*
+
+ This option defines the path to the command to execute with the
+ **--safe-{int,jit,llc,custom}**
+ option.
+
+
+
+
+EXIT STATUS
+-----------
+
+
+If **bugpoint** succeeds in finding a problem, it will exit with 0. Otherwise,
+if an error occurs, it will exit with a non-zero value.
+
+
+SEE ALSO
+--------
+
+
+opt|opt
View
256 docs/CommandGuide/html/manpage.css
@@ -1,256 +0,0 @@
-/* Based on http://www.perldoc.com/css/perldoc.css */
-
-@import url("../llvm.css");
-
-body { font-family: Arial,Helvetica; }
-
-blockquote { margin: 10pt; }
-
-h1, a { color: #336699; }
-
-
-/*** Top menu style ****/
-.mmenuon {
- font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
- color: #ff6600; font-size: 10pt;
- }
-.mmenuoff {
- font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
- color: #ffffff; font-size: 10pt;
-}
-.cpyright {
- font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
- color: #ffffff; font-size: xx-small;
-}
-.cpyrightText {
- font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
- color: #ffffff; font-size: xx-small;
-}
-.sections {
- font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
- color: #336699; font-size: 11pt;
-}
-.dsections {
- font-family: Arial,Helvetica; font-weight: bold; text-decoration: none;
- color: #336699; font-size: 12pt;
-}
-.slink {