[DebugInfo] Pass DWARFSection into DWARFUnitSection constructor (NFC).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219259 91177308-0d34-0410-b5e6-96231b3b80d8
[Support] Add MemoryBuffer::getFileSlice()

mach-o supports "fat" files which are a header/table-of-contents followed by a
concatenation of mach-o files built for different architectures. Currently, 
MemoryBuffer has no easy way to map a subrange (slice) of a file which lld
will need to select a mach-o slice of a fat file. The new function provides 
an easy way to map a slice of a file into a MemoryBuffer. Test case included.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219260 91177308-0d34-0410-b5e6-96231b3b80d8
[DebugInfo] Pass DWARFSection down to DWARFUnit constructor (NFC).

Keep the actual section contents and the relocation map together.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219261 91177308-0d34-0410-b5e6-96231b3b80d8
Have SelectionDAG's subtarget TargetSelectionDAGInfo be set
during init rather than construction time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219262 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r219175 - [InstCombine] re-commit r218721 icmp-select-icmp optimization

This seems to have caused PR21199.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219264 91177308-0d34-0410-b5e6-96231b3b80d8
Have the selection dag grab TargetLowering off of the subtarget
inside init rather than have it passed in as an argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219270 91177308-0d34-0410-b5e6-96231b3b80d8
Reset the target options and optimization level as the first
thing we do inside selection dag. This code needs to be
migrated to queries on the function rather than global
data, but this organizes things before we start grabbing
the subtarget.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219271 91177308-0d34-0410-b5e6-96231b3b80d8
Cache SelectionDAGISel TargetInstrInfo lookups on the class and
propagate. Also use the TargetSubtargetInfo and the MachineFunction
and move TargetRegisterInfo query closer to uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219273 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-readobj: add test for r219228


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219274 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64] Generate vector signed/unsigned mul and mla/mls long.

Phabricator Revision: http://reviews.llvm.org/D5589
Patch by Balaram Makam <bmakam@codeaurora.org>!!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219276 91177308-0d34-0410-b5e6-96231b3b80d8
llvm-dwarfdump: Add support for some COFF relocations

DWARF in COFF utilizes several relocations.  Implement support for them
in RelocVisitor to support llvm-dwarfdump.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219280 91177308-0d34-0410-b5e6-96231b3b80d8
COFF: Don't oversize COMMON symbols when targeting BFD ld

COFF normally doesn't allow us to describe the alignment of COMMON
symbols.

It turns out that most linkers use the symbol size as a hint as to how
aligned the symbol should be.

However the BFD folks have added a .drectve command, which we
now support as of r219229, that allows us to specify the alignment
precisely.  With this in mind, stop rounding sizes up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219281 91177308-0d34-0410-b5e6-96231b3b80d8
[InstCombine] re-commit r218721 with fix for pr21199

The icmp-select-icmp optimization targets select-icmp.eq
only. This is now ensured by testing the branch predicate
explictly. This commit also includes the test case for pr21199.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219282 91177308-0d34-0410-b5e6-96231b3b80d8
GlobalOpt: Don't drop unused memberes of a Comdat

A linkonce_odr member of a COMDAT shouldn't be dropped if we need to
keep the entire COMDAT group.

This fixes PR21191.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219283 91177308-0d34-0410-b5e6-96231b3b80d8
Cache TargetLowering on SelectionDAGISel and update previous
calls to getTargetLowering() with the cached variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219284 91177308-0d34-0410-b5e6-96231b3b80d8
Use cached subtarget rather than looking it up on the
TargetMachine again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219285 91177308-0d34-0410-b5e6-96231b3b80d8
Format spacing and remove extra lines to comply with standards. NFC.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219286 91177308-0d34-0410-b5e6-96231b3b80d8
Replace calls to get the subtarget and TargetFrameLowering with
cached variables and a single call in the constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219287 91177308-0d34-0410-b5e6-96231b3b80d8
Unix/Process: Don't use pthread_sigmask if we aren't built with threads

We won't link in pthreads if we weren't built with LLVM_ENABLE_THREADS
which means we won't get access to pthread_sigmask.  Use sigprocmask
instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219288 91177308-0d34-0410-b5e6-96231b3b80d8
Update git-svnrevert to accept git and svn revisions

Interchangeable commit ids can now be used on this git-svnrevert, which
will figure out what kind of commit that is (if you use format rNNNN for SVN
commits) and make sure the right ids are used in the right places.

It's a little bit more robust and user-friendly.

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