Re: [llvm-commits] llvm-gcc4: use langhooks rather t han front-end calls in i386.c
On Monday 22 January 2007 21:06, Devang Patel wrote: > > On Jan 20, 2007, at 6:43 AM, Duncan Sands wrote: > > > Hi Devang, thanks for reviewing these patches. > > > >> Applied, after adding "APPLE LOCAL llvm" markers. > > > > This hasn't turned up in the llvm-gcc4 svn repository > > yet. Did you apply it there or to some other tree? > > (I'm waiting for it to turn up, so I can see how the > > APPLE markers should be done). > > Do you see this change ? On my side, svn commit succeeded > on 18th and this change should show up in mirror next day. It turned up on the 21st. This is not the first time recently that I've observed the mirror to be several days behind. Best wishes, Duncan. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/ADT/SmallSet.h
Changes in directory llvm/include/llvm/ADT: SmallSet.h updated: 1.2 -> 1.3 --- Log message: fix typo --- Diffs of the changes: (+1 -1) SmallSet.h |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/ADT/SmallSet.h diff -u llvm/include/llvm/ADT/SmallSet.h:1.2 llvm/include/llvm/ADT/SmallSet.h:1.3 --- llvm/include/llvm/ADT/SmallSet.h:1.2Mon Jan 22 19:16:19 2007 +++ llvm/include/llvm/ADT/SmallSet.hMon Jan 22 22:59:58 2007 @@ -57,7 +57,7 @@ /// insert - Insert an element into the set if it isn't already there. std::pair insert(const T &V) { iterator I = find(V); -if (I == end())// Don't reinsert if it already exists. +if (I != end())// Don't reinsert if it already exists. return std::make_pair(I, false); Vector.push_back(V); return std::make_pair(end()-1, true); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-www/ProjectsWithLLVM/index.html
Changes in directory llvm-www/ProjectsWithLLVM: index.html updated: 1.29 -> 1.30 --- Log message: Added LANL's Trident compiler. --- Diffs of the changes: (+27 -0) index.html | 27 +++ 1 files changed, 27 insertions(+) Index: llvm-www/ProjectsWithLLVM/index.html diff -u llvm-www/ProjectsWithLLVM/index.html:1.29 llvm-www/ProjectsWithLLVM/index.html:1.30 --- llvm-www/ProjectsWithLLVM/index.html:1.29 Sat Mar 4 17:48:08 2006 +++ llvm-www/ProjectsWithLLVM/index.htmlMon Jan 22 22:07:36 2007 @@ -35,6 +35,7 @@ +Trident Compiler Ascenium Reconfigurable Processor Compiler The PyPy Python Implementation Project Scheme to LLVM Translator @@ -54,6 +55,32 @@ + Trident Compiler + + + + +By http://www.lanl.gov/";>Los Alamos National Laboratory + + + + +http://trident.sf.net/";>Trident is a compiler for +floating point algorithms written in C, producing Register Transfer +Level VHDL descriptions of circuits targetted for reconfigurable logic +devices. Trident automatically extracts parallelism and pipelines loop +bodies using conventional compiler optimizations and scheduling +techniques. Trident also provides an open framework for +experimentation, analysis, and optimization of floating point +algorithms on FPGAs and the flexibility to easily integrate custom +floating point libraries. + + +Trident uses the LLVM C/C++ front-end to parse input languages and +produce low-level platform independent code. + + + Ascenium Reconfigurable Processor Compiler ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/ADT/SmallSet.h
Changes in directory llvm/include/llvm/ADT: SmallSet.h updated: 1.1 -> 1.2 --- Log message: make the SmallSet interface more std::set-like --- Diffs of the changes: (+13 -6) SmallSet.h | 19 +-- 1 files changed, 13 insertions(+), 6 deletions(-) Index: llvm/include/llvm/ADT/SmallSet.h diff -u llvm/include/llvm/ADT/SmallSet.h:1.1 llvm/include/llvm/ADT/SmallSet.h:1.2 --- llvm/include/llvm/ADT/SmallSet.h:1.1Mon Jan 22 18:59:15 2007 +++ llvm/include/llvm/ADT/SmallSet.hMon Jan 22 19:16:19 2007 @@ -41,19 +41,26 @@ bool empty() const { return Vector.empty(); } unsigned size() const { return Vector.size(); } + iterator find(const T &V) const { +for (iterator I = begin(), E = end(); I != E; ++I) + if (*I == V) +return I; +return end(); + } + /// count - Return true if the element is in the set. unsigned count(const T &V) const { // Since the collection is small, just do a linear search. -for (iterator I = begin(), E = end(); I != E; ++I) - if (*I == V) -return 1; -return 0; +return find(V) != end(); } /// insert - Insert an element into the set if it isn't already there. - void insert(const T &V) { -if (count(V)) return; // Don't reinsert if it already exists. + std::pair insert(const T &V) { +iterator I = find(V); +if (I == end())// Don't reinsert if it already exists. + return std::make_pair(I, false); Vector.push_back(V); +return std::make_pair(end()-1, true); } void erase(const T &V) { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/VirtRegMap.cpp
Changes in directory llvm/lib/CodeGen: VirtRegMap.cpp updated: 1.93 -> 1.94 --- Log message: Switch this to use SmallSet to avoid mallocs in the common case. --- Diffs of the changes: (+3 -3) VirtRegMap.cpp |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/VirtRegMap.cpp diff -u llvm/lib/CodeGen/VirtRegMap.cpp:1.93 llvm/lib/CodeGen/VirtRegMap.cpp:1.94 --- llvm/lib/CodeGen/VirtRegMap.cpp:1.93Fri Jan 19 16:40:14 2007 +++ llvm/lib/CodeGen/VirtRegMap.cpp Mon Jan 22 18:59:48 2007 @@ -29,8 +29,8 @@ #include "llvm/Support/Compiler.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/ADT/SmallSet.h" #include -#include using namespace llvm; STATISTIC(NumSpills, "Number of register spills"); @@ -471,7 +471,7 @@ unsigned GetRegForReload(unsigned PhysReg, MachineInstr *MI, AvailableSpills &Spills, std::map &MaybeDeadStores, - std::set &Rejected) { + SmallSet &Rejected) { if (Reuses.empty()) return PhysReg; // This is most often empty. for (unsigned ro = 0, e = Reuses.size(); ro != e; ++ro) { @@ -553,7 +553,7 @@ unsigned GetRegForReload(unsigned PhysReg, MachineInstr *MI, AvailableSpills &Spills, std::map &MaybeDeadStores) { - std::set Rejected; + SmallSet Rejected; return GetRegForReload(PhysReg, MI, Spills, MaybeDeadStores, Rejected); } }; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/ADT/SmallSet.h
Changes in directory llvm/include/llvm/ADT: SmallSet.h added (r1.1) --- Log message: add a trivial SmallSet class, which operates on a similar principle to SmallVector. --- Diffs of the changes: (+76 -0) SmallSet.h | 76 + 1 files changed, 76 insertions(+) Index: llvm/include/llvm/ADT/SmallSet.h diff -c /dev/null llvm/include/llvm/ADT/SmallSet.h:1.1 *** /dev/null Mon Jan 22 18:59:25 2007 --- llvm/include/llvm/ADT/SmallSet.hMon Jan 22 18:59:15 2007 *** *** 0 --- 1,76 + //===- llvm/ADT/SmallSet.h - 'Normally small' sets --*- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by Chris Lattner and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===--===// + // + // This file defines the SmallSet class. + // + //===--===// + + #ifndef LLVM_ADT_SMALLSET_H + #define LLVM_ADT_SMALLSET_H + + #include "llvm/ADT/SmallVector.h" + + namespace llvm { + + /// SmallSet - This maintains a set of unique values, optimizing for the case + /// when the set is small (less than N). In this case, the set can be + /// maintained with no mallocs. + /// + /// Note that this set does not guarantee that the elements in the set will be + /// ordered. + template + class SmallSet { + SmallVector Vector; + typedef typename SmallVector::iterator mutable_iterator; + public: + SmallSet() {} + + // Support iteration. + typedef typename SmallVector::const_iterator iterator; + typedef typename SmallVector::const_iterator const_iterator; + + iterator begin() const { return Vector.begin(); } + iterator end() const { return Vector.end(); } + + bool empty() const { return Vector.empty(); } + unsigned size() const { return Vector.size(); } + + /// count - Return true if the element is in the set. + unsigned count(const T &V) const { + // Since the collection is small, just do a linear search. + for (iterator I = begin(), E = end(); I != E; ++I) + if (*I == V) + return 1; + return 0; + } + + /// insert - Insert an element into the set if it isn't already there. + void insert(const T &V) { + if (count(V)) return; // Don't reinsert if it already exists. + Vector.push_back(V); + } + + void erase(const T &V) { + for (mutable_iterator I = Vector.begin(), E = Vector.end(); I != E; ++I) + if (*I == V) { + Vector.erase(I); + return; + } + } + + void clear() { + Vector.clear(); + } + + }; + + + } // end namespace llvm + + #endif ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86RegisterInfo.cpp X86RegisterInfo.h X86RegisterInfo.td
Changes in directory llvm/lib/Target/X86: X86RegisterInfo.cpp updated: 1.192 -> 1.193 X86RegisterInfo.h updated: 1.43 -> 1.44 X86RegisterInfo.td updated: 1.39 -> 1.40 --- Log message: hasFP() is now a virtual method of MRegisterInfo. --- Diffs of the changes: (+23 -13) X86RegisterInfo.cpp |4 ++-- X86RegisterInfo.h |2 ++ X86RegisterInfo.td | 30 +++--- 3 files changed, 23 insertions(+), 13 deletions(-) Index: llvm/lib/Target/X86/X86RegisterInfo.cpp diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.192 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.193 --- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.192 Sat Jan 20 04:17:53 2007 +++ llvm/lib/Target/X86/X86RegisterInfo.cpp Mon Jan 22 18:57:47 2007 @@ -891,7 +891,7 @@ // pointer register. This is true if the function has variable sized allocas or // if frame pointer elimination is disabled. // -static bool hasFP(const MachineFunction &MF) { +bool X86RegisterInfo::hasFP(const MachineFunction &MF) const { return (NoFramePointerElim || MF.getFrameInfo()->hasVarSizedObjects() || MF.getInfo()->getForceFramePointer()); @@ -998,7 +998,7 @@ // Get the number of bytes to allocate from the FrameInfo unsigned NumBytes = MFI->getStackSize(); - if (MFI->hasCalls() || MF.getFrameInfo()->hasVarSizedObjects()) { + if (MFI->hasCalls() || MFI->hasVarSizedObjects()) { // When we have no frame pointer, we reserve argument space for call sites // in the function immediately on entry to the current function. This // eliminates the need for add/sub ESP brackets around call sites. Index: llvm/lib/Target/X86/X86RegisterInfo.h diff -u llvm/lib/Target/X86/X86RegisterInfo.h:1.43 llvm/lib/Target/X86/X86RegisterInfo.h:1.44 --- llvm/lib/Target/X86/X86RegisterInfo.h:1.43 Tue Jan 2 15:33:40 2007 +++ llvm/lib/Target/X86/X86RegisterInfo.h Mon Jan 22 18:57:47 2007 @@ -78,6 +78,8 @@ /// length of this list match the getCalleeSavedRegs() list. const TargetRegisterClass* const* getCalleeSavedRegClasses() const; + bool hasFP(const MachineFunction &MF) const; + void eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const; Index: llvm/lib/Target/X86/X86RegisterInfo.td diff -u llvm/lib/Target/X86/X86RegisterInfo.td:1.39 llvm/lib/Target/X86/X86RegisterInfo.td:1.40 --- llvm/lib/Target/X86/X86RegisterInfo.td:1.39 Fri Sep 8 01:48:29 2006 +++ llvm/lib/Target/X86/X86RegisterInfo.td Mon Jan 22 18:57:47 2007 @@ -197,10 +197,11 @@ GR8Class::iterator GR8Class::allocation_order_begin(const MachineFunction &MF) const { const TargetMachine &TM = MF.getTarget(); + const MRegisterInfo *RI = TM.getRegisterInfo(); const X86Subtarget &Subtarget = TM.getSubtarget(); if (!Subtarget.is64Bit()) return X86_GR8_AO_32; - else if (hasFP(MF)) + else if (RI->hasFP(MF)) return X86_GR8_AO_64_fp; else return X86_GR8_AO_64; @@ -209,10 +210,11 @@ GR8Class::iterator GR8Class::allocation_order_end(const MachineFunction &MF) const { const TargetMachine &TM = MF.getTarget(); + const MRegisterInfo *RI = TM.getRegisterInfo(); const X86Subtarget &Subtarget = TM.getSubtarget(); if (!Subtarget.is64Bit()) return X86_GR8_AO_32 + (sizeof(X86_GR8_AO_32) / sizeof(unsigned)); - else if (hasFP(MF)) + else if (RI->hasFP(MF)) return X86_GR8_AO_64_fp + (sizeof(X86_GR8_AO_64_fp) / sizeof(unsigned)); else return X86_GR8_AO_64 + (sizeof(X86_GR8_AO_64) / sizeof(unsigned)); @@ -248,14 +250,15 @@ GR16Class::iterator GR16Class::allocation_order_begin(const MachineFunction &MF) const { const TargetMachine &TM = MF.getTarget(); + const MRegisterInfo *RI = TM.getRegisterInfo(); const X86Subtarget &Subtarget = TM.getSubtarget(); if (Subtarget.is64Bit()) { -if (hasFP(MF)) +if (RI->hasFP(MF)) return X86_GR16_AO_64_fp; else return X86_GR16_AO_64; } else { -if (hasFP(MF)) +if (RI->hasFP(MF)) return X86_GR16_AO_32_fp; else return X86_GR16_AO_32; @@ -265,14 +268,15 @@ GR16Class::iterator GR16Class::allocation_order_end(const MachineFunction &MF) const { const TargetMachine &TM = MF.getTarget(); + const MRegisterInfo *RI = TM.getRegisterInfo(); const X86Subtarget &Subtarget = TM.getSubtarget(); if (Subtarget.is64Bit()) { -if (hasFP(MF)) +if (RI->hasFP(MF)) return X86_GR16_AO_64_fp+(sizeof(X86_GR16_AO_64_fp)/sizeof(unsigned)); else return X86_GR16_AO_64 + (sizeof(X86_GR16_AO_64) / sizeof(unsigned)); } else { -if (hasFP(MF)) +if (RI->hasFP(MF)) return X86_GR16_AO_32_fp+(sizeof(X86_GR16_AO_32_f
[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcRegisterInfo.cpp SparcRegisterInfo.h
Changes in directory llvm/lib/Target/Sparc: SparcRegisterInfo.cpp updated: 1.50 -> 1.51 SparcRegisterInfo.h updated: 1.16 -> 1.17 --- Log message: hasFP() is now a virtual method of MRegisterInfo. --- Diffs of the changes: (+5 -0) SparcRegisterInfo.cpp |3 +++ SparcRegisterInfo.h |2 ++ 2 files changed, 5 insertions(+) Index: llvm/lib/Target/Sparc/SparcRegisterInfo.cpp diff -u llvm/lib/Target/Sparc/SparcRegisterInfo.cpp:1.50 llvm/lib/Target/Sparc/SparcRegisterInfo.cpp:1.51 --- llvm/lib/Target/Sparc/SparcRegisterInfo.cpp:1.50Tue Jan 2 15:33:17 2007 +++ llvm/lib/Target/Sparc/SparcRegisterInfo.cpp Mon Jan 22 18:56:45 2007 @@ -122,6 +122,9 @@ return CalleeSavedRegClasses; } +bool SparcRegisterInfo::hasFP(const MachineFunction &MF) const { + return false; +} void SparcRegisterInfo:: eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, Index: llvm/lib/Target/Sparc/SparcRegisterInfo.h diff -u llvm/lib/Target/Sparc/SparcRegisterInfo.h:1.16 llvm/lib/Target/Sparc/SparcRegisterInfo.h:1.17 --- llvm/lib/Target/Sparc/SparcRegisterInfo.h:1.16 Tue Jan 2 15:33:17 2007 +++ llvm/lib/Target/Sparc/SparcRegisterInfo.h Mon Jan 22 18:56:45 2007 @@ -52,6 +52,8 @@ const TargetRegisterClass* const* getCalleeSavedRegClasses() const; + bool hasFP(const MachineFunction &MF) const; + void eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp PPCRegisterInfo.h
Changes in directory llvm/lib/Target/PowerPC: PPCRegisterInfo.cpp updated: 1.95 -> 1.96 PPCRegisterInfo.h updated: 1.21 -> 1.22 --- Log message: hasFP() is now a virtual method of MRegisterInfo. --- Diffs of the changes: (+3 -1) PPCRegisterInfo.cpp |2 +- PPCRegisterInfo.h |2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.95 llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.96 --- llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.95Tue Jan 2 15:33:01 2007 +++ llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp Mon Jan 22 18:55:21 2007 @@ -410,7 +410,7 @@ // hasFP - Return true if the specified function actually has a dedicated frame // pointer register. This is true if the function needs a frame pointer and has // a non-zero stack size. -static bool hasFP(const MachineFunction &MF) { +bool PPCRegisterInfo::hasFP(const MachineFunction &MF) const { const MachineFrameInfo *MFI = MF.getFrameInfo(); return MFI->getStackSize() && needsFP(MF); } Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.h diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.21 llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.22 --- llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.21 Tue Jan 2 15:33:01 2007 +++ llvm/lib/Target/PowerPC/PPCRegisterInfo.h Mon Jan 22 18:55:21 2007 @@ -58,6 +58,8 @@ const TargetRegisterClass* const* getCalleeSavedRegClasses() const; + bool hasFP(const MachineFunction &MF) const; + void eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/IA64/IA64RegisterInfo.cpp IA64RegisterInfo.h
Changes in directory llvm/lib/Target/IA64: IA64RegisterInfo.cpp updated: 1.26 -> 1.27 IA64RegisterInfo.h updated: 1.10 -> 1.11 --- Log message: hasFP() is now a virtual method of MRegisterInfo. --- Diffs of the changes: (+3 -1) IA64RegisterInfo.cpp |2 +- IA64RegisterInfo.h |2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/Target/IA64/IA64RegisterInfo.cpp diff -u llvm/lib/Target/IA64/IA64RegisterInfo.cpp:1.26 llvm/lib/Target/IA64/IA64RegisterInfo.cpp:1.27 --- llvm/lib/Target/IA64/IA64RegisterInfo.cpp:1.26 Tue Jan 2 15:32:44 2007 +++ llvm/lib/Target/IA64/IA64RegisterInfo.cpp Mon Jan 22 18:53:41 2007 @@ -114,7 +114,7 @@ // pointer register. This is true if the function has variable sized allocas or // if frame pointer elimination is disabled. // -static bool hasFP(const MachineFunction &MF) { +bool IA64RegisterInfo::hasFP(const MachineFunction &MF) const { return NoFramePointerElim || MF.getFrameInfo()->hasVarSizedObjects(); } Index: llvm/lib/Target/IA64/IA64RegisterInfo.h diff -u llvm/lib/Target/IA64/IA64RegisterInfo.h:1.10 llvm/lib/Target/IA64/IA64RegisterInfo.h:1.11 --- llvm/lib/Target/IA64/IA64RegisterInfo.h:1.10Tue Jan 2 15:32:44 2007 +++ llvm/lib/Target/IA64/IA64RegisterInfo.h Mon Jan 22 18:53:41 2007 @@ -48,6 +48,8 @@ const TargetRegisterClass* const* getCalleeSavedRegClasses() const; + bool hasFP(const MachineFunction &MF) const; + void eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp AlphaRegisterInfo.h
Changes in directory llvm/lib/Target/Alpha: AlphaRegisterInfo.cpp updated: 1.55 -> 1.56 AlphaRegisterInfo.h updated: 1.16 -> 1.17 --- Log message: hasFP() is now a virtual method of MRegisterInfo. --- Diffs of the changes: (+3 -1) AlphaRegisterInfo.cpp |2 +- AlphaRegisterInfo.h |2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp diff -u llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.55 llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.56 --- llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.55Tue Jan 2 15:32:26 2007 +++ llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp Mon Jan 22 18:53:13 2007 @@ -186,7 +186,7 @@ // pointer register. This is true if the function has variable sized allocas or // if frame pointer elimination is disabled. // -static bool hasFP(const MachineFunction &MF) { +bool AlphaRegisterInfo::hasFP(const MachineFunction &MF) const { MachineFrameInfo *MFI = MF.getFrameInfo(); return MFI->hasVarSizedObjects(); } Index: llvm/lib/Target/Alpha/AlphaRegisterInfo.h diff -u llvm/lib/Target/Alpha/AlphaRegisterInfo.h:1.16 llvm/lib/Target/Alpha/AlphaRegisterInfo.h:1.17 --- llvm/lib/Target/Alpha/AlphaRegisterInfo.h:1.16 Tue Jan 2 15:32:26 2007 +++ llvm/lib/Target/Alpha/AlphaRegisterInfo.h Mon Jan 22 18:53:13 2007 @@ -49,6 +49,8 @@ const TargetRegisterClass* const* getCalleeSavedRegClasses() const; + bool hasFP(const MachineFunction &MF) const; + void eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/ARM/ARMRegisterInfo.cpp ARMRegisterInfo.h ARMRegisterInfo.td
Changes in directory llvm/lib/Target/ARM: ARMRegisterInfo.cpp updated: 1.38 -> 1.39 ARMRegisterInfo.h updated: 1.5 -> 1.6 ARMRegisterInfo.td updated: 1.8 -> 1.9 --- Log message: hasFP() is now a virtual method of MRegisterInfo. --- Diffs of the changes: (+5 -2) ARMRegisterInfo.cpp |2 +- ARMRegisterInfo.h |2 ++ ARMRegisterInfo.td |3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) Index: llvm/lib/Target/ARM/ARMRegisterInfo.cpp diff -u llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.38 llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.39 --- llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.38Sat Jan 20 04:22:33 2007 +++ llvm/lib/Target/ARM/ARMRegisterInfo.cpp Mon Jan 22 18:52:44 2007 @@ -277,7 +277,7 @@ /// pointer register. This is true if the function has variable sized allocas /// or if frame pointer elimination is disabled. /// -static bool hasFP(const MachineFunction &MF) { +bool ARMRegisterInfo::hasFP(const MachineFunction &MF) const { return NoFramePointerElim || MF.getFrameInfo()->hasVarSizedObjects(); } Index: llvm/lib/Target/ARM/ARMRegisterInfo.h diff -u llvm/lib/Target/ARM/ARMRegisterInfo.h:1.5 llvm/lib/Target/ARM/ARMRegisterInfo.h:1.6 --- llvm/lib/Target/ARM/ARMRegisterInfo.h:1.5 Fri Jan 19 01:51:42 2007 +++ llvm/lib/Target/ARM/ARMRegisterInfo.h Mon Jan 22 18:52:44 2007 @@ -68,6 +68,8 @@ const TargetRegisterClass* const* getCalleeSavedRegClasses() const; + bool hasFP(const MachineFunction &MF) const; + void eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const; Index: llvm/lib/Target/ARM/ARMRegisterInfo.td diff -u llvm/lib/Target/ARM/ARMRegisterInfo.td:1.8 llvm/lib/Target/ARM/ARMRegisterInfo.td:1.9 --- llvm/lib/Target/ARM/ARMRegisterInfo.td:1.8 Fri Jan 19 20:09:25 2007 +++ llvm/lib/Target/ARM/ARMRegisterInfo.td Mon Jan 22 18:52:44 2007 @@ -150,6 +150,7 @@ GPRClass::iterator GPRClass::allocation_order_end(const MachineFunction &MF) const { const TargetMachine &TM = MF.getTarget(); + const MRegisterInfo *RI = TM.getRegisterInfo(); const ARMSubtarget &Subtarget = TM.getSubtarget(); GPRClass::iterator I; if (Subtarget.isThumb()) @@ -167,7 +168,7 @@ } // Mac OS X requires FP not to be clobbered for backtracing purpose. - return (Subtarget.isTargetDarwin() || hasFP(MF)) ? I-1 : I; + return (Subtarget.isTargetDarwin() || RI->hasFP(MF)) ? I-1 : I; } }]; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/Target/MRegisterInfo.h
Changes in directory llvm/include/llvm/Target: MRegisterInfo.h updated: 1.86 -> 1.87 --- Log message: hasFP() is now a virtual method of MRegisterInfo. --- Diffs of the changes: (+5 -0) MRegisterInfo.h |5 + 1 files changed, 5 insertions(+) Index: llvm/include/llvm/Target/MRegisterInfo.h diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.86 llvm/include/llvm/Target/MRegisterInfo.h:1.87 --- llvm/include/llvm/Target/MRegisterInfo.h:1.86 Tue Jan 2 15:30:17 2007 +++ llvm/include/llvm/Target/MRegisterInfo.hMon Jan 22 18:51:23 2007 @@ -367,6 +367,11 @@ return 0; } + /// hasFP - Return true if the specified function should have a dedicated frame + /// pointer register. For most targets this is true only if the function has + /// variable sized allocas or if frame pointer elimination is disabled. + virtual bool hasFP(const MachineFunction &MF) const = 0; + /// getCallFrameSetup/DestroyOpcode - These methods return the opcode of the /// frame setup/destroy instructions if they exist (-1 otherwise). Some /// targets use pseudo instructions in order to abstract away the difference ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp
Changes in directory llvm/lib/CodeGen: AsmPrinter.cpp updated: 1.137 -> 1.138 --- Log message: Fix a bunch of inline asm failures --- Diffs of the changes: (+1 -0) AsmPrinter.cpp |1 + 1 files changed, 1 insertion(+) Index: llvm/lib/CodeGen/AsmPrinter.cpp diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.137 llvm/lib/CodeGen/AsmPrinter.cpp:1.138 --- llvm/lib/CodeGen/AsmPrinter.cpp:1.137 Wed Jan 17 19:12:56 2007 +++ llvm/lib/CodeGen/AsmPrinter.cpp Mon Jan 22 18:36:17 2007 @@ -779,6 +779,7 @@ const char *IDStart = LastEmitted; char *IDEnd; + errno = 0; long Val = strtol(IDStart, &IDEnd, 10); // We only accept numbers for IDs. if (!isdigit(*IDStart) || (Val == 0 && errno == EINVAL)) { cerr << "Bad $ operand number in inline asm string: '" ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/convert.c
Changes in directory llvm-test/SingleSource/UnitTests/Integer: convert.c updated: 1.1 -> 1.2 --- Log message: Change convert.c to conform with the coding standard. --- Diffs of the changes: (+10 -8) convert.c | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) Index: llvm-test/SingleSource/UnitTests/Integer/convert.c diff -u llvm-test/SingleSource/UnitTests/Integer/convert.c:1.1 llvm-test/SingleSource/UnitTests/Integer/convert.c:1.2 --- llvm-test/SingleSource/UnitTests/Integer/convert.c:1.1 Mon Jan 22 16:38:19 2007 +++ llvm-test/SingleSource/UnitTests/Integer/convert.c Mon Jan 22 17:33:38 2007 @@ -1,11 +1,13 @@ -//===--- convert.c --- Test Cases for Bit Accurate Types --=== -// This file was developed by Guoling han and donated to the LLVM research -// group and is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -//===--=== +//===--- convert.c --- Test Cases for Bit Accurate Types --===// +// +// This file was developed by Guoling Han and is distributed under the +// University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===--===// // This is a test for conversion between different int types. // //===--===// + #include typedef int __attribute__ ((bitwidth(7))) int7; @@ -34,18 +36,18 @@ i15 = (int15)i7; i31 = (int31)i15; if(i15 != -1 || i31 != -1) -printf("error: i15=%d, i31 = %d\n", i15, i31); + printf("error: i15=%d, i31 = %d\n", i15, i31); ui7 = 0x7f; ui15 = (uint15)ui7; ui31 = (uint31)ui15; if(ui15 != 0x7f || ui31 != 0x7f) -printf("error: ui15=%u, ui31 = %u\n", ui15, ui31); + printf("error: ui15=%u, ui31 = %u\n", ui15, ui31); i31 = -1; i8 = (int8) i31; if(i8 != -1) -printf("error: i8=%d\n", i8); + printf("error: i8=%d\n", i8); i31 = 0xff; i7 = (int7) i31; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/CodeGen/ARM/align.ll
Changes in directory llvm/test/CodeGen/ARM: align.ll updated: 1.1 -> 1.2 --- Log message: Make it work for both Linux and Mac OS. --- Diffs of the changes: (+3 -2) align.ll |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/test/CodeGen/ARM/align.ll diff -u llvm/test/CodeGen/ARM/align.ll:1.1 llvm/test/CodeGen/ARM/align.ll:1.2 --- llvm/test/CodeGen/ARM/align.ll:1.1 Thu Dec 7 16:38:06 2006 +++ llvm/test/CodeGen/ARM/align.ll Mon Jan 22 17:18:10 2007 @@ -1,7 +1,8 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep align.*1 | wc | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep align.*2 | wc | grep 2 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep align.*3 | wc | grep 2 +; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-linux | grep align.*2 | wc | grep 2 && +; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-linux | grep align.*3 | wc | grep 2 +; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-apple-darwin | grep align.*2 | wc | grep 4 %a = global bool true %b = global sbyte 1 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/Target/TargetData.h
Changes in directory llvm/include/llvm/Target: TargetData.h updated: 1.46 -> 1.47 --- Log message: Update comment. --- Diffs of the changes: (+1 -1) TargetData.h |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/Target/TargetData.h diff -u llvm/include/llvm/Target/TargetData.h:1.46 llvm/include/llvm/Target/TargetData.h:1.47 --- llvm/include/llvm/Target/TargetData.h:1.46 Sat Jan 20 17:32:04 2007 +++ llvm/include/llvm/Target/TargetData.h Mon Jan 22 17:14:52 2007 @@ -233,7 +233,7 @@ /// the specified type. unsigned char getTypeAlignmentPref(const Type *Ty) const; - /// getTypeAlignmentShift - Return the minimum required alignment for the + /// getTypeAlignmentShift - Return the preferred alignment for the /// specified type, returned as log2 of the value (a shift amount). /// unsigned char getTypeAlignmentShift(const Type *Ty) const; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
Changes in directory llvm/lib/CodeGen/SelectionDAG: ScheduleDAG.cpp updated: 1.114 -> 1.115 --- Log message: Remove the DoubleTy special case. --- Diffs of the changes: (+5 -9) ScheduleDAG.cpp | 14 +- 1 files changed, 5 insertions(+), 9 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.114 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.115 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.114 Fri Jan 12 17:31:12 2007 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Mon Jan 22 17:13:55 2007 @@ -330,15 +330,11 @@ const Type *Type = CP->getType(); // MachineConstantPool wants an explicit alignment. if (Align == 0) { - if (Type == Type::DoubleTy) -Align = 3; // always 8-byte align doubles. - else { -Align = TM.getTargetData()->getTypeAlignmentShift(Type); -if (Align == 0) { - // Alignment of packed types. FIXME! - Align = TM.getTargetData()->getTypeSize(Type); - Align = Log2_64(Align); -} + Align = TM.getTargetData()->getTypeAlignmentShift(Type); + if (Align == 0) { +// Alignment of packed types. FIXME! +Align = TM.getTargetData()->getTypeSize(Type); +Align = Log2_64(Align); } } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/ARM/ARMTargetMachine.cpp
Changes in directory llvm/lib/Target/ARM: ARMTargetMachine.cpp updated: 1.17 -> 1.18 --- Log message: ARM AAPCS abi (Linux, etc.) requires 8-byte double / long alignment; Mac requires 4-bytes alignment. --- Diffs of the changes: (+2 -2) ARMTargetMachine.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Target/ARM/ARMTargetMachine.cpp diff -u llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.17 llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.18 --- llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.17 Mon Jan 22 15:24:13 2007 +++ llvm/lib/Target/ARM/ARMTargetMachine.cppMon Jan 22 17:13:01 2007 @@ -35,8 +35,8 @@ ARMTargetMachine::ARMTargetMachine(const Module &M, const std::string &FS) : Subtarget(M, FS), DataLayout(Subtarget.isTargetDarwin() ? - std::string("e-p:32:32-d:32-l:32") : - std::string("e-p:32:32-d:64-l:64")), + std::string("e-p:32:32-d:32:32-l:32:32") : + std::string("e-p:32:32-d:32:64-l:32:64")), InstrInfo(Subtarget), FrameInfo(Subtarget) {} ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCSubtarget.h
Changes in directory llvm/lib/Target/PowerPC: PPCSubtarget.h updated: 1.22 -> 1.23 --- Log message: Double and long preferred alignment set to 8 bytes. --- Diffs of the changes: (+2 -1) PPCSubtarget.h |3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/Target/PowerPC/PPCSubtarget.h diff -u llvm/lib/Target/PowerPC/PPCSubtarget.h:1.22 llvm/lib/Target/PowerPC/PPCSubtarget.h:1.23 --- llvm/lib/Target/PowerPC/PPCSubtarget.h:1.22 Thu Jan 18 22:36:02 2007 +++ llvm/lib/Target/PowerPC/PPCSubtarget.h Mon Jan 22 17:11:06 2007 @@ -104,7 +104,8 @@ /// getTargetDataString - Return the pointer size and type alignment /// properties of this subtarget. const char *getTargetDataString() const { -return isPPC64() ? "E-p:64:64-d:32-l:32" : "E-p:32:32-d:32-l:32"; +return isPPC64() ? "E-p:64:64-d:32:64-l:32:64" + : "E-p:32:32-d:32:64-l:32:64"; } /// isPPC64 - Return true if we are generating code for 64-bit pointer mode. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/SSAtest.c arith.c array.c bigint.c bitbit.c bitlogic.c cppfield.cpp enum.cpp exception.cpp extern-inline-redef.c field.c folding.c gene
On Jan 22, 2007, at 12:47 PM, Guoling Han wrote: > -//===--- SSAtest.c --- Test Cases for Bit Accurate Types > ---===// > +//===--- SSAtest.c --- Test Cases for Bit Accurate Types > ===// > +// > +// This file was developed by Guoling han and donated to the LLVM > research > +// group and is distributed under the University of Illinois Open > Source > +// License. See LICENSE.TXT for details. > +// > ===--- > ===// Hi, please use the standard wording for the LLVM license block. The words should be exactly: "This file was developed by XXX and is distributed under the University of Illinois Open Source License. See LICENSE.TXT for details." Where XXX is replaced with your name. llvm-test doesn't matter as much as the llvm repository, but please be aware of this. Thanks, -Chris ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86TargetMachine.cpp
Changes in directory llvm/lib/Target/X86: X86TargetMachine.cpp updated: 1.139 -> 1.140 --- Log message: Double and long preferred alignment is 8 byte. --- Diffs of the changes: (+2 -2) X86TargetMachine.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Target/X86/X86TargetMachine.cpp diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.139 llvm/lib/Target/X86/X86TargetMachine.cpp:1.140 --- llvm/lib/Target/X86/X86TargetMachine.cpp:1.139 Sat Jan 20 16:35:55 2007 +++ llvm/lib/Target/X86/X86TargetMachine.cppMon Jan 22 17:09:50 2007 @@ -109,8 +109,8 @@ X86TargetMachine::X86TargetMachine(const Module &M, const std::string &FS, bool is64Bit) : Subtarget(M, FS, is64Bit), DataLayout(Subtarget.is64Bit() ? - std::string("e-p:64:64-d:32:64-l:32") : - std::string("e-p:32:32-d:32:64-l:32")), + std::string("e-p:64:64-d:32:64-l:32:64") : + std::string("e-p:32:32-d:32:64-l:32:64")), FrameInfo(TargetFrameInfo::StackGrowsDown, Subtarget.getStackAlignment(), Subtarget.is64Bit() ? -8 : -4), InstrInfo(*this), JITInfo(*this), TLInfo(*this) { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/TargetData.cpp
Changes in directory llvm/lib/Target: TargetData.cpp updated: 1.80 -> 1.81 --- Log message: - getTypeAlignmentShift() should be returning preferred alignment, not ABI alignment. - getPreferredAlignmentLog(): remove Double special case. --- Diffs of the changes: (+1 -3) TargetData.cpp |4 +--- 1 files changed, 1 insertion(+), 3 deletions(-) Index: llvm/lib/Target/TargetData.cpp diff -u llvm/lib/Target/TargetData.cpp:1.80 llvm/lib/Target/TargetData.cpp:1.81 --- llvm/lib/Target/TargetData.cpp:1.80 Sat Jan 20 17:32:04 2007 +++ llvm/lib/Target/TargetData.cpp Mon Jan 22 17:08:19 2007 @@ -451,7 +451,7 @@ } unsigned char TargetData::getTypeAlignmentShift(const Type *Ty) const { - unsigned Align = getTypeAlignmentABI(Ty); + unsigned Align = getTypeAlignmentPref(Ty); assert(!(Align & (Align-1)) && "Alignment is not a power of two!"); return Log2_32(Align); } @@ -514,8 +514,6 @@ if (GV->hasInitializer()) { // Always round up alignment of global doubles to 8 bytes. -if (GV->getType()->getElementType() == Type::DoubleTy && Alignment < 3) - Alignment = 3; if (Alignment < 4) { // If the global is not external, see if it is large. If so, give it a // larger alignment. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/CodeGen/ARM/ldm.ll
Changes in directory llvm/test/CodeGen/ARM: ldm.ll updated: 1.2 -> 1.3 --- Log message: Pasto --- Diffs of the changes: (+1 -1) ldm.ll |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/CodeGen/ARM/ldm.ll diff -u llvm/test/CodeGen/ARM/ldm.ll:1.2 llvm/test/CodeGen/ARM/ldm.ll:1.3 --- llvm/test/CodeGen/ARM/ldm.ll:1.2Mon Jan 22 12:57:39 2007 +++ llvm/test/CodeGen/ARM/ldm.llMon Jan 22 17:01:22 2007 @@ -1,7 +1,7 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "ldmia" | wc -l | grep 2 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "ldmib" | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-linux | grep "ldmfd sp\!" | wc -l | grep 3 +; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-apple-darwin | grep "ldmfd sp\!" | wc -l | grep 3 %X = external global [0 x int] ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/SSAtest.c arith.c array.c bigint.c bitbit.c bitlogic.c cppfield.cpp enum.cpp exception.cpp extern-inline-redef.c field.c folding.c general-
Changes in directory llvm-test/SingleSource/UnitTests/Integer: SSAtest.c updated: 1.3 -> 1.4 arith.c updated: 1.3 -> 1.4 array.c updated: 1.3 -> 1.4 bigint.c updated: 1.3 -> 1.4 bitbit.c updated: 1.3 -> 1.4 bitlogic.c updated: 1.3 -> 1.4 cppfield.cpp updated: 1.1 -> 1.2 enum.cpp updated: 1.3 -> 1.4 exception.cpp updated: 1.2 -> 1.3 extern-inline-redef.c updated: 1.3 -> 1.4 field.c updated: 1.2 -> 1.3 folding.c updated: 1.2 -> 1.3 general-test.c updated: 1.3 -> 1.4 global.c updated: 1.2 -> 1.3 large-array.c updated: 1.3 -> 1.4 list.c updated: 1.3 -> 1.4 local-array.c updated: 1.3 -> 1.4 local-union.c updated: 1.3 -> 1.4 matrix.c updated: 1.4 -> 1.5 matrix.reference_output updated: 1.1 -> 1.2 memory.c updated: 1.3 -> 1.4 offset.c updated: 1.3 -> 1.4 override.cpp updated: 1.3 -> 1.4 pointer.c updated: 1.3 -> 1.4 static.c updated: 1.2 -> 1.3 struct1.c updated: 1.3 -> 1.4 struct2.c updated: 1.3 -> 1.4 structInit.c updated: 1.3 -> 1.4 switch.c updated: 1.3 -> 1.4 template.cpp updated: 1.3 -> 1.4 template2.cpp updated: 1.2 -> 1.3 template3.cpp updated: 1.3 -> 1.4 union-init.c updated: 1.3 -> 1.4 union-struct.c updated: 1.3 -> 1.4 union2.c updated: 1.2 -> 1.3 --- Log message: Fixed some errors in the testcases and added license titles. --- Diffs of the changes: (+371 -243) SSAtest.c | 10 +- arith.c | 10 +- array.c | 10 +- bigint.c| 10 +- bitbit.c| 10 +- bitlogic.c | 10 +- cppfield.cpp|5 + enum.cpp| 10 +- exception.cpp | 10 +- extern-inline-redef.c | 10 +- field.c | 26 +-- folding.c | 10 +- general-test.c |5 + global.c| 12 ++- large-array.c | 10 +- list.c | 32 +++- local-array.c | 10 +- local-union.c | 10 +- matrix.c| 171 ++-- matrix.reference_output | 72 ++-- memory.c| 14 ++- offset.c| 10 +- override.cpp| 10 +- pointer.c | 10 +- static.c| 10 +- struct1.c | 10 +- struct2.c | 10 +- structInit.c| 10 +- switch.c| 18 +++-- template.cpp| 10 +- template2.cpp | 10 +- template3.cpp |9 +- union-init.c| 10 +- union-struct.c | 10 +- union2.c| 10 +- 35 files changed, 371 insertions(+), 243 deletions(-) Index: llvm-test/SingleSource/UnitTests/Integer/SSAtest.c diff -u llvm-test/SingleSource/UnitTests/Integer/SSAtest.c:1.3 llvm-test/SingleSource/UnitTests/Integer/SSAtest.c:1.4 --- llvm-test/SingleSource/UnitTests/Integer/SSAtest.c:1.3 Fri Jan 19 16:54:01 2007 +++ llvm-test/SingleSource/UnitTests/Integer/SSAtest.c Mon Jan 22 14:47:27 2007 @@ -1,10 +1,14 @@ -//===--- SSAtest.c --- Test Cases for Bit Accurate Types ---===// +//===--- SSAtest.c --- Test Cases for Bit Accurate Types ===// +// +// This file was developed by Guoling han and donated to the LLVM research +// group and is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +//===---===// // // Adopted the test from previous test-cases. Changed it with // non-regular int data type. // -//======// - +//======// #include typedef int __attribute__ ((bitwidth(4))) int4; Index: llvm-test/SingleSource/UnitTests/Integer/arith.c diff -u llvm-test/SingleSource/UnitTests/Integer/arith.c:1.3 llvm-test/SingleSource/UnitTests/Integer/arith.c:1.4 --- llvm-test/SingleSource/UnitTests/Integer/arith.c:1.3Fri Jan 19 16:54:01 2007 +++ llvm-test/SingleSource/UnitTests/Integer/arith.cMon Jan 22 14:47:27 2007 @@ -1,9 +1,13 @@ -//===--- arith.c --- Test Cases for Bit Accurate Types ---===// +//===--- arith.c --- Test Cases for Bit Accurate Types --===// +// +// This file was developed by Guoling han and donated to the LLVM research +// group and is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +//===---===// // // This is a general test for arithmatic operations. // -//======// - +//======// #include "arith.h" #include Index: llvm-test/SingleSource/UnitTests/Integer/array.c diff -u llvm-test/SingleSource/UnitTests/Integer/array.c:1.3 llvm-te
[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/convert.c convert.reference_output
Changes in directory llvm-test/SingleSource/UnitTests/Integer: convert.c added (r1.1) convert.reference_output added (r1.1) --- Log message: Add test case for type conversion. --- Diffs of the changes: (+70 -0) convert.c| 65 +++ convert.reference_output |5 +++ 2 files changed, 70 insertions(+) Index: llvm-test/SingleSource/UnitTests/Integer/convert.c diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/convert.c:1.1 *** /dev/null Mon Jan 22 16:38:29 2007 --- llvm-test/SingleSource/UnitTests/Integer/convert.c Mon Jan 22 16:38:19 2007 *** *** 0 --- 1,65 + //===--- convert.c --- Test Cases for Bit Accurate Types --=== + // This file was developed by Guoling han and donated to the LLVM research + // group and is distributed under the University of Illinois Open Source + // License. See LICENSE.TXT for details. + //===--=== + // This is a test for conversion between different int types. + // + //===--===// + #include + + typedef int __attribute__ ((bitwidth(7))) int7; + typedef int __attribute__ ((bitwidth(15))) int15; + typedef int __attribute__ ((bitwidth(31))) int31; + typedef int __attribute__ ((bitwidth(8))) int8; + + typedef unsigned int __attribute__ ((bitwidth(7))) uint7; + typedef unsigned int __attribute__ ((bitwidth(15))) uint15; + typedef unsigned int __attribute__ ((bitwidth(31))) uint31; + typedef unsigned int __attribute__ ((bitwidth(8))) uint8; + + int main() + { + int7 i7; + int15 i15; + int31 i31; + int8 i8; + + uint7 ui7; + uint15 ui15; + uint31 ui31; + uint8 ui8; + + i7 = 0x7f; + i15 = (int15)i7; + i31 = (int31)i15; + if(i15 != -1 || i31 != -1) + printf("error: i15=%d, i31 = %d\n", i15, i31); + + ui7 = 0x7f; + ui15 = (uint15)ui7; + ui31 = (uint31)ui15; + if(ui15 != 0x7f || ui31 != 0x7f) + printf("error: ui15=%u, ui31 = %u\n", ui15, ui31); + + i31 = -1; + i8 = (int8) i31; + if(i8 != -1) + printf("error: i8=%d\n", i8); + + i31 = 0xff; + i7 = (int7) i31; + printf("i7=%d\n", i7); + + ui31 = 0x1ff; + ui8 = (uint8) ui31; + printf("ui8=%u\n", ui8); + + i8 = (int8) ui8; + printf("i8=%d\n", i8); + + ui7 = (uint7) i7; + printf("ui7=%u\n", ui7); + + return 0; + } Index: llvm-test/SingleSource/UnitTests/Integer/convert.reference_output diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/convert.reference_output:1.1 *** /dev/null Mon Jan 22 16:38:35 2007 --- llvm-test/SingleSource/UnitTests/Integer/convert.reference_output Mon Jan 22 16:38:19 2007 *** *** 0 --- 1,5 + i7=-1 + ui8=255 + i8=-1 + ui7=127 + exit 0 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/cond-expr.c cond-expr.reference_output
Changes in directory llvm-test/SingleSource/UnitTests/Integer: cond-expr.c (r1.3) removed cond-expr.reference_output (r1.1) removed --- Log message: the test has been removed since it makes no sense for GCC4.0.2 or higher version. --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp X86ISelLowering.cpp X86Subtarget.cpp
Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.143 -> 1.144 X86ISelLowering.cpp updated: 1.314 -> 1.315 X86Subtarget.cpp updated: 1.49 -> 1.50 --- Log message: Linux GOT indirect reference is only necessary in PIC mode. --- Diffs of the changes: (+5 -3) X86ISelDAGToDAG.cpp |3 ++- X86ISelLowering.cpp |3 ++- X86Subtarget.cpp|2 +- 3 files changed, 5 insertions(+), 3 deletions(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.143 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.144 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.143 Fri Jan 12 17:22:14 2007 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Mon Jan 22 15:34:25 2007 @@ -947,7 +947,8 @@ // If we're using vanilla 'GOT' PIC style, we should use relative addressing // not to pc, but to _GLOBAL_ADDRESS_TABLE_ external -if (Subtarget->isPICStyleGOT()) { +if (TM.getRelocationModel() == Reloc::PIC_ && +Subtarget->isPICStyleGOT()) { GlobalBaseReg = RegMap->createVirtualRegister(X86::GR32RegisterClass); BuildMI(FirstMBB, MBBI, TII->get(X86::ADD32ri), GlobalBaseReg). addReg(PC). Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.314 llvm/lib/Target/X86/X86ISelLowering.cpp:1.315 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.314 Fri Jan 12 13:20:47 2007 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Mon Jan 22 15:34:25 2007 @@ -664,7 +664,8 @@ InFlag = Chain.getValue(1); } - if (Subtarget->isPICStyleGOT()) { + if (getTargetMachine().getRelocationModel() == Reloc::PIC_ && + Subtarget->isPICStyleGOT()) { Chain = DAG.getCopyToReg(Chain, X86::EBX, DAG.getNode(X86ISD::GlobalBaseReg, getPointerTy()), InFlag); Index: llvm/lib/Target/X86/X86Subtarget.cpp diff -u llvm/lib/Target/X86/X86Subtarget.cpp:1.49 llvm/lib/Target/X86/X86Subtarget.cpp:1.50 --- llvm/lib/Target/X86/X86Subtarget.cpp:1.49 Wed Jan 17 04:33:08 2007 +++ llvm/lib/Target/X86/X86Subtarget.cppMon Jan 22 15:34:25 2007 @@ -40,7 +40,7 @@ return (!isDirectCall && (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() || (GV->isExternal() && !GV->hasNotBeenReadFromBytecode(; -} else if (isPICStyleGOT()) { +} else if (TM.getRelocationModel() == Reloc::PIC_ && isPICStyleGOT()) { // Extra load is needed for all non-statics. return (!isDirectCall && (GV->isExternal() || !GV->hasInternalLinkage())); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] llvm-gcc4: gimplifier fixes
On Jan 22, 2007, at 5:51 AM, Duncan Sands wrote: > Hi Devang, > >>> - if (TREE_CODE_CLASS (code) == tcc_unary >>> + if ((TREE_CODE_CLASS (code) == tcc_unary || code == >> >> Eric Botcazou made similar changes in next line to fix Ada. Please >> bring in entire patch and appropriate "APPLE LOCAL llvm" markers. > > I sent the minimal change needed to get Ada to build further, but I've > certainly got nothing against the rest of Eric's patch, so here is the > full version (it may also be useful for Fortran): Applied. - Devang > > Index: gcc.llvm.master/gcc/tree.c > === > --- gcc.llvm.master.orig/gcc/tree.c 2007-01-21 23:09:08.0 > +0100 > +++ gcc.llvm.master/gcc/tree.c2007-01-22 14:34:55.0 +0100 > @@ -2601,11 +2601,13 @@ >break; > > default: > - if (TREE_CODE_CLASS (code) == tcc_unary > + /* APPLE LOCAL llvm */ > + if ((TREE_CODE_CLASS (code) == tcc_unary || code == > VIEW_CONVERT_EXPR) > && node && !TYPE_P (node) > && TREE_CONSTANT (node)) > TREE_CONSTANT (t) = 1; > - if (TREE_CODE_CLASS (code) == tcc_unary > + /* APPLE LOCAL llvm */ > + if ((TREE_CODE_CLASS (code) == tcc_unary || code == > VIEW_CONVERT_EXPR) > && node && TREE_INVARIANT (node)) > TREE_INVARIANT (t) = 1; >if (TREE_CODE_CLASS (code) == tcc_reference ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/ARM/ARMTargetMachine.cpp
Changes in directory llvm/lib/Target/ARM: ARMTargetMachine.cpp updated: 1.16 -> 1.17 --- Log message: Double and Long preferred alignment is 4 for Darwin, 8 for Linux. --- Diffs of the changes: (+5 -1) ARMTargetMachine.cpp |6 +- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm/lib/Target/ARM/ARMTargetMachine.cpp diff -u llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.16 llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.17 --- llvm/lib/Target/ARM/ARMTargetMachine.cpp:1.16 Fri Jan 19 20:09:25 2007 +++ llvm/lib/Target/ARM/ARMTargetMachine.cppMon Jan 22 15:24:13 2007 @@ -33,7 +33,11 @@ /// TargetMachine ctor - Create an ILP32 architecture model /// ARMTargetMachine::ARMTargetMachine(const Module &M, const std::string &FS) - : Subtarget(M, FS), DataLayout("e-p:32:32-d:32"), InstrInfo(Subtarget), + : Subtarget(M, FS), +DataLayout(Subtarget.isTargetDarwin() ? + std::string("e-p:32:32-d:32-l:32") : + std::string("e-p:32:32-d:64-l:64")), +InstrInfo(Subtarget), FrameInfo(Subtarget) {} unsigned ARMTargetMachine::getModuleMatchQuality(const Module &M) { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [release_19] CVS: llvm-poolalloc/lib/DSA/Local.cpp
Changes in directory llvm-poolalloc/lib/DSA: Local.cpp updated: 1.158.2.3 -> 1.158.2.4 --- Log message: Add code that might correctly handle llva_save_stackp(). --- Diffs of the changes: (+12 -0) Local.cpp | 12 1 files changed, 12 insertions(+) Index: llvm-poolalloc/lib/DSA/Local.cpp diff -u llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.3 llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.4 --- llvm-poolalloc/lib/DSA/Local.cpp:1.158.2.3 Wed Dec 13 17:18:48 2006 +++ llvm-poolalloc/lib/DSA/Local.cppMon Jan 22 15:18:48 2007 @@ -1232,6 +1232,18 @@ if (DSNode *N = RetNH.getNode()) N->setModifiedMarker()->setReadMarker(); return true; +#if 0 + } else if (F->getName() == "llva_save_stackp") { + // Create a new DSNode for the memory returned by llva_save_stackp() + DSNode *N = createNode(); + N->setAllocaNodeMarker(); + + // + // TODO: + // For now, don't worry about creating a meta-pool. Stack locations + // are ignored by our analysis. + // +#endif } else if (F->getName() == "__generic_copy_from_user") { if (CS.getCaller()->getName() == "kmem_cache_alloc") return false; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/SSAtest.c arith.c array.c bigint.c bitbit.c bitlogic.c cppfield.cpp enum.cpp exception.cpp extern-inline-redef.c field.c folding.c general-
Changes in directory llvm-test/SingleSource/UnitTests/Integer: SSAtest.c updated: 1.4 -> 1.5 arith.c updated: 1.4 -> 1.5 array.c updated: 1.4 -> 1.5 bigint.c updated: 1.4 -> 1.5 bitbit.c updated: 1.4 -> 1.5 bitlogic.c updated: 1.4 -> 1.5 cppfield.cpp updated: 1.2 -> 1.3 enum.cpp updated: 1.4 -> 1.5 exception.cpp updated: 1.3 -> 1.4 extern-inline-redef.c updated: 1.4 -> 1.5 field.c updated: 1.3 -> 1.4 folding.c updated: 1.3 -> 1.4 general-test.c updated: 1.4 -> 1.5 global.c updated: 1.3 -> 1.4 large-array.c updated: 1.4 -> 1.5 list.c updated: 1.4 -> 1.5 local-array.c updated: 1.4 -> 1.5 matrix.c updated: 1.5 -> 1.6 memory.c updated: 1.4 -> 1.5 offset.c updated: 1.4 -> 1.5 override.cpp updated: 1.4 -> 1.5 pointer.c updated: 1.4 -> 1.5 static.c updated: 1.3 -> 1.4 struct1.c updated: 1.4 -> 1.5 struct2.c updated: 1.4 -> 1.5 structInit.c updated: 1.4 -> 1.5 template.cpp updated: 1.5 -> 1.6 template2.cpp updated: 1.3 -> 1.4 template3.cpp updated: 1.4 -> 1.5 union-init.c updated: 1.4 -> 1.5 union-struct.c updated: 1.4 -> 1.5 union2.c updated: 1.3 -> 1.4 --- Log message: Fix 80-col problems in file headers. --- Diffs of the changes: (+107 -101) SSAtest.c |6 +++--- arith.c |8 array.c |6 +++--- bigint.c |6 +++--- bitbit.c |6 +++--- bitlogic.c|6 +++--- cppfield.cpp |6 -- enum.cpp |6 +++--- exception.cpp |6 +++--- extern-inline-redef.c |6 +++--- field.c |6 +++--- folding.c |6 +++--- general-test.c| 17 ++--- global.c |6 +++--- large-array.c |6 +++--- list.c|6 +++--- local-array.c |6 +++--- matrix.c |6 +++--- memory.c |6 +++--- offset.c |6 +++--- override.cpp |6 +++--- pointer.c |6 +++--- static.c |6 +++--- struct1.c |9 + struct2.c |6 +++--- structInit.c |6 +++--- template.cpp |6 +++--- template2.cpp |6 +++--- template3.cpp |6 +++--- union-init.c |6 +++--- union-struct.c|6 +++--- union2.c |6 +++--- 32 files changed, 107 insertions(+), 101 deletions(-) Index: llvm-test/SingleSource/UnitTests/Integer/SSAtest.c diff -u llvm-test/SingleSource/UnitTests/Integer/SSAtest.c:1.4 llvm-test/SingleSource/UnitTests/Integer/SSAtest.c:1.5 --- llvm-test/SingleSource/UnitTests/Integer/SSAtest.c:1.4 Mon Jan 22 14:47:27 2007 +++ llvm-test/SingleSource/UnitTests/Integer/SSAtest.c Mon Jan 22 15:07:53 2007 @@ -1,14 +1,14 @@ -//===--- SSAtest.c --- Test Cases for Bit Accurate Types ===// +//===--- SSAtest.c --- Test Cases for Bit Accurate Types --===// // // This file was developed by Guoling han and donated to the LLVM research // group and is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. -//===---===// +//===--===// // // Adopted the test from previous test-cases. Changed it with // non-regular int data type. // -//======// +//===--===// #include typedef int __attribute__ ((bitwidth(4))) int4; Index: llvm-test/SingleSource/UnitTests/Integer/arith.c diff -u llvm-test/SingleSource/UnitTests/Integer/arith.c:1.4 llvm-test/SingleSource/UnitTests/Integer/arith.c:1.5 --- llvm-test/SingleSource/UnitTests/Integer/arith.c:1.4Mon Jan 22 14:47:27 2007 +++ llvm-test/SingleSource/UnitTests/Integer/arith.cMon Jan 22 15:07:53 2007 @@ -1,13 +1,13 @@ -//===--- arith.c --- Test Cases for Bit Accurate Types --===// +//===--- arith.c --- Test Cases for Bit Accurate Types ===// // // This file was developed by Guoling han and donated to the LLVM research // group and is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. -//===---===// +//===--===// // -// This is a general test for arithmatic operations. +// This is a general test for arithmetic operations. // -//======// +//===--===// #include "arith.h" #include Index: llvm-test/SingleSource/UnitTests/Integer/array.c diff -u llvm-test/SingleSource/UnitTests/Integer/array.c:1.4 llvm-test/SingleSource/UnitTests/Integer/array.c:1.5 -
[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/switch.c
Changes in directory llvm-test/SingleSource/UnitTests/Integer: switch.c updated: 1.4 -> 1.5 --- Log message: Remove syntax errors from merge. Use constant expressions instead of direct values. Fix header to 80 cols. --- Diffs of the changes: (+3 -9) switch.c | 12 +++- 1 files changed, 3 insertions(+), 9 deletions(-) Index: llvm-test/SingleSource/UnitTests/Integer/switch.c diff -u llvm-test/SingleSource/UnitTests/Integer/switch.c:1.4 llvm-test/SingleSource/UnitTests/Integer/switch.c:1.5 --- llvm-test/SingleSource/UnitTests/Integer/switch.c:1.4 Mon Jan 22 14:47:27 2007 +++ llvm-test/SingleSource/UnitTests/Integer/switch.c Mon Jan 22 15:06:21 2007 @@ -1,28 +1,22 @@ -//===--- switch.c --- Test Cases for Bit Accurate Types -===// +//===--- switch.c --- Test Cases for Bit Accurate Types ---===// // // This file was developed by Guoling han and donated to the LLVM research // group and is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. -//===---===// +//===--===// // // This is a test for switch statement. The switch value is a // non-regular bitwidth. test(int3 c) function return the value of the // argument c. // -//======// +//===--===// #include typedef unsigned int __attribute__ ((bitwidth(7))) int7; typedef unsigned int __attribute__ ((bitwidth(3))) int3; -<<< switch.c -=== const int7 zero = (int7)(1 << 8); // constant 0; static int3 seven = (int3)0xf; // constant 7; ->>> 1.2 - -const int7 zero = 0; // constant 0; -static int3 seven = 7; // constant 7; int3 test(int3 c) { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/local-union.c
Changes in directory llvm-test/SingleSource/UnitTests/Integer: local-union.c updated: 1.4 -> 1.5 --- Log message: Fix constant integer for 64-bits. Fix header to 80 cols. --- Diffs of the changes: (+4 -4) local-union.c |8 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm-test/SingleSource/UnitTests/Integer/local-union.c diff -u llvm-test/SingleSource/UnitTests/Integer/local-union.c:1.4 llvm-test/SingleSource/UnitTests/Integer/local-union.c:1.5 --- llvm-test/SingleSource/UnitTests/Integer/local-union.c:1.4 Mon Jan 22 14:47:27 2007 +++ llvm-test/SingleSource/UnitTests/Integer/local-union.c Mon Jan 22 15:04:54 2007 @@ -1,13 +1,13 @@ -//===--- local-union.c --- Test Cases for Bit Accurate Types ===// +//===--- local-union.c --- Test Cases for Bit Accurate Types --===// // // This file was developed by Guoling han and donated to the LLVM research // group and is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. -//===---===// +//===--===// // // This is a test for local union data type. // -//======// +//===--===// #include @@ -18,7 +18,7 @@ double test(union foo* F) { { union foo { float X; int33 Y;} A; -A.Y = 0x1; +A.Y = 0x1ULL; return A.X; } } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/template.cpp
Changes in directory llvm-test/SingleSource/UnitTests/Integer: template.cpp updated: 1.4 -> 1.5 --- Log message: Fix #include. We use printf not iostream. --- Diffs of the changes: (+1 -1) template.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/SingleSource/UnitTests/Integer/template.cpp diff -u llvm-test/SingleSource/UnitTests/Integer/template.cpp:1.4 llvm-test/SingleSource/UnitTests/Integer/template.cpp:1.5 --- llvm-test/SingleSource/UnitTests/Integer/template.cpp:1.4 Mon Jan 22 14:47:27 2007 +++ llvm-test/SingleSource/UnitTests/Integer/template.cpp Mon Jan 22 14:50:40 2007 @@ -9,7 +9,7 @@ // //======// -#include +#include typedef int __attribute__ ((bitwidth(4))) int4; typedef unsigned int __attribute__ ((bitwidth(5))) int5; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] llvm-gcc4: resurrect fortran
Applied. - Devang On Jan 21, 2007, at 2:07 PM, Duncan Sands wrote: >>> + $(F95_OBJS) $(F95_BACKEND) $(F95_LIBS) $(C_STUBS) >> >> I don't see C_STUBS anywhere. > > Indeed - well spotted. > >> Would it be possible for you to resend >> this patch with appropriate "APPLE LOCAL llvm" markers ? > > This time without C_STUBS and with markers. > > Best wishes, > > Duncan. > > Index: gcc.llvm.master/gcc/fortran/Make-lang.in > === > --- gcc.llvm.master.orig/gcc/fortran/Make-lang.in 2007-01-21 > 22:50:53.0 +0100 > +++ gcc.llvm.master/gcc/fortran/Make-lang.in 2007-01-21 > 23:01:06.0 +0100 > @@ -103,12 +103,16 @@ > -rm -f gfortran-cross$(exeext) > cp gfortran$(exeext) gfortran-cross$(exeext) > > +# APPLE LOCAL begin llvm > +# Language-independent object files. > +F95_BACKEND = $(BACKEND) attribs.o stub-objc.o stub-c.o > + > # The compiler itself is called f951. > f951$(exeext): $(F95_OBJS) \ > - $(BACKEND) $(LIBDEPS) > - # APPLE LOCAL LLVM > + $(F95_BACKEND) $(LIBDEPS) > $(LINKCC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ > - $(F95_OBJS) $(BACKEND) $(F95_LIBS) > + $(F95_OBJS) $(F95_BACKEND) $(F95_LIBS) > +# APPLE LOCAL end llvm > > gt-fortran-f95-lang.h gtype-fortran.h : s-gtype; @true > gt-fortran-trans-decl.h gt-fortran-trans.h: s-gtype; @true > Index: gcc.llvm.master/gcc/fortran/f95-lang.c > === > --- gcc.llvm.master.orig/gcc/fortran/f95-lang.c 2007-01-21 > 22:50:53.0 +0100 > +++ gcc.llvm.master/gcc/fortran/f95-lang.c2007-01-21 > 22:59:51.0 +0100 > @@ -154,21 +154,6 @@ > /* APPLE LOCAL disable_typechecking_for_spec_flag */ > int disable_typechecking_for_spec_flag = 0; > > -/* APPLE LOCAL begin CW asm blocks */ > -/* Dummies needed because we use them from cpplib, yuck. */ > -int flag_iasm_blocks; > -int iasm_state; > -int iasm_in_operands; > -/* APPLE LOCAL end CW asm blocks */ > - > -/* APPLE LOCAL begin 4174833 */ > -tree > -objc_is_class_name (tree ARG_UNUSED (arg)) > -{ > - return 0; > -} > - > -/* APPLE LOCAL end 4174833 */ > /* A list (chain of TREE_LIST nodes) of all LABEL_DECLs in the > function > that have names. Here so we can clear out their names' > definitions > at the end of the function. */ > Index: gcc.llvm.master/gcc/fortran/trans-types.c > === > --- gcc.llvm.master.orig/gcc/fortran/trans-types.c2007-01-21 > 22:50:53.0 +0100 > +++ gcc.llvm.master/gcc/fortran/trans-types.c 2007-01-21 > 22:59:51.0 +0100 > @@ -1752,18 +1752,4 @@ > /* APPLE LOCAL constant cfstrings */ > struct cpp_reader* parse_in; > > -/* APPLE LOCAL begin AltiVec */ > -tree > -build_stmt (enum tree_code code ATTRIBUTE_UNUSED, ...) > -{ > - gcc_assert(0); > -} > - > -void > -store_init_value (tree decl ATTRIBUTE_UNUSED, tree init > ATTRIBUTE_UNUSED) > -{ > - gcc_assert(0); > -} > -/* APPLE LOCAL end AltiVec */ > - > #include "gt-fortran-trans-types.h" ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] llvm-gcc4: use langhooks rather than front-end calls in i386.c
On Jan 20, 2007, at 6:43 AM, Duncan Sands wrote: > Hi Devang, thanks for reviewing these patches. > >> Applied, after adding "APPLE LOCAL llvm" markers. > > This hasn't turned up in the llvm-gcc4 svn repository > yet. Did you apply it there or to some other tree? > (I'm waiting for it to turn up, so I can see how the > APPLE markers should be done). Do you see this change ? On my side, svn commit succeeded on 18th and this change should show up in mirror next day. - Devang ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelLowering.cpp
Changes in directory llvm/lib/Target/ARM: ARMISelLowering.cpp updated: 1.2 -> 1.3 --- Log message: Use bl to call Thumb fuctions directly. --- Diffs of the changes: (+1 -1) ARMISelLowering.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/ARM/ARMISelLowering.cpp diff -u llvm/lib/Target/ARM/ARMISelLowering.cpp:1.2 llvm/lib/Target/ARM/ARMISelLowering.cpp:1.3 --- llvm/lib/Target/ARM/ARMISelLowering.cpp:1.2 Fri Jan 19 13:28:01 2007 +++ llvm/lib/Target/ARM/ARMISelLowering.cpp Mon Jan 22 13:40:10 2007 @@ -483,7 +483,7 @@ getTargetMachine().getRelocationModel() != Reloc::Static; isARMFunc = !Subtarget->isThumb() || isStub; // Wrap it since tBX takes a register source operand. -if (!Subtarget->hasV5TOps() && Subtarget->isThumb()) +if (isARMFunc && Subtarget->isThumb() && !Subtarget->hasV5TOps()) Callee = DAG.getNode(ARMISD::WrapperCall, MVT::i32, Callee); } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/CodeGen/ARM/ldm.ll
Changes in directory llvm/test/CodeGen/ARM: ldm.ll updated: 1.1 -> 1.2 --- Log message: Fix test case. --- Diffs of the changes: (+1 -1) ldm.ll |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/CodeGen/ARM/ldm.ll diff -u llvm/test/CodeGen/ARM/ldm.ll:1.1 llvm/test/CodeGen/ARM/ldm.ll:1.2 --- llvm/test/CodeGen/ARM/ldm.ll:1.1Fri Jan 19 03:20:23 2007 +++ llvm/test/CodeGen/ARM/ldm.llMon Jan 22 12:57:39 2007 @@ -1,7 +1,7 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "ldmia" | wc -l | grep 2 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "ldmib" | wc -l | grep 1 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "ldmfd sp\!" | wc -l | grep 3 +; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-linux | grep "ldmfd sp\!" | wc -l | grep 3 %X = external global [0 x int] ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/CodeGen/ARM/insn-sched1.ll
Changes in directory llvm/test/CodeGen/ARM: insn-sched1.ll updated: 1.1 -> 1.2 --- Log message: Fix test case. --- Diffs of the changes: (+1 -2) insn-sched1.ll |3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm/test/CodeGen/ARM/insn-sched1.ll diff -u llvm/test/CodeGen/ARM/insn-sched1.ll:1.1 llvm/test/CodeGen/ARM/insn-sched1.ll:1.2 --- llvm/test/CodeGen/ARM/insn-sched1.ll:1.1Fri Jan 19 03:20:23 2007 +++ llvm/test/CodeGen/ARM/insn-sched1.llMon Jan 22 12:56:11 2007 @@ -1,6 +1,5 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6 && -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6 | grep mov | wc -l | grep 2 +; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-apple-darwin -mattr=+v6 | grep mov | wc -l | grep 2 int %test(int %x) { %tmp = cast int %x to short ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [PATCH] PR746: Make Function not annotatable and get rid of Annotations
On Jan 21, 2007, at 11:59 AM, Gordon Henriksen wrote: > This patch addresses http://llvm.org/PR746. > > This patch simply replaces the subversive and overgeneralized > annotation classes with a map in MachineFunction and a listener > interface so that MachineFunctions can destroy themselves when the > parent Function is deleted. > > I wish I'd noticed PR746 before http://llvm.org/PR927. Not sure > you'll want to apply this patch in light of the comments on this > PR746, which suggest using an Analysis to store MachineFunctions, > and thus to also manage their lifetimes. This looks like a great step in the right direction. However, why do we need the FunctionListener interface? The lifetime of the MachineFunction object is tightly controlled by the code generator (created with MF::construct and destroyed with MF::destruct). I don't think there is a need to notify the MachineFunction when Function is destroyed, just delete the MachineFunction in MachineFunction::destruct. -Chris ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-poolalloc/lib/DSA/DataStructure.cpp
Changes in directory llvm-poolalloc/lib/DSA: DataStructure.cpp updated: 1.257 -> 1.258 --- Log message: fix a incompleteness bug --- Diffs of the changes: (+8 -0) DataStructure.cpp |8 1 files changed, 8 insertions(+) Index: llvm-poolalloc/lib/DSA/DataStructure.cpp diff -u llvm-poolalloc/lib/DSA/DataStructure.cpp:1.257 llvm-poolalloc/lib/DSA/DataStructure.cpp:1.258 --- llvm-poolalloc/lib/DSA/DataStructure.cpp:1.257 Wed Jan 10 12:10:32 2007 +++ llvm-poolalloc/lib/DSA/DataStructure.cppMon Jan 22 11:03:41 2007 @@ -1993,6 +1993,14 @@ E = AuxFunctionCalls.end(); I != E; ++I) markIncomplete(*I); + // Mark stuff passed into external functions as being incomplete. + // External functions may not appear in Aux during td, so process + // them specially + for (std::list::iterator I = FunctionCalls.begin(), + E = FunctionCalls.end(); I != E; ++I) +if(I->isDirectCall() && I->getCalleeFunc()->isExternal()) + markIncomplete(*I); + // Mark all global nodes as incomplete. for (DSScalarMap::global_iterator I = ScalarMap.global_begin(), E = ScalarMap.global_end(); I != E; ++I) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-poolalloc/lib/DSA/Local.cpp
Changes in directory llvm-poolalloc/lib/DSA: Local.cpp updated: 1.166 -> 1.167 --- Log message: Fix build --- Diffs of the changes: (+1 -1) Local.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-poolalloc/lib/DSA/Local.cpp diff -u llvm-poolalloc/lib/DSA/Local.cpp:1.166 llvm-poolalloc/lib/DSA/Local.cpp:1.167 --- llvm-poolalloc/lib/DSA/Local.cpp:1.166 Wed Jan 10 13:59:52 2007 +++ llvm-poolalloc/lib/DSA/Local.cppMon Jan 22 10:40:38 2007 @@ -72,7 +72,7 @@ if (isa(Ty)) return true; else if (TrackIntegersAsPointers && Ty->isPrimitiveType() &&Ty->isInteger()) - return Ty->getPrimitiveSize() >= PointerSize; + return Ty->getPrimitiveSizeInBits() >= PointerSize; return false; } }} ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp
Changes in directory llvm-poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.132 -> 1.133 --- Log message: fix build --- Diffs of the changes: (+1 -1) PoolAllocate.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.132 llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.133 --- llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.132 Wed Jan 10 14:44:31 2007 +++ llvm-poolalloc/lib/PoolAllocate/PoolAllocate.cppMon Jan 22 10:41:10 2007 @@ -251,7 +251,7 @@ if (isa(User->getOperand(1)) && cast(User->getOperand(1))->isNullValue()) { bool CondIsTrue = ICI->getPredicate() == ICmpInst::ICMP_NE; -User->replaceAllUsesWith(ConstantBool::get(CondIsTrue)); +User->replaceAllUsesWith(ConstantInt::get(Type::Int1Ty, CondIsTrue)); } } else if ((User->getOpcode() == Instruction::Trunc) || (User->getOpcode() == Instruction::ZExt) || ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] llvm-gcc4: gimplifier fixes
Hi Devang, > > - if (TREE_CODE_CLASS (code) == tcc_unary > > + if ((TREE_CODE_CLASS (code) == tcc_unary || code == > > Eric Botcazou made similar changes in next line to fix Ada. Please > bring in entire patch and appropriate "APPLE LOCAL llvm" markers. I sent the minimal change needed to get Ada to build further, but I've certainly got nothing against the rest of Eric's patch, so here is the full version (it may also be useful for Fortran): Index: gcc.llvm.master/gcc/tree.c === --- gcc.llvm.master.orig/gcc/tree.c 2007-01-21 23:09:08.0 +0100 +++ gcc.llvm.master/gcc/tree.c 2007-01-22 14:34:55.0 +0100 @@ -2601,11 +2601,13 @@ break; default: - if (TREE_CODE_CLASS (code) == tcc_unary + /* APPLE LOCAL llvm */ + if ((TREE_CODE_CLASS (code) == tcc_unary || code == VIEW_CONVERT_EXPR) && node && !TYPE_P (node) && TREE_CONSTANT (node)) TREE_CONSTANT (t) = 1; - if (TREE_CODE_CLASS (code) == tcc_unary + /* APPLE LOCAL llvm */ + if ((TREE_CODE_CLASS (code) == tcc_unary || code == VIEW_CONVERT_EXPR) && node && TREE_INVARIANT (node)) TREE_INVARIANT (t) = 1; if (TREE_CODE_CLASS (code) == tcc_reference ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits