oota-llvm.git
9 years agoFix PR 23499 - Avoid multiple profile counters for functions in comdat sections.
Diego Novillo [Wed, 27 May 2015 16:44:47 +0000 (16:44 +0000)]
Fix PR 23499 - Avoid multiple profile counters for functions in comdat sections.

Counter symbols created for linkonce functions are not discarded by ELF
linkers unless the symbols are placed in the same comdat section as its
associated function.

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

9 years ago[mips][microMIPSr6] Implement SEB and SEH instructions
Zoran Jovanovic [Wed, 27 May 2015 15:39:47 +0000 (15:39 +0000)]
[mips][microMIPSr6] Implement SEB and SEH instructions
Differential Revision: http://reviews.llvm.org/D9739

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

9 years agoFix NDEBUG build.
Rafael Espindola [Wed, 27 May 2015 15:18:34 +0000 (15:18 +0000)]
Fix NDEBUG build.

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

9 years agoDelete MCSectionData.
Rafael Espindola [Wed, 27 May 2015 15:14:11 +0000 (15:14 +0000)]
Delete MCSectionData.

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

9 years agoDelete dead code. NFC.
Rafael Espindola [Wed, 27 May 2015 14:55:09 +0000 (14:55 +0000)]
Delete dead code. NFC.

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

9 years agoStop using MCSectionData in WinCOFFObjectWriter.cpp.
Rafael Espindola [Wed, 27 May 2015 14:45:54 +0000 (14:45 +0000)]
Stop using MCSectionData in WinCOFFObjectWriter.cpp.

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

9 years agoclang-format WinCOFFObjectWriter.cpp. NFC.
Rafael Espindola [Wed, 27 May 2015 14:37:12 +0000 (14:37 +0000)]
clang-format WinCOFFObjectWriter.cpp. NFC.

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

9 years agoRemove uses of MCSectionData from MachObjectWriter.cpp.
Rafael Espindola [Wed, 27 May 2015 14:33:39 +0000 (14:33 +0000)]
Remove uses of MCSectionData from MachObjectWriter.cpp.

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

9 years ago[mips][microMIPSr6] Implement BEQZALC, BGEZALC, BGTZALC, BLEZALC, BLTZALC and BNEZALC...
Jozef Kolek [Wed, 27 May 2015 14:19:22 +0000 (14:19 +0000)]
[mips][microMIPSr6] Implement BEQZALC, BGEZALC, BGTZALC, BLEZALC, BLTZALC and BNEZALC instructions

This patch implements microMIPS32r6 BEQZALC, BGEZALC, BGTZALC, BLEZALC, BLTZALC
and BNEZALC instructions using mapping.

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

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

9 years agoAVX-512: Fixed a bug in extracting subvector from v64i1
Elena Demikhovsky [Wed, 27 May 2015 14:09:33 +0000 (14:09 +0000)]
AVX-512: Fixed a bug in extracting subvector from v64i1

By Igor Breger (igor.breger@intel.com)

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

9 years agoMove getSubsectionInsertionPoint to MCSection.
Rafael Espindola [Wed, 27 May 2015 13:37:28 +0000 (13:37 +0000)]
Move getSubsectionInsertionPoint to MCSection.

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

9 years agoRemove uses of MCSectionData from ELFObjectWriter. NFC.
Rafael Espindola [Wed, 27 May 2015 13:30:50 +0000 (13:30 +0000)]
Remove uses of MCSectionData from ELFObjectWriter. NFC.

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

9 years agoUse operator<< instead of print in a few more places.
Rafael Espindola [Wed, 27 May 2015 13:05:42 +0000 (13:05 +0000)]
Use operator<< instead of print in a few more places.

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

9 years agoWe always have an InstPrinter.
Rafael Espindola [Wed, 27 May 2015 12:13:06 +0000 (12:13 +0000)]
We always have an InstPrinter.

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

9 years agoRevert r238305: [PM] Use a simpler technique to drop optional analysis
Chandler Carruth [Wed, 27 May 2015 09:36:33 +0000 (09:36 +0000)]
Revert r238305: [PM] Use a simpler technique to drop optional analysis
manager arguments...

I have no idea why, but compilers seem to hate this and its late, so I'm
not going to debug it. :: sigh :: This is why we can't have nice things.

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

9 years ago[PM] Use a simpler technique to drop optional analysis manager arguments
Chandler Carruth [Wed, 27 May 2015 09:02:51 +0000 (09:02 +0000)]
[PM] Use a simpler technique to drop optional analysis manager arguments
when invoking run methods.

This technique was suggested by Dinesh Dwivedi who also wrote the
original patch. During the code review, they explained to me that this
isn't a fully general technique as we need to know the signatures of the
method candidates. Since this is really a narrower utility, I switched
the names and structure to be more clearly a specialized run method
invoke helper and commented it accordingly. I still think this is
a pretty big win.

Very sorry to Dinesh for the extreme delay in landing this patch. I've
been far to busy poking at other things.

Original review: http://reviews.llvm.org/D3543

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

9 years agoRevert r238190 and r238197: [mips] Make TTypeEncoding indirect to allow .eh_frame...
Daniel Sanders [Wed, 27 May 2015 08:44:01 +0000 (08:44 +0000)]
Revert r238190 and r238197: [mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only.

This broke the llvm-mips-linux builder and several of our out-of-tree builders.
Initial investigations show that the commit probably isn't the problem but
reverting anyway while I investigate.

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

9 years agoAVX-512: Implemented all forms of sign-extend and zero-extend instructions for KNL...
Elena Demikhovsky [Wed, 27 May 2015 08:15:19 +0000 (08:15 +0000)]
AVX-512: Implemented all forms of sign-extend and zero-extend instructions for KNL and SKX
Implemented DAG lowering for all these forms.
Added tests for DAG lowering and encoding.

By Igor Breger (igor.breger@intel.com)

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

9 years agoAdd some more detailed docs about the current state of Phabricator and
Chandler Carruth [Wed, 27 May 2015 07:20:46 +0000 (07:20 +0000)]
Add some more detailed docs about the current state of Phabricator and
reviwes.llvm.org to help reduce confusion.

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

9 years ago[X86] Implement the support for shrink-wrapping.
Quentin Colombet [Wed, 27 May 2015 06:28:41 +0000 (06:28 +0000)]
[X86] Implement the support for shrink-wrapping.
With this patch the x86 backend is now shrink-wrapping capable
and this functionality can be tested by using the
-enable-shrink-wrap switch.

The next step is to make more test and enable shrink-wrapping by
default for x86.

Related to <rdar://problem/20821487>

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

9 years ago[ShrinkWrap] Add a target hook to check whether or not
Quentin Colombet [Wed, 27 May 2015 06:25:48 +0000 (06:25 +0000)]
[ShrinkWrap] Add a target hook to check whether or not
the target can handle a given basic block as prologue
or epilogue.

Related to <rdar://problem/20821487>

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

9 years agoARMLoadStoreOptimizer: Code cleanup; NFC
Matthias Braun [Wed, 27 May 2015 05:12:40 +0000 (05:12 +0000)]
ARMLoadStoreOptimizer: Code cleanup; NFC

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

9 years agoMachineBasicBlock: Cleanup computeRegisterLiveness()
Matthias Braun [Wed, 27 May 2015 05:12:39 +0000 (05:12 +0000)]
MachineBasicBlock: Cleanup computeRegisterLiveness()

- Clean documentation comment
- Change the API to accept an iterator so you can actually pass
  MachineBasicBlock::end() now.
- Add more "const".

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

9 years agoMCSymbol: Make print() robust against empty names
Matthias Braun [Wed, 27 May 2015 05:12:37 +0000 (05:12 +0000)]
MCSymbol: Make print() robust against empty names

This shouldn't happen, but it's nice not to abort when printing broken machine
functions.

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

9 years agoObject/COFF: Add accessors for import header bitfields.
Rui Ueyama [Wed, 27 May 2015 02:55:04 +0000 (02:55 +0000)]
Object/COFF: Add accessors for import header bitfields.

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

9 years ago[inliner] Fix the early-exit of the inline cost analysis to correctly
Chandler Carruth [Wed, 27 May 2015 02:49:05 +0000 (02:49 +0000)]
[inliner] Fix the early-exit of the inline cost analysis to correctly
model the dense vector instruction bonuses.

Previously, this code really didn't effectively compute the density of
inlined vector instructions and apply the intended inliner bonus. It
would try to compute it repeatedly while analyzing the function and
didn't handle the case where future vector instructions would tip the
scales back towards the bonus.

Instead, speculatively apply all possible bonuses to the threshold
initially. Once we *know* that a certain bonus can not be applied,
subtract it. This should delay early bailout enough to get much more
consistent results without actually causing us to analyze huge swaths of
code. I expect some (hopefully mild) compile time hit here, and some
swings in performance, but this was definitely the intended behavior of
these bonuses.

This also dramatically simplifies the computation of the bonuses to not
interact with each other in confusing ways. The previous code didn't do
a good job of this and the values for bonuses may be surprising but are
at least now clearly written in the code.

Finally, fix code to be in line with comments and use zero as the
bailout condition.

Patch by Easwaran Raman, with some comment tweaks by me to try and
further clarify what is going on with this code.

http://reviews.llvm.org/D8267

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

9 years agoObject/COFF: Add coff_import_header.
Rui Ueyama [Wed, 27 May 2015 02:40:20 +0000 (02:40 +0000)]
Object/COFF: Add coff_import_header.

This type is described in the PE/COFF spec section 7.1.

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

9 years ago[BitcodeReader] Change assert to report_fatal_error
Filipe Cabecinhas [Wed, 27 May 2015 01:05:40 +0000 (01:05 +0000)]
[BitcodeReader] Change assert to report_fatal_error

It can be triggered by user input.

Bug found with AFL fuzz.

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

9 years ago[BitstreamReader] Make sure the Array operand type is an encoding
Filipe Cabecinhas [Wed, 27 May 2015 00:48:43 +0000 (00:48 +0000)]
[BitstreamReader] Make sure the Array operand type is an encoding

Bug found with AFL fuzz.

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

9 years agoclang-format a couple of lines
Filipe Cabecinhas [Wed, 27 May 2015 00:48:37 +0000 (00:48 +0000)]
clang-format a couple of lines

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

9 years ago[BitcodeReader] Make sure abbrev records have at least one operand (record code)
Filipe Cabecinhas [Tue, 26 May 2015 23:52:21 +0000 (23:52 +0000)]
[BitcodeReader] Make sure abbrev records have at least one operand (record code)

Bug found with AFL fuzz.

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

9 years agoAdd initial support for the convergent attribute.
Owen Anderson [Tue, 26 May 2015 23:48:40 +0000 (23:48 +0000)]
Add initial support for the convergent attribute.

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

9 years ago[BitcodeReader] Sanity check on Comdat ID
Filipe Cabecinhas [Tue, 26 May 2015 23:00:56 +0000 (23:00 +0000)]
[BitcodeReader] Sanity check on Comdat ID

Shouldn't be an assert, since user input can trigger it.

Bug found with AFL fuzz.

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

9 years agoclang-format TargetRegistry.h. NFC.
Rafael Espindola [Tue, 26 May 2015 21:18:29 +0000 (21:18 +0000)]
clang-format TargetRegistry.h. NFC.

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

9 years ago[PlaceSafepoints] Entry safepoint location doesn't need to be a terminator
Philip Reames [Tue, 26 May 2015 21:16:42 +0000 (21:16 +0000)]
[PlaceSafepoints] Entry safepoint location doesn't need to be a terminator

Long ago, the poll insertion code assumed that the insertion site was a terminator.  As a result, the entry selection code would split a basic block to ensure it could pass a terminator.  The insertion code was updated quite a while ago - possibly before it ever landed upstream - but the now redundant work was never removed.

While I'm at it, remove a comment which doesn't apply to the upstreamed code.

NFC intended.

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

9 years ago[PlaceSafepoints] Cleanup InsertSafepointPoll function
Philip Reames [Tue, 26 May 2015 21:03:23 +0000 (21:03 +0000)]
[PlaceSafepoints] Cleanup InsertSafepointPoll function

While working on another change, I noticed that the naming in this function was mildly deceptive.  While fixing that, I took the oppurtunity to modernize some of the code.  NFC intended.

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

9 years ago[lib/Fuzzer] make the fuzzing timeout 1200 seconds by default (was: infinity)
Kostya Serebryany [Tue, 26 May 2015 20:57:47 +0000 (20:57 +0000)]
[lib/Fuzzer] make the fuzzing timeout 1200 seconds by default (was: infinity)

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

9 years agoSimplify boolean conditional return statements.
Rafael Espindola [Tue, 26 May 2015 20:37:36 +0000 (20:37 +0000)]
Simplify boolean conditional return statements.

Patch by Richard <legalize@xmission.com>.

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

9 years agoObject/COFF: Add COFFSymbolRef::isAbsolute().
Rui Ueyama [Tue, 26 May 2015 20:25:30 +0000 (20:25 +0000)]
Object/COFF: Add COFFSymbolRef::isAbsolute().

COFFSymbolRef has many predicates, like isCommon() or
isExternal(), but this predicate was missing.

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

9 years agoRemove NoFramePointerElim and NoFramePointerElimOverride from TargetOptions and
Akira Hatanaka [Tue, 26 May 2015 20:17:20 +0000 (20:17 +0000)]
Remove NoFramePointerElim and NoFramePointerElimOverride from TargetOptions and
remove ExecutionEngine's dependence on CodeGen. NFC.

This is a follow-up to r238080.

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

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

9 years agoUse "auto &" in range-based for-loop and remove the extra braces.
Adrian Prantl [Tue, 26 May 2015 20:06:51 +0000 (20:06 +0000)]
Use "auto &" in range-based for-loop and remove the extra braces.

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

9 years agoFix a use-after-free in a DEBUG output.
Adrian Prantl [Tue, 26 May 2015 20:06:48 +0000 (20:06 +0000)]
Fix a use-after-free in a DEBUG output.

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

9 years ago[lib/Fuzzer] fix docs
Kostya Serebryany [Tue, 26 May 2015 19:32:52 +0000 (19:32 +0000)]
[lib/Fuzzer] fix docs

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

9 years ago[lib/Fuzzer] fix build with assertions
Kostya Serebryany [Tue, 26 May 2015 19:29:33 +0000 (19:29 +0000)]
[lib/Fuzzer] fix build with assertions

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

9 years agoPrint "lock \t foo" instead of "lock \n foo".
Rafael Espindola [Tue, 26 May 2015 18:35:10 +0000 (18:35 +0000)]
Print "lock \t foo" instead of "lock \n foo".

This gets gas and llc -filetype=obj to agree on the order of prefixes.

For llvm-mc we need to fix the asm parser to know that it makes a difference
on which line the "lock" is in.

Part of pr23594.

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

9 years agoR600: Use SIGN_EXTEND_INREG for SEXT loads
Jan Vesely [Tue, 26 May 2015 18:07:22 +0000 (18:07 +0000)]
R600: Use SIGN_EXTEND_INREG for SEXT loads

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238229 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600: Add comments to subword private address load lowering code
Jan Vesely [Tue, 26 May 2015 18:07:21 +0000 (18:07 +0000)]
R600: Add comments to subword private address load lowering code

v2: Use C++ comments and end with periods

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238228 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "Re-commit changes in r237579 with fix for bug breaking windows builds."
Diego Novillo [Tue, 26 May 2015 17:45:38 +0000 (17:45 +0000)]
Revert "Re-commit changes in r237579 with fix for bug breaking windows builds."

This reverts commit r238201 to fix linking problems in x86 Linux
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150525/278413.html

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

9 years agoMake EmitFunctionHeader virtual
Matt Arsenault [Tue, 26 May 2015 17:33:15 +0000 (17:33 +0000)]
Make EmitFunctionHeader virtual

This is to fix problems introduced by r232481. For HSAIL,
this function does essentially nothing desirable, and
injects unwanted / incorrect stuff before the function.
The only thing it really needs to do is call EmitFunctionEntryLabel
in this case.

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

9 years agoForgot to add lit.local.cfg for new R600 directory
Matt Arsenault [Tue, 26 May 2015 17:01:16 +0000 (17:01 +0000)]
Forgot to add lit.local.cfg for new R600 directory

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

9 years agoCodeGenPrepare: Don't match addressing modes through addrspacecast
Matt Arsenault [Tue, 26 May 2015 16:59:43 +0000 (16:59 +0000)]
CodeGenPrepare: Don't match addressing modes through addrspacecast

This was resulting in the addrspacecast being removed and incorrectly
replaced with a ptrtoint when sinking.

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

9 years agoObject/COFF: Define .idata import directory table entry.
Rui Ueyama [Tue, 26 May 2015 16:24:42 +0000 (16:24 +0000)]
Object/COFF: Define .idata import directory table entry.

This data type is described in the Microsoft PE/COFF spec rev. 8.3 5.4.1.

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

9 years agoObject: Add Archive::getNumberOfSymbols().
Rui Ueyama [Tue, 26 May 2015 16:20:40 +0000 (16:20 +0000)]
Object: Add Archive::getNumberOfSymbols().

Add a function that returns number of symbols in archive headers.

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

9 years agoR600/SI: Add assembler support for all CI and VI VOP2 instructions
Tom Stellard [Tue, 26 May 2015 15:55:52 +0000 (15:55 +0000)]
R600/SI: Add assembler support for all CI and VI VOP2 instructions

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

9 years agoAsmMatcherEmitter: Add an option to override custom converters for InstAlias
Tom Stellard [Tue, 26 May 2015 15:55:50 +0000 (15:55 +0000)]
AsmMatcherEmitter: Add an option to override custom converters for InstAlias

If there is an InstAlias defined for an instruction that had a custom
converter (AsmMatchConverter), then when the alias is matched,
the custom converter will be used rather than the converter generated
by the InstAlias.

This patch adds the UseInstAsmMatchConverter field to the InstAlias
class, which allows you to override this behavior and force the
converter generated by the InstAlias to be used.

This is required for some future improvemnts to the R600 assembler.

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

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

9 years agoReplace getOrCreateSectionData with registerSection.
Rafael Espindola [Tue, 26 May 2015 15:07:25 +0000 (15:07 +0000)]
Replace getOrCreateSectionData with registerSection.

There is now no SectionData to be created.

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

9 years agoRemove dead forward declaration.
Rafael Espindola [Tue, 26 May 2015 14:51:03 +0000 (14:51 +0000)]
Remove dead forward declaration.

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

9 years agoHave getCurrentSectionData return a MCSection.
Rafael Espindola [Tue, 26 May 2015 14:48:11 +0000 (14:48 +0000)]
Have getCurrentSectionData return a MCSection.

I will fix the name shortly.

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

9 years agoPass a MCSection to getCurrentSectionData.
Rafael Espindola [Tue, 26 May 2015 14:42:52 +0000 (14:42 +0000)]
Pass a MCSection to getCurrentSectionData.

A step towards merging MCSection and MCSectionData.

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

9 years agoRe-commit changes in r237579 with fix for bug breaking windows builds.
Luke Cheeseman [Tue, 26 May 2015 13:40:31 +0000 (13:40 +0000)]
Re-commit changes in r237579 with fix for bug breaking windows builds.

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

9 years agoTest Commit
Luke Cheeseman [Tue, 26 May 2015 13:10:35 +0000 (13:10 +0000)]
Test Commit

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

9 years agoAVX-512: fixed a bug in arithmetic operations lowering for i1 type
Elena Demikhovsky [Tue, 26 May 2015 12:37:17 +0000 (12:37 +0000)]
AVX-512: fixed a bug in arithmetic operations lowering for i1 type

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

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

9 years agoFix warning introduced in r238190 about lack of virtual destructor in MCObjectFileInfo.
Daniel Sanders [Tue, 26 May 2015 12:25:36 +0000 (12:25 +0000)]
Fix warning introduced in r238190 about lack of virtual destructor in MCObjectFileInfo.

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

9 years agoAVX-512: fixed a bug in lowering VSELECT for 512-bit vector
Elena Demikhovsky [Tue, 26 May 2015 11:32:39 +0000 (11:32 +0000)]
AVX-512: fixed a bug in lowering VSELECT for 512-bit vector

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

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

9 years agoUse std::bitset for SubtargetFeatures.
Michael Kuperstein [Tue, 26 May 2015 10:47:10 +0000 (10:47 +0000)]
Use std::bitset for SubtargetFeatures.

Previously, subtarget features were a bitfield with the underlying type being uint64_t.
Since several targets (X86 and ARM, in particular) have hit or were very close to hitting this bound, switching the features to use a bitset.
No functional change.

The first several times this was committed (e.g. r229831, r233055), it caused several buildbot failures.
Apparently the reason for most failures was both clang and gcc's inability to deal with large numbers (> 10K) of bitset constructor calls in tablegen-generated initializers of instruction info tables.
This should now be fixed.

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

9 years ago[mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only.
Daniel Sanders [Tue, 26 May 2015 10:19:18 +0000 (10:19 +0000)]
[mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only.

Summary:
Following on from r209907 which made personality encodings indirect, do the
same for TType encodings. This fixes the case where a try/catch block needs
to generate references to, for example, std::exception in the
.gcc_except_table.

This commit uses DW_EH_PE_sdata8 for N64 as far as is possible at the moment.
However, it is possible to end up with DW_EH_PE_sdata4 when a TargetMachine is
not available. There's no risk of issues with inconsistency here since the
tables are self describing but it does mean there is a small chance of the
PC-relative offset being out of range for particularly large programs.

Reviewers: petarj

Reviewed By: petarj

Subscribers: srhines, joerg, tberghammer, llvm-commits

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

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

9 years ago[mips] Move some structures represent MIPS specific ELF sections from LLD to LLVM
Simon Atanasyan [Tue, 26 May 2015 08:48:14 +0000 (08:48 +0000)]
[mips] Move some structures represent MIPS specific ELF sections from LLD to LLVM

That allows to reuse the code in other tools like llvm-readobj etc.

No functional changes.

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

9 years ago[TableGen] Fix line wrapping logic for the autogenerated header to use math that...
Craig Topper [Tue, 26 May 2015 08:07:56 +0000 (08:07 +0000)]
[TableGen] Fix line wrapping logic for the autogenerated header to use math that makes more sense (at least to me).

The old code had a bug if the description was between 75 and 85 characters or so as it substracted PSLen from Desc.size() instead of MAX_LINE_LEN in the compare. It also calculated odd values for PosE on the last split and just let StringRef::slice take care of it being larger than the description string.

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

9 years ago[TableGen] Rewrite an assert to not do a bunch unsigned math and then try to ensure...
Craig Topper [Tue, 26 May 2015 08:07:49 +0000 (08:07 +0000)]
[TableGen] Rewrite an assert to not do a bunch unsigned math and then try to ensure the result is a positive number.

I think the fact that it was explicitly excluding 0 kept this from being a tautology. The exclusion of 0 for the old math was also a bug that's easily hit if the description gets split into multiple lines.

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

9 years ago[TableGen] Put a space between '*' and description in the autogenerated tablegen...
Craig Topper [Tue, 26 May 2015 08:07:45 +0000 (08:07 +0000)]
[TableGen] Put a space between '*' and description in the autogenerated tablegen header. Minor cleanup in surrounding code.

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

9 years ago[TableGen] Fix indentation. NFC
Craig Topper [Tue, 26 May 2015 06:48:47 +0000 (06:48 +0000)]
[TableGen] Fix indentation. NFC

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

9 years ago[TableGen] Include header for each cpp file first. NFC
Craig Topper [Tue, 26 May 2015 06:48:46 +0000 (06:48 +0000)]
[TableGen] Include header for each cpp file first. NFC

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

9 years ago[TableGen] Remove unnecessary include and just forward declare. NFC
Craig Topper [Tue, 26 May 2015 06:48:43 +0000 (06:48 +0000)]
[TableGen] Remove unnecessary include and just forward declare. NFC

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

9 years ago[TableGen] Remove unneeded namespace around a function. Just put llvm:: on the defini...
Craig Topper [Tue, 26 May 2015 06:48:41 +0000 (06:48 +0000)]
[TableGen] Remove unneeded namespace around a function. Just put llvm:: on the definition since it's already declared in a header file.

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

9 years ago[TableGen] Use 'static' instead of an anonymous namespace.
Craig Topper [Tue, 26 May 2015 06:48:38 +0000 (06:48 +0000)]
[TableGen] Use 'static' instead of an anonymous namespace.

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

9 years agoRemove most uses of MCSectionData from MCAssembler.
Rafael Espindola [Tue, 26 May 2015 02:17:21 +0000 (02:17 +0000)]
Remove most uses of MCSectionData from MCAssembler.

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

9 years agoStop using MCSectionData in MCAsmLayout.h.
Rafael Espindola [Tue, 26 May 2015 02:00:36 +0000 (02:00 +0000)]
Stop using MCSectionData in MCAsmLayout.h.

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

9 years agoDelete dead code.
Rafael Espindola [Tue, 26 May 2015 01:56:56 +0000 (01:56 +0000)]
Delete dead code.

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

9 years agoMove MCSection destruction to MCContext::reset.
Rafael Espindola [Tue, 26 May 2015 01:52:19 +0000 (01:52 +0000)]
Move MCSection destruction to MCContext::reset.

Fixes the leaks when running llc.

Also found by an asan bot.

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

9 years agoStop using MCSectionData in MCMachObjectWriter.h.
Rafael Espindola [Tue, 26 May 2015 01:15:30 +0000 (01:15 +0000)]
Stop using MCSectionData in MCMachObjectWriter.h.

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

9 years agoRemove dead forward declaration.
Rafael Espindola [Tue, 26 May 2015 00:55:28 +0000 (00:55 +0000)]
Remove dead forward declaration.

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

9 years agoStop using MCSectionData in MCExpr.h.
Rafael Espindola [Tue, 26 May 2015 00:52:18 +0000 (00:52 +0000)]
Stop using MCSectionData in MCExpr.h.

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

9 years agoReturn a MCSection from MCFragment::getParent().
Rafael Espindola [Tue, 26 May 2015 00:36:57 +0000 (00:36 +0000)]
Return a MCSection from MCFragment::getParent().

Another step in merging MCSectionData and MCSection.

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

9 years agoCall the destructors of the MCSections.
Rafael Espindola [Tue, 26 May 2015 00:32:28 +0000 (00:32 +0000)]
Call the destructors of the MCSections.

They now contain the fragments. If we don't call the destructors the
fragments leak.

Found by an asan bot.

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

9 years agoStore a MCSection in MCFragment.
Rafael Espindola [Mon, 25 May 2015 23:48:22 +0000 (23:48 +0000)]
Store a MCSection in MCFragment.

Part of the work to merge MCSectionData into MCSection.

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

9 years agoTurn MCSectionData into a field of MCSection.
Rafael Espindola [Mon, 25 May 2015 23:14:17 +0000 (23:14 +0000)]
Turn MCSectionData into a field of MCSection.

This also changes MCAssembler to store a vector of MCSections instead of an
iplist of MCSectionData.

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

9 years agoMove MCSectionData to MCSection.h.
Rafael Espindola [Mon, 25 May 2015 22:57:48 +0000 (22:57 +0000)]
Move MCSectionData to MCSection.h.

Another step in merging MCSectionData and MCSection.

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

9 years agoRemove dead code. NFC.
Rafael Espindola [Mon, 25 May 2015 22:07:33 +0000 (22:07 +0000)]
Remove dead code. NFC.

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

9 years agoMake a few MCSectionELF& variables const. NFC.
Rafael Espindola [Mon, 25 May 2015 21:56:55 +0000 (21:56 +0000)]
Make a few MCSectionELF& variables const. NFC.

This just reduces the noise from another patch.

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

9 years agoInsert MCSectionData into the section list directly in getOrCreateSectionData.
Rafael Espindola [Mon, 25 May 2015 20:39:23 +0000 (20:39 +0000)]
Insert MCSectionData into the section list directly in getOrCreateSectionData.

Removing the logic from the constructor will make it easier to merge
MCSectionData and MCSection.

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

9 years agoUse range-based for loops. NFC.
Craig Topper [Mon, 25 May 2015 20:01:18 +0000 (20:01 +0000)]
Use range-based for loops. NFC.

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

9 years agoRemove conflicting attributes before adding deduced readonly/readnone
Bjorn Steinbrink [Mon, 25 May 2015 19:46:38 +0000 (19:46 +0000)]
Remove conflicting attributes before adding deduced readonly/readnone

Summary:
In case of functions that have a pointer argument and only pass it to
each other, the function attributes pass deduces that the pointer should
get the readnone attribute, but fails to remove a readonly attribute
that may already have been present.

Reviewers: nlewycky

Subscribers: llvm-commits

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

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

9 years ago[llvm-readobj/ELF] Teach how to decode DF_1_XXX flags
Davide Italiano [Mon, 25 May 2015 19:12:18 +0000 (19:12 +0000)]
[llvm-readobj/ELF] Teach how to decode DF_1_XXX flags

llvm-readobj -dynamic-table output.
Before:
0x000000006FFFFFFB unknown

After:
0x000000006FFFFFFB FLAGS_1 NOW ORIGIN

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

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

9 years agoMove HasInstructions to MCSection.
Rafael Espindola [Mon, 25 May 2015 18:34:26 +0000 (18:34 +0000)]
Move HasInstructions to MCSection.

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

9 years ago[X86][AVX2] Vectorized i16 shift operators
Simon Pilgrim [Mon, 25 May 2015 17:49:13 +0000 (17:49 +0000)]
[X86][AVX2] Vectorized i16 shift operators

Part of D9474, this patch extends AVX2 v16i16 types to 2 x 8i32 vectors and uses i32 shift variable shifts before packing back to i16.

Adds AVX2 tests for v8i16 and v16i16

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

9 years agoR600/SI: Remove some unnecessary patterns from VINTRP multiclass
Tom Stellard [Mon, 25 May 2015 16:15:56 +0000 (16:15 +0000)]
R600/SI: Remove some unnecessary patterns from VINTRP multiclass

DisableEncoding and Constraints can be set using let statements around
the multiclass defs.

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

9 years agoR600/SI: Fix bug with v_interp_p1_f32 instructions on 16 bank lds chips
Tom Stellard [Mon, 25 May 2015 16:15:54 +0000 (16:15 +0000)]
R600/SI: Fix bug with v_interp_p1_f32 instructions on 16 bank lds chips

The src and dst register cannot be the same on chips with 16 lds banks.

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

9 years agoR600/SI: Use NAME rather than opName as the key to the MCOpcode tables
Tom Stellard [Mon, 25 May 2015 16:15:50 +0000 (16:15 +0000)]
R600/SI: Use NAME rather than opName as the key to the MCOpcode tables

This lets us drop a parameter the opName parameter to the VINTRP
multiclass and makes it possible to create multiple VINTRP defs
with the same asm mnemonic.

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

9 years agoThis patch adds support for the vector quadword add/sub instructions introduced
Kit Barton [Mon, 25 May 2015 15:49:26 +0000 (15:49 +0000)]
This patch adds support for the vector quadword add/sub instructions introduced
in POWER8:

vadduqm
vaddeuqm
vaddcuq
vaddecuq
vsubuqm
vsubeuqm
vsubcuq
vsubecuq
In addition to adding the instructions themselves, it also adds support for the
v1i128 type for intrinsics (Intrinsics.td, Function.cpp, and
IntrinsicEmitter.cpp).

http://reviews.llvm.org/D9081

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

9 years agoMove bundle info from MCSectionData to MCSection.
Rafael Espindola [Mon, 25 May 2015 15:04:26 +0000 (15:04 +0000)]
Move bundle info from MCSectionData to MCSection.

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