platform/upstream/llvm.git
10 years agoDocument module.private.modulemap and module_private.map.
Douglas Gregor [Fri, 28 Mar 2014 19:05:18 +0000 (19:05 +0000)]
Document module.private.modulemap and module_private.map.

Requested in <rdar://problem/16188740>.

llvm-svn: 205030

10 years ago[ELF] Support --defsym option to define an absolute symbol.
Rui Ueyama [Fri, 28 Mar 2014 19:02:06 +0000 (19:02 +0000)]
[ELF] Support --defsym option to define an absolute symbol.

This patch is to support --defsym option for ELF file format/GNU-compatible
driver. Currently it takes a symbol name followed by '=' and a number. If such
option is given, the driver sets up an absolute symbol with the specified
address. You can specify multiple --defsym options to define multiple symbols.

GNU LD's --defsym provides many more features. For example, it allows users to
specify another symbol name instead of a number to define a symbol alias, or it
even allows a symbol plus an offset (e.g. --defsym=foo+3) to define symbol-
relative alias. This patch does not support that, but will be supported in
subsequent patches.

Differential Revision: http://llvm-reviews.chandlerc.com/D3208

llvm-svn: 205029

10 years agoParse .gpdword and convert another llc -filetype=obj test.
Rafael Espindola [Fri, 28 Mar 2014 18:50:26 +0000 (18:50 +0000)]
Parse .gpdword and convert another llc -filetype=obj test.

llvm-svn: 205028

10 years agoconvert another llc -filetype=obj test.
Rafael Espindola [Fri, 28 Mar 2014 18:34:31 +0000 (18:34 +0000)]
convert another llc -filetype=obj test.

llvm-svn: 205027

10 years agoConvert "llc -filetype=obj" test into llvm-mc tests.
Rafael Espindola [Fri, 28 Mar 2014 18:30:07 +0000 (18:30 +0000)]
Convert "llc -filetype=obj" test into llvm-mc tests.

llvm-svn: 205026

10 years agoInstrProf: Fix MSVC after r205023
Duncan P. N. Exon Smith [Fri, 28 Mar 2014 18:22:26 +0000 (18:22 +0000)]
InstrProf: Fix MSVC after r205023

llvm-svn: 205025

10 years agoObjective-C. revert r204965. This will make
Fariborz Jahanian [Fri, 28 Mar 2014 18:22:16 +0000 (18:22 +0000)]
Objective-C. revert r204965. This will make
-Wselector-type-mismatch default again. After
internal discussions, we think that in most cases
it has helped our developers find hard to detect
undefined behaviors. We are going to provide a syntax
(and fix-it) to suppress the warning in remaining of
false positive cases.

llvm-svn: 205024

10 years agoInstrProf: Emit runtime hook directly in IRGen
Duncan P. N. Exon Smith [Fri, 28 Mar 2014 17:53:22 +0000 (17:53 +0000)]
InstrProf: Emit runtime hook directly in IRGen

-u behaviour is apparently not portable between linkers (see cfe-commits
discussions for r204379 and r205012).  I've moved the logic to IRGen,
where it should have been in the first place.

I don't have a Linux system to test this on, so it's possible this logic
*still* doesn't pull in the instrumented profiling runtime on Linux.

I'm in the process of getting tests going on the compiler-rt side
(llvm-commits "[PATCH] InstrProf: Add initial compiler-rt test").  Once
we have tests for the full flow there, the runtime logic should get a
whole lot less brittle.

<rdar://problem/16458307>

llvm-svn: 205023

10 years agoRevert "Link in profile library on Linux using --whole-archive"
Duncan P. N. Exon Smith [Fri, 28 Mar 2014 17:53:17 +0000 (17:53 +0000)]
Revert "Link in profile library on Linux using --whole-archive"

This reverts commit r205012.

llvm-svn: 205022

10 years agoFix a FIXME, use std::move.
Richard Smith [Fri, 28 Mar 2014 17:31:23 +0000 (17:31 +0000)]
Fix a FIXME, use std::move.

llvm-svn: 205021

10 years agoSLPVectorizer: Take credit for free extractelement instructions
Arnold Schwaighofer [Fri, 28 Mar 2014 17:21:32 +0000 (17:21 +0000)]
SLPVectorizer: Take credit for free extractelement instructions

Extract element instructions that will be removed when vectorzing lower the
cost.

Patch by Arch D. Robison!

llvm-svn: 205020

10 years agoSLPVectorizer: Fix typos
Arnold Schwaighofer [Fri, 28 Mar 2014 17:21:27 +0000 (17:21 +0000)]
SLPVectorizer: Fix typos

Patch by Arch D. Robison!

llvm-svn: 205019

10 years agoSLPVectorizer: Ignore users that are insertelements we can reschedule them
Arnold Schwaighofer [Fri, 28 Mar 2014 17:21:22 +0000 (17:21 +0000)]
SLPVectorizer: Ignore users that are insertelements we can reschedule them

Patch by Arch D. Robison!

llvm-svn: 205018

10 years agoException handling docs: Clarify how the llvm.eh.* intrinsics are used
Mark Seaborn [Fri, 28 Mar 2014 17:08:57 +0000 (17:08 +0000)]
Exception handling docs: Clarify how the llvm.eh.* intrinsics are used

The non-SJLJ and SJLJ intrinsics are generated by the frontend and
backend respectively.

Differential Revision: http://llvm-reviews.chandlerc.com/D3010

llvm-svn: 205017

10 years agoOnly test compression when linked with zlib.
David Blaikie [Fri, 28 Mar 2014 17:04:53 +0000 (17:04 +0000)]
Only test compression when linked with zlib.

I'll implement error handling and a negative test in both llvm-mc and
Clang soon.

llvm-svn: 205016

10 years ago[ELF] Add --allow-multiple-definition option.
Rui Ueyama [Fri, 28 Mar 2014 16:26:38 +0000 (16:26 +0000)]
[ELF] Add --allow-multiple-definition option.

If --allow-multiple-definition option is given, LLD does not treat duplicate
symbol error as a fatal error. GNU LD supports this option.

Differential Revision: http://llvm-reviews.chandlerc.com/D3211

llvm-svn: 205015

10 years agoAdd const to a method I missed in the previous commit.
Rafael Espindola [Fri, 28 Mar 2014 16:14:12 +0000 (16:14 +0000)]
Add const to a method I missed in the previous commit.

llvm-svn: 205014

10 years agoAdd const.
Rafael Espindola [Fri, 28 Mar 2014 16:06:09 +0000 (16:06 +0000)]
Add const.

llvm-svn: 205013

10 years agoLink in profile library on Linux using --whole-archive
Alexey Samsonov [Fri, 28 Mar 2014 15:39:08 +0000 (15:39 +0000)]
Link in profile library on Linux using --whole-archive

llvm-svn: 205012

10 years agoclang-format: Fix aligning of comments and escaped newlines in macros.
Daniel Jasper [Fri, 28 Mar 2014 15:06:01 +0000 (15:06 +0000)]
clang-format: Fix aligning of comments and escaped newlines in macros.

Before:
  #define A      \
    int i;   /*a*/ \
    int jjj; /*b*/

After:
  #define A        \
    int i;   /*a*/ \
    int jjj; /*b*/

llvm-svn: 205011

10 years agoRevert "InstCombine: merge constants in both operands of icmp."
Erik Verbruggen [Fri, 28 Mar 2014 14:50:57 +0000 (14:50 +0000)]
Revert "InstCombine: merge constants in both operands of icmp."

This reverts commit r204912, and follow-up commit r204948.

This introduced a performance regression, and the fix is not completely
clear yet.

llvm-svn: 205010

10 years agoRevert "GVN: merge overflow intrinsics with non-overflow instructions."
Erik Verbruggen [Fri, 28 Mar 2014 14:42:34 +0000 (14:42 +0000)]
Revert "GVN: merge overflow intrinsics with non-overflow instructions."

This reverts commit r203553, and follow-up commits r203558 and r203574.

I will follow this up on the mailinglist to do it in a way that won't
cause subtle PRE bugs.

llvm-svn: 205009

10 years agoAdd ARM big endian Target (armeb, thumbeb)
Christian Pirker [Fri, 28 Mar 2014 14:40:46 +0000 (14:40 +0000)]
Add ARM big endian Target (armeb, thumbeb)

Reviewed at http://llvm-reviews.chandlerc.com/D3096

llvm-svn: 205008

10 years agoAdd ARM big endian Target (armeb, thumbeb)
Christian Pirker [Fri, 28 Mar 2014 14:35:30 +0000 (14:35 +0000)]
Add ARM big endian Target (armeb, thumbeb)

Reviewed at http://llvm-reviews.chandlerc.com/D3095

llvm-svn: 205007

10 years ago[sanitizer] Fix Mac build.
Evgeniy Stepanov [Fri, 28 Mar 2014 14:01:40 +0000 (14:01 +0000)]
[sanitizer] Fix Mac build.

llvm-svn: 205006

10 years agoR600: avoid calling std::next on an iterator that might be end()
Tim Northover [Fri, 28 Mar 2014 13:52:56 +0000 (13:52 +0000)]
R600: avoid calling std::next on an iterator that might be end()

This was causing my llc to go into an infinite loop on
CodeGen/R600/address-space.ll (just triggered recently by some allocator
changes).

llvm-svn: 205005

10 years ago[sanitizer] Intercept fgetpwent / fgetgrent.
Evgeniy Stepanov [Fri, 28 Mar 2014 13:03:55 +0000 (13:03 +0000)]
[sanitizer] Intercept fgetpwent / fgetgrent.

These interceptors require deep unpoisoning of return values.
While at it, we do the same for all other pw/gr interceptors to
reduce dependency on libc implementation details.

llvm-svn: 205004

10 years agoIntrinsics: expand semantics of LLVMExtendedVectorType (& trunc)
Tim Northover [Fri, 28 Mar 2014 12:31:39 +0000 (12:31 +0000)]
Intrinsics: expand semantics of LLVMExtendedVectorType (& trunc)

These are used in the ARM backends to aid type-checking on patterns involving
intrinsics. By making sure one argument is an extended/truncated version of
another.

However, there's no reason to limit them to just vectors types. For example
AArch64 has the instruction "uqshrn sD, dN, #imm" which would naturally use an
intrinsic taking an i64 and returning an i32.

llvm-svn: 205003

10 years ago[sanitizer] Intercept setpwent/endpwent.
Evgeniy Stepanov [Fri, 28 Mar 2014 11:46:35 +0000 (11:46 +0000)]
[sanitizer] Intercept setpwent/endpwent.

It's hard to write a reliable test for this code because they
work with unpredictable memory locations. But this change should
fix current failures in getpwent() tests on the sanitizer bots.

llvm-svn: 205002

10 years ago[sanitizer] Intercept rand_r.
Evgeniy Stepanov [Fri, 28 Mar 2014 11:21:45 +0000 (11:21 +0000)]
[sanitizer] Intercept rand_r.

llvm-svn: 205001

10 years ago[sanitizer] Intercept getpwent/getgrent.
Evgeniy Stepanov [Fri, 28 Mar 2014 10:56:07 +0000 (10:56 +0000)]
[sanitizer] Intercept getpwent/getgrent.

llvm-svn: 205000

10 years agoAdd instrastructure for IEEE quad precision.
Joerg Sonnenberger [Fri, 28 Mar 2014 10:29:31 +0000 (10:29 +0000)]
Add instrastructure for IEEE quad precision.
Based on patch from GuanHong Liu.

Differential Revision: http://llvm-reviews.chandlerc.com/D2796

llvm-svn: 204999

10 years agoUse the correct trailing comment syntax
Dmitri Gribenko [Fri, 28 Mar 2014 10:09:39 +0000 (10:09 +0000)]
Use the correct trailing comment syntax

llvm-svn: 204998

10 years agoGet rid of the adapted isLiteral method.
Manuel Klimek [Fri, 28 Mar 2014 09:27:09 +0000 (09:27 +0000)]
Get rid of the adapted isLiteral method.

We don't want to deviate from clang's standard terminology.

llvm-svn: 204997

10 years ago[Allocator Cleanup] Sink the private data members and methods to the
Chandler Carruth [Fri, 28 Mar 2014 09:18:42 +0000 (09:18 +0000)]
[Allocator Cleanup] Sink the private data members and methods to the
bottom of the interface to make it easier to scan and find the public
API.

No functionality changed.

llvm-svn: 204996

10 years ago[Allocator Cleanup] Move generic pointer alignment helper out of an
Chandler Carruth [Fri, 28 Mar 2014 09:08:14 +0000 (09:08 +0000)]
[Allocator Cleanup] Move generic pointer alignment helper out of an
out-of-line private static method and into the collection of inline
alignment helpers in MathExtras.h.

llvm-svn: 204995

10 years ago[sanitizer] Intercept mktime.
Evgeniy Stepanov [Fri, 28 Mar 2014 09:02:57 +0000 (09:02 +0000)]
[sanitizer] Intercept mktime.

llvm-svn: 204994

10 years ago[Allocator Cleanup] Make the growth of the "slab" size of the
Chandler Carruth [Fri, 28 Mar 2014 08:53:25 +0000 (08:53 +0000)]
[Allocator Cleanup] Make the growth of the "slab" size of the
BumpPtrAllocator significantly less strange by making it a simple
function of the number of slabs allocated rather than by making it
a recurrance. I *think* the previous behavior was essentially that the
size of the slabs would be doubled after the first 128 were allocated,
and then doubled again each time 64 more were allocated, but only if
every allocation packed perfectly into the slab size. If not, the wasted
space wouldn't be counted toward increasing the size, but allocations
over the size threshold *would*. And since the allocations over the size
threshold might be much larger than the slab size, this could have
somewhat surprising consequences where we rapidly grow the slab size.

This currently requires adding state to the allocator to track the
number of slabs currently allocated, but that isn't too bad. I'm
planning further changes to the allocator that will make this state fall
out even more naturally.

It still doesn't fully decouple the growth rate from the allocations
which are over the size threshold. That fix is coming later.

This specific fix will allow making the entire thing into a more
stateless device and lifting the parameters into template parameters
rather than runtime parameters.

llvm-svn: 204993

10 years ago[cleanup] Hoist the initialization and constants for slab sizes to the
Chandler Carruth [Fri, 28 Mar 2014 08:53:08 +0000 (08:53 +0000)]
[cleanup] Hoist the initialization and constants for slab sizes to the
top of the default jit memory manager. This will allow them to be used
as template parameters rather than runtime parameters in a subsequent
commit.

llvm-svn: 204992

10 years ago[sanitizer] Intercept ftime.
Evgeniy Stepanov [Fri, 28 Mar 2014 08:33:32 +0000 (08:33 +0000)]
[sanitizer] Intercept ftime.

llvm-svn: 204991

10 years agoclang-format: Recognize more ObjC blocks with parameters/return type.
Daniel Jasper [Fri, 28 Mar 2014 07:48:59 +0000 (07:48 +0000)]
clang-format: Recognize more ObjC blocks with parameters/return type.

llvm-svn: 204990

10 years agoFix format.
Rui Ueyama [Fri, 28 Mar 2014 05:17:59 +0000 (05:17 +0000)]
Fix format.

llvm-svn: 204989

10 years ago[ELF] Remove class declarations that do nothing.
Rui Ueyama [Fri, 28 Mar 2014 05:03:35 +0000 (05:03 +0000)]
[ELF] Remove class declarations that do nothing.

These classes are declared in a .cpp file but not used in the same compliation
unit. They seems to have been copy-and-pasted from ELFReader.h.

llvm-svn: 204988

10 years agoReplace nested switches with if.
Rui Ueyama [Fri, 28 Mar 2014 03:29:01 +0000 (03:29 +0000)]
Replace nested switches with if.

llvm-svn: 204987

10 years agoRemove extraneous parentheses.
Rui Ueyama [Fri, 28 Mar 2014 03:26:24 +0000 (03:26 +0000)]
Remove extraneous parentheses.

llvm-svn: 204986

10 years agoclang-cl wants MSVC-style win32
Hans Wennborg [Fri, 28 Mar 2014 01:19:04 +0000 (01:19 +0000)]
clang-cl wants MSVC-style win32

This should fix the clang-cl tests after the Windows target triple
canonicalization (r204978)

llvm-svn: 204985

10 years agoFix typo.
Rui Ueyama [Fri, 28 Mar 2014 00:59:43 +0000 (00:59 +0000)]
Fix typo.

llvm-svn: 204984

10 years agoPBQP: Minor cleanups to r204857
David Blaikie [Thu, 27 Mar 2014 23:42:21 +0000 (23:42 +0000)]
PBQP: Minor cleanups to r204857

* Use assignment instead of swap (since the original value is being
  destroyed anyway)

* Rename "updateAdjEdgeId" to "setAdjEdgeId"

llvm-svn: 204983

10 years agoMake anonymous namespace as small as possible.
Rui Ueyama [Thu, 27 Mar 2014 23:34:32 +0000 (23:34 +0000)]
Make anonymous namespace as small as possible.

llvm-svn: 204982

10 years agoC++11: convert verbose loops to range-based loops.
Adrian Prantl [Thu, 27 Mar 2014 23:30:04 +0000 (23:30 +0000)]
C++11: convert verbose loops to range-based loops.

llvm-svn: 204981

10 years ago[PowerPC] Use a small cleanup pass to remove VSX self copies
Hal Finkel [Thu, 27 Mar 2014 23:12:31 +0000 (23:12 +0000)]
[PowerPC] Use a small cleanup pass to remove VSX self copies

As explained in r204976, because of how the allocation of VSX registers
interacts with the call-lowering code, we sometimes end up generating self VSX
copies. Specifically, things like this:
  %VSL2<def> = COPY %F2, %VSL2<imp-use,kill>
(where %F2 is really a sub-register of %VSL2, and so this copy is a nop)

This adds a small cleanup pass to remove these prior to post-RA scheduling.

llvm-svn: 204980

10 years agoProvide a target override for the cost of using a callee-saved register
Manman Ren [Thu, 27 Mar 2014 23:10:04 +0000 (23:10 +0000)]
Provide a target override for the cost of using a callee-saved register
for the first time.

Thanks Andy for the discussion.
rdar://16162005

llvm-svn: 204979

10 years agoUse the new Windows environment for target detection
Saleem Abdulrasool [Thu, 27 Mar 2014 22:50:18 +0000 (22:50 +0000)]
Use the new Windows environment for target detection

This follows the LLVM change to canonicalise the Windows target triple
spellings.  Rather than treating each Windows environment as a single entity,
the environments are now modelled properly as an environment.  This is a
mechanical change to convert the triple use to reflect that change.

llvm-svn: 204978

10 years agoCanonicalise Windows target triple spellings
Saleem Abdulrasool [Thu, 27 Mar 2014 22:50:05 +0000 (22:50 +0000)]
Canonicalise Windows target triple spellings

Construct a uniform Windows target triple nomenclature which is congruent to the
Linux counterpart.  The old triples are normalised to the new canonical form.
This cleans up the long-standing issue of odd naming for various Windows
environments.

There are four different environments on Windows:

MSVC: The MS ABI, MSVCRT environment as defined by Microsoft
GNU: The MinGW32/MinGW32-W64 environment which uses MSVCRT and auxiliary libraries
Itanium: The MSVCRT environment + libc++ built with Itanium ABI
Cygnus: The Cygwin environment which uses custom libraries for everything

The following spellings are now written as:

i686-pc-win32 => i686-pc-windows-msvc
i686-pc-mingw32 => i686-pc-windows-gnu
i686-pc-cygwin => i686-pc-windows-cygnus

This should be sufficiently flexible to allow us to target other windows
environments in the future as necessary.

llvm-svn: 204977

10 years ago[PowerPC] Don't remove self VSX copies in PPCInstrInfo::copyPhysReg
Hal Finkel [Thu, 27 Mar 2014 22:46:28 +0000 (22:46 +0000)]
[PowerPC] Don't remove self VSX copies in PPCInstrInfo::copyPhysReg

Because of how the allocation of VSX registers interacts with the call-lowering
code, we sometimes end up generating self VSX copies. Specifically, things like
this:
  %VSL2<def> = COPY %F2, %VSL2<imp-use,kill>
(where %F2 is really a sub-register of %VSL2, and so this copy is a nop)

The problem is that ExpandPostRAPseudos always assumes that *some* instruction
has been inserted, and adds implicit defs to it. This is a problem if no copy
was inserted because it can cause subtle problems during post-RA scheduling.
These self copies will have to be removed some other way.

llvm-svn: 204976

10 years agoTemporarily remove assert while I dig in to issues that it's causing for LLDB.
Lang Hames [Thu, 27 Mar 2014 22:45:42 +0000 (22:45 +0000)]
Temporarily remove assert while I dig in to issues that it's causing for LLDB.

<rdar://problem/16349536>

llvm-svn: 204975

10 years agoReverting r204968 and r204969; while more build bots are happy with the results,...
Aaron Ballman [Thu, 27 Mar 2014 22:37:56 +0000 (22:37 +0000)]
Reverting r204968 and r204969; while more build bots are happy with the results, some still have link errors.

llvm-svn: 204974

10 years agoRevert "[C++11] Do not check __GXX_EXPERIMENTAL_CXX0X__."
Rui Ueyama [Thu, 27 Mar 2014 22:36:06 +0000 (22:36 +0000)]
Revert "[C++11] Do not check __GXX_EXPERIMENTAL_CXX0X__."

This reverts commit r204964 because it disabled "= delete", "constexpr"
and "explicit" on GCC.

llvm-svn: 204973

10 years ago[X86][Vector Cost Model] Add a comment to explain the workaround
Quentin Colombet [Thu, 27 Mar 2014 22:27:41 +0000 (22:27 +0000)]
[X86][Vector Cost Model] Add a comment to explain the workaround
in my previous commit (r204884).

<rdar://problem/16381225>

llvm-svn: 204972

10 years ago[PowerPC] Fix v2f64 vector extract and related patterns
Hal Finkel [Thu, 27 Mar 2014 22:22:48 +0000 (22:22 +0000)]
[PowerPC] Fix v2f64 vector extract and related patterns

First, v2f64 vector extract had not been declared legal (and so the existing
patterns were not being used). Second, the patterns for that, and for
scalar_to_vector, should really be a regclass copy, not a subregister
operation, because the VSX registers directly hold both the vector and scalar data.

llvm-svn: 204971

10 years agoAdd a comment on kindLayoutBefore.
Rui Ueyama [Thu, 27 Mar 2014 22:19:14 +0000 (22:19 +0000)]
Add a comment on kindLayoutBefore.

llvm-svn: 204970

10 years agoUrgh. Amending r204968 which somehow missed this file!
Aaron Ballman [Thu, 27 Mar 2014 22:15:55 +0000 (22:15 +0000)]
Urgh. Amending r204968 which somehow missed this file!

llvm-svn: 204969

10 years agoReapplying r204952 with fixes which should hopefully resolve linking issues with...
Aaron Ballman [Thu, 27 Mar 2014 22:12:09 +0000 (22:12 +0000)]
Reapplying r204952 with fixes which should hopefully resolve linking issues with non-MSVC compilers.

llvm-svn: 204968

10 years agoSpelling corrections.
Rui Ueyama [Thu, 27 Mar 2014 22:11:58 +0000 (22:11 +0000)]
Spelling corrections.

llvm-svn: 204967

10 years agoDo not use layout-before to layout atoms.
Rui Ueyama [Thu, 27 Mar 2014 22:08:26 +0000 (22:08 +0000)]
Do not use layout-before to layout atoms.

Currently we use both layout-after and layout-before edges to specify atom
orders in the resulting executable. We have a complex piece of code in
LayoutPass.cpp to deal with both types of layout specifiers.

(In the following description, I denote "Atom A having a layout-after edge
to B" as "A -> B", and A's layout-before to B as "A => B".)

However, that complexity is not really needed for this reason: If there
are atoms such that A => B, B -> A is always satisifed, so using only layout-
after relationships will yield the same result as the current code.

Actually we have a piece of complex code that verifies that, for each A -> B,
B => [ X => Y => ... => Z => ] A is satsified, where X, Y, ... Z are all
zero-size atoms. We can get rid of the code from our codebase because layout-
before is basically redundant.

I think we can simplify the code for layout-after even more than this, but
I want to just remove this pass for now for simplicity.

Layout-before edges are still there for dead-stripping, so this change won't
break it. We will remove layout-before in a followup patch once we fix the
dead-stripping pass.

Differential Revision: http://llvm-reviews.chandlerc.com/D3164

llvm-svn: 204966

10 years agoObjective-C. Make multiple selector warning
Fariborz Jahanian [Thu, 27 Mar 2014 21:59:01 +0000 (21:59 +0000)]
Objective-C. Make multiple selector warning
an opt-in option under -Wselector-type-mismatch.
// rdar://16445728

llvm-svn: 204965

10 years ago[C++11] Do not check __GXX_EXPERIMENTAL_CXX0X__.
Rui Ueyama [Thu, 27 Mar 2014 21:56:29 +0000 (21:56 +0000)]
[C++11] Do not check __GXX_EXPERIMENTAL_CXX0X__.

Summary: Checking the experimental flag for C++0x is no longer needed.

Differential Revision: http://llvm-reviews.chandlerc.com/D3206

llvm-svn: 204964

10 years ago[PowerPC] Expand v2i64 shifts
Hal Finkel [Thu, 27 Mar 2014 21:26:33 +0000 (21:26 +0000)]
[PowerPC] Expand v2i64 shifts

These operations need to be expanded during legalization so that isel does not
crash. In theory, we might be able to custom lower some of these. That,
however, would need to be follow-up work.

llvm-svn: 204963

10 years agoRegister Allocator: refactoring and add comments.
Manman Ren [Thu, 27 Mar 2014 21:21:57 +0000 (21:21 +0000)]
Register Allocator: refactoring and add comments.

No functionality change. Thanks Andy for reviewing.

rdar://16162005

llvm-svn: 204962

10 years agoRemove another unused argument.
Rafael Espindola [Thu, 27 Mar 2014 20:49:35 +0000 (20:49 +0000)]
Remove another unused argument.

llvm-svn: 204961

10 years agoWin installer: provide a pretty icon
Hans Wennborg [Thu, 27 Mar 2014 20:48:37 +0000 (20:48 +0000)]
Win installer: provide a pretty icon

llvm-svn: 204960

10 years agoSupport for -Wa,-compress-debug-sections.
David Blaikie [Thu, 27 Mar 2014 20:47:30 +0000 (20:47 +0000)]
Support for -Wa,-compress-debug-sections.

Also, while I'm here, support -nocompress-debug-sections too.

llvm-svn: 204959

10 years agoDebugInfo: Support for compressed debug info sections
David Blaikie [Thu, 27 Mar 2014 20:45:58 +0000 (20:45 +0000)]
DebugInfo: Support for compressed debug info sections

1) When creating a .debug_* section and instead create a .zdebug_
   section.
2) When creating a fragment in a .zdebug_* section, make it a compressed
   fragment.
3) When computing the size of a compressed section, compress the data
   and use the size of the compressed data.
4) Emit the compressed bytes.

Also, check that only if a section has a compressed fragment, then that
is the only fragment in the section.

Assert-fail if the fragment's data is modified after it is compressed.

Initial review on llvm-commits by Eric Christopher and Rafael Espindola.

llvm-svn: 204958

10 years agoDebugInfo: TargetOptions/MCAsmInfo support for compressed debug info sections
David Blaikie [Thu, 27 Mar 2014 20:45:41 +0000 (20:45 +0000)]
DebugInfo: TargetOptions/MCAsmInfo support for compressed debug info sections

llvm-svn: 204957

10 years agoRemove unused argument.
Rafael Espindola [Thu, 27 Mar 2014 20:41:17 +0000 (20:41 +0000)]
Remove unused argument.

llvm-svn: 204956

10 years agoReverting r204952, while I figure out what's going on with the makefile build.
Aaron Ballman [Thu, 27 Mar 2014 20:36:32 +0000 (20:36 +0000)]
Reverting r204952, while I figure out what's going on with the makefile build.

llvm-svn: 204955

10 years agoDon't emit exit-time destructor warnings for trivial explicitly defaulted dtors
Stephan Tolksdorf [Thu, 27 Mar 2014 20:23:36 +0000 (20:23 +0000)]
Don't emit exit-time destructor warnings for trivial explicitly defaulted dtors

This commit also adds an additional test case for the global destructor warning.

Reviewed in http://llvm-reviews.chandlerc.com/D3205

llvm-svn: 204954

10 years agoRecognize simple cases of trivial explicitly defaulted public dtors as irrelevant
Stephan Tolksdorf [Thu, 27 Mar 2014 20:23:12 +0000 (20:23 +0000)]
Recognize simple cases of trivial explicitly defaulted public dtors as irrelevant

Reviewed in http://llvm-reviews.chandlerc.com/D3190

llvm-svn: 204953

10 years agoClean up the __has_attribute implementation without modifying its behavior.
Aaron Ballman [Thu, 27 Mar 2014 20:19:24 +0000 (20:19 +0000)]
Clean up the __has_attribute implementation without modifying its behavior.

Replaces the tablegen-driven AttrSpellings.inc, which lived in the lexing layer with AttrHasAttributeImpl.inc, which lives in the basic layer. Updates the preprocessor to call through to this new functionality which can take additional information into account (such as scopes and syntaxes).

Expose the ability for parts of the compiler to ask whether an attribute is supported for a given spelling (including scope), syntax, triple and language options.

llvm-svn: 204952

10 years agoFix PR18307: Properly (de)serialize inherited constructors and their using declarations
Stephan Tolksdorf [Thu, 27 Mar 2014 19:22:19 +0000 (19:22 +0000)]
Fix PR18307: Properly (de)serialize inherited constructors and their using declarations

Reviewed in http://llvm-reviews.chandlerc.com/D3102

llvm-svn: 204951

10 years agoImprove handling of bool expressions in template arguments.
Manuel Klimek [Thu, 27 Mar 2014 19:00:52 +0000 (19:00 +0000)]
Improve handling of bool expressions in template arguments.

Now correctly formats:
  foo<true && false>();

llvm-svn: 204950

10 years agoAdd an explanatory comment and FIXME about the function declaration
Eric Christopher [Thu, 27 Mar 2014 18:50:35 +0000 (18:50 +0000)]
Add an explanatory comment and FIXME about the function declaration
for a subprogram DIE.

llvm-svn: 204949

10 years agoInstCombine: Don't combine constants on unsigned icmps
Reid Kleckner [Thu, 27 Mar 2014 17:49:27 +0000 (17:49 +0000)]
InstCombine: Don't combine constants on unsigned icmps

Fixes a miscompile introduced in r204912.  It would miscompile code like
(unsigned)(a + -49) <= 5U.  The transform would turn this into
(unsigned)a < 55U, which would return true for values in [0, 49], when
it should not.

llvm-svn: 204948

10 years agoAdd clang-tidy check to remove redundant .get() calls on smart pointers.
Samuel Benzaquen [Thu, 27 Mar 2014 17:42:26 +0000 (17:42 +0000)]
Add clang-tidy check to remove redundant .get() calls on smart pointers.

Summary:
This check finds and removes redundant .get() calls on smart pointers.
Example:
  ptr.get()->Foo()   ==>   ptr->Foo()

Reviewers: alexfh

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3186

llvm-svn: 204947

10 years agoR600: Implement isZExtFree.
Matt Arsenault [Thu, 27 Mar 2014 17:23:31 +0000 (17:23 +0000)]
R600: Implement isZExtFree.

This allows 64-bit operations that are truncated to be reduced
to 32-bit ones.

llvm-svn: 204946

10 years agoR600/SI: Fix unreachable with a sext_in_reg to an illegal type.
Matt Arsenault [Thu, 27 Mar 2014 17:23:24 +0000 (17:23 +0000)]
R600/SI: Fix unreachable with a sext_in_reg to an illegal type.

llvm-svn: 204945

10 years agoComment parsing: use different comment styles in different test cases
Dmitri Gribenko [Thu, 27 Mar 2014 16:42:56 +0000 (16:42 +0000)]
Comment parsing: use different comment styles in different test cases

llvm-svn: 204944

10 years ago[mips] Some uses of isMips64()/hasMips64() are really tests for 64-bit GPR's
Daniel Sanders [Thu, 27 Mar 2014 16:42:17 +0000 (16:42 +0000)]
[mips] Some uses of isMips64()/hasMips64() are really tests for 64-bit GPR's

Summary:
No functional change since these predicates are (currently) synonymous.

Extracted from a patch by David Chisnall
His work was sponsored by: DARPA, AFRL

Differential Revision: http://llvm-reviews.chandlerc.com/D3202

llvm-svn: 204943

10 years agoComment parsing: attach comments to enums declared using the NS_ENUM macro
Dmitri Gribenko [Thu, 27 Mar 2014 16:40:51 +0000 (16:40 +0000)]
Comment parsing: attach comments to enums declared using the NS_ENUM macro

Previously we would only attach comments to the typedef.

llvm-svn: 204942

10 years agoEnforce the restriction that a parameter to a kernel function
David Tweed [Thu, 27 Mar 2014 16:34:11 +0000 (16:34 +0000)]
Enforce the restriction that a parameter to a kernel function
cannot be a pointer to the private address space (as clarified
in the OpenCL 1.2 specification).

Patch by Fraser Cormack!

llvm-svn: 204941

10 years ago[AArch64] Lower SHL_PARTS, SRA_PARTS and SRL_PARTS
Logan Chien [Thu, 27 Mar 2014 16:28:09 +0000 (16:28 +0000)]
[AArch64] Lower SHL_PARTS, SRA_PARTS and SRL_PARTS

Lower SHL_PARTS, SRA_PARTS and SRL_PARTS to perform 128-bit integer shift

Patch by GuanHong Liu.

llvm-svn: 204940

10 years agoInstrProf: Pull in runtime on non-Darwin
Duncan P. N. Exon Smith [Thu, 27 Mar 2014 16:20:02 +0000 (16:20 +0000)]
InstrProf: Pull in runtime on non-Darwin

r204379 changed the way the profile runtime gets pulled in, but missed
updating non-Darwin targets.

llvm-svn: 204939

10 years agoAdd a module cache path to the test that uses -fmodules
Dmitri Gribenko [Thu, 27 Mar 2014 16:15:30 +0000 (16:15 +0000)]
Add a module cache path to the test that uses -fmodules

llvm-svn: 204938

10 years agoclang-format: Avoid line-breaks that increase the current column.
Daniel Jasper [Thu, 27 Mar 2014 16:14:13 +0000 (16:14 +0000)]
clang-format: Avoid line-breaks that increase the current column.

While these might make sense for some rule (e.g. break after multi-line
operand), they generally appear ugly and confusing.

Before:
  fffffffffff(R\"x(
  multiline raw string literal xxxxxxxxxxxxxx
  )x\" + bbbbbb)

After:
  fffffffffff(R\"x(
  multiline raw string literal xxxxxxxxxxxxxx
  )x\" +
              bbbbbb)

llvm-svn: 204937

10 years agoComment parsing: when comment ranges are deserialized from multiple modules,
Dmitri Gribenko [Thu, 27 Mar 2014 15:40:39 +0000 (15:40 +0000)]
Comment parsing: when comment ranges are deserialized from multiple modules,
correctly order comments in SourceManager::isBeforeInTranslationUnit() order

Unfortunately, this is not as simple as it was implemented previously, and
actually requires doing a merge sort.

llvm-svn: 204936

10 years agoHandle and warn on aliases to weak aliases.
Rafael Espindola [Thu, 27 Mar 2014 15:27:20 +0000 (15:27 +0000)]
Handle and warn on aliases to weak aliases.

This produces valid IR now that llvm rejects aliases to weak aliases and warns
the user that the resolution is not changed if the weak alias is overridden.

llvm-svn: 204935

10 years agoPrevent alias from pointing to weak aliases.
Rafael Espindola [Thu, 27 Mar 2014 15:26:56 +0000 (15:26 +0000)]
Prevent alias from pointing to weak aliases.

This adds back r204781.

Original message:

Aliases are just another name for a position in a file. As such, the
regular symbol resolutions are not applied. For example, given

define void @my_func() {
  ret void
}
@my_alias = alias weak void ()* @my_func
@my_alias2 = alias void ()* @my_alias

We produce without this patch:

        .weak   my_alias
my_alias = my_func
        .globl  my_alias2
my_alias2 = my_alias

That is, in the resulting ELF file my_alias, my_func and my_alias are
just 3 names pointing to offset 0 of .text. That is *not* the
semantics of IR linking. For example, linking in a

@my_alias = alias void ()* @other_func

would require the strong my_alias to override the weak one and
my_alias2 would end up pointing to other_func.

There is no way to represent that with aliases being just another
name, so the best solution seems to be to just disallow it, converting
a miscompile into an error.

llvm-svn: 204934

10 years ago[OPENMP] OMPExecutableDirective re-factoring
Alexander Musman [Thu, 27 Mar 2014 15:14:18 +0000 (15:14 +0000)]
[OPENMP] OMPExecutableDirective re-factoring

Store the number of clauses and children of OMPExecutableDirective and dynamically compute the locations of corresponding arrays.

http://llvm-reviews.chandlerc.com/D2977

llvm-svn: 204933

10 years ago[mips] Attempting to use register $32 should be an error instead of an assertion.
Daniel Sanders [Thu, 27 Mar 2014 15:00:44 +0000 (15:00 +0000)]
[mips] Attempting to use register $32 should be an error instead of an assertion.

Reviewers: matheusalmeida

Reviewed By: matheusalmeida

Differential Revision: http://llvm-reviews.chandlerc.com/D3201

llvm-svn: 204932

10 years agoClangTidy.cpp: Don't use non-static member initializer, for msc17.
NAKAMURA Takumi [Thu, 27 Mar 2014 14:53:37 +0000 (14:53 +0000)]
ClangTidy.cpp: Don't use non-static member initializer, for msc17.

llvm-svn: 204931