Re: [llvm-commits] [llvm] r46108 - in /llvm/trunk: lib/Transforms/IPO/ArgumentPromotion.cpp test/Transforms/ArgumentPromotion/attrs.ll
Hi Chris, > Fix arg promotion to propagate the correct attrs on the calls to > promoted functions. This is important for varargs calls in > particular. Thanks to duncan for providing a great testcase. you forgot about attributes on the function return value. Ciao, Duncan. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm] r46088 - in /llvm/trunk: include/llvm/CodeGen/MachineModuleInfo.h lib/CodeGen/DwarfWriter.cpp lib/CodeGen/MachineModuleInfo.cpp
Hi Dale, > Do not mark EH tables no-dead-strip unless the > associated function is so marked. can you please explain what this means? And is there a testcase? Thanks! D. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r46130 - in /llvm/trunk/include/llvm/ADT: ImmutableMap.h ImmutableSet.h
Author: kremenek Date: Thu Jan 17 11:36:49 2008 New Revision: 46130 URL: http://llvm.org/viewvc/llvm-project?rev=46130&view=rev Log: Implemented "FIXME" in ImutAVLTree: isEqual() now also compares the *data* value and not just the key value when comparing trees. To do this we added data_type and data_type_ref to the ImutContainerInfo trait classes. For values stored in the tree that do not have separate key and data components, data_type is simply a typedef of bool, and isDataEqual() always evaluates to true. This allows us to support both ImmutableSet and ImmutableMap using the same underlying logic. Modified: llvm/trunk/include/llvm/ADT/ImmutableMap.h llvm/trunk/include/llvm/ADT/ImmutableSet.h Modified: llvm/trunk/include/llvm/ADT/ImmutableMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableMap.h?rev=46130&r1=46129&r2=46130&view=diff == --- llvm/trunk/include/llvm/ADT/ImmutableMap.h (original) +++ llvm/trunk/include/llvm/ADT/ImmutableMap.h Thu Jan 17 11:36:49 2008 @@ -34,14 +34,21 @@ return V.first; } - static inline bool isEqual(key_type_ref L, key_type_ref R) { -return ImutContainerInfo::isEqual(L,R); + static inline data_type_ref DataOfValue(value_type_ref V) { +return V.second; } + static inline bool isEqual(key_type_ref L, key_type_ref R) { +return ImutContainerInfo::isEqual(L,R); + } static inline bool isLess(key_type_ref L, key_type_ref R) { return ImutContainerInfo::isLess(L,R); } + static inline bool isDataEqual(data_type_ref L, data_type_ref R) { +return ImutContainerInfo::isEqual(L,R); + } + static inline void Profile(FoldingSetNodeID& ID, value_type_ref V) { ImutContainerInfo::Profile(ID, V.first); ImutContainerInfo::Profile(ID, V.second); Modified: llvm/trunk/include/llvm/ADT/ImmutableSet.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableSet.h?rev=46130&r1=46129&r2=46130&view=diff == --- llvm/trunk/include/llvm/ADT/ImmutableSet.h (original) +++ llvm/trunk/include/llvm/ADT/ImmutableSet.h Thu Jan 17 11:36:49 2008 @@ -120,12 +120,16 @@ continue; } - // FIXME: need to compare data values, not key values, but our - // traits don't support this yet. + // Compare the keys. if (!ImutInfo::isEqual(ImutInfo::KeyOfValue(LItr->getValue()), ImutInfo::KeyOfValue(RItr->getValue( return false; + // Also compare the data values. + if (!ImutInfo::isDataEqual(ImutInfo::DataOfValue(LItr->getValue()), + ImutInfo::DataOfValue(RItr->getValue( +return false; + ++LItr; ++RItr; } @@ -773,8 +777,11 @@ typedef typename ImutProfileInfo::value_type_ref value_type_ref; typedef value_type key_type; typedef value_type_ref key_type_ref; + typedef booldata_type; + typedef booldata_type_ref; static inline key_type_ref KeyOfValue(value_type_ref D) { return D; } + static inline data_type_ref DataOfValue(value_type_ref) { return true; } static inline bool isEqual(key_type_ref LHS, key_type_ref RHS) { return std::equal_to()(LHS,RHS); @@ -783,6 +790,8 @@ static inline bool isLess(key_type_ref LHS, key_type_ref RHS) { return std::less()(LHS,RHS); } + + static inline bool isDataEqual(data_type_ref,data_type_ref) { return true; } }; /// ImutContainerInfo - Specialization for pointer values to treat pointers @@ -794,8 +803,11 @@ typedef typename ImutProfileInfo::value_type_ref value_type_ref; typedef value_type key_type; typedef value_type_ref key_type_ref; + typedef booldata_type; + typedef booldata_type_ref; static inline key_type_ref KeyOfValue(value_type_ref D) { return D; } + static inline data_type_ref DataOfValue(value_type_ref) { return true; } static inline bool isEqual(key_type_ref LHS, key_type_ref RHS) { return LHS == RHS; @@ -804,6 +816,8 @@ static inline bool isLess(key_type_ref LHS, key_type_ref RHS) { return LHS < RHS; } + + static inline bool isDataEqual(data_type_ref,data_type_ref) { return true; } }; //===--===// ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-www/pubs/2007-SOSP-SVA.html index.html
Changes in directory llvm-www/pubs: 2007-SOSP-SVA.html updated: 1.1 -> 1.2 index.html updated: 1.59 -> 1.60 --- Log message: Added our SOSP Audience Choice Award. --- Diffs of the changes: (+3 -1) 2007-SOSP-SVA.html |2 ++ index.html |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) Index: llvm-www/pubs/2007-SOSP-SVA.html diff -u llvm-www/pubs/2007-SOSP-SVA.html:1.1 llvm-www/pubs/2007-SOSP-SVA.html:1.2 --- llvm-www/pubs/2007-SOSP-SVA.html:1.1Mon Sep 24 10:36:54 2007 +++ llvm-www/pubs/2007-SOSP-SVA.htmlThu Jan 17 11:17:45 2008 @@ -51,6 +51,8 @@ prevent the fifth one simply by compiling an additional kernel library. +Awarded an SOSP 2007 Audience Choice Award + Download: Paper: Index: llvm-www/pubs/index.html diff -u llvm-www/pubs/index.html:1.59 llvm-www/pubs/index.html:1.60 --- llvm-www/pubs/index.html:1.59 Mon Sep 24 10:50:20 2007 +++ llvm-www/pubs/index.htmlThu Jan 17 11:17:45 2008 @@ -8,7 +8,7 @@ Operating SystemsJohn Criswell, Andrew Lenharth, Dinakar Dhurjati, and Vikram Adve -Proceedings of the Twenty First ACM Symposium on Operating Systems Principles (SOSP '07), Stevenson, WA, October 2007. +Proceedings of the Twenty First ACM Symposium on Operating Systems Principles (SOSP '07), Stevenson, WA, October 2007.Received an SOSP 2007 Audience Choice Award. "Transactifying Applications Using an Open Compiler Framework"Pascal Felber, Christof Fetzer, ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-www/pubs/index.html
Changes in directory llvm-www/pubs: index.html updated: 1.60 -> 1.61 --- Log message: Added a line break before the SOSP award note. --- Diffs of the changes: (+4 -1) index.html |5 - 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm-www/pubs/index.html diff -u llvm-www/pubs/index.html:1.60 llvm-www/pubs/index.html:1.61 --- llvm-www/pubs/index.html:1.60 Thu Jan 17 11:17:45 2008 +++ llvm-www/pubs/index.htmlThu Jan 17 11:18:48 2008 @@ -8,7 +8,10 @@ Operating SystemsJohn Criswell, Andrew Lenharth, Dinakar Dhurjati, and Vikram Adve -Proceedings of the Twenty First ACM Symposium on Operating Systems Principles (SOSP '07), Stevenson, WA, October 2007.Received an SOSP 2007 Audience Choice Award. +Proceedings of the Twenty First ACM Symposium on Operating Systems Principles (SOSP '07), Stevenson, WA, October 2007. + +Received an SOSP 2007 Audience Choice Award. + "Transactifying Applications Using an Open Compiler Framework"Pascal Felber, Christof Fetzer, ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r46139 - /llvm/trunk/test/CodeGen/Generic/storetrunc-fp.ll
Author: lattner Date: Thu Jan 17 13:47:23 2008 New Revision: 46139 URL: http://llvm.org/viewvc/llvm-project?rev=46139&view=rev Log: new testcase. Added: llvm/trunk/test/CodeGen/Generic/storetrunc-fp.ll Added: llvm/trunk/test/CodeGen/Generic/storetrunc-fp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/storetrunc-fp.ll?rev=46139&view=auto == --- llvm/trunk/test/CodeGen/Generic/storetrunc-fp.ll (added) +++ llvm/trunk/test/CodeGen/Generic/storetrunc-fp.ll Thu Jan 17 13:47:23 2008 @@ -0,0 +1,8 @@ +; RUN: llvm-as < %s | llc + +define void @foo(double %a, double %b, float* %fp) { + %c = add double %a, %b + %d = fptrunc double %c to float + store float %d, float* %fp + ret void +} ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r46142 - in /llvm/trunk: lib/Target/CellSPU/SPUISelDAGToDAG.cpp lib/Target/CellSPU/SPUISelLowering.cpp lib/Target/CellSPU/SPUInstrInfo.td lib/Target/CellSPU/SPUNodes.td test/Code
Author: pingbak Date: Thu Jan 17 14:38:41 2008 New Revision: 46142 URL: http://llvm.org/viewvc/llvm-project?rev=46142&view=rev Log: Forward progress: crtbegin.c now compiles successfully! Fixed CellSPU's A-form (local store) address mode, so that all globals, externals, constant pool and jump table symbols are now wrapped within a SPUISD::AFormAddr pseudo-instruction. This now identifies all local store memory addresses, although it requires a bit of legerdemain during instruction selection to properly select loads to and stores from local store, properly generating "LQA" instructions. Also added mul_ops.ll test harness for exercising integer multiplication. Added: llvm/trunk/test/CodeGen/CellSPU/mul_ops.ll Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp llvm/trunk/lib/Target/CellSPU/SPUInstrInfo.td llvm/trunk/lib/Target/CellSPU/SPUNodes.td llvm/trunk/test/CodeGen/CellSPU/call_indirect.ll llvm/trunk/test/CodeGen/CellSPU/struct_1.ll Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp?rev=46142&r1=46141&r2=46142&view=diff == --- llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Thu Jan 17 14:38:41 2008 @@ -159,16 +159,38 @@ int prefslot_byte; /// Byte offset of the "preferred" slot unsigned brcc_eq_ins; /// br_cc equal instruction unsigned brcc_neq_ins; /// br_cc not equal instruction +unsigned load_aform;/// A-form load instruction for this VT +unsigned store_aform; /// A-form store instruction for this VT }; const valtype_map_s valtype_map[] = { -{ MVT::i1, 0,3, 0, 0 }, -{ MVT::i8, 0,3, 0, 0 }, -{ MVT::i16, SPU::ORHIr16, 2, SPU::BRHZ, SPU::BRHNZ }, -{ MVT::i32, SPU::ORIr32, 0, SPU::BRZ, SPU::BRNZ }, -{ MVT::i64, SPU::ORIr64, 0, 0, 0 }, -{ MVT::f32, 0,0, 0, 0 }, -{ MVT::f64, 0,0, 0, 0 } +{ MVT::i1,0,3, 0, 0, 0, + 0 }, +{ MVT::i8,SPU::ORBIr8, 3, 0, 0, SPU::LQAr8, + SPU::STQAr8 }, +{ MVT::i16, SPU::ORHIr16, 2, SPU::BRHZ, SPU::BRHNZ, SPU::LQAr16, + SPU::STQAr16 }, +{ MVT::i32, SPU::ORIr32, 0, SPU::BRZ, SPU::BRNZ, SPU::LQAr32, + SPU::STQAr32 }, +{ MVT::i64, SPU::ORIr64, 0, 0, 0, SPU::LQAr64, + SPU::STQAr64 }, +{ MVT::f32, 0,0, 0, 0, SPU::LQAf32, + SPU::STQAf32 }, +{ MVT::f64, 0,0, 0, 0, SPU::LQAf64, + SPU::STQAf64 }, +// vector types... (sigh!) +{ MVT::v16i8, 0,0, 0, 0, SPU::LQAv16i8, + SPU::STQAv16i8 }, +{ MVT::v8i16, 0,0, 0, 0, SPU::LQAv8i16, + SPU::STQAv8i16 }, +{ MVT::v4i32, 0,0, 0, 0, SPU::LQAv4i32, + SPU::STQAv4i32 }, +{ MVT::v2i64, 0,0, 0, 0, SPU::LQAv2i64, + SPU::STQAv2i64 }, +{ MVT::v4f32, 0,0, 0, 0, SPU::LQAv4f32, + SPU::STQAv4f32 }, +{ MVT::v2f64, 0,0, 0, 0, SPU::LQAv2f64, + SPU::STQAv2f64 }, }; const size_t n_valtype_map = sizeof(valtype_map) / sizeof(valtype_map[0]); @@ -465,14 +487,6 @@ int32_t offset = (int32_t) CN->getSignExtended(); unsigned Opc0 = Op0.getOpcode(); - if ((offset & 0xf) != 0) { -// Unaligned offset: punt and let X-form address handle it. -// NOTE: This really doesn't have to be strictly 16-byte aligned, -// since the load/store quadword instructions will implicitly -// zero the lower 4 bits of the resulting address. -return false; - } - if (Opc0 == ISD::FrameIndex) { FrameIndexSDNode *FI = dyn_cast(Op0); DEBUG(cerr << "SelectDFormAddr: ISD::ADD offset = " << offset @@ -506,7 +520,8 @@ const SDOperand Op0 = N.getOperand(0); // Frame index/base const SDOperand Op1 = N.getOperand(1); // Offset within base -if (Op0.getOpcode() != SPUISD::XFormAddr) { +if (Op0.getOpcode() == ISD::Constant +|| Op0.getOpcode() == ISD::TargetConstant) { ConstantSDNode *CN = cast(Op1); assert(CN != 0 && "SelectDFormAddr/SPUISD::DFormAddr expecting constant"); Base = CurDAG->getTargetConstant(CN->getValue(), PtrTy); @@ -523,6 +538,11 @@ Index = CurDAG->getTargetFrameIndex(FI->getIndex(), PtrTy); return true; } + } else if (Opc == SPUISD::LDRESULT) { +// It's a load result dereference +Base = CurDAG->getTargetConstant(0, PtrTy); +Index = N.getOperand(0); +return true; } retur
[llvm-commits] [llvm] r46140 - in /llvm/trunk: include/llvm/Target/ lib/CodeGen/SelectionDAG/ lib/Target/ lib/Target/ARM/ lib/Target/Alpha/ lib/Target/CellSPU/ lib/Target/Mips/ lib/Target/PowerPC/ lib
Author: lattner Date: Thu Jan 17 13:59:44 2008 New Revision: 46140 URL: http://llvm.org/viewvc/llvm-project?rev=46140&view=rev Log: This commit changes: 1. Legalize now always promotes truncstore of i1 to i8. 2. Remove patterns and gunk related to truncstore i1 from targets. 3. Rename the StoreXAction stuff to TruncStoreAction in TLI. 4. Make the TLI TruncStoreAction table a 2d table to handle from/to conversions. 5. Mark a wide variety of invalid truncstores as such in various targets, e.g. X86 currently doesn't support truncstore of any of its integer types. 6. Add legalize support for truncstores with invalid value input types. 7. Add a dag combine transform to turn store(truncate) into truncstore when safe. The later allows us to compile CodeGen/X86/storetrunc-fp.ll to: _foo: fldt20(%esp) fldt4(%esp) faddp %st(1) movl36(%esp), %eax fstps (%eax) ret instead of: _foo: subl$4, %esp fldt24(%esp) fldt8(%esp) faddp %st(1) fstps (%esp) movl40(%esp), %eax movss (%esp), %xmm0 movss %xmm0, (%eax) addl$4, %esp ret Added: llvm/trunk/test/CodeGen/X86/storetrunc-fp.ll Modified: llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/ARM/ARMInstrInfo.td llvm/trunk/lib/Target/ARM/ARMInstrThumb.td llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp llvm/trunk/lib/Target/Mips/MipsInstrInfo.td llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp llvm/trunk/lib/Target/Sparc/SparcInstrInfo.td llvm/trunk/lib/Target/TargetSelectionDAG.td llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86InstrInfo.td Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=46140&r1=46139&r2=46140&view=diff == --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Thu Jan 17 13:59:44 2008 @@ -301,19 +301,22 @@ getLoadXAction(LType, VT) == Custom; } - /// getStoreXAction - Return how this store with truncation should be treated: - /// either it is legal, needs to be promoted to a larger size, needs to be - /// expanded to some other code sequence, or the target has a custom expander - /// for it. - LegalizeAction getStoreXAction(MVT::ValueType VT) const { -if (MVT::isExtendedVT(VT)) return getTypeAction(VT); -return (LegalizeAction)((StoreXActions >> (2*VT)) & 3); + /// getTruncStoreAction - Return how this store with truncation should be + /// treated: either it is legal, needs to be promoted to a larger size, needs + /// to be expanded to some other code sequence, or the target has a custom + /// expander for it. + LegalizeAction getTruncStoreAction(MVT::ValueType ValVT, + MVT::ValueType MemVT) const { +assert(ValVT < MVT::LAST_VALUETYPE && MemVT < 32 && + "Table isn't big enough!"); +return (LegalizeAction)((TruncStoreActions[ValVT] >> (2*MemVT)) & 3); } - /// isStoreXLegal - Return true if the specified store with truncation is + /// isTruncStoreLegal - Return true if the specified store with truncation is /// legal on this target. - bool isStoreXLegal(MVT::ValueType VT) const { -return getStoreXAction(VT) == Legal || getStoreXAction(VT) == Custom; + bool isTruncStoreLegal(MVT::ValueType ValVT, MVT::ValueType MemVT) const { +return getTruncStoreAction(ValVT, MemVT) == Legal || + getTruncStoreAction(ValVT, MemVT) == Custom; } /// getIndexedLoadAction - Return how the indexed load should be treated: @@ -760,12 +763,14 @@ LoadXActions[ExtType] |= (uint64_t)Action << VT*2; } - /// setStoreXAction - Indicate that the specified store with truncation does + /// setTruncStoreAction - Indicate that the specified truncating store does /// not work with the with specified type and indicate what to do about it. - void setStoreXAction(MVT::ValueType VT, LegalizeAction Action) { -assert(VT < 32 && "Table isn't big enough!"); -StoreXActions &= ~(uint64_t(3UL) << VT*2); -StoreXActions |= (uint64_t)Action << VT*2; + void setTruncStoreAction(MVT::ValueType ValVT, MVT::ValueType MemVT, + LegalizeAction Action) { +assert(ValVT < MVT::LAST_VALUETYPE && MemVT < 32 && + "Table isn't big enough!"); +TruncStoreActions[ValVT] &= ~(uint64_t(3UL) << Mem
Re: [llvm-commits] [llvm] r46142 - in /llvm/trunk: lib/Target/CellSPU/SPUISelDAGToDAG.cpp lib/Target/CellSPU/SPUISelLowering.cpp lib/Target/CellSPU/SPUInstrInfo.td lib/Target/CellSPU/SPUNodes.td test/
You don't need the && on the end of each line for the test case. -Tanya On Jan 17, 2008, at 12:38 PM, Scott Michel wrote: > Author: pingbak > Date: Thu Jan 17 14:38:41 2008 > New Revision: 46142 > > URL: http://llvm.org/viewvc/llvm-project?rev=46142&view=rev > Log: > Forward progress: crtbegin.c now compiles successfully! > > Fixed CellSPU's A-form (local store) address mode, so that all > globals, > externals, constant pool and jump table symbols are now wrapped within > a SPUISD::AFormAddr pseudo-instruction. This now identifies all local > store memory addresses, although it requires a bit of legerdemain > during > instruction selection to properly select loads to and stores from > local > store, properly generating "LQA" instructions. > > Also added mul_ops.ll test harness for exercising integer > multiplication. > > Added: > llvm/trunk/test/CodeGen/CellSPU/mul_ops.ll > Modified: > llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp > llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp > llvm/trunk/lib/Target/CellSPU/SPUInstrInfo.td > llvm/trunk/lib/Target/CellSPU/SPUNodes.td > llvm/trunk/test/CodeGen/CellSPU/call_indirect.ll > llvm/trunk/test/CodeGen/CellSPU/struct_1.ll > > Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ > CellSPU/SPUISelDAGToDAG.cpp?rev=46142&r1=46141&r2=46142&view=diff > > == > > --- llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp (original) > +++ llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Thu Jan 17 > 14:38:41 2008 > @@ -159,16 +159,38 @@ > int prefslot_byte; /// Byte offset of the "preferred" slot > unsigned brcc_eq_ins;/// br_cc equal instruction > unsigned brcc_neq_ins; /// br_cc not equal instruction > +unsigned load_aform;/// A-form load instruction for > this VT > +unsigned store_aform; /// A-form store instruction for > this VT >}; > >const valtype_map_s valtype_map[] = { > -{ MVT::i1, 0,3, 0, 0 }, > -{ MVT::i8, 0,3, 0, 0 }, > -{ MVT::i16, SPU::ORHIr16, 2, SPU::BRHZ, SPU::BRHNZ }, > -{ MVT::i32, SPU::ORIr32, 0, SPU::BRZ, SPU::BRNZ }, > -{ MVT::i64, SPU::ORIr64, 0, 0, 0 }, > -{ MVT::f32, 0,0, 0, 0 }, > -{ MVT::f64, 0,0, 0, 0 } > +{ MVT::i1,0,3, 0, 0, 0, > + 0 }, > +{ MVT::i8,SPU::ORBIr8, 3, 0, 0, SPU::LQAr8, > + SPU::STQAr8 }, > +{ MVT::i16, SPU::ORHIr16, 2, SPU::BRHZ, SPU::BRHNZ, > SPU::LQAr16, > + SPU::STQAr16 }, > +{ MVT::i32, SPU::ORIr32, 0, SPU::BRZ, SPU::BRNZ, > SPU::LQAr32, > + SPU::STQAr32 }, > +{ MVT::i64, SPU::ORIr64, 0, 0, 0, > SPU::LQAr64, > + SPU::STQAr64 }, > +{ MVT::f32, 0,0, 0, 0, > SPU::LQAf32, > + SPU::STQAf32 }, > +{ MVT::f64, 0,0, 0, 0, > SPU::LQAf64, > + SPU::STQAf64 }, > +// vector types... (sigh!) > +{ MVT::v16i8, 0,0, 0, 0, > SPU::LQAv16i8, > + SPU::STQAv16i8 }, > +{ MVT::v8i16, 0,0, 0, 0, > SPU::LQAv8i16, > + SPU::STQAv8i16 }, > +{ MVT::v4i32, 0,0, 0, 0, > SPU::LQAv4i32, > + SPU::STQAv4i32 }, > +{ MVT::v2i64, 0,0, 0, 0, > SPU::LQAv2i64, > + SPU::STQAv2i64 }, > +{ MVT::v4f32, 0,0, 0, 0, > SPU::LQAv4f32, > + SPU::STQAv4f32 }, > +{ MVT::v2f64, 0,0, 0, 0, > SPU::LQAv2f64, > + SPU::STQAv2f64 }, >}; > >const size_t n_valtype_map = sizeof(valtype_map) / sizeof > (valtype_map[0]); > @@ -465,14 +487,6 @@ >int32_t offset = (int32_t) CN->getSignExtended(); >unsigned Opc0 = Op0.getOpcode(); > > - if ((offset & 0xf) != 0) { > -// Unaligned offset: punt and let X-form address handle it. > -// NOTE: This really doesn't have to be strictly 16-byte > aligned, > -// since the load/store quadword instructions will implicitly > -// zero the lower 4 bits of the resulting address. > -return false; > - } > - >if (Opc0 == ISD::FrameIndex) { > FrameIndexSDNode *FI = dyn_cast(Op0); > DEBUG(cerr << "SelectDFormAddr: ISD::ADD offset = " << offset > @@ -506,7 +520,8 @@ > const SDOperand Op0 = N.getOperand(0); // Frame index/base > const SDOperand Op1 = N.getOperand(1); // Offset within base > > -if (Op0.getOpcode() != SPUISD::XFormAddr) { > +if (Op0.getOpcode() == ISD::Constant > +|| Op0.getOpcode() == ISD::TargetConstant) { >ConstantSDNode *CN = cast(Op1); >assert(CN != 0 && "SelectDFormAddr/SPUISD:
Re: [llvm-commits] [llvm] r46144 - in /llvm/trunk/lib/Target: PowerPC/PPCAsmPrinter.cpp X86/X86AsmPrinter.cpp
Please revert the ARM changes as well. I am assuming the bug is there as well. :-) Evan On Jan 17, 2008, at 3:04 PM, Dale Johannesen wrote: > Author: johannes > Date: Thu Jan 17 17:04:07 2008 > New Revision: 46144 > > URL: http://llvm.org/viewvc/llvm-project?rev=46144&view=rev > Log: > Revert the part of 45848 that treated weak globals > as weak globals rather than commons. While not wrong, > this change tickled a latent bug in Darwin's strip, > so revert it for now as a workaround. > > > Modified: >llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp >llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp > > Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp > URL: > http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp?rev=46144&r1=46143&r2=46144&view=diff > > = > = > = > = > = > = > = > = > == > --- llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp (original) > +++ llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp Thu Jan 17 > 17:04:07 2008 > @@ -917,7 +917,8 @@ > > if (C->isNullValue() && /* FIXME: Verify correct */ > !I->hasSection() && > -(I->hasInternalLinkage() || I->hasExternalLinkage())) { > +(I->hasInternalLinkage() || I->hasWeakLinkage() || > + I->hasLinkOnceLinkage() || I->hasExternalLinkage())) { > if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid > it. > if (I->hasExternalLinkage()) { > O << "\t.globl " << name << '\n'; > > Modified: llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp > URL: > http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp?rev=46144&r1=46143&r2=46144&view=diff > > = > = > = > = > = > = > = > = > == > --- llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp (original) > +++ llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp Thu Jan 17 17:04:07 > 2008 > @@ -181,9 +181,8 @@ > } > > if (!I->isThreadLocal() && > - (I->hasInternalLinkage() || > - (!Subtarget->isTargetDarwin() && > -(I->hasWeakLinkage() || I->hasLinkOnceLinkage() { > + (I->hasInternalLinkage() || I->hasWeakLinkage() || > + I->hasLinkOnceLinkage())) { > if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, > avoid it. > if (!NoZerosInBSS && TAI->getBSSSection()) > SwitchToDataSection(TAI->getBSSSection(), I); > > > ___ > llvm-commits mailing list > llvm-commits@cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm-gcc-4.2] r46145 - in /llvm-gcc-4.2/trunk/gcc/config/arm: arm.c arm.h bpabi.h
Author: laurov Date: Thu Jan 17 17:05:21 2008 New Revision: 46145 URL: http://llvm.org/viewvc/llvm-project?rev=46145&view=rev Log: Fix the build for arm-linux-gnueabi. Modified: llvm-gcc-4.2/trunk/gcc/config/arm/arm.c llvm-gcc-4.2/trunk/gcc/config/arm/arm.h llvm-gcc-4.2/trunk/gcc/config/arm/bpabi.h Modified: llvm-gcc-4.2/trunk/gcc/config/arm/arm.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/arm.c?rev=46145&r1=46144&r2=46145&view=diff == --- llvm-gcc-4.2/trunk/gcc/config/arm/arm.c (original) +++ llvm-gcc-4.2/trunk/gcc/config/arm/arm.c Thu Jan 17 17:05:21 2008 @@ -15165,13 +15165,14 @@ const char *function_name; /* Darwin/mach-o: use a stub for dynamic references. */ - if (TARGET_MACHO - && (flag_pic || MACHO_DYNAMIC_NO_PIC_P) +#if TARGET_MACHO + if ((flag_pic || MACHO_DYNAMIC_NO_PIC_P) && ! machopic_data_defined_p (function_rtx)) function_name = machopic_indirection_name (function_rtx, true); - else -function_name = XSTR (function_rtx, 0); +#else + function_name = XSTR (function_rtx, 0); +#endif /* APPLE LOCAL ARM end 4745175 */ if (mi_delta < 0) Modified: llvm-gcc-4.2/trunk/gcc/config/arm/arm.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/arm.h?rev=46145&r1=46144&r2=46145&view=diff == --- llvm-gcc-4.2/trunk/gcc/config/arm/arm.h (original) +++ llvm-gcc-4.2/trunk/gcc/config/arm/arm.h Thu Jan 17 17:05:21 2008 @@ -31,6 +31,9 @@ #ifndef TARGET_MACHO #define TARGET_MACHO 0 #endif +#ifndef MACHO_DYNAMIC_NO_PIC_P +#define MACHO_DYNAMIC_NO_PIC_P 0 +#endif /* APPLE LOCAL end ARM darwin target */ /* APPLE LOCAL ARM interworking */ @@ -1830,9 +1833,15 @@ #define SHORT_CALL_FLAG_CHAR '^' #define LONG_CALL_FLAG_CHAR'#' +#define ENCODED_SHORT_CALL_ATTR_P(SYMBOL_NAME) \ + (*(SYMBOL_NAME) == SHORT_CALL_FLAG_CHAR) + #define SYMBOL_SHORT_CALL_ATTR_P(SYMBOL) \ (SYMBOL_REF_FLAGS (SYMBOL) & SYMBOL_SHORT_CALL) +#define ENCODED_LONG_CALL_ATTR_P(SYMBOL_NAME) \ + (*(SYMBOL_NAME) == LONG_CALL_FLAG_CHAR) + #define SYMBOL_LONG_CALL_ATTR_P(SYMBOL) \ (SYMBOL_REF_FLAGS (SYMBOL) & SYMBOL_LONG_CALL) Modified: llvm-gcc-4.2/trunk/gcc/config/arm/bpabi.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/bpabi.h?rev=46145&r1=46144&r2=46145&view=diff == --- llvm-gcc-4.2/trunk/gcc/config/arm/bpabi.h (original) +++ llvm-gcc-4.2/trunk/gcc/config/arm/bpabi.h Thu Jan 17 17:05:21 2008 @@ -35,7 +35,9 @@ /* EABI targets should enable interworking by default. */ #undef TARGET_DEFAULT -#define TARGET_DEFAULT MASK_INTERWORK +/* LLVM Local begin */ +#define TARGET_DEFAULT (0) +/* LLVM Local end */ /* The ARM BPABI functions return a boolean; they use no special calling convention. */ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r46147 - /llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
Author: johannes Date: Thu Jan 17 17:36:04 2008 New Revision: 46147 URL: http://llvm.org/viewvc/llvm-project?rev=46147&view=rev Log: Revert the part of 45849 that treated weak globals as weak globals rather than commons. While not wrong, this change tickled a latent bug in Darwin's strip, so revert it for now as a workaround. Modified: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp Modified: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp?rev=46147&r1=46146&r2=46147&view=diff == --- llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp Thu Jan 17 17:36:04 2008 @@ -845,9 +845,8 @@ } } - if (I->hasInternalLinkage() || - (!Subtarget->isTargetDarwin() && -(I->hasWeakLinkage() || I->hasLinkOnceLinkage( { + if (I->hasInternalLinkage() || I->hasWeakLinkage() || + I->hasLinkOnceLinkage()) { if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it. if (!NoZerosInBSS && TAI->getBSSSection()) SwitchToDataSection(TAI->getBSSSection(), I); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm-gcc-4.2] r46146 - /llvm-gcc-4.2/trunk/gcc/config/arm/arm.c
Author: laurov Date: Thu Jan 17 17:31:38 2008 New Revision: 46146 URL: http://llvm.org/viewvc/llvm-project?rev=46146&view=rev Log: Fix my previous patch. It changed the behavior on TARGET_MACHO. Modified: llvm-gcc-4.2/trunk/gcc/config/arm/arm.c Modified: llvm-gcc-4.2/trunk/gcc/config/arm/arm.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/arm.c?rev=46146&r1=46145&r2=46146&view=diff == --- llvm-gcc-4.2/trunk/gcc/config/arm/arm.c (original) +++ llvm-gcc-4.2/trunk/gcc/config/arm/arm.c Thu Jan 17 17:31:38 2008 @@ -15167,9 +15167,11 @@ /* Darwin/mach-o: use a stub for dynamic references. */ #if TARGET_MACHO if ((flag_pic || MACHO_DYNAMIC_NO_PIC_P) - && ! machopic_data_defined_p (function_rtx)) -function_name = - machopic_indirection_name (function_rtx, true); + && ! machopic_data_defined_p (function_rtx)) + function_name = + machopic_indirection_name (function_rtx, true); + else + function_name = XSTR (function_rtx, 0); #else function_name = XSTR (function_rtx, 0); #endif ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r46144 - in /llvm/trunk/lib/Target: PowerPC/PPCAsmPrinter.cpp X86/X86AsmPrinter.cpp
Author: johannes Date: Thu Jan 17 17:04:07 2008 New Revision: 46144 URL: http://llvm.org/viewvc/llvm-project?rev=46144&view=rev Log: Revert the part of 45848 that treated weak globals as weak globals rather than commons. While not wrong, this change tickled a latent bug in Darwin's strip, so revert it for now as a workaround. Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp?rev=46144&r1=46143&r2=46144&view=diff == --- llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp Thu Jan 17 17:04:07 2008 @@ -917,7 +917,8 @@ if (C->isNullValue() && /* FIXME: Verify correct */ !I->hasSection() && -(I->hasInternalLinkage() || I->hasExternalLinkage())) { +(I->hasInternalLinkage() || I->hasWeakLinkage() || + I->hasLinkOnceLinkage() || I->hasExternalLinkage())) { if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it. if (I->hasExternalLinkage()) { O << "\t.globl " << name << '\n'; Modified: llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp?rev=46144&r1=46143&r2=46144&view=diff == --- llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp Thu Jan 17 17:04:07 2008 @@ -181,9 +181,8 @@ } if (!I->isThreadLocal() && - (I->hasInternalLinkage() || - (!Subtarget->isTargetDarwin() && -(I->hasWeakLinkage() || I->hasLinkOnceLinkage() { + (I->hasInternalLinkage() || I->hasWeakLinkage() || + I->hasLinkOnceLinkage())) { if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it. if (!NoZerosInBSS && TAI->getBSSSection()) SwitchToDataSection(TAI->getBSSSection(), I); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r46148 - /llvm/tags/Apple/llvmCore-2009/
Author: void Date: Thu Jan 17 18:28:22 2008 New Revision: 46148 URL: http://llvm.org/viewvc/llvm-project?rev=46148&view=rev Log: Creating llvmCore-2009 branch Added: llvm/tags/Apple/llvmCore-2009/ - copied from r46147, llvm/trunk/ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm-gcc-4.2] r46149 - /llvm-gcc-4.2/tags/Apple/llvmgcc42-2010/
Author: void Date: Thu Jan 17 18:30:41 2008 New Revision: 46149 URL: http://llvm.org/viewvc/llvm-project?rev=46149&view=rev Log: Creating llvmgcc42-2010 branch Added: llvm-gcc-4.2/tags/Apple/llvmgcc42-2010/ - copied from r46148, llvm-gcc-4.2/trunk/ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r46150 - /llvm/trunk/include/llvm/ADT/ImmutableMap.h
Author: kremenek Date: Thu Jan 17 18:38:04 2008 New Revision: 46150 URL: http://llvm.org/viewvc/llvm-project?rev=46150&view=rev Log: Reverted implementation of ImmutableMap::find() to return a TreeTy* instead of an iterator, since the implementation returned an iterator that pointed to a different node! Renamed this implementation to SlimFind() so that users do not expect it to return an iterator (it is a more efficient implementation than returning an iterator if the user just wants to find the value of a key). Added a FIXME to implement ImmutableMap::find() that returns an iterator. Modified: llvm/trunk/include/llvm/ADT/ImmutableMap.h Modified: llvm/trunk/include/llvm/ADT/ImmutableMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableMap.h?rev=46150&r1=46149&r2=46150&view=diff == --- llvm/trunk/include/llvm/ADT/ImmutableMap.h (original) +++ llvm/trunk/include/llvm/ADT/ImmutableMap.h Thu Jan 17 18:38:04 2008 @@ -188,15 +188,17 @@ iterator begin() const { return iterator(Root); } iterator end() const { return iterator(); } - iterator find(key_type_ref K) const { + TreeTy* SlimFind(key_type_ref K) const { if (Root) { TreeTy* T = Root->find(K); - if (T) return iterator(T); + if (T) return T; } -return iterator(); +return NULL; } + // FIXME: Add 'find' that returns an iterator instead of a TreeTy*. + //===--===// // Utility methods. //===--===// ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm-gcc-4.2] r46156 - /llvm-gcc-4.2/trunk/gcc/config/i386/i386.c
Author: evancheng Date: Thu Jan 17 19:46:11 2008 New Revision: 46156 URL: http://llvm.org/viewvc/llvm-project?rev=46156&view=rev Log: Manually initializing TYPE_MODE of vector types. Modified: llvm-gcc-4.2/trunk/gcc/config/i386/i386.c Modified: llvm-gcc-4.2/trunk/gcc/config/i386/i386.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/i386.c?rev=46156&r1=46155&r2=46156&view=diff == --- llvm-gcc-4.2/trunk/gcc/config/i386/i386.c (original) +++ llvm-gcc-4.2/trunk/gcc/config/i386/i386.c Thu Jan 17 19:46:11 2008 @@ -15553,6 +15553,26 @@ tree V8HI_type_node = build_vector_type_for_mode (intHI_type_node, V8HImode); tree V1DI_type_node = build_vector_type_for_mode (long_long_integer_type_node, V1DImode); + /* APPLE LOCAL begin LLVM */ +#ifdef ENABLE_LLVM + /* LLVM doesn't initialize the RTL backend, so build_vector_type will assign +all of these types BLKmode. This interferes with i386.c-specific +argument passing routines. As such, give them the correct modes here +manually. */ + TYPE_MODE (V16QI_type_node) = V16QImode; + TYPE_MODE (V2SI_type_node) = V2SImode; + TYPE_MODE (V2SF_type_node) = V2SFmode; + TYPE_MODE (V2DI_type_node) = V2DImode; + TYPE_MODE (V2DF_type_node) = V2DFmode; + TYPE_MODE (V4SF_type_node) = V4SFmode; + TYPE_MODE (V4SI_type_node) = V4SImode; + TYPE_MODE (V4HI_type_node) = V4HImode; + TYPE_MODE (V8QI_type_node) = V8QImode; + TYPE_MODE (V8HI_type_node) = V8HImode; + TYPE_MODE (V1DI_type_node) = V1DImode; +#endif + /* APPLE LOCAL end LLVM */ + tree pchar_type_node = build_pointer_type (char_type_node); tree pcchar_type_node = build_pointer_type ( build_type_variant (char_type_node, 1, 0)); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm-gcc-4.2] r46157 - in /llvm-gcc-4.2/trunk/gcc/config/i386: llvm-i386-target.h llvm-i386.cpp
Author: evancheng Date: Thu Jan 17 19:47:03 2008 New Revision: 46157 URL: http://llvm.org/viewvc/llvm-project?rev=46157&view=rev Log: Do not pass zero sized array, struct, or class using byval attribute. This is true on both x86-32 and x86-64. Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h?rev=46157&r1=46156&r2=46157&view=diff == --- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h (original) +++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h Thu Jan 17 19:47:03 2008 @@ -62,10 +62,13 @@ } \ } +extern bool llvm_x86_is_zero_sized_aggregate(tree); extern bool llvm_x86_64_should_pass_aggregate_in_memory(tree); #define LLVM_SHOULD_PASS_AGGREGATE_USING_BYVAL_ATTR(X) \ - (!TARGET_64BIT || llvm_x86_64_should_pass_aggregate_in_memory(X)) + (!llvm_x86_is_zero_sized_aggregate(X) && \ + (!TARGET_64BIT ||\ +llvm_x86_64_should_pass_aggregate_in_memory(X))) /* LLVM LOCAL end (ENTIRE FILE!) */ Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp?rev=46157&r1=46156&r2=46157&view=diff == --- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Thu Jan 17 19:47:03 2008 @@ -664,6 +664,15 @@ extern "C" enum machine_mode ix86_getNaturalModeForType(tree); extern "C" int ix86_HowToPassArgument(enum machine_mode, tree, int, int*, int*); +/* Target hook for llvm-abi.h. It returns true if the specified type is a + zero sized array, struct, or class. */ +bool llvm_x86_is_zero_sized_aggregate(tree type) { + enum machine_mode Mode = ix86_getNaturalModeForType(type); + HOST_WIDE_INT Bytes = +(Mode == BLKmode) ? int_size_in_bytes(type) : (int) GET_MODE_SIZE(Mode); + return Bytes == 0; +} + /* Target hook for llvm-abi.h. It returns true if an aggregate of the specified type should be passed in memory. This is only called for x86-64. */ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm] r46140 - in /llvm/trunk: include/llvm/Target/ lib/CodeGen/SelectionDAG/ lib/Target/ lib/Target/ARM/ lib/Target/Alpha/ lib/Target/CellSPU/ lib/Target/Mips/ lib/Target/PowerPC/
Hi Chris, > + LegalizeAction getTruncStoreAction(MVT::ValueType ValVT, > + MVT::ValueType MemVT) const { > +assert(ValVT < MVT::LAST_VALUETYPE && MemVT < 32 && what is 32? Did you mean <= LAST_INTEGER_VALUETYPE or something? Now I come to notice it, it is bad that you have to use < for LAST_VALUE_TYPE but <= for LAST_INTEGER_VALUETYPE and friends... > + void setTruncStoreAction(MVT::ValueType ValVT, MVT::ValueType MemVT, > + LegalizeAction Action) { > +assert(ValVT < MVT::LAST_VALUETYPE && MemVT < 32 && Again the magic 32. > - /// isStoreXLegal - Return true if the specified store with truncation is > + /// isTruncStoreLegal - Return true if the specified store with truncation > is >/// legal on this target. > - bool isStoreXLegal(MVT::ValueType VT) const { > -return getStoreXAction(VT) == Legal || getStoreXAction(VT) == Custom; > + bool isTruncStoreLegal(MVT::ValueType ValVT, MVT::ValueType MemVT) const { > +return getTruncStoreAction(ValVT, MemVT) == Legal || > + getTruncStoreAction(ValVT, MemVT) == Custom; >} It would be more friendly to have isStoreXLegal return false if VT or MemVT is an extended value type, rather than having it assert in getTruncStoreAction... > + // If this is an FP_ROUND or TRUNC followed by a store, fold this into a > + // truncating store. We can do this even if this is already a truncstore. > + if ((Value.getOpcode() == ISD::FP_ROUND || Value.getOpcode() == > ISD::TRUNCATE) > + && TLI.isTypeLegal(Value.getOperand(0).getValueType()) && > + Value.Val->hasOneUse() && ST->isUnindexed() && > + TLI.isTruncStoreLegal(Value.getOperand(0).getValueType(), > +ST->getStoredVT())) { For example, this will assert if ST->getStoredVT() >= 32, eg an apfloat (!). Also, before legalize this could be done whether all these guys are legal or not I suppose. > + case Expand: > +// Just store the low part. This may become a non-trunc store, so > make > +// sure to use getTruncStore, not UpdateNodeOperands below. > +ExpandOp(ST->getValue(), Tmp3, Tmp4); > +return DAG.getTruncStore(Tmp1, Tmp3, Tmp2, ST->getSrcValue(), > + SVOffset, MVT::i8, isVolatile, Alignment); This may be wrong for apints, since the expanded value type may be smaller than ST->getStoredVT(), eg if you are expanding i64, and ST->getStoredVT() is i40. I can take care of this. Ciao, Duncan. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r46159 - /llvm/trunk/lib/Target/X86/X86ISelLowering.h
Author: lattner Date: Fri Jan 18 00:52:41 2008 New Revision: 46159 URL: http://llvm.org/viewvc/llvm-project?rev=46159&view=rev Log: make a method public Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=46159&r1=46158&r2=46159&view=diff == --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Fri Jan 18 00:52:41 2008 @@ -410,6 +410,13 @@ return static_cast(Subtarget); } +/// isScalarFPTypeInSSEReg - Return true if the specified scalar FP type is +/// computed in an SSE register, not on the X87 floating point stack. +bool isScalarFPTypeInSSEReg(MVT::ValueType VT) const { + return (VT == MVT::f64 && X86ScalarSSEf64) || // f64 is when SSE2 + (VT == MVT::f32 && X86ScalarSSEf32); // f32 is when SSE1 +} + private: /// Subtarget - Keep a pointer to the X86Subtarget around so that we can /// make the right decision when generating code for different targets. @@ -426,13 +433,6 @@ bool X86ScalarSSEf32; bool X86ScalarSSEf64; -/// isScalarFPTypeInSSEReg - Return true if the specified scalar FP type is -/// computed in an SSE register, not on the X87 floating point stack. -bool isScalarFPTypeInSSEReg(MVT::ValueType VT) const { - return (VT == MVT::f64 && X86ScalarSSEf64) || // f64 is when SSE2 - (VT == MVT::f32 && X86ScalarSSEf32); // f32 is when SSE1 -} - SDNode *LowerCallResult(SDOperand Chain, SDOperand InFlag, SDNode*TheCall, unsigned CallingConv, SelectionDAG &DAG); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits