platform/upstream/llvm.git
10 years agoA clean-up pass, exploring the unification of traversals of class, variable and funct...
Larisse Voufo [Fri, 23 Aug 2013 22:21:36 +0000 (22:21 +0000)]
A clean-up pass, exploring the unification of traversals of class, variable and function templates.

llvm-svn: 189152

10 years agoFixes an additional temporary string use.
Rui Ueyama [Fri, 23 Aug 2013 22:06:29 +0000 (22:06 +0000)]
Fixes an additional temporary string use.

Patch by Ron Ofir.

llvm-svn: 189151

10 years agoAdd note about following two commands are no longer equivalent.
Shuxin Yang [Fri, 23 Aug 2013 22:01:03 +0000 (22:01 +0000)]
Add note about following two commands are no longer equivalent.
 - "clang -O3 -flto a.c -c", and
 - "clang -emit-llvm a.c -c"

Thank Rafael for tips.

llvm-svn: 189150

10 years agoDon't imply -flto with -O4.
Rafael Espindola [Fri, 23 Aug 2013 21:49:00 +0000 (21:49 +0000)]
Don't imply -flto with -O4.

We now saturate at -O3.

llvm-svn: 189149

10 years agoDriver::IsUsingLTO() no longer return true when seeing -emit-llvm.
Shuxin Yang [Fri, 23 Aug 2013 21:34:57 +0000 (21:34 +0000)]
Driver::IsUsingLTO() no longer return true when seeing -emit-llvm.

One step toward differentiating following two commands:
   clang -O3 -flto a.c -c, and
   clang -O3 -emit-llvm a.c

Thanks many awesome folks for clarifying things.

llvm-svn: 189148

10 years agoCheck for "asserts" rather than "debug" on test
Tim Northover [Fri, 23 Aug 2013 21:10:37 +0000 (21:10 +0000)]
Check for "asserts" rather than "debug" on test

The debug flag being checked for seems to be controlled by whether the
build is asserts/non-asserts rather than debug/non-debug. Mostly these
correlate, but not necessarily.

As far as I can tell with various combinations of debug/assetions this
change makes no difference on autotools builds, but fixes a check-all
failure with CMake.

llvm-svn: 189147

10 years agoUpdate test to use rdrnd instead of rdrand.
Rafael Espindola [Fri, 23 Aug 2013 20:49:02 +0000 (20:49 +0000)]
Update test to use rdrnd instead of rdrand.

llvm-svn: 189146

10 years agoUpdate tests to use sse4.2 instead of sse42.
Rafael Espindola [Fri, 23 Aug 2013 20:46:35 +0000 (20:46 +0000)]
Update tests to use sse4.2 instead of sse42.

llvm-svn: 189145

10 years agoReplace more uses of sse41 with sse4.1.
Rafael Espindola [Fri, 23 Aug 2013 20:39:19 +0000 (20:39 +0000)]
Replace more uses of sse41 with sse4.1.

llc using the host cpu features and *waning* on unknown features is probably
not a good thing :-(

llvm-svn: 189144

10 years agoUpdate a test that I missed in the previous commit.
Rafael Espindola [Fri, 23 Aug 2013 20:27:02 +0000 (20:27 +0000)]
Update a test that I missed in the previous commit.

llvm-svn: 189143

10 years agoUpdate now that llvm uses the same feature names as the driver.
Rafael Espindola [Fri, 23 Aug 2013 20:21:37 +0000 (20:21 +0000)]
Update now that llvm uses the same feature names as the driver.

llvm-svn: 189142

10 years agoRename features to match what gcc and clang use.
Rafael Espindola [Fri, 23 Aug 2013 20:21:34 +0000 (20:21 +0000)]
Rename features to match what gcc and clang use.

There is no advantage in being different and using the same names simplifies
clang a bit.

llvm-svn: 189141

10 years agoRename _LIBCPP_DEBUG2 to _LIBCPP_DEBUG.
Howard Hinnant [Fri, 23 Aug 2013 20:10:18 +0000 (20:10 +0000)]
Rename _LIBCPP_DEBUG2 to _LIBCPP_DEBUG.

llvm-svn: 189140

10 years ago[lld][ELF] Dont ignore zero sized sections.
Shankar Easwaran [Fri, 23 Aug 2013 20:03:35 +0000 (20:03 +0000)]
[lld][ELF] Dont ignore zero sized sections.

There may be relocations that may be pointing to the section
even if the section sizes are 0. We shouldnot ignore them
for that regard.

llvm-svn: 189139

10 years ago[lld][ELF][Cleanup] Section associated with the relocation traversed
Shankar Easwaran [Fri, 23 Aug 2013 20:03:31 +0000 (20:03 +0000)]
[lld][ELF][Cleanup] Section associated with the relocation traversed

There is no change in functionality, this uses the defined way to access
the relocation section that belongs to a particular section.

llvm-svn: 189138

10 years ago[lld][ELF] Rename typeTLV content type for ELF
Shankar Easwaran [Fri, 23 Aug 2013 20:03:28 +0000 (20:03 +0000)]
[lld][ELF] Rename typeTLV content type for ELF

typeTLV content type is used by Darwin to represent thread local
storage. A new contentType has to be made to represent ELF
thread local storage data. These have been set to

- typeThreadZeroFill (represents TBSS storage)
- typeThreadData     (represents TDATA storage)

llvm-svn: 189137

10 years ago[lld] handle typeZeroFill atoms in ELF/Native/YAML
Shankar Easwaran [Fri, 23 Aug 2013 20:03:21 +0000 (20:03 +0000)]
[lld] handle typeZeroFill atoms in ELF/Native/YAML

BSS atoms dont take any file space in the Input file. They are associated
with a contentType(typeZeroFill). Similiar zero fill types also exist which
have the same meaning in terms of occupying file space in the Input.

These atoms have to be handled seperately when writing to the
lld's intermediate file or the lld test infrastructure.

Also adds a test.

llvm-svn: 189136

10 years agoRemove _LIBCPP_DEBUG. This was my first attempt at debug mode for libc++, and is...
Howard Hinnant [Fri, 23 Aug 2013 19:03:36 +0000 (19:03 +0000)]
Remove _LIBCPP_DEBUG.  This was my first attempt at debug mode for libc++, and is now obsoleted by _LIBCPP_DEBUG2 (which isn't finished).

llvm-svn: 189135

10 years ago[dfsan] Integration test for the equal-labels case
Peter Collingbourne [Fri, 23 Aug 2013 18:45:22 +0000 (18:45 +0000)]
[dfsan] Integration test for the equal-labels case

llvm-svn: 189134

10 years agoDataFlowSanitizer: correctly combine labels in the case where they are equal.
Peter Collingbourne [Fri, 23 Aug 2013 18:45:06 +0000 (18:45 +0000)]
DataFlowSanitizer: correctly combine labels in the case where they are equal.

llvm-svn: 189133

10 years agoConsumed analysis: change class name in test cases.
DeLesley Hutchins [Fri, 23 Aug 2013 18:40:39 +0000 (18:40 +0000)]
Consumed analysis: change class name in test cases.

The name of a class used in the testing files was updated to actually
be descriptive.  Patch by chris.wailes@gmail.com.

llvm-svn: 189132

10 years agoDebugInfoFinder: handle template params of a DISubprogram.
Manman Ren [Fri, 23 Aug 2013 18:36:18 +0000 (18:36 +0000)]
DebugInfoFinder: handle template params of a DISubprogram.

llvm-svn: 189131

10 years agoCMake: don't install tablegen
Hans Wennborg [Fri, 23 Aug 2013 18:28:10 +0000 (18:28 +0000)]
CMake: don't install tablegen

Since it's an llvm-internal tool, we shouldn't install it.

(This depends on Clang r189127 and lld r189128.)

llvm-svn: 189130

10 years agoRename CMake variable; this fell out of r189127 somehow.
Hans Wennborg [Fri, 23 Aug 2013 18:20:47 +0000 (18:20 +0000)]
Rename CMake variable; this fell out of r189127 somehow.

llvm-svn: 189129

10 years agoCMake: Don't look for llvm-tblgen when building outside LLVM tree
Hans Wennborg [Fri, 23 Aug 2013 18:18:13 +0000 (18:18 +0000)]
CMake: Don't look for llvm-tblgen when building outside LLVM tree

Previously, the CMake build would look for llvm-tblgen to determine
if a directory is an LLVM build or install directory. Since we don't
want to include llvm-tblgen in the install, look for llvm-config instead,
and use that to find llvm-tblgen.

(This is the lld equivalent of Clang r189127.)

llvm-svn: 189128

10 years agoCMake: Don't look for llvm-tblgen when building outside LLVM tree
Hans Wennborg [Fri, 23 Aug 2013 18:05:24 +0000 (18:05 +0000)]
CMake: Don't look for llvm-tblgen when building outside LLVM tree

Previously, the CMake build would look for llvm-tblgen to determine
if a directory is an LLVM build or install directory. Since we don't
want to include llvm-tblgen in the install, look for llvm-config instead,
and use that to find llvm-tblgen.

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

llvm-svn: 189127

10 years agoComment parsing: fix a bug where a line with whitespace between two paragraphs
Dmitri Gribenko [Fri, 23 Aug 2013 18:03:40 +0000 (18:03 +0000)]
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

10 years agoCMake: build llvm-config on Windows.
Hans Wennborg [Fri, 23 Aug 2013 17:59:13 +0000 (17:59 +0000)]
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

10 years agoPrintVRegOrUnit
Andrew Trick [Fri, 23 Aug 2013 17:48:53 +0000 (17:48 +0000)]
PrintVRegOrUnit

llvm-svn: 189124

10 years agoRename to RegPressure API parameters RegUnits.
Andrew Trick [Fri, 23 Aug 2013 17:48:51 +0000 (17:48 +0000)]
Rename to RegPressure API parameters RegUnits.

llvm-svn: 189123

10 years agoSimplify RegPressure helpers.
Andrew Trick [Fri, 23 Aug 2013 17:48:48 +0000 (17:48 +0000)]
Simplify RegPressure helpers.

llvm-svn: 189122

10 years agoAdd a convenient PSetIterator for visiting pressure sets affected by a register.
Andrew Trick [Fri, 23 Aug 2013 17:48:46 +0000 (17:48 +0000)]
Add a convenient PSetIterator for visiting pressure sets affected by a register.

llvm-svn: 189121

10 years agoAdds cyclic critical path computation and heuristics, temporarily disabled.
Andrew Trick [Fri, 23 Aug 2013 17:48:43 +0000 (17:48 +0000)]
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

10 years agoFix indentation
Dmitri Gribenko [Fri, 23 Aug 2013 17:48:41 +0000 (17:48 +0000)]
Fix indentation

llvm-svn: 189119

10 years agoMI Sched: record local vreg uses.
Andrew Trick [Fri, 23 Aug 2013 17:48:39 +0000 (17:48 +0000)]
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

10 years agoRemove unused field.
Andrew Trick [Fri, 23 Aug 2013 17:48:36 +0000 (17:48 +0000)]
Remove unused field.

llvm-svn: 189117

10 years agomi-sched: Don't call MBB.size() in initSUnits. The driver already has instr count.
Andrew Trick [Fri, 23 Aug 2013 17:48:33 +0000 (17:48 +0000)]
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

10 years agoUse CharInfo.h routines in TextComment::isWhitespaceNoCache
Dmitri Gribenko [Fri, 23 Aug 2013 17:45:43 +0000 (17:45 +0000)]
Use CharInfo.h routines in TextComment::isWhitespaceNoCache

llvm-svn: 189115

10 years agoDebug mode for string. This commit also marks the first time libc++ debug-mode has...
Howard Hinnant [Fri, 23 Aug 2013 17:37:05 +0000 (17:37 +0000)]
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

10 years agoRevise -Wnewline-eof test per feedback from Dmitri.
Jordan Rose [Fri, 23 Aug 2013 16:12:49 +0000 (16:12 +0000)]
Revise -Wnewline-eof test per feedback from Dmitri.

llvm-svn: 189113

10 years agoUse pop_back_val() instead of both back() and pop_back().
Robert Wilhelm [Fri, 23 Aug 2013 16:11:15 +0000 (16:11 +0000)]
Use pop_back_val() instead of both back() and pop_back().
No functionality change intended.

llvm-svn: 189112

10 years agoChecking commit access; added one space
Jim Cownie [Fri, 23 Aug 2013 15:51:37 +0000 (15:51 +0000)]
Checking commit access; added one space

llvm-svn: 189111

10 years agoRespect -Wnewline-eof even in C++11 mode.
Jordan Rose [Fri, 23 Aug 2013 15:42:01 +0000 (15:42 +0000)]
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

10 years ago[ARM] Fix another ARM FastISel -verify-machineinstrs issue.
Joey Gouly [Fri, 23 Aug 2013 15:20:56 +0000 (15:20 +0000)]
[ARM] Fix another ARM FastISel -verify-machineinstrs issue.

llvm-svn: 189109

10 years agoclang-format: Fix indentation relative to unary expressions.
Daniel Jasper [Fri, 23 Aug 2013 15:14:03 +0000 (15:14 +0000)]
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

10 years agoMingW compilation (windows). Includes various refactoring to improve portability.
Virgile Bello [Fri, 23 Aug 2013 12:44:05 +0000 (12:44 +0000)]
MingW compilation (windows). Includes various refactoring to improve portability.

llvm-svn: 189107

10 years ago[mips][msa] Few MSA Builtins have side-effects. Added IntrNoMem to those that don't.
Daniel Sanders [Fri, 23 Aug 2013 12:21:25 +0000 (12:21 +0000)]
[mips][msa] Few MSA Builtins have side-effects. Added IntrNoMem to those that don't.

llvm-svn: 189106

10 years ago[msan] Extend VAArgTLSOverwrite test.
Evgeniy Stepanov [Fri, 23 Aug 2013 12:13:18 +0000 (12:13 +0000)]
[msan] Extend VAArgTLSOverwrite test.

This test now covers LLVM r189104.

llvm-svn: 189105

10 years ago[msan] Fix handling of va_arg overflow area on x86_64.
Evgeniy Stepanov [Fri, 23 Aug 2013 12:11:00 +0000 (12:11 +0000)]
[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

10 years ago[ARMv8] Add CodeGen for VMAXNM/VMINNM.
Joey Gouly [Fri, 23 Aug 2013 12:01:13 +0000 (12:01 +0000)]
[ARMv8] Add CodeGen for VMAXNM/VMINNM.

llvm-svn: 189103

10 years agoclang-format: Fix corner case for string splitting ..
Daniel Jasper [Fri, 23 Aug 2013 11:57:34 +0000 (11:57 +0000)]
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

10 years agoAdd function attribute 'optnone'.
Andrea Di Biagio [Fri, 23 Aug 2013 11:53:55 +0000 (11:53 +0000)]
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

10 years ago[SystemZ] Add basic prefetch support
Richard Sandiford [Fri, 23 Aug 2013 11:36:42 +0000 (11:36 +0000)]
[SystemZ] Add basic prefetch support

Just the instructions and intrinsics for now.

llvm-svn: 189100

10 years ago[SystemZ] Try reversing comparisons whose first operand is in memory
Richard Sandiford [Fri, 23 Aug 2013 11:27:19 +0000 (11:27 +0000)]
[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

10 years ago[SystemZ] Prefer LHI;ST... over LAY;MV...
Richard Sandiford [Fri, 23 Aug 2013 11:18:53 +0000 (11:18 +0000)]
[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

10 years agoTurn MipsOptimizeMathLibCalls into a target-independent scalar transform
Richard Sandiford [Fri, 23 Aug 2013 10:27:02 +0000 (10:27 +0000)]
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

10 years agoARM: make sure ARM-mode pseudo-inst requires IsARM
Tim Northover [Fri, 23 Aug 2013 10:16:39 +0000 (10:16 +0000)]
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

10 years ago[mips][msa] Split MSA128 regset into size-specific sets containing the same registers.
Daniel Sanders [Fri, 23 Aug 2013 10:10:13 +0000 (10:10 +0000)]
[mips][msa] Split MSA128 regset into size-specific sets containing the same registers.

llvm-svn: 189095

10 years agoclang-format: Handle trailing commas in column layout of braced list.
Daniel Jasper [Fri, 23 Aug 2013 10:05:49 +0000 (10:05 +0000)]
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

10 years agocorrect test RUN parameters
Robert Lytton [Fri, 23 Aug 2013 09:27:44 +0000 (09:27 +0000)]
correct test RUN parameters

llvm-svn: 189093

10 years agoSlightly improve lint checker script and fix a few style issues
Alexey Samsonov [Fri, 23 Aug 2013 07:43:56 +0000 (07:43 +0000)]
Slightly improve lint checker script and fix a few style issues

llvm-svn: 189092

10 years ago80 cols
Alexey Samsonov [Fri, 23 Aug 2013 07:42:51 +0000 (07:42 +0000)]
80 cols

llvm-svn: 189091

10 years ago[analyzer] Refactor conditional expression evaluating code
Pavel Labath [Fri, 23 Aug 2013 07:19:22 +0000 (07:19 +0000)]
[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

10 years agoMake DWARFCompileUnit non-copyable
Alexey Samsonov [Fri, 23 Aug 2013 06:56:01 +0000 (06:56 +0000)]
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

10 years agoarc commit didn't add this because it wasn't in the patch...
David Majnemer [Fri, 23 Aug 2013 05:42:19 +0000 (05:42 +0000)]
arc commit didn't add this because it wasn't in the patch...

llvm-svn: 189088

10 years agoSema: Properly support Microsoft-mode template arguments
David Majnemer [Fri, 23 Aug 2013 05:39:39 +0000 (05:39 +0000)]
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

10 years agolto/CMakeLists.txt: Cut the dep to intrinsics_gen. LTO doesn't depend on it and LTO_s...
NAKAMURA Takumi [Fri, 23 Aug 2013 02:51:13 +0000 (02:51 +0000)]
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

10 years agoUse register masks on SPARC call instructions.
Jakob Stoklund Olesen [Fri, 23 Aug 2013 02:33:47 +0000 (02:33 +0000)]
Use register masks on SPARC call instructions.

llvm-svn: 189085

10 years agoAdd an OtherPreserved field to the CalleeSaved TableGen class.
Jakob Stoklund Olesen [Fri, 23 Aug 2013 02:25:47 +0000 (02:25 +0000)]
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

10 years agoReword a diagnostic to avoid a confusing implication that it might be talking
Richard Smith [Fri, 23 Aug 2013 02:16:48 +0000 (02:16 +0000)]
Reword a diagnostic to avoid a confusing implication that it might be talking
about a declaration within a return type.

llvm-svn: 189083

10 years agoAdd link to Darwin iOS arm ABI docs in ABIMacOSX_arm.cpp.
Jason Molenda [Fri, 23 Aug 2013 01:31:25 +0000 (01:31 +0000)]
Add link to Darwin iOS arm ABI docs in ABIMacOSX_arm.cpp.

llvm-svn: 189082

10 years ago[PR11606] ocaml bindings tests produce binaries in source dir
Daniel Dunbar [Fri, 23 Aug 2013 00:55:32 +0000 (00:55 +0000)]
[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

10 years agoMake sure that ClangExpressionDeclMap doesn't
Sean Callanan [Fri, 23 Aug 2013 00:36:14 +0000 (00:36 +0000)]
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

10 years agoFilecheckize some tests.
Michael Gottesman [Fri, 23 Aug 2013 00:23:28 +0000 (00:23 +0000)]
Filecheckize some tests.

llvm-svn: 189079

10 years agoUpdate StripDeadDebugInfo to use DebugInfoFinder so that it is no longer stale to...
Michael Gottesman [Fri, 23 Aug 2013 00:23:24 +0000 (00:23 +0000)]
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

10 years agoFix ABIMacOSX_arm::RegisterIsVolatile() so it identifies r12 as a volatile reg.
Jason Molenda [Thu, 22 Aug 2013 23:53:14 +0000 (23:53 +0000)]
Fix ABIMacOSX_arm::RegisterIsVolatile() so it identifies r12 as a volatile reg.

llvm-svn: 189077

10 years ago[stack protector] Work around an issue with the BMOVPCB_CALL instruction on ARM by...
Michael Gottesman [Thu, 22 Aug 2013 23:45:24 +0000 (23:45 +0000)]
[stack protector] Work around an issue with the BMOVPCB_CALL instruction on ARM by disabling does not return on __stack_chk_fail.

This is to fix the bots while I look to see if there is something I can do here.

rdar://14811848

llvm-svn: 189076

10 years agoRemove SequenceNumber from class/variable template partial specializations.
Richard Smith [Thu, 22 Aug 2013 23:27:37 +0000 (23:27 +0000)]
Remove SequenceNumber from class/variable template partial specializations.
This was only used to ensure that the traversal order was the same as the
insertion order, but that guarantee was already being provided by the use
of a FoldingSetVector.

llvm-svn: 189075

10 years agoSimplify the CreateFunctionEntryUnwindPlan () and CreateDefaultUnwindPlan()
Jason Molenda [Thu, 22 Aug 2013 23:13:43 +0000 (23:13 +0000)]
Simplify the CreateFunctionEntryUnwindPlan () and CreateDefaultUnwindPlan()
methods in the ABIs.  Specify the register numbering of the UnwindPlan
we're creating and use those only register numbers.

llvm-svn: 189074

10 years agoUpdate ABISysV_x86_64::CallFrameAddressIsValid() to check for
Jason Molenda [Thu, 22 Aug 2013 22:51:48 +0000 (22:51 +0000)]
Update ABISysV_x86_64::CallFrameAddressIsValid() to check for
16-byte alignment of stack frames.

llvm-svn: 189073

10 years agoObjectiveC migrator: builtin ObjectiveC types are not
Fariborz Jahanian [Thu, 22 Aug 2013 22:27:36 +0000 (22:27 +0000)]
ObjectiveC migrator: builtin ObjectiveC types are not
audited types.

llvm-svn: 189072

10 years agoObjectiveC migrator: some refactoring to reduce
Fariborz Jahanian [Thu, 22 Aug 2013 21:40:15 +0000 (21:40 +0000)]
ObjectiveC migrator: some refactoring to reduce
code size.

llvm-svn: 189070

10 years agoCheck for absence of the flag.
Bill Wendling [Thu, 22 Aug 2013 21:30:21 +0000 (21:30 +0000)]
Check for absence of the flag.

llvm-svn: 189069

10 years agoUpdate to remove the no-frame-pointer-elim-non-leaf flag if it was set to 'false'.
Bill Wendling [Thu, 22 Aug 2013 21:28:54 +0000 (21:28 +0000)]
Update to remove the no-frame-pointer-elim-non-leaf flag if it was set to 'false'.

llvm-svn: 189068

10 years agoRound plt entsize to addralign
Michael Sartain [Thu, 22 Aug 2013 21:25:53 +0000 (21:25 +0000)]
Round plt entsize to addralign

llvm-svn: 189066

10 years agoFix some tests. The 'false' version just omits the attribute altogether.
Bill Wendling [Thu, 22 Aug 2013 21:20:14 +0000 (21:20 +0000)]
Fix some tests. The 'false' version just omits the attribute altogether.

llvm-svn: 189065

10 years agoOnly add this attribute when it's set. If it's not there, the assumption is that...
Bill Wendling [Thu, 22 Aug 2013 21:16:51 +0000 (21:16 +0000)]
Only add this attribute when it's set. If it's not there, the assumption is that it's off.

llvm-svn: 189064

10 years agoCheck only if we have this attribute. If it's not an attribute, then it's assumed...
Bill Wendling [Thu, 22 Aug 2013 21:16:14 +0000 (21:16 +0000)]
Check only if we have this attribute. If it's not an attribute, then it's assumed false.

llvm-svn: 189063

10 years agoadd register name to UnwindLog error message
Michael Sartain [Thu, 22 Aug 2013 21:00:35 +0000 (21:00 +0000)]
add register name to UnwindLog error message

llvm-svn: 189062

10 years agoA clang::Type::Decayed type to kill compile warning
Michael Sartain [Thu, 22 Aug 2013 20:50:18 +0000 (20:50 +0000)]
A clang::Type::Decayed type to kill compile warning

llvm-svn: 189061

10 years agoFileCheckize some tests.
Bill Wendling [Thu, 22 Aug 2013 20:46:05 +0000 (20:46 +0000)]
FileCheckize some tests.

llvm-svn: 189060

10 years agoUpdate to consumed analysis.
DeLesley Hutchins [Thu, 22 Aug 2013 20:44:47 +0000 (20:44 +0000)]
Update to consumed analysis.

Patch by chris.wailes@gmail.com.  The following functionality was added:

* The same functionality is now supported for both CXXOperatorCallExprs and CXXMemberCallExprs.
* Factored out some code in StmtVisitor.
* Removed variables from the state map when their destructors are encountered.
* Started adding documentation for the consumed analysis attributes.

llvm-svn: 189059

10 years agoadd error checking and messages to 'target modules show-unwind' command
Michael Sartain [Thu, 22 Aug 2013 20:42:30 +0000 (20:42 +0000)]
add error checking and messages to 'target modules show-unwind' command

llvm-svn: 189058

10 years agoR600/SI: Fix another case of illegal VGPR to SGPR copy
Tom Stellard [Thu, 22 Aug 2013 20:21:02 +0000 (20:21 +0000)]
R600/SI: Fix another case of illegal VGPR to SGPR copy

This fixes a crash in Unigine Tropics.

https://bugs.freedesktop.org/show_bug.cgi?id=68389

llvm-svn: 189057

10 years agoDataFlowSanitizer: Add a design doc paragraph on checking ABI consistency.
Peter Collingbourne [Thu, 22 Aug 2013 20:08:20 +0000 (20:08 +0000)]
DataFlowSanitizer: Add a design doc paragraph on checking ABI consistency.

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

llvm-svn: 189055

10 years agoDataFlowSanitizer: Replace non-instrumented aliases of instrumented functions, and...
Peter Collingbourne [Thu, 22 Aug 2013 20:08:15 +0000 (20:08 +0000)]
DataFlowSanitizer: Replace non-instrumented aliases of instrumented functions, and vice versa, with wrappers.

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

llvm-svn: 189054

10 years agoDataFlowSanitizer: Factor the wrapper builder out to buildWrapperFunction.
Peter Collingbourne [Thu, 22 Aug 2013 20:08:11 +0000 (20:08 +0000)]
DataFlowSanitizer: Factor the wrapper builder out to buildWrapperFunction.

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

llvm-svn: 189053

10 years agoDataFlowSanitizer: Prefix the name of each instrumented function with "dfs$".
Peter Collingbourne [Thu, 22 Aug 2013 20:08:08 +0000 (20:08 +0000)]
DataFlowSanitizer: Prefix the name of each instrumented function with "dfs$".

DFSan changes the ABI of each function in the module.  This makes it possible
for a function with the native ABI to be called with the instrumented ABI,
or vice versa, thus possibly invoking undefined behavior.  A simple way
of statically detecting instances of this problem is to prepend the prefix
"dfs$" to the name of each instrumented-ABI function.

This will not catch every such problem; in particular function pointers passed
across the instrumented-native barrier cannot be used on the other side.
These problems could potentially be caught dynamically.

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

llvm-svn: 189052

10 years agoAdd a separate llvm.global_ctors entry for linkonce_odr data initializers
Reid Kleckner [Thu, 22 Aug 2013 20:07:45 +0000 (20:07 +0000)]
Add a separate llvm.global_ctors entry for linkonce_odr data initializers

Summary:
These typically come from static data members of class template
specializations.  This accomplishes two things:

1. May expose GlobalOpt optimizations for Itanium C++ ABI code.
2. Works toward fixing double initialization in the Microsoft C++ ABI.

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

llvm-svn: 189051

10 years agoclang-replace: Layout of test directory now more standard
Edwin Vane [Thu, 22 Aug 2013 19:44:07 +0000 (19:44 +0000)]
clang-replace: Layout of test directory now more standard

Test-time dependencies now live within test/clang-replace/Inputs which is more
in line with llvm and clang test suites.

Added 'Inputs' to the lit config's 'exclude' list as with llvm's lit.cfg since
test-time dependencies should not have any lit scripts within.

llvm-svn: 189047