platform/upstream/llvm.git
10 years ago[OPENMP] Added initial support for 'omp parallel for'.
Alexey Bataev [Mon, 7 Jul 2014 13:01:15 +0000 (13:01 +0000)]
[OPENMP] Added initial support for 'omp parallel for'.

llvm-svn: 212453

10 years agoIncrease argument limit of anyOf, allOf and eachOf from 5 to 9.
Manuel Klimek [Mon, 7 Jul 2014 12:55:16 +0000 (12:55 +0000)]
Increase argument limit of anyOf, allOf and eachOf from 5 to 9.

Patch by Alexey Sokolov.

llvm-svn: 212452

10 years agoMove ChainedIncludesSource into the implementation
Alp Toker [Mon, 7 Jul 2014 11:07:10 +0000 (11:07 +0000)]
Move ChainedIncludesSource into the implementation

This doesn't need to be in the headers.

llvm-svn: 212451

10 years agoChainedIncludesSource: avoid copying n*(n+1)/2 file contents into memory
Alp Toker [Mon, 7 Jul 2014 11:06:51 +0000 (11:06 +0000)]
ChainedIncludesSource: avoid copying n*(n+1)/2 file contents into memory

Just reference the data instead with shallow MemoryBuffer instances.

llvm-svn: 212450

10 years agoInstCombine: Simplify code, no functionality change.
Benjamin Kramer [Mon, 7 Jul 2014 11:01:16 +0000 (11:01 +0000)]
InstCombine: Simplify code, no functionality change.

llvm-svn: 212449

10 years ago[msan] Increase hash table size for chained origins.
Evgeniy Stepanov [Mon, 7 Jul 2014 10:45:15 +0000 (10:45 +0000)]
[msan] Increase hash table size for chained origins.

llvm-svn: 212448

10 years agoPointerLoc does not exist anymore.
Yaron Keren [Mon, 7 Jul 2014 09:52:31 +0000 (09:52 +0000)]
PointerLoc does not exist anymore.
SourceLocation is available from TypeLoc member functions.

llvm-svn: 212447

10 years agoRevert "Add lib/Codgen/[CGRTTI|MicrosoftRTTI].cpp to CMakeLists.txt (r212445)"
Tobias Grosser [Mon, 7 Jul 2014 09:39:09 +0000 (09:39 +0000)]
Revert "Add lib/Codgen/[CGRTTI|MicrosoftRTTI].cpp to CMakeLists.txt (r212445)"

I misidentified the problem and did not test suffifiently. The files had
correctly been removed, but for some reason they still remained in my git
checkout. Not adding the files back to CMakeLists.txt, but rather removing
the stale files was the solution. Sorry for the unnecessary noise.

llvm-svn: 212446

10 years agoAdd lib/Codgen/[CGRTTI|MicrosoftRTTI].cpp to CMakeLists.txt
Tobias Grosser [Mon, 7 Jul 2014 09:23:06 +0000 (09:23 +0000)]
Add lib/Codgen/[CGRTTI|MicrosoftRTTI].cpp to CMakeLists.txt

This fixes the cmake builds.

llvm-svn: 212445

10 years ago[x86] Teach the new vector shuffle lowering code to handle what is
Chandler Carruth [Mon, 7 Jul 2014 09:06:58 +0000 (09:06 +0000)]
[x86] Teach the new vector shuffle lowering code to handle what is
essentially a DAG combine that never gets a chance to run.

We might typically expect DAG combining to remove shuffles-of-splats and
other similar patterns, but we don't get a chance to run the DAG
combiner when we recursively form sub-shuffles during the lowering of
a shuffle. So instead hand-roll a really important combine directly into
the lowering code to detect shuffles-of-splats, especially shuffles of
an all-zero splat which needn't even have the same element width, etc.

This lets the new vector shuffle lowering handle shuffles which
implement things like zero-extension really nicely. This will become
even more important when I wire the legalization of zero-extension to
vector shuffles with the new widening legalization strategy.

llvm-svn: 212444

10 years agoCodeGen: it turns out that NAND is not the same thing as BIC. At all.
Tim Northover [Mon, 7 Jul 2014 09:06:35 +0000 (09:06 +0000)]
CodeGen: it turns out that NAND is not the same thing as BIC. At all.

We've been performing the wrong operation on ARM for "atomicrmw nand" for
years, since "a NAND b" is "~(a & b)" rather than ARM's very tempting "a & ~b".
This bled over into the generic expansion pass.

So I assume no-one has ever actually tried to do an atomic nand in the real
world. Oh well.

llvm-svn: 212443

10 years agoSwitch over a few uses of param_begin() to parameters()
Alp Toker [Mon, 7 Jul 2014 09:02:20 +0000 (09:02 +0000)]
Switch over a few uses of param_begin() to parameters()

llvm-svn: 212442

10 years agoRemove unused sys/stat.h includes
Alp Toker [Mon, 7 Jul 2014 08:37:15 +0000 (08:37 +0000)]
Remove unused sys/stat.h includes

The facility was abstracted to LLVM in r187364.

llvm-svn: 212441

10 years ago[msan] Better hash function for chained origins.
Evgeniy Stepanov [Mon, 7 Jul 2014 08:31:55 +0000 (08:31 +0000)]
[msan] Better hash function for chained origins.

llvm-svn: 212440

10 years agoCodeGen: Cleanup MS ABI RTTI LLVM IR
David Majnemer [Mon, 7 Jul 2014 08:09:15 +0000 (08:09 +0000)]
CodeGen: Cleanup MS ABI RTTI LLVM IR

The MS ABI RTTI emission code would choose names for IR types like
%"MSRTTITypeDescriptor\02".  This name is undesirable because it
requires escaping; the underlying reason for this is that the name is
unprintable.  Fix this by naming it %rtti.TypeDescriptor2.

While here, stop trying to do lookups in the LLVM Module's type table.
Instead, store the IR types in MicrosoftCXXABI.  Lookups by name aren't
particularly fast.

llvm-svn: 212439

10 years agoPeel away old-style file remapping typedefs and cruft
Alp Toker [Mon, 7 Jul 2014 07:47:20 +0000 (07:47 +0000)]
Peel away old-style file remapping typedefs and cruft

llvm-svn: 212438

10 years agoFix an iterator invalidation issue: deserializing a key function can write to
Richard Smith [Mon, 7 Jul 2014 06:38:20 +0000 (06:38 +0000)]
Fix an iterator invalidation issue: deserializing a key function can write to
the key functions table. Don't hold references to anything within that table
across such an access.

llvm-svn: 212437

10 years agoStaticAnalyzer: Silence a warning
David Majnemer [Mon, 7 Jul 2014 06:20:50 +0000 (06:20 +0000)]
StaticAnalyzer: Silence a warning

ExprEngine wasn't ready for SEHLeaveStmtClass.  Handle it like all the
other SEH constructs by aborting.

llvm-svn: 212436

10 years agoCodeGen: Refactor RTTI emission
David Majnemer [Mon, 7 Jul 2014 06:20:47 +0000 (06:20 +0000)]
CodeGen: Refactor RTTI emission

Let's not expose ABI specific minutia inside of CodeGenModule and Type.
Instead, let's abstract it through CXXABI.

This gets rid of:
CodeGenModule::getCompleteObjectLocator,
CodeGenModule::EmitFundamentalTypeDescriptor{s,},
CodeGenModule::getMSTypeDescriptor,
CodeGenModule::getMSCompleteObjectLocator,
CGCXXABI::shouldRTTIBeUnique,
CGCXXABI::classifyRTTIUniqueness.

CGRTTI was *almost* entirely centered around providing Itanium-style
RTTI information.  Instead of providing interfaces that only it
consumes, move it to the ItaniumCXXABI implementation file.  This allows
it to have access to Itanium-specific implementation details without
providing useless expansion points for the Microsoft ABI side.

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

llvm-svn: 212435

10 years agoFix layering of file remapping and header search initialization
Alp Toker [Mon, 7 Jul 2014 06:05:00 +0000 (06:05 +0000)]
Fix layering of file remapping and header search initialization

These two functions initialize the source manager and header search objects and
shouldn't be in InitPreprocessor which is concerned with priming the
preprocessor itself and predefining macros.

llvm-svn: 212434

10 years agoAdd an explicit diagnostic for the case where an expression is not a constant
Richard Smith [Mon, 7 Jul 2014 06:00:13 +0000 (06:00 +0000)]
Add an explicit diagnostic for the case where an expression is not a constant
expression because it uses 'this'. Inspired by PR20219 comment#2.

llvm-svn: 212433

10 years agoCleanup. No functionality change intended.
Richard Smith [Mon, 7 Jul 2014 05:36:14 +0000 (05:36 +0000)]
Cleanup. No functionality change intended.

llvm-svn: 212432

10 years agoARM: properly lower dllimport'ed global values
Saleem Abdulrasool [Mon, 7 Jul 2014 05:18:35 +0000 (05:18 +0000)]
ARM: properly lower dllimport'ed global values

This completes the handling for DLL import storage symbols when lowering
instructions.  A DLL import storage symbol must have an additional load
performed prior to use.  This is applicable to variables and functions.

This is particularly important for non-function symbols as it is possible to
handle function references by emitting a thunk which performs the translation
from the unprefixed __imp_ symbol to the proper symbol (although, this is a
non-optimal lowering).  For a variable symbol, no such thunk can be
accommodated.

llvm-svn: 212431

10 years agoARM: correctly mangle dllimport symbols
Saleem Abdulrasool [Mon, 7 Jul 2014 05:18:30 +0000 (05:18 +0000)]
ARM: correctly mangle dllimport symbols

Add support for tracking DLLImport storage class information on a per symbol
basis in the ARM instruction selection.  Use that information to correctly
mangle the symbol (dllimport symbols are referenced via *__imp_<name>).

llvm-svn: 212430

10 years agoARM: unify symbol name retrieval
Saleem Abdulrasool [Mon, 7 Jul 2014 05:18:22 +0000 (05:18 +0000)]
ARM: unify symbol name retrieval

Ensure that all paths that retrieve the symbol name go through GetARMGVSymbol
rather than getSymbol.  This is desirable so that any global symbol mangling can
be centralised to this function.  The motivation for this is handling of symbols
that are marked as having dll import dll storage.  Such a symbol requires an
extra load that is currently handled in the backend and a __imp_ prefix on the
symbol name.

llvm-svn: 212429

10 years ago[AArch64] Normalize all constants to build a vector.
Kevin Qin [Mon, 7 Jul 2014 02:45:40 +0000 (02:45 +0000)]
[AArch64] Normalize all constants to build a vector.

The value of constant operands will be truncated to fit element width.

llvm-svn: 212428

10 years agolibclang: refactor handling of unsaved_files
Alp Toker [Mon, 7 Jul 2014 01:23:14 +0000 (01:23 +0000)]
libclang: refactor handling of unsaved_files

Consolidate CXUnsavedFile argument handling in API functions to support a wider
cleanup of various file remapping schemes in the frontend.

llvm-svn: 212427

10 years agoUpdate internals manual on how to add AST nodes.
Nico Weber [Mon, 7 Jul 2014 00:50:39 +0000 (00:50 +0000)]
Update internals manual on how to add AST nodes.

StmtDumper.cpp is called ASTDumper.cpp these days, and usually works well
for new AST nodes without changes.  There's now DataRecursiveASTVisitor
in addition to RecursiveASTVisitor, and serialization wasn't mentioned.

llvm-svn: 212426

10 years agoAdd an AST node for __leave statements, hook it up.
Nico Weber [Mon, 7 Jul 2014 00:12:30 +0000 (00:12 +0000)]
Add an AST node for __leave statements, hook it up.

Codegen is still missing (and I won't work on that), but __leave is now
as implemented as __try and friends.

llvm-svn: 212425

10 years agofixed typos in comments
Sanjay Patel [Sun, 6 Jul 2014 23:24:53 +0000 (23:24 +0000)]
fixed typos in comments

llvm-svn: 212424

10 years agofixed some typos in comments
Sanjay Patel [Sun, 6 Jul 2014 23:10:24 +0000 (23:10 +0000)]
fixed some typos in comments

llvm-svn: 212423

10 years agoSema: Check that __leave is contained in a __try block.
Nico Weber [Sun, 6 Jul 2014 22:53:19 +0000 (22:53 +0000)]
Sema: Check that __leave is contained in a __try block.

Give scope a SEHTryScope bit, set that in ParseSEHTry(), and let Sema
walk the scope chain to find the SEHTry parent on __leave statements.
(They are rare enough that it seems better to do the walk instead of
giving Scope a SEHTryParent pointer -- this is similar to AtCatchScope.)

llvm-svn: 212422

10 years agoAdd parser support for __leave (sema and onward still missing).
Nico Weber [Sun, 6 Jul 2014 22:32:59 +0000 (22:32 +0000)]
Add parser support for __leave (sema and onward still missing).

llvm-svn: 212421

10 years agoAArch64: whitespace cleanup
Saleem Abdulrasool [Sun, 6 Jul 2014 22:13:26 +0000 (22:13 +0000)]
AArch64: whitespace cleanup

llvm-svn: 212420

10 years agoThese should be EXPECT_TRUE, not EXPECT_FALSE. Amends r212415.
Aaron Ballman [Sun, 6 Jul 2014 20:20:02 +0000 (20:20 +0000)]
These should be EXPECT_TRUE, not EXPECT_FALSE. Amends r212415.

llvm-svn: 212419

10 years agoGiving this test a triple to satisfy the build bots.
Aaron Ballman [Sun, 6 Jul 2014 20:07:16 +0000 (20:07 +0000)]
Giving this test a triple to satisfy the build bots.

llvm-svn: 212418

10 years agoThe MicrosoftExtensions.c test file should not rely on -x objective-c++. Removed...
Aaron Ballman [Sun, 6 Jul 2014 20:04:10 +0000 (20:04 +0000)]
The MicrosoftExtensions.c test file should not rely on -x objective-c++. Removed that from the RUN line, fixed obvious C++isms in the code, and moved some C++ tests into MicrosoftExtensions.cpp instead. As a drive-by, changed the line endings for MicrosoftExtensions.c to be LF instead of CRLF.

llvm-svn: 212417

10 years agoThis test case does not require -Wno-missing-declarations or -x objective-c++.
Aaron Ballman [Sun, 6 Jul 2014 19:44:38 +0000 (19:44 +0000)]
This test case does not require -Wno-missing-declarations or -x objective-c++.

llvm-svn: 212416

10 years agoFixing compile errors related to changes with MemoryBuffer::getFile.
Aaron Ballman [Sun, 6 Jul 2014 19:34:52 +0000 (19:34 +0000)]
Fixing compile errors related to changes with MemoryBuffer::getFile.

llvm-svn: 212415

10 years agoMove InterlockedBitTestAndSet into its own test file
Ehsan Akhgari [Sun, 6 Jul 2014 18:45:44 +0000 (18:45 +0000)]
Move InterlockedBitTestAndSet into its own test file

Summary:
This gives us back the test coverage we lost when I made
MicrosoftExtensions.c x86-only.

Reviewers: majnemer

Subscribers: cfe-commits

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

llvm-svn: 212414

10 years agollvm::IntrusiveRefCntPtr => std::shared_ptr to match the changes in clang r212388
Sylvestre Ledru [Sun, 6 Jul 2014 18:39:39 +0000 (18:39 +0000)]
llvm::IntrusiveRefCntPtr => std::shared_ptr to match the changes in clang r212388

llvm-svn: 212413

10 years agoUpdate for llvm api change.
Rafael Espindola [Sun, 6 Jul 2014 18:11:46 +0000 (18:11 +0000)]
Update for llvm api change.

llvm-svn: 212412

10 years agoremove trailing whitespace + remove some useless comments
Sylvestre Ledru [Sun, 6 Jul 2014 17:54:58 +0000 (17:54 +0000)]
remove trailing whitespace + remove some useless comments

llvm-svn: 212411

10 years agoUpdate lldb code to match the change in clang r212386
Sylvestre Ledru [Sun, 6 Jul 2014 17:50:36 +0000 (17:50 +0000)]
Update lldb  code to match the change in clang r212386

llvm-svn: 212410

10 years ago[Mips] Make rel-dynamic-04.test test case independent from external input files.
Simon Atanasyan [Sun, 6 Jul 2014 17:44:40 +0000 (17:44 +0000)]
[Mips] Make rel-dynamic-04.test test case independent from external input files.

llvm-svn: 212409

10 years agoUpdate for llvm api change.
Rafael Espindola [Sun, 6 Jul 2014 17:43:24 +0000 (17:43 +0000)]
Update for llvm api change.

llvm-svn: 212408

10 years agoUpdate for llvm api change.
Rafael Espindola [Sun, 6 Jul 2014 17:43:22 +0000 (17:43 +0000)]
Update for llvm api change.

llvm-svn: 212407

10 years agoUpdate for llvm api change.
Rafael Espindola [Sun, 6 Jul 2014 17:43:19 +0000 (17:43 +0000)]
Update for llvm api change.

llvm-svn: 212406

10 years agoUpdate the MemoryBuffer API to use ErrorOr.
Rafael Espindola [Sun, 6 Jul 2014 17:43:13 +0000 (17:43 +0000)]
Update the MemoryBuffer API to use ErrorOr.

llvm-svn: 212405

10 years agoFix typo in comment.
Nick Lewycky [Sun, 6 Jul 2014 17:32:10 +0000 (17:32 +0000)]
Fix typo in comment.

llvm-svn: 212404

10 years agoDeclare variable on first use.
Rafael Espindola [Sun, 6 Jul 2014 14:31:22 +0000 (14:31 +0000)]
Declare variable on first use.

llvm-svn: 212403

10 years agoThis only needs a StringRef.
Rafael Espindola [Sun, 6 Jul 2014 14:24:03 +0000 (14:24 +0000)]
This only needs a StringRef.

llvm-svn: 212402

10 years agoThis only needs a StringRef.
Rafael Espindola [Sun, 6 Jul 2014 14:17:29 +0000 (14:17 +0000)]
This only needs a StringRef.

llvm-svn: 212401

10 years agoFix build of DriverTests for config & make.
Iain Sandoe [Sun, 6 Jul 2014 11:28:56 +0000 (11:28 +0000)]
Fix build of DriverTests for config & make.

This adjusts the USED library list following recent changes in the object
file heirarchy.

llvm-svn: 212400

10 years agoFix the MSVC build following r212382
Alp Toker [Sun, 6 Jul 2014 10:54:41 +0000 (10:54 +0000)]
Fix the MSVC build following r212382

Looks like the casts are needed there after all.

llvm-svn: 212399

10 years agoSourceMgr: make valid buffer IDs start from one
Alp Toker [Sun, 6 Jul 2014 10:33:31 +0000 (10:33 +0000)]
SourceMgr: make valid buffer IDs start from one

Use 0 for the invalid buffer instead of -1/~0 and switch to unsigned
representation to enable more idiomatic usage.

Also introduce a trivial SourceMgr::getMainFileID() instead of hard-coding 0/1
to identify the main file.

llvm-svn: 212398

10 years agoDon't use StringRef iterator functions for data access
Alp Toker [Sun, 6 Jul 2014 10:32:55 +0000 (10:32 +0000)]
Don't use StringRef iterator functions for data access

And also remove some redundant casts from r212371.

llvm-svn: 212397

10 years agoPlistSupport.h: avoid gcc 'defined but not used' warning
Alp Toker [Sun, 6 Jul 2014 07:59:14 +0000 (07:59 +0000)]
PlistSupport.h: avoid gcc 'defined but not used' warning

llvm-svn: 212396

10 years agolibclang: make darwin pthread hacks conditional on LLVM_ENABLE_THREADS
Alp Toker [Sun, 6 Jul 2014 06:24:00 +0000 (06:24 +0000)]
libclang: make darwin pthread hacks conditional on LLVM_ENABLE_THREADS

Although these aren't strictly related to LLVM's core threading, it's
reasonable to avoid pthread usage in clang when building with
LLVM_ENABLE_THREADS disabled.

llvm-svn: 212395

10 years agoModernize a couple of loops
Alp Toker [Sun, 6 Jul 2014 06:09:20 +0000 (06:09 +0000)]
Modernize a couple of loops

llvm-svn: 212394

10 years agoFix the MicrosoftExtensions.c target
Ehsan Akhgari [Sun, 6 Jul 2014 05:58:55 +0000 (05:58 +0000)]
Fix the MicrosoftExtensions.c target

llvm-svn: 212393

10 years agoEnable the InterlockedBitTestAndSet test
Ehsan Akhgari [Sun, 6 Jul 2014 05:50:19 +0000 (05:50 +0000)]
Enable the InterlockedBitTestAndSet test

llvm-svn: 212392

10 years agoTrack changes from clang r212388
Alp Toker [Sun, 6 Jul 2014 05:36:57 +0000 (05:36 +0000)]
Track changes from clang r212388

llvm-svn: 212391

10 years agoTrack changes from clang r212387, r212388
Alp Toker [Sun, 6 Jul 2014 05:29:14 +0000 (05:29 +0000)]
Track changes from clang r212387, r212388

llvm-svn: 212390

10 years agoAdd support for nested blocks in Microsoft inline assembly
Ehsan Akhgari [Sun, 6 Jul 2014 05:26:54 +0000 (05:26 +0000)]
Add support for nested blocks in Microsoft inline assembly

This fixes http://llvm.org/PR20204.

llvm-svn: 212389

10 years agoUse non-intrusive refcounting for TargetOptions
Alp Toker [Sun, 6 Jul 2014 05:26:44 +0000 (05:26 +0000)]
Use non-intrusive refcounting for TargetOptions

llvm-svn: 212388

10 years agoUse non-intrusive refcounting for LangOptions
Alp Toker [Sun, 6 Jul 2014 05:26:07 +0000 (05:26 +0000)]
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

10 years agoConstify a read-only parameter and give function a better name
Alp Toker [Sun, 6 Jul 2014 05:14:24 +0000 (05:14 +0000)]
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

10 years agowriteARCDiagsToPlist(): make sure all diag levels get handled
Alp Toker [Sun, 6 Jul 2014 04:27:03 +0000 (04:27 +0000)]
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

10 years agoUse PlistSupport in a few more places
Alp Toker [Sun, 6 Jul 2014 04:26:52 +0000 (04:26 +0000)]
Use PlistSupport in a few more places

Switch over LogDiagnosticPrinter and introduce an integer helper.

llvm-svn: 212384

10 years agoclang-cl: /showIncludes output should go to stdout, not stderr. Fixes PR20217.
Nico Weber [Sun, 6 Jul 2014 03:04:24 +0000 (03:04 +0000)]
clang-cl: /showIncludes output should go to stdout, not stderr. Fixes PR20217.

llvm-svn: 212383

10 years agoRemove IntrusiveRefCntPtr::getPtr() function
Alp Toker [Sat, 5 Jul 2014 22:20:59 +0000 (22:20 +0000)]
Remove IntrusiveRefCntPtr::getPtr() function

It was deprecated in r212366 and all uses have been switched to get().

llvm-svn: 212382

10 years agoRemove leftovers of '-arcmt-modify-in-memory' from r133315
Alp Toker [Sat, 5 Jul 2014 22:12:36 +0000 (22:12 +0000)]
Remove leftovers of '-arcmt-modify-in-memory' from r133315

llvm-svn: 212381

10 years agoUse cast<> instead of dyn_cast + assert
Matt Arsenault [Sat, 5 Jul 2014 21:16:43 +0000 (21:16 +0000)]
Use cast<> instead of dyn_cast + assert

llvm-svn: 212380

10 years agoFix grammar
Matt Arsenault [Sat, 5 Jul 2014 21:16:40 +0000 (21:16 +0000)]
Fix grammar

llvm-svn: 212379

10 years agoCodeGen: add support for a few MSVC ARM intrinsics
Saleem Abdulrasool [Sat, 5 Jul 2014 20:10:05 +0000 (20:10 +0000)]
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

10 years agoARM: mark matching ARM intrinsics as MSBuiltin
Saleem Abdulrasool [Sat, 5 Jul 2014 20:09:24 +0000 (20:09 +0000)]
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

10 years agoRevert r212375 because of test failures
Ehsan Akhgari [Sat, 5 Jul 2014 19:46:10 +0000 (19:46 +0000)]
Revert r212375 because of test failures

llvm-svn: 212376

10 years agoAdd a test case for the tilde operator in Microsoft inline assembly
Ehsan Akhgari [Sat, 5 Jul 2014 19:40:35 +0000 (19:40 +0000)]
Add a test case for the tilde operator in Microsoft inline assembly

llvm-svn: 212375

10 years ago[llvm-readobj] Fix output of MIPS GOT without local and global entries.
Simon Atanasyan [Sat, 5 Jul 2014 19:28:49 +0000 (19:28 +0000)]
[llvm-readobj] Fix output of MIPS GOT without local and global entries.

llvm-svn: 212374

10 years agoAdd a test case for the tilde operator in Microsoft inline assembly
Ehsan Akhgari [Sat, 5 Jul 2014 15:04:06 +0000 (15:04 +0000)]
Add a test case for the tilde operator in Microsoft inline assembly

llvm-svn: 212373

10 years agoUpdate for llm api change.
Rafael Espindola [Sat, 5 Jul 2014 11:39:02 +0000 (11:39 +0000)]
Update for llm api change.

llvm-svn: 212372

10 years agoThis only needs a StringRef. No functionality change.
Rafael Espindola [Sat, 5 Jul 2014 11:38:52 +0000 (11:38 +0000)]
This only needs a StringRef. No functionality change.

llvm-svn: 212371

10 years agoADT: Add a drop_back() helper to ArrayRef
David Majnemer [Sat, 5 Jul 2014 06:12:30 +0000 (06:12 +0000)]
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

10 years agoTrack IntrusiveRefCntPtr::get() changes from LLVM r212366
Alp Toker [Sat, 5 Jul 2014 03:08:06 +0000 (03:08 +0000)]
Track IntrusiveRefCntPtr::get() changes from LLVM r212366

llvm-svn: 212369

10 years agoTrack IntrusiveRefCntPtr::get() changes from LLVM r212366
Alp Toker [Sat, 5 Jul 2014 03:06:05 +0000 (03:06 +0000)]
Track IntrusiveRefCntPtr::get() changes from LLVM r212366

llvm-svn: 212368

10 years agoTrack IntrusiveRefCntPtr::get() changes from LLVM r212366
Alp Toker [Sat, 5 Jul 2014 03:04:33 +0000 (03:04 +0000)]
Track IntrusiveRefCntPtr::get() changes from LLVM r212366

llvm-svn: 212367

10 years agoDeprecate IntrusiveRefCntPtr::getPtr() in favour of get()
Alp Toker [Sat, 5 Jul 2014 03:03:21 +0000 (03:03 +0000)]
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

10 years agoMC: make MCSymbolData::dump work on const objects
David Majnemer [Sat, 5 Jul 2014 00:39:52 +0000 (00:39 +0000)]
MC: make MCSymbolData::dump work on const objects

This just lets us dump a const MCSymbolData object, no functionality
changed.

llvm-svn: 212365

10 years agoMake a helper function static. No functionality change.
Rafael Espindola [Sat, 5 Jul 2014 00:39:08 +0000 (00:39 +0000)]
Make a helper function static. No functionality change.

llvm-svn: 212364

10 years agoMC: Correct comment in ExportSymbol
David Majnemer [Fri, 4 Jul 2014 23:20:46 +0000 (23:20 +0000)]
MC: Correct comment in ExportSymbol

No functionality changed, just make it so that the code _could_ be
uncommented.

llvm-svn: 212363

10 years agoMC: Cleanup COFFAsmParser::ParseSectionFlags
David Majnemer [Fri, 4 Jul 2014 23:15:28 +0000 (23:15 +0000)]
MC: Cleanup COFFAsmParser::ParseSectionFlags

Switch a normal for-loop to a range-based for. No functionality changed.

llvm-svn: 212362

10 years agoMake RecordStreamer.h private.
Rafael Espindola [Fri, 4 Jul 2014 22:44:18 +0000 (22:44 +0000)]
Make RecordStreamer.h private.

llvm-svn: 212361

10 years agoIR: Fold away compares between GV GEPs and GVs
David Majnemer [Fri, 4 Jul 2014 22:05:26 +0000 (22:05 +0000)]
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

10 years agoCodeGen: add support for MSBuiltin aliases
Saleem Abdulrasool [Fri, 4 Jul 2014 21:49:39 +0000 (21:49 +0000)]
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

10 years agoPrune some ignored warning options
Alp Toker [Fri, 4 Jul 2014 20:42:50 +0000 (20:42 +0000)]
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

10 years agoFix a bug in the conversion to ErrorOr.
Rafael Espindola [Fri, 4 Jul 2014 20:05:56 +0000 (20:05 +0000)]
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

10 years agoRevert "Convert a few std::strings to StringRef."
Rafael Espindola [Fri, 4 Jul 2014 20:02:42 +0000 (20:02 +0000)]
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

10 years agofixed typos
Sanjay Patel [Fri, 4 Jul 2014 19:40:43 +0000 (19:40 +0000)]
fixed typos

llvm-svn: 212355

10 years agoIgnore llvm specific symbols in the LTOModule.
Rafael Espindola [Fri, 4 Jul 2014 19:31:27 +0000 (19:31 +0000)]
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