platform/upstream/llvm.git
11 years agoX86: Decode PALIGN operands so I don't have to do it in my head.
Benjamin Kramer [Sat, 26 Jan 2013 13:31:37 +0000 (13:31 +0000)]
X86: Decode PALIGN operands so I don't have to do it in my head.

llvm-svn: 173572

11 years agoDocumentation: fix syntax error
Dmitri Gribenko [Sat, 26 Jan 2013 13:30:13 +0000 (13:30 +0000)]
Documentation: fix syntax error

Patch by David Waggoner

llvm-svn: 173571

11 years agoUse proper delete.
Michael J. Spencer [Sat, 26 Jan 2013 12:26:56 +0000 (12:26 +0000)]
Use proper delete.

llvm-svn: 173570

11 years agoX86: Do splat promotion later, so the optimizer can chew on it first.
Benjamin Kramer [Sat, 26 Jan 2013 11:44:21 +0000 (11:44 +0000)]
X86: Do splat promotion later, so the optimizer can chew on it first.

This catches many cases where we can emit a more efficient shuffle for a
specific mask or when the mask contains undefs. Once the splat is lowered to
unpacks we can't do that anymore.

There is a possibility of moving the promotion after pshufb matching, but I'm
not sure if pshufb with a mask loaded from memory is faster than 3 shuffles, so
I avoided that for now.

llvm-svn: 173569

11 years agoFileCheckize and merge some tests.
Benjamin Kramer [Sat, 26 Jan 2013 11:14:32 +0000 (11:14 +0000)]
FileCheckize and merge some tests.

llvm-svn: 173568

11 years agoObject/RelocVisitor: Add minimal support, R_MIPS_32, for mips.
NAKAMURA Takumi [Sat, 26 Jan 2013 08:27:36 +0000 (08:27 +0000)]
Object/RelocVisitor: Add minimal support, R_MIPS_32, for mips.

It fixes llvm-dwarfdump for mips and mipsel.

llvm-svn: 173567

11 years agoObject/RelocVisitor: Add minimal support, R_PPC64_ADDR32, for ppc64.
NAKAMURA Takumi [Sat, 26 Jan 2013 08:27:29 +0000 (08:27 +0000)]
Object/RelocVisitor: Add minimal support, R_PPC64_ADDR32, for ppc64.

It fixes llvm-dwarfdump for ppc64-elf.

llvm-svn: 173566

11 years agoRelocVisitor::visit(): Set hasError in the default path.
NAKAMURA Takumi [Sat, 26 Jan 2013 08:27:23 +0000 (08:27 +0000)]
RelocVisitor::visit(): Set hasError in the default path.

llvm-svn: 173565

11 years agoOne more change of a uint32_t variable to offset_t
Jason Molenda [Sat, 26 Jan 2013 07:06:09 +0000 (07:06 +0000)]
One more change of a uint32_t variable to offset_t
to match Greg's dataextractor patch, this one in some
#if defined arm code.

llvm-svn: 173564

11 years agofix use of std::std. it's ordered set.
Reed Kotler [Sat, 26 Jan 2013 06:58:35 +0000 (06:58 +0000)]
fix use of std::std. it's ordered set.

llvm-svn: 173563

11 years agotest/remove-cstr-calls/basic.cpp: Disable again on mingw. It behaves unstable.
NAKAMURA Takumi [Sat, 26 Jan 2013 06:39:48 +0000 (06:39 +0000)]
test/remove-cstr-calls/basic.cpp: Disable again on mingw. It behaves unstable.

llvm-svn: 173562

11 years agoclang/test/Misc/diag-template-diffing-color.cpp: Symbolize color sequences in FileCheck.
NAKAMURA Takumi [Sat, 26 Jan 2013 06:13:05 +0000 (06:13 +0000)]
clang/test/Misc/diag-template-diffing-color.cpp: Symbolize color sequences in FileCheck.

llvm-svn: 173561

11 years agoAdd comments showing the symbolic names for the exc_code types we
Jason Molenda [Sat, 26 Jan 2013 05:30:38 +0000 (05:30 +0000)]
Add comments showing the symbolic names for the exc_code types we
receive with an EXC_BREAKPOINT mach exception on arm.

llvm-svn: 173560

11 years ago[libclang] Introduce clang_getFileUniqueID which returns a struct
Argyrios Kyrtzidis [Sat, 26 Jan 2013 04:52:52 +0000 (04:52 +0000)]
[libclang] Introduce clang_getFileUniqueID which returns a struct
for a CXFile containing device/inode/modification time.

Intended to be useful as a key associated with a unique file across
an indexing session.

rdar://13091837

llvm-svn: 173559

11 years agoclang/test/Misc/ast-dump-color.cpp: Symbolize color sequences in FileCheck.
NAKAMURA Takumi [Sat, 26 Jan 2013 03:48:55 +0000 (03:48 +0000)]
clang/test/Misc/ast-dump-color.cpp: Symbolize color sequences in FileCheck.

FIXME: If FileCheck had expressions something predefined well-known...
llvm-svn: 173558

11 years ago[analyzer] C++ initializers may require cleanups; look through these.
Jordan Rose [Sat, 26 Jan 2013 03:16:31 +0000 (03:16 +0000)]
[analyzer] C++ initializers may require cleanups; look through these.

When the analyzer sees an initializer, it checks if the initializer
contains a CXXConstructExpr. If so, it trusts that the CXXConstructExpr
does the necessary work to initialize the object, and performs no further
initialization.

This patch looks through any implicit wrapping expressions like
ExprWithCleanups to find the CXXConstructExpr inside.

Fixes PR15070.

llvm-svn: 173557

11 years agoGive a more informative error message when the dot or arrow operator is used
Richard Trieu [Sat, 26 Jan 2013 02:31:38 +0000 (02:31 +0000)]
Give a more informative error message when the dot or arrow operator is used
on a type.  Currently, it gives a generic "expected unqualified-id" error.
The new error message is "cannot use (dot|arrow) operator on a type".

llvm-svn: 173556

11 years agoAdd "target.process.stop-on-shared-library-events" setting, and make it work.
Jim Ingham [Sat, 26 Jan 2013 02:19:28 +0000 (02:19 +0000)]
Add "target.process.stop-on-shared-library-events" setting, and make it work.
Add the ability to give breakpoints a "kind" string, and have the StopInfoBreakpoint
print that in the brief description if set.  Also print the kind - if set - in the breakpoint
listing.
Give kinds to a bunch of the internal breakpoints.
We were deleting the Mac OS X dynamic loader breakpoint as though the id we had stored away was
a breakpoint site ID, but in fact it was a breakpoint id, so we never actually deleted it.  Fixed that.

llvm-svn: 173555

11 years agoFix mismatch between pointer and pointee type when diagnosing an incorrect
Richard Smith [Sat, 26 Jan 2013 02:07:32 +0000 (02:07 +0000)]
Fix mismatch between pointer and pointee type when diagnosing an incorrect
object argument type for a member call.

llvm-svn: 173554

11 years agoFix test case by being more lenient on what to accept as a path name.
Richard Trieu [Sat, 26 Jan 2013 01:54:31 +0000 (01:54 +0000)]
Fix test case by being more lenient on what to accept as a path name.

llvm-svn: 173553

11 years agoDWARFDebugLine.cpp: Fix true path. Did you forget "return true" here?
NAKAMURA Takumi [Sat, 26 Jan 2013 01:45:06 +0000 (01:45 +0000)]
DWARFDebugLine.cpp: Fix true path. Did you forget "return true" here?

llvm-svn: 173552

11 years agoRemove function that is newly dead as of r173538.
Nick Lewycky [Sat, 26 Jan 2013 01:36:54 +0000 (01:36 +0000)]
Remove function that is newly dead as of r173538.

llvm-svn: 173550

11 years agoHopefuly unbreak buldbot.
Fariborz Jahanian [Sat, 26 Jan 2013 01:35:28 +0000 (01:35 +0000)]
Hopefuly unbreak buldbot.

llvm-svn: 173549

11 years agoHighlight various parts of the AST dump with color. Colors are controlled by
Richard Trieu [Sat, 26 Jan 2013 01:31:20 +0000 (01:31 +0000)]
Highlight various parts of the AST dump with color.  Colors are controlled by
-f(no-)color-diagnostics.  In addition, dumpColor() function calls are added
to force color printing.  No structural changes to -ast-dump.

llvm-svn: 173548

11 years ago[analyzer] Track null object lvalues back through C++ method calls.
Jordan Rose [Sat, 26 Jan 2013 01:28:23 +0000 (01:28 +0000)]
[analyzer] Track null object lvalues back through C++ method calls.

The expression 'a->b.c()' contains a call to the 'c' method of 'a->b'.
We emit an error if 'a' is NULL, but previously didn't actually track
the null value back through the 'a->b' expression, which caused us to
miss important false-positive-suppression cases, including
<rdar://problem/12676053>.

llvm-svn: 173547

11 years ago[analyzer] bugreporter::getDerefExpr now takes a Stmt, not an ExplodedNode.
Jordan Rose [Sat, 26 Jan 2013 01:28:19 +0000 (01:28 +0000)]
[analyzer] bugreporter::getDerefExpr now takes a Stmt, not an ExplodedNode.

This allows it to be used in places where the interesting statement
doesn't match up with the current node. No functionality change.

llvm-svn: 173546

11 years ago[analyzer] Add 'prune-paths' config option to disable path pruning.
Jordan Rose [Sat, 26 Jan 2013 01:28:15 +0000 (01:28 +0000)]
[analyzer] Add 'prune-paths' config option to disable path pruning.

This should be used for testing only. Path pruning is still on by default.

llvm-svn: 173545

11 years ago[analyzer] Rename PruneNullReturnPaths to SuppressNullReturnPaths.
Jordan Rose [Sat, 26 Jan 2013 01:28:09 +0000 (01:28 +0000)]
[analyzer] Rename PruneNullReturnPaths to SuppressNullReturnPaths.

"Prune" is the term for eliminating pieces of a path that are not
relevant to the user. "Suppress" means don't show that path at all.

llvm-svn: 173544

11 years agoFix up the test.
Fariborz Jahanian [Sat, 26 Jan 2013 01:25:32 +0000 (01:25 +0000)]
Fix up the test.
for // rdar://11861085

llvm-svn: 173543

11 years agoSince we're stuck with realpath for the header <-> module mapping,
Douglas Gregor [Sat, 26 Jan 2013 00:55:12 +0000 (00:55 +0000)]
Since we're stuck with realpath for the header <-> module mapping,
factor the realpath calls into FileManager::getCanonicalName() so we
can cache the results of this epically slow operation. 5% speedup on
my modules test, and realpath drops out of the profile.

llvm-svn: 173542

11 years agoRevert r172285 (suppressing a 'redundant' -Wc++98-compat warning) and add a
Richard Smith [Sat, 26 Jan 2013 00:39:02 +0000 (00:39 +0000)]
Revert r172285 (suppressing a 'redundant' -Wc++98-compat warning) and add a
testcase for a situation it caused us to miss.

llvm-svn: 173540

11 years agoComment parsing: actually check for a block command after "\param x"
Dmitri Gribenko [Sat, 26 Jan 2013 00:36:14 +0000 (00:36 +0000)]
Comment parsing: actually check for a block command after "\param x"

This fixes PR15068.

llvm-svn: 173539

11 years agoPreserve Sema::UndefinedInternals across PCH boundaries. Fixes
Nick Lewycky [Sat, 26 Jan 2013 00:35:08 +0000 (00:35 +0000)]
Preserve Sema::UndefinedInternals across PCH boundaries. Fixes
-Wundefined-internal warnings with PCH.

llvm-svn: 173538

11 years agoAdd DIContext::getLineInfoForAddressRange() function and test. This function allows...
Andrew Kaylor [Sat, 26 Jan 2013 00:28:05 +0000 (00:28 +0000)]
Add DIContext::getLineInfoForAddressRange() function and test.  This function allows a caller to obtain a table of line information for a function using the function's address and size.

llvm-svn: 173537

11 years agoConvert BuildLibCalls.cpp to using the AttributeSet methods instead of AttributeWithI...
Bill Wendling [Sat, 26 Jan 2013 00:03:11 +0000 (00:03 +0000)]
Convert BuildLibCalls.cpp to using the AttributeSet methods instead of AttributeWithIndex.

llvm-svn: 173536

11 years agopatch for PR9027 and // rdar://11861085
Fariborz Jahanian [Fri, 25 Jan 2013 23:57:05 +0000 (23:57 +0000)]
patch for PR9027 and // rdar://11861085
Title: [PR9027] volatile struct bug: member is not loaded at -O;
This is caused by last flag passed to @llvm.memcpy being false,
not honoring that aggregate has at least one 'volatile' data member
(even though aggregate itself has not been qualified as 'volatile'.
As a result, optimization optimizes away the memcpy altogether.
Patch review by John MaCall (I still need to fix up a test though).

llvm-svn: 173535

11 years agoclang/test/Index/annotate-comments-typedef.m: Remove CommentXMLValid in CHECKs. Don...
NAKAMURA Takumi [Fri, 25 Jan 2013 23:56:54 +0000 (23:56 +0000)]
clang/test/Index/annotate-comments-typedef.m: Remove CommentXMLValid in CHECKs. Don't assume libxml2 here.

llvm-svn: 173534

11 years ago[ELF][x86-64] Add relocation string<->kind.
Michael J. Spencer [Fri, 25 Jan 2013 23:48:58 +0000 (23:48 +0000)]
[ELF][x86-64] Add relocation string<->kind.

llvm-svn: 173533

11 years agoA port of the Visual Studio 2012 debugger visualizers for common LLVM and clang datat...
Aaron Ballman [Fri, 25 Jan 2013 23:37:25 +0000 (23:37 +0000)]
A port of the Visual Studio 2012 debugger visualizers for common LLVM and clang datatypes.  Patch thanks to Nico Rieck!

llvm-svn: 173532

11 years agoARM says that the array cookie should always be eight bytes.
John McCall [Fri, 25 Jan 2013 23:36:19 +0000 (23:36 +0000)]
ARM says that the array cookie should always be eight bytes.
ARM is not thinking about over-aligned structures.
Overrule ARM in both our generic-ARM and iOS ABI implementations.

llvm-svn: 173531

11 years agoMove the decision about the kind of CGCXXABI to make inside
John McCall [Fri, 25 Jan 2013 23:36:14 +0000 (23:36 +0000)]
Move the decision about the kind of CGCXXABI to make inside
the family-specific files.

llvm-svn: 173530

11 years agoImprove coordination between the module manager and the global module
Douglas Gregor [Fri, 25 Jan 2013 23:32:03 +0000 (23:32 +0000)]
Improve coordination between the module manager and the global module
index, optimizing the operation that skips lookup in modules where we
know the identifier will not be found. This makes the global module
index optimization actually useful, providing an 8.5% speedup over
modules without the global module index for -fsyntax-only.

llvm-svn: 173529

11 years agollvm/test/CMakeLists.txt: Add a dependency to llvm-rtdyld in check-llvm.
NAKAMURA Takumi [Fri, 25 Jan 2013 23:24:07 +0000 (23:24 +0000)]
llvm/test/CMakeLists.txt: Add a dependency to llvm-rtdyld in check-llvm.

llvm-svn: 173528

11 years ago[ELF][X86-64] Use the correct base address.
Michael J. Spencer [Fri, 25 Jan 2013 23:23:24 +0000 (23:23 +0000)]
[ELF][X86-64] Use the correct base address.

llvm-svn: 173527

11 years agoRemove unused variables, silences -Wunused-variable
Dmitri Gribenko [Fri, 25 Jan 2013 23:17:21 +0000 (23:17 +0000)]
Remove unused variables, silences -Wunused-variable

llvm-svn: 173526

11 years agoclang/test/Preprocessor/iwithprefix.c: Tweak default includes not to use /usr/include.
NAKAMURA Takumi [Fri, 25 Jan 2013 23:17:20 +0000 (23:17 +0000)]
clang/test/Preprocessor/iwithprefix.c: Tweak default includes not to use /usr/include.

You may see such a message on non-posix system;
  ignoring nonexistent directory "/usr/local/include"
  ignoring nonexistent directory "/usr/include"

llvm-svn: 173525

11 years agoRemove dead method.
Bill Wendling [Fri, 25 Jan 2013 23:14:36 +0000 (23:14 +0000)]
Remove dead method.

llvm-svn: 173524

11 years ago[utils] Kill another no-longer-useful utility script.
Daniel Dunbar [Fri, 25 Jan 2013 23:12:17 +0000 (23:12 +0000)]
[utils] Kill another no-longer-useful utility script.

 - We are long past the days of getting clang to fail in mass on swaths of code,
   fortunately.

llvm-svn: 173523

11 years agoRemove some introspection functions.
Bill Wendling [Fri, 25 Jan 2013 23:09:36 +0000 (23:09 +0000)]
Remove some introspection functions.

The 'getSlot' function and its ilk allow introspection into the AttributeSet
class. However, that class should be opaque. Allow access through accessor
methods instead.

llvm-svn: 173522

11 years agosimplify code by removing excessive bracing.
Fariborz Jahanian [Fri, 25 Jan 2013 23:08:39 +0000 (23:08 +0000)]
simplify code by removing excessive bracing.

llvm-svn: 173521

11 years agoInitial implementation of PPCTargetTransformInfo
Hal Finkel [Fri, 25 Jan 2013 23:05:59 +0000 (23:05 +0000)]
Initial implementation of PPCTargetTransformInfo

This provides a place to add customized operation cost information and
control some other target-specific IR-level transformations.

The only non-trivial logic in this checkin assigns a higher cost to
unaligned loads and stores (covered by the included test case).

llvm-svn: 173520

11 years agoMissing newline in a warning message.
Jim Ingham [Fri, 25 Jan 2013 23:05:01 +0000 (23:05 +0000)]
Missing newline in a warning message.

llvm-svn: 173519

11 years agoFix a warning in the new DWARFheader. Add a new line at the end of the file.
Nadav Rotem [Fri, 25 Jan 2013 22:57:05 +0000 (22:57 +0000)]
Fix a warning in the new DWARFheader. Add a new line at the end of the file.

llvm-svn: 173518

11 years agoAdd support for applying in-memory relocations to the .debug_line section and, in...
Andrew Kaylor [Fri, 25 Jan 2013 22:50:58 +0000 (22:50 +0000)]
Add support for applying in-memory relocations to the .debug_line section and, in the case of ELF files, using symbol addresses when available for relocations to the .debug_info section.  Also extending the llvm-rtdyld tool to add the ability to dump line number information for testing purposes.

llvm-svn: 173517

11 years agoAttach enum's documentation to its typedef if
Fariborz Jahanian [Fri, 25 Jan 2013 22:48:32 +0000 (22:48 +0000)]
Attach enum's documentation to its typedef if
latter does not have one of its own. // rdar://13067629

llvm-svn: 173516

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