lldb.git
6 years agoRevert "Add a test showing that lto produces relaxable relocations."
James Y Knight [Tue, 21 Jun 2016 05:54:41 +0000 (05:54 +0000)]
Revert "Add a test showing that lto produces relaxable relocations."

This reverts commit r273074.

Reverting this too, after revert in llvm in r273245.

llvm-svn: 273247

6 years agoRefactor X86TargetInfo::relaxTlsIeToLe.
Rui Ueyama [Tue, 21 Jun 2016 05:44:14 +0000 (05:44 +0000)]
Refactor X86TargetInfo::relaxTlsIeToLe.

`Inst` and `Op` variables are removed since they are not always
point to an instruction nor an operand. For 5-byte MOV instruction,
Op points to an instruction, which is confusing.

llvm-svn: 273246

6 years agoRevert "Change RelaxELFRelocations for llc."
James Y Knight [Tue, 21 Jun 2016 05:40:41 +0000 (05:40 +0000)]
Revert "Change RelaxELFRelocations for llc."

This reverts commit r273019.

From email I sent to list:
> I don't think this makes sense. Either the linker you're using supports
> this feature, or it doesn't. Having it enabled for llc if your linker
> doesn't support it is not fun.
>
> Further note that this also affects basically all other code using llvm
> libraries -- other than Clang, which explicitly sets it back to false by
> default, unless you set the ENABLE_X86_RELAX_RELOCATIONS cmake flag to
> true.
>
> If you want to enable the relax mode across all llvm tools in some
> circumstances, I think it should be via moving the cmake flag from clang
> down into llvm.
>
> I'm going to revert this commit, since I both think it intrinsically
> doesn't make sense to do this, and because it's breaking some of our
> tools.

llvm-svn: 273245

6 years agoReplace silly uses of 'signed' with 'int'
David Majnemer [Tue, 21 Jun 2016 05:10:24 +0000 (05:10 +0000)]
Replace silly uses of 'signed' with 'int'

llvm-svn: 273244

6 years agoFix typo in comment.
Rui Ueyama [Tue, 21 Jun 2016 05:09:39 +0000 (05:09 +0000)]
Fix typo in comment.

llvm-svn: 273243

6 years agoUnbreak buildbots.
Rui Ueyama [Tue, 21 Jun 2016 05:01:31 +0000 (05:01 +0000)]
Unbreak buildbots.

llvm-svn: 273242

6 years ago[TargetLibraryInfo] Reduce code duplication.
Davide Italiano [Tue, 21 Jun 2016 04:32:21 +0000 (04:32 +0000)]
[TargetLibraryInfo] Reduce code duplication.

llvm-svn: 273241

6 years ago[AVX512] Remove the masked vpcmpeq/vcmpgt intrinsics and autoupgrade them to native...
Craig Topper [Tue, 21 Jun 2016 03:53:24 +0000 (03:53 +0000)]
[AVX512] Remove the masked vpcmpeq/vcmpgt intrinsics and autoupgrade them to native icmps.

llvm-svn: 273240

6 years agor273237 fixed PR28220, not PR28216
David Majnemer [Tue, 21 Jun 2016 03:43:11 +0000 (03:43 +0000)]
r273237 fixed PR28220, not PR28216

llvm-svn: 273239

6 years agoRefactor X86_64TargetInfo::relaxTlsIeToLe.
Rui Ueyama [Tue, 21 Jun 2016 03:42:32 +0000 (03:42 +0000)]
Refactor X86_64TargetInfo::relaxTlsIeToLe.

This patch is to rewrite the function with a table-lookup-ish approach
so that it can read as a series of "convert this pattern to this" pattern.

llvm-svn: 273238

6 years ago[CodeGen] Do not run initializers for imported variables
David Majnemer [Tue, 21 Jun 2016 03:40:16 +0000 (03:40 +0000)]
[CodeGen] Do not run initializers for imported variables

The export side is responsible for running any initializers, they are
run when the module is first loaded.  Attempting to run an initializer
for the import side is not possible.

This fixes PR28216.

llvm-svn: 273237

6 years agoChange the "debugserver-mini" target (a version of debugserver
Jason Molenda [Tue, 21 Jun 2016 03:39:39 +0000 (03:39 +0000)]
Change the "debugserver-mini" target (a version of debugserver
which doesn't like against all the extra UI frameworks on ios)
so it now generates a binary called "debugserver-nonui" and puts
it in /usr/local/bin instead of /Developer/usr/bin.

Add some cruft to RNBDefs.h to get the version number (provided
by Xcode at build time) with either the name "debugserver" or
"debugserver_nonui" as appropriate.

Add the "debugserver-mini" target to the top level "ios" target
in lldb xcode project file, so this nonui debugserver will be
built along with the normal lldb / debugserver.

<rdar://problem/24730789>

llvm-svn: 273236

6 years agoTableGen/CodeGenSchedule: Move some getAllDerivedDefinitions() calls out of inner...
Matthias Braun [Tue, 21 Jun 2016 03:24:03 +0000 (03:24 +0000)]
TableGen/CodeGenSchedule: Move some getAllDerivedDefinitions() calls out of inner loops

This cuts the runtime of the two slowest tblgen invocations in aarch64
in half for me...

llvm-svn: 273235

6 years ago[X86] Pre-allocate SmallVector instead of using push_back in a loop. NFC
Craig Topper [Tue, 21 Jun 2016 03:05:40 +0000 (03:05 +0000)]
[X86] Pre-allocate SmallVector instead of using push_back in a loop. NFC

llvm-svn: 273234

6 years agoclang format change /NFC
Xinliang David Li [Tue, 21 Jun 2016 02:39:08 +0000 (02:39 +0000)]
clang format change /NFC

llvm-svn: 273233

6 years ago[Docs] More warning fixes to unbreak the docs buildbot.
George Burgess IV [Tue, 21 Jun 2016 02:19:43 +0000 (02:19 +0000)]
[Docs] More warning fixes to unbreak the docs buildbot.

A number of warnings still remain, but these were the last of the
"unlexable code"-related ones (AFAICT).

I changed a few examples in docs/UsersManual.rst to showcase
-Wextra-tokens because it's already documented (-Wmultichar isn't), and
the sphinx C lexer apparently can't handle char literals like 'ab'. It
seemed like a better overall approach than just marking the code blocks
as none or console.

llvm-svn: 273232

6 years ago[ImplicitNullCchecks] NFC cleanup
Sanjoy Das [Tue, 21 Jun 2016 02:10:18 +0000 (02:10 +0000)]
[ImplicitNullCchecks] NFC cleanup

 - Remove unsued constructor
 - Tighten up the interface for NullCheck

llvm-svn: 273231

6 years agoclang/test/Headers/opencl-c-header.cl: Add explicit -triple x86_64-unknown to appease...
NAKAMURA Takumi [Tue, 21 Jun 2016 01:54:54 +0000 (01:54 +0000)]
clang/test/Headers/opencl-c-header.cl: Add explicit -triple x86_64-unknown to appease *-win32 targets.

  <stdin>:9:25: note: possible intended match here
   %call = tail call i8 @"\01?convert_char_rte@@$$J0YADD@Z"(i8 %x) #2
                          ^

llvm-svn: 273230

6 years ago[CFLAA] Be more aggressive with interprocedural analysis.
George Burgess IV [Tue, 21 Jun 2016 01:42:47 +0000 (01:42 +0000)]
[CFLAA] Be more aggressive with interprocedural analysis.

This patch makes us perform interprocedural analysis on functions that
don't have internal linkage. It also removes a test that should've been
deleted in an earlier commit (since other tests now cover everything
that the newly-removed test covers).

Patch by Jia Chen.

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

llvm-svn: 273229

6 years ago[Docs] Try to fix the docs buildbot.
George Burgess IV [Tue, 21 Jun 2016 00:16:23 +0000 (00:16 +0000)]
[Docs] Try to fix the docs buildbot.

It's complaining that it couldn't lex a compiler warning as C++. I don't
blame it.

llvm-svn: 273227

6 years agoFix typo in eOpenOptionDontFollowSymlinks
Francis Ricci [Tue, 21 Jun 2016 00:03:57 +0000 (00:03 +0000)]
Fix typo in eOpenOptionDontFollowSymlinks

Summary: Fix capitalization

Reviewers: labath, sas, clayborg

Subscribers: lldb-commits

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

llvm-svn: 273225

6 years agoAdd a ENABLE_X86_RELAX_RELOCATIONS cmake option.
Rafael Espindola [Mon, 20 Jun 2016 23:54:44 +0000 (23:54 +0000)]
Add a ENABLE_X86_RELAX_RELOCATIONS  cmake option.

This corresponds to binutils' --enable-x86-relax-relocations.

llvm-svn: 273224

6 years agoUse the same tag type across all PointerLikeTypeTraits specializations
Reid Kleckner [Mon, 20 Jun 2016 23:50:21 +0000 (23:50 +0000)]
Use the same tag type across all PointerLikeTypeTraits specializations

Works around a bug (PR28216) in Clang's MS mangling of templates with
partial specializations.

This mismatch was introduced in about six months ago in r256656.

llvm-svn: 273223

6 years agoSimplify PICStyles.
Rafael Espindola [Mon, 20 Jun 2016 23:41:56 +0000 (23:41 +0000)]
Simplify PICStyles.

The main difference is that StubDynamicNoPIC is gone. The
dynamic-no-pic mode as the name implies is simply not pic. It is just
conservative about what it assumes to be dso local.

llvm-svn: 273222

6 years agoAttempt to make MSVC buildbots happy.
George Burgess IV [Mon, 20 Jun 2016 23:20:49 +0000 (23:20 +0000)]
Attempt to make MSVC buildbots happy.

Broken by r273219.

llvm-svn: 273220

6 years ago[CFLAA] Add interprocedural function summaries.
George Burgess IV [Mon, 20 Jun 2016 23:10:56 +0000 (23:10 +0000)]
[CFLAA] Add interprocedural function summaries.

This patch adds function summaries, so that we don't need to recompute
various properties about function parameters/return values at each
callsite of a function. It also adds many interprocedural tests for
CFLAA.

Patch by Jia Chen.

Differential Revision: http://reviews.llvm.org/D21475#inline-182390

llvm-svn: 273219

6 years agoAllow both one and two dashes for all multi-letter options.
Rui Ueyama [Mon, 20 Jun 2016 23:10:40 +0000 (23:10 +0000)]
Allow both one and two dashes for all multi-letter options.

GNU ld's manual page says that all options whose names are
multiple letters, except those who start with "o", can start
either with one or two dashes.

llvm-svn: 273218

6 years ago[X86][SSE] Add cost model for BSWAP of vectors
Simon Pilgrim [Mon, 20 Jun 2016 23:08:21 +0000 (23:08 +0000)]
[X86][SSE] Add cost model for BSWAP of vectors

The BSWAP of vector types is quite efficiently implemented using vector shuffles on SSE/AVX targets, we should reflect the typical cost of this to encourage vectorization.

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

llvm-svn: 273217

6 years agoTest that lldb calls the right 'printf' even when a 'printf' method exists.
Sean Callanan [Mon, 20 Jun 2016 23:01:11 +0000 (23:01 +0000)]
Test that lldb calls the right 'printf' even when a 'printf' method exists.

This test is currently failing.  We have a bug for it, as noted.

llvm-svn: 273211

6 years ago[X86][X87] Fix issue with sitofp i64 -> fp128 on 32-bit targets
Simon Pilgrim [Mon, 20 Jun 2016 22:41:17 +0000 (22:41 +0000)]
[X86][X87] Fix issue with sitofp i64 -> fp128 on 32-bit targets

Fix for PR27726 - sitofp i64 to fp128 was loading the merged load i64 to a x87 register preventing legalization for conversion to fp128.

Added 32-bit tests for fp128 cast/conversions.

llvm-svn: 273210

6 years agodon't repeat function names in documentation comments; NFC
Sanjay Patel [Mon, 20 Jun 2016 22:40:35 +0000 (22:40 +0000)]
don't repeat function names in documentation comments; NFC

llvm-svn: 273209

6 years agoForgot to svn add one of my test files for the change in r273207.
Kevin Enderby [Mon, 20 Jun 2016 22:27:49 +0000 (22:27 +0000)]
Forgot to svn add one of my test files for the change in r273207.

llvm-svn: 273208

6 years agoAdd support for Darwin’s 64-bit universal files with 64-bit offsets and sizes for...
Kevin Enderby [Mon, 20 Jun 2016 22:16:18 +0000 (22:16 +0000)]
Add support for Darwin’s 64-bit universal files with 64-bit offsets and sizes for the objects.

Darwin added support in its Xcode 8.0 tools (released in the beta) for universal
files where offsets and sizes for the objects are 64-bits to allow support for
objects contained in universal files to be larger then 4gb.  The change is very
straight forward.  There is a new magic number that differs by one bit, much
like the 64-bit Mach-O files.  Then there is a new structure that follow the
fat_header that has the same layout but with the offset and size fields using
64-bit values instead of 32-bit values.

rdar://26899493

llvm-svn: 273207

6 years agoDelete dead code. NFC.
Rafael Espindola [Mon, 20 Jun 2016 22:08:35 +0000 (22:08 +0000)]
Delete dead code. NFC.

llvm-svn: 273206

6 years ago[msan] Don't check dstaddr in sendto() interceptor.
Evgeniy Stepanov [Mon, 20 Jun 2016 22:05:33 +0000 (22:05 +0000)]
[msan] Don't check dstaddr in sendto() interceptor.

Dstaddr may contain uninitialized padding at the end (common
implementations accept larger addrlen and ignore the extra bytes).
Also, depending on the socket state, dstaddr argument may be ignored.

llvm-svn: 273205

6 years ago[msan] Allow uninitialized padding in struct msghdr.
Evgeniy Stepanov [Mon, 20 Jun 2016 21:44:14 +0000 (21:44 +0000)]
[msan] Allow uninitialized padding in struct msghdr.

llvm-svn: 273204

6 years agoRemove interface to get/set MaxFunctionCount
Easwaran Raman [Mon, 20 Jun 2016 21:36:38 +0000 (21:36 +0000)]
Remove interface to get/set MaxFunctionCount

Differential revision: http://reviews.llvm.org/D19185

llvm-svn: 273203

6 years ago[tsan] Do not instrument accesses to the gcov counters array
Vedant Kumar [Mon, 20 Jun 2016 21:24:26 +0000 (21:24 +0000)]
[tsan] Do not instrument accesses to the gcov counters array

There is a known intended race here. This is a follow-up to r264805,
which disabled tsan instrumentation for updates to instrprof counters.
For more background on this please see the discussion in D18164.

llvm-svn: 273202

6 years ago[InstSimplify] analyze (optionally casted) icmps to eliminate obviously false logic...
Sanjay Patel [Mon, 20 Jun 2016 20:59:59 +0000 (20:59 +0000)]
[InstSimplify] analyze (optionally casted) icmps to eliminate obviously false logic (PR27869)

By moving this transform to InstSimplify from InstCombine, we sidestep the problem/question
raised by PR27869:
https://llvm.org/bugs/show_bug.cgi?id=27869
...where InstCombine turns an icmp+zext into a shift causing us to miss the fold.

Credit to David Majnemer for a draft patch of the changes to InstructionSimplify.cpp.

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

llvm-svn: 273200

6 years agoPass AssumptionCacheTracker from SampleProfileLoader to Inliner
Dehao Chen [Mon, 20 Jun 2016 20:53:40 +0000 (20:53 +0000)]
Pass AssumptionCacheTracker from SampleProfileLoader to Inliner

Summary: Inliner needs ACT when calling InlineFunction. Instead of nullptr, we need to pass it in from SampleProfileLoader

Reviewers: davidxl

Subscribers: eraman, vsk, danielcdh, llvm-commits

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

llvm-svn: 273199

6 years agoRemove MaxFunctionCount module flag annotation.
Easwaran Raman [Mon, 20 Jun 2016 20:48:32 +0000 (20:48 +0000)]
Remove MaxFunctionCount module flag annotation.

Differential revision: http://reviews.llvm.org/D19184

llvm-svn: 273198

6 years agotest commit: remove trailing whitespace
Thomas Jablin [Mon, 20 Jun 2016 20:43:26 +0000 (20:43 +0000)]
test commit: remove trailing whitespace

llvm-svn: 273197

6 years agoclang-format: [Proto] Fix "import public" after r273179.
Daniel Jasper [Mon, 20 Jun 2016 20:39:53 +0000 (20:39 +0000)]
clang-format: [Proto] Fix "import public" after r273179.

llvm-svn: 273196

6 years agoFix a relatively nasty bug with fs::getPathFromOpenFD() on Windows. The GetFinalPathN...
Aaron Ballman [Mon, 20 Jun 2016 20:28:49 +0000 (20:28 +0000)]
Fix a relatively nasty bug with fs::getPathFromOpenFD() on Windows. The GetFinalPathNameByHandle API does not behave as documented; if given a buffer that has enough space for the path but not the null terminator, the call will return the number of characters required *without* the null terminator (despite being documented otherwise) and it will not set GetLastError(). The result was that this function would return a bogus path and no error. Instead, ensure there is sufficient space for a null terminator (we already strip it off manually for compatibility with older versions of Windows).

llvm-svn: 273195

6 years agoRename to be consistent with other type names. NFC
Daniel Berlin [Mon, 20 Jun 2016 20:21:33 +0000 (20:21 +0000)]
Rename to be consistent with other type names. NFC

llvm-svn: 273194

6 years ago[Sema] Only define function as move assignment when needed
Erik Pilkington [Mon, 20 Jun 2016 20:04:15 +0000 (20:04 +0000)]
[Sema] Only define function as move assignment when needed

Fixes PR27941, a crash on invalid.

Differential revision: http://reviews.llvm.org/D20923

llvm-svn: 273193

6 years agoELF/AMDGPU: Add support for R_AMDGPU_REL32 relocations
Tom Stellard [Mon, 20 Jun 2016 19:48:29 +0000 (19:48 +0000)]
ELF/AMDGPU: Add support for R_AMDGPU_REL32 relocations

Reviewers: rafael, ruiu

Subscribers: kzhuravl, llvm-commits

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

llvm-svn: 273192

6 years ago[OpenCL] Include opencl-c.h by default as a clang module
Yaxun Liu [Mon, 20 Jun 2016 19:26:00 +0000 (19:26 +0000)]
[OpenCL] Include opencl-c.h by default as a clang module

Include opencl-c.h by default as a module to utilize the automatic AST caching mechanism of clang modules.

Add an option -finclude-default-header to enable default header for OpenCL, which is off by default.

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

llvm-svn: 273191

6 years ago[OpenMP] Add the nowait clause to target update construct.
Kelvin Li [Mon, 20 Jun 2016 19:16:34 +0000 (19:16 +0000)]
[OpenMP] Add the nowait clause to target update construct.

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

llvm-svn: 273190

6 years ago[MemorySSA] Clean up unit tests a tiny bit. NFC.
George Burgess IV [Mon, 20 Jun 2016 19:13:07 +0000 (19:13 +0000)]
[MemorySSA] Clean up unit tests a tiny bit. NFC.

We recently made MemorySSA own the walker it creates. As a part of this,
the MSSA test fixture was changed to have a `Walker*` instead of a
`unique_ptr<Walker>`. So, we no longer need to do `&*Walker` in order to
get a `Walker*`.

llvm-svn: 273189

6 years agoInstCombine: Don't strip convergent from intrinsic callsites
Matt Arsenault [Mon, 20 Jun 2016 19:04:44 +0000 (19:04 +0000)]
InstCombine: Don't strip convergent from intrinsic callsites

Specific instances of intrinsic calls may want to be convergent, such
as certain register reads but the intrinsic declaration is not.

llvm-svn: 273188

6 years agoAdd a isPositionIndependent helper to ARMFastISel. NFC.
Rafael Espindola [Mon, 20 Jun 2016 19:00:05 +0000 (19:00 +0000)]
Add a isPositionIndependent helper to ARMFastISel. NFC.

llvm-svn: 273187

6 years ago[InstCombine] consolidate some icmp+logic tests and improve checks
Sanjay Patel [Mon, 20 Jun 2016 18:40:37 +0000 (18:40 +0000)]
[InstCombine] consolidate some icmp+logic tests and improve checks

llvm-svn: 273186

6 years ago[AArch64] Adjust the loop buffer size for Exynos M1 (NFC)
Evandro Menezes [Mon, 20 Jun 2016 18:39:41 +0000 (18:39 +0000)]
[AArch64] Adjust the loop buffer size for Exynos M1 (NFC)

llvm-svn: 273185

6 years ago[Kaleidoscope][BuildingAJIT] Remove some superfluous commas in Chapter 2.
Lang Hames [Mon, 20 Jun 2016 18:37:52 +0000 (18:37 +0000)]
[Kaleidoscope][BuildingAJIT] Remove some superfluous commas in Chapter 2.

llvm-svn: 273184

6 years ago[Kaleidoscope][BuildingAJIT] Fix a punctuation mistake in Chapter 2.
Lang Hames [Mon, 20 Jun 2016 18:34:46 +0000 (18:34 +0000)]
[Kaleidoscope][BuildingAJIT] Fix a punctuation mistake in Chapter 2.

llvm-svn: 273183

6 years agoAMDGPU: Preserve undef flag on vcc when shrinking v_cndmask_b32
Matt Arsenault [Mon, 20 Jun 2016 18:34:00 +0000 (18:34 +0000)]
AMDGPU: Preserve undef flag on vcc when shrinking v_cndmask_b32

The implicit operand is added by the initial instruction construction,
so this was adding an additional vcc use. The original one
was missing the undef flag the original condition had,
so the verifier would complain.

llvm-svn: 273182

6 years agoAMDGPU: Fold more custom nodes to undef
Matt Arsenault [Mon, 20 Jun 2016 18:33:56 +0000 (18:33 +0000)]
AMDGPU: Fold more custom nodes to undef

This will help sneak undefs past GVN into the DAG for
some tests.

Also add missing intrinsic for rsq_legacy, even though the node
was already selected to the instruction. Also start passing
the debug location to intrinsic errors.

llvm-svn: 273181

6 years ago[InstCombine] update to use FileCheck with autogenerated exact checking
Sanjay Patel [Mon, 20 Jun 2016 18:23:40 +0000 (18:23 +0000)]
[InstCombine] update to use FileCheck with autogenerated exact checking

llvm-svn: 273180

6 years agoclang-format: [Proto] Don't do bad things if imports are missing ;.
Daniel Jasper [Mon, 20 Jun 2016 18:20:38 +0000 (18:20 +0000)]
clang-format: [Proto] Don't do bad things if imports are missing ;.

llvm-svn: 273179

6 years agoUpdate for DiagnosticInfoStackSize changes
Matt Arsenault [Mon, 20 Jun 2016 18:13:09 +0000 (18:13 +0000)]
Update for DiagnosticInfoStackSize changes

llvm-svn: 273178

6 years agoGeneralize DiagnosticInfoStackSize to support other limits
Matt Arsenault [Mon, 20 Jun 2016 18:13:04 +0000 (18:13 +0000)]
Generalize DiagnosticInfoStackSize to support other limits

Backends may want to report errors on resources other than
stack size.

llvm-svn: 273177

6 years agoAdd missing decoding patterns toRoundUpToInstrBoundary
Etienne Bergeron [Mon, 20 Jun 2016 18:00:03 +0000 (18:00 +0000)]
Add missing decoding patterns toRoundUpToInstrBoundary

Summary:
The RoundUpToInstrBoundary determines intructions boundary and it's used to determine how to patch (intercept) functions.

The current x64-bit implementation is incomplete. This patch is adding patterns observed when trying to sanitize a 64-bit executable on my computer.

Thw two current functions not intercepted are:
```
RaiseExceptionStub:
000000007720C3B0 EB 06                jmp         RaiseException (07720C3B8h)
000000007720C3B2 90                   nop
000000007720C3B3 90                   nop
000000007720C3B4 90                   nop
000000007720C3B5 90                   nop
000000007720C3B6 90                   nop
000000007720C3B7 90                   nop
RaiseException:
000000007720C3B8 FF 25 3A 18 09 00    jmp         qword ptr [__imp_RaiseException (07729DBF8h)]
000000007720C3BE 8B 44 24 54          mov         eax,dword ptr [rsp+54h]
000000007720C3C2 85 C0                test        eax,eax
000000007720C3C4 0F 84 F5 05 00 00    je          Wow64NtCreateKey+12Fh (07720C9BFh)
```

```
CreateThreadStub:
0000000077215A10 48 83 EC 48          sub         rsp,48h
0000000077215A14 48 8B 44 24 78       mov         rax,qword ptr [rsp+78h]
0000000077215A19 48 89 44 24 38       mov         qword ptr [rsp+38h],rax
0000000077215A1E 8B 44 24 70          mov         eax,dword ptr [rsp+70h]
```

Reviewers: rnk

Subscribers: wang0109, chrisha

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

llvm-svn: 273176

6 years ago[ELF] Accept --soname= (two dashes).
Davide Italiano [Mon, 20 Jun 2016 17:58:09 +0000 (17:58 +0000)]
[ELF] Accept --soname= (two dashes).

Update an existing test to exercise the new functionality, while
I'm here.

llvm-svn: 273175

6 years agoHide send/sendto/sendmsg interptors under a flag.
Evgeniy Stepanov [Mon, 20 Jun 2016 17:57:51 +0000 (17:57 +0000)]
Hide send/sendto/sendmsg interptors under a flag.

A runtime flag to enable checking in send* interceptors.
Checking is enabled by default.

llvm-svn: 273174

6 years ago[InstCombine] update to use FileCheck with autogenerated exact checking
Sanjay Patel [Mon, 20 Jun 2016 17:56:13 +0000 (17:56 +0000)]
[InstCombine] update to use FileCheck with autogenerated exact checking

llvm-svn: 273173

6 years agoAMDGPU: Use correct method for determining instruction size
Matt Arsenault [Mon, 20 Jun 2016 17:51:32 +0000 (17:51 +0000)]
AMDGPU: Use correct method for determining instruction size

llvm-svn: 273172

6 years agoProperly handle short file names on the command line in Windows [TAKE 2]
Adrian McCarthy [Mon, 20 Jun 2016 17:51:27 +0000 (17:51 +0000)]
Properly handle short file names on the command line in Windows [TAKE 2]

Trying to expand short names with a relative path doesn't work, so this
first gets the module name to get a full path (which can still have short
names).

llvm-svn: 273171

6 years ago[InstCombine] regenerate checks
Sanjay Patel [Mon, 20 Jun 2016 17:48:48 +0000 (17:48 +0000)]
[InstCombine] regenerate checks

llvm-svn: 273170

6 years agoUse shouldAssumeDSOLocal.
Rafael Espindola [Mon, 20 Jun 2016 17:45:33 +0000 (17:45 +0000)]
Use shouldAssumeDSOLocal.

With this ARM fast isel knows that PIE variable are not preemptable.

llvm-svn: 273169

6 years agoAMDGPU: Add support for R_AMDGPU_REL32 relocations
Tom Stellard [Mon, 20 Jun 2016 17:33:43 +0000 (17:33 +0000)]
AMDGPU: Add support for R_AMDGPU_REL32 relocations

Reviewers: arsenm, kzhuravl, rafael

Subscribers: arsenm, llvm-commits, kzhuravl

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

llvm-svn: 273168

6 years agoSimplify. NFC.
Rafael Espindola [Mon, 20 Jun 2016 17:00:13 +0000 (17:00 +0000)]
Simplify. NFC.

llvm-svn: 273167

6 years agoAMDGPU: Emit R_AMDGPU_ABS32_{HI,LO} for scratch buffer relocations
Tom Stellard [Mon, 20 Jun 2016 16:59:44 +0000 (16:59 +0000)]
AMDGPU: Emit R_AMDGPU_ABS32_{HI,LO} for scratch buffer relocations

Reviewers: arsenm, rafael, kzhuravl

Subscribers: rafael, arsenm, llvm-commits, kzhuravl

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

llvm-svn: 273166

6 years ago[ARM] Enable isel of UMAAL
Sam Parker [Mon, 20 Jun 2016 16:47:09 +0000 (16:47 +0000)]
[ARM] Enable isel of UMAAL

TargetLowering and DAGToDAG are used to combine ADDC, ADDE and UMLAL
dags into UMAAL. Selection is split into the two phases because it
is easier to match the two patterns at those different times.

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

llvm-svn: 273165

6 years agoAdd a isPositionIndependent predicate.
Rafael Espindola [Mon, 20 Jun 2016 16:43:17 +0000 (16:43 +0000)]
Add a isPositionIndependent predicate.

Reduces a bit of code duplication and clarify where we are interested
just on position independence and no the location of the symbol.

llvm-svn: 273164

6 years agoForgot to update callers of deleteDeadInstruction
David Majnemer [Mon, 20 Jun 2016 16:07:38 +0000 (16:07 +0000)]
Forgot to update callers of deleteDeadInstruction

llvm-svn: 273163

6 years agoReapply "[LoopIdiom] Don't remove dead operands manually"
David Majnemer [Mon, 20 Jun 2016 16:03:25 +0000 (16:03 +0000)]
Reapply "[LoopIdiom] Don't remove dead operands manually"

This reverts commit r273160, reapplying r273132.
RecursivelyDeleteTriviallyDeadInstructions cannot be called on a
parentless Instruction.

llvm-svn: 273162

6 years agoRemoving an unused switch statement that has only a default label. This happens to...
Aaron Ballman [Mon, 20 Jun 2016 15:37:15 +0000 (15:37 +0000)]
Removing an unused switch statement that has only a default label. This happens to also eliminate an instance of switchception. NFC intended.

llvm-svn: 273161

6 years agoRevert "[LoopIdiom] Don't remove dead operands manually"
Cong Liu [Mon, 20 Jun 2016 15:22:15 +0000 (15:22 +0000)]
Revert "[LoopIdiom] Don't remove dead operands manually"

This reverts commit r273132.
Breaks multiple test under /llvm/test:Transforms (e.g.
llvm/test:Transforms/LoopIdiom/basic.ll.test) under asan.

llvm-svn: 273160

6 years ago[modules] Allow emission of update records for predefined __va_list_tag.
Vassil Vassilev [Mon, 20 Jun 2016 15:10:40 +0000 (15:10 +0000)]
[modules] Allow emission of update records for predefined __va_list_tag.

Handles the cases where old __va_list_tag is coming from a module and the new
is not, needing an update record.

Fixes https://llvm.org/bugs/show_bug.cgi?id=27890

Patch by Cristina Cristescu, Richard Smith and me.

llvm-svn: 273159

6 years agoMake test less sensitive to the resource directory.
Paul Robinson [Mon, 20 Jun 2016 14:33:49 +0000 (14:33 +0000)]
Make test less sensitive to the resource directory.
Same tactic as linux-header-search.cpp and android-ndk-standalone.cpp.

llvm-svn: 273158

6 years agoDon't go on an infinite loop on a missing ";".
Rafael Espindola [Mon, 20 Jun 2016 14:02:22 +0000 (14:02 +0000)]
Don't go on an infinite loop on a missing ";".

Thanks to Will Dietz for reporting the issue.

llvm-svn: 273157

6 years ago[ELF] - Lowercase the error messages text. NFC.
George Rimar [Mon, 20 Jun 2016 13:48:16 +0000 (13:48 +0000)]
[ELF] - Lowercase the error messages text. NFC.

llvm-svn: 273156

6 years ago[ELF] - Removed excessive reference from pointer arguments. NFC.
George Rimar [Mon, 20 Jun 2016 13:30:37 +0000 (13:30 +0000)]
[ELF] - Removed excessive reference from pointer arguments. NFC.

llvm-svn: 273155

6 years ago[ELF] - Forgot to address these two minors before commit r273152. NFC.
George Rimar [Mon, 20 Jun 2016 13:22:54 +0000 (13:22 +0000)]
[ELF] - Forgot to address these two minors before commit r273152. NFC.

llvm-svn: 273154

6 years ago[X86][F16C] Added half <-> double conversion tests
Simon Pilgrim [Mon, 20 Jun 2016 12:51:55 +0000 (12:51 +0000)]
[X86][F16C] Added half <-> double conversion tests

llvm-svn: 273153

6 years ago[ELF] - Recommit r273143("[ELF] - Basic versioned symbols support implemented.")
George Rimar [Mon, 20 Jun 2016 11:55:12 +0000 (11:55 +0000)]
[ELF] - Recommit r273143("[ELF] - Basic versioned symbols support implemented.")

With fix:
-soname flag was not set in testcase. Hash calculated for base def was different on local
and bot machines because filename fos used for calculating.

Initial commit message:
Patch implements basic support of versioned symbols.
There is no wildcards patterns matching except local: *;
There is no support for hierarchies.
There is no support for symbols overrides (@ vs @@ not handled).

This patch allows programs that using simple scripts to link and run.

Differential revision: http://reviews.llvm.org/D21018

llvm-svn: 273152

6 years ago[ELF][MIPS] Fix predicate used for sorting MIPS dynamic symbol tables
Simon Atanasyan [Mon, 20 Jun 2016 11:37:56 +0000 (11:37 +0000)]
[ELF][MIPS] Fix predicate used for sorting MIPS dynamic symbol tables

Now it conforms requirement for std::stable_sort predicates. That
resolves build-bot failures on Windows hosts.

llvm-svn: 273151

6 years agoAdd -fsyntax-only to Driver/opencl.cl test.
Cong Liu [Mon, 20 Jun 2016 11:25:26 +0000 (11:25 +0000)]
Add -fsyntax-only to Driver/opencl.cl test.

llvm-svn: 273150

6 years agoFix formatting of r273144. NFC.
Patrik Hagglund [Mon, 20 Jun 2016 11:19:58 +0000 (11:19 +0000)]
Fix formatting of r273144. NFC.

llvm-svn: 273149

6 years ago[AARCH64] Add support for Broadcom Vulcan
Pankaj Gode [Mon, 20 Jun 2016 11:13:31 +0000 (11:13 +0000)]
[AARCH64] Add support for Broadcom Vulcan

Adding core tuning support for new Broadcom Vulcan core (ARMv8.1A).

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

llvm-svn: 273148

6 years ago[X86] Add -mno-iamcu option.
Andrey Turetskiy [Mon, 20 Jun 2016 10:31:39 +0000 (10:31 +0000)]
[X86] Add -mno-iamcu option.

Add -mno-iamcu option to:
  1) Countervail -miamcu option easily
  2) Be compatible with GCC which supports this option

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

llvm-svn: 273147

6 years agoRevert r273143 "[ELF] - Basic versioned symbols support implemented."
George Rimar [Mon, 20 Jun 2016 10:29:53 +0000 (10:29 +0000)]
Revert r273143 "[ELF] - Basic versioned symbols support implemented."

It broke buildbot:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast

llvm-svn: 273146

6 years agoAvoid output indeterminism between GCC and Clang builds.
Patrik Hagglund [Mon, 20 Jun 2016 10:19:04 +0000 (10:19 +0000)]
Avoid output indeterminism between GCC and Clang builds.

Remove dependency of the evalution order of function arguments, which
is unspecified.

Patch by David Stenberg.

llvm-svn: 273145

6 years agoAvoid output indeterminism between GCC and Clang builds.
Patrik Hagglund [Mon, 20 Jun 2016 10:19:00 +0000 (10:19 +0000)]
Avoid output indeterminism between GCC and Clang builds.

Remove dependency of the evalution order of function arguments, which
is unspecified.

The following test previously failed when built with GCC (but succeded
when built with Clang):

  ; RUN: opt -sroa -S < %s | FileCheck %s

  target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
  target triple = "x86_64-unknown-linux-gnu"

  %A = type {i16}

  @a = global %A* null
  @b = global i16 0

  ; CHECK-LABEL: @f1(
  ; CHECK: alloca %A
  ; CHECK-NEXT: extractvalue %A
  ; CHECK-NEXT: getelementptr inbounds %A

  define void @f1 (%A %a) {
    %1 = alloca %A
    store %A %a, %A* %1
    %2 = load i16, i16* @b
    %3 = icmp ne i16 %2, 0
    br i1 %3, label %bb1, label %bb2
  bb1:
    store %A* %1, %A** @a
    br label %bb2
  bb2:
    ret void
  }

Patch by David Stenberg.

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

llvm-svn: 273144

6 years ago[ELF] - Basic versioned symbols support implemented.
George Rimar [Mon, 20 Jun 2016 10:16:33 +0000 (10:16 +0000)]
[ELF] - Basic versioned symbols support implemented.

Patch implements basic support of versioned symbols.
There is no wildcards patterns matching except local: *;
There is no support for hierarchies.
There is no support for symbols overrides (@ vs @@ not handled).

This patch allows programs that using simple scripts to link and run.

Differential revision: http://reviews.llvm.org/D21018

llvm-svn: 273143

6 years agoFixed compilation error under MSVS 2015 (looks like compiler bug). NFC.
George Rimar [Mon, 20 Jun 2016 10:01:50 +0000 (10:01 +0000)]
Fixed compilation error under MSVS 2015 (looks like compiler bug). NFC.

llvm-svn: 273142

6 years agoFix for PR27940
Patrik Hagglund [Mon, 20 Jun 2016 09:10:10 +0000 (09:10 +0000)]
Fix for PR27940

After a store has been eliminated, when making sure that the
instruction iterator points to a valid instruction, dbg intrinsics are
now ignored as a new instruction.

Patch by Henric Karlsson.

Reviewed by Daniel Berlin.

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

llvm-svn: 273141

6 years agoFix comment.
Rui Ueyama [Mon, 20 Jun 2016 08:34:50 +0000 (08:34 +0000)]
Fix comment.

llvm-svn: 273140

6 years ago[codeview] Add an extra check for TPI hash values.
Rui Ueyama [Mon, 20 Jun 2016 07:31:29 +0000 (07:31 +0000)]
[codeview] Add an extra check for TPI hash values.

This patch adds a function that corresponds to `fUDTAnon`
and use that to compute TPI hash values as the reference does.

llvm-svn: 273139