[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp

2006-04-25 Thread Nate Begeman


Changes in directory llvm/lib/ExecutionEngine/JIT:

JITEmitter.cpp updated: 1.83 -> 1.84
---
Log message:

Fix a warning


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

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


Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.83 
llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.84
--- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.83Sat Apr 22 13:53:45 2006
+++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Tue Apr 25 12:46:32 2006
@@ -699,7 +699,7 @@
   for (unsigned i = 0; i < Index; ++i)
 Offset += JT[i].MBBs.size() * EntrySize;
   
-  return (uint64_t)((char *)JumpTableBase + Offset);
+  return (intptr_t)((char *)JumpTableBase + Offset);
 }
 
 unsigned char* JITEmitter::allocateGlobal(unsigned size, unsigned alignment)



___
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/X86InstrSSE.td

2006-04-25 Thread Evan Cheng


Changes in directory llvm/lib/Target/X86:

X86InstrSSE.td updated: 1.113 -> 1.114
---
Log message:

Fix a typo.


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

 X86InstrSSE.td |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Target/X86/X86InstrSSE.td
diff -u llvm/lib/Target/X86/X86InstrSSE.td:1.113 
llvm/lib/Target/X86/X86InstrSSE.td:1.114
--- llvm/lib/Target/X86/X86InstrSSE.td:1.113Mon Apr 24 19:50:01 2006
+++ llvm/lib/Target/X86/X86InstrSSE.td  Tue Apr 25 12:48:41 2006
@@ -1988,7 +1988,7 @@
 UNPCKH_shuffle_mask)))]>;
 def PUNPCKHQDQrr : PDI<0x6D, MRMSrcReg, 
(ops VR128:$dst, VR128:$src1, VR128:$src2),
-   "punpckhdq {$src2, $dst|$dst, $src2}",
+   "punpckhqdq {$src2, $dst|$dst, $src2}",
   [(set VR128:$dst,
 (v2i64 (vector_shuffle VR128:$src1, VR128:$src2,
 UNPCKH_shuffle_mask)))]>;



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


[llvm-commits] CVS: llvm/test/Regression/Analysis/DSGraph/2006-04-25-ZeroArrayStructUse.ll

2006-04-25 Thread Andrew Lenharth


Changes in directory llvm/test/Regression/Analysis/DSGraph:

2006-04-25-ZeroArrayStructUse.ll added (r1.1)
---
Log message:

another c99 style problem


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

 2006-04-25-ZeroArrayStructUse.ll |   22 ++
 1 files changed, 22 insertions(+)


Index: llvm/test/Regression/Analysis/DSGraph/2006-04-25-ZeroArrayStructUse.ll
diff -c /dev/null 
llvm/test/Regression/Analysis/DSGraph/2006-04-25-ZeroArrayStructUse.ll:1.1
*** /dev/null   Tue Apr 25 14:28:06 2006
--- llvm/test/Regression/Analysis/DSGraph/2006-04-25-ZeroArrayStructUse.ll  
Tue Apr 25 14:27:56 2006
***
*** 0 
--- 1,22 
+ ; RUN: analyze %s -datastructure-gc -dsgc-check-flags=x:IA
+ 
+ ; ModuleID = 'bug3.bc'
+ target endian = little
+ target pointersize = 32
+ target triple = "i686-pc-linux-gnu"
+ 
+ 
+ %struct.c99 = type {
+ uint,
+ uint,
+ [0 x sbyte*] }
+ 
+ implementation   ; Functions:
+ 
+ 
+ void %foo(%struct.c99* %x) {
+ entry:
+ %B1 = getelementptr %struct.c99* %x, long 0, uint 2, uint 1
+ %B2 = getelementptr %struct.c99* %x, long 0, uint 2, uint 2
+ 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/Analysis/DataStructure/Local.cpp

2006-04-25 Thread Andrew Lenharth


Changes in directory llvm/lib/Analysis/DataStructure:

Local.cpp updated: 1.150 -> 1.151
---
Log message:

better c99 struct handling

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

 Local.cpp |3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)


Index: llvm/lib/Analysis/DataStructure/Local.cpp
diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.150 
llvm/lib/Analysis/DataStructure/Local.cpp:1.151
--- llvm/lib/Analysis/DataStructure/Local.cpp:1.150 Wed Apr 19 10:34:02 2006
+++ llvm/lib/Analysis/DataStructure/Local.cpp   Tue Apr 25 14:33:23 2006
@@ -1122,13 +1122,12 @@
 for (unsigned i = 0, e = CS->getNumOperands(); i != e; ++i) {
   DSNode *NHN = NH.getNode();
   //Some programmers think ending a structure with a [0 x sbyte] is cute
-  //This should be ok as the allocation type should grow this type when
-  //it is merged in if it is bigger.
   if (SL->MemberOffsets[i] < SL->StructSize) {
 DSNodeHandle NewNH(NHN, NH.getOffset()+(unsigned)SL->MemberOffsets[i]);
 MergeConstantInitIntoNode(NewNH, cast(CS->getOperand(i)));
   } else if (SL->MemberOffsets[i] == SL->StructSize) {
 DEBUG(std::cerr << "Zero size element at end of struct\n");
+NHN->foldNodeCompletely();
   } else {
 assert(0 && "type was smaller than offsets of of struct layout 
indicate");
   }



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


[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/GraphChecker.cpp

2006-04-25 Thread Andrew Lenharth


Changes in directory llvm/lib/Analysis/DataStructure:

GraphChecker.cpp updated: 1.19 -> 1.20
---
Log message:

slightly more useful error message

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

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


Index: llvm/lib/Analysis/DataStructure/GraphChecker.cpp
diff -u llvm/lib/Analysis/DataStructure/GraphChecker.cpp:1.19 
llvm/lib/Analysis/DataStructure/GraphChecker.cpp:1.20
--- llvm/lib/Analysis/DataStructure/GraphChecker.cpp:1.19   Sun Oct 23 
19:38:38 2005
+++ llvm/lib/Analysis/DataStructure/GraphChecker.cppTue Apr 25 14:33:41 2006
@@ -183,8 +183,9 @@
 }
 
 if (CheckFlagsM.count(Name) && CheckFlagsM[Name] != N->getNodeFlags()) 
{
-  std::cerr << "Node flags are not as expected for node: " << Name
-<< "\n";
+  std::cerr << "Node flags are not as expected for node: " << Name 
+<< " (" << CheckFlagsM[Name] << ":" print(std::cerr, &G);
   abort();
 }



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

2006-04-25 Thread Nate Begeman


Changes in directory llvm/lib/Target/X86:

X86JITInfo.cpp updated: 1.15 -> 1.16
---
Log message:

Keep the stack from on darwin 16-byte aligned.  This fixes many JIT
failres.


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

 X86JITInfo.cpp |   15 +--
 1 files changed, 13 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/X86/X86JITInfo.cpp
diff -u llvm/lib/Target/X86/X86JITInfo.cpp:1.15 
llvm/lib/Target/X86/X86JITInfo.cpp:1.16
--- llvm/lib/Target/X86/X86JITInfo.cpp:1.15 Thu Jan 26 13:55:20 2006
+++ llvm/lib/Target/X86/X86JITInfo.cpp  Tue Apr 25 15:54:26 2006
@@ -59,8 +59,19 @@
 "movl%esp, %ebp\n"// Standard prologue
 "pushl   %eax\n"
 "pushl   %edx\n"  // save EAX/EDX
-#if defined(__CYGWIN__) || defined(__APPLE__)
-"call _X86CompilationCallback2\n"
+#if defined(__CYGWIN__)
+"call_X86CompilationCallback2\n"
+#elif defined(__APPLE__)
+"movl4(%ebp), %eax\n" // load the address of return address
+"movl$24, %edx\n" // if the opcode of the instruction at the
+"cmpb$-51, (%eax)\n"  // return address is our 0xCD marker, then
+"movl$12, %eax\n" // subtract 24 from %esp to realign it to 16
+"cmovne  %eax, %edx\n"// bytes after the push of edx, the amount to.
+"subl%edx, %esp\n"// the push of edx to keep it aligned.
+"pushl   %edx\n"  // subtract.  Otherwise, subtract 12 bytes after
+"call_X86CompilationCallback2\n"
+"popl%edx\n"
+"addl%edx, %esp\n"
 #else
 "call X86CompilationCallback2\n"
 #endif



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

2006-04-25 Thread Evan Cheng


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.226 -> 1.227
---
Log message:

Don't forget return void.


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

 SelectionDAGISel.cpp |3 +++
 1 files changed, 3 insertions(+)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.226 
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.227
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.226Sun Apr 23 
01:26:20 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp  Tue Apr 25 18:03:35 2006
@@ -2385,6 +2385,9 @@
   break;
 }
   }
+
+  if (RetVals.size() == 0)
+RetVals.push_back(MVT::isVoid);
   
   // Create the node.
   SDNode *Result = DAG.getNode(ISD::FORMAL_ARGUMENTS, RetVals, Ops).Val;



___
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 X86ISelLowering.h

2006-04-25 Thread Evan Cheng


Changes in directory llvm/lib/Target/X86:

X86ISelLowering.cpp updated: 1.187 -> 1.188
X86ISelLowering.h updated: 1.59 -> 1.60
---
Log message:

Switching over FORMAL_ARGUMENTS mechanism to lower call arguments.


---
Diffs of the changes:  (+177 -80)

 X86ISelLowering.cpp |  245 +++-
 X86ISelLowering.h   |   12 ++
 2 files changed, 177 insertions(+), 80 deletions(-)


Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.187 
llvm/lib/Target/X86/X86ISelLowering.cpp:1.188
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.187   Tue Apr 25 15:13:52 2006
+++ llvm/lib/Target/X86/X86ISelLowering.cpp Tue Apr 25 20:20:17 2006
@@ -363,9 +363,16 @@
 
 std::vector
 X86TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) {
+  std::vector Args = TargetLowering::LowerArguments(F, DAG);
+
+  FormalArgs.clear();
+  // This sets BytesToPopOnReturn, BytesCallerReserves, etc. which have to be 
set
+  // before the rest of the function can be lowered.
   if (F.getCallingConv() == CallingConv::Fast && EnableFastCC)
-return LowerFastCCArguments(F, DAG);
-  return LowerCCCArguments(F, DAG);
+PreprocessFastCCArguments(Args[0], F, DAG);
+  else
+PreprocessCCCArguments(Args[0], F, DAG);
+  return Args;
 }
 
 std::pair
@@ -393,10 +400,41 @@
 //C Calling Convention implementation
 
//===--===//
 
-std::vector
-X86TargetLowering::LowerCCCArguments(Function &F, SelectionDAG &DAG) {
-  std::vector ArgValues;
+void X86TargetLowering::PreprocessCCCArguments(SDOperand Op, Function &F,
+   SelectionDAG &DAG) {
+  unsigned NumArgs = Op.Val->getNumValues();
+  MachineFunction &MF = DAG.getMachineFunction();
+  MachineFrameInfo *MFI = MF.getFrameInfo();
+
+  unsigned ArgOffset = 0;   // Frame mechanisms handle retaddr slot
+  for (unsigned i = 0; i < NumArgs; ++i) {
+MVT::ValueType ObjectVT = Op.Val->getValueType(i);
+unsigned ArgIncrement = 4;
+unsigned ObjSize;
+switch (ObjectVT) {
+default: assert(0 && "Unhandled argument type!");
+case MVT::i1:
+case MVT::i8:  ObjSize = 1;break;
+case MVT::i16: ObjSize = 2;break;
+case MVT::i32: ObjSize = 4;break;
+case MVT::i64: ObjSize = ArgIncrement = 8; break;
+case MVT::f32: ObjSize = 4;break;
+case MVT::f64: ObjSize = ArgIncrement = 8; break;
+}
+ArgOffset += ArgIncrement;   // Move on to the next argument...
+  }
 
+  // If the function takes variable number of arguments, make a frame index for
+  // the start of the first vararg value... for expansion of llvm.va_start.
+  if (F.isVarArg())
+VarArgsFrameIndex = MFI->CreateFixedObject(1, ArgOffset);
+  ReturnAddrIndex = 0; // No return address slot generated yet.
+  BytesToPopOnReturn = 0;  // Callee pops nothing.
+  BytesCallerReserves = ArgOffset;
+}
+
+void X86TargetLowering::LowerCCCArguments(SDOperand Op, SelectionDAG &DAG) {
+  unsigned NumArgs = Op.Val->getNumValues();
   MachineFunction &MF = DAG.getMachineFunction();
   MachineFrameInfo *MFI = MF.getFrameInfo();
 
@@ -409,8 +447,8 @@
   //...
   //
   unsigned ArgOffset = 0;   // Frame mechanisms handle retaddr slot
-  for (Function::arg_iterator I = F.arg_begin(), E = F.arg_end(); I != E; ++I) 
{
-MVT::ValueType ObjectVT = getValueType(I->getType());
+  for (unsigned i = 0; i < NumArgs; ++i) {
+MVT::ValueType ObjectVT = Op.Val->getValueType(i);
 unsigned ArgIncrement = 4;
 unsigned ObjSize;
 switch (ObjectVT) {
@@ -429,31 +467,11 @@
 // Create the SelectionDAG nodes corresponding to a load from this 
parameter
 SDOperand FIN = DAG.getFrameIndex(FI, MVT::i32);
 
-// Don't codegen dead arguments.  FIXME: remove this check when we can nuke
-// dead loads.
-SDOperand ArgValue;
-if (!I->use_empty())
-  ArgValue = DAG.getLoad(ObjectVT, DAG.getEntryNode(), FIN,
- DAG.getSrcValue(NULL));
-else {
-  if (MVT::isInteger(ObjectVT))
-ArgValue = DAG.getConstant(0, ObjectVT);
-  else
-ArgValue = DAG.getConstantFP(0, ObjectVT);
-}
-ArgValues.push_back(ArgValue);
-
+SDOperand ArgValue = DAG.getLoad(ObjectVT, DAG.getEntryNode(), FIN,
+ DAG.getSrcValue(NULL));
+FormalArgs.push_back(ArgValue);
 ArgOffset += ArgIncrement;   // Move on to the next argument...
   }
-
-  // If the function takes variable number of arguments, make a frame index for
-  // the start of the first vararg value... for expansion of llvm.va_start.
-  if (F.isVarArg())
-VarArgsFrameIndex = MFI->CreateFixedObject(1, ArgOffset);
-  ReturnAddrIndex = 0; // No return address slot generated yet.
-  BytesToPopOnReturn = 0;  // Callee pops nothing.
-  BytesCallerReserves = ArgOffset;
-  return ArgValues;

[llvm-commits] CVS: llvm-www/pubs/2006-04-25-GelatoLLVMIntro.html 2006-04-25-GelatoLLVMIntro.pdf index.html

2006-04-25 Thread Chris Lattner


Changes in directory llvm-www/pubs:

2006-04-25-GelatoLLVMIntro.html added (r1.1)
2006-04-25-GelatoLLVMIntro.pdf added (r1.1)
index.html updated: 1.36 -> 1.37
---
Log message:

Add a new presentation


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

 2006-04-25-GelatoLLVMIntro.html |   38 ++
 2006-04-25-GelatoLLVMIntro.pdf  |0 
 index.html  |4 
 3 files changed, 42 insertions(+)


Index: llvm-www/pubs/2006-04-25-GelatoLLVMIntro.html
diff -c /dev/null llvm-www/pubs/2006-04-25-GelatoLLVMIntro.html:1.1
*** /dev/null   Tue Apr 25 23:46:21 2006
--- llvm-www/pubs/2006-04-25-GelatoLLVMIntro.html   Tue Apr 25 23:46:11 2006
***
*** 0 
--- 1,38 
+ 
+ 
+ 
+   
+   
+   Introduction to the LLVM Compiler Infrastructure
+ 
+ 
+ 
+ 
+   Introduction to the LLVM Compiler Infrastructure
+ 
+ 
+   http://www.nondot.org/sabre/";>Chris Lattner
+ 
+ 
+ Abstract:
+ 
+ This invited talk gives a high-level overview of the LLVM Project, its 
+ capabilities, features, progress, and the direction it is taking.  It is 
+ aimed at a GCC-centric audience, specifically to follow up a presentation
+ on the GCC Link-Time-Optimization proposal at the 2006 Gelato Itanium 
+ Conference and Expo (ICE).
+ 
+ 
+ Published:
+ 
+   "Introduction to the LLVM Compiler Infrastructure", Chris Lattner,
+   http://www.gelato.org/community/events/apr2006/index.php";>2006 
Itanium Conference and Expo, San Jose, California, April 2006.
+ 
+ 
+ Download Presentation:
+ 
+   Introduction to the LLVM 
Compiler Infrastructure (PDF)
+ 
+ 
+ 
+ 


Index: llvm-www/pubs/2006-04-25-GelatoLLVMIntro.pdf


Index: llvm-www/pubs/index.html
diff -u llvm-www/pubs/index.html:1.36 llvm-www/pubs/index.html:1.37
--- llvm-www/pubs/index.html:1.36   Tue Apr  4 13:25:09 2006
+++ llvm-www/pubs/index.htmlTue Apr 25 23:46:11 2006
@@ -3,6 +3,10 @@
 
 
 
+"Introduction to the LLVM 
Compiler Infrastructure"Chris Lattner
+  2006 Itanium Conference and Expo, San Jose, California, April 
2006.
+
+
 "The LLVM Compiler Framework and
 Infrastructure Tutorial" Chris Lattner and Vikram Adve
 LCPC'04 Mini Workshop on Compiler Research Infrastructures, West 
Lafayette, Indiana, Sep. 2004.



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