Trivial cleanup: reuse existing variable.

Extracted while trying to understand http://llvm-reviews.chandlerc.com/D1764.

Patch by Matt Arsenault.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201425 91177308-0d34-0410-b5e6-96231b3b80d8
This patch has two main functions:

1) Fix a specific bug when certain conversion functions are called in a program compiled as mips16 with hard float and
the program is linked as c++. There are two libraries that are reversed in the link order with gcc/g++ and clang/clang++ for
mips16 in this case and the proper stubs will then not be called. These stubs are normally handled in the Mips16HardFloat pass
but in this case we don't know at that time that we need to generate the stubs. This must all be handled later in code generation
and we have moved this functionality to MipsAsmPrinter. When linked as C (gcc or clang) the proper stubs are linked in from libc.

2) Set up the infrastructure to handle 90% of what is in the Mips16HardFloat pass in this new area of MipsAsmPrinter. This is a more
logical place to handle this and we have known for some time that we needed to move the code later and not implement it using
inline asm as we do now but it was not clear exactly where to do this and what mechanism should be used. Now it's clear to us
how to do this and this patch contains the infrastructure to move most of this to MipsAsmPrinter but the actual moving will be done
in a follow on patch. The same infrastructure is used to fix this current bug as described in #1. This change was requested by the list
during the original putback of the Mips16HardFloat pass but was not practical for us do at that time.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201426 91177308-0d34-0410-b5e6-96231b3b80d8
Support DWARF discriminators in object streamer.

Summary:
This adds support for emitting DWARF path discriminator values in
the object streamer. It also changes the DWARF dumper to show
discriminator values in the line table output.

Reviewers: echristo

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2794

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201427 91177308-0d34-0410-b5e6-96231b3b80d8
DebugInfo: Don't include the name of the CU file in the line table file list when it's unneeded

Recommitting r201380 (reverted in r201389)
Recommitting r201351 and r201355 (reverted in r201351 and r201355)

We weren't emitting the an empty (header only) line table when the line
table was empty - this made the DWARF invalid (the compile unit would
point to the zero-size debug_lines section where there should've been an
empty line table but there was nothing at all). Fix that, and as a
consequence this works around/addresses PR18809.

Also, we emit a non-empty line table to workaround a darwin linker bug,
so XFAILing on darwin too.

Also, mark the test as 'REQUIRES: object-emission' because it does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201429 91177308-0d34-0410-b5e6-96231b3b80d8
Remove unused #include


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201430 91177308-0d34-0410-b5e6-96231b3b80d8
Remove myself as owner of libc++

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201432 91177308-0d34-0410-b5e6-96231b3b80d8
TargetLowering: n * r where n > 2 should be an illegal addressing mode

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201433 91177308-0d34-0410-b5e6-96231b3b80d8
[CodeGenPrepare][AddressingModeMatcher] Give up on type promotion if the
transformation does not bring any immediate benefits and introduce an illegal
operation. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201439 91177308-0d34-0410-b5e6-96231b3b80d8
Add extern template instantiations of llvm::Calculate.

This should be a small build time improvement in general and fixes
the build on OS X with -DBUILD_SHARED_LIBS=ON.

The issue is that not all users are including GenericDomTreeConstruction.h,
causing undefined references when ld64 managed to hide the
linkonce_odr symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201440 91177308-0d34-0410-b5e6-96231b3b80d8
DwarfUnit: Refactor out DW_AT_stmt_list creation into common function for fission and non-fission cases

This probably also addresses the FIXME in the fission case regarding
multiple compile units, though I haven't tested that.

This code still confuses me (the literal zero offset makes little sense,
the limitations surrounding asm output I'm not sure about either - but
perhaps we should just always emit one line table? Or should we not rely
on .loc/.file even in assembly so we can produce the same output between
asm and object output?) but this maintains the existing functionality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201441 91177308-0d34-0410-b5e6-96231b3b80d8
DwarfUnit: Remove unnecessary (void)t; that was previously used to suppress -Wunused-member-variable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201442 91177308-0d34-0410-b5e6-96231b3b80d8
Hopefully fix the build with gcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201443 91177308-0d34-0410-b5e6-96231b3b80d8
DwarfUnit: Remove unnecessarily explicit/out of line virtual dtors.

These types have an out of line virtual function each (emitHeader at
least) so they won't have weak vtables - no need for more than that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201444 91177308-0d34-0410-b5e6-96231b3b80d8
DebugInfo: Implement DW_AT_stmt_list for type units

Type units will share the statement list of their defining compile unit.
This is a tradeoff that reduces .o debug info size at the cost of some
linked debug info size (since the contents of those string tables won't
be deduplicated along with the type unit) which seems right for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201445 91177308-0d34-0410-b5e6-96231b3b80d8
Remove unnecessary typename introduced in r201440.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201450 91177308-0d34-0410-b5e6-96231b3b80d8
Remove tautological test line (unsigneds are always >=0).



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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201461 91177308-0d34-0410-b5e6-96231b3b80d8
Add opcode extension forms of MOV8ri/MOV16ri/MOV32ri.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201463 91177308-0d34-0410-b5e6-96231b3b80d8
Cleanup docs about lit substitutions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201464 91177308-0d34-0410-b5e6-96231b3b80d8
SCEVExpander: Try hard not to create derived induction variables in other loops

During LSR of one loop we can run into a situation where we have to expand the
start of a recurrence of a loop induction variable in this loop. This start
value is a value derived of the induction variable of a preceeding loop. SCEV
has cannonicalized this value to a different recurrence than the recurrence of
the preceeding loop's induction variable (the type and/or step direction) has
changed). When we come to instantiate this SCEV we created a second induction
variable in this preceeding loop.  This patch tries to base such derived
induction variables of the preceeding loop's induction variable.

This helps twolf on arm and seems to help scimark2 on x86.

radar://15970709

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