platform/upstream/llvm.git
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.

llvm-svn: 238252

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)

llvm-svn: 238251

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>.

llvm-svn: 238250

9 years agoHave lldb-mi tests import pexpect at a narrower scope.
Zachary Turner [Tue, 26 May 2015 20:26:43 +0000 (20:26 +0000)]
Have lldb-mi tests import pexpect at a narrower scope.

The tests are xfail'ed on Windows, but would still error out since
they were importing pexpect at global scope.  This way the tests
will correctly report as unsupported.

llvm-svn: 238249

9 years agoAlso don't try to copy a logfile if it doesn't exist.
Zachary Turner [Tue, 26 May 2015 20:26:29 +0000 (20:26 +0000)]
Also don't try to copy a logfile if it doesn't exist.

In some cases no log file will be written, so don't attempt to
call os.rename() with a non-existent source path.

llvm-svn: 238248

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.

llvm-svn: 238247

9 years agoSync PlatformFreeBSD::GetSupportedArchitectureAtIndex with PlatformLinux
Ed Maste [Tue, 26 May 2015 20:23:20 +0000 (20:23 +0000)]
Sync PlatformFreeBSD::GetSupportedArchitectureAtIndex with PlatformLinux

Reviewed by Ted Woodward
Differential Revision: http://reviews.llvm.org/D9764

llvm-svn: 238246

9 years agoRemove the code in clang that is using TargetOptions::NoFramePointerElim.
Akira Hatanaka [Tue, 26 May 2015 20:18:26 +0000 (20:18 +0000)]
Remove the code in clang that is using TargetOptions::NoFramePointerElim.

This is the clang side change following r238244.

llvm-svn: 238245

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

llvm-svn: 238244

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.

llvm-svn: 238243

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.

llvm-svn: 238242

9 years agoFixing an RST issue to silence a sphinx warning.
Aaron Ballman [Tue, 26 May 2015 19:56:13 +0000 (19:56 +0000)]
Fixing an RST issue to silence a sphinx warning.

llvm-svn: 238241

9 years agoOn Windows, delete existing log file before renaming temp file.
Zachary Turner [Tue, 26 May 2015 19:52:24 +0000 (19:52 +0000)]
On Windows, delete existing log file before renaming temp file.

On non-Windows platforms, os.rename() will silently replace the
destination file if it already exists.  On Windows, it doesn't do
this, and the filesystem has no mechanism to simulate the same type
of atomic rename operation.  So on Windows, delete the file first
before calling os.rename().

llvm-svn: 238239

9 years ago__declspec is not a core Clang language extension. Instead, require -fms-extensions...
Aaron Ballman [Tue, 26 May 2015 19:44:52 +0000 (19:44 +0000)]
__declspec is not a core Clang language extension. Instead, require -fms-extensions or -fborland to enable the language extension.

Note: __declspec is also temporarily enabled when compiling for a CUDA target because there are implementation details relying on __declspec(property) support currently. When those details change, __declspec should be disabled for CUDA targets.
llvm-svn: 238238

9 years agoRevert r238200: "[MIPS] fix extension of integer types (function calls)"
Hans Wennborg [Tue, 26 May 2015 19:39:54 +0000 (19:39 +0000)]
Revert r238200: "[MIPS] fix extension of integer types (function calls)"

mips-unsigned-ext-var.c and mips-unsigned-extend.c fail in some builds.

llvm-svn: 238237

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

llvm-svn: 238236

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

llvm-svn: 238235

9 years agoFix broken test I just added
Marshall Clow [Tue, 26 May 2015 19:17:09 +0000 (19:17 +0000)]
Fix broken test I just added

llvm-svn: 238234

9 years agoAdd tests to ensure that string/vector/array have contiguous iterators - which they...
Marshall Clow [Tue, 26 May 2015 18:57:27 +0000 (18:57 +0000)]
Add tests to ensure that string/vector/array have contiguous iterators - which they did. Mark N4284 as complete

llvm-svn: 238233

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.

llvm-svn: 238232

9 years agoFix some logic where we used to have char arrays, but we now use std::string. Use...
Greg Clayton [Tue, 26 May 2015 18:29:03 +0000 (18:29 +0000)]
Fix some logic where we used to have char arrays, but we now use std::string. Use the correctly API to detect if they are not empty.

<rdar://problem/21090173>

llvm-svn: 238231

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>
llvm-svn: 238229

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>
llvm-svn: 238228

9 years agoTighten the PHI modeling test cases
Tobias Grosser [Tue, 26 May 2015 18:05:45 +0000 (18:05 +0000)]
Tighten the PHI modeling test cases

While looking through the test cases I realized we did not have a CHECK line
for a duplicate memory access which we may want to eliminate later. To ensure
we do not have (or later introduce) unnecessary memory accesses, we now tighten
the test cases to look for such a pattern (and add the CHECK: line that shows
the redundant memory access).

llvm-svn: 238227

9 years ago[msan] Fix mmap test on Fedora.
Evgeniy Stepanov [Tue, 26 May 2015 18:02:54 +0000 (18:02 +0000)]
[msan] Fix mmap test on Fedora.

llvm-svn: 238226

9 years agoChange final case of Driver::getToolChain to "if/else/else/else..."
Douglas Katzman [Tue, 26 May 2015 18:01:33 +0000 (18:01 +0000)]
Change final case of Driver::getToolChain to "if/else/else/else..."

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

llvm-svn: 238225

9 years agoAdded XML to the host layer.
Greg Clayton [Tue, 26 May 2015 18:00:51 +0000 (18:00 +0000)]
Added XML to the host layer.

We know have on API we should use for all XML within LLDB in XML.h. This API will be easy back the XML parsing by different libraries in case libxml2 doesn't work on all platforms. It also allows the only place for #ifdef ...XML... to be in XML.h and XML.cpp. The API is designed so it will still compile with or without XML support and there is a static function "bool XMLDocument::XMLEnabled()" that can be called to see if XML is currently supported. All APIs will return errors, false, or nothing when XML isn't enabled.

Converted all locations that used XML over to using the host XML implementation.

Added target.xml support to debugserver. Extended the XML register format to work for LLDB by including extra attributes and elements where needed. This allows the target.xml to replace the qRegisterInfo packets and allows us to fetch all register info in a single packet.

<rdar://problem/21090173>

llvm-svn: 238224

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

llvm-svn: 238223

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.

llvm-svn: 238222

9 years agoChange macro GUIDEDLL_EXPORTS to KMP_DYNAMIC_LIB
Jonathan Peyton [Tue, 26 May 2015 17:32:53 +0000 (17:32 +0000)]
Change macro GUIDEDLL_EXPORTS to KMP_DYNAMIC_LIB

A while back, Hal suggested updating the GUIDEDLL_EXPORTS macro guard to
a more descriptive name.  It represents a dynamic library build so
KMP_DYNAMIC_LIB is a more suitable name.

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

llvm-svn: 238221

9 years agoTest commit.
Ranjeet Singh [Tue, 26 May 2015 17:30:35 +0000 (17:30 +0000)]
Test commit.

llvm-svn: 238220

9 years agoChange CMake file formatting
Jonathan Peyton [Tue, 26 May 2015 17:27:01 +0000 (17:27 +0000)]
Change CMake file formatting

Removing unnecessary spaces. For CACHE variables, putting the description string
on its own line which mimics libcxx. There are no logic changes.

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

llvm-svn: 238219

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

llvm-svn: 238218

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.

llvm-svn: 238217

9 years agoOne line fix for possible out-of-bounds issue in kmp_runtime.c
Jonathan Peyton [Tue, 26 May 2015 16:38:26 +0000 (16:38 +0000)]
One line fix for possible out-of-bounds issue in kmp_runtime.c

The variable j is now checked so there is no possible
out-of-bounds issue when accessing __kmp_nested_nth.nth[] array.

llvm-svn: 238216

9 years agoOne line fix for possible out-of-bounds issue in kmp_error.c
Jonathan Peyton [Tue, 26 May 2015 16:30:41 +0000 (16:30 +0000)]
One line fix for possible out-of-bounds issue in kmp_error.c

This off-by-one error could lead to an out-of-bounds access on the
cons_text_c[] array.

llvm-svn: 238215

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.

llvm-svn: 238214

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.

llvm-svn: 238213

9 years agoGoing out on a limb and guessing that someone viewing the 3.7 release notes may inste...
Aaron Ballman [Tue, 26 May 2015 16:12:07 +0000 (16:12 +0000)]
Going out on a limb and guessing that someone viewing the 3.7 release notes may instead want to view 3.6 instead of 3.5.

llvm-svn: 238212

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

llvm-svn: 238211

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

llvm-svn: 238210

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.

llvm-svn: 238208

9 years agoMark N4366 as complete. libc++ has done this since 2012
Marshall Clow [Tue, 26 May 2015 14:58:05 +0000 (14:58 +0000)]
Mark N4366 as complete. libc++ has done this since 2012

llvm-svn: 238207

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

llvm-svn: 238205

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.

llvm-svn: 238204

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.

llvm-svn: 238203

9 years ago[clang-tidy] misc-noexcept-move-ctors should ignore implicit constructors and assignm...
Alexander Kornienko [Tue, 26 May 2015 14:35:09 +0000 (14:35 +0000)]
[clang-tidy] misc-noexcept-move-ctors should ignore implicit constructors and assignments.

llvm-svn: 238202

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.

llvm-svn: 238201

9 years ago[MIPS] fix extension of integer types (function calls)
Petar Jovanovic [Tue, 26 May 2015 13:30:54 +0000 (13:30 +0000)]
[MIPS] fix extension of integer types (function calls)

On MIPS unsigned int type should not be zero extended but sign-extended.

Patch by Strahinja Petrovic.

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

llvm-svn: 238200

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

llvm-svn: 238199

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

llvm-svn: 238198

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.

llvm-svn: 238197

9 years agoMove register reading form NativeProcessLinux to NativeRegisterContextLinux*
Tamas Berghammer [Tue, 26 May 2015 11:58:52 +0000 (11:58 +0000)]
Move register reading form NativeProcessLinux to NativeRegisterContextLinux*

This change reorganize the register read/write code inside lldb-server on Linux
with moving the architecture independent code into a new class called
NativeRegisterContextLinux and all of the architecture dependent code into the
appropriate NativeRegisterContextLinux_* class. As part of it the compilation of
the architecture specific register contexts are only compiled on the specific
architecture because they can't be used in other cases.

The purpose of this change is to remove a lot of duplicated code from the different
register contexts and to remove the architecture dependent codes from the global
NativeProcessLinux class.

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

llvm-svn: 238196

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

llvm-svn: 238195

9 years ago[ARM] Fix enum type cast in switch
Denis Protivensky [Tue, 26 May 2015 11:13:09 +0000 (11:13 +0000)]
[ARM] Fix enum type cast in switch

It caused warning in clang assuming the default
branch would never be reached with the given
switch key type.

llvm-svn: 238194

9 years ago[clang-tidy] Don't issue most google-readability-casting warnings on .c files include...
Alexander Kornienko [Tue, 26 May 2015 10:47:48 +0000 (10:47 +0000)]
[clang-tidy] Don't issue most google-readability-casting warnings on .c files included in other files.

This is done sometimes for testing purposes, and the check needs to handle this
consistently.

llvm-svn: 238193

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.

llvm-svn: 238192

9 years ago[ARM] Move out .ARM.exidx related things to ARM backend
Denis Protivensky [Tue, 26 May 2015 10:26:15 +0000 (10:26 +0000)]
[ARM] Move out .ARM.exidx related things to ARM backend

llvm-svn: 238191

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

llvm-svn: 238190

9 years ago[Mips] Use structures declared in the llvm/Object/ELFTypes.h
Simon Atanasyan [Tue, 26 May 2015 08:48:33 +0000 (08:48 +0000)]
[Mips] Use structures declared in the llvm/Object/ELFTypes.h

No functional changes.

llvm-svn: 238189

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.

llvm-svn: 238188

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.

llvm-svn: 238187

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.

llvm-svn: 238186

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.

llvm-svn: 238185

9 years agoclang-format: Guard the bin-packing in braced lists on BinPackArguments
Daniel Jasper [Tue, 26 May 2015 07:26:26 +0000 (07:26 +0000)]
clang-format: Guard the bin-packing in braced lists on BinPackArguments
instead of BinPackParameters. Braced lists are used as constructor
calls in many places and so the bin-packing should follow what is done
for other calls and not what is done for function declarations.

llvm-svn: 238184

9 years agoclang-format: [JS] Support ES6 spread operator.
Daniel Jasper [Tue, 26 May 2015 07:18:56 +0000 (07:18 +0000)]
clang-format: [JS] Support ES6 spread operator.

Specifically, don't add a space before it.

Before:
  someFunction(... a);
  var x = [1, 2, ... a];

After:
  someFunction(...a);
  var x = [1, 2, ...a];

llvm-svn: 238183

9 years agoclang-format: Fix child-formatting in macros.
Daniel Jasper [Tue, 26 May 2015 07:03:42 +0000 (07:03 +0000)]
clang-format: Fix child-formatting in macros.

This fixes a case where the column limit was incorrectly calculated
leading to a macro like this:

  #define A                                       \
    [] {                                          \
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(        \
          xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx); \
    }

exceeding the column limit.

llvm-svn: 238182

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

llvm-svn: 238181

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

llvm-svn: 238180

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

llvm-svn: 238179

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.

llvm-svn: 238178

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.

llvm-svn: 238177

9 years ago[Mips] Add Elf_Mips_Options::getRegInfoDesc() function to retrieve an ODK_REGINFO...
Simon Atanasyan [Tue, 26 May 2015 06:05:07 +0000 (06:05 +0000)]
[Mips] Add Elf_Mips_Options::getRegInfoDesc() function to retrieve an ODK_REGINFO descriptor

No functional changes.

llvm-svn: 238176

9 years ago[Mips] Make the code shorter - use LLVM_ELF_IMPORT_TYPES_ELFT macro
Simon Atanasyan [Tue, 26 May 2015 06:05:01 +0000 (06:05 +0000)]
[Mips] Make the code shorter - use LLVM_ELF_IMPORT_TYPES_ELFT macro

No functional changes.

llvm-svn: 238175

9 years agorevert files unintentionally checked in
Vince Harron [Tue, 26 May 2015 03:10:41 +0000 (03:10 +0000)]
revert files unintentionally checked in

llvm-svn: 238174

9 years agoPrint port number that lldb-server binds to in platform mode
Vince Harron [Tue, 26 May 2015 03:08:05 +0000 (03:08 +0000)]
Print port number that lldb-server binds to in platform mode

If binding to port 0 is selected, the actual port is printed.

This improves the reliability of platform startup by ensuring that
a free port can be found.

TEST PLAN
./lldb-server platform --listen *:0

Listening for a connection from <port-number>...

Will appear on stdout (with other stuff potentially)

llvm-svn: 238173

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.

llvm-svn: 238172

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.

llvm-svn: 238170

9 years ago[ELF] Add support for -z origin/now options.
Davide Italiano [Tue, 26 May 2015 01:57:32 +0000 (01:57 +0000)]
[ELF] Add support for -z origin/now options.

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

llvm-svn: 238169

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

llvm-svn: 238168

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.

llvm-svn: 238167

9 years ago[MS ABI] Implement restrict qualified references
David Majnemer [Tue, 26 May 2015 01:30:45 +0000 (01:30 +0000)]
[MS ABI] Implement restrict qualified references

MSVC 2015 supports '__restrict' qualified reference types.

llvm-svn: 238166

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.

llvm-svn: 238165

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

llvm-svn: 238164

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.

llvm-svn: 238163

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.

llvm-svn: 238162

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.

llvm-svn: 238161

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.

llvm-svn: 238160

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.

llvm-svn: 238159

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.

llvm-svn: 238158

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

llvm-svn: 238157

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.

llvm-svn: 238156

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.

llvm-svn: 238155

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.

llvm-svn: 238154

9 years agofixed missed arch renaming (from C.Bergstrom)
Andrey Churbanov [Mon, 25 May 2015 20:01:16 +0000 (20:01 +0000)]
fixed missed arch renaming (from C.Bergstrom)

llvm-svn: 238153

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

llvm-svn: 238152

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

llvm-svn: 238151

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

llvm-svn: 238150

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

llvm-svn: 238149

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.

llvm-svn: 238148