platform/upstream/llvm.git
11 years agoUse <atomic> instead of "llvm/Support/Atomic.h". Removed unused RefCounter class.
Virgile Bello [Thu, 5 Sep 2013 16:38:02 +0000 (16:38 +0000)]
Use <atomic> instead of "llvm/Support/Atomic.h". Removed unused RefCounter class.

llvm-svn: 190062

11 years agoAdd ATTRIBUTE_UNUSED to silence unused-function warning in release
Daniel Jasper [Thu, 5 Sep 2013 16:05:56 +0000 (16:05 +0000)]
Add ATTRIBUTE_UNUSED to silence unused-function warning in release
builds.

llvm-svn: 190061

11 years ago[ARMv8] Add some missing tests for DSB/DMB.
Joey Gouly [Thu, 5 Sep 2013 16:05:45 +0000 (16:05 +0000)]
[ARMv8] Add some missing tests for DSB/DMB.

llvm-svn: 190060

11 years agoRemove unneeded semi-colons
Aaron Watry [Thu, 5 Sep 2013 16:04:07 +0000 (16:04 +0000)]
Remove unneeded semi-colons

Reviewed-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 190059

11 years agoAdd atomic_inc and atomic_add builtins
Aaron Watry [Thu, 5 Sep 2013 16:04:01 +0000 (16:04 +0000)]
Add atomic_inc and atomic_add builtins

Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 190058

11 years agosysctl.h does not exist under GNU/HURD (like windows)
Sylvestre Ledru [Thu, 5 Sep 2013 15:39:09 +0000 (15:39 +0000)]
sysctl.h does not exist under GNU/HURD (like windows)

llvm-svn: 190057

11 years agoGNU HURD can be considered (for now?) like a GNU/Linux
Sylvestre Ledru [Thu, 5 Sep 2013 15:37:36 +0000 (15:37 +0000)]
GNU HURD can be considered (for now?) like a GNU/Linux

llvm-svn: 190056

11 years ago[ARMv8] Implement the new DMB/DSB operands.
Joey Gouly [Thu, 5 Sep 2013 15:35:24 +0000 (15:35 +0000)]
[ARMv8] Implement the new DMB/DSB operands.

This removes the custom ISD Node: MEMBARRIER and replaces it
with an intrinsic.

llvm-svn: 190055

11 years agoFixes PR 17106 (explicitly typed enums are formatted differently).
Manuel Klimek [Thu, 5 Sep 2013 15:34:55 +0000 (15:34 +0000)]
Fixes PR 17106 (explicitly typed enums are formatted differently).

Before:
 enum X : int { A, B, C };

After:
 enum X : int {
   A,
   B,
   C
 };

llvm-svn: 190054

11 years agoAdd AArch32 DCPS{1,2,3} and HLT instructions.
Richard Barton [Thu, 5 Sep 2013 14:14:19 +0000 (14:14 +0000)]
Add AArch32 DCPS{1,2,3} and HLT instructions.

These were pretty straightforward instructions, with some assembly support
required for HLT.

The ARM assembler is keen to split the instruction mnemonic into a
(non-existent) 'H' instruction with the LT condition code. An exception for
HLT is needed.

HLT follows the same rules as BKPT when in IT blocks, so the special BKPT
hadling code has been adapted to handle HLT also.

Regression tests added including diagnostic tests for out of range immediates
and illegal condition codes, as well as negative tests for pre-ARMv8.

llvm-svn: 190053

11 years agoHandle zero-width and double-width characters in string literals and comments.
Alexander Kornienko [Thu, 5 Sep 2013 14:08:34 +0000 (14:08 +0000)]
Handle zero-width and double-width characters in string literals and comments.

Summary:
Count column width instead of the number of code points. This also
includes correct handling of tabs inside string literals and comments (with an
exception of multiline string literals/comments, where tabs are present before
the first escaped newline).

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1601

llvm-svn: 190052

11 years agoFix the profile of the function (fix commit 190048)
Sylvestre Ledru [Thu, 5 Sep 2013 13:58:07 +0000 (13:58 +0000)]
Fix the profile of the function (fix commit 190048)

llvm-svn: 190051

11 years agoFix writing of reformatted files.
Manuel Klimek [Thu, 5 Sep 2013 13:55:39 +0000 (13:55 +0000)]
Fix writing of reformatted files.

If transformations lead to changes that do not need reformatting, the
current strategy will not write those files. With this patch, we just
update the overall state with the changes due to reformatting, and then
write out everything.

llvm-svn: 190050

11 years agoRemoved empty directories left after r189960.
Alexander Kornienko [Thu, 5 Sep 2013 13:47:10 +0000 (13:47 +0000)]
Removed empty directories left after r189960.

llvm-svn: 190049

11 years agoFix bug #17104 - Target info for GNU/kFreeBSD were missing.
Sylvestre Ledru [Thu, 5 Sep 2013 13:47:07 +0000 (13:47 +0000)]
Fix bug #17104 - Target info for GNU/kFreeBSD were missing.
As a result, Clang doesn't define the pre-processor macros that are expected
on this platform.

Thanks to Robert Millan for the patch

llvm-svn: 190048

11 years agoReverting 190043 for now.
Tilmann Scheller [Thu, 5 Sep 2013 11:59:43 +0000 (11:59 +0000)]
Reverting 190043 for now.

Solution is not sufficient to prevent 'mov pc, lr' being emitted for jump table code.
Test case doesn't trigger the added functionality.

llvm-svn: 190047

11 years agoclang-format: Quickfix for braced init lists detected as lambdas.
Daniel Jasper [Thu, 5 Sep 2013 11:49:39 +0000 (11:49 +0000)]
clang-format: Quickfix for braced init lists detected as lambdas.

Before:
  constexpr char hello [] { "hello" };

After:
  constexpr char hello[]{ "hello" };

llvm-svn: 190046

11 years ago[tsan] add colors to tsan output
Kostya Serebryany [Thu, 5 Sep 2013 11:23:27 +0000 (11:23 +0000)]
[tsan] add colors to tsan output

llvm-svn: 190045

11 years agoAdd new methods for TargetInfo:
Stepan Dyatkovskiy [Thu, 5 Sep 2013 11:23:21 +0000 (11:23 +0000)]
Add new methods for TargetInfo:
     getRealTypeByWidth and getIntTypeByWidth
  for ASTContext names are almost same(invokes new methods from TargetInfo):
     getIntTypeForBitwidth and getRealTypeForBitwidth.

As first commit for PR16752 fix: 'mode' attribute for unusual targets doesn't work properly
Description:
Troubles could be happened due to some assumptions in handleModeAttr function (see SemaDeclAttr.cpp).
For example, it assumes that 32 bit integer is 'int', while it could be 16 bit only.
Instead of asking target: 'which type do you want to use for int32_t ?' it just hardcodes general opinion. That doesn't looks pretty correct.
Please consider the next solution:
1. In Basic/TargetInfo add getIntTypeByWidth and getRealTypeByWidth virtual methods. By default current behaviour could be implemented here.
2. Fix handleModeAttr according to new methods in TargetInfo.
This approach is implemented in the patch attached to this post.

Fixes:
1st Commit (Current): Add new methods for TargetInfo:
     getRealTypeByWidth and getIntTypeByWidth
  for ASTContext names are almost same(invokes new methods from TargetInfo):
     getIntTypeForBitwidth and getRealTypeForBitwidth

2nd Commit (Next): Fix SemaDeclAttr, handleModeAttr function.

llvm-svn: 190044

11 years agoARM: Add GPR register class excluding LR for use with the ADR instruction.
Tilmann Scheller [Thu, 5 Sep 2013 11:10:31 +0000 (11:10 +0000)]
ARM: Add GPR register class excluding LR for use with the ADR instruction.

This improves code generation for jump tables by avoiding the emission of "mov pc, lr" which could fool the processor into believing this is a return from a function causing mispredicts. The code generation logic for jump tables uses ADR to materialize the address of the jump target.

Patch by Daniel Stewart!

llvm-svn: 190043

11 years agoAddress post-commit review comments from r190038.
Daniel Jasper [Thu, 5 Sep 2013 10:48:50 +0000 (10:48 +0000)]
Address post-commit review comments from r190038.

Mostly additional comments :-).

llvm-svn: 190042

11 years ago[SystemZ] Add NC, OC and XC
Richard Sandiford [Thu, 5 Sep 2013 10:36:45 +0000 (10:36 +0000)]
[SystemZ] Add NC, OC and XC

For now these are just used to handle scalar ANDs, ORs and XORs in which
all operands are memory.

llvm-svn: 190041

11 years agoSupport suppressing unused arguments warnings as a core option so that
Chandler Carruth [Thu, 5 Sep 2013 10:09:03 +0000 (10:09 +0000)]
Support suppressing unused arguments warnings as a core option so that
it works in the CL flavor driver.

llvm-svn: 190040

11 years agoclang-format: Fix parsing and indenting lambdas.
Daniel Jasper [Thu, 5 Sep 2013 10:04:31 +0000 (10:04 +0000)]
clang-format: Fix parsing and indenting lambdas.

Before:
  void f() {
    other(x.begin(), x.end(), //
                         [&](int, int) { return 1; });
  }

After:
  void f() {
    other(x.begin(), x.end(), //
          [&](int, int) { return 1; });
  }

llvm-svn: 190039

11 years agoclang-format: Enable formatting of nested blocks.
Daniel Jasper [Thu, 5 Sep 2013 09:29:45 +0000 (09:29 +0000)]
clang-format: Enable formatting of nested blocks.

Among other things, this enables (better) formatting lambdas and
constructs like:
  MACRO({
          long_statement();
          long_statement_2();
        },
        {
          long_statement();
          long_statement_2();
        },
        { short_statement(); }, "");

This fixes llvm.org/PR15381.

llvm-svn: 190038

11 years ago[analyzer] Restructure a test file
Pavel Labath [Thu, 5 Sep 2013 09:18:36 +0000 (09:18 +0000)]
[analyzer] Restructure a test file

Summary:
I've had a test failure here while experimenting and I've found that it's
impossible to find what is wrong with the previous structure of the file. So I
have grouped the expected output with the function that produces it, to make
searching for discrepancies more obvious.

Reviewers: jordan_rose

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

llvm-svn: 190037

11 years agoMake error text if clang-format is not on the system PATH more helpful,
Manuel Klimek [Thu, 5 Sep 2013 08:31:48 +0000 (08:31 +0000)]
Make error text if clang-format is not on the system PATH more helpful,
as this is going to be a common mistake (installing LLVM defaults to not putting
the tools onto the PATH).

llvm-svn: 190036

11 years agoDeclare missing dependency on AliasAnalysis. Patch by Liu Xin!
Nick Lewycky [Thu, 5 Sep 2013 08:19:58 +0000 (08:19 +0000)]
Declare missing dependency on AliasAnalysis. Patch by Liu Xin!

llvm-svn: 190035

11 years agoFix typos in assert message.
Nick Lewycky [Thu, 5 Sep 2013 06:53:59 +0000 (06:53 +0000)]
Fix typos in assert message.

llvm-svn: 190034

11 years ago[Sparc] Correctly handle call to functions with ReturnsTwice attribute.
Venkatraman Govindaraju [Thu, 5 Sep 2013 05:32:16 +0000 (05:32 +0000)]
[Sparc] Correctly handle call to functions with ReturnsTwice attribute.

In sparc, setjmp stores only the registers %fp, %sp, %i7 and %o7. longjmp restores
the stack, and the callee-saved registers (all local/in registers: %i0-%i7, %l0-%l7)
using the stored %fp and register windows. However, this does not guarantee that the longjmp
will restore the registers, as they were when the setjmp was called. This is because these
registers may be clobbered after returning from setjmp, but before calling longjmp.

This patch prevents the registers %i0-%i5, %l0-l7 to live across the setjmp call using the register mask.

llvm-svn: 190033

11 years agoN3545: Quoted strings
Marshall Clow [Thu, 5 Sep 2013 04:48:45 +0000 (04:48 +0000)]
N3545: Quoted strings

llvm-svn: 190032

11 years ago[lld][cleanup] remove unused ReaderFunc to avoid confusion.
Shankar Easwaran [Thu, 5 Sep 2013 04:27:17 +0000 (04:27 +0000)]
[lld][cleanup] remove unused ReaderFunc to avoid confusion.

llvm-svn: 190031

11 years agosanitizers: Make sure Visual Studio gets error reports
Reid Kleckner [Thu, 5 Sep 2013 03:19:57 +0000 (03:19 +0000)]
sanitizers: Make sure Visual Studio gets error reports

Visual Studio appears to close stderr before launching a non-console
win32 program.  This means we don't see any sanitizer reports.  If
stderr printing fails, call OutputDebugStringA to get the reports into
the Visual Studio debugger console.

llvm-svn: 190030

11 years agoFor "expected unqualified-id" errors after a double colon, and the double colon
Richard Trieu [Thu, 5 Sep 2013 02:31:33 +0000 (02:31 +0000)]
For "expected unqualified-id" errors after a double colon, and the double colon
is at the end of the line, point to the location after the double colon instead
of at the next token.  There is more context to be given this way.  In addition,
the next token can be several lines later.

llvm-svn: 190029

11 years agomsbuild: Add clang's compiler-rt libs to the LibraryPath
Reid Kleckner [Thu, 5 Sep 2013 02:09:34 +0000 (02:09 +0000)]
msbuild: Add clang's compiler-rt libs to the LibraryPath

This allows linking libraries like the asan RTL.

llvm-svn: 190028

11 years agoRemove a spurious comment.
Jim Ingham [Thu, 5 Sep 2013 01:52:29 +0000 (01:52 +0000)]
Remove a spurious comment.

llvm-svn: 190027

11 years agoRemove an unused ivar.
Jim Ingham [Thu, 5 Sep 2013 01:51:57 +0000 (01:51 +0000)]
Remove an unused ivar.

llvm-svn: 190026

11 years agoRemove some unused #includes.
Jim Ingham [Thu, 5 Sep 2013 01:51:15 +0000 (01:51 +0000)]
Remove some unused #includes.

llvm-svn: 190025

11 years ago[lld][ELF] Change the order of the writable note section
Shankar Easwaran [Thu, 5 Sep 2013 01:50:21 +0000 (01:50 +0000)]
[lld][ELF] Change the order of the writable note section

Writable note sections if they exist should not appear before text
they belong in the data segment

llvm-svn: 190024

11 years agoRemove spurious reference to radars in code (we try not to put Radar numbers into...
Jim Ingham [Thu, 5 Sep 2013 01:48:56 +0000 (01:48 +0000)]
Remove spurious reference to radars in code (we try not to put Radar numbers into the sources.)

llvm-svn: 190023

11 years agoasan: Add a wcslen interceptor mirroring strlen
Reid Kleckner [Thu, 5 Sep 2013 01:13:49 +0000 (01:13 +0000)]
asan: Add a wcslen interceptor mirroring strlen

Tested on Linux, since I can't build the tests on Windows yet.

llvm-svn: 190022

11 years agoFix comments to reflect reality.
Bill Wendling [Thu, 5 Sep 2013 00:54:52 +0000 (00:54 +0000)]
Fix comments to reflect reality.

llvm-svn: 190021

11 years agoFormatting.
Eric Christopher [Thu, 5 Sep 2013 00:22:35 +0000 (00:22 +0000)]
Formatting.

llvm-svn: 190019

11 years agoAdd specific warning flags for GNU ext in lexer.
Eli Friedman [Thu, 5 Sep 2013 00:02:30 +0000 (00:02 +0000)]
Add specific warning flags for GNU ext in lexer.

This patch adds the following flags covering existing warnings:

-Wgnu-zero-variadic-macro-arguments
-Wgnu-imaginary-constant
-Wgnu-binary-literal
-Wgnu-zero-line-directive

Patch by Peter Lewis.

llvm-svn: 190017

11 years agoNote when a decl is used in AST files.
Eli Friedman [Thu, 5 Sep 2013 00:02:25 +0000 (00:02 +0000)]
Note when a decl is used in AST files.

When an AST file is built based on another AST file, it can use a decl from
the fist file, and therefore mark the "isUsed" bit.  We need to note this in
the AST file so that the bit is set correctly when the second AST file is
loaded.

This patch introduces the distinction between setIsUsed() and markUsed() so
that we don't call into the ASTMutationListener callback when it wouldn't
be appropriate.

Fixes PR16635.

llvm-svn: 190016

11 years agoClean up some whitespace and comment formatting.
Eric Christopher [Thu, 5 Sep 2013 00:01:17 +0000 (00:01 +0000)]
Clean up some whitespace and comment formatting.

llvm-svn: 190015

11 years agomi-sched: Force bottom up scheduling for generic targets.
Andrew Trick [Wed, 4 Sep 2013 23:54:00 +0000 (23:54 +0000)]
mi-sched: Force bottom up scheduling for generic targets.

Fast register pressure tracking currently only takes effect during
bottom up scheduling. Forcing this is a bit faster and simpler for
targets that don't have many scheduling constraints and don't need
top-down scheduling.

llvm-svn: 190014

11 years agoAdd names for mach-o permissions bits and use the symbol names in place of magic...
Nick Kledzik [Wed, 4 Sep 2013 23:53:44 +0000 (23:53 +0000)]
Add names for mach-o permissions bits and use the symbol names in place of magic numbers

llvm-svn: 190013

11 years agoMark issues 2103, 2005, 2196 and 2203 as complete. No code changes.
Marshall Clow [Wed, 4 Sep 2013 23:48:25 +0000 (23:48 +0000)]
Mark issues 2103, 2005, 2196 and 2203 as complete. No code changes.

llvm-svn: 190012

11 years agoMove default dwarf version enum into the llvm dwarf constants rather
Eric Christopher [Wed, 4 Sep 2013 23:38:29 +0000 (23:38 +0000)]
Move default dwarf version enum into the llvm dwarf constants rather
than the spec dwarf constants.

llvm-svn: 190011

11 years agoPR17103: Scoped enumerations with signed integer types have signed integer
Richard Smith [Wed, 4 Sep 2013 23:34:21 +0000 (23:34 +0000)]
PR17103: Scoped enumerations with signed integer types have signed integer
representation. Don't emit comparisons on them as 'icmp ult'!

llvm-svn: 190010

11 years agofix typo in enum name
Nick Kledzik [Wed, 4 Sep 2013 23:27:21 +0000 (23:27 +0000)]
fix typo in enum name

llvm-svn: 190009

11 years agoReport all methods in an Objective-C class that
Sean Callanan [Wed, 4 Sep 2013 23:25:26 +0000 (23:25 +0000)]
Report all methods in an Objective-C class that
have a certain name, not just the first.  This
is useful if a class method and an instance
method have the same name.

<rdar://problem/14872081>

llvm-svn: 190008

11 years agoFixed detection of 'p' packet support in debugserver,
Sean Callanan [Wed, 4 Sep 2013 23:24:15 +0000 (23:24 +0000)]
Fixed detection of 'p' packet support in debugserver,
by appending the thread ID to the test packet when
debugserver requires it.

This allows register writing (and, by extension,
expressions) to work on Mac OS X.

llvm-svn: 190007

11 years agoTweak implementation of -Wwrite-strings to better match the behavior of current GCCs:
Richard Smith [Wed, 4 Sep 2013 22:50:31 +0000 (22:50 +0000)]
Tweak implementation of -Wwrite-strings to better match the behavior of current GCCs:

 * In C, as before, if the "warning flag" is enabled, warnings are produced by
   forcing string literals to have const-qualified types (the produced warnings
   are *not* -Wwrite-strings warnings). However, more recent GCCs (at least 4.4
   onwards) now take -w into account here, so we now do the same.

 * In C++, this flag is entirely sane: it behaves just like any other warning
   flag. Stop triggering -fconst-strings here. This is a bit cleaner, but there's
   no real functionality change except in the case where -Xclang -fno-const-strings
   is also specified.

llvm-svn: 190006

11 years agoObjectiveC migrator: start introducing NS_XXX annotations
Fariborz Jahanian [Wed, 4 Sep 2013 22:49:19 +0000 (22:49 +0000)]
ObjectiveC migrator: start introducing NS_XXX annotations
to Method/functions returning ObjC objects. wip.

llvm-svn: 190005

11 years agoAdd missing header line.
Bill Wendling [Wed, 4 Sep 2013 22:35:41 +0000 (22:35 +0000)]
Add missing header line.

llvm-svn: 190004

11 years agoUse ArrayRef instead of explicit container.
Bill Wendling [Wed, 4 Sep 2013 22:35:29 +0000 (22:35 +0000)]
Use ArrayRef instead of explicit container.

llvm-svn: 190003

11 years agoRemove hack ensuring that darwin didn't produce dwarf > 3 for modules
Eric Christopher [Wed, 4 Sep 2013 22:21:24 +0000 (22:21 +0000)]
Remove hack ensuring that darwin didn't produce dwarf > 3 for modules
without a limiting factor.

Update all testcases accordingly.

llvm-svn: 190002

11 years agoReapply r189013 (reverted in r189906) now that the underlying issue is fixed and...
David Blaikie [Wed, 4 Sep 2013 22:03:57 +0000 (22:03 +0000)]
Reapply r189013 (reverted in r189906) now that the underlying issue is fixed and tested (in r189996)

Debug info emission was tripping over an IRGen bug (fixed in r189996)
that was resulting in duplicate emission of static data members of class
templates in namespaces.

We could add more test coverage to debug info for this issue
specifically, but I think the underlying IRGen test is more targeted and
sufficient for the issue.

llvm-svn: 190001

11 years agoRevert "Revert r189902 as the workaround shouldn't be necessary anymore."
Eric Christopher [Wed, 4 Sep 2013 21:36:52 +0000 (21:36 +0000)]
Revert "Revert r189902 as the workaround shouldn't be necessary anymore."

Needs testcase updates.

llvm-svn: 190000

11 years agoRevert r189902 as the workaround shouldn't be necessary anymore.
Eric Christopher [Wed, 4 Sep 2013 21:26:56 +0000 (21:26 +0000)]
Revert r189902 as the workaround shouldn't be necessary anymore.

llvm-svn: 189999

11 years agoExpand and rewrite comment.
Eric Christopher [Wed, 4 Sep 2013 21:23:23 +0000 (21:23 +0000)]
Expand and rewrite comment.

llvm-svn: 189998

11 years agocomment typo
Andrew Trick [Wed, 4 Sep 2013 21:12:05 +0000 (21:12 +0000)]
comment typo

llvm-svn: 189997

11 years agoDo not emit duplicate global initializers for template static data members inside...
David Blaikie [Wed, 4 Sep 2013 21:07:37 +0000 (21:07 +0000)]
Do not emit duplicate global initializers for template static data members inside namespaces

A quirk of AST representation leads to class template static data member
definitions being visited twice during Clang IRGen resulting in
duplicate (benign) initializers.

Discovered while investigating a possibly-related debug info bug tickled
by the duplicate emission of these members & their associated debug
info.

With thanks to Richard Smith for help investigating, understanding, and
helping with the fix.

llvm-svn: 189996

11 years agoRemove dead subtree limit code.
Andrew Trick [Wed, 4 Sep 2013 21:00:20 +0000 (21:00 +0000)]
Remove dead subtree limit code.

llvm-svn: 189995

11 years ago-view-misched-dags, better pruning.
Andrew Trick [Wed, 4 Sep 2013 21:00:18 +0000 (21:00 +0000)]
-view-misched-dags, better pruning.

llvm-svn: 189994

11 years agomi-sched: DEBUG cleanup, call tracePick for unidirectional scheduling.
Andrew Trick [Wed, 4 Sep 2013 21:00:16 +0000 (21:00 +0000)]
mi-sched: DEBUG cleanup, call tracePick for unidirectional scheduling.

llvm-svn: 189993

11 years ago80 columns
Andrew Trick [Wed, 4 Sep 2013 21:00:13 +0000 (21:00 +0000)]
80 columns

llvm-svn: 189992

11 years agomi-sched: Suppress register pressure tracking when the scheduling window is too small.
Andrew Trick [Wed, 4 Sep 2013 21:00:11 +0000 (21:00 +0000)]
mi-sched: Suppress register pressure tracking when the scheduling window is too small.

If the instruction window is < NumRegs/2, pressure tracking is not
likely to be effective. The scheduler has to process a very large
number of tiny blocks. We want this to be fast.

llvm-svn: 189991

11 years agomi-sched: Load clustering is a bit to expensive to enable unconditionally.
Andrew Trick [Wed, 4 Sep 2013 21:00:08 +0000 (21:00 +0000)]
mi-sched: Load clustering is a bit to expensive to enable unconditionally.

llvm-svn: 189990

11 years agomi-sched: Reuse an invalid HazardRecognizer to save compile time.
Andrew Trick [Wed, 4 Sep 2013 21:00:05 +0000 (21:00 +0000)]
mi-sched: Reuse an invalid HazardRecognizer to save compile time.

llvm-svn: 189989

11 years agomi-sched: bypass heuristic checks when regpressure tracking is disabled.
Andrew Trick [Wed, 4 Sep 2013 21:00:02 +0000 (21:00 +0000)]
mi-sched: bypass heuristic checks when regpressure tracking is disabled.

llvm-svn: 189988

11 years agoAdded -misched-regpressure option.
Andrew Trick [Wed, 4 Sep 2013 20:59:59 +0000 (20:59 +0000)]
Added -misched-regpressure option.

Register pressure tracking is half the complexity of the
scheduler. It's useful to be able to turn it off for compile time and
performance comparisons.

llvm-svn: 189987

11 years agoChange swift/vldm test case to be less dependent on allocation order
Arnold Schwaighofer [Wed, 4 Sep 2013 20:51:06 +0000 (20:51 +0000)]
Change swift/vldm test case to be less dependent on allocation order

'Force' values in registers using the calling convention. Now, we only depend on
the calling convention and that the allocator performs copy coalescing.

llvm-svn: 189985

11 years agomodularize - Fix of header dependencies - this time with the source.
John Thompson [Wed, 4 Sep 2013 20:46:24 +0000 (20:46 +0000)]
modularize - Fix of header dependencies - this time with the source.

llvm-svn: 189984

11 years agomodularize - Fix of header dependencies.
John Thompson [Wed, 4 Sep 2013 20:45:43 +0000 (20:45 +0000)]
modularize - Fix of header dependencies.

llvm-svn: 189983

11 years agoRename some variables to match the style guide.
Rafael Espindola [Wed, 4 Sep 2013 20:08:46 +0000 (20:08 +0000)]
Rename some variables to match the style guide.

I am about to patch this code, and this makes the diff far more readable.

llvm-svn: 189982

11 years agoR600: Use shared op optimization when checking cycle compatibility
Vincent Lejeune [Wed, 4 Sep 2013 19:53:54 +0000 (19:53 +0000)]
R600: Use shared op optimization when checking cycle compatibility

llvm-svn: 189981

11 years agoR600: Non vector only instruction can be scheduled on trans unit
Vincent Lejeune [Wed, 4 Sep 2013 19:53:46 +0000 (19:53 +0000)]
R600: Non vector only instruction can be scheduled on trans unit

llvm-svn: 189980

11 years agoR600: Use SchedModel enum for is{Trans,Vector}Only functions
Vincent Lejeune [Wed, 4 Sep 2013 19:53:30 +0000 (19:53 +0000)]
R600: Use SchedModel enum for is{Trans,Vector}Only functions

llvm-svn: 189979

11 years agoR600: Remove fmul.v4f32.ll test which is redundant with fmul.ll
Vincent Lejeune [Wed, 4 Sep 2013 19:53:22 +0000 (19:53 +0000)]
R600: Remove fmul.v4f32.ll test which is redundant with fmul.ll

llvm-svn: 189978

11 years agoUnify and clean up.
Eric Christopher [Wed, 4 Sep 2013 19:53:21 +0000 (19:53 +0000)]
Unify and clean up.

llvm-svn: 189977

11 years agoRemove the -fuse-gold-plugin driver option.
Rafael Espindola [Wed, 4 Sep 2013 19:37:35 +0000 (19:37 +0000)]
Remove the -fuse-gold-plugin driver option.

* It was redundant with -flto.
* It was confusing since -uAnythingElse is a different option.
* GCC uses -fuse-linker-plugin, so it was not even a compatibility option.

llvm-svn: 189976

11 years agoMerge these 2 tests in a single file.
Rafael Espindola [Wed, 4 Sep 2013 19:19:32 +0000 (19:19 +0000)]
Merge these 2 tests in a single file.

llvm-svn: 189975

11 years agoUpdate the header guards for clang-modernize's unittests.
Chandler Carruth [Wed, 4 Sep 2013 19:15:54 +0000 (19:15 +0000)]
Update the header guards for clang-modernize's unittests.

llvm-svn: 189974

11 years agoUpdate the header guards for clang-modernize.
Chandler Carruth [Wed, 4 Sep 2013 19:13:50 +0000 (19:13 +0000)]
Update the header guards for clang-modernize.

llvm-svn: 189973

11 years agoARM: Teach A15 SDOptimizer to properly handle D-reg by-lane.
Jim Grosbach [Wed, 4 Sep 2013 19:08:44 +0000 (19:08 +0000)]
ARM: Teach A15 SDOptimizer to properly handle D-reg by-lane.

These instructions, such as vmul.f32, require the second source operand to
be in D0-D15 rather than the full D0-D31. When optimizing, make sure to
account for that by constraining the register class of a replacement virtual
register to be compatible with the virtual register(s) it's replacing.

I've been unsuccessful in creating a non-fragile regression test. This issue
was detected by the LLVM nightly test suite running on an A15 (Bullet).

PR17093: http://llvm.org/bugs/show_bug.cgi?id=17093
llvm-svn: 189972

11 years agoSmall simplification given that insert of an empty range is a nop.
Rafael Espindola [Wed, 4 Sep 2013 18:53:21 +0000 (18:53 +0000)]
Small simplification given that insert of an empty range is a nop.

llvm-svn: 189971

11 years agoRemove 'param' label from comments. They aren't used properly here.
Bill Wendling [Wed, 4 Sep 2013 18:48:12 +0000 (18:48 +0000)]
Remove 'param' label from comments. They aren't used properly here.

llvm-svn: 189970

11 years agoRefactor duplicated logic to a helper function.
Rafael Espindola [Wed, 4 Sep 2013 18:37:36 +0000 (18:37 +0000)]
Refactor duplicated logic to a helper function.

No functionality change.

llvm-svn: 189969

11 years agomodularize - Update main comment.
John Thompson [Wed, 4 Sep 2013 18:29:36 +0000 (18:29 +0000)]
modularize - Update main comment.

llvm-svn: 189968

11 years agoRemove dead code.
Rafael Espindola [Wed, 4 Sep 2013 18:16:02 +0000 (18:16 +0000)]
Remove dead code.

llvm-svn: 189967

11 years agoFix up a few straggling bits of the build system. This should fix the
Chandler Carruth [Wed, 4 Sep 2013 18:03:44 +0000 (18:03 +0000)]
Fix up a few straggling bits of the build system. This should fix the
build of the clang-modernize unittest which is for some reason not being
built by default on my system (sorry about that).

llvm-svn: 189966

11 years agoMemoryBufer: add a test: check that a file with size that is a multiple of the
Dmitri Gribenko [Wed, 4 Sep 2013 18:02:13 +0000 (18:02 +0000)]
MemoryBufer: add a test: check that a file with size that is a multiple of the
page size can be null terminated correctly by MemoryBuffer.

llvm-svn: 189965

11 years agoThis is an example synthetic provider for libc++ unordered (multi) maps&set
Enrico Granata [Wed, 4 Sep 2013 17:48:52 +0000 (17:48 +0000)]
This is an example synthetic provider for libc++ unordered (multi) maps&set
Thanks to Jared Grubb for writing it and sharing it!

llvm-svn: 189964

11 years agoThis is apparantely the one makefile that actually has file names in it.
Chandler Carruth [Wed, 4 Sep 2013 17:47:21 +0000 (17:47 +0000)]
This is apparantely the one makefile that actually has file names in it.
;] Update them. Sorry for the breakage.

llvm-svn: 189963

11 years agoRename variables to match the style guide and clang-format.
Rafael Espindola [Wed, 4 Sep 2013 17:44:24 +0000 (17:44 +0000)]
Rename variables to match the style guide and clang-format.

llvm-svn: 189962

11 years agoSwift: Only build vldm/vstm with q register aligned register lists
Arnold Schwaighofer [Wed, 4 Sep 2013 17:41:16 +0000 (17:41 +0000)]
Swift: Only build vldm/vstm with q register aligned register lists

Unaligned vldm/vstm need more uops and therefore are slower in general on swift.

radar://14522102

llvm-svn: 189961

11 years agoRename cpp11-migrate to clang-modernize.
Chandler Carruth [Wed, 4 Sep 2013 17:35:07 +0000 (17:35 +0000)]
Rename cpp11-migrate to clang-modernize.

There is no reason to expect this tool to be limited to C++11, it seems
very likely to be of on-going interest. It seems likely to be useful for
modernizing even as new libraries come out in TSes and other formats
than a complete standard. Fundamentally, we need something a bit more
general. After some discussion on the list, going with
'clang-modernize'.

I've tried to do a reasonably comprehensive job of fixing up the names,
but I may still have missed some. Feel free to poke me if you spot any
fallout here. Things I've tried reasonably hard to find and fix:

- cpp11-migrate -> clang-modernize
- Migrator -> Modernizer
- Clean up the introductory documentation that was C++11 specific.

I'll also point out that this tool continues to delight me. =] Also,
a huge thanks to those who have so carefully, thoroughly documented the
tool. The docs here are simply phenomenal. Every tool should be this
well documented. I hope I have updated the documentation reasonably
well, but I'm not very good at documentation, so review much
appreciated.

llvm-svn: 189960