Commit Graph

218399 Commits

Author SHA1 Message Date
Rafael Espindola 30941d264b Delete APIs that have been deprecated since 2010.
llvm-svn: 256107
2015-12-19 21:42:07 +00:00
Paul Robinson 5f2a8c18ff The PS4 baton passes.
llvm-svn: 256106
2015-12-19 20:04:03 +00:00
Rafael Espindola e01e363fd9 Assert that we have all use/users in the getters.
An error that is pretty easy to make is to use the lazy bitcode reader
and then do something like

if (V.use_empty())

The problem is that uses in unmaterialized functions are not accounted
for.

This patch adds asserts that all uses are known.

llvm-svn: 256105
2015-12-19 20:03:23 +00:00
Paul Robinson 0334a047df Driver part of debugger tuning.
Adds driver options named -glldb and -gsce to mean -g plus tuning for
lldb and SCE debuggers respectively; the existing -ggdb option does
the same for gdb. Existing options -ggdb0, -ggdb1 etc. unpack into
-ggdb -g<N>.  (There will not be -glldb<N> or -gsce<N> options.) The
tuning gets a target-specific default in the driver, and is passed
into cc1 with the new -debugger-tuning option.

As fallout, fixes where '-gsplit-dwarf -g0' would ignore the -g0 part
on Linux.

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

llvm-svn: 256104
2015-12-19 19:41:48 +00:00
Xinliang David Li f48a1f54dd [PGO] Fix build failure with MSVC
llvm-svn: 256103
2015-12-19 19:16:32 +00:00
JF Bastien 374ea4bda5 WebAssembly: add vtable test
The test will mainly be useful to check that the .s file assembles and relocates properly because vtables reference functions in their data section.

llvm-svn: 256102
2015-12-19 18:55:18 +00:00
Manuel Jacob 5b90b147d4 Remove unnecessary casts. NFC.
llvm-svn: 256101
2015-12-19 18:38:42 +00:00
Manuel Jacob f4b3577d66 Remove double blanks. NFC.
llvm-svn: 256100
2015-12-19 18:26:53 +00:00
Xinliang David Li c96d3d10f4 Improve InstrProfSymtab test coverage
llvm-svn: 256099
2015-12-19 18:20:09 +00:00
Matt Arsenault d206d6cc54 SelectionDAG: Cleanup integer bin op promotion functions.
SDIV and UDIV had special handling, but this is the same handling
that min/max need.

llvm-svn: 256098
2015-12-19 17:18:43 +00:00
Vedant Kumar 3791e3d742 [unittests] ThreadPool: Remove redundant loop, NFC
llvm-svn: 256097
2015-12-19 09:54:27 +00:00
Vedant Kumar 2cf75338f8 [unittests] ThreadPool: Guard updates to MainThreadReady
llvm-svn: 256096
2015-12-19 09:49:09 +00:00
Vedant Kumar 3a63fb316c Re-reapply "[IR] Move optional data in llvm::Function into a hungoff uselist"
Make personality functions, prefix data, and prologue data hungoff
operands of Function.

This is based on the email thread "[RFC] Clean up the way we store
optional Function data" on llvm-dev.

Thanks to sanjoyd, majnemer, rnk, loladiro, and dexonsmith for feedback!

Includes a fix to scrub value subclass data in dropAllReferences. Does not
use binary literals.

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

llvm-svn: 256095
2015-12-19 08:52:49 +00:00
Vedant Kumar 44dd9871e8 Revert "Reapply "[IR] Move optional data in llvm::Function into a hungoff uselist""
This reverts commit r256093.

This broke lld-x86_64-win7 because of -Werror,-Wc++1y-extensions.

llvm-svn: 256094
2015-12-19 08:48:43 +00:00
Vedant Kumar d481752e68 Reapply "[IR] Move optional data in llvm::Function into a hungoff uselist"
Make personality functions, prefix data, and prologue data hungoff
operands of Function.

This is based on the email thread "[RFC] Clean up the way we store
optional Function data" on llvm-dev.

Thanks to sanjoyd, majnemer, rnk, loladiro, and dexonsmith for feedback!

Includes a fix to scrub value subclass data in dropAllReferences.

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

llvm-svn: 256093
2015-12-19 08:29:51 +00:00
Xinliang David Li 2ee5c4db1b [PGO] Add hash to name mapping in InstrProfSymtab
Creator and lookup interfaces are added to this symtab class.
The new interfaces will be used by InstrProf Readers and writer.

A unit test is also added for the new APIs.

llvm-svn: 256092
2015-12-19 07:44:57 +00:00
Vedant Kumar e069c4b6d1 Revert "[IR] Move optional data in llvm::Function into a hungoff uselist"
This reverts commit r256090.

This broke llvm-clang-lld-x86_64-debian-fast.

llvm-svn: 256091
2015-12-19 07:30:44 +00:00
Vedant Kumar be7525d4fa [IR] Move optional data in llvm::Function into a hungoff uselist
Make personality functions, prefix data, and prologue data hungoff
operands of Function.

This is based on the email thread "[RFC] Clean up the way we store
optional Function data" on llvm-dev.

Thanks to sanjoyd, majnemer, rnk, loladiro, and dexonsmith for feedback!

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

llvm-svn: 256090
2015-12-19 07:08:56 +00:00
Simon Atanasyan 034c4cd58a [ELF] Allow target to configure ELF header flags in the output file
The patch configure ELF header flags for MIPS target. For now the flags
are hard coded. In fact they depends on ELF flags of input object files
and selected emulation.

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

llvm-svn: 256089
2015-12-19 05:51:49 +00:00
Chris Bieneman b657449399 Revert "[CMake] Support a simple case for bootstrap builds to generate PGO data"
This reverts commit r256069, which was an unintentional tag along on
another commit.

llvm-svn: 256088
2015-12-19 05:47:50 +00:00
Mehdi Amini 0129fca17f ThreadPool unittest: reimplement concurrency test, deterministically this time.
Follow-up to r256056.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 256087
2015-12-19 05:12:07 +00:00
Kostya Serebryany 550e9c80a6 [libFuzzer] deprecate -save_minimized_corpus, -merge can be used instead
llvm-svn: 256086
2015-12-19 03:42:16 +00:00
Kostya Serebryany bf65644c97 [libFuzzer] split the tests to run them in parallel, remove one redundant test
llvm-svn: 256085
2015-12-19 03:35:30 +00:00
Keno Fischer f7346e0a6c Hopefully fix debug-info-blocks.ll test on win32 bot
llc_dwarf adds an mtriple, which forces this to use COFF, causing
the test to fail. Hopefully using regular llc without the triple
will work fine everywhere

llvm-svn: 256084
2015-12-19 03:32:23 +00:00
Richard Smith ac9f5a9c14 Test for diagnostic quality improvement in r256049.
llvm-svn: 256083
2015-12-19 03:12:14 +00:00
Tom Stellard ffc1a5aef7 AMDGPU/SI: Fix implemenation of isSourceOfDivergence() for graphics shaders
Summary:
The analysis of shader inputs was completely wrong.  We were passing the
wrong index to AttributeSet::hasAttribute() and the logic for which
inputs where in SGPRs was wrong too.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

llvm-svn: 256082
2015-12-19 02:54:15 +00:00
Kostya Serebryany 27ab2d759f [libFuzzer] make CrossOver just one of the other mutations
llvm-svn: 256081
2015-12-19 02:49:09 +00:00
Richard Smith d63db6ef1f Fix crash-on-invalid if a :: is followed by two or more open parentheses (and then something else).
llvm-svn: 256080
2015-12-19 02:40:19 +00:00
Philip Reames 5d54689bca [RS4GC] Remove an overly strong assertion
As shown by the included test case, it's reasonable to end up with constant references during base pointer calculation.  The code actually handled this case just fine, we only had the assert to help isolate problems under the belief that constant references shouldn't be present in IR generated by managed frontends. This turned out to be wrong on two fronts: 1) Manual Jacobs is working on a language with constant references, and b) we found a case where the optimizer does create them in practice.

llvm-svn: 256079
2015-12-19 02:38:22 +00:00
Paul Robinson 45784a79fc Recommit CC1 part of debugger tuning; pass through setting from driver to LLVM.
Reapplies r256063, except instead of frugally re-using an LLVM enum,
we define a Clang enum, to avoid exposing too much LLVM interface.

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

llvm-svn: 256078
2015-12-19 02:24:10 +00:00
Keno Fischer 00cbf9a69a Clean up the processing of dbg.value in various places
Summary:
First up is instcombine, where in the dbg.declare -> dbg.value conversion,
the llvm.dbg.value needs to be called on the actual loaded value, rather
than the address (since the whole point of this transformation is to be
able to get rid of the alloca). Further, now that that's cleaned up, we
can remove a hack in the backend, that would add an implicit OP_deref if
the argument to dbg.value was an alloca. This stems from before the
existence of DIExpression and is no longer necessary since the deref can
be expressed explicitly.

Now, in order to make sure that the tests pass with this change, we need to
correct the printing of DEBUG_VALUE comments to take into account the
expression, which wasn't taken into account before.

Unfortunately, for both these changes, there were a number of incorrect
test cases (mostly the wrong number of DW_OP_derefs, but also a couple
where the test itself was broken more badly). aprantl and I have gone
through and adjusted these test case in order to make them pass with
these fixes and in some cases to make sure they're actually testing
what they are meant to test.

Reviewers: aprantl

Subscribers: dsanders

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

llvm-svn: 256077
2015-12-19 02:02:44 +00:00
Eric Christopher 75bea4d42b Use a command line alias to remove the need to rewrite a subtarget
feature for command line compatibility.

llvm-svn: 256076
2015-12-19 01:48:43 +00:00
Matt Arsenault 2aed6ca1d3 AMDGPU: Switch barrier intrinsics to using convergent
noduplicate prevents unrolling of small loops that happen to have
barriers in them. If a loop has a barrier in it, it is OK to duplicate
it for the unroll.

llvm-svn: 256075
2015-12-19 01:46:41 +00:00
Matt Arsenault 10a509292c Fix broken type legalization of min/max
This was using an anyext when promoting the type
when zext/sext is required.

llvm-svn: 256074
2015-12-19 01:39:48 +00:00
Nicolai Haehnle 6bcf8b2890 AMDGPU/SI: use S_MOV_B64 for larger copies in copyPhysReg
Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, llvm-commits

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

llvm-svn: 256073
2015-12-19 01:36:26 +00:00
Nicolai Haehnle dd58705af6 AMDGPU: fix overlapping copies in copyPhysReg
Summary:
When copying aggregate registers within the same register class, there may
be an overlap between source and destination that forces us to do the copy
backwards.

Do the simplest possible thing that guarantees the correct order of moves
when there are overlaps, and does whatever when there is no overlap. (The
last part forces some trivial adjustments to test cases.)

Together with r255906, this fixes a VM fault in Unreal Elemental Demo.

While at it, change the generation of kill and def flags to something that
looks more reasonable. This method is used very late during compilation, so
it probably doesn't matter in practice, and to be honest, I don't know if
this change is actually correct because the semantics in connection with
aggregate registers vs. sub-registers are not clear to me.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93264

Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, llvm-commits

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

llvm-svn: 256072
2015-12-19 01:16:06 +00:00
Kostya Serebryany 14c50288cc [libFuzzer] print successfull mutations sequences
llvm-svn: 256071
2015-12-19 01:09:49 +00:00
Chris Bieneman 2281622685 [CMake] Fixing a typo in a flag
Turns out cc1's flag has 1 - not 2...

llvm-svn: 256070
2015-12-19 00:56:12 +00:00
Chris Bieneman a948007062 [CMake] Support a simple case for bootstrap builds to generate PGO data
Summary:
This patch adds support for the clang multi-stage bootstrapping to support PGO profdata generation, and can build a 2 or 3 stage compiler.

With this patch applied you can configure your build directory with the following invocation of CMake:

cmake -G <generator> -C <path_to_clang>/cmake/caches/PGO.cmake <source dir>

After configuration the following additional targets will be generated:

stage2-instrumented:
Builds a stage1 x86 compiler, runtime, and required tools (llvm-config, llvm-profdata) then uses that compiler to build an instrumented stage2 compiler.

stage2-instrumented-generate-profdata:
Depends on "stage2-instrumented" and will use the instrumented compiler to generate profdata based on the training files in <clang>/utils/perf-training

stage2:
Depends on "stage2-instrumented-generate-profdata" and will use the stage1 compiler with the stage2 profdata to build a PGO-optimized compiler.

stage2-check-llvm:
Depends on stage2 and runs check-llvm using the stage3 compiler.

stage2-check-clang:
Depends on stage2 and runs check-clang using the stage3 compiler.

stage2-check-all:
Depends on stage2 and runs check-all using the stage3 compiler.

stage2-test-suite:
Depends on stage2 and runs the test-suite using the stage3 compiler (requires in-tree test-suite).

Reviewers: bogner, silvas, chandlerc

Subscribers: cfe-commits

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

llvm-svn: 256069
2015-12-19 00:56:10 +00:00
James Y Knight b6e220a9b0 Possibly fix MSVC compilation after r256054.
I don't have any way to test MSVC compilation, but maybe this will fix
the error:

llvm/Support/TrailingObjects.h(286) : error C3210: 'TrailingObjectsBase' : access declaration can only be applied to a base class member
llvm/Support/TrailingObjects.h(337) : see reference to class template instantiation 'llvm::TrailingObjects<BaseTy,TrailingTys...>' being compiled
llvm/Support/TrailingObjects.h(286) : error C2602: 'llvm::trailing_objects_internal::TrailingObjectsBase::OverloadToken' is not a member of a base class of 'llvm::TrailingObjects<BaseTy,TrailingTys...>'
llvm/Support/TrailingObjects.h(91) : see declaration of 'llvm::trailing_objects_internal::TrailingObjectsBase::OverloadToken'

llvm-svn: 256068
2015-12-19 00:53:22 +00:00
Siva Chandra ea35dbeff2 [TestCPPAuto] On linux, we need -fno-limit-debug-info.
Summary: Also xfailed for GCC as there is an problem with debug info generation.

Reviewers: granata.enrico

Subscribers: lldb-commits

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

llvm-svn: 256067
2015-12-19 00:52:29 +00:00
Paul Robinson 7927150fea Revert r256063, it's killing clang-tools-extra
llvm-svn: 256066
2015-12-19 00:23:11 +00:00
Rafael Espindola 2339ffed97 Deprecate a few C APIs.
This deprecates:
* LLVMParseBitcode
* LLVMParseBitcodeInContext
* LLVMGetBitcodeModuleInContext
* LLVMGetBitcodeModule

They are replaced with the functions with a 2 suffix which do not record
a diagnostic.

llvm-svn: 256065
2015-12-18 23:46:42 +00:00
Pete Cooper e6fa51c941 Regenerated test according to the example assembly at the top. NFC.
The assembly at the top of this file contained more relocations than
the YAML.  I regenerated it so that we'd have complete relocation testing.

Also added detailed explanations of the relocations in the file so that
future people don't have to try decode them when something goes wrong.

llvm-svn: 256064
2015-12-18 23:43:17 +00:00
Paul Robinson a3ff2e4e02 CC1 part of debugger tuning; pass through setting from driver to LLVM.
Differential Revision: http://reviews.llvm.org/D15650

llvm-svn: 256063
2015-12-18 23:41:11 +00:00
Todd Fiala bfc2dc7ab7 Xcode: remove --test-subdir test reduction from previous check-in
That was not meant to go in, as it was for testing my last change.

llvm-svn: 256062
2015-12-18 23:22:15 +00:00
Jonathan Peyton 4fee5f6416 Prevent monitor thread creation when KMP_BLOCKTIME="infinite"
When users sets envirable KMP_BLOCKTIME to "infinite" (the time one busy-waits
at barrieres, etc.), the monitor thread is not useful and can be ignored. This
change prevents the creation of the monitor thread when the users sets
KMP_BLOCKTIME to "infinite".

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

llvm-svn: 256061
2015-12-18 23:20:36 +00:00
Jonathan Peyton 6cb33c60bd Remove some extra spaces
llvm-svn: 256060
2015-12-18 23:15:35 +00:00
Todd Fiala a350a94646 Xcode build: pass in vt100 to the Python test runner.
Some of the Green Dragon tests were failing because they didn't
have a TERM set.

llvm-svn: 256059
2015-12-18 23:12:19 +00:00
Xinliang David Li 020f22d810 [PGO] Cleanup: Move large member functions out of line (NFC)
llvm-svn: 256058
2015-12-18 23:06:37 +00:00