platform/upstream/llvm.git
9 years agoRemove setting FloatABIType from the X86 port, nothing uses it.
Eric Christopher [Thu, 14 May 2015 22:26:54 +0000 (22:26 +0000)]
Remove setting FloatABIType from the X86 port, nothing uses it.

llvm-svn: 237398

9 years agoInstrProf: Only disable coverage in built-in macros, not all system macros
Justin Bogner [Thu, 14 May 2015 22:14:10 +0000 (22:14 +0000)]
InstrProf: Only disable coverage in built-in macros, not all system macros

The issue I was trying to solve in r236547 was about built-in macros,
but I disabled coverage in all system macros. This is actually a bit
of overkill, and makes the display of coverage around system macros
degrade unnecessarily. Instead, limit this to builtins specifically.

llvm-svn: 237397

9 years agoTweak availability checking to look through typedef declarations.
Ted Kremenek [Thu, 14 May 2015 22:07:25 +0000 (22:07 +0000)]
Tweak availability checking to look through typedef declarations.

llvm-svn: 237396

9 years agoAdd another InstCombine pass after LoopUnroll.
Wei Mi [Thu, 14 May 2015 22:02:54 +0000 (22:02 +0000)]
Add another InstCombine pass after LoopUnroll.

This is to cleanup some redundency generated by LoopUnroll pass. Such redundency may not be cleaned up by existing passes after LoopUnroll.

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

llvm-svn: 237395

9 years agoDon't rely on implicit pointerness of 'auto'.
Davide Italiano [Thu, 14 May 2015 21:52:12 +0000 (21:52 +0000)]
Don't rely on implicit pointerness of 'auto'.

This ends up being a copy. Pointy hat to me.
Reported by: dexonsmith, dblaikie

llvm-svn: 237394

9 years agoEnable multithreaded debugging on Windows.
Adrian McCarthy [Thu, 14 May 2015 21:07:59 +0000 (21:07 +0000)]
Enable multithreaded debugging on Windows.

llvm-svn: 237392

9 years agoRevert "Detect uses of mismatching forms of 'new' and 'delete'"
Diego Novillo [Thu, 14 May 2015 20:57:48 +0000 (20:57 +0000)]
Revert "Detect uses of mismatching forms of 'new' and 'delete'"

This reverts commit 742dc9b6c9686ab52860b7da39c3a126d8a97fbc.

This is generating multiple segfaults in our internal builds.
Test case coming up shortly.

llvm-svn: 237391

9 years agoUse clock_gettime()'s CLOCK_REALTIME instead of gettimeofday().
Ed Schouten [Thu, 14 May 2015 20:54:18 +0000 (20:54 +0000)]
Use clock_gettime()'s CLOCK_REALTIME instead of gettimeofday().

The system_clock::now() function currently uses gettimeofday(). The
problem with gettimeofday() is that it is an obsolete XSI function,
hence unavailable on CloudABI. See:

http://pubs.opengroup.org/onlinepubs/9699919799/functions/gettimeofday.html

Change this code to use clock_gettime() with CLOCK_REALTIME instead,
which is more consistent, as clock_gettime() is already used for
steady_clock.

A previous version of this change actually attempted to change
system_clock::duration, but I reverted this part as it breaks the
existing ABI.

Differential Revision: http://reviews.llvm.org/D8253
Approved by: jroelofs

llvm-svn: 237390

9 years agoFix memory leak introduced in r237314.
Alex Lorenz [Thu, 14 May 2015 20:46:12 +0000 (20:46 +0000)]
Fix memory leak introduced in r237314.

The commit r237314 that implements YAML block parsing
introduced a leak that was caught by the ASAN linux buildbot.
YAML Parser stores its tokens in an ilist, and allocates
tokens using a BumpPtrAllocator, but doesn't call the
destructor for the allocated tokens. R237314 added an
std::string field to a Token which leaked as the Token's
destructor wasn't called. This commit fixes this leak
by calling the Token's destructor when a Token is being
removed from an ilist of tokens.

llvm-svn: 237389

9 years ago[Hexagon] Generate hardware loop for a vectorized loop
Brendon Cahoon [Thu, 14 May 2015 20:36:19 +0000 (20:36 +0000)]
[Hexagon] Generate hardware loop for a vectorized loop

The induction variable in the vectorized loop wasn't
recognized properly, so a hardware loop wasn't generated.

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

llvm-svn: 237388

9 years ago[tsan] deflakify one more tsan test
Kostya Serebryany [Thu, 14 May 2015 20:27:12 +0000 (20:27 +0000)]
[tsan] deflakify one more tsan test

llvm-svn: 237387

9 years agoTesting for the fix for bug 23429.
Nemanja Ivanovic [Thu, 14 May 2015 20:02:24 +0000 (20:02 +0000)]
Testing for the fix for bug 23429.

Follow-up to commit for revision 236848.
Just a test case for the macro definition under the right CPU/Arch.
One combination was actually missed in the initial fix:
  - powerpc64-unknown-unknown -mcpu=pwr8 (rather than -mcpu=power8).

llvm-svn: 237386

9 years ago[CodeGen] Reuse stack space from unused function results
Sergey Dmitrouk [Thu, 14 May 2015 19:58:03 +0000 (19:58 +0000)]
[CodeGen] Reuse stack space from unused function results

Summary:
Space on stack allocated for unused structures returned by functions was unused
even when it's lifetime didn't intersect with lifetime of any other objects that
could use the same space.

The test added also checks for named and auto objects.  It seems to make sense
to have this all in one place.

Reviewers: aadg, rsmith, rjmccall, rnk

Reviewed By: rnk

Subscribers: asl, cfe-commits

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

llvm-svn: 237385

9 years agoTesting commit privilege
Jonathan Peyton [Thu, 14 May 2015 19:54:56 +0000 (19:54 +0000)]
Testing commit privilege

Added comment to CMakeLists.txt about library install directory suffix option.

llvm-svn: 237384

9 years agoDR295: cv-qualifiers on function types are ignored in C++.
Richard Smith [Thu, 14 May 2015 19:10:42 +0000 (19:10 +0000)]
DR295: cv-qualifiers on function types are ignored in C++.

llvm-svn: 237383

9 years agoUpdate cxx_dr_status to latest issues list.
Richard Smith [Thu, 14 May 2015 19:07:47 +0000 (19:07 +0000)]
Update cxx_dr_status to latest issues list.

llvm-svn: 237382

9 years ago[TestSendSignal] Include signal.h instead of sys/signal.h in the test case.
Siva Chandra [Thu, 14 May 2015 19:02:13 +0000 (19:02 +0000)]
[TestSendSignal] Include signal.h instead of sys/signal.h in the test case.

Summary:
Android API-9 does not have sys/signal.h. However, all sys/signal.h
has when present is an include of signal.h.

Test Plan: dotest.py -p TestSendSignal on linux and Android.

Reviewers: chaoren

Reviewed By: chaoren

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 237381

9 years agoTurn effective assert(0) into llvm_unreachable
Matthias Braun [Thu, 14 May 2015 18:33:29 +0000 (18:33 +0000)]
Turn effective assert(0) into llvm_unreachable

llvm-svn: 237379

9 years agoUpdate obsolete comments, fix typo, delete trailing space.
Douglas Katzman [Thu, 14 May 2015 18:07:04 +0000 (18:07 +0000)]
Update obsolete comments, fix typo, delete trailing space.

llvm-svn: 237378

9 years ago[ConstantFolding] Fix wrong folding of intrinsic 'convert.from.fp16'.
Andrea Di Biagio [Thu, 14 May 2015 18:01:48 +0000 (18:01 +0000)]
[ConstantFolding] Fix wrong folding of intrinsic 'convert.from.fp16'.

Function 'ConstantFoldScalarCall' (in ConstantFolding.cpp) works under the
wrong assumption that a call to 'convert.from.fp16' returns a value of
type 'float'.
However, intrinsic 'convert.from.fp16' can be overloaded; for example, we
can call 'convert.from.fp16.f64' to convert from half to double; etc.

Before this patch, the following example would have triggered an assertion
failure in opt (with -constprop):

```
define double @foo() {
entry:
  %0 = call double @llvm.convert.from.fp16.f64(i16 0)
  ret double %0
}
```

This patch fixes the problem in ConstantFolding.cpp. When folding a call to
convert.from.fp16, we perform a different kind of conversion based on the call
return type.

Added test 'Transform/ConstProp/convert-from-fp16.ll'.

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

llvm-svn: 237377

9 years agoTargetSchedule: factor out common code; NFC
Matthias Braun [Thu, 14 May 2015 18:01:13 +0000 (18:01 +0000)]
TargetSchedule: factor out common code; NFC

llvm-svn: 237376

9 years agoRemove MCInstrItineraries includes in parts that don't use them anymore
Matthias Braun [Thu, 14 May 2015 18:01:11 +0000 (18:01 +0000)]
Remove MCInstrItineraries includes in parts that don't use them anymore

llvm-svn: 237375

9 years agoRemove unused function HasPICArg().
Ikhlas Ajbar [Thu, 14 May 2015 17:42:20 +0000 (17:42 +0000)]
Remove unused function HasPICArg().

llvm-svn: 237374

9 years ago[Hexagon] Remove dead constant assignment in hardware loop pass
Brendon Cahoon [Thu, 14 May 2015 17:31:40 +0000 (17:31 +0000)]
[Hexagon] Remove dead constant assignment in hardware loop pass

After converting a loop to a hardware loop, the pass should remove
any unnecessary instructions from the old compare-and-branch
code. This patch removes a dead constant assignment that was
used in the compare instruction.

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

llvm-svn: 237373

9 years agoEnable solid lzma compression for cpack, decreases setup size by ~30%
Ismail Donmez [Thu, 14 May 2015 17:07:41 +0000 (17:07 +0000)]
Enable solid lzma compression for cpack, decreases setup size by ~30%

Reviewed by Hans Wennborg

llvm-svn: 237372

9 years agoAvoid Linux-specific header in platform-independent tests
Ed Maste [Thu, 14 May 2015 16:39:02 +0000 (16:39 +0000)]
Avoid Linux-specific header in platform-independent tests

llvm-svn: 237371

9 years ago[ARM] Fix of architecture naming typo
Vladimir Sukharev [Thu, 14 May 2015 16:39:01 +0000 (16:39 +0000)]
[ARM] Fix of architecture naming typo

Inspired by James Greenhalgh's catch

Subscribers: cfe-commits

Relates to: http://reviews.llvm.org/rL237349

llvm-svn: 237370

9 years agoXTIMEOUT tests timing out on the FreeBSD buildbot
Ed Maste [Thu, 14 May 2015 16:25:52 +0000 (16:25 +0000)]
XTIMEOUT tests timing out on the FreeBSD buildbot

llvm-svn: 237369

9 years agoDetect uses of mismatching forms of 'new' and 'delete'
Ismail Pazarbasi [Thu, 14 May 2015 16:14:57 +0000 (16:14 +0000)]
Detect uses of mismatching forms of 'new' and 'delete'

Emit warning when operand to `delete` is allocated with `new[]` or
operand to `delete[]` is allocated with `new`.

Reviewers: rtrieu, jordan_rose, rsmith

Subscribers: majnemer, cfe-commits

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

llvm-svn: 237368

9 years agoReflow long lines of some LLVMBuild files
Douglas Katzman [Thu, 14 May 2015 15:38:27 +0000 (15:38 +0000)]
Reflow long lines of some LLVMBuild files

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

llvm-svn: 237367

9 years ago[mips] [IAS] Enforce .set nomacro.
Toma Tabacu [Thu, 14 May 2015 14:51:32 +0000 (14:51 +0000)]
[mips] [IAS] Enforce .set nomacro.

Summary: When used, ".set nomacro" causes warning messages to be reported when we expand pseudo-instructions to multiple machine instructions.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 237366

9 years ago[Hexagon] Check for underflow/wrap in hardware loop pass
Brendon Cahoon [Thu, 14 May 2015 14:15:08 +0000 (14:15 +0000)]
[Hexagon] Check for underflow/wrap in hardware loop pass

If the loop trip count may underflow or wrap, the compiler should
not generate a hardware loop since the trip count will be
incorrect.

llvm-svn: 237365

9 years agoFactor out SmallDataThreshold
Ikhlas Ajbar [Thu, 14 May 2015 13:52:08 +0000 (13:52 +0000)]
Factor out SmallDataThreshold

This patch factors out SmallDataThreshold code.

llvm-svn: 237364

9 years ago[mips] [IAS] Emit .set macro/nomacro.
Toma Tabacu [Thu, 14 May 2015 13:42:10 +0000 (13:42 +0000)]
[mips] [IAS] Emit .set macro/nomacro.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 237363

9 years ago[mips] Do not place users of $ra in the delay slot of call instructions.
Vasileios Kalintiris [Thu, 14 May 2015 13:17:56 +0000 (13:17 +0000)]
[mips] Do not place users of $ra in the delay slot of call instructions.

Summary:
When we are trying to fill the delay slot of a call instruction, we must avoid
filler instructions that use the $ra register. This fixes the test
MultiSource/Applications/JM/lencod when we enable the forward delay slot filler.

Reviewers: dsanders

Subscribers: llvm-commits

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

llvm-svn: 237362

9 years agoRe-apply r237247 - [AArch64] Codegen VMAX/VMIN for safe math cases
Artyom Skrobov [Thu, 14 May 2015 12:59:46 +0000 (12:59 +0000)]
Re-apply r237247 - [AArch64] Codegen VMAX/VMIN for safe math cases

No longer breaks SPEC2000/2006

llvm-svn: 237361

9 years agoCross compiler build fix [Important] - from J.Peyton, initial version from C.Bergstrom.
Andrey Churbanov [Thu, 14 May 2015 12:54:08 +0000 (12:54 +0000)]
Cross compiler build fix [Important] - from J.Peyton, initial version from C.Bergstrom.

llvm-svn: 237360

9 years agoAttempt to fix MSVC bots
Adam Nemet [Thu, 14 May 2015 12:33:32 +0000 (12:33 +0000)]
Attempt to fix MSVC bots

llvm-svn: 237359

9 years agoNew Loop Distribution pass
Adam Nemet [Thu, 14 May 2015 12:05:18 +0000 (12:05 +0000)]
New Loop Distribution pass

Summary:
This implements the initial version as was proposed earlier this year
(http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-January/080462.html).
Since then Loop Access Analysis was split out from the Loop Vectorizer
and was made into a separate analysis pass.  Loop Distribution becomes
the second user of this analysis.

The pass is off by default and can be enabled
with -enable-loop-distribution.  There is currently no notion of
profitability; if there is a loop with dependence cycles, the pass will
try to split them off from other memory operations into a separate loop.

I decided to remove the control-dependence calculation from this first
version.  This and the issues with the PDT are actively discussed so it
probably makes sense to treat it separately.  Right now I just mark all
terminator instruction required which keeps identical CFGs for each
distributed loop.  This seems to be working pretty well for 456.hmmer
where even though there is an empty if-then block in the distributed
loop initially, it gets completely removed.

The pass keeps DominatorTree and LoopInfo updated.  I've tested this
with -loop-distribute-verify with the testsuite where we distribute ~90
loops.  SimplifyLoop is violated in some cases and I have a FIXME
covering this.

Reviewers: hfinkel, nadav, aschwaighofer

Reviewed By: aschwaighofer

Subscribers: llvm-commits

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

llvm-svn: 237358

9 years agoFixed some typos and broken links in source level debugging docs.
Michael Kuperstein [Thu, 14 May 2015 10:58:59 +0000 (10:58 +0000)]
Fixed some typos and broken links in source level debugging docs.

llvm-svn: 237357

9 years ago[mips] [IAS] Warn when LA is used with a 64-bit symbol.
Toma Tabacu [Thu, 14 May 2015 10:53:40 +0000 (10:53 +0000)]
[mips] [IAS] Warn when LA is used with a 64-bit symbol.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 237356

9 years ago[mips] [IAS] Give expandLoadAddressSym() more specific arguments. NFC.
Toma Tabacu [Thu, 14 May 2015 10:02:58 +0000 (10:02 +0000)]
[mips] [IAS] Give expandLoadAddressSym() more specific arguments. NFC.

Summary:
If we only pass the necessary operands, we don't have to determine the position of the symbol operand when entering expandLoadAddressSym().
This simplifies the expandLoadAddressSym() code.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 237355

9 years ago[AArch64] Slight naming changes and comments for AArch64NamedImmMapper
Vladimir Sukharev [Thu, 14 May 2015 09:50:14 +0000 (09:50 +0000)]
[AArch64] Slight naming changes and comments for AArch64NamedImmMapper

Reviewers: echristo

Subscribers: llvm-commits

Follow-up to: http://reviews.llvm.org/D8496#158595

Relates to: http://reviews.llvm.org/rL235089

llvm-svn: 237354

9 years agoAVX-512: Added i1 type handling for calling conventions.
Elena Demikhovsky [Thu, 14 May 2015 09:04:45 +0000 (09:04 +0000)]
AVX-512: Added i1 type handling for calling conventions.
i1 type is a legal type on AVX-512 and can be passed as parameter or return value.
i1 is promoted to i8 on return and to i32 for call arguments (i8 is also promoted to i32 here).
The result code is similar to the previous X86 targets, where i1 is allways promoted to i8.

llvm-svn: 237350

9 years ago[ARM] Add v8.1a architecture
Vladimir Sukharev [Thu, 14 May 2015 08:25:18 +0000 (08:25 +0000)]
[ARM] Add v8.1a architecture

Add support for ARMv8.1a architecture.

Briefly it is described on http://community.arm.com/groups/processors/blog/2014/12/02/the-armv8-a-architecture-and-its-ongoing-development

Reviewers:  jmolloy, rengolin

Subscribers: cfe-commits

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

llvm-svn: 237349

9 years ago[AArch64 ACLE] Allow to define poly64_t as 'unsigned long long' on LLP64 system.
Kevin Qin [Thu, 14 May 2015 08:18:05 +0000 (08:18 +0000)]
[AArch64 ACLE] Allow to define poly64_t as 'unsigned long long' on LLP64 system.

This fixes PR23414 as well.

llvm-svn: 237348

9 years agoclang/test/Frontend/dependency-gen-escaping.c: Appease win32 hosts. Investigating.
NAKAMURA Takumi [Thu, 14 May 2015 07:37:35 +0000 (07:37 +0000)]
clang/test/Frontend/dependency-gen-escaping.c: Appease win32 hosts. Investigating.

FIXME: Do we really emit single \ or escaped \\ along the context with -fms-compatibility -MG?
llvm-svn: 237347

9 years agoRevert r237339 as sanitizer-ppc64-linux1 does not like it.
Yaron Keren [Thu, 14 May 2015 06:53:31 +0000 (06:53 +0000)]
Revert r237339 as sanitizer-ppc64-linux1 does not like it.
Complains:

/home/buildbots/sanitizerslave1/sanitizer-ppc64-1/build/llvm/tools/clang/tools/c-index-test/c-index-test.c:829:30: error: format specifies type 'long' but the argument has type 'long long' [-Werror,-Wformat]
                     I, TAK, clang_Cursor_getTemplateArgumentValue(Cursor, I));
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I'm not sure now how this should be fixed. %lld is non-standard
and not accepted by mingw on Windows while PRId64 is bad for this bot.

Is long long longer than 64 bits here? if not, why is PRId64
incompatible with it? something seems wrong.

Probably all the datatypes should be replaced to unsigned or uint64_t
depending upin requirements instead of the non standard long long.

llvm-svn: 237346

9 years agoTableGen: Avoid undefined behaviour by doing this shift in int64
Justin Bogner [Thu, 14 May 2015 06:47:02 +0000 (06:47 +0000)]
TableGen: Avoid undefined behaviour by doing this shift in int64

Found by ubsan. This was taking a bool and left shifting by 32 - the
result is 64 bit, so we should really do the math in a type it fits
in.

llvm-svn: 237345

9 years ago[MS ABI] Add support for /Zc:sizedDealloc
David Majnemer [Thu, 14 May 2015 05:55:00 +0000 (05:55 +0000)]
[MS ABI] Add support for /Zc:sizedDealloc

llvm-svn: 237344

9 years ago[TableGen] Remove an unnecessary outer 'if' around 3 separate inner ifs. No functiona...
Craig Topper [Thu, 14 May 2015 05:54:02 +0000 (05:54 +0000)]
[TableGen] Remove an unnecessary outer 'if' around 3 separate inner ifs. No functional change intended.

The outer if had 3 separate conditions ORed together and then the inner ifs detected which of the three conditions it was by using only a portion of the specific condition. Just put the whole condition in each inner if and remove the outer if.

llvm-svn: 237343

9 years ago[TableGen] Simplify some code. NFC
Craig Topper [Thu, 14 May 2015 05:53:59 +0000 (05:53 +0000)]
[TableGen] Simplify some code. NFC

llvm-svn: 237342

9 years ago[TableGen] Remove ListInit::size() in favor of getSize() which does the same thing...
Craig Topper [Thu, 14 May 2015 05:53:56 +0000 (05:53 +0000)]
[TableGen] Remove ListInit::size() in favor of getSize() which does the same thing and is already used in most places. NFC.

llvm-svn: 237341

9 years ago[TableGen] Replace some calls to ListInit::getSize() with ListInit::empty() if it...
Craig Topper [Thu, 14 May 2015 05:53:53 +0000 (05:53 +0000)]
[TableGen] Replace some calls to ListInit::getSize() with ListInit::empty() if it was just comparing to 0. NFC.

llvm-svn: 237340

9 years agoReplace non-standard %lld printf usage with PRId64.
Yaron Keren [Thu, 14 May 2015 05:40:50 +0000 (05:40 +0000)]
Replace non-standard %lld printf usage with PRId64.

See also r180024.

llvm-svn: 237339

9 years agoFix buildbots
David Majnemer [Thu, 14 May 2015 05:24:59 +0000 (05:24 +0000)]
Fix buildbots

llvm-svn: 237338

9 years ago[MS ABI] __declspec(thread) behaves like thread_local in MSVC 2015
David Majnemer [Thu, 14 May 2015 05:19:23 +0000 (05:19 +0000)]
[MS ABI] __declspec(thread) behaves like thread_local in MSVC 2015

MSVC 2015 changed __declspec(thread) to make it behave like C++11's
thread_local keyword instead of acting similarly to __thread.

llvm-svn: 237337

9 years ago[AST] hasAttr followed by getAttr isn't efficient
David Majnemer [Thu, 14 May 2015 05:19:20 +0000 (05:19 +0000)]
[AST] hasAttr followed by getAttr isn't efficient

Just use getAttr because we are interested in the attribute's contents.

llvm-svn: 237336

9 years ago[clang-cl] Add /Qvec and /Qvec- to control vectorization
David Majnemer [Thu, 14 May 2015 05:19:17 +0000 (05:19 +0000)]
[clang-cl] Add /Qvec and /Qvec- to control vectorization

llvm-svn: 237335

9 years agocmake: Use -fno-sanitize-recover=all - the old spelling is deprecated
Justin Bogner [Thu, 14 May 2015 04:52:57 +0000 (04:52 +0000)]
cmake: Use -fno-sanitize-recover=all - the old spelling is deprecated

llvm-svn: 237334

9 years agoclang/test/Frontend/dependency-gen-escaping.c: Tweak r237296, to let '/' and '\\...
NAKAMURA Takumi [Thu, 14 May 2015 04:25:54 +0000 (04:25 +0000)]
clang/test/Frontend/dependency-gen-escaping.c: Tweak r237296, to let '/' and '\\' distinguishd, to unbreak "--host=linux --target=msvc".

llvm-svn: 237333

9 years agoGeneralize future keyword compat diagnostics.
Richard Smith [Thu, 14 May 2015 04:00:59 +0000 (04:00 +0000)]
Generalize future keyword compat diagnostics.

This, in preparation for the introduction of more new keywords in the
implementation of the C++ language, generalizes the support for future keyword
compat diagnostics (e.g., diag::warn_cxx11_keyword) by extending the
applicability of the relevant property in IdentifierTable with appropriate
renaming.

Patch by Hubert Tong!

llvm-svn: 237332

9 years ago[modules] Rearrange preprocessor module visibility handling, no observable change...
Richard Smith [Thu, 14 May 2015 02:25:44 +0000 (02:25 +0000)]
[modules] Rearrange preprocessor module visibility handling, no observable change intended.

llvm-svn: 237331

9 years ago[Builtins] Wire half-precision conversions through cc_kext makefiles.
Ahmed Bougacha [Thu, 14 May 2015 02:21:02 +0000 (02:21 +0000)]
[Builtins] Wire half-precision conversions through cc_kext makefiles.

Kernel side of r237329.

llvm-svn: 237330

9 years ago[Builtins] Wire half-precision conversions through Darwin makefiles.
Ahmed Bougacha [Thu, 14 May 2015 01:47:32 +0000 (01:47 +0000)]
[Builtins] Wire half-precision conversions through Darwin makefiles.

Follow-up to r237161, modeled after r236805.

Note that arm64 is omitted on purpose, as the conversions are supported
natively there.

llvm-svn: 237329

9 years ago[TestAttachDenied] Use a file instead of a pipe for synchronization.
Siva Chandra [Thu, 14 May 2015 01:36:47 +0000 (01:36 +0000)]
[TestAttachDenied] Use a file instead of a pipe for synchronization.

Summary:
One cannot use mknod or mkfifo on user Android devices. This commit
changes the use of pipe to a file to synchronize between the inferior
and the test.

Test Plan: dotest.py -P TestAttachDenied

Reviewers: ovyalov, chaoren

Reviewed By: chaoren

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 237328

9 years agoDon't omit the constant when computing a cross-section relative relocation.
Andy Ayers [Thu, 14 May 2015 01:10:41 +0000 (01:10 +0000)]
Don't omit the constant when computing a cross-section relative relocation.

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

llvm-svn: 237327

9 years agoAdd missing #include, found by modules build.
Richard Smith [Thu, 14 May 2015 01:08:58 +0000 (01:08 +0000)]
Add missing #include, found by modules build.

llvm-svn: 237326

9 years ago[modules] Work around PR23521 to fix -O0 modules bootstrap.
Richard Smith [Thu, 14 May 2015 01:08:08 +0000 (01:08 +0000)]
[modules] Work around PR23521 to fix -O0 modules bootstrap.

llvm-svn: 237325

9 years ago[CodeGen] Use standard -not gnueabi- naming for f16 libcalls on Darwin.
Ahmed Bougacha [Thu, 14 May 2015 01:00:51 +0000 (01:00 +0000)]
[CodeGen] Use standard -not gnueabi- naming for f16 libcalls on Darwin.

Other targets probably should as well.  Since r237161, compiler-rt has
both, but I don't see why anything other than gnueabi would use a
gnueabi naming scheme.

llvm-svn: 237324

9 years ago[Builtins] Implement f2h/h2f by jumping to trunc/extend.
Ahmed Bougacha [Thu, 14 May 2015 00:50:28 +0000 (00:50 +0000)]
[Builtins] Implement f2h/h2f by jumping to trunc/extend.

Follow-up to r237161; seems like we can't use aliases, but we
can do better than duplicating the bodies, especially when that
body, after inlining, isn't as small as it looks.

Better approaches welcome.  Perhaps the best thing is just to have
an #ifndef __APPLE__ over the GNUEABI names, since they're not used
there.

llvm-svn: 237323

9 years agoImplement an objc tagged-pointer info command that will provide information about...
Enrico Granata [Thu, 14 May 2015 00:46:47 +0000 (00:46 +0000)]
Implement an objc tagged-pointer info command that will provide information about what LLDB thinks an ObjC tagged pointer represents

llvm-svn: 237322

9 years ago[modules] Fix a #include cycle when building a module for our builtin headers.
Richard Smith [Thu, 14 May 2015 00:45:20 +0000 (00:45 +0000)]
[modules] Fix a #include cycle when building a module for our builtin headers.

xmmintrin.h includes emmintrin.h and vice versa if SSE2 is enabled. We break
this cycle for a modules build, and instead make the xmmintrin.h module
re-export the immintrin.h module. Also included is a fix for an assert in the
serialization code if a module exports another module that was declared later
in the same module map.

llvm-svn: 237321

9 years agoFix a #include cycle in the libclang headers. "Eventually" is now.
Richard Smith [Thu, 14 May 2015 00:22:12 +0000 (00:22 +0000)]
Fix a #include cycle in the libclang headers. "Eventually" is now.

llvm-svn: 237320

9 years agoAdded XTIMEOUT for TestAttachDenied.py
Vince Harron [Wed, 13 May 2015 23:59:03 +0000 (23:59 +0000)]
Added XTIMEOUT for TestAttachDenied.py

llvm-svn: 237319

9 years agoRevert r237046. See the testcase on the thread where r237046 was committed.
Nick Lewycky [Wed, 13 May 2015 23:41:47 +0000 (23:41 +0000)]
Revert r237046. See the testcase on the thread where r237046 was committed.

llvm-svn: 237317

9 years agoAdd mips64el trap opcode to PlatformFreeBSD as well
Ed Maste [Wed, 13 May 2015 23:12:51 +0000 (23:12 +0000)]
Add mips64el trap opcode to PlatformFreeBSD as well

llvm-svn: 237315

9 years agoYAML: Implement block scalar parsing.
Alex Lorenz [Wed, 13 May 2015 23:10:51 +0000 (23:10 +0000)]
YAML: Implement block scalar parsing.

This commit implements the parsing of YAML block scalars.
Some code existed for it before, but it couldn't parse block
scalars.

This commit adds a new yaml node type to represent the block
scalar values.

This commit also deletes the 'spec-09-27' and 'spec-09-28' tests
as they are identical to the test file 'spec-09-26'.

This commit introduces 3 new utility functions to the YAML scanner
class: `skip_s_space`, `advanceWhile` and `consumeLineBreakIfPresent`.

Reviewers: Duncan P. N. Exon Smith

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

llvm-svn: 237314

9 years agoRestore breaks lost in shuffling GetSoftwareBreakpointTrapOpcode
Ed Maste [Wed, 13 May 2015 23:09:43 +0000 (23:09 +0000)]
Restore breaks lost in shuffling GetSoftwareBreakpointTrapOpcode

llvm-svn: 237313

9 years ago[opaque pointer type] Use the value type of the GlobalVariable rather than accessing...
David Blaikie [Wed, 13 May 2015 22:55:01 +0000 (22:55 +0000)]
[opaque pointer type] Use the value type of the GlobalVariable rather than accessing it through the pointee's type

llvm-svn: 237312

9 years ago[opaque pointer type] Use GlobalVariable::getValueType rather than accessing it throu...
David Blaikie [Wed, 13 May 2015 22:54:54 +0000 (22:54 +0000)]
[opaque pointer type] Use GlobalVariable::getValueType rather than accessing it through the GV's pointee type

llvm-svn: 237311

9 years ago[X86] Fix PR23271 - RIP-relative decoding bug in disassembler.
Douglas Katzman [Wed, 13 May 2015 22:44:52 +0000 (22:44 +0000)]
[X86] Fix PR23271 - RIP-relative decoding bug in disassembler.

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

llvm-svn: 237310

9 years agoConstruct ArrayRef<const T*> from vector<T>
Pete Cooper [Wed, 13 May 2015 22:43:09 +0000 (22:43 +0000)]
Construct ArrayRef<const T*> from vector<T>

ArrayRef already has a SFINAE constructor which can construct ArrayRef<const T*> from ArrayRef<T*>.

This adds methods to do the same directly from SmallVector and std::vector.  This avoids an intermediate step through the use of makeArrayRef.

Also update the users of this in LICM and SROA to remove the now unnecessary makeArrayRef call.

Reviewed by David Blaikie.

llvm-svn: 237309

9 years ago[lib/Fuzzer] update docs about test corpuses in git
Kostya Serebryany [Wed, 13 May 2015 22:42:28 +0000 (22:42 +0000)]
[lib/Fuzzer] update docs about test corpuses in git

llvm-svn: 237308

9 years agoInstrProf: Fix display of large numbers in llvm-cov
Justin Bogner [Wed, 13 May 2015 22:41:48 +0000 (22:41 +0000)]
InstrProf: Fix display of large numbers in llvm-cov

llvm-cov was truncating numbers that were larger than a particular
fixed width, which is as confusing as it is useless. Instead, we use
engineering notation with SI prefix for magnitude.

llvm-svn: 237307

9 years agoAdd AArch64 and MIPS breakpoint opcodes and sort cases
Ed Maste [Wed, 13 May 2015 22:40:01 +0000 (22:40 +0000)]
Add AArch64 and MIPS breakpoint opcodes and sort cases

New opcodes from PlatformLinux.cpp

llvm-svn: 237306

9 years agoBreak \# in a depfile the same way as gcc.
Paul Robinson [Wed, 13 May 2015 22:33:50 +0000 (22:33 +0000)]
Break \# in a depfile the same way as gcc.

Backslash followed by # in a filename should have both characters
escaped, if you do it the way GNU Make wants.  GCC doesn't, so we do
it the way GCC does rather than the way GNU Make wants.

llvm-svn: 237304

9 years agoInitial FreeBSD/arm live debugging support
Ed Maste [Wed, 13 May 2015 22:33:12 +0000 (22:33 +0000)]
Initial FreeBSD/arm live debugging support

Patch by Tom Rix, except using the RegisterContextFreeBSD_arm files
added in r235305 instead.

llvm-svn: 237303

9 years agoRearrange PlatformFreeBSD to match PlatformLinux
Ed Maste [Wed, 13 May 2015 22:26:24 +0000 (22:26 +0000)]
Rearrange PlatformFreeBSD to match PlatformLinux

No functional change, but this simplifies diffs of the two.

llvm-svn: 237302

9 years agoAdd llvm::all_of which wraps std::all_of.
Pete Cooper [Wed, 13 May 2015 22:19:13 +0000 (22:19 +0000)]
Add llvm::all_of which wraps std::all_of.

This version doesn't need begin/end but can instead just take a type which has begin/end methods.

Use this to replace an eligible foreach loop in LoopInfo found by David Blaikie in r237224.

Reviewed by David Blaikie.

llvm-svn: 237301

9 years agoFix typo on Instruction::insert{After,Before}(). NFC
Jonathan Roelofs [Wed, 13 May 2015 22:14:43 +0000 (22:14 +0000)]
Fix typo on Instruction::insert{After,Before}(). NFC

llvm-svn: 237300

9 years agoMake GNUInline consistent with whether we use traditional GNU inline semantics.
Peter Collingbourne [Wed, 13 May 2015 22:07:22 +0000 (22:07 +0000)]
Make GNUInline consistent with whether we use traditional GNU inline semantics.

Previously we were setting LangOptions::GNUInline (which controls whether we
use traditional GNU inline semantics) if the language did not have the C99
feature flag set. The trouble with this is that C++ family languages also
do not have that flag set, so we ended up setting this flag in C++ modes
(and working around it in a few places downstream by also checking CPlusPlus).

The fix is to check whether the C89 flag is set for the target language,
rather than whether the C99 flag is cleared. This also lets us remove most
CPlusPlus checks. We continue to test CPlusPlus when deciding whether to
pre-define the __GNUC_GNU_INLINE__ macro for consistency with GCC.

There is a change in semantics in two other places
where we weren't checking both CPlusPlus and GNUInline
(FunctionDecl::doesDeclarationForceExternallyVisibleDefinition and
FunctionDecl::isInlineDefinitionExternallyVisible), but this change seems to
put us back into line with GCC's semantics (test case: test/CodeGen/inline.c).

While at it, forbid -fgnu89-inline in C++ modes, as GCC doesn't support it,
it didn't have any effect before, and supporting it just makes things more
complicated.

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

llvm-svn: 237299

9 years agoInstrProf: Treat functions with a coverage map but no profile as unreached
Justin Bogner [Wed, 13 May 2015 22:03:04 +0000 (22:03 +0000)]
InstrProf: Treat functions with a coverage map but no profile as unreached

If we have a coverage mapping but no profile data for a function,
calling it mismatched is misleading. This can just as easily be
unreachable code that was stripped from the binary. Instead, treat
these the same as functions where we have an explicit "zero" coverage
map by setting the count to zero for each mapped region.

llvm-svn: 237298

9 years agoMC: clang-format MCSymbol.h, NFC
Duncan P. N. Exon Smith [Wed, 13 May 2015 21:41:14 +0000 (21:41 +0000)]
MC: clang-format MCSymbol.h, NFC

llvm-svn: 237297

9 years agoFix dependency file escaping.
Paul Robinson [Wed, 13 May 2015 21:18:15 +0000 (21:18 +0000)]
Fix dependency file escaping.

When writing a dependency (.d) file, if space or # is immediately
preceded by one or more backslashes, escape the backslashes as well as
the space or # character. Otherwise leave backslash alone.
This straddles the fence between BSD Make (which does no escaping at
all, and does not support space or # in filespecs) and GNU Make (which
does support escaping, but will fall back to the filespec as-written
if the escaping doesn't match an existing file).

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

llvm-svn: 237296

9 years agoARM: remove possible vestiges of the legacy JIT???
Tim Northover [Wed, 13 May 2015 20:28:41 +0000 (20:28 +0000)]
ARM: remove possible vestiges of the legacy JIT???

There's no need to manually pass modifier strings around to tell an operand how
to print now, that information is encoded in the operand itself since the MC
layer came along.

llvm-svn: 237295

9 years agoARM: remove custom jump table UID
Tim Northover [Wed, 13 May 2015 20:28:38 +0000 (20:28 +0000)]
ARM: remove custom jump table UID

We were creating and propagating two separate indices for each jump table (from
back in the mists of time). However, the generic index used by other backends
is sufficient to emit a unique symbol so this was unneeded.

llvm-svn: 237294

9 years agoARM: refactor optimizeThumb2JumpTables.
Tim Northover [Wed, 13 May 2015 20:28:32 +0000 (20:28 +0000)]
ARM: refactor optimizeThumb2JumpTables.

The previous logic mixed 2 separate questions:
  + Can we form a TBB/TBH instruction?
  + Can we remove the jump-table calculation before it?

It then performed a bunch of random tests on the instructions earlier in the
basic block, which were probably sufficient to answer 2 but only because of the
very limited ways in which a t2BR_JT can actually be created.

For example there's no reason to expect the LeaInst to define the same base
register as the following indexing calulation. In practice this means we might
have missed opportunities to form TBB/TBH, in theory you could end up
misidentifying a sequence and removing the wrong LEA:

     %R1 = t2LEApcrelJT ...
     %R2 = t2LEApcrelJT ...
     <... using and killing %R2 ...>
     %R2 = t2ADDr %R1, $Ridx

Before we would have looked for an LEA defining %R2 and found the wrong one. We
just got lucky that jump table setup was (almost?) always confined to a single
basic block and there was only one jump table per block.

llvm-svn: 237293

9 years agoDon't import lock on Windows.
Zachary Turner [Wed, 13 May 2015 20:21:33 +0000 (20:21 +0000)]
Don't import lock on Windows.

lock imports fcntl, which doesn't exist on Windows.  If we need
to use this class on Windows, we will need to implement something
based on the CreateMutex API.

llvm-svn: 237292

9 years agoFix broken test, this wasn't supposed to get committed.
Zachary Turner [Wed, 13 May 2015 20:21:22 +0000 (20:21 +0000)]
Fix broken test, this wasn't supposed to get committed.

llvm-svn: 237291