[llvm-branch-commits] [llvm-gcc-branch] r71692 - in /llvm-gcc-4.2/branches/Apple/Dib/gcc: config/i386/llvm-i386-target.h llvm-types.cpp
Bill Wendling
isanbard at gmail.com
Wed May 13 11:40:52 PDT 2009
Author: void
Date: Wed May 13 13:40:05 2009
New Revision: 71692
URL: http://llvm.org/viewvc/llvm-project?rev=71692&view=rev
Log:
--- Merging r70855 into '.':
U gcc/llvm-types.cpp
U gcc/config/i386/llvm-i386-target.h
Fix PR3967: allow enums and references to have
the "inreg" attribute, not just integers and
pointers. Based on a patch by Haohui Mai.
Modified:
llvm-gcc-4.2/branches/Apple/Dib/gcc/config/i386/llvm-i386-target.h
llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-types.cpp
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/config/i386/llvm-i386-target.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/config/i386/llvm-i386-target.h?rev=71692&r1=71691&r2=71692&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/config/i386/llvm-i386-target.h (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/config/i386/llvm-i386-target.h Wed May 13 13:40:05 2009
@@ -76,8 +76,8 @@
PAttribute |= Attribute::InReg; \
else \
local_fp_regparm = 0; \
- } else if (TREE_CODE(Type) == INTEGER_TYPE || \
- TREE_CODE(Type) == POINTER_TYPE) { \
+ } else if (INTEGRAL_TYPE_P(Type) || \
+ POINTER_TYPE_P(Type)) { \
int words = \
(Size + BITS_PER_WORD - 1) / BITS_PER_WORD; \
local_regparm -= words; \
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-types.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-types.cpp?rev=71692&r1=71691&r2=71692&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-types.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-types.cpp Wed May 13 13:40:05 2009
@@ -1241,8 +1241,8 @@
#ifdef LLVM_TARGET_ENABLE_REGPARM
// Allow the target to mark this as inreg.
- if (TREE_CODE(ArgTy) == INTEGER_TYPE || TREE_CODE(ArgTy) == POINTER_TYPE ||
- TREE_CODE(ArgTy) == REAL_TYPE)
+ if (INTEGRAL_TYPE_P(ArgTy) || POINTER_TYPE_P(ArgTy) ||
+ SCALAR_FLOAT_TYPE_P(ArgTy))
LLVM_ADJUST_REGPARM_ATTRIBUTE(PAttributes, ArgTy,
TREE_INT_CST_LOW(TYPE_SIZE(ArgTy)),
local_regparam, local_fp_regparam);
More information about the llvm-branch-commits
mailing list