]> granicus.if.org Git - llvm/log
llvm
8 years ago[ADT] Add a generic concatenating iterator and range.
Chandler Carruth [Sun, 25 Dec 2016 08:22:50 +0000 (08:22 +0000)]
[ADT] Add a generic concatenating iterator and range.

This allows both defining convenience iterator/range accessors on types
which walk across N different independent ranges within the object, and
more direct and simple usages with range based for loops such as shown
in the unittest. The same facilities are used for both. They end up
quite small and simple as it happens.

I've also switched an iterator on `Module` to use this. I would like to
add another convenience iterator that includes even more sequences as
part of it and seeing this one already present motivated me to actually
abstract it away and introduce a general utility.

Differential Revision: https://reviews.llvm.org/D28093

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

8 years agoMetadataLoader: replace the tracking of ForwardReferences and UnresolvedNodes with...
Mehdi Amini [Sun, 25 Dec 2016 04:22:54 +0000 (04:22 +0000)]
MetadataLoader: replace the tracking of ForwardReferences and UnresolvedNodes with a set-based solution (NFC)

This makes it explicit what is the exact list to handle, and it
looks much more easy to manipulate and understand that the
previous custom tracking of min/max to express the range where
to look for.

Differential Revision: https://reviews.llvm.org/D28089

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

8 years agoMetadataLoader: add an extra assertion in Placeholders flush (NFC)
Mehdi Amini [Sun, 25 Dec 2016 03:55:53 +0000 (03:55 +0000)]
MetadataLoader: add an extra assertion in Placeholders flush (NFC)

We don't expect any forward reference at this point.

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

8 years agoAdd range iterator for blocks in MemoryPhi
Daniel Berlin [Sat, 24 Dec 2016 21:52:10 +0000 (21:52 +0000)]
Add range iterator for blocks in MemoryPhi

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

8 years ago[InstCombine][X86] Add tests showing missed opportunities to simplify PMULUDQ/PMULDQ...
Simon Pilgrim [Sat, 24 Dec 2016 17:30:19 +0000 (17:30 +0000)]
[InstCombine][X86] Add tests showing missed opportunities to simplify PMULUDQ/PMULDQ inputs.

PMULUDQ/PMULDQ - only the even elements (0, 2, 4, 6) of the vXi32 inputs are required.

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

8 years agoTest commit.
Bryant Wong [Sat, 24 Dec 2016 17:26:38 +0000 (17:26 +0000)]
Test commit.

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

8 years ago[NewGVN] Prefer `auto` to explicit type when the latter is obvious.
Davide Italiano [Sat, 24 Dec 2016 17:17:21 +0000 (17:17 +0000)]
[NewGVN] Prefer `auto` to explicit type when the latter is obvious.

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

8 years ago[NewGVN] Simplify several equals() member functions. NFCI.
Davide Italiano [Sat, 24 Dec 2016 17:14:19 +0000 (17:14 +0000)]
[NewGVN] Simplify several equals() member functions. NFCI.

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

8 years ago[PM] Remove vestiges of NoAA. NFCI.
Davide Italiano [Sat, 24 Dec 2016 16:14:05 +0000 (16:14 +0000)]
[PM] Remove vestiges of NoAA. NFCI.

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

8 years agollvm-objdump: sort phdr type strings in advance of adding new ones
Ed Maste [Sat, 24 Dec 2016 14:53:45 +0000 (14:53 +0000)]
llvm-objdump: sort phdr type strings in advance of adding new ones

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

8 years ago[SelectionDAG] Early out from computeKnownBits when we know we will have no common...
Simon Pilgrim [Sat, 24 Dec 2016 12:59:35 +0000 (12:59 +0000)]
[SelectionDAG] Early out from computeKnownBits when we know we will have no common bits.

Avoid extra (recursive) calls to computeKnownBits if we already know that there are no common known bits.

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

8 years ago[PM] Try to improve the comments here to make what's going on more
Chandler Carruth [Sat, 24 Dec 2016 05:11:17 +0000 (05:11 +0000)]
[PM] Try to improve the comments here to make what's going on more
clear.

Based on post-commit review suggestion from Sean. (Thanks!)

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

8 years agoMark isOnlyReachableViaThisEdge as const
Daniel Berlin [Sat, 24 Dec 2016 00:04:07 +0000 (00:04 +0000)]
Mark isOnlyReachableViaThisEdge as const

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

8 years agoAdd an assertion for cl::opt names: they can't start with '-'
Mehdi Amini [Fri, 23 Dec 2016 23:55:26 +0000 (23:55 +0000)]
Add an assertion for cl::opt names: they can't start with '-'

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

8 years agollvm-size: remove leading dash in '-radix' option
Mehdi Amini [Fri, 23 Dec 2016 23:55:08 +0000 (23:55 +0000)]
llvm-size: remove leading dash in '-radix' option

cl::opt does not accept such option

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

8 years agollvm-readobj: remove leading dash in '-a' option (ARMAttributesShort)
Mehdi Amini [Fri, 23 Dec 2016 23:54:52 +0000 (23:54 +0000)]
llvm-readobj: remove leading dash in '-a' option (ARMAttributesShort)

cl::opt does not accept such option

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

8 years agollvm-lto2: remove leading '-' for cl::opt declaration
Mehdi Amini [Fri, 23 Dec 2016 23:54:34 +0000 (23:54 +0000)]
llvm-lto2: remove leading '-' for cl::opt declaration

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

8 years agollvm-lto2: Print diagnostics before exiting (NFC)
Mehdi Amini [Fri, 23 Dec 2016 23:54:17 +0000 (23:54 +0000)]
llvm-lto2: Print diagnostics before exiting (NFC)

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

8 years agollvm-lto: pass errs() to the module verifier (NFC)
Mehdi Amini [Fri, 23 Dec 2016 23:53:57 +0000 (23:53 +0000)]
llvm-lto: pass errs() to the module verifier (NFC)

It is more friendly to have the actual diagnostic when the
verifier fails.

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

8 years ago[PM] Remove a bunch of junk that snuck in when I failed at manipulating
Chandler Carruth [Fri, 23 Dec 2016 23:39:31 +0000 (23:39 +0000)]
[PM] Remove a bunch of junk that snuck in when I failed at manipulating
my editor to close and commit the patch. Sorry for the noise.

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

8 years ago[PM] Teach the always inlining test case to be much more strict about
Chandler Carruth [Fri, 23 Dec 2016 23:33:35 +0000 (23:33 +0000)]
[PM] Teach the always inlining test case to be much more strict about
whether functions are removed, and fix the new PM's always inliner to
actually pass this test.

Without this, the new PM's always inliner leaves all the functions
kicking around which won't work out very well given the semantics of
always inline.

Doing this really highlights how frustrating the current alwaysinline
semantic contract is though -- why can we put it on *external*
functions, etc?

Also I've added a number of tricky and interesting test cases for
removing functions with the always inliner. There is one remaining case
not handled -- fully removing comdats -- and I've left a FIXME about
this.

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

8 years ago[PM] Clean up test case and comments a bit. NFC.
Chandler Carruth [Fri, 23 Dec 2016 23:33:32 +0000 (23:33 +0000)]
[PM] Clean up test case and comments a bit. NFC.

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

8 years ago[PM] Add support for building a default AA pipeline to the PassBuilder.
Chandler Carruth [Fri, 23 Dec 2016 20:38:19 +0000 (20:38 +0000)]
[PM] Add support for building a default AA pipeline to the PassBuilder.

Pretty boring and lame as-is but necessary. This is definitely a place
we'll end up with extension hooks longer term. =]

Differential Revision: https://reviews.llvm.org/D28076

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

8 years agoFunction-import: Disable IRVerifier on lazy-loaded modules: the ODR TypeUniquing...
Mehdi Amini [Fri, 23 Dec 2016 19:19:44 +0000 (19:19 +0000)]
Function-import: Disable IRVerifier on lazy-loaded modules: the ODR TypeUniquing generates invalid debug info.

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

8 years agoFix build after r290437 (missing include)
Mehdi Amini [Fri, 23 Dec 2016 18:04:51 +0000 (18:04 +0000)]
Fix build after r290437 (missing include)

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

8 years agoFunctionImport: fix typo '#ifndef NDEBUG' instead of '#ifndef DEBUG'
Mehdi Amini [Fri, 23 Dec 2016 17:59:24 +0000 (17:59 +0000)]
FunctionImport: fix typo '#ifndef NDEBUG' instead of '#ifndef DEBUG'

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

8 years agoAMDGPU: split ret/noret patterns for global atomics
Jan Vesely [Fri, 23 Dec 2016 15:34:51 +0000 (15:34 +0000)]
AMDGPU: split ret/noret patterns for global atomics

Differential Revision: https://reviews.llvm.org/D27989

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

8 years ago[LICM] Plug a leak freeing the ASTs before clearing the map.
Davide Italiano [Fri, 23 Dec 2016 15:02:35 +0000 (15:02 +0000)]
[LICM] Plug a leak freeing the ASTs before clearing the map.

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

8 years ago[MemDep] NFC changes
Piotr Padlewski [Fri, 23 Dec 2016 13:13:32 +0000 (13:13 +0000)]
[MemDep] NFC changes

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

8 years ago[LICM] Work around LICM needs to maintain state across loops.
Davide Italiano [Fri, 23 Dec 2016 13:12:50 +0000 (13:12 +0000)]
[LICM] Work around LICM needs to maintain state across loops.

The pass creates some state which expects to be cleaned up by
a later instance of the same pass. opt-bisect happens to expose
this not ideal design because calling skipLoop() will result in
this state not being cleaned up at times and an assertion firing
in `doFinalization()`. Chandler tells me the new pass manager will
give us options to avoid these design traps, but until it's not ready,
we need a workaround for the current pass infrastructure. Fix provided
by Andy Kaylor, see the review for a complete discussion.

Differential Revision:  https://reviews.llvm.org/D25848

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

8 years ago[AArch64] Cortex-A57 FDIV/FSQRT scheduling fix (W-unit)
Renato Golin [Fri, 23 Dec 2016 12:51:41 +0000 (12:51 +0000)]
[AArch64] Cortex-A57 FDIV/FSQRT scheduling fix (W-unit)

According to the Cortex-A57 doc, FDIV/FSQRT instructions should use F0 unit
(W-unit in AArch64SchedA57.td, the same as cryptography instructions),
not F1 unit (X-unit in td, like ASIMD absolute diff accum SABA/UABA).

This patch changes FDIV/FSQRT scheduling declarations to use A57UnitW
instead of A57UnitX. Also, latencies for those instructions are
corrected.

Patch by Andrew Zhogin.

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

8 years agoRevert r290423 because it broke the sanitizer-x86_64-linux-autoconf buildbot.
Florian Hahn [Fri, 23 Dec 2016 12:26:11 +0000 (12:26 +0000)]
Revert r290423 because it broke the sanitizer-x86_64-linux-autoconf buildbot.

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

8 years ago[framelowering] Skip dbg values when getting next/previous instruction.
Florian Hahn [Fri, 23 Dec 2016 11:35:00 +0000 (11:35 +0000)]
[framelowering] Skip dbg values when getting next/previous instruction.

Summary:
In mergeSPUpdates, debug values need to be ignored when getting the
previous element, otherwise debug data could have an impact on codegen.

In eliminateCallFramePseudoInstr, debug values after the erased element
could have an impact on codegen and should be skipped.

Closes PR31319 (https://llvm.org/bugs/show_bug.cgi?id=31319)

Reviewers: mkuper, MatzeB, aprantl

Subscribers: gbedwell, llvm-commits

Differential Revision: https://reviews.llvm.org/D27688

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

8 years ago[NewGVN] Remove (for now) unused code. NFCI.
Davide Italiano [Fri, 23 Dec 2016 10:28:30 +0000 (10:28 +0000)]
[NewGVN] Remove (for now) unused code. NFCI.

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

8 years ago[ThinLTO] Verify lazy-loaded source module for function importing when assertions...
Mehdi Amini [Fri, 23 Dec 2016 05:16:19 +0000 (05:16 +0000)]
[ThinLTO] Verify lazy-loaded source module for function importing when assertions are enabled (NFC)

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

8 years agoMetadataLoader: split the creation of a single metadata out of a Record into its...
Mehdi Amini [Fri, 23 Dec 2016 03:59:18 +0000 (03:59 +0000)]
MetadataLoader: split the creation of a single metadata out of a Record into its own function (NFC)

This is pure code motion, will just make it more reusable when I'll
attempt to lazy-load Metadats on-demand.

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

8 years ago[WebAssembly] Annotate call and load/store immediates.
Dan Gohman [Fri, 23 Dec 2016 03:23:52 +0000 (03:23 +0000)]
[WebAssembly] Annotate call and load/store immediates.

These will be used to guide the binary encoding of these immediates.

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

8 years agoMake the canonicalisation on shifts benifit to more case.
Zijiao Ma [Fri, 23 Dec 2016 02:56:07 +0000 (02:56 +0000)]
Make the canonicalisation on shifts benifit to more case.

1.Fix pessimized case in FIXME.
2.Add tests for it.
3.The canonicalisation on shifts results in different sequence for
  tests of machine-licm.Correct some check lines.

Differential Revision: https://reviews.llvm.org/D27916

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

8 years agoMetadataLoader: Reinitialize MinFwdRef/MaxFwdRef after resolving cycles (NFC)
Mehdi Amini [Fri, 23 Dec 2016 02:20:12 +0000 (02:20 +0000)]
MetadataLoader: Reinitialize MinFwdRef/MaxFwdRef after resolving cycles (NFC)

This put the Loader back in a consistent state.

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

8 years agoMetadataLoader: Add an assertion for the implicit invariant of PlaceHolder while...
Mehdi Amini [Fri, 23 Dec 2016 02:20:09 +0000 (02:20 +0000)]
MetadataLoader: Add an assertion for the implicit invariant of PlaceHolder while loading Metadata (NFC)

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

8 years agoMetadataLoader: Make sure every member of MetadataLoader are initialized (NFC)
Mehdi Amini [Fri, 23 Dec 2016 02:20:07 +0000 (02:20 +0000)]
MetadataLoader: Make sure every member of MetadataLoader are initialized (NFC)

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

8 years agoMetadataLoader: Refactor "IsImporting" into the Pimpl for the MetadataLoader (NFC)
Mehdi Amini [Fri, 23 Dec 2016 02:20:02 +0000 (02:20 +0000)]
MetadataLoader: Refactor "IsImporting" into the Pimpl for the MetadataLoader (NFC)

Keeping all the state together will make it easier to handle.

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

8 years agoFix some DOS-style line endings that I suspect snuck in from one of the
Chandler Carruth [Fri, 23 Dec 2016 02:02:26 +0000 (02:02 +0000)]
Fix some DOS-style line endings that I suspect snuck in from one of the
frustrating Subversion clients that fails to do line ending translation
of text files.

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

8 years agoKillTheDoctor.cpp: Appease cases on case-senstitive host, like mingw on linux.
NAKAMURA Takumi [Fri, 23 Dec 2016 01:39:26 +0000 (01:39 +0000)]
KillTheDoctor.cpp: Appease cases on case-senstitive host, like mingw on linux.

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

8 years agoKillTheDoctor: Add a required system lib, psapi. KillTheDoctor itself uses Win32...
NAKAMURA Takumi [Fri, 23 Dec 2016 01:39:20 +0000 (01:39 +0000)]
KillTheDoctor: Add a required system lib, psapi. KillTheDoctor itself uses Win32 API directly.

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

8 years agoEnable '-Wstring-conversion' and fix some bad asserts that it helped
Chandler Carruth [Fri, 23 Dec 2016 01:38:06 +0000 (01:38 +0000)]
Enable '-Wstring-conversion' and fix some bad asserts that it helped
find.

Notable is the assert in NewGVN which had no effect because of the bug.

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

8 years agoDon't consider allocsize functions to be allocation functions.
George Burgess IV [Fri, 23 Dec 2016 01:18:09 +0000 (01:18 +0000)]
Don't consider allocsize functions to be allocation functions.

This patch fixes some ASAN unittest failures on FreeBSD. See the
cfe-commits email thread for r290169 for more on those.

According to the LangRef, the allocsize attribute only tells us about
the number of bytes that exist at the memory location pointed to by the
return value of a function. It does not necessarily mean that the
function will only ever allocate. So, we need to be very careful about
treating functions with allocsize as general allocation functions. This
patch makes us fully conservative in this regard, though I suspect that
we have room to be a bit more aggressive if we want.

This has a FIXME that can be fixed by a relatively straightforward
refactor; I just wanted to keep this patch minimal. If this sticks, I'll
come back and fix it in a few days.

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

8 years agoNFC code motion in ImplicitNullChecks
Sanjoy Das [Fri, 23 Dec 2016 00:41:24 +0000 (00:41 +0000)]
NFC code motion in ImplicitNullChecks

Extract out two large lambdas into top level member functions.

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

8 years agoReimplement depedency tracking in the ImplicitNullChecks pass
Sanjoy Das [Fri, 23 Dec 2016 00:41:21 +0000 (00:41 +0000)]
Reimplement depedency tracking in the ImplicitNullChecks pass

Summary:
This change rewrites a core component in the ImplicitNullChecks pass for
greater simplicity since the original design was over-complicated for no
good reason.  Please review this as essentially a new pass.  The change
is almost NFC and I've added a test case for a scenario that this new
code handles that wasn't handled earlier.

The implicit null check pass, at its core, is a code hoisting transform.
It differs from "normal" code transforms in that it speculates
potentially faulting instructions (by design), but a lot of the usual
hazard detection logic (register read-after-write etc.) still applies.
We previously detected hazards by keeping track of registers defined and
used by machine instructions over an instruction range, but that was
unwieldy and did not actually confer any performance benefits.  The
intent was to have linear time complexity over the number of machine
instructions considered, but it ended up being N^2 is practice.

This new version is more obviously O(N^2) (with N capped to 8 by
default) in hazard detection.  It does not attempt to be clever in
tracking register uses or defs (the previous cleverness here was a
source of bugs).

Once this is checked in, I'll extract out the `IsSuitableMemoryOp` and
`CanHoistLoadInst` lambda into member functions (they're too complicated
to be inline lambdas) and do some other related NFC cleanups.

Reviewers: reames, anna, atrick

Subscribers: mcrosier, llvm-commits

Differential Revision: https://reviews.llvm.org/D27592

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

8 years ago[ObjectYAML] Fixing a compiler warning
Chris Bieneman [Thu, 22 Dec 2016 22:58:07 +0000 (22:58 +0000)]
[ObjectYAML] Fixing a compiler warning

Accidentally re-defined the variable instead of setting it. Oops!

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

8 years ago[GlobalISel] More fix for the size vs. type typo. NFC.
Quentin Colombet [Thu, 22 Dec 2016 22:50:34 +0000 (22:50 +0000)]
[GlobalISel] More fix for the size vs. type typo. NFC.

I missed those in my previous commit (r290378).

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

8 years ago[ObjectYAML] Support for DWARF debug_info section
Chris Bieneman [Thu, 22 Dec 2016 22:44:27 +0000 (22:44 +0000)]
[ObjectYAML] Support for DWARF debug_info section

This patch adds support for YAML<->DWARF for debug_info sections.

This re-lands r290147, reverted in 290148, re-landed in r290204 after fixing the issue that caused bots to fail (thank you UBSan!), and reverted again in r290209 due to failures on big endian systems.

After adding support for preserving endianness, this should be good now.

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

8 years ago[AArch64] Simplify indexed-memory testcase. NFC.
Ahmed Bougacha [Thu, 22 Dec 2016 22:27:05 +0000 (22:27 +0000)]
[AArch64] Simplify indexed-memory testcase. NFC.

We're only testing the addressing mode on the stores; we don't
need to load/store pointers we can simply pass/return.

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

8 years ago[cfi] Emit jump tables as a function-level inline asm.
Evgeniy Stepanov [Thu, 22 Dec 2016 22:22:35 +0000 (22:22 +0000)]
[cfi] Emit jump tables as a function-level inline asm.

Use a dummy private function with inline asm calls instead of module
level asm blocks for CFI jumptables.

The main advantage is that now jumptable codegen can be affected by
the function attributes (like target_cpu on ARM). Module level asm
gets the default subtarget based on the target triple, which is often
not good enough.

This change also uses asm constraints/arguments to reference
jumptable targets and aliases directly. We no longer do asm name
mangling in an IR pass.

Differential Revision: https://reviews.llvm.org/D28012

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

8 years ago[ObjectYAML] Fixing big endian bots from r290381
Chris Bieneman [Thu, 22 Dec 2016 22:16:04 +0000 (22:16 +0000)]
[ObjectYAML] Fixing big endian bots from r290381

Bot URL:
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/2505

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

8 years ago[ObjectYAML] MachO support for endianness
Chris Bieneman [Thu, 22 Dec 2016 21:58:03 +0000 (21:58 +0000)]
[ObjectYAML] MachO support for endianness

This patch adds support to the macho<->yaml tools for preserving endianness in MachO structures and DWARF data.

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

8 years ago[MachineVerifier] Check that even generic vregs comply to regclass constraints.
Quentin Colombet [Thu, 22 Dec 2016 21:56:39 +0000 (21:56 +0000)]
[MachineVerifier] Check that even generic vregs comply to regclass constraints.

We used to not check generic vregs, but that is actually a mistake given
nothing in the GlobalISel pipeline is going to fix the constraints on
target specific instructions. Therefore, the target has to have them
right from the start.

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

8 years ago[AArch64] Change a test to use a generic instr instead of a target specific one.
Quentin Colombet [Thu, 22 Dec 2016 21:56:37 +0000 (21:56 +0000)]
[AArch64] Change a test to use a generic instr instead of a target specific one.

Target specific instructions have requirements that are not compatible
with what we want to test here. Namely, target specific instructions
must have their operands properly mapped on register classes.

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

8 years ago[MIRParser] Fix a typo in comment and error message.
Quentin Colombet [Thu, 22 Dec 2016 21:56:35 +0000 (21:56 +0000)]
[MIRParser] Fix a typo in comment and error message.

We have long switched from size to type.

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

8 years ago[AArch64][CallLowering] Constraint registers on target specific instruction
Quentin Colombet [Thu, 22 Dec 2016 21:56:31 +0000 (21:56 +0000)]
[AArch64][CallLowering] Constraint registers on target specific instruction

The InstructionSelect pass will not look at target specific instructions
since they are already selected. As a result, the operands of target
specific instructions must be properly constrained, because it is not
going to fix them.

This fixes invalid register classes on call instruction.

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

8 years ago[MIRParser] Non-generic virtual register may have a type.
Quentin Colombet [Thu, 22 Dec 2016 21:56:29 +0000 (21:56 +0000)]
[MIRParser] Non-generic virtual register may have a type.

When generic virtual registers get constrained, because of a use on a
target specific operation for instance, we end up with regular virtual
registers with a type and that's perfectly fine.

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

8 years ago[RegisterBankInfo] Allow to set a register class when nothing else is set
Quentin Colombet [Thu, 22 Dec 2016 21:56:26 +0000 (21:56 +0000)]
[RegisterBankInfo] Allow to set a register class when nothing else is set

This is going to be needed to be able to constraint register class on
target specific instruction while the RegBankSelect pass did not run
yet.

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

8 years ago[GlobalISel] Refactor the logic to constraint registers.
Quentin Colombet [Thu, 22 Dec 2016 21:56:19 +0000 (21:56 +0000)]
[GlobalISel] Refactor the logic to constraint registers.

Move the logic to constraint register from InstructionSelector to a
utility function. It will be required by other passes in the GlobalISel
pipeline.

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

8 years agoAMDGPU: Invert cmp + select with constant
Matt Arsenault [Thu, 22 Dec 2016 21:40:08 +0000 (21:40 +0000)]
AMDGPU: Invert cmp + select with constant

Canonicalize a select with a constant to the false side. This
enables more instruction shrinking opportunities since an
inline immediate can be used for the false side of v_cndmask_b32_e32.

This seems to usually be better but causes some code size regressions
in some tests.

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

8 years ago[PowerPC] Add ppc support to update_llc_test_checks.py, and ppc tests. NFC.
Tim Shen [Thu, 22 Dec 2016 20:59:39 +0000 (20:59 +0000)]
[PowerPC] Add ppc support to update_llc_test_checks.py, and ppc tests. NFC.

Reviewers: chandlerc, hfinkel, echristo, iteratee

Subscribers: mehdi_amini, nemanjai, llvm-commits

Differential Revision: https://reviews.llvm.org/D28036

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

8 years ago[Hexagon] Add DAG mutations for machine pipeliner
Krzysztof Parzyszek [Thu, 22 Dec 2016 19:44:55 +0000 (19:44 +0000)]
[Hexagon] Add DAG mutations for machine pipeliner

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

8 years agoRedo store splitting in CodeGenPrepare.
Wei Mi [Thu, 22 Dec 2016 19:44:45 +0000 (19:44 +0000)]
Redo store splitting in CodeGenPrepare.

This is a succeeding patch of https://reviews.llvm.org/D22840 to address the
issue when a value to be merged into an int64 pair is in a different BB. Redoing
the store splitting in CodeGenPrepare so we can match the pattern across multiple
BBs and move some instructions into the same BB. We still keep the code in dag
combine so that we can catch cases that show up after DAG combining runs.

Differential Revision: https://reviews.llvm.org/D25914

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

8 years agoChange the interface of TLI.isMultiStoresCheaperThanBitsMerge.
Wei Mi [Thu, 22 Dec 2016 19:38:22 +0000 (19:38 +0000)]
Change the interface of TLI.isMultiStoresCheaperThanBitsMerge.

This is for splitMergedValStore in DAG Combine to share the target query interface
with similar logic in CodeGenPrepare.

Differential Revision: https://reviews.llvm.org/D24707

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

8 years ago[mips] Fix compact branch hazard detection, part 2
Petar Jovanovic [Thu, 22 Dec 2016 19:29:50 +0000 (19:29 +0000)]
[mips] Fix compact branch hazard detection, part 2

Follow up to D27209 fix, this patch now properly handles single transient
instruction in basic block.

Patch by Aleksandar Beserminji.

Differential Revision: https://reviews.llvm.org/D27856

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

8 years agoAdd the DAG mutation interface to the software pipeliner
Krzysztof Parzyszek [Thu, 22 Dec 2016 19:21:20 +0000 (19:21 +0000)]
Add the DAG mutation interface to the software pipeliner

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

8 years agoPass -Wa,-mbig-obj in 64-bit mingw builds
Reid Kleckner [Thu, 22 Dec 2016 19:12:14 +0000 (19:12 +0000)]
Pass -Wa,-mbig-obj in 64-bit mingw builds

COFF has a 2**16 section limit, and on Win64, every COMDAT function
creates at least 3 sections: .text, .pdata, and .xdata. For MSVC, we
enable bigobj on a file-by-file basis, but GCC appears to hit the limit
on different files.

Fixes PR25953

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

8 years agoBuild KillTheDoctor with mingw-w64
Reid Kleckner [Thu, 22 Dec 2016 19:11:42 +0000 (19:11 +0000)]
Build KillTheDoctor with mingw-w64

compiler-rt uses it in its lit tests.

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

8 years agoFix two bugs in the pipeliner in renaming phis in the prolog and epilog
Krzysztof Parzyszek [Thu, 22 Dec 2016 18:49:55 +0000 (18:49 +0000)]
Fix two bugs in the pipeliner in renaming phis in the prolog and epilog

When the pipeliner is renaming phi values, it may need to iterate through
the phi operands to check for other phis. However, the pipeliner should
stop once it reaches a phi that is outside the pipelined loop.

Also, when the generateExistingPhis code is unable to reuse an existing
phi, the default code that computes the PhiOp2 is only to be used when
the pipeliner is generating the kernel. Otherwise, the phi may be a value
computed earlier in the same epilog.

Patch by Brendon Cahoon.

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

8 years agoAMDGPU: Use i16 for i16 shift amount
Matt Arsenault [Thu, 22 Dec 2016 16:36:25 +0000 (16:36 +0000)]
AMDGPU: Use i16 for i16 shift amount

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

8 years ago[NewGVN] Add the pass to PassRegistry.def.
Davide Italiano [Thu, 22 Dec 2016 16:35:02 +0000 (16:35 +0000)]
[NewGVN] Add the pass to PassRegistry.def.

We need to hook up here to get it working with the new PM.
Add a test while here (and remove a typo).

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

8 years agoAMDGPU: Fix missing 16-bit cmpx instructions
Matt Arsenault [Thu, 22 Dec 2016 16:27:14 +0000 (16:27 +0000)]
AMDGPU: Fix missing 16-bit cmpx instructions

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

8 years agoAMDGPU: Use i16 comparison instructions
Matt Arsenault [Thu, 22 Dec 2016 16:27:11 +0000 (16:27 +0000)]
AMDGPU: Use i16 comparison instructions

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

8 years agoAMDGPU: Fixed '!NodePtr->isKnownSentinel()' assert
Matt Arsenault [Thu, 22 Dec 2016 16:06:32 +0000 (16:06 +0000)]
AMDGPU: Fixed '!NodePtr->isKnownSentinel()' assert

Caused by dereferencing end iterator when trying to const cast the iterator.

Patch by Martin Sherburn

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

8 years ago[GVN] Initial check-in of a new global value numbering algorithm.
Davide Italiano [Thu, 22 Dec 2016 16:03:48 +0000 (16:03 +0000)]
[GVN] Initial check-in of a new global value numbering algorithm.

The code have been developed by Daniel Berlin over the years, and
the new implementation goal is that of addressing shortcomings of
the current GVN infrastructure, i.e. long compile time for large
testcases, lack of phi predication, no load/store value numbering
etc...

The current code just implements the "core" GVN algorithm, although
other pieces (load coercion, phi handling, predicate system) are
already implemented in a branch out of tree. Once the core is stable,
we'll start adding pieces on top of the base framework.
The test currently living in test/Transform/NewGVN are a copy
of the ones in GVN, with proper `XFAIL` (missing features in NewGVN).
A flag will be added in a future commit to enable NewGVN, so that
interested parties can exercise this code easily.

Differential Revision:  https://reviews.llvm.org/D26224

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

8 years ago[WebAssembly] Add an "explicit" keyword to a constructor.
Dan Gohman [Thu, 22 Dec 2016 16:03:02 +0000 (16:03 +0000)]
[WebAssembly] Add an "explicit" keyword to a constructor.

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

8 years ago[WebAssembly] Don't use variadic operand indices in the MCOperandInfo array.
Dan Gohman [Thu, 22 Dec 2016 16:00:55 +0000 (16:00 +0000)]
[WebAssembly] Don't use variadic operand indices in the MCOperandInfo array.

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

8 years ago[WebAssembly] Don't old negative load/store offsets in fast-isel.
Dan Gohman [Thu, 22 Dec 2016 15:15:10 +0000 (15:15 +0000)]
[WebAssembly] Don't old negative load/store offsets in fast-isel.

WebAssembly's load/store offsets are unsigned and don't wrap, so it's not
valid to fold in a negative offset.

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

8 years ago[AMDGPU] Add pseudo SDWA instructions
Sam Kolton [Thu, 22 Dec 2016 12:57:41 +0000 (12:57 +0000)]
[AMDGPU] Add pseudo SDWA instructions

Summary: This is needed for later SDWA support in CodeGen.

Reviewers: vpykhtin, tstellarAMD

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye

Differential Revision: https://reviews.llvm.org/D27412

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

8 years ago[AMDGPU] Disassembler: fix for disaasembling v_mac_f32/16_dpp/sdwa
Sam Kolton [Thu, 22 Dec 2016 11:30:48 +0000 (11:30 +0000)]
[AMDGPU] Disassembler: fix for disaasembling v_mac_f32/16_dpp/sdwa

Summary: Real instruction should copy constraints from real instruction. This allows auto-generated disassembler to correctly process tied operands.

Reviewers: nhaustov, vpykhtin, tstellarAMD

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye

Differential Revision: https://reviews.llvm.org/D27847

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

8 years ago[X86][AVX2] Passing the appropriate memory operand class to VPMADDWD instruction.
Ayman Musa [Thu, 22 Dec 2016 08:42:46 +0000 (08:42 +0000)]
[X86][AVX2] Passing the appropriate memory operand class to VPMADDWD instruction.

Replacing the memory operand in the ymm version of VPMADDWD from i128mem to i256mem.

Differential Revision: https://reviews.llvm.org/D28024

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

8 years ago[PM] Loosen the check ever so slightly -- MSVC appears to not include
Chandler Carruth [Thu, 22 Dec 2016 07:53:20 +0000 (07:53 +0000)]
[PM] Loosen the check ever so slightly -- MSVC appears to not include
a space after the comma in template arguments with our hacky type name
system.

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

8 years ago[PM] Make a couple of CHECK lines a bit more precise, NFC.
Chandler Carruth [Thu, 22 Dec 2016 07:14:35 +0000 (07:14 +0000)]
[PM] Make a couple of CHECK lines a bit more precise, NFC.

I was staring at these and didn't realize these were module-layer
proxies as opposed to some other layer. Justin and I have a plan to
rename things to make the names themselves much easier to reason about,
but I at least want the CHECK lines to be precise for now.

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

8 years ago[PM] Remove now-dead extern template and explicit instantiation
Chandler Carruth [Thu, 22 Dec 2016 07:14:33 +0000 (07:14 +0000)]
[PM] Remove now-dead extern template and explicit instantiation
declarations.

We're using a custom class here instead of the helper template, these
bits just didn't get deleted when the other bits did get deleted. This
was found by a really nice MSVC warning about explicitly instantiating
a template where some member functions aren't defined and thus can't be
instantiatied.

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

8 years ago[PM] Introduce a reasonable port of the main per-module pass pipeline
Chandler Carruth [Thu, 22 Dec 2016 06:59:15 +0000 (06:59 +0000)]
[PM] Introduce a reasonable port of the main per-module pass pipeline
from the old pass manager in the new one.

I'm not trying to support (initially) the numerous options that are
currently available to customize the pass pipeline. If we end up really
wanting them, we can add them later, but I suspect many are no longer
interesting. The simplicity of omitting them will help a lot as we sort
out what the pipeline should look like in the new PM.

I've also documented to the best of my ability *why* each pass or group
of passes is used so that reading the pipeline is more helpful. In many
cases I think we have some questionable choices of ordering and I've
left FIXME comments in place so we know what to come back and revisit
going forward. But for now, I've left it as similar to the current
pipeline as I could.

Lastly, I've had to comment out several places where passes are not
ported to the new pass manager or where the loop pass infrastructure is
not yet ready. I did at least fix a few bugs in the loop pass
infrastructure uncovered by running the full pipeline, but I didn't want
to go too far in this patch -- I'll come back and re-enable these as the
infrastructure comes online. But I'd like to keep the comments in place
because I don't want to lose track of which passes need to be enabled
and where they go.

One thing that seemed like a significant API improvement was to require
that we don't build pipelines for O0. It seems to have no real benefit.

I've also switched back to returning pass managers by value as at this
API layer it feels much more natural to me for composition. But if
others disagree, I'm happy to go back to an output parameter.

I'm not 100% happy with the testing strategy currently, but it seems at
least OK. I may come back and try to refactor or otherwise improve this
in subsequent patches but I wanted to at least get a good starting point
in place.

Differential Revision: https://reviews.llvm.org/D28042

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

8 years agoFix an assertion in DwarfExpression when emitting fragments in vector registers
Adrian Prantl [Thu, 22 Dec 2016 06:10:41 +0000 (06:10 +0000)]
Fix an assertion in DwarfExpression when emitting fragments in vector registers

When DwarfExpression is emitting a fragment that is located in a
register and that fragment is smaller than the register, and the
register must be composed from sub-registers (are you still with me?)
the last DW_OP_piece operation must not be larger than the size of the
fragment itself, since the last piece of the fragment could be smaller
than the last subregister that is being emitted.

rdar://problem/29779065

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

8 years agoRefactor the DIExpression fragment query interface (NFC)
Adrian Prantl [Thu, 22 Dec 2016 05:27:12 +0000 (05:27 +0000)]
Refactor the DIExpression fragment query interface (NFC)
... so it becomes available to DIExpressionCursor.

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

8 years agoDAG: Add helper for testing constant values
Matt Arsenault [Thu, 22 Dec 2016 04:39:45 +0000 (04:39 +0000)]
DAG: Add helper for testing constant values

There are helpers for testing for constant or constant build_vector,
and for splat ConstantFP vectors, but not for a constantfp or
non-splat ConstantFP vector.

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

8 years agoAMDGPU: Fix missing commute table entries for cmpx
Matt Arsenault [Thu, 22 Dec 2016 04:39:41 +0000 (04:39 +0000)]
AMDGPU: Fix missing commute table entries for cmpx

No tests because these aren't currently used anywhere.

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

8 years ago[ThinLTO] Save 8B per summary entry by rearranging the fields (NFC)
Mehdi Amini [Thu, 22 Dec 2016 04:09:29 +0000 (04:09 +0000)]
[ThinLTO] Save 8B per summary entry by rearranging the fields (NFC)

Size goes from 72B to 64B per entry.

Differential Revision: https://reviews.llvm.org/D27970

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

8 years agoAMDGPU: Swap order of operands in fadd/fsub combine
Matt Arsenault [Thu, 22 Dec 2016 04:03:40 +0000 (04:03 +0000)]
AMDGPU: Swap order of operands in fadd/fsub combine

FMA is canonicalized to constant in the middle operand. Do
the same so fmad matches and avoid an extra combine step.

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

8 years agoAMDGPU: Check fast math flags in fadd/fsub combines
Matt Arsenault [Thu, 22 Dec 2016 04:03:35 +0000 (04:03 +0000)]
AMDGPU: Check fast math flags in fadd/fsub combines

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

8 years agoAMDGPU: Form more FMAs if fusion is allowed
Matt Arsenault [Thu, 22 Dec 2016 03:55:35 +0000 (03:55 +0000)]
AMDGPU: Form more FMAs if fusion is allowed

Extend the existing fadd/fsub->fmad combines to produce
FMA if allowed.

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

8 years agoAMDGPU: Move combines into separate functions
Matt Arsenault [Thu, 22 Dec 2016 03:44:42 +0000 (03:44 +0000)]
AMDGPU: Move combines into separate functions

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

8 years agoAMDGPU: Enable some f32 fadd/fsub combines for f16
Matt Arsenault [Thu, 22 Dec 2016 03:40:39 +0000 (03:40 +0000)]
AMDGPU: Enable some f32 fadd/fsub combines for f16

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

8 years agoAMDGPU: Implement isFMAFasterThanFMulAndFAdd for f16
Matt Arsenault [Thu, 22 Dec 2016 03:21:48 +0000 (03:21 +0000)]
AMDGPU: Implement isFMAFasterThanFMulAndFAdd for f16

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