Commit Graph

60713 Commits

Author SHA1 Message Date
Eli Friedman 0d4234416f Get rid of some unnecessary code.
llvm-svn: 73017
2009-06-07 07:28:45 +00:00
Nick Lewycky 0aa6a74a79 Create FunctionType::isValidArgumentType to go along with isValidReturnType.
Also create isValidElementType for ArrayType, PointerType, StructType and
VectorType.

Make LLParser use them. This closes up some holes like an assertion failure on:

  %x = type {label}

but largely doesn't change any semantics. The only thing we accept now which
we didn't before is vectors of opaque type such as "<4 x opaque>". The opaque
can be resolved to an int or float when linking.

llvm-svn: 73016
2009-06-07 07:26:46 +00:00
Eli Friedman 5a996fc0fc Now that LLVM CodeGen can handle the generic variations a bit better,
get rid of a few more clang vector builtins.

llvm-svn: 73015
2009-06-07 07:12:56 +00:00
Douglas Gregor e183993ffa CMake: Install Clang's headers into the right place in the build tree, for regression testing
llvm-svn: 73014
2009-06-07 07:09:23 +00:00
Mikhail Glushenkov aef7175f45 A basic PIC16 toolchain driver.
Nice addition to the examples and also a starting point for Sanjiv to work on.

llvm-svn: 73013
2009-06-07 07:08:01 +00:00
Eli Friedman 3234587213 Slightly generalize the code that handles shuffles of consecutive loads
on x86 to handle more cases.  Fix a bug in said code that would cause it 
to read past the end of an object.  Rewrite the code in 
SelectionDAGLegalize::ExpandBUILD_VECTOR to be a bit more general. 
Remove PerformBuildVectorCombine, which is no longer necessary with 
these changes.  In addition to simplifying the code, with this change, 
we can now catch a few more cases of consecutive loads.

llvm-svn: 73012
2009-06-07 06:52:44 +00:00
Nick Lewycky cc13058998 Remove cyclic MDNode detection. Any attempt to create a cyclic MDNode will
crash LLVM first.

llvm-svn: 73011
2009-06-07 04:03:01 +00:00
Nick Lewycky 8b165afabe Refuse metadata* type for function arguments.
llvm-svn: 73010
2009-06-07 01:45:11 +00:00
Eli Friedman be1bb0f8b1 PR3628: Add patterns to match SHL/SRL/SRA to the corresponding Altivec
instructions.

llvm-svn: 73009
2009-06-07 01:07:55 +00:00
Nick Lewycky 5503c31ff9 Add option for specifying the path to assembler, "as". This overrides the path
to gcc.

llvm-svn: 73008
2009-06-07 00:50:45 +00:00
Nick Lewycky 7ea68536b5 Don't crash on multiple return value with no obvious inserted value.
Fixes PR4314.

llvm-svn: 73007
2009-06-06 23:13:08 +00:00
Eli Friedman 73a83066d5 PR4340: Run SimplifyDemandedVectorElts on insertelement instructions;
sometimes it can find simplifications that won't be found otherwise.

llvm-svn: 73006
2009-06-06 20:08:03 +00:00
Eli Friedman 07bbeca406 PR4339: make sure to properly extend/trunc the index of a vector element
insert/extract; the relevant instructions are defined to take only an 
i32.

llvm-svn: 73005
2009-06-06 19:09:26 +00:00
Eli Friedman 5f75ff84b7 Test changes to account for removed builtins.
llvm-svn: 73004
2009-06-06 18:15:42 +00:00
Nick Lewycky 03f80adeab Move </pre> to column one to avoid an extra line of spaces in the example.
llvm-svn: 73003
2009-06-06 18:14:04 +00:00
Jay Foad e57ba2eab5 Use cast<> instead of dyn_cast<> for things that are known to be
Instructions.

llvm-svn: 73002
2009-06-06 17:49:35 +00:00
Ted Kremenek 800c20f11a Update checker build.
llvm-svn: 73001
2009-06-06 17:44:12 +00:00
Fariborz Jahanian 28c5a8ba4a Adds synthesize ivars to DeclContext.
llvm-svn: 73000
2009-06-06 16:36:41 +00:00
Dan Gohman 4c720c07bb Rename UnknownValue to CouldNotCompute, since it holds an instance of
SCEVCouldNotCompute, and not SCEVUnknown.

llvm-svn: 72999
2009-06-06 14:37:11 +00:00
Anton Korobeynikov 18adbf5f07 Add new ABIArgInfo kind: Extend. This allows target to implement its own argument
zero/sign extension logic (consider, e.g. target has only 64 bit registers and thus
i32's should be extended as well).

llvm-svn: 72998
2009-06-06 09:36:29 +00:00
Eli Friedman 6813eb125f Get rid of a bunch of dead builtins.
llvm-svn: 72996
2009-06-06 08:31:46 +00:00
Eli Friedman 4d8d7d3263 Replace more calls to builtins with generic code.
llvm-svn: 72995
2009-06-06 08:08:06 +00:00
Eli Friedman f5f303f92f Fix obvious typo.
llvm-svn: 72994
2009-06-06 07:42:17 +00:00
Eli Friedman c61e357aa6 Fix the expansion for CONCAT_VECTORS so that it doesn't create illegal
types.

llvm-svn: 72993
2009-06-06 07:08:26 +00:00
Eli Friedman aee3f62b75 Factor out a couple of helpers.
llvm-svn: 72992
2009-06-06 07:04:42 +00:00
Eli Friedman 75c496f920 Avoid crashing on a variable-index insertelement with element type i16.
llvm-svn: 72991
2009-06-06 06:32:50 +00:00
Nick Lewycky 8667990cdf Regenerate.
llvm-svn: 72990
2009-06-06 06:25:09 +00:00
Nick Lewycky 9ab256ac66 Add a flag to permit disabling libffi.
Also, there were a bunch of flags with no text in --help because the square
brackets were in the wrong place. I've fixed those too.

llvm-svn: 72989
2009-06-06 06:24:44 +00:00
Eli Friedman 1b1844ad1f Get rid of some bogus patterns for X86vzmovl. Don't create VZEXT_MOVL
nodes for vectors with an i16 element type.  Add an optimization for 
building a vector which is all zeros/undef except for the bottom 
element, where the bottom element is an i8 or i16.

llvm-svn: 72988
2009-06-06 06:05:10 +00:00
Eli Friedman 868bd6ab52 Fix an obvious typo.
llvm-svn: 72987
2009-06-06 05:55:37 +00:00
Bruno Cardoso Lopes 7531e92333 x86_64 now uses the correct ELF e_machine type
llvm-svn: 72986
2009-06-06 04:29:16 +00:00
Eli Friedman 6c101ebfa8 Get rid of a bogus pattern that interferes with optimization.
llvm-svn: 72985
2009-06-06 04:17:04 +00:00
Anders Carlsson 8544647e9c Make ParmVarDecl::getDefaultArg() more robust, it now asserts that the argument is not unparsed. Add a new hasDefaultArg() and use it in places where getDefaultArg() was called when the argument was unparsed.
llvm-svn: 72984
2009-06-06 04:14:07 +00:00
Eli Friedman b45e8ce69a PR2598: make sure to expand illegal forms of integer/floating-point
conversions for x86, like <2 x i32> -> <2 x float> and <4 x i16> -> 
<4 x float>.

llvm-svn: 72983
2009-06-06 03:57:58 +00:00
Bruno Cardoso Lopes 1596c3d9b2 Remove elf specific info from ELFWriter.h to Elf.h. Code cleanup and more comments added
llvm-svn: 72982
2009-06-06 03:56:29 +00:00
Eli Friedman d00fd2885e Fix some casts to work without -flax-vector-conversions.
llvm-svn: 72981
2009-06-06 03:45:06 +00:00
Eli Friedman aea9b65668 Make SINT_TO_FP/UINT_TO_FP vector legalization queries query on the
integer type to be consistent with normal operation legalization.  No visible
change because nothing is actually using this at the moment.

llvm-svn: 72980
2009-06-06 03:27:50 +00:00
Eli Friedman ebd9314f32 Misc fixes to MMX/SSE intrinsics: a few small bug fixes, and getting rid
of calls to builtins for constructs which can be expressed directly.

llvm-svn: 72979
2009-06-06 02:13:04 +00:00
Eli Friedman 2696b1e25e Default builtin creation to off; we don't really want to be doing it
without a relevant source location anyway.  Fixes the issue with weird 
warnings when including objc/Object.h on OS X.

llvm-svn: 72978
2009-06-06 02:08:44 +00:00
Douglas Gregor 30018a6860 Switch CMake testing over to use Daniels new(er) Python-based infrastructure.
llvm-svn: 72977
2009-06-05 23:57:17 +00:00
Mike Stump dedc0968cf Avoid warnings.
llvm-svn: 72976
2009-06-05 23:49:48 +00:00
Douglas Gregor 5f11afc442 More portability checks for CMake's config.h.
llvm-svn: 72975
2009-06-05 23:46:34 +00:00
Mike Stump cbc2bcaf17 As an optimization, we maintain a cache of generated
___Block_byref_id_object_dispose and ___Block_byref_id_object_copy
functions so that we can simply reuse instead of creating a new one.
Additionally, add an assert to ensure no one yet tries to align a
__block variable beyond the alignment of a pointer as the codegen is
incomplete.

llvm-svn: 72974
2009-06-05 23:26:36 +00:00
Ted Kremenek a03705c82d Fix:
<rdar://problem/6948053> False positive: object substitution during -init* methods warns about returning +0 when using -fobjc-gc-only

llvm-svn: 72971
2009-06-05 23:18:01 +00:00
Devang Patel afa8a1592f Simplify.
llvm-svn: 72970
2009-06-05 23:08:56 +00:00
Dan Gohman d185a7a629 Add explicit keywords.
llvm-svn: 72969
2009-06-05 23:05:51 +00:00
Ted Kremenek ea1c221334 Enhance attribute cf_returns_retained to also work (in the analyzer)
for non-Objctive-C pointer types.  This implicitly documents that the
return type is a CF object reference.

llvm-svn: 72968
2009-06-05 23:00:33 +00:00
Daniel Dunbar feeeda70e2 weak_import should not make definitions have weak linkage.
- <rdar://problem/6948703> clang treats weak_import like weak

llvm-svn: 72967
2009-06-05 22:58:34 +00:00
Devang Patel 50fc5a3cd7 Simplify.
llvm-svn: 72965
2009-06-05 22:39:21 +00:00
Anton Korobeynikov 5bda50f84e Update cmake script
llvm-svn: 72963
2009-06-05 22:08:54 +00:00