[llvm-commits] CVS: llvm/lib/Bitcode/LLVMBitCodes.h

2007-04-22 Thread Chris Lattner


Changes in directory llvm/lib/Bitcode:

LLVMBitCodes.h added (r1.1)
---
Log message:

add llvm ir bitcode definition file


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

 LLVMBitCodes.h |   87 +
 1 files changed, 87 insertions(+)


Index: llvm/lib/Bitcode/LLVMBitCodes.h
diff -c /dev/null llvm/lib/Bitcode/LLVMBitCodes.h:1.1
*** /dev/null   Sun Apr 22 02:03:10 2007
--- llvm/lib/Bitcode/LLVMBitCodes.h Sun Apr 22 02:03:00 2007
***
*** 0 
--- 1,87 
+ //===- LLVMBitCodes.h - Enum values for the LLVM bitcode format -*- C++ 
-*-===//
+ //
+ // The LLVM Compiler Infrastructure
+ //
+ // This file was developed by Chris Lattner and is distributed under
+ // the University of Illinois Open Source License. See LICENSE.TXT for 
details.
+ //
+ 
//===--===//
+ //
+ // This header defines Bitcode enum values for LLVM IR bitcode files.
+ //
+ // The enum values defined in this file should be considered permanent.  If
+ // new features are added, they should have values added at the end of the
+ // respective lists.
+ //
+ 
//===--===//
+ 
+ #ifndef LLVM_BITCODE_LLVMBITCODES_H
+ #define LLVM_BITCODE_LLVMBITCODES_H
+ 
+ #include "llvm/Bitcode/BitCodes.h"
+ 
+ namespace llvm {
+ namespace bitc {
+   // The only top-level block type defined is for a module.
+   enum BlockIDs {
+ // Blocks
+ MODULE_BLOCK_ID  = 0,
+   
+ // Module sub-block id's
+ TYPE_BLOCK_ID= 1,
+ MODULEINFO_BLOCK_ID  = 2,
+ GLOBALCONSTANTS_BLOCK_ID = 3,
+ FUNCTION_BLOCK_ID= 4,
+ TYPE_SYMTAB_BLOCK_ID = 5,
+ GLOBAL_SYMTAB_BLOCK_ID   = 6
+   };
+   
+   
+   /// MODULE blocks have a number of optional fields and subblocks.
+   enum ModuleCodes {
+ MODULE_CODE_VERSION = 1,// VERSION: [version#]
+ MODULE_CODE_TRIPLE  = 2,// TRIPLE:  [strlen, strchr x N]
+ MODULE_CODE_DATALAYOUT  = 3,// DATALAYOUT:  [strlen, strchr x N]
+ MODULE_CODE_ASM = 4,// ASM: [strlen, strchr x N]
+ MODULE_CODE_SECTIONNAME = 5,// SECTIONNAME: [strlen, strchr x N]
+ MODULE_CODE_DEPLIB  = 6,// DEPLIB:  [strlen, strchr x N]
+ 
+ // GLOBALVAR: [type, isconst, initid, 
+ // linkage, alignment, section, visibility, threadlocal]
+ MODULE_CODE_GLOBALVAR   = 7,
+ 
+ // FUNCTION:  [type, callingconv, isproto, linkage, alignment, section,
+ // visibility]
+ MODULE_CODE_FUNCTION= 8
+   };
+   
+   /// TYPE blocks have codes for each type primitive they use.
+   enum TypeCodes {
+ TYPE_CODE_NUMENTRY =  1,   // TYPE_CODE_NUMENTRY: [numentries]
+ TYPE_CODE_META =  2,   // TYPE_CODE_META: [metacode]... - Future use
+ 
+ // Type Codes
+ TYPE_CODE_VOID =  3,   // VOID
+ TYPE_CODE_FLOAT=  4,   // FLOAT
+ TYPE_CODE_DOUBLE   =  5,   // DOUBLE
+ TYPE_CODE_LABEL=  6,   // LABEL
+ TYPE_CODE_OPAQUE   =  7,   // OPAQUE
+ TYPE_CODE_INTEGER  =  8,   // INTEGER: [width]
+ TYPE_CODE_POINTER  =  9,   // POINTER: [pointee type]
+ TYPE_CODE_FUNCTION = 10,   // FUNCTION: [vararg, retty, #pararms, paramty 
N]
+ TYPE_CODE_STRUCT   = 11,   // STRUCT: [ispacked, #elts, eltty x N]
+ TYPE_CODE_ARRAY= 12,   // ARRAY: [numelts, eltty]
+ TYPE_CODE_VECTOR   = 13// VECTOR: [numelts, eltty]
+ // Any other type code is assumed to be an unknown type.
+   };
+   
+   
+   // The type symbol table only has one code (TST_ENTRY_CODE).
+   enum TypeSymtabCodes {
+ TST_ENTRY_CODE = 1 // TST_ENTRY: [typeid, namelen, namechar x N]
+   };
+   
+ } // End bitc namespace
+ } // End llvm namespace
+ 
+ #endif



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


Re: [llvm-commits] CVS: llvm/lib/Bitcode/Reader/

2007-04-22 Thread Christopher Lamb

I just synced CVS and am getting the following build error:

llvm/lib/Bitcode/Reader/BitcodeReader.h:19:29: error: ../ 
LLVMBitCodes.h: No such file or directory


--
Christopher Lamb


On Apr 22, 2007, at 1:16 AM, Chris Lattner wrote:




Changes in directory llvm/lib/Bitcode/Reader:

---
Log message:

Directory /home/vadve/shared/PublicCVS/llvm/lib/Bitcode/Reader  
added to the repository



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

 0 files changed



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






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


Re: [llvm-commits] Function aliases

2007-04-22 Thread Chris Lattner
On Apr 21, 2007, at 3:21 AM, Anton Korobeynikov wrote:
> Hello, Chris.
>> I disagree.  They *act like* functions or GV's, but they really
>> aren't them.  For example, (from m understanding), it is not legal to
>> give an alias a function body or a global variable initializer.
> After stripping alias target they are nothing more than just external
> declarations. That's why I'm thinking it's just GV or Function plus
> small addendum.

It is more restricted than a function, and also applies to a global  
though.

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

How, why?  I don't see why an alias would have a calling convention.   
What would it be used for?


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

Why?  What client of getCalledFunction would that benefit?  If the  
aliased-to callee is already available there would be no reference to  
the alias in any call.

>> I'd expect the linker (or something else) to want to resolve through
>> aliases if the alias, if the actual destination function is around.

> This seems to be useful feature. However, usually aliases are  
> introduces
> when no alias target exists in the current module.

Sure, but when the LLVM linker runs, it can resolve them.

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

I don't see how this is any better than just adding an explicit list  
of GlobalAliases.

-Chris

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


Re: [llvm-commits] CVS: llvm/lib/Bitcode/Reader/

2007-04-22 Thread Chris Lattner


On Apr 22, 2007, at 12:03 AM, Christopher Lamb wrote:


I just synced CVS and am getting the following build error:

llvm/lib/Bitcode/Reader/BitcodeReader.h:19:29: error: ../ 
LLVMBitCodes.h: No such file or directory


Just fixed, sorry about that :(

-Chris


--
Christopher Lamb


On Apr 22, 2007, at 1:16 AM, Chris Lattner wrote:




Changes in directory llvm/lib/Bitcode/Reader:

---
Log message:

Directory /home/vadve/shared/PublicCVS/llvm/lib/Bitcode/Reader  
added to the repository



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

 0 files changed



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






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


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


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

2007-04-22 Thread Christopher Lamb
How long does it usually take for these to propagate to the public  
SVN site?

--
Christopher Lamb

On Apr 22, 2007, at 12:52 AM, [EMAIL PROTECTED] wrote:


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

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

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

Modified: apple-local/branches/llvm/gcc/llvm-types.cpp
===
--- apple-local/branches/llvm/gcc/llvm-types.cpp	2007-04-21  
06:48:37 UTC (rev 126378)
+++ apple-local/branches/llvm/gcc/llvm-types.cpp	2007-04-22  
05:52:13 UTC (rev 126379)

@@ -751,15 +751,17 @@
   for (; Args && TREE_TYPE(Args) != void_type_node; Args =  
TREE_CHAIN(Args))

 ABIConverter.HandleArgument(TREE_TYPE(Args));

-  ParamAttrsList *ParamAttrs = 0;
+  ParamAttrsList *PAL = 0;

   if (static_chain) {
 // Pass the static chain in a register.
-ParamAttrs = new ParamAttrsList();
-ParamAttrs->addAttributes(1, ParamAttr::InReg);
+ParamAttrsVector Attrs;
+ParamAttrsWithIndex PAWI; PAWI.index = 1; PAWI.attrs =  
ParamAttr::InReg;

+Attrs.push_back(PAWI);
+PAL = ParamAttrsList::get(Attrs);
   }

-  return FunctionType::get(RetTy, ArgTys, false, ParamAttrs);
+  return FunctionType::get(RetTy, ArgTys, false, PAL);
 }

 const FunctionType *TypeConverter::ConvertFunctionType(tree type,
@@ -811,7 +813,7 @@
   // the parameter attribute in the FunctionType so any arguments  
passed to
   // the function will be correctly sign or zero extended to 32- 
bits by

   // the LLVM code gen.
-  ParamAttrsList Attrs;
+  ParamAttrsVector Attrs;
   uint16_t RAttributes = ParamAttr::None;
   if (CallingConv == CallingConv::C) {
 tree ResultTy = TREE_TYPE(type);
@@ -827,8 +829,10 @@
   RAttributes |= ParamAttr::SExt;
 }
   }
-  if (RAttributes != ParamAttr::None)
-Attrs.addAttributes(0, RAttributes);
+  if (RAttributes != ParamAttr::None) {
+ParamAttrsWithIndex PAWI; PAWI.index = 0; PAWI.attrs =  
RAttributes;

+Attrs.push_back(PAWI);
+  }

   unsigned Idx = 1;
   bool isFirstArg = true;
@@ -838,16 +842,21 @@
   LLVM_TARGET_INIT_REGPARM(lparam, type);
 #endif // LLVM_TARGET_ENABLE_REGPARM

-  if (static_chain)
+  if (static_chain) {
 // Pass the static chain in a register.
-Attrs.addAttributes(Idx++, ParamAttr::InReg);
+ParamAttrsWithIndex PAWI; PAWI.index = Idx++; PAWI.attrs =  
ParamAttr::InReg;

+Attrs.push_back(PAWI);
+  }

   // The struct return attribute must be associated with the first
   // parameter but that parameter may have other attributes too so  
we set up
   // the first Attributes value here based on struct return. This  
only works

   // Handle the structure return calling convention
-  if (ABIConverter.isStructReturn())
-Attrs.addAttributes(Idx++, ParamAttr::StructRet);
+  if (ABIConverter.isStructReturn()) {
+ParamAttrsWithIndex PAWI;
+PAWI.index = Idx++; PAWI.attrs = ParamAttr::StructRet;
+Attrs.push_back(PAWI);
+  }

   for (tree Args = TYPE_ARG_TYPES(type);
Args && TREE_VALUE(Args) != void_type_node; Args =  
TREE_CHAIN(Args)) {

@@ -873,18 +882,20 @@
 isVarArg, lparam);
 #endif // LLVM_TARGET_ENABLE_REGPARM

-if (Attributes != ParamAttr::None)
-  Attrs.addAttributes(Idx, Attributes);
+if (Attributes != ParamAttr::None) {
+ ParamAttrsWithIndex PAWI; PAWI.index = Idx; PAWI.attrs =  
Attributes;

+ Attrs.push_back(PAWI);
+}
 Idx++;
   }

   // Only instantiate the parameter attributes if we got some
-  ParamAttrsList *ParamAttrs = 0;
+  ParamAttrsList *PAL = 0;
   if (!Attrs.empty())
-ParamAttrs = new ParamAttrsList(Attrs);
+PAL = ParamAttrsList::get(Attrs);

   // Finally, make the function type
-  return FunctionType::get(RetTy, ArgTypes, isVarArg, ParamAttrs);
+  return FunctionType::get(RetTy, ArgTypes, isVarArg, PAL);
 }

 // 
===--- 
---===//



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






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


Re: [llvm-commits] CVS: llvm/test/C++Frontend/dg.exp

2007-04-22 Thread Christopher Lamb

I am getting the following error when running make in llvm/tests.

Running .../llvm/test/C++Frontend/dg.exp ...
ERROR: tcl error sourcing .../llvm/test/C++Frontend/dg.exp.
ERROR: couldn't compile regular expression pattern: quantifier  
operand invalid

while executing
"regexp $lang $llvmgcc_langs match "
(procedure "llvm_gcc_supports" line 14)
invoked from within
"llvm_gcc_supports c++ "
invoked from within
"if [ llvm_gcc_supports c++ ] then {
  RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*. 
{ll,llx,c,cpp,tr}]]

}"
(file ".../llvm/test/C++Frontend/dg.exp" line 3)
invoked from within
"source .../llvm/test/C++Frontend/dg.exp"
("uplevel" body line 1)
invoked from within
"uplevel #0 source .../llvm/test/C++Frontend/dg.exp"
invoked from within
"catch "uplevel #0 source $test_file_name""

--
Christopher Lamb


On Apr 22, 2007, at 12:53 AM, Reid Spencer wrote:




Changes in directory llvm/test/C++Frontend:

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

Make running these tests conditional on llvm-gcc supporting the  
language

of these test cases.


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

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


Index: llvm/test/C++Frontend/dg.exp
diff -u llvm/test/C++Frontend/dg.exp:1.5 llvm/test/C++Frontend/ 
dg.exp:1.6

--- llvm/test/C++Frontend/dg.exp:1.5Sun Apr 15 15:41:31 2007
+++ llvm/test/C++Frontend/dg.expSun Apr 22 00:53:18 2007
@@ -1,3 +1,5 @@
 load_lib llvm.exp

-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*. 
{ll,llx,c,cpp,tr}]]

+if [ llvm_gcc_supports c++ ] then {
+  RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*. 
{ll,llx,c,cpp,tr}]]

+}



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





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


Re: [llvm-commits] Major regressions

2007-04-22 Thread Christopher Lamb

On Apr 22, 2007, at 1:40 AM, Chris Lattner wrote:



On Apr 21, 2007, at 4:28 PM, Christopher Lamb wrote:



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


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

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


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

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

Did you walk through it in the debugger?


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

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


Ahh.


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

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


I think it should fall back to the ABI alignment of the scalar type.
If a target doesn't have an entry for a vector type, we can assume
that it will be scalarized.


Here's a patch to do it.
--
Christopher Lamb



degenerate_vectors.diff
Description: Binary data




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


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

2007-04-22 Thread Bill Wendling

The program which does this is done at 2AM every morning.

-bw

On Apr 22, 2007, at 12:32 AM, Christopher Lamb wrote:

How long does it usually take for these to propagate to the public  
SVN site?

--
Christopher Lamb

On Apr 22, 2007, at 12:52 AM, [EMAIL PROTECTED] wrote:


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

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

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

Modified: apple-local/branches/llvm/gcc/llvm-types.cpp
===
--- apple-local/branches/llvm/gcc/llvm-types.cpp	2007-04-21  
06:48:37 UTC (rev 126378)
+++ apple-local/branches/llvm/gcc/llvm-types.cpp	2007-04-22  
05:52:13 UTC (rev 126379)

@@ -751,15 +751,17 @@
   for (; Args && TREE_TYPE(Args) != void_type_node; Args =  
TREE_CHAIN(Args))

 ABIConverter.HandleArgument(TREE_TYPE(Args));

-  ParamAttrsList *ParamAttrs = 0;
+  ParamAttrsList *PAL = 0;

   if (static_chain) {
 // Pass the static chain in a register.
-ParamAttrs = new ParamAttrsList();
-ParamAttrs->addAttributes(1, ParamAttr::InReg);
+ParamAttrsVector Attrs;
+ParamAttrsWithIndex PAWI; PAWI.index = 1; PAWI.attrs =  
ParamAttr::InReg;

+Attrs.push_back(PAWI);
+PAL = ParamAttrsList::get(Attrs);
   }

-  return FunctionType::get(RetTy, ArgTys, false, ParamAttrs);
+  return FunctionType::get(RetTy, ArgTys, false, PAL);
 }

 const FunctionType *TypeConverter::ConvertFunctionType(tree type,
@@ -811,7 +813,7 @@
   // the parameter attribute in the FunctionType so any arguments  
passed to
   // the function will be correctly sign or zero extended to 32- 
bits by

   // the LLVM code gen.
-  ParamAttrsList Attrs;
+  ParamAttrsVector Attrs;
   uint16_t RAttributes = ParamAttr::None;
   if (CallingConv == CallingConv::C) {
 tree ResultTy = TREE_TYPE(type);
@@ -827,8 +829,10 @@
   RAttributes |= ParamAttr::SExt;
 }
   }
-  if (RAttributes != ParamAttr::None)
-Attrs.addAttributes(0, RAttributes);
+  if (RAttributes != ParamAttr::None) {
+ParamAttrsWithIndex PAWI; PAWI.index = 0; PAWI.attrs =  
RAttributes;

+Attrs.push_back(PAWI);
+  }

   unsigned Idx = 1;
   bool isFirstArg = true;
@@ -838,16 +842,21 @@
   LLVM_TARGET_INIT_REGPARM(lparam, type);
 #endif // LLVM_TARGET_ENABLE_REGPARM

-  if (static_chain)
+  if (static_chain) {
 // Pass the static chain in a register.
-Attrs.addAttributes(Idx++, ParamAttr::InReg);
+ParamAttrsWithIndex PAWI; PAWI.index = Idx++; PAWI.attrs =  
ParamAttr::InReg;

+Attrs.push_back(PAWI);
+  }

   // The struct return attribute must be associated with the first
   // parameter but that parameter may have other attributes too  
so we set up
   // the first Attributes value here based on struct return. This  
only works

   // Handle the structure return calling convention
-  if (ABIConverter.isStructReturn())
-Attrs.addAttributes(Idx++, ParamAttr::StructRet);
+  if (ABIConverter.isStructReturn()) {
+ParamAttrsWithIndex PAWI;
+PAWI.index = Idx++; PAWI.attrs = ParamAttr::StructRet;
+Attrs.push_back(PAWI);
+  }

   for (tree Args = TYPE_ARG_TYPES(type);
Args && TREE_VALUE(Args) != void_type_node; Args =  
TREE_CHAIN(Args)) {

@@ -873,18 +882,20 @@
 isVarArg, lparam);
 #endif // LLVM_TARGET_ENABLE_REGPARM

-if (Attributes != ParamAttr::None)
-  Attrs.addAttributes(Idx, Attributes);
+if (Attributes != ParamAttr::None) {
+ ParamAttrsWithIndex PAWI; PAWI.index = Idx; PAWI.attrs =  
Attributes;

+ Attrs.push_back(PAWI);
+}
 Idx++;
   }

   // Only instantiate the parameter attributes if we got some
-  ParamAttrsList *ParamAttrs = 0;
+  ParamAttrsList *PAL = 0;
   if (!Attrs.empty())
-ParamAttrs = new ParamAttrsList(Attrs);
+PAL = ParamAttrsList::get(Attrs);

   // Finally, make the function type
-  return FunctionType::get(RetTy, ArgTypes, isVarArg, ParamAttrs);
+  return FunctionType::get(RetTy, ArgTypes, isVarArg, PAL);
 }

 // 
===-- 
===//



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






___
llvm-commits 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/utils/TableGen/SubtargetEmitter.cpp

2007-04-22 Thread Christopher Lamb


Changes in directory llvm/utils/TableGen:

SubtargetEmitter.cpp updated: 1.24 -> 1.25
---
Log message:

Fix generation of certain scheduler itineraries.


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

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


Index: llvm/utils/TableGen/SubtargetEmitter.cpp
diff -u llvm/utils/TableGen/SubtargetEmitter.cpp:1.24 
llvm/utils/TableGen/SubtargetEmitter.cpp:1.25
--- llvm/utils/TableGen/SubtargetEmitter.cpp:1.24   Tue Dec 12 14:55:58 2006
+++ llvm/utils/TableGen/SubtargetEmitter.cppSun Apr 22 04:04:24 2007
@@ -218,7 +218,7 @@
 
   // For each stage
   unsigned N = NStages = StageList.size();
-  for (unsigned i = 0; i < N; i++) {
+  for (unsigned i = 0; i < N;) {
 // Next stage
 Record *Stage = StageList[i];
   
@@ -241,6 +241,7 @@
 
 // Close off stage
 ItinString += " }";
+if (++i < N) ItinString += ", ";
   }
 }
 



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


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

2007-04-22 Thread Jeff Cohen
The mirror has not been updated in two days.  llvm-gcc is now 
unbuildable by the public.

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

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


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

2007-04-22 Thread Jeff Cohen


Changes in directory llvm/docs:

LangRef.html updated: 1.236 -> 1.237
---
Log message:

Undo erroneous corrections.

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

 LangRef.html |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/docs/LangRef.html
diff -u llvm/docs/LangRef.html:1.236 llvm/docs/LangRef.html:1.237
--- llvm/docs/LangRef.html:1.236Sat Apr 21 20:17:39 2007
+++ llvm/docs/LangRef.html  Sun Apr 22 09:56:37 2007
@@ -1396,12 +1396,12 @@
   uitofp ( CST to TYPE )
   Convert an unsigned integer constant to the corresponding floating point
   constant. TYPE must be floating point. CST must be of integer type. If the
-  value won't fit in the floating point type, precision may be lost.
+  value won't fit in the floating point type, the results are undefined.
 
   sitofp ( CST to TYPE )
   Convert a signed integer constant to the corresponding floating point
   constant. TYPE must be floating point. CST must be of integer type. If the
-  value won't fit in the floating point type, precision may be lost.
+  value won't fit in the floating point type, the results are undefined.
 
   ptrtoint ( CST to TYPE )
   Convert a pointer typed constant to the corresponding integer constant
@@ -3069,7 +3069,7 @@
 Semantics:
 The 'uitofp' instruction interprets its operand as an unsigned
 integer quantity and converts it to the corresponding floating point value. If
-the value cannot fit in the floating point value, precision may be lost.
+the value cannot fit in the floating point value, the results are 
undefined.
 
 
 Example:
@@ -3102,7 +3102,7 @@
 Semantics:
 The 'sitofp' instruction interprets its operand as a signed
 integer quantity and converts it to the corresponding floating point value. If
-the value cannot fit in the floating point value, precision may be lost.
+the value cannot fit in the floating point value, the results are 
undefined.
 
 Example:
 
@@ -4728,7 +4728,7 @@
 
   mailto:[EMAIL PROTECTED]">Chris Lattner
   http://llvm.org";>The LLVM Compiler Infrastructure
-  Last modified: $Date: 2007/04/22 01:17:39 $
+  Last modified: $Date: 2007/04/22 14:56:37 $
 
 
 



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


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

2007-04-22 Thread Jeff Cohen
Reid Spencer wrote:
> Jeff,
>
> On Sun, 2007-04-22 at 07:19 -0700, Jeff Cohen wrote:
>   
>> The mirror has not been updated in two days.  llvm-gcc is now 
>> unbuildable by the public.
>> 
>
> I just updated and the changes that Chris committed for me last night
> are in the repository mirror. The rev # is 315.  Seems fine to me.
>   

Urm... does seem fine now.  All I know is that my nightly tester ran one 
hour after the mirror was updated (according to the svn log), and yet it 
did not pick up 315.

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


[llvm-commits] CVS: llvm/win32/Bitcode/

2007-04-22 Thread LLVM


Changes in directory llvm/win32/Bitcode:

---
Log message:

Directory /var/cvs/llvm/llvm/win32/Bitcode added to the repository


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

 0 files changed



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


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

2007-04-22 Thread Reid Spencer
Jeff,

On Sun, 2007-04-22 at 07:19 -0700, Jeff Cohen wrote:
> The mirror has not been updated in two days.  llvm-gcc is now 
> unbuildable by the public.

I just updated and the changes that Chris committed for me last night
are in the repository mirror. The rev # is 315.  Seems fine to me.

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

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

2007-04-22 Thread Reid Spencer


Changes in directory llvm/test/lib:

llvm.exp updated: 1.21 -> 1.22
---
Log message:

Fix the comparison of language names to accept any characters by using
"string first" instead of "regexp match". This helps C++ tests get executed.


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

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


Index: llvm/test/lib/llvm.exp
diff -u llvm/test/lib/llvm.exp:1.21 llvm/test/lib/llvm.exp:1.22
--- llvm/test/lib/llvm.exp:1.21 Sat Apr 21 16:45:51 2007
+++ llvm/test/lib/llvm.exp  Sun Apr 22 09:14:11 2007
@@ -207,7 +207,7 @@
 fortran { set file fcc1 }
 default { return 0 }
   }
-  if { [ regexp $lang $llvmgcc_langs match ] } {
+  if { [ string first "$lang" "$llvmgcc_langs" ] >= 0 } {
 # FIXME: Knowing it is configured is not enough. We should do two more
 # checks here. First, we need to run llvm-gcc -print-prog-name=$file to get
 # the path to the compiler. If we don't get a path, the language isn't



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


[llvm-commits] CVS: llvm/include/llvm/Bitcode/BitstreamReader.h BitstreamWriter.h

2007-04-22 Thread Jeff Cohen


Changes in directory llvm/include/llvm/Bitcode:

BitstreamReader.h updated: 1.1 -> 1.2
BitstreamWriter.h updated: 1.1 -> 1.2
---
Log message:

Teach Visual Studio about Bitcode.

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

 BitstreamReader.h |   10 ++
 BitstreamWriter.h |3 ++-
 2 files changed, 8 insertions(+), 5 deletions(-)


Index: llvm/include/llvm/Bitcode/BitstreamReader.h
diff -u llvm/include/llvm/Bitcode/BitstreamReader.h:1.1 
llvm/include/llvm/Bitcode/BitstreamReader.h:1.2
--- llvm/include/llvm/Bitcode/BitstreamReader.h:1.1 Sun Apr 22 01:22:05 2007
+++ llvm/include/llvm/Bitcode/BitstreamReader.h Sun Apr 22 10:00:52 2007
@@ -17,6 +17,7 @@
 
 #include "llvm/Bitcode/BitCodes.h"
 #include "llvm/ADT/SmallVector.h"
+#include "llvm/Support/DataTypes.h"
 #include 
 
 namespace llvm {
@@ -91,7 +92,7 @@
   
   uint32_t ReadVBR(unsigned NumBits) {
 uint32_t Piece = Read(NumBits);
-if ((Piece & (1U << NumBits-1)) == 0)
+if ((Piece & (1U << (NumBits-1))) == 0)
   return Piece;
 
 uint32_t Result = 0;
@@ -99,7 +100,7 @@
 while (1) {
   Result |= (Piece & ((1U << (NumBits-1))-1)) << NextBit;
 
-  if ((Piece & (1U << NumBits-1)) == 0)
+  if ((Piece & (1U << (NumBits-1))) == 0)
 return Result;
   
   NextBit += NumBits-1;
@@ -109,7 +110,7 @@
   
   uint64_t ReadVBR64(unsigned NumBits) {
 uint64_t Piece = Read(NumBits);
-if ((Piece & (1U << NumBits-1)) == 0)
+if ((Piece & (1U << (NumBits-1))) == 0)
   return Piece;
 
 uint64_t Result = 0;
@@ -117,7 +118,7 @@
 while (1) {
   Result |= (Piece & ((1U << (NumBits-1))-1)) << NextBit;
   
-  if ((Piece & (1U << NumBits-1)) == 0)
+  if ((Piece & (1U << (NumBits-1))) == 0)
 return Result;
   
   NextBit += NumBits-1;
@@ -209,6 +210,7 @@
 }
 
 assert(0 && "Reading with abbrevs not implemented!");
+return 0;
   }
   
 };


Index: llvm/include/llvm/Bitcode/BitstreamWriter.h
diff -u llvm/include/llvm/Bitcode/BitstreamWriter.h:1.1 
llvm/include/llvm/Bitcode/BitstreamWriter.h:1.2
--- llvm/include/llvm/Bitcode/BitstreamWriter.h:1.1 Sun Apr 22 01:22:05 2007
+++ llvm/include/llvm/Bitcode/BitstreamWriter.h Sun Apr 22 10:00:52 2007
@@ -17,6 +17,7 @@
 
 #include "llvm/Bitcode/BitCodes.h"
 #include "llvm/ADT/SmallVector.h"
+#include "llvm/Support/DataTypes.h"
 #include 
 #include 
 
@@ -72,7 +73,7 @@
 Out.push_back((unsigned char)(V >> 24));
 
 if (CurBit)
-  CurValue = Val >> 32-CurBit;
+  CurValue = Val >> (32-CurBit);
 else
   CurValue = 0;
 CurBit = (CurBit+NumBits) & 31;



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


Re: [llvm-commits] CVS: llvm/test/C++Frontend/dg.exp

2007-04-22 Thread Reid Spencer
Christopher,

Sorry about that, my bad. This is now fixed.

I forgot that the ++ in C++ would be treated as regular expression
special characters and is, in fact, an invalid regular expression.  The
change was to just use "string first" to scan the string, not use a
regular expression. 


Reid.

On Sun, 2007-04-22 at 03:11 -0500, Christopher Lamb wrote:
> I am getting the following error when running make in llvm/tests.
> 
> 
> Running .../llvm/test/C++Frontend/dg.exp ...
> ERROR: tcl error sourcing .../llvm/test/C++Frontend/dg.exp.
> ERROR: couldn't compile regular expression pattern: quantifier operand
> invalid
> while executing
> "regexp $lang $llvmgcc_langs match "
> (procedure "llvm_gcc_supports" line 14)
> invoked from within
> "llvm_gcc_supports c++ "
> invoked from within
> "if [ llvm_gcc_supports c++ ] then {
>   RunLLVMTests [lsort [glob -nocomplain
> $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
> }"
> (file ".../llvm/test/C++Frontend/dg.exp" line 3)
> invoked from within
> "source .../llvm/test/C++Frontend/dg.exp"
> ("uplevel" body line 1)
> invoked from within
> "uplevel #0 source .../llvm/test/C++Frontend/dg.exp"
> invoked from within
> "catch "uplevel #0 source $test_file_name""
> 
> --
> Christopher Lamb
> 
> 
> 
> On Apr 22, 2007, at 12:53 AM, Reid Spencer wrote:
> 
> > 
> > 
> > 
> > 
> > Changes in directory llvm/test/C++Frontend:
> > 
> > 
> > dg.exp updated: 1.5 -> 1.6
> > ---
> > Log message:
> > 
> > 
> > Make running these tests conditional on llvm-gcc supporting the
> > language
> > of these test cases.
> > 
> > 
> > 
> > 
> > ---
> > Diffs of the changes:  (+3 -1)
> > 
> > 
> >  dg.exp |4 +++-
> >  1 files changed, 3 insertions(+), 1 deletion(-)
> > 
> > 
> > 
> > 
> > Index: llvm/test/C++Frontend/dg.exp
> > diff -u llvm/test/C++Frontend/dg.exp:1.5 llvm/test/C
> > ++Frontend/dg.exp:1.6
> > --- llvm/test/C++Frontend/dg.exp:1.5 Sun Apr 15 15:41:31 2007
> > +++ llvm/test/C++Frontend/dg.exp Sun Apr 22 00:53:18 2007
> > @@ -1,3 +1,5 @@
> >  load_lib llvm.exp
> > 
> > 
> > -RunLLVMTests [lsort [glob -nocomplain
> > $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
> > +if [ llvm_gcc_supports c++ ] then {
> > +  RunLLVMTests [lsort [glob -nocomplain
> > $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
> > +}
> > 
> > 
> > 
> > 
> > 
> > 
> > ___
> > llvm-commits mailing list
> > llvm-commits@cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 
> 
> 
> 
> 
> 
> ___
> llvm-commits mailing list
> llvm-commits@cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

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


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

2007-04-22 Thread Reid Spencer


Changes in directory llvm/include/llvm:

ParameterAttributes.h updated: 1.9 -> 1.10
---
Log message:

Undo premature commit.


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

 ParameterAttributes.h |5 +
 1 files changed, 1 insertion(+), 4 deletions(-)


Index: llvm/include/llvm/ParameterAttributes.h
diff -u llvm/include/llvm/ParameterAttributes.h:1.9 
llvm/include/llvm/ParameterAttributes.h:1.10
--- llvm/include/llvm/ParameterAttributes.h:1.9 Sun Apr 22 11:29:35 2007
+++ llvm/include/llvm/ParameterAttributes.h Sun Apr 22 11:30:47 2007
@@ -70,7 +70,7 @@
 void operator=(const ParamAttrsList &); // Do not implement
 ParamAttrsList(const ParamAttrsList &); // Do not implement
 ParamAttrsList();   // Do not implement
-~ParamAttrsList();
+~ParamAttrsList() {}// Not public!
 
 /// @brief Construct an ParamAttrsList from a ParamAttrsVector
 explicit ParamAttrsList(const ParamAttrsVector &attrVec) : attrs(attrVec) 
{}
@@ -162,15 +162,12 @@
   public:
 void Profile(FoldingSetNodeID &ID) const;
 void dump() const;
-void addRef() const { refCount++; }
-void dropRef() const { if (--refCount == 0) delete this; }
 
   /// @}
   /// @name Data
   /// @{
   private:
 ParamAttrsVector attrs; ///< The list of attributes
-mutable unsigned refCount;  ///< The number of references to this 
object
   /// @}
 };
 



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


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

2007-04-22 Thread Jeff Cohen


Changes in directory llvm/include/llvm:

GlobalValue.h updated: 1.37 -> 1.38
---
Log message:

Implement review feedback.

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

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


Index: llvm/include/llvm/GlobalValue.h
diff -u llvm/include/llvm/GlobalValue.h:1.37 
llvm/include/llvm/GlobalValue.h:1.38
--- llvm/include/llvm/GlobalValue.h:1.37Sat Apr 21 10:29:13 2007
+++ llvm/include/llvm/GlobalValue.h Sun Apr 22 10:11:24 2007
@@ -58,7 +58,7 @@
   // Note: VC++ treats enums as signed, so an extra bit is required to prevent
   // Linkage and Visibility from turning into negative values.
   LinkageTypes Linkage : 5;   // The linkage of this global
-  VisibilityTypes Visibility : 2;  // The visibility style of this global
+  unsigned Visibility : 1;// The visibility style of this global
   unsigned Alignment : 16;// Alignment of this symbol, must be power of two
   std::string Section;// Section to emit this into, empty mean default
 public:
@@ -72,7 +72,7 @@
 Alignment = Align;
   }
 
-  VisibilityTypes getVisibility() const { return Visibility; }
+  VisibilityTypes getVisibility() const { return (VisibilityTypes)Visibility; }
   bool hasHiddenVisibility() const { return Visibility == HiddenVisibility; }
   void setVisibility(VisibilityTypes V) { Visibility = V; }
   



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


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

2007-04-22 Thread Reid Spencer


Changes in directory llvm/include/llvm:

ParameterAttributes.h updated: 1.8 -> 1.9
---
Log message:

Terminate file with newline.


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

 ParameterAttributes.h |5 -
 1 files changed, 4 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/ParameterAttributes.h
diff -u llvm/include/llvm/ParameterAttributes.h:1.8 
llvm/include/llvm/ParameterAttributes.h:1.9
--- llvm/include/llvm/ParameterAttributes.h:1.8 Sun Apr 22 00:46:44 2007
+++ llvm/include/llvm/ParameterAttributes.h Sun Apr 22 11:29:35 2007
@@ -70,7 +70,7 @@
 void operator=(const ParamAttrsList &); // Do not implement
 ParamAttrsList(const ParamAttrsList &); // Do not implement
 ParamAttrsList();   // Do not implement
-~ParamAttrsList() {}// Not public!
+~ParamAttrsList();
 
 /// @brief Construct an ParamAttrsList from a ParamAttrsVector
 explicit ParamAttrsList(const ParamAttrsVector &attrVec) : attrs(attrVec) 
{}
@@ -162,12 +162,15 @@
   public:
 void Profile(FoldingSetNodeID &ID) const;
 void dump() const;
+void addRef() const { refCount++; }
+void dropRef() const { if (--refCount == 0) delete this; }
 
   /// @}
   /// @name Data
   /// @{
   private:
 ParamAttrsVector attrs; ///< The list of attributes
+mutable unsigned refCount;  ///< The number of references to this 
object
   /// @}
 };
 



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


[llvm-commits] CVS: llvm/include/llvm/Bitcode/BitstreamReader.h

2007-04-22 Thread Reid Spencer


Changes in directory llvm/include/llvm/Bitcode:

BitstreamReader.h updated: 1.2 -> 1.3
---
Log message:

Terminate with newline.


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

 BitstreamReader.h |2 --
 1 files changed, 2 deletions(-)


Index: llvm/include/llvm/Bitcode/BitstreamReader.h
diff -u llvm/include/llvm/Bitcode/BitstreamReader.h:1.2 
llvm/include/llvm/Bitcode/BitstreamReader.h:1.3
--- llvm/include/llvm/Bitcode/BitstreamReader.h:1.2 Sun Apr 22 10:00:52 2007
+++ llvm/include/llvm/Bitcode/BitstreamReader.h Sun Apr 22 11:31:22 2007
@@ -218,5 +218,3 @@
 } // End llvm namespace
 
 #endif
-
-
\ No newline at end of file



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


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

2007-04-22 Thread Jeff Cohen
Bill Wendling wrote:
> The program which does this is done at 2AM every morning.
>
> -bw

Not anymore...  it hasn't run in two days.

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


[llvm-commits] CVS: llvm/win32/Bitcode/Bitcode.vcproj

2007-04-22 Thread Jeff Cohen


Changes in directory llvm/win32/Bitcode:

Bitcode.vcproj added (r1.1)
---
Log message:

Teach Visual Studio about Bitcode.

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

 Bitcode.vcproj |  161 +
 1 files changed, 161 insertions(+)


Index: llvm/win32/Bitcode/Bitcode.vcproj
diff -c /dev/null llvm/win32/Bitcode/Bitcode.vcproj:1.1
*** /dev/null   Sun Apr 22 10:01:02 2007
--- llvm/win32/Bitcode/Bitcode.vcproj   Sun Apr 22 10:00:52 2007
***
*** 0 
--- 1,161 
+ 
+ 
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+ 



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


[llvm-commits] CVS: llvm/win32/llvm.sln

2007-04-22 Thread Jeff Cohen


Changes in directory llvm/win32:

llvm.sln updated: 1.27 -> 1.28
---
Log message:

Teach Visual Studio about Bitcode.

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

 llvm.sln |   10 ++
 1 files changed, 10 insertions(+)


Index: llvm/win32/llvm.sln
diff -u llvm/win32/llvm.sln:1.27 llvm/win32/llvm.sln:1.28
--- llvm/win32/llvm.sln:1.27Sun Nov  5 13:31:28 2006
+++ llvm/win32/llvm.sln Sun Apr 22 10:00:52 2007
@@ -108,6 +108,7 @@
{28AA9146-3482-4F41-9CC6-407B1D258508} = 
{28AA9146-3482-4F41-9CC6-407B1D258508}
{19514E48-456C-4B9D-8637-F2285476461E} = 
{19514E48-456C-4B9D-8637-F2285476461E}
{F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = 
{F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}
+   {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = 
{F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}
{45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = 
{45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}
{0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = 
{0F8407F3-FA23-4CF1-83A9-DCBE0B361489}
EndProjectSection
@@ -117,6 +118,7 @@
{28AA9146-3482-4F41-9CC6-407B1D258508} = 
{28AA9146-3482-4F41-9CC6-407B1D258508}
{19514E48-456C-4B9D-8637-F2285476461E} = 
{19514E48-456C-4B9D-8637-F2285476461E}
{F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = 
{F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}
+   {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = 
{F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}
{45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = 
{45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}
{0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = 
{0F8407F3-FA23-4CF1-83A9-DCBE0B361489}
{3DC216F5-1DDD-478A-84F8-C124E5C31982} = 
{3DC216F5-1DDD-478A-84F8-C124E5C31982}
@@ -234,6 +236,10 @@
{3DC216F5-1DDD-478A-84F8-C124E5C31982} = 
{3DC216F5-1DDD-478A-84F8-C124E5C31982}
EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Bitcode", 
"Bitcode\Bitcode.vcproj", "{F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}"
+   ProjectSection(ProjectDependencies) = postProject
+   EndProjectSection
+EndProject
 Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
@@ -358,6 +364,10 @@
{57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Debug.Build.0 = 
Debug|Win32
{57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Release.ActiveCfg = 
Release|Win32
{57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Release.Build.0 = 
Release|Win32
+   {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Debug.ActiveCfg = 
Debug|Win32
+   {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Debug.Build.0 = 
Debug|Win32
+   {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Release.ActiveCfg = 
Release|Win32
+   {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Release.Build.0 = 
Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection



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


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

2007-04-22 Thread Reid Spencer


Changes in directory llvm/include/llvm:

Function.h updated: 1.80 -> 1.81
Instructions.h updated: 1.69 -> 1.70
ParameterAttributes.h updated: 1.10 -> 1.11
---
Log message:

For PR1136: http://llvm.org/PR1136 :
Add reference counting to ParamAttrsList and make use of it in Function,
CallInst and InvokeInst classes.


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

 Function.h|2 -
 Instructions.h|4 +-
 ParameterAttributes.h |   68 --
 3 files changed, 53 insertions(+), 21 deletions(-)


Index: llvm/include/llvm/Function.h
diff -u llvm/include/llvm/Function.h:1.80 llvm/include/llvm/Function.h:1.81
--- llvm/include/llvm/Function.h:1.80   Tue Apr 17 13:30:41 2007
+++ llvm/include/llvm/Function.hSun Apr 22 12:28:03 2007
@@ -128,7 +128,7 @@
   /// Sets the parameter attributes for this Function. To construct a 
   /// ParamAttrsList, see ParameterAttributes.h
   /// @brief Set the parameter attributes.
-  void setParamAttrs(ParamAttrsList *attrs) { ParamAttrs = attrs; }
+  void setParamAttrs(ParamAttrsList *attrs);
 
   /// deleteBody - This method deletes the body of the function, and converts
   /// the linkage to external.


Index: llvm/include/llvm/Instructions.h
diff -u llvm/include/llvm/Instructions.h:1.69 
llvm/include/llvm/Instructions.h:1.70
--- llvm/include/llvm/Instructions.h:1.69   Sat Apr 21 13:36:27 2007
+++ llvm/include/llvm/Instructions.hSun Apr 22 12:28:03 2007
@@ -751,7 +751,7 @@
   /// Sets the parameter attributes for this CallInst. To construct a 
   /// ParamAttrsList, see ParameterAttributes.h
   /// @brief Set the parameter attributes.
-  void setParamAttrs(ParamAttrsList *attrs) { ParamAttrs = attrs; }
+  void setParamAttrs(ParamAttrsList *attrs);
 
   /// getCalledFunction - Return the function being called by this instruction
   /// if it is a direct call.  If it is a call through a function pointer,
@@ -1482,7 +1482,7 @@
   /// Sets the parameter attributes for this InvokeInst. To construct a 
   /// ParamAttrsList, see ParameterAttributes.h
   /// @brief Set the parameter attributes.
-  void setParamAttrs(ParamAttrsList *attrs) { ParamAttrs = attrs; }
+  void setParamAttrs(ParamAttrsList *attrs);
 
   /// getCalledFunction - Return the function called, or null if this is an
   /// indirect function invocation.


Index: llvm/include/llvm/ParameterAttributes.h
diff -u llvm/include/llvm/ParameterAttributes.h:1.10 
llvm/include/llvm/ParameterAttributes.h:1.11
--- llvm/include/llvm/ParameterAttributes.h:1.10Sun Apr 22 11:30:47 2007
+++ llvm/include/llvm/ParameterAttributes.h Sun Apr 22 12:28:03 2007
@@ -21,13 +21,13 @@
 #include "llvm/ADT/FoldingSet.h"
 
 namespace llvm {
-
-/// Function parameters can have attributes to indicate how they should be
-/// treated by optimizations and code generation. This enumeration lists the
-/// attributes that can be associated with parameters or function results.
-/// @brief Function parameter attributes.
 namespace ParamAttr {
 
+/// Function parameters and results can have attributes to indicate how they 
+/// should be treated by optimizations and code generation. This enumeration 
+/// lists the attributes that can be associated with parameters or function 
+/// results.
+/// @brief Function parameter attributes.
 enum Attributes {
   None   = 0,  ///< No attributes have been set
   ZExt   = 1 << 0, ///< zero extended before/after call
@@ -41,7 +41,7 @@
 }
 
 /// This is just a pair of values to associate a set of parameter attributes
-/// with a parameter index.
+/// with a parameter index. 
 /// @brief ParameterAttributes with a parameter index.
 struct ParamAttrsWithIndex {
   uint16_t attrs; ///< The attributes that are set, |'d together
@@ -51,29 +51,43 @@
 /// @brief A vector of attribute/index pairs.
 typedef SmallVector ParamAttrsVector;
 
+/// @brief A more friendly way to reference the attributes.
 typedef ParamAttr::Attributes ParameterAttributes;
 
-/// This class is used by Function and CallInst to represent the set of 
-/// parameter attributes used. It represents a list of pairs of uint16_t, one
-/// for the parameter index, and one a set of ParameterAttributes bits.
-/// Parameters that have no attributes are not present in the list. The list
-/// may also be empty, but this doesn't occur in practice.  The list constructs
-/// as empty and is filled by the insert method. The list can be turned into 
-/// a string of mnemonics suitable for LLVM Assembly output. Various accessors
-/// are provided to obtain information about the attributes.
+/// This class represents a list of attribute/index pairs for parameter 
+/// attributes. Each entry in the list contains the index of a function 
+/// parameter and the associated ParameterAttributes. If a parameter's index is
+/// not present in the list, then no attributes are set for that parameter. The
+/// list may also be empty, but this does not occur in practice. An item in
+/// the 

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

2007-04-22 Thread Reid Spencer


Changes in directory llvm/lib/VMCore:

Function.cpp updated: 1.125 -> 1.126
Instructions.cpp updated: 1.88 -> 1.89
---
Log message:

For PR1136: http://llvm.org/PR1136 :
Add reference counting to ParamAttrsList and make use of it in Function,
CallInst and InvokeInst classes.


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

 Function.cpp |   18 ++
 Instructions.cpp |   22 ++
 2 files changed, 40 insertions(+)


Index: llvm/lib/VMCore/Function.cpp
diff -u llvm/lib/VMCore/Function.cpp:1.125 llvm/lib/VMCore/Function.cpp:1.126
--- llvm/lib/VMCore/Function.cpp:1.125  Sun Apr 22 00:46:44 2007
+++ llvm/lib/VMCore/Function.cppSun Apr 22 12:28:03 2007
@@ -129,6 +129,10 @@
   return PAL;
 }
 
+ParamAttrsList::~ParamAttrsList() {
+  ParamAttrsLists->RemoveNode(this);
+}
+
 
//===--===//
 // Function Implementation
 
//===--===//
@@ -162,6 +166,10 @@
   // Delete all of the method arguments and unlink from symbol table...
   ArgumentList.clear();
   delete SymTab;
+
+  // Drop our reference to the parameter attributes, if any.
+  if (ParamAttrs)
+ParamAttrs->dropRef();
 }
 
 void Function::setParent(Module *parent) {
@@ -172,6 +180,16 @@
 LeakDetector::removeGarbageObject(this);
 }
 
+void Function::setParamAttrs(ParamAttrsList *attrs) { 
+  if (ParamAttrs)
+ParamAttrs->dropRef();
+
+  if (attrs)
+attrs->addRef();
+
+  ParamAttrs = attrs; 
+}
+
 const FunctionType *Function::getFunctionType() const {
   return cast(getType()->getElementType());
 }


Index: llvm/lib/VMCore/Instructions.cpp
diff -u llvm/lib/VMCore/Instructions.cpp:1.88 
llvm/lib/VMCore/Instructions.cpp:1.89
--- llvm/lib/VMCore/Instructions.cpp:1.88   Sun Apr 22 00:46:44 2007
+++ llvm/lib/VMCore/Instructions.cppSun Apr 22 12:28:03 2007
@@ -186,6 +186,8 @@
 
 CallInst::~CallInst() {
   delete [] OperandList;
+  if (ParamAttrs)
+ParamAttrs->dropRef();
 }
 
 void CallInst::init(Value *Func, Value* const *Params, unsigned NumParams) {
@@ -346,6 +348,15 @@
 OL[i].init(InOL[i], this);
 }
 
+void CallInst::setParamAttrs(ParamAttrsList *newAttrs) {
+  if (ParamAttrs)
+ParamAttrs->dropRef();
+
+  if (newAttrs)
+newAttrs->addRef();
+
+  ParamAttrs = newAttrs; 
+}
 
 
//===--===//
 //InvokeInst Implementation
@@ -353,6 +364,8 @@
 
 InvokeInst::~InvokeInst() {
   delete [] OperandList;
+  if (ParamAttrs)
+ParamAttrs->dropRef();
 }
 
 void InvokeInst::init(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException,
@@ -422,6 +435,15 @@
   return setSuccessor(idx, B);
 }
 
+void InvokeInst::setParamAttrs(ParamAttrsList *newAttrs) {
+  if (ParamAttrs)
+ParamAttrs->dropRef();
+
+  if (newAttrs)
+newAttrs->addRef();
+
+  ParamAttrs = newAttrs; 
+}
 
 
//===--===//
 //ReturnInst Implementation



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


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

2007-04-22 Thread Jeff Cohen


Changes in directory llvm/tools/llvm-config:

llvm-config.in.in updated: 1.26 -> 1.27
---
Log message:

Add new option to usage help.

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

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


Index: llvm/tools/llvm-config/llvm-config.in.in
diff -u llvm/tools/llvm-config/llvm-config.in.in:1.26 
llvm/tools/llvm-config/llvm-config.in.in:1.27
--- llvm/tools/llvm-config/llvm-config.in.in:1.26   Sun Apr 22 00:05:36 2007
+++ llvm/tools/llvm-config/llvm-config.in.inSun Apr 22 13:33:20 2007
@@ -195,6 +195,7 @@
   --libfiles Fully qualified library filenames for makefile 
depends.
   --components   List of all possible components.
   --targets-builtList of all targets currently built.
+  --host-target  Target triple used to configure LLVM.
   --build-mode   Print build mode of LLVM tree (e.g. Debug or Release).
 Typical components:
   allAll LLVM libraries (default).



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


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

2007-04-22 Thread Jeff Cohen


Changes in directory llvm/include/llvm:

AbstractTypeUser.h updated: 1.27 -> 1.28
---
Log message:

Fix build problem with Gentoo 4.1.1-r3.

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

 AbstractTypeUser.h |4 
 1 files changed, 4 insertions(+)


Index: llvm/include/llvm/AbstractTypeUser.h
diff -u llvm/include/llvm/AbstractTypeUser.h:1.27 
llvm/include/llvm/AbstractTypeUser.h:1.28
--- llvm/include/llvm/AbstractTypeUser.h:1.27   Mon Jun  5 11:29:06 2006
+++ llvm/include/llvm/AbstractTypeUser.hSun Apr 22 13:49:32 2007
@@ -14,6 +14,10 @@
 #ifndef LLVM_ABSTRACT_TYPE_USER_H
 #define LLVM_ABSTRACT_TYPE_USER_H
 
+// IMPORTANT: Do not include this file directly.  Include Type.h instead.
+// Some versions of GCC can't handle the inlined method PATypeHolder::dropRef()
+// correctly otherwise.
+
 // This is the "master" include for  Whether this file needs it or 
not,
 // it must always include  for the files which include
 // llvm/AbstractTypeUser.h



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


[llvm-commits] CVS: llvm/lib/Bitcode/Reader/BitcodeReader.h

2007-04-22 Thread Jeff Cohen


Changes in directory llvm/lib/Bitcode/Reader:

BitcodeReader.h updated: 1.1 -> 1.2
---
Log message:

Fix build problem with Gentoo 4.1.1-r3.

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

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


Index: llvm/lib/Bitcode/Reader/BitcodeReader.h
diff -u llvm/lib/Bitcode/Reader/BitcodeReader.h:1.1 
llvm/lib/Bitcode/Reader/BitcodeReader.h:1.2
--- llvm/lib/Bitcode/Reader/BitcodeReader.h:1.1 Sun Apr 22 01:23:29 2007
+++ llvm/lib/Bitcode/Reader/BitcodeReader.h Sun Apr 22 13:49:32 2007
@@ -14,7 +14,7 @@
 #ifndef BITCODE_READER_H
 #define BITCODE_READER_H
 
-#include "llvm/AbstractTypeUser.h"
+#include "llvm/Type.h"
 #include "llvm/ModuleProvider.h"
 #include "../LLVMBitCodes.h"
 #include 



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


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

2007-04-22 Thread Jeff Cohen
For the record, GCC 3.4.6 also has this problem.

Jeff Cohen wrote:
> Changes in directory llvm/include/llvm:
>
> AbstractTypeUser.h updated: 1.27 -> 1.28
> ---
> Log message:
>
> Fix build problem with Gentoo 4.1.1-r3.
>
> ---
> Diffs of the changes:  (+4 -0)
>
>  AbstractTypeUser.h |4 
>  1 files changed, 4 insertions(+)
>
>
> Index: llvm/include/llvm/AbstractTypeUser.h
> diff -u llvm/include/llvm/AbstractTypeUser.h:1.27 
> llvm/include/llvm/AbstractTypeUser.h:1.28
> --- llvm/include/llvm/AbstractTypeUser.h:1.27 Mon Jun  5 11:29:06 2006
> +++ llvm/include/llvm/AbstractTypeUser.h  Sun Apr 22 13:49:32 2007
> @@ -14,6 +14,10 @@
>  #ifndef LLVM_ABSTRACT_TYPE_USER_H
>  #define LLVM_ABSTRACT_TYPE_USER_H
>  
> +// IMPORTANT: Do not include this file directly.  Include Type.h instead.
> +// Some versions of GCC can't handle the inlined method 
> PATypeHolder::dropRef()
> +// correctly otherwise.
> +
>  // This is the "master" include for  Whether this file needs it or 
> not,
>  // it must always include  for the files which include
>  // llvm/AbstractTypeUser.h
>
>
>
> ___
> 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/VMCore/Instructions.cpp AsmWriter.cpp

2007-04-22 Thread Christopher Lamb


Changes in directory llvm/lib/VMCore:

Instructions.cpp updated: 1.89 -> 1.90
AsmWriter.cpp updated: 1.273 -> 1.274
---
Log message:

PR400: http://llvm.org/PR400  work phase 1. Add attributed load/store 
instructions for volatile/align to LLVM.


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

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


Index: llvm/lib/VMCore/Instructions.cpp
diff -u llvm/lib/VMCore/Instructions.cpp:1.89 
llvm/lib/VMCore/Instructions.cpp:1.90
--- llvm/lib/VMCore/Instructions.cpp:1.89   Sun Apr 22 12:28:03 2007
+++ llvm/lib/VMCore/Instructions.cppSun Apr 22 14:24:39 2007
@@ -20,6 +20,7 @@
 #include "llvm/ParameterAttributes.h"
 #include "llvm/Support/CallSite.h"
 #include "llvm/Support/ConstantRange.h"
+#include "llvm/Support/MathExtras.h"
 using namespace llvm;
 
 unsigned CallSite::getCallingConv() const {
@@ -705,6 +706,7 @@
   : UnaryInstruction(cast(Ptr->getType())->getElementType(),
  Load, Ptr, InsertBef) {
   setVolatile(false);
+  setAlignment(0);
   AssertOK();
   setName(Name);
 }
@@ -713,6 +715,7 @@
   : UnaryInstruction(cast(Ptr->getType())->getElementType(),
  Load, Ptr, InsertAE) {
   setVolatile(false);
+  setAlignment(0);
   AssertOK();
   setName(Name);
 }
@@ -722,6 +725,17 @@
   : UnaryInstruction(cast(Ptr->getType())->getElementType(),
  Load, Ptr, InsertBef) {
   setVolatile(isVolatile);
+  setAlignment(0);
+  AssertOK();
+  setName(Name);
+}
+
+LoadInst::LoadInst(Value *Ptr, const std::string &Name, bool isVolatile, 
+   unsigned Align, Instruction *InsertBef)
+  : UnaryInstruction(cast(Ptr->getType())->getElementType(),
+ Load, Ptr, InsertBef) {
+  setVolatile(isVolatile);
+  setAlignment(Align);
   AssertOK();
   setName(Name);
 }
@@ -731,6 +745,7 @@
   : UnaryInstruction(cast(Ptr->getType())->getElementType(),
  Load, Ptr, InsertAE) {
   setVolatile(isVolatile);
+  setAlignment(0);
   AssertOK();
   setName(Name);
 }
@@ -741,6 +756,7 @@
   : UnaryInstruction(cast(Ptr->getType())->getElementType(),
  Load, Ptr, InsertBef) {
   setVolatile(false);
+  setAlignment(0);
   AssertOK();
   if (Name && Name[0]) setName(Name);
 }
@@ -749,6 +765,7 @@
   : UnaryInstruction(cast(Ptr->getType())->getElementType(),
  Load, Ptr, InsertAE) {
   setVolatile(false);
+  setAlignment(0);
   AssertOK();
   if (Name && Name[0]) setName(Name);
 }
@@ -758,6 +775,7 @@
 : UnaryInstruction(cast(Ptr->getType())->getElementType(),
Load, Ptr, InsertBef) {
   setVolatile(isVolatile);
+  setAlignment(0);
   AssertOK();
   if (Name && Name[0]) setName(Name);
 }
@@ -767,10 +785,15 @@
   : UnaryInstruction(cast(Ptr->getType())->getElementType(),
  Load, Ptr, InsertAE) {
   setVolatile(isVolatile);
+  setAlignment(0);
   AssertOK();
   if (Name && Name[0]) setName(Name);
 }
 
+void LoadInst::setAlignment(unsigned Align) {
+  assert((Align & (Align-1)) == 0 && "Alignment is not a power of 2!");
+  SubclassData = (SubclassData & 1) | ((Log2_32(Align)+1)<<1);
+}
 
 
//===--===//
 //   StoreInst Implementation
@@ -790,6 +813,7 @@
   Ops[0].init(val, this);
   Ops[1].init(addr, this);
   setVolatile(false);
+  setAlignment(0);
   AssertOK();
 }
 
@@ -798,6 +822,7 @@
   Ops[0].init(val, this);
   Ops[1].init(addr, this);
   setVolatile(false);
+  setAlignment(0);
   AssertOK();
 }
 
@@ -807,6 +832,17 @@
   Ops[0].init(val, this);
   Ops[1].init(addr, this);
   setVolatile(isVolatile);
+  setAlignment(0);
+  AssertOK();
+}
+
+StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile,
+ unsigned Align, Instruction *InsertBefore)
+  : Instruction(Type::VoidTy, Store, Ops, 2, InsertBefore) {
+  Ops[0].init(val, this);
+  Ops[1].init(addr, this);
+  setVolatile(isVolatile);
+  setAlignment(Align);
   AssertOK();
 }
 
@@ -816,9 +852,15 @@
   Ops[0].init(val, this);
   Ops[1].init(addr, this);
   setVolatile(isVolatile);
+  setAlignment(0);
   AssertOK();
 }
 
+void StoreInst::setAlignment(unsigned Align) {
+  assert((Align & (Align-1)) == 0 && "Alignment is not a power of 2!");
+  SubclassData = (SubclassData & 1) | ((Log2_32(Align)+1)<<1);
+}
+
 
//===--===//
 //   GetElementPtrInst Implementation
 
//===--===//


Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.273 llvm/lib/VMCore/AsmWriter.cpp:1.274
--- llvm/lib/VMCore/AsmWriter.cpp:1.273 Sun Apr 22 00:46:44 2007
+++ llvm/lib/VMCore/AsmWriter.cpp   Sun Apr 22 14:24:39 2007
@@ -1307,6 +1307,13 @@
   writeOperand(I.getOperand(i), PrintAllTypes);
 }
   }
+  
+  // Print po

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

2007-04-22 Thread Christopher Lamb


Changes in directory llvm/lib/AsmParser:

llvmAsmParser.y updated: 1.346 -> 1.347
---
Log message:

PR400: http://llvm.org/PR400  work phase 1. Add attributed load/store 
instructions for volatile/align to LLVM.


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

 llvmAsmParser.y |8 
 1 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.346 
llvm/lib/AsmParser/llvmAsmParser.y:1.347
--- llvm/lib/AsmParser/llvmAsmParser.y:1.346Sun Apr 22 00:46:44 2007
+++ llvm/lib/AsmParser/llvmAsmParser.y  Sun Apr 22 14:24:39 2007
@@ -2940,7 +2940,7 @@
 CHECK_FOR_ERROR
   }
 
-  | OptVolatile LOAD Types ValueRef {
+  | OptVolatile LOAD Types ValueRef OptCAlign {
 if (!UpRefs.empty())
   GEN_ERROR("Invalid upreference in type: " + (*$3)->getDescription());
 if (!isa($3->get()))
@@ -2951,10 +2951,10 @@
  (*$3)->getDescription());
 Value* tmpVal = getVal(*$3, $4);
 CHECK_FOR_ERROR
-$$ = new LoadInst(tmpVal, "", $1);
+$$ = new LoadInst(tmpVal, "", $1, $5);
 delete $3;
   }
-  | OptVolatile STORE ResolvedVal ',' Types ValueRef {
+  | OptVolatile STORE ResolvedVal ',' Types ValueRef OptCAlign {
 if (!UpRefs.empty())
   GEN_ERROR("Invalid upreference in type: " + (*$5)->getDescription());
 const PointerType *PT = dyn_cast($5->get());
@@ -2968,7 +2968,7 @@
 
 Value* tmpVal = getVal(*$5, $6);
 CHECK_FOR_ERROR
-$$ = new StoreInst($3, tmpVal, $1);
+$$ = new StoreInst($3, tmpVal, $1, $7);
 delete $5;
   }
   | GETELEMENTPTR Types ValueRef IndexList {



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


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

2007-04-22 Thread Christopher Lamb


Changes in directory llvm/lib/Bytecode/Reader:

Reader.cpp updated: 1.251 -> 1.252
---
Log message:

PR400: http://llvm.org/PR400  work phase 1. Add attributed load/store 
instructions for volatile/align to LLVM.


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

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


Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.251 
llvm/lib/Bytecode/Reader/Reader.cpp:1.252
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.251   Sun Apr 22 00:46:44 2007
+++ llvm/lib/Bytecode/Reader/Reader.cpp Sun Apr 22 14:24:39 2007
@@ -831,13 +831,31 @@
  &Idx[0], Idx.size());
   break;
 }
-case 62:   // volatile load
+case 62: {   // attributed load
+if (Oprnds.size() != 2 || !isa(InstTy))
+  error("Invalid attributed load instruction!");
+signed Log2AlignVal = ((Oprnds[1]>>1)-1);
+Result = new LoadInst(getValue(iType, Oprnds[0]), "", (Oprnds[1] & 1),
+  ((Log2AlignVal < 0) ? 0 : 1<(InstTy))
 error("Invalid load instruction!");
-  Result = new LoadInst(getValue(iType, Oprnds[0]), "", Opcode == 62);
+  Result = new LoadInst(getValue(iType, Oprnds[0]), "");
   break;
-case 63:   // volatile store
+case 63: {   // attributed store
+if (!isa(InstTy) || Oprnds.size() != 3)
+  error("Invalid attributed store instruction!");
+
+Value *Ptr = getValue(iType, Oprnds[1]);
+const Type *ValTy = 
cast(Ptr->getType())->getElementType();
+signed Log2AlignVal = ((Oprnds[2]>>1)-1);
+Result = new StoreInst(getValue(getTypeSlot(ValTy), Oprnds[0]), Ptr,
+   (Oprnds[2] & 1), 
+   ((Log2AlignVal < 0) ? 0 : 1<(InstTy) || Oprnds.size() != 2)
 error("Invalid store instruction!");



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


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

2007-04-22 Thread Christopher Lamb


Changes in directory llvm/lib/Bytecode/Writer:

Writer.cpp updated: 1.175 -> 1.176
---
Log message:

PR400: http://llvm.org/PR400  work phase 1. Add attributed load/store 
instructions for volatile/align to LLVM.


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

 Writer.cpp |   41 +++--
 1 files changed, 35 insertions(+), 6 deletions(-)


Index: llvm/lib/Bytecode/Writer/Writer.cpp
diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.175 
llvm/lib/Bytecode/Writer/Writer.cpp:1.176
--- llvm/lib/Bytecode/Writer/Writer.cpp:1.175   Sat Apr 21 13:36:27 2007
+++ llvm/lib/Bytecode/Writer/Writer.cpp Sun Apr 22 14:24:39 2007
@@ -445,7 +445,8 @@
   unsigned NumArgs = I->getNumOperands();
   bool HasExtraArg = false;
   if (isa(I)  || isa(I) || 
-  isa(I) || isa(I) || Opcode == 58)
+  isa(I) || isa(I) || Opcode == 58 || 
+  Opcode == 62 || Opcode == 63)
 HasExtraArg = true;
   if (const AllocationInst *AI = dyn_cast(I))
 HasExtraArg = AI->getAlignment() != 0;
@@ -468,6 +469,12 @@
 } else if (const AllocationInst *AI = dyn_cast(I)) {
   if (AI->getAlignment())
 output_vbr((unsigned)Log2_32(AI->getAlignment())+1);
+} else if (Opcode == 62) { // Attributed load
+  output_vbr((unsigned)(((Log2_32(cast(I)->getAlignment())+1)<<1)
++ (cast(I)->isVolatile() ? 1 : 0)));
+} else if (Opcode == 63) { // Attributed store
+  
output_vbr((unsigned)(((Log2_32(cast(I)->getAlignment())+1)<<1)
++ (cast(I)->isVolatile() ? 1 : 0)));
 }
   } else {
 output_vbr(Table.getSlot(I->getOperand(0)));
@@ -616,7 +623,7 @@
   unsigned Opcode = I.getOpcode();
   unsigned NumOperands = I.getNumOperands();
 
-  // Encode 'tail call' as 61, 'volatile load' as 62, and 'volatile store' as
+  // Encode 'tail call' as 61
   // 63.
   if (const CallInst *CI = dyn_cast(&I)) {
 if (CI->getCallingConv() == CallingConv::C) {
@@ -632,10 +639,6 @@
 } else {
   Opcode = 58;  // Call escape sequence.
 }
-  } else if (isa(I) && cast(I).isVolatile()) {
-Opcode = 62;
-  } else if (isa(I) && cast(I).isVolatile()) {
-Opcode = 63;
   }
 
   // Figure out which type to encode with the instruction.  Typically we want
@@ -744,6 +747,32 @@
 } else if (isa(I)) {
   // Invoke escape seq has at least 4 operands to encode.
   ++NumOperands;
+} else if (const LoadInst *LI = dyn_cast(&I)) {
+  // Encode attributed load as opcode 62
+  // We need to encode the attributes of the load instruction as the second
+  // operand. Its not really a slot, but we don't want to break the 
+  // instruction format for these instructions.
+  if (LI->getAlignment() || LI->isVolatile()) {
+NumOperands = 2;
+Slots[1] = ((Log2_32(LI->getAlignment())+1)<<1) + 
+(LI->isVolatile() ? 1 : 0);
+if (Slots[1] > MaxOpSlot) 
+  MaxOpSlot = Slots[1];
+Opcode = 62;
+  }
+} else if (const StoreInst *SI = dyn_cast(&I)) {
+  // Encode attributed store as opcode 63
+  // We need to encode the attributes of the store instruction as the third
+  // operand. Its not really a slot, but we don't want to break the 
+  // instruction format for these instructions.
+  if (SI->getAlignment() || SI->isVolatile()) {
+NumOperands = 3;
+Slots[2] = ((Log2_32(SI->getAlignment())+1)<<1) + 
+(SI->isVolatile() ? 1 : 0);
+if (Slots[2] > MaxOpSlot) 
+  MaxOpSlot = Slots[2];
+Opcode = 63;
+  }
 }
 
 // Decide which instruction encoding to use.  This is determined primarily



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


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

2007-04-22 Thread Christopher Lamb


Changes in directory llvm/include/llvm:

Instructions.h updated: 1.70 -> 1.71
---
Log message:

PR400: http://llvm.org/PR400  work phase 1. Add attributed load/store 
instructions for volatile/align to LLVM.


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

 Instructions.h |   44 +---
 1 files changed, 37 insertions(+), 7 deletions(-)


Index: llvm/include/llvm/Instructions.h
diff -u llvm/include/llvm/Instructions.h:1.70 
llvm/include/llvm/Instructions.h:1.71
--- llvm/include/llvm/Instructions.h:1.70   Sun Apr 22 12:28:03 2007
+++ llvm/include/llvm/Instructions.hSun Apr 22 14:24:39 2007
@@ -211,9 +211,11 @@
 /// SubclassData field in Value to store whether or not the load is volatile.
 ///
 class LoadInst : public UnaryInstruction {
+
   LoadInst(const LoadInst &LI)
 : UnaryInstruction(LI.getType(), Load, LI.getOperand(0)) {
 setVolatile(LI.isVolatile());
+setAlignment(LI.getAlignment());
 
 #ifndef NDEBUG
 AssertOK();
@@ -223,14 +225,16 @@
 public:
   LoadInst(Value *Ptr, const std::string &Name, Instruction *InsertBefore);
   LoadInst(Value *Ptr, const std::string &Name, BasicBlock *InsertAtEnd);
-  LoadInst(Value *Ptr, const std::string &Name, bool isVolatile = false,
+  LoadInst(Value *Ptr, const std::string &Name, bool isVolatile = false, 
+   Instruction *InsertBefore = 0);
+  LoadInst(Value *Ptr, const std::string &Name, bool isVolatile, unsigned 
Align,
Instruction *InsertBefore = 0);
   LoadInst(Value *Ptr, const std::string &Name, bool isVolatile,
BasicBlock *InsertAtEnd);
 
   LoadInst(Value *Ptr, const char *Name, Instruction *InsertBefore);
   LoadInst(Value *Ptr, const char *Name, BasicBlock *InsertAtEnd);
-  explicit LoadInst(Value *Ptr, const char *Name = 0, bool isVolatile = false,
+  explicit LoadInst(Value *Ptr, const char *Name = 0, bool isVolatile = false, 
 Instruction *InsertBefore = 0);
   LoadInst(Value *Ptr, const char *Name, bool isVolatile,
BasicBlock *InsertAtEnd);
@@ -238,14 +242,25 @@
   /// isVolatile - Return true if this is a load from a volatile memory
   /// location.
   ///
-  bool isVolatile() const { return SubclassData; }
+  bool isVolatile() const { return SubclassData & 1; }
 
   /// setVolatile - Specify whether this is a volatile load or not.
   ///
-  void setVolatile(bool V) { SubclassData = V; }
+  void setVolatile(bool V) { 
+SubclassData = (SubclassData & ~1) | ((V) ? 1 : 0); 
+  }
 
   virtual LoadInst *clone() const;
 
+  /// getAlignment - Return the alignment of the access that is being performed
+  ///
+  unsigned getAlignment() const {
+signed Log2AlignVal = ((SubclassData>>1)-1);
+return ((Log2AlignVal < 0) ? 0 : 1<>1)-1);
+return ((Log2AlignVal < 0) ? 0 : 1

[llvm-commits] TargetData support for alignment of degenerate vectors

2007-04-22 Thread Christopher Lamb
This patch was buried at the end of the discussion...--Christopher LambBegin forwarded message:From: Christopher Lamb <[EMAIL PROTECTED]>Date: April 22, 2007 4:12:29 AM CDTTo: CVS Commit Messages for LLVM repository Subject: Re: [llvm-commits] Major regressions On Apr 22, 2007, at 1:40 AM, Chris Lattner wrote: On Apr 21, 2007, at 4:28 PM, Christopher Lamb wrote: On Apr 21, 2007, at 6:12 PM, Reid Spencer wrote: On Sat, 2007-04-21 at 18:07 -0500, Christopher Lamb wrote: I'm getting a regression after my fixes that's coming fromgetABIAlignment not finding an alignment to use for a type,is this a bug? It could be.  isn't a useful vector so it probably doesn'thave an ABI Alignment. It should, however, default to whatever thetarget's alignment is for float. Perhaps that case isn't covered inTargetData or there's something else wrong with TargetData?Did you walk through it in the debugger? Yes. It appears that TargetData doesn't have logic to match the caseof vector types smaller than the smallest defined ABI vector type.It's asserting in TargetData::getAlignmentInfo:assert(BestMatchIdx != -1 && "Didn't find alignment info for thisdatatype!"); Ahh. I don't think it has enough information to be able to determinewhether or not it's being asked for the alignment of a smaller vectortype that could be mapped onto a non-vector type.My feeling is that in this case getAlignmentInfo should return aconservative fallback alignment the same way that's done for integers. I think it should fall back to the ABI alignment of the scalar type.If a target doesn't have an entry for a vector type, we can assumethat it will be scalarized. Here's a patch to do it.--Christopher Lamb

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


[llvm-commits] AsmParser *.cvs files

2007-04-22 Thread Christopher Lamb
I noticed that Reid didn't check in the generated .cvs files from  
AsmParser changes, and neither did I this time. Is this something  
that should be done?


--
Christopher Lamb



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


Re: [llvm-commits] AsmParser *.cvs files

2007-04-22 Thread Anton Korobeynikov
Hello, Christopher.

> I noticed that Reid didn't check in the generated .cvs files from
> AsmParser changes, and neither did I this time. Is this something that
> should be done?
Yes. Definitely. But with separate commit (not with *.l and *.y).

-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics & Mechanics, Saint Petersburg State University.


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


Re: [llvm-commits] AsmParser *.cvs files

2007-04-22 Thread Christopher Lamb
It appears that Mac's have an older version of Bison that the one  
Reid was using. If this is a problem Reid should probably regenerate  
the files.


--
Christopher Lamb


On Apr 22, 2007, at 2:56 PM, Anton Korobeynikov wrote:


Hello, Christopher.


I noticed that Reid didn't check in the generated .cvs files from
AsmParser changes, and neither did I this time. Is this something  
that

should be done?

Yes. Definitely. But with separate commit (not with *.l and *.y).

--
With best regards, Anton Korobeynikov.

Faculty of Mathematics & Mechanics, Saint Petersburg State University.


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






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


Re: [llvm-commits] AsmParser *.cvs files

2007-04-22 Thread Anton Korobeynikov
Christopher,

> It appears that Mac's have an older version of Bison that the one Reid
> was using. If this is a problem Reid should probably regenerate the
> files.
I think it doesn't matter, which bison version is used. The only
requirement - it should be "known to work" (e.g 2.x).

-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics & Mechanics, Saint Petersburg State University.


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


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

2007-04-22 Thread Chris Lattner
>
> Undo erroneous corrections.

Thanks Jeff!

-Chris

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


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

2007-04-22 Thread Chris Lattner
> Index: llvm/include/llvm/AbstractTypeUser.h
> diff -u llvm/include/llvm/AbstractTypeUser.h:1.27 llvm/include/llvm/ 
> AbstractTypeUser.h:1.28
> --- llvm/include/llvm/AbstractTypeUser.h:1.27 Mon Jun  5 11:29:06 2006
> +++ llvm/include/llvm/AbstractTypeUser.h  Sun Apr 22 13:49:32 2007
> @@ -14,6 +14,10 @@
>  #ifndef LLVM_ABSTRACT_TYPE_USER_H
>  #define LLVM_ABSTRACT_TYPE_USER_H
>
> +// IMPORTANT: Do not include this file directly.  Include Type.h  
> instead.
> +// Some versions of GCC can't handle the inlined method  
> PATypeHolder::dropRef()
> +// correctly otherwise.
> +

Ugh.  Is this really true in all cases?  Should we add something like:

#ifndef LLVM_TYPE_H
#error "dont' do this"
#endif

to the top of this file?

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


Re: [llvm-commits] AsmParser *.cvs files

2007-04-22 Thread Chris Lattner

On Apr 22, 2007, at 1:17 PM, Anton Korobeynikov wrote:

> Christopher,
>
>> It appears that Mac's have an older version of Bison that the one  
>> Reid
>> was using. If this is a problem Reid should probably regenerate the
>> files.
> I think it doesn't matter, which bison version is used. The only
> requirement - it should be "known to work" (e.g 2.x).

Yep, Anton's right.  We check in the .cvs files separately from  
the .l/.y files to make it easier to review the code.  The .cvs files  
are used by people without bison/flex (e.g. on win32).

-Chris

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


[llvm-commits] CVS: llvm/test/CodeGen/Alpha/zapnot3.ll

2007-04-22 Thread Andrew Lenharth


Changes in directory llvm/test/CodeGen/Alpha:

zapnot3.ll updated: 1.2 -> 1.3
---
Log message:

simplify this test until it can be dealt with

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

 zapnot3.ll |   13 +++--
 1 files changed, 7 insertions(+), 6 deletions(-)


Index: llvm/test/CodeGen/Alpha/zapnot3.ll
diff -u llvm/test/CodeGen/Alpha/zapnot3.ll:1.2 
llvm/test/CodeGen/Alpha/zapnot3.ll:1.3
--- llvm/test/CodeGen/Alpha/zapnot3.ll:1.2  Fri Dec  1 22:23:08 2006
+++ llvm/test/CodeGen/Alpha/zapnot3.ll  Sun Apr 22 15:58:56 2007
@@ -1,10 +1,11 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep zapnot | wc -l | 
grep 2
+; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep zapnot
 
-ulong %foo(ulong %y) {
-%tmp = and ulong %y,  65535
-%tmp2 = shr ulong %tmp,  ubyte 3
-ret ulong %tmp2
-}
+;demanded bits mess up this mask in a hard to fix way
+;ulong %foo(ulong %y) {
+;%tmp = and ulong %y,  65535
+;%tmp2 = shr ulong %tmp,  ubyte 3
+;ret ulong %tmp2
+;}
 
 ulong %foo2(ulong %y) {
 %tmp = shr ulong %y, ubyte 3;  [#uses=1]



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


Re: [llvm-commits] TargetData support for alignment of degenerate vectors

2007-04-22 Thread Chris Lattner

Looks good to me, plz apply, Thanks!

-Chris

On Apr 22, 2007, at 12:32 PM, Christopher Lamb wrote:


This patch was buried at the end of the discussion...

--
Christopher Lamb

Begin forwarded message:


From: Christopher Lamb <[EMAIL PROTECTED]>
Date: April 22, 2007 4:12:29 AM CDT
To: CVS Commit Messages for LLVM repository [EMAIL PROTECTED]>

Subject: Re: [llvm-commits] Major regressions

On Apr 22, 2007, at 1:40 AM, Chris Lattner wrote:



On Apr 21, 2007, at 4:28 PM, Christopher Lamb wrote:



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


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

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


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

have an ABI Alignment. It should, however, default to whatever the
target's alignment is for float. Perhaps that case isn't  
covered in

TargetData or there's something else wrong with TargetData?

Did you walk through it in the debugger?


Yes. It appears that TargetData doesn't have logic to match the  
case

of vector types smaller than the smallest defined ABI vector type.
It's asserting in TargetData::getAlignmentInfo:

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


Ahh.


I don't think it has enough information to be able to determine
whether or not it's being asked for the alignment of a smaller  
vector

type that could be mapped onto a non-vector type.

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


I think it should fall back to the ABI alignment of the scalar type.
If a target doesn't have an entry for a vector type, we can assume
that it will be scalarized.


Here's a patch to do it.
--
Christopher Lamb




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


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


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

2007-04-22 Thread Chris Lattner
> +  /// getAlignment - Return the alignment of the access that is  
> being performed
> +  ///
> +  unsigned getAlignment() const {
> +signed Log2AlignVal = ((SubclassData>>1)-1);
> +return ((Log2AlignVal < 0) ? 0 : 1< +  }

I think that this can be written as:
((1 << (SubclassData>>1)) >> 1

which is branchless and simpler.

> +  /// getAlignment - Return the alignment of the access that is  
> being performed
> +  ///
> +  unsigned getAlignment() const {
> +signed Log2AlignVal = ((SubclassData>>1)-1);
> +return ((Log2AlignVal < 0) ? 0 : 1< +  }

Likewise,

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


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

2007-04-22 Thread Christopher Lamb


Changes in directory llvm/lib/Target:

TargetData.cpp updated: 1.106 -> 1.107
---
Log message:

Support alignment queries for degenerate (length 1) vectors.


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

 TargetData.cpp |   10 --
 1 files changed, 8 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/TargetData.cpp
diff -u llvm/lib/Target/TargetData.cpp:1.106 
llvm/lib/Target/TargetData.cpp:1.107
--- llvm/lib/Target/TargetData.cpp:1.106Mon Apr  9 14:26:30 2007
+++ llvm/lib/Target/TargetData.cpp  Sun Apr 22 16:54:13 2007
@@ -493,9 +493,15 @@
   case Type::DoubleTyID:
 AlignType = FLOAT_ALIGN;
 break;
-  case Type::VectorTyID:
-AlignType = VECTOR_ALIGN;
+  case Type::VectorTyID: {
+const VectorType *VTy = cast(Ty);
+// Degenerate vectors are assumed to be scalar-ized
+if (VTy->getNumElements() == 1)
+  return getAlignment(VTy->getElementType(), abi_or_pref);
+else
+  AlignType = VECTOR_ALIGN;
 break;
+  }
   default:
 assert(0 && "Bad type for getAlignment!!!");
 break;



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


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

2007-04-22 Thread Jeff Cohen


Changes in directory llvm/lib/VMCore:

Type.cpp updated: 1.185 -> 1.186
---
Log message:

Have compiler enforce this.

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

 Type.cpp |1 -
 1 files changed, 1 deletion(-)


Index: llvm/lib/VMCore/Type.cpp
diff -u llvm/lib/VMCore/Type.cpp:1.185 llvm/lib/VMCore/Type.cpp:1.186
--- llvm/lib/VMCore/Type.cpp:1.185  Sun Apr 22 00:46:44 2007
+++ llvm/lib/VMCore/Type.cppSun Apr 22 17:16:55 2007
@@ -11,7 +11,6 @@
 //
 
//===--===//
 
-#include "llvm/AbstractTypeUser.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/ParameterAttributes.h"
 #include "llvm/Constants.h"



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


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

2007-04-22 Thread Jeff Cohen


Changes in directory llvm/include/llvm:

AbstractTypeUser.h updated: 1.28 -> 1.29
---
Log message:

Have compiler enforce this.

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

 AbstractTypeUser.h |8 +---
 1 files changed, 5 insertions(+), 3 deletions(-)


Index: llvm/include/llvm/AbstractTypeUser.h
diff -u llvm/include/llvm/AbstractTypeUser.h:1.28 
llvm/include/llvm/AbstractTypeUser.h:1.29
--- llvm/include/llvm/AbstractTypeUser.h:1.28   Sun Apr 22 13:49:32 2007
+++ llvm/include/llvm/AbstractTypeUser.hSun Apr 22 17:16:55 2007
@@ -14,9 +14,11 @@
 #ifndef LLVM_ABSTRACT_TYPE_USER_H
 #define LLVM_ABSTRACT_TYPE_USER_H
 
-// IMPORTANT: Do not include this file directly.  Include Type.h instead.
-// Some versions of GCC can't handle the inlined method PATypeHolder::dropRef()
-// correctly otherwise.
+#if !defined(LLVM_TYPE_H) && !defined(LLVM_VALUE_H)
+#error Do not include this file directly.  Include Type.h instead.
+#error Some versions of GCC (e.g. 3.4 and 4.1) can't handle the inlined method
+#error PATypeHolder::dropRef() correctly otherwise.
+#endif
 
 // This is the "master" include for  Whether this file needs it or 
not,
 // it must always include  for the files which include



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


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

2007-04-22 Thread Christopher Lamb


Changes in directory llvm/lib/Bytecode/Reader:

Reader.cpp updated: 1.252 -> 1.253
---
Log message:

PR400: http://llvm.org/PR400  phase 1 implementation feedback.


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

 Reader.cpp |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)


Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.252 
llvm/lib/Bytecode/Reader/Reader.cpp:1.253
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.252   Sun Apr 22 14:24:39 2007
+++ llvm/lib/Bytecode/Reader/Reader.cpp Sun Apr 22 17:22:02 2007
@@ -834,9 +834,8 @@
 case 62: {   // attributed load
 if (Oprnds.size() != 2 || !isa(InstTy))
   error("Invalid attributed load instruction!");
-signed Log2AlignVal = ((Oprnds[1]>>1)-1);
 Result = new LoadInst(getValue(iType, Oprnds[0]), "", (Oprnds[1] & 1),
-  ((Log2AlignVal < 0) ? 0 : 1<>1)) >> 1);
 break;
   }
 case Instruction::Load:
@@ -850,10 +849,9 @@
 
 Value *Ptr = getValue(iType, Oprnds[1]);
 const Type *ValTy = 
cast(Ptr->getType())->getElementType();
-signed Log2AlignVal = ((Oprnds[2]>>1)-1);
 Result = new StoreInst(getValue(getTypeSlot(ValTy), Oprnds[0]), Ptr,
(Oprnds[2] & 1), 
-   ((Log2AlignVal < 0) ? 0 : 1<>1)) >> 1);
 break;
   }
 case Instruction::Store: {



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


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

2007-04-22 Thread Christopher Lamb


Changes in directory llvm/include/llvm:

Instructions.h updated: 1.71 -> 1.72
---
Log message:

PR400: http://llvm.org/PR400  phase 1 implementation feedback.


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

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


Index: llvm/include/llvm/Instructions.h
diff -u llvm/include/llvm/Instructions.h:1.71 
llvm/include/llvm/Instructions.h:1.72
--- llvm/include/llvm/Instructions.h:1.71   Sun Apr 22 14:24:39 2007
+++ llvm/include/llvm/Instructions.hSun Apr 22 17:22:02 2007
@@ -255,8 +255,7 @@
   /// getAlignment - Return the alignment of the access that is being performed
   ///
   unsigned getAlignment() const {
-signed Log2AlignVal = ((SubclassData>>1)-1);
-return ((Log2AlignVal < 0) ? 0 : 1<>1)) >> 1;
   }
   
   void setAlignment(unsigned Align);
@@ -331,8 +330,7 @@
   /// getAlignment - Return the alignment of the access that is being performed
   ///
   unsigned getAlignment() const {
-signed Log2AlignVal = ((SubclassData>>1)-1);
-return ((Log2AlignVal < 0) ? 0 : 1<>1)) >> 1;
   }
   
   void setAlignment(unsigned Align);



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


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

2007-04-22 Thread Reid Spencer
On Sun, 2007-04-22 at 13:45 -0700, Chris Lattner wrote:
> > Index: llvm/include/llvm/AbstractTypeUser.h
> > diff -u llvm/include/llvm/AbstractTypeUser.h:1.27 llvm/include/llvm/ 
> > AbstractTypeUser.h:1.28
> > --- llvm/include/llvm/AbstractTypeUser.h:1.27   Mon Jun  5 11:29:06 2006
> > +++ llvm/include/llvm/AbstractTypeUser.hSun Apr 22 13:49:32 2007
> > @@ -14,6 +14,10 @@
> >  #ifndef LLVM_ABSTRACT_TYPE_USER_H
> >  #define LLVM_ABSTRACT_TYPE_USER_H
> >
> > +// IMPORTANT: Do not include this file directly.  Include Type.h  
> > instead.
> > +// Some versions of GCC can't handle the inlined method  
> > PATypeHolder::dropRef()
> > +// correctly otherwise.
> > +
> 
> Ugh.  Is this really true in all cases?  Should we add something like:
> 
> #ifndef LLVM_TYPE_H
> #error "dont' do this"
> #endif
> 
> to the top of this file?

If that's the case then ATU.h should just be folded into Type.h and we
don't ever have to talk about this again :)

Reid.

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

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


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

2007-04-22 Thread Bill Wendling
It could have been a glitch on the part of the updating thingy. Let  
me know if this happens again!

-bw

On Apr 22, 2007, at 7:41 AM, Jeff Cohen wrote:

> Reid Spencer wrote:
>> Jeff,
>>
>> On Sun, 2007-04-22 at 07:19 -0700, Jeff Cohen wrote:
>>
>>> The mirror has not been updated in two days.  llvm-gcc is now
>>> unbuildable by the public.
>>>
>>
>> I just updated and the changes that Chris committed for me last night
>> are in the repository mirror. The rev # is 315.  Seems fine to me.
>>
>
> Urm... does seem fine now.  All I know is that my nightly tester  
> ran one
> hour after the mirror was updated (according to the svn log), and  
> yet it
> did not pick up 315.
>
> ___
> 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/Target/X86/X86ATTAsmPrinter.cpp X86ISelLowering.cpp X86InstrInfo.td

2007-04-22 Thread Lauro Ramos Venancio


Changes in directory llvm/lib/Target/X86:

X86ATTAsmPrinter.cpp updated: 1.101 -> 1.102
X86ISelLowering.cpp updated: 1.395 -> 1.396
X86InstrInfo.td updated: 1.303 -> 1.304
---
Log message:

X86 TLS: fix and optimize the implementation of "initial exec" model.


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

 X86ATTAsmPrinter.cpp |2 +-
 X86ISelLowering.cpp  |4 
 X86InstrInfo.td  |7 ++-
 3 files changed, 11 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.101 
llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.102
--- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.101  Fri Apr 20 16:38:10 2007
+++ llvm/lib/Target/X86/X86ATTAsmPrinter.cppSun Apr 22 17:50:52 2007
@@ -277,7 +277,7 @@
 GlobalVariable *GVar = dyn_cast(GV);
 bool isThreadLocal = GVar && GVar->isThreadLocal();
 
-if (!isMemOp && !isCallOp && !isThreadLocal) O << '$';
+if (!isMemOp && !isCallOp) O << '$';
 
 std::string Name = Mang->getValueName(GV);
 X86SharedAsmPrinter::decorateName(Name, GV);


Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.395 
llvm/lib/Target/X86/X86ISelLowering.cpp:1.396
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.395   Sat Apr 21 15:56:26 2007
+++ llvm/lib/Target/X86/X86ISelLowering.cpp Sun Apr 22 17:50:52 2007
@@ -2996,6 +2996,10 @@
  GA->getValueType(0),
  GA->getOffset());
   SDOperand Offset = DAG.getNode(X86ISD::Wrapper, PtrVT, TGA);
+
+  if (GA->getGlobal()->isDeclaration()) // initial exec TLS model
+Offset = DAG.getLoad(PtrVT, DAG.getEntryNode(), Offset, NULL, 0);
+
   // The address of the thread local variable is the add of the thread
   // pointer with the offset of the variable.
   return DAG.getNode(ISD::ADD, PtrVT, ThreadPointer, Offset);


Index: llvm/lib/Target/X86/X86InstrInfo.td
diff -u llvm/lib/Target/X86/X86InstrInfo.td:1.303 
llvm/lib/Target/X86/X86InstrInfo.td:1.304
--- llvm/lib/Target/X86/X86InstrInfo.td:1.303   Fri Apr 20 16:38:10 2007
+++ llvm/lib/Target/X86/X86InstrInfo.td Sun Apr 22 17:50:52 2007
@@ -2462,10 +2462,15 @@
 //
 
 def TLS_addr : I<0, Pseudo, (ops GR32:$dst, i32imm:$sym),
-   "leal $sym(,%ebx,1), $dst",
+   "leal ${sym:mem}(,%ebx,1), $dst",
[(set GR32:$dst, (X86tlsaddr tglobaltlsaddr:$sym))]>,
Imp<[EBX],[]>;
 
+let AddedComplexity = 10 in
+def TLS_gs : I<0, Pseudo, (ops GR32:$dst, GR32:$src),
+   "movl %gs:($src), $dst",
+   [(set GR32:$dst, (load (add X86TLStp, GR32:$src)))]>;
+
 def TLS_tp : I<0, Pseudo, (ops GR32:$dst),
"movl %gs:0, $dst",
[(set GR32:$dst, X86TLStp)]>;



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

2007-04-22 Thread Christopher Lamb


Changes in directory llvm/include/llvm/CodeGen:

SelectionDAGNodes.h updated: 1.188 -> 1.189
SelectionDAG.h updated: 1.149 -> 1.150
---
Log message:

PR400: http://llvm.org/PR400  phase 2. Propagate attributed load/store 
information through DAGs.


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

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


Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.188 
llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.189
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.188 Sat Apr 21 15:56:26 2007
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h   Sun Apr 22 18:15:29 2007
@@ -1438,7 +1438,7 @@
   friend class SelectionDAG;
   LoadSDNode(SDOperand *ChainPtrOff, SDVTList VTs,
  ISD::MemIndexedMode AM, ISD::LoadExtType ETy, MVT::ValueType LVT,
- const Value *SV, int O=0, unsigned Align=1, bool Vol=false)
+ const Value *SV, int O=0, unsigned Align=0, bool Vol=false)
 : SDNode(ISD::LOAD, VTs),
   AddrMode(AM), ExtType(ETy), LoadedVT(LVT), SrcValue(SV), SVOffset(O),
   Alignment(Align), IsVolatile(Vol) {
@@ -1446,6 +1446,7 @@
 Ops[1] = ChainPtrOff[1]; // Ptr
 Ops[2] = ChainPtrOff[2]; // Off
 InitOperands(Ops, 3);
+assert(Align != 0 && "Loads should have non-zero aligment");
 assert((getOffset().getOpcode() == ISD::UNDEF ||
 AddrMode != ISD::UNINDEXED) &&
"Only indexed load has a non-undef offset operand");
@@ -1508,6 +1509,7 @@
 Ops[2] = ChainValuePtrOff[2]; // Ptr
 Ops[3] = ChainValuePtrOff[3]; // Off
 InitOperands(Ops, 4);
+assert(Align != 0 && "Stores should have non-zero aligment");
 assert((getOffset().getOpcode() == ISD::UNDEF || 
 AddrMode != ISD::UNINDEXED) &&
"Only indexed store has a non-undef offset operand");


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



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

2007-04-22 Thread Christopher Lamb


Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.423 -> 1.424
SelectionDAG.cpp updated: 1.401 -> 1.402
DAGCombiner.cpp updated: 1.295 -> 1.296
---
Log message:

PR400: http://llvm.org/PR400  phase 2. Propagate attributed load/store 
information through DAGs.


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

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


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.423 
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.424
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.423Sat Apr 21 
13:36:27 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp  Sun Apr 22 18:15:29 2007
@@ -498,7 +498,7 @@
 
   SDOperand getLoadFrom(const Type *Ty, SDOperand Ptr,
 const Value *SV, SDOperand Root,
-bool isVolatile);
+bool isVolatile, unsigned Alignment);
 
   SDOperand getIntPtrConstant(uint64_t Val) {
 return DAG.getConstant(Val, TLI.getPointerTy());
@@ -2313,19 +2313,21 @@
   }
 
   setValue(&I, getLoadFrom(I.getType(), Ptr, I.getOperand(0),
-   Root, I.isVolatile()));
+   Root, I.isVolatile(), I.getAlignment()));
 }
 
 SDOperand SelectionDAGLowering::getLoadFrom(const Type *Ty, SDOperand Ptr,
 const Value *SV, SDOperand Root,
-bool isVolatile) {
+bool isVolatile, 
+unsigned Alignment) {
   SDOperand L;
   if (const VectorType *PTy = dyn_cast(Ty)) {
 MVT::ValueType PVT = TLI.getValueType(PTy->getElementType());
 L = DAG.getVecLoad(PTy->getNumElements(), PVT, Root, Ptr,
DAG.getSrcValue(SV));
   } else {
-L = DAG.getLoad(TLI.getValueType(Ty), Root, Ptr, SV, 0, isVolatile);
+L = DAG.getLoad(TLI.getValueType(Ty), Root, Ptr, SV, 0, 
+isVolatile, Alignment);
   }
 
   if (isVolatile)
@@ -2342,7 +2344,7 @@
   SDOperand Src = getValue(SrcV);
   SDOperand Ptr = getValue(I.getOperand(1));
   DAG.setRoot(DAG.getStore(getRoot(), Src, Ptr, I.getOperand(1), 0,
-   I.isVolatile()));
+   I.isVolatile(), I.getAlignment()));
 }
 
 /// IntrinsicCannotAccessMemory - Return true if the specified intrinsic cannot


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.401 
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.402
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.401Sat Apr 21 
15:56:26 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp  Sun Apr 22 18:15:30 2007
@@ -15,11 +15,13 @@
 #include "llvm/Constants.h"
 #include "llvm/GlobalVariable.h"
 #include "llvm/Intrinsics.h"
+#include "llvm/DerivedTypes.h"
 #include "llvm/Assembly/Writer.h"
 #include "llvm/CodeGen/MachineBasicBlock.h"
 #include "llvm/CodeGen/MachineConstantPool.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Target/MRegisterInfo.h"
+#include "llvm/Target/TargetData.h"
 #include "llvm/Target/TargetLowering.h"
 #include "llvm/Target/TargetInstrInfo.h"
 #include "llvm/Target/TargetMachine.h"
@@ -1538,9 +1540,7 @@
 SDOperand SelectionDAG::getLoad(MVT::ValueType VT,
 SDOperand Chain, SDOperand Ptr,
 const Value *SV, int SVOffset,
-bool isVolatile) {
-  // FIXME: Alignment == 1 for now.
-  unsigned Alignment = 1;
+bool isVolatile, unsigned Alignment) {
   SDVTList VTs = getVTList(VT, MVT::Other);
   SDOperand Undef = getNode(ISD::UNDEF, Ptr.getValueType());
   SDOperand Ops[] = { Chain, Ptr, Undef };
@@ -1556,6 +1556,18 @@
   void *IP = 0;
   if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
 return SDOperand(E, 0);
+  if (Alignment == 0) { // Ensure that codegen never sees alignment 0
+const Type *Ty = 0;
+if (VT != MVT::Vector && VT != MVT::iPTR) {
+  Ty = MVT::getTypeForValueType(VT);
+} else if (SV) {
+  const PointerType *PT = dyn_cast(SV->getType());
+  assert(PT && "Value for load must be a pointer");
+  Ty = PT->getElementType();
+}  
+assert(Ty && "Could not get type information for load");
+Alignment = TLI.getTargetData()->getABITypeAlignment(Ty);
+  }
   SDNode *N = new LoadSDNode(Ops, VTs, ISD::UNINDEXED,
  ISD::NON_EXTLOAD, VT, SV, SVOffset, Alignment,
  isVolatile);
@@ -1568,7 +1580,7 @@
SDOperand Chain, SDOperand Ptr,
co

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

2007-04-22 Thread Chris Lattner
>>
>> #ifndef LLVM_TYPE_H
>> #error "dont' do this"
>> #endif
>>
>> to the top of this file?
>
> If that's the case then ATU.h should just be folded into Type.h and we
> don't ever have to talk about this again :)

We'd have to fold value/type/atu together, not a good idea,

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


[llvm-commits] CVS: llvm/include/llvm/Bitcode/LLVMBitCodes.h

2007-04-22 Thread Chris Lattner


Changes in directory llvm/include/llvm/Bitcode:

LLVMBitCodes.h added (r1.1)
---
Log message:

promote this to being a public header.


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

 LLVMBitCodes.h |   87 +
 1 files changed, 87 insertions(+)


Index: llvm/include/llvm/Bitcode/LLVMBitCodes.h
diff -c /dev/null llvm/include/llvm/Bitcode/LLVMBitCodes.h:1.1
*** /dev/null   Sun Apr 22 20:01:25 2007
--- llvm/include/llvm/Bitcode/LLVMBitCodes.hSun Apr 22 20:01:15 2007
***
*** 0 
--- 1,87 
+ //===- LLVMBitCodes.h - Enum values for the LLVM bitcode format -*- C++ 
-*-===//
+ //
+ // The LLVM Compiler Infrastructure
+ //
+ // This file was developed by Chris Lattner and is distributed under
+ // the University of Illinois Open Source License. See LICENSE.TXT for 
details.
+ //
+ 
//===--===//
+ //
+ // This header defines Bitcode enum values for LLVM IR bitcode files.
+ //
+ // The enum values defined in this file should be considered permanent.  If
+ // new features are added, they should have values added at the end of the
+ // respective lists.
+ //
+ 
//===--===//
+ 
+ #ifndef LLVM_BITCODE_LLVMBITCODES_H
+ #define LLVM_BITCODE_LLVMBITCODES_H
+ 
+ #include "llvm/Bitcode/BitCodes.h"
+ 
+ namespace llvm {
+ namespace bitc {
+   // The only top-level block type defined is for a module.
+   enum BlockIDs {
+ // Blocks
+ MODULE_BLOCK_ID  = 0,
+   
+ // Module sub-block id's
+ TYPE_BLOCK_ID= 1,
+ MODULEINFO_BLOCK_ID  = 2,
+ GLOBALCONSTANTS_BLOCK_ID = 3,
+ FUNCTION_BLOCK_ID= 4,
+ TYPE_SYMTAB_BLOCK_ID = 5,
+ GLOBAL_SYMTAB_BLOCK_ID   = 6
+   };
+   
+   
+   /// MODULE blocks have a number of optional fields and subblocks.
+   enum ModuleCodes {
+ MODULE_CODE_VERSION = 1,// VERSION: [version#]
+ MODULE_CODE_TRIPLE  = 2,// TRIPLE:  [strlen, strchr x N]
+ MODULE_CODE_DATALAYOUT  = 3,// DATALAYOUT:  [strlen, strchr x N]
+ MODULE_CODE_ASM = 4,// ASM: [strlen, strchr x N]
+ MODULE_CODE_SECTIONNAME = 5,// SECTIONNAME: [strlen, strchr x N]
+ MODULE_CODE_DEPLIB  = 6,// DEPLIB:  [strlen, strchr x N]
+ 
+ // GLOBALVAR: [type, isconst, initid, 
+ // linkage, alignment, section, visibility, threadlocal]
+ MODULE_CODE_GLOBALVAR   = 7,
+ 
+ // FUNCTION:  [type, callingconv, isproto, linkage, alignment, section,
+ // visibility]
+ MODULE_CODE_FUNCTION= 8
+   };
+   
+   /// TYPE blocks have codes for each type primitive they use.
+   enum TypeCodes {
+ TYPE_CODE_NUMENTRY =  1,   // TYPE_CODE_NUMENTRY: [numentries]
+ TYPE_CODE_META =  2,   // TYPE_CODE_META: [metacode]... - Future use
+ 
+ // Type Codes
+ TYPE_CODE_VOID =  3,   // VOID
+ TYPE_CODE_FLOAT=  4,   // FLOAT
+ TYPE_CODE_DOUBLE   =  5,   // DOUBLE
+ TYPE_CODE_LABEL=  6,   // LABEL
+ TYPE_CODE_OPAQUE   =  7,   // OPAQUE
+ TYPE_CODE_INTEGER  =  8,   // INTEGER: [width]
+ TYPE_CODE_POINTER  =  9,   // POINTER: [pointee type]
+ TYPE_CODE_FUNCTION = 10,   // FUNCTION: [vararg, retty, #pararms, paramty 
N]
+ TYPE_CODE_STRUCT   = 11,   // STRUCT: [ispacked, #elts, eltty x N]
+ TYPE_CODE_ARRAY= 12,   // ARRAY: [numelts, eltty]
+ TYPE_CODE_VECTOR   = 13// VECTOR: [numelts, eltty]
+ // Any other type code is assumed to be an unknown type.
+   };
+   
+   
+   // The type symbol table only has one code (TST_ENTRY_CODE).
+   enum TypeSymtabCodes {
+ TST_ENTRY_CODE = 1 // TST_ENTRY: [typeid, namelen, namechar x N]
+   };
+   
+ } // End bitc namespace
+ } // 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/Bitcode/Reader/BitcodeReader.h

2007-04-22 Thread Chris Lattner


Changes in directory llvm/lib/Bitcode/Reader:

BitcodeReader.h updated: 1.2 -> 1.3
---
Log message:

promote LLVMBitCodes to be a public header


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

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


Index: llvm/lib/Bitcode/Reader/BitcodeReader.h
diff -u llvm/lib/Bitcode/Reader/BitcodeReader.h:1.2 
llvm/lib/Bitcode/Reader/BitcodeReader.h:1.3
--- llvm/lib/Bitcode/Reader/BitcodeReader.h:1.2 Sun Apr 22 13:49:32 2007
+++ llvm/lib/Bitcode/Reader/BitcodeReader.h Sun Apr 22 20:01:37 2007
@@ -16,7 +16,7 @@
 
 #include "llvm/Type.h"
 #include "llvm/ModuleProvider.h"
-#include "../LLVMBitCodes.h"
+#include "llvm/Bitcode/LLVMBitCodes.h"
 #include 
 
 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/Bitcode/LLVMBitCodes.h

2007-04-22 Thread Chris Lattner


Changes in directory llvm/lib/Bitcode:

LLVMBitCodes.h (r1.1) removed
---
Log message:

promote LLVMBitCodes to be a public header


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

 0 files changed



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


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

2007-04-22 Thread Chris Lattner


Changes in directory llvm/lib/Bitcode/Writer:

Writer.cpp updated: 1.1 -> 1.2
---
Log message:

promote LLVMBitCodes to be a public header


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

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


Index: llvm/lib/Bitcode/Writer/Writer.cpp
diff -u llvm/lib/Bitcode/Writer/Writer.cpp:1.1 
llvm/lib/Bitcode/Writer/Writer.cpp:1.2
--- llvm/lib/Bitcode/Writer/Writer.cpp:1.1  Sun Apr 22 01:24:45 2007
+++ llvm/lib/Bitcode/Writer/Writer.cpp  Sun Apr 22 20:01:37 2007
@@ -13,7 +13,7 @@
 
 #include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/Bitcode/BitstreamWriter.h"
-#include "../LLVMBitCodes.h"
+#include "llvm/Bitcode/LLVMBitCodes.h"
 #include "ValueEnumerator.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/Module.h"



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

2007-04-22 Thread Lauro Ramos Venancio


Changes in directory llvm/lib/Target/X86:

X86InstrInfo.td updated: 1.304 -> 1.305
---
Log message:

X86 TLS: optimize the implementation of "local exec" model.


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

 X86InstrInfo.td |   13 ++---
 1 files changed, 10 insertions(+), 3 deletions(-)


Index: llvm/lib/Target/X86/X86InstrInfo.td
diff -u llvm/lib/Target/X86/X86InstrInfo.td:1.304 
llvm/lib/Target/X86/X86InstrInfo.td:1.305
--- llvm/lib/Target/X86/X86InstrInfo.td:1.304   Sun Apr 22 17:50:52 2007
+++ llvm/lib/Target/X86/X86InstrInfo.td Sun Apr 22 20:28:10 2007
@@ -2467,9 +2467,15 @@
Imp<[EBX],[]>;
 
 let AddedComplexity = 10 in
-def TLS_gs : I<0, Pseudo, (ops GR32:$dst, GR32:$src),
-   "movl %gs:($src), $dst",
-   [(set GR32:$dst, (load (add X86TLStp, GR32:$src)))]>;
+def TLS_gs_rr : I<0, Pseudo, (ops GR32:$dst, GR32:$src),
+  "movl %gs:($src), $dst",
+  [(set GR32:$dst, (load (add X86TLStp, GR32:$src)))]>;
+
+let AddedComplexity = 15 in
+def TLS_gs_ri : I<0, Pseudo, (ops GR32:$dst, i32imm:$src),
+  "movl %gs:${src:mem}, $dst",
+  [(set GR32:$dst,
+(load (add X86TLStp, (X86Wrapper tglobaltlsaddr:$src]>;
 
 def TLS_tp : I<0, Pseudo, (ops GR32:$dst),
"movl %gs:0, $dst",
@@ -2491,6 +2497,7 @@
 // ConstantPool GlobalAddress, ExternalSymbol, and JumpTable
 def : Pat<(i32 (X86Wrapper tconstpool  :$dst)), (MOV32ri tconstpool  :$dst)>;
 def : Pat<(i32 (X86Wrapper tjumptable  :$dst)), (MOV32ri tjumptable  :$dst)>;
+def : Pat<(i32 (X86Wrapper tglobaltlsaddr:$dst)), (MOV32ri 
tglobaltlsaddr:$dst)>;
 def : Pat<(i32 (X86Wrapper tglobaladdr :$dst)), (MOV32ri tglobaladdr :$dst)>;
 def : Pat<(i32 (X86Wrapper texternalsym:$dst)), (MOV32ri texternalsym:$dst)>;
 



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


[llvm-commits] CVS: llvm/test/CodeGen/X86/tls1.ll tls2.ll

2007-04-22 Thread Lauro Ramos Venancio


Changes in directory llvm/test/CodeGen/X86:

tls1.ll added (r1.1)
tls2.ll added (r1.1)
---
Log message:

Add TLS tests.


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

 tls1.ll |   19 +++
 tls2.ll |   19 +++
 2 files changed, 38 insertions(+)


Index: llvm/test/CodeGen/X86/tls1.ll
diff -c /dev/null llvm/test/CodeGen/X86/tls1.ll:1.1
*** /dev/null   Sun Apr 22 20:29:45 2007
--- llvm/test/CodeGen/X86/tls1.ll   Sun Apr 22 20:29:35 2007
***
*** 0 
--- 1,19 
+ ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu | \
+ ; RUN: grep {movl %gs:[EMAIL PROTECTED], %eax}
+ ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu | \
+ ; RUN: grep {leal [EMAIL PROTECTED](%eax), %eax}
+ ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu 
-relocation-model=pic | \
+ ; RUN: grep {leal [EMAIL PROTECTED](,%ebx,1), %eax}
+ 
+ @i = thread_local global i32 15   ;  [#uses=2]
+ 
+ define i32 @f() {
+ entry:
+   %tmp1 = load i32* @i;  [#uses=1]
+   ret i32 %tmp1
+ }
+ 
+ define i32* @g() {
+ entry:
+   ret i32* @i
+ }


Index: llvm/test/CodeGen/X86/tls2.ll
diff -c /dev/null llvm/test/CodeGen/X86/tls2.ll:1.1
*** /dev/null   Sun Apr 22 20:29:53 2007
--- llvm/test/CodeGen/X86/tls2.ll   Sun Apr 22 20:29:35 2007
***
*** 0 
--- 1,19 
+ ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu | \
+ ; RUN: grep {movl %gs:(%eax), %eax}
+ ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu | \
+ ; RUN: grep {addl [EMAIL PROTECTED], %eax}
+ ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i386-linux-gnu 
-relocation-model=pic | \
+ ; RUN: grep {leal [EMAIL PROTECTED](,%ebx,1), %eax}
+ 
+ @i = external thread_local global i32 ;  [#uses=2]
+ 
+ define i32 @f() {
+ entry:
+   %tmp1 = load i32* @i;  [#uses=1]
+   ret i32 %tmp1
+ }
+ 
+ define i32* @g() {
+ entry:
+   ret i32* @i
+ }



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


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

2007-04-22 Thread Christopher Lamb
Tthe llvm.org DNS was down, rendering the site unreachable, at 7:30am  
Sunday. I don't know when Comcast fixed the link, but as an aside, I  
don't think that the secondary DNS for llvm.org is working. For me it  
returned a blank A record for the domain.


--
Christopher Lamb


On Apr 22, 2007, at 5:41 PM, Bill Wendling wrote:


It could have been a glitch on the part of the updating thingy. Let
me know if this happens again!

-bw

On Apr 22, 2007, at 7:41 AM, Jeff Cohen wrote:


Reid Spencer wrote:

Jeff,

On Sun, 2007-04-22 at 07:19 -0700, Jeff Cohen wrote:


The mirror has not been updated in two days.  llvm-gcc is now
unbuildable by the public.



I just updated and the changes that Chris committed for me last  
night

are in the repository mirror. The rev # is 315.  Seems fine to me.



Urm... does seem fine now.  All I know is that my nightly tester
ran one
hour after the mirror was updated (according to the svn log), and
yet it
did not pick up 315.

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


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






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


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

2007-04-22 Thread Jeff Cohen
That wasn't the problem.  svn reached the server; it just didn't find a 
new revision to pull.

Christopher Lamb wrote:
> Tthe llvm.org DNS was down, rendering the site unreachable, at 7:30am 
> Sunday. I don't know when Comcast fixed the link, but as an aside, I 
> don't think that the secondary DNS for llvm.org is working. For me it 
> returned a blank A record for the domain.
>
> --
> Christopher Lamb
>
>
> On Apr 22, 2007, at 5:41 PM, Bill Wendling wrote:
>
>> It could have been a glitch on the part of the updating thingy. Let  
>> me know if this happens again!
>>
>> -bw
>>
>> On Apr 22, 2007, at 7:41 AM, Jeff Cohen wrote:
>>
>>> Reid Spencer wrote:
 Jeff,

 On Sun, 2007-04-22 at 07:19 -0700, Jeff Cohen wrote:

> The mirror has not been updated in two days.  llvm-gcc is now
> unbuildable by the public.
>

 I just updated and the changes that Chris committed for me last night
 are in the repository mirror. The rev # is 315.  Seems fine to me.

>>>
>>> Urm... does seem fine now.  All I know is that my nightly tester  
>>> ran one
>>> hour after the mirror was updated (according to the svn log), and  
>>> yet it
>>> did not pick up 315.
>>>
>>> ___
>>> llvm-commits mailing list
>>> llvm-commits@cs.uiuc.edu 
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>> ___
>> llvm-commits mailing list
>> llvm-commits@cs.uiuc.edu 
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>
>
>
> 
>
> ___
> llvm-commits mailing list
> llvm-commits@cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>   

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