platform/upstream/llvm.git
11 years ago1. Fix a bug in getTypeConversion. When a *simple* type is split, we need to return...
Nadav Rotem [Sat, 27 Oct 2012 04:11:32 +0000 (04:11 +0000)]
1. Fix a bug in getTypeConversion. When a *simple* type is split, we need to return the type of the split result.
2. Change the maximum vectorization width from 4 to 8.
3. A test for both.

llvm-svn: 166864

11 years agoRevert r166855. I can reproduce the bootstrap failure and have a testcase
Rafael Espindola [Sat, 27 Oct 2012 03:06:02 +0000 (03:06 +0000)]
Revert r166855. I can reproduce the bootstrap failure and have a testcase
to reduce.

llvm-svn: 166863

11 years agoThis is the first phase of supporting the DW_AT_object_pointer tag. I expanded the...
Jim Ingham [Sat, 27 Oct 2012 02:54:13 +0000 (02:54 +0000)]
This is the first phase of supporting the DW_AT_object_pointer tag.  I expanded the decl metadata
so it could hold this information, and then used it to look up unfound names in the object pointer
if it exists.  This gets "frame var" to work for unqualified references to ivars captured in blocks.
But the expression parser is ignoring this information still.

llvm-svn: 166860

11 years agoIf we got what looks like a single step exception but we weren't single stepping...
Jim Ingham [Sat, 27 Oct 2012 02:52:04 +0000 (02:52 +0000)]
If we got what looks like a single step exception but we weren't single stepping then just report
the raw exception.

llvm-svn: 166859

11 years agoAdd a test case for the stack overflow in rdar://12542261
Argyrios Kyrtzidis [Sat, 27 Oct 2012 02:13:28 +0000 (02:13 +0000)]
Add a test case for the stack overflow in rdar://12542261

llvm-svn: 166858

11 years agoMoving ValueObjectCast over to its own .h/.cpp files instead of sharing ValueObjectDy...
Enrico Granata [Sat, 27 Oct 2012 02:05:48 +0000 (02:05 +0000)]
Moving ValueObjectCast over to its own .h/.cpp files instead of sharing ValueObjectDynamic.h/.cpp
Removing the IsDynamic() and GetStaticValue() calls, so that they will default to the base class behavior:
 - non-dynamic
 - itself as the static value
This is in contrast with the previous behavior which could be confusing and could potentially cause issues when using those objects

llvm-svn: 166857

11 years agoFixes to the Objective-C V2 runtime:
Sean Callanan [Sat, 27 Oct 2012 01:51:44 +0000 (01:51 +0000)]
Fixes to the Objective-C V2 runtime:

- Only read the statically-defined isa table in the
  shared cache once.  Only the dynamically-constructed
  isa table can change.

- Ignore the statically-defined isa table if its
  version isn't what we expect.

llvm-svn: 166856

11 years agoFix cases where we were not producing an error when a computed goto could
Rafael Espindola [Sat, 27 Oct 2012 01:17:42 +0000 (01:17 +0000)]
Fix cases where we were not producing an error when a computed goto could
jump over destructor calls.
Fixes pr13812.

llvm-svn: 166855

11 years ago[code size][ARM] Emit regular call instructions instead of the move, branch sequence
Quentin Colombet [Sat, 27 Oct 2012 01:10:17 +0000 (01:10 +0000)]
[code size][ARM] Emit regular call instructions instead of the move, branch sequence

llvm-svn: 166854

11 years agoMove two helper functions to AST so that sema can use them.
Rafael Espindola [Sat, 27 Oct 2012 01:03:43 +0000 (01:03 +0000)]
Move two helper functions to AST so that sema can use them.

llvm-svn: 166853

11 years agoImplement MipsHi for mips16
Reed Kotler [Sat, 27 Oct 2012 00:57:14 +0000 (00:57 +0000)]
Implement MipsHi for mips16

llvm-svn: 166852

11 years ago[mips] Do not tail-call optimize vararg functions or functions with byval
Akira Hatanaka [Sat, 27 Oct 2012 00:56:56 +0000 (00:56 +0000)]
[mips] Do not tail-call optimize vararg functions or functions with byval
arguments.

This is rather conservative and should be fixed later to be more aggressive.

llvm-svn: 166851

11 years ago[mips] Make sure FuncArg doesn't advance when OrigArgIndex is the same as in the
Akira Hatanaka [Sat, 27 Oct 2012 00:44:39 +0000 (00:44 +0000)]
[mips] Make sure FuncArg doesn't advance when OrigArgIndex is the same as in the
previous iteration.

llvm-svn: 166850

11 years agoRefactor some code into a new findMaterializedTemporary function.
Rafael Espindola [Sat, 27 Oct 2012 00:43:14 +0000 (00:43 +0000)]
Refactor some code into a new findMaterializedTemporary function.

llvm-svn: 166849

11 years agoRefactor some code into a new skipRValueSubobjectAdjustments function.
Rafael Espindola [Sat, 27 Oct 2012 00:40:06 +0000 (00:40 +0000)]
Refactor some code into a new skipRValueSubobjectAdjustments function.

llvm-svn: 166848

11 years agoDelay codegen to after collecting all SubobjectAdjustment so that the collection
Rafael Espindola [Sat, 27 Oct 2012 00:36:38 +0000 (00:36 +0000)]
Delay codegen to after collecting all SubobjectAdjustment so that the collection
can be refactored and used in Sema.

llvm-svn: 166847

11 years agoUse the methods and classes that were added to simplify LowerCall and
Akira Hatanaka [Sat, 27 Oct 2012 00:29:43 +0000 (00:29 +0000)]
Use the methods and classes that were added to simplify LowerCall and
LowerFormalArguments in MipsTargetLowering.

No functionality change intended.

llvm-svn: 166846

11 years agoAdd method MipsTargetLowering::writeVarArgRegs which copies argument registers
Akira Hatanaka [Sat, 27 Oct 2012 00:21:13 +0000 (00:21 +0000)]
Add method MipsTargetLowering::writeVarArgRegs which copies argument registers
of vararg functions back to the stack.

llvm-svn: 166844

11 years agoAdd method MipsTargetLowering::passByValArg.
Akira Hatanaka [Sat, 27 Oct 2012 00:16:36 +0000 (00:16 +0000)]
Add method MipsTargetLowering::passByValArg.

This method emits nodes for passing byval arguments in registers and stack.
This has the same functionality as existing functions PassByValArg64 and
WriteByValArg which will be deleted later.

llvm-svn: 166843

11 years agoAdd method MipsTargetLowering::copyByValRegs.
Akira Hatanaka [Sat, 27 Oct 2012 00:10:18 +0000 (00:10 +0000)]
Add method MipsTargetLowering::copyByValRegs.

This method copies byval arguments passed in registers onto the stack and has
the same functionality as existing functions CopyMips64ByValRegs and
ReadByValArg which will be deleted later.

llvm-svn: 166841

11 years agoAdd class MipsCC which provides methods used to analyze formal and call
Akira Hatanaka [Fri, 26 Oct 2012 23:56:38 +0000 (23:56 +0000)]
Add class MipsCC which provides methods used to analyze formal and call
arguments and inquire about calling convention information.

llvm-svn: 166840

11 years agoShow both lldb-168 and earlier "bt -c 5" as well as lldb-169 and later "bt 5" usage.
Jason Molenda [Fri, 26 Oct 2012 23:56:03 +0000 (23:56 +0000)]
Show both lldb-168 and earlier "bt -c 5" as well as lldb-169 and later "bt 5" usage.

llvm-svn: 166839

11 years agoDocument "bt <n>" for "thread backtrace -c <n>", note that it is available
Jason Molenda [Fri, 26 Oct 2012 23:52:49 +0000 (23:52 +0000)]
Document "bt <n>" for "thread backtrace -c <n>", note that it is available
in lldb-169 and later.

llvm-svn: 166838

11 years agoDelete MipsFunctionInfo::InArgFIRange.
Akira Hatanaka [Fri, 26 Oct 2012 23:49:51 +0000 (23:49 +0000)]
Delete MipsFunctionInfo::InArgFIRange.

llvm-svn: 166837

11 years agoRefactor the VectorTargetTransformInfo interface.
Nadav Rotem [Fri, 26 Oct 2012 23:49:28 +0000 (23:49 +0000)]
Refactor the VectorTargetTransformInfo interface.

Add getCostXXX calls for different families of opcodes, such as casts, arithmetic, cmp, etc.

Port the LoopVectorizer to the new API.

The LoopVectorizer now finds instructions which will remain uniform after vectorization. It uses this information when calculating the cost of these instructions.

llvm-svn: 166836

11 years agoRevert r163298 "Optimize codegen for VSETLNi{8,16,32} operating on Q registers."
Jakob Stoklund Olesen [Fri, 26 Oct 2012 23:39:46 +0000 (23:39 +0000)]
Revert r163298 "Optimize codegen for VSETLNi{8,16,32} operating on Q registers."

Keep the integer_insertelement test case, the new coalescer can handle
this kind of lane insertion without help from pseudo-instructions.

llvm-svn: 166835

11 years agoAvoid an unused-variable warning when asserts are disabled.
Kaelyn Uhrain [Fri, 26 Oct 2012 23:28:41 +0000 (23:28 +0000)]
Avoid an unused-variable warning when asserts are disabled.

llvm-svn: 166834

11 years agoFix typo.
Eli Friedman [Fri, 26 Oct 2012 23:25:42 +0000 (23:25 +0000)]
Fix typo.

llvm-svn: 166833

11 years agoAdd missing safety check to an optimization for do-while loops. PR14191.
Eli Friedman [Fri, 26 Oct 2012 23:23:35 +0000 (23:23 +0000)]
Add missing safety check to an optimization for do-while loops.  PR14191.

llvm-svn: 166832

11 years agoFix indentation.
Eli Friedman [Fri, 26 Oct 2012 23:05:34 +0000 (23:05 +0000)]
Fix indentation.

llvm-svn: 166830

11 years agoReduce indentation with early exit.
Jakob Stoklund Olesen [Fri, 26 Oct 2012 23:05:13 +0000 (23:05 +0000)]
Reduce indentation with early exit.

No functional change.

llvm-svn: 166829

11 years agoAlso make the current basic block a class member.
Jakob Stoklund Olesen [Fri, 26 Oct 2012 23:05:10 +0000 (23:05 +0000)]
Also make the current basic block a class member.

Don't pass it around everywhere as a function argument.

llvm-svn: 166828

11 years agoimplement mips16 tls global addr
Reed Kotler [Fri, 26 Oct 2012 22:57:32 +0000 (22:57 +0000)]
implement mips16 tls global addr

llvm-svn: 166827

11 years agoIn Parser::ParseDecltypeSpecifier, make sure the end location it returns
Argyrios Kyrtzidis [Fri, 26 Oct 2012 22:53:44 +0000 (22:53 +0000)]
In Parser::ParseDecltypeSpecifier, make sure the end location it returns
is at the end of parsed tokens when an error occurs, otherwise we'll hit
an assertion when trying to annotate the decltype tokens.

llvm-svn: 166826

11 years agoDon't crash synthesizing an ObjC property with an empty struct type. <rdar://problem...
Eli Friedman [Fri, 26 Oct 2012 22:38:05 +0000 (22:38 +0000)]
Don't crash synthesizing an ObjC property with an empty struct type.  <rdar://problem/12547611>.

llvm-svn: 166825

11 years agoWhen an externally-supplied record layout has a size that clearly
Douglas Gregor [Fri, 26 Oct 2012 22:31:14 +0000 (22:31 +0000)]
When an externally-supplied record layout has a size that clearly
doesn't include padding up to the alignment of the record, take this
as a cue that the alignment of the record should (conservatively) be
set to 1. This is similar to other the other cues we use to determine
that the record has a lower alignment, e.g., that the
externally-supplied layout places fields at lower offsets than we
would. Fixes <rdar://problem/12582052>; test case in LLDB.

llvm-svn: 166824

11 years agoAdd comment for my patch in r166809.
Fariborz Jahanian [Fri, 26 Oct 2012 22:20:25 +0000 (22:20 +0000)]
Add comment for my patch in r166809.

llvm-svn: 166823

11 years agoMCRegisterClass should be returned by const ref, not by value.
Lang Hames [Fri, 26 Oct 2012 22:14:10 +0000 (22:14 +0000)]
MCRegisterClass should be returned by const ref, not by value.

llvm-svn: 166822

11 years agoSuggest llvm_unreachable over assert(0).
Jordan Rose [Fri, 26 Oct 2012 22:08:46 +0000 (22:08 +0000)]
Suggest llvm_unreachable over assert(0).

llvm-svn: 166821

11 years agoMake the Processed set a class member.
Jakob Stoklund Olesen [Fri, 26 Oct 2012 22:06:00 +0000 (22:06 +0000)]
Make the Processed set a class member.

Don't pass it everywhere as an argument.

llvm-svn: 166820

11 years ago[ms-inline asm] Add a comment.
Chad Rosier [Fri, 26 Oct 2012 22:01:25 +0000 (22:01 +0000)]
[ms-inline asm] Add a comment.

llvm-svn: 166819

11 years ago80 col.
Jakob Stoklund Olesen [Fri, 26 Oct 2012 21:46:57 +0000 (21:46 +0000)]
80 col.

llvm-svn: 166818

11 years agoRemove ARMBaseRegisterInfo::isReservedReg().
Jakob Stoklund Olesen [Fri, 26 Oct 2012 21:43:05 +0000 (21:43 +0000)]
Remove ARMBaseRegisterInfo::isReservedReg().

It is just as easy to use MRI::isReserved() now.

llvm-svn: 166817

11 years agoAdd GPRPair Register class to ARM.
Jakob Stoklund Olesen [Fri, 26 Oct 2012 21:29:15 +0000 (21:29 +0000)]
Add GPRPair Register class to ARM.

Some instructions in ARM require 2 even-odd paired GPRs. This
patch adds support for such register class.

Patch by Weiming Zhao!

llvm-svn: 166816

11 years agoFix whitespace and function names to be coding standardy.
Jakob Stoklund Olesen [Fri, 26 Oct 2012 21:12:49 +0000 (21:12 +0000)]
Fix whitespace and function names to be coding standardy.

No functional change.

llvm-svn: 166814

11 years agoRemove the canCombineSubRegIndices() target hook.
Jakob Stoklund Olesen [Fri, 26 Oct 2012 20:38:19 +0000 (20:38 +0000)]
Remove the canCombineSubRegIndices() target hook.

The new coalescer can already do all of this, so there is no need to
duplicate the efforts.

llvm-svn: 166813

11 years agoThis patch is a follow-up to r166805. As suggested on-list, a check was
Bill Schmidt [Fri, 26 Oct 2012 20:34:52 +0000 (20:34 +0000)]
This patch is a follow-up to r166805.  As suggested on-list, a check was
added to ensure no extra alignment code is added in the future.

llvm-svn: 166812

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