Commit Graph

97728 Commits

Author SHA1 Message Date
Bob Wilson 9168a4f1c2 Add a Neon intrinsic test generator.
This is still a WIP.  It's already good enough to expose a few bugs, though.

llvm-svn: 121868
2010-12-15 16:58:45 +00:00
Bob Wilson 276f1ca897 Fix Neon intrinsic immediate range checking for some double-register operands.
Some quad-register intrinsics with lane operands only take a double-register
operand for the vector containing the lane.  The valid range of lane numbers
is then half as big as you would expect from the quad-register type.
Note: This currently has no effect because those intrinsics are now handled
entirely in the header file using __builtin_shufflevector, which does its own
range checking, but I want to use this for generating tests.

llvm-svn: 121867
2010-12-15 16:58:42 +00:00
John McCall 68fc88eca7 Reorganize LookupMemberExpr for clarity and to make the obvious fast paths
come first.

llvm-svn: 121866
2010-12-15 16:46:44 +00:00
Douglas Gregor 1e2cdf5933 __attribute__((nonnull)) can apply to reference-to-pointer
parameters. Fixes <rdar://problem/8769025>.

llvm-svn: 121864
2010-12-15 15:41:46 +00:00
Peter Collingbourne 03007d79fe Sema: have BuildExpressionFromIntegralTemplateArgument produce well-formed IntegerLiterals
BuildExpressionFromIntegralTemplateArgument can produce malformed
IntegerLiterals with an EnumType if the template parameter type
is an EnumType.  This breaks the AST printer which expects all
IntegerLiterals to have a plain integer type.  Instead, give the
IntegerLiteral the enum's promotion type and wrap in an implicit cast
to the EnumType.

llvm-svn: 121862
2010-12-15 15:06:14 +00:00
Duncan Sands 0a2c416894 Move Sub simplifications and additional Add simplifications out of
instcombine and into InstructionSimplify.

llvm-svn: 121861
2010-12-15 14:07:39 +00:00
Duncan Sands 019a418808 If we detect that the instruction we are simplifying is unreachable, arrange for
it to be replaced by undef rather than not replaced at all, the idea being that
this may reduce the amount of work done by whoever called InstructionSimplify.

llvm-svn: 121860
2010-12-15 11:02:22 +00:00
Frits van Bommel 3d1803495e Teach jump threading to "look through" a select when the branch direction of a terminator depends on it.
When it sees a promising select it now tries to figure out whether the condition of the select is known in any of the predecessors and if so it maps the operands appropriately.

llvm-svn: 121859
2010-12-15 09:51:20 +00:00
Bill Wendling 03e7576dee Add fixups for Thumb LDR/STR instructions.
llvm-svn: 121858
2010-12-15 08:51:02 +00:00
Rafael Espindola 844f6b6cfb Relax alignment fragments.
With this we don't need the EffectiveSize field anymore. Without that field
LayoutFragment only updates offsets and we don't need to invalidate the
current fragment when it is relaxed (only the ones following it).

This is also a very small improvement in the accuracy of the layout info as
we now use the after relaxation size immediately.

llvm-svn: 121857
2010-12-15 08:45:53 +00:00
Rafael Espindola 8911d03504 Patch by David Meyer to avoid a O(N^2) behaviour when relaxing fragments.
Since we now don't update addresses so early, we might relax a bit more than
we need to. This is simillar to the issue in PR8467.

llvm-svn: 121856
2010-12-15 07:39:29 +00:00
Chandler Carruth 2b59fbe719 Silence GCC warning about control reaching the end of the function and explicitly mark that all cases are handled.
llvm-svn: 121855
2010-12-15 07:29:18 +00:00
Chris Lattner 5174921b5b add another overflow idiom
llvm-svn: 121854
2010-12-15 07:28:58 +00:00
Chris Lattner 2e33985300 add a note about overflow idiom recognition.
llvm-svn: 121853
2010-12-15 07:25:55 +00:00
Nico Weber d52bea08a3 Fix gcc warning: 'clang::ASTStmtReader' is already a friend of 'clang::OverloadExpr'
llvm-svn: 121852
2010-12-15 07:13:32 +00:00
Rafael Espindola f80f18a11a Generalize an assert.
llvm-svn: 121851
2010-12-15 07:12:24 +00:00
Chris Lattner 27ecda1efd add a shift/imul missed optimization
llvm-svn: 121850
2010-12-15 07:10:43 +00:00
Chris Lattner aded09f27f add a note about a SPEC hack that gcc mainline does.
llvm-svn: 121849
2010-12-15 06:38:24 +00:00
Chris Lattner 15090e1eb0 take care of some todos, transforming [us]mul_lohi into
a wider mul if the wider mul is legal.

llvm-svn: 121848
2010-12-15 06:04:19 +00:00
Chris Lattner c3301e970c merge two tests
llvm-svn: 121847
2010-12-15 05:58:59 +00:00
Chris Lattner b86dceea1b when transforming a MULHS into a wider MUL, there is no need to SRA the
result, the top bits are truncated off anyway, just use SRL.

llvm-svn: 121846
2010-12-15 05:51:39 +00:00
Greg Clayton 54979cddda Fixed the "expression" command object to use the StackFrame::GetValueForExpressionPath()
function and also hooked up better error reporting for when things fail.

Fixed issues with trying to display children of pointers when none are
supposed to be shown (no children for function pointers, and more like this).
This was causing child value objects to be made that were correctly firing
an assertion.

llvm-svn: 121841
2010-12-15 05:08:08 +00:00
Chris Lattner e893e2601e make qsort predicate more conformant by returning 0 for equal values.
llvm-svn: 121838
2010-12-15 04:52:41 +00:00
Chris Lattner 89dcb687bc various cleanups to tblgen, patch by Garrison Venn!
llvm-svn: 121837
2010-12-15 04:48:22 +00:00
John McCall 15317a2f5b Sundry missing lvalue-to-rvalue conversions. Also leave a TODO for the vital
future task of performing contextual conversion to size_t in a VLA size
expression. :)

llvm-svn: 121836
2010-12-15 04:42:30 +00:00
Jason Molenda 3f8688b614 Move the demangle-failed indication out a bit so other failing cases
also get marked as having failed (so we don't try to demangle the
same symbol multiple times).

llvm-svn: 121835
2010-12-15 04:27:04 +00:00
Jason Molenda b690fbbaec Fix a crash on some platforms where a dSYM for a system library lists a DW_AT_mips_linkage_name for
a non-mangled function - we pass the non mangled string down through abi::__cxa_demangle and it
crashes.  Usually passing non mangled strings to abi::__cxa_demangle works out fine but not
always, apparently.

llvm-svn: 121834
2010-12-15 04:20:25 +00:00
John McCall 357d0f3caf Set the "implicitly inline" bit on a method as soon as we see a definition
within the class.  Teach IR gen to look for function definitions in record
lexical contexts when deciding whether to emit a function whose address    
was taken.  Fixes PR8789.

llvm-svn: 121833
2010-12-15 04:00:32 +00:00
Bill Wendling 5d32b70967 Add mention that we support FreeBSD/amd64.
llvm-svn: 121832
2010-12-15 01:35:55 +00:00
Douglas Gregor a6e053e61a Variadic templates: extend the Expr class with a bit that specifies
whether the expression contains an unexpanded parameter pack, in the
same vein as the changes to the Type hierarchy. Compute this bit
within all of the Expr subclasses.

This change required a bunch of reshuffling of dependency
calculations, mainly to consolidate them inside the constructors and
to fuse multiple loops that iterate over arguments to determine type
dependence, value dependence, and (now) containment of unexpanded
parameter packs.

Again, testing is painfully sparse, because all of the diagnostics
will change and it is more important to test the to-be-written visitor
that collects unexpanded parameter packs.

llvm-svn: 121831
2010-12-15 01:34:56 +00:00
Kevin Enderby 4886cc8be7 Add some more MC tests for ARM arithmetic instructions that update or don't
update the condition codes.  These come from my test generator and are just
the ones that MC currently assembles correctly.

llvm-svn: 121830
2010-12-15 01:24:36 +00:00
Mikhail Glushenkov 224404f851 Copy-pastos.
llvm-svn: 121829
2010-12-15 01:22:34 +00:00
Mikhail Glushenkov a59a53f455 Remove ConvertToMAttrImpl, it became too '-march'-specific.
llvm-svn: 121828
2010-12-15 01:22:29 +00:00
Mikhail Glushenkov 63e51958f1 llvmc: Support -march arguments that should be forwarded to llc as -mcpu.
llvm-svn: 121827
2010-12-15 01:22:25 +00:00
Mikhail Glushenkov 8dced6b08e llvmc: Better -mfpu/-mcpu support for ARM & PPC.
llvm-svn: 121826
2010-12-15 01:22:20 +00:00
Mikhail Glushenkov 8084dc957a llvmc: more complete -march table for ARM.
llvm-svn: 121825
2010-12-15 01:22:15 +00:00
Mikhail Glushenkov 0929a09306 llvmc: Support -mabi/-mfloat-abi.
llvm-svn: 121824
2010-12-15 01:22:10 +00:00
Mikhail Glushenkov 6e0252c7b1 llvmc: Forward -march/-mcpu/-mtune to as & ld.
llvm-svn: 121823
2010-12-15 01:22:05 +00:00
Mikhail Glushenkov 9f9b7051c7 llvmc: make switch options ZeroOrMore by default.
llvm-svn: 121822
2010-12-15 01:21:59 +00:00
John McCall 8c6b56f39d Function types are compatible (in the C sense) if their regparms are identical.
llvm-svn: 121821
2010-12-15 01:06:38 +00:00
Bill Wendling 832a5daab5 Reapply r121808 now that the missing patterns have been supplied.
llvm-svn: 121820
2010-12-15 01:03:19 +00:00
Bill Wendling 1171e9e81d Add some missing patterns now that tLDRB and tLDRH are split into reg and
immediate versions.

llvm-svn: 121819
2010-12-15 00:58:57 +00:00
Johnny Chen 8e1ab7b2bf Modify the test case to run under ['gcc', 'llvm-gcc', 'clang'] x ['x86_64', 'i386']
combinations.

llvm-svn: 121818
2010-12-15 00:58:49 +00:00
Owen Anderson 35609d97ae Fix PR8790, another instance where unreachable code can cause instruction simplification to fail,
this case involve a select that simplifies to itself.

llvm-svn: 121817
2010-12-15 00:55:35 +00:00
Owen Anderson 15c85c916f Cleanup trailing whitespace.
llvm-svn: 121816
2010-12-15 00:52:44 +00:00
Bill Wendling 20480d26e9 Revert r121808 until I can fix the build.
llvm-svn: 121815
2010-12-15 00:04:00 +00:00
Caroline Tice 4fd4337b73 Add test cases to make sure the Command Interpreter is handling
command completion properly (e.g. abbreviated commands, which are
NOT the same as aliases).

llvm-svn: 121814
2010-12-14 23:50:59 +00:00
Johnny Chen f48b645423 Rearrange some statements so that the adding of teardown hook follows immediately
after the statement it wants to revert the effect of.

llvm-svn: 121813
2010-12-14 23:47:55 +00:00
Jim Grosbach eda5177ca6 thumb adr fixup needs alignment just like the t2 version.
llvm-svn: 121812
2010-12-14 23:47:35 +00:00
Johnny Chen a245f933ba Make the TestSettings.py test cases use different output filenames:
o "output1.txt" for test_pass_host_env_vars() test case
o "output2.txt" for test_run_args_and_env_vars_with_dsym() test case
o "output2.txt" for test_run_args_and_env_vars_with_dwarf() test case

and add teardown hook to test_pass_host_env_vars() in order to properly
unset the host environment variables set while running the test case.

llvm-svn: 121811
2010-12-14 23:43:29 +00:00