Commit Graph

60665 Commits

Author SHA1 Message Date
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
Anton Korobeynikov 244360d62b Factor out TargetABIInfo stuff into separate file. No functionality change.
llvm-svn: 72962
2009-06-05 22:08:42 +00:00
Devang Patel 9e24386c65 Set function Attribute::NoImplicitFloat appropriately.
llvm-svn: 72961
2009-06-05 22:05:48 +00:00
Devang Patel d1c7d34924 Add new function attribute - noimplicitfloat
Update code generator to use this attribute and remove NoImplicitFloat target option.
Update llc to set this attribute when -no-implicit-float command line option is used.

llvm-svn: 72959
2009-06-05 21:57:13 +00:00
Nate Begeman 624690c6b2 Adapt the x86 build_vector dagcombine to the current state of the legalizer.
build vectors with i64 elements will only appear on 32b x86 before legalize.
Since vector widening occurs during legalize, and produces i64 build_vector 
elements, the dag combiner is never run on these before legalize splits them
into 32b elements.

Teach the build_vector dag combine in x86 back end to recognize consecutive 
loads producing the low part of the vector.

Convert the two uses of TLI's consecutive load recognizer to pass LoadSDNodes
since that was required implicitly.

Add a testcase for the transform.

Old:
	subl	$28, %esp
	movl	32(%esp), %eax
	movl	4(%eax), %ecx
	movl	%ecx, 4(%esp)
	movl	(%eax), %eax
	movl	%eax, (%esp)
	movaps	(%esp), %xmm0
	pmovzxwd	%xmm0, %xmm0
	movl	36(%esp), %eax
	movaps	%xmm0, (%eax)
	addl	$28, %esp
	ret

New:
	movl	4(%esp), %eax
	pmovzxwd	(%eax), %xmm0
	movl	8(%esp), %eax
	movaps	%xmm0, (%eax)
	ret

llvm-svn: 72957
2009-06-05 21:37:30 +00:00
Evan Cheng 3158790e32 Changing allocation ordering from r3 ... r0 back to r0 ... r3. The order change no longer make sense after the coalescing changes we have made since then.
llvm-svn: 72955
2009-06-05 19:08:58 +00:00
Devang Patel 54707b420a Evan thinks NoImplicitFloat check is not required here.
llvm-svn: 72954
2009-06-05 18:48:29 +00:00
Dan Gohman 2bde90b3ee Fix a copy+pasto in an assertion string that Jay Foad noticed.
llvm-svn: 72953
2009-06-05 18:34:16 +00:00
Evan Cheng 7fce2cf0ba When merging multiple load / store instructions. Use the DebugLoc of the first one.
llvm-svn: 72952
2009-06-05 18:19:23 +00:00
Fariborz Jahanian 6845383426 Use of DeclContext for objc's ivars. No functionality
change. More to follow.

llvm-svn: 72951
2009-06-05 18:16:35 +00:00
Evan Cheng c154c1185c Code clean up: return vector by reference rather than by value. No functionality changes.
llvm-svn: 72950
2009-06-05 17:56:14 +00:00
Dan Gohman 63964b5821 Move SCEVExpander::getOrInsertCanonicalInductionVariable out of line.
llvm-svn: 72949
2009-06-05 16:35:53 +00:00
Dan Gohman d9ef48a73e Remove some unnecessary #includes.
llvm-svn: 72948
2009-06-05 16:32:58 +00:00
Douglas Gregor fa93480937 Clean up Clang regression testing in CMake, so that we get more
logical output when running all of the Clang regression tests at once.

llvm-svn: 72947
2009-06-05 16:26:18 +00:00
Dan Gohman 5208dd899f Update the Verifier to be aware of the difference between Add and FAdd, etc.
llvm-svn: 72946
2009-06-05 16:10:00 +00:00
Douglas Gregor 0770532f5a First cut at regression testing Clang with CMake
llvm-svn: 72945
2009-06-05 16:00:31 +00:00
Anders Carlsson b3d05d6d11 Improvements to CXXExprWithTemporaries in preparation for fixing a bug with default arguments that have temporaries.
llvm-svn: 72944
2009-06-05 15:38:08 +00:00
Duncan Sands 8b9524eede On platforms like Sparc64 you need to pass -r to
gcc rather than directly to the linker: gcc will
then modify the linker options it generates (it
will not use --relax for example, incompatible
with -r, as it otherwise would).  This fixes the
sparc build.

llvm-svn: 72943
2009-06-05 15:05:19 +00:00
Sanjiv Gupta b794c12c7e Lower i16/i32 sdiv/udiv/srem/urem using libcalls.
llvm-svn: 72942
2009-06-05 14:43:12 +00:00
Sanjiv Gupta 7925c5fd3f Allow libcalls for i16 sdiv/udiv/rem operations.
llvm-svn: 72941
2009-06-05 14:41:10 +00:00
Eli Friedman 2468f8625a PR3443: Add stpcpy builtin (plus a few other related builtins). Yes,
we're still missing a mechanism to disable these in strict mode, but 
that's not a new issue.

llvm-svn: 72936
2009-06-05 08:20:10 +00:00
Daniel Dunbar 4be99ff767 ABI handling: Fix nasty thinko where IRgen could generate an out-of-bounds read
when generating a coercion for ABI handling purposes.
 - This may only manifest itself when building at -O0, but the practical effect
   is that other arguments may get clobbered.

 - <rdar://problem/6930451> [irgen] ABI coercion clobbers other arguments

llvm-svn: 72932
2009-06-05 07:58:54 +00:00
Eli Friedman 327f0b5593 Add driver support for -fsigned-char/-funsigned-char.
llvm-svn: 72930
2009-06-05 07:21:14 +00:00
Eli Friedman 6be4b393b9 Add -fsigned-char option to clang-cc.
llvm-svn: 72929
2009-06-05 07:12:17 +00:00
Eli Friedman 9ffd4a9b96 Move CharIsSigned from TargetInfo to LangOptions.
llvm-svn: 72928
2009-06-05 07:05:05 +00:00
Eli Friedman d7bcad67d4 Add a couple of FreeBSD-specific command-line options.
llvm-svn: 72927
2009-06-05 06:29:09 +00:00
Eli Friedman 302c4e1683 Address review comments for #pragma weak.
llvm-svn: 72926
2009-06-05 06:28:29 +00:00
Daniel Dunbar 635b8050c4 Add an XFAIL test to demonstrate references in Obj-C++, this currently crashes.
llvm-svn: 72923
2009-06-05 06:03:19 +00:00
Anders Carlsson 184cb4123e Make TemplateArgumentListBuilder take an ASTContext (because we're probably going to need it later). Move push_back to the .cpp file. If the passed in template argument is a type, assert that it's canonical.
llvm-svn: 72918
2009-06-05 05:31:27 +00:00
Anders Carlsson c8e7113a9f Make the TemplateArgumentList take a TemplateArgumentListBuilder.
llvm-svn: 72917
2009-06-05 04:47:51 +00:00
Anders Carlsson 1b28c3efe2 Change the specialization decls to take a TemplateArgumentListBuilder.
llvm-svn: 72916
2009-06-05 04:06:48 +00:00
Anders Carlsson 8aa89d4049 Add a helper class for building template argument lists.
llvm-svn: 72915
2009-06-05 03:43:12 +00:00
Eli Friedman 3c1291d384 Update test to work with the limited Sema for #pragma weak.
llvm-svn: 72914
2009-06-05 02:49:06 +00:00
Anders Carlsson 03c9e87410 Fix another crash and actually make the test case work.
llvm-svn: 72913
2009-06-05 02:45:24 +00:00
Eli Friedman 5ed5198a5a Start of a Sema implementation for #pragma weak. This isn't really the
right approach, but I'm still not sure what the best way to go about this is.

llvm-svn: 72912
2009-06-05 02:44:36 +00:00
Anders Carlsson dd096d888b Fix a case when the TemplateArgs vector can be empty.
llvm-svn: 72911
2009-06-05 02:12:32 +00:00
Daniel Dunbar dd050567c1 Fix -Asserts build warnings.
llvm-svn: 72910
2009-06-05 02:03:25 +00:00
Douglas Gregor b7ae10f764 Several improvements to template argument deduction:
- Once we have deduced template arguments for a class template partial
    specialization, we use exactly those template arguments for instantiating
    the definition of the class template partial specialization.
  - Added template argument deduction for non-type template parameters.
  - Added template argument deduction for dependently-sized array types.

With these changes, we can now implement, e.g., the remove_reference
type trait. Also, Daniel's Ackermann template metaprogram now compiles
properly.

llvm-svn: 72909
2009-06-05 00:53:49 +00:00
Eli Friedman 8df7462f69 Test for parsing #pragma weak.
llvm-svn: 72908
2009-06-05 00:50:43 +00:00
Eli Friedman f5867dd51a Add parser support for #pragma weak.
llvm-svn: 72907
2009-06-05 00:49:58 +00:00
Bruno Cardoso Lopes 12ad90a7a6 ELF Code Emitter now uses CurBufferPtr, BufferBegin and BufferEnd, as do JIT and
MachO Writer. This will change with the arrival of ObjectCodeEmitter and
BinaryObject

llvm-svn: 72906
2009-06-05 00:22:10 +00:00
Devang Patel 21dd8d4ae4 NoRedZone attribute test case.
llvm-svn: 72905
2009-06-04 23:45:55 +00:00
Dan Gohman 5c36f4f40c Fix an erroneous check for isFNeg; the FNeg case is handled
a few lines later on.

llvm-svn: 72904
2009-06-04 23:43:29 +00:00
Bill Wendling 72c9722c64 Fix these so that they work on non-x86 Darwin machines.
llvm-svn: 72903
2009-06-04 23:37:19 +00:00
Devang Patel 6e467b1a46 Set function attribute llvm::Attribute::NoRedZone appropriately.
llvm-svn: 72902
2009-06-04 23:32:02 +00:00
Eli Friedman 319ce956a9 Fix up this compatibility hack to be more compatible with gcc.
llvm-svn: 72901
2009-06-04 23:03:07 +00:00
Eli Friedman fd4b1559db Move a couple Darwin-specific defines into getDarwinDefines.
llvm-svn: 72900
2009-06-04 23:00:29 +00:00
Bill Wendling d6ac8bec21 Specify that this works for Darwin.
llvm-svn: 72899
2009-06-04 22:56:29 +00:00
Bill Wendling 5f0d6c4434 The DWARF unwind info was incorrect. While compiling with
`-fomit-frame-pointer', we would lack the DW_CFA_advance_loc information for a
lot of function, and then they would be `0'. The linker (at least on Darwin)
needs to encode the stack size. In some cases, the stack size is too large to
directly encode. So the linker checks to see if there is a "subl $xxx,%esp"
instruction at the point where the `DW_CFA_def_cfa_offset' says the pc was. If
so, the compact encoding records the offset in the function to where the stack
size is embedded. But because the `DW_CFA_advance_loc' instructions are missing,
it looks before the function and dies.

So, instead of emitting the EH debug label before the stack adjustment
operations, emit it afterwards, right before the frame move stuff.

llvm-svn: 72898
2009-06-04 22:52:30 +00:00