Commit Graph

224217 Commits

Author SHA1 Message Date
Adrian Prantl fb2add2be1 Fix PR26585 by improving the promotion of DBG_VALUEs to DW_AT_locations.
When a variable is described by a single DBG_VALUE instruction we can
often use a more efficient inline DW_AT_location instead of using a
location list.

This commit makes the heuristic that decides when to apply this
optimization stricter by also verifying that the DBG_VALUE is live at the
entry of the function (instead of just checking that it is valid until
the end of the function).

<rdar://problem/24611008>

llvm-svn: 262247
2016-02-29 19:49:46 +00:00
Eugene Zelenko bbd16815b0 Fix Clang-tidy modernize-use-nullptr warnings in source/Plugins/Language; other minor fixes.
llvm-svn: 262246
2016-02-29 19:41:30 +00:00
Steven Wu f2fe0141ca Rename embedded bitcode section in MachO
Summary:
Rename the section embeds bitcode from ".llvmbc,.llvmbc" to "__LLVM,__bitcode".
The new name matches MachO section naming convention.

Reviewers: rafael, pcc

Subscribers: davide, llvm-commits, joker.eph

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

llvm-svn: 262245
2016-02-29 19:40:10 +00:00
Ahmed Bougacha bb5d7d7ed8 [X86] Move the ATOMIC_LOAD_OP ISel from DAGToDAG to ISelLowering. NFCI.
This is long-standing dirtiness, as acknowledged by r77582:

    The current trick is to select it into a merge_values with
    the first definition being an implicit_def. The proper solution is
    to add new ISD opcodes for the no-output variant.

Doing this before selection will let us combine away some constructs.

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

llvm-svn: 262244
2016-02-29 19:28:07 +00:00
Colin LeMahieu b9f1eae328 [Hexagon] Setting sign mismatch flag on expression instead of using bit tricks.
llvm-svn: 262243
2016-02-29 19:17:56 +00:00
Rong Xu 9e926e8b92 Minor code cleanup. NFC
llvm-svn: 262242
2016-02-29 19:16:04 +00:00
David Majnemer e60ee3b8ce [WinEH] Make setjmp work correctly with EH
32-bit X86 EH on Windows utilizes a stack of registration nodes
allocated and deallocated on entry/exit.  A registration node contains a
bunch of EH personality specific information like which try-state we are
currently in.

Because a setjmp target allows control flow from arbitrary program
points, there is no way to ensure that the try-state we are in is
correctly updated once we transfer control.

MSVC compatible compilers, like MSVC and ICC, utilize runtime helpers to
reinitialize the try-state when a longjmp occurs.  This is implemented
by adding additional arguments to _setjmp3: the desired try-state and
a helper routine to update the try-state.

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

llvm-svn: 262241
2016-02-29 19:16:03 +00:00
Dehao Chen 939993ff2f Move discriminator assignment to the right place.
Summary: Now discriminator is assigned per-function instead of per-module.

Reviewers: davidxl, dnovillo

Subscribers: dblaikie, llvm-commits

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

llvm-svn: 262240
2016-02-29 18:59:48 +00:00
Rong Xu 522b5cb375 [PGO] clang cc1 option change to enable IR level instrumentation
This patch expands cc1 option -fprofile-instrument= with a new value: -fprofile-instrument=llvm
which enables IR level PGO instrumentation.

Reviewers: davidxl, silvas

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

llvm-svn: 262239
2016-02-29 18:54:59 +00:00
Colin LeMahieu 73cd686ce1 [Hexagon] Using MustExtend flag on expression instead of passing around bools.
llvm-svn: 262238
2016-02-29 18:39:51 +00:00
Paul Robinson 2ce5cf0393 Fix LLD tests that used CHECK-NEXT-NOT. FileCheck does not support
combined suffixes.

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

llvm-svn: 262237
2016-02-29 18:05:21 +00:00
Adrian Prantl 693e8de0fa fix typo in comment
llvm-svn: 262236
2016-02-29 17:06:46 +00:00
Michael Kruse 0b56681d21 [ScopDetection] Fix use-after-free.
removeCachedResults deletes the DetectionContext from
DetectionContextMap such that any it cannot be used anymore.
Unfortunately invalid<ReportUnprofitable> and RejectLogs.insert still do
use it. Because the memory is part of a map and not returned to to the
OS immediatly, such that the observable effect was only a memory leak
due to reference counters not decreased when the second call to
removeCachedResults does not remove the DetectionContext because because
it already has been removed.

Fix by not removing the DetectionContext prematurely. The second call to
removeCachedResults will handle it anyway.

llvm-svn: 262235
2016-02-29 16:54:18 +00:00
Manuel Klimek 06d5af4c9d Revert "Implement new interfaces for code-formatting when applying replacements."
This reverts commit r262232.

llvm-svn: 262234
2016-02-29 16:44:16 +00:00
Nemanja Ivanovic 1a5706ca1b Fix for PR26180
Corresponds to Phabricator review:
http://reviews.llvm.org/D16592

This fix includes both an update to how we handle the "generic" CPU on LE
systems as well as Anton's fix for the Fast Isel issue.

llvm-svn: 262233
2016-02-29 16:42:27 +00:00
Manuel Klimek 4823631af4 Implement new interfaces for code-formatting when applying replacements.
Patch by Eric Liu.

llvm-svn: 262232
2016-02-29 16:27:41 +00:00
Daniel Sanders 03a8d2f8ec [mips] Range check uimm20 and fixed a bug this revealed.
Summary:
The bug was that dextu's operand 3 would print 0-31 instead of 32-63 when
printing assembly. This came up when replacing
MipsInstPrinter::printUnsignedImm() with a version that could handle arbitrary
bit widths.

MipsAsmPrinter::printUnsignedImm*() don't seem to be used so they have been
removed.

Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

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

llvm-svn: 262231
2016-02-29 16:06:38 +00:00
Vasileios Kalintiris 29620aca3e [mips] Do not use SLL for ANY_EXTEND nodes as the high bits are undefined.
Reviewers: dsanders

Subscribers: dsanders, llvm-commits

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

llvm-svn: 262230
2016-02-29 15:58:12 +00:00
Daniel Sanders 611eb82953 [mips] Make isel select the correct DEXT variant up front.
Summary:
Previously, it would always select DEXT and substitute any invalid matches
for DEXTU/DEXTM during MipsMCCodeEmitter::encodeInstruction(). This works
but causes problems when adding range checked immediates to IAS.

Now isel selects the correct variant up front.

Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

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

llvm-svn: 262229
2016-02-29 15:26:54 +00:00
Tom Stellard 2c7cdd25ee AMDGPU: Add missing Volcanic Islands targets
Reviewers: arsenm

Subscribers: cfe-commits

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

llvm-svn: 262228
2016-02-29 15:08:56 +00:00
Michael Kruse c0a19b079d Reapply "Add update_test.py script."
Originally committed in r261899 and reverted in r262202 due to failing
in out-of-LLVM tree builds.

Replace the use of LLVM_TOOLS_BINARY_DIR by LLVM_TOOLS_DIR which exists
in both, in-tree and out-of-tree builds.

Original commit message:
The script updates a lit test case that uses FileCheck using the actual
output of the 'RUN:'-lines program. Useful when updating test cases due
to expected output changes and diff'ing expected and actual output.

llvm-svn: 262227
2016-02-29 14:58:13 +00:00
Rafael Espindola 1b625535f0 lto: don't fetch members for weak undef.
llvm-svn: 262225
2016-02-29 14:29:48 +00:00
Pavel Labath 6a291dee2b Revert a part of "Add/Improve complex, vector, aggregate types handling for SysV ARM (hard/soft) ABI."
This partially reverts commit r262218.

The commit added additional checks to a test case. The test case is too big so it's not feasible
to XFAIL it completely. Suggest to implement the checks as a separate test case, which can then
be XFAILed more surgically.

llvm-svn: 262223
2016-02-29 14:26:45 +00:00
Rafael Espindola 8d6fbc3a4e IRObject: Mark extern_weak as weak.
llvm-svn: 262222
2016-02-29 14:26:06 +00:00
Rafael Espindola 9bcbfd7d42 Remove bogus assert.
llvm-svn: 262219
2016-02-29 13:46:39 +00:00
Omair Javaid ef77ace9ae Add/Improve complex, vector, aggregate types handling for SysV ARM (hard/soft) ABI.
For details see:

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

llvm-svn: 262218
2016-02-29 13:39:20 +00:00
Daniel Jasper 35ca66debf clang-format: Don't format unrelated nested blocks.
With this change:

  SomeFunction(
      [] {
	int i;
	 return i;  // Format this line.
      },
      [] {
	 return 2;  // Don't "fix" this.
      });

llvm-svn: 262216
2016-02-29 12:26:20 +00:00
Benjamin Kramer 6bb15021b3 [InstSimplify] Restore fsub 0.0, (fsub 0.0, X) ==> X optzn
I accidentally removed this in r262212 but there was no test coverage to
detect it.

llvm-svn: 262215
2016-02-29 12:18:25 +00:00
Pavel Labath 76d76bb006 Fix compiler warnings in the java code
llvm-svn: 262214
2016-02-29 11:44:15 +00:00
Daniel Sanders 90f0d0b8e3 [mips] Make symbols an acceptable branch target when expanding compare-to-immediate-and-branch macros.
Reviewers: vkalintiris

Subscribers: llvm-commits, vkalintiris, dim, seanbruno, dsanders

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

llvm-svn: 262213
2016-02-29 11:24:49 +00:00
Benjamin Kramer f5b2a47ac6 [InstSimplify] fsub 0.0, (fsub -0.0, X) ==> X is only safe if signed zeros are ignored.
Only allow fsub -0.0, (fsub -0.0, X) ==> X without nsz. PR26746.

llvm-svn: 262212
2016-02-29 11:12:23 +00:00
Daniel Sanders 27ba83fd45 [test-release.sh] Add lldb to list of projects (disabled by default)
Reviewers: hans

Subscribers: llvm-commits

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

llvm-svn: 262211
2016-02-29 11:04:39 +00:00
Maxim Ostapenko d0257b7bf1 [asan] Fix UB in test/asan/TestCases/Linux/recvfrom.cc testcase.
llvm-svn: 262210
2016-02-29 08:56:26 +00:00
Mohit K. Bhakkad 2d14d3b529 Update the link of issue
llvm-svn: 262209
2016-02-29 08:22:55 +00:00
Argyrios Kyrtzidis 113387e08e [index] Print and test module import references.
llvm-svn: 262208
2016-02-29 07:56:07 +00:00
Argyrios Kyrtzidis a8b51c1e20 [index] Add a caller relation for a call reference.
llvm-svn: 262207
2016-02-29 07:56:00 +00:00
Argyrios Kyrtzidis c97c7c88c0 [AST/RecursiveASTVisitor] Correction so that dataTraverseStmtPost will get called after the statement has been visited.
Fixes the indexing client of this.

llvm-svn: 262206
2016-02-29 07:55:55 +00:00
Argyrios Kyrtzidis d97ec18fe4 [index] Use ',' to separate symbol roles when printing.
llvm-svn: 262205
2016-02-29 07:55:51 +00:00
Maxim Ostapenko 8d8f919cf5 [asan] Re-enable test/asan/TestCases/Linux/recvfrom.cc testcase.
This testcase failed on sanitizer-x86_64-linux buildbot in large parallel build due to race on
port 1234 between AddressSanitizer-i386-linux and AddressSanitizer-x86_64-linux instances of recvfrom.cc.
This patch tries to resolve the issue by relying on kernel to choose available port instead of hardcoding
its number in testcase.

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

llvm-svn: 262204
2016-02-29 07:47:35 +00:00
Tobias Grosser 0865e775bf ScopInfo: Remove indentation in hoistInvariantLoads
We move verifyInvariantLoads out of this function to allow for an early return
without the need for code duplication. A similar transformation was suggested
by Johannes Doerfert in post commit review of r262033.

llvm-svn: 262203
2016-02-29 07:29:42 +00:00
Tobias Grosser a4835c5673 Revert "Add update_test.py script."
This reverts commit r261899. Even though I am not yet 100% certain, this is
commit is the only one that has some relation to the recent cmake failures
in Polly.

llvm-svn: 262202
2016-02-29 07:12:10 +00:00
Craig Topper b4f83a00a9 [X86] Disabling avx512f should also disable avx512vbmi and avx512ifma. Enabling avx512vbmi or avx512ifma should enable avx512f. Add command line switches and header defines for avx512ifma and avx512vbmi.
llvm-svn: 262201
2016-02-29 06:51:38 +00:00
Craig Topper 840927e074 [X86] Enabling xsave should not enable AVX. I seem to have done this, but I don't know why.
llvm-svn: 262200
2016-02-29 06:51:34 +00:00
Alexey Bataev 60da77e438 [OPENMP 4.5] Initial support for data members in 'reduction' clauses.
OpenMP 4.5 allows to privatize non-static data members of current class
in non-static member functions. Patch adds initial parsing/semantic
analysis for data members support in 'reduction' clauses.

llvm-svn: 262199
2016-02-29 05:54:20 +00:00
David Majnemer cd5855e354 [clang-cl] /EHc should not effect functions with explicit exception specifications
Functions with an explicit exception specification have their behavior
dictated by the specification.  The additional /EHc behavior only comes
into play if no exception specification is given.

llvm-svn: 262198
2016-02-29 01:40:36 +00:00
David Majnemer 387fccd8da [clang-cl] /EHc should not have an effect on /EHa
This matches behavior with MSVC.

llvm-svn: 262197
2016-02-29 01:40:30 +00:00
Chandler Carruth 8b5a7419b8 [PM] Wire up optimization levels and default pipeline construction APIs
in the PassBuilder.

These are really just stubs for now, but they give a nice API surface
that Clang or other tools can start learning about and enabling for
experimentation.

I've also wired up parsing various synthetic module pass names to
generate these set pipelines. This allows the pipelines to be combined
with other passes and have their order controlled, with clear separation
between the *kind* of canned pipeline, and the *level* of optimization
to be used within that canned pipeline.

The most interesting part of this patch is almost certainly the spec for
the different optimization levels. I don't think we can ever have hard
and fast rules that would make it easy to determine whether a particular
optimization makes sense at a particular level -- it will always be in
large part a judgement call. But hopefully this will outline the
expected rationale that should be used, and the direction that the
pipelines should be taken. Much of this was based on a long llvm-dev
discussion I started years ago to try and crystalize the intent behind
these pipelines, and now, at long long last I'm returning to the task of
actually writing it down somewhere that we can cite and try to be
consistent with.

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

llvm-svn: 262196
2016-02-28 22:16:03 +00:00
Rui Ueyama be5e0b07ca Remove dead code for ELF.
llvm-svn: 262195
2016-02-28 21:59:02 +00:00
Rui Ueyama 8cca07eacf Remove dead code for ELF.
The preload feature was buggy that we had disabled it even for ELF.

llvm-svn: 262194
2016-02-28 21:22:44 +00:00
Rui Ueyama 701c3250e5 Remove remaining code for COFF.
llvm-svn: 262193
2016-02-28 21:22:40 +00:00