Commit Graph

194663 Commits

Author SHA1 Message Date
Adrian Prantl beb52cfea0 Add a missing target requirement.
llvm-svn: 230430
2015-02-25 01:52:10 +00:00
Adrian Prantl 38beb0abc5 Add a missing target requirement.
llvm-svn: 230429
2015-02-25 01:52:05 +00:00
Richard Smith c4c34e2722 Remove slow and apparently pointless updating of all identifiers at the start
of writing out an AST file.

llvm-svn: 230428
2015-02-25 01:45:32 +00:00
Richard Smith 8b2165a945 [modules] Add include/llvm/IR/DebugInfoFlags.def to the textual headers list.
llvm-svn: 230427
2015-02-25 01:44:09 +00:00
Nico Weber dd25674a40 Fold ParseSEHTryBlockCommon() into its only caller. No behavior change.
ParseCXXTryBlockCommon() makes sense because it has two callers due to
function try blocks.  There are no SEH function try blocks.

llvm-svn: 230426
2015-02-25 01:43:27 +00:00
Kostya Serebryany a54860e058 [asan] attempting to fix the windows build
llvm-svn: 230425
2015-02-25 01:41:42 +00:00
Adrian Prantl e95edbf5a9 Adapt clang-tools-extra to clang module format changes.
- add clangCodeGen.a to the tools that need it
- tweak pp-trace command line handling to not conflict with clang's.

llvm-svn: 230424
2015-02-25 01:32:04 +00:00
Adrian Prantl 8bf7af3de8 Wrap clang module files in a Mach-O, ELF, or COFF container.
This is a necessary prerequisite for debugging with modules.
The .pcm files become containers that hold the serialized AST which allows
us to store debug information in the module file that can be shared by all
object files that were built importing the module.

This reapplies r230044 with a fixed configure+make build and updated
dependencies and testcase requirements. Over the last iteration this
version adds
- missing target requirements for testcases that specify an x86 triple,
- a missing clangCodeGen.a dependency to libClang.a in the make build.

rdar://problem/19104245

llvm-svn: 230423
2015-02-25 01:31:45 +00:00
Michael J. Spencer b6396eaef9 Suppress 'warning C4062: enumerator X in switch of enum Y is not handled' from system header.
llvm-svn: 230422
2015-02-25 01:30:13 +00:00
Hal Finkel 6b6e9e2b5c [PowerPC] Add triples to QPX tests
Some of these tests fail on Darwin systems because of a lack of a triple;
fix that.

llvm-svn: 230421
2015-02-25 01:26:59 +00:00
Philip Reames c88d732822 [GC] Document the recently added PlaceSafepoints and RewriteGCForStatepoints passes
llvm-svn: 230420
2015-02-25 01:23:59 +00:00
Kostya Serebryany 74dc7ea2e9 [asan] add __asan_default_suppressions() hook
llvm-svn: 230419
2015-02-25 01:15:37 +00:00
Oleksiy Vyalov 946e39a8d1 Fix logging in GDBRemoteCommunicationServerPlatform.
llvm-svn: 230418
2015-02-25 01:11:38 +00:00
Richard Smith c89bb9dd51 Make RedeclarableResult's ownership-transferring constructor be a move
constructor.

llvm-svn: 230417
2015-02-25 01:11:29 +00:00
Duncan P. N. Exon Smith a6b8895442 llvm-dis: Stop crashing when dropping debug info
Since r199356, we've printed a warning when dropping debug info.
r225562 started crashing on that, since it registered a diagnostic
handler that only expected errors.  This fixes the handler to expect
other severities.  As a side effect, it now prints "error: " at the
start of error messages, similar to `llvm-as`.

There was a testcase for r199356, but it only really checked the
assembler.  Move `test/Bitcode/drop-debug-info.ll` to `test/Assembler`,
and introduce `test/Bitcode/drop-debug-info.3.5.ll` (and companion
`.bc`) to test the bitcode reader.

Note: tools/gold/gold-plugin.cpp has an equivalent bug, but I'm not sure
what the best fix is there.  I'll file a PR.

llvm-svn: 230416
2015-02-25 01:10:03 +00:00
David Blaikie b5b5efd2d1 [opaque pointer type] Bitcode support for explicit type parameter on GEP.
Like r230414, add bitcode support including backwards compatibility, for
an explicit type parameter to GEP.

At the suggestion of Duncan I tried coalescing the two older bitcodes into a
single new bitcode, though I did hit a wrinkle: I couldn't figure out how to
create an explicit abbreviation for a record with a variable number of
arguments (the indicies to the gep). This means the discriminator between
inbounds and non-inbounds gep is a full variable-length field I believe? Is my
understanding correct? Is there a way to create such an abbreviation? Should I
just use two bitcodes as before?

Reviewers: dexonsmith

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

llvm-svn: 230415
2015-02-25 01:08:52 +00:00
David Blaikie 8503565eec [opaque pointer type] bitcode support for explicit type parameter to the load instruction
Summary:
I've taken my best guess at this, but I've cargo culted in places & so
explanations/corrections would be great.

This seems to pass all the tests (check-all, covering clang and llvm) so I
believe that pretty well exercises both the backwards compatibility and common
(same version) compatibility given the number of checked in bitcode files we
already have. Is that a reasonable approach to testing here? Would some more
explicit tests be desired?

1) is this the right way to do back-compat in this case (looking at the number
  of entries in the bitcode record to disambiguate between the old schema and
  the new?)

2) I don't quite understand the logarithm logic to choose the encoding type of
  the type parameter in the abbreviation description, but I found another
  instruction doing the same thing & it seems to work. Is that the right
  approach?

Reviewers: dexonsmith

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

llvm-svn: 230414
2015-02-25 01:07:20 +00:00
Hal Finkel c93a9a2cb4 [PowerPC] Add support for the QPX vector instruction set
This adds support for the QPX vector instruction set, which is used by the
enhanced A2 cores on the IBM BG/Q supercomputers. QPX vectors are 256 bytes
wide, holding 4 double-precision floating-point values. Boolean values, modeled
here as <4 x i1> are actually also represented as floating-point values
(essentially  { -1, 1 } for { false, true }). QPX shares many features with
Altivec and VSX, but is distinct from both of them. One major difference is
that, instead of adding completely-separate vector registers, QPX vector
registers are extensions of the scalar floating-point registers (lane 0 is the
corresponding scalar floating-point value). The operations supported on QPX
vectors mirrors that supported on the scalar floating-point values (with some
additional ones for permutations and logical/comparison operations).

I've been maintaining this support out-of-tree, as part of the bgclang project,
for several years. This is not the entire bgclang patch set, but is most of the
subset that can be cleanly integrated into LLVM proper at this time. Adding
this to the LLVM backend is part of my efforts to rebase bgclang to the current
LLVM trunk, but is independently useful (especially for codes that use LLVM as
a JIT in library form).

The assembler/disassembler test coverage is complete. The CodeGen test coverage
is not, but I've included some tests, and more will be added as follow-up work.

llvm-svn: 230413
2015-02-25 01:06:45 +00:00
Richard Smith 5638c1146e [modules] Fix a bug that would result in a build with P paths through a module
graph with M modules to take O(P) time, not just O(M) time, when using explicit
module builds.

llvm-svn: 230412
2015-02-25 00:56:02 +00:00
Rafael Espindola 8bc9ccc60a Support SHF_MERGE sections in COMDATs.
This patch unifies the comdat and non-comdat code paths. By doing this
it add missing features to the comdat side and removes the fixed
section assumptions from the non-comdat side.

In ELF there is no one true section for "4 byte mergeable" constants.
We are better off computing the required properties of the section
and asking the context for it.

llvm-svn: 230411
2015-02-25 00:52:15 +00:00
David Blaikie 7b0281089e BitcodeWriter: Refactor common computation of bits required for a type index.
Suggested by Duncan. Happy to bikeshed the name, cache the result, etc.

llvm-svn: 230410
2015-02-25 00:51:52 +00:00
Kostya Serebryany efa60dfd34 [asan] add suppressions for odr violations
llvm-svn: 230409
2015-02-25 00:49:12 +00:00
Greg Clayton 7d1069d09e If you try to auto-complete "target symbols<TAB>" you get "target symbolsadd" instead of "target symbols ".
Fix this by returning the fact that the "symbols" word is complete if there is nothing else to complete after the "symbols" word.

<rdar://problem/19164599>

llvm-svn: 230408
2015-02-25 00:32:43 +00:00
Philip Reames c609a5927c Fix consistently wrong sphinx markup
I'd been using '' where I should have been using ``.

llvm-svn: 230407
2015-02-25 00:22:07 +00:00
NAKAMURA Takumi e976aab1df Revert r230314, "Fix codegen for virtual methods that are (re-) exported from multiple modules."
It crashes for targeting (i686|x86_64)-win32.

  clang: clang/lib/AST/VTableBuilder.cpp:142: {anonymous}::FinalOverriders::OverriderInfo {anonymous}::FinalOverriders::getOverrider(const clang::CXXMethodDecl*, clang::CharUnits) const: Assertion `OverridersMap.count(std::make_pair(MD, BaseOffset)) && "Did not find overrider!"' failed.

llvm-svn: 230406
2015-02-25 00:18:22 +00:00
Philip Reames e0dd0f23b8 Update the GC docs to explicitly mention both gcroot and gc.statepoint
Also, fix confusing bit of the gcroot documentation that bit me personally.

llvm-svn: 230405
2015-02-25 00:18:04 +00:00
Eric Christopher 0aec6ab354 Make this test even more OS and register allocation neutral.
llvm-svn: 230404
2015-02-25 00:12:11 +00:00
Philip Reames c01272807b [GC] Sync documentation with code naming
Fixing an issue pointed out by Sean Silva.  Thanks!

llvm-svn: 230403
2015-02-24 23:57:26 +00:00
Philip Reames 50e9aed9e3 More GC documentation cleanup
llvm-svn: 230402
2015-02-24 23:51:37 +00:00
Greg Clayton 688a3005cf Fixed Xcode project after recent changes:
"After recent changes, some code has become redundant. This revision tries to remove
the un-used code and tidy up the rest.

Following 4 files have been removed. I have updated CMake files and checked that it builds
fine on Linux and Windows. Can somebody update the xcode related file accordingly?

tools/lldb-mi/MICmnStreamStdinLinux.cpp
tools/lldb-mi/MICmnStreamStdinLinux.h
tools/lldb-mi/MICmnStreamStdinWindows.cpp
tools/lldb-mi/MICmnStreamStdinWindows.h"

llvm-svn: 230401
2015-02-24 23:50:21 +00:00
Eric Christopher e4c02c6450 Make this test not dependent upon the triple. All that was needed
was some flexibility in the check line for the comment basic block.

llvm-svn: 230400
2015-02-24 23:43:26 +00:00
Zachary Turner d64412beb8 [CMake] Clean up lldb-mi CMakeLists.txt.
It was maintaining two huge file lists that are identical except
for 1 file.  Make this work the proper way.

llvm-svn: 230398
2015-02-24 23:36:12 +00:00
Philip Reames 3826319e13 More GC doc cleanup
Mostly minor wording changes for readability.  Nothing major to see here.

llvm-svn: 230397
2015-02-24 23:34:24 +00:00
Zachary Turner b7e415813d [CMake] Set policy CMP0051 to OLD globally.
When you use generator expressions in a library sources list,
and then later access the SOURCES property, the OLD behavior
(CMake 3.0 and earlier) would not include these expressions in
the SOURCES property.  The NEW behavior (starting in CMake 3.1)
is that they do include the generator expressions in the SOURCES
property.

Differential Revision: http://reviews.llvm.org/D7870
Reviewed By: Chris Bieneman

llvm-svn: 230396
2015-02-24 23:32:47 +00:00
Jacques Pienaar 411b251cea clang-format: Change location of stashed token
Commit of patch in http://reviews.llvm.org/D7871

llvm-svn: 230395
2015-02-24 23:23:24 +00:00
Peter Collingbourne 1baeaa395a LowerBitSets: Introduce global layout builder.
The builder is based on a layout algorithm that tries to keep members of
small bit sets together. The new layout compresses Chromium's bit sets to
around 15% of their original size.

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

llvm-svn: 230394
2015-02-24 23:17:02 +00:00
Philip Reames 03f38362aa Improve the getting started instructions in the GC docs
This is still gcroot vs gc.statepoint agnostic.  I'm just trying to clarify the general documentation at this point.

llvm-svn: 230393
2015-02-24 23:12:27 +00:00
David Majnemer 841e0d60ed PrologEpilogInserter: Clean up math in calculateFrameObjectOffsets
There is no need to open-code the alignment calculation, we have a
handy RoundUpToAlignment function which "Does The Right Thing (TM)".

llvm-svn: 230392
2015-02-24 23:08:13 +00:00
Sanjay Patel cee38616c8 remove function names from comments; NFC
llvm-svn: 230391
2015-02-24 22:43:06 +00:00
Oleksiy Vyalov c282ebd724 Fix qLaunchGDBServer packet parsing in GDBRemoteCommunicationServerPlatform.
llvm-svn: 230390
2015-02-24 22:23:39 +00:00
Zachary Turner 030b8cb413 Resubmit "[CMake] Change lldbAPI to be a CMake OBJECT library."
This resubmits r230380.  The primary cause of the failure was
actually just a warning, which we can disable at the CMake level
in a followup patch on the LLVM side.  The other thing which was
actually an error on the bot should be able to be fixed with
a clean.

llvm-svn: 230389
2015-02-24 22:17:57 +00:00
Simon Pilgrim d8820ae70c Reapplied D7816 & rL230177 & rL230278 - with an additional fix toensure that the smallest build vector input scalar type is always used. Additional (crash) test cases already committed.
llvm-svn: 230388
2015-02-24 22:08:56 +00:00
Justin Bogner f07e34e9d8 InstrProf: Simplify a couple of tests after r230383
Most of the checks in these two tests were actually testing the
behaviour of the instrprof LLVM pass. Now that we're testing that
specifically in LLVM's test suite, it's better if we only test the
frontend's behaviour here.

llvm-svn: 230387
2015-02-24 21:49:28 +00:00
Simon Pilgrim b1468daf00 Added test case for PR22678 (check CONCAT_VECTORS DAG combiner pass doesn't introduce illegal types)
llvm-svn: 230386
2015-02-24 21:46:23 +00:00
Jacques Pienaar a50178c23e CUDA: Add option to allow host device functions to call host functions
Commiting code from review http://reviews.llvm.org/D7841

llvm-svn: 230385
2015-02-24 21:45:33 +00:00
Richard Smith 7c9442a6ae PR22673 again: diagnose use of the used decl, not the found decl. This is also
wrong (DiagnoseUseOfDecl should take both), but it's more consistent with what
we do in other places.

llvm-svn: 230384
2015-02-24 21:44:43 +00:00
Justin Bogner 2ce48056a4 InstrProf: Test for appropriate linkage of the profiling structures
This test checks that the symbols instrprof creates have appropriate
linkage. The tests already exist in clang in a slightly different form
from before we sunk profile generation into an LLVM pass, but that's
an awkward place for them now. I'll remove/simplify the clang versions
shortly.

llvm-svn: 230383
2015-02-24 21:42:42 +00:00
Zachary Turner 0980447a5f Revert "[CMake] Change lldbAPI to be a CMake OBJECT library."
This reverts commit r230380.  It causes CMake to fail on certain
machines with an error about needing to use string(STRIP_GENEX).

llvm-svn: 230382
2015-02-24 21:28:01 +00:00
Richard Smith d3f2d321d7 PR22673: Don't forget to check a constructor for deletedness when we use it to
implicitly construct a temporary in a reference binding.

llvm-svn: 230381
2015-02-24 21:16:19 +00:00
Zachary Turner f4f8740eb0 [CMake] Change lldbAPI to be a CMake OBJECT library.
An OBJECT library is a special type of CMake library that produces
no archive, has no link interface, and no link inputs.  It is like
a regular archive, just without the physical output.  To link
against an OBJECT library, you reference it in the *source* file
list of a library using the special syntax $<TARGET_OBJECTS:lldbAPI>.
This will cause every object file to be passed to the linker
independently, as opposed to a single archive being passed to the
linker.

This is *extremely* important on Windows.  lldbAPI exports all of the
SB classes using __declspec(dllexport).  Unfortunately for technical
reasons it is not possible (well, extremely difficult) to get the
linker to propagate a __declspec(dllexport) attribute from a symbol
in an object file in an archive to a DLL that links against that
archive.  The solution to this is for the DLL to link the object files
directly.  So lldbAPI must be an OBJECT library.

This fixes an issue that has been present since the duplicated
lldbAPI file lists were removed, which would cause linker failures.

As a side effect, this also makes LLDB_DISABLE_PYTHON=1 work again
on Windows, which was previously totally broken.

llvm-svn: 230380
2015-02-24 20:58:39 +00:00