Commit Graph

177789 Commits

Author SHA1 Message Date
Alp Toker dbb0c75977 Modernize a couple of loops
llvm-svn: 212394
2014-07-06 06:09:20 +00:00
Ehsan Akhgari d2c3ba6fbe Fix the MicrosoftExtensions.c target
llvm-svn: 212393
2014-07-06 05:58:55 +00:00
Ehsan Akhgari d1e8abb1fb Enable the InterlockedBitTestAndSet test
llvm-svn: 212392
2014-07-06 05:50:19 +00:00
Alp Toker 5f83864b7c Track changes from clang r212388
llvm-svn: 212391
2014-07-06 05:36:57 +00:00
Alp Toker 06164dd854 Track changes from clang r212387, r212388
llvm-svn: 212390
2014-07-06 05:29:14 +00:00
Ehsan Akhgari 0f89fac7a5 Add support for nested blocks in Microsoft inline assembly
This fixes http://llvm.org/PR20204.

llvm-svn: 212389
2014-07-06 05:26:54 +00:00
Alp Toker 80758084f7 Use non-intrusive refcounting for TargetOptions
llvm-svn: 212388
2014-07-06 05:26:44 +00:00
Alp Toker 269d840e40 Use non-intrusive refcounting for LangOptions
This type is only refcounted in a couple of places so making ownership explicit
improves clarity.

llvm-svn: 212387
2014-07-06 05:26:07 +00:00
Alp Toker 74437975c4 Constify a read-only parameter and give function a better name
This makes it clear that TargetInfo doesn't capture the LangOptions object,
rather uses it to apply adjustments.

llvm-svn: 212386
2014-07-06 05:14:24 +00:00
Alp Toker 069736222b writeARCDiagsToPlist(): make sure all diag levels get handled
Handle 'remark' level diagnostics as warnings instead of supplemental notes,
and use a covered switch to ensure the mapping is kept up to date.

llvm-svn: 212385
2014-07-06 04:27:03 +00:00
Alp Toker 525fdfc11e Use PlistSupport in a few more places
Switch over LogDiagnosticPrinter and introduce an integer helper.

llvm-svn: 212384
2014-07-06 04:26:52 +00:00
Nico Weber 2582895832 clang-cl: /showIncludes output should go to stdout, not stderr. Fixes PR20217.
llvm-svn: 212383
2014-07-06 03:04:24 +00:00
Alp Toker d7a0d64c14 Remove IntrusiveRefCntPtr::getPtr() function
It was deprecated in r212366 and all uses have been switched to get().

llvm-svn: 212382
2014-07-05 22:20:59 +00:00
Alp Toker 37da619d34 Remove leftovers of '-arcmt-modify-in-memory' from r133315
llvm-svn: 212381
2014-07-05 22:12:36 +00:00
Matt Arsenault 4261973548 Use cast<> instead of dyn_cast + assert
llvm-svn: 212380
2014-07-05 21:16:43 +00:00
Matt Arsenault 258c6e7cd9 Fix grammar
llvm-svn: 212379
2014-07-05 21:16:40 +00:00
Saleem Abdulrasool e700cab4e9 CodeGen: add support for a few MSVC ARM intrinsics
This adds support for simple MSVC compatibility mode intrinsics.  These
intrinsics are simple in that they are either directly passed through to the
annotated MSBuiltin intrinsic or they mirror existing GCC builtins.

llvm-svn: 212378
2014-07-05 20:10:05 +00:00
Saleem Abdulrasool 98fee4984c ARM: mark matching ARM intrinsics as MSBuiltin
A number of the ARM intrinsics are aliased with alternative names in MSVC
compatibility mode.  This change indicates those intrinsics to permit tablegen
to construct an appropriate list of MSBuiltins.  With the corresponding change
in clang, these intrinsics can then be mapped from the frontend.

The tests to validate the intrinsics are aliased correctly will be added with
the corresponding clang change.

llvm-svn: 212377
2014-07-05 20:09:24 +00:00
Ehsan Akhgari b3efe0602d Revert r212375 because of test failures
llvm-svn: 212376
2014-07-05 19:46:10 +00:00
Ehsan Akhgari 7c35b0f004 Add a test case for the tilde operator in Microsoft inline assembly
llvm-svn: 212375
2014-07-05 19:40:35 +00:00
Simon Atanasyan 5a63aa305d [llvm-readobj] Fix output of MIPS GOT without local and global entries.
llvm-svn: 212374
2014-07-05 19:28:49 +00:00
Ehsan Akhgari 3e0dd89adf Add a test case for the tilde operator in Microsoft inline assembly
llvm-svn: 212373
2014-07-05 15:04:06 +00:00
Rafael Espindola 22c187be1d Update for llm api change.
llvm-svn: 212372
2014-07-05 11:39:02 +00:00
Rafael Espindola d5a8efe733 This only needs a StringRef. No functionality change.
llvm-svn: 212371
2014-07-05 11:38:52 +00:00
David Majnemer 45647d8f74 ADT: Add a drop_back() helper to ArrayRef
The slice(N, M) interface is powerful but not concise when wanting to
drop a few elements off of an ArrayRef, fix this by adding a drop_back
method.

llvm-svn: 212370
2014-07-05 06:12:30 +00:00
Alp Toker f994cef836 Track IntrusiveRefCntPtr::get() changes from LLVM r212366
llvm-svn: 212369
2014-07-05 03:08:06 +00:00
Alp Toker edc902f3bb Track IntrusiveRefCntPtr::get() changes from LLVM r212366
llvm-svn: 212368
2014-07-05 03:06:05 +00:00
Alp Toker 573583e2f2 Track IntrusiveRefCntPtr::get() changes from LLVM r212366
llvm-svn: 212367
2014-07-05 03:04:33 +00:00
Alp Toker b0c31a56e5 Deprecate IntrusiveRefCntPtr::getPtr() in favour of get()
This better aligns with other LLVM-specific and C++ standard library smart
pointer types.

In particular there are at least a few uses of intrusive refcounting in the
frontend where it's worth investigating std::shared_ptr as a more appropriate
alternative.

llvm-svn: 212366
2014-07-05 03:03:21 +00:00
David Majnemer 82cb0309e2 MC: make MCSymbolData::dump work on const objects
This just lets us dump a const MCSymbolData object, no functionality
changed.

llvm-svn: 212365
2014-07-05 00:39:52 +00:00
Rafael Espindola 8286fbf4c4 Make a helper function static. No functionality change.
llvm-svn: 212364
2014-07-05 00:39:08 +00:00
David Majnemer e0950ee85c MC: Correct comment in ExportSymbol
No functionality changed, just make it so that the code _could_ be
uncommented.

llvm-svn: 212363
2014-07-04 23:20:46 +00:00
David Majnemer bee5f754f2 MC: Cleanup COFFAsmParser::ParseSectionFlags
Switch a normal for-loop to a range-based for. No functionality changed.

llvm-svn: 212362
2014-07-04 23:15:28 +00:00
Rafael Espindola ba79dba8ed Make RecordStreamer.h private.
llvm-svn: 212361
2014-07-04 22:44:18 +00:00
David Majnemer d1bea693e2 IR: Fold away compares between GV GEPs and GVs
A GEP of a non-weak global variable will not be equivalent to another
non-weak global variable or a GEP of such a variable.

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

llvm-svn: 212360
2014-07-04 22:05:26 +00:00
Saleem Abdulrasool 96bfda8dbc CodeGen: add support for MSBuiltin aliases
This completes the infrastructure for the new MSBuiltin aliases in the
instruction definitions.  These behave similar to the GCCBuiltin in that they
can be implicitly constructed without special handling unless needed.

With this change it is possible to annotate an LLVM intrinsic in the backend
instruction definitions and indicate it as a builtin in the Builtin*.def files
in clang via LANGBUILTIN.  That will automatically pass through the instruction
much as a GCCBuiltin.

Note that there is no need for the special handling for ensuring that the
compatibility flag is enabled since the filtering on the LANGBUILTIN will
automatically prevent the intrinsic from bleeding into non-MS compatible
compiler invocations.

llvm-svn: 212359
2014-07-04 21:49:39 +00:00
Alp Toker bc372a3d6e Prune some ignored warning options
These are forms that have either slipped in without being requested for
compatibility or that GCC doesn't support in the first place.

llvm-svn: 212358
2014-07-04 20:42:50 +00:00
Rafael Espindola e6107799fa Fix a bug in the conversion to ErrorOr.
The regular end of the bitcode parsing is in the  BitstreamEntry::EndBlock
case.

Should fix the LTO bootstrap on OS X (this function is only used by ld64).

llvm-svn: 212357
2014-07-04 20:05:56 +00:00
Rafael Espindola c75c4fad46 Revert "Convert a few std::strings to StringRef."
This reverts commit r212342.

We can get a StringRef into the current Record, but not one in the bitcode
itself since the string is compressed in it.

llvm-svn: 212356
2014-07-04 20:02:42 +00:00
Sanjay Patel 69bf48eeb1 fixed typos
llvm-svn: 212355
2014-07-04 19:40:43 +00:00
Rafael Espindola 089a317c64 Ignore llvm specific symbols in the LTOModule.
These are the llvm.* globals and functions.

I don't think it is possible to test this directly since llvm-lto is not
a full linker and will not report duplicated symbols, but this fixes
bootstrap with gold and lto enabled.

llvm-svn: 212354
2014-07-04 19:31:27 +00:00
Ehsan Akhgari edd82a996c Fix up the test that expects the failure fixed in r212352
llvm-svn: 212353
2014-07-04 19:22:29 +00:00
Ehsan Akhgari 4103da6bfb Add support for parsing the not operator in Microsoft inline assembly
This fixes http://llvm.org/PR20202

llvm-svn: 212352
2014-07-04 19:13:05 +00:00
Rafael Espindola 2dc0d9bddb Ignore llvm.* globals.
It is not clear if llvm.global_ctors should or should not be in llvm.metadata,
but in practice it is not and we need to ignore it for LTO.

llvm-svn: 212351
2014-07-04 19:08:22 +00:00
Saleem Abdulrasool 4e63fc498c TableGen: introduce support for MSBuiltin
Add MSBuiltin which is similar in vein to GCCBuiltin.  This allows for adding
intrinsics for Microsoft compatibility to individual instructions.  This is
needed to permit the creation of ARM specific MSVC extensions.

This is not currently in use, and requires an associated change in clang to
enable use of the intrinsics defined by this new class.  This merely sets the
LLVM portion of the infrastructure in place to permit the use of this
functionality.  A separate set of changes will enable the new intrinsics.

llvm-svn: 212350
2014-07-04 18:42:25 +00:00
Rafael Espindola dddd1fd9f4 Implement LTOModule on top of IRObjectFile.
IRObjectFile provides all the logic for producing mangled names and getting
symbols from inline assembly.

LTOModule then adds logic for linking specific tasks, like constructing
llvm.compiler_user or extracting linker options from the bitcode.

The rule of the thumb is that IRObjectFile has the functionality that is
needed by both LTO and llvm-ar.

llvm-svn: 212349
2014-07-04 18:40:36 +00:00
Rafael Espindola 0972d41c73 Avoid mangling names twice. No functionality change.
llvm-svn: 212348
2014-07-04 16:37:02 +00:00
Rafael Espindola 3885090b86 Mark intrinsic functions as llvm-specific.
llvm-svn: 212347
2014-07-04 15:58:00 +00:00
Daniel Sanders 950f48d3c7 [mips][mips64r6] Set ELF e_flags for MIPS32r6/MIPS64r6. Also do MIPS-I to MIPS-V
Differential Revision: http://reviews.llvm.org/D4386

llvm-svn: 212346
2014-07-04 15:21:53 +00:00
Daniel Sanders 20c82ee4fa [mips] Add tests for the 'ret', 'call', and 'indirectbr' LLVM IR instruction.
Summary:
The tests in this directory are intended to test a single IR instruction
with as few dependencies on other instructions as possible. The aim is to
be very confident that each LLVM-IR instruction is implemented correctly and
with the optimal sequence of instructions, as well as to make it easy to tell
what is tested, and make it easier to bring up new ISA revisions in the
future. This gives us a good foundation on which to test bigger things.

These particular tests will allow testing that MIPS32r6/MIPS64r6 generate
the correct return instruction for returns, calls, and indirect branches.
This will be a bit tricky since the assembly text is identical but the
instruction is actually different. On MIPS32r6/MIPS64r6 'jr $rs' has been
removed in favour of the equivalent 'jalr $zero, $rs'. 'jr $rs' remains as
an alias for 'jalr $zero, $rs'.

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

llvm-svn: 212345
2014-07-04 15:16:14 +00:00