[llvm-commits] [llvm] r172020 - in /llvm/trunk: include/llvm/IR/Attributes.h lib/Bitcode/Reader/BitcodeReader.cpp lib/IR/AttributeImpl.h lib/IR/Attributes.cpp lib/IR/Core.cpp

Bill Wendling isanbard at gmail.com
Wed Jan 9 15:36:50 PST 2013


Author: void
Date: Wed Jan  9 17:36:50 2013
New Revision: 172020

URL: http://llvm.org/viewvc/llvm-project?rev=172020&view=rev
Log:
Revert s/Raw/getBitMask/g name change. This is possibly causing LTO test hangings.

Modified:
    llvm/trunk/include/llvm/IR/Attributes.h
    llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
    llvm/trunk/lib/IR/AttributeImpl.h
    llvm/trunk/lib/IR/Attributes.cpp
    llvm/trunk/lib/IR/Core.cpp

Modified: llvm/trunk/include/llvm/IR/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Attributes.h?rev=172020&r1=172019&r2=172020&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Attributes.h (original)
+++ llvm/trunk/include/llvm/IR/Attributes.h Wed Jan  9 17:36:50 2013
@@ -142,7 +142,7 @@
     return pImpl != A.pImpl;
   }
 
-  uint64_t getBitMask() const;
+  uint64_t Raw() const;
 
   /// \brief Which attributes cannot be applied to a type.
   static Attribute typeIncompatible(Type *Ty);
@@ -302,7 +302,7 @@
   /// \brief Return the attributes at the index as a string.
   std::string getAsString(unsigned Index) const;
 
-  uint64_t getBitMask(unsigned Index) const;
+  uint64_t Raw(unsigned Index) const;
 
   /// \brief Return true if the specified attribute is set for at least one
   /// parameter or for the return value.
@@ -445,7 +445,7 @@
       .removeAttribute(Attribute::NoDuplicate);
   }
 
-  uint64_t getBitMask() const;
+  uint64_t Raw() const;
 
   bool operator==(const AttrBuilder &B);
   bool operator!=(const AttrBuilder &B) {

Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=172020&r1=172019&r2=172020&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Wed Jan  9 17:36:50 2013
@@ -477,7 +477,7 @@
       for (unsigned i = 0, e = Record.size(); i != e; i += 2) {
         Attribute ReconstitutedAttr =
           Attribute::decodeLLVMAttributesForBitcode(Context, Record[i+1]);
-        Record[i+1] = ReconstitutedAttr.getBitMask();
+        Record[i+1] = ReconstitutedAttr.Raw();
       }
 
       for (unsigned i = 0, e = Record.size(); i != e; i += 2) {

Modified: llvm/trunk/lib/IR/AttributeImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AttributeImpl.h?rev=172020&r1=172019&r2=172020&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AttributeImpl.h (original)
+++ llvm/trunk/lib/IR/AttributeImpl.h Wed Jan  9 17:36:50 2013
@@ -57,7 +57,7 @@
   bool operator==(StringRef Kind) const;
   bool operator!=(StringRef Kind) const;
 
-  uint64_t getBitMask() const;         // FIXME: Remove.
+  uint64_t Raw() const;         // FIXME: Remove.
 
   static uint64_t getAttrMask(Attribute::AttrKind Val);
 
@@ -93,7 +93,7 @@
                       ArrayRef<AttributeWithIndex> AttrList){
     for (unsigned i = 0, e = AttrList.size(); i != e; ++i) {
       ID.AddInteger(AttrList[i].Index);
-      ID.AddInteger(AttrList[i].Attrs.getBitMask());
+      ID.AddInteger(AttrList[i].Attrs.Raw());
     }
   }
 };

Modified: llvm/trunk/lib/IR/Attributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Attributes.cpp?rev=172020&r1=172019&r2=172020&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Attributes.cpp (original)
+++ llvm/trunk/lib/IR/Attributes.cpp Wed Jan  9 17:36:50 2013
@@ -45,7 +45,7 @@
   // Otherwise, build a key to look up the existing attributes.
   LLVMContextImpl *pImpl = Context.pImpl;
   FoldingSetNodeID ID;
-  ID.AddInteger(B.getBitMask());
+  ID.AddInteger(B.Raw());
 
   void *InsertPoint;
   AttributeImpl *PA = pImpl->AttrsSet.FindNodeOrInsertPos(ID, InsertPoint);
@@ -53,7 +53,7 @@
   if (!PA) {
     // If we didn't find any existing attributes of the same shape then create a
     // new one and insert it.
-    PA = new AttributeImpl(Context, B.getBitMask());
+    PA = new AttributeImpl(Context, B.Raw());
     pImpl->AttrsSet.InsertNode(PA, InsertPoint);
   }
 
@@ -103,8 +103,8 @@
   return !(*this == K);
 }
 
-uint64_t Attribute::getBitMask() const {
-  return pImpl ? pImpl->getBitMask() : 0;
+uint64_t Attribute::Raw() const {
+  return pImpl ? pImpl->Raw() : 0;
 }
 
 Attribute Attribute::typeIncompatible(Type *Ty) {
@@ -139,10 +139,10 @@
 
   // Store the alignment in the bitcode as a 16-bit raw value instead of a 5-bit
   // log2 encoded value. Shift the bits above the alignment up by 11 bits.
-  uint64_t EncodedAttrs = Attrs.getBitMask() & 0xffff;
+  uint64_t EncodedAttrs = Attrs.Raw() & 0xffff;
   if (Attrs.hasAttribute(Attribute::Alignment))
     EncodedAttrs |= Attrs.getAlignment() << 16;
-  EncodedAttrs |= (Attrs.getBitMask() & (0xffffULL << 21)) << 11;
+  EncodedAttrs |= (Attrs.Raw() & (0xffffULL << 21)) << 11;
   return EncodedAttrs;
 }
 
@@ -320,7 +320,7 @@
 }
 
 AttrBuilder &AttrBuilder::addAttributes(const Attribute &A) {
-  uint64_t Mask = A.getBitMask();
+  uint64_t Mask = A.Raw();
 
   for (Attribute::AttrKind I = Attribute::None; I != Attribute::EndAttrKinds;
        I = Attribute::AttrKind(I + 1)) {
@@ -338,7 +338,7 @@
 }
 
 AttrBuilder &AttrBuilder::removeAttributes(const Attribute &A){
-  uint64_t Mask = A.getBitMask();
+  uint64_t Mask = A.Raw();
 
   for (Attribute::AttrKind I = Attribute::None; I != Attribute::EndAttrKinds;
        I = Attribute::AttrKind(I + 1)) {
@@ -364,14 +364,14 @@
 }
 
 bool AttrBuilder::hasAttributes(const Attribute &A) const {
-  return getBitMask() & A.getBitMask();
+  return Raw() & A.Raw();
 }
 
 bool AttrBuilder::hasAlignmentAttr() const {
   return Alignment != 0;
 }
 
-uint64_t AttrBuilder::getBitMask() const {
+uint64_t AttrBuilder::Raw() const {
   uint64_t Mask = 0;
 
   for (DenseSet<Attribute::AttrKind>::const_iterator I = Attrs.begin(),
@@ -438,7 +438,7 @@
   return !(*this == Kind);
 }
 
-uint64_t AttributeImpl::getBitMask() const {
+uint64_t AttributeImpl::Raw() const {
   // FIXME: Remove this.
   return cast<ConstantInt>(Data)->getZExtValue();
 }
@@ -485,15 +485,15 @@
 }
 
 bool AttributeImpl::hasAttribute(Attribute::AttrKind A) const {
-  return (getBitMask() & getAttrMask(A)) != 0;
+  return (Raw() & getAttrMask(A)) != 0;
 }
 
 bool AttributeImpl::hasAttributes() const {
-  return getBitMask() != 0;
+  return Raw() != 0;
 }
 
 uint64_t AttributeImpl::getAlignment() const {
-  return getBitMask() & getAttrMask(Attribute::Alignment);
+  return Raw() & getAttrMask(Attribute::Alignment);
 }
 
 void AttributeImpl::setAlignment(unsigned Align) {
@@ -501,7 +501,7 @@
 }
 
 uint64_t AttributeImpl::getStackAlignment() const {
-  return getBitMask() & getAttrMask(Attribute::StackAlignment);
+  return Raw() & getAttrMask(Attribute::StackAlignment);
 }
 
 void AttributeImpl::setStackAlignment(unsigned Align) {
@@ -511,9 +511,12 @@
 void AttributeImpl::Profile(FoldingSetNodeID &ID, Constant *Data,
                             ArrayRef<Constant*> Vals) {
   ID.AddInteger(cast<ConstantInt>(Data)->getZExtValue());
+#if 0
+  // FIXME: Not yet supported.
   for (ArrayRef<Constant*>::iterator I = Vals.begin(), E = Vals.end();
        I != E; ++I)
     ID.AddPointer(*I);
+#endif
 }
 
 //===----------------------------------------------------------------------===//
@@ -611,9 +614,9 @@
   return getAttributes(Index).getStackAlignment();
 }
 
-uint64_t AttributeSet::getBitMask(unsigned Index) const {
+uint64_t AttributeSet::Raw(unsigned Index) const {
   // FIXME: Remove this.
-  return getAttributes(Index).getBitMask();
+  return getAttributes(Index).Raw();
 }
 
 /// getAttributes - The attributes for the specified index are returned.

Modified: llvm/trunk/lib/IR/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Core.cpp?rev=172020&r1=172019&r2=172020&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Core.cpp (original)
+++ llvm/trunk/lib/IR/Core.cpp Wed Jan  9 17:36:50 2013
@@ -1401,7 +1401,7 @@
 LLVMAttribute LLVMGetFunctionAttr(LLVMValueRef Fn) {
   Function *Func = unwrap<Function>(Fn);
   const AttributeSet PAL = Func->getAttributes();
-  return (LLVMAttribute)PAL.getBitMask(AttributeSet::FunctionIndex);
+  return (LLVMAttribute)PAL.Raw(AttributeSet::FunctionIndex);
 }
 
 /*--.. Operations on parameters ............................................--*/
@@ -1477,7 +1477,7 @@
 LLVMAttribute LLVMGetAttribute(LLVMValueRef Arg) {
   Argument *A = unwrap<Argument>(Arg);
   return (LLVMAttribute)A->getParent()->getAttributes().
-    getBitMask(A->getArgNo()+1);
+    Raw(A->getArgNo()+1);
 }
   
 





More information about the llvm-commits mailing list