[llvm-commits] [dragonegg] r104054 - in /dragonegg/trunk: bits_and_bobs.cpp x86/llvm-target.h

Duncan Sands baldrick at free.fr
Tue May 18 14:06:05 PDT 2010


Author: baldrick
Date: Tue May 18 16:06:05 2010
New Revision: 104054

URL: http://llvm.org/viewvc/llvm-project?rev=104054&view=rev
Log:
Rather than aborting because contains_aligned_value_p is not
yet implemented, use the type alignment as the byval alignment.
This should get fixed up later when the ABI stuff is reworked.

Modified:
    dragonegg/trunk/bits_and_bobs.cpp
    dragonegg/trunk/x86/llvm-target.h

Modified: dragonegg/trunk/bits_and_bobs.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/bits_and_bobs.cpp?rev=104054&r1=104053&r2=104054&view=diff
==============================================================================
--- dragonegg/trunk/bits_and_bobs.cpp (original)
+++ dragonegg/trunk/bits_and_bobs.cpp Tue May 18 16:06:05 2010
@@ -3,7 +3,3 @@
 int ix86_regparm;
 
 union tree_node;
-
-extern "C" bool contains_aligned_value_p (union tree_node *type) {
-  abort();
-}

Modified: dragonegg/trunk/x86/llvm-target.h
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/x86/llvm-target.h?rev=104054&r1=104053&r2=104054&view=diff
==============================================================================
--- dragonegg/trunk/x86/llvm-target.h (original)
+++ dragonegg/trunk/x86/llvm-target.h Tue May 18 16:06:05 2010
@@ -99,10 +99,8 @@
 /* On x86-32 objects containing SSE vectors are 16 byte aligned, everything
    else 4.  On x86-64 vectors are 8-byte aligned, everything else can
    be figured out by the back end. */
-extern "C" bool contains_aligned_value_p(tree);
 #define LLVM_BYVAL_ALIGNMENT(T) \
-  (TARGET_64BIT ? (TREE_CODE(T)==VECTOR_TYPE ? 8 : 0) : \
-   TARGET_SSE && contains_aligned_value_p(T) ? 16 : 4)
+  (TYPE_ALIGN(T) / 8)
 
 extern tree llvm_x86_should_return_selt_struct_as_scalar(tree);
 





More information about the llvm-commits mailing list