platform/upstream/llvm.git
11 years agoTests for ARM aligned access + reserved R9
Renato Golin [Sun, 25 Aug 2013 13:01:50 +0000 (13:01 +0000)]
Tests for ARM aligned access + reserved R9

Patch by Jeroen Hofstee.

llvm-svn: 189190

11 years agoAVX-512: added UNPACK instructions and tests for all-zero/all-ones vectors
Elena Demikhovsky [Sun, 25 Aug 2013 12:54:30 +0000 (12:54 +0000)]
AVX-512: added UNPACK instructions and tests for all-zero/all-ones vectors

llvm-svn: 189189

11 years agoFix a bug where we would corrupt the offset when evaluating
Chandler Carruth [Sun, 25 Aug 2013 10:46:39 +0000 (10:46 +0000)]
Fix a bug where we would corrupt the offset when evaluating
a non-constant GEP.

I don't have any test case that demonstrates this, Nadav (indirectly)
pointed this out in code review. I'm not sure how possible it is to
contrive a test case for the current users of this code that triggers
the bad issue sadly.

llvm-svn: 189188

11 years agoAsmPrinter: Get rid of llvm$workaround$fake$stub$
David Majnemer [Sun, 25 Aug 2013 09:18:19 +0000 (09:18 +0000)]
AsmPrinter: Get rid of llvm$workaround$fake$stub$

We currently emit labels with the prefix Lllvm$workaround$fake$stub$ if
the target's MCAsmInfo has getLinkOnceDirective() mapped to something
interesting.  This was apparently a work around introduced in r31033 for
binutils that we don't need anymore.

llvm-svn: 189187

11 years agoStart to add the LLVM builtins to the mips16 exclusion lists for fp.
Reed Kotler [Sun, 25 Aug 2013 02:40:25 +0000 (02:40 +0000)]
Start to add the LLVM builtins to the mips16 exclusion lists for fp.
I need to add the rest of these to the list or else to delay putting
out the actual stub until later in code generation when I know if
the external function ever got emitted

Resubmit this patch. The target triple needs to be added to the test so that
clang does not tell the backend the wrong target when the host is BSD. There
is a clang bug in here somewhere that I need to track down. At Mips this
has been filed internally as a bug.

llvm-svn: 189186

11 years agoFix comment.
Michael Han [Sun, 25 Aug 2013 01:29:56 +0000 (01:29 +0000)]
Fix comment.

llvm-svn: 189185

11 years agoG M: Improve support for compilers not supporting defaulted functions.
Howard Hinnant [Sat, 24 Aug 2013 21:31:37 +0000 (21:31 +0000)]
G M: Improve support for compilers not supporting defaulted functions.

llvm-svn: 189184

11 years ago[Support] fix compile with -Werror
Saleem Abdulrasool [Sat, 24 Aug 2013 20:35:16 +0000 (20:35 +0000)]
[Support] fix compile with -Werror

error: commas at the end of enumerator lists are a C++11 extension
[-Werror,-Wc++11-extensions]

llvm-svn: 189183

11 years agoAdd hasSideEffects/mayLoad/mayStore flags to the X86 moffs8/moffs16/moffs32/moffs64...
Craig Topper [Sat, 24 Aug 2013 20:31:14 +0000 (20:31 +0000)]
Add hasSideEffects/mayLoad/mayStore flags to the X86 moffs8/moffs16/moffs32/moffs64 versions of move.

llvm-svn: 189182

11 years ago[PECOFF] support additional subsystem identifiers
Saleem Abdulrasool [Sat, 24 Aug 2013 20:14:54 +0000 (20:14 +0000)]
[PECOFF] support additional subsystem identifiers

This completes the subsystem name parsing to support the identifiers that the
Microsoft link.exe linker supports.  "windows" and "console" are left as the
first items as they are the expected common paths.

Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
llvm-svn: 189181

11 years ago[Support] add missing enumeration values
Saleem Abdulrasool [Sat, 24 Aug 2013 20:14:40 +0000 (20:14 +0000)]
[Support] add missing enumeration values

This adds additional missing Windows subsystem identifiers to the
IMAGE_SUBSYSTEM enumeration.

Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
llvm-svn: 189180

11 years agoCheck if in set on insertion instead of separately
Matt Arsenault [Sat, 24 Aug 2013 19:55:38 +0000 (19:55 +0000)]
Check if in set on insertion instead of separately

llvm-svn: 189179

11 years agoRemove trailing whitespace.
Craig Topper [Sat, 24 Aug 2013 19:50:11 +0000 (19:50 +0000)]
Remove trailing whitespace.

llvm-svn: 189178

11 years agoRemove unneeded comma and update formatting
Tobias Grosser [Sat, 24 Aug 2013 17:58:59 +0000 (17:58 +0000)]
Remove unneeded comma and update formatting

llvm-svn: 189177

11 years agoRevert 189161
Shuxin Yang [Sat, 24 Aug 2013 17:53:16 +0000 (17:53 +0000)]
Revert 189161

llvm-svn: 189176

11 years agoAdd gcc ARM flags -munaligned-access / -mno-unaligned-access
Renato Golin [Sat, 24 Aug 2013 14:44:41 +0000 (14:44 +0000)]
Add gcc ARM flags -munaligned-access / -mno-unaligned-access

clang already had a mstrict-align which mentiones "Force all memory
accesses to be aligned (ARM only)". On gcc arm this is controlled by
-munaligned-access / -mno-unaligned-access. Add the gcc versions to
the frontend and make -mstrict-align and alias to -mno-unaligned-access
and only show it in clang -cc1 -help.

Since the default value for unaligned accesses / strict alignment
depends on the tripple, both the enable and disable flags are added.
If both are set, the no-unaligned-access is used.

Patch by Jeroen Hofstee.

llvm-svn: 189175

11 years agoAdd the -ffixed-r9 flag for ARM.
Renato Golin [Sat, 24 Aug 2013 14:44:35 +0000 (14:44 +0000)]
Add the -ffixed-r9 flag for ARM.

This patch adds the -ffixed-r9 flag to clang to instruct llvm to
globally preserve the contents of r9. The flag is added to the newly
created ARM specific group.

While at it, also place marm / mno-thumb in that group.

Patch by Jeroen Hofstee.

llvm-svn: 189174

11 years agoRemove trailing spaces.
Jakub Staszak [Sat, 24 Aug 2013 14:16:00 +0000 (14:16 +0000)]
Remove trailing spaces.

llvm-svn: 189173

11 years agoThis wasn't headers, just missing namespaces.
Benjamin Kramer [Sat, 24 Aug 2013 13:22:59 +0000 (13:22 +0000)]
This wasn't headers, just missing namespaces.

/me bows head in shame.

llvm-svn: 189172

11 years agoAdd missing includes.
Benjamin Kramer [Sat, 24 Aug 2013 13:16:22 +0000 (13:16 +0000)]
Add missing includes.

llvm-svn: 189171

11 years agoReplace compLocDecl with less_first.
Benjamin Kramer [Sat, 24 Aug 2013 13:12:34 +0000 (13:12 +0000)]
Replace compLocDecl with less_first.

llvm-svn: 189170

11 years agoAdd a function object to compare the first or second component of a std::pair.
Benjamin Kramer [Sat, 24 Aug 2013 12:54:27 +0000 (12:54 +0000)]
Add a function object to compare the first or second component of a std::pair.

Replace instances of this scattered around the code base.

llvm-svn: 189169

11 years agoSimplify code. No functionality change.
Benjamin Kramer [Sat, 24 Aug 2013 12:15:54 +0000 (12:15 +0000)]
Simplify code. No functionality change.

llvm-svn: 189168

11 years agoDwarfDebug: Delete orphaned children.
Benjamin Kramer [Sat, 24 Aug 2013 11:55:49 +0000 (11:55 +0000)]
DwarfDebug: Delete orphaned children.

Leak found by valgrind.

llvm-svn: 189167

11 years agoFix test, make the template type a const pointer.
David Majnemer [Sat, 24 Aug 2013 09:24:26 +0000 (09:24 +0000)]
Fix test, make the template type a const pointer.

llvm-svn: 189166

11 years agoDebugInfo: Emit info for constant expressions in template arguments
David Majnemer [Sat, 24 Aug 2013 08:21:10 +0000 (08:21 +0000)]
DebugInfo: Emit info for constant expressions in template arguments

Summary:
This allows us to handle the general case where a non-type template
argument evaluates to a constant expression which isn't integral or a
declaration.

This fixes PR16939.

Reviewers: dblaikie, rsmith

Reviewed By: dblaikie

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

llvm-svn: 189165

11 years ago[autotools->cmake] Enable generation of doxygen documentation via cmake.
Michael Gottesman [Sat, 24 Aug 2013 07:25:21 +0000 (07:25 +0000)]
[autotools->cmake] Enable generation of doxygen documentation via cmake.

I am going to add in a subsequent patch support for generating the llvm
manpage.

llvm-svn: 189164

11 years agoAdd Host/common/ProcessRunLock.cpp to the xcode project file so TOT sources build...
Jason Molenda [Sat, 24 Aug 2013 03:42:38 +0000 (03:42 +0000)]
Add Host/common/ProcessRunLock.cpp to the xcode project file so TOT sources build with xcode again.

llvm-svn: 189163

11 years agoAdded const qualifier to StringRef::edit_distance member function
Dmitri Gribenko [Sat, 24 Aug 2013 01:50:41 +0000 (01:50 +0000)]
Added const qualifier to StringRef::edit_distance member function

Patch by Ismail Pazarbasi.

llvm-svn: 189162

11 years agoStart to add the builtind to the mips16 exclusion lists for fp.
Reed Kotler [Sat, 24 Aug 2013 01:24:44 +0000 (01:24 +0000)]
Start to add the builtind to the mips16 exclusion lists for fp.
I need to add the rest of these to the list or else to delay putting
out the actual stub until later in code generation when I know if
the external function ever got emitted.

llvm-svn: 189161

11 years ago[NVPTX] Re-enable assembly printing support for inline assembly
Justin Holewinski [Sat, 24 Aug 2013 01:17:23 +0000 (01:17 +0000)]
[NVPTX] Re-enable assembly printing support for inline assembly

This support was removed by accident during the MC conversion

llvm-svn: 189160

11 years agoSeparates /fixed (no .reloc section) and /dynamicbase (enable ASLR)
Rui Ueyama [Sat, 24 Aug 2013 00:39:10 +0000 (00:39 +0000)]
Separates /fixed (no .reloc section) and /dynamicbase (enable ASLR)
in order to match link.exe's behaviour.

Patch by Ron Ofir.

llvm-svn: 189159

11 years agoDebugInfoFinder: handle imported entities of a CU.
Manman Ren [Sat, 24 Aug 2013 00:32:12 +0000 (00:32 +0000)]
DebugInfoFinder: handle imported entities of a CU.

llvm-svn: 189158

11 years agoCMake: Support the LLVM_INSTALL_TOOLCHAIN_ONLY flag
Hans Wennborg [Sat, 24 Aug 2013 00:24:15 +0000 (00:24 +0000)]
CMake: Support the LLVM_INSTALL_TOOLCHAIN_ONLY flag

llvm-svn: 189157

11 years agoCMake: support the LLVM_INSTALL_TOOLCHAIN_ONLY flag
Hans Wennborg [Sat, 24 Aug 2013 00:22:23 +0000 (00:22 +0000)]
CMake: support the LLVM_INSTALL_TOOLCHAIN_ONLY flag

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

llvm-svn: 189156

11 years agoCMake: Add LLVM_INSTALL_TOOLCHAIN_ONLY option.
Hans Wennborg [Sat, 24 Aug 2013 00:20:36 +0000 (00:20 +0000)]
CMake: Add LLVM_INSTALL_TOOLCHAIN_ONLY option.

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

llvm-svn: 189155

11 years agoDon't recommend using bytearray(buf, 'ascii') for binary data read with
Jason Molenda [Sat, 24 Aug 2013 00:16:19 +0000 (00:16 +0000)]
Don't recommend using bytearray(buf, 'ascii') for binary data read with
SBProcess::ReadMemory - it will fail for anything with the high bit set.

llvm-svn: 189154

11 years agoAdd a FIXME.
Richard Smith [Fri, 23 Aug 2013 22:49:47 +0000 (22:49 +0000)]
Add a FIXME.

llvm-svn: 189153

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

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

llvm-svn: 189124

11 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

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

llvm-svn: 189122

11 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

11 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

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

llvm-svn: 189119

11 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

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

llvm-svn: 189117

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

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

llvm-svn: 189091