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

2007-03-14 Thread Jim Laskey


Changes in directory llvm/docs:

ExceptionHandling.html added (r1.1)
---
Log message:

First draft of exception handling doc.

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

 ExceptionHandling.html |  460 +
 1 files changed, 460 insertions(+)


Index: llvm/docs/ExceptionHandling.html
diff -c /dev/null llvm/docs/ExceptionHandling.html:1.1
*** /dev/null   Wed Mar 14 14:29:52 2007
--- llvm/docs/ExceptionHandling.htmlWed Mar 14 14:29:42 2007
***
*** 0 
--- 1,460 
+ !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN
+   http://www.w3.org/TR/html4/strict.dtd;
+ html
+ head
+   titleException Handling in LLVM/title
+   link rel=stylesheet href=llvm.css type=text/css
+ /head
+ body
+ 
+ div class=doc_titleException Handling in LLVM/div
+ 
+ table class=layout style=width:100%
+   tr class=layout
+ td class=left
+ ul
+   lia href=#introductionIntroduction/a
+   ol
+ lia href=#itaniumItanium ABI Zero-cost Exception Handling/a/li
+ lia href=#overviewOverview/a/li
+   /ol/li
+   lia href=#codegenLLVM Code Generation/a
+   ol
+ lia href=#throwThrow/a/li
+ lia href=#try_catchTry/Catch/a/li
+ lia href=#finallyFinallys/a/li
+ lia href=#throw_filtersThrow Filters/a/li
+   /ol/li
+   lia href=#intrinsicsException Handling Intrinsics/a
+   ol
+   lia href=#llvm_eh_exceptionttllvm.eh.exception/tt/a/li
+   lia href=#llvm_eh_selectorttllvm.eh.selector/tt/a/li
+   lia href=#llvm_eh_filterttllvm.eh.filter/tt/a/li
+   lia href=#llvm_eh_typeid_forttllvm.eh.typeid.for/tt/a/li
+   /ol/li
+   lia href=#asmAsm Table Formats/a
+   ol
+ lia href=#unwind_tablesException Handling Frame/a/li
+ lia href=#exception_tablesException Tables/a/li
+   /ol/li
+   lia href=#todoToDo/a/li
+ /ul
+ /td
+ /tr/table
+ 
+ div class=doc_author
+   pWritten by a href=mailto:[EMAIL PROTECTED]Jim Laskey/a/p
+ /div
+ 
+ 
+ !-- *** 
--
+ div class=doc_sectiona name=introductionIntroduction/a/div 
+ !-- *** 
--
+ 
+ div class=doc_text
+ 
+ pThis document is the central repository for all information pertaining to
+ exception handling in LLVM.  It describes the format that LLVM exception
+ handling information takes, which is useful for those interested in creating
+ front-ends or dealing directly with the information.  Further, this document
+ provides specific examples of what exception handling information is used for
+ C/C++./p
+ 
+ /div
+ 
+ !-- === 
--
+ div class=doc_subsection
+   a name=itaniumItanium ABI Zero-cost Exception Handling/a
+ /div
+ 
+ div class=doc_text
+ 
+ pException handling for most programming languages is designed to recover 
from
+ conditions that rarely occur during general use of an application.  To that 
end,
+ exception handling should not interfere with the main flow of an
+ applicationapos;s algorithm by performing checkpointing tasks such as saving
+ the current pc or register state./p
+ 
+ pThe Itanium ABI Exception Handling Specification defines a methodology for
+ providing outlying data in the form of exception tables without inlining
+ speculative exception handling code in the flow of an applicationapos;s main
+ algorithm.  Thus, the specification is said to add zero-cost to the normal
+ execution of an application./p
+ 
+ pA more complete description of the Itanium ABI exception handling runtime
+ support of can be found at a
+ href=http://www.codesourcery.com/cxx-abi/abi-eh.html;Itanium C++ ABI:
+ Exception Handling./a  A description of the exception frame format can be
+ found at a
+ href=http://refspecs.freestandards.org/LSB_3.0.0/LSB-Core-generic/LSB-
+ Core-generic/ehframechpt.htmlException Frames/a, with details of the Dwarf
+ specification at a href=http://www.eagercon.com/dwarf/dwarf3std.htm;Dwarf 3
+ Standard./a A description for the C++ exception table formats can be found 
at
+ a href=http://www.codesourcery.com/cxx-abi/exceptions.pdf;Exception 
Handling
+ Tables./a/p
+ 
+ /div
+ 
+ !-- === 
--
+ div class=doc_subsection
+   a name=overviewOverview/a
+ /div
+ 
+ div class=doc_text
+ 
+ pWhen an exception is thrown in llvm code, the runtime does a best effort to
+ find a handler suited to process the circumstance./p
+ 
+ pThe runtime first attempts to find an iexception frame/i corresponding 
to
+ the function where the exception was thrown.  If the programming language (ex.
+ C++) supports exception handling, the exception frame contains a reference to 
an
+ exception table describing how to process the exception.  If the language (ex.
+ C) does not support exception handling or if the exception needs to be 
forwarded
+ to a prior activation, the exception frame contains information about how to
+ unwind

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

2007-03-14 Thread Jim Laskey


Changes in directory llvm/docs:

CodeGenerator.html updated: 1.44 - 1.45
---
Log message:

Adding credit for PPC changes.

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

 CodeGenerator.html |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


Index: llvm/docs/CodeGenerator.html
diff -u llvm/docs/CodeGenerator.html:1.44 llvm/docs/CodeGenerator.html:1.45
--- llvm/docs/CodeGenerator.html:1.44   Fri Dec 15 04:40:48 2006
+++ llvm/docs/CodeGenerator.htmlWed Mar 14 14:30:33 2007
@@ -98,9 +98,10 @@
 
 div class=doc_author
   pWritten by a href=mailto:[EMAIL PROTECTED]Chris Lattner/a,
-a href=mailto:[EMAIL PROTECTED]Bill Wendling/a, and
+a href=mailto:[EMAIL PROTECTED]Bill Wendling/a,
 a href=mailto:[EMAIL PROTECTED]Fernando Magno Quintao
-Pereira/a/p
+Pereira/a and
+a href=mailto:[EMAIL PROTECTED]Jim Laskey/a/p
 /div
 
 div class=doc_warning
@@ -1954,7 +1955,7 @@
 
   a href=mailto:[EMAIL PROTECTED]Chris Lattner/abr
   a href=http://llvm.org;The LLVM Compiler Infrastructure/abr
-  Last modified: $Date: 2006/12/15 10:40:48 $
+  Last modified: $Date: 2007/03/14 19:30:33 $
 /address
 
 /body



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


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

2007-03-14 Thread Jim Laskey


Changes in directory llvm/docs:

LangRef.html updated: 1.209 - 1.210
---
Log message:

Add link to exception handling.

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

 LangRef.html |   16 +++-
 1 files changed, 15 insertions(+), 1 deletion(-)


Index: llvm/docs/LangRef.html
diff -u llvm/docs/LangRef.html:1.209 llvm/docs/LangRef.html:1.210
--- llvm/docs/LangRef.html:1.209Mon Feb 19 17:54:10 2007
+++ llvm/docs/LangRef.html  Wed Mar 14 14:31:19 2007
@@ -187,6 +187,7 @@
 /ol
   /li
   lia href=#int_debuggerDebugger intrinsics/a/li
+  lia href=#int_ehException Handling intrinsics/a/li
 /ol
   /li
 /ol
@@ -4575,6 +4576,19 @@
 /div
 
 
+!-- === 
--
+div class=doc_subsection
+  a name=int_ehException Handling Intrinsics/a
+/div
+
+div class=doc_text
+p The LLVM exception handling intrinsics (which all start with
+ttllvm.eh./tt prefix), are described in the a
+href=ExceptionHandling.html#format_common_intrinsicsLLVM Exception
+Handling/a document. /p
+/div
+
+
 !-- *** 
--
 hr
 address
@@ -4585,7 +4599,7 @@
 
   a href=mailto:[EMAIL PROTECTED]Chris Lattner/abr
   a href=http://llvm.org;The LLVM Compiler Infrastructure/abr
-  Last modified: $Date: 2007/02/19 23:54:10 $
+  Last modified: $Date: 2007/03/14 19:31:19 $
 /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/docs/SourceLevelDebugging.html

2007-03-14 Thread Jim Laskey


Changes in directory llvm/docs:

SourceLevelDebugging.html updated: 1.27 - 1.28
---
Log message:

Change e-mail address.

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

 SourceLevelDebugging.html |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/docs/SourceLevelDebugging.html
diff -u llvm/docs/SourceLevelDebugging.html:1.27 
llvm/docs/SourceLevelDebugging.html:1.28
--- llvm/docs/SourceLevelDebugging.html:1.27Fri Jan 26 15:22:27 2007
+++ llvm/docs/SourceLevelDebugging.html Wed Mar 14 14:31:55 2007
@@ -66,7 +66,7 @@
 
 div class=doc_author
   pWritten by a href=mailto:[EMAIL PROTECTED]Chris Lattner/a
-and a href=mailto:[EMAIL PROTECTED]Jim Laskey/a/p
+and a href=mailto:[EMAIL PROTECTED]Jim Laskey/a/p
 /div
 
 
@@ -1775,7 +1775,7 @@
 
   a href=mailto:[EMAIL PROTECTED]Chris Lattner/abr
   a href=http://llvm.org;LLVM Compiler Infrastructure/abr
-  Last modified: $Date: 2007/01/26 21:22:27 $
+  Last modified: $Date: 2007/03/14 19:31:55 $
 /address
 
 /body



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


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

2007-03-14 Thread Jim Laskey


Changes in directory llvm/docs:

WritingAnLLVMPass.html updated: 1.52 - 1.53
---
Log message:

Change e-mail address.

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

 WritingAnLLVMPass.html |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/docs/WritingAnLLVMPass.html
diff -u llvm/docs/WritingAnLLVMPass.html:1.52 
llvm/docs/WritingAnLLVMPass.html:1.53
--- llvm/docs/WritingAnLLVMPass.html:1.52   Tue Jan 23 16:56:28 2007
+++ llvm/docs/WritingAnLLVMPass.htmlWed Mar 14 14:32:21 2007
@@ -102,7 +102,7 @@
 
 div class=doc_author
   pWritten by a href=mailto:[EMAIL PROTECTED]Chris Lattner/a and
-  a href=mailto:[EMAIL PROTECTED]Jim Laskey/a/p
+  a href=mailto:[EMAIL PROTECTED]Jim Laskey/a/p
 /div
 
 !-- *** 
--
@@ -1711,7 +1711,7 @@
 
   a href=mailto:[EMAIL PROTECTED]Chris Lattner/abr
   a href=http://llvm.org;The LLVM Compiler Infrastructure/abr
-  Last modified: $Date: 2007/01/23 22:56:28 $
+  Last modified: $Date: 2007/03/14 19:32:21 $
 /address
 
 /body



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


[llvm-commits] CVS: llvm-www/developers.txt

2007-03-04 Thread Jim Laskey


Changes in directory llvm-www:

developers.txt updated: 1.9 - 1.10
---
Log message:

Upadte e-mail address.

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

 developers.txt |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm-www/developers.txt
diff -u llvm-www/developers.txt:1.9 llvm-www/developers.txt:1.10
--- llvm-www/developers.txt:1.9 Thu Aug 17 11:29:55 2006
+++ llvm-www/developers.txt Sun Mar  4 15:09:17 2007
@@ -11,7 +11,7 @@
 Brian  Gaeke   href=http://netfiles.uiuc.edu/gaeke/www/
img=PhotoBrian.png  width=155   height=163  alt=brg
 PatrickJenkins href=http://www.patjenk.comimg=PhotoPatJenk.jpg 
width=200  width=173  height=130  alt=PatJenk
 Brad   Jones   href=http://www.nondot.org/~kungfoomaster/  
img=PhotoBrad.jpg   width=200   height=171  alt=KungFooMaster
-JimLaskey  href=mailto:[EMAIL PROTECTED]   img=PhotoJim.jpg
width=128   height=128  alt=Wickund
+JimLaskey  href=mailto:[EMAIL PROTECTED]   img=PhotoJim.jpg
width=128   height=128  alt=Wickund
 Chris  Lattner href=http://nondot.org/sabre/LLVMNotes/ img=PhotoChris.jpg  
width=150   height=152  alt=Sabre
 Tanya  Lattner href=http://nondot.org/tonic/   img=PhotoTanya.jpg  
width=200   height=217  alt=tonic
 Andrew Lenharthhref=http://www.lenharth.org/~andrewl/  
img=PhotoAndrew.jpg width=140   height=177  alt=Andrew



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


Re: [llvm-commits] frameaddress intrinsincs for PPC

2007-03-01 Thread Jim Laskey
Appreciated.

On 1-Mar-07, at 04:32 AM, Nicolas Geoffray wrote:


 If there is no objection, I'm committing this in.

 Nicolas Geoffray wrote:

 This patch implements the frameaddress intrinsincs for PPC.

 OK to commit?
 - 
 ---

 Index: PPCISelLowering.h
 ===
 RCS file: /var/cvs/llvm/llvm/lib/Target/PowerPC/PPCISelLowering.h,v
 retrieving revision 1.60
 diff -t -d -u -p -5 -r1.60 PPCISelLowering.h
 --- PPCISelLowering.h27 Feb 2007 13:01:19 -  1.60
 +++ PPCISelLowering.h27 Feb 2007 17:32:38 -
 @@ -238,9 +238,11 @@ namespace llvm {

  /// isLegalAddressImmediate - Return true if the integer  
 value can be used
  /// as the offset of the target addressing mode.
  virtual bool isLegalAddressImmediate(int64_t V) const;
  virtual bool isLegalAddressImmediate(llvm::GlobalValue*) const;
 +
 +SDOperand LowerFRAMEADDR(SDOperand Op, SelectionDAG DAG);
};
  }

  #endif   // LLVM_TARGET_POWERPC_PPC32ISELLOWERING_H
 Index: PPCISelLowering.cpp
 ===
 RCS file: /var/cvs/llvm/llvm/lib/Target/PowerPC/PPCISelLowering.cpp,v
 retrieving revision 1.258
 diff -t -d -u -p -5 -r1.258 PPCISelLowering.cpp
 --- PPCISelLowering.cpp  27 Feb 2007 13:01:19 -  1.258
 +++ PPCISelLowering.cpp  27 Feb 2007 17:32:44 -
 @@ -2698,11 +2698,11 @@ SDOperand PPCTargetLowering::LowerOperat
case ISD::SCALAR_TO_VECTOR:   return LowerSCALAR_TO_VECTOR(Op,  
 DAG);
case ISD::MUL:return LowerMUL(Op, DAG);

// Frame  Return address.  Currently unimplemented
case ISD::RETURNADDR: break;
 -  case ISD::FRAMEADDR:  break;
 +  case ISD::FRAMEADDR:  return LowerFRAMEADDR(Op, DAG);
}
return SDOperand();
  }

  // 
 ===-- 
 ===//
 @@ -3169,5 +3169,27 @@ bool PPCTargetLowering::isLegalAddressIm
  }

  bool PPCTargetLowering::isLegalAddressImmediate 
 (llvm::GlobalValue* GV) const {
return TargetLowering::isLegalAddressImmediate(GV);
  }
 +
 +SDOperand PPCTargetLowering::LowerFRAMEADDR(SDOperand Op,  
 SelectionDAG DAG)
 +{
 +  // Depths  0 not supported yet!
 +  if (castConstantSDNode(Op.getOperand(0))-getValue()  0)
 +return SDOperand();
 +
 +  MVT::ValueType PtrVT = DAG.getTargetLoweringInfo().getPointerTy();
 +  bool isPPC64 = PtrVT == MVT::i64;
 +
 +  MachineFunction MF = DAG.getMachineFunction();
 +  MachineFrameInfo *MFI = MF.getFrameInfo();
 +  bool is31 = (NoFramePointerElim || MFI-hasVarSizedObjects())
 +   MFI-getStackSize();
 +
 +  if (isPPC64)
 +return DAG.getCopyFromReg(DAG.getEntryNode(), is31 ?  
 PPC::X31 : PPC::X1,
 +  MVT::i32);
 +  else
 +return DAG.getCopyFromReg(DAG.getEntryNode(), is31 ?  
 PPC::R31 : PPC::R1,
 +  MVT::i32);
 +}

 - 
 ---

 ___
 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/lib/CodeGen/MachineModuleInfo.cpp

2007-03-01 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

MachineModuleInfo.cpp updated: 1.4 - 1.5
---
Log message:

Collect eh filter info.

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

 MachineModuleInfo.cpp |   31 +++
 1 files changed, 19 insertions(+), 12 deletions(-)


Index: llvm/lib/CodeGen/MachineModuleInfo.cpp
diff -u llvm/lib/CodeGen/MachineModuleInfo.cpp:1.4 
llvm/lib/CodeGen/MachineModuleInfo.cpp:1.5
--- llvm/lib/CodeGen/MachineModuleInfo.cpp:1.4  Wed Feb 21 16:38:31 2007
+++ llvm/lib/CodeGen/MachineModuleInfo.cpp  Thu Mar  1 14:25:32 2007
@@ -1653,9 +1653,9 @@
 (MachineBasicBlock *LandingPad) {
   unsigned N = LandingPads.size();
   for (unsigned i = 0; i  N; ++i) {
-LandingPadInfo UI = LandingPads[i];
-if (UI.LandingPadBlock == LandingPad)
-  return UI;
+LandingPadInfo LP = LandingPads[i];
+if (LP.LandingPadBlock == LandingPad)
+  return LP;
   }
   
   LandingPads.push_back(LandingPadInfo(LandingPad));
@@ -1666,17 +1666,17 @@
 /// associate it with a try landing pad block.
 void MachineModuleInfo::addInvoke(MachineBasicBlock *LandingPad,
   unsigned BeginLabel, unsigned EndLabel) {
-  LandingPadInfo UI = getOrCreateLandingPadInfo(LandingPad);
-  if (!UI.BeginLabel) UI.BeginLabel = BeginLabel;  
-  UI.EndLabel = EndLabel;  
+  LandingPadInfo LP = getOrCreateLandingPadInfo(LandingPad);
+  if (!LP.BeginLabel) LP.BeginLabel = BeginLabel;  
+  LP.EndLabel = EndLabel;  
 }
 
 /// addLandingPad - Provide the label of a try LandingPad block.
 ///
 unsigned MachineModuleInfo::addLandingPad(MachineBasicBlock *LandingPad) {
   unsigned LandingPadLabel = NextLabelID();
-  LandingPadInfo UI = getOrCreateLandingPadInfo(LandingPad);
-  UI.LandingPadLabel = LandingPadLabel;  
+  LandingPadInfo LP = getOrCreateLandingPadInfo(LandingPad);
+  LP.LandingPadLabel = LandingPadLabel;  
   return LandingPadLabel;
 }
 
@@ -1684,19 +1684,26 @@
 /// information.
 void MachineModuleInfo::addPersonality(MachineBasicBlock *LandingPad,
Function *Personality) {
-  LandingPadInfo UI = getOrCreateLandingPadInfo(LandingPad);
-  UI.Personality = Personality;
+  LandingPadInfo LP = getOrCreateLandingPadInfo(LandingPad);
+  LP.Personality = Personality;
 }
 
 /// addCatchTypeInfo - Provide the catch typeinfo for a landing pad.
 ///
 void MachineModuleInfo::addCatchTypeInfo(MachineBasicBlock *LandingPad,
 std::vectorGlobalVariable * TyInfo) 
{
-  LandingPadInfo UI = getOrCreateLandingPadInfo(LandingPad);
+  LandingPadInfo LP = getOrCreateLandingPadInfo(LandingPad);
   for (unsigned N = TyInfo.size(); N; --N)
-UI.TypeIds.push_back(getTypeIDFor(TyInfo[N - 1]));
+LP.TypeIds.push_back(getTypeIDFor(TyInfo[N - 1]));
 }
 
+/// setIsFilterLandingPad - Indicates that the landing pad is a throw filter.
+///
+void MachineModuleInfo::setIsFilterLandingPad(MachineBasicBlock *LandingPad) {
+  LandingPadInfo LP = getOrCreateLandingPadInfo(LandingPad);
+  LP.IsFilter = true;
+}
+
 /// TidyLandingPads - Remap landing pad labels and remove any deleted landing
 /// pads.
 void MachineModuleInfo::TidyLandingPads() {



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


[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp

2007-03-01 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

DwarfWriter.cpp updated: 1.129 - 1.130
---
Log message:

Emit eh filter info.

---
Diffs of the changes:  (+66 -18)

 DwarfWriter.cpp |   84 
 1 files changed, 66 insertions(+), 18 deletions(-)


Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.129 
llvm/lib/CodeGen/DwarfWriter.cpp:1.130
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.129  Wed Feb 28 12:38:31 2007
+++ llvm/lib/CodeGen/DwarfWriter.cppThu Mar  1 14:26:43 2007
@@ -2860,6 +2860,11 @@
 
 // Gather first action index for each landing pad site.
 SmallVectorunsigned, 8 Actions;
+
+// FIXME - Assume there is only one filter typeinfo list per function
+// time being.  I.E., Each call to eh_filter will have the same list.
+// This can change if a function is inlined. 
+const LandingPadInfo *Filter = 0;
 
 // Compute sizes for exception table.
 unsigned SizeHeader = sizeof(int8_t) + // LPStart format
@@ -2874,21 +2879,37 @@
 // landing pad site info and the size of the landing pad's actions.
 for (unsigned i = 0, N = LandingPads.size(); i != N; ++i) {
   const LandingPadInfo LandingPad = LandingPads[i];
+  bool IsFilter = LandingPad.IsFilter;
   unsigned SizeSiteActions = 0;
   const std::vectorunsigned TypeIds = LandingPad.TypeIds;
   unsigned SizeAction = 0;
+  signed FirstAction;
   
-  // Gather the action sizes
-  for (unsigned j = 0, M = TypeIds.size(); j != M; ++j) {
-unsigned TypeID = TypeIds[i];
-unsigned SizeTypeID = Asm-SizeULEB128(TypeID);
-signed Action = j ? -(SizeAction + SizeTypeID) : 0;
-SizeAction = SizeTypeID + Asm-SizeSLEB128(Action);
+  if (IsFilter) {
+// FIXME - Assume there is only one filter typeinfo list per function
+// time being.  I.E., Each call to eh_filter will have the same list.
+// This can change if a function is inlined. 
+Filter = LandingPad;
+SizeAction =  Asm-SizeSLEB128(-1) + Asm-SizeSLEB128(0);
 SizeSiteActions += SizeAction;
+// Record the first action of the landing pad site.
+FirstAction = SizeActions + SizeSiteActions - SizeAction + 1;
+  } else if (TypeIds.empty()) {
+FirstAction = 0;
+  } else {
+// Gather the action sizes
+for (unsigned j = 0, M = TypeIds.size(); j != M; ++j) {
+  unsigned TypeID = TypeIds[i];
+  unsigned SizeTypeID = Asm-SizeSLEB128(TypeID);
+  signed Action = j ? -(SizeAction + SizeTypeID) : 0;
+  SizeAction = SizeTypeID + Asm-SizeSLEB128(Action);
+  SizeSiteActions += SizeAction;
+}
+
+// Record the first action of the landing pad site.
+FirstAction = SizeActions + SizeSiteActions - SizeAction + 1;
   }
   
-  // Record the first action of the landing pad site.
-  signed FirstAction = SizeActions + SizeSiteActions - SizeAction + 1;
   Actions.push_back(FirstAction);
   
   // Compute this sites contribution to size.
@@ -2896,7 +2917,7 @@
   SizeSites += sizeof(int32_t) + // Site start.
sizeof(int32_t) + // Site length.
sizeof(int32_t) + // Landing pad.
-   Asm-SizeULEB128(FirstAction); // Action.
+   Asm-SizeSLEB128(FirstAction); // Action.
 }
 
 // Final tallies.
@@ -2938,8 +2959,15 @@
  label, LandingPad.BeginLabel);
   Asm-EOL(Region length);
   
-  EmitDifference(label, LandingPad.LandingPadLabel,
- eh_func_begin, SubprogramCount);
+  if (LandingPad.TypeIds.empty()) {
+if (TAI-getAddressSize() == sizeof(int32_t))
+  Asm-EmitInt32(0);
+else
+  Asm-EmitInt64(0);
+  } else {
+EmitDifference(label, LandingPad.LandingPadLabel,
+   eh_func_begin, SubprogramCount);
+  }
   Asm-EOL(Landing pad);
 
   Asm-EmitULEB128Bytes(Actions[i]);
@@ -2952,15 +2980,22 @@
   const std::vectorunsigned TypeIds = LandingPad.TypeIds;
   unsigned SizeAction = 0;
   
-  for (unsigned j = 0, M = TypeIds.size(); j  M; ++j) {
-unsigned TypeID = TypeIds[j];
-unsigned SizeTypeID = Asm-SizeULEB128(TypeID);
-Asm-EmitSLEB128Bytes(TypeID);
+  if (LandingPad.IsFilter) {
+Asm-EmitSLEB128Bytes(-1);
 Asm-EOL(TypeInfo index);
-signed Action = j ? -(SizeAction + SizeTypeID) : 0;
-SizeAction = SizeTypeID + Asm-SizeSLEB128(Action);
-Asm-EmitSLEB128Bytes(Action);
+Asm-EmitSLEB128Bytes(0);
 Asm-EOL(Next action);
+  } else {
+for (unsigned j = 0, M = TypeIds.size(); j  M; ++j) {
+  unsigned TypeID = TypeIds[j];
+  unsigned SizeTypeID = Asm-SizeSLEB128(TypeID);
+  Asm-EmitSLEB128Bytes(TypeID);
+  Asm-EOL(TypeInfo index);
+  

[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

2007-03-01 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.378 - 1.379
---
Log message:

Lower eh filter intrinsic.

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

 SelectionDAGISel.cpp |5 -
 1 files changed, 4 insertions(+), 1 deletion(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.378 
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.379
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.378Wed Feb 28 
12:37:04 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp  Thu Mar  1 14:24:30 2007
@@ -2110,7 +2110,8 @@
 return 0;
   }
 
-  case Intrinsic::eh_selector: {
+  case Intrinsic::eh_selector:
+  case Intrinsic::eh_filter:{
 MachineModuleInfo *MMI = DAG.getMachineModuleInfo();
 
 if (MMI) {
@@ -2120,6 +2121,8 @@
  isaFunction(CE-getOperand(0)) 
  Personality should be a function);
   MMI-addPersonality(CurMBB, castFunction(CE-getOperand(0)));
+  if (Intrinsic == Intrinsic::eh_filter)
+MMI-setIsFilterLandingPad(CurMBB);
 
   // Gather all the type infos for this landing pad and pass them along to
   // MachineModuleInfo.



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


[llvm-commits] CVS: llvm/include/llvm/Intrinsics.td

2007-03-01 Thread Jim Laskey


Changes in directory llvm/include/llvm:

Intrinsics.td updated: 1.48 - 1.49
---
Log message:

Add eh filter intrinsic.

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

 Intrinsics.td |8 +---
 1 files changed, 5 insertions(+), 3 deletions(-)


Index: llvm/include/llvm/Intrinsics.td
diff -u llvm/include/llvm/Intrinsics.td:1.48 
llvm/include/llvm/Intrinsics.td:1.49
--- llvm/include/llvm/Intrinsics.td:1.48Wed Feb 28 12:35:44 2007
+++ llvm/include/llvm/Intrinsics.td Thu Mar  1 14:23:39 2007
@@ -231,9 +231,11 @@
 
 //===-- Exception Handling 
Intrinsics--===//
 //
-def int_eh_exception : Intrinsic[llvm_ptr_ty];
-def int_eh_selector  : Intrinsic[llvm_i32_ty, llvm_ptr_ty, llvm_ptr_ty,
-   llvm_vararg_ty];
+def int_eh_exception  : Intrinsic[llvm_ptr_ty];
+def int_eh_selector   : Intrinsic[llvm_i32_ty, llvm_ptr_ty, llvm_ptr_ty,
+llvm_vararg_ty];
+def int_eh_filter : Intrinsic[llvm_i32_ty, llvm_ptr_ty, llvm_ptr_ty,
+llvm_vararg_ty];
 def int_eh_typeid_for : Intrinsic[llvm_i32_ty, llvm_ptr_ty];
 
 
//===--===//



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

2007-03-01 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

MachineModuleInfo.h updated: 1.6 - 1.7
---
Log message:

Collect eh filter info.

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

 MachineModuleInfo.h |7 +++
 1 files changed, 7 insertions(+)


Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h
diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.6 
llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.7
--- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.6   Thu Feb 22 10:40:10 2007
+++ llvm/include/llvm/CodeGen/MachineModuleInfo.h   Thu Mar  1 14:25:32 2007
@@ -960,6 +960,8 @@
   unsigned LandingPadLabel; // Label at beginning of landing pad.
   Function *Personality;// Personality function.
   std::vectorunsigned TypeIds;// List of type ids.
+  bool IsFilter;// Indicate if the landing pad is a
+// throw filter.
   
   LandingPadInfo(MachineBasicBlock *MBB)
   : LandingPadBlock(MBB)
@@ -967,6 +969,7 @@
   , EndLabel(0)
   , LandingPadLabel(0)
   , TypeIds()
+  , IsFilter(false)
   {}
 };
 
@@ -1202,6 +1205,10 @@
   void addCatchTypeInfo(MachineBasicBlock *LandingPad,
 std::vectorGlobalVariable * TyInfo);
 
+  /// setIsFilterLandingPad - Indicates that the landing pad is a throw filter.
+  ///
+  void setIsFilterLandingPad(MachineBasicBlock *LandingPad);
+
   /// getTypeIDFor - Return the type id for the specified typeinfo.  This is 
   /// function wide.
   unsigned getTypeIDFor(GlobalVariable *TI);



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


[llvm-commits] CVS: llvm/include/llvm/Intrinsics.td

2007-02-28 Thread Jim Laskey


Changes in directory llvm/include/llvm:

Intrinsics.td updated: 1.47 - 1.48
---
Log message:

Provide a more meaningful name.

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

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


Index: llvm/include/llvm/Intrinsics.td
diff -u llvm/include/llvm/Intrinsics.td:1.47 
llvm/include/llvm/Intrinsics.td:1.48
--- llvm/include/llvm/Intrinsics.td:1.47Wed Feb 21 16:35:57 2007
+++ llvm/include/llvm/Intrinsics.td Wed Feb 28 12:35:44 2007
@@ -232,7 +232,7 @@
 //===-- Exception Handling 
Intrinsics--===//
 //
 def int_eh_exception : Intrinsic[llvm_ptr_ty];
-def int_eh_handlers  : Intrinsic[llvm_i32_ty, llvm_ptr_ty, llvm_ptr_ty,
+def int_eh_selector  : Intrinsic[llvm_i32_ty, llvm_ptr_ty, llvm_ptr_ty,
llvm_vararg_ty];
 def int_eh_typeid_for : Intrinsic[llvm_i32_ty, llvm_ptr_ty];
 



___
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

2007-02-28 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.377 - 1.378
---
Log message:

MERGE_VALUES unnecessary.

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

 SelectionDAGISel.cpp |   16 
 1 files changed, 4 insertions(+), 12 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.377 
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.378
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.377Sun Feb 25 
20:56:58 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp  Wed Feb 28 12:37:04 2007
@@ -2105,16 +2105,12 @@
   setValue(I, Op);
   DAG.setRoot(Op.getValue(1));
 } else {
-  SDOperand Op = DAG.getNode(ISD::MERGE_VALUES, TLI.getPointerTy(),
- DAG.getConstant(0, TLI.getPointerTy()),
- DAG.getRoot());
-  setValue(I, Op);
-  DAG.setRoot(Op.getValue(1));
+  setValue(I, DAG.getConstant(0, TLI.getPointerTy()));
 }
 return 0;
   }
 
-  case Intrinsic::eh_handlers: {
+  case Intrinsic::eh_selector: {
 MachineModuleInfo *MMI = DAG.getMachineModuleInfo();
 
 if (MMI) {
@@ -2147,7 +2143,7 @@
   if (Reg) CurMBB-addLiveIn(Reg);
 
   // Insert the EHSELECTION instruction.
-  SDVTList VTs = DAG.getVTList(TLI.getPointerTy(), MVT::Other);
+  SDVTList VTs = DAG.getVTList(MVT::i32, MVT::Other);
   SDOperand Ops[2];
   Ops[0] = getValue(I.getOperand(1));
   Ops[1] = getRoot();
@@ -2155,11 +2151,7 @@
   setValue(I, Op);
   DAG.setRoot(Op.getValue(1));
 } else {
-  SDOperand Op = DAG.getNode(ISD::MERGE_VALUES, TLI.getPointerTy(),
- DAG.getConstant(0, TLI.getPointerTy()),
- getValue(I.getOperand(1)));
-  setValue(I, Op);
-  DAG.setRoot(Op.getValue(1));
+  setValue(I, DAG.getConstant(0, MVT::i32));
 }
 
 return 0;



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


[llvm-commits] CVS: llvm/lib/CodeGen/IntrinsicLowering.cpp

2007-02-28 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

IntrinsicLowering.cpp updated: 1.70 - 1.71
---
Log message:

Provide a more meaningful name.

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

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


Index: llvm/lib/CodeGen/IntrinsicLowering.cpp
diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.70 
llvm/lib/CodeGen/IntrinsicLowering.cpp:1.71
--- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.70 Thu Feb 22 12:51:19 2007
+++ llvm/lib/CodeGen/IntrinsicLowering.cpp  Wed Feb 28 12:37:50 2007
@@ -357,7 +357,7 @@
   case Intrinsic::dbg_func_start:
   case Intrinsic::dbg_declare:
   case Intrinsic::eh_exception:
-  case Intrinsic::eh_handlers:
+  case Intrinsic::eh_selector:
 break;// Simply strip out debugging and eh intrinsics
 
   case Intrinsic::memcpy_i32:



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

2007-02-28 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen/SelectionDAG:

LegalizeDAG.cpp updated: 1.479 - 1.480
---
Log message:

Chain is on second operand.

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

 LegalizeDAG.cpp |   27 +++
 1 files changed, 23 insertions(+), 4 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.479 
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.480
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.479 Sat Feb 24 03:44:17 2007
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp   Wed Feb 28 14:43:58 2007
@@ -676,16 +676,13 @@
 else
   Result = DAG.getConstant(0, TLI.getPointerTy());
 break;
-  case ISD::EHSELECTION:
   case ISD::EXCEPTIONADDR: {
 Tmp1 = LegalizeOp(Node-getOperand(0));
 MVT::ValueType VT = Node-getValueType(0);
 switch (TLI.getOperationAction(Node-getOpcode(), VT)) {
 default: assert(0  This action is not supported yet!);
 case TargetLowering::Expand: {
-unsigned Reg = Node-getOpcode() == ISD::EXCEPTIONADDR ?
-  TLI.getExceptionAddressRegister() :
-  TLI.getExceptionSelectorRegister();
+unsigned Reg = TLI.getExceptionAddressRegister();
 Result = DAG.getCopyFromReg(Tmp1, Reg, VT).getValue(Op.ResNo);
   }
   break;
@@ -700,6 +697,28 @@
 }
 }
 break;
+  case ISD::EHSELECTION: {
+Tmp1 = LegalizeOp(Node-getOperand(0));
+Tmp2 = LegalizeOp(Node-getOperand(1));
+MVT::ValueType VT = Node-getValueType(0);
+switch (TLI.getOperationAction(Node-getOpcode(), VT)) {
+default: assert(0  This action is not supported yet!);
+case TargetLowering::Expand: {
+unsigned Reg = TLI.getExceptionSelectorRegister();
+Result = DAG.getCopyFromReg(Tmp2, Reg, VT).getValue(Op.ResNo);
+  }
+  break;
+case TargetLowering::Custom:
+  Result = TLI.LowerOperation(Op, DAG);
+  if (Result.Val) break;
+  // Fall Thru
+case TargetLowering::Legal:
+  Result = DAG.getNode(ISD::MERGE_VALUES, VT, DAG.getConstant(0, VT), 
Tmp2).
+  getValue(Op.ResNo);
+  break;
+}
+}
+break;
   case ISD::AssertSext:
   case ISD::AssertZext:
 Tmp1 = LegalizeOp(Node-getOperand(0));



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


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h PPCRegisterInfo.cpp PPCRegisterInfo.h

2007-02-27 Thread Jim Laskey


Changes in directory llvm/lib/Target/PowerPC:

PPCMachineFunctionInfo.h updated: 1.4 - 1.5
PPCRegisterInfo.cpp updated: 1.113 - 1.114
PPCRegisterInfo.h updated: 1.30 - 1.31
---
Log message:

Duplicate use of LR, take 2.

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

 PPCMachineFunctionInfo.h |7 +
 PPCRegisterInfo.cpp  |   60 ++-
 PPCRegisterInfo.h|1 
 3 files changed, 42 insertions(+), 26 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
diff -u llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h:1.4 
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h:1.5
--- llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h:1.4Mon Feb 26 
20:55:29 2007
+++ llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.hTue Feb 27 05:55:44 2007
@@ -26,6 +26,10 @@
   /// stored.  Also used as an anchor for instructions that need to be altered
   /// when using frame pointers (dyna_add, dyna_sub.)
   int FramePointerSaveIndex;
+  
+  /// UsesLR - Indicates whether LR is used in the current function.
+  ///
+  bool UsesLR;
 
 public:
   PPCFunctionInfo(MachineFunction MF) 
@@ -34,6 +38,9 @@
 
   int getFramePointerSaveIndex() const { return FramePointerSaveIndex; }
   void setFramePointerSaveIndex(int Idx) { FramePointerSaveIndex = Idx; }
+  
+  void setUsesLR(bool U) { UsesLR = U; }
+  bool usesLR()  { return UsesLR; }
 
 };
 


Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.113 
llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.114
--- llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.113   Mon Feb 26 20:55:29 2007
+++ llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp Tue Feb 27 05:55:45 2007
@@ -538,8 +538,8 @@
 /// usesLR - Returns if the link registers (LR) has been used in the function.
 ///
 bool PPCRegisterInfo::usesLR(MachineFunction MF) const {
-  const bool *PhysRegsUsed = MF.getUsedPhysregs();
-  return PhysRegsUsed[getRARegister()];
+  PPCFunctionInfo *FI = MF.getInfoPPCFunctionInfo();
+  return FI-usesLR();
 }
 
 void PPCRegisterInfo::
@@ -874,6 +874,15 @@
   MFI-setStackSize(FrameSize);
 }
 
+void PPCRegisterInfo::processFunctionBeforeCalleeSavedScan(MachineFunction MF)
+  const {
+  //  Save and clear the LR state.
+  PPCFunctionInfo *FI = MF.getInfoPPCFunctionInfo();
+  unsigned LR = getRARegister();
+  FI-setUsesLR(MF.isPhysRegUsed(LR));
+  MF.changePhyRegUsed(LR, false);
+}
+
 void PPCRegisterInfo::emitPrologue(MachineFunction MF) const {
   MachineBasicBlock MBB = MF.front();   // Prolog goes in entry BB
   MachineBasicBlock::iterator MBBI = MBB.begin();
@@ -899,9 +908,6 @@
   determineFrameLayout(MF);
   unsigned FrameSize = MFI-getStackSize();
   
-  // Skip if a leaf routine.
-  if (!FrameSize) return;
-  
   int NegFrameSize = -FrameSize;
   
   // Get processor type.
@@ -911,7 +917,7 @@
   // Check if the link register (LR) has been used.
   bool UsesLR = MFI-hasCalls() || usesLR(MF);
   // Do we have a frame pointer for this function?
-  bool HasFP = hasFP(MF);
+  bool HasFP = hasFP(MF)  FrameSize;
   
   int LROffset = PPCFrameInfo::getReturnSaveOffset(IsPPC64, IsMachoABI);
   int FPOffset = PPCFrameInfo::getFramePointerSaveOffset(IsPPC64, IsMachoABI);
@@ -940,6 +946,9 @@
 .addReg(PPC::R0).addImm(LROffset).addReg(PPC::R1);
   }
   
+  // Skip if a leaf routine.
+  if (!FrameSize) return;
+  
   // Get stack alignments.
   unsigned TargetAlign = MF.getTarget().getFrameInfo()-getStackAlignment();
   unsigned MaxAlign = MFI-getMaxAlignment();
@@ -1065,8 +1074,6 @@
   // Get the number of bytes allocated from the FrameInfo.
   unsigned FrameSize = MFI-getStackSize();
 
-  if (!FrameSize) return;
-  
   // Get processor type.
   bool IsPPC64 = Subtarget.isPPC64();
   // Get operating system
@@ -1074,31 +1081,32 @@
   // Check if the link register (LR) has been used.
   bool UsesLR = MFI-hasCalls() || usesLR(MF);
   // Do we have a frame pointer for this function?
-  bool HasFP = hasFP(MF);
+  bool HasFP = hasFP(MF)  FrameSize;
   
   int LROffset = PPCFrameInfo::getReturnSaveOffset(IsPPC64, IsMachoABI);
   int FPOffset = PPCFrameInfo::getFramePointerSaveOffset(IsPPC64, IsMachoABI);
   
-  // The loaded (or persistent) stack pointer value is offset by the 'stwu'
-  // on entry to the function.  Add this offset back now.
-  if (!Subtarget.isPPC64()) {
-if (isInt16(FrameSize)  TargetAlign = MaxAlign 
-  !MFI-hasVarSizedObjects()) {
-BuildMI(MBB, MBBI, TII.get(PPC::ADDI), PPC::R1)
-.addReg(PPC::R1).addImm(FrameSize);
-} else {
-  BuildMI(MBB, MBBI, TII.get(PPC::LWZ),PPC::R1).addImm(0).addReg(PPC::R1);
-}
-  } else {
-if (isInt16(FrameSize)  TargetAlign = MaxAlign 
-  !MFI-hasVarSizedObjects()) {
-  BuildMI(MBB, MBBI, TII.get(PPC::ADDI8), PPC::X1)
- .addReg(PPC::X1).addImm(FrameSize);
+  if (FrameSize) {
+// The loaded (or persistent) stack pointer value is offset by the 'stwu'
+// on entry to the 

[llvm-commits] CVS: llvm/test/CodeGen/Generic/2007-02-25-invoke.ll

2007-02-25 Thread Jim Laskey


Changes in directory llvm/test/CodeGen/Generic:

2007-02-25-invoke.ll added (r1.1)
---
Log message:

Test for PR1224: http://llvm.org/PR1224 .

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

 2007-02-25-invoke.ll |   12 
 1 files changed, 12 insertions(+)


Index: llvm/test/CodeGen/Generic/2007-02-25-invoke.ll
diff -c /dev/null llvm/test/CodeGen/Generic/2007-02-25-invoke.ll:1.1
*** /dev/null   Sun Feb 25 15:43:31 2007
--- llvm/test/CodeGen/Generic/2007-02-25-invoke.ll  Sun Feb 25 15:43:21 2007
***
*** 0 
--- 1,12 
+ ; RUN: llvm-as  %s | llc
+ 
+ ; PR1224
+ 
+ declare i32 @test()
+ define i32 @test2() {
+ %A = invoke i32 @test() to label %invcont unwind label %blat
+ invcont:
+ ret i32 %A
+ blat:
+ ret i32 0
+ }



___
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

2007-02-25 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.375 - 1.376
---
Log message:

Fix for PR1224: http://llvm.org/PR1224 .

---
Diffs of the changes:  (+50 -35)

 SelectionDAGISel.cpp |   85 ++-
 1 files changed, 50 insertions(+), 35 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.375 
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.376
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.375Sun Feb 25 
12:40:32 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp  Sun Feb 25 15:43:59 2007
@@ -500,6 +500,7 @@
   
   // These all get lowered before this pass.
   void visitInvoke(InvokeInst I);
+  void visitInvoke(InvokeInst I, bool AsTerminator);
   void visitUnwind(UnwindInst I);
 
   void visitScalarBinary(User I, unsigned OpCode);
@@ -1102,44 +1103,49 @@
 }
 
 void SelectionDAGLowering::visitInvoke(InvokeInst I) {
+  assert(0  Should never be visited directly);
+}
+void SelectionDAGLowering::visitInvoke(InvokeInst I, bool AsTerminator) {
   // Retrieve successors.
   MachineBasicBlock *Return = FuncInfo.MBBMap[I.getSuccessor(0)];
   MachineBasicBlock *LandingPad = FuncInfo.MBBMap[I.getSuccessor(1)];
   
-  // Mark landing pad so that it doesn't get deleted in branch folding.
-  LandingPad-setIsLandingPad();
-  
-  // Insert a label before the invoke call to mark the try range.
-  // This can be used to detect deletion of the invoke via the
-  // MachineModuleInfo.
-  MachineModuleInfo *MMI = DAG.getMachineModuleInfo();
-  unsigned BeginLabel = MMI-NextLabelID();
-  DAG.setRoot(DAG.getNode(ISD::LABEL, MVT::Other, getRoot(),
-  DAG.getConstant(BeginLabel, MVT::i32)));
-
-  LowerCallTo(I, I.getCalledValue()-getType(),
- I.getCallingConv(),
- false,
- getValue(I.getOperand(0)),
- 3);
-
-  // Insert a label before the invoke call to mark the try range.
-  // This can be used to detect deletion of the invoke via the
-  // MachineModuleInfo.
-  unsigned EndLabel = MMI-NextLabelID();
-  DAG.setRoot(DAG.getNode(ISD::LABEL, MVT::Other, getRoot(),
-  DAG.getConstant(EndLabel, MVT::i32)));
-  
-  // Inform MachineModuleInfo of range.
-  MMI-addInvoke(LandingPad, BeginLabel, EndLabel);
-
-  // Drop into normal successor.
-  DAG.setRoot(DAG.getNode(ISD::BR, MVT::Other, getRoot(), 
-  DAG.getBasicBlock(Return)));
-  
-  // Update successor info
-  CurMBB-addSuccessor(Return);
-  CurMBB-addSuccessor(LandingPad);
+  if (!AsTerminator) {
+// Mark landing pad so that it doesn't get deleted in branch folding.
+LandingPad-setIsLandingPad();
+
+// Insert a label before the invoke call to mark the try range.
+// This can be used to detect deletion of the invoke via the
+// MachineModuleInfo.
+MachineModuleInfo *MMI = DAG.getMachineModuleInfo();
+unsigned BeginLabel = MMI-NextLabelID();
+DAG.setRoot(DAG.getNode(ISD::LABEL, MVT::Other, getRoot(),
+DAG.getConstant(BeginLabel, MVT::i32)));
+
+LowerCallTo(I, I.getCalledValue()-getType(),
+   I.getCallingConv(),
+   false,
+   getValue(I.getOperand(0)),
+   3);
+
+// Insert a label before the invoke call to mark the try range.
+// This can be used to detect deletion of the invoke via the
+// MachineModuleInfo.
+unsigned EndLabel = MMI-NextLabelID();
+DAG.setRoot(DAG.getNode(ISD::LABEL, MVT::Other, getRoot(),
+DAG.getConstant(EndLabel, MVT::i32)));
+
+// Inform MachineModuleInfo of range.
+MMI-addInvoke(LandingPad, BeginLabel, EndLabel);
+
+// Update successor info
+CurMBB-addSuccessor(Return);
+CurMBB-addSuccessor(LandingPad);
+  } else {
+// Drop into normal successor.
+DAG.setRoot(DAG.getNode(ISD::BR, MVT::Other, getRoot(), 
+DAG.getBasicBlock(Return)));
+  }
 }
 
 void SelectionDAGLowering::visitUnwind(UnwindInst I) {
@@ -4216,6 +4222,10 @@
   for (BasicBlock::iterator I = LLVMBB-begin(), E = --LLVMBB-end();
I != E; ++I)
 SDL.visit(*I);
+
+  // Lower call part of invoke.
+  InvokeInst *Invoke = dyn_castInvokeInst(LLVMBB-getTerminator());
+  if (Invoke) SDL.visitInvoke(*Invoke, false);
   
   // Ensure that all instructions which are used outside of their defining
   // blocks are available as virtual registers.
@@ -4328,7 +4338,12 @@
   }
 
   // Lower the terminator after the copies are emitted.
-  SDL.visit(*LLVMBB-getTerminator());
+  if (Invoke) {
+// Just the branch part of invoke.
+SDL.visitInvoke(*Invoke, true);
+  } else {
+SDL.visit(*LLVMBB-getTerminator());
+  }
 
   // Copy over 

[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

2007-02-24 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen/SelectionDAG:

LegalizeDAG.cpp updated: 1.478 - 1.479
---
Log message:

Drop unused operand.

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

 LegalizeDAG.cpp |2 --
 1 files changed, 2 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.478 
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.479
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.478 Thu Feb 22 09:37:19 2007
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp   Sat Feb 24 03:44:17 2007
@@ -677,8 +677,6 @@
   Result = DAG.getConstant(0, TLI.getPointerTy());
 break;
   case ISD::EHSELECTION:
-LegalizeOp(Node-getOperand(1));
-// Fall Thru
   case ISD::EXCEPTIONADDR: {
 Tmp1 = LegalizeOp(Node-getOperand(0));
 MVT::ValueType VT = Node-getValueType(0);



___
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

2007-02-24 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.373 - 1.374
---
Log message:

Deal with cases when MMI is not requested.

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

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


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.373 
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.374
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.373Fri Feb 23 
15:45:01 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp  Sat Feb 24 03:45:44 2007
@@ -2101,6 +2101,12 @@
   SDOperand Op = DAG.getNode(ISD::EXCEPTIONADDR, VTs, Ops, 1);
   setValue(I, Op);
   DAG.setRoot(Op.getValue(1));
+} else {
+  SDOperand Op = DAG.getNode(ISD::MERGE_VALUES, TLI.getPointerTy(),
+ DAG.getConstant(0, TLI.getPointerTy()),
+ DAG.getRoot());
+  setValue(I, Op);
+  DAG.setRoot(Op.getValue(1));
 }
 return 0;
   }
@@ -2145,6 +2151,12 @@
   SDOperand Op = DAG.getNode(ISD::EHSELECTION, VTs, Ops, 2);
   setValue(I, Op);
   DAG.setRoot(Op.getValue(1));
+} else {
+  SDOperand Op = DAG.getNode(ISD::MERGE_VALUES, TLI.getPointerTy(),
+ DAG.getConstant(0, TLI.getPointerTy()),
+ getValue(I.getOperand(1)));
+  setValue(I, Op);
+  DAG.setRoot(Op.getValue(1));
 }
 
 return 0;
@@ -2169,6 +2181,8 @@
   
   unsigned TypeID = MMI-getTypeIDFor(GV);
   setValue(I, DAG.getConstant(TypeID, MVT::i32));
+} else {
+  setValue(I, DAG.getConstant(0, MVT::i32));
 }
 
 return 0;



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


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h PPCRegisterInfo.cpp PPCRegisterInfo.h

2007-02-23 Thread Jim Laskey


Changes in directory llvm/lib/Target/PowerPC:

PPCMachineFunctionInfo.h updated: 1.2 - 1.3
PPCRegisterInfo.cpp updated: 1.110 - 1.111
PPCRegisterInfo.h updated: 1.28 - 1.29
---
Log message:

Don't spill LR as a callee saved register.

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

 PPCMachineFunctionInfo.h |7 +++
 PPCRegisterInfo.cpp  |   13 +++--
 PPCRegisterInfo.h|1 +
 3 files changed, 19 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
diff -u llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h:1.2 
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h:1.3
--- llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h:1.2Fri Nov 24 
23:41:02 2006
+++ llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.hFri Feb 23 14:34:16 2007
@@ -26,6 +26,10 @@
   /// stored.  Also used as an anchor for instructions that need to be altered
   /// when using frame pointers (dyna_add, dyna_sub.)
   int FramePointerSaveIndex;
+  
+  /// UsesLR - Indicates whether LR is used in the current function.
+  ///
+  bool UsesLR;
 
 public:
   PPCFunctionInfo(MachineFunction MF) 
@@ -34,6 +38,9 @@
 
   int getFramePointerSaveIndex() const { return FramePointerSaveIndex; }
   void setFramePointerSaveIndex(int Idx) { FramePointerSaveIndex = Idx; }
+  
+  void setUsesLR(bool U) { UsesLR = U; }
+  bool usesLR()  { return UsesLR; }
 
 };
 


Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.110 
llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.111
--- llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.110   Thu Feb 22 19:10:03 2007
+++ llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp Fri Feb 23 14:34:16 2007
@@ -439,8 +439,8 @@
 /// usesLR - Returns if the link registers (LR) has been used in the function.
 ///
 bool PPCRegisterInfo::usesLR(MachineFunction MF) const {
-  const bool *PhysRegsUsed = MF.getUsedPhysregs();
-  return PhysRegsUsed[getRARegister()];
+  PPCFunctionInfo *FI = MF.getInfoPPCFunctionInfo();
+  return FI-usesLR();
 }
 
 void PPCRegisterInfo::
@@ -774,6 +774,15 @@
   MFI-setStackSize(FrameSize);
 }
 
+void PPCRegisterInfo::processFunctionBeforeCalleeSavedScan(MachineFunction MF)
+  const {
+  //  Save and clear the LR state.
+  PPCFunctionInfo *FI = MF.getInfoPPCFunctionInfo();
+  unsigned LR = getRARegister();
+  FI-setUsesLR(MF.isPhysRegUsed(LR));
+  MF.changePhyRegUsed(LR, false);
+}
+
 void PPCRegisterInfo::emitPrologue(MachineFunction MF) const {
   MachineBasicBlock MBB = MF.front();   // Prolog goes in entry BB
   MachineBasicBlock::iterator MBBI = MBB.begin();


Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.h
diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.28 
llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.29
--- llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.28  Wed Feb 21 16:54:50 2007
+++ llvm/lib/Target/PowerPC/PPCRegisterInfo.h   Fri Feb 23 14:34:16 2007
@@ -82,6 +82,7 @@
   /// frame size.
   void determineFrameLayout(MachineFunction MF) const;
 
+  void processFunctionBeforeCalleeSavedScan(MachineFunction MF) const;
   void emitPrologue(MachineFunction MF) const;
   void emitEpilogue(MachineFunction MF, MachineBasicBlock MBB) const;
 



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


[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

2007-02-23 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.372 - 1.373
---
Log message:

Handle improper cast.

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

 SelectionDAGISel.cpp |   25 +++--
 1 files changed, 19 insertions(+), 6 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.372 
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.373
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.372Thu Feb 22 
10:10:05 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp  Fri Feb 23 15:45:01 2007
@@ -484,7 +484,9 @@
 unsigned Opc);
   bool isExportableFromCurrentBlock(Value *V, const BasicBlock *FromBB);
   void ExportFromCurrentBlock(Value *V);
-  void LowerCallTo(CallInst I, SDOperand Callee, unsigned OpIdx);
+  void LowerCallTo(Instruction I,
+   const Type *CalledValueTy, unsigned CallingConv,
+   bool IsTailCall, SDOperand Callee, unsigned OpIdx);
  
   // Terminator instructions.
   void visitRet(ReturnInst I);
@@ -1118,7 +1120,11 @@
   DAG.setRoot(DAG.getNode(ISD::LABEL, MVT::Other, getRoot(),
   DAG.getConstant(BeginLabel, MVT::i32)));
 
-  LowerCallTo((CallInst)I, getValue(I.getOperand(0)), 3);
+  LowerCallTo(I, I.getCalledValue()-getType(),
+ I.getCallingConv(),
+ false,
+ getValue(I.getOperand(0)),
+ 3);
 
   // Insert a label before the invoke call to mark the try range.
   // This can be used to detect deletion of the invoke via the
@@ -2246,9 +2252,12 @@
 }
 
 
-void SelectionDAGLowering::LowerCallTo(CallInst I,
+void SelectionDAGLowering::LowerCallTo(Instruction I,
+   const Type *CalledValueTy,
+   unsigned CallingConv,
+   bool IsTailCall,
SDOperand Callee, unsigned OpIdx) {
-  const PointerType *PT = castPointerType(I.getCalledValue()-getType());
+  const PointerType *PT = castPointerType(CalledValueTy);
   const FunctionType *FTy = castFunctionType(PT-getElementType());
 
   TargetLowering::ArgListTy Args;
@@ -2267,7 +2276,7 @@
   std::pairSDOperand,SDOperand Result =
 TLI.LowerCallTo(getRoot(), I.getType(), 
 FTy-paramHasAttr(0,FunctionType::SExtAttribute),
-FTy-isVarArg(), I.getCallingConv(), I.isTailCall(), 
+FTy-isVarArg(), CallingConv, IsTailCall, 
 Callee, Args, DAG);
   if (I.getType() != Type::VoidTy)
 setValue(I, Result.first);
@@ -2333,7 +2342,11 @@
   else
 Callee = DAG.getExternalSymbol(RenameFn, TLI.getPointerTy());
 
-  LowerCallTo(I, Callee, 1);
+  LowerCallTo(I, I.getCalledValue()-getType(),
+ I.getCallingConv(),
+ I.isTailCall(),
+ Callee,
+ 1);
 }
 
 



___
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/2007-02-23-lr-saved-twice.ll

2007-02-23 Thread Jim Laskey


Changes in directory llvm/test/CodeGen/PowerPC:

2007-02-23-lr-saved-twice.ll added (r1.1)
---
Log message:

New test - practically wrote itself.

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

 2007-02-23-lr-saved-twice.ll |   15 +++
 1 files changed, 15 insertions(+)


Index: llvm/test/CodeGen/PowerPC/2007-02-23-lr-saved-twice.ll
diff -c /dev/null llvm/test/CodeGen/PowerPC/2007-02-23-lr-saved-twice.ll:1.1
*** /dev/null   Fri Feb 23 16:12:18 2007
--- llvm/test/CodeGen/PowerPC/2007-02-23-lr-saved-twice.ll  Fri Feb 23 
16:12:08 2007
***
*** 0 
--- 1,15 
+ ; RUN: llvm-as  %s | llc | grep mflr | wc -l | grep 1
+ 
+ target datalayout = e-p:32:32
+ target triple = powerpc-apple-darwin8
+ @str = internal constant [18 x i8] chello world!, %d\0A\00; 
[18 x i8]* [#uses=1]
+ 
+ implementation   ; Functions:
+ 
+ define i32 @main() {
+ entry:
+ %tmp = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([18 x 
i8]* @str, i32 0, i32 0) ); i32 [#uses=0]
+ ret i32 0
+ }
+ 
+ declare i32 @printf(i8*, ...)



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


[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp

2007-02-22 Thread Jim Laskey


Changes in directory llvm/lib/Target/Sparc:

SparcISelDAGToDAG.cpp updated: 1.120 - 1.121
---
Log message:

Simplify lowering and selection of exception ops.

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

 SparcISelDAGToDAG.cpp |3 ---
 1 files changed, 3 deletions(-)


Index: llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp
diff -u llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.120 
llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.121
--- llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.120   Wed Feb 21 16:54:50 2007
+++ llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp Thu Feb 22 08:56:36 2007
@@ -871,9 +871,6 @@
   // Frame  Return address.  Currently unimplemented
   case ISD::RETURNADDR: break;
   case ISD::FRAMEADDR:  break;
-  // Exception address and exception selector.  Currently unimplemented.
-  case ISD::EXCEPTIONADDR: break;
-  case ISD::EHSELECTION:   break;
   }
   return SDOperand();
 }



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


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp

2007-02-22 Thread Jim Laskey


Changes in directory llvm/lib/Target/PowerPC:

PPCISelLowering.cpp updated: 1.252 - 1.253
---
Log message:

Simplify lowering and selection of exception ops.

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

 PPCISelLowering.cpp |   49 +++--
 1 files changed, 15 insertions(+), 34 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.252 
llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.253
--- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.252   Wed Feb 21 16:54:50 2007
+++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Thu Feb 22 08:56:36 2007
@@ -140,14 +140,18 @@
 
   // We cannot sextinreg(i1).  Expand to shifts.
   setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i1, Expand);
-  
-  
+
   // Support label based line numbers.
   setOperationAction(ISD::LOCATION, MVT::Other, Expand);
   setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand);
-  // FIXME - use subtarget debug flags
-  if (!TM.getSubtargetPPCSubtarget().isDarwin())
+  if (!TM.getSubtargetPPCSubtarget().isDarwin()) {
 setOperationAction(ISD::LABEL, MVT::Other, Expand);
+  } else {
+setOperationAction(ISD::EXCEPTIONADDR, MVT::i64, Expand);
+setOperationAction(ISD::EHSELECTION,   MVT::i64, Expand);
+setOperationAction(ISD::EXCEPTIONADDR, MVT::i32, Expand);
+setOperationAction(ISD::EHSELECTION,   MVT::i32, Expand);
+  }
   
   // We want to legalize GlobalAddress and ConstantPool nodes into the 
   // appropriate instructions to materialize the address.
@@ -283,10 +287,15 @@
   setShiftAmountType(MVT::i32);
   setSetCCResultContents(ZeroOrOneSetCCResult);
   
-  if (TM.getSubtargetPPCSubtarget().isPPC64())
+  if (TM.getSubtargetPPCSubtarget().isPPC64()) {
 setStackPointerRegisterToSaveRestore(PPC::X1);
-  else 
+setExceptionPointerRegister(PPC::X3);
+setExceptionSelectorRegister(PPC::X4);
+  } else {
 setStackPointerRegisterToSaveRestore(PPC::R1);
+setExceptionPointerRegister(PPC::R3);
+setExceptionSelectorRegister(PPC::R4);
+  }
   
   // We have target-specific dag combine patterns for the following nodes:
   setTargetDAGCombine(ISD::SINT_TO_FP);
@@ -2610,30 +2619,6 @@
   }
 }
 
-/// LowerEXCEPTIONADDR - Replace EXCEPTIONADDR with a copy from the exception
-/// register.  The register was made live in the ISel.
-static SDOperand LowerEXCEPTIONADDR(SDOperand Op, SelectionDAG DAG) {
-  const MRegisterInfo *MRI = DAG.getTargetLoweringInfo().
- getTargetMachine().
- getRegisterInfo();
-  MVT::ValueType VT = Op.Val-getValueType(0);
-  unsigned Reg = MRI-getEHExceptionRegister();
-  SDOperand Result = DAG.getCopyFromReg(Op.getOperand(0), Reg, VT);
-  return Result.getValue(Op.ResNo);
-}
-
-/// LowerEXCEPTIONADDR - Replace EHSELECTION with a copy from the exception
-/// selection register.  The register was made live in the ISel.
-static SDOperand LowerEHSELECTION(SDOperand Op, SelectionDAG DAG) {
-  const MRegisterInfo *MRI = DAG.getTargetLoweringInfo().
- getTargetMachine().
- getRegisterInfo();
-  MVT::ValueType VT = Op.Val-getValueType(0);
-  unsigned Reg = MRI-getEHHandlerRegister();
-  SDOperand Result = DAG.getCopyFromReg(Op.getOperand(1), Reg, VT);
-  return Result.getValue(Op.ResNo);
-}
-
 /// LowerOperation - Provide custom lowering hooks for some operations.
 ///
 SDOperand PPCTargetLowering::LowerOperation(SDOperand Op, SelectionDAG DAG) {
@@ -2671,10 +2656,6 @@
   // Frame  Return address.  Currently unimplemented
   case ISD::RETURNADDR: break;
   case ISD::FRAMEADDR:  break;
-  
-  // Exception address and exception selector.
-  case ISD::EXCEPTIONADDR:  return LowerEXCEPTIONADDR(Op, DAG);
-  case ISD::EHSELECTION:return LowerEHSELECTION(Op, DAG);
   }
   return SDOperand();
 }



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


[llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelLowering.cpp

2007-02-22 Thread Jim Laskey


Changes in directory llvm/lib/Target/IA64:

IA64ISelLowering.cpp updated: 1.54 - 1.55
---
Log message:

Simplify lowering and selection of exception ops.

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

 IA64ISelLowering.cpp |3 ---
 1 files changed, 3 deletions(-)


Index: llvm/lib/Target/IA64/IA64ISelLowering.cpp
diff -u llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.54 
llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.55
--- llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.54  Wed Feb 21 16:54:50 2007
+++ llvm/lib/Target/IA64/IA64ISelLowering.cpp   Thu Feb 22 08:56:36 2007
@@ -590,9 +590,6 @@
   // Frame  Return address.  Currently unimplemented
   case ISD::RETURNADDR: break;
   case ISD::FRAMEADDR:  break;
-  // Exception address and exception selector.  Currently unimplemented.
-  case ISD::EXCEPTIONADDR: break;
-  case ISD::EHSELECTION:   break;
   }
   return SDOperand();
 }



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


[llvm-commits] CVS: llvm/include/llvm/Target/MRegisterInfo.h

2007-02-22 Thread Jim Laskey


Changes in directory llvm/include/llvm/Target:

MRegisterInfo.h updated: 1.95 - 1.96
---
Log message:

Simplify lowering and selection of exception ops.

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

 MRegisterInfo.h |8 
 1 files changed, 8 deletions(-)


Index: llvm/include/llvm/Target/MRegisterInfo.h
diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.95 
llvm/include/llvm/Target/MRegisterInfo.h:1.96
--- llvm/include/llvm/Target/MRegisterInfo.h:1.95   Wed Feb 21 16:54:50 2007
+++ llvm/include/llvm/Target/MRegisterInfo.hThu Feb 22 08:56:35 2007
@@ -470,14 +470,6 @@
   /// address can be found.
   virtual unsigned getRARegister() const = 0;
   
-  /// getEHExceptionRegister - This method should return the register 
containing
-  /// the address of the exception info on entry to a landing pad.
-  virtual unsigned getEHExceptionRegister() const = 0;
-  
-  /// getEHHandlerRegister - This method should return the register containing
-  /// the switch table selection on entry to an landing pad.
-  virtual unsigned getEHHandlerRegister() const = 0;
-
   /// getLocation - This method should return the actual location of a frame
   /// variable given the frame index.  The location is returned in ML.
   /// Subclasses should override this method for special handling of frame



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


[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelLowering.cpp

2007-02-22 Thread Jim Laskey


Changes in directory llvm/lib/Target/Alpha:

AlphaISelLowering.cpp updated: 1.82 - 1.83
---
Log message:

Simplify lowering and selection of exception ops.

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

 AlphaISelLowering.cpp |3 ---
 1 files changed, 3 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.82 
llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.83
--- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.82Wed Feb 21 16:54:50 2007
+++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Thu Feb 22 08:56:36 2007
@@ -548,9 +548,6 @@
 return DAG.getNode(AlphaISD::GlobalRetAddr, MVT::i64);
   //FIXME: implement
   case ISD::FRAMEADDR:  break;
-  // Exception address and exception selector.  Currently unimplemented.
-  case ISD::EXCEPTIONADDR: break;
-  case ISD::EHSELECTION:   break;
   }
   
   return SDOperand();



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

2007-02-22 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen/SelectionDAG:

LegalizeDAG.cpp updated: 1.477 - 1.478
---
Log message:

Simplify lowering and selection of exception ops.

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

 LegalizeDAG.cpp |   28 ++--
 1 files changed, 26 insertions(+), 2 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.477 
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.478
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.477 Wed Feb 21 16:53:45 2007
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp   Thu Feb 22 09:37:19 2007
@@ -668,8 +668,6 @@
 break;
   case ISD::FRAMEADDR:
   case ISD::RETURNADDR:
-  case ISD::EXCEPTIONADDR:
-  case ISD::EHSELECTION:
 // The only option for these nodes is to custom lower them.  If the target
 // does not custom lower them, then return zero.
 Tmp1 = TLI.LowerOperation(Op, DAG);
@@ -678,6 +676,32 @@
 else
   Result = DAG.getConstant(0, TLI.getPointerTy());
 break;
+  case ISD::EHSELECTION:
+LegalizeOp(Node-getOperand(1));
+// Fall Thru
+  case ISD::EXCEPTIONADDR: {
+Tmp1 = LegalizeOp(Node-getOperand(0));
+MVT::ValueType VT = Node-getValueType(0);
+switch (TLI.getOperationAction(Node-getOpcode(), VT)) {
+default: assert(0  This action is not supported yet!);
+case TargetLowering::Expand: {
+unsigned Reg = Node-getOpcode() == ISD::EXCEPTIONADDR ?
+  TLI.getExceptionAddressRegister() :
+  TLI.getExceptionSelectorRegister();
+Result = DAG.getCopyFromReg(Tmp1, Reg, VT).getValue(Op.ResNo);
+  }
+  break;
+case TargetLowering::Custom:
+  Result = TLI.LowerOperation(Op, DAG);
+  if (Result.Val) break;
+  // Fall Thru
+case TargetLowering::Legal:
+  Result = DAG.getNode(ISD::MERGE_VALUES, VT, DAG.getConstant(0, VT), 
Tmp1).
+  getValue(Op.ResNo);
+  break;
+}
+}
+break;
   case ISD::AssertSext:
   case ISD::AssertZext:
 Tmp1 = LegalizeOp(Node-getOperand(0));



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


[llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h

2007-02-22 Thread Jim Laskey


Changes in directory llvm/include/llvm/Target:

TargetLowering.h updated: 1.109 - 1.110
---
Log message:

Simplify lowering and selection of exception ops.

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

 TargetLowering.h |   38 ++
 1 files changed, 38 insertions(+)


Index: llvm/include/llvm/Target/TargetLowering.h
diff -u llvm/include/llvm/Target/TargetLowering.h:1.109 
llvm/include/llvm/Target/TargetLowering.h:1.110
--- llvm/include/llvm/Target/TargetLowering.h:1.109 Wed Feb 14 21:39:17 2007
+++ llvm/include/llvm/Target/TargetLowering.h   Thu Feb 22 09:37:19 2007
@@ -403,6 +403,20 @@
 return StackPointerRegisterToSaveRestore;
   }
 
+  /// getExceptionAddressRegister - If a physical register, this returns
+  /// the register that receives the exception address on entry to a landing
+  /// pad.
+  unsigned getExceptionAddressRegister() const {
+return ExceptionPointerRegister;
+  }
+
+  /// getExceptionSelectorRegister - If a physical register, this returns
+  /// the register that receives the exception typeid on entry to a landing
+  /// pad.
+  unsigned getExceptionSelectorRegister() const {
+return ExceptionSelectorRegister;
+  }
+
   /// getJumpBufSize - returns the target's jmp_buf size in bytes (if never
   /// set, the default is 200)
   unsigned getJumpBufSize() const {
@@ -604,6 +618,20 @@
 StackPointerRegisterToSaveRestore = R;
   }
   
+  /// setExceptionPointerRegister - If set to a physical register, this sets
+  /// the register that receives the exception address on entry to a landing
+  /// pad.
+  void setExceptionPointerRegister(unsigned R) {
+ExceptionPointerRegister = R;
+  }
+
+  /// setExceptionSelectorRegister - If set to a physical register, this sets
+  /// the register that receives the exception typeid on entry to a landing
+  /// pad.
+  void setExceptionSelectorRegister(unsigned R) {
+ExceptionSelectorRegister = R;
+  }
+
   /// SelectIsExpensive - Tells the code generator not to expand operations
   /// into sequences that use the select operations if possible.
   void setSelectIsExpensive() { SelectIsExpensive = true; }
@@ -956,6 +984,16 @@
   /// and restore.
   unsigned StackPointerRegisterToSaveRestore;
 
+  /// ExceptionPointerRegister - If set to a physical register, this specifies
+  /// the register that receives the exception address on entry to a landing
+  /// pad.
+  unsigned ExceptionPointerRegister;
+
+  /// ExceptionSelectorRegister - If set to a physical register, this specifies
+  /// the register that receives the exception typeid on entry to a landing
+  /// pad.
+  unsigned ExceptionSelectorRegister;
+
   /// RegClassForVT - This indicates the default register class to use for
   /// each ValueType the target supports natively.
   TargetRegisterClass *RegClassForVT[MVT::LAST_VALUETYPE];



___
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

2007-02-22 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.370 - 1.371
---
Log message:

Handle lowering invoke to call correctly.

---
Diffs of the changes:  (+97 -95)

 SelectionDAGISel.cpp |  192 +--
 1 files changed, 97 insertions(+), 95 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.370 
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.371
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.370Wed Feb 21 
16:53:45 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp  Thu Feb 22 09:38:06 2007
@@ -484,7 +484,8 @@
 unsigned Opc);
   bool isExportableFromCurrentBlock(Value *V, const BasicBlock *FromBB);
   void ExportFromCurrentBlock(Value *V);
-
+  void LowerCallTo(CallInst I, SDOperand Callee, unsigned OpIdx);
+ 
   // Terminator instructions.
   void visitRet(ReturnInst I);
   void visitBr(BranchInst I);
@@ -1117,17 +1118,7 @@
   DAG.setRoot(DAG.getNode(ISD::LABEL, MVT::Other, getRoot(),
   DAG.getConstant(BeginLabel, MVT::i32)));
 
-  // Insert a normal call instruction.
-  std::vectorValue* Args;
-  for (InvokeInst::op_iterator OI = I.op_begin() + 3, E = I.op_end();
-   OI != E; ++OI) {
-Args.push_back(*OI);
-  }
-  CallInst *NewCall = new CallInst(I.getCalledValue(), Args[0], Args.size(),
-   I.getName(), I);
-  NewCall-setCallingConv(I.getCallingConv());
-  I.replaceAllUsesWith(NewCall);
-  visitCall(*NewCall);
+  LowerCallTo((CallInst)I, getValue(I.getOperand(0)), 3);
 
   // Insert a label before the invoke call to mark the try range.
   // This can be used to detect deletion of the invoke via the
@@ -2086,84 +2077,87 @@
   case Intrinsic::eh_exception: {
 MachineModuleInfo *MMI = DAG.getMachineModuleInfo();
 
-// Add a label to mark the beginning of the landing pad.  Deletion of the
-// landing pad can thus be detected via the MachineModuleInfo.
-unsigned LabelID = MMI-addLandingPad(CurMBB);
-DAG.setRoot(DAG.getNode(ISD::LABEL, MVT::Other, DAG.getEntryNode(),
-DAG.getConstant(LabelID, MVT::i32)));
-
-// Mark exception register as live in.
-const MRegisterInfo *MRI = DAG.getTarget().getRegisterInfo();
-unsigned Reg = MRI-getEHExceptionRegister();
-if (Reg) CurMBB-addLiveIn(Reg);
-
-// Insert the EXCEPTIONADDR instruction.
-SDVTList VTs = DAG.getVTList(TLI.getPointerTy(), MVT::Other);
-SDOperand Ops[1];
-Ops[0] = DAG.getRoot();
-SDOperand Op = DAG.getNode(ISD::EXCEPTIONADDR, VTs, Ops, 1);
-setValue(I, Op);
-DAG.setRoot(Op.getValue(1));
-
+if (MMI) {
+  // Add a label to mark the beginning of the landing pad.  Deletion of the
+  // landing pad can thus be detected via the MachineModuleInfo.
+  unsigned LabelID = MMI-addLandingPad(CurMBB);
+  DAG.setRoot(DAG.getNode(ISD::LABEL, MVT::Other, DAG.getEntryNode(),
+  DAG.getConstant(LabelID, MVT::i32)));
+  
+  // Mark exception register as live in.
+  unsigned Reg = TLI.getExceptionAddressRegister();
+  if (Reg) CurMBB-addLiveIn(Reg);
+  
+  // Insert the EXCEPTIONADDR instruction.
+  SDVTList VTs = DAG.getVTList(TLI.getPointerTy(), MVT::Other);
+  SDOperand Ops[1];
+  Ops[0] = DAG.getRoot();
+  SDOperand Op = DAG.getNode(ISD::EXCEPTIONADDR, VTs, Ops, 1);
+  setValue(I, Op);
+  DAG.setRoot(Op.getValue(1));
+}
 return 0;
   }
 
   case Intrinsic::eh_handlers: {
 MachineModuleInfo *MMI = DAG.getMachineModuleInfo();
 
-// Inform the MachineModuleInfo of the personality for this landing pad.
-if (ConstantExpr *CE = dyn_castConstantExpr(I.getOperand(2))) {
-  if (CE-getOpcode() == Instruction::BitCast) {
-  MMI-addPersonality(CurMBB,
-  castFunction(CE-getOperand(0)));
-  }
-}
-
-// Gather all the type infos for this landing pad and pass them along to
-// MachineModuleInfo.
-std::vectorGlobalVariable * TyInfo;
-for (unsigned i = 3, N = I.getNumOperands(); i  N; ++i) {
-  if (ConstantExpr *CE = dyn_castConstantExpr(I.getOperand(i))) {
+if (MMI) {
+  // Inform the MachineModuleInfo of the personality for this landing pad.
+  if (ConstantExpr *CE = dyn_castConstantExpr(I.getOperand(2))) {
 if (CE-getOpcode() == Instruction::BitCast) {
-  TyInfo.push_back(castGlobalVariable(CE-getOperand(0)));
-  continue;
+MMI-addPersonality(CurMBB,
+castFunction(CE-getOperand(0)));
 }
   }
 
-  TyInfo.push_back(NULL);
+  // Gather all the type infos for this landing pad and pass them along to
+  // MachineModuleInfo.
+  std::vectorGlobalVariable * TyInfo;
+  for 

[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

2007-02-22 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.371 - 1.372
---
Log message:

Tighten up error checking of args.

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

 SelectionDAGISel.cpp |   40 +++-
 1 files changed, 23 insertions(+), 17 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.371 
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.372
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.371Thu Feb 22 
09:38:06 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp  Thu Feb 22 10:10:05 2007
@@ -2104,25 +2104,26 @@
 
 if (MMI) {
   // Inform the MachineModuleInfo of the personality for this landing pad.
-  if (ConstantExpr *CE = dyn_castConstantExpr(I.getOperand(2))) {
-if (CE-getOpcode() == Instruction::BitCast) {
-MMI-addPersonality(CurMBB,
-castFunction(CE-getOperand(0)));
-}
-  }
+  ConstantExpr *CE = dyn_castConstantExpr(I.getOperand(2));
+  assert(CE  CE-getOpcode() == Instruction::BitCast 
+ isaFunction(CE-getOperand(0)) 
+ Personality should be a function);
+  MMI-addPersonality(CurMBB, castFunction(CE-getOperand(0)));
 
   // Gather all the type infos for this landing pad and pass them along to
   // MachineModuleInfo.
   std::vectorGlobalVariable * TyInfo;
   for (unsigned i = 3, N = I.getNumOperands(); i  N; ++i) {
-if (ConstantExpr *CE = dyn_castConstantExpr(I.getOperand(i))) {
-  if (CE-getOpcode() == Instruction::BitCast) {
-TyInfo.push_back(castGlobalVariable(CE-getOperand(0)));
-continue;
-  }
+ConstantExpr *CE = dyn_castConstantExpr(I.getOperand(i));
+if (CE  CE-getOpcode() == Instruction::BitCast 
+isaGlobalVariable(CE-getOperand(0))) {
+  TyInfo.push_back(castGlobalVariable(CE-getOperand(0)));
+} else {
+  ConstantInt *CI = dyn_castConstantInt(I.getOperand(i));
+  assert(CI  CI-getZExtValue() == 0 
+TypeInfo must be a global variable typeinfo or NULL);
+  TyInfo.push_back(NULL);
 }
-
-TyInfo.push_back(NULL);
   }
   MMI-addCatchTypeInfo(CurMBB, TyInfo);
   
@@ -2149,10 +2150,15 @@
 if (MMI) {
   // Find the type id for the given typeinfo.
   GlobalVariable *GV = NULL;
-  if (ConstantExpr *CE = dyn_castConstantExpr(I.getOperand(1))) {
-if (CE-getOpcode() == Instruction::BitCast) {
-  GV = castGlobalVariable(CE-getOperand(0));
-}
+  ConstantExpr *CE = dyn_castConstantExpr(I.getOperand(1));
+  if (CE  CE-getOpcode() == Instruction::BitCast 
+  isaGlobalVariable(CE-getOperand(0))) {
+GV = castGlobalVariable(CE-getOperand(0));
+  } else {
+ConstantInt *CI = dyn_castConstantInt(I.getOperand(1));
+assert(CI  CI-getZExtValue() == 0 
+  TypeInfo must be a global variable typeinfo or NULL);
+GV = NULL;
   }
   
   unsigned TypeID = MMI-getTypeIDFor(GV);



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


[llvm-commits] CVS: llvm/lib/CodeGen/IntrinsicLowering.cpp

2007-02-22 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

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

Remove assertion.

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

 IntrinsicLowering.cpp |5 +
 1 files changed, 1 insertion(+), 4 deletions(-)


Index: llvm/lib/CodeGen/IntrinsicLowering.cpp
diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.68 
llvm/lib/CodeGen/IntrinsicLowering.cpp:1.69
--- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.68 Wed Feb 21 16:53:45 2007
+++ llvm/lib/CodeGen/IntrinsicLowering.cpp  Thu Feb 22 10:12:17 2007
@@ -356,12 +356,9 @@
   case Intrinsic::dbg_region_end:
   case Intrinsic::dbg_func_start:
   case Intrinsic::dbg_declare:
-break;// Simply strip out debugging intrinsics
-
   case Intrinsic::eh_exception:
   case Intrinsic::eh_handlers:
-assert(0  Should not have leaked through);
-break;
+break;// Simply strip out debugging intrinsics
 
   case Intrinsic::memcpy_i32:
   case Intrinsic::memcpy_i64: {



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

2007-02-22 Thread Jim Laskey


Changes in directory llvm/lib/Transforms/Utils:

LowerInvoke.cpp updated: 1.56 - 1.57
---
Log message:

Revert changes for a simplier solution.

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

 LowerInvoke.cpp |   86 +++-
 1 files changed, 36 insertions(+), 50 deletions(-)


Index: llvm/lib/Transforms/Utils/LowerInvoke.cpp
diff -u llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.56 
llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.57
--- llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.56  Wed Feb 21 16:49:50 2007
+++ llvm/lib/Transforms/Utils/LowerInvoke.cpp   Thu Feb 22 10:21:18 2007
@@ -57,9 +57,6 @@
 
 static cl::optbool ExpensiveEHSupport(enable-correct-eh-support,
  cl::desc(Make the -lowerinvoke pass insert expensive, but correct, EH 
code));
- 
-static cl::optbool ItaniumEHSupport(enable-real-eh-support,
- cl::desc(Make the -lowerinvoke pass insert itanium ABI EH code));
 
 namespace {
   class VISIBILITY_HIDDEN LowerInvoke : public FunctionPass {
@@ -97,7 +94,6 @@
 void splitLiveRangesLiveAcrossInvokes(std::vectorInvokeInst* Invokes);
 void rewriteExpensiveInvoke(InvokeInst *II, unsigned InvokeNo,
 AllocaInst *InvokeNum, SwitchInst 
*CatchSwitch);
-bool insertItaniumEHSupport(Function F);
 bool insertExpensiveEHSupport(Function F);
   };
 
@@ -115,50 +111,46 @@
 // doInitialization - Make sure that there is a prototype for abort in the
 // current module.
 bool LowerInvoke::doInitialization(Module M) {
-  if (ItaniumEHSupport) {
-// Let Invoke pass through for ItaniumEHSupport support.
-  } else {
-const Type *VoidPtrTy = PointerType::get(Type::Int8Ty);
-AbortMessage = 0;
-if (ExpensiveEHSupport) {
-  // Insert a type for the linked list of jump buffers.
-  unsigned JBSize = TLI ? TLI-getJumpBufSize() : 0;
-  JBSize = JBSize ? JBSize : 200;
-  const Type *JmpBufTy = ArrayType::get(VoidPtrTy, JBSize);
-
-  { // The type is recursive, so use a type holder.
-std::vectorconst Type* Elements;
-Elements.push_back(JmpBufTy);
-OpaqueType *OT = OpaqueType::get();
-Elements.push_back(PointerType::get(OT));
-PATypeHolder JBLType(StructType::get(Elements));
-OT-refineAbstractTypeTo(JBLType.get());  // Complete the cycle.
-JBLinkTy = JBLType.get();
-M.addTypeName(llvm.sjljeh.jmpbufty, JBLinkTy);
-  }
+  const Type *VoidPtrTy = PointerType::get(Type::Int8Ty);
+  AbortMessage = 0;
+  if (ExpensiveEHSupport) {
+// Insert a type for the linked list of jump buffers.
+unsigned JBSize = TLI ? TLI-getJumpBufSize() : 0;
+JBSize = JBSize ? JBSize : 200;
+const Type *JmpBufTy = ArrayType::get(VoidPtrTy, JBSize);
+
+{ // The type is recursive, so use a type holder.
+  std::vectorconst Type* Elements;
+  Elements.push_back(JmpBufTy);
+  OpaqueType *OT = OpaqueType::get();
+  Elements.push_back(PointerType::get(OT));
+  PATypeHolder JBLType(StructType::get(Elements));
+  OT-refineAbstractTypeTo(JBLType.get());  // Complete the cycle.
+  JBLinkTy = JBLType.get();
+  M.addTypeName(llvm.sjljeh.jmpbufty, JBLinkTy);
+}
 
-  const Type *PtrJBList = PointerType::get(JBLinkTy);
+const Type *PtrJBList = PointerType::get(JBLinkTy);
 
-  // Now that we've done that, insert the jmpbuf list head global, unless 
it
-  // already exists.
-  if (!(JBListHead = M.getGlobalVariable(llvm.sjljeh.jblist, 
PtrJBList))){
-JBListHead = new GlobalVariable(PtrJBList, false,
-GlobalValue::LinkOnceLinkage,
-Constant::getNullValue(PtrJBList),
-llvm.sjljeh.jblist, M);
-  }
-  SetJmpFn = M.getOrInsertFunction(llvm.setjmp, Type::Int32Ty,
-   PointerType::get(JmpBufTy), (Type *)0);
-  LongJmpFn = M.getOrInsertFunction(llvm.longjmp, Type::VoidTy,
-PointerType::get(JmpBufTy),
-Type::Int32Ty, (Type *)0);
+// Now that we've done that, insert the jmpbuf list head global, unless it
+// already exists.
+if (!(JBListHead = M.getGlobalVariable(llvm.sjljeh.jblist, PtrJBList))) {
+  JBListHead = new GlobalVariable(PtrJBList, false,
+  GlobalValue::LinkOnceLinkage,
+  Constant::getNullValue(PtrJBList),
+  llvm.sjljeh.jblist, M);
 }
-
-// We need the 'write' and 'abort' functions for both models.
-AbortFn = M.getOrInsertFunction(abort, Type::VoidTy, (Type *)0);
-WriteFn = M.getOrInsertFunction(write, Type::VoidTy, Type::Int32Ty,
-VoidPtrTy, Type::Int32Ty, (Type *)0);
+SetJmpFn = M.getOrInsertFunction(llvm.setjmp, Type::Int32Ty,
+ 

[llvm-commits] CVS: llvm/lib/CodeGen/LLVMTargetMachine.cpp

2007-02-22 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

LLVMTargetMachine.cpp updated: 1.8 - 1.9
---
Log message:

Use exception  flag.

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

 LLVMTargetMachine.cpp |3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/lib/CodeGen/LLVMTargetMachine.cpp
diff -u llvm/lib/CodeGen/LLVMTargetMachine.cpp:1.8 
llvm/lib/CodeGen/LLVMTargetMachine.cpp:1.9
--- llvm/lib/CodeGen/LLVMTargetMachine.cpp:1.8  Wed Feb  7 19:36:53 2007
+++ llvm/lib/CodeGen/LLVMTargetMachine.cpp  Thu Feb 22 10:22:15 2007
@@ -33,7 +33,8 @@
   PM.add(createLowerGCPass());
   
   // FIXME: Implement the invoke/unwind instructions!
-  PM.add(createLowerInvokePass(getTargetLowering()));
+  if (!ExceptionHandling)
+PM.add(createLowerInvokePass(getTargetLowering()));
   
   // Make sure that no unreachable blocks are instruction selected.
   PM.add(createUnreachableBlockEliminationPass());



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


[llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp

2007-02-22 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

BranchFolding.cpp updated: 1.43 - 1.44
---
Log message:

Remove isAccessable.

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

 BranchFolding.cpp |8 
 1 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/lib/CodeGen/BranchFolding.cpp
diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.43 
llvm/lib/CodeGen/BranchFolding.cpp:1.44
--- llvm/lib/CodeGen/BranchFolding.cpp:1.43 Wed Feb 21 16:42:20 2007
+++ llvm/lib/CodeGen/BranchFolding.cpp  Thu Feb 22 10:39:03 2007
@@ -67,7 +67,7 @@
 /// RemoveDeadBlock - Remove the specified dead machine basic block from the
 /// function, updating the CFG.
 void BranchFolder::RemoveDeadBlock(MachineBasicBlock *MBB) {
-  assert(!MBB-isAccessable()  MBB must be dead!);
+  assert(MBB-pred_empty()  MBB must be dead!);
   DOUT  \nRemoving MBB:   *MBB;
   
   MachineFunction *MF = MBB-getParent();
@@ -440,7 +440,7 @@
 OptimizeBlock(MBB);
 
 // If it is dead, remove it.
-if (!MBB-isAccessable()) {
+if (MBB-pred_empty()) {
   RemoveDeadBlock(MBB);
   MadeChange = true;
   ++NumDeadBlocks;
@@ -618,14 +618,14 @@
   // explicitly.
   if (MBB-empty()) {
 // Dead block?  Leave for cleanup later.
-if (!MBB-isAccessable()) return;
+if (MBB-pred_empty()) return;
 
 if (FallThrough == MBB-getParent()-end()) {
   // TODO: Simplify preds to not branch here if possible!
 } else {
   // Rewrite all predecessors of the old block to go to the fallthrough
   // instead.
-  while (MBB-isAccessable()) {
+  while (!MBB-pred_empty()) {
 MachineBasicBlock *Pred = *(MBB-pred_end()-1);
 ReplaceUsesOfBlockWith(Pred, MBB, FallThrough, TII);
   }



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

2007-02-22 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

MachineBasicBlock.h updated: 1.59 - 1.60
---
Log message:

Remove isAccessable.

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

 MachineBasicBlock.h |4 
 1 files changed, 4 deletions(-)


Index: llvm/include/llvm/CodeGen/MachineBasicBlock.h
diff -u llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.59 
llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.60
--- llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.59  Wed Feb 21 16:39:52 2007
+++ llvm/include/llvm/CodeGen/MachineBasicBlock.h   Thu Feb 22 10:39:03 2007
@@ -165,10 +165,6 @@
   /// this basic block is entered via an exception handler.
   void setIsLandingPad() { IsLandingPad = true; }
 
-  /// isAccessable - Returns true if the block is alive.  That is, if it has
-  /// predecessors or is an eh landing pad.
-  bool isAccessable() const { return !pred_empty() || isLandingPad(); }
-
   // Code Layout methods.
   
   /// moveBefore/moveAfter - move 'this' block before or after the specified



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

2007-02-22 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

MachineModuleInfo.h updated: 1.5 - 1.6
---
Log message:

Typo.

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

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


Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h
diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.5 
llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.6
--- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.5   Wed Feb 21 16:38:31 2007
+++ llvm/include/llvm/CodeGen/MachineModuleInfo.h   Thu Feb 22 10:40:10 2007
@@ -1014,7 +1014,7 @@
   // in the current function.
   std::vectorLandingPadInfo LandingPads;
   
-  // TypeInfos - List of C++ TypeInfo used in the currect function.
+  // TypeInfos - List of C++ TypeInfo used in the current function.
   //
   std::vectorGlobalVariable * TypeInfos;
 



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

2007-02-22 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen/SelectionDAG:

TargetLowering.cpp updated: 1.92 - 1.93
---
Log message:

Need to init.

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

 TargetLowering.cpp |2 ++
 1 files changed, 2 insertions(+)


Index: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.92 
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.93
--- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.92   Sat Feb 17 
00:00:35 2007
+++ llvm/lib/CodeGen/SelectionDAG/TargetLowering.cppThu Feb 22 12:04:49 2007
@@ -151,6 +151,8 @@
   IntDivIsCheap = false;
   Pow2DivIsCheap = false;
   StackPointerRegisterToSaveRestore = 0;
+  ExceptionPointerRegister = 0;
+  ExceptionSelectorRegister = 0;
   SchedPreferenceInfo = SchedulingForLatency;
   JumpBufSize = 0;
   JumpBufAlignment = 0;



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


[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp

2007-02-22 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

DwarfWriter.cpp updated: 1.126 - 1.127
---
Log message:

Missing end of abbreviations.

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

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


Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.126 
llvm/lib/CodeGen/DwarfWriter.cpp:1.127
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.126  Wed Feb 21 16:48:45 2007
+++ llvm/lib/CodeGen/DwarfWriter.cppThu Feb 22 12:22:42 2007
@@ -2104,6 +2104,9 @@
 Asm-EOL();
   }
   
+  // Mark end of abbreviations.
+  DD.getAsm()-EmitULEB128Bytes(0); DD.getAsm()-EOL(EOM(3));
+
   EmitLabel(abbrev_end, 0);
 
   Asm-EOL();



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


[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp

2007-02-22 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

DwarfWriter.cpp updated: 1.127 - 1.128
---
Log message:

Missing end of abbreviations - correction

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

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


Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.127 
llvm/lib/CodeGen/DwarfWriter.cpp:1.128
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.127  Thu Feb 22 12:22:42 2007
+++ llvm/lib/CodeGen/DwarfWriter.cppThu Feb 22 12:48:52 2007
@@ -2105,7 +2105,7 @@
   }
   
   // Mark end of abbreviations.
-  DD.getAsm()-EmitULEB128Bytes(0); DD.getAsm()-EOL(EOM(3));
+  Asm-EmitULEB128Bytes(0); Asm-EOL(EOM(3));
 
   EmitLabel(abbrev_end, 0);
 



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


[llvm-commits] CVS: llvm/lib/CodeGen/IntrinsicLowering.cpp

2007-02-22 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

IntrinsicLowering.cpp updated: 1.69 - 1.70
---
Log message:

Update comment.

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

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


Index: llvm/lib/CodeGen/IntrinsicLowering.cpp
diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.69 
llvm/lib/CodeGen/IntrinsicLowering.cpp:1.70
--- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.69 Thu Feb 22 10:12:17 2007
+++ llvm/lib/CodeGen/IntrinsicLowering.cpp  Thu Feb 22 12:51:19 2007
@@ -358,7 +358,7 @@
   case Intrinsic::dbg_declare:
   case Intrinsic::eh_exception:
   case Intrinsic::eh_handlers:
-break;// Simply strip out debugging intrinsics
+break;// Simply strip out debugging and eh intrinsics
 
   case Intrinsic::memcpy_i32:
   case Intrinsic::memcpy_i64: {



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


[llvm-commits] CVS: llvm/include/llvm/Intrinsics.td

2007-02-21 Thread Jim Laskey


Changes in directory llvm/include/llvm:

Intrinsics.td updated: 1.46 - 1.47
---
Log message:

Add new intrinsics for eh support.

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

 Intrinsics.td |4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/Intrinsics.td
diff -u llvm/include/llvm/Intrinsics.td:1.46 
llvm/include/llvm/Intrinsics.td:1.47
--- llvm/include/llvm/Intrinsics.td:1.46Wed Feb 14 20:26:09 2007
+++ llvm/include/llvm/Intrinsics.td Wed Feb 21 16:35:57 2007
@@ -232,7 +232,9 @@
 //===-- Exception Handling 
Intrinsics--===//
 //
 def int_eh_exception : Intrinsic[llvm_ptr_ty];
-def int_eh_handlers : Intrinsic[llvm_i32_ty, llvm_ptr_ty, llvm_vararg_ty];
+def int_eh_handlers  : Intrinsic[llvm_i32_ty, llvm_ptr_ty, llvm_ptr_ty,
+   llvm_vararg_ty];
+def int_eh_typeid_for : Intrinsic[llvm_i32_ty, llvm_ptr_ty];
 
 
//===--===//
 // Target-specific intrinsics



___
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-02-21 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.177 - 1.178
---
Log message:

Add new instructions for handling data passed into eh landing pad.

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

 SelectionDAGNodes.h |   10 +-
 1 files changed, 9 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.177 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.178
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.177 Wed Feb 14 21:39:17 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Wed Feb 21 16:37:22 2007
@@ -91,6 +91,14 @@
 // to the current function's frame or return address, an index of one to 
the
 // parent's frame or return address, and so on.
 FRAMEADDR, RETURNADDR,
+
+// RESULT, OUTCHAIN = EXCEPTIONADDR(INCHAIN) - This node represents the
+// address of the exception block on entry to an landing pad block.
+EXCEPTIONADDR,
+
+// RESULT, OUTCHAIN = EHSELECTION(INCHAIN, EXCEPTION) - This node 
represents
+// the selection index of the exception thrown.
+EHSELECTION,
 
 // TargetConstant* - Like Constant*, but the DAG does not do any folding or
 // simplification of the constant.
@@ -457,7 +465,7 @@
 //   Operand #0 : input chain.
 //   Operand #1 : module unique number use to identify the label.
 LABEL,
-
+
 // STACKSAVE - STACKSAVE has one operand, an input chain.  It produces a
 // value, the same type as the pointer type for the system, and an output
 // chain.



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

2007-02-21 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

MachineModuleInfo.h updated: 1.4 - 1.5
---
Log message:

Add structures used for collecting eh information.

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

 MachineModuleInfo.h |   78 
 1 files changed, 78 insertions(+)


Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h
diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.4 
llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.5
--- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.4   Thu Feb  1 10:31:34 2007
+++ llvm/include/llvm/CodeGen/MachineModuleInfo.h   Wed Feb 21 16:38:31 2007
@@ -44,6 +44,7 @@
 class Constant;
 class DebugInfoDesc;
 class GlobalVariable;
+class MachineBasicBlock;
 class MachineFunction;
 class MachineMove;
 class Module;
@@ -949,6 +950,27 @@
 };
 
 
//===--===//
+/// LandingPadInfo - This structure is used to retain landing pad info for
+/// the current function.
+///
+struct LandingPadInfo {
+  MachineBasicBlock *LandingPadBlock;   // Landing pad block.
+  unsigned BeginLabel;  // Label prior to invoke.
+  unsigned EndLabel;// Label after invoke.
+  unsigned LandingPadLabel; // Label at beginning of landing pad.
+  Function *Personality;// Personality function.
+  std::vectorunsigned TypeIds;// List of type ids.
+  
+  LandingPadInfo(MachineBasicBlock *MBB)
+  : LandingPadBlock(MBB)
+  , BeginLabel(0)
+  , EndLabel(0)
+  , LandingPadLabel(0)
+  , TypeIds()
+  {}
+};
+
+//===--===//
 /// MachineModuleInfo - This class contains meta information specific to a
 /// module.  Queries can be made by different debugging and exception handling 
 /// schemes and reformated for specific use.
@@ -987,6 +1009,14 @@
   // FrameMoves - List of moves done by a function's prolog.  Used to construct
   // frame maps by debug and exception handling consumers.
   std::vectorMachineMove FrameMoves;
+  
+  // LandingPads - List of LandingPadInfo describing the landing pad 
information
+  // in the current function.
+  std::vectorLandingPadInfo LandingPads;
+  
+  // TypeInfos - List of C++ TypeInfo used in the currect function.
+  //
+  std::vectorGlobalVariable * TypeInfos;
 
 public:
   MachineModuleInfo();
@@ -1147,6 +1177,54 @@
   /// function's prologue.  Used to construct frame maps for debug and 
exception
   /// handling comsumers.
   std::vectorMachineMove getFrameMoves() { return FrameMoves; }
+  
+  
//===-EH-===//
+
+  /// getOrCreateLandingPadInfo - Find or create an LandingPadInfo for the
+  /// specified MachineBasicBlock.
+  LandingPadInfo getOrCreateLandingPadInfo(MachineBasicBlock *LandingPad);
+
+  /// addInvoke - Provide the begin and end labels of an invoke style call and
+  /// associate it with a try landing pad block.
+  void addInvoke(MachineBasicBlock *LandingPad, unsigned BeginLabel,
+unsigned EndLabel);
+  
+  /// addLandingPad - Add a new panding pad.  Returns the label ID for the 
+  /// landing pad entry.
+  unsigned addLandingPad(MachineBasicBlock *LandingPad);
+  
+  /// addPersonality - Provide the personality function for the exception
+  /// information.
+  void addPersonality(MachineBasicBlock *LandingPad, Function *Personality);
+  
+  /// addCatchTypeInfo - Provide the catch typeinfo for a landing pad.
+  ///
+  void addCatchTypeInfo(MachineBasicBlock *LandingPad,
+std::vectorGlobalVariable * TyInfo);
+
+  /// getTypeIDFor - Return the type id for the specified typeinfo.  This is 
+  /// function wide.
+  unsigned getTypeIDFor(GlobalVariable *TI);
+  
+  /// TidyLandingPads - Remap landing pad labels and remove any deleted landing
+  /// pads.
+  void TidyLandingPads();
+
+  /// getLandingPadInfos - Return a reference to the landing pad info for the
+  /// current function.
+  const std::vectorLandingPadInfo getLandingPads() const {
+return LandingPads;
+  }
+  
+  /// getTypeInfos - Return a reference to the C++ typeinfo for the current
+  /// function.
+  const std::vectorGlobalVariable * getTypeInfos() const {
+return TypeInfos;
+  }
+  
+  /// getPersonality - Return a personality function if available.  The 
presence
+  /// of one is required to emit exception handling info.
+  Function *getPersonality() const;
 
 }; // End class MachineModuleInfo
 



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


[llvm-commits] CVS: llvm/lib/CodeGen/MachineModuleInfo.cpp

2007-02-21 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

MachineModuleInfo.cpp updated: 1.3 - 1.4
---
Log message:

Add structures used for collecting eh information.

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

 MachineModuleInfo.cpp |   94 ++
 1 files changed, 94 insertions(+)


Index: llvm/lib/CodeGen/MachineModuleInfo.cpp
diff -u llvm/lib/CodeGen/MachineModuleInfo.cpp:1.3 
llvm/lib/CodeGen/MachineModuleInfo.cpp:1.4
--- llvm/lib/CodeGen/MachineModuleInfo.cpp:1.3  Thu Feb  1 10:31:34 2007
+++ llvm/lib/CodeGen/MachineModuleInfo.cpp  Wed Feb 21 16:38:31 2007
@@ -1472,6 +1472,7 @@
 , ScopeMap()
 , RootScope(NULL)
 , FrameMoves()
+, LandingPads()
 {}
 MachineModuleInfo::~MachineModuleInfo() {
 
@@ -1510,6 +1511,10 @@
 
   // Clean up frame info.
   FrameMoves.clear();
+  
+  // Clean up exception info.
+  LandingPads.clear();
+  TypeInfos.clear();
 }
 
 /// getDescFor - Convert a Value to a debug information descriptor.
@@ -1640,6 +1645,95 @@
   return Slot;
 }
 
+//===-EH---===//
+
+/// getOrCreateLandingPadInfo - Find or create an LandingPadInfo for the
+/// specified MachineBasicBlock.
+LandingPadInfo MachineModuleInfo::getOrCreateLandingPadInfo
+(MachineBasicBlock *LandingPad) {
+  unsigned N = LandingPads.size();
+  for (unsigned i = 0; i  N; ++i) {
+LandingPadInfo UI = LandingPads[i];
+if (UI.LandingPadBlock == LandingPad)
+  return UI;
+  }
+  
+  LandingPads.push_back(LandingPadInfo(LandingPad));
+  return LandingPads[N];
+}
+
+/// addInvoke - Provide the begin and end labels of an invoke style call and
+/// associate it with a try landing pad block.
+void MachineModuleInfo::addInvoke(MachineBasicBlock *LandingPad,
+  unsigned BeginLabel, unsigned EndLabel) {
+  LandingPadInfo UI = getOrCreateLandingPadInfo(LandingPad);
+  if (!UI.BeginLabel) UI.BeginLabel = BeginLabel;  
+  UI.EndLabel = EndLabel;  
+}
+
+/// addLandingPad - Provide the label of a try LandingPad block.
+///
+unsigned MachineModuleInfo::addLandingPad(MachineBasicBlock *LandingPad) {
+  unsigned LandingPadLabel = NextLabelID();
+  LandingPadInfo UI = getOrCreateLandingPadInfo(LandingPad);
+  UI.LandingPadLabel = LandingPadLabel;  
+  return LandingPadLabel;
+}
+
+/// addPersonality - Provide the personality function for the exception
+/// information.
+void MachineModuleInfo::addPersonality(MachineBasicBlock *LandingPad,
+   Function *Personality) {
+  LandingPadInfo UI = getOrCreateLandingPadInfo(LandingPad);
+  UI.Personality = Personality;
+}
+
+/// addCatchTypeInfo - Provide the catch typeinfo for a landing pad.
+///
+void MachineModuleInfo::addCatchTypeInfo(MachineBasicBlock *LandingPad,
+std::vectorGlobalVariable * TyInfo) 
{
+  LandingPadInfo UI = getOrCreateLandingPadInfo(LandingPad);
+  for (unsigned N = TyInfo.size(); N; --N)
+UI.TypeIds.push_back(getTypeIDFor(TyInfo[N - 1]));
+}
+
+/// TidyLandingPads - Remap landing pad labels and remove any deleted landing
+/// pads.
+void MachineModuleInfo::TidyLandingPads() {
+  for (unsigned i = 0; i != LandingPads.size(); ) {
+LandingPadInfo LandingPad = LandingPads[i];
+LandingPad.BeginLabel = MappedLabel(LandingPad.BeginLabel);
+LandingPad.EndLabel = MappedLabel(LandingPad.EndLabel);
+LandingPad.LandingPadLabel = MappedLabel(LandingPad.LandingPadLabel);
+
+if (!LandingPad.BeginLabel ||
+!LandingPad.EndLabel ||
+!LandingPad.LandingPadLabel) {
+  LandingPads.erase(LandingPads.begin() + i);
+  continue;
+}
+
+++i;
+  }
+}
+
+/// getTypeIDFor - Return the type id for the specified typeinfo.  This is 
+/// function wide.
+unsigned MachineModuleInfo::getTypeIDFor(GlobalVariable *TI) {
+  for (unsigned i = 0, N = TypeInfos.size(); i != N; ++i)
+if (TypeInfos[i] == TI) return i + 1;
+
+  TypeInfos.push_back(TI);
+  return TypeInfos.size();
+}
+
+/// getLandingPadInfos - Return a reference to the landing pad info for the
+/// current function.
+Function *MachineModuleInfo::getPersonality() const {
+  return !LandingPads.empty() ? LandingPads[0].Personality : NULL;
+}
+
+
 
//===--===//
 /// DebugLabelFolding pass - This pass prunes out redundant labels.  This 
allows
 /// a info consumer to determine if the range of two labels is empty, by seeing



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


[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp

2007-02-21 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

LiveIntervalAnalysis.cpp updated: 1.210 - 1.211
---
Log message:

Allow for live in registers for eh landing pads.

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

 LiveIntervalAnalysis.cpp |   11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)


Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.210 
llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.211
--- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.210 Tue Feb 20 20:27:39 2007
+++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp   Wed Feb 21 16:41:17 2007
@@ -658,14 +658,15 @@
 }
 
 void LiveIntervals::handleLiveInRegister(MachineBasicBlock *MBB,
+ unsigned MIIdx,
  LiveInterval interval) {
   DOUT  \t\tlivein register: ; DEBUG(printRegName(interval.reg));
 
   // Look for kills, if it reaches a def before it's killed, then it shouldn't
   // be considered a livein.
   MachineBasicBlock::iterator mi = MBB-begin();
-  unsigned baseIndex = 0;
-  unsigned start = 0;
+  unsigned baseIndex = MIIdx;
+  unsigned start = baseIndex;
   unsigned end = start;
   while (mi != MBB-end()) {
 if (lv_-KillsRegister(mi, interval.reg)) {
@@ -690,8 +691,8 @@
   assert(start  end  did not find end of interval?);
 
   LiveRange LR(start, end, interval.getNextValue(~0U, 0));
-  interval.addRange(LR);
   DOUT   +  LR  '\n';
+  interval.addRange(LR);
 }
 
 /// computeIntervals - computes the live intervals for virtual
@@ -715,9 +716,9 @@
   // Create intervals for live-ins to this BB first.
   for (MachineBasicBlock::const_livein_iterator LI = MBB-livein_begin(),
  LE = MBB-livein_end(); LI != LE; ++LI) {
-handleLiveInRegister(MBB, getOrCreateInterval(*LI));
+handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*LI));
 for (const unsigned* AS = mri_-getAliasSet(*LI); *AS; ++AS)
-  handleLiveInRegister(MBB, getOrCreateInterval(*AS));
+  handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*AS));
   }
 }
 



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

2007-02-21 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

LiveIntervalAnalysis.h updated: 1.71 - 1.72
---
Log message:

Allow for live in registers for eh landing pads.

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

 LiveIntervalAnalysis.h |4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
diff -u llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.71 
llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.72
--- llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.71   Mon Feb 19 
15:49:53 2007
+++ llvm/include/llvm/CodeGen/LiveIntervalAnalysis.hWed Feb 21 16:41:17 2007
@@ -240,7 +240,9 @@
unsigned SrcReg);
 
 /// handleLiveInRegister - Create interval for a livein register.
-void handleLiveInRegister(MachineBasicBlock* mbb, LiveInterval interval);
+void handleLiveInRegister(MachineBasicBlock* mbb,
+  unsigned MIIdx,
+  LiveInterval interval);
 
 /// Return true if the two specified registers belong to different
 /// register classes.  The registers may be either phys or virt regs.



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

2007-02-21 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

MachineBasicBlock.h updated: 1.58 - 1.59
---
Log message:

Add a flag to MBBs to indicate whether it is an eh  landing pad.

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

 MachineBasicBlock.h |   19 ++-
 1 files changed, 18 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/MachineBasicBlock.h
diff -u llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.58 
llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.59
--- llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.58  Mon Feb 19 15:49:53 2007
+++ llvm/include/llvm/CodeGen/MachineBasicBlock.h   Wed Feb 21 16:39:52 2007
@@ -74,10 +74,15 @@
   /// LiveIns - Keep track of the physical registers that are livein of
   /// the basicblock.
   std::vectorunsigned LiveIns;
+  
+  /// IsLandingPad - Indicate that this basic block is entered via an
+  /// exception handler.
+  bool IsLandingPad;
 
 public:
   MachineBasicBlock(const BasicBlock *bb = 0) : Prev(0), Next(0), BB(bb),
-Number(-1), Parent(0) {
+Number(-1), Parent(0),
+IsLandingPad(false) {
 Insts.parent = this;
   }
 
@@ -152,6 +157,18 @@
   const_livein_iterator livein_end()   const { return LiveIns.end(); }
   boollivein_empty() const { return LiveIns.empty(); }
 
+  /// isLandingPad - Returns true if the block is a landing pad. That is
+  /// this basic block is entered via an exception handler.
+  bool isLandingPad() const { return IsLandingPad; }
+
+  /// setIsLandingPad - Indicates the block is a landing pad.  That is
+  /// this basic block is entered via an exception handler.
+  void setIsLandingPad() { IsLandingPad = true; }
+
+  /// isAccessable - Returns true if the block is alive.  That is, if it has
+  /// predecessors or is an eh landing pad.
+  bool isAccessable() const { return !pred_empty() || isLandingPad(); }
+
   // Code Layout methods.
   
   /// moveBefore/moveAfter - move 'this' block before or after the specified



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


[llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp

2007-02-21 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

BranchFolding.cpp updated: 1.42 - 1.43
---
Log message:

Make branch folding behave in the presence of landing pads.

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

 BranchFolding.cpp |   55 +-
 1 files changed, 30 insertions(+), 25 deletions(-)


Index: llvm/lib/CodeGen/BranchFolding.cpp
diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.42 
llvm/lib/CodeGen/BranchFolding.cpp:1.43
--- llvm/lib/CodeGen/BranchFolding.cpp:1.42 Fri Feb 16 18:44:34 2007
+++ llvm/lib/CodeGen/BranchFolding.cpp  Wed Feb 21 16:42:20 2007
@@ -67,7 +67,8 @@
 /// RemoveDeadBlock - Remove the specified dead machine basic block from the
 /// function, updating the CFG.
 void BranchFolder::RemoveDeadBlock(MachineBasicBlock *MBB) {
-  assert(MBB-pred_empty()  MBB must be dead!);
+  assert(!MBB-isAccessable()  MBB must be dead!);
+  DOUT  \nRemoving MBB:   *MBB;
   
   MachineFunction *MF = MBB-getParent();
   // drop all successors.
@@ -439,7 +440,7 @@
 OptimizeBlock(MBB);
 
 // If it is dead, remove it.
-if (MBB-pred_empty()) {
+if (!MBB-isAccessable()) {
   RemoveDeadBlock(MBB);
   MadeChange = true;
   ++NumDeadBlocks;
@@ -485,6 +486,8 @@
 } else if (*SI == DestB) {
   DestB = 0;
   ++SI;
+} else if ((*SI)-isLandingPad()) {
+  ++SI;
 } else {
   // Otherwise, this is a superfluous edge, remove it.
   MBB.removeSuccessor(SI);
@@ -615,14 +618,14 @@
   // explicitly.
   if (MBB-empty()) {
 // Dead block?  Leave for cleanup later.
-if (MBB-pred_empty()) return;
+if (!MBB-isAccessable()) return;
 
 if (FallThrough == MBB-getParent()-end()) {
   // TODO: Simplify preds to not branch here if possible!
 } else {
   // Rewrite all predecessors of the old block to go to the fallthrough
   // instead.
-  while (!MBB-pred_empty()) {
+  while (MBB-isAccessable()) {
 MachineBasicBlock *Pred = *(MBB-pred_end()-1);
 ReplaceUsesOfBlockWith(Pred, MBB, FallThrough, TII);
   }
@@ -855,28 +858,30 @@
 bool CurFallsThru = CanFallThrough(MBB, CurUnAnalyzable, CurTBB, CurFBB, 
 CurCond);
 
-// Check all the predecessors of this block.  If one of them has no fall
-// throughs, move this block right after it.
-for (MachineBasicBlock::pred_iterator PI = MBB-pred_begin(),
- E = MBB-pred_end(); PI != E; ++PI) {
-  // Analyze the branch at the end of the pred.
-  MachineBasicBlock *PredBB = *PI;
-  MachineFunction::iterator PredFallthrough = PredBB; ++PredFallthrough;
-  if (PredBB != MBB  !CanFallThrough(PredBB)
-   (!CurFallsThru || MBB-getNumber() = PredBB-getNumber())) {
-// If the current block doesn't fall through, just move it.
-// If the current block can fall through and does not end with a
-// conditional branch, we need to append an unconditional jump to 
-// the (current) next block.  To avoid a possible compile-time
-// infinite loop, move blocks only backward in this case.
-if (CurFallsThru) {
-  MachineBasicBlock *NextBB = next(MachineFunction::iterator(MBB));
-  CurCond.clear();
-  TII-InsertBranch(*MBB, NextBB, 0, CurCond);
+if (!MBB-isLandingPad()) {
+  // Check all the predecessors of this block.  If one of them has no fall
+  // throughs, move this block right after it.
+  for (MachineBasicBlock::pred_iterator PI = MBB-pred_begin(),
+   E = MBB-pred_end(); PI != E; ++PI) {
+// Analyze the branch at the end of the pred.
+MachineBasicBlock *PredBB = *PI;
+MachineFunction::iterator PredFallthrough = PredBB; ++PredFallthrough;
+if (PredBB != MBB  !CanFallThrough(PredBB)
+ (!CurFallsThru || MBB-getNumber() = PredBB-getNumber())) {
+  // If the current block doesn't fall through, just move it.
+  // If the current block can fall through and does not end with a
+  // conditional branch, we need to append an unconditional jump to 
+  // the (current) next block.  To avoid a possible compile-time
+  // infinite loop, move blocks only backward in this case.
+  if (CurFallsThru) {
+MachineBasicBlock *NextBB = next(MachineFunction::iterator(MBB));
+CurCond.clear();
+TII-InsertBranch(*MBB, NextBB, 0, CurCond);
+  }
+  MBB-moveAfter(PredBB);
+  MadeChange = true;
+  return OptimizeBlock(MBB);
 }
-MBB-moveAfter(PredBB);
-MadeChange = true;
-return OptimizeBlock(MBB);
   }
 }
 



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


[llvm-commits] CVS: llvm/include/llvm/Target/TargetAsmInfo.h

2007-02-21 Thread Jim Laskey


Changes in directory llvm/include/llvm/Target:

TargetAsmInfo.h updated: 1.25 - 1.26
---
Log message:

Add TAI field for exception table section.

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

 TargetAsmInfo.h |8 
 1 files changed, 8 insertions(+)


Index: llvm/include/llvm/Target/TargetAsmInfo.h
diff -u llvm/include/llvm/Target/TargetAsmInfo.h:1.25 
llvm/include/llvm/Target/TargetAsmInfo.h:1.26
--- llvm/include/llvm/Target/TargetAsmInfo.h:1.25   Thu Feb  1 10:31:34 2007
+++ llvm/include/llvm/Target/TargetAsmInfo.hWed Feb 21 16:43:40 2007
@@ -313,6 +313,11 @@
 /// DwarfEHFrameSection - Section directive for Exception frames.
 ///
 const char *DwarfEHFrameSection; // Defaults to .eh_frame.
+
+/// DwarfExceptionSection - Section directive for Exception table.
+///
+const char *DwarfExceptionSection; // Defaults to .gcc_except_table.
+ 
 
 //===--- CBE Asm Translation Table ---===//
 
@@ -540,6 +545,9 @@
 const char *getDwarfEHFrameSection() const {
   return DwarfEHFrameSection;
 }
+const char *getDwarfExceptionSection() const {
+  return DwarfExceptionSection;
+}
 const char** getAsmCBE() const {
   return AsmTransCBE;
 }



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


[llvm-commits] CVS: llvm/lib/Target/TargetAsmInfo.cpp

2007-02-21 Thread Jim Laskey


Changes in directory llvm/lib/Target:

TargetAsmInfo.cpp updated: 1.18 - 1.19
---
Log message:

Add TAI field for exception table section.

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

 TargetAsmInfo.cpp |1 +
 1 files changed, 1 insertion(+)


Index: llvm/lib/Target/TargetAsmInfo.cpp
diff -u llvm/lib/Target/TargetAsmInfo.cpp:1.18 
llvm/lib/Target/TargetAsmInfo.cpp:1.19
--- llvm/lib/Target/TargetAsmInfo.cpp:1.18  Thu Feb  1 10:31:34 2007
+++ llvm/lib/Target/TargetAsmInfo.cpp   Wed Feb 21 16:43:40 2007
@@ -86,6 +86,7 @@
   DwarfRangesSection(.debug_ranges),
   DwarfMacInfoSection(.debug_macinfo),
   DwarfEHFrameSection(.eh_frame),
+  DwarfExceptionSection(.gcc_except_table),
   AsmTransCBE(0) {
 }
 



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


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp

2007-02-21 Thread Jim Laskey


Changes in directory llvm/lib/Target/PowerPC:

PPCTargetAsmInfo.cpp updated: 1.17 - 1.18
---
Log message:

Add TAI field for exception table section.

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

 PPCTargetAsmInfo.cpp |1 +
 1 files changed, 1 insertion(+)


Index: llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.17 
llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.18
--- llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.17   Thu Feb  1 10:31:34 2007
+++ llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cppWed Feb 21 16:43:40 2007
@@ -43,6 +43,7 @@
   DwarfMacInfoSection = .section __DWARF,__debug_macinfo,regular,debug;
   DwarfEHFrameSection =
   .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support;
+  DwarfExceptionSection = .section __DATA,__gcc_except_tab;
 }
 
 DarwinTargetAsmInfo::DarwinTargetAsmInfo(const PPCTargetMachine TM)



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


[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp

2007-02-21 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

AsmPrinter.cpp updated: 1.151 - 1.152
---
Log message:

Add support for changes in DwarfWriter.

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

 AsmPrinter.cpp |   12 
 1 files changed, 12 insertions(+)


Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.151 
llvm/lib/CodeGen/AsmPrinter.cpp:1.152
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.151   Thu Feb 15 19:54:53 2007
+++ llvm/lib/CodeGen/AsmPrinter.cpp Wed Feb 21 16:47:38 2007
@@ -370,6 +370,14 @@
   return LinkName;
 }
 
+/// EmitExternalGlobal - Emit the external reference to a global variable.
+/// Should be overridden if an indirect reference should be used.
+void AsmPrinter::EmitExternalGlobal(const GlobalVariable *GV) {
+  O  getGlobalLinkName(GV);
+}
+
+
+
 
//===--===//
 /// LEB 128 number encoding.
 
@@ -440,6 +448,9 @@
 
 /// EOL - Print a newline character to asm stream.  If a comment is present
 /// then it will be printed first.  Comments should not contain '\n'.
+void AsmPrinter::EOL() const {
+  O  \n;
+}
 void AsmPrinter::EOL(const std::string Comment) const {
   if (AsmVerbose  !Comment.empty()) {
 O  \t
@@ -569,6 +580,7 @@
   O  TAI-getAlignDirective()  NumBits  \n;
 }
 
+
 /// EmitZeros - Emit a block of zeros.
 ///
 void AsmPrinter::EmitZeros(uint64_t NumZeros) const {



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


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

2007-02-21 Thread Jim Laskey


Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.233 - 1.234
---
Log message:

Add support for changes in DwarfWriter.

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

 PPCAsmPrinter.cpp |   14 ++
 1 files changed, 14 insertions(+)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.233 
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.234
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.233 Wed Jan 31 18:39:08 2007
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp   Wed Feb 21 16:47:38 2007
@@ -280,6 +280,8 @@
 
 virtual bool runOnMachineFunction(MachineFunction F) = 0;
 virtual bool doFinalization(Module M) = 0;
+
+virtual void EmitExternalGlobal(const GlobalVariable *GV);
   };
 
   /// LinuxAsmPrinter - PowerPC assembly printer, customized for Linux
@@ -401,6 +403,18 @@
   }
 }
 
+/// EmitExternalGlobal - In this case we need to use the indirect symbol.
+///
+void PPCAsmPrinter::EmitExternalGlobal(const GlobalVariable *GV) {
+  std::string Name = getGlobalLinkName(GV);
+  if (TM.getRelocationModel() != Reloc::Static) {
+GVStubs.insert(Name);
+O  L  Name  $non_lazy_ptr;
+return;
+  }
+  O  Name;
+}
+
 /// PrintAsmOperand - Print out an operand for an inline asm expression.
 ///
 bool PPCAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,



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

2007-02-21 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

AsmPrinter.h updated: 1.61 - 1.62
---
Log message:

Add support for changes in DwarfWriter.

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

 AsmPrinter.h |5 +
 1 files changed, 5 insertions(+)


Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.61 
llvm/include/llvm/CodeGen/AsmPrinter.h:1.62
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.61 Fri Jan 26 08:34:51 2007
+++ llvm/include/llvm/CodeGen/AsmPrinter.h  Wed Feb 21 16:47:38 2007
@@ -105,6 +105,10 @@
 /// generate the appropriate value.
 virtual const std::string getGlobalLinkName(const GlobalVariable *GV) 
const;
 
+/// EmitExternalGlobal - Emit the external reference to a global variable.
+/// Should be overridden if an indirect reference should be used.
+virtual void EmitExternalGlobal(const GlobalVariable *GV);
+
   protected:
 /// doInitialization - Set up the AsmPrinter when we are working on a new
 /// module.  If your pass overrides this, it must make sure to explicitly
@@ -204,6 +208,7 @@
 
 /// EOL - Print a newline character to asm stream.  If a comment is present
 /// then it will be printed first.  Comments should not contain '\n'.
+void EOL() const;
 void EOL(const std::string Comment) const;
 
 /// EmitULEB128Bytes - Emit an assembler byte data directive to compose an



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


[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp AsmPrinter.cpp

2007-02-21 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

DwarfWriter.cpp updated: 1.125 - 1.126
AsmPrinter.cpp updated: 1.152 - 1.153
---
Log message:

Exception handling support.

---
Diffs of the changes:  (+313 -94)

 AsmPrinter.cpp  |2 
 DwarfWriter.cpp |  405 +++-
 2 files changed, 313 insertions(+), 94 deletions(-)


Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.125 
llvm/lib/CodeGen/DwarfWriter.cpp:1.126
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.125  Thu Feb  1 11:48:20 2007
+++ llvm/lib/CodeGen/DwarfWriter.cppWed Feb 21 16:48:45 2007
@@ -55,7 +55,7 @@
 
 
//===--===//
 /// DWLabel - Labels are used to track locations in the assembler file.
-/// Labels appear in the form prefixdebug_TagNumber, where the tag is a
+/// Labels appear in the form prefixTagNumber, where the tag is a
 /// category of label (Ex. location) and number is a value unique in that
 /// category.
 class DWLabel {
@@ -80,7 +80,7 @@
 if (O) print(*O);
   }
   void print(std::ostream O) const {
-O  .debug_  Tag;
+O  .  Tag;
 if (Number) O  Number;
   }
 #endif
@@ -791,14 +791,6 @@
   ///
   MachineModuleInfo *MMI;
   
-  /// didInitial - Flag to indicate if initial emission has been done.
-  ///
-  bool didInitial;
-  
-  /// shouldEmit - Flag to indicate if debug information should be emitted.
-  ///
-  bool shouldEmit;
-  
   /// SubprogramCount - The running count of functions being compiled.
   ///
   unsigned SubprogramCount;
@@ -812,8 +804,6 @@
   , M(NULL)
   , MF(NULL)
   , MMI(NULL)
-  , didInitial(false)
-  , shouldEmit(false)
   , SubprogramCount(0)
   {
   }
@@ -827,20 +817,13 @@
   MachineModuleInfo *getMMI() const { return MMI; }
   const TargetAsmInfo *getTargetAsmInfo() const { return TAI; }
 
-  /// ShouldEmitDwarf - Returns true if Dwarf declarations should be made.
-  ///
-  bool ShouldEmitDwarf() const { return shouldEmit; }
-
-
   /// PrintLabelName - Print label name in form used by Dwarf writer.
   ///
   void PrintLabelName(DWLabel Label) const {
 PrintLabelName(Label.Tag, Label.Number);
   }
   void PrintLabelName(const char *Tag, unsigned Number) const {
-O  TAI-getPrivateGlobalPrefix()
-   ((Tag  *Tag) ? debug_ : label_)
-   Tag;
+O  TAI-getPrivateGlobalPrefix()  Tag;
 if (Number) O  Number;
   }
   
@@ -932,7 +915,7 @@
 Asm-TM.getFrameInfo()-getStackGrowthDirection() ==
   TargetFrameInfo::StackGrowsUp ?
 TAI-getAddressSize() : -TAI-getAddressSize();
-bool IsLocal = BaseLabel  strcmp(BaseLabel, ) == 0;
+bool IsLocal = BaseLabel  strcmp(BaseLabel, label) == 0;
 
 for (unsigned i = 0, N = Moves.size(); i  N; ++i) {
   MachineMove Move = Moves[i];
@@ -952,11 +935,11 @@
   if (BaseLabel  LabelID  (BaseLabelID != LabelID || !IsLocal)) {
 Asm-EmitInt8(DW_CFA_advance_loc4);
 Asm-EOL(DW_CFA_advance_loc4);
-EmitDifference(, LabelID, BaseLabel, BaseLabelID, true);
-Asm-EOL();
+EmitDifference(label, LabelID, BaseLabel, BaseLabelID, true);
+Asm-EOL();
 
 BaseLabelID = LabelID;
-BaseLabel = ;
+BaseLabel = label;
 IsLocal = true;
   }
   
@@ -1066,8 +1049,19 @@
   ///
   std::vectorstd::vectorSourceLineInfo  SectionSourceLines;
 
+  /// didInitial - Flag to indicate if initial emission has been done.
+  ///
+  bool didInitial;
+  
+  /// shouldEmit - Flag to indicate if debug information should be emitted.
+  ///
+  bool shouldEmit;
 
 public:
+  
+  /// ShouldEmitDwarf - Returns true if Dwarf declarations should be made.
+  ///
+  bool ShouldEmitDwarf() const { return shouldEmit; }
 
   /// AssignAbbrevNumber - Define a unique number for the abbreviation.
   ///  
@@ -1850,14 +1844,14 @@
 // Add the scope bounds.
 if (StartID) {
   AddLabel(ScopeDie, DW_AT_low_pc, DW_FORM_addr,
- DWLabel(, StartID));
+ DWLabel(label, StartID));
 } else {
   AddLabel(ScopeDie, DW_AT_low_pc, DW_FORM_addr,
  DWLabel(func_begin, SubprogramCount));
 }
 if (EndID) {
   AddLabel(ScopeDie, DW_AT_high_pc, DW_FORM_addr,
- DWLabel(, EndID));
+ DWLabel(label, EndID));
 } else {
   AddLabel(ScopeDie, DW_AT_high_pc, DW_FORM_addr,
  DWLabel(func_end, SubprogramCount));
@@ -1944,7 +1938,7 @@
 unsigned AbbrevNumber = Die-getAbbrevNumber();
 const DIEAbbrev *Abbrev = Abbreviations[AbbrevNumber - 1];
 
-Asm-EOL();
+Asm-EOL();
 
 // Emit the code (index) for the abbreviation.
 Asm-EmitULEB128Bytes(AbbrevNumber);
@@ -2082,7 +2076,7 @@
 Asm-EmitInt8(0); Asm-EOL(Extra Pad For GDB);
 EmitLabel(info_end, Unit-getID());
 
-Asm-EOL();
+

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

2007-02-21 Thread Jim Laskey


Changes in directory llvm/lib/Transforms/Utils:

LowerInvoke.cpp updated: 1.55 - 1.56
---
Log message:

Itanium ABI exception handing support.

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

 LowerInvoke.cpp |   86 
 1 files changed, 50 insertions(+), 36 deletions(-)


Index: llvm/lib/Transforms/Utils/LowerInvoke.cpp
diff -u llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.55 
llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.56
--- llvm/lib/Transforms/Utils/LowerInvoke.cpp:1.55  Mon Feb 19 01:34:47 2007
+++ llvm/lib/Transforms/Utils/LowerInvoke.cpp   Wed Feb 21 16:49:50 2007
@@ -57,6 +57,9 @@
 
 static cl::optbool ExpensiveEHSupport(enable-correct-eh-support,
  cl::desc(Make the -lowerinvoke pass insert expensive, but correct, EH 
code));
+ 
+static cl::optbool ItaniumEHSupport(enable-real-eh-support,
+ cl::desc(Make the -lowerinvoke pass insert itanium ABI EH code));
 
 namespace {
   class VISIBILITY_HIDDEN LowerInvoke : public FunctionPass {
@@ -94,6 +97,7 @@
 void splitLiveRangesLiveAcrossInvokes(std::vectorInvokeInst* Invokes);
 void rewriteExpensiveInvoke(InvokeInst *II, unsigned InvokeNo,
 AllocaInst *InvokeNum, SwitchInst 
*CatchSwitch);
+bool insertItaniumEHSupport(Function F);
 bool insertExpensiveEHSupport(Function F);
   };
 
@@ -111,46 +115,50 @@
 // doInitialization - Make sure that there is a prototype for abort in the
 // current module.
 bool LowerInvoke::doInitialization(Module M) {
-  const Type *VoidPtrTy = PointerType::get(Type::Int8Ty);
-  AbortMessage = 0;
-  if (ExpensiveEHSupport) {
-// Insert a type for the linked list of jump buffers.
-unsigned JBSize = TLI ? TLI-getJumpBufSize() : 0;
-JBSize = JBSize ? JBSize : 200;
-const Type *JmpBufTy = ArrayType::get(VoidPtrTy, JBSize);
-
-{ // The type is recursive, so use a type holder.
-  std::vectorconst Type* Elements;
-  Elements.push_back(JmpBufTy);
-  OpaqueType *OT = OpaqueType::get();
-  Elements.push_back(PointerType::get(OT));
-  PATypeHolder JBLType(StructType::get(Elements));
-  OT-refineAbstractTypeTo(JBLType.get());  // Complete the cycle.
-  JBLinkTy = JBLType.get();
-  M.addTypeName(llvm.sjljeh.jmpbufty, JBLinkTy);
-}
+  if (ItaniumEHSupport) {
+// Let Invoke pass through for ItaniumEHSupport support.
+  } else {
+const Type *VoidPtrTy = PointerType::get(Type::Int8Ty);
+AbortMessage = 0;
+if (ExpensiveEHSupport) {
+  // Insert a type for the linked list of jump buffers.
+  unsigned JBSize = TLI ? TLI-getJumpBufSize() : 0;
+  JBSize = JBSize ? JBSize : 200;
+  const Type *JmpBufTy = ArrayType::get(VoidPtrTy, JBSize);
+
+  { // The type is recursive, so use a type holder.
+std::vectorconst Type* Elements;
+Elements.push_back(JmpBufTy);
+OpaqueType *OT = OpaqueType::get();
+Elements.push_back(PointerType::get(OT));
+PATypeHolder JBLType(StructType::get(Elements));
+OT-refineAbstractTypeTo(JBLType.get());  // Complete the cycle.
+JBLinkTy = JBLType.get();
+M.addTypeName(llvm.sjljeh.jmpbufty, JBLinkTy);
+  }
 
-const Type *PtrJBList = PointerType::get(JBLinkTy);
+  const Type *PtrJBList = PointerType::get(JBLinkTy);
 
-// Now that we've done that, insert the jmpbuf list head global, unless it
-// already exists.
-if (!(JBListHead = M.getGlobalVariable(llvm.sjljeh.jblist, PtrJBList))) {
-  JBListHead = new GlobalVariable(PtrJBList, false,
-  GlobalValue::LinkOnceLinkage,
-  Constant::getNullValue(PtrJBList),
-  llvm.sjljeh.jblist, M);
+  // Now that we've done that, insert the jmpbuf list head global, unless 
it
+  // already exists.
+  if (!(JBListHead = M.getGlobalVariable(llvm.sjljeh.jblist, 
PtrJBList))){
+JBListHead = new GlobalVariable(PtrJBList, false,
+GlobalValue::LinkOnceLinkage,
+Constant::getNullValue(PtrJBList),
+llvm.sjljeh.jblist, M);
+  }
+  SetJmpFn = M.getOrInsertFunction(llvm.setjmp, Type::Int32Ty,
+   PointerType::get(JmpBufTy), (Type *)0);
+  LongJmpFn = M.getOrInsertFunction(llvm.longjmp, Type::VoidTy,
+PointerType::get(JmpBufTy),
+Type::Int32Ty, (Type *)0);
 }
-SetJmpFn = M.getOrInsertFunction(llvm.setjmp, Type::Int32Ty,
- PointerType::get(JmpBufTy), (Type *)0);
-LongJmpFn = M.getOrInsertFunction(llvm.longjmp, Type::VoidTy,
-  PointerType::get(JmpBufTy),
-  Type::Int32Ty, (Type *)0);
-  }
 
-  // We need the 'write' and 'abort' functions for both 

[llvm-commits] CVS: llvm/lib/CodeGen/IntrinsicLowering.cpp

2007-02-21 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

IntrinsicLowering.cpp updated: 1.67 - 1.68
---
Log message:

Selection and lowering for exception handling.

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

 IntrinsicLowering.cpp |5 +
 1 files changed, 5 insertions(+)


Index: llvm/lib/CodeGen/IntrinsicLowering.cpp
diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.67 
llvm/lib/CodeGen/IntrinsicLowering.cpp:1.68
--- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.67 Tue Feb 13 00:01:22 2007
+++ llvm/lib/CodeGen/IntrinsicLowering.cpp  Wed Feb 21 16:53:45 2007
@@ -357,6 +357,11 @@
   case Intrinsic::dbg_func_start:
   case Intrinsic::dbg_declare:
 break;// Simply strip out debugging intrinsics
+
+  case Intrinsic::eh_exception:
+  case Intrinsic::eh_handlers:
+assert(0  Should not have leaked through);
+break;
 
   case Intrinsic::memcpy_i32:
   case Intrinsic::memcpy_i64: {



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

2007-02-21 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen/SelectionDAG:

LegalizeDAG.cpp updated: 1.476 - 1.477
SelectionDAG.cpp updated: 1.389 - 1.390
SelectionDAGISel.cpp updated: 1.369 - 1.370
---
Log message:

Selection and lowering for exception handling.

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

 LegalizeDAG.cpp  |2 
 SelectionDAG.cpp |2 
 SelectionDAGISel.cpp |  139 ++-
 3 files changed, 141 insertions(+), 2 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.476 
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.477
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.476 Wed Feb 14 21:39:18 2007
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp   Wed Feb 21 16:53:45 2007
@@ -668,6 +668,8 @@
 break;
   case ISD::FRAMEADDR:
   case ISD::RETURNADDR:
+  case ISD::EXCEPTIONADDR:
+  case ISD::EHSELECTION:
 // The only option for these nodes is to custom lower them.  If the target
 // does not custom lower them, then return zero.
 Tmp1 = TLI.LowerOperation(Op, DAG);


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.389 
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.390
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.389Sun Feb  4 
02:35:21 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp  Wed Feb 21 16:53:45 2007
@@ -2679,6 +2679,8 @@
   case ISD::GLOBAL_OFFSET_TABLE: return GLOBAL_OFFSET_TABLE;
   case ISD::RETURNADDR: return RETURNADDR;
   case ISD::FRAMEADDR: return FRAMEADDR;
+  case ISD::EXCEPTIONADDR: return EXCEPTIONADDR;
+  case ISD::EHSELECTION: return EHSELECTION;
   case ISD::ConstantPool:  return ConstantPool;
   case ISD::ExternalSymbol: return ExternalSymbol;
   case ISD::INTRINSIC_WO_CHAIN: {


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.369 
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.370
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.369Wed Feb 14 
21:39:18 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp  Wed Feb 21 16:53:45 2007
@@ -496,8 +496,8 @@
   void visitJumpTable(SelectionDAGISel::JumpTable JT);
   
   // These all get lowered before this pass.
-  void visitInvoke(InvokeInst I) { assert(0  TODO); }
-  void visitUnwind(UnwindInst I) { assert(0  TODO); }
+  void visitInvoke(InvokeInst I);
+  void visitUnwind(UnwindInst I);
 
   void visitScalarBinary(User I, unsigned OpCode);
   void visitVectorBinary(User I, unsigned OpCode);
@@ -1101,6 +1101,56 @@
   return;
 }
 
+void SelectionDAGLowering::visitInvoke(InvokeInst I) {
+  // Retrieve successors.
+  MachineBasicBlock *Return = FuncInfo.MBBMap[I.getSuccessor(0)];
+  MachineBasicBlock *LandingPad = FuncInfo.MBBMap[I.getSuccessor(1)];
+  
+  // Mark landing pad so that it doesn't get deleted in branch folding.
+  LandingPad-setIsLandingPad();
+  
+  // Insert a label before the invoke call to mark the try range.
+  // This can be used to detect deletion of the invoke via the
+  // MachineModuleInfo.
+  MachineModuleInfo *MMI = DAG.getMachineModuleInfo();
+  unsigned BeginLabel = MMI-NextLabelID();
+  DAG.setRoot(DAG.getNode(ISD::LABEL, MVT::Other, getRoot(),
+  DAG.getConstant(BeginLabel, MVT::i32)));
+
+  // Insert a normal call instruction.
+  std::vectorValue* Args;
+  for (InvokeInst::op_iterator OI = I.op_begin() + 3, E = I.op_end();
+   OI != E; ++OI) {
+Args.push_back(*OI);
+  }
+  CallInst *NewCall = new CallInst(I.getCalledValue(), Args[0], Args.size(),
+   I.getName(), I);
+  NewCall-setCallingConv(I.getCallingConv());
+  I.replaceAllUsesWith(NewCall);
+  visitCall(*NewCall);
+
+  // Insert a label before the invoke call to mark the try range.
+  // This can be used to detect deletion of the invoke via the
+  // MachineModuleInfo.
+  unsigned EndLabel = MMI-NextLabelID();
+  DAG.setRoot(DAG.getNode(ISD::LABEL, MVT::Other, getRoot(),
+  DAG.getConstant(EndLabel, MVT::i32)));
+  
+  // Inform MachineModuleInfo of range.
+  MMI-addInvoke(LandingPad, BeginLabel, EndLabel);
+
+  // Drop into normal successor.
+  DAG.setRoot(DAG.getNode(ISD::BR, MVT::Other, getRoot(), 
+  DAG.getBasicBlock(Return)));
+  
+  // Update successor info
+  CurMBB-addSuccessor(Return);
+  CurMBB-addSuccessor(LandingPad);
+}
+
+void SelectionDAGLowering::visitUnwind(UnwindInst I) {
+}
+
 void SelectionDAGLowering::visitSwitch(SwitchInst I) {
   // Figure out which block is immediately after the current one.
   MachineBasicBlock *NextBlock = 0;
@@ -2033,6 +2083,91 @@
 return 0;
   }
 
+  case Intrinsic::eh_exception: {
+MachineModuleInfo *MMI = DAG.getMachineModuleInfo();
+
+// Add a label to mark the beginning of the landing pad.  Deletion of the

[llvm-commits] CVS: llvm/include/llvm/Target/MRegisterInfo.h

2007-02-21 Thread Jim Laskey


Changes in directory llvm/include/llvm/Target:

MRegisterInfo.h updated: 1.94 - 1.95
---
Log message:

Support to provide exception and selector registers.

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

 MRegisterInfo.h |   10 +-
 1 files changed, 9 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/Target/MRegisterInfo.h
diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.94 
llvm/include/llvm/Target/MRegisterInfo.h:1.95
--- llvm/include/llvm/Target/MRegisterInfo.h:1.94   Mon Feb 19 15:49:53 2007
+++ llvm/include/llvm/Target/MRegisterInfo.hWed Feb 21 16:54:50 2007
@@ -469,7 +469,15 @@
   /// getRARegister - This method should return the register where the return
   /// address can be found.
   virtual unsigned getRARegister() const = 0;
-
+  
+  /// getEHExceptionRegister - This method should return the register 
containing
+  /// the address of the exception info on entry to a landing pad.
+  virtual unsigned getEHExceptionRegister() const = 0;
+  
+  /// getEHHandlerRegister - This method should return the register containing
+  /// the switch table selection on entry to an landing pad.
+  virtual unsigned getEHHandlerRegister() const = 0;
+
   /// getLocation - This method should return the actual location of a frame
   /// variable given the frame index.  The location is returned in ML.
   /// Subclasses should override this method for special handling of frame



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


[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp SparcRegisterInfo.cpp SparcRegisterInfo.h

2007-02-21 Thread Jim Laskey


Changes in directory llvm/lib/Target/Sparc:

SparcISelDAGToDAG.cpp updated: 1.119 - 1.120
SparcRegisterInfo.cpp updated: 1.54 - 1.55
SparcRegisterInfo.h updated: 1.20 - 1.21
---
Log message:

Support to provide exception and selector registers.

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

 SparcISelDAGToDAG.cpp |3 +++
 SparcRegisterInfo.cpp |   10 ++
 SparcRegisterInfo.h   |4 
 3 files changed, 17 insertions(+)


Index: llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp
diff -u llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.119 
llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.120
--- llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp:1.119   Mon Jan 29 16:58:52 2007
+++ llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp Wed Feb 21 16:54:50 2007
@@ -871,6 +871,9 @@
   // Frame  Return address.  Currently unimplemented
   case ISD::RETURNADDR: break;
   case ISD::FRAMEADDR:  break;
+  // Exception address and exception selector.  Currently unimplemented.
+  case ISD::EXCEPTIONADDR: break;
+  case ISD::EHSELECTION:   break;
   }
   return SDOperand();
 }


Index: llvm/lib/Target/Sparc/SparcRegisterInfo.cpp
diff -u llvm/lib/Target/Sparc/SparcRegisterInfo.cpp:1.54 
llvm/lib/Target/Sparc/SparcRegisterInfo.cpp:1.55
--- llvm/lib/Target/Sparc/SparcRegisterInfo.cpp:1.54Mon Feb 19 15:49:54 2007
+++ llvm/lib/Target/Sparc/SparcRegisterInfo.cpp Wed Feb 21 16:54:50 2007
@@ -250,5 +250,15 @@
   return SP::G1;
 }
 
+unsigned SparcRegisterInfo::getEHExceptionRegister() const {
+  assert(0  What is the exception register);
+  return 0;
+}
+
+unsigned SparcRegisterInfo::getEHHandlerRegister() const {
+  assert(0  What is the exception handler register);
+  return 0;
+}
+
 #include SparcGenRegisterInfo.inc
 


Index: llvm/lib/Target/Sparc/SparcRegisterInfo.h
diff -u llvm/lib/Target/Sparc/SparcRegisterInfo.h:1.20 
llvm/lib/Target/Sparc/SparcRegisterInfo.h:1.21
--- llvm/lib/Target/Sparc/SparcRegisterInfo.h:1.20  Mon Feb 19 15:49:54 2007
+++ llvm/lib/Target/Sparc/SparcRegisterInfo.h   Wed Feb 21 16:54:50 2007
@@ -70,6 +70,10 @@
   // Debug information queries.
   unsigned getRARegister() const;
   unsigned getFrameRegister(MachineFunction MF) const;
+
+  // Exception handling queries.
+  unsigned getEHExceptionRegister() const;
+  unsigned getEHHandlerRegister() const;
 };
 
 } // end namespace llvm



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


[llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelLowering.cpp IA64RegisterInfo.cpp IA64RegisterInfo.h

2007-02-21 Thread Jim Laskey


Changes in directory llvm/lib/Target/IA64:

IA64ISelLowering.cpp updated: 1.53 - 1.54
IA64RegisterInfo.cpp updated: 1.31 - 1.32
IA64RegisterInfo.h updated: 1.14 - 1.15
---
Log message:

Support to provide exception and selector registers.

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

 IA64ISelLowering.cpp |3 +++
 IA64RegisterInfo.cpp |   10 ++
 IA64RegisterInfo.h   |4 
 3 files changed, 17 insertions(+)


Index: llvm/lib/Target/IA64/IA64ISelLowering.cpp
diff -u llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.53 
llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.54
--- llvm/lib/Target/IA64/IA64ISelLowering.cpp:1.53  Mon Jan 29 16:58:52 2007
+++ llvm/lib/Target/IA64/IA64ISelLowering.cpp   Wed Feb 21 16:54:50 2007
@@ -590,6 +590,9 @@
   // Frame  Return address.  Currently unimplemented
   case ISD::RETURNADDR: break;
   case ISD::FRAMEADDR:  break;
+  // Exception address and exception selector.  Currently unimplemented.
+  case ISD::EXCEPTIONADDR: break;
+  case ISD::EHSELECTION:   break;
   }
   return SDOperand();
 }


Index: llvm/lib/Target/IA64/IA64RegisterInfo.cpp
diff -u llvm/lib/Target/IA64/IA64RegisterInfo.cpp:1.31 
llvm/lib/Target/IA64/IA64RegisterInfo.cpp:1.32
--- llvm/lib/Target/IA64/IA64RegisterInfo.cpp:1.31  Mon Feb 19 15:49:54 2007
+++ llvm/lib/Target/IA64/IA64RegisterInfo.cpp   Wed Feb 21 16:54:50 2007
@@ -360,5 +360,15 @@
   return hasFP(MF) ? IA64::r5 : IA64::r12;
 }
 
+unsigned IA64RegisterInfo::getEHExceptionRegister() const {
+  assert(0  What is the exception register);
+  return 0;
+}
+
+unsigned IA64RegisterInfo::getEHHandlerRegister() const {
+  assert(0  What is the exception handler register);
+  return 0;
+}
+
 #include IA64GenRegisterInfo.inc
 


Index: llvm/lib/Target/IA64/IA64RegisterInfo.h
diff -u llvm/lib/Target/IA64/IA64RegisterInfo.h:1.14 
llvm/lib/Target/IA64/IA64RegisterInfo.h:1.15
--- llvm/lib/Target/IA64/IA64RegisterInfo.h:1.14Mon Feb 19 15:49:54 2007
+++ llvm/lib/Target/IA64/IA64RegisterInfo.h Wed Feb 21 16:54:50 2007
@@ -64,6 +64,10 @@
   // Debug information queries.
   unsigned getRARegister() const;
   unsigned getFrameRegister(MachineFunction MF) const;
+
+  // Exception handling queries.
+  unsigned getEHExceptionRegister() const;
+  unsigned getEHHandlerRegister() const;
 };
 
 } // End llvm namespace



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


[llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelLowering.cpp ARMRegisterInfo.cpp ARMRegisterInfo.h

2007-02-21 Thread Jim Laskey


Changes in directory llvm/lib/Target/ARM:

ARMISelLowering.cpp updated: 1.14 - 1.15
ARMRegisterInfo.cpp updated: 1.69 - 1.70
ARMRegisterInfo.h updated: 1.10 - 1.11
---
Log message:

Support to provide exception and selector registers.

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

 ARMISelLowering.cpp |3 +++
 ARMRegisterInfo.cpp |   10 ++
 ARMRegisterInfo.h   |4 
 3 files changed, 17 insertions(+)


Index: llvm/lib/Target/ARM/ARMISelLowering.cpp
diff -u llvm/lib/Target/ARM/ARMISelLowering.cpp:1.14 
llvm/lib/Target/ARM/ARMISelLowering.cpp:1.15
--- llvm/lib/Target/ARM/ARMISelLowering.cpp:1.14Tue Feb 13 08:07:13 2007
+++ llvm/lib/Target/ARM/ARMISelLowering.cpp Wed Feb 21 16:54:50 2007
@@ -1190,6 +1190,9 @@
 return LowerFORMAL_ARGUMENTS(Op, DAG);
   case ISD::RETURNADDR:break;
   case ISD::FRAMEADDR: break;
+  // Exception address and exception selector.  Currently unimplemented.
+  case ISD::EXCEPTIONADDR: break;
+  case ISD::EHSELECTION:   break;
   }
   return SDOperand();
 }


Index: llvm/lib/Target/ARM/ARMRegisterInfo.cpp
diff -u llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.69 
llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.70
--- llvm/lib/Target/ARM/ARMRegisterInfo.cpp:1.69Mon Feb 19 15:49:53 2007
+++ llvm/lib/Target/ARM/ARMRegisterInfo.cpp Wed Feb 21 16:54:50 2007
@@ -1287,5 +1287,15 @@
   return STI.useThumbBacktraces() ? ARM::R7 : ARM::R11;
 }
 
+unsigned ARMRegisterInfo::getEHExceptionRegister() const {
+  assert(0  What is the exception register);
+  return 0;
+}
+
+unsigned ARMRegisterInfo::getEHHandlerRegister() const {
+  assert(0  What is the exception handler register);
+  return 0;
+}
+
 #include ARMGenRegisterInfo.inc
 


Index: llvm/lib/Target/ARM/ARMRegisterInfo.h
diff -u llvm/lib/Target/ARM/ARMRegisterInfo.h:1.10 
llvm/lib/Target/ARM/ARMRegisterInfo.h:1.11
--- llvm/lib/Target/ARM/ARMRegisterInfo.h:1.10  Mon Feb 19 15:49:53 2007
+++ llvm/lib/Target/ARM/ARMRegisterInfo.h   Wed Feb 21 16:54:50 2007
@@ -85,6 +85,10 @@
   // Debug information queries.
   unsigned getRARegister() const;
   unsigned getFrameRegister(MachineFunction MF) const;
+
+  // Exception handling queries.
+  unsigned getEHExceptionRegister() const;
+  unsigned getEHHandlerRegister() const;
 };
 
 } // end namespace llvm



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


[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelLowering.cpp AlphaRegisterInfo.cpp AlphaRegisterInfo.h

2007-02-21 Thread Jim Laskey


Changes in directory llvm/lib/Target/Alpha:

AlphaISelLowering.cpp updated: 1.81 - 1.82
AlphaRegisterInfo.cpp updated: 1.60 - 1.61
AlphaRegisterInfo.h updated: 1.20 - 1.21
---
Log message:

Support to provide exception and selector registers.

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

 AlphaISelLowering.cpp |5 -
 AlphaRegisterInfo.cpp |   10 ++
 AlphaRegisterInfo.h   |4 
 3 files changed, 18 insertions(+), 1 deletion(-)


Index: llvm/lib/Target/Alpha/AlphaISelLowering.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.81 
llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.82
--- llvm/lib/Target/Alpha/AlphaISelLowering.cpp:1.81Thu Feb  8 11:37:41 2007
+++ llvm/lib/Target/Alpha/AlphaISelLowering.cpp Wed Feb 21 16:54:50 2007
@@ -548,8 +548,11 @@
 return DAG.getNode(AlphaISD::GlobalRetAddr, MVT::i64);
   //FIXME: implement
   case ISD::FRAMEADDR:  break;
+  // Exception address and exception selector.  Currently unimplemented.
+  case ISD::EXCEPTIONADDR: break;
+  case ISD::EHSELECTION:   break;
   }
-
+  
   return SDOperand();
 }
 


Index: llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp
diff -u llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.60 
llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.61
--- llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.60Mon Feb 19 15:49:54 2007
+++ llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp Wed Feb 21 16:54:50 2007
@@ -399,6 +399,16 @@
   return hasFP(MF) ? Alpha::R15 : Alpha::R30;
 }
 
+unsigned AlphaRegisterInfo::getEHExceptionRegister() const {
+  assert(0  What is the exception register);
+  return 0;
+}
+
+unsigned AlphaRegisterInfo::getEHHandlerRegister() const {
+  assert(0  What is the exception handler register);
+  return 0;
+}
+
 #include AlphaGenRegisterInfo.inc
 
 std::string AlphaRegisterInfo::getPrettyName(unsigned reg)


Index: llvm/lib/Target/Alpha/AlphaRegisterInfo.h
diff -u llvm/lib/Target/Alpha/AlphaRegisterInfo.h:1.20 
llvm/lib/Target/Alpha/AlphaRegisterInfo.h:1.21
--- llvm/lib/Target/Alpha/AlphaRegisterInfo.h:1.20  Mon Feb 19 15:49:54 2007
+++ llvm/lib/Target/Alpha/AlphaRegisterInfo.h   Wed Feb 21 16:54:50 2007
@@ -68,6 +68,10 @@
   unsigned getRARegister() const;
   unsigned getFrameRegister(MachineFunction MF) const;
 
+  // Exception handling queries.
+  unsigned getEHExceptionRegister() const;
+  unsigned getEHHandlerRegister() const;
+
   static std::string getPrettyName(unsigned reg);
 };
 



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


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp PPCRegisterInfo.cpp PPCRegisterInfo.h

2007-02-21 Thread Jim Laskey


Changes in directory llvm/lib/Target/PowerPC:

PPCISelLowering.cpp updated: 1.251 - 1.252
PPCRegisterInfo.cpp updated: 1.108 - 1.109
PPCRegisterInfo.h updated: 1.27 - 1.28
---
Log message:

Support to provide exception and selector registers.

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

 PPCISelLowering.cpp |   28 
 PPCRegisterInfo.cpp |9 -
 PPCRegisterInfo.h   |4 
 3 files changed, 40 insertions(+), 1 deletion(-)


Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.251 
llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.252
--- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.251   Sat Feb 17 00:57:26 2007
+++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Wed Feb 21 16:54:50 2007
@@ -2610,6 +2610,30 @@
   }
 }
 
+/// LowerEXCEPTIONADDR - Replace EXCEPTIONADDR with a copy from the exception
+/// register.  The register was made live in the ISel.
+static SDOperand LowerEXCEPTIONADDR(SDOperand Op, SelectionDAG DAG) {
+  const MRegisterInfo *MRI = DAG.getTargetLoweringInfo().
+ getTargetMachine().
+ getRegisterInfo();
+  MVT::ValueType VT = Op.Val-getValueType(0);
+  unsigned Reg = MRI-getEHExceptionRegister();
+  SDOperand Result = DAG.getCopyFromReg(Op.getOperand(0), Reg, VT);
+  return Result.getValue(Op.ResNo);
+}
+
+/// LowerEXCEPTIONADDR - Replace EHSELECTION with a copy from the exception
+/// selection register.  The register was made live in the ISel.
+static SDOperand LowerEHSELECTION(SDOperand Op, SelectionDAG DAG) {
+  const MRegisterInfo *MRI = DAG.getTargetLoweringInfo().
+ getTargetMachine().
+ getRegisterInfo();
+  MVT::ValueType VT = Op.Val-getValueType(0);
+  unsigned Reg = MRI-getEHHandlerRegister();
+  SDOperand Result = DAG.getCopyFromReg(Op.getOperand(1), Reg, VT);
+  return Result.getValue(Op.ResNo);
+}
+
 /// LowerOperation - Provide custom lowering hooks for some operations.
 ///
 SDOperand PPCTargetLowering::LowerOperation(SDOperand Op, SelectionDAG DAG) {
@@ -2647,6 +2671,10 @@
   // Frame  Return address.  Currently unimplemented
   case ISD::RETURNADDR: break;
   case ISD::FRAMEADDR:  break;
+  
+  // Exception address and exception selector.
+  case ISD::EXCEPTIONADDR:  return LowerEXCEPTIONADDR(Op, DAG);
+  case ISD::EHSELECTION:return LowerEHSELECTION(Op, DAG);
   }
   return SDOperand();
 }


Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.108 
llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.109
--- llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.108   Mon Feb 19 15:49:54 2007
+++ llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp Wed Feb 21 16:54:50 2007
@@ -1022,7 +1022,6 @@
 
 unsigned PPCRegisterInfo::getRARegister() const {
   return !Subtarget.isPPC64() ? PPC::LR : PPC::LR8;
-  
 }
 
 unsigned PPCRegisterInfo::getFrameRegister(MachineFunction MF) const {
@@ -1040,5 +1039,13 @@
   Moves.push_back(MachineMove(0, Dst, Src));
 }
 
+unsigned PPCRegisterInfo::getEHExceptionRegister() const {
+  return !Subtarget.isPPC64() ? PPC::R3 : PPC::X3;
+}
+
+unsigned PPCRegisterInfo::getEHHandlerRegister() const {
+  return !Subtarget.isPPC64() ? PPC::R4 : PPC::X4;
+}
+
 #include PPCGenRegisterInfo.inc
 


Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.h
diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.27 
llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.28
--- llvm/lib/Target/PowerPC/PPCRegisterInfo.h:1.27  Mon Feb 19 15:49:54 2007
+++ llvm/lib/Target/PowerPC/PPCRegisterInfo.h   Wed Feb 21 16:54:50 2007
@@ -89,6 +89,10 @@
   unsigned getRARegister() const;
   unsigned getFrameRegister(MachineFunction MF) const;
   void getInitialFrameState(std::vectorMachineMove Moves) const;
+
+  // Exception handling queries.
+  unsigned getEHExceptionRegister() const;
+  unsigned getEHHandlerRegister() const;
 };
 
 } // end namespace llvm



___
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 X86RegisterInfo.cpp X86RegisterInfo.h

2007-02-21 Thread Jim Laskey


Changes in directory llvm/lib/Target/X86:

X86ISelLowering.cpp updated: 1.321 - 1.322
X86RegisterInfo.cpp updated: 1.203 - 1.204
X86RegisterInfo.h updated: 1.48 - 1.49
---
Log message:

Support to provide exception and selector registers.

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

 X86ISelLowering.cpp |4 
 X86RegisterInfo.cpp |   10 ++
 X86RegisterInfo.h   |4 
 3 files changed, 18 insertions(+)


Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.321 
llvm/lib/Target/X86/X86ISelLowering.cpp:1.322
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.321   Wed Feb 21 15:18:14 2007
+++ llvm/lib/Target/X86/X86ISelLowering.cpp Wed Feb 21 16:54:50 2007
@@ -4675,7 +4675,11 @@
   case ISD::INTRINSIC_WO_CHAIN: return LowerINTRINSIC_WO_CHAIN(Op, DAG);
   case ISD::RETURNADDR: return LowerRETURNADDR(Op, DAG);
   case ISD::FRAMEADDR:  return LowerFRAMEADDR(Op, DAG);
+  // Exception address and exception selector.  Currently unimplemented.
+  case ISD::EXCEPTIONADDR: break;
+  case ISD::EHSELECTION:   break;
   }
+  return SDOperand();
 }
 
 const char *X86TargetLowering::getTargetNodeName(unsigned Opcode) const {


Index: llvm/lib/Target/X86/X86RegisterInfo.cpp
diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.203 
llvm/lib/Target/X86/X86RegisterInfo.cpp:1.204
--- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.203   Mon Feb 19 15:49:54 2007
+++ llvm/lib/Target/X86/X86RegisterInfo.cpp Wed Feb 21 16:54:50 2007
@@ -1193,6 +1193,16 @@
   Moves.push_back(MachineMove(0, Dst, Src));
 }
 
+unsigned X86RegisterInfo::getEHExceptionRegister() const {
+  assert(0  What is the exception register);
+  return 0;
+}
+
+unsigned X86RegisterInfo::getEHHandlerRegister() const {
+  assert(0  What is the exception handler register);
+  return 0;
+}
+
 namespace llvm {
 unsigned getX86SubSuperRegister(unsigned Reg, MVT::ValueType VT, bool High) {
   switch (VT) {


Index: llvm/lib/Target/X86/X86RegisterInfo.h
diff -u llvm/lib/Target/X86/X86RegisterInfo.h:1.48 
llvm/lib/Target/X86/X86RegisterInfo.h:1.49
--- llvm/lib/Target/X86/X86RegisterInfo.h:1.48  Mon Feb 19 15:49:54 2007
+++ llvm/lib/Target/X86/X86RegisterInfo.h   Wed Feb 21 16:54:50 2007
@@ -101,6 +101,10 @@
   unsigned getRARegister() const;
   unsigned getFrameRegister(MachineFunction MF) const;
   void getInitialFrameState(std::vectorMachineMove Moves) const;
+
+  // Exception handling queries.
+  unsigned getEHExceptionRegister() const;
+  unsigned getEHHandlerRegister() const;
 };
 
 // getX86SubSuperRegister - X86 utility function. It returns the sub or super



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


[llvm-commits] CVS: llvm/include/llvm/Intrinsics.td

2007-02-12 Thread Jim Laskey


Changes in directory llvm/include/llvm:

Intrinsics.td updated: 1.44 - 1.45
---
Log message:

Wrong value type.

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

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


Index: llvm/include/llvm/Intrinsics.td
diff -u llvm/include/llvm/Intrinsics.td:1.44 
llvm/include/llvm/Intrinsics.td:1.45
--- llvm/include/llvm/Intrinsics.td:1.44Wed Feb  7 14:38:26 2007
+++ llvm/include/llvm/Intrinsics.td Mon Feb 12 13:05:51 2007
@@ -232,7 +232,7 @@
 //===-- Exception Handling 
Intrinsics--===//
 //
 def int_eh_exception : Intrinsic[llvm_ptr_ty];
-def int_eh_handlers : Intrinsic[llvm_ptr_ty, llvm_ptr_ty, llvm_vararg_ty];
+def int_eh_handlers : Intrinsic[llvm_i32_ty, llvm_ptr_ty, llvm_vararg_ty];
 
 
//===--===//
 // Target-specific intrinsics



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


[llvm-commits] CVS: llvm/include/llvm/Intrinsics.h Intrinsics.td

2007-02-07 Thread Jim Laskey


Changes in directory llvm/include/llvm:

Intrinsics.h updated: 1.40 - 1.41
Intrinsics.td updated: 1.43 - 1.44
---
Log message:

Automatically generating intrinsic declarations from Dan Gohman.  Modified
to construct FunctionType in separate function, and, have getDeclaration
return a Function instead of a Constant.


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

 Intrinsics.h  |   13 +
 Intrinsics.td |   24 +---
 2 files changed, 30 insertions(+), 7 deletions(-)


Index: llvm/include/llvm/Intrinsics.h
diff -u llvm/include/llvm/Intrinsics.h:1.40 llvm/include/llvm/Intrinsics.h:1.41
--- llvm/include/llvm/Intrinsics.h:1.40 Sat Mar 25 00:32:07 2006
+++ llvm/include/llvm/Intrinsics.h  Wed Feb  7 14:38:26 2007
@@ -18,6 +18,10 @@
 
 namespace llvm {
 
+class FunctionType;
+class Function;
+class Module;
+
 /// Intrinsic Namespace - This namespace contains an enum with a value for
 /// every intrinsic/builtin function known by LLVM.  These enum values are
 /// returned by Function::getIntrinsicID().
@@ -36,6 +40,15 @@
   /// Intrinsic::getName(ID) - Return the LLVM name for an intrinsic, such as
   /// llvm.ppc.altivec.lvx.
   const char *getName(ID id);
+  
+  /// Intrinsic::getType(ID) - Return the function type for an intrinsic.
+  ///
+  const FunctionType *getType(ID id);
+
+  /// Intrinsic::getDeclaration(M, ID) - Create or insert an LLVM Function
+  /// declaration for an intrinsic, and return it.
+  Function *getDeclaration(Module *M, ID id);
+  
 } // End Intrinsic namespace
 
 } // End llvm namespace


Index: llvm/include/llvm/Intrinsics.td
diff -u llvm/include/llvm/Intrinsics.td:1.43 
llvm/include/llvm/Intrinsics.td:1.44
--- llvm/include/llvm/Intrinsics.td:1.43Tue Feb  6 12:19:44 2007
+++ llvm/include/llvm/Intrinsics.td Wed Feb  7 14:38:26 2007
@@ -68,6 +68,15 @@
   LLVMType ElTy = elty;
 } 
 
+class LLVMPointerTypeLLVMType elty
+  : LLVMTypeiPTR, Type::PointerTyID{
+  LLVMType ElTy = elty;
+} 
+
+class LLVMEmptyStructType
+  : LLVMTypeOtherVT, Type::StructTyID{
+} 
+
 def llvm_void_ty   : LLVMTypeisVoid, Type::VoidTyID;
 def llvm_bool_ty   : LLVMIntegerTypei1, 1;
 def llvm_i8_ty : LLVMIntegerTypei8 , 8;
@@ -76,9 +85,10 @@
 def llvm_i64_ty: LLVMIntegerTypei64, 64;
 def llvm_float_ty  : LLVMTypef32, Type::FloatTyID;
 def llvm_double_ty : LLVMTypef64, Type::DoubleTyID;
-def llvm_ptr_ty: LLVMTypeiPTR, Type::PointerTyID; // i8*
-def llvm_ptrptr_ty : LLVMTypeiPTR, Type::PointerTyID; // i8**
-def llvm_descriptor_ty : LLVMTypeiPTR, Type::PointerTyID; // global*
+def llvm_ptr_ty: LLVMPointerTypellvm_i8_ty; // i8*
+def llvm_ptrptr_ty : LLVMPointerTypellvm_ptr_ty;// i8**
+def llvm_empty_ty  : LLVMEmptyStructType; // { }
+def llvm_descriptor_ty : LLVMPointerTypellvm_empty_ty;  // { }*
 
 def llvm_v16i8_ty  : LLVMPackedTypev16i8,16, llvm_i8_ty;// 16 x i8
 def llvm_v8i16_ty  : LLVMPackedTypev8i16, 8, llvm_i16_ty;   //  8 x i16
@@ -123,10 +133,10 @@
 //===--- Variable Argument Handling Intrinsics 
===//
 //  
 
-def int_vastart : Intrinsic[llvm_void_ty, llvm_ptrptr_ty], [], 
llvm.va_start;
-def int_vacopy  : Intrinsic[llvm_void_ty, llvm_ptrptr_ty, llvm_ptrptr_ty], [],
+def int_vastart : Intrinsic[llvm_void_ty, llvm_ptr_ty], [], llvm.va_start;
+def int_vacopy  : Intrinsic[llvm_void_ty, llvm_ptr_ty, llvm_ptr_ty], [],
 llvm.va_copy;
-def int_vaend   : Intrinsic[llvm_void_ty, llvm_ptrptr_ty], [], llvm.va_end;
+def int_vaend   : Intrinsic[llvm_void_ty, llvm_ptr_ty], [], llvm.va_end;
 
 //===--- Garbage Collection Intrinsics 
===//
 //  
@@ -216,7 +226,7 @@
 def int_dbg_region_start : Intrinsic[llvm_void_ty, llvm_descriptor_ty];
 def int_dbg_region_end   : Intrinsic[llvm_void_ty, llvm_descriptor_ty];
 def int_dbg_func_start   : Intrinsic[llvm_void_ty, llvm_descriptor_ty];
-def int_dbg_declare  : Intrinsic[llvm_void_ty, llvm_ptr_ty,
+def int_dbg_declare  : Intrinsic[llvm_void_ty, llvm_descriptor_ty,
 llvm_descriptor_ty];
 
 //===-- Exception Handling 
Intrinsics--===//



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


[llvm-commits] CVS: llvm/utils/TableGen/IntrinsicEmitter.cpp IntrinsicEmitter.h

2007-02-07 Thread Jim Laskey


Changes in directory llvm/utils/TableGen:

IntrinsicEmitter.cpp updated: 1.24 - 1.25
IntrinsicEmitter.h updated: 1.9 - 1.10
---
Log message:

Automatically generating intrinsic declarations from Dan Gohman.  Modified
to construct FunctionType in separate function, and, have getDeclaration
return a Function instead of a Constant.


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

 IntrinsicEmitter.cpp |   71 +++
 IntrinsicEmitter.h   |2 +
 2 files changed, 73 insertions(+)


Index: llvm/utils/TableGen/IntrinsicEmitter.cpp
diff -u llvm/utils/TableGen/IntrinsicEmitter.cpp:1.24 
llvm/utils/TableGen/IntrinsicEmitter.cpp:1.25
--- llvm/utils/TableGen/IntrinsicEmitter.cpp:1.24   Tue Feb  6 12:30:58 2007
+++ llvm/utils/TableGen/IntrinsicEmitter.cppWed Feb  7 14:38:26 2007
@@ -38,6 +38,9 @@
   // Emit the intrinsic verifier.
   EmitVerifier(Ints, OS);
   
+  // Emit the intrinsic declaration generator.
+  EmitGenerator(Ints, OS);
+  
   // Emit mod/ref info for each function.
   EmitModRefInfo(Ints, OS);
   
@@ -125,6 +128,25 @@
   return false;
 }
 
+static void EmitTypeGenerate(std::ostream OS, Record *ArgType) {
+  if (ArgType-isSubClassOf(LLVMIntegerType)) {
+OS  IntegerType::get(  ArgType-getValueAsInt(Width)  );
+  } else if (ArgType-isSubClassOf(LLVMPackedType)) {
+OS  PackedType::get(;
+EmitTypeGenerate(OS, ArgType-getValueAsDef(ElTy));
+OS  ,   ArgType-getValueAsInt(NumElts)  );
+  } else if (ArgType-isSubClassOf(LLVMPointerType)) {
+OS  PointerType::get(;
+EmitTypeGenerate(OS, ArgType-getValueAsDef(ElTy));
+OS  );
+  } else if (ArgType-isSubClassOf(LLVMEmptyStructType)) {
+OS  StructType::get(std::vectorconst Type *());
+  } else {
+OS  Type::getPrimitiveType(;
+OS  ArgType-getValueAsString(TypeVal)  );
+  }
+}
+
 /// RecordListComparator - Provide a determinstic comparator for lists of
 /// records.
 namespace {
@@ -188,6 +210,55 @@
   OS  #endif\n\n;
 }
 
+void IntrinsicEmitter::EmitGenerator(const std::vectorCodeGenIntrinsic 
Ints, 
+ std::ostream OS) {
+  OS  // Code for generating Intrinsic function declarations.\n;
+  OS  #ifdef GET_INTRINSIC_GENERATOR\n;
+  OSswitch (id) {\n;
+  OSdefault: assert(0  \Invalid intrinsic!\);\n;
+  
+  // Similar to GET_INTRINSIC_VERIFIER, batch up cases that have identical
+  // types.
+  typedef std::mapstd::vectorRecord*, std::vectorunsigned, 
+RecordListComparator MapTy;
+  MapTy UniqueArgInfos;
+  
+  // Compute the unique argument type info.
+  for (unsigned i = 0, e = Ints.size(); i != e; ++i)
+UniqueArgInfos[Ints[i].ArgTypeDefs].push_back(i);
+
+  // Loop through the array, emitting one generator for each batch.
+  for (MapTy::iterator I = UniqueArgInfos.begin(),
+   E = UniqueArgInfos.end(); I != E; ++I) {
+for (unsigned i = 0, e = I-second.size(); i != e; ++i) {
+  OScase Intrinsic::  Ints[I-second[i]].EnumName  :\t\t// 
+  Ints[I-second[i]].Name  \n;
+}
+
+const std::vectorRecord* ArgTypes = I-first;
+unsigned N = ArgTypes.size();
+
+if (ArgTypes[N-1]-getValueAsString(TypeVal) == ...) {
+  OS  IsVarArg = true;\n;
+  --N;
+}
+
+OS  ResultTy = ;
+EmitTypeGenerate(OS, ArgTypes[0]);
+OS  ;\n;
+
+for (unsigned j = 1; j != N; ++j) {
+  OS  ArgTys.push_back(;
+  EmitTypeGenerate(OS, ArgTypes[j]);
+  OS  );\n;
+}
+
+OS  break;\n;
+  }
+  OS}\n;
+  OS  #endif\n\n;
+}
+
 void IntrinsicEmitter::EmitModRefInfo(const std::vectorCodeGenIntrinsic 
Ints,
   std::ostream OS) {
   OS  // BasicAliasAnalysis code.\n;


Index: llvm/utils/TableGen/IntrinsicEmitter.h
diff -u llvm/utils/TableGen/IntrinsicEmitter.h:1.9 
llvm/utils/TableGen/IntrinsicEmitter.h:1.10
--- llvm/utils/TableGen/IntrinsicEmitter.h:1.9  Thu Mar 23 19:13:55 2006
+++ llvm/utils/TableGen/IntrinsicEmitter.h  Wed Feb  7 14:38:26 2007
@@ -35,6 +35,8 @@
   std::ostream OS);
 void EmitVerifier(const std::vectorCodeGenIntrinsic Ints, 
   std::ostream OS);
+void EmitGenerator(const std::vectorCodeGenIntrinsic Ints, 
+   std::ostream OS);
 void EmitModRefInfo(const std::vectorCodeGenIntrinsic Ints, 
 std::ostream OS);
 void EmitNoMemoryInfo(const std::vectorCodeGenIntrinsic Ints, 



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


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

2007-02-07 Thread Jim Laskey


Changes in directory llvm/lib/VMCore:

Function.cpp updated: 1.111 - 1.112
---
Log message:

Automatically generating intrinsic declarations from Dan Gohman.  Modified
to construct FunctionType in separate function, and, have getDeclaration
return a Function instead of a Constant.


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

 Function.cpp |   19 +++
 1 files changed, 19 insertions(+)


Index: llvm/lib/VMCore/Function.cpp
diff -u llvm/lib/VMCore/Function.cpp:1.111 llvm/lib/VMCore/Function.cpp:1.112
--- llvm/lib/VMCore/Function.cpp:1.111  Mon Feb  5 14:47:20 2007
+++ llvm/lib/VMCore/Function.cppWed Feb  7 14:38:26 2007
@@ -183,6 +183,25 @@
   return Table[id];
 }
 
+const FunctionType *Intrinsic::getType(ID id) {
+  const Type *ResultTy = NULL;
+  std::vectorconst Type* ArgTys;
+  std::vectorFunctionType::ParameterAttributes Attrs;
+  bool IsVarArg = false;
+  
+#define GET_INTRINSIC_GENERATOR
+#include llvm/Intrinsics.gen
+#undef GET_INTRINSIC_GENERATOR
+
+  return FunctionType::get(ResultTy, ArgTys, IsVarArg, Attrs); 
+}
+
+Function *Intrinsic::getDeclaration(Module *M, ID id) {
+// There can never be multiple globals with the same name of different types,
+// because intrinsics must be a specific type.
+  return castFunction(M-getOrInsertFunction(getName(id), getType(id)));
+}
+
 Value *IntrinsicInst::StripPointerCasts(Value *Ptr) {
   if (ConstantExpr *CE = dyn_castConstantExpr(Ptr)) {
 if (CE-getOpcode() == Instruction::BitCast) {



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


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

2007-02-06 Thread Jim Laskey


Changes in directory llvm/lib/VMCore:

Verifier.cpp updated: 1.190 - 1.191
---
Log message:

Support var arg intrinsics.

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

 Verifier.cpp |4 
 1 files changed, 4 insertions(+)


Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.190 llvm/lib/VMCore/Verifier.cpp:1.191
--- llvm/lib/VMCore/Verifier.cpp:1.190  Mon Feb  5 14:47:20 2007
+++ llvm/lib/VMCore/Verifier.cppTue Feb  6 12:02:54 2007
@@ -987,6 +987,10 @@
   for (unsigned ArgNo = 0; 1; ++ArgNo) {
 int TypeID = va_arg(VA, int);
 
+if (TypeID == -2) {
+  break;
+}
+
 if (TypeID == -1) {
   if (ArgNo != FTy-getNumParams()+1)
 CheckFailed(Intrinsic prototype has too many arguments!, F);



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


[llvm-commits] CVS: llvm/include/llvm/Intrinsics.td

2007-02-06 Thread Jim Laskey


Changes in directory llvm/include/llvm:

Intrinsics.td updated: 1.41 - 1.42
---
Log message:

Support var arg intrinsics.

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

 Intrinsics.td |7 +++
 1 files changed, 7 insertions(+)


Index: llvm/include/llvm/Intrinsics.td
diff -u llvm/include/llvm/Intrinsics.td:1.41 
llvm/include/llvm/Intrinsics.td:1.42
--- llvm/include/llvm/Intrinsics.td:1.41Wed Jan 17 17:33:20 2007
+++ llvm/include/llvm/Intrinsics.td Tue Feb  6 12:02:54 2007
@@ -88,6 +88,8 @@
 def llvm_v4f32_ty  : LLVMPackedTypev4f32, 4, llvm_float_ty; //  4 x float
 def llvm_v2f64_ty  : LLVMPackedTypev2f64, 2, llvm_double_ty;//  2 x 
double
 
+def ...: LLVMTypeisVoid, ...; // vararg
+
 
//===--===//
 // Intrinsic Definitions.
 
//===--===//
@@ -217,6 +219,11 @@
 def int_dbg_declare  : Intrinsic[llvm_void_ty, llvm_ptr_ty,
 llvm_descriptor_ty];
 
+//===-- Exception Handling 
Intrinsics--===//
+//
+def int_eh_exception : Intrinsic[llvm_ptr_ty];
+def int_eh_handlers : Intrinsic[llvm_ptr_ty, llvm_ptr_ty, ...];
+
 
//===--===//
 // Target-specific intrinsics
 
//===--===//



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


[llvm-commits] CVS: llvm/utils/TableGen/FileLexer.l IntrinsicEmitter.cpp

2007-02-06 Thread Jim Laskey


Changes in directory llvm/utils/TableGen:

FileLexer.l updated: 1.33 - 1.34
IntrinsicEmitter.cpp updated: 1.22 - 1.23
---
Log message:

Support var arg intrinsics.

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

 FileLexer.l  |2 +-
 IntrinsicEmitter.cpp |5 +
 2 files changed, 6 insertions(+), 1 deletion(-)


Index: llvm/utils/TableGen/FileLexer.l
diff -u llvm/utils/TableGen/FileLexer.l:1.33 
llvm/utils/TableGen/FileLexer.l:1.34
--- llvm/utils/TableGen/FileLexer.l:1.33Thu Dec  7 16:21:48 2006
+++ llvm/utils/TableGen/FileLexer.l Tue Feb  6 12:02:54 2007
@@ -176,7 +176,7 @@
 
 Comment  \/\/.*
 
-Identifier   [a-zA-Z_][0-9a-zA-Z_]*
+Identifier   [a-zA-Z_][0-9a-zA-Z_]*|\.\.\.
 Integer  [-+]?[0-9]+|0x[0-9a-fA-F]+|0b[01]+
 CodeFragment \[\{([^}]+|\}[^\]])*\}\]
 StringVal\[^]*\


Index: llvm/utils/TableGen/IntrinsicEmitter.cpp
diff -u llvm/utils/TableGen/IntrinsicEmitter.cpp:1.22 
llvm/utils/TableGen/IntrinsicEmitter.cpp:1.23
--- llvm/utils/TableGen/IntrinsicEmitter.cpp:1.22   Fri Jan 12 01:05:14 2007
+++ llvm/utils/TableGen/IntrinsicEmitter.cppTue Feb  6 12:02:54 2007
@@ -109,6 +109,11 @@
 }
 
 static void EmitTypeVerify(std::ostream OS, Record *ArgType) {
+  if (ArgType-getValueAsString(TypeVal) == ...) {
+OS  -2, ;
+return;
+  }
+  
   OS  (int)  ArgType-getValueAsString(TypeVal)  , ;
   // If this is an integer type, check the width is correct.
   if (ArgType-isSubClassOf(LLVMIntegerType))



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


[llvm-commits] CVS: llvm/utils/TableGen/FileLexer.l.cvs FileLexer.cpp.cvs

2007-02-06 Thread Jim Laskey


Changes in directory llvm/utils/TableGen:

FileLexer.l.cvs updated: 1.8 - 1.9
FileLexer.cpp.cvs updated: 1.9 - 1.10
---
Log message:

Regenerate.

---
Diffs of the changes:  (+184 -179)

 FileLexer.cpp.cvs |  361 +++---
 FileLexer.l.cvs   |2 
 2 files changed, 184 insertions(+), 179 deletions(-)


Index: llvm/utils/TableGen/FileLexer.l.cvs
diff -u llvm/utils/TableGen/FileLexer.l.cvs:1.8 
llvm/utils/TableGen/FileLexer.l.cvs:1.9
--- llvm/utils/TableGen/FileLexer.l.cvs:1.8 Thu Dec  7 16:21:48 2006
+++ llvm/utils/TableGen/FileLexer.l.cvs Tue Feb  6 12:03:31 2007
@@ -176,7 +176,7 @@
 
 Comment  \/\/.*
 
-Identifier   [a-zA-Z_][0-9a-zA-Z_]*
+Identifier   [a-zA-Z_][0-9a-zA-Z_]*|\.\.\.
 Integer  [-+]?[0-9]+|0x[0-9a-fA-F]+|0b[01]+
 CodeFragment \[\{([^}]+|\}[^\]])*\}\]
 StringVal\[^]*\


Index: llvm/utils/TableGen/FileLexer.cpp.cvs
diff -u llvm/utils/TableGen/FileLexer.cpp.cvs:1.9 
llvm/utils/TableGen/FileLexer.cpp.cvs:1.10
--- llvm/utils/TableGen/FileLexer.cpp.cvs:1.9   Thu Dec  7 16:21:48 2006
+++ llvm/utils/TableGen/FileLexer.cpp.cvs   Tue Feb  6 12:03:31 2007
@@ -21,7 +21,7 @@
 /* A lexical scanner generated by flex */
 
 /* Scanner skeleton version:
- * $Header: /var/cvs/llvm/llvm/utils/TableGen/FileLexer.cpp.cvs,v 1.9 
2006/12/07 22:21:48 void Exp $
+ * $Header: /var/cvs/llvm/llvm/utils/TableGen/FileLexer.cpp.cvs,v 1.10 
2007/02/06 18:03:31 jlaskey Exp $
  */
 
 #define FLEX_SCANNER
@@ -308,41 +308,42 @@
 
 #define YY_NUM_RULES 34
 #define YY_END_OF_BUFFER 35
-static yyconst short int yy_acclist[145] =
+static yyconst short int yy_acclist[149] =
 {   0,
28,   28,   35,   33,   34,   26,   33,   34,   26,   34,
33,   34,   33,   34,   33,   34,   33,   34,   33,   34,
-   25,   33,   34,   25,   33,   34,   22,   33,   34,   33,
-   34,   22,   33,   34,   22,   33,   34,   22,   33,   34,
-   22,   33,   34,   22,   33,   34,   22,   33,   34,   22,
-   33,   34,   22,   33,   34,   28,   34,   29,   34,   31,
-   34,   26,   24,   23,   25,   27,1,   22,   22,   22,
-   22,   22,   22,   22,   17,   22,   22,   22,   22,   22,
-   28,   29,   29,   32,   31,   30,   31,   23,1,   25,
-   25,5,   22,   22,   22,   10,   22,   12,   22,   22,
-
-   22,4,   22,   16,   22,   22,   22,   22,   20,   18,
-   19,3,6,   22,   22,9,   22,   13,   22,   22,
-   22,8,   22,   22,   22,   11,   22,   15,   22,   22,
-   22,   22,   22,   22,7,   22,   22,   22,   22,   22,
-   21,2,   14,   22
+   33,   34,   25,   33,   34,   25,   33,   34,   22,   33,
+   34,   33,   34,   22,   33,   34,   22,   33,   34,   22,
+   33,   34,   22,   33,   34,   22,   33,   34,   22,   33,
+   34,   22,   33,   34,   22,   33,   34,   28,   34,   29,
+   34,   31,   34,   26,   24,   23,   25,   27,1,   22,
+   22,   22,   22,   22,   22,   22,   17,   22,   22,   22,
+   22,   22,   28,   29,   29,   32,   31,   30,   31,   23,
+   22,1,   25,   25,5,   22,   22,   22,   10,   22,
+
+   12,   22,   22,   22,4,   22,   16,   22,   22,   22,
+   22,   20,   18,   19,   23,3,6,   22,   22,9,
+   22,   13,   22,   22,   22,8,   22,   22,   22,   11,
+   22,   15,   22,   22,   22,   22,   22,   22,7,   22,
+   22,   22,   22,   22,   21,2,   14,   22
 } ;
 
-static yyconst short int yy_accept[120] =
+static yyconst short int yy_accept[126] =
 {   0,
 1,1,1,2,3,4,6,9,   11,   13,
-   15,   17,   19,   21,   24,   27,   30,   32,   35,   38,
-   41,   44,   47,   50,   53,   56,   58,   60,   62,   63,
-   63,   63,   64,   65,   66,   67,   68,   68,   68,   69,
-   69,   70,   71,   72,   73,   74,   75,   77,   78,   79,
-   80,   81,   82,   83,   84,   85,   86,   87,   88,   88,
-   88,   88,   89,   90,   91,   92,   92,   92,   94,   95,
-   96,   98,  100,  101,  102,  104,  106,  107,  108,  109,
-  110,  111,  112,  112,  112,  113,  115,  116,  118,  120,
-  121,  122,  124,  125,  126,  126,  128,  130,  131,  132,
-
-  133,  133,  134,  135,  137,  137,  138,  139,  139,  139,
-  140,  140,  140,  141,  142,  142,  143,  145,  145
+   15,   17,   19,   21,   23,   26,   29,   32,   34,   37,
+   40,   43,   46,   49,   52,   55,   58,   60,   62,   64,
+   65,   65,   65,   66,   66,   67,   68,   68,   69,   70,
+   70,   70,   71,   71,   72,   73,   74,   75,   76,   77,
+   79,   80,   81,   82,   83,   84,   85,   86,   87,   88,
+   89,   90,   90,   90,   90,   90,   91,   92,   93,   94,
+   95,   95,   95,   97,   98,   99,  101,  103,  104,  105,
+  107,  109,  110,  111,  112,  113,  114,  115,  115,  116,
+  116,  117,  119,  120,  122,  124,  125,  126,  128,  129,
+
+  130,  130,  132,  134,  135,  136,  137,  

[llvm-commits] CVS: llvm/utils/TableGen/FileLexer.l

2007-02-06 Thread Jim Laskey


Changes in directory llvm/utils/TableGen:

FileLexer.l updated: 1.34 - 1.35
---
Log message:

Deemed too cute to live.

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

 FileLexer.l |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/utils/TableGen/FileLexer.l
diff -u llvm/utils/TableGen/FileLexer.l:1.34 
llvm/utils/TableGen/FileLexer.l:1.35
--- llvm/utils/TableGen/FileLexer.l:1.34Tue Feb  6 12:02:54 2007
+++ llvm/utils/TableGen/FileLexer.l Tue Feb  6 12:19:44 2007
@@ -176,7 +176,7 @@
 
 Comment  \/\/.*
 
-Identifier   [a-zA-Z_][0-9a-zA-Z_]*|\.\.\.
+Identifier   [a-zA-Z_][0-9a-zA-Z_]*
 Integer  [-+]?[0-9]+|0x[0-9a-fA-F]+|0b[01]+
 CodeFragment \[\{([^}]+|\}[^\]])*\}\]
 StringVal\[^]*\



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


[llvm-commits] CVS: llvm/include/llvm/Intrinsics.td

2007-02-06 Thread Jim Laskey


Changes in directory llvm/include/llvm:

Intrinsics.td updated: 1.42 - 1.43
---
Log message:

Deemed too cute to live.

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

 Intrinsics.td |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/Intrinsics.td
diff -u llvm/include/llvm/Intrinsics.td:1.42 
llvm/include/llvm/Intrinsics.td:1.43
--- llvm/include/llvm/Intrinsics.td:1.42Tue Feb  6 12:02:54 2007
+++ llvm/include/llvm/Intrinsics.td Tue Feb  6 12:19:44 2007
@@ -88,7 +88,7 @@
 def llvm_v4f32_ty  : LLVMPackedTypev4f32, 4, llvm_float_ty; //  4 x float
 def llvm_v2f64_ty  : LLVMPackedTypev2f64, 2, llvm_double_ty;//  2 x 
double
 
-def ...: LLVMTypeisVoid, ...; // vararg
+def llvm_vararg_ty : LLVMTypeisVoid, ...; // vararg
 
 
//===--===//
 // Intrinsic Definitions.
@@ -222,7 +222,7 @@
 //===-- Exception Handling 
Intrinsics--===//
 //
 def int_eh_exception : Intrinsic[llvm_ptr_ty];
-def int_eh_handlers : Intrinsic[llvm_ptr_ty, llvm_ptr_ty, ...];
+def int_eh_handlers : Intrinsic[llvm_ptr_ty, llvm_ptr_ty, llvm_vararg_ty];
 
 
//===--===//
 // Target-specific intrinsics



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


[llvm-commits] CVS: llvm/utils/TableGen/FileLexer.l.cvs FileLexer.cpp.cvs

2007-02-06 Thread Jim Laskey


Changes in directory llvm/utils/TableGen:

FileLexer.l.cvs updated: 1.9 - 1.10
FileLexer.cpp.cvs updated: 1.10 - 1.11
---
Log message:

Regenerate.

---
Diffs of the changes:  (+139 -144)

 FileLexer.cpp.cvs |  281 ++
 FileLexer.l.cvs   |2 
 2 files changed, 139 insertions(+), 144 deletions(-)


Index: llvm/utils/TableGen/FileLexer.l.cvs
diff -u llvm/utils/TableGen/FileLexer.l.cvs:1.9 
llvm/utils/TableGen/FileLexer.l.cvs:1.10
--- llvm/utils/TableGen/FileLexer.l.cvs:1.9 Tue Feb  6 12:03:31 2007
+++ llvm/utils/TableGen/FileLexer.l.cvs Tue Feb  6 12:20:07 2007
@@ -176,7 +176,7 @@
 
 Comment  \/\/.*
 
-Identifier   [a-zA-Z_][0-9a-zA-Z_]*|\.\.\.
+Identifier   [a-zA-Z_][0-9a-zA-Z_]*
 Integer  [-+]?[0-9]+|0x[0-9a-fA-F]+|0b[01]+
 CodeFragment \[\{([^}]+|\}[^\]])*\}\]
 StringVal\[^]*\


Index: llvm/utils/TableGen/FileLexer.cpp.cvs
diff -u llvm/utils/TableGen/FileLexer.cpp.cvs:1.10 
llvm/utils/TableGen/FileLexer.cpp.cvs:1.11
--- llvm/utils/TableGen/FileLexer.cpp.cvs:1.10  Tue Feb  6 12:03:31 2007
+++ llvm/utils/TableGen/FileLexer.cpp.cvs   Tue Feb  6 12:20:07 2007
@@ -21,7 +21,7 @@
 /* A lexical scanner generated by flex */
 
 /* Scanner skeleton version:
- * $Header: /var/cvs/llvm/llvm/utils/TableGen/FileLexer.cpp.cvs,v 1.10 
2007/02/06 18:03:31 jlaskey Exp $
+ * $Header: /var/cvs/llvm/llvm/utils/TableGen/FileLexer.cpp.cvs,v 1.11 
2007/02/06 18:20:07 jlaskey Exp $
  */
 
 #define FLEX_SCANNER
@@ -308,42 +308,41 @@
 
 #define YY_NUM_RULES 34
 #define YY_END_OF_BUFFER 35
-static yyconst short int yy_acclist[149] =
+static yyconst short int yy_acclist[145] =
 {   0,
28,   28,   35,   33,   34,   26,   33,   34,   26,   34,
33,   34,   33,   34,   33,   34,   33,   34,   33,   34,
-   33,   34,   25,   33,   34,   25,   33,   34,   22,   33,
-   34,   33,   34,   22,   33,   34,   22,   33,   34,   22,
-   33,   34,   22,   33,   34,   22,   33,   34,   22,   33,
-   34,   22,   33,   34,   22,   33,   34,   28,   34,   29,
-   34,   31,   34,   26,   24,   23,   25,   27,1,   22,
-   22,   22,   22,   22,   22,   22,   17,   22,   22,   22,
-   22,   22,   28,   29,   29,   32,   31,   30,   31,   23,
-   22,1,   25,   25,5,   22,   22,   22,   10,   22,
-
-   12,   22,   22,   22,4,   22,   16,   22,   22,   22,
-   22,   20,   18,   19,   23,3,6,   22,   22,9,
-   22,   13,   22,   22,   22,8,   22,   22,   22,   11,
-   22,   15,   22,   22,   22,   22,   22,   22,7,   22,
-   22,   22,   22,   22,   21,2,   14,   22
+   25,   33,   34,   25,   33,   34,   22,   33,   34,   33,
+   34,   22,   33,   34,   22,   33,   34,   22,   33,   34,
+   22,   33,   34,   22,   33,   34,   22,   33,   34,   22,
+   33,   34,   22,   33,   34,   28,   34,   29,   34,   31,
+   34,   26,   24,   23,   25,   27,1,   22,   22,   22,
+   22,   22,   22,   22,   17,   22,   22,   22,   22,   22,
+   28,   29,   29,   32,   31,   30,   31,   23,1,   25,
+   25,5,   22,   22,   22,   10,   22,   12,   22,   22,
+
+   22,4,   22,   16,   22,   22,   22,   22,   20,   18,
+   19,3,6,   22,   22,9,   22,   13,   22,   22,
+   22,8,   22,   22,   22,   11,   22,   15,   22,   22,
+   22,   22,   22,   22,7,   22,   22,   22,   22,   22,
+   21,2,   14,   22
 } ;
 
-static yyconst short int yy_accept[126] =
+static yyconst short int yy_accept[120] =
 {   0,
 1,1,1,2,3,4,6,9,   11,   13,
-   15,   17,   19,   21,   23,   26,   29,   32,   34,   37,
-   40,   43,   46,   49,   52,   55,   58,   60,   62,   64,
-   65,   65,   65,   66,   66,   67,   68,   68,   69,   70,
-   70,   70,   71,   71,   72,   73,   74,   75,   76,   77,
-   79,   80,   81,   82,   83,   84,   85,   86,   87,   88,
-   89,   90,   90,   90,   90,   90,   91,   92,   93,   94,
-   95,   95,   95,   97,   98,   99,  101,  103,  104,  105,
-  107,  109,  110,  111,  112,  113,  114,  115,  115,  116,
-  116,  117,  119,  120,  122,  124,  125,  126,  128,  129,
-
-  130,  130,  132,  134,  135,  136,  137,  137,  138,  139,
-  141,  141,  142,  143,  143,  143,  144,  144,  144,  145,
-  146,  146,  147,  149,  149
+   15,   17,   19,   21,   24,   27,   30,   32,   35,   38,
+   41,   44,   47,   50,   53,   56,   58,   60,   62,   63,
+   63,   63,   64,   65,   66,   67,   68,   68,   68,   69,
+   69,   70,   71,   72,   73,   74,   75,   77,   78,   79,
+   80,   81,   82,   83,   84,   85,   86,   87,   88,   88,
+   88,   88,   89,   90,   91,   92,   92,   92,   94,   95,
+   96,   98,  100,  101,  102,  104,  106,  107,  108,  109,
+  110,  111,  112,  112,  112,  113,  115,  116,  118,  120,
+  121,  122,  124,  125,  126,  126,  128,  130,  131,  132,
+

[llvm-commits] CVS: llvm/utils/TableGen/IntrinsicEmitter.cpp

2007-02-06 Thread Jim Laskey


Changes in directory llvm/utils/TableGen:

IntrinsicEmitter.cpp updated: 1.23 - 1.24
---
Log message:

Error check and eliminate unnecessary value.

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

 IntrinsicEmitter.cpp |   23 +++
 1 files changed, 15 insertions(+), 8 deletions(-)


Index: llvm/utils/TableGen/IntrinsicEmitter.cpp
diff -u llvm/utils/TableGen/IntrinsicEmitter.cpp:1.23 
llvm/utils/TableGen/IntrinsicEmitter.cpp:1.24
--- llvm/utils/TableGen/IntrinsicEmitter.cpp:1.23   Tue Feb  6 12:02:54 2007
+++ llvm/utils/TableGen/IntrinsicEmitter.cppTue Feb  6 12:30:58 2007
@@ -108,11 +108,8 @@
   OS  #endif\n\n;
 }
 
-static void EmitTypeVerify(std::ostream OS, Record *ArgType) {
-  if (ArgType-getValueAsString(TypeVal) == ...) {
-OS  -2, ;
-return;
-  }
+static bool EmitTypeVerify(std::ostream OS, Record *ArgType) {
+  if (ArgType-getValueAsString(TypeVal) == ...)  return true;
   
   OS  (int)  ArgType-getValueAsString(TypeVal)  , ;
   // If this is an integer type, check the width is correct.
@@ -124,6 +121,8 @@
 EmitTypeVerify(OS, ArgType-getValueAsDef(ElTy));
 OS  ArgType-getValueAsInt(NumElts)  , ;
   }
+  
+  return false;
 }
 
 /// RecordListComparator - Provide a determinstic comparator for lists of
@@ -172,9 +171,17 @@
 
 const std::vectorRecord* ArgTypes = I-first;
 OS  VerifyIntrinsicPrototype(IF, ;
-for (unsigned j = 0; j != ArgTypes.size(); ++j)
-  EmitTypeVerify(OS, ArgTypes[j]);
-OS  -1);\n;
+bool VarArg = false;
+for (unsigned j = 0; j != ArgTypes.size(); ++j) {
+  VarArg = EmitTypeVerify(OS, ArgTypes[j]);
+  if (VarArg) {
+if ((j+1) != ArgTypes.size())
+  throw Var arg type not last argument;
+break;
+  }
+}
+  
+OS  (VarArg ? -2);\n : -1);\n);
 OS  break;\n;
   }
   OS}\n;



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


[llvm-commits] CVS: llvm/include/llvm/Support/Dwarf.h

2007-02-01 Thread Jim Laskey


Changes in directory llvm/include/llvm/Support:

Dwarf.h updated: 1.10 - 1.11
---
Log message:

Support for non-landing pad exception handling.

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

 Dwarf.h |   20 +++-
 1 files changed, 19 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/Support/Dwarf.h
diff -u llvm/include/llvm/Support/Dwarf.h:1.10 
llvm/include/llvm/Support/Dwarf.h:1.11
--- llvm/include/llvm/Support/Dwarf.h:1.10  Mon Aug 21 16:18:10 2006
+++ llvm/include/llvm/Support/Dwarf.h   Thu Feb  1 10:31:34 2007
@@ -458,7 +458,25 @@
   DW_CFA_val_offset_sf = 0x15,
   DW_CFA_val_expression = 0x16,
   DW_CFA_lo_user = 0x1c,
-  DW_CFA_hi_user = 0x3f
+  DW_CFA_hi_user = 0x3f,
+
+  DW_EH_PE_absptr = 0x00,
+  DW_EH_PE_omit = 0xff,
+  DW_EH_PE_uleb128 = 0x01,
+  DW_EH_PE_udata2 = 0x02,
+  DW_EH_PE_udata4 = 0x03,
+  DW_EH_PE_udata8 = 0x04,
+  DW_EH_PE_sleb128 = 0x09,
+  DW_EH_PE_sdata2 = 0x0A,
+  DW_EH_PE_sdata4 = 0x0B,
+  DW_EH_PE_sdata8 = 0x0C,
+  DW_EH_PE_signed = 0x08,
+  DW_EH_PE_pcrel = 0x10,
+  DW_EH_PE_textrel = 0x20,
+  DW_EH_PE_datarel = 0x30,
+  DW_EH_PE_funcrel = 0x40,
+  DW_EH_PE_aligned = 0x50,
+  DW_EH_PE_indirect = 0x80
 };
 
 /// TagString - Return the string for the specified tag.



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

2007-02-01 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

MachineModuleInfo.h updated: 1.3 - 1.4
---
Log message:

Support for non-landing pad exception handling.

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

 MachineModuleInfo.h |5 -
 1 files changed, 5 deletions(-)


Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h
diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.3 
llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.4
--- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.3   Mon Jan 29 17:40:33 2007
+++ llvm/include/llvm/CodeGen/MachineModuleInfo.h   Thu Feb  1 10:31:34 2007
@@ -1090,11 +1090,6 @@
 return Lines;
   }
   
-  // FIXME: nuke this.
-  void ClearLineInfo() {
-Lines.clear();
-  }
-  
   /// SetupCompileUnits - Set up the unique vector of compile units.
   ///
   void SetupCompileUnits(Module M);



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


[llvm-commits] CVS: llvm/lib/Target/TargetAsmInfo.cpp

2007-02-01 Thread Jim Laskey


Changes in directory llvm/lib/Target:

TargetAsmInfo.cpp updated: 1.17 - 1.18
---
Log message:

Support for non-landing pad exception handling.

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

 TargetAsmInfo.cpp |2 ++
 1 files changed, 2 insertions(+)


Index: llvm/lib/Target/TargetAsmInfo.cpp
diff -u llvm/lib/Target/TargetAsmInfo.cpp:1.17 
llvm/lib/Target/TargetAsmInfo.cpp:1.18
--- llvm/lib/Target/TargetAsmInfo.cpp:1.17  Mon Jan 29 12:51:14 2007
+++ llvm/lib/Target/TargetAsmInfo.cpp   Thu Feb  1 10:31:34 2007
@@ -24,6 +24,7 @@
   AddressSize(4),
   NeedsSet(false),
   MaxInstLength(4),
+  PCSymbol($),
   SeparatorChar(';'),
   CommentString(#),
   GlobalPrefix(),
@@ -84,6 +85,7 @@
   DwarfARangesSection(.debug_aranges),
   DwarfRangesSection(.debug_ranges),
   DwarfMacInfoSection(.debug_macinfo),
+  DwarfEHFrameSection(.eh_frame),
   AsmTransCBE(0) {
 }
 



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


[llvm-commits] CVS: llvm/include/llvm/Target/TargetAsmInfo.h

2007-02-01 Thread Jim Laskey


Changes in directory llvm/include/llvm/Target:

TargetAsmInfo.h updated: 1.24 - 1.25
---
Log message:

Support for non-landing pad exception handling.

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

 TargetAsmInfo.h |   19 ++-
 1 files changed, 18 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/Target/TargetAsmInfo.h
diff -u llvm/include/llvm/Target/TargetAsmInfo.h:1.24 
llvm/include/llvm/Target/TargetAsmInfo.h:1.25
--- llvm/include/llvm/Target/TargetAsmInfo.h:1.24   Mon Jan 29 12:51:14 2007
+++ llvm/include/llvm/Target/TargetAsmInfo.hThu Feb  1 10:31:34 2007
@@ -51,7 +51,7 @@
 /// AddressSize - Size of addresses used in file.
 ///
 unsigned AddressSize; // Defaults to 4.
-
+
 /// NeedsSet - True if target asm can't compute addresses on data
 /// directives.
 bool NeedsSet;// Defaults to false.
@@ -60,6 +60,10 @@
 /// which is needed to compute the size of an inline asm.
 unsigned MaxInstLength;   // Defaults to 4.
 
+/// PCSymbol - The symbol used to represent the current PC.  Used in PC
+/// relative expressions.
+const char *PCSymbol; // Defaults to $.
+
 /// SeparatorChar - This character, if specified, is used to separate
 /// instructions from each other when on the same line.  This is used to
 /// measure inline asm instructions.
@@ -305,6 +309,10 @@
 /// DwarfMacInfoSection - Section directive for Dwarf info.
 ///
 const char *DwarfMacInfoSection; // Defaults to .debug_macinfo.
+
+/// DwarfEHFrameSection - Section directive for Exception frames.
+///
+const char *DwarfEHFrameSection; // Defaults to .eh_frame.
 
 //===--- CBE Asm Translation Table ---===//
 
@@ -346,6 +354,12 @@
 bool needsSet() const {
   return NeedsSet;
 }
+const char *getPCSymbol() const {
+  return PCSymbol;
+}
+char getSeparatorChar() const {
+  return SeparatorChar;
+}
 const char *getCommentString() const {
   return CommentString;
 }
@@ -523,6 +537,9 @@
 const char *getDwarfMacInfoSection() const {
   return DwarfMacInfoSection;
 }
+const char *getDwarfEHFrameSection() const {
+  return DwarfEHFrameSection;
+}
 const char** getAsmCBE() const {
   return AsmTransCBE;
 }



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


[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp DwarfWriter.cpp MachineModuleInfo.cpp

2007-02-01 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

AsmPrinter.cpp updated: 1.141 - 1.142
DwarfWriter.cpp updated: 1.122 - 1.123
MachineModuleInfo.cpp updated: 1.2 - 1.3
---
Log message:

Support for non-landing pad exception handling.

---
Diffs of the changes:  (+272 -173)

 AsmPrinter.cpp|4 
 DwarfWriter.cpp   |  438 ++
 MachineModuleInfo.cpp |3 
 3 files changed, 272 insertions(+), 173 deletions(-)


Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.141 
llvm/lib/CodeGen/AsmPrinter.cpp:1.142
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.141   Fri Jan 26 15:22:28 2007
+++ llvm/lib/CodeGen/AsmPrinter.cpp Thu Feb  1 10:31:34 2007
@@ -1032,8 +1032,8 @@
 /// printLabel - This method prints a local label used by debug and
 /// exception handling tables.
 void AsmPrinter::printLabel(const MachineInstr *MI) const {
-  if (AsmVerbose) O  \n;
-  O  TAI-getPrivateGlobalPrefix()
+  O  \n
+ TAI-getPrivateGlobalPrefix()
  debug_loc
  MI-getOperand(0).getImmedValue()
  :\n;


Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.122 
llvm/lib/CodeGen/DwarfWriter.cpp:1.123
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.122  Mon Jan 29 17:40:33 2007
+++ llvm/lib/CodeGen/DwarfWriter.cppThu Feb  1 10:31:34 2007
@@ -824,62 +824,13 @@
   // Accessors.
   //
   AsmPrinter *getAsm() const { return Asm; }
+  MachineModuleInfo *getMMI() const { return MMI; }
   const TargetAsmInfo *getTargetAsmInfo() const { return TAI; }
 
   /// ShouldEmitDwarf - Returns true if Dwarf declarations should be made.
   ///
   bool ShouldEmitDwarf() const { return shouldEmit; }
 
-};
-
-//===--===//
-/// DwarfDebug - Emits Dwarf debug directives. 
-///
-class DwarfDebug : public Dwarf {
-
-private:
-  
//======//
-  // Attributes used to construct specific Dwarf sections.
-  //
-  
-  /// CompileUnits - All the compile units involved in this build.  The index
-  /// of each entry in this vector corresponds to the sources in MMI.
-  std::vectorCompileUnit * CompileUnits;
-  
-  /// AbbreviationsSet - Used to uniquely define abbreviations.
-  ///
-  FoldingSetDIEAbbrev AbbreviationsSet;
-
-  /// Abbreviations - A list of all the unique abbreviations in use.
-  ///
-  std::vectorDIEAbbrev * Abbreviations;
-  
-  /// ValuesSet - Used to uniquely define values.
-  ///
-  FoldingSetDIEValue ValuesSet;
-  
-  /// Values - A list of all the unique values in use.
-  ///
-  std::vectorDIEValue * Values;
-  
-  /// StringPool - A UniqueVector of strings used by indirect references.
-  ///
-  UniqueVectorstd::string StringPool;
-
-  /// UnitMap - Map debug information descriptor to compile unit.
-  ///
-  std::mapDebugInfoDesc *, CompileUnit * DescToUnitMap;
-  
-  /// SectionMap - Provides a unique id per text section.
-  ///
-  UniqueVectorstd::string SectionMap;
-  
-  /// SectionSourceLines - Tracks line numbers per text section.
-  ///
-  std::vectorstd::vectorSourceLineInfo  SectionSourceLines;
-
-
-public:
 
   /// PrintLabelName - Print label name in form used by Dwarf writer.
   ///
@@ -905,24 +856,29 @@
   
   /// EmitReference - Emit a reference to a label.
   ///
-  void EmitReference(DWLabel Label) const {
-EmitReference(Label.Tag, Label.Number);
+  void EmitReference(DWLabel Label, bool IsPCRelative = false) const {
+EmitReference(Label.Tag, Label.Number, IsPCRelative);
   }
-  void EmitReference(const char *Tag, unsigned Number) const {
+  void EmitReference(const char *Tag, unsigned Number,
+ bool IsPCRelative = false) const {
 if (TAI-getAddressSize() == sizeof(int32_t))
   O  TAI-getData32bitsDirective();
 else
   O  TAI-getData64bitsDirective();
   
 PrintLabelName(Tag, Number);
+
+if (IsPCRelative) O  -  TAI-getPCSymbol();
   }
-  void EmitReference(const std::string Name) const {
+  void EmitReference(const std::string Name, bool IsPCRelative = false) const 
{
 if (TAI-getAddressSize() == sizeof(int32_t))
   O  TAI-getData32bitsDirective();
 else
   O  TAI-getData64bitsDirective();
   
 O  Name;
+
+if (IsPCRelative) O  -  TAI-getPCSymbol();
   }
 
   /// EmitDifference - Emit the difference between two labels.  Some
@@ -938,7 +894,7 @@
   const char *TagLo, unsigned NumberLo,
   bool IsSmall = false) const {
 if (TAI-needsSet()) {
-  static unsigned SetCounter = 0;
+  static unsigned SetCounter = 1;
   
   O  \t.set\t;
   PrintLabelName(set, SetCounter);
@@ -968,6 +924,151 @@
 }
   }
   
+  /// EmitFrameMoves - Emit frame instructions to describe the layout of the
+  /// frame.
+  void EmitFrameMoves(const char *BaseLabel, unsigned BaseLabelID,
+   

[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp DwarfWriter.cpp

2007-02-01 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

AsmPrinter.cpp updated: 1.142 - 1.143
DwarfWriter.cpp updated: 1.123 - 1.124
---
Log message:

Emit labels as label_n and not as debug_n

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

 AsmPrinter.cpp  |2 +-
 DwarfWriter.cpp |   16 
 2 files changed, 9 insertions(+), 9 deletions(-)


Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.142 
llvm/lib/CodeGen/AsmPrinter.cpp:1.143
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.142   Thu Feb  1 10:31:34 2007
+++ llvm/lib/CodeGen/AsmPrinter.cpp Thu Feb  1 11:46:10 2007
@@ -1034,7 +1034,7 @@
 void AsmPrinter::printLabel(const MachineInstr *MI) const {
   O  \n
  TAI-getPrivateGlobalPrefix()
- debug_loc
+ label_
  MI-getOperand(0).getImmedValue()
  :\n;
 }


Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.123 
llvm/lib/CodeGen/DwarfWriter.cpp:1.124
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.123  Thu Feb  1 10:31:34 2007
+++ llvm/lib/CodeGen/DwarfWriter.cppThu Feb  1 11:46:10 2007
@@ -80,7 +80,7 @@
 if (O) print(*O);
   }
   void print(std::ostream O) const {
-O  .debug_  Tag;
+O  .D  Tag;
 if (Number) O  Number;
   }
 #endif
@@ -839,7 +839,7 @@
   }
   void PrintLabelName(const char *Tag, unsigned Number) const {
 O  TAI-getPrivateGlobalPrefix()
-   debug_
+   ((Tag  *Tag) ? debug_ : label_)
Tag;
 if (Number) O  Number;
   }
@@ -932,7 +932,7 @@
 Asm-TM.getFrameInfo()-getStackGrowthDirection() ==
   TargetFrameInfo::StackGrowsUp ?
 TAI-getAddressSize() : -TAI-getAddressSize();
-bool IsLocal = BaseLabel  strcmp(BaseLabel, loc) == 0;
+bool IsLocal = BaseLabel  strcmp(BaseLabel, ) == 0;
 
 for (unsigned i = 0, N = Moves.size(); i  N; ++i) {
   MachineMove Move = Moves[i];
@@ -952,11 +952,11 @@
   if (BaseLabel  LabelID  (BaseLabelID != LabelID || !IsLocal)) {
 Asm-EmitInt8(DW_CFA_advance_loc4);
 Asm-EOL(DW_CFA_advance_loc4);
-EmitDifference(loc, LabelID, BaseLabel, BaseLabelID, true);
+EmitDifference(, LabelID, BaseLabel, BaseLabelID, true);
 Asm-EOL();
 
 BaseLabelID = LabelID;
-BaseLabel = loc;
+BaseLabel = ;
 IsLocal = true;
   }
   
@@ -1850,14 +1850,14 @@
 // Add the scope bounds.
 if (StartID) {
   AddLabel(ScopeDie, DW_AT_low_pc, DW_FORM_addr,
- DWLabel(loc, StartID));
+ DWLabel(, StartID));
 } else {
   AddLabel(ScopeDie, DW_AT_low_pc, DW_FORM_addr,
  DWLabel(func_begin, SubprogramCount));
 }
 if (EndID) {
   AddLabel(ScopeDie, DW_AT_high_pc, DW_FORM_addr,
- DWLabel(loc, EndID));
+ DWLabel(, EndID));
 } else {
   AddLabel(ScopeDie, DW_AT_high_pc, DW_FORM_addr,
  DWLabel(func_end, SubprogramCount));
@@ -2217,7 +2217,7 @@
 Asm-EmitInt8(0); Asm-EOL(Extended Op);
 Asm-EmitInt8(TAI-getAddressSize() + 1); Asm-EOL(Op size);
 Asm-EmitInt8(DW_LNE_set_address); Asm-EOL(DW_LNE_set_address);
-EmitReference(loc,  LabelID); Asm-EOL(Location label);
+EmitReference(,  LabelID); Asm-EOL(Location label);
 
 // If change of source, then switch to the new source.
 if (Source != LineInfo.getSourceID()) {



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


[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp

2007-02-01 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

DwarfWriter.cpp updated: 1.124 - 1.125
---
Log message:

Slip up

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

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


Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.124 
llvm/lib/CodeGen/DwarfWriter.cpp:1.125
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.124  Thu Feb  1 11:46:10 2007
+++ llvm/lib/CodeGen/DwarfWriter.cppThu Feb  1 11:48:20 2007
@@ -80,7 +80,7 @@
 if (O) print(*O);
   }
   void print(std::ostream O) const {
-O  .D  Tag;
+O  .debug_  Tag;
 if (Number) O  Number;
   }
 #endif



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


[llvm-commits] CVS: llvm/Xcode/LLVM.xcodeproj/project.pbxproj

2007-01-29 Thread Jim Laskey


Changes in directory llvm/Xcode/LLVM.xcodeproj:

project.pbxproj updated: 1.29 - 1.30
---
Log message:

Update project.

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

 project.pbxproj |   10 --
 1 files changed, 4 insertions(+), 6 deletions(-)


Index: llvm/Xcode/LLVM.xcodeproj/project.pbxproj
diff -u llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.29 
llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.30
--- llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.29  Tue Jan 23 21:42:03 2007
+++ llvm/Xcode/LLVM.xcodeproj/project.pbxproj   Mon Jan 29 09:09:35 2007
@@ -123,9 +123,9 @@
CF65281209D1BA3800C4B521 /* SparcSubtarget.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
SparcSubtarget.h; path = ../lib/Target/Sparc/SparcSubtarget.h; sourceTree = 
SOURCE_ROOT; };
CF65281309D1BA3800C4B521 /* SparcTargetMachine.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
name = SparcTargetMachine.cpp; path = 
../lib/Target/Sparc/SparcTargetMachine.cpp; sourceTree = SOURCE_ROOT; };
CF65281409D1BA3800C4B521 /* SparcTargetMachine.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
SparcTargetMachine.h; path = ../lib/Target/Sparc/SparcTargetMachine.h; 
sourceTree = SOURCE_ROOT; };
-   CF6529A6095B21A8007F884E /* MachineDebugInfo.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = MachineDebugInfo.cpp; sourceTree = group; };
+   CF6529A6095B21A8007F884E /* MachineModuleInfo.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = MachineModuleInfo.cpp; sourceTree = group; };
CF6B5AFD095C82C300D1EA42 /* DAGCombiner.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = DAGCombiner.cpp; sourceTree = group; };
-   CF6F487109505E1500BC9E82 /* MachineDebugInfo.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
MachineDebugInfo.h; sourceTree = group; };
+   CF6F487109505E1500BC9E82 /* MachineModuleInfo.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
MachineModuleInfo.h; sourceTree = group; };
CF71B60F0AC45EDA0007F57C /* SmallVector.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
SmallVector.h; sourceTree = group; };
CF73C0A2098A4FDF00627152 /* InlineAsm.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
InlineAsm.h; sourceTree = group; };
CF73C0A3098A4FDF00627152 /* TypeSymbolTable.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
TypeSymbolTable.h; sourceTree = group; };
@@ -1257,7 +1257,7 @@
DE66ED7508ABEC2B00323D32 /* LiveVariables.cpp 
*/,
CF32AF5C0AEE6A4E00D24CD4 /* 
LLVMTargetMachine.cpp */,
DE66ED7608ABEC2B00323D32 /* 
MachineBasicBlock.cpp */,
-   CF6529A6095B21A8007F884E /* 
MachineDebugInfo.cpp */,
+   CF6529A6095B21A8007F884E /* 
MachineModuleInfo.cpp */,
DE66ED7808ABEC2B00323D32 /* MachineFunction.cpp 
*/,
DE66ED7908ABEC2B00323D32 /* MachineInstr.cpp */,
CF4F27F60A7B6FA3004359F6 /* 
MachinePassRegistry.cpp */,
@@ -2030,7 +2030,7 @@
DE66F23B08ABF03100323D32 /* MachineBasicBlock.h 
*/,
DE66F23C08ABF03100323D32 /* 
MachineCodeEmitter.h */,
DE66F23D08ABF03100323D32 /* 
MachineConstantPool.h */,
-   CF6F487109505E1500BC9E82 /* MachineDebugInfo.h 
*/,
+   CF6F487109505E1500BC9E82 /* MachineModuleInfo.h 
*/,
DE66F23E08ABF03100323D32 /* MachineFrameInfo.h 
*/,
DE66F23F08ABF03100323D32 /* MachineFunction.h 
*/,
DE66F24008ABF03100323D32 /* 
MachineFunctionPass.h */,
@@ -2543,12 +2543,10 @@
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = DE66EC5008ABE78900323D32 /* 
Build configuration list for PBXProject LLVM */;
-   compatibilityVersion = Xcode 2.4;
hasScannedForEncodings = 1;
mainGroup = 08FB7794FE84155DC02AAC07 /* LLVM */;
projectDirPath = ;
projectRoot = ;
-   shouldCheckCompatibility = 1;
targets = (

[llvm-commits] CVS: llvm/Xcode/LLVM.xcodeproj/project.pbxproj

2007-01-29 Thread Jim Laskey


Changes in directory llvm/Xcode/LLVM.xcodeproj:

project.pbxproj updated: 1.30 - 1.31
---
Log message:

Update project

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

 project.pbxproj |6 --
 1 files changed, 6 deletions(-)


Index: llvm/Xcode/LLVM.xcodeproj/project.pbxproj
diff -u llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.30 
llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.31
--- llvm/Xcode/LLVM.xcodeproj/project.pbxproj:1.30  Mon Jan 29 09:09:35 2007
+++ llvm/Xcode/LLVM.xcodeproj/project.pbxproj   Mon Jan 29 12:45:08 2007
@@ -154,13 +154,11 @@
CF8F1B420B64F70B00BB4199 /* PassManagers.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
PassManagers.h; sourceTree = group; };
CF8F1B430B64F74400BB4199 /* Allocator.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
Allocator.h; sourceTree = group; };
CF8F1B440B64F74400BB4199 /* Compiler.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
Compiler.h; sourceTree = group; };
-   CF8F1B450B64F74400BB4199 /* Disassembler.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
Disassembler.h; sourceTree = group; };
CF8F1B460B64F74400BB4199 /* ManagedStatic.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
ManagedStatic.h; sourceTree = group; };
CF8F1B470B64F74400BB4199 /* OutputBuffer.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
OutputBuffer.h; sourceTree = group; };
CF8F1B490B64F7AB00BB4199 /* LinkTimeOptimizer.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
LinkTimeOptimizer.h; sourceTree = group; };
CF8F1B4D0B64F80700BB4199 /* AliasDebugger.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = AliasDebugger.cpp; sourceTree = group; };
CF8F1B4E0B64F86A00BB4199 /* CStringMap.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = CStringMap.cpp; sourceTree = group; };
-   CF8F1B4F0B64F86A00BB4199 /* Disassembler.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = Disassembler.cpp; sourceTree = group; };
CF8F1B500B64F86A00BB4199 /* ManagedStatic.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = ManagedStatic.cpp; sourceTree = group; };
CF8F1B510B64F86A00BB4199 /* Streams.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = Streams.cpp; sourceTree = group; };
CF8F1B530B64F8C000BB4199 /* IncludeFile.cpp */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; 
path = IncludeFile.cpp; sourceTree = group; };
@@ -396,7 +394,6 @@
DE66ECA508ABEB8000323D32 /* ArchiveWriter.cpp */ = {isa = 
PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; 
path = ArchiveWriter.cpp; sourceTree = group; };
DE66ECB708ABEB8000323D32 /* SlotCalculator.cpp */ = {isa = 
PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; 
path = SlotCalculator.cpp; sourceTree = group; };
DE66ECB808ABEB8000323D32 /* SlotCalculator.h */ = {isa = 
PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = 
SlotCalculator.h; sourceTree = group; };
-   DE66ECB908ABEB8000323D32 /* SlotTable.h */ = {isa = 
PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = 
SlotTable.h; sourceTree = group; };
DE66ECBA08ABEB8000323D32 /* Writer.cpp */ = {isa = 
PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; 
path = Writer.cpp; sourceTree = group; };
DE66ECBB08ABEB8000323D32 /* WriterInternals.h */ = {isa = 
PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = 
WriterInternals.h; sourceTree = group; };
DE66ECBE08ABEC0700323D32 /* AliasAnalysis.cpp */ = {isa = 
PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; 
path = AliasAnalysis.cpp; sourceTree = group; };
@@ -1182,7 +1179,6 @@
children = (
DE66ECB708ABEB8000323D32 /* SlotCalculator.cpp 
*/,
DE66ECB808ABEB8000323D32 /* SlotCalculator.h */,
-   DE66ECB908ABEB8000323D32 /* SlotTable.h */,
DE66ECBA08ABEB8000323D32 /* Writer.cpp */,
DE66ECBB08ABEB8000323D32 /* WriterInternals.h 
*/,
);
@@ -1368,7 +1364,6 @@
   

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

2007-01-29 Thread Jim Laskey


Changes in directory llvm/include/llvm/CodeGen:

DwarfWriter.h updated: 1.44 - 1.45
---
Log message:

Landing pad-less eh for PPC.

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

 DwarfWriter.h |   19 ---
 1 files changed, 12 insertions(+), 7 deletions(-)


Index: llvm/include/llvm/CodeGen/DwarfWriter.h
diff -u llvm/include/llvm/CodeGen/DwarfWriter.h:1.44 
llvm/include/llvm/CodeGen/DwarfWriter.h:1.45
--- llvm/include/llvm/CodeGen/DwarfWriter.h:1.44Fri Jan 26 15:22:27 2007
+++ llvm/include/llvm/CodeGen/DwarfWriter.h Mon Jan 29 12:51:14 2007
@@ -7,11 +7,11 @@
 //
 
//===--===//
 //
-// This file contains support for writing Dwarf debug info into asm files.  For
-// Details on the Dwarf 3 specfication see DWARF Debugging Information Format
-// V.3 reference manual http://dwarf.freestandards.org ,
+// This file contains support for writing Dwarf debug and exception info into
+// asm files.  For Details on the Dwarf 3 specfication see DWARF Debugging
+// Information Format V.3 reference manual http://dwarf.freestandards.org ,
 //
-// The role of the Dwarf Writer class is to extract debug information from the
+// The role of the Dwarf Writer class is to extract information from the
 // MachineModuleInfo object, organize it in Dwarf form and then emit it into 
asm
 // the current asm file using data and high level Dwarf directives.
 // 
@@ -25,7 +25,8 @@
 namespace llvm {
 
 class AsmPrinter;
-class Dwarf;
+class DwarfDebug;
+class DwarfException;
 class MachineModuleInfo;
 class MachineFunction;
 class Module;
@@ -37,9 +38,13 @@
 
 class DwarfWriter {
 private:
-  /// DM - Provides the DwarfWriter implementation.
+  /// DD - Provides the DwarfWriter debug implementation.
   ///
-  Dwarf *DW;
+  DwarfDebug *DD;
+
+  /// DE - Provides the DwarfWriter exception implementation.
+  ///
+  DwarfException *DE;
   
 public:
   



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


[llvm-commits] CVS: llvm/lib/Target/X86/X86RegisterInfo.cpp

2007-01-29 Thread Jim Laskey


Changes in directory llvm/lib/Target/X86:

X86RegisterInfo.cpp updated: 1.198 - 1.199
---
Log message:

Landing pad-less eh for PPC.

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

 X86RegisterInfo.cpp |7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)


Index: llvm/lib/Target/X86/X86RegisterInfo.cpp
diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.198 
llvm/lib/Target/X86/X86RegisterInfo.cpp:1.199
--- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.198   Fri Jan 26 15:22:28 2007
+++ llvm/lib/Target/X86/X86RegisterInfo.cpp Mon Jan 29 12:51:14 2007
@@ -997,8 +997,7 @@
   MachineInstr *MI;
   MachineModuleInfo *MMI = MFI-getMachineModuleInfo();
   
-  // Prepare for debug frame info.
-  bool hasDebugInfo = MMI  MMI-hasDebugInfo();
+  // Prepare for frame info.
   unsigned FrameLabelId = 0;
   
   // Get the number of bytes to allocate from the FrameInfo
@@ -1023,7 +1022,7 @@
 }
   }
 
-  if (hasDebugInfo) {
+  if (MMI) {
 // Mark effective beginning of when frame pointer becomes valid.
 FrameLabelId = MMI-NextLabelID();
 BuildMI(MBB, MBBI, TII.get(X86::LABEL)).addImm(FrameLabelId);
@@ -1053,7 +1052,7 @@
 MBB.insert(MBBI, MI);
   }
 
-  if (hasDebugInfo) {
+  if (MMI) {
 std::vectorMachineMove Moves = MMI-getFrameMoves();
 
 if (NumBytes) {



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


[llvm-commits] CVS: llvm/include/llvm/Target/TargetAsmInfo.h

2007-01-29 Thread Jim Laskey


Changes in directory llvm/include/llvm/Target:

TargetAsmInfo.h updated: 1.23 - 1.24
---
Log message:

Landing pad-less eh for PPC.

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

 TargetAsmInfo.h |   14 ++
 1 files changed, 14 insertions(+)


Index: llvm/include/llvm/Target/TargetAsmInfo.h
diff -u llvm/include/llvm/Target/TargetAsmInfo.h:1.23 
llvm/include/llvm/Target/TargetAsmInfo.h:1.24
--- llvm/include/llvm/Target/TargetAsmInfo.h:1.23   Wed Jan 17 19:12:56 2007
+++ llvm/include/llvm/Target/TargetAsmInfo.hMon Jan 29 12:51:14 2007
@@ -202,6 +202,10 @@
 
 //===--- Global Variable Emission Directives 
--===//
 
+/// GlobalDirective - This is the directive used to declare a global 
entity.
+///
+const char *GlobalDirective;  // Defaults to NULL.
+
 /// SetDirective - This is the name of a directive that can be used to tell
 /// the assembler to set the value of a variable to some expression.
 const char *SetDirective; // Defaults to null.
@@ -250,6 +254,10 @@
 ///
 bool HasDotFile; // Defaults to false.
 
+/// SupportsExceptionHandling - True if target supports exception handling.
+///
+bool SupportsExceptionHandling; // Defaults to false.
+
 /// RequiresFrameSection - true if the Dwarf2 output needs a frame section
 ///
 bool DwarfRequiresFrameSection; // Defaults to true.
@@ -440,6 +448,9 @@
 const char *getSixteenByteConstantSection() const {
   return SixteenByteConstantSection;
 }
+const char *getGlobalDirective() const {
+  return GlobalDirective;
+}
 const char *getSetDirective() const {
   return SetDirective;
 }
@@ -473,6 +484,9 @@
 bool hasDotFile() const {
   return HasDotFile;
 }
+bool getSupportsExceptionHandling() const {
+  return SupportsExceptionHandling;
+}
 bool getDwarfRequiresFrameSection() const {
   return DwarfRequiresFrameSection;
 }



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


[llvm-commits] CVS: llvm/lib/Target/TargetAsmInfo.cpp

2007-01-29 Thread Jim Laskey


Changes in directory llvm/lib/Target:

TargetAsmInfo.cpp updated: 1.16 - 1.17
---
Log message:

Landing pad-less eh for PPC.

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

 TargetAsmInfo.cpp |2 ++
 1 files changed, 2 insertions(+)


Index: llvm/lib/Target/TargetAsmInfo.cpp
diff -u llvm/lib/Target/TargetAsmInfo.cpp:1.16 
llvm/lib/Target/TargetAsmInfo.cpp:1.17
--- llvm/lib/Target/TargetAsmInfo.cpp:1.16  Wed Jan 17 19:12:56 2007
+++ llvm/lib/Target/TargetAsmInfo.cpp   Mon Jan 29 12:51:14 2007
@@ -59,6 +59,7 @@
   FourByteConstantSection(0),
   EightByteConstantSection(0),
   SixteenByteConstantSection(0),
+  GlobalDirective(0),
   SetDirective(0),
   LCOMMDirective(0),
   COMMDirective(\t.comm\t),
@@ -70,6 +71,7 @@
   HasLEB128(false),
   HasDotLoc(false),
   HasDotFile(false),
+  SupportsExceptionHandling(false),
   DwarfRequiresFrameSection(true),
   DwarfAbbrevSection(.debug_abbrev),
   DwarfInfoSection(.debug_info),



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


[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp PPCTargetAsmInfo.cpp

2007-01-29 Thread Jim Laskey


Changes in directory llvm/lib/Target/PowerPC:

PPCRegisterInfo.cpp updated: 1.101 - 1.102
PPCTargetAsmInfo.cpp updated: 1.14 - 1.15
---
Log message:

Landing pad-less eh for PPC.

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

 PPCRegisterInfo.cpp  |7 +++
 PPCTargetAsmInfo.cpp |2 ++
 2 files changed, 5 insertions(+), 4 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.101 
llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.102
--- llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp:1.101   Fri Jan 26 15:22:28 2007
+++ llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp Mon Jan 29 12:51:14 2007
@@ -756,8 +756,7 @@
   MachineFrameInfo *MFI = MF.getFrameInfo();
   MachineModuleInfo *MMI = MFI-getMachineModuleInfo();
   
-  // Prepare for debug frame info.
-  bool hasDebugInfo = MMI  MMI-hasDebugInfo();
+  // Prepare for frame info.
   unsigned FrameLabelId = 0;
   
   // Scan the prolog, looking for an UPDATE_VRSAVE instruction.  If we find it,
@@ -819,7 +818,7 @@
   unsigned TargetAlign = MF.getTarget().getFrameInfo()-getStackAlignment();
   unsigned MaxAlign = MFI-getMaxAlignment();
 
-  if (hasDebugInfo) {
+  if (MMI) {
 // Mark effective beginning of when frame pointer becomes valid.
 FrameLabelId = MMI-NextLabelID();
 BuildMI(MBB, MBBI, TII.get(PPC::LABEL)).addImm(FrameLabelId);
@@ -870,7 +869,7 @@
 }
   }
   
-  if (hasDebugInfo) {
+  if (MMI) {
 std::vectorMachineMove Moves = MMI-getFrameMoves();
 
 if (NegFrameSize) {


Index: llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.14 
llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.15
--- llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp:1.14   Wed Jan 17 19:15:58 2007
+++ llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cppMon Jan 29 12:51:14 2007
@@ -51,12 +51,14 @@
   PrivateGlobalPrefix = L;
   ConstantPoolSection = \t.const\t;
   JumpTableDataSection = .const;
+  GlobalDirective = \t.globl\t;
   CStringSection = \t.cstring;
   StaticCtorsSection = .mod_init_func;
   StaticDtorsSection = .mod_term_func;
   UsedDirective = \t.no_dead_strip\t;
   WeakRefDirective = \t.weak_reference\t;
   HiddenDirective = \t.private_extern\t;
+  SupportsExceptionHandling = true;
   
   // In non-PIC modes, emit a special label before jump tables so that the
   // linker can perform more accurate dead code stripping.



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


[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp

2007-01-29 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

DwarfWriter.cpp updated: 1.117 - 1.118
---
Log message:

Landing pad-less eh for PPC.

---
Diffs of the changes:  (+198 -114)

 DwarfWriter.cpp |  312 +++-
 1 files changed, 198 insertions(+), 114 deletions(-)


Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.117 
llvm/lib/CodeGen/DwarfWriter.cpp:1.118
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.117  Fri Jan 26 15:22:28 2007
+++ llvm/lib/CodeGen/DwarfWriter.cppMon Jan 29 12:51:14 2007
@@ -7,7 +7,7 @@
 //
 
//===--===//
 //
-// This file contains support for writing dwarf debug info into asm files.
+// This file contains support for writing dwarf info into asm files.
 //
 
//===--===//
 
@@ -180,7 +180,7 @@
   
   /// Emit - Print the abbreviation using the specified Dwarf writer.
   ///
-  void Emit(const Dwarf DW) const; 
+  void Emit(const DwarfDebug DD) const; 
   
 #ifndef NDEBUG
   void print(std::ostream *O) {
@@ -313,11 +313,11 @@
   
   /// EmitValue - Emit value via the Dwarf writer.
   ///
-  virtual void EmitValue(const Dwarf DW, unsigned Form) const = 0;
+  virtual void EmitValue(const DwarfDebug DD, unsigned Form) const = 0;
   
   /// SizeOf - Return the size of a value in bytes.
   ///
-  virtual unsigned SizeOf(const Dwarf DW, unsigned Form) const = 0;
+  virtual unsigned SizeOf(const DwarfDebug DD, unsigned Form) const = 0;
   
   /// Profile - Used to gather unique data for the value folding set.
   ///
@@ -363,11 +363,11 @@
 
   /// EmitValue - Emit integer of appropriate size.
   ///
-  virtual void EmitValue(const Dwarf DW, unsigned Form) const;
+  virtual void EmitValue(const DwarfDebug DD, unsigned Form) const;
   
   /// SizeOf - Determine size of integer value in bytes.
   ///
-  virtual unsigned SizeOf(const Dwarf DW, unsigned Form) const;
+  virtual unsigned SizeOf(const DwarfDebug DD, unsigned Form) const;
   
   /// Profile - Used to gather unique data for the value folding set.
   ///
@@ -400,11 +400,11 @@
   
   /// EmitValue - Emit string value.
   ///
-  virtual void EmitValue(const Dwarf DW, unsigned Form) const;
+  virtual void EmitValue(const DwarfDebug DD, unsigned Form) const;
   
   /// SizeOf - Determine size of string value in bytes.
   ///
-  virtual unsigned SizeOf(const Dwarf DW, unsigned Form) const {
+  virtual unsigned SizeOf(const DwarfDebug DD, unsigned Form) const {
 return String.size() + sizeof(char); // sizeof('\0');
   }
   
@@ -439,11 +439,11 @@
   
   /// EmitValue - Emit label value.
   ///
-  virtual void EmitValue(const Dwarf DW, unsigned Form) const;
+  virtual void EmitValue(const DwarfDebug DD, unsigned Form) const;
   
   /// SizeOf - Determine size of label value in bytes.
   ///
-  virtual unsigned SizeOf(const Dwarf DW, unsigned Form) const;
+  virtual unsigned SizeOf(const DwarfDebug DD, unsigned Form) const;
   
   /// Profile - Used to gather unique data for the value folding set.
   ///
@@ -477,11 +477,11 @@
   
   /// EmitValue - Emit label value.
   ///
-  virtual void EmitValue(const Dwarf DW, unsigned Form) const;
+  virtual void EmitValue(const DwarfDebug DD, unsigned Form) const;
   
   /// SizeOf - Determine size of label value in bytes.
   ///
-  virtual unsigned SizeOf(const Dwarf DW, unsigned Form) const;
+  virtual unsigned SizeOf(const DwarfDebug DD, unsigned Form) const;
   
   /// Profile - Used to gather unique data for the value folding set.
   ///
@@ -515,11 +515,11 @@
   
   /// EmitValue - Emit delta value.
   ///
-  virtual void EmitValue(const Dwarf DW, unsigned Form) const;
+  virtual void EmitValue(const DwarfDebug DD, unsigned Form) const;
   
   /// SizeOf - Determine size of delta value in bytes.
   ///
-  virtual unsigned SizeOf(const Dwarf DW, unsigned Form) const;
+  virtual unsigned SizeOf(const DwarfDebug DD, unsigned Form) const;
   
   /// Profile - Used to gather unique data for the value folding set.
   ///
@@ -557,11 +557,11 @@
   
   /// EmitValue - Emit debug information entry offset.
   ///
-  virtual void EmitValue(const Dwarf DW, unsigned Form) const;
+  virtual void EmitValue(const DwarfDebug DD, unsigned Form) const;
   
   /// SizeOf - Determine size of debug information entry in bytes.
   ///
-  virtual unsigned SizeOf(const Dwarf DW, unsigned Form) const {
+  virtual unsigned SizeOf(const DwarfDebug DD, unsigned Form) const {
 return sizeof(int32_t);
   }
   
@@ -609,7 +609,7 @@
   
   /// ComputeSize - calculate the size of the block.
   ///
-  unsigned ComputeSize(Dwarf DW);
+  unsigned ComputeSize(DwarfDebug DD);
   
   /// BestForm - Choose the best form for data.
   ///
@@ -622,11 +622,11 @@
 
   /// EmitValue - Emit block data.
   ///
-  virtual void EmitValue(const Dwarf DW, unsigned Form) const;
+  virtual void EmitValue(const DwarfDebug DD, unsigned 

[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp

2007-01-29 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

DwarfWriter.cpp updated: 1.118 - 1.119
---
Log message:

Disable zero landing pads for now.

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

 DwarfWriter.cpp |3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.118 
llvm/lib/CodeGen/DwarfWriter.cpp:1.119
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.118  Mon Jan 29 12:51:14 2007
+++ llvm/lib/CodeGen/DwarfWriter.cppMon Jan 29 14:01:41 2007
@@ -2707,7 +2707,7 @@
   ///
   void EndFunction() {
 if (!ShouldEmitDwarf()) return;
-
+#if 0
 if (const char *GlobalDirective = TAI-getGlobalDirective())
   O  GlobalDirective  getAsm()-CurrentFnName  .eh\n;
   
@@ -2715,6 +2715,7 @@
 
 if (const char *UsedDirective = TAI-getUsedDirective())
   O  UsedDirective  getAsm()-CurrentFnName  .eh\n;
+#endif
   }
 };
 



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


[llvm-commits] CVS: llvm/include/llvm/Target/TargetOptions.h

2007-01-29 Thread Jim Laskey


Changes in directory llvm/include/llvm/Target:

TargetOptions.h updated: 1.13 - 1.14
---
Log message:

Flag to control exception handling.

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

 TargetOptions.h |5 +
 1 files changed, 5 insertions(+)


Index: llvm/include/llvm/Target/TargetOptions.h
diff -u llvm/include/llvm/Target/TargetOptions.h:1.13 
llvm/include/llvm/Target/TargetOptions.h:1.14
--- llvm/include/llvm/Target/TargetOptions.h:1.13   Wed Jan 17 04:40:54 2007
+++ llvm/include/llvm/Target/TargetOptions.hMon Jan 29 14:48:32 2007
@@ -59,6 +59,11 @@
   /// .bss section. This flag disables such behaviour (necessary, e.g. for
   /// crt*.o compiling).
   extern bool NoZerosInBSS;
+  
+  /// ExceptionHandling - This flag indicates that exception information should
+  /// be emitted.
+  extern bool ExceptionHandling;
+  
 } // End llvm namespace
 
 #endif



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


[llvm-commits] CVS: llvm/lib/Target/TargetMachine.cpp

2007-01-29 Thread Jim Laskey


Changes in directory llvm/lib/Target:

TargetMachine.cpp updated: 1.59 - 1.60
---
Log message:

Flag to control exception handling.

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

 TargetMachine.cpp |6 ++
 1 files changed, 6 insertions(+)


Index: llvm/lib/Target/TargetMachine.cpp
diff -u llvm/lib/Target/TargetMachine.cpp:1.59 
llvm/lib/Target/TargetMachine.cpp:1.60
--- llvm/lib/Target/TargetMachine.cpp:1.59  Wed Jan 17 04:33:08 2007
+++ llvm/lib/Target/TargetMachine.cpp   Mon Jan 29 14:48:32 2007
@@ -29,6 +29,7 @@
   bool FiniteOnlyFPMathOption;
   bool UseSoftFloat;
   bool NoZerosInBSS;
+  bool ExceptionHandling;
   Reloc::Model RelocationModel;
   CodeModel::Model CMModel;
 }
@@ -67,6 +68,11 @@
cl::desc(Don't place zero-initialized symbols into bss 
section),
cl::location(NoZerosInBSS),
cl::init(false));
+  cl::optbool, true
+  EnableExceptionHandling(exception-handling,
+   cl::desc(Exception handling should be emitted.),
+   cl::location(ExceptionHandling),
+   cl::init(false));
 
   cl::optllvm::Reloc::Model, true
   DefRelocationModel(



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


[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp

2007-01-29 Thread Jim Laskey


Changes in directory llvm/lib/CodeGen:

DwarfWriter.cpp updated: 1.119 - 1.120
---
Log message:

Flag to control exception handling.

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

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


Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.119 
llvm/lib/CodeGen/DwarfWriter.cpp:1.120
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.119  Mon Jan 29 14:01:41 2007
+++ llvm/lib/CodeGen/DwarfWriter.cppMon Jan 29 14:48:32 2007
@@ -29,8 +29,9 @@
 #include llvm/Target/TargetAsmInfo.h
 #include llvm/Target/MRegisterInfo.h
 #include llvm/Target/TargetData.h
-#include llvm/Target/TargetMachine.h
 #include llvm/Target/TargetFrameInfo.h
+#include llvm/Target/TargetMachine.h
+#include llvm/Target/TargetOptions.h
 #include ostream
 #include string
 using namespace llvm;
@@ -2675,7 +2676,7 @@
   /// manager has created it.  Set by the target AsmPrinter.
   void SetModuleInfo(MachineModuleInfo *mmi) {
 // Make sure initial declarations are made.
-if (!MMI  TAI-getSupportsExceptionHandling()) {
+if (!MMI  ExceptionHandling  TAI-getSupportsExceptionHandling()) {
   MMI = mmi;
   shouldEmit = true;
 }



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


[llvm-commits] CVS: llvm/lib/Target/TargetMachine.cpp

2007-01-29 Thread Jim Laskey


Changes in directory llvm/lib/Target:

TargetMachine.cpp updated: 1.60 - 1.61
---
Log message:

rename flag

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

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


Index: llvm/lib/Target/TargetMachine.cpp
diff -u llvm/lib/Target/TargetMachine.cpp:1.60 
llvm/lib/Target/TargetMachine.cpp:1.61
--- llvm/lib/Target/TargetMachine.cpp:1.60  Mon Jan 29 14:48:32 2007
+++ llvm/lib/Target/TargetMachine.cpp   Mon Jan 29 16:40:03 2007
@@ -69,7 +69,7 @@
cl::location(NoZerosInBSS),
cl::init(false));
   cl::optbool, true
-  EnableExceptionHandling(exception-handling,
+  EnableExceptionHandling(enable-eh,
cl::desc(Exception handling should be emitted.),
cl::location(ExceptionHandling),
cl::init(false));



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


  1   2   3   4   5   6   7   8   9   10   >