platform/upstream/llvm.git
11 years agoRemove BLOCK_BYREF_LAYOUT_BYREF flags from list of
Fariborz Jahanian [Fri, 26 Oct 2012 20:33:59 +0000 (20:33 +0000)]
Remove BLOCK_BYREF_LAYOUT_BYREF flags from list of
flags for __block variable meta-data.

llvm-svn: 166811

11 years agoRemove LoopDependenceAnalysis.
Benjamin Kramer [Fri, 26 Oct 2012 20:25:01 +0000 (20:25 +0000)]
Remove LoopDependenceAnalysis.

It was unmaintained and not much more than a stub. The new DependenceAnalysis
pass is both more general and complete.

llvm-svn: 166810

11 years agoobjective-C IRGen: for @implementation nested in
Fariborz Jahanian [Fri, 26 Oct 2012 20:22:11 +0000 (20:22 +0000)]
objective-C IRGen: for @implementation nested in
extern "C", its method definitions must be IRGen'ed
before meta-data for class is generated. Otherwise,
IRGen crashes (to say the least).
// rdar://12581683

llvm-svn: 166809

11 years ago[driver] Before applying the working directory check if the input path
Argyrios Kyrtzidis [Fri, 26 Oct 2012 20:09:24 +0000 (20:09 +0000)]
[driver] Before applying the working directory check if the input path
is absolute.

llvm-svn: 166808

11 years agoThis patch addresses a 64-bit PowerPC ELF ABI compatibility issue with
Bill Schmidt [Fri, 26 Oct 2012 19:59:03 +0000 (19:59 +0000)]
This patch addresses a 64-bit PowerPC ELF ABI compatibility issue with
varargs parameter passing.

A strict reading of the ABI indicates that any argument with alignment greater
than 8 may require skipping doublewords in the parameter save area to align
the argument, and hence require skipping GPRs.  In practice, this is not done
by GCC.  The alignment restriction is used for internal alignment of a
structure, but a structure with 16-byte alignment, for example, is not
itself 16-byte aligned in the parameter save area.  Although this is messy,
it has become the de facto standard used in building existing libraries.

My initial varargs support followed the ABI language, but not the de facto
standard.  Running the GCC compatibility test suite exposed this issue, and
indeed showed that LLVM didn't pass parameters self-consistently with my
original logic.  Removing the additional alignment logic allows the affected
tests to now pass.

I modified the ppc64-varargs-struct.c test case to remove the existing test
for generation of alignment code, which is no longer appropriate.

Built and tested on powerpc64-unknown-linux-gnu with no new regressions.

llvm-svn: 166805

11 years agoRemove the unneeded initializers.
Bill Wendling [Fri, 26 Oct 2012 19:52:54 +0000 (19:52 +0000)]
Remove the unneeded initializers.

llvm-svn: 166804

11 years agoStop APInt::shl from generating llvm.trap
Derek Schuff [Fri, 26 Oct 2012 19:52:27 +0000 (19:52 +0000)]
Stop APInt::shl from generating llvm.trap

APInt::shl generated llvm.trap to guard against shifts greater than bit-width.
This was already checked with an assert, and there was a special case for
shifts equal to bit-width. Modify this check to catch shifts greater than or
equal to bit-width, so llvm.trap isn't generated.

Patch contributed by JF Bastien

llvm-svn: 166803

11 years agoMove target-specific BBVectorize tests into a separate directory.
Hal Finkel [Fri, 26 Oct 2012 19:38:09 +0000 (19:38 +0000)]
Move target-specific BBVectorize tests into a separate directory.

llvm-svn: 166802

11 years ago[options] Fix mishandling of aliased options that was introduced in r166444.
Argyrios Kyrtzidis [Fri, 26 Oct 2012 19:36:33 +0000 (19:36 +0000)]
[options] Fix mishandling of aliased options that was introduced in r166444.

llvm-svn: 166801

11 years agoThis patch updates comments in the Predicate class to describe a subtle behavior...
Andrew Kaylor [Fri, 26 Oct 2012 19:28:36 +0000 (19:28 +0000)]
This patch updates comments in the Predicate class to describe a subtle behavior that callers may need to be aware.  It also adds documentation for one function which didn’t have any.

The subtle behavior is that the Predicate wait functions may not detect transitory changes in the predicate value.  Consider the following scenario.

Thread A waits for a bit to be set in the predicate value.
Thread B sets the bit in the predicate value.
Before Thread A wakes up, Thread C clears the bit in the predicate value.
Thread A wakes, checks the value and goes back to waiting.

The mutex and condition variables protect access to the value, but they offer no guarantee that another thread will not acquire the mutex and change the value before a waiting thread is restarted after a change.

I believe that the current behavior is correct and reasonable.  I just want to leave a marker to prevent possible problems in the future or to help anyone who might be unfortunate enough to encounter such a problem.

llvm-svn: 166800

11 years agoAdd API to get the process plugin name & short name.
Jim Ingham [Fri, 26 Oct 2012 19:18:04 +0000 (19:18 +0000)]
Add API to get the process plugin name & short name.

llvm-svn: 166799

11 years agotests: Tweak unprintable.c to try another character which is hopefully even more
Daniel Dunbar [Fri, 26 Oct 2012 19:15:56 +0000 (19:15 +0000)]
tests: Tweak unprintable.c to try another character which is hopefully even more
unprintable.

llvm-svn: 166798

11 years agoMove the target-specific tests, which require specific backends, to dirs that only...
Nadav Rotem [Fri, 26 Oct 2012 18:52:01 +0000 (18:52 +0000)]
Move the target-specific tests, which require specific backends, to dirs that only run if the target is present.

llvm-svn: 166796

11 years agoChange the internalize pass to internalize all symbols when given an empty
Rafael Espindola [Fri, 26 Oct 2012 18:47:48 +0000 (18:47 +0000)]
Change the internalize pass to internalize all symbols when given an empty
list of externals. This makes sense since a shared library with no symbols
can still be useful if it has static constructors.

llvm-svn: 166795

11 years agoLowercase the argument for TargetTransformInfo so it's consistent with all other...
Benjamin Kramer [Fri, 26 Oct 2012 18:46:15 +0000 (18:46 +0000)]
Lowercase the argument for TargetTransformInfo so it's consistent with all other passes.

llvm-svn: 166794

11 years ago[ms-inline asm] Add test case for r166792.
Chad Rosier [Fri, 26 Oct 2012 18:33:59 +0000 (18:33 +0000)]
[ms-inline asm] Add test case for r166792.

llvm-svn: 166793

11 years ago[ms-inline asm] Emit an error for unsupported SIZE and LENGTH directives.
Chad Rosier [Fri, 26 Oct 2012 18:32:44 +0000 (18:32 +0000)]
[ms-inline asm] Emit an error for unsupported SIZE and LENGTH directives.
Part of rdar://12576868

llvm-svn: 166792

11 years ago[ms-inline asm] Test case for r166790.
Chad Rosier [Fri, 26 Oct 2012 18:04:45 +0000 (18:04 +0000)]
[ms-inline asm] Test case for r166790.

llvm-svn: 166791

11 years ago[ms-inline asm] Add support for the TYPE operator.
Chad Rosier [Fri, 26 Oct 2012 18:04:20 +0000 (18:04 +0000)]
[ms-inline asm] Add support for the TYPE operator.
Part of rdar://12576868

llvm-svn: 166790

11 years agoUpdated the "breakpoint command add" documentation and fixed the web site docs for...
Greg Clayton [Fri, 26 Oct 2012 17:53:21 +0000 (17:53 +0000)]
Updated the "breakpoint command add" documentation and fixed the web site docs for the signature of the python breakpoint callback functions.

llvm-svn: 166789

11 years agoLoopSimplify: Preserve DependenceAnalysis.
Benjamin Kramer [Fri, 26 Oct 2012 17:40:50 +0000 (17:40 +0000)]
LoopSimplify: Preserve DependenceAnalysis.

This is currently true, but may change when DA grows more aggressive caching.
Without this setting it's impossible to use DA from a LoopPass because DA is a
function pass and cannot be properly scheduled in between LoopPasses. The
LoopManager reacts to this with an infinite loop which made this really annoying
to debug.

llvm-svn: 166788

11 years agoFix SCEV cache invalidation in LCSSA and LoopSimplify.
Benjamin Kramer [Fri, 26 Oct 2012 17:31:43 +0000 (17:31 +0000)]
Fix SCEV cache invalidation in LCSSA and LoopSimplify.

The LoopSimplify bug is pretty harmless because the loop goes from unanalyzable
to analyzable but the LCSSA bug is very nasty. It only comes into play with a
specific order of the LoopPassManager worklist and can cause actual
miscompilations, when a SCEV refers to a value that has been replaced with PHI
node. SCEVExpander may then insert code into the wrong place, either violating
domination or randomly miscompiling stuff.

Comes with an extensive test case reduced from the test-suite with
bugpoint+SCEVValidator.

llvm-svn: 166787

11 years agoAdd a basic verifier for SCEV's backedge taken counts.
Benjamin Kramer [Fri, 26 Oct 2012 17:31:32 +0000 (17:31 +0000)]
Add a basic verifier for SCEV's backedge taken counts.

Enabled with -verify-scev. This could be extended significantly but hopefully
catches the common cases now. Note that it's not enabled by default in any
configuration because the way it tries to distinguish SCEVs is still fragile and
may produce false positives. Also the test-suite isn't clean yet, one example
is that it fails if a pass drops an NSW bit but it's still present in SCEV's
cached. Cleaning up all those cases will take some time.

llvm-svn: 166786

11 years agoFix a crash in SimpliftDemandedBits of vectors of pointers.
Nadav Rotem [Fri, 26 Oct 2012 17:17:05 +0000 (17:17 +0000)]
Fix a crash in SimpliftDemandedBits of vectors of pointers.

PR14183.

llvm-svn: 166785

11 years agoMake sure I is not the end iterator when isInsideBundle is called.
Akira Hatanaka [Fri, 26 Oct 2012 17:11:42 +0000 (17:11 +0000)]
Make sure I is not the end iterator when isInsideBundle is called.

llvm-svn: 166784

11 years agoMatch up anonymous structs/unions in the ASTImporter. Previously, we'd
Douglas Gregor [Fri, 26 Oct 2012 16:45:11 +0000 (16:45 +0000)]
Match up anonymous structs/unions in the ASTImporter. Previously, we'd
only actually get the answer right if there was only a single
anonymous struct/union at that level. This is part of
<rdar://problem/11904570>; the test will go into LLDB itself.

llvm-svn: 166781

11 years ago(no commit message)
Reed Kotler [Fri, 26 Oct 2012 16:18:19 +0000 (16:18 +0000)]
(no commit message)

llvm-svn: 166780

11 years ago[ms-inline asm] Have the target AsmParser create the asmrewrite for the offsetof
Chad Rosier [Fri, 26 Oct 2012 16:09:20 +0000 (16:09 +0000)]
[ms-inline asm] Have the target AsmParser create the asmrewrite for the offsetof
operator.

llvm-svn: 166779

11 years agoAdd comments for RemoveRedundantMsgs, rename it to removeRedundantMsgs() per Jordan...
Ted Kremenek [Fri, 26 Oct 2012 16:02:36 +0000 (16:02 +0000)]
Add comments for RemoveRedundantMsgs, rename it to removeRedundantMsgs() per Jordan's feedback.

llvm-svn: 166778

11 years agoEliminate some longstanding FIXMEs regarding variadic templates in the
Douglas Gregor [Fri, 26 Oct 2012 15:36:15 +0000 (15:36 +0000)]
Eliminate some longstanding FIXMEs regarding variadic templates in the
ASTImporter.

llvm-svn: 166777

11 years agoIn the ASTImporter, don't try to emit a diagnostic if we're not
Douglas Gregor [Fri, 26 Oct 2012 15:34:11 +0000 (15:34 +0000)]
In the ASTImporter, don't try to emit a diagnostic if we're not
allowed to complain about a failure.

llvm-svn: 166776

11 years agoFix a compiler warning in internal_memmove.
Alexander Potapenko [Fri, 26 Oct 2012 13:47:36 +0000 (13:47 +0000)]
Fix a compiler warning in internal_memmove.

llvm-svn: 166775

11 years agoFix the internal_memmove() implementation that used to skip src[0] if dst < src.
Alexander Potapenko [Fri, 26 Oct 2012 13:24:20 +0000 (13:24 +0000)]
Fix the internal_memmove() implementation that used to skip src[0] if dst < src.

llvm-svn: 166774

11 years agoBetter handling of OpcodeToISD using enum/switch.
Renato Golin [Fri, 26 Oct 2012 12:24:52 +0000 (12:24 +0000)]
Better handling of OpcodeToISD using enum/switch.

Patch by Pasi Parviainen <pasi.parviainen@iki.fi>

llvm-svn: 166773

11 years agoDon't explicitly require RTTI and EH.
Joerg Sonnenberger [Fri, 26 Oct 2012 12:15:29 +0000 (12:15 +0000)]
Don't explicitly require RTTI and EH.

llvm-svn: 166772

11 years ago[ASan] don't run hacky test for __asan_get_free_bytes() on 32-bits
Alexey Samsonov [Fri, 26 Oct 2012 12:10:24 +0000 (12:10 +0000)]
[ASan] don't run hacky test for __asan_get_free_bytes() on 32-bits

llvm-svn: 166771

11 years agoPowerPC: Fix for rldcl/rldicl/rldicr MC emission
Adhemerval Zanella [Fri, 26 Oct 2012 12:09:58 +0000 (12:09 +0000)]
PowerPC: Fix for rldcl/rldicl/rldicr MC emission

This patch fixes the rldcl/rldicl/rldicr instruction emission. The issue is
the MDForm_1 instruction defines the PowerISA MB field from 'rldicl'
with the name MBE, but RLDCL/RLDICL/RLDICR definition uses as 'MB'.

It end up by generatint the 'rldicl' enconding at
'lib/Target/PowerPC/PPCGenMCCodeEmitter.inc' to use the fourth argument as the
third. The patch changes it by adjusting to use the fourth argument as
intended.

Fixes PR14180.

llvm-svn: 166770

11 years agoMinor enhancement to build process notes for ARM platforms.
David Tweed [Fri, 26 Oct 2012 12:09:47 +0000 (12:09 +0000)]
Minor enhancement to build process notes for ARM platforms.

llvm-svn: 166769

11 years agoIn the dynamic runtime on Mac OS, do not call internal_strdup() before __asan_init().
Alexander Potapenko [Fri, 26 Oct 2012 11:31:14 +0000 (11:31 +0000)]
In the dynamic runtime on Mac OS, do not call internal_strdup() before __asan_init().
This may result in a crash at startup.
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=123.

llvm-svn: 166768

11 years agoAdjust llvm-ar and llvm-ranlib to not depend on exception handling.
Joerg Sonnenberger [Fri, 26 Oct 2012 10:49:15 +0000 (10:49 +0000)]
Adjust llvm-ar and llvm-ranlib to not depend on exception handling.
Always use an exit code of 1, but print the help message if useful.
Remove the exception handling tag in llvm-as, llvm-dis and
llvm-bcanalyzer, where it isn't used.

llvm-svn: 166767

11 years agoRemove clang-fixit from tools page as it is currently not planned as a
Daniel Jasper [Fri, 26 Oct 2012 10:25:13 +0000 (10:25 +0000)]
Remove clang-fixit from tools page as it is currently not planned as a
separate tool.

Review: http://llvm-reviews.chandlerc.com/D81
llvm-svn: 166766

11 years agoThese tests require an actual x86 registered target, so mark them as such. Tested...
David Tweed [Fri, 26 Oct 2012 10:17:44 +0000 (10:17 +0000)]
These tests require an actual x86 registered target, so mark them as such. Tested on ARM.

Patch by Joey Gouly.

llvm-svn: 166765

11 years agoRemove GC roots that reference dead objects.
Nicolas Geoffray [Fri, 26 Oct 2012 09:15:55 +0000 (09:15 +0000)]
Remove GC roots that reference dead objects.

llvm-svn: 166763

11 years agoFix CPP backend for method attributes by creating a block where a new AttrBuilder...
Nicolas Geoffray [Fri, 26 Oct 2012 09:14:38 +0000 (09:14 +0000)]
Fix CPP backend for method attributes by creating a block where a new AttrBuilder is defined for each attribute.

llvm-svn: 166762

11 years agoAlphabetize the enum list.
Bill Wendling [Fri, 26 Oct 2012 07:08:58 +0000 (07:08 +0000)]
Alphabetize the enum list.

llvm-svn: 166760

11 years agoFix grammar-o.
Bill Wendling [Fri, 26 Oct 2012 07:02:46 +0000 (07:02 +0000)]
Fix grammar-o.

llvm-svn: 166759

11 years agoFix test suppressed in r166683 on 32-bit Linux
Alexey Samsonov [Fri, 26 Oct 2012 07:01:51 +0000 (07:01 +0000)]
Fix test suppressed in r166683 on 32-bit Linux

llvm-svn: 166758

11 years agoAdd a new capability to RegisterContextLLDB: To recognize when the
Jason Molenda [Fri, 26 Oct 2012 06:08:58 +0000 (06:08 +0000)]
Add a new capability to RegisterContextLLDB:  To recognize when the
Full UnwindPlan is trying to do an impossible unwind; in that case
invalidate the Full UnwindPlan and replace it with the architecture
default unwind plan.

This is a scenario that happens occasionally with arm unwinds in
particular; the instruction analysis based full unwindplan can
mis-parse the functions and the stack walk stops prematurely.  Now
we can do a simpleminded frame-chain walk to find the caller frame
and continue the unwind.  It's not ideal but given the complicated
nature of analyzing the arm functions, and the lack of eh_frame
information on iOS, it is a distinct improvement and fixes some
long-standing problems with the unwinder on that platform.

This is fixing <rdar://problem/12091421>.  I may re-use this
invalidate feature in the future if I can identify other cases where
the full unwindplan's unwind information is clearly incorrect.

This checkin also includes some cleanup for the volatile register
definition in the arm ABI plugin for <rdar://problem/10652166>
although work remains to be done for that bug.

llvm-svn: 166757

11 years agoImplement carry for subtract/add for mips16
Reed Kotler [Fri, 26 Oct 2012 04:46:26 +0000 (04:46 +0000)]
Implement carry for subtract/add for mips16

llvm-svn: 166755

11 years agoHoist out some work done inside a loop doing a linear scan over all
Nick Lewycky [Fri, 26 Oct 2012 04:43:47 +0000 (04:43 +0000)]
Hoist out some work done inside a loop doing a linear scan over all
instructions in a block. GetUnderlyingObject is more expensive than it looks as
it can, for instance, call SimplifyInstruction.

This might have some behavioural changes in odd corner cases, but only because
of some strange artefacts of the original implementation. If you were relying
on those, we can fix that by replacing this with a smarter algorithm. Change
passes the existing tests.

llvm-svn: 166754

11 years agoDocument target.source-map as the replacement for gdb's directory command.
Jason Molenda [Fri, 26 Oct 2012 04:38:09 +0000 (04:38 +0000)]
Document target.source-map as the replacement for gdb's directory command.

llvm-svn: 166753

11 years agoUse VTTI->getNumberOfParts in BBVectorize.
Hal Finkel [Fri, 26 Oct 2012 04:28:06 +0000 (04:28 +0000)]
Use VTTI->getNumberOfParts in BBVectorize.

This change reflects VTTI refactoring; no functionality change intended.

llvm-svn: 166752

11 years agoAdd VectorTargetTransform::getNumberOfParts.
Hal Finkel [Fri, 26 Oct 2012 04:28:02 +0000 (04:28 +0000)]
Add VectorTargetTransform::getNumberOfParts.

As discussed on IRC, add VectorTargetTransform::getNumberOfParts
to provide a stable interface to the vector legalization splitting factor.

llvm-svn: 166751

11 years agoFix typo in comment.
Nick Lewycky [Fri, 26 Oct 2012 04:27:49 +0000 (04:27 +0000)]
Fix typo in comment.

llvm-svn: 166750

11 years agoimplement large (>16 bit) constant loading.
Reed Kotler [Fri, 26 Oct 2012 03:09:34 +0000 (03:09 +0000)]
implement large (>16 bit) constant loading.

llvm-svn: 166749

11 years agoFix unexpected passes. These test do work with LTO on linux. I tested both
Rafael Espindola [Fri, 26 Oct 2012 02:19:02 +0000 (02:19 +0000)]
Fix unexpected passes. These test do work with LTO on linux. I tested both
a cmake and an autoconf build.

llvm-svn: 166748

11 years agofix test setgek.ll so that it will not give false "make check"
Reed Kotler [Fri, 26 Oct 2012 01:29:42 +0000 (01:29 +0000)]
fix test setgek.ll so that it will not give false "make check"
failure in some cases

llvm-svn: 166747

11 years agoDeclare type of flags to be used in a __block (byref)
Fariborz Jahanian [Fri, 26 Oct 2012 01:13:38 +0000 (01:13 +0000)]
Declare type of flags to be used in a __block (byref)
variable descriptor captured by a block.

llvm-svn: 166746

11 years agolibLTO has a bug in that it will keep every symbol if none is needed. We used
Rafael Espindola [Fri, 26 Oct 2012 00:29:57 +0000 (00:29 +0000)]
libLTO has a bug in that it will keep every symbol if none is needed. We used
to hack around this in the gold plugin by deleting a module if no symbol was
needed. Unfortunately, the hack is wrong in the case of o module having no
visible symbols but still having side effects via static constructors.

The bug will have to be fixed in libLTO itself.

llvm-svn: 166745

11 years agoOz optimization level sets ForceSizeOpt attribute for each function
Quentin Colombet [Fri, 26 Oct 2012 00:29:48 +0000 (00:29 +0000)]
Oz optimization level sets ForceSizeOpt attribute for each function

llvm-svn: 166744

11 years agoX86 SSE Intrinsics: update header for sqrt_ss, rsqrt_ss and rcp_ss.
Manman Ren [Fri, 26 Oct 2012 00:25:10 +0000 (00:25 +0000)]
X86 SSE Intrinsics: update header for sqrt_ss, rsqrt_ss and rcp_ss.

There intrinsics pass through the upper FP values from the input.
rdar://12558838

llvm-svn: 166743

11 years agoPort testcase to FileCheck.
Rafael Espindola [Fri, 26 Oct 2012 00:14:11 +0000 (00:14 +0000)]
Port testcase to FileCheck.

llvm-svn: 166742

11 years agoDisable generation of pointer vectors by BBVectorize.
Hal Finkel [Fri, 26 Oct 2012 00:05:26 +0000 (00:05 +0000)]
Disable generation of pointer vectors by BBVectorize.

Once vector-of-pointer support works, then this can be reverted.

llvm-svn: 166741

11 years agoAdd a teardown function to TestAbbreviations so it doesn't error out when running...
Filipe Cabecinhas [Thu, 25 Oct 2012 23:52:28 +0000 (23:52 +0000)]
Add a teardown function to TestAbbreviations so it doesn't error out when running for two archs.

llvm-svn: 166740

11 years agoRevert 166726 because it may have broken a number of SPEC tests. PR14183.
Nadav Rotem [Thu, 25 Oct 2012 23:51:48 +0000 (23:51 +0000)]
Revert 166726 because it may have broken a number of SPEC tests. PR14183.

llvm-svn: 166739

11 years agoBBVectorize, when using VTTI, should not form types that will be split.
Hal Finkel [Thu, 25 Oct 2012 23:47:16 +0000 (23:47 +0000)]
BBVectorize, when using VTTI, should not form types that will be split.

This is needed so that perl's SHA can be compiled (otherwise
BBVectorize takes far too long to find its fixed point).

I'll try to come up with a reduced test case.

llvm-svn: 166738

11 years agoRecommit Eric's code to validate ASM string's constraints and modifiers.
Bill Wendling [Thu, 25 Oct 2012 23:28:48 +0000 (23:28 +0000)]
Recommit Eric's code to validate ASM string's constraints and modifiers.

This code checks the ASM string to see if the output size is able to fit within
the variable specified as the output. For instance, scalar-to-vector conversions
may not really work. It's on by default, but can be turned off with a flag if
you think you know what you're doing.

This is placed under a flag ('-Wasm-operand-widths') and flag group ('-Wasm').

<rdar://problem/12284092>

llvm-svn: 166737

11 years agoFix the other occurrence of the problem fixed by r166731.
Richard Smith [Thu, 25 Oct 2012 23:05:00 +0000 (23:05 +0000)]
Fix the other occurrence of the problem fixed by r166731.

llvm-svn: 166735

11 years agoChanging name of enum for block literal flags to represent
Fariborz Jahanian [Thu, 25 Oct 2012 22:55:52 +0000 (22:55 +0000)]
Changing name of enum for block literal flags to represent
what it is meant for.

llvm-svn: 166734

11 years ago<rdar://problem/12570550>
Greg Clayton [Thu, 25 Oct 2012 22:45:35 +0000 (22:45 +0000)]
<rdar://problem/12570550>

TOT lldb broke finding App in app bundles when launching with shell.

llvm-svn: 166733

11 years agoFound a couple more places where we need to run all threads when stepping.
Jim Ingham [Thu, 25 Oct 2012 22:30:09 +0000 (22:30 +0000)]
Found a couple more places where we need to run all threads when stepping.

llvm-svn: 166732

11 years agoLLVM's hashing routines produce a size_t, and thus generate different values for...
Richard Smith [Thu, 25 Oct 2012 22:27:30 +0000 (22:27 +0000)]
LLVM's hashing routines produce a size_t, and thus generate different values for 32- and 64-bit host compilers. This really needs to be fixed -- the IR generated should not depend on the host -- but this change will get the bots green again. Proper fix to follow.

llvm-svn: 166731

11 years agoFix anonymous namespace issue introduced by r166714:
Kaelyn Uhrain [Thu, 25 Oct 2012 22:09:49 +0000 (22:09 +0000)]
Fix anonymous namespace issue introduced by r166714:
include/llvm/MC/MCTargetAsmParser.h:46:8: error: 'llvm::ParseInstructionInfo' has a field 'llvm::ParseInstructionInfo::AsmRewrites' whose type uses the anonymous namespace [-Werror]

llvm-svn: 166729

11 years agoTrackConstraintBRVisitor and ConditionBRVisitor can emit similar
Ted Kremenek [Thu, 25 Oct 2012 22:07:10 +0000 (22:07 +0000)]
TrackConstraintBRVisitor and ConditionBRVisitor can emit similar
path notes for cases where a value may be assumed to be null, etc.
Instead of having redundant diagnostics, do a pass over the generated
PathDiagnostic pieces and remove notes from TrackConstraintBRVisitor
that are already covered by ConditionBRVisitor, whose notes tend
to be better.

Fixes <rdar://problem/12252783>

llvm-svn: 166728

11 years agoAdd a more direct test for r166661.
Richard Smith [Thu, 25 Oct 2012 21:59:45 +0000 (21:59 +0000)]
Add a more direct test for r166661.

llvm-svn: 166727

11 years agoFix a crash in ValueTracking. Add support for vectors of pointers.
Nadav Rotem [Thu, 25 Oct 2012 21:52:52 +0000 (21:52 +0000)]
Fix a crash in ValueTracking. Add support for vectors of pointers.

llvm-svn: 166726

11 years ago[ms-inline asm] Add a test case for r166723 and r166724.
Chad Rosier [Thu, 25 Oct 2012 21:52:03 +0000 (21:52 +0000)]
[ms-inline asm] Add a test case for r166723 and r166724.

llvm-svn: 166725

11 years ago[ms-inline asm] Perform field lookups with the dot operator.
Chad Rosier [Thu, 25 Oct 2012 21:51:10 +0000 (21:51 +0000)]
[ms-inline asm] Perform field lookups with the dot operator.

llvm-svn: 166724

11 years ago[ms-inline asm] Add support for field lookup in the SemaCallback. Patch by Eli.
Chad Rosier [Thu, 25 Oct 2012 21:49:22 +0000 (21:49 +0000)]
[ms-inline asm] Add support for field lookup in the SemaCallback.  Patch by Eli.

llvm-svn: 166723

11 years agoFix the cost-model test.
Nadav Rotem [Thu, 25 Oct 2012 21:42:50 +0000 (21:42 +0000)]
Fix the cost-model test.

llvm-svn: 166722

11 years agoimplement mips16 patterns for select nodes
Reed Kotler [Thu, 25 Oct 2012 21:33:30 +0000 (21:33 +0000)]
implement mips16 patterns for select nodes

llvm-svn: 166721

11 years agoAdd CPU model to BBVectorize cost-model tests.
Hal Finkel [Thu, 25 Oct 2012 21:31:51 +0000 (21:31 +0000)]
Add CPU model to BBVectorize cost-model tests.

llvm-svn: 166720

11 years agoDon't return false when the function's return type is a pointer.
Kaelyn Uhrain [Thu, 25 Oct 2012 21:25:08 +0000 (21:25 +0000)]
Don't return false when the function's return type is a pointer.

llvm-svn: 166719

11 years agoAdd the cpu model to the test.
Nadav Rotem [Thu, 25 Oct 2012 21:18:42 +0000 (21:18 +0000)]
Add the cpu model to the test.

llvm-svn: 166718

11 years agoAdd some new types in preparation of encoding of captured block variable
Fariborz Jahanian [Thu, 25 Oct 2012 21:15:04 +0000 (21:15 +0000)]
Add some new types in preparation of encoding of captured block variable
layout meta-data work. wip.

llvm-svn: 166717

11 years agoBegin incorporating target information into BBVectorize.
Hal Finkel [Thu, 25 Oct 2012 21:12:23 +0000 (21:12 +0000)]
Begin incorporating target information into BBVectorize.

This is the first of several steps to incorporate information from the new
TargetTransformInfo infrastructure into BBVectorize. Two things are done here:

 1. Target information is used to determine if it is profitable to fuse two
    instructions. This means that the cost of the vector operation must not
    be more expensive than the cost of the two original operations. Pairs that
    are not profitable are no longer considered (because current cost information
    is incomplete, for intrinsics for example, equal-cost pairs are still
    considered).

 2. The 'cost savings' computed for the profitability check are also used to
    rank the DAGs that represent the potential vectorization plans. Specifically,
    for nodes of non-trivial depth, the cost savings is used as the node
    weight.

The next step will be to incorporate the shuffle costs into the DAG weighting;
this will give the edges of the DAG weights as well. Once that is done, when
target information is available, we should be able to dispense with the
depth heuristic.

llvm-svn: 166716

11 years agoLoopVectorize: Teach the cost model to query scalar costs as scalar types and not...
Nadav Rotem [Thu, 25 Oct 2012 21:03:48 +0000 (21:03 +0000)]
LoopVectorize: Teach the cost model to query scalar costs as scalar types and not vectors of 1.

llvm-svn: 166715

11 years ago[ms-inline asm] Add support for creating AsmRewrites in the target specific
Chad Rosier [Thu, 25 Oct 2012 20:41:34 +0000 (20:41 +0000)]
[ms-inline asm] Add support for creating AsmRewrites in the target specific
AsmParser logic.  To be used/tested in a subsequent commit.

llvm-svn: 166714

11 years agoDon't require exception handling for clang-tblgen.
Joerg Sonnenberger [Thu, 25 Oct 2012 20:34:00 +0000 (20:34 +0000)]
Don't require exception handling for clang-tblgen.

llvm-svn: 166713

11 years agoRemove exception handling usage from tblgen.
Joerg Sonnenberger [Thu, 25 Oct 2012 20:33:17 +0000 (20:33 +0000)]
Remove exception handling usage from tblgen.

Most places can use PrintFatalError as the unwinding mechanism was not
used for anything other than printing the error. The single exception
was CodeGenDAGPatterns.cpp, where intermediate errors during type
resolution were ignored to simplify incremental platform development.
This use is replaced by an error flag in TreePattern and bailout earlier
in various places if it is set.

llvm-svn: 166712

11 years agoMove the input files for test/PCH/badpch.c under test/PCH/Inputs/.
Kaelyn Uhrain [Thu, 25 Oct 2012 19:43:57 +0000 (19:43 +0000)]
Move the input files for test/PCH/badpch.c under test/PCH/Inputs/.

llvm-svn: 166711

11 years agoAlso optimize large switch statements.
Jakob Stoklund Olesen [Thu, 25 Oct 2012 18:51:15 +0000 (18:51 +0000)]
Also optimize large switch statements.

The isValueEqualityComparison() guard at the top of SimplifySwitch()
only applies to some of the possible transformations.

The newer transformations work just fine on large switches, and the
check on predecessor count is nonsensical.

llvm-svn: 166710

11 years agoWhen capturing 'this' in a lambda, make sure to update the set of
Douglas Gregor [Thu, 25 Oct 2012 18:39:16 +0000 (18:39 +0000)]
When capturing 'this' in a lambda, make sure to update the set of
array-index starting values for the 'this' capture. Fixes
<rdar://problem/12426831>.

llvm-svn: 166709

11 years agoAdd 'const' qualifier on member functions not changing its fields.
Michael Liao [Thu, 25 Oct 2012 18:35:04 +0000 (18:35 +0000)]
Add 'const' qualifier on member functions not changing its fields.

llvm-svn: 166708

11 years agoComment to XML conversion: avoid memory allocation while pretty-printing the
Dmitri Gribenko [Thu, 25 Oct 2012 18:28:26 +0000 (18:28 +0000)]
Comment to XML conversion: avoid memory allocation while pretty-printing the
declaration.

llvm-svn: 166707

11 years agoMinor cleanups.
Nadav Rotem [Thu, 25 Oct 2012 18:17:48 +0000 (18:17 +0000)]
Minor cleanups.

llvm-svn: 166706

11 years agoCommentDumper: reorder members and add a comment.
Dmitri Gribenko [Thu, 25 Oct 2012 18:16:02 +0000 (18:16 +0000)]
CommentDumper: reorder members and add a comment.

llvm-svn: 166705

11 years agoAdd text to the help to explain how to set user defined variables.
Jim Ingham [Thu, 25 Oct 2012 18:11:24 +0000 (18:11 +0000)]
Add text to the help to explain how to set user defined variables.

llvm-svn: 166704

11 years agoProvide comment describing what buildBlockDescriptor does.
Fariborz Jahanian [Thu, 25 Oct 2012 18:06:53 +0000 (18:06 +0000)]
Provide comment describing what buildBlockDescriptor does.

llvm-svn: 166703

11 years agoUpdate the release notes to note the change from TargetData to DataLayout.
Micah Villmow [Thu, 25 Oct 2012 18:06:47 +0000 (18:06 +0000)]
Update the release notes to note the change from TargetData to DataLayout.

llvm-svn: 166702