platform/upstream/llvm.git
11 years agoThe standard ARM C++ ABI dictates that inline functions are
John McCall [Fri, 25 Jan 2013 22:31:03 +0000 (22:31 +0000)]
The standard ARM C++ ABI dictates that inline functions are
never key functions.  We did not implement that rule for the
iOS ABI, which was driven by what was implemented in gcc-4.2.
However, implement it now for other ARM-based platforms.

llvm-svn: 173515

11 years agoFirst pass at abstracting out a class for the target C++ ABI.
John McCall [Fri, 25 Jan 2013 22:30:49 +0000 (22:30 +0000)]
First pass at abstracting out a class for the target C++ ABI.

llvm-svn: 173514

11 years agoAdd file to CMakeLists (file added in r173505)
Dmitri Gribenko [Fri, 25 Jan 2013 22:29:23 +0000 (22:29 +0000)]
Add file to CMakeLists (file added in r173505)

llvm-svn: 173513

11 years agoOptimize ModuleManager::visit() by precomputing the visitation order
Douglas Gregor [Fri, 25 Jan 2013 22:25:23 +0000 (22:25 +0000)]
Optimize ModuleManager::visit() by precomputing the visitation order
and limiting ourselves to two memory allocations. 10% speedup in
-fsyntax-only time for modules.

With this change, we can actually see some performance different from
the global module index, but it's still about 1%.

llvm-svn: 173512

11 years agoRemove useless 'XPASS: *' from tests
Dmitri Gribenko [Fri, 25 Jan 2013 22:20:24 +0000 (22:20 +0000)]
Remove useless 'XPASS: *' from tests

llvm-svn: 173511

11 years agoTemporarily disabling ms-asm test
Renato Golin [Fri, 25 Jan 2013 22:13:50 +0000 (22:13 +0000)]
Temporarily disabling ms-asm test

llvm-svn: 173510

11 years agoXFAIL close-stderr on win32
Reid Kleckner [Fri, 25 Jan 2013 22:12:54 +0000 (22:12 +0000)]
XFAIL close-stderr on win32

The test runner does not rewrite instances of /dev/null inside the
quoted sh command.  /dev/null does not exist, so opt will fail to open
it, and return a non-zero exit code.

llvm-svn: 173509

11 years agoSet the +x bit on two batch scripts
Reid Kleckner [Fri, 25 Jan 2013 22:12:50 +0000 (22:12 +0000)]
Set the +x bit on two batch scripts

Cygwin git-svn will faithfully forward the svn properties all the way
down to the NTFS executable permission.  Without the +x bit, tests using
these scripts fail with "Access Denied".

llvm-svn: 173508

11 years agoAdd parens to suppress an MSVC 2012 << precedence warning
Reid Kleckner [Fri, 25 Jan 2013 22:12:45 +0000 (22:12 +0000)]
Add parens to suppress an MSVC 2012 << precedence warning

It doesn't seem to like instantiating the isUInt<unsigned N> template
with 6+3, and then doing <<N.

llvm-svn: 173507

11 years agoFileCheck-ify some grep tests
Reid Kleckner [Fri, 25 Jan 2013 22:11:46 +0000 (22:11 +0000)]
FileCheck-ify some grep tests

These tests in particular try to use escaped square brackets as an
argument to grep, which is failing for me with native win32 python.  It
appears the backslash is being lost near the CreateProcess*() call.

llvm-svn: 173506

11 years agoAdd an insert() method to MapVector. Adds the first MapVector unit test.
Nick Lewycky [Fri, 25 Jan 2013 22:11:02 +0000 (22:11 +0000)]
Add an insert() method to MapVector. Adds the first MapVector unit test.

llvm-svn: 173505

11 years agoThis test actually passes, just add the missing expected-error
Dmitri Gribenko [Fri, 25 Jan 2013 22:08:24 +0000 (22:08 +0000)]
This test actually passes, just add the missing expected-error

llvm-svn: 173504

11 years agoIn this patch, we teach X86_64TargetMachine that it has a ILP32
Eli Bendersky [Fri, 25 Jan 2013 22:07:43 +0000 (22:07 +0000)]
In this patch, we teach X86_64TargetMachine that it has a ILP32
(defined by the x32 ABI) mode, in which case its pointers are 32-bits
in size. This knowledge is also added to X86RegisterInfo that now
returns the appropriate registers in getPointerRegClass.

There are many outcomes to this change. In order to keep the patches
separate and manageable, we start by focusing on some simple testable
cases. The patch adds a test with passing a pointer to a function -
focusing on the difference between the two data models for x86-64.
Another test is added for handling of 'sret' arguments (and
functionality is added in X86ISelLowering to make it work).

A note on naming: the "x32 ABI" document refers to the AMD64
architecture (in LLVM it's distinguished by being is64Bits() in the
x86 subtarget) with two variations: the LP64 (default) data model, and
the ILP32 data model. This patch adds predicates to the subtarget
which are consistent with this naming scheme.

llvm-svn: 173503

11 years agoAdd back a RUN line removed by mistake by a previous commit
Eli Bendersky [Fri, 25 Jan 2013 21:58:09 +0000 (21:58 +0000)]
Add back a RUN line removed by mistake by a previous commit

llvm-svn: 173502

11 years agoAdd instruction encodings / disassembly support for l4r instructions.
Richard Osborne [Fri, 25 Jan 2013 21:55:32 +0000 (21:55 +0000)]
Add instruction encodings / disassembly support for l4r instructions.

llvm-svn: 173501

11 years agoLoopVectorize: Refactor the code that vectorizes loads/stores to remove duplication.
Nadav Rotem [Fri, 25 Jan 2013 21:47:42 +0000 (21:47 +0000)]
LoopVectorize: Refactor the code that vectorizes loads/stores to remove duplication.

llvm-svn: 173500

11 years agoUse the new 'getSlotIndex' method to retrieve the attribute's slot index.
Bill Wendling [Fri, 25 Jan 2013 21:46:52 +0000 (21:46 +0000)]
Use the new 'getSlotIndex' method to retrieve the attribute's slot index.

llvm-svn: 173499

11 years agoNow that llvm-dwarfdump supports flags to specify which DWARF section to dump,
Eli Bendersky [Fri, 25 Jan 2013 21:44:53 +0000 (21:44 +0000)]
Now that llvm-dwarfdump supports flags to specify which DWARF section to dump,
use them in tests that run llvm-dwarfdump. This is in order to make tests as
specific as possible.

llvm-svn: 173498

11 years agoUse const reference instead of vector copying.
Jakub Staszak [Fri, 25 Jan 2013 21:44:27 +0000 (21:44 +0000)]
Use const reference instead of vector copying.

llvm-svn: 173497

11 years agoMigrate test from grep to -fdiagnostics-parseable-fixits
Dmitri Gribenko [Fri, 25 Jan 2013 21:41:29 +0000 (21:41 +0000)]
Migrate test from grep to -fdiagnostics-parseable-fixits

llvm-svn: 173496

11 years agoAdd an accessor method to get the slot's index. This will limit the use of AttributeW...
Bill Wendling [Fri, 25 Jan 2013 21:30:53 +0000 (21:30 +0000)]
Add an accessor method to get the slot's index. This will limit the use of AttributeWithIndex.

llvm-svn: 173495

11 years agoUse the correct format in the STW / SETPSC instruction names.
Richard Osborne [Fri, 25 Jan 2013 21:25:12 +0000 (21:25 +0000)]
Use the correct format in the STW / SETPSC instruction names.

llvm-svn: 173494

11 years agoFix order of operands for crc8_l4r
Richard Osborne [Fri, 25 Jan 2013 21:20:28 +0000 (21:20 +0000)]
Fix order of operands for crc8_l4r

The order in which operands appear in the encoded instruction is different
to order in which they appear in assembly. This changes the XCore backend to
use the instruction encoding order.

llvm-svn: 173493

11 years agoRemove empty directories.
Daniel Dunbar [Fri, 25 Jan 2013 21:15:32 +0000 (21:15 +0000)]
Remove empty directories.

llvm-svn: 173492

11 years ago[utils] Remove the OptionalTests subdir no one runs.
Daniel Dunbar [Fri, 25 Jan 2013 21:12:20 +0000 (21:12 +0000)]
[utils] Remove the OptionalTests subdir no one runs.

llvm-svn: 173491

11 years ago[utils] Remove C++Tests that I don't think anyone uses anymore.
Daniel Dunbar [Fri, 25 Jan 2013 21:12:17 +0000 (21:12 +0000)]
[utils] Remove C++Tests that I don't think anyone uses anymore.

llvm-svn: 173490

11 years agoWhen encountering an unknown file format, ObjectFile::createObjectFile should
Eli Bendersky [Fri, 25 Jan 2013 20:53:41 +0000 (20:53 +0000)]
When encountering an unknown file format, ObjectFile::createObjectFile should
politely report it instead of running into llvm_unreachable.

Also patch llvm-dwarfdump to actually check whether the file it's attempting to
dump is a valid object file.

llvm-svn: 173489

11 years ago[CMake] Setup include dirs properly.
Michael J. Spencer [Fri, 25 Jan 2013 20:50:01 +0000 (20:50 +0000)]
[CMake] Setup include dirs properly.

llvm-svn: 173488

11 years agoThis is no trule.
David Blaikie [Fri, 25 Jan 2013 20:47:58 +0000 (20:47 +0000)]
This is no trule.

llvm-svn: 173487

11 years agoSilence unintended fallthrough diagnostic on a case label preceded with a normal...
Alexander Kornienko [Fri, 25 Jan 2013 20:44:56 +0000 (20:44 +0000)]
Silence unintended fallthrough diagnostic on a case label preceded with a normal label.

Summary:
It's unlikely that a fallthrough is unintended in the following code:
switch (n) {
...
  label:
  case 1:
...
    goto label;
...
}

Reviewers: rsmith, doug.gregor

Reviewed By: doug.gregor

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

llvm-svn: 173486

11 years agoDisable confirmation prompts for testing
Daniel Malea [Fri, 25 Jan 2013 20:38:49 +0000 (20:38 +0000)]
Disable confirmation prompts for testing
- set auto-confirm to false when running TestExprs (avoid hang when using API)
- set prompt-on-quit to false in test helper (avoid timeout when using lldb CLI)

llvm-svn: 173485

11 years agoFileCheck'ize tests
Dmitri Gribenko [Fri, 25 Jan 2013 20:34:08 +0000 (20:34 +0000)]
FileCheck'ize tests

llvm-svn: 173484

11 years agoRemove hardcoded -arch from lang/cpp testcase makefiles
Daniel Malea [Fri, 25 Jan 2013 20:33:59 +0000 (20:33 +0000)]
Remove hardcoded -arch from lang/cpp testcase makefiles
- skip rdar12991846 (already marked expected-fail) to avoid introducing a i386 crash

llvm-svn: 173483

11 years agoMigrate tests to -verify and merge them
Dmitri Gribenko [Fri, 25 Jan 2013 20:33:53 +0000 (20:33 +0000)]
Migrate tests to -verify and merge them

llvm-svn: 173482

11 years agoImprove the !add TableGen test case.
Hal Finkel [Fri, 25 Jan 2013 20:29:25 +0000 (20:29 +0000)]
Improve the !add TableGen test case.

Suggested by Sean Silva.

llvm-svn: 173481

11 years agoAdd command-line flags for DWARF dumping.
Eli Bendersky [Fri, 25 Jan 2013 20:26:43 +0000 (20:26 +0000)]
Add command-line flags for DWARF dumping.

Flags for dumping specific DWARF sections added in lib/DebugInfo and
llvm-dwarfdump.

llvm-svn: 173480

11 years agoAdd instruction encodings / disassembly support for l5r instructions.
Richard Osborne [Fri, 25 Jan 2013 20:20:07 +0000 (20:20 +0000)]
Add instruction encodings / disassembly support for l5r instructions.

llvm-svn: 173479

11 years agoFixed typo.
Michael Gottesman [Fri, 25 Jan 2013 20:20:00 +0000 (20:20 +0000)]
Fixed typo.

llvm-svn: 173478

11 years agoFix order of operands for l5r instructions.
Richard Osborne [Fri, 25 Jan 2013 20:16:00 +0000 (20:16 +0000)]
Fix order of operands for l5r instructions.

With this change the operands order matches the order in which the operands
are encoded in the instruction.

llvm-svn: 173477

11 years agoUse correct mnemonic / instruction name for ldivu.
Richard Osborne [Fri, 25 Jan 2013 20:11:26 +0000 (20:11 +0000)]
Use correct mnemonic / instruction name for ldivu.

llvm-svn: 173476

11 years agoLoopVectorize: Simplify code. No functionality change.
Benjamin Kramer [Fri, 25 Jan 2013 19:43:15 +0000 (19:43 +0000)]
LoopVectorize: Simplify code. No functionality change.

llvm-svn: 173475

11 years agoadded ability to dynamically change the ExportList of an already
Pedro Artigas [Fri, 25 Jan 2013 19:41:03 +0000 (19:41 +0000)]
added ability to dynamically change the ExportList of an already
created InternalizePass (useful for pass reuse)

llvm-svn: 173474

11 years agoFix buildbot building errors.
Greg Clayton [Fri, 25 Jan 2013 19:40:54 +0000 (19:40 +0000)]
Fix buildbot building errors.

llvm-svn: 173473

11 years agoAdded new section to the git-svn getting started section that provides a
Michael Gottesman [Fri, 25 Jan 2013 19:31:09 +0000 (19:31 +0000)]
Added new section to the git-svn getting started section that provides a
custom git script called git-svnup which handles all of the work of
using the git-mirrors/keeping the git-svn numbers in sync.

llvm-svn: 173472

11 years agoLoopVectorizer: Refactor more code to use the IRBuilder.
Nadav Rotem [Fri, 25 Jan 2013 19:26:23 +0000 (19:26 +0000)]
LoopVectorizer: Refactor more code to use the IRBuilder.

llvm-svn: 173471

11 years agoFix indenting typo in TestSTL.py
Daniel Malea [Fri, 25 Jan 2013 19:14:49 +0000 (19:14 +0000)]
Fix indenting typo in TestSTL.py

llvm-svn: 173470

11 years ago[tests] Force a triple to ensure /usr/include is one of the entries.
Daniel Dunbar [Fri, 25 Jan 2013 18:50:18 +0000 (18:50 +0000)]
[tests] Force a triple to ensure /usr/include is one of the entries.

llvm-svn: 173469

11 years agoUse xcrun to find the right compiler when building llvmCore. <rdar://12801151>
Bob Wilson [Fri, 25 Jan 2013 18:40:25 +0000 (18:40 +0000)]
Use xcrun to find the right compiler when building llvmCore. <rdar://12801151>

llvm-svn: 173468

11 years agoRefactor some code to use the IRBuilder.
Nadav Rotem [Fri, 25 Jan 2013 18:34:09 +0000 (18:34 +0000)]
Refactor some code to use the IRBuilder.

llvm-svn: 173467

11 years ago<rdar://13073234>
Han Ming Ong [Fri, 25 Jan 2013 18:32:24 +0000 (18:32 +0000)]
<rdar://13073234>

Get the number of threads correct.

llvm-svn: 173466

11 years ago[build/clang_darwin] Don't try to run sw_vers if we don't have it.
Daniel Dunbar [Fri, 25 Jan 2013 18:09:28 +0000 (18:09 +0000)]
[build/clang_darwin] Don't try to run sw_vers if we don't have it.
 - Also, fix the test this is guarding, which was backwards.

llvm-svn: 173465

11 years ago[tests] Add a test for -iwithprefix.
Daniel Dunbar [Fri, 25 Jan 2013 18:08:53 +0000 (18:08 +0000)]
[tests] Add a test for -iwithprefix.

 - This just scratches the surface, We have pretty horrible test coverage in
   this area it seems like, but this at least covers the change in r173410.

llvm-svn: 173464

11 years ago<rdar://problem/13069948>
Greg Clayton [Fri, 25 Jan 2013 18:06:21 +0000 (18:06 +0000)]
<rdar://problem/13069948>

Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary.

So I defined a new "lldb::offset_t" which should be used for all file offsets.

After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed.

Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections.

llvm-svn: 173463

11 years agoAdd space after ';'.
Fariborz Jahanian [Fri, 25 Jan 2013 17:47:49 +0000 (17:47 +0000)]
Add space after ';'.

llvm-svn: 173462

11 years agoImprove diagnsotic further on integer overflow.
Fariborz Jahanian [Fri, 25 Jan 2013 17:19:07 +0000 (17:19 +0000)]
Improve diagnsotic further on integer overflow.

llvm-svn: 173461

11 years agoRename variable to be more comprehensible and follow naming convention
Eli Bendersky [Fri, 25 Jan 2013 17:06:42 +0000 (17:06 +0000)]
Rename variable to be more comprehensible and follow naming convention

llvm-svn: 173460

11 years agoAPFloat: Make sure that we get a well-formed x87 NaN when converting from a smaller...
Benjamin Kramer [Fri, 25 Jan 2013 17:01:00 +0000 (17:01 +0000)]
APFloat: Make sure that we get a well-formed x87 NaN when converting from a smaller type.

Fixes PR15054.

llvm-svn: 173459

11 years agoDon't suggest to insert [[clang::fallthrough]] before empty cases. Fix for multiple...
Alexander Kornienko [Fri, 25 Jan 2013 15:49:34 +0000 (15:49 +0000)]
Don't suggest to insert [[clang::fallthrough]] before empty cases. Fix for multiple case labels.

llvm-svn: 173458

11 years agoFix some alignment and line break decisions.
Daniel Jasper [Fri, 25 Jan 2013 15:43:32 +0000 (15:43 +0000)]
Fix some alignment and line break decisions.

This combines two small changes:
1) Put a penalty on breaking after "<"
2) Only produce a hanging indent when parameters are separated by
commas.

Before:
aaaaaaaaaaaaaaaaaaaaaaaa<
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
aaaaaa(new Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
               aaaaaaaaaaaaaaaaaaaaaaaaaaaaa));

After:
aaaaaaaaaaaaaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>(
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
aaaaaa(new Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaa));

This changes one ObjC test, but AFAICT this is not according to any
style guide (neither before nor after). We probably should be aligning
on the ":" there according to:
http://google-styleguide.googlecode.com/svn/trunk/objcguide.xml?showone=Method_Invocations#Method_Invocations

llvm-svn: 173457

11 years ago[msan] Tests for ICmp handling.
Evgeniy Stepanov [Fri, 25 Jan 2013 15:39:11 +0000 (15:39 +0000)]
[msan] Tests for ICmp handling.

llvm-svn: 173456

11 years agoDisable MSVC's warning about noreturn destructors
Reid Kleckner [Fri, 25 Jan 2013 15:36:13 +0000 (15:36 +0000)]
Disable MSVC's warning about noreturn destructors

This warning fires on:
  Operator::~Operator() {
    llvm_unreachable("should never destroy an Operator");
  }

That seems like a false positive.  I don't see any good way to silence
the warning here, so I'm disabling it.

llvm-svn: 173455

11 years agoFix MSVC 2012 warning about a 32-bit shift that should be 64-bit
Reid Kleckner [Fri, 25 Jan 2013 15:35:56 +0000 (15:35 +0000)]
Fix MSVC 2012 warning about a 32-bit shift that should be 64-bit

llvm-svn: 173454

11 years ago[msan] A comment on ICmp handling logic.
Evgeniy Stepanov [Fri, 25 Jan 2013 15:35:29 +0000 (15:35 +0000)]
[msan] A comment on ICmp handling logic.

llvm-svn: 173453

11 years ago[msan] Implement exact shadow propagation for relational ICmp.
Evgeniy Stepanov [Fri, 25 Jan 2013 15:31:10 +0000 (15:31 +0000)]
[msan] Implement exact shadow propagation for relational ICmp.

Only for integers, pointers, and vectors of those. No floats.
Instrumentation seems very heavy, and may need to be replaced
with some approximation in the future.

llvm-svn: 173452

11 years ago[Sanitizer] More fixes to scanf interceptor: stub support for %s, support for %[...
Alexey Samsonov [Fri, 25 Jan 2013 15:26:19 +0000 (15:26 +0000)]
[Sanitizer] More fixes to scanf interceptor: stub support for %s, support for %[...] directive

llvm-svn: 173451

11 years agochange all occurences of File to FileELF
Shankar Easwaran [Fri, 25 Jan 2013 15:19:02 +0000 (15:19 +0000)]
change all occurences of File to FileELF

llvm-svn: 173449

11 years agoThis patch aims to reduce compile time in LegalizeTypes by using SmallDenseMap,
Preston Gurd [Fri, 25 Jan 2013 15:18:54 +0000 (15:18 +0000)]
This patch aims to reduce compile time in LegalizeTypes by using SmallDenseMap,
with an initial number of elements,  instead of DenseMap, which has
zero initial elements, in order to avoid the copying of elements
when the size changes and to avoid allocating space every time
LegalizeTypes is run. This patch will not affect the memory footprint,
because DenseMap will increase the element size to 64
when the first element is added.

Patch by Wan Xiaofei.

llvm-svn: 173448

11 years agoLexer.cpp: Fix a warning with ptrdiff_t on i686. [-Wsign-compare]
NAKAMURA Takumi [Fri, 25 Jan 2013 14:57:21 +0000 (14:57 +0000)]
Lexer.cpp: Fix a warning with ptrdiff_t on i686. [-Wsign-compare]

llvm-svn: 173447

11 years agoMore cleanup of PPC register definitions.
Hal Finkel [Fri, 25 Jan 2013 14:49:10 +0000 (14:49 +0000)]
More cleanup of PPC register definitions.

Uses the new !add TableGen operator to do more cleanup of the
PPC register definitions.

llvm-svn: 173446

11 years agoAdd an addition operator to TableGen
Hal Finkel [Fri, 25 Jan 2013 14:49:08 +0000 (14:49 +0000)]
Add an addition operator to TableGen

This adds an !add(a, b) operator to tablegen; this will be used
to cleanup the PPC register definitions.

llvm-svn: 173445

11 years ago[sanitizer] improve the calloc overflow check (spotted by samsonov@)
Kostya Serebryany [Fri, 25 Jan 2013 12:22:21 +0000 (12:22 +0000)]
[sanitizer] improve the calloc overflow check (spotted by samsonov@)

llvm-svn: 173443

11 years ago[sanitizer] fix calloc overflow in asan/tsan/msan
Kostya Serebryany [Fri, 25 Jan 2013 11:46:22 +0000 (11:46 +0000)]
[sanitizer] fix calloc overflow in asan/tsan/msan

llvm-svn: 173441

11 years ago[Sanitizer] fix errors in scanf interceptors: add support for %c and fix cases like %5d
Alexey Samsonov [Fri, 25 Jan 2013 11:43:32 +0000 (11:43 +0000)]
[Sanitizer] fix errors in scanf interceptors: add support for %c and fix cases like %5d

llvm-svn: 173440

11 years agoclang/test/PCH/modified-header-error.c: Disable it again. It had been problematic...
NAKAMURA Takumi [Fri, 25 Jan 2013 11:07:42 +0000 (11:07 +0000)]
clang/test/PCH/modified-header-error.c: Disable it again. It had been problematic on win32 for while.

llvm-svn: 173439

11 years agoAllow breaking after "::" if absolutely necessary.
Daniel Jasper [Fri, 25 Jan 2013 10:57:27 +0000 (10:57 +0000)]
Allow breaking after "::" if absolutely necessary.

Otherwise, really long nested name specifiers can easily lead to a
violation of the column limit.

Not sure about the rules for indentation in those cases, so input is
appreciated (see tests.).

llvm-svn: 173438

11 years agoFixed the condition codes for the atomic64 min/umin code generation on ARM. If the...
Silviu Baranga [Fri, 25 Jan 2013 10:39:49 +0000 (10:39 +0000)]
Fixed the condition codes for the atomic64 min/umin code generation on ARM. If the sutraction of the higher 32 bit parts gives a 0 result, we need to do the store operation.

llvm-svn: 173437

11 years agoConvertUTF.h: Suppress a warning with ptrdiff_t on i686. [-Wsign-compare]
NAKAMURA Takumi [Fri, 25 Jan 2013 10:01:35 +0000 (10:01 +0000)]
ConvertUTF.h: Suppress a warning with ptrdiff_t on i686. [-Wsign-compare]

llvm-svn: 173436

11 years agoclang/test/Driver/output-file-cleanup.c: Add arm and powerpc to XFAIL.
NAKAMURA Takumi [Fri, 25 Jan 2013 09:43:17 +0000 (09:43 +0000)]
clang/test/Driver/output-file-cleanup.c: Add arm and powerpc to XFAIL.

..."ppc" was not recognized here.

llvm-svn: 173435

11 years agoUse the AttributeSet query instead of the Attribute query.
Bill Wendling [Fri, 25 Jan 2013 08:08:54 +0000 (08:08 +0000)]
Use the AttributeSet query instead of the Attribute query.

llvm-svn: 173434

11 years agoMIsched: Print block name. No functionality.
Andrew Trick [Fri, 25 Jan 2013 07:45:31 +0000 (07:45 +0000)]
MIsched: Print block name. No functionality.

llvm-svn: 173433

11 years agoMachineScheduler support for viewGraph.
Andrew Trick [Fri, 25 Jan 2013 07:45:29 +0000 (07:45 +0000)]
MachineScheduler support for viewGraph.

llvm-svn: 173432

11 years agoScheduleDAG: colorize the DOT graph and improve formatting.
Andrew Trick [Fri, 25 Jan 2013 07:45:25 +0000 (07:45 +0000)]
ScheduleDAG: colorize the DOT graph and improve formatting.

llvm-svn: 173431

11 years agoadd elf targethandler
Shankar Easwaran [Fri, 25 Jan 2013 07:39:18 +0000 (07:39 +0000)]
add elf targethandler

llvm-svn: 173430

11 years agoAdd missing InGroup for this warning.
Nick Lewycky [Fri, 25 Jan 2013 07:31:12 +0000 (07:31 +0000)]
Add missing InGroup for this warning.

llvm-svn: 173429

11 years agoclang/test/Driver/output-file-cleanup.c: Mark it as XFAIL:*-mingw32, ppc, for now.
NAKAMURA Takumi [Fri, 25 Jan 2013 06:56:45 +0000 (06:56 +0000)]
clang/test/Driver/output-file-cleanup.c: Mark it as XFAIL:*-mingw32, ppc, for now.

llvm-svn: 173428

11 years agoScheduleDAG: Added isBoundaryNode to conveniently detect a common corner case.
Andrew Trick [Fri, 25 Jan 2013 06:52:30 +0000 (06:52 +0000)]
ScheduleDAG: Added isBoundaryNode to conveniently detect a common corner case.

This fixes DAG subtree analysis at the boundary.

llvm-svn: 173427

11 years agoSchedDFS: Complete support for nested subtrees.
Andrew Trick [Fri, 25 Jan 2013 06:52:27 +0000 (06:52 +0000)]
SchedDFS: Complete support for nested subtrees.

Maintain separate per-node and per-tree book-keeping.
Track all instructions above a DAG node including nested subtrees.
Seperately track instructions within a subtree.
Record subtree parents.

llvm-svn: 173426

11 years agoMIsched: Improve the interface to SchedDFS analysis (subtrees).
Andrew Trick [Fri, 25 Jan 2013 06:33:57 +0000 (06:33 +0000)]
MIsched: Improve the interface to SchedDFS analysis (subtrees).

Allow the strategy to select SchedDFS. Allow the results of SchedDFS
to affect initialization of the scheduler state.

llvm-svn: 173425

11 years agoArrayRef reverse iterators.
Andrew Trick [Fri, 25 Jan 2013 06:33:52 +0000 (06:33 +0000)]
ArrayRef reverse iterators.

llvm-svn: 173424

11 years agowhitespace
Andrew Trick [Fri, 25 Jan 2013 06:33:50 +0000 (06:33 +0000)]
whitespace

llvm-svn: 173423

11 years agoclang/test/Index/crash-recovery-*.c: Drop 'REQUIRES:shell". "test !" is available...
NAKAMURA Takumi [Fri, 25 Jan 2013 06:31:02 +0000 (06:31 +0000)]
clang/test/Index/crash-recovery-*.c: Drop 'REQUIRES:shell". "test !" is available on Lit win32 since r173421.

llvm-svn: 173422

11 years agolit/ShUtil.py: Deprecate '!' in shell expression. It is not sh-compatible.
NAKAMURA Takumi [Fri, 25 Jan 2013 06:30:36 +0000 (06:30 +0000)]
lit/ShUtil.py: Deprecate '!' in shell expression. It is not sh-compatible.

llvm-svn: 173421

11 years agoSchedDFS: Initial support for nested subtrees.
Andrew Trick [Fri, 25 Jan 2013 06:02:44 +0000 (06:02 +0000)]
SchedDFS: Initial support for nested subtrees.

This is mostly refactoring, along with adding an instruction count
within the subtrees and ensuring we only look at data edges.

llvm-svn: 173420

11 years agoclang/test: Drop "REQUIRES:shell" in three tests. They can run on win32.
NAKAMURA Takumi [Fri, 25 Jan 2013 06:02:11 +0000 (06:02 +0000)]
clang/test: Drop "REQUIRES:shell" in three tests. They can run on win32.

llvm-svn: 173419

11 years agoclang/test/CodeGenCXX/debug-info-static-member.cpp: Appease targetting msvc to add...
NAKAMURA Takumi [Fri, 25 Jan 2013 05:58:53 +0000 (05:58 +0000)]
clang/test/CodeGenCXX/debug-info-static-member.cpp: Appease targetting msvc to add explicit -target x86_64-unknown-unknown.

with -target i686-win32, you will see;

debug-info-static-member.cpp:11:22: error: in-class initializer for static data member of type 'const float' requires 'constexpr' specifier [-Wstatic-float-init]
  const static float const_b = 3.14;
                     ^         ~~~~
  constexpr

llvm-svn: 173418

11 years agoSwitch this code away from Value::isUsedInBasicBlock. That code either
Chandler Carruth [Fri, 25 Jan 2013 05:40:09 +0000 (05:40 +0000)]
Switch this code away from Value::isUsedInBasicBlock. That code either
loops over instructions in the basic block or the use-def list of the
value, neither of which are really efficient when repeatedly querying
about values in the same basic block.

What's more, we already know that the CondBB is small, and so we can do
a much more efficient test by counting the uses in CondBB, and seeing if
those account for all of the uses.

Finally, we shouldn't blanket fail on any such instruction, instead we
should conservatively assume that those instructions are part of the
cost.

Note that this actually fixes a bug in the pass because
isUsedInBasicBlock has a really terrible bug in it. I'll fix that in my
next commit, but the fix for it would make this code suddenly take the
compile time hit I thought it already was taking, so I wanted to go
ahead and migrate this code to a faster & better pattern.

The bug in isUsedInBasicBlock was also causing other tests to test the
wrong thing entirely: for example we weren't actually disabling
speculation for floating point operations as intended (and tested), but
the test passed because we failed to speculate them due to the
isUsedInBasicBlock failure.

llvm-svn: 173417

11 years agoCreate clang/test/Driver/lit.local.cfg.
NAKAMURA Takumi [Fri, 25 Jan 2013 05:09:37 +0000 (05:09 +0000)]
Create clang/test/Driver/lit.local.cfg.

These files had been ignored.

  - clang_f_opts.h
  - debug-comp-dir.S
  - debug-main-file.S

llvm-svn: 173416

11 years agoDrop "REQUIRES:shell" in tests. They can run on win32.
NAKAMURA Takumi [Fri, 25 Jan 2013 04:33:40 +0000 (04:33 +0000)]
Drop "REQUIRES:shell" in tests. They can run on win32.

llvm-svn: 173415

11 years agoSync 'in class initialization of static const double' extension up with GCC,
Richard Smith [Fri, 25 Jan 2013 04:22:16 +0000 (04:22 +0000)]
Sync 'in class initialization of static const double' extension up with GCC,
and split it out of -Wgnu into its own warning flag.

 * In C++11, this is now a hard error (GCC has no extension here in C++11 mode).
   The error can be disabled with -Wno-static-float-init, and has a fixit to
   add 'constexpr'.

 * In C++98, this is still an ExtWarn, but is now controlled by
   -Wstatic-float-init as well as -Wgnu.

llvm-svn: 173414

11 years agoMISched: Add SchedDFSResult to ScheduleDAGMI to formalize the
Andrew Trick [Fri, 25 Jan 2013 04:01:04 +0000 (04:01 +0000)]
MISched: Add SchedDFSResult to ScheduleDAGMI to formalize the
interface and allow other strategies to select it.

llvm-svn: 173413