Fix type error in insertvalue example in LangRef. %agg1 is of type {i32,
float} and thus cannot be used where a type {i32, {float}} is expected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217405 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-cov: Try to appease MSVC after r217404

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217406 91177308-0d34-0410-b5e6-96231b3b80d8
Set trunc store action to Expand for all X86 targets.

When compiling without SSE2, isTruncStoreLegal(F64, F32) would return Legal, whereas with SSE2 it would return Expand. And since the Target doesn't seem to actually handle a truncstore for double -> float, it would just output a store of a full double in the space for a float hence overwriting other bits on the stack.

Patch by Luqman Aden!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217410 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-cov: Rename MappingRegion to coverage::CountedRegion (NFC)

This name was too similar to CoverageMappingRegion, and the type
really belongs in the coverage library anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217416 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-cov: Combine two types that were nearly identical (NFC)

llvm-cov had a SourceRange type that was nearly identical to a
CountedRegion except that it shaved off a couple of fields. There
aren't likely to be enough of these for the minor memory savings to be
worth the extra complexity here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217417 91177308-0d34-0410-b5e6-96231b3b80d8
[MachineSinking] Conservatively clear kill flags after coalescing.

This solves the problem of having a kill flag inside a loop
with a definition of the register prior to the loop:

%vreg368<def> ...

Inside loop:

        %vreg520<def> = COPY %vreg368
        %vreg568<def,tied1> = add %vreg341<tied0>, %vreg520<kill>

=> was coalesced into =>

        %vreg568<def,tied1> = add %vreg341<tied0>, %vreg368<kill>

MachineVerifier then complained:
*** Bad machine code: Virtual register killed in block, but needed live out. ***

The kill flag for %vreg368 is incorrect, and is cleared by this patch.

This is similar to the clearing done at the end of
MachineSinking::SinkInstruction().

Patch provided by Jonas Paulsson.

Reviewed by Quentin Colombet and Juergen Ributzka.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217427 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-cov: Use ArrayRef::slice (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217430 91177308-0d34-0410-b5e6-96231b3b80d8
ARM: Negative offset support problem

This patch is to permit a negative offset usage for a non frame access.

Patch by Igor Oblakov.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217431 91177308-0d34-0410-b5e6-96231b3b80d8
[mips] Add assembler support for .set push/pop directive.

Summary:
These directives are used to save the current assembler options (in the case of ".set push") and restore the previously saved options (in the case of ".set pop").

Contains work done by Matheus Almeida.

Reviewers: dsanders

Reviewed By: dsanders

Differential Revision: http://reviews.llvm.org/D4821

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217432 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-objdump: don't crash when __compact_unwind has no relocs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217433 91177308-0d34-0410-b5e6-96231b3b80d8
[mips] Don't cache IsO32 and IsFP64 in MipsTargetLowering::MipsCC

Summary:
Use a MipsSubtarget reference instead.

No functional change.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5008

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217434 91177308-0d34-0410-b5e6-96231b3b80d8
[x32] Emit callq for CALLpcrel32

Summary:
In AT&T annotation for both x86_64 and x32 calls should be printed as
callq in assembly. It's only a matter of correct mnemonic, object output
is ok.

Test Plan: trivial test added

Reviewers: nadav, dschuff, craig.topper

Subscribers: llvm-commits, zinovy.nis

Differential Revision: http://reviews.llvm.org/D5213

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217435 91177308-0d34-0410-b5e6-96231b3b80d8
[mips] Move MipsTargetLowering::MipsCC::regSize() to MipsSubtarget::getGPRSizeInBytes()

Summary:
The GPR size is more a property of the subtarget than that of the ABI so move
this information to the MipsSubtarget.

No functional change.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5009


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217436 91177308-0d34-0410-b5e6-96231b3b80d8
Re-factor sample profile reader into lib/ProfileData.

Summary:
This patch moves the profile reading logic out of the Sample Profile
transformation into a generic profile reader facility in
lib/ProfileData.

The intent is to use this new reader to implement a sample profile
reader/writer that can be used to convert sample profiles from external
sources into LLVM.

This first patch introduces no functional changes. It moves the profile
reading code from lib/Transforms/SampleProfile.cpp into
lib/ProfileData/SampleProfReader.cpp.

In subsequent patches I will:

- Add a bitcode format for sample profiles to allow for more efficient
  encoding of the profile.
- Add a writer for both text and bitcode format profiles.
- Add a 'convert' command to llvm-profdata to be able to convert between
  the two (and serve as entry point for other sample profile formats).

Reviewers: bogner, echristo

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5250

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217437 91177308-0d34-0410-b5e6-96231b3b80d8
[mips] Add assembler support for .set mips0 directive.

Summary:
This directive is used to reset the assembler options to their initial values.
Assembly programmers use it in conjunction with the ".set mipsX" directives.

This patch depends on the .set push/pop directive (http://reviews.llvm.org/D4821).

Contains work done by Matheus Almeida.

Reviewers: dsanders

Reviewed By: dsanders

Differential Revision: http://reviews.llvm.org/D4957

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217438 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify ModuleLinker::getLinkageResult. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217441 91177308-0d34-0410-b5e6-96231b3b80d8
Prefer common over weak linkage when linking.

This matches the behavior of ELF linkers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217443 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a use of an undefined value (the linkage).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217445 91177308-0d34-0410-b5e6-96231b3b80d8
LLVMProfileData: Update LLVMBuild.txt corresponding to r217437.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217446 91177308-0d34-0410-b5e6-96231b3b80d8
ScalarOpts/LLVMBuild.txt: Reorder.

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