Add comments from Eric's review of r204094.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204358 91177308-0d34-0410-b5e6-96231b3b80d8
Remove dead and incorrect code.

is_symlink was always false since it was using stat instead of lstat.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204361 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a couple of typos and an inaccurate description in the new TableGen doc


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204363 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a few more grammatic errors in docs/TableGen/index.rst


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204364 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-profdata: Remove an empty comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204370 91177308-0d34-0410-b5e6-96231b3b80d8
Reapply DW_AT_low/high_pc patch:

    Use the range machinery for DW_AT_ranges and DW_AT_high/lo_pc.

    This commit moves us from a single range per subprogram to extending
    ranges if we are:

    a) In the same section, and
    b) In the same enclosing CU.

    This means we have more fine grained ranges for compile units, and fewer
    ranges overall when we have multiple functions in the same CU
    adjacent to each other in the object file.

    Also remove all of the earlier hacks around this functionality for
    function sections etc. Also update all of the testcases to take into
    account the merging functionality.

with a fix for location entries in the debug_loc section:

Make sure that debug loc entries are relative to the low_pc
of the compile unit. This means that when we only have a single
range that the offset should be just relative to the low_pc
of the unit, for multiple ranges for a CU this means that we'll be
relative to 0 which we emit along with DW_AT_ranges.

This mostly shows up with linked binaries, so add a testcase with
multiple CUs so that our location is going to be offset of a CU
with a non-zero low_pc.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204378 91177308-0d34-0410-b5e6-96231b3b80d8
Remove LowerInvoke's obsolete "-enable-correct-eh-support" option

This option caused LowerInvoke to generate code using SJLJ-based
exception handling, but there is no code left that interprets the
jmp_buf stack that the resulting code maintained (llvm.sjljeh.jblist).
This option has been obsolete for a while, and replaced by
SjLjEHPrepare.

This leaves the default behaviour of LowerInvoke, which is to convert
invokes to calls.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204388 91177308-0d34-0410-b5e6-96231b3b80d8
[Constant Hoisting] Extend coverage of the constant hoisting pass.

This commit extends the coverage of the constant hoisting pass, adds additonal
debug output and updates the function names according to the style guide.

Related to <rdar://problem/16381500>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204389 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "[Constant Hoisting] Extend coverage of the constant hoisting pass."

I will break this up into smaller pieces for review and recommit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204393 91177308-0d34-0410-b5e6-96231b3b80d8
Add an option to MCJIT to have it forward all sections to the
RTDyldMemoryManager, regardless of whether it thinks they're "required for
execution".

Currently, RuntimeDyld only passes sections that are "required for execution"
to the RTDyldMemoryManager, and takes "required for execution" to mean exactly
"contains symbols or relocations". There are two problems with this:
(1) It can drop sections with anonymous data that is referenced by code.
(2) It leaves the JIT client no way to inspect interesting sections that aren't
    actually required to run the program (e.g dwarf sections).

A test case is still in the works.

Future work: We may want to replace this with a generic section filtering
mechanism, but that will require more consideration. For now, this flag at least
allows clients to volunteer to do the filtering themselves.

Fixes <rdar://problem/15177691>.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204398 91177308-0d34-0410-b5e6-96231b3b80d8
Don't use EmitAbsValue with symbol references.

The function exists to force an expression to be absolute, but there it is not
possible to force a symbol reference since

a = b
.long a

means something else.

This is an alternative fix for pr9951 that uses an assert. It then deletes
the old pr9951 test that was testing nothing already.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204399 91177308-0d34-0410-b5e6-96231b3b80d8
Remove unused options from test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204401 91177308-0d34-0410-b5e6-96231b3b80d8
Remove llvm-mc's disable-cfi option.

It was dead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204404 91177308-0d34-0410-b5e6-96231b3b80d8
Convert CodeGen test into a more specific MC test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204406 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-objdump output hex to match binutils' objdump

Patch by Ted Woodward

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204409 91177308-0d34-0410-b5e6-96231b3b80d8
Fix PR19136: [ARM] Fix Folding SP Update into vpush/vpop

Sicne MBB->computeRegisterLivenes() returns Dead for sub regs like s0,
d0 is used in vpop instead of updating sp, which causes s0 dead before
its use.

This patch checks the liveness of each subreg to make sure the reg is
actually dead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204411 91177308-0d34-0410-b5e6-96231b3b80d8
Convert another CodeGen test into a MC test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204412 91177308-0d34-0410-b5e6-96231b3b80d8
Port test to cfi.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204416 91177308-0d34-0410-b5e6-96231b3b80d8
Object/COFF: Support large relocation table.

NumberOfRelocations field in COFF section table is only 16-bit wide. If an
object has more than 65535 relocations, the number of relocations is stored
to VirtualAddress field in the first relocation field, and a special flag
(IMAGE_SCN_LNK_NRELOC_OVFL) is set to Characteristics field.

In test we cheated a bit. I made up a test file so that it has
IMAGE_SCN_LNK_NRELOC_OVFL flag but the number of relocations is much smaller
than 65535. This is to avoid checking in a large test file just to test a
file with many relocations.

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

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