OSDN Git Service

android-x86/external-llvm.git
8 years ago[PGO] fix prof symbol lookup bug
Xinliang David Li [Wed, 10 Feb 2016 06:36:55 +0000 (06:36 +0000)]
[PGO] fix prof symbol lookup bug

Patch by Rong Xu

The problem is exposed by intra-module indirect call promotion where
prof symtab is created from module which does not contain all symbols
from the program. With partial symtab, the result needs to be checked
more strictly.

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

8 years agoX86: Remove useless semicolon
JF Bastien [Wed, 10 Feb 2016 04:04:12 +0000 (04:04 +0000)]
X86: Remove useless semicolon

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

8 years agollvm-config: Fix DLL prefix on cygming.
NAKAMURA Takumi [Wed, 10 Feb 2016 03:09:13 +0000 (03:09 +0000)]
llvm-config: Fix DLL prefix on cygming.

For example, LLVMSupport takes the form of LLVMSupport.dll, not libLLVMSupport.dll.

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

8 years agollvm-config: Quick fix for cross compilation. Don't be confsed between host and targe...
NAKAMURA Takumi [Wed, 10 Feb 2016 01:12:55 +0000 (01:12 +0000)]
llvm-config: Quick fix for cross compilation. Don't be confsed between host and target. It has been there since r252532.

FIXME: The clause may use conditions of host compiler, not HOST_TRIPLE.

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

8 years agoStructurizeCFG: Initialize SkipUniformRegions in the default constructor
Tom Stellard [Wed, 10 Feb 2016 01:10:09 +0000 (01:10 +0000)]
StructurizeCFG: Initialize SkipUniformRegions in the default constructor

This should fix some random bot failures caused by r260336.

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

8 years agoRevert "Turn on LLVM_ENABLE_PLUGINS by default on Windows"
Reid Kleckner [Wed, 10 Feb 2016 01:06:37 +0000 (01:06 +0000)]
Revert "Turn on LLVM_ENABLE_PLUGINS by default on Windows"

This reverts r260262, it broke some LLVM tests (bugpoint).

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

8 years ago[Orc] Add lazy-JITting support for i386.
Lang Hames [Wed, 10 Feb 2016 01:02:33 +0000 (01:02 +0000)]
[Orc] Add lazy-JITting support for i386.

This patch adds a new class, OrcI386, which contains the hooks needed to
support lazy-JITing on i386 (currently only for Pentium 2 or above, as the JIT
re-entry code uses the FXSAVE/FXRSTOR instructions).

Support for i386 is enabled in the LLI lazy JIT and the Orc C API, and
regression and unit tests are enabled for this architecture.

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

8 years agoStructurizeCFG: Add an option for skipping regions with only uniform branches
Tom Stellard [Wed, 10 Feb 2016 00:39:37 +0000 (00:39 +0000)]
StructurizeCFG: Add an option for skipping regions with only uniform branches

Summary:
Tests for this will be added once the AMDGPU backend enables this
option.

Reviewers: arsenm

Subscribers: llvm-commits

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

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

8 years agoAdd support for struct in C API test
Amaury Sechet [Wed, 10 Feb 2016 00:38:50 +0000 (00:38 +0000)]
Add support for struct in C API test

Summary: As per title. This also include extra support for insertvalue and extracvalue.

Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker

Subscribers: llvm-commits

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

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

8 years agoAdd binding for counting argument and find called value of call and invoke instructio...
Amaury Sechet [Wed, 10 Feb 2016 00:09:37 +0000 (00:09 +0000)]
Add binding for counting argument and find called value of call and invoke instruction from the C API.

Summary: As per title. This remove the need to rely on internal knowledge of call and invoke instruction to find called value and argument count.

Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker

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

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

8 years agoARM: improve documentation slightly.
Tim Northover [Tue, 9 Feb 2016 23:55:48 +0000 (23:55 +0000)]
ARM: improve documentation slightly.

It seems the ARMv8 instruction set overview is no longer provided by ARM, so
I've removed it. Since most of the other documents were the same I unified the
two sections.

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

8 years ago[x86] convert masked load of exactly one element to scalar load
Sanjay Patel [Tue, 9 Feb 2016 23:44:35 +0000 (23:44 +0000)]
[x86] convert masked load of exactly one element to scalar load

This is the load counterpart to the store optimization that was added in:
http://reviews.llvm.org/rL260145

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

8 years agoSplit clone value and instruction in the echo C API test
Amaury Sechet [Tue, 9 Feb 2016 23:41:20 +0000 (23:41 +0000)]
Split clone value and instruction in the echo C API test

Summary: This is a bit of refactoring required to be able to generate instruction in forward basic block. This, for instance, is a requirement for phi in loops.

Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker

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

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

8 years agoAdd icmp and conditional branches in the C API echo test.
Amaury Sechet [Tue, 9 Feb 2016 23:15:02 +0000 (23:15 +0000)]
Add icmp and conditional branches in the C API echo test.

Summary:
Improving coverage.

Depends on D16912 .

Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker

Subscribers: llvm-commits

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

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

8 years agoAdd convergent-removing bits to FunctionAttrs pass.
Justin Lebar [Tue, 9 Feb 2016 23:03:22 +0000 (23:03 +0000)]
Add convergent-removing bits to FunctionAttrs pass.

Summary:
Remove the convergent attribute on any functions which provably do not
contain or invoke any convergent functions.

After this change, we'll be able to modify clang to conservatively add
'convergent' to all functions when compiling CUDA.

Reviewers:  jingyue, joker.eph

Subscribers: llvm-commits, tra, jhen, hfinkel, resistor, chandlerc, arsenm

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

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

8 years agoUpdate documentation about convergent attribute.
Justin Lebar [Tue, 9 Feb 2016 23:03:17 +0000 (23:03 +0000)]
Update documentation about convergent attribute.

Summary:
Be more explicit about what 'convergent' means, and indicate that the
compiler may remove the attribute from a function if it can prove that
the function doesn't in fact execute any convergent ops.

Reviewers: resistor, jingyue, joker.eph

Subscribers: hfinkel, chandlerc, arsenm, jhen, tra, llvm-commits

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

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

8 years agoFix GCC build.
Peter Collingbourne [Tue, 9 Feb 2016 23:01:38 +0000 (23:01 +0000)]
Fix GCC build.

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

8 years ago[CodeGen] Prefer "if (SDValue R = ...)" to "if (R.getNode())". NFCI.
Ahmed Bougacha [Tue, 9 Feb 2016 22:54:12 +0000 (22:54 +0000)]
[CodeGen] Prefer "if (SDValue R = ...)" to "if (R.getNode())". NFCI.

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

8 years ago[X86] Don't reuse an unrelated variable, create a new one. NFC.
Ahmed Bougacha [Tue, 9 Feb 2016 22:54:05 +0000 (22:54 +0000)]
[X86] Don't reuse an unrelated variable, create a new one. NFC.

Using Op makes it look like we're doing something with it.
We're really not.

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

8 years ago[X86] Remove unnecessary assignment. NFC.
Ahmed Bougacha [Tue, 9 Feb 2016 22:53:58 +0000 (22:53 +0000)]
[X86] Remove unnecessary assignment. NFC.

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

8 years agoAdd C binding for AllocaInst::getAllocatedType
Amaury Sechet [Tue, 9 Feb 2016 22:50:53 +0000 (22:50 +0000)]
Add C binding for AllocaInst::getAllocatedType

Summary:
Comes with an awesome test.

Depends on D16912

Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker

Subscribers: llvm-commits

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

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

8 years agoWholeProgramDevirt: introduce.
Peter Collingbourne [Tue, 9 Feb 2016 22:50:34 +0000 (22:50 +0000)]
WholeProgramDevirt: introduce.

This pass implements whole program optimization of virtual calls in cases
where we know (via bitset information) that the list of callees is fixed. This
includes the following:

- Single implementation devirtualization: if a virtual call has a single
  possible callee, replace all calls with a direct call to that callee.

- Virtual constant propagation: if the virtual function's return type is an
  integer <=64 bits and all possible callees are readnone, for each class and
  each list of constant arguments: evaluate the function, store the return
  value alongside the virtual table, and rewrite each virtual call as a load
  from the virtual table.

- Uniform return value optimization: if the conditions for virtual constant
  propagation hold and each function returns the same constant value, replace
  each virtual call with that constant.

- Unique return value optimization for i1 return values: if the conditions
  for virtual constant propagation hold and a single vtable's function
  returns 0, or a single vtable's function returns 1, replace each virtual
  call with a comparison of the vptr against that vtable's address.

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

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

8 years agoImprove the C API echo test tool to emit basic block is the right order.
Amaury Sechet [Tue, 9 Feb 2016 22:36:41 +0000 (22:36 +0000)]
Improve the C API echo test tool to emit basic block is the right order.

Summary: As per title. Also add a facility method to get the name of a basic block from the C API.

Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker

Subscribers: llvm-commits

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

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

8 years ago[mips] Extend MipsAsmParser class to handle %got(sym + const) expressions
Simon Atanasyan [Tue, 9 Feb 2016 22:31:49 +0000 (22:31 +0000)]
[mips] Extend MipsAsmParser class to handle %got(sym + const) expressions

Now the parser supports `%got(sym)` expressions only but `%got(sym + const)`
variant is also valid and accepted by GAS.

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

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

8 years ago[MemoryBuiltins] Fix an issue with hasNoAliasAttr
Sanjoy Das [Tue, 9 Feb 2016 21:54:18 +0000 (21:54 +0000)]
[MemoryBuiltins] Fix an issue with hasNoAliasAttr

Summary:
`hasNoAliasAttr` is buggy: it checks to see if the called function has
a `noalias` attribute, which is incorrect since functions are not even
allowed to have the `noalias` attribute.  The comment on its only
caller, `llvm::isNoAliasFn`, makes it pretty clear that the intention
to do the `noalias` check on the return value, and not the callee.

Unfortunately I couldn't find a way to test this upstream -- fixing
this does not change the observable behavior of any of the passes that
use this.  This is not very surprising, since `noalias` does not tell
anything about the contents of the allocated memory (so, e.g., you
still cannot fold loads).  I'll be happy to be proven wrong though.

Reviewers: chandlerc, reames

Subscribers: mcrosier, llvm-commits

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

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

8 years ago[Verifier] Add checks for masked.load and masked.store intrinsics
Philip Reames [Tue, 9 Feb 2016 21:43:12 +0000 (21:43 +0000)]
[Verifier] Add checks for masked.load and masked.store intrinsics

While trying to track down what appears to be a LoopVectorizer bug, I noticed that we had no validation of the correctness of calls emitted to @llvm.masked.load and @llvm.masked.store.  This meant malformed IR was showing up much much later than it should.  Hopefully, having Verifier rules in place will make this easier to isolate.

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

8 years ago[SelectionDAG] make getMemBasePlusOffset() accessible; NFCI
Sanjay Patel [Tue, 9 Feb 2016 21:42:04 +0000 (21:42 +0000)]
[SelectionDAG] make getMemBasePlusOffset() accessible; NFCI

I reinvented this functionality in http://reviews.llvm.org/D16828 because it was
hidden away as a static function. The changes in x86 are not based on a complete
audit. I suspect there are other possible uses there, and there are almost certainly
more potential users in other targets.

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

8 years agoThis brings back commit r259578.
Rafael Espindola [Tue, 9 Feb 2016 21:39:49 +0000 (21:39 +0000)]
This brings back commit r259578.

But now it follows the llvm style, uses an early return and doesn't
include a file named 1.o.

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

8 years agoFix name style.
Rafael Espindola [Tue, 9 Feb 2016 21:35:14 +0000 (21:35 +0000)]
Fix name style.

Functions start with a lower case, variables with an upper case.

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

8 years agoUpdate comment style.
Rafael Espindola [Tue, 9 Feb 2016 21:32:56 +0000 (21:32 +0000)]
Update comment style.

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

8 years agoRevert "Correct size calculations for ELF files"
Rafael Espindola [Tue, 9 Feb 2016 21:30:10 +0000 (21:30 +0000)]
Revert "Correct size calculations for ELF files"

This reverts commit r259578.

There are enough issues with this small patch that it is better to
revert and then commit a fixed version (will be committed shortly).

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

8 years ago[AArch64] This check is specific to merging instructions. NFC.
Chad Rosier [Tue, 9 Feb 2016 21:20:12 +0000 (21:20 +0000)]
[AArch64] This check is specific to merging instructions. NFC.

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

8 years agoRemove system-libs.test for now
Ehsan Akhgari [Tue, 9 Feb 2016 21:17:58 +0000 (21:17 +0000)]
Remove system-libs.test for now

This test fails in the ninja-x64-msvc-RA-centos6 builder, so the
UNSUPPORTED: system-windows condition is insufficient.  Removing it
for now; I will investigate how this can be fixed later.

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

8 years agoFix a test added in r260263
Ehsan Akhgari [Tue, 9 Feb 2016 21:10:22 +0000 (21:10 +0000)]
Fix a test added in r260263

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

8 years ago[InstCombine][GC] Handle gc.relocations of vector type
Philip Reames [Tue, 9 Feb 2016 21:09:22 +0000 (21:09 +0000)]
[InstCombine][GC] Handle gc.relocations of vector type

We introduced gc.relocates of vector-of-pointer types a couple of weeks back.  Somehow, I missed updating the InstCombine rule to account for this.  If we hit this code path with a vector-of-pointers gc.relocate, we'd crash on a cast<PointerType>.

I also took the chance to do a bit of code style cleanup.

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

8 years ago[AArch64] AArch64LoadStoreOptimizer: fix bug in pre-inc check iterator
Geoff Berry [Tue, 9 Feb 2016 20:47:21 +0000 (20:47 +0000)]
[AArch64] AArch64LoadStoreOptimizer: fix bug in pre-inc check iterator

Summary:
Fix case where a pre-inc/dec load/store would not be formed if the
add/sub that forms the inc/dec part of the operation was the first
instruction in the block being examined.

Reviewers: mcrosier, jmolloy, t.p.northover, junbuml

Subscribers: aemerson, rengolin, mcrosier, llvm-commits

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

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

8 years ago[AArch64] Bail even earlier if the instructions modifieds the base register. NFC.
Chad Rosier [Tue, 9 Feb 2016 20:44:41 +0000 (20:44 +0000)]
[AArch64] Bail even earlier if the instructions modifieds the base register. NFC.

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

8 years ago[AArch64] Simplify. NFC.
Chad Rosier [Tue, 9 Feb 2016 20:27:45 +0000 (20:27 +0000)]
[AArch64] Simplify. NFC.

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

8 years ago[AArch64] Add an assert to ensure we don't scale an offset that can't be scaled.
Chad Rosier [Tue, 9 Feb 2016 20:18:07 +0000 (20:18 +0000)]
[AArch64] Add an assert to ensure we don't scale an offset that can't be scaled.

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

8 years agoFix a typo in r260263
Ehsan Akhgari [Tue, 9 Feb 2016 20:02:35 +0000 (20:02 +0000)]
Fix a typo in r260263

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

8 years ago[AArch64] Add a FIXME about invalid KILL markers after the ld/st opt pass.
Chad Rosier [Tue, 9 Feb 2016 19:42:19 +0000 (19:42 +0000)]
[AArch64] Add a FIXME about invalid KILL markers after the ld/st opt pass.

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

8 years agollvm-config: Add preliminary Windows support
Ehsan Akhgari [Tue, 9 Feb 2016 19:41:14 +0000 (19:41 +0000)]
llvm-config: Add preliminary Windows support

Summary:
This patch adds Windows support for a few of the llvm-config commands,
including cflags, ldflags, libs, and system-libs.

Currently llvm-config is untested, so this patch adds tests for the
commands that it fixes as well.

Reviewers: rnk

Subscribers: llvm-commits

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

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

8 years agoTurn on LLVM_ENABLE_PLUGINS by default on Windows
Ehsan Akhgari [Tue, 9 Feb 2016 19:37:27 +0000 (19:37 +0000)]
Turn on LLVM_ENABLE_PLUGINS by default on Windows

Reviewers: rnk

Subscribers: llvm-commits

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

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

8 years agoAdd support for importing and exporting Registry objects on Windows
Ehsan Akhgari [Tue, 9 Feb 2016 19:37:25 +0000 (19:37 +0000)]
Add support for importing and exporting Registry objects on Windows

On Windows, the DLL containing the registry will get its own global head
and tail variables, so the entries registered in the DLL will be
invisible to the consumer.

In order to solve this, we need to export a getter function from the
plugin DLL per registry and copy over the data inside it.  This patch
adds support for this.  This will be used to support clang plugins on
Windows.

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

8 years ago[AArch64] Remove redundant calls and clang format. NFC.
Chad Rosier [Tue, 9 Feb 2016 19:33:42 +0000 (19:33 +0000)]
[AArch64] Remove redundant calls and clang format. NFC.

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

8 years ago[Hexagon] Fixing relocation generation and adding tests.
Colin LeMahieu [Tue, 9 Feb 2016 19:18:02 +0000 (19:18 +0000)]
[Hexagon] Fixing relocation generation and adding tests.

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

8 years ago[MC] Adding GOTREL expression variant.
Colin LeMahieu [Tue, 9 Feb 2016 19:17:34 +0000 (19:17 +0000)]
[MC] Adding GOTREL expression variant.

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

8 years ago[AArch64] Hoist now common logic. NFC.
Chad Rosier [Tue, 9 Feb 2016 19:17:18 +0000 (19:17 +0000)]
[AArch64] Hoist now common logic. NFC.

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

8 years ago[AArch64] Rename variable to make it clear we're merging here, not pairing.
Chad Rosier [Tue, 9 Feb 2016 19:09:22 +0000 (19:09 +0000)]
[AArch64] Rename variable to make it clear we're merging here, not pairing.

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

8 years ago[AArch64] Separage the codegen logic for widening vs. pairing. NFC.
Chad Rosier [Tue, 9 Feb 2016 19:02:12 +0000 (19:02 +0000)]
[AArch64] Separage the codegen logic for widening vs. pairing. NFC.

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

8 years ago[llvm-readobj][ELF] Show MIPS GOT content when there is another zero-sized section...
Simon Atanasyan [Tue, 9 Feb 2016 18:45:35 +0000 (18:45 +0000)]
[llvm-readobj][ELF] Show MIPS GOT content when there is another zero-sized section at the same address

It is possible to have .got section and one or more zero-sized section
at the same address. This patch first checks that GOT (or GOT PLT)
section should have non-zero size using corresponding dynamic tags. Then
it looks up not empty section at the specified address.

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

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

8 years ago[FunctionAttrs] Fix SCC logic around operand bundles
Sanjoy Das [Tue, 9 Feb 2016 18:40:40 +0000 (18:40 +0000)]
[FunctionAttrs] Fix SCC logic around operand bundles

FunctionAttrs does an "optimistic" analysis of SCCs as a unit, which
means normally it is able to disregard calls from an SCC into itself.
However, calls and invokes with operand bundles are allowed to have
memory effects not fully described by the memory effects on the call
target, so we can't be optimistic around operand-bundled calls from an
SCC into itself.

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

8 years agoFix a formatting problems with llvm-size and the -m option.
Kevin Enderby [Tue, 9 Feb 2016 18:33:15 +0000 (18:33 +0000)]
Fix a formatting problems with llvm-size and the -m option.
It was using format() with a string for 64-bit types but was
passed a 32-bit type in places when printing values for
32-bit Mach-O files.

rdar://24542509

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

8 years ago[AArch64] Cleanup to simplify logic when widening vs. pairing loads/stores. NFC.
Chad Rosier [Tue, 9 Feb 2016 18:10:20 +0000 (18:10 +0000)]
[AArch64] Cleanup to simplify logic when widening vs. pairing loads/stores. NFC.

The logic to pair instructions and merge narrow instructions has become cloogy
and error prone.  This patch beings to unravel these two similar, but distinct
optimizations.

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

8 years ago[x86] make getOneTrueElt() a helper function ; NFC
Sanjay Patel [Tue, 9 Feb 2016 17:39:58 +0000 (17:39 +0000)]
[x86] make getOneTrueElt() a helper function ; NFC

As mentioned in http://reviews.llvm.org/D16828 , the related masked load transform
will need this logic, so I'm moving it out to make that patch smaller.

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

8 years ago[AArch64] Rename variable to improve readability. NFC.
Chad Rosier [Tue, 9 Feb 2016 15:59:57 +0000 (15:59 +0000)]
[AArch64] Rename variable to improve readability. NFC.

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

8 years ago[AArch64] Remove stale comment.
Chad Rosier [Tue, 9 Feb 2016 15:51:33 +0000 (15:51 +0000)]
[AArch64] Remove stale comment.

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

8 years agoFix comment for MD5Hash.
Teresa Johnson [Tue, 9 Feb 2016 13:28:44 +0000 (13:28 +0000)]
Fix comment for MD5Hash.

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

8 years ago[X86][AVX2] Fix SIGN_EXTEND vector handling on AVX2 targets.
Simon Pilgrim [Tue, 9 Feb 2016 08:19:19 +0000 (08:19 +0000)]
[X86][AVX2] Fix SIGN_EXTEND vector handling on AVX2 targets.

On AVX2 target we are poorly legalizing SIGN_EXTEND ops for which the input's legalized type doesn't have the same number of elements as the destination, resulting in an ANY_EXTEND followed by a SIGN_EXTEND_INREG.

This patch uses the existing SIGN_EXTEND -> SIGN_EXTEND_VECTOR_INREG combine to extend the input to the size of the result and using SIGN_EXTEND_VECTOR_INREG instead.

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

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

8 years agoAdd comments to some tests
Xinliang David Li [Tue, 9 Feb 2016 05:47:08 +0000 (05:47 +0000)]
Add comments to some tests

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

8 years agoFurther reduce test overhead
Xinliang David Li [Tue, 9 Feb 2016 05:36:57 +0000 (05:36 +0000)]
Further reduce test overhead

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

8 years agoRefactor PGO function naming and MD5 hashing support out of ProfileData
Teresa Johnson [Tue, 9 Feb 2016 05:12:44 +0000 (05:12 +0000)]
Refactor PGO function naming and MD5 hashing support out of ProfileData

Summary:
Move the function renaming logic into the Function class, and the
MD5Hash routine into the MD5 header.

This will enable these routines to be shared with ThinLTO, which
will be changed to store the MD5 hash instead of full function name
in the combined index for significant size reductions. And using the same
function naming for locals in the function index facilitates future
integration with indirect call value profiles.

Reviewers: davidxl

Subscribers: llvm-commits

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

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

8 years agoUse std::forward to make ErrorOr<T> constructible from a value that has a user-define...
Nick Lewycky [Tue, 9 Feb 2016 04:47:58 +0000 (04:47 +0000)]
Use std::forward to make ErrorOr<T> constructible from a value that has a user-defined conversion to T. No functionality change intended.

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

8 years ago[GMR/OperandBundles] Teach getModRefBehavior about operand bundles
Sanjoy Das [Tue, 9 Feb 2016 02:31:47 +0000 (02:31 +0000)]
[GMR/OperandBundles] Teach getModRefBehavior about operand bundles

In general, memory restrictions on a called function (e.g. readnone)
cannot be transferred to a CallSite that has operand bundles.  It is
possible to make this inference smarter, but lets fix the behavior to be
correct first.

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

8 years agoRemove TrailingObjects::operator delete. It's still suffering from
Richard Smith [Tue, 9 Feb 2016 02:09:16 +0000 (02:09 +0000)]
Remove TrailingObjects::operator delete. It's still suffering from
compiler-specific issues. Instead, repeat an 'operator delete' definition in
each derived class that is actually deleted, and give up on the static type
safety of an error when sized delete is accidentally used on a type derived
from TrailingObjects.

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

8 years agoFix the LLVM_ENABLE_MODULES build after adding TargetOpcodes.def in r259726.
David L Kreitzer [Tue, 9 Feb 2016 01:35:45 +0000 (01:35 +0000)]
Fix the LLVM_ENABLE_MODULES build after adding TargetOpcodes.def in r259726.

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

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

8 years agoAdd an "addUsedAAAnalyses" helper function
Sanjoy Das [Tue, 9 Feb 2016 01:21:57 +0000 (01:21 +0000)]
Add an "addUsedAAAnalyses" helper function

Summary:
Passes that call `getAnalysisIfAvailable<T>` also need to call
`addUsedIfAvailable<T>` in `getAnalysisUsage` to indicate to the
legacy pass manager that it uses `T`.  This contract was being
violated by passes that used `createLegacyPMAAResults`.  This change
fixes this by exposing a helper in AliasAnalysis.h,
`addUsedAAAnalyses`, that is complementary to createLegacyPMAAResults
and does the right thing when called from `getAnalysisUsage`.

Reviewers: chandlerc

Subscribers: mcrosier, llvm-commits

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

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

8 years agoRemove SCEVAAWrapperPass from createLegacyPMAAResults; NFC
Sanjoy Das [Tue, 9 Feb 2016 01:21:50 +0000 (01:21 +0000)]
Remove SCEVAAWrapperPass from createLegacyPMAAResults; NFC

Summary:
createLegacyPMAAResults is only called by CGSCC and Module passes, so
the call to getAnalysisIfAvailable<SCEVAAWrapperPass>() never
succeeds (SCEVAAWrapperPass is a function pass).

Reviewers: chandlerc

Subscribers: mcrosier, llvm-commits

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

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

8 years agoRe-commit r259942 (reverted in r260053) with a different workaround for the MSVC...
Richard Smith [Tue, 9 Feb 2016 01:03:42 +0000 (01:03 +0000)]
Re-commit r259942 (reverted in r260053) with a different workaround for the MSVC bug.

This fixes undefined behavior in C++14 due to the size of the object being
deleted being different from sizeof(dynamic type) when it is allocated with
trailing objects.

MSVC seems to have several bugs around using-declarations changing the access
of a member inherited from a base class, so use forwarding functions instead of
using-declarations to make TrailingObjects::operator delete accessible where
desired.

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

8 years agoSimplify some expressions involving unique_ptr and ErrorOr
David Blaikie [Tue, 9 Feb 2016 01:02:24 +0000 (01:02 +0000)]
Simplify some expressions involving unique_ptr and ErrorOr

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

8 years agoThis patch is to fix PR26529 caused by r259736.
Wei Mi [Tue, 9 Feb 2016 00:07:08 +0000 (00:07 +0000)]
This patch is to fix PR26529 caused by r259736.

IndVarSimplify assumes scAddRecExpr to be expanded in literal form instead of
canonical form by calling disableCanonicalMode after it creates SCEVExpander.
When CanonicalMode is disabled, SCEVExpander::expand should always return PHI
node for scAddRecExpr. r259736 broke the assumption.

The fix is to let SCEVExpander::expand skip the reuse Value logic if
CanonicalMode is false.

In addition, Besides IndVarSimplify, LSR pass also calls disableCanonicalMode
before doing rewrite. We can remove the original check of LSRMode in reuse
Value logic and use CanonicalMode instead.

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

8 years ago[llvm-nm] Remove excessive parenthesis, noticed by David Blaikie.
Davide Italiano [Mon, 8 Feb 2016 23:50:23 +0000 (23:50 +0000)]
[llvm-nm] Remove excessive parenthesis, noticed by David Blaikie.

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

8 years ago[PGO] Revert r260146 as it breaks Darwin platforms.
Rong Xu [Mon, 8 Feb 2016 23:11:16 +0000 (23:11 +0000)]
[PGO] Revert r260146 as it breaks Darwin platforms.
r260146 | xur | 2016-02-08 13:07:46 -0800 (Mon, 08 Feb 2016) | 13 lines
[PGO] Differentiate Clang instrumentation and IR level instrumentation profiles

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

8 years agoFactor out UnrollAnalyzer to Analysis, and add unit tests for it.
Michael Zolotukhin [Mon, 8 Feb 2016 23:03:59 +0000 (23:03 +0000)]
Factor out UnrollAnalyzer to Analysis, and add unit tests for it.

Summary:
Unrolling Analyzer is already pretty complicated, and it becomes harder and harder to exercise it with usual IR tests, as with them we can only check the final decision: whether the loop is unrolled or not. This change factors this framework out from LoopUnrollPass to analyses, which allows to use unit tests.
The change itself is supposed to be NFC, except adding a couple of tests.

I plan to add more tests as I add new functionality and find/fix bugs.

Reviewers: chandlerc, hfinkel, sanjoy

Subscribers: zzheng, sanjoy, llvm-commits

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

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

8 years ago[X86][SSE1] Add MOVLHPS/MOVHLPS lowering and memory folding support
Simon Pilgrim [Mon, 8 Feb 2016 23:03:46 +0000 (23:03 +0000)]
[X86][SSE1] Add MOVLHPS/MOVHLPS lowering and memory folding support

As discussed on PR26491, this patch adds support for lowering v4f32 shuffles to the MOVLHPS/MOVHLPS instructions. It also adds support for memory folding with their MOVLPS/MOVHPS load equivalents.

This first patch only really helps SSE1 targets as SSE2+ targets will widen the shuffle mask and use v2f64 equivalents (although they still combine to MOVLHPS/MOVHLPS for v2f64 splats). This will have to be addressed in a future patch, most likely when we add support for binary target shuffle combines.

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

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

8 years ago[llvm-nm] Yet another attempt of simplifying code.
Davide Italiano [Mon, 8 Feb 2016 22:58:26 +0000 (22:58 +0000)]
[llvm-nm] Yet another attempt of simplifying code.

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

8 years ago[regalloc][WinEH] Do not mark intervals as not spillable if they contain a regmask
Andrew Kaylor [Mon, 8 Feb 2016 22:52:51 +0000 (22:52 +0000)]
[regalloc][WinEH] Do not mark intervals as not spillable if they contain a regmask

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

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

8 years agollvm-cov: Fix reading gcov data that does not have function names
Justin Bogner [Mon, 8 Feb 2016 22:49:40 +0000 (22:49 +0000)]
llvm-cov: Fix reading gcov data that does not have function names

In order for recent gcov versions to read the coverage data, you have
to use UseCfgChecksum=true and FunctionNamesInData=false options for
coverage profiling pass. This is because gcov is expecting the
function section in .gcda to be exactly 3 words in size, containing
ident and two checksums.

While llvm-cov is compatible with UseCfgChecksum=true, it always
expects a function name in .gcda function sections (it's not
compatible with FunctionNamesInData=false). Thus it's currently
impossible to generate one set of coverage files that works with both
gcov and llvm-cov.

This change fixes the reading of coverage information to only read the
function name if it's present.

Patch by Arseny Kapoulkine. Thanks!

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

8 years agocmake: Use "set" instead of "option" for LLVM_ENABLE_LTO
Justin Bogner [Mon, 8 Feb 2016 21:55:19 +0000 (21:55 +0000)]
cmake: Use "set" instead of "option" for LLVM_ENABLE_LTO

Apparently option is for bools and cmake-gui will display this
strangely with option.

Pointed out by edward-san - thanks!

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

8 years ago[WebAssembly] Update the br_if instructions' operand orders to match the spec.
Dan Gohman [Mon, 8 Feb 2016 21:50:13 +0000 (21:50 +0000)]
[WebAssembly] Update the br_if instructions' operand orders to match the spec.

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

8 years agorangify; NFC
Sanjay Patel [Mon, 8 Feb 2016 21:32:43 +0000 (21:32 +0000)]
rangify; NFC

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

8 years ago[PGO] Differentiate Clang instrumentation and IR level instrumentation profiles
Rong Xu [Mon, 8 Feb 2016 21:07:46 +0000 (21:07 +0000)]
[PGO] Differentiate Clang instrumentation and IR level instrumentation profiles

This patch uses one bit in profile version to differentiate Clang
instrumentation and IR level instrumentation profiles.

PGOInstrumenation generates a COMDAT variable __llvm_profile_raw_version so
that the compiler runtime can set the right profile kind.
PGOInstrumenation now checks this bit to make sure it's an IR level
instrumentation profile.

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

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

8 years ago[x86] convert masked store of one element to scalar store
Sanjay Patel [Mon, 8 Feb 2016 21:05:08 +0000 (21:05 +0000)]
[x86] convert masked store of one element to scalar store

Another opportunity to reduce masked stores: in D16691, we decided not to attempt the 'one mask element is set'
transform in InstCombine, but this should be a win for any AVX machine.

Code comments note that this transform could be extended for other targets / cases.

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

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

8 years agocmake: Accept "thin" or "full" as arguments to -DLLVM_ENABLE_LTO
Justin Bogner [Mon, 8 Feb 2016 21:01:24 +0000 (21:01 +0000)]
cmake: Accept "thin" or "full" as arguments to -DLLVM_ENABLE_LTO

Mehdi suggested in a review of r259766 that it's also useful to easily
set the type of LTO. Augment the cmake variable to support that.

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

8 years agoFix build bot failure
Xinliang David Li [Mon, 8 Feb 2016 20:08:21 +0000 (20:08 +0000)]
Fix build bot failure

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

8 years agoAMDGPU/SI: Implement a work-around for smrd corrupting vccz bit
Tom Stellard [Mon, 8 Feb 2016 19:49:20 +0000 (19:49 +0000)]
AMDGPU/SI: Implement a work-around for smrd corrupting vccz bit

Summary:
We will hit this once we have enabled uniform branches.  The
smrd-vccz-bug.ll test will be added with the uniform branch commit.

Reviewers: mareko, arsenm

Subscribers: arsenm, llvm-commits

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

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

8 years agoAdd triple to h-registers-3.ll to make bots happy after r260133
Hans Wennborg [Mon, 8 Feb 2016 19:45:24 +0000 (19:45 +0000)]
Add triple to h-registers-3.ll to make bots happy after r260133

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

8 years ago[X86] Don't zero/sign-extend i1, i8, or i16 return values to 32 bits (PR22532)
Hans Wennborg [Mon, 8 Feb 2016 19:34:30 +0000 (19:34 +0000)]
[X86] Don't zero/sign-extend i1, i8, or i16 return values to 32 bits (PR22532)

This matches GCC and MSVC's behaviour, and saves on code size.

We were already not extending i1 return values on x86_64 after r127766. This
takes that patch further by applying it to x86 target as well, and also for i8
and i16.

The ABI docs have been unclear about the required behaviour here. The new i386
psABI [1] clearly states (Table 2.4, page 14) that i1, i8, and i16 return
vales do not need to be extended beyond 8 bits. The x86_64 ABI doc is being
updated to say the same [2].

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

 [1]. https://01.org/sites/default/files/file_attach/intel386-psabi-1.0.pdf
 [2]. https://groups.google.com/d/msg/x86-64-abi/E8O33onbnGQ/_RFWw_ixDQAJ

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

8 years agoAArch64: match correct order in subtraction pattern.
Tim Northover [Mon, 8 Feb 2016 19:33:18 +0000 (19:33 +0000)]
AArch64: match correct order in subtraction pattern.

The accumulator in multiply-and-subtract instructions is actually subtracted
*from* so these patterns were computing the wrong value.

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

8 years agofix typos; NFC
Sanjay Patel [Mon, 8 Feb 2016 19:27:33 +0000 (19:27 +0000)]
fix typos; NFC

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

8 years agoSimplify this unittest.
Adrian Prantl [Mon, 8 Feb 2016 19:13:15 +0000 (19:13 +0000)]
Simplify this unittest.

Thanks to dblaikie for the suggestion!

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

8 years agoAMDGPU: Remove bfi and bfm intrinsics
Matt Arsenault [Mon, 8 Feb 2016 19:06:01 +0000 (19:06 +0000)]
AMDGPU: Remove bfi and bfm intrinsics

Nothing is using them.

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

8 years ago[ThinLTO] Remove imported available externally defs from comdats.
Teresa Johnson [Mon, 8 Feb 2016 18:47:20 +0000 (18:47 +0000)]
[ThinLTO] Remove imported available externally defs from comdats.

Summary:
Available externally definitions are considered declarations for the
linker and eventually dropped. As such they are not allowed to be
in comdats. Remove any such imported functions from comdats.

Reviewers: rafael

Subscribers: davidxl, llvm-commits, joker.eph

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

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

8 years ago[PGO] Enable compression in pgo instrumentation
Xinliang David Li [Mon, 8 Feb 2016 18:13:49 +0000 (18:13 +0000)]
[PGO] Enable compression in pgo instrumentation

This reduces sizes of instrumented object files, final binaries,
process images, and raw profile data.

The format of the indexed profile data remain the same.

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

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

8 years ago[SCEV][LAA] Re-commit r260085 and r260086, this time with a fix for the memory
Silviu Baranga [Mon, 8 Feb 2016 17:02:45 +0000 (17:02 +0000)]
[SCEV][LAA] Re-commit r260085 and r260086, this time with a fix for the memory
sanitizer issue. The PredicatedScalarEvolution's copy constructor
wasn't copying the Generation value, and was leaving it un-initialized.

Original commit message:

[SCEV][LAA] Add no wrap SCEV predicates and use use them to improve strided pointer detection

Summary:
This change adds no wrap SCEV predicates with:
  - support for runtime checking
  - support for expression rewriting:
      (sext ({x,+,y}) -> {sext(x),+,sext(y)}
      (zext ({x,+,y}) -> {zext(x),+,sext(y)}

Note that we are sign extending the increment of the SCEV, even for
the zext case. This is needed to cover the fairly common case where y would
be a (small) negative integer. In order to do this, this change adds two new
flags: nusw and nssw that are applicable to AddRecExprs and permit the
transformations above.

We also change isStridedPtr in LAA to be able to make use of
these predicates. With this feature we should now always be able to
work around overflow issues in the dependence analysis.

Reviewers: mzolotukhin, sanjoy, anemet

Subscribers: mzolotukhin, sanjoy, llvm-commits, rengolin, jmolloy, hfinkel

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

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

8 years agoAdd a unit test for r259973.
Adrian Prantl [Mon, 8 Feb 2016 17:02:34 +0000 (17:02 +0000)]
Add a unit test for r259973.

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

8 years ago[JumpThreading] Change a return of ComputeValueKnownInPredecessors()
Haicheng Wu [Mon, 8 Feb 2016 17:00:39 +0000 (17:00 +0000)]
[JumpThreading] Change a return of ComputeValueKnownInPredecessors()

Change a return statement of ComputeValueKnownInPredecessors() to be the same as
the rest return statements of the function. Otherwise, it might return true with
an empty Result when the current basic block has no predecessors and trigger the
first assert of JumpThreading::ProcessThreadableEdges().

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

8 years agoSelectionDAG: Lower some range metadata to AssertZext
Matt Arsenault [Mon, 8 Feb 2016 16:28:19 +0000 (16:28 +0000)]
SelectionDAG: Lower some range metadata to AssertZext

If a range has a lower bound of 0, add an AssertZext from the
nearest floor power of two.

This allows operations with some workitem intrinsics with known
maximum ranges to use fast 24-bit multiplies.

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

8 years ago[AVX512][PROLQ][PROLD] Change imm8 to int
Michael Zuckerman [Mon, 8 Feb 2016 15:13:32 +0000 (15:13 +0000)]
[AVX512][PROLQ][PROLD] Change imm8 to int

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

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

8 years ago[SLP] Fix placement of debug statement (NFC)
Igor Breger [Mon, 8 Feb 2016 14:11:39 +0000 (14:11 +0000)]
[SLP] Fix placement of debug statement (NFC)

By Ayal Zaks (ayal.zaks@intel.com)

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

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