Commit Graph

221217 Commits

Author SHA1 Message Date
Jonathan Peyton bf89c491c5 Removing extra empty lines
llvm-svn: 258984
2016-01-27 20:44:49 +00:00
Mike Aizatsky 48c26de04e [sanitizers] using execv instead of execve with null env.
Differential Revision: http://reviews.llvm.org/D16646

llvm-svn: 258983
2016-01-27 20:35:18 +00:00
Davide Italiano 905b8627bb [llvm-nm] Remove redundant check for file validity.
We already perform it at the beginning of the function so we can't
arrive here with an invalid object. Also, add a test so that bugs
won't sneak in the future.

llvm-svn: 258982
2016-01-27 20:27:44 +00:00
Daniel Jasper 15b01116d9 clang-format: [Java] Remove unnecessary line break after complex annotations
Before:
  @Annotation("Some"
      + " text")
  List<Integer>
      list;

After:
  @Annotation("Some"
      + " text")
  List<Integer> list;

llvm-svn: 258981
2016-01-27 20:14:23 +00:00
Manman Ren d36f7d5a9a Class Property: create accessors (class methods) for class property.
Change a few places where we assume property accessors can only be instance
methods.

rdar://23891898

llvm-svn: 258980
2016-01-27 20:10:32 +00:00
Manman Ren efe1bacd92 Class Property: handle class properties.
At places where we handle instance properties, if necessary.

rdar://23891898

llvm-svn: 258979
2016-01-27 20:00:32 +00:00
Zachary Turner 95b533fe4b Revert "Resubmit r258759 with proper unicode handling."
This reverts commit 2c79d60214e146b13b233392a859b4f79340e90e.

llvm-svn: 258978
2016-01-27 19:47:28 +00:00
Evgeniy Stepanov ecfa524ee3 [cfi] Fix gcc build.
llvm-svn: 258977
2016-01-27 19:33:00 +00:00
Tim Northover d88ecb30a1 ARMv7k: select ABI based on v7k Arch rather than watchos OS.
Various bits we'd like to use the new ABI actually compile with "-arch armv7k
-miphoneos-version-min=9.0". Not ideal, but also not ridiculous given how
slices work.

llvm-svn: 258976
2016-01-27 19:32:40 +00:00
Tim Northover 042a6c1fe1 ARMv7k: base ABI decision on v7k Arch rather than watchos OS.
Various bits we want to use the new ABI actually compile with "-arch armv7k
-miphoneos-version-min=9.0". Not ideal, but also not ridiculous given how
slices work.

llvm-svn: 258975
2016-01-27 19:32:29 +00:00
Benjamin Kramer 391be792f2 One more batch of self-containing headers.
llvm-svn: 258974
2016-01-27 19:29:56 +00:00
Benjamin Kramer b32a5042bd Don't put classes in headers into anonymous namespaces.
You want ODR violations? That's how you get ODR violations.

llvm-svn: 258973
2016-01-27 19:29:42 +00:00
Sanjay Patel 5264cc772c [SimplifyCFG] limit recursion depth when speculating instructions (PR26308)
This is a fix for:
https://llvm.org/bugs/show_bug.cgi?id=26308

With the switch to using the TTI cost model in:
http://reviews.llvm.org/rL228826
...it became possible to hit a zero-cost cycle of instructions (gep -> phi -> gep...), 
so we need a cap for the recursion in DominatesMergePoint().

A recursion depth parameter was already added for a different reason in:
http://reviews.llvm.org/rL255660
...so we can just set a limit for it.

I pulled "10" out of the air and made it an independent parameter that we can play with.
It might be higher than it needs to be given the currently low default value of 
PHINodeFoldingThreshold (2). That's the starting cost value that we enter the recursion
with, and most instructions have cost set to TCC_Basic (1), so I don't think we're going
to speculate more than 2 instructions with the current parameters.

As noted in the review and the TODO comment, we can do better than just limiting recursion
depth.

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

llvm-svn: 258971
2016-01-27 19:22:45 +00:00
John McCall 3fe604f89f Add support for objc_unsafeClaimAutoreleasedReturnValue to the
ObjC ARC Optimizer.

The main implication of this is:

1. Ensuring that we treat it conservatively in terms of optimization.
2. We put the ASM marker on it so that the runtime can recognize
objc_unsafeClaimAutoreleasedReturnValue from releaseRV.

<rdar://problem/21567064>

Patch by Michael Gottesman!

llvm-svn: 258970
2016-01-27 19:05:08 +00:00
Zachary Turner 671e6340da Resubmit r258759 with proper unicode handling.
Instead of opening the file in unicode mode, we need only encode
data which potentially has non-ASCII characters as UTF8 before
writing.  This should work across both Python versions, and is
also far simpler than anything else discussed.

llvm-svn: 258969
2016-01-27 19:00:51 +00:00
Zachary Turner e89a66bd4a Fix some python 3 incompatibilities that went in overnight.
* basestring is not a thing anymore.  Must use `six.string_types`.
* Must use from __future__ import print_function in every new test
  file.

llvm-svn: 258967
2016-01-27 18:49:35 +00:00
Zachary Turner 7289e43831 Refactor some of the xfail / skip decorators to share logic.
Previously the logic of skipIf and expectedFailure were 99%
the same, but they took different sets of arguments since they
were maintained separately, and had slightly differences in
their behavior.  This makes everything consistent, there is now
only one real implementation, and the previous ones are changed
to use the single master implementation.

llvm-svn: 258966
2016-01-27 18:49:31 +00:00
Zachary Turner 74b7965d38 Don't automtically try to import pexpect in lldbpexpect.
Since pexpect doesn't exist on Windows, tests which are xfail'ed
are not being run at all because they are failing when the file
is imported due to the `import pexpect`.  This puts the import
behind a conditional and makes an empty base class in the case
where pexpect is not present.

llvm-svn: 258965
2016-01-27 18:49:25 +00:00
John McCall e399e5bd3d Emit calls to objc_unsafeClaimAutoreleasedReturnValue when
reclaiming a call result in order to ignore it or assign it
to an __unsafe_unretained variable.  This avoids adding
an unwanted retain/release pair when the return value is
not actually returned autoreleased (e.g. when it is returned
from a nonatomic getter or a typical collection accessor).

This runtime function is only available on the latest Apple
OS releases; the backwards-compatibility story is that you
don't get the optimization unless your deployment target is
recent enough.  Sorry.

rdar://20530049

llvm-svn: 258962
2016-01-27 18:32:30 +00:00
Hans Wennborg 14bf877e6b docs/conf.py: update copyright year
llvm-svn: 258960
2016-01-27 18:29:16 +00:00
Rafael Espindola 10d71ffc65 Remove another case of almost duplicated code.
Were had very similar code for deciding to keep a local symbol and for
actually writing it.

llvm-svn: 258958
2016-01-27 18:04:26 +00:00
Benjamin Kramer c8be5be968 Unbreak wasm build after r258951.
llvm-svn: 258957
2016-01-27 18:03:40 +00:00
Benjamin Kramer 45275a4d3c Make more headers self-contained.
A lot of this comes from the new complete type requirement of DenseMap.

llvm-svn: 258956
2016-01-27 18:03:37 +00:00
Hans Wennborg c89f805ca6 getting_started.rst: fix 'unknown target name' error
llvm-svn: 258953
2016-01-27 17:54:35 +00:00
Oliver Stannard 1e67a9f196 Refactor backend diagnostics for unsupported features
The BPF and WebAssembly backends had identical code for emitting errors
for unsupported features, and AMDGPU had very similar code. This merges
them all into one DiagnosticInfo subclass, that can be used by any
backend.

There should be minimal functional changes here, but some AMDGPU tests
have been updated for the new format of errors (it used a slightly
different format to BPF and WebAssembly). The AMDGPU error messages will
now benefit from having precise source locations when debug info is
available.

The implementation of DiagnosticInfoUnsupported::print must be in
lib/Codegen rather than in the existing file in lib/IR/ to avoid
introducing a dependency from IR to CodeGen.

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

llvm-svn: 258951
2016-01-27 17:30:33 +00:00
Oliver Stannard 5e03a4b837 Add backend dignostic printer for unsupported features
The related LLVM patch adds a backend diagnostic type for reporting
unsupported features, this adds a printer for them to clang.

In the case where debug location information is not available, I've
changed the printer to report the location as the first line of the
function, rather than the closing brace, as the latter does not give the
user any information. This also affects optimisation remarks.

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

llvm-svn: 258950
2016-01-27 17:30:28 +00:00
Rafael Espindola 81e05525e3 Handle local symbols in discarded sections.
We were reserving space for them but never writing them out.

llvm-svn: 258948
2016-01-27 17:09:37 +00:00
Michael Kruse 70131d3416 Introduce MemAccInst helper class; NFC
MemAccInst wraps the common members of LoadInst and StoreInst. Also use
of this class in:
- ScopInfo::buildMemoryAccess
- BlockGenerator::generateLocationAccessed
- ScopInfo::addArrayAccess
- Scop::buildAliasGroups
- Replace every use of polly::getPointerOperand

Reviewers: jdoerfert, grosser

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

llvm-svn: 258947
2016-01-27 17:09:17 +00:00
Sanjoy Das cddde58f1c [IndVars] Hoist DataLayout load out of loop; NFC
llvm-svn: 258946
2016-01-27 17:05:09 +00:00
Sanjoy Das 2f7a7447c2 [IndVars] Use isSCEVable; NFC
llvm-svn: 258945
2016-01-27 17:05:06 +00:00
Sanjoy Das 8fdf87c338 [IndVars] Use range-for; NFC
llvm-svn: 258944
2016-01-27 17:05:03 +00:00
Adrian McCarthy 7ae98efe85 XFail TestCPPAuto on Windows until we can find the root problem.
llvm.org/pr26339

llvm-svn: 258943
2016-01-27 17:03:25 +00:00
Benjamin Kramer 390c33cd18 Move SafeStack to CodeGen.
It depends on the target machinery, that's not available for
instrumentation passes.

llvm-svn: 258942
2016-01-27 16:53:42 +00:00
Simon Pilgrim a73a0cfaf4 [X86][SSE] Test insertps instrinsic calls with masks that can't combine to something simpler
For these basic tests of the intrinsic, make sure the mask can't simplify to movss, blend-with-zero or something else

llvm-svn: 258941
2016-01-27 16:51:57 +00:00
Rafael Espindola 0e92f24880 Remove redundant variable.
llvm-svn: 258940
2016-01-27 16:41:24 +00:00
Benjamin Kramer f9172fd4ac Rename TargetSelectionDAGInfo into SelectionDAGTargetInfo and move it to CodeGen/
It's a SelectionDAG thing, not a Target thing.

llvm-svn: 258939
2016-01-27 16:32:26 +00:00
Benjamin Kramer c67cf31f5c Move passes that live in lib/CodeGen out of Scalar.h
llvm-svn: 258938
2016-01-27 16:05:42 +00:00
Benjamin Kramer 820f7548a1 Make some headers self-contained, remove unused includes that violate layering.
llvm-svn: 258937
2016-01-27 16:05:37 +00:00
Tom Stellard 6e3b14de62 AMDGPU/SI: Fix commuting of 32-bit VOPC instructions
Summary:
We didn't have entries in the commuting table for the 32-bit
instructions.  I don't think we hit this problem now, but we
will once uniform branching is enabled.  Tests will come in
a later commit.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

llvm-svn: 258936
2016-01-27 15:53:52 +00:00
Chris Bieneman 94d6788f9a Adding back in a test that I inadvertently removed in r258862
llvm-svn: 258935
2016-01-27 15:51:56 +00:00
Tom Stellard 37d19875fa Implement modf math builtin
V2: use the reference implementation as suggested by Matt Arsenault

Patch By: Pavel Ondračka

llvm-svn: 258933
2016-01-27 14:52:10 +00:00
Tom Stellard a249f50970 Add _CLC_V_V_VP_VECTORIZE macro
Patch by: Pavel Ondračka

llvm-svn: 258932
2016-01-27 14:52:07 +00:00
Igor Laevsky ff291b5833 [DebugInfo] Support zero-length CIE in the _eh_frame parser
MCJIT emits zero-length CIE at the end of the _eh_frame section. This change
ensures that parser inside DebugInfo will not crash and correctly record such cases.
We are now recording DW_EH_PE_omit as a default value for FDE and LSDA encodings.
Also Offset != EndAugmentationOffset assertion check will only happen if augmentation 
string had 'z' letter in it.

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

llvm-svn: 258931
2016-01-27 14:05:35 +00:00
Omair Javaid 7124c11ad9 Decorarte TestInferiorAssert xfails on AArch64 Linux
This patch decorates some of TestInferiorAssert test cases with expectedFailureLinux on AArch64.

llvm-svn: 258930
2016-01-27 13:57:33 +00:00
Matthew Simpson b95861d35e Reapply commit r258404 with fix
This patch is the second attempt to reapply commit r258404. There was bug in
the initial patch and subsequent fix (mentioned below).

The initial patch caused an assertion because we were computing smaller type
sizes for instructions that cannot be demoted. The fix first determines the
instructions that will be demoted, and then applies the smaller type size to
only those instructions.

This should fix PR26239 and PR26307.

llvm-svn: 258929
2016-01-27 13:43:27 +00:00
Benjamin Kramer 73ae2495e5 Remove superfluous call to std::to_string that's breaking the cygwin build.
llvm-svn: 258928
2016-01-27 13:22:39 +00:00
Benjamin Kramer d477e9e378 Revert "Allow X86::COND_NE_OR_P and X86::COND_NP_OR_E to be reversed."
and "Add a missing test case for r258847."

This reverts commit r258847, r258848. Causes miscompilations and backend
errors.

llvm-svn: 258927
2016-01-27 12:44:12 +00:00
Alexander Kornienko 1b290adc43 [clang-tidy] Fix documentation.
Fixed broken links to cppcoreguidelines (anchors specified in the .md file
should be used, not automatic anchors generated by github).

Fixed formatting, array_view -> span, fixed sphinx errors in
misc-definitions-in-headers.rst.

llvm-svn: 258926
2016-01-27 11:37:19 +00:00
Alexander Kornienko e267dafc13 [clang-tidy] Use relative URL for redirection.
llvm-svn: 258925
2016-01-27 11:37:12 +00:00
Alexander Kornienko ad166f5dcc Add clang-tools-extra documentation to the CMake build.
llvm-svn: 258924
2016-01-27 11:37:08 +00:00