Commit Graph

61411 Commits

Author SHA1 Message Date
Xinliang David Li ddbdb1e0be [PGO] make profile prefix even shorter and more readable
llvm-svn: 255587
2015-12-15 00:33:12 +00:00
Xinliang David Li 8608513b69 [PGO] Shorten profile symbol prefixes
(test case update)
Profile symbols have long prefixes which waste space and creating pressure for linker.
This patch shortens the prefixes to minimal length without losing verbosity.

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

llvm-svn: 255576
2015-12-14 23:26:46 +00:00
Rafael Espindola 8ce88a59fd Update for llvm api change.
llvm-svn: 255572
2015-12-14 23:17:07 +00:00
George Burgess IV 8d141e0120 [Sema] Make nullness warnings appear in C++.
Given the following code:

    int *_Nullable ptr;
    int *_Nonnull nn = ptr;

...In C, clang will warn you about `nn = ptr`, because you're assigning
a nonnull pointer to a nullable pointer. In C++, clang issues no such
warning. This patch helps ensure that clang doesn't ever miss an
opportunity to complain about C++ code.

N.B. Though this patch has a differential revision link, the actual
review took place over email.

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

llvm-svn: 255556
2015-12-14 22:00:49 +00:00
Ben Craig cd7e9f143b Reordering fields to reduce padding in Clang. NFC
llvm-svn: 255552
2015-12-14 21:54:11 +00:00
Ben Craig 97c191c473 [PATCH] Adding checker to detect excess padding in records
The intent of this checker is to generate a report for any class / structure
that could reduce its padding by reordering the fields.  This results in a very
noisy checker.  To reduce the noise, this checker will currently only warn when
the number of bytes over "optimal" is more than 24.  This value is configurable
with -analyzer-config performance.Padding:AllowedPad=N.  Small values of
AllowedPad have the potential to generate hundreds of reports, and gigabytes
of HTML reports.

The checker searches for padding violations in two main ways.  First, it goes
record by record.  A report is generated if the fields could be reordered in a
way that reduces the padding by more than AllowedPad bytes.  Second, the
checker will generate a report if an array will cause more than AllowedPad
padding bytes to be generated.

The record checker currently skips many ABI specific cases.  Classes with base
classes are skipped because base class tail padding is ABI specific.  Bitfields
are just plain hard, and duplicating that code seems like a bad idea.  VLAs are
both uncommon and non-trivial to fix.

The array checker isn't very thorough right now.  It only checks to see if the
element type's fields could be reordered, and it doesn't recursively check to
see if any of the fields' fields could be reordered.  At some point in the
future, it would be nice if "arrays" could also look at array new usages and
malloc patterns that appear to be creating arrays.

llvm-svn: 255545
2015-12-14 21:38:59 +00:00
Petar Jovanovic 2f264c31d3 [PowerPC] Fix test/CodeGen/ppc-sfvarargs
The issue seems to be that .ll file may either use number of register
value or alias %numUsedRegs, so the check needs to cover both cases.

This will hopefully fix the last regression introduced by r255515.

llvm-svn: 255539
2015-12-14 20:30:02 +00:00
Petar Jovanovic 59a981a8f3 [PowerPC] Fix make-check issues
Previous change r255515 introduced a couple of issues likely caused by
a different configure setup.

llvm-svn: 255533
2015-12-14 19:22:35 +00:00
John McCall 9d145df4c8 Allow pseudo-destructor calls on forward-declared Objective-C class pointers.
rdar://18522255

llvm-svn: 255531
2015-12-14 19:12:54 +00:00
Hans Wennborg 4ae76c2692 clang-cl: make /Wall turn on both -Wall and -Wextra (PR25563)
The documentation suggests /Wall should really turn on -Wextra and any
other warnings that are not enabled by default. That would correspond
to Clang's -Weverything, but is probably not what users want.

llvm-svn: 255524
2015-12-14 18:46:11 +00:00
David Majnemer feeefb214d [MS ABI] Don't rely on terminatepad
We'd like to remove support for terminatepad from LLVM.  To do this, we
need to move Clang off of it first.  The intent behind terminatepad was
to carefully model exception specifications for the MSVC personality.

However, we don't support exception specifications for the MSVC
personality and neither does MSVC.  Instead, MSVC supports
all-or-nothing exception specifications.  We can model this limited
usage using cleanuppads which call std::terminate.

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

llvm-svn: 255521
2015-12-14 18:34:18 +00:00
Petar Jovanovic 88a328fbbe [Power PC] add soft float support for ppc32
This patch enables soft float support for ppc32 architecture and fixes
the ABI for variadic functions. This is the first in a set of patches
for soft float support in LLVM.

Patch by Strahinja Petrovic.

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

llvm-svn: 255515
2015-12-14 17:51:50 +00:00
Krzysztof Parzyszek 1065323eec [Hexagon] Xfail two tests that fail due to over-aligning arrays
llvm-svn: 255510
2015-12-14 17:17:20 +00:00
Krzysztof Parzyszek 1e6e3c60b4 [Hexagon] Update default paths and arguments
- Removed support for hexagonv3 and earlier.
- Added handling of hexagonv55 and hexagonv60.
- Added handling of target features (hvx, hvx-double).
- Updated paths to reflect current directory layout.

llvm-svn: 255502
2015-12-14 15:03:57 +00:00
Carlo Bertolli 6200a3d0f3 Add parse and sema of OpenMP distribute directive with all clauses except dist_schedule
llvm-svn: 255498
2015-12-14 14:51:25 +00:00
Alexey Bataev 33c56402d8 [OPENMP] Fix debug info for 'atomic' construct.
Debug info for statement under 'atomic' construct must point exactly to that statement, not the directive itself.

llvm-svn: 255487
2015-12-14 09:26:19 +00:00
Daniel Jasper 870d1bcdf9 clang-format: Add test for AlignAfterOpenBracket = AlwaysBreak in C++.
Revision 251405 added AlwaysBreak to support Google's JavaScript style. This
changeset complete existing AlignsAfterOpenBracket tests to exercise
AlwaysBreak for C++.

I thought this would be worthwhile.  With this option we can support request
from http://lists.llvm.org/pipermail/cfe-dev/2015-May/042942.html, that had
been requested a few times. This also partially solve related Bug 23422 and is
probably sufficient for most people.

  AlignAfterOpenBracket = FormatStyle::BAS_AlwaysBreak;
  BinPackArguments = false;
  BinPackParameters = false;

With these setting we obtain this formatting:

  void fooWithAVeryLongParamList(
      int firstParameter,
      int secondParameter
      int lastParameter)
  {
      object.alsoThisDoenstFitSoIBreakImmidiatly(
          firstParameter,
          secondParameter,
          lastParameter);
  }

Patch by Jean-Philippe Dufraigne, thank you.

llvm-svn: 255486
2015-12-14 08:41:18 +00:00
Daniel Jasper 96cbb502b7 clang-format: Extend Linux-brace-wrapping test.
llvm-svn: 255485
2015-12-14 08:33:07 +00:00
Daniel Jasper e87f5cf4ef clang-format: Fix style default for WebKit and Linux styles.
Brought up in codereviews:
http://reviews.llvm.org/D15445
http://reviews.llvm.org/D15485

llvm-svn: 255484
2015-12-14 08:24:16 +00:00
Craig Topper 84543b09cb [Sema] Add -Wparentheses warnings for '^' in '|' expressions and '&' in '^' expressions to compliment '&' in '|' that is already present. Matches gcc behavior.
llvm-svn: 255450
2015-12-13 05:41:41 +00:00
Craig Topper b0dfa7a79a [Sema] Write some checks for groups of BinaryOperatorKinds in terms of the predicates already available in BinaryOperator. NFC
llvm-svn: 255449
2015-12-13 05:41:37 +00:00
Xinliang David Li 13ec697056 Revert r255445: adding a new test case
llvm-svn: 255447
2015-12-13 04:45:49 +00:00
Xinliang David Li c79d69ddd7 Resubmit new test case after adding more constraint
llvm-svn: 255445
2015-12-13 03:03:35 +00:00
Xinliang David Li e82c58588d Revert 255436 : remove test that needs to be refined
llvm-svn: 255437
2015-12-12 18:49:37 +00:00
Xinliang David Li c8788d2a97 [PGO] add a test case with -no-integrated-as
llvm-svn: 255436
2015-12-12 17:39:38 +00:00
Xinliang David Li aab1fd16bc [PGO] Stop using invalid char in instr variable names.
(This is part-2 of the patch of r255434 -- 
fixing test cases, second try)

llvm-svn: 255435
2015-12-12 17:28:37 +00:00
Craig Topper 716d3088e1 Minor formatting cleanup. NFC
llvm-svn: 255428
2015-12-12 06:30:51 +00:00
Craig Topper f942fde819 [Sema] Simplify a couple if statements. Explicitly check up front that only one of the expressions is a comparision op. Then if we find that either is a bitwise op, we know it must be the other one. NFC
llvm-svn: 255427
2015-12-12 06:30:48 +00:00
David Majnemer f052f99f08 Try to appease a buildbot.
llvm-svn: 255424
2015-12-12 05:50:32 +00:00
David Majnemer 4e52d6f811 Update clang to use the updated LLVM EH instructions
Depends on D15139.

Reviewers: rnk

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

llvm-svn: 255423
2015-12-12 05:39:21 +00:00
Richard Smith 97047d8cb6 Preserve source location information for qualified names used in a constructor
initializer list to name a base class. Patch by Shahms King!

llvm-svn: 255420
2015-12-12 02:17:54 +00:00
Easwaran Raman dd4c71ca6e Revert r254647.
Reason: The testcase fails in many architectures.

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

llvm-svn: 255416
2015-12-12 01:11:09 +00:00
Easwaran Raman d547e5e168 Attach maximum function count to Module when using PGO mode
This sets the maximum entry count among all functions in the program to the
module using module flags. This allows the optimizer to use this information.

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

llvm-svn: 255397
2015-12-12 00:31:02 +00:00
Peter Collingbourne 93bb862f9b docs: Document -fno-sanitize-trap= and -fsanitize-recover= flags for CFI.
llvm-svn: 255393
2015-12-11 23:54:18 +00:00
Richard Smith 8aed422294 [modules] If the semantic and lexical DC of a decl are the same, write out the
second one as 0 instead of writing the same bits to the module file twice.
This typically reduces PCM file size by about 1%.

llvm-svn: 255384
2015-12-11 22:41:00 +00:00
Richard Smith 84824edd0b Allow non-defining declarations of class template partial specializations to
have a nested name specifier. Strictly speaking, forward declarations of class
template partial specializations are not permitted at all, but that seems like
an obvious wording defect, and if we allow them without a nested name specifier
we should also allow them with a nested name specifier.

llvm-svn: 255383
2015-12-11 22:39:52 +00:00
Nico Weber c80367417c [clang-cl] Let /W4 map to -Wall -Wextra instead of just -Wall.
There's no way to make a flag alias to two flags, so add a /WCL4 flag that
maps to the All, Extra diag groups.  Fixes PR25563.

http://reviews.llvm.org/D15350

llvm-svn: 255382
2015-12-11 22:31:16 +00:00
Ben Langmuir 237ccb165e Reapply "[Modules] Fix regression when an elaborated-type-specifier mentions a hidden tag"
Now not trying to use a C++ lookup mechanism in C (d'oh).  Unqualified
lookup is actually fine for this case in C.

llvm-svn: 255377
2015-12-11 22:05:13 +00:00
Reid Kleckner 436745143a Unify diagnostics for type defintitions in bad contexts
The message for a type definition in an "if" condition was different
from the other three for no particular reason.

llvm-svn: 255372
2015-12-11 21:39:12 +00:00
Nick Lewycky 6ee53bc085 Error on redeclaring with a conflicting asm label and on redeclaring with an asm label after the first ODR-use. Detects problems like the one in PR22830 where gcc and clang both compiled the file but with different behaviour.
llvm-svn: 255371
2015-12-11 21:28:55 +00:00
Xinliang David Li e1769ef559 [PGO] Revert r255366: solution incomplete, not handling lambda yet
llvm-svn: 255368
2015-12-11 20:23:12 +00:00
Xinliang David Li 871daea550 [PGO] Stop using invalid char in instr variable names.
(This is part-2 of the patch -- fixing test cases)

Before the patch, -fprofile-instr-generate compile will fail
if no integrated-as is specified when the file contains
any static functions (the -S output is also invalid).

This patch fixed the issue. With the change, the index format
version will be bumped up by 1. Backward compatibility is 
preserved with this change.

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

llvm-svn: 255366
2015-12-11 19:53:35 +00:00
Anastasia Stulova 2446b8ba8a [OpenCL 2.0] In OpenCL v2.0 s6.5 all pointers are implicitly in generic
address space unless address space is explicitly specified.

Correct the behavior of NULL constant detection -
generic AS void pointer should be accepted as a valid NULL constant.

http://reviews.llvm.org/D15293

llvm-svn: 255346
2015-12-11 17:41:19 +00:00
Anastasia Stulova f016a1bb86 Reverting r255337 as it seems to kill bots. Needs investigation.
llvm-svn: 255339
2015-12-11 15:23:00 +00:00
Anastasia Stulova 12e484e80a [OpenCL 2.0] In OpenCL v2.0 s6.5 all pointers are implicitly in generic
address space unless address space is explicitly specified.

Correct the behavior of NULL constant detection -
generic AS void pointer should be accepted as a valid NULL constant.

http://reviews.llvm.org/D15293

llvm-svn: 255337
2015-12-11 13:49:15 +00:00
Saleem Abdulrasool 20f733acc4 Driver: add multilibs for ARM EB
This improves the coverage for the multilib directories used for ARM.  Also add
tests covering the internal triple (thumbv7-*).  The Juno board can be run in
this configuration.

llvm-svn: 255328
2015-12-11 06:20:59 +00:00
Xinliang David Li 9c586b6c8f [PGO] Add a test case to cover version-3 format
llvm-svn: 255326
2015-12-11 04:02:57 +00:00
John McCall dc40b618cf Correctly type-check the default arguments of local functions
when eagerly instantiating them.

rdar://23721638

llvm-svn: 255325
2015-12-11 01:56:36 +00:00
Ben Langmuir 38f2bfbbe4 Revert "[Modules] Fix regression when an elaborated-type-specifier mentions a hidden tag"
This is causing assertion failures; reverting until I can fix.

This reverts commit r255267

llvm-svn: 255324
2015-12-11 01:44:43 +00:00
Faisal Vali 1e5dfedae7 Add some more tests for initializer lists related to CWG1591
llvm-svn: 255323
2015-12-11 01:04:30 +00:00