Commit Graph

136167 Commits

Author SHA1 Message Date
Alexey Samsonov 8bece2e957 Fix test suppressed in r166683 on 32-bit Linux
llvm-svn: 166758
2012-10-26 07:01:51 +00:00
Jason Molenda 60f0bd4944 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
2012-10-26 06:08:58 +00:00
Reed Kotler 287f0449a2 Implement carry for subtract/add for mips16
llvm-svn: 166755
2012-10-26 04:46:26 +00:00
Nick Lewycky c86037ff01 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
2012-10-26 04:43:47 +00:00
Jason Molenda a3843dd2a5 Document target.source-map as the replacement for gdb's directory command.
llvm-svn: 166753
2012-10-26 04:38:09 +00:00
Hal Finkel 4863448dca Use VTTI->getNumberOfParts in BBVectorize.
This change reflects VTTI refactoring; no functionality change intended.

llvm-svn: 166752
2012-10-26 04:28:06 +00:00
Hal Finkel 9dd045f178 Add VectorTargetTransform::getNumberOfParts.
As discussed on IRC, add VectorTargetTransform::getNumberOfParts
to provide a stable interface to the vector legalization splitting factor.

llvm-svn: 166751
2012-10-26 04:28:02 +00:00
Nick Lewycky 1a32954279 Fix typo in comment.
llvm-svn: 166750
2012-10-26 04:27:49 +00:00
Reed Kotler e47873ab89 implement large (>16 bit) constant loading.
llvm-svn: 166749
2012-10-26 03:09:34 +00:00
Rafael Espindola b1d9101c11 Fix unexpected passes. These test do work with LTO on linux. I tested both
a cmake and an autoconf build.

llvm-svn: 166748
2012-10-26 02:19:02 +00:00
Reed Kotler 183ba5ef26 fix test setgek.ll so that it will not give false "make check"
failure in some cases

llvm-svn: 166747
2012-10-26 01:29:42 +00:00
Fariborz Jahanian 77599ce809 Declare type of flags to be used in a __block (byref)
variable descriptor captured by a block.

llvm-svn: 166746
2012-10-26 01:13:38 +00:00
Rafael Espindola a339e47689 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
2012-10-26 00:29:57 +00:00
Quentin Colombet 5ee5ca1dbc Oz optimization level sets ForceSizeOpt attribute for each function
llvm-svn: 166744
2012-10-26 00:29:48 +00:00
Manman Ren 5750c1c07e 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
2012-10-26 00:25:10 +00:00
Rafael Espindola 375c7f3859 Port testcase to FileCheck.
llvm-svn: 166742
2012-10-26 00:14:11 +00:00
Hal Finkel 41a6ded4a0 Disable generation of pointer vectors by BBVectorize.
Once vector-of-pointer support works, then this can be reverted.

llvm-svn: 166741
2012-10-26 00:05:26 +00:00
Filipe Cabecinhas be45ce66d4 Add a teardown function to TestAbbreviations so it doesn't error out when running for two archs.
llvm-svn: 166740
2012-10-25 23:52:28 +00:00
Nadav Rotem 8255ceb2cf Revert 166726 because it may have broken a number of SPEC tests. PR14183.
llvm-svn: 166739
2012-10-25 23:51:48 +00:00
Hal Finkel 20a49d6f2c 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
2012-10-25 23:47:16 +00:00
Bill Wendling 9d1ee1175d 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
2012-10-25 23:28:48 +00:00
Richard Smith 3750e7776b Fix the other occurrence of the problem fixed by r166731.
llvm-svn: 166735
2012-10-25 23:05:00 +00:00
Fariborz Jahanian a3926ec195 Changing name of enum for block literal flags to represent
what it is meant for.

llvm-svn: 166734
2012-10-25 22:55:52 +00:00
Greg Clayton 82d792958b <rdar://problem/12570550>
TOT lldb broke finding App in app bundles when launching with shell.

llvm-svn: 166733
2012-10-25 22:45:35 +00:00
Jim Ingham 4a58e96846 Found a couple more places where we need to run all threads when stepping.
llvm-svn: 166732
2012-10-25 22:30:09 +00:00
Richard Smith 9421156acc 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
2012-10-25 22:27:30 +00:00
Kaelyn Uhrain 367bb95c35 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
2012-10-25 22:09:49 +00:00
Ted Kremenek a5958869f6 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
2012-10-25 22:07:10 +00:00
Richard Smith 1048356524 Add a more direct test for r166661.
llvm-svn: 166727
2012-10-25 21:59:45 +00:00
Nadav Rotem bb4cfb5ee1 Fix a crash in ValueTracking. Add support for vectors of pointers.
llvm-svn: 166726
2012-10-25 21:52:52 +00:00
Chad Rosier 77c8aca06a [ms-inline asm] Add a test case for r166723 and r166724.
llvm-svn: 166725
2012-10-25 21:52:03 +00:00
Chad Rosier 240b7b963a [ms-inline asm] Perform field lookups with the dot operator.
llvm-svn: 166724
2012-10-25 21:51:10 +00:00
Chad Rosier 5c56364be9 [ms-inline asm] Add support for field lookup in the SemaCallback. Patch by Eli.
llvm-svn: 166723
2012-10-25 21:49:22 +00:00
Nadav Rotem ede4fd4777 Fix the cost-model test.
llvm-svn: 166722
2012-10-25 21:42:50 +00:00
Reed Kotler 097556d6bd implement mips16 patterns for select nodes
llvm-svn: 166721
2012-10-25 21:33:30 +00:00
Hal Finkel 65e0da798b Add CPU model to BBVectorize cost-model tests.
llvm-svn: 166720
2012-10-25 21:31:51 +00:00
Kaelyn Uhrain 41a73b7678 Don't return false when the function's return type is a pointer.
llvm-svn: 166719
2012-10-25 21:25:08 +00:00
Nadav Rotem 27d523580c Add the cpu model to the test.
llvm-svn: 166718
2012-10-25 21:18:42 +00:00
Fariborz Jahanian 196f9384c7 Add some new types in preparation of encoding of captured block variable
layout meta-data work. wip.

llvm-svn: 166717
2012-10-25 21:15:04 +00:00
Hal Finkel cbf9365f4c 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
2012-10-25 21:12:23 +00:00
Nadav Rotem 579042f71b LoopVectorize: Teach the cost model to query scalar costs as scalar types and not vectors of 1.
llvm-svn: 166715
2012-10-25 21:03:48 +00:00
Chad Rosier f0e8720054 [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
2012-10-25 20:41:34 +00:00
Joerg Sonnenberger ee1f31ebea Don't require exception handling for clang-tblgen.
llvm-svn: 166713
2012-10-25 20:34:00 +00:00
Joerg Sonnenberger 635debe85b 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
2012-10-25 20:33:17 +00:00
Kaelyn Uhrain f1ecb7c62c Move the input files for test/PCH/badpch.c under test/PCH/Inputs/.
llvm-svn: 166711
2012-10-25 19:43:57 +00:00
Jakob Stoklund Olesen 977f41a1fa 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
2012-10-25 18:51:15 +00:00
Douglas Gregor d814a05f6b 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
2012-10-25 18:39:16 +00:00
Michael Liao 8cdb7ede80 Add 'const' qualifier on member functions not changing its fields.
llvm-svn: 166708
2012-10-25 18:35:04 +00:00
Dmitri Gribenko 1c1395e902 Comment to XML conversion: avoid memory allocation while pretty-printing the
declaration.

llvm-svn: 166707
2012-10-25 18:28:26 +00:00
Nadav Rotem 8b749b2364 Minor cleanups.
llvm-svn: 166706
2012-10-25 18:17:48 +00:00