[llvm-commits] CVS: llvm/include/llvm/Analysis/Dominators.h

2007-04-21 Thread Owen Anderson


Changes in directory llvm/include/llvm/Analysis:

Dominators.h updated: 1.75 - 1.76
---
Log message:

Fix some null checks to actually test the part that needs checking.


---
Diffs of the changes:  (+2 -3)

 Dominators.h |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)


Index: llvm/include/llvm/Analysis/Dominators.h
diff -u llvm/include/llvm/Analysis/Dominators.h:1.75 
llvm/include/llvm/Analysis/Dominators.h:1.76
--- llvm/include/llvm/Analysis/Dominators.h:1.75Fri Apr 20 00:44:16 2007
+++ llvm/include/llvm/Analysis/Dominators.h Sat Apr 21 02:04:45 2007
@@ -323,16 +323,15 @@
   
   /// Return the immediate dominator of A.
   BasicBlock *getIDom(BasicBlock *A) const {
-if (!A) return 0;
-
 ETNode *NodeA = getNode(A);
+if (!NodeA) return 0;
 const ETNode *idom = NodeA-getFather();
 return idom ? idom-getDataBasicBlock() : 0;
   }
   
   void getChildren(BasicBlock *A, std::vectorBasicBlock* children) const {
-if (!A) return;
 ETNode *NodeA = getNode(A);
+if (!NodeA) return;
 const ETNode* son = NodeA-getSon();
 
 if (!son) return;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LICM.cpp

2007-04-21 Thread Owen Anderson


Changes in directory llvm/lib/Transforms/Scalar:

LICM.cpp updated: 1.93 - 1.94
---
Log message:

Fix a comment.


---
Diffs of the changes:  (+1 -1)

 LICM.cpp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Transforms/Scalar/LICM.cpp
diff -u llvm/lib/Transforms/Scalar/LICM.cpp:1.93 
llvm/lib/Transforms/Scalar/LICM.cpp:1.94
--- llvm/lib/Transforms/Scalar/LICM.cpp:1.93Fri Apr 20 01:27:13 2007
+++ llvm/lib/Transforms/Scalar/LICM.cpp Sat Apr 21 02:11:47 2007
@@ -307,7 +307,7 @@
 
 /// HoistRegion - Walk the specified region of the CFG (defined by all blocks
 /// dominated by the specified block, and that are in the current loop) in 
depth
-/// first order w.r.t the DominatorTree.  This allows us to visit definitions
+/// first order w.r.t the ETForest.  This allows us to visit definitions
 /// before uses, allowing us to hoist a loop body in one pass without 
iteration.
 ///
 void LICM::HoistRegion(BasicBlock *BB) {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp

2007-04-21 Thread Owen Anderson


Changes in directory llvm/lib/Transforms/Utils:

PromoteMemoryToRegister.cpp updated: 1.97 - 1.98
---
Log message:

Fix a comment.


---
Diffs of the changes:  (+1 -1)

 PromoteMemoryToRegister.cpp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
diff -u llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:1.97 
llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:1.98
--- llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:1.97  Fri Apr 20 
01:27:13 2007
+++ llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp   Sat Apr 21 
02:12:44 2007
@@ -142,7 +142,7 @@
   return ET.properlyDominates(I1-getParent(), I2-getParent());
 }
 
-/// dominates - Return true if BB1 dominates BB2 using the DominatorTree.
+/// dominates - Return true if BB1 dominates BB2 using the ETForest.
 ///
 bool dominates(BasicBlock *BB1, BasicBlock *BB2) const {
   return ET.dominates(BB1, BB2);



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] [llvm] r36266 - /llvm/trunk/CREDITS.TXT

2007-04-21 Thread Chris Lattner

On Apr 20, 2007, at 9:06 PM, Reid Spencer wrote:

 On Fri, 2007-04-20 at 20:46 -0700, Chris Lattner wrote:
 Urg, this is going to come from [EMAIL PROTECTED] ?

 I've asked David to fix this. He said he would forward my request  
 on to
 the authentication people at UIUC. He said they aren't likely to  
 give us
 prefix-less user names.

 The more issues we run into with UIUC the more I'm not liking how this
 is turning out.

Can we just have the post-commit script fakemail that it is  
[EMAIL PROTECTED] sending it?

-Chris

 Reid.


 Yuck.  Can we get a mapping table like we have for cvs committers?

 -Chris

 Begin forwarded message:

 From: [EMAIL PROTECTED]
 Date: April 20, 2007 8:40:04 PM PDT
 To: llvm-commits@cs.uiuc.edu
 Subject: [llvm-commits] [llvm] r36266 - /llvm/trunk/CREDITS.TXT
 Reply-To: CVS Commit Messages for LLVM repository llvm-
 [EMAIL PROTECTED]

 Author: cscollab-rspencer
 Date: Fri Apr 20 22:40:04 2007
 New Revision: 36266

 URL: http://subversion.cs.uiuc.edu/viewvc/llvm?rev=36266view=rev
 Log:
 Add a credit.

 Modified:
 llvm/trunk/CREDITS.TXT

 Modified: llvm/trunk/CREDITS.TXT
 URL: http://subversion.cs.uiuc.edu/viewvc/llvm/llvm/trunk/
 CREDITS.TXT?rev=36266r1=36265r2=36266view=diff
  
 ==
 
 --- llvm/trunk/CREDITS.TXT (original)
 +++ llvm/trunk/CREDITS.TXT Fri Apr 20 22:40:04 2007
 @@ -191,7 +191,7 @@
  D: Stacker, llvmc, llvm-ld, llvm-ar, llvm2cpp, lib/Archive, lib/
 Linker,
  D: lib/System, bytecode enhancements, symtab hacking,
 unoverloading of
  D: intrinsics, makefile and configuration system, documentation,
 various bug
 -D: fixing.
 +D: fixing, Subversion migration.

  N: Adam Treat
  E: [EMAIL PROTECTED]


 ___
 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] CVS: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp

2007-04-21 Thread Owen Anderson


Changes in directory llvm/lib/Transforms/Scalar:

PredicateSimplifier.cpp updated: 1.68 - 1.69
---
Log message:

Make PredicateSimplifier not use DominatorTree.


---
Diffs of the changes:  (+32 -31)

 PredicateSimplifier.cpp |   63 
 1 files changed, 32 insertions(+), 31 deletions(-)


Index: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
diff -u llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.68 
llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.69
--- llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.68 Thu Apr 19 
00:35:00 2007
+++ llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp  Sat Apr 21 02:38:12 2007
@@ -1980,21 +1980,19 @@
   /// can't be equal and will solve setcc instructions when possible.
   /// @brief Root of the predicate simplifier optimization.
   class VISIBILITY_HIDDEN PredicateSimplifier : public FunctionPass {
-DominatorTree *DT;
 ETForest *Forest;
 bool modified;
 InequalityGraph *IG;
 UnreachableBlocks UB;
 ValueRanges *VR;
 
-std::vectorDominatorTree::Node * WorkList;
+std::vectorBasicBlock * WorkList;
 
   public:
 bool runOnFunction(Function F);
 
 virtual void getAnalysisUsage(AnalysisUsage AU) const {
   AU.addRequiredID(BreakCriticalEdgesID);
-  AU.addRequiredDominatorTree();
   AU.addRequiredETForest();
   AU.addRequiredTargetData();
   AU.addPreservedTargetData();
@@ -2010,15 +2008,15 @@
 class VISIBILITY_HIDDEN Forwards : public InstVisitorForwards {
   friend class InstVisitorForwards;
   PredicateSimplifier *PS;
-  DominatorTree::Node *DTNode;
+  BasicBlock *Node;
 
 public:
   InequalityGraph IG;
   UnreachableBlocks UB;
   ValueRanges VR;
 
-  Forwards(PredicateSimplifier *PS, DominatorTree::Node *DTNode)
-: PS(PS), DTNode(DTNode), IG(*PS-IG), UB(PS-UB), VR(*PS-VR) {}
+  Forwards(PredicateSimplifier *PS, BasicBlock* node)
+: PS(PS), Node(node), IG(*PS-IG), UB(PS-UB), VR(*PS-VR) {}
 
   void visitTerminatorInst(TerminatorInst TI);
   void visitBranchInst(BranchInst BI);
@@ -2038,31 +2036,32 @@
 // Used by terminator instructions to proceed from the current basic
 // block to the next. Verifies that current dominates next,
 // then calls visitBasicBlock.
-void proceedToSuccessors(DominatorTree::Node *Current) {
-  for (DominatorTree::Node::iterator I = Current-begin(),
-   E = Current-end(); I != E; ++I) {
+void proceedToSuccessors(BasicBlock *Current) {
+  std::vectorBasicBlock* Children;
+  Forest-getChildren(Current, Children);
+  for (std::vectorBasicBlock*::iterator I = Children.begin(),
+   E = Children.end(); I != E; ++I) {
 WorkList.push_back(*I);
   }
 }
 
-void proceedToSuccessor(DominatorTree::Node *Next) {
+void proceedToSuccessor(BasicBlock *Next) {
   WorkList.push_back(Next);
 }
 
 // Visits each instruction in the basic block.
-void visitBasicBlock(DominatorTree::Node *Node) {
-  BasicBlock *BB = Node-getBlock();
+void visitBasicBlock(BasicBlock *BB) {
   ETNode *ET = Forest-getNodeForBlock(BB);
   DOUT  Entering Basic Block:   BB-getName()
  (  ET-getDFSNumIn()  )\n;
   for (BasicBlock::iterator I = BB-begin(), E = BB-end(); I != E;) {
-visitInstruction(I++, Node, ET);
+visitInstruction(I++, BB, ET);
   }
 }
 
 // Tries to simplify each Instruction and add new properties to
 // the PropertySet.
-void visitInstruction(Instruction *I, DominatorTree::Node *DT, ETNode *ET) 
{
+void visitInstruction(Instruction *I, BasicBlock *node, ETNode *ET) {
   DOUT  Considering instruction   *I  \n;
   DEBUG(IG-dump());
 
@@ -2106,14 +2105,13 @@
 
   std::string name = I-getParent()-getName();
   DOUT  push (%  name  )\n;
-  Forwards visit(this, DT);
+  Forwards visit(this, node);
   visit.visit(*I);
   DOUT  pop (%  name  )\n;
 }
   };
 
   bool PredicateSimplifier::runOnFunction(Function F) {
-DT = getAnalysisDominatorTree();
 Forest = getAnalysisETForest();
 
 TargetData *TD = getAnalysisTargetData();
@@ -2127,12 +2125,12 @@
 BasicBlock *RootBlock = F.getEntryBlock();
 IG = new InequalityGraph(Forest-getNodeForBlock(RootBlock));
 VR = new ValueRanges(TD);
-WorkList.push_back(DT-getRootNode());
+WorkList.push_back(Forest-getRoot());
 
 do {
-  DominatorTree::Node *DTNode = WorkList.back();
+  BasicBlock *node = WorkList.back();
   WorkList.pop_back();
-  if (!UB.isDead(DTNode-getBlock())) visitBasicBlock(DTNode);
+  if (!UB.isDead(node)) visitBasicBlock(node);
 } while (!WorkList.empty());
 
 delete VR;
@@ -2144,12 +2142,12 @@
   }
 
   void PredicateSimplifier::Forwards::visitTerminatorInst(TerminatorInst TI) {
-PS-proceedToSuccessors(DTNode);
+PS-proceedToSuccessors(Node);
   }
 
   void 

[llvm-commits] Target itineraries tablegen fix

2007-04-21 Thread Christopher Lamb
I ran into a problem generating certain itineraries, and I think this fixes it... --Christopher Lamb

itineraries_fix.diff
Description: Binary data
 ___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h SelectionDAGNodes.h

2007-04-21 Thread Christopher Lamb


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAG.h updated: 1.147 - 1.148
SelectionDAGNodes.h updated: 1.185 - 1.186
---
Log message:


add support for alignment attributes on load/store instructions


---
Diffs of the changes:  (+10 -5)

 SelectionDAG.h  |   11 +++
 SelectionDAGNodes.h |4 +++-
 2 files changed, 10 insertions(+), 5 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAG.h
diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.147 
llvm/include/llvm/CodeGen/SelectionDAG.h:1.148
--- llvm/include/llvm/CodeGen/SelectionDAG.h:1.147  Fri Apr 20 16:38:10 2007
+++ llvm/include/llvm/CodeGen/SelectionDAG.hSat Apr 21 03:16:25 2007
@@ -311,10 +311,12 @@
   /// determined by their operands, and they produce a value AND a token chain.
   ///
   SDOperand getLoad(MVT::ValueType VT, SDOperand Chain, SDOperand Ptr,
-const Value *SV, int SVOffset, bool isVolatile=false);
+const Value *SV, int SVOffset, bool isVolatile=false,
+unsigned Alignment=0);
   SDOperand getExtLoad(ISD::LoadExtType ExtType, MVT::ValueType VT,
SDOperand Chain, SDOperand Ptr, const Value *SV,
-   int SVOffset, MVT::ValueType EVT, bool 
isVolatile=false);
+   int SVOffset, MVT::ValueType EVT, bool isVolatile=false,
+   unsigned Alignment=0);
   SDOperand getIndexedLoad(SDOperand OrigLoad, SDOperand Base,
SDOperand Offset, ISD::MemIndexedMode AM);
   SDOperand getVecLoad(unsigned Count, MVT::ValueType VT, SDOperand Chain, 
@@ -323,10 +325,11 @@
   /// getStore - Helper function to build ISD::STORE nodes.
   ///
   SDOperand getStore(SDOperand Chain, SDOperand Val, SDOperand Ptr,
- const Value *SV, int SVOffset, bool isVolatile=false);
+ const Value *SV, int SVOffset, bool isVolatile=false,
+ unsigned Alignment=0);
   SDOperand getTruncStore(SDOperand Chain, SDOperand Val, SDOperand Ptr,
   const Value *SV, int SVOffset, MVT::ValueType TVT,
-  bool isVolatile=false);
+  bool isVolatile=false, unsigned Alignment=0);
   SDOperand getIndexedStore(SDOperand OrigStoe, SDOperand Base,
SDOperand Offset, ISD::MemIndexedMode AM);
 


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.185 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.186
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.185 Fri Apr 20 16:38:10 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sat Apr 21 03:16:25 2007
@@ -1448,7 +1448,7 @@
   friend class SelectionDAG;
   LoadSDNode(SDOperand *ChainPtrOff, SDVTList VTs,
  ISD::MemIndexedMode AM, ISD::LoadExtType ETy, MVT::ValueType LVT,
- const Value *SV, int O=0, unsigned Align=1, bool Vol=false)
+ const Value *SV, int O=0, unsigned Align=0, bool Vol=false)
 : SDNode(ISD::LOAD, VTs),
   AddrMode(AM), ExtType(ETy), LoadedVT(LVT), SrcValue(SV), SVOffset(O),
   Alignment(Align), IsVolatile(Vol) {
@@ -1456,6 +1456,7 @@
 Ops[1] = ChainPtrOff[1]; // Ptr
 Ops[2] = ChainPtrOff[2]; // Off
 InitOperands(Ops, 3);
+assert(Align != 0  Loads should have non-zero aligment);
 assert((getOffset().getOpcode() == ISD::UNDEF ||
 AddrMode != ISD::UNINDEXED) 
Only indexed load has a non-undef offset operand);
@@ -1518,6 +1519,7 @@
 Ops[2] = ChainValuePtrOff[2]; // Ptr
 Ops[3] = ChainValuePtrOff[3]; // Off
 InitOperands(Ops, 4);
+assert(Align != 0  Stores should have non-zero aligment);
 assert((getOffset().getOpcode() == ISD::UNDEF || 
 AddrMode != ISD::UNINDEXED) 
Only indexed store has a non-undef offset operand);



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp

2007-04-21 Thread Christopher Lamb


Changes in directory llvm/lib/Bytecode/Reader:

Reader.cpp updated: 1.248 - 1.249
---
Log message:


add support for alignment attributes on load/store instructions


---
Diffs of the changes:  (+21 -3)

 Reader.cpp |   24 +---
 1 files changed, 21 insertions(+), 3 deletions(-)


Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.248 
llvm/lib/Bytecode/Reader/Reader.cpp:1.249
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.248   Thu Apr 12 13:32:50 2007
+++ llvm/lib/Bytecode/Reader/Reader.cpp Sat Apr 21 03:16:25 2007
@@ -831,13 +831,31 @@
  Idx[0], Idx.size());
   break;
 }
-case 62:   // volatile load
+case 62: {   // attributed load
+if (Oprnds.size() != 2 || !isaPointerType(InstTy))
+  error(Invalid attributed load instruction!);
+signed Log2AlignVal = ((Oprnds[1]1)-1);
+Result = new LoadInst(getValue(iType, Oprnds[0]), , (Oprnds[1]  1),
+  ((Log2AlignVal  0) ? 0 : 1Log2AlignVal));
+break;
+  }
 case Instruction::Load:
   if (Oprnds.size() != 1 || !isaPointerType(InstTy))
 error(Invalid load instruction!);
-  Result = new LoadInst(getValue(iType, Oprnds[0]), , Opcode == 62);
+  Result = new LoadInst(getValue(iType, Oprnds[0]), );
   break;
-case 63:   // volatile store
+case 63: {   // attributed store
+if (!isaPointerType(InstTy) || Oprnds.size() != 3)
+  error(Invalid store instruction!);
+
+Value *Ptr = getValue(iType, Oprnds[1]);
+const Type *ValTy = 
castPointerType(Ptr-getType())-getElementType();
+signed Log2AlignVal = ((Oprnds[2]1)-1);
+Result = new StoreInst(getValue(getTypeSlot(ValTy), Oprnds[0]), Ptr,
+   (Oprnds[2]  1), 
+   ((Log2AlignVal  0) ? 0 : 1Log2AlignVal));
+break;
+  }
 case Instruction::Store: {
   if (!isaPointerType(InstTy) || Oprnds.size() != 2)
 error(Invalid store instruction!);



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp

2007-04-21 Thread Christopher Lamb


Changes in directory llvm/lib/Bytecode/Writer:

Writer.cpp updated: 1.173 - 1.174
---
Log message:


add support for alignment attributes on load/store instructions


---
Diffs of the changes:  (+27 -5)

 Writer.cpp |   32 +++-
 1 files changed, 27 insertions(+), 5 deletions(-)


Index: llvm/lib/Bytecode/Writer/Writer.cpp
diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.173 
llvm/lib/Bytecode/Writer/Writer.cpp:1.174
--- llvm/lib/Bytecode/Writer/Writer.cpp:1.173   Mon Apr 16 18:32:28 2007
+++ llvm/lib/Bytecode/Writer/Writer.cpp Sat Apr 21 03:16:25 2007
@@ -616,7 +616,7 @@
   unsigned Opcode = I.getOpcode();
   unsigned NumOperands = I.getNumOperands();
 
-  // Encode 'tail call' as 61, 'volatile load' as 62, and 'volatile store' as
+  // Encode 'tail call' as 61
   // 63.
   if (const CallInst *CI = dyn_castCallInst(I)) {
 if (CI-getCallingConv() == CallingConv::C) {
@@ -632,10 +632,6 @@
 } else {
   Opcode = 58;  // Call escape sequence.
 }
-  } else if (isaLoadInst(I)  castLoadInst(I).isVolatile()) {
-Opcode = 62;
-  } else if (isaStoreInst(I)  castStoreInst(I).isVolatile()) {
-Opcode = 63;
   }
 
   // Figure out which type to encode with the instruction.  Typically we want
@@ -744,6 +740,32 @@
 } else if (isaInvokeInst(I)) {
   // Invoke escape seq has at least 4 operands to encode.
   ++NumOperands;
+} else if (const LoadInst *LI = dyn_castLoadInst(I)) {
+  // Encode attributed load as opcode 62
+  // We need to encode the attributes of the load instruction as the second
+  // operand. Its not really a slot, but we don't want to break the 
+  // instruction format for these instructions.
+  if (LI-getAlignment() || LI-isVolatile()) {
+NumOperands = 2;
+Slots[1] = ((Log2_32(LI-getAlignment())+1)1) + 
+(LI-isVolatile() ? 1 : 0);
+if (Slots[1]  MaxOpSlot) 
+  MaxOpSlot = Slots[1];
+Opcode = 62;
+  }
+} else if (const StoreInst *SI = dyn_castStoreInst(I)) {
+  // Encode attributed store as opcode 63
+  // We need to encode the attributes of the store instruction as the third
+  // operand. Its not really a slot, but we don't want to break the 
+  // instruction format for these instructions.
+  if (SI-getAlignment() || SI-isVolatile()) {
+NumOperands = 3;
+Slots[2] = ((Log2_32(SI-getAlignment())+1)1) + 
+(SI-isVolatile() ? 1 : 0);
+if (Slots[2]  MaxOpSlot) 
+  MaxOpSlot = Slots[2];
+Opcode = 63;
+  }
 }
 
 // Decide which instruction encoding to use.  This is determined primarily



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/docs/BytecodeFormat.html LangRef.html

2007-04-21 Thread Christopher Lamb


Changes in directory llvm/docs:

BytecodeFormat.html updated: 1.68 - 1.69
LangRef.html updated: 1.234 - 1.235
---
Log message:


add support for alignment attributes on load/store instructions


---
Diffs of the changes:  (+8 -8)

 BytecodeFormat.html |8 
 LangRef.html|8 
 2 files changed, 8 insertions(+), 8 deletions(-)


Index: llvm/docs/BytecodeFormat.html
diff -u llvm/docs/BytecodeFormat.html:1.68 llvm/docs/BytecodeFormat.html:1.69
--- llvm/docs/BytecodeFormat.html:1.68  Thu Apr 12 14:52:46 2007
+++ llvm/docs/BytecodeFormat.html   Sat Apr 21 03:16:24 2007
@@ -1587,15 +1587,15 @@
   trtdCall+FastCC+TailCall/tdtd59/tdtd5/tdtd1.5/td/tr
   trtdCall+FastCC/tdtd60/tdtd5/tdtd1.5/td/tr
   trtdCall+CCC+TailCall/tdtd61/tdtd5/tdtd1.5/td/tr
-  trtdLoad+Volatile/tdtd62/tdtd3/tdtd1.3/td/tr
-  trtdStore+Volatile/tdtd63/tdtd3/tdtd1.3/td/tr
+  trtdLoad+Attributes/tdtd62/tdtd7/tdtd2.0/td/tr
+  trtdStore+Attributes/tdtd63/tdtd7/tdtd2.0/td/tr
 /tbody
   /table
 
 pba name=pi_note* Note: /a/b
 These aren't really opcodes from an LLVM language perspective. They encode
 information into other opcodes without reserving space for that information. 
-For example, opcode=63 is a Volatile Store. The opcode for this
+For example, opcode=63 is an Attributed Store. The opcode for this
 instruction is 25 (Store) but we encode it as 63 to indicate that is a Volatile
 Store. The same is done for the calling conventions and tail calls.
 In each of these entries in range 56-63, the opcode is documented as the base
@@ -2097,7 +2097,7 @@
 a href=mailto:[EMAIL PROTECTED]Reid Spencer/a and a
  href=mailto:[EMAIL PROTECTED]Chris Lattner/abr
 a href=http://llvm.org;The LLVM Compiler Infrastructure/abr
-Last modified: $Date: 2007/04/12 19:52:46 $
+Last modified: $Date: 2007/04/21 08:16:24 $
 /address
 /body
 /html


Index: llvm/docs/LangRef.html
diff -u llvm/docs/LangRef.html:1.234 llvm/docs/LangRef.html:1.235
--- llvm/docs/LangRef.html:1.234Thu Apr 12 15:34:36 2007
+++ llvm/docs/LangRef.html  Sat Apr 21 03:16:25 2007
@@ -2609,7 +2609,7 @@
 Instruction/a /div
 div class=doc_text
 h5Syntax:/h5
-pre  lt;resultgt; = load lt;tygt;* lt;pointergt;br  lt;resultgt; = 
volatile load lt;tygt;* lt;pointergt;br/pre
+pre  lt;resultgt; = load lt;tygt;* lt;pointergt;[, align 
lt;alignmentgt;]br  lt;resultgt; = volatile load lt;tygt;* 
lt;pointergt;[, align lt;alignmentgt;]br/pre
 h5Overview:/h5
 pThe 'ttload/tt' instruction is used to read from memory./p
 h5Arguments:/h5
@@ -2634,8 +2634,8 @@
 Instruction/a /div
 div class=doc_text
 h5Syntax:/h5
-pre  store lt;tygt; lt;valuegt;, lt;tygt;* lt;pointergt; 
  i; yields {void}/i
-  volatile store lt;tygt; lt;valuegt;, lt;tygt;* lt;pointergt; 
  i; yields {void}/i
+pre  store lt;tygt; lt;valuegt;, lt;tygt;* lt;pointergt;[, align 
lt;alignmentgt;]   i; yields {void}/i
+  volatile store lt;tygt; lt;valuegt;, lt;tygt;* lt;pointergt;[, align 
lt;alignmentgt;]  i; yields {void}/i
 /pre
 h5Overview:/h5
 pThe 'ttstore/tt' instruction is used to write to memory./p
@@ -4732,7 +4732,7 @@
 
   a href=mailto:[EMAIL PROTECTED]Chris Lattner/abr
   a href=http://llvm.org;The LLVM Compiler Infrastructure/abr
-  Last modified: $Date: 2007/04/12 20:34:36 $
+  Last modified: $Date: 2007/04/21 08:16:25 $
 /address
 /body
 /html



___
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/DAGCombiner.cpp SelectionDAG.cpp SelectionDAGISel.cpp

2007-04-21 Thread Christopher Lamb


Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.293 - 1.294
SelectionDAG.cpp updated: 1.398 - 1.399
SelectionDAGISel.cpp updated: 1.421 - 1.422
---
Log message:


add support for alignment attributes on load/store instructions


---
Diffs of the changes:  (+79 -36)

 DAGCombiner.cpp  |   70 +--
 SelectionDAG.cpp |   33 +++-
 SelectionDAGISel.cpp |   12 +---
 3 files changed, 79 insertions(+), 36 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.293 
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.294
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.293 Tue Apr 17 22:06:49 2007
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp   Sat Apr 21 03:16:25 2007
@@ -1263,7 +1263,9 @@
 (!AfterLegalize || TLI.isLoadXLegal(ISD::ZEXTLOAD, EVT))) {
   SDOperand ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, LN0-getChain(),
  LN0-getBasePtr(), LN0-getSrcValue(),
- LN0-getSrcValueOffset(), EVT);
+ LN0-getSrcValueOffset(), EVT,
+ LN0-isVolatile(), 
+ LN0-getAlignment());
   AddToWorkList(N);
   CombineTo(N0.Val, ExtLoad, ExtLoad.getValue(1));
   return SDOperand(N, 0);   // Return N so it doesn't get rechecked!
@@ -1280,7 +1282,9 @@
 (!AfterLegalize || TLI.isLoadXLegal(ISD::ZEXTLOAD, EVT))) {
   SDOperand ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, LN0-getChain(),
  LN0-getBasePtr(), LN0-getSrcValue(),
- LN0-getSrcValueOffset(), EVT);
+ LN0-getSrcValueOffset(), EVT,
+ LN0-isVolatile(), 
+ LN0-getAlignment());
   AddToWorkList(N);
   CombineTo(N0.Val, ExtLoad, ExtLoad.getValue(1));
   return SDOperand(N, 0);   // Return N so it doesn't get rechecked!
@@ -1320,7 +1324,8 @@
 AddToWorkList(NewPtr.Val);
 SDOperand Load =
   DAG.getExtLoad(ISD::ZEXTLOAD, VT, LN0-getChain(), NewPtr,
- LN0-getSrcValue(), LN0-getSrcValueOffset(), EVT);
+ LN0-getSrcValue(), LN0-getSrcValueOffset(), EVT,
+ LN0-isVolatile(), LN0-getAlignment());
 AddToWorkList(N);
 CombineTo(N0.Val, Load, Load.getValue(1));
 return SDOperand(N, 0);   // Return N so it doesn't get rechecked!
@@ -2120,7 +2125,8 @@
 SDOperand ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, VT, LN0-getChain(),
LN0-getBasePtr(), LN0-getSrcValue(),
LN0-getSrcValueOffset(),
-   N0.getValueType());
+   N0.getValueType(), 
+   LN0-isVolatile());
 CombineTo(N, ExtLoad);
 CombineTo(N0.Val, DAG.getNode(ISD::TRUNCATE, N0.getValueType(), ExtLoad),
   ExtLoad.getValue(1));
@@ -2136,7 +2142,9 @@
 if (!AfterLegalize || TLI.isLoadXLegal(ISD::SEXTLOAD, EVT)) {
   SDOperand ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, VT, LN0-getChain(),
  LN0-getBasePtr(), LN0-getSrcValue(),
- LN0-getSrcValueOffset(), EVT);
+ LN0-getSrcValueOffset(), EVT,
+ LN0-isVolatile(), 
+ LN0-getAlignment());
   CombineTo(N, ExtLoad);
   CombineTo(N0.Val, DAG.getNode(ISD::TRUNCATE, N0.getValueType(), ExtLoad),
 ExtLoad.getValue(1));
@@ -2212,7 +2220,9 @@
 SDOperand ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, LN0-getChain(),
LN0-getBasePtr(), LN0-getSrcValue(),
LN0-getSrcValueOffset(),
-   N0.getValueType());
+   N0.getValueType(),
+   LN0-isVolatile(), 
+   LN0-getAlignment());
 CombineTo(N, ExtLoad);
 CombineTo(N0.Val, DAG.getNode(ISD::TRUNCATE, N0.getValueType(), ExtLoad),
   ExtLoad.getValue(1));
@@ -2227,7 +2237,9 @@
 MVT::ValueType EVT = LN0-getLoadedVT();
 SDOperand ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, LN0-getChain(),
LN0-getBasePtr(), LN0-getSrcValue(),
-   LN0-getSrcValueOffset(), EVT);
+   LN0-getSrcValueOffset(), EVT,
+   LN0-isVolatile(), 
+ 

[llvm-commits] CVS: llvm/CREDITS.TXT

2007-04-21 Thread Christopher Lamb


Changes in directory llvm:

CREDITS.TXT updated: 1.72 - 1.73
---
Log message:


add support for alignment attributes on load/store instructions


---
Diffs of the changes:  (+4 -0)

 CREDITS.TXT |4 
 1 files changed, 4 insertions(+)


Index: llvm/CREDITS.TXT
diff -u llvm/CREDITS.TXT:1.72 llvm/CREDITS.TXT:1.73
--- llvm/CREDITS.TXT:1.72   Wed Mar 21 16:45:25 2007
+++ llvm/CREDITS.TXTSat Apr 21 03:16:24 2007
@@ -118,6 +118,10 @@
 E: [EMAIL PROTECTED]
 D: Author of the original C backend
 
+N: Christopher Lamb
+E: [EMAIL PROTECTED]
+D: aligned load/store support
+
 N: Jim Laskey
 E: [EMAIL PROTECTED]
 D: Improvements to the PPC backend, instruction scheduling



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Assembler/2007-04-20-AlignedLoad.ll 2007-04-20-AlignedStore.ll

2007-04-21 Thread Christopher Lamb


Changes in directory llvm/test/Assembler:

2007-04-20-AlignedLoad.ll added (r1.1)
2007-04-20-AlignedStore.ll added (r1.1)
---
Log message:


add support for alignment attributes on load/store instructions


---
Diffs of the changes:  (+14 -0)

 2007-04-20-AlignedLoad.ll  |7 +++
 2007-04-20-AlignedStore.ll |7 +++
 2 files changed, 14 insertions(+)


Index: llvm/test/Assembler/2007-04-20-AlignedLoad.ll
diff -c /dev/null llvm/test/Assembler/2007-04-20-AlignedLoad.ll:1.1
*** /dev/null   Sat Apr 21 03:16:35 2007
--- llvm/test/Assembler/2007-04-20-AlignedLoad.ll   Sat Apr 21 03:16:25 2007
***
*** 0 
--- 1,7 
+ ; RUN: llvm-as  %s | llvm-dis | grep 'align 1024'
+ 
+ define i32 @test(i32* %arg) {
+ entry:
+ %tmp2 = load i32* %arg, align 1024  ; i32 [#uses=1]
+ ret i32 %tmp2
+ }


Index: llvm/test/Assembler/2007-04-20-AlignedStore.ll
diff -c /dev/null llvm/test/Assembler/2007-04-20-AlignedStore.ll:1.1
*** /dev/null   Sat Apr 21 03:17:12 2007
--- llvm/test/Assembler/2007-04-20-AlignedStore.ll  Sat Apr 21 03:16:25 2007
***
*** 0 
--- 1,7 
+ ; RUN: llvm-as  %s | llvm-dis | grep 'align 1024'
+ 
+ define void @test(i32* %arg) {
+ entry:
+ store i32 0, i32* %arg, align 1024
+ ret void
+ }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Instructions.cpp

2007-04-21 Thread Christopher Lamb


Changes in directory llvm/lib/VMCore:

AsmWriter.cpp updated: 1.270 - 1.271
Instructions.cpp updated: 1.85 - 1.86
---
Log message:


add support for alignment attributes on load/store instructions


---
Diffs of the changes:  (+49 -0)

 AsmWriter.cpp|7 +++
 Instructions.cpp |   42 ++
 2 files changed, 49 insertions(+)


Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.270 llvm/lib/VMCore/AsmWriter.cpp:1.271
--- llvm/lib/VMCore/AsmWriter.cpp:1.270 Tue Apr 17 19:57:22 2007
+++ llvm/lib/VMCore/AsmWriter.cpp   Sat Apr 21 03:16:25 2007
@@ -1307,6 +1307,13 @@
   writeOperand(I.getOperand(i), PrintAllTypes);
 }
   }
+  
+  // Print post operand alignment for load/store
+  if (isaLoadInst(I)  castLoadInst(I).getAlignment()) {
+Out  , align   castLoadInst(I).getAlignment();
+  } else if (isaStoreInst(I)  castStoreInst(I).getAlignment()) {
+Out  , align   castStoreInst(I).getAlignment();
+  }
 
   printInfoComment(I);
   Out  \n;


Index: llvm/lib/VMCore/Instructions.cpp
diff -u llvm/lib/VMCore/Instructions.cpp:1.85 
llvm/lib/VMCore/Instructions.cpp:1.86
--- llvm/lib/VMCore/Instructions.cpp:1.85   Fri Apr 13 19:12:57 2007
+++ llvm/lib/VMCore/Instructions.cppSat Apr 21 03:16:25 2007
@@ -20,6 +20,7 @@
 #include llvm/ParameterAttributes.h
 #include llvm/Support/CallSite.h
 #include llvm/Support/ConstantRange.h
+#include llvm/Support/MathExtras.h
 using namespace llvm;
 
 unsigned CallSite::getCallingConv() const {
@@ -685,6 +686,7 @@
   : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
  Load, Ptr, InsertBef) {
   setVolatile(false);
+  setAlignment(0);
   AssertOK();
   setName(Name);
 }
@@ -693,6 +695,7 @@
   : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
  Load, Ptr, InsertAE) {
   setVolatile(false);
+  setAlignment(0);
   AssertOK();
   setName(Name);
 }
@@ -702,6 +705,17 @@
   : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
  Load, Ptr, InsertBef) {
   setVolatile(isVolatile);
+  setAlignment(0);
+  AssertOK();
+  setName(Name);
+}
+
+LoadInst::LoadInst(Value *Ptr, const std::string Name, bool isVolatile, 
+   unsigned Align, Instruction *InsertBef)
+  : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
+ Load, Ptr, InsertBef) {
+  setVolatile(isVolatile);
+  setAlignment(Align);
   AssertOK();
   setName(Name);
 }
@@ -711,6 +725,7 @@
   : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
  Load, Ptr, InsertAE) {
   setVolatile(isVolatile);
+  setAlignment(0);
   AssertOK();
   setName(Name);
 }
@@ -721,6 +736,7 @@
   : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
  Load, Ptr, InsertBef) {
   setVolatile(false);
+  setAlignment(0);
   AssertOK();
   if (Name  Name[0]) setName(Name);
 }
@@ -729,6 +745,7 @@
   : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
  Load, Ptr, InsertAE) {
   setVolatile(false);
+  setAlignment(0);
   AssertOK();
   if (Name  Name[0]) setName(Name);
 }
@@ -738,6 +755,7 @@
 : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
Load, Ptr, InsertBef) {
   setVolatile(isVolatile);
+  setAlignment(0);
   AssertOK();
   if (Name  Name[0]) setName(Name);
 }
@@ -747,10 +765,15 @@
   : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
  Load, Ptr, InsertAE) {
   setVolatile(isVolatile);
+  setAlignment(0);
   AssertOK();
   if (Name  Name[0]) setName(Name);
 }
 
+void LoadInst::setAlignment(unsigned Align) {
+  assert((Align  (Align-1)) == 0  Alignment is not a power of 2!);
+  SubclassData = (SubclassData  1) | ((Log2_32(Align)+1)1);
+}
 
 
//===--===//
 //   StoreInst Implementation
@@ -770,6 +793,7 @@
   Ops[0].init(val, this);
   Ops[1].init(addr, this);
   setVolatile(false);
+  setAlignment(0);
   AssertOK();
 }
 
@@ -778,6 +802,7 @@
   Ops[0].init(val, this);
   Ops[1].init(addr, this);
   setVolatile(false);
+  setAlignment(0);
   AssertOK();
 }
 
@@ -787,6 +812,17 @@
   Ops[0].init(val, this);
   Ops[1].init(addr, this);
   setVolatile(isVolatile);
+  setAlignment(0);
+  AssertOK();
+}
+
+StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile,
+ unsigned Align, Instruction *InsertBefore)
+  : Instruction(Type::VoidTy, Store, Ops, 2, InsertBefore) {
+  Ops[0].init(val, this);
+  Ops[1].init(addr, this);
+  setVolatile(isVolatile);
+  setAlignment(Align);
   AssertOK();
 }
 
@@ -796,9 +832,15 @@
   Ops[0].init(val, this);
   Ops[1].init(addr, this);
   setVolatile(isVolatile);
+  setAlignment(0);
   AssertOK();
 }
 
+void StoreInst::setAlignment(unsigned Align) {
+  assert((Align  (Align-1)) == 0  Alignment is not 

[llvm-commits] CVS: llvm/include/llvm/Instructions.h

2007-04-21 Thread Christopher Lamb


Changes in directory llvm/include/llvm:

Instructions.h updated: 1.66 - 1.67
---
Log message:


add support for alignment attributes on load/store instructions


---
Diffs of the changes:  (+33 -7)

 Instructions.h |   40 +---
 1 files changed, 33 insertions(+), 7 deletions(-)


Index: llvm/include/llvm/Instructions.h
diff -u llvm/include/llvm/Instructions.h:1.66 
llvm/include/llvm/Instructions.h:1.67
--- llvm/include/llvm/Instructions.h:1.66   Fri Apr 13 19:12:57 2007
+++ llvm/include/llvm/Instructions.hSat Apr 21 03:16:25 2007
@@ -211,9 +211,11 @@
 /// SubclassData field in Value to store whether or not the load is volatile.
 ///
 class LoadInst : public UnaryInstruction {
+
   LoadInst(const LoadInst LI)
 : UnaryInstruction(LI.getType(), Load, LI.getOperand(0)) {
 setVolatile(LI.isVolatile());
+setAlignment(LI.getAlignment());
 
 #ifndef NDEBUG
 AssertOK();
@@ -223,14 +225,16 @@
 public:
   LoadInst(Value *Ptr, const std::string Name, Instruction *InsertBefore);
   LoadInst(Value *Ptr, const std::string Name, BasicBlock *InsertAtEnd);
-  LoadInst(Value *Ptr, const std::string Name, bool isVolatile = false,
+  LoadInst(Value *Ptr, const std::string Name, bool isVolatile = false, 
+   Instruction *InsertBefore = 0);
+  LoadInst(Value *Ptr, const std::string Name, bool isVolatile, unsigned 
Align,
Instruction *InsertBefore = 0);
   LoadInst(Value *Ptr, const std::string Name, bool isVolatile,
BasicBlock *InsertAtEnd);
 
   LoadInst(Value *Ptr, const char *Name, Instruction *InsertBefore);
   LoadInst(Value *Ptr, const char *Name, BasicBlock *InsertAtEnd);
-  explicit LoadInst(Value *Ptr, const char *Name = 0, bool isVolatile = false,
+  explicit LoadInst(Value *Ptr, const char *Name = 0, bool isVolatile = false, 
 Instruction *InsertBefore = 0);
   LoadInst(Value *Ptr, const char *Name, bool isVolatile,
BasicBlock *InsertAtEnd);
@@ -238,14 +242,23 @@
   /// isVolatile - Return true if this is a load from a volatile memory
   /// location.
   ///
-  bool isVolatile() const { return SubclassData; }
+  bool isVolatile() const { return SubclassData  1; }
 
   /// setVolatile - Specify whether this is a volatile load or not.
   ///
-  void setVolatile(bool V) { SubclassData = V; }
+  void setVolatile(bool V) { SubclassData = (SubclassData  ~1) | (V) ? 1 : 0; 
}
 
   virtual LoadInst *clone() const;
 
+  /// getAlignment - Return the alignment of the access that is being performed
+  ///
+  unsigned getAlignment() const {
+signed Log2AlignVal = ((SubclassData1)-1);
+return ((Log2AlignVal  0) ? 0 : 1Log2AlignVal);
+  }
+  
+  void setAlignment(unsigned Align);
+
   Value *getPointerOperand() { return getOperand(0); }
   const Value *getPointerOperand() const { return getOperand(0); }
   static unsigned getPointerOperandIndex() { return 0U; }
@@ -269,10 +282,13 @@
 ///
 class StoreInst : public Instruction {
   Use Ops[2];
+  
   StoreInst(const StoreInst SI) : Instruction(SI.getType(), Store, Ops, 2) {
 Ops[0].init(SI.Ops[0], this);
 Ops[1].init(SI.Ops[1], this);
 setVolatile(SI.isVolatile());
+setAlignment(SI.getAlignment());
+
 #ifndef NDEBUG
 AssertOK();
 #endif
@@ -283,17 +299,19 @@
   StoreInst(Value *Val, Value *Ptr, BasicBlock *InsertAtEnd);
   StoreInst(Value *Val, Value *Ptr, bool isVolatile = false,
 Instruction *InsertBefore = 0);
+  StoreInst(Value *Val, Value *Ptr, bool isVolatile,
+unsigned Align, Instruction *InsertBefore = 0);
   StoreInst(Value *Val, Value *Ptr, bool isVolatile, BasicBlock *InsertAtEnd);
 
 
   /// isVolatile - Return true if this is a load from a volatile memory
   /// location.
   ///
-  bool isVolatile() const { return SubclassData; }
+  bool isVolatile() const { return SubclassData  1; }
 
   /// setVolatile - Specify whether this is a volatile load or not.
   ///
-  void setVolatile(bool V) { SubclassData = V; }
+  void setVolatile(bool V) { SubclassData = (SubclassData  ~1) | (V) ? 1 : 0; 
}
 
   /// Transparently provide more efficient getOperand methods.
   Value *getOperand(unsigned i) const {
@@ -306,7 +324,15 @@
   }
   unsigned getNumOperands() const { return 2; }
 
-
+  /// getAlignment - Return the alignment of the access that is being performed
+  ///
+  unsigned getAlignment() const {
+signed Log2AlignVal = ((SubclassData1)-1);
+return ((Log2AlignVal  0) ? 0 : 1Log2AlignVal);
+  }
+  
+  void setAlignment(unsigned Align);
+  
   virtual StoreInst *clone() const;
 
   Value *getPointerOperand() { return getOperand(1); }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] [llvm] r36266 - /llvm/trunk/CREDITS.TXT

2007-04-21 Thread Anton Korobeynikov
Reid,

 I thought we were going to turn these into the actual user's name. Has
 that mapping gone away? I think the old CVS one make the reply-to field
 be the user's actual email address rather than [EMAIL PROTECTED].
 I think we need to do the same here. Otherwise the process of commit
 review gets harder.
Such mapping was done, but for all CVS-style accounts. David should
just add corresponding mapping username = e-mail to the special section
of the configuration file.

 Is this just failing because you were expecting reid instead of
 cscollab-rspencer.
Definitely. Script was pre-populated with all current CVS accounts'

  Author: cscollab-rspencer
 
 Real name would be nice here too.
Hmm. Ok, I'll see, what can be done here.

 If its a one line log comment, can we get it on the Log line,
 otherwise can we indent the lines a few of spaces, as in Modified: field
 below?
I'll check this.

 
  
  Modified:
  llvm/trunk/CREDITS.TXT
  
 

 I thought we were going to run the diff output through diffstat and
 insert the histogram here like we did for CVS?
Unfortunately, No. This isn't possible here, since diffs are generated
per each files separately. Including diffstat will need to redesign
everything.

 
  Modified: llvm/trunk/CREDITS.TXT
 

 The usual diff line here is Index:  Is this the way svn diff
 generates it or can we fix it?
Index is just CVS'ism. In fact, patch just ignores everything below
--- and +++ and treat them as comment.

-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics  Mechanics, Saint Petersburg State University.


___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] [llvm] r36266 - /llvm/trunk/CREDITS.TXT

2007-04-21 Thread Anton Korobeynikov
 Also, can we get a blank line after the URL?  My mail client turns  
 the URL and the  into one url...
Will check.

-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics  Mechanics, Saint Petersburg State University.


___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] [llvm] r36266 - /llvm/trunk/CREDITS.TXT

2007-04-21 Thread Anton Korobeynikov
Hello, Chris.

 Can we just have the post-commit script fakemail that it is  
 [EMAIL PROTECTED] sending it?
Exactly in this way it should work now. username=e-mail map just don't
know what to do with user cscollab-rspencer, since is assumes, that
Reid is using username reid :)

-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics  Mechanics, Saint Petersburg State University.


___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86AsmPrinter.cpp X86ISelLowering.cpp X86ISelLowering.h X86InstrInfo.td

2007-04-21 Thread Anton Korobeynikov
 Presumably the win32 ABI uses completely different mechanisms for  
 TLS. 
Definitely. As it applies to ELF targets only, maybe it's worth to guard
stuff with assert(Subtarget-isTargetELF)?

-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics  Mechanics, Saint Petersburg State University.


___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86AsmPrinter.cpp X86ISelLowering.cpp X86ISelLowering.h X86InstrInfo.td

2007-04-21 Thread Anton Korobeynikov

 +SDOperand
 +X86TargetLowering::LowerGlobalTLSAddress(SDOperand Op, SelectionDAG
 DAG) {
 +  // TODO: implement the local dynamic model
 +  // TODO: implement the initial execmodel for pic executables 
 +  assert(!Subtarget-is64Bit()  TLS not implemented for X86_64);
 +  GlobalAddressSDNode *GA = castGlobalAddressSDNode(Op);
Well, it seems assert should be:
assert(!Subtarget-is64Bit()  Subtarget-isTargetELF()  TLS not
implemented for non-ELF and 64-bit targets);

-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics  Mechanics, Saint Petersburg State University.


___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] Function aliases

2007-04-21 Thread Anton Korobeynikov
Hello, Chris.

 I disagree.  They *act like* functions or GV's, but they really  
 aren't them.  For example, (from m understanding), it is not legal to  
 give an alias a function body or a global variable initializer.
After stripping alias target they are nothing more than just external
declarations. That's why I'm thinking it's just GV or Function plus
small addendum.

 No, you wouldn't need both classes, just a single one.
But function aliases can, for example, definitely have CC. It acts like
normal Function.

 Two things: getCalledFunction already returns null if the callee is  
 not a function, e.g. an indirect call.  All of the users of this  
 method will already do the right thing and treat aliases as unknown  
 calls.  This will be correct.
But it's not indirect call. getCalledFunction() should return function
part of function alias.

 I'd expect the linker (or something else) to want to resolve through  
 aliases if the alias, if the actual destination function is around.   
This seems to be useful feature. However, usually aliases are introduces
when no alias target exists in the current module.

I think the best solution is the one submitted by Gordon:

1. Introduce new table (or use some current) in the Module for alias
targets.
2. User normal Function's and GV's for aliases. They will be just
external function/variable *declarations*. Everything will be ok. 
3. Add methods addAlias(), removeAlias() to GV class to add/remove
entries to alias target table. +some utility functions to deal with this
table during e.g. object destruction/copying.
4. Let Verifier to reject that GV's and Functions, which has
initializer/body and entry in the alias target table.
5. AsmParser should reject usage of alias and initializer/body as well.
6. Let Linker to propagate alias targets, if possible.
7. During codegen query alias target entry for each MO_ExternalSymbol to
check, whether there is any alias. And emit needed code.

Sounds better?

-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics  Mechanics, Saint Petersburg State University.


___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] Major regressions

2007-04-21 Thread Jeff Cohen
Commits in the last 12 hours or so have broken 34 regression tests and 
caused 21 failure in llvm-test.  They appear to be concentrated in the 
vector area.

___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/Instructions.h

2007-04-21 Thread Jeff Cohen


Changes in directory llvm/include/llvm:

Instructions.h updated: 1.67 - 1.68
---
Log message:

The expression SubclassData = (SubclassData  ~1) | (V) ? 1 : 0; does not do 
what
was intended!  | has higher precedence than ?.  Caught by Visual Studio.


---
Diffs of the changes:  (+2 -2)

 Instructions.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/Instructions.h
diff -u llvm/include/llvm/Instructions.h:1.67 
llvm/include/llvm/Instructions.h:1.68
--- llvm/include/llvm/Instructions.h:1.67   Sat Apr 21 03:16:25 2007
+++ llvm/include/llvm/Instructions.hSat Apr 21 09:32:59 2007
@@ -246,7 +246,7 @@
 
   /// setVolatile - Specify whether this is a volatile load or not.
   ///
-  void setVolatile(bool V) { SubclassData = (SubclassData  ~1) | (V) ? 1 : 0; 
}
+  void setVolatile(bool V) { SubclassData = (SubclassData  ~1) | unsigned(V); 
}
 
   virtual LoadInst *clone() const;
 
@@ -311,7 +311,7 @@
 
   /// setVolatile - Specify whether this is a volatile load or not.
   ///
-  void setVolatile(bool V) { SubclassData = (SubclassData  ~1) | (V) ? 1 : 0; 
}
+  void setVolatile(bool V) { SubclassData = (SubclassData  ~1) | unsigned(V); 
}
 
   /// Transparently provide more efficient getOperand methods.
   Value *getOperand(unsigned i) const {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/include/llvm/Instructions.h

2007-04-21 Thread Jeff Cohen
Jeff Cohen wrote:
 Changes in directory llvm/include/llvm:

 Instructions.h updated: 1.67 - 1.68
 ---
 Log message:

 The expression SubclassData = (SubclassData  ~1) | (V) ? 1 : 0; does not 
 do what
 was intended!  | has higher precedence than ?.  Caught by Visual Studio.
   

Unfortunately, this wasn't the cause of the failures.  It didn't fix a 
single one.  They look like this:

FAIL: /usr/home/jeffc/llvm/test/CodeGen/X86/vec_zero.ll: exit(1) at line 1
while running: llvm-upgrade  
/usr/home/jeffc/llvm/test/CodeGen/X86/vec_zero.ll | llvm-as | llc 
-march=x86 -mattr=+sse2 | grep xorps | wc -l | grep 2
Assertion failed: (0  ValueType does not correspond to LLVM type!), 
function getTypeForValueType, file 
/usr/home/jeffc/llvm/lib/VMCore/ValueTypes.cpp, line 91.



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] Nightly tester annoyance

2007-04-21 Thread Jeff Cohen
The nightly tester has acquired the bad habit of believing a regression 
test has changed it's name whenever the test changes from failing to 
passing or vice versa.

For example,

Added Tests:
test/CFrontend/2007-04-11-InlineAsmUnion.c


Removed Tests:
test/CFrontend/2007-04-11-InlineAsmUnion.c: exit(1) at line 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/GlobalValue.h

2007-04-21 Thread Jeff Cohen


Changes in directory llvm/include/llvm:

GlobalValue.h updated: 1.36 - 1.37
---
Log message:

Fix breakage of bytecode reader when built with VC++.

---
Diffs of the changes:  (+4 -2)

 GlobalValue.h |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/GlobalValue.h
diff -u llvm/include/llvm/GlobalValue.h:1.36 
llvm/include/llvm/GlobalValue.h:1.37
--- llvm/include/llvm/GlobalValue.h:1.36Mon Apr 16 23:31:29 2007
+++ llvm/include/llvm/GlobalValue.h Sat Apr 21 10:29:13 2007
@@ -55,8 +55,10 @@
   }
 
   Module *Parent;
-  LinkageTypes Linkage : 4;   // The linkage of this global
-  VisibilityTypes Visibility : 1;  // The visibility style of this global
+  // Note: VC++ treats enums as signed, so an extra bit is required to prevent
+  // Linkage and Visibility from turning into negative values.
+  LinkageTypes Linkage : 5;   // The linkage of this global
+  VisibilityTypes Visibility : 2;  // The visibility style of this global
   unsigned Alignment : 16;// Alignment of this symbol, must be power of two
   std::string Section;// Section to emit this into, empty mean default
 public:



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86AsmPrinter.cpp X86ISelLowering.cpp X86ISelLowering.h X86InstrInfo.td

2007-04-21 Thread Lauro Ramos Venancio

 Thanks Lauro, very nice!  Should the TLS bug be closed now?

Now I will implement PIC and TLS for arm-linux, then I will close the
PR941 and open a bug report for each target that doesn't implement
TLS.

Lauro
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineRelocation.h

2007-04-21 Thread Jeff Cohen


Changes in directory llvm/include/llvm/CodeGen:

MachineRelocation.h updated: 1.12 - 1.13
---
Log message:

Make enum-valued bitfield large enough to avoid interpretation as negative 
values in VC++.

---
Diffs of the changes:  (+1 -1)

 MachineRelocation.h |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/MachineRelocation.h
diff -u llvm/include/llvm/CodeGen/MachineRelocation.h:1.12 
llvm/include/llvm/CodeGen/MachineRelocation.h:1.13
--- llvm/include/llvm/CodeGen/MachineRelocation.h:1.12  Sun Dec 10 20:19:29 2006
+++ llvm/include/llvm/CodeGen/MachineRelocation.h   Sat Apr 21 11:29:37 2007
@@ -63,7 +63,7 @@
   } Target;
 
   unsigned TargetReloType : 6; // The target relocation ID.
-  AddressType AddrType: 3; // The field of Target to use.
+  AddressType AddrType: 4; // The field of Target to use.
   bool DoesntNeedFnStub   : 1; // True if we don't need a fn stub.
   bool GOTRelative: 1; // Should this relocation be relative to the 
GOT?
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] [llvm] r36266 - /llvm/trunk/CREDITS.TXT

2007-04-21 Thread Reid Spencer
On Sat, 2007-04-21 at 00:13 -0700, Chris Lattner wrote:
 On Apr 20, 2007, at 9:06 PM, Reid Spencer wrote:
 
  On Fri, 2007-04-20 at 20:46 -0700, Chris Lattner wrote:
  Urg, this is going to come from [EMAIL PROTECTED] ?
 
  I've asked David to fix this. He said he would forward my request  
  on to
  the authentication people at UIUC. He said they aren't likely to  
  give us
  prefix-less user names.
 
  The more issues we run into with UIUC the more I'm not liking how this
  is turning out.
 
 Can we just have the post-commit script fakemail that it is  
 [EMAIL PROTECTED] sending it?

We need to do that anyway, but having one set of user names for
pre-conversion and one set for post-conversion is going to double and
confuse historical queries like svn blame. It also makes things like
gathering statistics on user activity harder because you have to merge
pre-conversion and post-conversion results.  

Reid.

 
 -Chris
 
  Reid.
 
 
  Yuck.  Can we get a mapping table like we have for cvs committers?
 
  -Chris
 
  Begin forwarded message:
 
  From: [EMAIL PROTECTED]
  Date: April 20, 2007 8:40:04 PM PDT
  To: llvm-commits@cs.uiuc.edu
  Subject: [llvm-commits] [llvm] r36266 - /llvm/trunk/CREDITS.TXT
  Reply-To: CVS Commit Messages for LLVM repository llvm-
  [EMAIL PROTECTED]
 
  Author: cscollab-rspencer
  Date: Fri Apr 20 22:40:04 2007
  New Revision: 36266
 
  URL: http://subversion.cs.uiuc.edu/viewvc/llvm?rev=36266view=rev
  Log:
  Add a credit.
 
  Modified:
  llvm/trunk/CREDITS.TXT
 
  Modified: llvm/trunk/CREDITS.TXT
  URL: http://subversion.cs.uiuc.edu/viewvc/llvm/llvm/trunk/
  CREDITS.TXT?rev=36266r1=36265r2=36266view=diff
   
  ==
  
  --- llvm/trunk/CREDITS.TXT (original)
  +++ llvm/trunk/CREDITS.TXT Fri Apr 20 22:40:04 2007
  @@ -191,7 +191,7 @@
   D: Stacker, llvmc, llvm-ld, llvm-ar, llvm2cpp, lib/Archive, lib/
  Linker,
   D: lib/System, bytecode enhancements, symtab hacking,
  unoverloading of
   D: intrinsics, makefile and configuration system, documentation,
  various bug
  -D: fixing.
  +D: fixing, Subversion migration.
 
   N: Adam Treat
   E: [EMAIL PROTECTED]
 
 
  ___
  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


Re: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp

2007-04-21 Thread Reid Spencer
Christopher,

On Sat, 2007-04-21 at 03:17 -0500, Christopher Lamb wrote:
 
 Changes in directory llvm/lib/Bytecode/Writer:
 
 Writer.cpp updated: 1.173 - 1.174
 ---
 Log message:
 
 
 add support for alignment attributes on load/store instructions
 
 
 ---
 Diffs of the changes:  (+27 -5)
 
  Writer.cpp |   32 +++-
  1 files changed, 27 insertions(+), 5 deletions(-)
 
 
 Index: llvm/lib/Bytecode/Writer/Writer.cpp
 diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.173 
 llvm/lib/Bytecode/Writer/Writer.cpp:1.174
 --- llvm/lib/Bytecode/Writer/Writer.cpp:1.173 Mon Apr 16 18:32:28 2007
 +++ llvm/lib/Bytecode/Writer/Writer.cpp   Sat Apr 21 03:16:25 2007
 @@ -616,7 +616,7 @@
unsigned Opcode = I.getOpcode();
unsigned NumOperands = I.getNumOperands();
  
 -  // Encode 'tail call' as 61, 'volatile load' as 62, and 'volatile store' as
 +  // Encode 'tail call' as 61
// 63.
if (const CallInst *CI = dyn_castCallInst(I)) {
  if (CI-getCallingConv() == CallingConv::C) {
 @@ -632,10 +632,6 @@
  } else {
Opcode = 58;  // Call escape sequence.
  }
 -  } else if (isaLoadInst(I)  castLoadInst(I).isVolatile()) {
 -Opcode = 62;
 -  } else if (isaStoreInst(I)  castStoreInst(I).isVolatile()) {
 -Opcode = 63;
}
  
// Figure out which type to encode with the instruction.  Typically we want
 @@ -744,6 +740,32 @@
  } else if (isaInvokeInst(I)) {
// Invoke escape seq has at least 4 operands to encode.
++NumOperands;
 +} else if (const LoadInst *LI = dyn_castLoadInst(I)) {
 +  // Encode attributed load as opcode 62
 +  // We need to encode the attributes of the load instruction as the 
 second
 +  // operand. Its not really a slot, but we don't want to break the 
 +  // instruction format for these instructions.
 +  if (LI-getAlignment() || LI-isVolatile()) {
 +NumOperands = 2;
 +Slots[1] = ((Log2_32(LI-getAlignment())+1)1) + 
 +(LI-isVolatile() ? 1 : 0);

Is this Log2_32 really needed? The alignment should already be a power
of two.  If the alignment is something like 7 then you'll get rounding
to 8 but I contend that an alignment of 7 can't happen. This can be
assured in the bcreader and the asmparser.

 +if (Slots[1]  MaxOpSlot) 
 +  MaxOpSlot = Slots[1];
 +Opcode = 62;
 +  }
 +} else if (const StoreInst *SI = dyn_castStoreInst(I)) {
 +  // Encode attributed store as opcode 63
 +  // We need to encode the attributes of the store instruction as the 
 third
 +  // operand. Its not really a slot, but we don't want to break the 
 +  // instruction format for these instructions.
 +  if (SI-getAlignment() || SI-isVolatile()) {
 +NumOperands = 3;
 +Slots[2] = ((Log2_32(SI-getAlignment())+1)1) + 
 +(SI-isVolatile() ? 1 : 0);
 +if (Slots[2]  MaxOpSlot) 
 +  MaxOpSlot = Slots[2];
 +Opcode = 63;
 +  }
  }
  
  // Decide which instruction encoding to use.  This is determined 
 primarily
 
 
 
 ___
 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


Re: [llvm-commits] Nightly tester annoyance

2007-04-21 Thread Reid Spencer
Jeff,

Please file a bug for this. It is a consequence of the new dejagnu
tester. Its output is different and the nightly tester's regex for
matching the test name needs to be improved.

Reid.

On Sat, 2007-04-21 at 07:45 -0700, Jeff Cohen wrote:
 The nightly tester has acquired the bad habit of believing a regression 
 test has changed it's name whenever the test changes from failing to 
 passing or vice versa.
 
 For example,
 
 Added Tests:
 test/CFrontend/2007-04-11-InlineAsmUnion.c
 
 
 Removed Tests:
 test/CFrontend/2007-04-11-InlineAsmUnion.c: exit(1) at line 1
 
 
 
 ___
 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


Re: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineRelocation.h

2007-04-21 Thread Reid Spencer
Jeff,


On Sat, 2007-04-21 at 11:29 -0500, Jeff Cohen wrote:
 
 Changes in directory llvm/include/llvm/CodeGen:
 
 MachineRelocation.h updated: 1.12 - 1.13
 ---
 Log message:
 
 Make enum-valued bitfield large enough to avoid interpretation as negative 
 values in VC++.
 
 ---
 Diffs of the changes:  (+1 -1)
 
  MachineRelocation.h |2 +-
  1 files changed, 1 insertion(+), 1 deletion(-)
 
 
 Index: llvm/include/llvm/CodeGen/MachineRelocation.h
 diff -u llvm/include/llvm/CodeGen/MachineRelocation.h:1.12 
 llvm/include/llvm/CodeGen/MachineRelocation.h:1.13
 --- llvm/include/llvm/CodeGen/MachineRelocation.h:1.12Sun Dec 10 
 20:19:29 2006
 +++ llvm/include/llvm/CodeGen/MachineRelocation.h Sat Apr 21 11:29:37 2007
 @@ -63,7 +63,7 @@
} Target;
  
unsigned TargetReloType : 6; // The target relocation ID.
 -  AddressType AddrType: 3; // The field of Target to use.
 +  AddressType AddrType: 4; // The field of Target to use.

Can't we just make AddressType unsigned ?  Surely VC++ won't treat
something explicitly declared as unsigned as a signed quantity. Then we
shouldn't need the extra bit, right?

Reid.

bool DoesntNeedFnStub   : 1; // True if we don't need a fn stub.
bool GOTRelative: 1; // Should this relocation be relative to the 
 GOT?
  
 
 
 
 ___
 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


Re: [llvm-commits] Function aliases

2007-04-21 Thread Reid Spencer
I've lost track of this dicsussion because it has occurred over so many
emails. Could we please put this into a bugzilla so that it is all in
one place? There is a bugzilla for this alias feature, right?  If not,
Anton, please create one and summarize the various arguments that are
being made here. We shouldn't be having design meetings in
llvm-commits :)

Reid.

On Sat, 2007-04-21 at 14:21 +0400, Anton Korobeynikov wrote:
 Hello, Chris.
 
  I disagree.  They *act like* functions or GV's, but they really  
  aren't them.  For example, (from m understanding), it is not legal to  
  give an alias a function body or a global variable initializer.
 After stripping alias target they are nothing more than just external
 declarations. That's why I'm thinking it's just GV or Function plus
 small addendum.
 
  No, you wouldn't need both classes, just a single one.
 But function aliases can, for example, definitely have CC. It acts like
 normal Function.
 
  Two things: getCalledFunction already returns null if the callee is  
  not a function, e.g. an indirect call.  All of the users of this  
  method will already do the right thing and treat aliases as unknown  
  calls.  This will be correct.
 But it's not indirect call. getCalledFunction() should return function
 part of function alias.
 
  I'd expect the linker (or something else) to want to resolve through  
  aliases if the alias, if the actual destination function is around.   
 This seems to be useful feature. However, usually aliases are introduces
 when no alias target exists in the current module.
 
 I think the best solution is the one submitted by Gordon:
 
 1. Introduce new table (or use some current) in the Module for alias
 targets.
 2. User normal Function's and GV's for aliases. They will be just
 external function/variable *declarations*. Everything will be ok. 
 3. Add methods addAlias(), removeAlias() to GV class to add/remove
 entries to alias target table. +some utility functions to deal with this
 table during e.g. object destruction/copying.
 4. Let Verifier to reject that GV's and Functions, which has
 initializer/body and entry in the alias target table.
 5. AsmParser should reject usage of alias and initializer/body as well.
 6. Let Linker to propagate alias targets, if possible.
 7. During codegen query alias target entry for each MO_ExternalSymbol to
 check, whether there is any alias. And emit needed code.
 
 Sounds better?
 

___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/lib/ExecutionEngine/Interpreter:

ExternalFunctions.cpp updated: 1.97 - 1.98
---
Log message:

We only need one putchar which gives it a shot at getting matched by its
users.


---
Diffs of the changes:  (+4 -17)

 ExternalFunctions.cpp |   21 -
 1 files changed, 4 insertions(+), 17 deletions(-)


Index: llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
diff -u llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.97 
llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.98
--- llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.97 Fri Mar 
30 11:41:50 2007
+++ llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp  Sat Apr 21 
12:11:45 2007
@@ -112,20 +112,8 @@
 //
 extern C {  // Don't add C++ manglings to llvm mangling :)
 
-// void putchar(sbyte)
-GenericValue lle_VB_putchar(FunctionType *FT, const vectorGenericValue 
Args){
-  cout  ((char)Args[0].IntVal.getZExtValue());
-  return GenericValue();
-}
-
-// int putchar(int)
-GenericValue lle_ii_putchar(FunctionType *FT, const vectorGenericValue 
Args){
-  cout  ((char)Args[0].IntVal.getZExtValue())  std::flush;
-  return Args[0];
-}
-
 // void putchar(ubyte)
-GenericValue lle_Vb_putchar(FunctionType *FT, const vectorGenericValue 
Args){
+GenericValue lle_X_putchar(FunctionType *FT, const vectorGenericValue Args){
   cout  ((char)Args[0].IntVal.getZExtValue())  std::flush;
   return Args[0];
 }
@@ -354,13 +342,14 @@
   break;
 }
   }
+  return GV;
 }
 
 // int printf(sbyte *, ...) - a very rough implementation to make output 
useful.
 GenericValue lle_X_printf(FunctionType *FT, const vectorGenericValue Args) {
   char Buffer[1];
   vectorGenericValue NewArgs;
-  NewArgs.push_back(PTOGV(Buffer));
+  NewArgs.push_back(PTOGV((void*)Buffer[0]));
   NewArgs.insert(NewArgs.end(), Args.begin(), Args.end());
   GenericValue GV = lle_X_sprintf(FT, NewArgs);
   cout  Buffer;
@@ -704,9 +693,7 @@
 
 
 void Interpreter::initializeExternalFunctions() {
-  FuncNames[lle_Vb_putchar] = lle_Vb_putchar;
-  FuncNames[lle_ii_putchar] = lle_ii_putchar;
-  FuncNames[lle_VB_putchar] = lle_VB_putchar;
+  FuncNames[lle_X_putchar]  = lle_X_putchar;
   FuncNames[lle_X_exit] = lle_X_exit;
   FuncNames[lle_X_abort]= lle_X_abort;
   FuncNames[lle_X_malloc]   = lle_X_malloc;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] Major regressions

2007-04-21 Thread Reid Spencer
Jeff,

I'm seeing these too. They all seem to be related to Christopher Lamb's
alignment changes. If he doesn't step up to fix soon, I'll revert the
changes.

Reid.

On Sat, 2007-04-21 at 07:30 -0700, Jeff Cohen wrote:
 Commits in the last 12 hours or so have broken 34 regression tests and 
 caused 21 failure in llvm-test.  They appear to be concentrated in the 
 vector area.
 
 ___
 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


Re: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineRelocation.h

2007-04-21 Thread Jeff Cohen

Reid Spencer wrote:

Jeff,


On Sat, 2007-04-21 at 11:29 -0500, Jeff Cohen wrote:
  

Changes in directory llvm/include/llvm/CodeGen:

MachineRelocation.h updated: 1.12 - 1.13
---
Log message:

Make enum-valued bitfield large enough to avoid interpretation as negative 
values in VC++.

---
Diffs of the changes:  (+1 -1)

 MachineRelocation.h |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/MachineRelocation.h
diff -u llvm/include/llvm/CodeGen/MachineRelocation.h:1.12 
llvm/include/llvm/CodeGen/MachineRelocation.h:1.13
--- llvm/include/llvm/CodeGen/MachineRelocation.h:1.12  Sun Dec 10 20:19:29 2006
+++ llvm/include/llvm/CodeGen/MachineRelocation.h   Sat Apr 21 11:29:37 2007
@@ -63,7 +63,7 @@
   } Target;
 
   unsigned TargetReloType : 6; // The target relocation ID.

-  AddressType AddrType: 3; // The field of Target to use.
+  AddressType AddrType: 4; // The field of Target to use.



Can't we just make AddressType unsigned ?  Surely VC++ won't treat
something explicitly declared as unsigned as a signed quantity. Then we
shouldn't need the extra bit, right?

Reid.


Not without inserting a whole bunch of casts elsewhere.  Unsigneds 
cannot be assigned to enums.
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp

2007-04-21 Thread Jeff Cohen
Reid Spencer wrote:
 Christopher,

 I'll answer my own question .. You're compressing the alignment to a
 smaller value by extracting its log. I didn't get that until I read the
 Reader.cpp code :)

 Reid.

It's still very expensive.  There are alternative approaches that are 
much faster and may still be suitable, like finding the position of the 
first non-zero bit.

___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp

2007-04-21 Thread Jeff Cohen
Jeff Cohen wrote:
 Reid Spencer wrote:
   
 Christopher,

 I'll answer my own question .. You're compressing the alignment to a
 smaller value by extracting its log. I didn't get that until I read the
 Reader.cpp code :)

 Reid.
 

 It's still very expensive.  There are alternative approaches that are 
 much faster and may still be suitable, like finding the position of the 
 first non-zero bit.

Never mind... that's what you are doing...

___
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/bits.h

2007-04-21 Thread Reid Spencer


Changes in directory llvm-test/SingleSource/UnitTests/Integer:

bits.h updated: 1.2 - 1.3
---
Log message:

Add some more types.


---
Diffs of the changes:  (+3 -2)

 bits.h |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Index: llvm-test/SingleSource/UnitTests/Integer/bits.h
diff -u llvm-test/SingleSource/UnitTests/Integer/bits.h:1.2 
llvm-test/SingleSource/UnitTests/Integer/bits.h:1.3
--- llvm-test/SingleSource/UnitTests/Integer/bits.h:1.2 Tue Apr 17 19:53:49 2007
+++ llvm-test/SingleSource/UnitTests/Integer/bits.h Sat Apr 21 12:45:07 2007
@@ -43,8 +43,9 @@
 typedef int __attribute__((bitwidth(33))) int33;
 
 typedef int __attribute__((bitwidth(169))) int169;
-typedef unsigned int __attribute__((bitwidth(250))) Int250;
-typedef unsigned int __attribute__((bitwidth(256))) Int256;
+typedef unsigned int __attribute__((bitwidth(250))) int250;
+typedef unsigned int __attribute__((bitwidth(256))) int256;
+typedef unsigned int __attribute__((bitwidth(256))) int500;
 
 #define bitwidthof(TORV) (__bitwidthof__(typeof(TORV)))
 



___
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/test4.c bits.h

2007-04-21 Thread Reid Spencer


Changes in directory llvm-test/SingleSource/UnitTests/Integer:

test4.c added (r1.1)
bits.h updated: 1.3 - 1.4
---
Log message:

Add test case.


---
Diffs of the changes:  (+31 -0)

 bits.h  |5 +
 test4.c |   26 ++
 2 files changed, 31 insertions(+)


Index: llvm-test/SingleSource/UnitTests/Integer/test4.c
diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/test4.c:1.1
*** /dev/null   Sat Apr 21 12:48:09 2007
--- llvm-test/SingleSource/UnitTests/Integer/test4.cSat Apr 21 12:47:59 2007
***
*** 0 
--- 1,26 
+ 
+ #include bits.h
+ 
+ 
+ int main(int argc, char ** argv)
+ {
+   uint68 n;
+   uint63 t1;
+   uint3 t2;
+   uint128 t3;
+   unsigned long long t4;
+ 
+   t4 = bit_concat((uint25) -1, (uint39)-1);
+   printBits(t4);
+   printf(\n);
+   
+ 
+ 
+   n = -1;
+   t3 = bit_concat(n, (uint60)-1);
+   printBits(t3);
+   printf(\n);
+   
+   
+   return 0;
+ }


Index: llvm-test/SingleSource/UnitTests/Integer/bits.h
diff -u llvm-test/SingleSource/UnitTests/Integer/bits.h:1.3 
llvm-test/SingleSource/UnitTests/Integer/bits.h:1.4
--- llvm-test/SingleSource/UnitTests/Integer/bits.h:1.3 Sat Apr 21 12:45:07 2007
+++ llvm-test/SingleSource/UnitTests/Integer/bits.h Sat Apr 21 12:47:59 2007
@@ -27,12 +27,17 @@
 typedef unsigned int __attribute__((bitwidth(17))) uint17;
 typedef unsigned int __attribute__((bitwidth(19))) uint19;
 typedef unsigned int __attribute__((bitwidth(21))) uint21;
+typedef unsigned int __attribute__((bitwidth(25))) uint25;
 typedef unsigned int __attribute__((bitwidth(17))) uint32;
 typedef unsigned int __attribute__((bitwidth(36))) uint36;
+typedef unsigned int __attribute__((bitwidth(39))) uint39;
 typedef unsigned int __attribute__((bitwidth(47))) uint47;
 typedef unsigned int __attribute__((bitwidth(48))) uint48;
+typedef unsigned int __attribute__((bitwidth(60))) uint60;
+typedef unsigned int __attribute__((bitwidth(63))) uint63;
 typedef unsigned int __attribute__((bitwidth(64))) uint64;
 typedef unsigned int __attribute__((bitwidth(65))) uint65;
+typedef unsigned int __attribute__((bitwidth(68))) uint68;
 typedef unsigned int __attribute__((bitwidth(128))) uint128;
 
 typedef int __attribute__ ((bitwidth(9))) int9;



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] Nightly tester annoyance

2007-04-21 Thread Chris Lattner

On Apr 21, 2007, at 9:51 AM, Reid Spencer wrote:

 Jeff,

 Please file a bug for this. It is a consequence of the new dejagnu
 tester. Its output is different and the nightly tester's regex for
 matching the test name needs to be improved.

I agree, this is greatly annoying.  I think it would be fixed by just  
adding a PR suffix only and always.

-Chris
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-21 Thread Duncan Sands
 +catch { set file_h [ open /tmp/llvm_obj_check.m w] }
 +set R [ catch { exec $llvmgcc -c /tmp/llvm_obj_check.m  -o /dev/null 
  /tmp/llvm_obj_check.out } ]

Will using /tmp and /dev/null work properly under Windows?

Ciao,

Duncan.
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86AsmPrinter.cpp X86ISelLowering.cpp X86ISelLowering.h X86InstrInfo.td

2007-04-21 Thread Chris Lattner

On Apr 21, 2007, at 9:23 AM, Lauro Ramos Venancio wrote:


 Thanks Lauro, very nice!  Should the TLS bug be closed now?

 Now I will implement PIC and TLS for arm-linux, then I will close the
 PR941 and open a bug report for each target that doesn't implement
 TLS.

I'd prefer to just have it be in the README.txt for each target.  We  
don't need NxM PRs for each feature x each target that is missing :)

Thanks again Lauro,

-Chris
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] Nightly tester annoyance

2007-04-21 Thread Reid Spencer
On Sat, 2007-04-21 at 11:18 -0700, Chris Lattner wrote:
 On Apr 21, 2007, at 9:51 AM, Reid Spencer wrote:
 
  Jeff,
 
  Please file a bug for this. It is a consequence of the new dejagnu
  tester. Its output is different and the nightly tester's regex for
  matching the test name needs to be improved.
 
 I agree, this is greatly annoying.  I think it would be fixed by just  
 adding a PR suffix only and always.

If you know what the issue is, please fix it. I'm not sure it has
anything to do with the PR suffix.


 
 -Chris
 ___
 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] CVS: llvm/include/llvm/Instructions.h

2007-04-21 Thread Reid Spencer


Changes in directory llvm/include/llvm:

Instructions.h updated: 1.68 - 1.69
---
Log message:

Revert Christopher Lamb's load/store alignment changes. 


---
Diffs of the changes:  (+7 -33)

 Instructions.h |   40 +++-
 1 files changed, 7 insertions(+), 33 deletions(-)


Index: llvm/include/llvm/Instructions.h
diff -u llvm/include/llvm/Instructions.h:1.68 
llvm/include/llvm/Instructions.h:1.69
--- llvm/include/llvm/Instructions.h:1.68   Sat Apr 21 09:32:59 2007
+++ llvm/include/llvm/Instructions.hSat Apr 21 13:36:27 2007
@@ -211,11 +211,9 @@
 /// SubclassData field in Value to store whether or not the load is volatile.
 ///
 class LoadInst : public UnaryInstruction {
-
   LoadInst(const LoadInst LI)
 : UnaryInstruction(LI.getType(), Load, LI.getOperand(0)) {
 setVolatile(LI.isVolatile());
-setAlignment(LI.getAlignment());
 
 #ifndef NDEBUG
 AssertOK();
@@ -225,16 +223,14 @@
 public:
   LoadInst(Value *Ptr, const std::string Name, Instruction *InsertBefore);
   LoadInst(Value *Ptr, const std::string Name, BasicBlock *InsertAtEnd);
-  LoadInst(Value *Ptr, const std::string Name, bool isVolatile = false, 
-   Instruction *InsertBefore = 0);
-  LoadInst(Value *Ptr, const std::string Name, bool isVolatile, unsigned 
Align,
+  LoadInst(Value *Ptr, const std::string Name, bool isVolatile = false,
Instruction *InsertBefore = 0);
   LoadInst(Value *Ptr, const std::string Name, bool isVolatile,
BasicBlock *InsertAtEnd);
 
   LoadInst(Value *Ptr, const char *Name, Instruction *InsertBefore);
   LoadInst(Value *Ptr, const char *Name, BasicBlock *InsertAtEnd);
-  explicit LoadInst(Value *Ptr, const char *Name = 0, bool isVolatile = false, 
+  explicit LoadInst(Value *Ptr, const char *Name = 0, bool isVolatile = false,
 Instruction *InsertBefore = 0);
   LoadInst(Value *Ptr, const char *Name, bool isVolatile,
BasicBlock *InsertAtEnd);
@@ -242,23 +238,14 @@
   /// isVolatile - Return true if this is a load from a volatile memory
   /// location.
   ///
-  bool isVolatile() const { return SubclassData  1; }
+  bool isVolatile() const { return SubclassData; }
 
   /// setVolatile - Specify whether this is a volatile load or not.
   ///
-  void setVolatile(bool V) { SubclassData = (SubclassData  ~1) | unsigned(V); 
}
+  void setVolatile(bool V) { SubclassData = V; }
 
   virtual LoadInst *clone() const;
 
-  /// getAlignment - Return the alignment of the access that is being performed
-  ///
-  unsigned getAlignment() const {
-signed Log2AlignVal = ((SubclassData1)-1);
-return ((Log2AlignVal  0) ? 0 : 1Log2AlignVal);
-  }
-  
-  void setAlignment(unsigned Align);
-
   Value *getPointerOperand() { return getOperand(0); }
   const Value *getPointerOperand() const { return getOperand(0); }
   static unsigned getPointerOperandIndex() { return 0U; }
@@ -282,13 +269,10 @@
 ///
 class StoreInst : public Instruction {
   Use Ops[2];
-  
   StoreInst(const StoreInst SI) : Instruction(SI.getType(), Store, Ops, 2) {
 Ops[0].init(SI.Ops[0], this);
 Ops[1].init(SI.Ops[1], this);
 setVolatile(SI.isVolatile());
-setAlignment(SI.getAlignment());
-
 #ifndef NDEBUG
 AssertOK();
 #endif
@@ -299,19 +283,17 @@
   StoreInst(Value *Val, Value *Ptr, BasicBlock *InsertAtEnd);
   StoreInst(Value *Val, Value *Ptr, bool isVolatile = false,
 Instruction *InsertBefore = 0);
-  StoreInst(Value *Val, Value *Ptr, bool isVolatile,
-unsigned Align, Instruction *InsertBefore = 0);
   StoreInst(Value *Val, Value *Ptr, bool isVolatile, BasicBlock *InsertAtEnd);
 
 
   /// isVolatile - Return true if this is a load from a volatile memory
   /// location.
   ///
-  bool isVolatile() const { return SubclassData  1; }
+  bool isVolatile() const { return SubclassData; }
 
   /// setVolatile - Specify whether this is a volatile load or not.
   ///
-  void setVolatile(bool V) { SubclassData = (SubclassData  ~1) | unsigned(V); 
}
+  void setVolatile(bool V) { SubclassData = V; }
 
   /// Transparently provide more efficient getOperand methods.
   Value *getOperand(unsigned i) const {
@@ -324,15 +306,7 @@
   }
   unsigned getNumOperands() const { return 2; }
 
-  /// getAlignment - Return the alignment of the access that is being performed
-  ///
-  unsigned getAlignment() const {
-signed Log2AlignVal = ((SubclassData1)-1);
-return ((Log2AlignVal  0) ? 0 : 1Log2AlignVal);
-  }
-  
-  void setAlignment(unsigned Align);
-  
+
   virtual StoreInst *clone() const;
 
   Value *getPointerOperand() { return getOperand(1); }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/lib/Bytecode/Writer:

Writer.cpp updated: 1.174 - 1.175
---
Log message:

Revert Christopher Lamb's load/store alignment changes. 


---
Diffs of the changes:  (+5 -27)

 Writer.cpp |   32 +---
 1 files changed, 5 insertions(+), 27 deletions(-)


Index: llvm/lib/Bytecode/Writer/Writer.cpp
diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.174 
llvm/lib/Bytecode/Writer/Writer.cpp:1.175
--- llvm/lib/Bytecode/Writer/Writer.cpp:1.174   Sat Apr 21 03:16:25 2007
+++ llvm/lib/Bytecode/Writer/Writer.cpp Sat Apr 21 13:36:27 2007
@@ -616,7 +616,7 @@
   unsigned Opcode = I.getOpcode();
   unsigned NumOperands = I.getNumOperands();
 
-  // Encode 'tail call' as 61
+  // Encode 'tail call' as 61, 'volatile load' as 62, and 'volatile store' as
   // 63.
   if (const CallInst *CI = dyn_castCallInst(I)) {
 if (CI-getCallingConv() == CallingConv::C) {
@@ -632,6 +632,10 @@
 } else {
   Opcode = 58;  // Call escape sequence.
 }
+  } else if (isaLoadInst(I)  castLoadInst(I).isVolatile()) {
+Opcode = 62;
+  } else if (isaStoreInst(I)  castStoreInst(I).isVolatile()) {
+Opcode = 63;
   }
 
   // Figure out which type to encode with the instruction.  Typically we want
@@ -740,32 +744,6 @@
 } else if (isaInvokeInst(I)) {
   // Invoke escape seq has at least 4 operands to encode.
   ++NumOperands;
-} else if (const LoadInst *LI = dyn_castLoadInst(I)) {
-  // Encode attributed load as opcode 62
-  // We need to encode the attributes of the load instruction as the second
-  // operand. Its not really a slot, but we don't want to break the 
-  // instruction format for these instructions.
-  if (LI-getAlignment() || LI-isVolatile()) {
-NumOperands = 2;
-Slots[1] = ((Log2_32(LI-getAlignment())+1)1) + 
-(LI-isVolatile() ? 1 : 0);
-if (Slots[1]  MaxOpSlot) 
-  MaxOpSlot = Slots[1];
-Opcode = 62;
-  }
-} else if (const StoreInst *SI = dyn_castStoreInst(I)) {
-  // Encode attributed store as opcode 63
-  // We need to encode the attributes of the store instruction as the third
-  // operand. Its not really a slot, but we don't want to break the 
-  // instruction format for these instructions.
-  if (SI-getAlignment() || SI-isVolatile()) {
-NumOperands = 3;
-Slots[2] = ((Log2_32(SI-getAlignment())+1)1) + 
-(SI-isVolatile() ? 1 : 0);
-if (Slots[2]  MaxOpSlot) 
-  MaxOpSlot = Slots[2];
-Opcode = 63;
-  }
 }
 
 // Decide which instruction encoding to use.  This is determined primarily



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Instructions.cpp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/lib/VMCore:

AsmWriter.cpp updated: 1.271 - 1.272
Instructions.cpp updated: 1.86 - 1.87
---
Log message:

Revert Christopher Lamb's load/store alignment changes. 


---
Diffs of the changes:  (+0 -49)

 AsmWriter.cpp|7 ---
 Instructions.cpp |   42 --
 2 files changed, 49 deletions(-)


Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.271 llvm/lib/VMCore/AsmWriter.cpp:1.272
--- llvm/lib/VMCore/AsmWriter.cpp:1.271 Sat Apr 21 03:16:25 2007
+++ llvm/lib/VMCore/AsmWriter.cpp   Sat Apr 21 13:36:27 2007
@@ -1307,13 +1307,6 @@
   writeOperand(I.getOperand(i), PrintAllTypes);
 }
   }
-  
-  // Print post operand alignment for load/store
-  if (isaLoadInst(I)  castLoadInst(I).getAlignment()) {
-Out  , align   castLoadInst(I).getAlignment();
-  } else if (isaStoreInst(I)  castStoreInst(I).getAlignment()) {
-Out  , align   castStoreInst(I).getAlignment();
-  }
 
   printInfoComment(I);
   Out  \n;


Index: llvm/lib/VMCore/Instructions.cpp
diff -u llvm/lib/VMCore/Instructions.cpp:1.86 
llvm/lib/VMCore/Instructions.cpp:1.87
--- llvm/lib/VMCore/Instructions.cpp:1.86   Sat Apr 21 03:16:25 2007
+++ llvm/lib/VMCore/Instructions.cppSat Apr 21 13:36:27 2007
@@ -20,7 +20,6 @@
 #include llvm/ParameterAttributes.h
 #include llvm/Support/CallSite.h
 #include llvm/Support/ConstantRange.h
-#include llvm/Support/MathExtras.h
 using namespace llvm;
 
 unsigned CallSite::getCallingConv() const {
@@ -686,7 +685,6 @@
   : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
  Load, Ptr, InsertBef) {
   setVolatile(false);
-  setAlignment(0);
   AssertOK();
   setName(Name);
 }
@@ -695,7 +693,6 @@
   : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
  Load, Ptr, InsertAE) {
   setVolatile(false);
-  setAlignment(0);
   AssertOK();
   setName(Name);
 }
@@ -705,17 +702,6 @@
   : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
  Load, Ptr, InsertBef) {
   setVolatile(isVolatile);
-  setAlignment(0);
-  AssertOK();
-  setName(Name);
-}
-
-LoadInst::LoadInst(Value *Ptr, const std::string Name, bool isVolatile, 
-   unsigned Align, Instruction *InsertBef)
-  : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
- Load, Ptr, InsertBef) {
-  setVolatile(isVolatile);
-  setAlignment(Align);
   AssertOK();
   setName(Name);
 }
@@ -725,7 +711,6 @@
   : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
  Load, Ptr, InsertAE) {
   setVolatile(isVolatile);
-  setAlignment(0);
   AssertOK();
   setName(Name);
 }
@@ -736,7 +721,6 @@
   : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
  Load, Ptr, InsertBef) {
   setVolatile(false);
-  setAlignment(0);
   AssertOK();
   if (Name  Name[0]) setName(Name);
 }
@@ -745,7 +729,6 @@
   : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
  Load, Ptr, InsertAE) {
   setVolatile(false);
-  setAlignment(0);
   AssertOK();
   if (Name  Name[0]) setName(Name);
 }
@@ -755,7 +738,6 @@
 : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
Load, Ptr, InsertBef) {
   setVolatile(isVolatile);
-  setAlignment(0);
   AssertOK();
   if (Name  Name[0]) setName(Name);
 }
@@ -765,15 +747,10 @@
   : UnaryInstruction(castPointerType(Ptr-getType())-getElementType(),
  Load, Ptr, InsertAE) {
   setVolatile(isVolatile);
-  setAlignment(0);
   AssertOK();
   if (Name  Name[0]) setName(Name);
 }
 
-void LoadInst::setAlignment(unsigned Align) {
-  assert((Align  (Align-1)) == 0  Alignment is not a power of 2!);
-  SubclassData = (SubclassData  1) | ((Log2_32(Align)+1)1);
-}
 
 
//===--===//
 //   StoreInst Implementation
@@ -793,7 +770,6 @@
   Ops[0].init(val, this);
   Ops[1].init(addr, this);
   setVolatile(false);
-  setAlignment(0);
   AssertOK();
 }
 
@@ -802,7 +778,6 @@
   Ops[0].init(val, this);
   Ops[1].init(addr, this);
   setVolatile(false);
-  setAlignment(0);
   AssertOK();
 }
 
@@ -812,17 +787,6 @@
   Ops[0].init(val, this);
   Ops[1].init(addr, this);
   setVolatile(isVolatile);
-  setAlignment(0);
-  AssertOK();
-}
-
-StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile,
- unsigned Align, Instruction *InsertBefore)
-  : Instruction(Type::VoidTy, Store, Ops, 2, InsertBefore) {
-  Ops[0].init(val, this);
-  Ops[1].init(addr, this);
-  setVolatile(isVolatile);
-  setAlignment(Align);
   AssertOK();
 }
 
@@ -832,15 +796,9 @@
   Ops[0].init(val, this);
   Ops[1].init(addr, this);
   setVolatile(isVolatile);
-  setAlignment(0);
   AssertOK();
 }
 
-void StoreInst::setAlignment(unsigned Align) {
-  assert((Align  (Align-1)) == 0  Alignment is not a power 

[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h SelectionDAGNodes.h

2007-04-21 Thread Reid Spencer


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAG.h updated: 1.148 - 1.149
SelectionDAGNodes.h updated: 1.186 - 1.187
---
Log message:

Revert Christopher Lamb's load/store alignment changes. 


---
Diffs of the changes:  (+5 -10)

 SelectionDAG.h  |   11 ---
 SelectionDAGNodes.h |4 +---
 2 files changed, 5 insertions(+), 10 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAG.h
diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.148 
llvm/include/llvm/CodeGen/SelectionDAG.h:1.149
--- llvm/include/llvm/CodeGen/SelectionDAG.h:1.148  Sat Apr 21 03:16:25 2007
+++ llvm/include/llvm/CodeGen/SelectionDAG.hSat Apr 21 13:36:27 2007
@@ -311,12 +311,10 @@
   /// determined by their operands, and they produce a value AND a token chain.
   ///
   SDOperand getLoad(MVT::ValueType VT, SDOperand Chain, SDOperand Ptr,
-const Value *SV, int SVOffset, bool isVolatile=false,
-unsigned Alignment=0);
+const Value *SV, int SVOffset, bool isVolatile=false);
   SDOperand getExtLoad(ISD::LoadExtType ExtType, MVT::ValueType VT,
SDOperand Chain, SDOperand Ptr, const Value *SV,
-   int SVOffset, MVT::ValueType EVT, bool isVolatile=false,
-   unsigned Alignment=0);
+   int SVOffset, MVT::ValueType EVT, bool 
isVolatile=false);
   SDOperand getIndexedLoad(SDOperand OrigLoad, SDOperand Base,
SDOperand Offset, ISD::MemIndexedMode AM);
   SDOperand getVecLoad(unsigned Count, MVT::ValueType VT, SDOperand Chain, 
@@ -325,11 +323,10 @@
   /// getStore - Helper function to build ISD::STORE nodes.
   ///
   SDOperand getStore(SDOperand Chain, SDOperand Val, SDOperand Ptr,
- const Value *SV, int SVOffset, bool isVolatile=false,
- unsigned Alignment=0);
+ const Value *SV, int SVOffset, bool isVolatile=false);
   SDOperand getTruncStore(SDOperand Chain, SDOperand Val, SDOperand Ptr,
   const Value *SV, int SVOffset, MVT::ValueType TVT,
-  bool isVolatile=false, unsigned Alignment=0);
+  bool isVolatile=false);
   SDOperand getIndexedStore(SDOperand OrigStoe, SDOperand Base,
SDOperand Offset, ISD::MemIndexedMode AM);
 


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.186 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.187
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.186 Sat Apr 21 03:16:25 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sat Apr 21 13:36:27 2007
@@ -1448,7 +1448,7 @@
   friend class SelectionDAG;
   LoadSDNode(SDOperand *ChainPtrOff, SDVTList VTs,
  ISD::MemIndexedMode AM, ISD::LoadExtType ETy, MVT::ValueType LVT,
- const Value *SV, int O=0, unsigned Align=0, bool Vol=false)
+ const Value *SV, int O=0, unsigned Align=1, bool Vol=false)
 : SDNode(ISD::LOAD, VTs),
   AddrMode(AM), ExtType(ETy), LoadedVT(LVT), SrcValue(SV), SVOffset(O),
   Alignment(Align), IsVolatile(Vol) {
@@ -1456,7 +1456,6 @@
 Ops[1] = ChainPtrOff[1]; // Ptr
 Ops[2] = ChainPtrOff[2]; // Off
 InitOperands(Ops, 3);
-assert(Align != 0  Loads should have non-zero aligment);
 assert((getOffset().getOpcode() == ISD::UNDEF ||
 AddrMode != ISD::UNINDEXED) 
Only indexed load has a non-undef offset operand);
@@ -1519,7 +1518,6 @@
 Ops[2] = ChainValuePtrOff[2]; // Ptr
 Ops[3] = ChainValuePtrOff[3]; // Off
 InitOperands(Ops, 4);
-assert(Align != 0  Stores should have non-zero aligment);
 assert((getOffset().getOpcode() == ISD::UNDEF || 
 AddrMode != ISD::UNINDEXED) 
Only indexed store has a non-undef offset operand);



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/lib/Bytecode/Reader:

Reader.cpp updated: 1.249 - 1.250
---
Log message:

Revert Christopher Lamb's load/store alignment changes. 


---
Diffs of the changes:  (+3 -21)

 Reader.cpp |   24 +++-
 1 files changed, 3 insertions(+), 21 deletions(-)


Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.249 
llvm/lib/Bytecode/Reader/Reader.cpp:1.250
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.249   Sat Apr 21 03:16:25 2007
+++ llvm/lib/Bytecode/Reader/Reader.cpp Sat Apr 21 13:36:27 2007
@@ -831,31 +831,13 @@
  Idx[0], Idx.size());
   break;
 }
-case 62: {   // attributed load
-if (Oprnds.size() != 2 || !isaPointerType(InstTy))
-  error(Invalid attributed load instruction!);
-signed Log2AlignVal = ((Oprnds[1]1)-1);
-Result = new LoadInst(getValue(iType, Oprnds[0]), , (Oprnds[1]  1),
-  ((Log2AlignVal  0) ? 0 : 1Log2AlignVal));
-break;
-  }
+case 62:   // volatile load
 case Instruction::Load:
   if (Oprnds.size() != 1 || !isaPointerType(InstTy))
 error(Invalid load instruction!);
-  Result = new LoadInst(getValue(iType, Oprnds[0]), );
+  Result = new LoadInst(getValue(iType, Oprnds[0]), , Opcode == 62);
   break;
-case 63: {   // attributed store
-if (!isaPointerType(InstTy) || Oprnds.size() != 3)
-  error(Invalid store instruction!);
-
-Value *Ptr = getValue(iType, Oprnds[1]);
-const Type *ValTy = 
castPointerType(Ptr-getType())-getElementType();
-signed Log2AlignVal = ((Oprnds[2]1)-1);
-Result = new StoreInst(getValue(getTypeSlot(ValTy), Oprnds[0]), Ptr,
-   (Oprnds[2]  1), 
-   ((Log2AlignVal  0) ? 0 : 1Log2AlignVal));
-break;
-  }
+case 63:   // volatile store
 case Instruction::Store: {
   if (!isaPointerType(InstTy) || Oprnds.size() != 2)
 error(Invalid store instruction!);



___
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/DAGCombiner.cpp SelectionDAG.cpp SelectionDAGISel.cpp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.294 - 1.295
SelectionDAG.cpp updated: 1.399 - 1.400
SelectionDAGISel.cpp updated: 1.422 - 1.423
---
Log message:

Revert Christopher Lamb's load/store alignment changes. 


---
Diffs of the changes:  (+36 -79)

 DAGCombiner.cpp  |   70 +--
 SelectionDAG.cpp |   33 
 SelectionDAGISel.cpp |   12 +++-
 3 files changed, 36 insertions(+), 79 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.294 
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.295
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.294 Sat Apr 21 03:16:25 2007
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp   Sat Apr 21 13:36:27 2007
@@ -1263,9 +1263,7 @@
 (!AfterLegalize || TLI.isLoadXLegal(ISD::ZEXTLOAD, EVT))) {
   SDOperand ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, LN0-getChain(),
  LN0-getBasePtr(), LN0-getSrcValue(),
- LN0-getSrcValueOffset(), EVT,
- LN0-isVolatile(), 
- LN0-getAlignment());
+ LN0-getSrcValueOffset(), EVT);
   AddToWorkList(N);
   CombineTo(N0.Val, ExtLoad, ExtLoad.getValue(1));
   return SDOperand(N, 0);   // Return N so it doesn't get rechecked!
@@ -1282,9 +1280,7 @@
 (!AfterLegalize || TLI.isLoadXLegal(ISD::ZEXTLOAD, EVT))) {
   SDOperand ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, LN0-getChain(),
  LN0-getBasePtr(), LN0-getSrcValue(),
- LN0-getSrcValueOffset(), EVT,
- LN0-isVolatile(), 
- LN0-getAlignment());
+ LN0-getSrcValueOffset(), EVT);
   AddToWorkList(N);
   CombineTo(N0.Val, ExtLoad, ExtLoad.getValue(1));
   return SDOperand(N, 0);   // Return N so it doesn't get rechecked!
@@ -1324,8 +1320,7 @@
 AddToWorkList(NewPtr.Val);
 SDOperand Load =
   DAG.getExtLoad(ISD::ZEXTLOAD, VT, LN0-getChain(), NewPtr,
- LN0-getSrcValue(), LN0-getSrcValueOffset(), EVT,
- LN0-isVolatile(), LN0-getAlignment());
+ LN0-getSrcValue(), LN0-getSrcValueOffset(), EVT);
 AddToWorkList(N);
 CombineTo(N0.Val, Load, Load.getValue(1));
 return SDOperand(N, 0);   // Return N so it doesn't get rechecked!
@@ -2125,8 +2120,7 @@
 SDOperand ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, VT, LN0-getChain(),
LN0-getBasePtr(), LN0-getSrcValue(),
LN0-getSrcValueOffset(),
-   N0.getValueType(), 
-   LN0-isVolatile());
+   N0.getValueType());
 CombineTo(N, ExtLoad);
 CombineTo(N0.Val, DAG.getNode(ISD::TRUNCATE, N0.getValueType(), ExtLoad),
   ExtLoad.getValue(1));
@@ -2142,9 +2136,7 @@
 if (!AfterLegalize || TLI.isLoadXLegal(ISD::SEXTLOAD, EVT)) {
   SDOperand ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, VT, LN0-getChain(),
  LN0-getBasePtr(), LN0-getSrcValue(),
- LN0-getSrcValueOffset(), EVT,
- LN0-isVolatile(), 
- LN0-getAlignment());
+ LN0-getSrcValueOffset(), EVT);
   CombineTo(N, ExtLoad);
   CombineTo(N0.Val, DAG.getNode(ISD::TRUNCATE, N0.getValueType(), ExtLoad),
 ExtLoad.getValue(1));
@@ -2220,9 +2212,7 @@
 SDOperand ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, LN0-getChain(),
LN0-getBasePtr(), LN0-getSrcValue(),
LN0-getSrcValueOffset(),
-   N0.getValueType(),
-   LN0-isVolatile(), 
-   LN0-getAlignment());
+   N0.getValueType());
 CombineTo(N, ExtLoad);
 CombineTo(N0.Val, DAG.getNode(ISD::TRUNCATE, N0.getValueType(), ExtLoad),
   ExtLoad.getValue(1));
@@ -2237,9 +2227,7 @@
 MVT::ValueType EVT = LN0-getLoadedVT();
 SDOperand ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, LN0-getChain(),
LN0-getBasePtr(), LN0-getSrcValue(),
-   LN0-getSrcValueOffset(), EVT,
-   LN0-isVolatile(), 
-   LN0-getAlignment());
+   

Re: [llvm-commits] Nightly tester annoyance

2007-04-21 Thread Chris Lattner

On Apr 21, 2007, at 11:29 AM, Reid Spencer wrote:

 On Sat, 2007-04-21 at 11:18 -0700, Chris Lattner wrote:
 On Apr 21, 2007, at 9:51 AM, Reid Spencer wrote:

 Jeff,

 Please file a bug for this. It is a consequence of the new dejagnu
 tester. Its output is different and the nightly tester's regex for
 matching the test name needs to be improved.

 I agree, this is greatly annoying.  I think it would be fixed by just
 adding a PR suffix only and always.

 If you know what the issue is, please fix it. I'm not sure it has
 anything to do with the PR suffix.

The problem is that your tcl stuff is putting the failing line as a  
suffix for the test.  Don't do that

-Chris
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test/lib:

llvm.exp updated: 1.16 - 1.17
---
Log message:

Put failure information on a separate line. Hopefully this unbreaks the
nightly tester which expects the FAIL: line to only have the test name on
it.


---
Diffs of the changes:  (+4 -4)

 llvm.exp |8 
 1 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/test/lib/llvm.exp
diff -u llvm/test/lib/llvm.exp:1.16 llvm/test/lib/llvm.exp:1.17
--- llvm/test/lib/llvm.exp:1.16 Fri Apr 20 16:24:01 2007
+++ llvm/test/lib/llvm.exp  Sat Apr 21 13:46:52 2007
@@ -13,21 +13,21 @@
   CHILDSTATUS {
 set status [lindex $::errorCode 2]
 if { $status != 0 } {
-  set resultmsg $test: exit($status)$errmsg
+  set resultmsg $test\nFailed with exit($status)$errmsg
 }
   }
   CHILDKILLED {
 set signal [lindex $::errorCode 2]
-set resultmsg $test: signal($signal)$errmsg
+set resultmsg $test\nFailed with signal($signal)$errmsg
   }
   CHILDSUSP {
 set signal [lindex $::errorCode 2]
-set resultmsg $test: suspend($signal)$errmsg
+set resultmsg $test\nFailed with suspend($signal)$errmsg
   }
   POSIX {
 set posixNum [lindex $::errorCode 1]
 set posixMsg [lindex $::errorCode 2]
-set resultmsg $test: posix($posixNum,$posixMsg)$errmsg
+set resultmsg $test\nFailed with posix($posixNum,$posixMsg)$errmsg
   }
   NONE {
   }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-21 Thread Jeff Cohen
The only way to run the tests under Windows is to use cygwin, using an 
LLVM built with cygwin/mingw.  Windows does not have /tmp (unless you 
create it yourself) and it does not have /dev/null (unless cygwin 
emulates it somehow).  I only build LLVM on Windows with Visual Studio, 
so someone else who has will have to give a definitive answer.


Duncan Sands wrote:

+catch { set file_h [ open /tmp/llvm_obj_check.m w] }
+set R [ catch { exec $llvmgcc -c /tmp/llvm_obj_check.m  -o /dev/null  
/tmp/llvm_obj_check.out } ]



Will using /tmp and /dev/null work properly under Windows?

Ciao,

Duncan.
___
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] CVS: llvm/test/lib/llvm.exp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test/lib:

llvm.exp updated: 1.17 - 1.18
---
Log message:

Always print the same PR information in the same location (just after
the test name) in all cases (PASS, XPASS, FAIL, XFAIL). This makes the
output consistent and more amenable to parsing by nightly test.


---
Diffs of the changes:  (+5 -5)

 llvm.exp |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/test/lib/llvm.exp
diff -u llvm/test/lib/llvm.exp:1.17 llvm/test/lib/llvm.exp:1.18
--- llvm/test/lib/llvm.exp:1.17 Sat Apr 21 13:46:52 2007
+++ llvm/test/lib/llvm.exp  Sat Apr 21 13:53:12 2007
@@ -8,26 +8,26 @@
 if { $PRS != } {
   set PRS  for $PRS 
 }
-set errmsg  at line $lineno$PRS\nwhile running: $line\n$errmsg
+set errmsg  at line $lineno\nwhile running: $line\n$errmsg
 switch $code {
   CHILDSTATUS {
 set status [lindex $::errorCode 2]
 if { $status != 0 } {
-  set resultmsg $test\nFailed with exit($status)$errmsg
+  set resultmsg $test$PRS\nFailed with exit($status)$errmsg
 }
   }
   CHILDKILLED {
 set signal [lindex $::errorCode 2]
-set resultmsg $test\nFailed with signal($signal)$errmsg
+set resultmsg $test$PRS\nFailed with signal($signal)$errmsg
   }
   CHILDSUSP {
 set signal [lindex $::errorCode 2]
-set resultmsg $test\nFailed with suspend($signal)$errmsg
+set resultmsg $test$PRS\nFailed with suspend($signal)$errmsg
   }
   POSIX {
 set posixNum [lindex $::errorCode 1]
 set posixMsg [lindex $::errorCode 2]
-set resultmsg $test\nFailed with posix($posixNum,$posixMsg)$errmsg
+set resultmsg $test$PRS\nFailed with 
posix($posixNum,$posixMsg)$errmsg
   }
   NONE {
   }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-21 Thread Reid Spencer
On Sat, 2007-04-21 at 11:52 -0700, Jeff Cohen wrote:
 The only way to run the tests under Windows is to use cygwin, using an
 LLVM built with cygwin/mingw.  Windows does not have /tmp (unless you
 create it yourself) and it does not have /dev/null (unless cygwin
 emulates it somehow).  I only build LLVM on Windows with Visual
 Studio, so someone else who has will have to give a definitive answer.

Both paths are fine under cygwin, However, I'm not sure about mingw.
Anton, can you check?

Reid.

 
 Duncan Sands wrote: 
   +catch { set file_h [ open /tmp/llvm_obj_check.m w] }
   +set R [ catch { exec $llvmgcc -c /tmp/llvm_obj_check.m  -o 
   /dev/null  /tmp/llvm_obj_check.out } ]
   
  
  Will using /tmp and /dev/null work properly under Windows?
  
  Ciao,
  
  Duncan.
  ___
  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 mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] [llvm] r36266 - /llvm/trunk/CREDITS.TXT

2007-04-21 Thread Chris Lattner

On Apr 21, 2007, at 1:49 AM, Anton Korobeynikov wrote:

 Hello, Chris.

 Can we just have the post-commit script fakemail that it is
 [EMAIL PROTECTED] sending it?
 Exactly in this way it should work now. username=e-mail map just  
 don't
 know what to do with user cscollab-rspencer, since is assumes, that
 Reid is using username reid :)

Great, thanks!

-Chris

___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] Major regressions

2007-04-21 Thread Christopher Lamb

Blarg!

Sorry folks. First major commit and I missed regressions. Reverting  
was the right thing to do, sorry I wasn't up earlier.


--
Christopher Lamb

On Apr 21, 2007, at 12:21 PM, Reid Spencer wrote:


Jeff,

I'm seeing these too. They all seem to be related to Christopher  
Lamb's

alignment changes. If he doesn't step up to fix soon, I'll revert the
changes.

Reid.

On Sat, 2007-04-21 at 07:30 -0700, Jeff Cohen wrote:
Commits in the last 12 hours or so have broken 34 regression tests  
and
caused 21 failure in llvm-test.  They appear to be concentrated in  
the

vector area.

___
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 mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] Major regressions

2007-04-21 Thread Christopher Lamb
The regressions are related to the following code in  
SelectionDAG.cpp. MVT::getTypeForValueType asserts if passed a Vector  
as VT.


  if (Alignment == 0) { // Ensure that codegen never sees alignment 0
const Type *Ty = MVT::getTypeForValueType(VT);
Alignment = TLI.getTargetData()-getABITypeAlignment(Ty);
  }

Suggestions on how to get the ABI alignment for vector types?
--
Christopher Lamb



On Apr 21, 2007, at 12:21 PM, Reid Spencer wrote:


Jeff,

I'm seeing these too. They all seem to be related to Christopher  
Lamb's

alignment changes. If he doesn't step up to fix soon, I'll revert the
changes.

Reid.

On Sat, 2007-04-21 at 07:30 -0700, Jeff Cohen wrote:
Commits in the last 12 hours or so have broken 34 regression tests  
and
caused 21 failure in llvm-test.  They appear to be concentrated in  
the

vector area.

___
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 mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-21 Thread Duncan Sands


Changes in directory llvm/test/lib:

llvm.exp updated: 1.18 - 1.19
---
Log message:

Test if the compiler supports Ada, and enable Ada tests if so.  While I was
there, delete a temporary file the objc test forgot to delete.


---
Diffs of the changes:  (+17 -0)

 llvm.exp |   17 +
 1 files changed, 17 insertions(+)


Index: llvm/test/lib/llvm.exp
diff -u llvm/test/lib/llvm.exp:1.18 llvm/test/lib/llvm.exp:1.19
--- llvm/test/lib/llvm.exp:1.18 Sat Apr 21 13:53:12 2007
+++ llvm/test/lib/llvm.exp  Sat Apr 21 15:20:47 2007
@@ -194,6 +194,23 @@
 set R [ catch { exec $llvmgcc -c /tmp/llvm_obj_check.m  -o /dev/null  
/tmp/llvm_obj_check.out } ]
 set RESULT [ file size /tmp/llvm_obj_check.out ]
 catch { file delete /tmp/llvm_obj_check.m }
+catch { file delete /tmp/llvm_obj_check.out }
+if { $RESULT == 0 } {
+return 1
+} else {
+return 0
+}
+}
+
+proc llvm_gcc_supports_ada { } {
+global llvmgcc 
+catch { set file_h [ open /tmp/llvm_ada_check.adb w] }
+catch { puts $file_h procedure llvm_ada_check is begin null; end; }
+catch { close $file_h }
+set R [ catch { exec $llvmgcc -c -gnats /tmp/llvm_ada_check.adb  
/tmp/llvm_ada_check.out } ]
+set RESULT [ file size /tmp/llvm_ada_check.out ]
+catch { file delete /tmp/llvm_ada_check.adb }
+catch { file delete /tmp/llvm_ada_check.out }
 if { $RESULT == 0 } {
 return 1
 } else {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/FrontendAda/dg.exp

2007-04-21 Thread Duncan Sands


Changes in directory llvm/test/FrontendAda:

dg.exp added (r1.1)
---
Log message:

Test if the compiler supports Ada, and enable Ada tests if so.  While I was
there, delete a temporary file the objc test forgot to delete.


---
Diffs of the changes:  (+6 -0)

 dg.exp |6 ++
 1 files changed, 6 insertions(+)


Index: llvm/test/FrontendAda/dg.exp
diff -c /dev/null llvm/test/FrontendAda/dg.exp:1.1
*** /dev/null   Sat Apr 21 15:20:57 2007
--- llvm/test/FrontendAda/dg.expSat Apr 21 15:20:47 2007
***
*** 0 
--- 1,6 
+ load_lib llvm.exp
+ 
+ if [ llvm_gcc_supports_ada ] then {
+ RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{adb,ads}]]
+ }
+ 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Makefile

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test:

Makefile updated: 1.100 - 1.101
---
Log message:

Add the TARGETS_TO_BUILD variable.


---
Diffs of the changes:  (+1 -0)

 Makefile |1 +
 1 files changed, 1 insertion(+)


Index: llvm/test/Makefile
diff -u llvm/test/Makefile:1.100 llvm/test/Makefile:1.101
--- llvm/test/Makefile:1.100Mon Apr 16 11:45:12 2007
+++ llvm/test/Makefile  Sat Apr 21 15:39:26 2007
@@ -70,6 +70,7 @@
@echo '# Do not edit here.  If you wish to override these values' 
site.tmp
@echo '# edit the last section' site.tmp
@echo 'set target_triplet $(TARGET_TRIPLE)'  site.tmp
+   @echo 'set TARGETS_TO_BUILD $(TARGETS_TO_BUILD)'  site.tmp
@echo 'set llvmgcc_version $(LLVMGCC_VERSION)'  site.tmp
@echo 'set prcontext $(TCLSH) 
$(LLVM_SRC_ROOT)/test/Scripts/prcontext.tcl'  site.tmp
@echo 'set llvmtoolsdir $(ToolDir)' site.tmp



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test/lib:

llvm.exp updated: 1.19 - 1.20
---
Log message:

Add the llvm_supports_target function.


---
Diffs of the changes:  (+9 -0)

 llvm.exp |9 +
 1 files changed, 9 insertions(+)


Index: llvm/test/lib/llvm.exp
diff -u llvm/test/lib/llvm.exp:1.19 llvm/test/lib/llvm.exp:1.20
--- llvm/test/lib/llvm.exp:1.19 Sat Apr 21 15:20:47 2007
+++ llvm/test/lib/llvm.exp  Sat Apr 21 15:40:17 2007
@@ -218,3 +218,12 @@
 }
 }
 
+proc llvm_supports_target { tgtName } {
+  global TARGETS_TO_BUILD
+  foreach target [split $TARGETS_TO_BUILD] {
+if { [regexp $tgtName $target match] } {
+  return 1
+}
+  }
+  return 0
+}



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/CodeGen/IA64/dg.exp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test/CodeGen/IA64:

dg.exp updated: 1.4 - 1.5
---
Log message:

Use the llvm_supports_target function to prevent running of tests for 
targets that LLVM is not configured to support.


---
Diffs of the changes:  (+3 -1)

 dg.exp |4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)


Index: llvm/test/CodeGen/IA64/dg.exp
diff -u llvm/test/CodeGen/IA64/dg.exp:1.4 llvm/test/CodeGen/IA64/dg.exp:1.5
--- llvm/test/CodeGen/IA64/dg.exp:1.4   Sun Apr 15 15:48:50 2007
+++ llvm/test/CodeGen/IA64/dg.exp   Sat Apr 21 15:41:27 2007
@@ -1,3 +1,5 @@
 load_lib llvm.exp
 
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
+if { [llvm_supports_target IA64] } {
+  RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
+}



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/CodeGen/PowerPC/dg.exp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test/CodeGen/PowerPC:

dg.exp updated: 1.5 - 1.6
---
Log message:

Use the llvm_supports_target function to prevent running of tests for 
targets that LLVM is not configured to support.


---
Diffs of the changes:  (+3 -1)

 dg.exp |4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)


Index: llvm/test/CodeGen/PowerPC/dg.exp
diff -u llvm/test/CodeGen/PowerPC/dg.exp:1.5 
llvm/test/CodeGen/PowerPC/dg.exp:1.6
--- llvm/test/CodeGen/PowerPC/dg.exp:1.5Sun Apr 15 16:15:41 2007
+++ llvm/test/CodeGen/PowerPC/dg.expSat Apr 21 15:41:27 2007
@@ -1,3 +1,5 @@
 load_lib llvm.exp
 
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
+if { [llvm_supports_target PowerPC] } {
+  RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
+}



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/CodeGen/SPARC/dg.exp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test/CodeGen/SPARC:

dg.exp updated: 1.4 - 1.5
---
Log message:

Use the llvm_supports_target function to prevent running of tests for 
targets that LLVM is not configured to support.


---
Diffs of the changes:  (+3 -1)

 dg.exp |4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)


Index: llvm/test/CodeGen/SPARC/dg.exp
diff -u llvm/test/CodeGen/SPARC/dg.exp:1.4 llvm/test/CodeGen/SPARC/dg.exp:1.5
--- llvm/test/CodeGen/SPARC/dg.exp:1.4  Sun Apr 15 16:17:45 2007
+++ llvm/test/CodeGen/SPARC/dg.exp  Sat Apr 21 15:41:27 2007
@@ -1,3 +1,5 @@
 load_lib llvm.exp
 
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
+if { [llvm_supports_target Sparc] } {
+  RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
+}



___
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/dg.exp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test/CodeGen/ARM:

dg.exp updated: 1.3 - 1.4
---
Log message:

Use the llvm_supports_target function to prevent running of tests for 
targets that LLVM is not configured to support.


---
Diffs of the changes:  (+3 -1)

 dg.exp |4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)


Index: llvm/test/CodeGen/ARM/dg.exp
diff -u llvm/test/CodeGen/ARM/dg.exp:1.3 llvm/test/CodeGen/ARM/dg.exp:1.4
--- llvm/test/CodeGen/ARM/dg.exp:1.3Sun Apr 15 14:11:47 2007
+++ llvm/test/CodeGen/ARM/dg.expSat Apr 21 15:41:27 2007
@@ -1,3 +1,5 @@
 load_lib llvm.exp
 
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
+if { [llvm_supports_target ARM] } {
+  RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
+}



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/CodeGen/X86/dg.exp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test/CodeGen/X86:

dg.exp updated: 1.5 - 1.6
---
Log message:

Use the llvm_supports_target function to prevent running of tests for 
targets that LLVM is not configured to support.


---
Diffs of the changes:  (+3 -1)

 dg.exp |4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)


Index: llvm/test/CodeGen/X86/dg.exp
diff -u llvm/test/CodeGen/X86/dg.exp:1.5 llvm/test/CodeGen/X86/dg.exp:1.6
--- llvm/test/CodeGen/X86/dg.exp:1.5Sun Apr 15 17:16:46 2007
+++ llvm/test/CodeGen/X86/dg.expSat Apr 21 15:41:27 2007
@@ -1,3 +1,5 @@
 load_lib llvm.exp
 
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
+if { [llvm_supports_target X86] } {
+  RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
+}



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/CodeGen/Alpha/dg.exp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test/CodeGen/Alpha:

dg.exp updated: 1.4 - 1.5
---
Log message:

Use the llvm_supports_target function to prevent running of tests for 
targets that LLVM is not configured to support.


---
Diffs of the changes:  (+3 -1)

 dg.exp |4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)


Index: llvm/test/CodeGen/Alpha/dg.exp
diff -u llvm/test/CodeGen/Alpha/dg.exp:1.4 llvm/test/CodeGen/Alpha/dg.exp:1.5
--- llvm/test/CodeGen/Alpha/dg.exp:1.4  Sun Apr 15 13:40:57 2007
+++ llvm/test/CodeGen/Alpha/dg.exp  Sat Apr 21 15:41:27 2007
@@ -1,3 +1,5 @@
 load_lib llvm.exp
 
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll}]]
+if { [llvm_supports_target Alpha] } {
+  RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll}]]
+}



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/CodeGen/CBackend/dg.exp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test/CodeGen/CBackend:

dg.exp updated: 1.5 - 1.6
---
Log message:

Use the llvm_supports_target function to prevent running of tests for 
targets that LLVM is not configured to support.


---
Diffs of the changes:  (+3 -1)

 dg.exp |4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)


Index: llvm/test/CodeGen/CBackend/dg.exp
diff -u llvm/test/CodeGen/CBackend/dg.exp:1.5 
llvm/test/CodeGen/CBackend/dg.exp:1.6
--- llvm/test/CodeGen/CBackend/dg.exp:1.5   Sun Apr 15 14:21:54 2007
+++ llvm/test/CodeGen/CBackend/dg.exp   Sat Apr 21 15:41:27 2007
@@ -1,3 +1,5 @@
 load_lib llvm.exp
 
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
+if { [llvm_supports_target CBackend] } {
+  RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
+}



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Makefile.tests Failure.sh

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test:

Makefile.tests updated: 1.92 - 1.93
Failure.sh (r1.1) removed
---
Log message:

Failure.sh is dead, remove it.


---
Diffs of the changes:  (+0 -1)

 Makefile.tests |1 -
 1 files changed, 1 deletion(-)


Index: llvm/test/Makefile.tests
diff -u llvm/test/Makefile.tests:1.92 llvm/test/Makefile.tests:1.93
--- llvm/test/Makefile.tests:1.92   Fri Feb 18 14:24:09 2005
+++ llvm/test/Makefile.testsSat Apr 21 15:46:55 2007
@@ -37,7 +37,6 @@
 LCCFLAGS  += -O2 -Wall
 LCXXFLAGS += -O2 -Wall
 LLCFLAGS =
-FAILURE  = $(LLVM_SRC_ROOT)/test/Failure.sh
 TESTRUNR = @echo Running test: $; \
  PATH=$(LLVMTOOLCURRENT):$(LLVM_SRC_ROOT)/test/Scripts:$(PATH) \
   $(LLVM_SRC_ROOT)/test/TestRunner.sh



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/lib/llvm-dg.exp

2007-04-21 Thread LLVM


Changes in directory llvm/test/lib:

llvm-dg.exp (r1.17) removed
---
Log message:

llvm-dg.exp is dead, remove it.


---
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/CodeGen/SelectionDAG/SelectionDAG.cpp

2007-04-21 Thread Lauro Ramos Venancio


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.400 - 1.401
---
Log message:

X86 TLS: Implement review feedback.


---
Diffs of the changes:  (+11 -1)

 SelectionDAG.cpp |   12 +++-
 1 files changed, 11 insertions(+), 1 deletion(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.400 
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.401
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.400Sat Apr 21 
13:36:27 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp  Sat Apr 21 15:56:26 2007
@@ -13,7 +13,6 @@
 
 #include llvm/CodeGen/SelectionDAG.h
 #include llvm/Constants.h
-#include llvm/GlobalValue.h
 #include llvm/GlobalVariable.h
 #include llvm/Intrinsics.h
 #include llvm/Assembly/Writer.h
@@ -2573,6 +2572,17 @@
   MorphNodeTo(ISD::HANDLENODE, VTs, 0, 0);  // Drops operand uses.
 }
 
+GlobalAddressSDNode::GlobalAddressSDNode(bool isTarget, const GlobalValue *GA,
+ MVT::ValueType VT, int o)
+  : SDNode(isaGlobalVariable(GA) 
+   dyn_castGlobalVariable(GA)-isThreadLocal() ?
+   // Thread Local
+   (isTarget ? ISD::TargetGlobalTLSAddress : ISD::GlobalTLSAddress) :
+   // Non Thread Local
+   (isTarget ? ISD::TargetGlobalAddress : ISD::GlobalAddress),
+   getSDVTList(VT)), Offset(o) {
+  TheGlobal = const_castGlobalValue*(GA);
+}
 
 /// Profile - Gather unique data for the node.
 ///



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h

2007-04-21 Thread Lauro Ramos Venancio


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.187 - 1.188
---
Log message:

X86 TLS: Implement review feedback.


---
Diffs of the changes:  (+1 -11)

 SelectionDAGNodes.h |   12 +---
 1 files changed, 1 insertion(+), 11 deletions(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.187 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.188
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.187 Sat Apr 21 13:36:27 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sat Apr 21 15:56:26 2007
@@ -19,7 +19,6 @@
 #ifndef LLVM_CODEGEN_SELECTIONDAGNODES_H
 #define LLVM_CODEGEN_SELECTIONDAGNODES_H
 
-#include llvm/GlobalVariable.h
 #include llvm/Value.h
 #include llvm/ADT/FoldingSet.h
 #include llvm/ADT/GraphTraits.h
@@ -1166,16 +1165,7 @@
 protected:
   friend class SelectionDAG;
   GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT::ValueType VT,
-  int o = 0)
-: SDNode(dyn_castGlobalVariable(GA) 
- dyn_castGlobalVariable(GA)-isThreadLocal() ?
- // Thread Local
- (isTarget ? ISD::TargetGlobalTLSAddress : ISD::GlobalTLSAddress) :
- // Non Thread Local
- (isTarget ? ISD::TargetGlobalAddress : ISD::GlobalAddress),
- getSDVTList(VT)), Offset(o) {
-TheGlobal = const_castGlobalValue*(GA);
-  }
+  int o = 0);
 public:
 
   GlobalValue *getGlobal() const { return TheGlobal; }



___
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/X86ISelLowering.cpp

2007-04-21 Thread Lauro Ramos Venancio


Changes in directory llvm/lib/Target/X86:

X86ISelLowering.cpp updated: 1.394 - 1.395
---
Log message:

X86 TLS: Implement review feedback.


---
Diffs of the changes:  (+3 -2)

 X86ISelLowering.cpp |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.394 
llvm/lib/Target/X86/X86ISelLowering.cpp:1.395
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.394   Fri Apr 20 16:38:10 2007
+++ llvm/lib/Target/X86/X86ISelLowering.cpp Sat Apr 21 15:56:26 2007
@@ -3004,8 +3004,9 @@
 SDOperand
 X86TargetLowering::LowerGlobalTLSAddress(SDOperand Op, SelectionDAG DAG) {
   // TODO: implement the local dynamic model
-  // TODO: implement the initial execmodel for pic executables 
-  assert(!Subtarget-is64Bit()  TLS not implemented for X86_64);
+  // TODO: implement the initial execmodel for pic executables
+  assert(!Subtarget-is64Bit()  Subtarget-isTargetELF() 
+ TLS not implemented for non-ELF and 64-bit targets);
   GlobalAddressSDNode *GA = castGlobalAddressSDNode(Op);
   // If the relocation model is PIC, use the General Dynamic TLS Model,
   // otherwise use the Local ExecTLS Model



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/autoconf/configure.ac

2007-04-21 Thread Reid Spencer


Changes in directory llvm/autoconf:

configure.ac updated: 1.268 - 1.269
---
Log message:

Add support for determining which languages the llvm-gcc front end 
supports.


---
Diffs of the changes:  (+4 -0)

 configure.ac |4 
 1 files changed, 4 insertions(+)


Index: llvm/autoconf/configure.ac
diff -u llvm/autoconf/configure.ac:1.268 llvm/autoconf/configure.ac:1.269
--- llvm/autoconf/configure.ac:1.268Mon Apr  2 10:40:39 2007
+++ llvm/autoconf/configure.ac  Sat Apr 21 16:28:12 2007
@@ -767,6 +767,7 @@
 
 dnl Since we have a sane llvm-gcc, identify it and its sub-tools 
 if test $llvm_cv_llvmgcc_sanity = yes ; then
+  AC_MSG_CHECKING([llvm-gcc component support])
   llvmcc1path=`$LLVMGCC --print-prog-name=cc1`
   AC_SUBST(LLVMCC1,$llvmcc1path)
   llvmcc1pluspath=`$LLVMGCC --print-prog-name=cc1plus`
@@ -779,6 +780,9 @@
   llvmgccmajvers=[`echo $llvmgccversion | sed 's/^\([0-9]\).*/\1/'`]
   AC_SUBST(LLVMGCC_VERSION,$llvmgccversion)
   AC_SUBST(LLVMGCC_MAJVERS,$llvmgccmajvers)
+  llvmgcclangs=[`$LLVMGCC -v --help 21 | grep '^Configured with:' | sed 
's/^.*--enable-languages=\([^ -]*\).*/\1/'`]
+  AC_SUBST(LLVMGCC_LANGS,$llvmgcclangs)
+  AC_MSG_RESULT([ok])
 fi
 
 dnl Propagate the shared library extension that the libltdl checks did to 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/Makefile.config.in

2007-04-21 Thread Reid Spencer


Changes in directory llvm:

Makefile.config.in updated: 1.75 - 1.76
---
Log message:

Add support for determining which languages the llvm-gcc front end 
supports.


---
Diffs of the changes:  (+1 -0)

 Makefile.config.in |1 +
 1 files changed, 1 insertion(+)


Index: llvm/Makefile.config.in
diff -u llvm/Makefile.config.in:1.75 llvm/Makefile.config.in:1.76
--- llvm/Makefile.config.in:1.75Thu Mar 29 14:05:44 2007
+++ llvm/Makefile.config.in Sat Apr 21 16:28:12 2007
@@ -188,6 +188,7 @@
 LLVMCC1PLUS := @LLVMCC1PLUS@
 LLVMGCC_VERSION := @LLVMGCC_VERSION@
 LLVMGCC_MAJVERS := @LLVMGCC_MAJVERS@
+LLVMGCC_LANGS := @LLVMGCC_LANGS@
 
 # Path to directory where object files should be stored during a build.
 # Set OBJ_ROOT to . if you do not want to use a separate place for



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/configure

2007-04-21 Thread Reid Spencer


Changes in directory llvm:

configure updated: 1.274 - 1.275
---
Log message:

Regenerate for detection of llvm-gcc supported languages


---
Diffs of the changes:  (+34 -25)

 configure |   59 ++-
 1 files changed, 34 insertions(+), 25 deletions(-)


Index: llvm/configure
diff -u llvm/configure:1.274 llvm/configure:1.275
--- llvm/configure:1.274Tue Apr 10 19:27:39 2007
+++ llvm/configure  Sat Apr 21 16:28:52 2007
@@ -908,6 +908,7 @@
 LLVMGCCLIBEXEC
 LLVMGCC_VERSION
 LLVMGCC_MAJVERS
+LLVMGCC_LANGS
 SHLIBEXT
 LLVM_PREFIX
 LLVM_BINDIR
@@ -10339,7 +10340,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat  conftest.$ac_ext EOF
-#line 10342 configure
+#line 10343 configure
 #include confdefs.h
 
 #if HAVE_DLFCN_H
@@ -12483,7 +12484,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 12486 configure'  conftest.$ac_ext
+  echo '#line 12487 configure'  conftest.$ac_ext
   if { (eval echo $as_me:$LINENO: \$ac_compile\) 5
   (eval $ac_compile) 25
   ac_status=$?
@@ -14201,11 +14202,11 @@
-e 's:.*FLAGS}\{0,1\} :$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag:; t' \
-e 's:$: $lt_compiler_flag:'`
-   (eval echo \\$as_me:14204: $lt_compile\ 5)
+   (eval echo \\$as_me:14205: $lt_compile\ 5)
(eval $lt_compile 2conftest.err)
ac_status=$?
cat conftest.err 5
-   echo $as_me:14208: \$? = $ac_status 5
+   echo $as_me:14209: \$? = $ac_status 5
if (exit $ac_status)  test -s $ac_outfile; then
  # The compiler can only warn and ignore the option if not recognized
  # So say no if there are warnings other than the usual output.
@@ -14469,11 +14470,11 @@
-e 's:.*FLAGS}\{0,1\} :$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag:; t' \
-e 's:$: $lt_compiler_flag:'`
-   (eval echo \\$as_me:14472: $lt_compile\ 5)
+   (eval echo \\$as_me:14473: $lt_compile\ 5)
(eval $lt_compile 2conftest.err)
ac_status=$?
cat conftest.err 5
-   echo $as_me:14476: \$? = $ac_status 5
+   echo $as_me:14477: \$? = $ac_status 5
if (exit $ac_status)  test -s $ac_outfile; then
  # The compiler can only warn and ignore the option if not recognized
  # So say no if there are warnings other than the usual output.
@@ -14573,11 +14574,11 @@
-e 's:.*FLAGS}\{0,1\} :$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag:; t' \
-e 's:$: $lt_compiler_flag:'`
-   (eval echo \\$as_me:14576: $lt_compile\ 5)
+   (eval echo \\$as_me:14577: $lt_compile\ 5)
(eval $lt_compile 2out/conftest.err)
ac_status=$?
cat out/conftest.err 5
-   echo $as_me:14580: \$? = $ac_status 5
+   echo $as_me:14581: \$? = $ac_status 5
if (exit $ac_status)  test -s out/conftest2.$ac_objext
then
  # The compiler can only warn and ignore the option if not recognized
@@ -17025,7 +17026,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat  conftest.$ac_ext EOF
-#line 17028 configure
+#line 17029 configure
 #include confdefs.h
 
 #if HAVE_DLFCN_H
@@ -17125,7 +17126,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat  conftest.$ac_ext EOF
-#line 17128 configure
+#line 17129 configure
 #include confdefs.h
 
 #if HAVE_DLFCN_H
@@ -19493,11 +19494,11 @@
-e 's:.*FLAGS}\{0,1\} :$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag:; t' \
-e 's:$: $lt_compiler_flag:'`
-   (eval echo \\$as_me:19496: $lt_compile\ 5)
+   (eval echo \\$as_me:19497: $lt_compile\ 5)
(eval $lt_compile 2conftest.err)
ac_status=$?
cat conftest.err 5
-   echo $as_me:19500: \$? = $ac_status 5
+   echo $as_me:19501: \$? = $ac_status 5
if (exit $ac_status)  test -s $ac_outfile; then
  # The compiler can only warn and ignore the option if not recognized
  # So say no if there are warnings other than the usual output.
@@ -19597,11 +19598,11 @@
-e 's:.*FLAGS}\{0,1\} :$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag:; t' \
-e 's:$: $lt_compiler_flag:'`
-   (eval echo \\$as_me:19600: $lt_compile\ 5)
+   (eval echo \\$as_me:19601: $lt_compile\ 5)
(eval $lt_compile 2out/conftest.err)
ac_status=$?
cat out/conftest.err 5
-   echo $as_me:19604: \$? = $ac_status 5
+   echo $as_me:19605: \$? = $ac_status 5
if (exit $ac_status)  test -s out/conftest2.$ac_objext
then
  # The compiler can only warn and ignore the option if not recognized
@@ -21167,11 +21168,11 @@
-e 's:.*FLAGS}\{0,1\} :$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag:; t' \
-e 's:$: $lt_compiler_flag:'`
-   (eval echo \\$as_me:21170: $lt_compile\ 5)
+   (eval echo \\$as_me:21171: $lt_compile\ 5)
(eval $lt_compile 2conftest.err)
ac_status=$?
cat conftest.err 5
-   echo $as_me:21174: \$? = $ac_status 5
+   echo $as_me:21175: \$? = $ac_status 5
if (exit $ac_status)  test 

[llvm-commits] CVS: llvm/test/Makefile

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test:

Makefile updated: 1.101 - 1.102
---
Log message:

Pass the LLVMGCC_LANGS variable through to Tcl.


---
Diffs of the changes:  (+1 -0)

 Makefile |1 +
 1 files changed, 1 insertion(+)


Index: llvm/test/Makefile
diff -u llvm/test/Makefile:1.101 llvm/test/Makefile:1.102
--- llvm/test/Makefile:1.101Sat Apr 21 15:39:26 2007
+++ llvm/test/Makefile  Sat Apr 21 16:43:18 2007
@@ -71,6 +71,7 @@
@echo '# edit the last section' site.tmp
@echo 'set target_triplet $(TARGET_TRIPLE)'  site.tmp
@echo 'set TARGETS_TO_BUILD $(TARGETS_TO_BUILD)'  site.tmp
+   @echo 'set llvmgcc_langs $(LLVMGCC_LANGS)'  site.tmp
@echo 'set llvmgcc_version $(LLVMGCC_VERSION)'  site.tmp
@echo 'set prcontext $(TCLSH) 
$(LLVM_SRC_ROOT)/test/Scripts/prcontext.tcl'  site.tmp
@echo 'set llvmtoolsdir $(ToolDir)' site.tmp



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test/lib:

llvm.exp updated: 1.20 - 1.21
---
Log message:

Replace llvm_gcc_supports_ada and llvm_gcc_supports_objc with just a single
llvm_gcc_supports function that takes the language as an argument. Base that
function on the new LLVMGCC_LANGS configured variable so that we don't have
to execute feature checks during the test run. 


---
Diffs of the changes:  (+31 -28)

 llvm.exp |   59 +++
 1 files changed, 31 insertions(+), 28 deletions(-)


Index: llvm/test/lib/llvm.exp
diff -u llvm/test/lib/llvm.exp:1.20 llvm/test/lib/llvm.exp:1.21
--- llvm/test/lib/llvm.exp:1.20 Sat Apr 21 15:40:17 2007
+++ llvm/test/lib/llvm.exp  Sat Apr 21 16:45:51 2007
@@ -1,3 +1,4 @@
+# This procedure executes one line of a test case's execution script.
 proc execOneLine { test PRS outcome lineno line } {
   set status 0
   set resultmsg 
@@ -38,6 +39,8 @@
   return $resultmsg
 }
 
+# This prcoedure performs variable substitutions on the RUN: lines of a test
+# cases.
 proc substitute { line test tmpFile } {
   global srcroot objroot srcdir objdir subdir target_triplet prcontext 
   global llvmgcc llvmgxx llvmgcc_version llvmgccmajvers 
@@ -75,6 +78,7 @@
   return $new_line
 }
 
+# This procedure runs the set of tests for the test_source_files array.
 proc RunLLVMTests { test_source_files } {
   global srcroot objroot srcdir objdir subdir target_triplet llvmgcc_version
   set timeout 60
@@ -188,36 +192,35 @@
   }
 }
 
-proc llvm_gcc_supports_objc { } {
-global llvmgcc 
-catch { set file_h [ open /tmp/llvm_obj_check.m w] }
-set R [ catch { exec $llvmgcc -c /tmp/llvm_obj_check.m  -o /dev/null  
/tmp/llvm_obj_check.out } ]
-set RESULT [ file size /tmp/llvm_obj_check.out ]
-catch { file delete /tmp/llvm_obj_check.m }
-catch { file delete /tmp/llvm_obj_check.out }
-if { $RESULT == 0 } {
-return 1
-} else {
-return 0
-}
-}
-
-proc llvm_gcc_supports_ada { } {
-global llvmgcc 
-catch { set file_h [ open /tmp/llvm_ada_check.adb w] }
-catch { puts $file_h procedure llvm_ada_check is begin null; end; }
-catch { close $file_h }
-set R [ catch { exec $llvmgcc -c -gnats /tmp/llvm_ada_check.adb  
/tmp/llvm_ada_check.out } ]
-set RESULT [ file size /tmp/llvm_ada_check.out ]
-catch { file delete /tmp/llvm_ada_check.adb }
-catch { file delete /tmp/llvm_ada_check.out }
-if { $RESULT == 0 } {
-return 1
-} else {
-return 0
-}
+# This procedure provides an interface to check the LLVMGCC_LANGS makefile
+# variable to see if llvm-gcc supports compilation of a particular language.
+proc llvm_gcc_supports { lang } {
+  global llvmgcc llvmgcc_langs
+  # validate the language choices and determine the name of the compiler
+  # component responsible for determining if the compiler has been built.
+  switch $lang {
+ada { set file gnat1 }
+c   { set file cc1 }
+c++ { set file cc1plus }
+objc{ set file cc1 }
+objc++  { set file cc1 }
+fortran { set file fcc1 }
+default { return 0 }
+  }
+  if { [ regexp $lang $llvmgcc_langs match ] } {
+# FIXME: Knowing it is configured is not enough. We should do two more
+# checks here. First, we need to run llvm-gcc -print-prog-name=$file to get
+# the path to the compiler. If we don't get a path, the language isn't
+# properly configured or built. If we do get a path, we should check to 
make
+# sure that it is executable and perhaps even try executing it.
+return 1;
+  }
+  return 0;
 }
 
+# This procedure provides an interface to check the TARGETS_TO_BUILD makefile
+# variable to see if a particular target has been configured to build. This
+# helps avoid running tests for targets that aren't available.
 proc llvm_supports_target { tgtName } {
   global TARGETS_TO_BUILD
   foreach target [split $TARGETS_TO_BUILD] {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/FrontendAda/dg.exp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test/FrontendAda:

dg.exp updated: 1.1 - 1.2
---
Log message:

Replace llvm_gcc_supports_ada and llvm_gcc_supports_objc with just a single
llvm_gcc_supports function that takes the language as an argument. Base that
function on the new LLVMGCC_LANGS configured variable so that we don't have
to execute feature checks during the test run. 


---
Diffs of the changes:  (+1 -1)

 dg.exp |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/test/FrontendAda/dg.exp
diff -u llvm/test/FrontendAda/dg.exp:1.1 llvm/test/FrontendAda/dg.exp:1.2
--- llvm/test/FrontendAda/dg.exp:1.1Sat Apr 21 15:20:47 2007
+++ llvm/test/FrontendAda/dg.expSat Apr 21 16:45:51 2007
@@ -1,6 +1,6 @@
 load_lib llvm.exp
 
-if [ llvm_gcc_supports_ada ] then {
+if [ llvm_gcc_supports ada ] then {
 RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{adb,ads}]]
 }
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Transforms/LoopRotate/.cvsignore

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test/Transforms/LoopRotate:

.cvsignore added (r1.1)
---
Log message:

Add a .cvsignore file.


---
Diffs of the changes:  (+1 -0)

 .cvsignore |1 +
 1 files changed, 1 insertion(+)


Index: llvm/test/Transforms/LoopRotate/.cvsignore
diff -c /dev/null llvm/test/Transforms/LoopRotate/.cvsignore:1.1
*** /dev/null   Sat Apr 21 16:53:14 2007
--- llvm/test/Transforms/LoopRotate/.cvsignore  Sat Apr 21 16:53:04 2007
***
*** 0 
--- 1 
+ Output



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] Major regressions

2007-04-21 Thread Christopher Lamb
I'm getting a regression after my fixes that's coming from  
getABIAlignment not finding an alignment to use for a float x1  
type, is this a bug?


--
Christopher Lamb


On Apr 21, 2007, at 12:21 PM, Reid Spencer wrote:


Jeff,

I'm seeing these too. They all seem to be related to Christopher  
Lamb's

alignment changes. If he doesn't step up to fix soon, I'll revert the
changes.

Reid.

On Sat, 2007-04-21 at 07:30 -0700, Jeff Cohen wrote:
Commits in the last 12 hours or so have broken 34 regression tests  
and
caused 21 failure in llvm-test.  They appear to be concentrated in  
the

vector area.

___
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 mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] Major regressions

2007-04-21 Thread Reid Spencer
On Sat, 2007-04-21 at 18:07 -0500, Christopher Lamb wrote:
 I'm getting a regression after my fixes that's coming from
 getABIAlignment not finding an alignment to use for a float x1 type,
 is this a bug?

It could be. float x 1 isn't a useful vector so it probably doesn't
have an ABI Alignment. It should, however, default to whatever the
target's alignment is for float. Perhaps that case isn't covered in
TargetData or there's something else wrong with TargetData?

Did you walk through it in the debugger?

Reid.

 
 --
 Christopher Lamb
 
 
 
 
 On Apr 21, 2007, at 12:21 PM, Reid Spencer wrote:
 
  Jeff,
  
  
  I'm seeing these too. They all seem to be related to Christopher
  Lamb's
  alignment changes. If he doesn't step up to fix soon, I'll revert
  the
  changes.
  
  
  Reid.
  
  
  On Sat, 2007-04-21 at 07:30 -0700, Jeff Cohen wrote:
   Commits in the last 12 hours or so have broken 34 regression tests
   and 
   caused 21 failure in llvm-test.  They appear to be concentrated in
   the 
   vector area.
   
   
   ___
   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 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


Re: [llvm-commits] Major regressions

2007-04-21 Thread Christopher Lamb

On Apr 21, 2007, at 6:12 PM, Reid Spencer wrote:

 On Sat, 2007-04-21 at 18:07 -0500, Christopher Lamb wrote:
 I'm getting a regression after my fixes that's coming from
 getABIAlignment not finding an alignment to use for a float x1  
 type,
 is this a bug?

 It could be. float x 1 isn't a useful vector so it probably doesn't
 have an ABI Alignment. It should, however, default to whatever the
 target's alignment is for float. Perhaps that case isn't covered in
 TargetData or there's something else wrong with TargetData?

 Did you walk through it in the debugger?

Yes. It appears that TargetData doesn't have logic to match the case  
of vector types smaller than the smallest defined ABI vector type.  
It's asserting in TargetData::getAlignmentInfo:

assert(BestMatchIdx != -1  Didn't find alignment info for this  
datatype!);

I don't think it has enough information to be able to determine  
whether or not it's being asked for the alignment of a smaller vector  
type that could be mapped onto a non-vector type.

My feeling is that in this case getAlignmentInfo should return a  
conservative fallback alignment the same way that's done for integers.

--
Christopher Lamb



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


Re: [llvm-commits] Major regressions

2007-04-21 Thread Reid Spencer
On Sat, 2007-04-21 at 18:28 -0500, Christopher Lamb wrote:
 On Apr 21, 2007, at 6:12 PM, Reid Spencer wrote:
 
  On Sat, 2007-04-21 at 18:07 -0500, Christopher Lamb wrote:
  I'm getting a regression after my fixes that's coming from
  getABIAlignment not finding an alignment to use for a float x1  
  type,
  is this a bug?
 
  It could be. float x 1 isn't a useful vector so it probably doesn't
  have an ABI Alignment. It should, however, default to whatever the
  target's alignment is for float. Perhaps that case isn't covered in
  TargetData or there's something else wrong with TargetData?
 
  Did you walk through it in the debugger?
 
 Yes. It appears that TargetData doesn't have logic to match the case  
 of vector types smaller than the smallest defined ABI vector type.  
 It's asserting in TargetData::getAlignmentInfo:
 
 assert(BestMatchIdx != -1  Didn't find alignment info for this  
 datatype!);

That makes sense.

 
 I don't think it has enough information to be able to determine  
 whether or not it's being asked for the alignment of a smaller vector  
 type that could be mapped onto a non-vector type.

What is your datalayout specification?

 
 My feeling is that in this case getAlignmentInfo should return a  
 conservative fallback alignment the same way that's done for integers.

Perhaps, we'll need to discuss with Duncan and Chris though. 

Reid.

 
 --
 Christopher Lamb
 
 
 
 ___
 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] CVS: llvm/test/CodeGen/ARM/call.ll load-global.ll

2007-04-21 Thread Lauro Ramos Venancio


Changes in directory llvm/test/CodeGen/ARM:

call.ll updated: 1.7 - 1.8
load-global.ll updated: 1.2 - 1.3
---
Log message:

Implement PIC for arm-linux.


---
Diffs of the changes:  (+5 -1)

 call.ll|2 ++
 load-global.ll |4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)


Index: llvm/test/CodeGen/ARM/call.ll
diff -u llvm/test/CodeGen/ARM/call.ll:1.7 llvm/test/CodeGen/ARM/call.ll:1.8
--- llvm/test/CodeGen/ARM/call.ll:1.7   Sun Apr 15 14:11:47 2007
+++ llvm/test/CodeGen/ARM/call.ll   Sat Apr 21 19:04:12 2007
@@ -1,5 +1,7 @@
 ; RUN: llvm-upgrade  %s | llvm-as | llc -march=arm | grep {mov lr, pc}
 ; RUN: llvm-upgrade  %s | llvm-as | llc -march=arm -mattr=+v5t | grep blx
+; RUN: llvm-upgrade  %s | llvm-as | llc -march=arm -mtriple=arm-linux-gnueabi\
+; RUN:   -relocation-model=pic | grep {PLT}
 
 %t = weak global int ()* null
 declare void %g(int, int, int, int)


Index: llvm/test/CodeGen/ARM/load-global.ll
diff -u llvm/test/CodeGen/ARM/load-global.ll:1.2 
llvm/test/CodeGen/ARM/load-global.ll:1.3
--- llvm/test/CodeGen/ARM/load-global.ll:1.2Sun Apr 15 14:11:47 2007
+++ llvm/test/CodeGen/ARM/load-global.llSat Apr 21 19:04:12 2007
@@ -1,10 +1,12 @@
-; RUN: llvm-upgrade  %s | llvm-as | llc -march=arm
 ; RUN: llvm-upgrade  %s | llvm-as | \
 ; RUN:   llc -mtriple=arm-apple-darwin -relocation-model=dynamic-no-pic | \
 ; RUN:   grep {L_G\$non_lazy_ptr} | wc -l | grep 2
 ; RUN: llvm-upgrade  %s | llvm-as | \
 ; RUN:   llc -mtriple=arm-apple-darwin -relocation-model=pic | \
 ; RUN:   grep {ldr.*pc} | wc -l | grep 1
+; RUN: llvm-upgrade  %s | llvm-as | \
+; RUN:   llc -mtriple=arm-linux-gnueabi -relocation-model=pic | \
+; RUN:   grep {GOT} | wc -l | grep 1
 
 %G = external global int
 



___
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/ARMAsmPrinter.cpp ARMConstantPoolValue.cpp ARMConstantPoolValue.h ARMISelLowering.cpp ARMISelLowering.h

2007-04-21 Thread Lauro Ramos Venancio


Changes in directory llvm/lib/Target/ARM:

ARMAsmPrinter.cpp updated: 1.64 - 1.65
ARMConstantPoolValue.cpp updated: 1.2 - 1.3
ARMConstantPoolValue.h updated: 1.2 - 1.3
ARMISelLowering.cpp updated: 1.44 - 1.45
ARMISelLowering.h updated: 1.13 - 1.14
---
Log message:

Implement PIC for arm-linux.


---
Diffs of the changes:  (+83 -12)

 ARMAsmPrinter.cpp|8 ++-
 ARMConstantPoolValue.cpp |   20 ++---
 ARMConstantPoolValue.h   |   10 +++-
 ARMISelLowering.cpp  |   53 +++
 ARMISelLowering.h|4 ++-
 5 files changed, 83 insertions(+), 12 deletions(-)


Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp
diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.64 
llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.65
--- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.64  Tue Apr  3 19:13:29 2007
+++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp   Sat Apr 21 19:04:12 2007
@@ -133,6 +133,7 @@
 O  TAI-getPrivateGlobalPrefix()  Name  $stub;
   } else
 O  Name;
+  if (ACPV-hasModifier()) O  (  ACPV-getModifier()  );
   if (ACPV-getPCAdjustment() != 0)
 O  -(  TAI-getPrivateGlobalPrefix()  PC
utostr(ACPV-getLabelId())
@@ -284,7 +285,9 @@
   FnStubs.insert(Name);
 } else
   O  Name;
-
+if (isCallOp  Subtarget-isTargetELF() 
+TM.getRelocationModel() == Reloc::PIC_)
+  O  (PLT);
 if (GV-hasExternalWeakLinkage())
   ExtWeakSymbols.insert(GV);
 break;
@@ -299,6 +302,9 @@
   FnStubs.insert(Name);
 } else
   O  Name;
+if (isCallOp  Subtarget-isTargetELF() 
+TM.getRelocationModel() == Reloc::PIC_)
+  O  (PLT);
 break;
   }
   case MachineOperand::MO_ConstantPoolIndex:


Index: llvm/lib/Target/ARM/ARMConstantPoolValue.cpp
diff -u llvm/lib/Target/ARM/ARMConstantPoolValue.cpp:1.2 
llvm/lib/Target/ARM/ARMConstantPoolValue.cpp:1.3
--- llvm/lib/Target/ARM/ARMConstantPoolValue.cpp:1.2Tue Jan 30 14:37:08 2007
+++ llvm/lib/Target/ARM/ARMConstantPoolValue.cppSat Apr 21 19:04:12 2007
@@ -19,15 +19,26 @@
 
 ARMConstantPoolValue::ARMConstantPoolValue(GlobalValue *gv, unsigned id,
ARMCP::ARMCPKind k,
-   unsigned char PCAdj)
+   unsigned char PCAdj,
+   const char *Modif)
   : MachineConstantPoolValue((const Type*)gv-getType()),
-GV(gv), S(NULL), LabelId(id), Kind(k), PCAdjust(PCAdj) {}
+GV(gv), S(NULL), LabelId(id), Kind(k), PCAdjust(PCAdj),
+Modifier(Modif) {}
 
 ARMConstantPoolValue::ARMConstantPoolValue(const char *s, unsigned id,
ARMCP::ARMCPKind k,
-   unsigned char PCAdj)
+   unsigned char PCAdj,
+   const char *Modif)
   : MachineConstantPoolValue((const Type*)Type::Int32Ty),
-GV(NULL), S(s), LabelId(id), Kind(k), PCAdjust(PCAdj) {}
+GV(NULL), S(s), LabelId(id), Kind(k), PCAdjust(PCAdj),
+Modifier(Modif) {}
+
+ARMConstantPoolValue::ARMConstantPoolValue(GlobalValue *gv,
+   ARMCP::ARMCPKind k,
+   const char *Modif)
+  : MachineConstantPoolValue((const Type*)Type::Int32Ty),
+GV(gv), S(NULL), LabelId(0), Kind(k), PCAdjust(0),
+Modifier(Modif) {}
 
 int ARMConstantPoolValue::getExistingMachineCPValue(MachineConstantPool *CP,
 unsigned Alignment) {
@@ -66,6 +77,7 @@
 O  S;
   if (isNonLazyPointer()) O  $non_lazy_ptr;
   else if (isStub()) O  $stub;
+  if (Modifier) O  (  Modifier  );
   if (PCAdjust != 0) O  -(LPIC  LabelId  +
 (unsigned)PCAdjust  );
 }


Index: llvm/lib/Target/ARM/ARMConstantPoolValue.h
diff -u llvm/lib/Target/ARM/ARMConstantPoolValue.h:1.2 
llvm/lib/Target/ARM/ARMConstantPoolValue.h:1.3
--- llvm/lib/Target/ARM/ARMConstantPoolValue.h:1.2  Tue Jan 30 14:37:08 2007
+++ llvm/lib/Target/ARM/ARMConstantPoolValue.h  Sat Apr 21 19:04:12 2007
@@ -36,17 +36,23 @@
   ARMCP::ARMCPKind Kind;   // non_lazy_ptr or stub?
   unsigned char PCAdjust;  // Extra adjustment if constantpool is pc relative.
// 8 for ARM, 4 for Thumb.
+  const char *Modifier;// GV modifier i.e. (GV(modifier)-(LPIC+8))
 
 public:
   ARMConstantPoolValue(GlobalValue *gv, unsigned id,
ARMCP::ARMCPKind Kind = ARMCP::CPValue,
-   unsigned char PCAdj = 0);
+   unsigned char PCAdj = 0, const char *Modifier = NULL);
   ARMConstantPoolValue(const char *s, unsigned id,
ARMCP::ARMCPKind Kind = ARMCP::CPValue,
-   unsigned char PCAdj = 0);
+   unsigned char PCAdj = 0, const char *Modifier = NULL);
+  

[llvm-commits] CVS: llvm/docs/LangRef.html

2007-04-21 Thread Jeff Cohen


Changes in directory llvm/docs:

LangRef.html updated: 1.235 - 1.236
---
Log message:

Minor corrections.

---
Diffs of the changes:  (+38 -42)

 LangRef.html |   80 ---
 1 files changed, 38 insertions(+), 42 deletions(-)


Index: llvm/docs/LangRef.html
diff -u llvm/docs/LangRef.html:1.235 llvm/docs/LangRef.html:1.236
--- llvm/docs/LangRef.html:1.235Sat Apr 21 03:16:25 2007
+++ llvm/docs/LangRef.html  Sat Apr 21 20:17:39 2007
@@ -1068,16 +1068,14 @@
 h5Examples:/h5
 table class=layout
   tr class=layout
-td class=left
-  tt{ i32, i32, i32 }/ttbr/
-  tt{ float, i32 (i32) * }/ttbr/
-/td
-td class=left
-  a triple of three tti32/tt valuesbr/
-  A pair, where the first element is a ttfloat/tt and the second 
element 
-  is a a href=#t_pointerpointer/a to a a 
href=#t_functionfunction/a 
-  that takes an tti32/tt, returning an tti32/tt.br/
-/td
+td class=lefttt{ i32, i32, i32 }/tt/td
+td class=leftA triple of three tti32/tt values/td
+  /trtr class=layout
+td 
class=lefttt{nbsp;float,nbsp;i32nbsp;(i32)nbsp;*nbsp;}/tt/td
+td class=leftA pair, where the first element is a ttfloat/tt and 
the
+  second element is a a href=#t_pointerpointer/a to a
+  a href=#t_functionfunction/a that takes an tti32/tt, returning
+  an tti32/tt./td
   /tr
 /table
 /div
@@ -1100,16 +1098,14 @@
 h5Examples:/h5
 table class=layout
   tr class=layout
-td class=left
-  tt lt; { i32, i32, i32 } gt; /ttbr/
-  tt lt; { float, i32 (i32) * } gt; /ttbr/
-/td
-td class=left
-  a triple of three tti32/tt valuesbr/
-  A pair, where the first element is a ttfloat/tt and the second 
element 
-  is a a href=#t_pointerpointer/a to a a 
href=#t_functionfunction/a 
-  that takes an tti32/tt, returning an tti32/tt.br/
-/td
+td class=leftttlt; { i32, i32, i32 } gt;/tt/td
+td class=leftA triple of three tti32/tt values/td
+  /trtr class=layout
+  td 
class=leftttlt;nbsp;{nbsp;float,nbsp;i32nbsp;(i32)nbsp;*nbsp;}nbsp;gt;/tt/td
+td class=leftA pair, where the first element is a ttfloat/tt and 
the
+  second element is a a href=#t_pointerpointer/a to a
+  a href=#t_functionfunction/a that takes an tti32/tt, returning
+  an tti32/tt./td
   /tr
 /table
 /div
@@ -1302,7 +1298,7 @@
   ddVector constants are represented with notation similar to vector type
   definitions (a comma separated list of elements, surrounded by
   less-than/greater-than's (ttlt;gt;/tt)).  For example: ttlt; i32 
42,
-  i32 11, i32 74, i32 100 gt;/tt.  VEctor constants must have a
+  i32 11, i32 74, i32 100 gt;/tt.  Vector constants must have a
   href=#t_vectorvector type/a, and the number and types of elements must
   match those specified by the type.
   /dd
@@ -1400,12 +1396,12 @@
   dtbttuitofp ( CST to TYPE )/tt/b/dt
   ddConvert an unsigned integer constant to the corresponding floating point
   constant. TYPE must be floating point. CST must be of integer type. If the
-  value won't fit in the floating point type, the results are undefined./dd
+  value won't fit in the floating point type, precision may be lost./dd
 
   dtbttsitofp ( CST to TYPE )/tt/b/dt
   ddConvert a signed integer constant to the corresponding floating point
   constant. TYPE must be floating point. CST must be of integer type. If the
-  value won't fit in the floating point type, the results are undefined./dd
+  value won't fit in the floating point type, precision may be lost./dd
 
   dtbttptrtoint ( CST to TYPE )/tt/b/dt
   ddConvert a pointer typed constant to the corresponding integer constant
@@ -1746,10 +1742,10 @@
 
 h5Example:/h5
 pre
-  %retval = invoke i32 %Test(i32 15) to label %Continue
-  unwind label %TestCleanup i; {i32}:retval set/i
-  %retval = invoke a href=#callingconvcoldcc/a i32 %Test(i32 15) 
to label %Continue
-  unwind label %TestCleanup i; {i32}:retval set/i
+  %retval = invoke i32 %Test(i32 15) to label %Continue
+  unwind label %TestCleanup  i; {i32}:retval set/i
+  %retval = invoke a href=#callingconvcoldcc/a i32 %Test(i32 15) to 
label %Continue
+  unwind label %TestCleanup  i; {i32}:retval set/i
 /pre
 /div
 
@@ -1950,10 +1946,10 @@
 pThe 'ttfdiv/tt' instruction returns the quotient of its two
 operands./p
 h5Arguments:/h5
-pThe two arguments to the 'ttdiv/tt' instruction must be
+pThe two arguments to the 'ttfdiv/tt' instruction must be
 a href=#t_floatingfloating point/a values.  Both arguments must have
 identical types.  This instruction can also take a href=#t_vectorvector/a
-versions of the values in which case the elements must be floating point./p
+versions of floating point values./p
 h5Semantics:/h5
 pThe value produced is the floating point quotient of the two operands./p
 h5Example:/h5
@@ -2075,7 +2071,7 @@
 
 h5Overview:/h5
 pThe 'ttlshr/tt' instruction (logical 

Re: [llvm-commits] Major regressions

2007-04-21 Thread Christopher Lamb


On Apr 21, 2007, at 6:41 PM, Reid Spencer wrote:


On Sat, 2007-04-21 at 18:28 -0500, Christopher Lamb wrote:

On Apr 21, 2007, at 6:12 PM, Reid Spencer wrote:


On Sat, 2007-04-21 at 18:07 -0500, Christopher Lamb wrote:

I'm getting a regression after my fixes that's coming from
getABIAlignment not finding an alignment to use for a float x1
type,
is this a bug?


It could be. float x 1 isn't a useful vector so it probably  
doesn't

have an ABI Alignment. It should, however, default to whatever the
target's alignment is for float. Perhaps that case isn't covered in
TargetData or there's something else wrong with TargetData?

Did you walk through it in the debugger?


Yes. It appears that TargetData doesn't have logic to match the case
of vector types smaller than the smallest defined ABI vector type.
It's asserting in TargetData::getAlignmentInfo:

assert(BestMatchIdx != -1  Didn't find alignment info for this
datatype!);


That makes sense.



I don't think it has enough information to be able to determine
whether or not it's being asked for the alignment of a smaller vector
type that could be mapped onto a non-vector type.


What is your datalayout specification?


It's MacOS X's data layout:
target datalayout = e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32- 
i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64



My feeling is that in this case getAlignmentInfo should return a
conservative fallback alignment the same way that's done for  
integers.


Perhaps, we'll need to discuss with Duncan and Chris though.


That's fine. I've split my patch into parts that should be able to be  
applied independently. Only the second part depends on this getting  
fixed.


--
Christopher Lamb



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in

2007-04-21 Thread Reid Spencer


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.25 - 1.26
---
Log message:

Add the --host-target option.


---
Diffs of the changes:  (+2 -0)

 llvm-config.in.in |2 ++
 1 files changed, 2 insertions(+)


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.25 
llvm/tools/llvm-config/llvm-config.in.in:1.26
--- llvm/tools/llvm-config/llvm-config.in.in:1.25   Tue Mar 27 23:45:02 2007
+++ llvm/tools/llvm-config/llvm-config.in.inSun Apr 22 00:05:36 2007
@@ -128,6 +128,8 @@
 $has_opt = 1; print join(' ', name_map_entries), \n;
 } elsif ($arg eq --targets-built) {
 $has_opt = 1; print join(' ', @TARGETS_BUILT), \n;
+} elsif ($arg eq --host-target) {
+$has_opt = 1; print $TARGET_TRIPLE\n;
 } elsif ($arg eq --build-mode) {
 $has_opt = 1; print $LLVM_BUILDMODE\n;
 } elsif ($arg eq --obj-root) {



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Assembler/2007-02-07-UpgradeCSRETCC.ll

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test/Assembler:

2007-02-07-UpgradeCSRETCC.ll updated: 1.2 - 1.3
---
Log message:

For PR1146: http://llvm.org/PR1146 :
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get() 
interface.


---
Diffs of the changes:  (+2 -0)

 2007-02-07-UpgradeCSRETCC.ll |2 ++
 1 files changed, 2 insertions(+)


Index: llvm/test/Assembler/2007-02-07-UpgradeCSRETCC.ll
diff -u llvm/test/Assembler/2007-02-07-UpgradeCSRETCC.ll:1.2 
llvm/test/Assembler/2007-02-07-UpgradeCSRETCC.ll:1.3
--- llvm/test/Assembler/2007-02-07-UpgradeCSRETCC.ll:1.2Thu Feb  8 
02:03:46 2007
+++ llvm/test/Assembler/2007-02-07-UpgradeCSRETCC.llSun Apr 22 00:46:44 2007
@@ -1,5 +1,7 @@
 ; For PR1187
 ; RUN: llvm-upgrade  %s  /dev/null
+; XFAIL: *
+; Un-XFAIL this when PR1146 is fixed.
 
 %mystruct = type { int, double }
 %glob = global %mystruct { int 3, double 42.0 }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/tools/llvm2cpp/CppWriter.cpp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/tools/llvm2cpp:

CppWriter.cpp updated: 1.47 - 1.48
---
Log message:

For PR1146: http://llvm.org/PR1146 :
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get() 
interface.


---
Diffs of the changes:  (+12 -5)

 CppWriter.cpp |   17 -
 1 files changed, 12 insertions(+), 5 deletions(-)


Index: llvm/tools/llvm2cpp/CppWriter.cpp
diff -u llvm/tools/llvm2cpp/CppWriter.cpp:1.47 
llvm/tools/llvm2cpp/CppWriter.cpp:1.48
--- llvm/tools/llvm2cpp/CppWriter.cpp:1.47  Wed Apr 11 08:02:56 2007
+++ llvm/tools/llvm2cpp/CppWriter.cpp   Sun Apr 22 00:46:44 2007
@@ -461,13 +461,14 @@
   const ParamAttrsList *PAL = FT-getParamAttrs();
   Out  ParamAttrsList *  typeName  _PAL = 0;;
   nl(Out);
-  if (PAL  !PAL-empty()) {
-Out  typeName  _PAL = new ParamAttrsList();;
-nl(Out);
+  if (PAL) {
+Out  '{'; in(); nl(Out);
+Out  ParamAttrsVector Attrs;; nl(Out);
+Out  ParamAttrsWithIndex PAWI;; nl(Out);
 for (unsigned i = 0; i  PAL-size(); ++i) {
   uint16_t index = PAL-getParamIndex(i);
   uint16_t attrs = PAL-getParamAttrs(index);
-  Out  typeName  _PAL-addAttributes(  index  , 0;
+  Out  PAWI.index =   index  ; PAWI.attrs = 0 ;
   if (attrs  ParamAttr::SExt)
 Out   | ParamAttr::SExt;
   if (attrs  ParamAttr::ZExt)
@@ -480,9 +481,15 @@
 Out   | ParamAttr::NoReturn;
   if (attrs  ParamAttr::NoUnwind)
 Out   | ParamAttr::NoUnwind;
-  Out  );;
+  Out  ;;
+  nl(Out);
+  Out  Attrs.push_back(PAWI);;
   nl(Out);
 }
+Out  typeName  _PAL = ParamAttrsList::get(Attrs);;
+nl(Out);
+out(); nl(Out);
+Out  '}'; nl(Out);
   }
   bool isForward = printTypeInternal(FT-getReturnType());
   std::string retTypeName(getCppName(FT-getReturnType()));



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y

2007-04-21 Thread Reid Spencer


Changes in directory llvm/lib/AsmParser:

llvmAsmParser.y updated: 1.345 - 1.346
---
Log message:

For PR1146: http://llvm.org/PR1146 :
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get() 
interface.


---
Diffs of the changes:  (+59 -40)

 llvmAsmParser.y |   99 +---
 1 files changed, 59 insertions(+), 40 deletions(-)


Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.345 
llvm/lib/AsmParser/llvmAsmParser.y:1.346
--- llvm/lib/AsmParser/llvmAsmParser.y:1.345Sat Apr 21 13:36:27 2007
+++ llvm/lib/AsmParser/llvmAsmParser.y  Sun Apr 22 00:46:44 2007
@@ -1299,24 +1299,28 @@
   }
   | Types '(' ArgTypeListI ')' OptFuncAttrs {
 std::vectorconst Type* Params;
-ParamAttrsList Attrs;
-if ($5 != ParamAttr::None)
-  Attrs.addAttributes(0, $5);
+ParamAttrsVector Attrs;
+if ($5 != ParamAttr::None) {
+  ParamAttrsWithIndex X; X.index = 0; X.attrs = $5;
+  Attrs.push_back(X);
+}
 unsigned index = 1;
 TypeWithAttrsList::iterator I = $3-begin(), E = $3-end();
 for (; I != E; ++I, ++index) {
   const Type *Ty = I-Ty-get();
   Params.push_back(Ty);
   if (Ty != Type::VoidTy)
-if (I-Attrs != ParamAttr::None)
-  Attrs.addAttributes(index, I-Attrs);
+if (I-Attrs != ParamAttr::None) {
+  ParamAttrsWithIndex X; X.index = index; X.attrs = I-Attrs;
+  Attrs.push_back(X);
+}
 }
 bool isVarArg = Params.size()  Params.back() == Type::VoidTy;
 if (isVarArg) Params.pop_back();
 
 ParamAttrsList *ActualAttrs = 0;
 if (!Attrs.empty())
-  ActualAttrs = new ParamAttrsList(Attrs);
+  ActualAttrs = ParamAttrsList::get(Attrs);
 FunctionType *FT = FunctionType::get(*$1, Params, isVarArg, ActualAttrs);
 delete $3;   // Delete the argument list
 delete $1;   // Delete the return type handle
@@ -1325,24 +1329,28 @@
   }
   | VOID '(' ArgTypeListI ')' OptFuncAttrs {
 std::vectorconst Type* Params;
-ParamAttrsList Attrs;
-if ($5 != ParamAttr::None)
-  Attrs.addAttributes(0, $5);
+ParamAttrsVector Attrs;
+if ($5 != ParamAttr::None) {
+  ParamAttrsWithIndex X; X.index = 0; X.attrs = $5;
+  Attrs.push_back(X);
+}
 TypeWithAttrsList::iterator I = $3-begin(), E = $3-end();
 unsigned index = 1;
 for ( ; I != E; ++I, ++index) {
   const Type* Ty = I-Ty-get();
   Params.push_back(Ty);
   if (Ty != Type::VoidTy)
-if (I-Attrs != ParamAttr::None)
-  Attrs.addAttributes(index, I-Attrs);
+if (I-Attrs != ParamAttr::None) {
+  ParamAttrsWithIndex X; X.index = index; X.attrs = I-Attrs;
+  Attrs.push_back(X);
+}
 }
 bool isVarArg = Params.size()  Params.back() == Type::VoidTy;
 if (isVarArg) Params.pop_back();
 
 ParamAttrsList *ActualAttrs = 0;
 if (!Attrs.empty())
-  ActualAttrs = new ParamAttrsList(Attrs);
+  ActualAttrs = ParamAttrsList::get(Attrs);
 
 FunctionType *FT = FunctionType::get($1, Params, isVarArg, ActualAttrs);
 delete $3;  // Delete the argument list
@@ -2135,9 +2143,11 @@
 GEN_ERROR(Reference to abstract result: + $2-get()-getDescription());
 
   std::vectorconst Type* ParamTypeList;
-  ParamAttrsList ParamAttrs;
-  if ($7 != ParamAttr::None)
-ParamAttrs.addAttributes(0, $7);
+  ParamAttrsVector Attrs;
+  if ($7 != ParamAttr::None) {
+ParamAttrsWithIndex PAWI; PAWI.index = 0; PAWI.attrs = $7;
+Attrs.push_back(PAWI);
+  }
   if ($5) {   // If there are arguments...
 unsigned index = 1;
 for (ArgListType::iterator I = $5-begin(); I != $5-end(); ++I, ++index) {
@@ -2146,20 +2156,21 @@
 GEN_ERROR(Reference to abstract argument:  + Ty-getDescription());
   ParamTypeList.push_back(Ty);
   if (Ty != Type::VoidTy)
-if (I-Attrs != ParamAttr::None)
-  ParamAttrs.addAttributes(index, I-Attrs);
+if (I-Attrs != ParamAttr::None) {
+  ParamAttrsWithIndex PAWI; PAWI.index = index; PAWI.attrs = I-Attrs;
+  Attrs.push_back(PAWI);
+}
 }
   }
 
   bool isVarArg = ParamTypeList.size()  ParamTypeList.back() == Type::VoidTy;
   if (isVarArg) ParamTypeList.pop_back();
 
-  ParamAttrsList *ActualAttrs = 0;
-  if (!ParamAttrs.empty())
-ActualAttrs = new ParamAttrsList(ParamAttrs);
+  ParamAttrsList *PAL = 0;
+  if (!Attrs.empty())
+PAL = ParamAttrsList::get(Attrs);
 
-  FunctionType *FT = FunctionType::get(*$2, ParamTypeList, isVarArg, 
-   ActualAttrs);
+  FunctionType *FT = FunctionType::get(*$2, ParamTypeList, isVarArg, PAL);
   const PointerType *PFT = PointerType::get(FT);
   delete $2;
 
@@ -2490,9 +2501,11 @@
 !(Ty = dyn_castFunctionType(PFTy-getElementType( {
   // Pull out the types of all of the arguments...
   std::vectorconst Type* 

[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/lib/Bytecode/Reader:

Reader.cpp updated: 1.250 - 1.251
---
Log message:

For PR1146: http://llvm.org/PR1146 :
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get() 
interface.


---
Diffs of the changes:  (+8 -6)

 Reader.cpp |   14 --
 1 files changed, 8 insertions(+), 6 deletions(-)


Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.250 
llvm/lib/Bytecode/Reader/Reader.cpp:1.251
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.250   Sat Apr 21 13:36:27 2007
+++ llvm/lib/Bytecode/Reader/Reader.cpp Sun Apr 22 00:46:44 2007
@@ -1078,16 +1078,18 @@
 
 ParamAttrsList *BytecodeReader::ParseParamAttrsList() {
   unsigned NumAttrs = read_vbr_uint();
-  ParamAttrsList *Attrs = 0;
+  ParamAttrsList *PAL = 0;
   if (NumAttrs) {
-Attrs = new ParamAttrsList();
+ParamAttrsVector Attrs;
+ParamAttrsWithIndex PAWI;
 while (NumAttrs--) {
-  uint16_t index = read_vbr_uint();
-  uint16_t attrs = read_vbr_uint();
-  Attrs-addAttributes(index, attrs);
+  PAWI.index = read_vbr_uint();
+  PAWI.attrs = read_vbr_uint();
+  Attrs.push_back(PAWI);
 }
+PAL = ParamAttrsList::get(Attrs);
   }
-  return Attrs;
+  return PAL;
 }
 
 



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/Transforms/SimplifyCFG/2006-10-29-InvokeCrash.ll

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test/Transforms/SimplifyCFG:

2006-10-29-InvokeCrash.ll updated: 1.3 - 1.4
---
Log message:

For PR1146: http://llvm.org/PR1146 :
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get() 
interface.


---
Diffs of the changes:  (+2 -0)

 2006-10-29-InvokeCrash.ll |2 ++
 1 files changed, 2 insertions(+)


Index: llvm/test/Transforms/SimplifyCFG/2006-10-29-InvokeCrash.ll
diff -u llvm/test/Transforms/SimplifyCFG/2006-10-29-InvokeCrash.ll:1.3 
llvm/test/Transforms/SimplifyCFG/2006-10-29-InvokeCrash.ll:1.4
--- llvm/test/Transforms/SimplifyCFG/2006-10-29-InvokeCrash.ll:1.3  Sun Dec 
31 00:02:00 2006
+++ llvm/test/Transforms/SimplifyCFG/2006-10-29-InvokeCrash.ll  Sun Apr 22 
00:46:44 2007
@@ -1,4 +1,6 @@
 ; RUN: llvm-upgrade  %s | llvm-as | opt -simplifycfg -disable-output
+; XFAIL: *
+; Un-XFAIL this when PR1146 is finished.
 
%struct..4._102 = type { %struct.QVectorData* }
%struct..5._125 = type { %struct.QMapData* }



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Function.cpp Instructions.cpp Type.cpp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/lib/VMCore:

AsmWriter.cpp updated: 1.272 - 1.273
Function.cpp updated: 1.124 - 1.125
Instructions.cpp updated: 1.87 - 1.88
Type.cpp updated: 1.184 - 1.185
---
Log message:

For PR1146: http://llvm.org/PR1146 :
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get() 
interface.


---
Diffs of the changes:  (+46 -60)

 AsmWriter.cpp|   11 +++
 Function.cpp |   49 ++---
 Instructions.cpp |2 --
 Type.cpp |   44 +---
 4 files changed, 46 insertions(+), 60 deletions(-)


Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.272 llvm/lib/VMCore/AsmWriter.cpp:1.273
--- llvm/lib/VMCore/AsmWriter.cpp:1.272 Sat Apr 21 13:36:27 2007
+++ llvm/lib/VMCore/AsmWriter.cpp   Sun Apr 22 00:46:44 2007
@@ -1383,6 +1383,17 @@
 // Located here because so much of the needed functionality is here.
 void Type::dump() const { print(*cerr.stream()); cerr  '\n'; }
 
+void
+ParamAttrsList::dump() const {
+  cerr  PAL[ ;
+  for (unsigned i = 0; i  attrs.size(); ++i) {
+uint16_t index = getParamIndex(i);
+uint16_t attrs = getParamAttrs(index);
+cerr  {  index  ,  attrs  } ;
+  }
+  cerr  ]\n;
+}
+
 
//===--===//
 // SlotMachine Implementation
 
//===--===//


Index: llvm/lib/VMCore/Function.cpp
diff -u llvm/lib/VMCore/Function.cpp:1.124 llvm/lib/VMCore/Function.cpp:1.125
--- llvm/lib/VMCore/Function.cpp:1.124  Mon Apr 16 23:31:29 2007
+++ llvm/lib/VMCore/Function.cppSun Apr 22 00:46:44 2007
@@ -16,6 +16,7 @@
 #include llvm/ParameterAttributes.h
 #include llvm/IntrinsicInst.h
 #include llvm/Support/LeakDetector.h
+#include llvm/Support/ManagedStatic.h
 #include SymbolTableListTraitsImpl.h
 #include llvm/ADT/StringExtras.h
 using namespace llvm;
@@ -103,35 +104,29 @@
   return Result;
 }
 
-void
-ParamAttrsList::addAttributes(uint16_t Index, uint16_t Attrs) {
-  // First, try to replace an existing one
-  for (unsigned i = 0; i  attrs.size(); ++i)
-if (attrs[i].index == Index) {
-  attrs[i].attrs |= Attrs;
-  return;
-}
+void 
+ParamAttrsList::Profile(FoldingSetNodeID ID) const {
+  for (unsigned i = 0; i  attrs.size(); ++i) {
+unsigned val = attrs[i].attrs  16 | attrs[i].index;
+ID.AddInteger(val);
+  }
+}
 
-  // If not found, add a new one
-  ParamAttrsWithIndex Val;
-  Val.attrs = Attrs;
-  Val.index = Index;
-  attrs.push_back(Val);
-}
-
-void
-ParamAttrsList::removeAttributes(uint16_t Index, uint16_t Attrs) {
-  // Find the index from which to remove the attributes
-  for (unsigned i = 0; i  attrs.size(); ++i)
-if (attrs[i].index == Index) {
-  attrs[i].attrs = ~Attrs;
-  if (attrs[i].attrs == ParamAttr::None)
-attrs.erase(attrs[i]);
-  return;
-}
+static ManagedStaticFoldingSetParamAttrsList  ParamAttrsLists;
 
-  // The index wasn't found above
-  assert(0  Index not found for removeAttributes);
+ParamAttrsList *
+ParamAttrsList::get(const ParamAttrsVector attrVec) {
+  assert(!attrVec.empty()  Illegal to create empty ParamAttrsList);
+  ParamAttrsList key(attrVec);
+  FoldingSetNodeID ID;
+  key.Profile(ID);
+  void *InsertPos;
+  ParamAttrsList* PAL = ParamAttrsLists-FindNodeOrInsertPos(ID, InsertPos);
+  if (!PAL) {
+PAL = new ParamAttrsList(attrVec);
+ParamAttrsLists-InsertNode(PAL, InsertPos);
+  }
+  return PAL;
 }
 
 
//===--===//


Index: llvm/lib/VMCore/Instructions.cpp
diff -u llvm/lib/VMCore/Instructions.cpp:1.87 
llvm/lib/VMCore/Instructions.cpp:1.88
--- llvm/lib/VMCore/Instructions.cpp:1.87   Sat Apr 21 13:36:27 2007
+++ llvm/lib/VMCore/Instructions.cppSun Apr 22 00:46:44 2007
@@ -186,7 +186,6 @@
 
 CallInst::~CallInst() {
   delete [] OperandList;
-  delete ParamAttrs; // FIXME: ParamAttrsList should be uniqued!
 }
 
 void CallInst::init(Value *Func, Value* const *Params, unsigned NumParams) {
@@ -354,7 +353,6 @@
 
 InvokeInst::~InvokeInst() {
   delete [] OperandList;
-  delete ParamAttrs; // FIXME: ParamAttrsList should be uniqued!
 }
 
 void InvokeInst::init(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException,


Index: llvm/lib/VMCore/Type.cpp
diff -u llvm/lib/VMCore/Type.cpp:1.184 llvm/lib/VMCore/Type.cpp:1.185
--- llvm/lib/VMCore/Type.cpp:1.184  Fri Apr 20 17:33:47 2007
+++ llvm/lib/VMCore/Type.cppSun Apr 22 00:46:44 2007
@@ -643,20 +643,13 @@
   return false;
 const ParamAttrsList *Attrs1 = FTy-getParamAttrs();
 const ParamAttrsList *Attrs2 = FTy2-getParamAttrs();
-if ((!Attrs1  Attrs2  !Attrs2-empty()) ||
-(!Attrs2  Attrs1  !Attrs1-empty()) ||
+if ((!Attrs1  Attrs2) || (!Attrs2  Attrs1) ||
 (Attrs1  Attrs2 

[llvm-commits] CVS: llvm/include/llvm/DerivedTypes.h ParameterAttributes.h

2007-04-21 Thread Reid Spencer


Changes in directory llvm/include/llvm:

DerivedTypes.h updated: 1.91 - 1.92
ParameterAttributes.h updated: 1.7 - 1.8
---
Log message:

For PR1146: http://llvm.org/PR1146 :
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get() 
interface.


---
Diffs of the changes:  (+26 -47)

 DerivedTypes.h|1 
 ParameterAttributes.h |   72 ++
 2 files changed, 26 insertions(+), 47 deletions(-)


Index: llvm/include/llvm/DerivedTypes.h
diff -u llvm/include/llvm/DerivedTypes.h:1.91 
llvm/include/llvm/DerivedTypes.h:1.92
--- llvm/include/llvm/DerivedTypes.h:1.91   Mon Apr  9 01:06:57 2007
+++ llvm/include/llvm/DerivedTypes.hSun Apr 22 00:46:44 2007
@@ -148,7 +148,6 @@
bool IsVarArgs, ParamAttrsList *Attrs = 0);
 
 public:
-  virtual ~FunctionType();
   /// FunctionType::get - This static method is the primary way of constructing
   /// a FunctionType. 
   ///


Index: llvm/include/llvm/ParameterAttributes.h
diff -u llvm/include/llvm/ParameterAttributes.h:1.7 
llvm/include/llvm/ParameterAttributes.h:1.8
--- llvm/include/llvm/ParameterAttributes.h:1.7 Tue Apr 10 21:44:19 2007
+++ llvm/include/llvm/ParameterAttributes.h Sun Apr 22 00:46:44 2007
@@ -18,6 +18,7 @@
 #define LLVM_PARAMETER_ATTRIBUTES_H
 
 #include llvm/ADT/SmallVector.h
+#include llvm/ADT/FoldingSet.h
 
 namespace llvm {
 
@@ -39,6 +40,17 @@
 
 }
 
+/// This is just a pair of values to associate a set of parameter attributes
+/// with a parameter index.
+/// @brief ParameterAttributes with a parameter index.
+struct ParamAttrsWithIndex {
+  uint16_t attrs; /// The attributes that are set, |'d together
+  uint16_t index; /// Index of the parameter for which the attributes apply
+};
+
+/// @brief A vector of attribute/index pairs.
+typedef SmallVectorParamAttrsWithIndex,4 ParamAttrsVector;
+
 typedef ParamAttr::Attributes ParameterAttributes;
 
 /// This class is used by Function and CallInst to represent the set of 
@@ -50,38 +62,27 @@
 /// a string of mnemonics suitable for LLVM Assembly output. Various accessors
 /// are provided to obtain information about the attributes.
 /// @brief A List of ParameterAttributes.
-class ParamAttrsList {
-  //void operator=(const ParamAttrsList ); // Do not implement
-  //ParamAttrsList(const ParamAttrsList ); // Do not implement
-
-  /// @name Types
+class ParamAttrsList : public FoldingSetNode {
+  /// @name Construction
   /// @{
-  public:
-/// This is an internal structure used to associate the ParameterAttributes
-/// with a parameter index. 
-/// @brief ParameterAttributes with a parameter index.
-struct ParamAttrsWithIndex {
-  uint16_t attrs; /// The attributes that are set, |'d together
-  uint16_t index; /// Index of the parameter for which the attributes 
apply
-};
+  private:
+// ParamAttrsList is uniqued, thes should not be publicly available
+void operator=(const ParamAttrsList ); // Do not implement
+ParamAttrsList(const ParamAttrsList ); // Do not implement
+ParamAttrsList();   // Do not implement
+~ParamAttrsList() {}// Not public!
 
-/// @brief A vector of attribute/index pairs.
-typedef SmallVectorParamAttrsWithIndex,4 ParamAttrsVector;
+/// @brief Construct an ParamAttrsList from a ParamAttrsVector
+explicit ParamAttrsList(const ParamAttrsVector attrVec) : attrs(attrVec) 
{}
 
-  /// @}
-  /// @name Construction
-  /// @{
   public:
-/// @brief Construct an empty ParamAttrsList
-ParamAttrsList() {}
-
 /// This method ensures the uniqueness of ParamAttrsList instances. The
 /// argument is a vector of attribute/index pairs as represented by the
 /// ParamAttrsWithIndex structure. The vector is used in the construction 
of
 /// the ParamAttrsList instance. If an instance with identical vector pairs
 /// exists, it will be returned instead of creating a new instance.
 /// @brief Get a ParamAttrsList instance.
-ParamAttrsList *get(const ParamAttrsVector attrVec);
+static ParamAttrsList *get(const ParamAttrsVector attrVec);
 
   /// @}
   /// @name Accessors
@@ -155,33 +156,12 @@
 /// @brief Return the number of parameter attributes this type has.
 unsigned size() const { return attrs.size(); }
 
-/// Clients generally should not use this method. It is used internally by
-/// LLVM.
-/// @returns true if this ParamAttrsList is empty.
-/// @brief Determine emptiness of ParamAttrsList.
-unsigned empty() const { return attrs.empty(); }
-
   /// @}
-  /// @name Mutators
+  /// @name Implementation Details
   /// @{
   public:
-/// This method will add the \p attrs to the parameter with index
-/// \p param_index. If the parameter index does not exist it will be 
created
-/// and the \p attrs will be the only attributes set. Otherwise, any 
-/// existing 

[llvm-commits] [llvm-gcc] Patch for PR1146 For Unique ParamAttrsList objects

2007-04-21 Thread Reid Spencer
Please review and apply to llvm-gcc. These changes are needed to make
llvm-gcc work with latest changes in LLVM.

Reid.
Index: gcc/llvm-types.cpp
===
--- gcc/llvm-types.cpp	(revision 314)
+++ gcc/llvm-types.cpp	(working copy)
@@ -751,15 +751,17 @@
   for (; Args  TREE_TYPE(Args) != void_type_node; Args = TREE_CHAIN(Args))
 ABIConverter.HandleArgument(TREE_TYPE(Args));
 
-  ParamAttrsList *ParamAttrs = 0;
+  ParamAttrsList *PAL = 0;
 
   if (static_chain) {
 // Pass the static chain in a register.
-ParamAttrs = new ParamAttrsList();
-ParamAttrs-addAttributes(1, ParamAttr::InReg);
+ParamAttrsVector Attrs;
+ParamAttrsWithIndex PAWI; PAWI.index = 1; PAWI.attrs = ParamAttr::InReg;
+Attrs.push_back(PAWI);
+PAL = ParamAttrsList::get(Attrs);
   }
 
-  return FunctionType::get(RetTy, ArgTys, false, ParamAttrs);
+  return FunctionType::get(RetTy, ArgTys, false, PAL);
 }
 
 const FunctionType *TypeConverter::ConvertFunctionType(tree type,
@@ -811,7 +813,7 @@
   // the parameter attribute in the FunctionType so any arguments passed to
   // the function will be correctly sign or zero extended to 32-bits by
   // the LLVM code gen.
-  ParamAttrsList Attrs;
+  ParamAttrsVector Attrs;
   uint16_t RAttributes = ParamAttr::None;
   if (CallingConv == CallingConv::C) {
 tree ResultTy = TREE_TYPE(type);  
@@ -827,8 +829,10 @@
   RAttributes |= ParamAttr::SExt;
 }
   }
-  if (RAttributes != ParamAttr::None)
-Attrs.addAttributes(0, RAttributes);
+  if (RAttributes != ParamAttr::None) {
+ParamAttrsWithIndex PAWI; PAWI.index = 0; PAWI.attrs = RAttributes;
+Attrs.push_back(PAWI);
+  }
   
   unsigned Idx = 1;
   bool isFirstArg = true;
@@ -838,16 +842,21 @@
   LLVM_TARGET_INIT_REGPARM(lparam, type);
 #endif // LLVM_TARGET_ENABLE_REGPARM
 
-  if (static_chain)
+  if (static_chain) {
 // Pass the static chain in a register.
-Attrs.addAttributes(Idx++, ParamAttr::InReg);
+ParamAttrsWithIndex PAWI; PAWI.index = Idx++; PAWI.attrs = ParamAttr::InReg;
+Attrs.push_back(PAWI);
+  }
   
   // The struct return attribute must be associated with the first
   // parameter but that parameter may have other attributes too so we set up
   // the first Attributes value here based on struct return. This only works
   // Handle the structure return calling convention
-  if (ABIConverter.isStructReturn())
-Attrs.addAttributes(Idx++, ParamAttr::StructRet);
+  if (ABIConverter.isStructReturn()) {
+ParamAttrsWithIndex PAWI; 
+PAWI.index = Idx++; PAWI.attrs = ParamAttr::StructRet;
+Attrs.push_back(PAWI);
+  }
   
   for (tree Args = TYPE_ARG_TYPES(type);
Args  TREE_VALUE(Args) != void_type_node; Args = TREE_CHAIN(Args)) {
@@ -873,18 +882,20 @@
 isVarArg, lparam);
 #endif // LLVM_TARGET_ENABLE_REGPARM
 
-if (Attributes != ParamAttr::None)
-  Attrs.addAttributes(Idx, Attributes);
+if (Attributes != ParamAttr::None) {
+ ParamAttrsWithIndex PAWI; PAWI.index = Idx; PAWI.attrs = Attributes;
+ Attrs.push_back(PAWI);
+}
 Idx++;
   }
 
   // Only instantiate the parameter attributes if we got some
-  ParamAttrsList *ParamAttrs = 0;
+  ParamAttrsList *PAL = 0;
   if (!Attrs.empty())
-ParamAttrs = new ParamAttrsList(Attrs);
+PAL = ParamAttrsList::get(Attrs);
 
   // Finally, make the function type
-  return FunctionType::get(RetTy, ArgTypes, isVarArg, ParamAttrs);
+  return FunctionType::get(RetTy, ArgTypes, isVarArg, PAL);
 }
 
 //===--===//
___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] [126379] apply reid's patch for PR1146

2007-04-21 Thread clattner
Revision: 126379
Author:   clattner
Date: 2007-04-21 22:52:13 -0700 (Sat, 21 Apr 2007)

Log Message:
---
apply reid's patch for PR1146

Modified Paths:
--
apple-local/branches/llvm/gcc/llvm-types.cpp

Modified: apple-local/branches/llvm/gcc/llvm-types.cpp
===
--- apple-local/branches/llvm/gcc/llvm-types.cpp2007-04-21 06:48:37 UTC 
(rev 126378)
+++ apple-local/branches/llvm/gcc/llvm-types.cpp2007-04-22 05:52:13 UTC 
(rev 126379)
@@ -751,15 +751,17 @@
   for (; Args  TREE_TYPE(Args) != void_type_node; Args = TREE_CHAIN(Args))
 ABIConverter.HandleArgument(TREE_TYPE(Args));
 
-  ParamAttrsList *ParamAttrs = 0;
+  ParamAttrsList *PAL = 0;
 
   if (static_chain) {
 // Pass the static chain in a register.
-ParamAttrs = new ParamAttrsList();
-ParamAttrs-addAttributes(1, ParamAttr::InReg);
+ParamAttrsVector Attrs;
+ParamAttrsWithIndex PAWI; PAWI.index = 1; PAWI.attrs = ParamAttr::InReg;
+Attrs.push_back(PAWI);
+PAL = ParamAttrsList::get(Attrs);
   }
 
-  return FunctionType::get(RetTy, ArgTys, false, ParamAttrs);
+  return FunctionType::get(RetTy, ArgTys, false, PAL);
 }
 
 const FunctionType *TypeConverter::ConvertFunctionType(tree type,
@@ -811,7 +813,7 @@
   // the parameter attribute in the FunctionType so any arguments passed to
   // the function will be correctly sign or zero extended to 32-bits by
   // the LLVM code gen.
-  ParamAttrsList Attrs;
+  ParamAttrsVector Attrs;
   uint16_t RAttributes = ParamAttr::None;
   if (CallingConv == CallingConv::C) {
 tree ResultTy = TREE_TYPE(type);  
@@ -827,8 +829,10 @@
   RAttributes |= ParamAttr::SExt;
 }
   }
-  if (RAttributes != ParamAttr::None)
-Attrs.addAttributes(0, RAttributes);
+  if (RAttributes != ParamAttr::None) {
+ParamAttrsWithIndex PAWI; PAWI.index = 0; PAWI.attrs = RAttributes;
+Attrs.push_back(PAWI);
+  }
   
   unsigned Idx = 1;
   bool isFirstArg = true;
@@ -838,16 +842,21 @@
   LLVM_TARGET_INIT_REGPARM(lparam, type);
 #endif // LLVM_TARGET_ENABLE_REGPARM
 
-  if (static_chain)
+  if (static_chain) {
 // Pass the static chain in a register.
-Attrs.addAttributes(Idx++, ParamAttr::InReg);
+ParamAttrsWithIndex PAWI; PAWI.index = Idx++; PAWI.attrs = 
ParamAttr::InReg;
+Attrs.push_back(PAWI);
+  }
   
   // The struct return attribute must be associated with the first
   // parameter but that parameter may have other attributes too so we set up
   // the first Attributes value here based on struct return. This only works
   // Handle the structure return calling convention
-  if (ABIConverter.isStructReturn())
-Attrs.addAttributes(Idx++, ParamAttr::StructRet);
+  if (ABIConverter.isStructReturn()) {
+ParamAttrsWithIndex PAWI; 
+PAWI.index = Idx++; PAWI.attrs = ParamAttr::StructRet;
+Attrs.push_back(PAWI);
+  }
   
   for (tree Args = TYPE_ARG_TYPES(type);
Args  TREE_VALUE(Args) != void_type_node; Args = TREE_CHAIN(Args)) {
@@ -873,18 +882,20 @@
 isVarArg, lparam);
 #endif // LLVM_TARGET_ENABLE_REGPARM
 
-if (Attributes != ParamAttr::None)
-  Attrs.addAttributes(Idx, Attributes);
+if (Attributes != ParamAttr::None) {
+ ParamAttrsWithIndex PAWI; PAWI.index = Idx; PAWI.attrs = Attributes;
+ Attrs.push_back(PAWI);
+}
 Idx++;
   }
 
   // Only instantiate the parameter attributes if we got some
-  ParamAttrsList *ParamAttrs = 0;
+  ParamAttrsList *PAL = 0;
   if (!Attrs.empty())
-ParamAttrs = new ParamAttrsList(Attrs);
+PAL = ParamAttrsList::get(Attrs);
 
   // Finally, make the function type
-  return FunctionType::get(RetTy, ArgTypes, isVarArg, ParamAttrs);
+  return FunctionType::get(RetTy, ArgTypes, isVarArg, PAL);
 }
 
 
//===--===//


___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] CVS: llvm/test/CFrontend/dg.exp

2007-04-21 Thread Reid Spencer


Changes in directory llvm/test/CFrontend:

dg.exp updated: 1.5 - 1.6
---
Log message:

Make running these tests conditional on llvm-gcc supporting the language
of these test cases.


---
Diffs of the changes:  (+3 -1)

 dg.exp |4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)


Index: llvm/test/CFrontend/dg.exp
diff -u llvm/test/CFrontend/dg.exp:1.5 llvm/test/CFrontend/dg.exp:1.6
--- llvm/test/CFrontend/dg.exp:1.5  Sun Apr 15 15:08:37 2007
+++ llvm/test/CFrontend/dg.exp  Sun Apr 22 00:53:18 2007
@@ -1,3 +1,5 @@
 load_lib llvm.exp
 
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
+if [ llvm_gcc_supports c ] then {
+  RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
+}



___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


  1   2   >