Commit Graph

156282 Commits

Author SHA1 Message Date
Dmitri Gribenko 1e50cbf366 Comment parsing: fix a bug where a line with whitespace between two paragraphs
would cause us to concatenate these paragraphs into a single one.

The no-op whitespace churn in test/Index test happened because these tests
don't use the correct approach for testing and are more strict than required
for they are testing.

llvm-svn: 189126
2013-08-23 18:03:40 +00:00
Hans Wennborg fe06e811a3 CMake: build llvm-config on Windows.
It was previously not being built on Windows because the cmake file relied
on a sed script to generate a .in file that llvm-config needs.

By using cmake's configure_file function, we can get rid off the sed hack,
and also have this work on Windows.

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

llvm-svn: 189125
2013-08-23 17:59:13 +00:00
Andrew Trick 475a9911ca PrintVRegOrUnit
llvm-svn: 189124
2013-08-23 17:48:53 +00:00
Andrew Trick e4c1ba762d Rename to RegPressure API parameters RegUnits.
llvm-svn: 189123
2013-08-23 17:48:51 +00:00
Andrew Trick 01bc216482 Simplify RegPressure helpers.
llvm-svn: 189122
2013-08-23 17:48:48 +00:00
Andrew Trick 86a7061e5d Add a convenient PSetIterator for visiting pressure sets affected by a register.
llvm-svn: 189121
2013-08-23 17:48:46 +00:00
Andrew Trick c01b00400d Adds cyclic critical path computation and heuristics, temporarily disabled.
Estimate the cyclic critical path within a single block loop. If the
acyclic critical path is longer, then the loop will exhaust OOO
resources after some number of iterations. If lag between the acyclic
critical path and cyclic critical path is longer the the time it takes
to issue those loop iterations, then aggressively schedule for
latency.

llvm-svn: 189120
2013-08-23 17:48:43 +00:00
Dmitri Gribenko 11f54e86bb Fix indentation
llvm-svn: 189119
2013-08-23 17:48:41 +00:00
Andrew Trick 8dd26f002f MI Sched: record local vreg uses.
This will be used to compute the cyclic critical path and to
update precomputed per-node pressure differences.
In the longer term, it could also be used to speed up LiveInterval
update by avoiding visiting all global vreg users.

llvm-svn: 189118
2013-08-23 17:48:39 +00:00
Andrew Trick cfb42ce923 Remove unused field.
llvm-svn: 189117
2013-08-23 17:48:36 +00:00
Andrew Trick a53e101627 mi-sched: Don't call MBB.size() in initSUnits. The driver already has instr count.
This fixes a pathological compile time problem with very large blocks
and lots of scheduling boundaries.

llvm-svn: 189116
2013-08-23 17:48:33 +00:00
Dmitri Gribenko db6adaba68 Use CharInfo.h routines in TextComment::isWhitespaceNoCache
llvm-svn: 189115
2013-08-23 17:45:43 +00:00
Howard Hinnant fc88dbd298 Debug mode for string. This commit also marks the first time libc++ debug-mode has found a bug (found one in regex). Had to play with extern templates a bit to get this to work since string is heavily used within libc++.dylib.
llvm-svn: 189114
2013-08-23 17:37:05 +00:00
Jordan Rose 9217aa3b15 Revise -Wnewline-eof test per feedback from Dmitri.
llvm-svn: 189113
2013-08-23 16:12:49 +00:00
Robert Wilhelm 25284cc95b Use pop_back_val() instead of both back() and pop_back().
No functionality change intended.

llvm-svn: 189112
2013-08-23 16:11:15 +00:00
Jim Cownie b09bb1ce19 Checking commit access; added one space
llvm-svn: 189111
2013-08-23 15:51:37 +00:00
Jordan Rose 4c55d45b13 Respect -Wnewline-eof even in C++11 mode.
If the user has requested this warning, we should emit it, even if it's not
an extension in the current language mode. However, being an extension is
more important, so prefer the pedantic warning or the pedantic-compatibility
warning if those are enabled.

<rdar://problem/12922063>

llvm-svn: 189110
2013-08-23 15:42:01 +00:00
Joey Gouly c7cda1c59e [ARM] Fix another ARM FastISel -verify-machineinstrs issue.
llvm-svn: 189109
2013-08-23 15:20:56 +00:00
Daniel Jasper 0649d36172 clang-format: Fix indentation relative to unary expressions.
This should be done, only if we are still in the unary expression's
scope.

Before:
  bool aaaa = !aaaaaaaa(  // break
                   aaaaaaaaaaa);
  *aaaaaa = aaaaaaa( // break
       aaaaaaaaaaaaaaaa);

After:
  bool aaaa = !aaaaaaaa(  // break
                   aaaaaaaaaaa); // <- (unchanged)
  *aaaaaa = aaaaaaa( // break
      aaaaaaaaaaaaaaaa); // <- (no longer indented relative to "*")

llvm-svn: 189108
2013-08-23 15:14:03 +00:00
Virgile Bello b2f1fb2943 MingW compilation (windows). Includes various refactoring to improve portability.
llvm-svn: 189107
2013-08-23 12:44:05 +00:00
Daniel Sanders fcfa0afd7a [mips][msa] Few MSA Builtins have side-effects. Added IntrNoMem to those that don't.
llvm-svn: 189106
2013-08-23 12:21:25 +00:00
Evgeniy Stepanov 0d13c707d5 [msan] Extend VAArgTLSOverwrite test.
This test now covers LLVM r189104.

llvm-svn: 189105
2013-08-23 12:13:18 +00:00
Evgeniy Stepanov d42863cc1f [msan] Fix handling of va_arg overflow area on x86_64.
The code was erroneously reading overflow area shadow from the TLS slot,
bypassing the local copy. Reading shadow directly from TLS is wrong, because
it can be overwritten by a nested vararg call, if that happens before va_start.

llvm-svn: 189104
2013-08-23 12:11:00 +00:00
Joey Gouly e3dd684aad [ARMv8] Add CodeGen for VMAXNM/VMINNM.
llvm-svn: 189103
2013-08-23 12:01:13 +00:00
Daniel Jasper f438cb7619 clang-format: Fix corner case for string splitting ..
.. in conjunction with Style.AlwaysBreakBeforeMultilineStrings. Also,
simplify the implementation by handling newly split strings and already
split strings by the same code.

llvm-svn: 189102
2013-08-23 11:57:34 +00:00
Andrea Di Biagio 377496bbad Add function attribute 'optnone'.
This function attribute indicates that the function is not optimized
by any optimization or code generator passes with the 
exception of interprocedural optimization passes.

llvm-svn: 189101
2013-08-23 11:53:55 +00:00
Richard Sandiford 03481334b5 [SystemZ] Add basic prefetch support
Just the instructions and intrinsics for now.

llvm-svn: 189100
2013-08-23 11:36:42 +00:00
Richard Sandiford 24e597b8c5 [SystemZ] Try reversing comparisons whose first operand is in memory
This allows us to make more use of the many compare reg,mem instructions.

llvm-svn: 189099
2013-08-23 11:27:19 +00:00
Richard Sandiford a481f58542 [SystemZ] Prefer LHI;ST... over LAY;MV...
If we had a store of an integer to memory, and the integer and store size
were suitable for a form of MV..., we used MV... no matter what.  We could
then have sequences like:

    lay %r2, 0(%r3,%r4)
    mvi 0(%r2), 4

In these cases it seems better to force the constant into a register
and use a normal store:

    lhi %r2, 4
    stc %r2, 0(%r3, %r4)

since %r2 is more likely to be hoisted and is easier to rematerialize.

llvm-svn: 189098
2013-08-23 11:18:53 +00:00
Richard Sandiford 37cd6cfba2 Turn MipsOptimizeMathLibCalls into a target-independent scalar transform
...so that it can be used for z too.  Most of the code is the same.
The only real change is to use TargetTransformInfo to test when a sqrt
instruction is available.

The pass is opt-in because at the moment it only handles sqrt.

llvm-svn: 189097
2013-08-23 10:27:02 +00:00
Tim Northover 1f1b2756a4 ARM: make sure ARM-mode pseudo-inst requires IsARM
I'd forgotten that "Requires" blocks override rather than add to the
constraints, so my pseudo-instruction was being selected in Thumb mode leading
to nonsense instructions.

rdar://problem/14817358

llvm-svn: 189096
2013-08-23 10:16:39 +00:00
Daniel Sanders 3c9a0ad444 [mips][msa] Split MSA128 regset into size-specific sets containing the same registers.
llvm-svn: 189095
2013-08-23 10:10:13 +00:00
Daniel Jasper f93551c8b1 clang-format: Handle trailing commas in column layout of braced list.
Before, this was causing errors.

Also exit early in breakProtrudingToken() (before the expensive call to
SourceManager::getSpellingColumnNumber()). This makes formatting huge
(100k+-item) braced lists possible.

llvm-svn: 189094
2013-08-23 10:05:49 +00:00
Robert Lytton bff06ce221 correct test RUN parameters
llvm-svn: 189093
2013-08-23 09:27:44 +00:00
Alexey Samsonov 903c3250d2 Slightly improve lint checker script and fix a few style issues
llvm-svn: 189092
2013-08-23 07:43:56 +00:00
Alexey Samsonov 6dae24df16 80 cols
llvm-svn: 189091
2013-08-23 07:42:51 +00:00
Pavel Labath 02b64d46a0 [analyzer] Refactor conditional expression evaluating code
Summary:
Instead of digging through the ExplodedGraph, to figure out which edge brought
us here, I compute the value of conditional expression by looking at the
sub-expression values.

To do this, I needed to change the liveness algorithm a bit -- now, the full
conditional expression also depends on all atomic sub-expressions, not only the
outermost ones.

Reviewers: jordan_rose

CC: cfe-commits

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

llvm-svn: 189090
2013-08-23 07:19:22 +00:00
Alexey Samsonov a9debbfb01 Make DWARFCompileUnit non-copyable
Summary:
This is a part of D1164. DWARFCompileUnit is not that lightweight
to copy it around, and we want it to own corresponding .dwo compile unit
eventually.

Reviewers: echristo

Reviewed By: echristo

CC: llvm-commits

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

llvm-svn: 189089
2013-08-23 06:56:01 +00:00
David Majnemer da45a0fa6f arc commit didn't add this because it wasn't in the patch...
llvm-svn: 189088
2013-08-23 05:42:19 +00:00
David Majnemer 61c39a1ccd Sema: Properly support Microsoft-mode template arguments
Summary:
There were two things known to be wrong with our implementation of MSVC
mode template arguments:

- We didn't properly handle __uuidof/CXXUuidofExpr and skipped all type
  checking completely.
- We didn't allow for MSVC's extension of allowing certain constant
  "foldable" expressions from showing up in template arguments.
  They allow various casts dereference and address-of operations.
  We can make it more general as we find further peculiarities but this
  is the known extent.

Reviewers: rsmith, doug.gregor, rjmccall

Reviewed By: doug.gregor

CC: cfe-commits, rnk

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

llvm-svn: 189087
2013-08-23 05:39:39 +00:00
NAKAMURA Takumi 8c8f4325a5 lto/CMakeLists.txt: Cut the dep to intrinsics_gen. LTO doesn't depend on it and LTO_static doesn't depend on anything.
llvm-svn: 189086
2013-08-23 02:51:13 +00:00
Jakob Stoklund Olesen 0c00704f27 Use register masks on SPARC call instructions.
llvm-svn: 189085
2013-08-23 02:33:47 +00:00
Jakob Stoklund Olesen a8960a1f7c Add an OtherPreserved field to the CalleeSaved TableGen class.
This field specifies registers that are preserved across function calls,
but that should not be included in the generates SaveList array.

This can be used ot generate regmasks for architectures that save
registers through other means, like SPARC's register windows.

llvm-svn: 189084
2013-08-23 02:25:47 +00:00
Richard Smith d136f60b07 Reword a diagnostic to avoid a confusing implication that it might be talking
about a declaration within a return type.

llvm-svn: 189083
2013-08-23 02:16:48 +00:00
Jason Molenda a609fe1576 Add link to Darwin iOS arm ABI docs in ABIMacOSX_arm.cpp.
llvm-svn: 189082
2013-08-23 01:31:25 +00:00
Daniel Dunbar 7eff21b999 [PR11606] ocaml bindings tests produce binaries in source dir
- Workaround for ocamlopt producing outputs adjacent to its source inputs, by
   having the tests copy the inputs into temporary directories in the output
   paths before building.

 - Patch by edward-san.

llvm-svn: 189081
2013-08-23 00:55:32 +00:00
Sean Callanan ffc12850cf Make sure that ClangExpressionDeclMap doesn't
live beyont parsing.  This is important because
all the ClangASTImporter::Minions for a parser's
ASTContext are cleared when ClangExpressionDeclMap
is deleted.

This resolves many hard-to-reproduce crashes,
especially ones involving breakpoint conditions.

<rdar://problem/14775391>

llvm-svn: 189080
2013-08-23 00:36:14 +00:00
Michael Gottesman e5904417f2 Filecheckize some tests.
llvm-svn: 189079
2013-08-23 00:23:28 +00:00
Michael Gottesman 823aaffd37 Update StripDeadDebugInfo to use DebugInfoFinder so that it is no longer stale to the point of not working and more resilient to debug info changes.
The current version of StripDeadDebugInfo became stale and no longer actually
worked since it was expecting an older version of debug info.

This patch updates it to use DebugInfoFinder and the modern DebugInfo classes as
much as possible to make it more redundent to such changes. Additionally, the
only place where that was avoided (the code where we replace the old sets with
the new), I call verify on the DIContextUnit implying that if the format changes
and my live set changes no longer make sense an assert will be hit. In order to
ensure that that occurs I have included a test case.

The actual stripping of the dead debug info follows the same strategy as was
used before in this class: find the live set and replace the old set in the
given compile unit (which may contain dead global variables/functions) with the
new live one.

llvm-svn: 189078
2013-08-23 00:23:24 +00:00
Jason Molenda 4a561c16f5 Fix ABIMacOSX_arm::RegisterIsVolatile() so it identifies r12 as a volatile reg.
llvm-svn: 189077
2013-08-22 23:53:14 +00:00