oota-llvm.git
11 years agoAdd the `lto_codegen_set_export_dynamic' function.
Bill Wendling [Sat, 8 Dec 2012 00:18:16 +0000 (00:18 +0000)]
Add the `lto_codegen_set_export_dynamic' function.

This function sets the `_exportDynamic' ivar. When that's set, we export all
symbols (e.g. we don't run the internalize pass). This is equivalent to the
`--export-dynamic' linker flag in GNU land:

--export-dynamic
  When creating a dynamically linked executable, add all symbols to the dynamic
  symbol table. The dynamic symbol table is the set of symbols which are visible
  from dynamic objects at run time. If you do not use this option, the dynamic
  symbol table will normally contain only those symbols which are referenced by
  some dynamic object mentioned in the link. If you use dlopen to load a dynamic
  object which needs to refer back to the symbols defined by the program, rather
  than some other dynamic object, then you will probably need to use this option
  when linking the program itself.

The Darwin linker will support this via the `-export_dynamic' flag. We should
modify clang to support this via the `-rdynamic' flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169656 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd C API for specifying CPU to the disassembler.
Jim Grosbach [Fri, 7 Dec 2012 23:53:27 +0000 (23:53 +0000)]
Add C API for specifying CPU to the disassembler.

It was a nasty oversight that we didn't include this when we added this
API in the first place. Blech.

rdar://12839439

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169653 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agos/AttrListPtr/AttributeSet/g to better label what this class is going to be in the...
Bill Wendling [Fri, 7 Dec 2012 23:16:57 +0000 (23:16 +0000)]
s/AttrListPtr/AttributeSet/g to better label what this class is going to be in the near future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169651 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMake the contents of encoded sections SmallVector<char, N> instead of
Eli Bendersky [Fri, 7 Dec 2012 22:06:56 +0000 (22:06 +0000)]
Make the contents of encoded sections SmallVector<char, N> instead of
SmallString. This makes it possible to use the length-erased SmallVectorImpl
in the interface without imposing buffer size. Thus, the size of MCInstFragment
is back down since a preallocated 8-byte contents buffer is enough.

It would be generally a good idea to rid all the fragments of SmallString as
contents, because a vector just makes more sense.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169644 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoWhen we use the BLEND instruction that uses the MSB as a mask, we can remove
Nadav Rotem [Fri, 7 Dec 2012 21:43:11 +0000 (21:43 +0000)]
When we use the BLEND instruction that uses the MSB as a mask, we can remove
the VSRI instruction before it since it does not affect the MSB.

Thanks Craig Topper for suggesting this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169638 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove trailing whitespace
Michael Ilseman [Fri, 7 Dec 2012 21:41:53 +0000 (21:41 +0000)]
Remove trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169637 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoIn hexagon convertToHardwareLoop, don't deref end() iterator
Matthew Curtis [Fri, 7 Dec 2012 21:03:15 +0000 (21:03 +0000)]
In hexagon convertToHardwareLoop, don't deref end() iterator

In particular, check if MachineBasicBlock::iterator is end() before
using it to call getDebugLoc();

See also this thread on llvm-commits:
   http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121112/155914.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169634 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMark ImmutableMap::remove/add() const.
Ted Kremenek [Fri, 7 Dec 2012 19:44:12 +0000 (19:44 +0000)]
Mark ImmutableMap::remove/add() const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169629 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFixed some grammar and punctuation error.
John Criswell [Fri, 7 Dec 2012 19:21:10 +0000 (19:21 +0000)]
Fixed some grammar and punctuation error.
No content changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169627 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRefactor MCInstFragment and MCDataFragment to adhere to a common interface,
Eli Bendersky [Fri, 7 Dec 2012 19:13:57 +0000 (19:13 +0000)]
Refactor MCInstFragment and MCDataFragment to adhere to a common interface,
which removes code duplication and prepares the ground for future additions.

Full discussion:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121203/158233.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169626 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoX86: Prefer using VPSHUFD over VPERMIL because it has better throughput.
Nadav Rotem [Fri, 7 Dec 2012 19:01:13 +0000 (19:01 +0000)]
X86: Prefer using VPSHUFD over VPERMIL because it has better throughput.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169624 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd separate statistics for Data and Inst fragments emitted during relaxation.
Eli Bendersky [Fri, 7 Dec 2012 17:59:21 +0000 (17:59 +0000)]
Add separate statistics for Data and Inst fragments emitted during relaxation.
Also fixes a test that was overly-sensitive to the exact order of statistics
emitted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169619 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSome common functionality from WinCOFFStreamer::EmitAssignment can be now
Eli Bendersky [Fri, 7 Dec 2012 17:55:28 +0000 (17:55 +0000)]
Some common functionality from WinCOFFStreamer::EmitAssignment can be now
delegated to MCObjectStreamer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169617 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoLift EmitAssignment into MCObjectStreamer which gets rid of at least three
Eli Bendersky [Fri, 7 Dec 2012 17:42:41 +0000 (17:42 +0000)]
Lift EmitAssignment into MCObjectStreamer which gets rid of at least three
duplicate implementations in format-specific streamers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169613 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdded Mapping Symbols for ARM ELF
Tim Northover [Fri, 7 Dec 2012 16:50:23 +0000 (16:50 +0000)]
Added Mapping Symbols for ARM ELF

Before this patch, when you objdump an LLVM-compiled file, objdump tried to
decode data-in-code sections as if they were code.  This patch adds the missing
Mapping Symbols, as defined by "ELF for the ARM Architecture" (ARM IHI 0044D).

Patch based on work by Greg Fitzgerald.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169609 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoConvert HowToReleaseLLVM.html to reST
Dmitri Gribenko [Fri, 7 Dec 2012 16:42:48 +0000 (16:42 +0000)]
Convert HowToReleaseLLVM.html to reST

Patch by Alexander Zinenko.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169608 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoThe test unconditionally assumes a particular cpu has a backend build in the target.
David Tweed [Fri, 7 Dec 2012 15:57:45 +0000 (15:57 +0000)]
The test unconditionally assumes a particular cpu has a backend build in the target.
Buildbots for some hosts may choose to build only their own backend in order to
maximise testing-turnaround time. Move the test into a prefixed directory so
lit's standard "backend specific" suppression can be done.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169604 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSplit MCELFStreamer into a header file.
Logan Chien [Fri, 7 Dec 2012 15:50:40 +0000 (15:50 +0000)]
Split MCELFStreamer into a header file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169603 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agodocs: Convert LangRef to reST.
Sean Silva [Fri, 7 Dec 2012 10:36:55 +0000 (10:36 +0000)]
docs: Convert LangRef to reST.

NOTE: If you have any patches in the works that modify LangRef, you will
need to rewrite the changes to LangRef.html to their equivalents in
LangRef.rst. If you need assistance feel free to contact me.

Since LangRef is mission-critical for the project and "normative", I
have taken extra care to ensure that no content was lost or altered in
the conversion. The content was converted with a tool called `pandoc`,
so there is no chance for a human error like accidentally forgetting a
sentence or whatever. After the initial conversion by `pandoc`, only
changes to the markup were done.

This is just the most literal conversion of the HTML document as
possible. It might be worth exploring some way to chop up this massive
document into separate pages, e.g. something like
`docs/LangRef/Instructions.rst`, `docs/LangRef/Intrinsics.rst`, etc.
with `docs/LangRef.rst` being an "intro/navigation page" of sorts. On
the other hand, that loses the ability to {Ctrl,Cmd}-F for a given term
right from your browser.

IMO, I think our stylesheet needs some work because I find it hard to
tell what level of nesting some of the headings are at (e.g. "is this a
new section or is it a subsection?"). The issue is present on other
pages, but the sheer size and deep section structure of LangRef really
brings this issue out. If there are any web designers out there in the
community it would be awesome if you tried to come up with something
nicer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169596 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[msan] Remove readonly/readnone attributes from all called functions.
Evgeniy Stepanov [Fri, 7 Dec 2012 09:08:32 +0000 (09:08 +0000)]
[msan] Remove readonly/readnone attributes from all called functions.

MSan uses a TLS slot to pass shadow for function arguments and return values.
This makes all instrumented functions not readonly, and at the same time
requires that all callees of an instrumented function that may be
MSan-instrumented do not have readonly attribute (otherwise some of the
instrumentation may be optimized out).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169591 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse the new MIBundleBuilder class in the Mips target.
Jakob Stoklund Olesen [Fri, 7 Dec 2012 04:23:40 +0000 (04:23 +0000)]
Use the new MIBundleBuilder class in the Mips target.

This is the preferred way of creating bundled machine instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169585 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd an MIBundleBuilder class.
Jakob Stoklund Olesen [Fri, 7 Dec 2012 04:23:35 +0000 (04:23 +0000)]
Add an MIBundleBuilder class.

Like the MachineInstrBuilder, this class makes it easier to build
bundles of MachineInstrs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169584 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd higher-level API for dealing with bundled MachineInstrs.
Jakob Stoklund Olesen [Fri, 7 Dec 2012 04:23:29 +0000 (04:23 +0000)]
Add higher-level API for dealing with bundled MachineInstrs.

This is still a work in progress. The purpose is to make bundling and
unbundling operations explicit, and to catch errors where bundles are
broken or created inadvertently.

The old IsInsideBundle flag is replaced by two MI flags: BundledPred
which has the same meaning as IsInsideBundle, and BundledSucc which is
set on instructions that are bundled with a successor. Having two flags
provdes redundancy to detect when a bundle is inadvertently torn by a
splice() or insert(), and it makes it possible to write bundle iterators
that don't need to peek at adjacent instructions.

The new flags can't be manipulated directly (once setIsInsideBundle is
gone). Instead there are MI functions to make and break bundle bonds.

The setIsInsideBundle function will be removed in a future commit. It
should be replaced by bundleWithPred().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169583 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips] Delete nodes and instructions for dynamic alloca that are no longer in
Akira Hatanaka [Fri, 7 Dec 2012 03:10:18 +0000 (03:10 +0000)]
[mips] Delete nodes and instructions for dynamic alloca that are no longer in
use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169580 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips] Shorten predicate name.
Akira Hatanaka [Fri, 7 Dec 2012 03:06:09 +0000 (03:06 +0000)]
[mips] Shorten predicate name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169579 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips] Delete unused sub-target features.
Akira Hatanaka [Fri, 7 Dec 2012 03:04:05 +0000 (03:04 +0000)]
[mips] Delete unused sub-target features.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169578 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[mips] Remove unnecessary predicates.
Akira Hatanaka [Fri, 7 Dec 2012 03:01:24 +0000 (03:01 +0000)]
[mips] Remove unnecessary predicates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169577 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd support to ValueTracking for determining that a pointer is non-null
Chandler Carruth [Fri, 7 Dec 2012 02:08:58 +0000 (02:08 +0000)]
Add support to ValueTracking for determining that a pointer is non-null
by virtue of inbounds GEPs that preclude a null pointer.

This is a very common pattern in the code generated by std::vector and
other standard library routines which use allocators that test for null
pervasively. This is one step closer to teaching Clang+LLVM to be able
to produce an empty function for:

  void f() {
    std::vector<int> v;
    v.push_back(1);
    v.push_back(2);
    v.push_back(3);
    v.push_back(4);
  }

Which is related to getting them to completely fold SmallVector
push_back sequences into constants when inlining and other optimizations
make that a possibility.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169573 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd manualRetain() and manualRelease() to ImmutableMapRef, and add a new constructor.
Ted Kremenek [Fri, 7 Dec 2012 02:03:00 +0000 (02:03 +0000)]
Add manualRetain() and manualRelease() to ImmutableMapRef, and add a new constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169572 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMakefile.common: Update a description, s/Source/SOURCES/ , according to MakefileGuide...
NAKAMURA Takumi [Fri, 7 Dec 2012 01:43:23 +0000 (01:43 +0000)]
Makefile.common: Update a description, s/Source/SOURCES/ , according to MakefileGuide.html#control-variables .

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169569 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agounittest/googletest/Makefile: Unbreak out-of-tree build.
NAKAMURA Takumi [Fri, 7 Dec 2012 01:25:45 +0000 (01:25 +0000)]
unittest/googletest/Makefile: Unbreak out-of-tree build.

  - Use SOURCES instead of Source. See Makefile.rules and MakefileGuide.html.
  - Don't assume the current directory. $(wildcard *.cc) doesn't match anything on corresponding build directory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169568 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd convenience accessor to Triple for OS == NaCl
Eli Bendersky [Fri, 7 Dec 2012 00:01:53 +0000 (00:01 +0000)]
Add convenience accessor to Triple for OS == NaCl

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169565 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTry to unbreak makefile build by excluding gtest-all.cc source
Alexey Samsonov [Thu, 6 Dec 2012 23:59:54 +0000 (23:59 +0000)]
Try to unbreak makefile build by excluding gtest-all.cc source

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169564 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd a 'using' declaration to suppress GCC's -Woverloaded-virtual while we
Matt Beaumont-Gay [Thu, 6 Dec 2012 23:15:36 +0000 (23:15 +0000)]
Add a 'using' declaration to suppress GCC's -Woverloaded-virtual while we
decide what pattern we want to follow in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169561 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoModify the LLVM checkout of googletest:
Alexey Samsonov [Thu, 6 Dec 2012 23:04:41 +0000 (23:04 +0000)]
Modify the LLVM checkout of googletest:
1) don't delete gtest-all.cc (which is used to gather all gtest source
   files in a single file)
2) make including LLVMSupport headers optional (on by default).
   Sanitizer tools may want to use their own versions of googletest
   compiled with specific flags, instead of the common googletest
   library used for all other LLVM/Clang unittests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169559 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agofixed valgrind issues of prior commit, this change applies r169456 changes back to...
Pedro Artigas [Thu, 6 Dec 2012 22:12:44 +0000 (22:12 +0000)]
fixed valgrind issues of prior commit, this change applies r169456 changes back to the tree with fixes. on darwin no valgrind issues exist in the tests that used to fail.

original change description:

change MCContext to work on the doInitialization/doFinalization model

reviewed by Evan Cheng <evan.cheng@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169553 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove unused field.
Jakub Staszak [Thu, 6 Dec 2012 22:08:59 +0000 (22:08 +0000)]
Remove unused field.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169551 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove trailing spaces.
Jakub Staszak [Thu, 6 Dec 2012 21:57:16 +0000 (21:57 +0000)]
Remove trailing spaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169550 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix typos in CHECK lines.
Dmitri Gribenko [Thu, 6 Dec 2012 21:24:47 +0000 (21:24 +0000)]
Fix typos in CHECK lines.

Patch by Alexander Zinenko.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169547 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDocumentation: fix typos and formatting.
Dmitri Gribenko [Thu, 6 Dec 2012 21:12:35 +0000 (21:12 +0000)]
Documentation: fix typos and formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169546 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRevert "Allow modifying an ImmutableMap without canonicalizing it immediately."
Ted Kremenek [Thu, 6 Dec 2012 19:41:30 +0000 (19:41 +0000)]
Revert "Allow modifying an ImmutableMap without canonicalizing it immediately."

Jordan and I discussed this, and we don't want this in the API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169541 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoReplace r169459 with something safer. Rather than having computeMaskedBits to
Evan Cheng [Thu, 6 Dec 2012 19:13:27 +0000 (19:13 +0000)]
Replace r169459 with something safer. Rather than having computeMaskedBits to
understand target implementation of any_extend / extload, just generate
zero_extend in place of any_extend for liveouts when the target knows the
zero_extend will be implicit (e.g. ARM ldrb / ldrh) or folded (e.g. x86 movz).

rdar://12771555

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169536 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove unneeded function, since PR8156 was fixed over a year ago.
Jakub Staszak [Thu, 6 Dec 2012 19:05:46 +0000 (19:05 +0000)]
Remove unneeded function, since PR8156 was fixed over a year ago.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169534 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAllow modifying an ImmutableMap without canonicalizing it immediately.
Jordan Rose [Thu, 6 Dec 2012 19:01:24 +0000 (19:01 +0000)]
Allow modifying an ImmutableMap without canonicalizing it immediately.

This is an alternative to the ImmutableMapRef interface where a factory
should still be canonicalizing by default, but in certain cases an
improvement can be made by delaying the canonicalization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169532 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSimplify code.
Jakub Staszak [Thu, 6 Dec 2012 18:22:59 +0000 (18:22 +0000)]
Simplify code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169521 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix a bug in the code that merges consecutive stores. Previously we did not
Nadav Rotem [Thu, 6 Dec 2012 17:34:13 +0000 (17:34 +0000)]
Fix a bug in the code that merges consecutive stores. Previously we did not
check if loads that happen in between stores alias with the first store in the
chain, only with the second store onwards.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169516 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMemorySanitizer.cpp: Suppress a warning. [-Wunused-variable]
NAKAMURA Takumi [Thu, 6 Dec 2012 13:38:00 +0000 (13:38 +0000)]
MemorySanitizer.cpp: Suppress a warning. [-Wunused-variable]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169504 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[msan] Fix a typo in a comment.
Evgeniy Stepanov [Thu, 6 Dec 2012 11:58:59 +0000 (11:58 +0000)]
[msan] Fix a typo in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169491 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[msan] Do not store origin for clean values.
Evgeniy Stepanov [Thu, 6 Dec 2012 11:41:03 +0000 (11:41 +0000)]
[msan] Do not store origin for clean values.

Instead of unconditionally storing origin with every application store,
only do this when the shadow of the stored value is != 0.

This change also delays instrumentation of stores until after the walk over
function's instructions, because adding new basic blocks confuses InstVisitor.

We only keep 1 origin value per 4 bytes of application memory. This change
fixes the bug when a store of a single clean byte wiped the origin for the
whole 4-byte area.

Since stores of uninitialized values are relatively uncommon, this change
improves performance of track-origins mode by 5% median and by up to 47% on
specs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169490 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agos/getLowerBoundDefault/getDefaultLowerBound/ for consistency. Also put the more natur...
Bill Wendling [Thu, 6 Dec 2012 07:55:19 +0000 (07:55 +0000)]
s/getLowerBoundDefault/getDefaultLowerBound/ for consistency. Also put the more natural check first in the if-then statement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169486 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoHandle non-default array bounds.
Bill Wendling [Thu, 6 Dec 2012 07:38:10 +0000 (07:38 +0000)]
Handle non-default array bounds.

Some languages, e.g. Ada and Pascal, allow you to specify that the array bounds
are different from the default (1 in these cases). If we have a lower bound
that's non-default, then we emit the lower bound. We also calculate the correct
upper bound in those cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169484 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove intrinsic specific instructions for (V)MOVQUmr with patterns pointing to the...
Craig Topper [Thu, 6 Dec 2012 07:31:16 +0000 (07:31 +0000)]
Remove intrinsic specific instructions for (V)MOVQUmr with patterns pointing to the normal instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169482 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoMark MOVDQ(A/U)rm as ReMaterializable. Mark all MOVDQ(A/U) instructions as neverHasSi...
Craig Topper [Thu, 6 Dec 2012 06:49:16 +0000 (06:49 +0000)]
Mark MOVDQ(A/U)rm as ReMaterializable. Mark all MOVDQ(A/U) instructions as neverHasSideEffects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169477 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoProperly fix the tes.
Evan Cheng [Thu, 6 Dec 2012 02:29:29 +0000 (02:29 +0000)]
Properly fix the tes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169464 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agollvm/test/CodeGen/ARM/extload-knownzero.ll: Try to unbreak, to add -O0. I guess Chad...
NAKAMURA Takumi [Thu, 6 Dec 2012 02:22:58 +0000 (02:22 +0000)]
llvm/test/CodeGen/ARM/extload-knownzero.ll: Try to unbreak, to add -O0. I guess Chad expects fastisel here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169463 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRevert r169456, "change MCContext to work on the doInitialization/doFinalization...
NAKAMURA Takumi [Thu, 6 Dec 2012 02:00:13 +0000 (02:00 +0000)]
Revert r169456, "change MCContext to work on the doInitialization/doFinalization model"

It broke many builders.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169462 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[arm fast-isel] Make the fast-isel implementation of memcpy respect alignment.
Chad Rosier [Thu, 6 Dec 2012 01:34:31 +0000 (01:34 +0000)]
[arm fast-isel] Make the fast-isel implementation of memcpy respect alignment.
rdar://12821569

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169460 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoLet targets provide hooks that compute known zero and ones for any_extend
Evan Cheng [Thu, 6 Dec 2012 01:28:01 +0000 (01:28 +0000)]
Let targets provide hooks that compute known zero and ones for any_extend
and extload's. If they are implemented as zero-extend, or implicitly
zero-extend, then this can enable more demanded bits optimizations. e.g.

define void @foo(i16* %ptr, i32 %a) nounwind {
entry:
  %tmp1 = icmp ult i32 %a, 100
  br i1 %tmp1, label %bb1, label %bb2
bb1:
  %tmp2 = load i16* %ptr, align 2
  br label %bb2
bb2:
  %tmp3 = phi i16 [ 0, %entry ], [ %tmp2, %bb1 ]
  %cmp = icmp ult i16 %tmp3, 24
  br i1 %cmp, label %bb3, label %exit
bb3:
  call void @bar() nounwind
  br label %exit
exit:
  ret void
}

This compiles to the followings before:
        push    {lr}
        mov     r2, #0
        cmp     r1, #99
        bhi     LBB0_2
@ BB#1:                                 @ %bb1
        ldrh    r2, [r0]
LBB0_2:                                 @ %bb2
        uxth    r0, r2
        cmp     r0, #23
        bhi     LBB0_4
@ BB#3:                                 @ %bb3
        bl      _bar
LBB0_4:                                 @ %exit
        pop     {lr}
        bx      lr

The uxth is not needed since ldrh implicitly zero-extend the high bits. With
this change it's eliminated.

rdar://12771555

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169459 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agochange MCContext to work on the doInitialization/doFinalization model
Pedro Artigas [Thu, 6 Dec 2012 00:50:55 +0000 (00:50 +0000)]
change MCContext to work on the doInitialization/doFinalization model

reviewed by Evan Cheng <evan.cheng@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169456 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSet the 'MadeChange' variable if we are deleting blocks.
Bill Wendling [Thu, 6 Dec 2012 00:30:20 +0000 (00:30 +0000)]
Set the 'MadeChange' variable if we are deleting blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169455 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoHave CannotBeNegativeZero() be aware of the nsz fast-math flag
Michael Ilseman [Thu, 6 Dec 2012 00:07:09 +0000 (00:07 +0000)]
Have CannotBeNegativeZero() be aware of the nsz fast-math flag

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169452 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTaking ownership of indvars/lsr.
Andrew Trick [Wed, 5 Dec 2012 23:32:44 +0000 (23:32 +0000)]
Taking ownership of indvars/lsr.

Evan nominated me for this a while back, and no one has offered to
save me from it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169447 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPR10867: Analogue of r169441 for when using external 'sh'. And actually run the test!
Richard Smith [Wed, 5 Dec 2012 23:15:33 +0000 (23:15 +0000)]
PR10867: Analogue of r169441 for when using external 'sh'. And actually run the test!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169446 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRegPressureTracker::dump(): Remove unnecessary argument.
Andrew Trick [Wed, 5 Dec 2012 23:05:22 +0000 (23:05 +0000)]
RegPressureTracker::dump(): Remove unnecessary argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169443 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoPR10867. lit would interpret
Richard Smith [Wed, 5 Dec 2012 22:54:26 +0000 (22:54 +0000)]
PR10867. lit would interpret

  RUN: a
  RUN: b || true

as "a && (b || true)" in Tcl mode, and as "(a && b) || true" in sh mode.
Everyone seems to (quite reasonably) write tests assuming the Tcl behavior,
so use that in sh mode too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169441 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDo not run tests MappedMemoryTest.BasicWrite and MultipleWrite unless both
Akira Hatanaka [Wed, 5 Dec 2012 22:43:07 +0000 (22:43 +0000)]
Do not run tests MappedMemoryTest.BasicWrite and MultipleWrite unless both
MF_READ and MF_WRITE are set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169439 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoQuick build fix for c++03 clang. This needs a proper solution. Note that these offset...
Michael J. Spencer [Wed, 5 Dec 2012 22:38:01 +0000 (22:38 +0000)]
Quick build fix for c++03 clang. This needs a proper solution. Note that these offsets are guaranteed to be correct by Endian.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169438 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoChange std::vector to SmallVector<4> and remove some unused methods.
Eli Bendersky [Wed, 5 Dec 2012 22:11:02 +0000 (22:11 +0000)]
Change std::vector to SmallVector<4> and remove some unused methods.

This is more consistent with other vectors in this code. In addition, I ran some
tests compiling a large program and >96% of fragments have 4 or less fixups, so
SmallVector<4> is a good optimization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169433 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoDefine new-value store instructions with base+immediate addressing mode
Jyotsna Verma [Wed, 5 Dec 2012 22:02:56 +0000 (22:02 +0000)]
Define new-value store instructions with base+immediate addressing mode
using multiclass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169432 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix name. The array is unboundED.
Bill Wendling [Wed, 5 Dec 2012 21:43:30 +0000 (21:43 +0000)]
Fix name. The array is unboundED.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169428 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRegisterPressureTracker: fix findUseBetween to handle DebugValue
Andrew Trick [Wed, 5 Dec 2012 21:37:50 +0000 (21:37 +0000)]
RegisterPressureTracker: fix findUseBetween to handle DebugValue

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169427 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRegisterPressureTracker: unify virtual registers and physical regunits.
Andrew Trick [Wed, 5 Dec 2012 21:37:47 +0000 (21:37 +0000)]
RegisterPressureTracker: unify virtual registers and physical regunits.

Now that live register units are tracked individually, the code can be simplified.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169426 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRegisterPresssureTracker: Track live physical register by unit.
Andrew Trick [Wed, 5 Dec 2012 21:37:42 +0000 (21:37 +0000)]
RegisterPresssureTracker: Track live physical register by unit.

This is much simpler to reason about, more efficient, and
fixes some corner cases involving implicit super-register defs.
Fixed rdar://12797931.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169425 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoCost Model: change the default cost of control flow instructions (br / ret / ......
Nadav Rotem [Wed, 5 Dec 2012 21:21:26 +0000 (21:21 +0000)]
Cost Model: change the default cost of control flow instructions (br / ret / ...) to zero.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169423 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoCorrect ARM NOP encoding
David Sehr [Wed, 5 Dec 2012 21:01:27 +0000 (21:01 +0000)]
Correct ARM NOP encoding

The encoding of NOP in ARMAsmBackend.cpp is missing a trailing zero, which
causes the emission of a coprocessor instruction rather than "mov r0, r0"
as indicated in the comment.  The test also checks for the wrong encoding.

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121203/157919.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169420 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove unused methods
Eli Bendersky [Wed, 5 Dec 2012 20:56:39 +0000 (20:56 +0000)]
Remove unused methods

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169419 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[NVPTX] Fix crash with unnamed struct arguments
Justin Holewinski [Wed, 5 Dec 2012 20:50:28 +0000 (20:50 +0000)]
[NVPTX] Fix crash with unnamed struct arguments

Patch by Eric Holk

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169418 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdd dump of Win64 EH unwind data.
Michael J. Spencer [Wed, 5 Dec 2012 20:12:35 +0000 (20:12 +0000)]
Add dump of Win64 EH unwind data.

The new command line option -unwind-info dumps the Win64 EH unwind
data to the console. This is a nice feature if you need to debug
generated EH data (e.g. from LLVM). Includes a test case.

Initial patch by João Matos, extensions and rework by Kai Nacke.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169415 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUpdates to Win64EH.h structures.
Michael J. Spencer [Wed, 5 Dec 2012 20:12:13 +0000 (20:12 +0000)]
Updates to Win64EH.h structures.

Change member types of RuntimeFunction and UnwindInfo from uint64_t to
uint32_t:
These members represent addresses. According to MSDN, they are image
relative, that is, they are 32-bit offsets from the starting address
of the image that contains the function table entry.
See MSDN for more information:
RUNTIME_FUNCTION: http://msdn.microsoft.com/en-us/library/ft9x1kdx.aspx
UNWIND_INFO: http://msdn.microsoft.com/en-us/library/ddssxxy8.aspx

Make Win64.h platform-neutral:
The standard types unit8_t, uint16_t and uint32_t are replaced with
their counterparts from Endian.h. Accessor functions are introduced to
replace bit fields.

Patch by João Matos and Kai Nacke.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169414 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTest commit.
David Sehr [Wed, 5 Dec 2012 19:47:56 +0000 (19:47 +0000)]
Test commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169410 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoUse multiclass to define store instructions with base+immediate offset
Jyotsna Verma [Wed, 5 Dec 2012 19:32:03 +0000 (19:32 +0000)]
Use multiclass to define store instructions with base+immediate offset
addressing mode and immediate stored value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169408 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove the non-const getInst accessor. It wasn't being used, and isn't very
Eli Bendersky [Wed, 5 Dec 2012 19:31:33 +0000 (19:31 +0000)]
Remove the non-const getInst accessor. It wasn't being used, and isn't very
good for enacpsulation anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169407 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdjust JIT target triple on OS X to match the current architecture.
Bob Wilson [Wed, 5 Dec 2012 19:09:13 +0000 (19:09 +0000)]
Adjust JIT target triple on OS X to match the current architecture.

For OS X builds, we generate one version of config.h but then build for
multiple architectures.  This means that the LLVM_HOSTTRIPLE setting may have
the wrong architecture.  Adjust it dynamically to match the current
architecture.  <rdar://problem/12715470>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169405 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoFix misplaced closing brace.
Matthew Curtis [Wed, 5 Dec 2012 19:00:34 +0000 (19:00 +0000)]
Fix misplaced closing brace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169404 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove two dead functions resulting from a bad rebase.
Andrew Trick [Wed, 5 Dec 2012 18:52:15 +0000 (18:52 +0000)]
Remove two dead functions resulting from a bad rebase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169401 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoTry to unbreak the build on hosts that don't transitively pull in a definition for...
Benjamin Kramer [Wed, 5 Dec 2012 18:31:11 +0000 (18:31 +0000)]
Try to unbreak the build on hosts that don't transitively pull in a definition for int64_t.

Also use the portable (ugly) format string macros, for MSVC compatibility.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169396 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove unused MachineInstr constructors.
Jakob Stoklund Olesen [Wed, 5 Dec 2012 18:27:39 +0000 (18:27 +0000)]
Remove unused MachineInstr constructors.

A MachineInstr can only ever be constructed by CreateMachineInstr() and
CloneMachineInstr(), and those factories don't use the removed
constructors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169395 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdded a option to the disassembler to print immediates as hex.
Kevin Enderby [Wed, 5 Dec 2012 18:13:19 +0000 (18:13 +0000)]
Added a option to the disassembler to print immediates as hex.

This is for the lldb team so most of but not all of the values are
to be printed as hex with this option.  Some small values like the
scale in an X86 address were requested to printed in decimal
without the leading 0x.

There may be some tweaks need to places that may still be in
decimal that they want in hex.  Specially for arm.  I made my best
guess.  Any tweaks from here should be simple.

I also did the best I know now with help from the C++ gurus
creating the cleanest formatImm() utility function and containing
the changes.  But if someone has a better idea to make something
cleaner I'm all ears and game for changing the implementation.

rdar://8109283

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169393 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago- Added calls to doInitialization/doFinalization to immutable passes
Pedro Artigas [Wed, 5 Dec 2012 17:12:22 +0000 (17:12 +0000)]
- Added calls to doInitialization/doFinalization to immutable passes
- fixed ordering of calls to doFinalization to be the reverse of the pass run order due to potential dependencies
- fixed machine module info to operate in the doInitialization/doFinalization model, also fixes some FIXMEs

reviewed by Evan Cheng <evan.cheng@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169391 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[msan] Instrument bswap intrinsic.
Evgeniy Stepanov [Wed, 5 Dec 2012 14:39:55 +0000 (14:39 +0000)]
[msan] Instrument bswap intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169383 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[msan] Initialize callbacks in runOnFunction as opposed to doInitialization.
Evgeniy Stepanov [Wed, 5 Dec 2012 13:14:33 +0000 (13:14 +0000)]
[msan] Initialize callbacks in runOnFunction as opposed to doInitialization.

This mirrors the change in ASan & TSan done in r168864.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169378 91177308-0d34-0410-b5e6-96231b3b80d8

11 years ago[msan] Change linkage type of __msan_track_origins.
Evgeniy Stepanov [Wed, 5 Dec 2012 12:49:41 +0000 (12:49 +0000)]
[msan] Change linkage type of __msan_track_origins.

LinkOnceODRLinkage globals may be removed in GlobalOpt if not used in the
current module.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169377 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoSimplified BLEND pattern matching for shuffles.
Elena Demikhovsky [Wed, 5 Dec 2012 09:24:57 +0000 (09:24 +0000)]
Simplified BLEND pattern matching for shuffles.
Generate VPBLENDD for AVX2 and VPBLENDW for v16i16 type on AVX2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169366 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRegisterPressure API. Add support for physical register units.
Andrew Trick [Wed, 5 Dec 2012 06:47:12 +0000 (06:47 +0000)]
RegisterPressure API. Add support for physical register units.

At build-time register pressure was always computed in terms of
register units. But the compile-time API was expressed in terms of
register classes because it was intended for virtual registers (and
physical register units weren't yet used anywhere in codegen).

Now that the codegen uses physreg units consistently, prepare for
tracking register pressure also in terms of live units, not live
registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169360 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoAdded RegisterPressureTracker::dump() for debugging.
Andrew Trick [Wed, 5 Dec 2012 06:47:08 +0000 (06:47 +0000)]
Added RegisterPressureTracker::dump() for debugging.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169359 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoComment formatting.
Andrew Trick [Wed, 5 Dec 2012 06:47:06 +0000 (06:47 +0000)]
Comment formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169358 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agodocs: Explain plain preformatted text
Sean Silva [Wed, 5 Dec 2012 04:07:33 +0000 (04:07 +0000)]
docs: Explain plain preformatted text

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169352 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agofix a typo
Shuxin Yang [Wed, 5 Dec 2012 00:33:16 +0000 (00:33 +0000)]
fix a typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169345 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoCopy clang/Driver/<Option parsing stuff> to llvm.
Michael J. Spencer [Wed, 5 Dec 2012 00:29:32 +0000 (00:29 +0000)]
Copy clang/Driver/<Option parsing stuff> to llvm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169344 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agodocs: Sphinxify `docs/tutorial/`
Sean Silva [Wed, 5 Dec 2012 00:26:32 +0000 (00:26 +0000)]
docs: Sphinxify `docs/tutorial/`

Sorry for the massive commit, but I just wanted to knock this one down
and it is really straightforward.

There are still a couple trivial (i.e. not related to the content)
things left to fix:

- Use of raw HTML links where :doc:`...` and :ref:`...` could be used
  instead. If you are a newbie and want to help fix this it would make
  for some good bite-sized patches; more experienced developers should
  be focusing on adding new content (to this tutorial or elsewhere, but
  please _do not_ waste your time on formatting when there is such dire
  need for documentation (see docs/SphinxQuickstartTemplate.rst to get
  started writing)).

- Highlighting of the kaleidoscope code blocks (currently left as bare
  `::`).  I will be working on writing a custom Pygments highlighter for
  this, mostly as training for maintaining the `llvm` code-block's lexer
  in-tree. I want to do this because I am extremely unhappy with how it
  just "gives up" on the slightest deviation from the expected syntax
  and leaves the whole code-block un-highlighted.

  More generally I am looking at writing some Sphinx extensions and
  keeping them in-tree as well, to support common use cases that
  currently have no good solution (like "monospace text inside a link").

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169343 91177308-0d34-0410-b5e6-96231b3b80d8