From isanbard at gmail.com Mon Mar 9 00:04:40 2009
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 09 Mar 2009 05:04:40 -0000
Subject: [llvm-commits] [llvm] r66396 - in /llvm/trunk:
include/llvm/Analysis/DebugInfo.h lib/Analysis/DbgInfoPrinter.cpp
lib/Analysis/DebugInfo.cpp lib/CodeGen/AsmPrinter/DwarfWriter.cpp
lib/CodeGen/SelectionDAG/FastISel.cpp
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
Message-ID: <200903090504.n2954fx1007032@zion.cs.uiuc.edu>
Author: void
Date: Mon Mar 9 00:04:40 2009
New Revision: 66396
URL: http://llvm.org/viewvc/llvm-project?rev=66396&view=rev
Log:
Pass in a std::string when getting the names of debugging things. This cuts down
on the number of times a std::string is created and copied.
Modified:
llvm/trunk/include/llvm/Analysis/DebugInfo.h
llvm/trunk/lib/Analysis/DbgInfoPrinter.cpp
llvm/trunk/lib/Analysis/DebugInfo.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?rev=66396&r1=66395&r2=66396&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/DebugInfo.h Mon Mar 9 00:04:40 2009
@@ -40,7 +40,7 @@
/// not, the debug info is corrupt and we ignore it.
DIDescriptor(GlobalVariable *GV, unsigned RequiredTag);
- std::string getStringField(unsigned Elt) const;
+ const std::string &getStringField(unsigned Elt, std::string &Result) const;
unsigned getUnsignedField(unsigned Elt) const {
return (unsigned)getUInt64Field(Elt);
}
@@ -106,9 +106,15 @@
explicit DICompileUnit(GlobalVariable *GV = 0);
unsigned getLanguage() const { return getUnsignedField(2); }
- std::string getFilename() const { return getStringField(3); }
- std::string getDirectory() const { return getStringField(4); }
- std::string getProducer() const { return getStringField(5); }
+ const std::string &getFilename(std::string &F) const {
+ return getStringField(3, F);
+ }
+ const std::string &getDirectory(std::string &F) const {
+ return getStringField(4, F);
+ }
+ const std::string &getProducer(std::string &F) const {
+ return getStringField(5, F);
+ }
/// isMain - Each input file is encoded as a separate compile unit in LLVM
/// debugging information output. However, many target specific tool chains
@@ -121,7 +127,9 @@
bool isMain() const { return getUnsignedField(6); }
bool isOptimized() const { return getUnsignedField(7); }
- std::string getFlags() const { return getStringField(8); }
+ const std::string &getFlags(std::string &F) const {
+ return getStringField(8, F);
+ }
unsigned getRunTimeVersion() const { return getUnsignedField(9); }
/// Verify - Verify that a compile unit is well formed.
@@ -138,7 +146,9 @@
public:
explicit DIEnumerator(GlobalVariable *GV = 0);
- std::string getName() const { return getStringField(1); }
+ const std::string &getName(std::string &F) const {
+ return getStringField(1, F);
+ }
uint64_t getEnumValue() const { return getUInt64Field(2); }
};
@@ -182,7 +192,9 @@
virtual ~DIType() {}
DIDescriptor getContext() const { return getDescriptorField(1); }
- std::string getName() const { return getStringField(2); }
+ const std::string &getName(std::string &F) const {
+ return getStringField(2, F);
+ }
DICompileUnit getCompileUnit() const{ return getFieldAs(3); }
unsigned getLineNumber() const { return getUnsignedField(4); }
uint64_t getSizeInBits() const { return getUInt64Field(5); }
@@ -264,9 +276,15 @@
virtual ~DIGlobal() {}
DIDescriptor getContext() const { return getDescriptorField(2); }
- std::string getName() const { return getStringField(3); }
- std::string getDisplayName() const { return getStringField(4); }
- std::string getLinkageName() const { return getStringField(5); }
+ const std::string &getName(std::string &F) const {
+ return getStringField(3, F);
+ }
+ const std::string &getDisplayName(std::string &F) const {
+ return getStringField(4, F);
+ }
+ const std::string &getLinkageName(std::string &F) const {
+ return getStringField(5, F);
+ }
DICompileUnit getCompileUnit() const{ return getFieldAs(6); }
unsigned getLineNumber() const { return getUnsignedField(7); }
DIType getType() const { return getFieldAs(8); }
@@ -313,7 +331,9 @@
explicit DIVariable(GlobalVariable *GV = 0);
DIDescriptor getContext() const { return getDescriptorField(1); }
- std::string getName() const { return getStringField(2); }
+ const std::string &getName(std::string &F) const {
+ return getStringField(2, F);
+ }
DICompileUnit getCompileUnit() const{ return getFieldAs(3); }
unsigned getLineNumber() const { return getUnsignedField(4); }
DIType getType() const { return getFieldAs(5); }
Modified: llvm/trunk/lib/Analysis/DbgInfoPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DbgInfoPrinter.cpp?rev=66396&r1=66395&r2=66396&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/DbgInfoPrinter.cpp (original)
+++ llvm/trunk/lib/Analysis/DbgInfoPrinter.cpp Mon Mar 9 00:04:40 2009
@@ -59,8 +59,9 @@
{
if(const DbgDeclareInst* DDI = findDbgDeclare(V)) {
DIVariable Var(cast(DDI->getVariable()));
- Out << "; variable " << Var.getName()
- << " of type " << Var.getType().getName()
+ std::string Res1, Res2;
+ Out << "; variable " << Var.getName(Res1)
+ << " of type " << Var.getType().getName(Res2)
<< " at line " << Var.getLineNumber() << "\n";
}
}
@@ -83,8 +84,9 @@
void PrintDbgInfo::printFuncStart(const DbgFuncStartInst *FS)
{
DISubprogram Subprogram(cast(FS->getSubprogram()));
- Out << ";fully qualified function name: " << Subprogram.getDisplayName()
- << " return type: " << Subprogram.getType().getName()
+ std::string Res1, Res2;
+ Out << ";fully qualified function name: " << Subprogram.getDisplayName(Res1)
+ << " return type: " << Subprogram.getType().getName(Res2)
<< " at line " << Subprogram.getLineNumber()
<< "\n\n";
}
Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DebugInfo.cpp?rev=66396&r1=66395&r2=66396&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/DebugInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/DebugInfo.cpp Mon Mar 9 00:04:40 2009
@@ -35,17 +35,23 @@
GV = 0;
}
+const std::string &
+DIDescriptor::getStringField(unsigned Elt, std::string &Result) const {
+ if (GV == 0) {
+ Result.clear();
+ return Result;
+ }
-std::string DIDescriptor::getStringField(unsigned Elt) const {
- if (GV == 0) return "";
Constant *C = GV->getInitializer();
- if (C == 0 || Elt >= C->getNumOperands())
- return "";
+ if (C == 0 || Elt >= C->getNumOperands()) {
+ Result.clear();
+ return Result;
+ }
- std::string Result;
// Fills in the string if it succeeds
if (!GetConstantStringInfo(C->getOperand(Elt), Result))
Result.clear();
+
return Result;
}
@@ -59,7 +65,6 @@
return 0;
}
-
DIDescriptor DIDescriptor::getDescriptorField(unsigned Elt) const {
if (GV == 0) return DIDescriptor();
Constant *C = GV->getInitializer();
@@ -185,7 +190,8 @@
bool DICompileUnit::Verify() const {
if (isNull())
return false;
- if (getFilename().empty())
+ std::string Res;
+ if (getFilename(Res).empty())
return false;
// It is possible that directory and produce string is empty.
return true;
@@ -864,16 +870,22 @@
void DICompileUnit::dump() const {
if (getLanguage())
cerr << " [" << dwarf::LanguageString(getLanguage()) << "] ";
- cerr << " [" << getDirectory() << "/" << getFilename() << " ]";
+
+ std::string Res1, Res2;
+ cerr << " [" << getDirectory(Res1) << "/" << getFilename(Res2) << " ]";
}
/// dump - print type.
void DIType::dump() const {
if (isNull()) return;
- if (!getName().empty())
- cerr << " [" << getName() << "] ";
+
+ std::string Res;
+ if (!getName(Res).empty())
+ cerr << " [" << Res << "] ";
+
unsigned Tag = getTag();
cerr << " [" << dwarf::TagString(Tag) << "] ";
+
// TODO : Print context
getCompileUnit().dump();
cerr << " ["
@@ -882,10 +894,12 @@
<< getAlignInBits() << ", "
<< getOffsetInBits()
<< "] ";
+
if (isPrivate())
cerr << " [private] ";
else if (isProtected())
cerr << " [protected] ";
+
if (isForwardDecl())
cerr << " [fwd] ";
@@ -899,6 +913,7 @@
cerr << "Invalid DIType\n";
return;
}
+
cerr << "\n";
}
@@ -923,16 +938,20 @@
/// dump - print global.
void DIGlobal::dump() const {
+ std::string Res;
+ if (!getName(Res).empty())
+ cerr << " [" << Res << "] ";
- if (!getName().empty())
- cerr << " [" << getName() << "] ";
unsigned Tag = getTag();
cerr << " [" << dwarf::TagString(Tag) << "] ";
+
// TODO : Print context
getCompileUnit().dump();
cerr << " [" << getLineNumber() << "] ";
+
if (isLocalToUnit())
cerr << " [local] ";
+
if (isDefinition())
cerr << " [def] ";
@@ -954,8 +973,10 @@
/// dump - print variable.
void DIVariable::dump() const {
- if (!getName().empty())
- cerr << " [" << getName() << "] ";
+ std::string Res;
+ if (!getName(Res).empty())
+ cerr << " [" << Res << "] ";
+
getCompileUnit().dump();
cerr << " [" << getLineNumber() << "] ";
getType().dump();
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=66396&r1=66395&r2=66396&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Mon Mar 9 00:04:40 2009
@@ -1622,7 +1622,8 @@
DIBasicType BTy) {
// Get core information.
- const std::string &Name = BTy.getName();
+ std::string Name;
+ BTy.getName(Name);
Buffer.setTag(DW_TAG_base_type);
AddUInt(&Buffer, DW_AT_encoding, DW_FORM_data1, BTy.getEncoding());
// Add name if not anonymous or intermediate type.
@@ -1637,13 +1638,16 @@
DIDerivedType DTy) {
// Get core information.
- const std::string &Name = DTy.getName();
+ std::string Name;
+ DTy.getName(Name);
uint64_t Size = DTy.getSizeInBits() >> 3;
unsigned Tag = DTy.getTag();
+
// FIXME - Workaround for templates.
if (Tag == DW_TAG_inheritance) Tag = DW_TAG_reference_type;
Buffer.setTag(Tag);
+
// Map to main type, void will not have a type.
DIType FromTy = DTy.getTypeDerivedFrom();
AddType(DW_Unit, &Buffer, FromTy);
@@ -1665,12 +1669,14 @@
/// ConstructTypeDIE - Construct type DIE from DICompositeType.
void ConstructTypeDIE(CompileUnit *DW_Unit, DIE &Buffer,
DICompositeType CTy) {
-
// Get core information.
- const std::string &Name = CTy.getName();
+ std::string Name;
+ CTy.getName(Name);
+
uint64_t Size = CTy.getSizeInBits() >> 3;
unsigned Tag = CTy.getTag();
Buffer.setTag(Tag);
+
switch (Tag) {
case DW_TAG_vector_type:
case DW_TAG_array_type:
@@ -1806,7 +1812,8 @@
DIE *ConstructEnumTypeDIE(CompileUnit *DW_Unit, DIEnumerator *ETy) {
DIE *Enumerator = new DIE(DW_TAG_enumerator);
- const std::string &Name = ETy->getName();
+ std::string Name;
+ ETy->getName(Name);
AddString(Enumerator, DW_AT_name, DW_FORM_string, Name);
int64_t Value = ETy->getEnumValue();
AddSInt(Enumerator, DW_AT_const_value, DW_FORM_sdata, Value);
@@ -1817,9 +1824,11 @@
DIE *CreateGlobalVariableDIE(CompileUnit *DW_Unit, const DIGlobalVariable &GV)
{
DIE *GVDie = new DIE(DW_TAG_variable);
- const std::string &Name = GV.getDisplayName();
+ std::string Name;
+ GV.getDisplayName(Name);
AddString(GVDie, DW_AT_name, DW_FORM_string, Name);
- const std::string &LinkageName = GV.getLinkageName();
+ std::string LinkageName;
+ GV.getLinkageName(LinkageName);
if (!LinkageName.empty())
AddString(GVDie, DW_AT_MIPS_linkage_name, DW_FORM_string, LinkageName);
AddType(DW_Unit, GVDie, GV.getType());
@@ -1832,7 +1841,8 @@
/// CreateMemberDIE - Create new member DIE.
DIE *CreateMemberDIE(CompileUnit *DW_Unit, const DIDerivedType &DT) {
DIE *MemberDie = new DIE(DT.getTag());
- const std::string &Name = DT.getName();
+ std::string Name;
+ DT.getName(Name);
if (!Name.empty())
AddString(MemberDie, DW_AT_name, DW_FORM_string, Name);
@@ -1876,9 +1886,11 @@
const DISubprogram &SP,
bool IsConstructor = false) {
DIE *SPDie = new DIE(DW_TAG_subprogram);
- const std::string &Name = SP.getName();
+ std::string Name;
+ SP.getName(Name);
AddString(SPDie, DW_AT_name, DW_FORM_string, Name);
- const std::string &LinkageName = SP.getLinkageName();
+ std::string LinkageName;
+ SP.getLinkageName(LinkageName);
if (!LinkageName.empty())
AddString(SPDie, DW_AT_MIPS_linkage_name, DW_FORM_string,
LinkageName);
@@ -1945,7 +1957,8 @@
// Define variable debug information entry.
DIE *VariableDie = new DIE(Tag);
- const std::string &Name = VD.getName();
+ std::string Name;
+ VD.getName(Name);
AddString(VariableDie, DW_AT_name, DW_FORM_string, Name);
// Add source line info if available.
@@ -2769,21 +2782,23 @@
void ConstructCompileUnit(GlobalVariable *GV) {
DICompileUnit DIUnit(GV);
- unsigned ID = getOrCreateSourceID(DIUnit.getDirectory(),
- DIUnit.getFilename());
+ std::string Dir, FN, Prod;
+ unsigned ID = getOrCreateSourceID(DIUnit.getDirectory(Dir),
+ DIUnit.getFilename(FN));
DIE *Die = new DIE(DW_TAG_compile_unit);
AddSectionOffset(Die, DW_AT_stmt_list, DW_FORM_data4,
DWLabel("section_line", 0), DWLabel("section_line", 0),
false);
- AddString(Die, DW_AT_producer, DW_FORM_string, DIUnit.getProducer());
+ AddString(Die, DW_AT_producer, DW_FORM_string, DIUnit.getProducer(Prod));
AddUInt(Die, DW_AT_language, DW_FORM_data1, DIUnit.getLanguage());
- AddString(Die, DW_AT_name, DW_FORM_string, DIUnit.getFilename());
- if (!DIUnit.getDirectory().empty())
- AddString(Die, DW_AT_comp_dir, DW_FORM_string, DIUnit.getDirectory());
+ AddString(Die, DW_AT_name, DW_FORM_string, FN);
+ if (!Dir.empty())
+ AddString(Die, DW_AT_comp_dir, DW_FORM_string, Dir);
if (DIUnit.isOptimized())
AddUInt(Die, DW_AT_APPLE_optimized, DW_FORM_flag, 1);
- const std::string &Flags = DIUnit.getFlags();
+ std::string Flags;
+ DIUnit.getFlags(Flags);
if (!Flags.empty())
AddString(Die, DW_AT_APPLE_flags, DW_FORM_string, Flags);
unsigned RVer = DIUnit.getRunTimeVersion();
@@ -2843,7 +2858,8 @@
// Add to context owner.
DW_Unit->getDie()->AddChild(VariableDie);
// Expose as global. FIXME - need to check external flag.
- DW_Unit->AddGlobal(DI_GV.getName(), VariableDie);
+ std::string Name;
+ DW_Unit->AddGlobal(DI_GV.getName(Name), VariableDie);
return true;
}
@@ -2895,7 +2911,8 @@
// Add to context owner.
Unit->getDie()->AddChild(SubprogramDie);
// Expose as global.
- Unit->AddGlobal(SP.getName(), SubprogramDie);
+ std::string Name;
+ Unit->AddGlobal(SP.getName(Name), SubprogramDie);
return true;
}
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=66396&r1=66395&r2=66396&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Mon Mar 9 00:04:40 2009
@@ -319,8 +319,9 @@
DbgStopPointInst *SPI = cast(I);
if (DW && DW->ValidDebugInfo(SPI->getContext())) {
DICompileUnit CU(cast(SPI->getContext()));
- unsigned SrcFile = DW->getOrCreateSourceID(CU.getDirectory(),
- CU.getFilename());
+ std::string Dir, FN;
+ unsigned SrcFile = DW->getOrCreateSourceID(CU.getDirectory(Dir),
+ CU.getFilename(FN));
unsigned Line = SPI->getLine();
unsigned Col = SPI->getColumn();
unsigned ID = DW->RecordSourceLine(Line, Col, SrcFile);
@@ -361,8 +362,9 @@
// (most?) gdb expects.
DISubprogram Subprogram(cast(SP));
DICompileUnit CompileUnit = Subprogram.getCompileUnit();
- unsigned SrcFile = DW->getOrCreateSourceID(CompileUnit.getDirectory(),
- CompileUnit.getFilename());
+ std::string Dir, FN;
+ unsigned SrcFile = DW->getOrCreateSourceID(CompileUnit.getDirectory(Dir),
+ CompileUnit.getFilename(FN));
// Record the source line but does not create a label for the normal
// function start. It will be emitted at asm emission time. However,
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=66396&r1=66395&r2=66396&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Mar 9 00:04:40 2009
@@ -1287,8 +1287,9 @@
GlobalVariable *CU_GV = cast(DSP->getCompileUnit());
if (DW && (useDEBUG_LOC || useLABEL) && !CU_GV->isDeclaration()) {
DICompileUnit CU(cast(DSP->getCompileUnit()));
- unsigned SrcFile = DW->getOrCreateSourceID(CU.getDirectory(),
- CU.getFilename());
+ std::string Dir, FN;
+ unsigned SrcFile = DW->getOrCreateSourceID(CU.getDirectory(Dir),
+ CU.getFilename(FN));
unsigned Line = DSP->getLine();
unsigned Col = DSP->getColumn();
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=66396&r1=66395&r2=66396&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Mon Mar 9 00:04:40 2009
@@ -335,8 +335,9 @@
if (DW && DW->ValidDebugInfo(SPI->getContext())) {
DICompileUnit CU(cast(SPI->getContext()));
- unsigned SrcFile = DW->getOrCreateSourceID(CU.getDirectory(),
- CU.getFilename());
+ std::string Dir, FN;
+ unsigned SrcFile = DW->getOrCreateSourceID(CU.getDirectory(Dir),
+ CU.getFilename(FN));
unsigned idx = MF->getOrCreateDebugLocID(SrcFile,
SPI->getLine(),
SPI->getColumn());
@@ -354,8 +355,9 @@
if (DW->ValidDebugInfo(SP)) {
DISubprogram Subprogram(cast(SP));
DICompileUnit CU(Subprogram.getCompileUnit());
- unsigned SrcFile = DW->getOrCreateSourceID(CU.getDirectory(),
- CU.getFilename());
+ std::string Dir, FN;
+ unsigned SrcFile = DW->getOrCreateSourceID(CU.getDirectory(Dir),
+ CU.getFilename(FN));
unsigned Line = Subprogram.getLineNumber();
DL = DebugLoc::get(MF->getOrCreateDebugLocID(SrcFile, Line, 0));
}
@@ -3902,8 +3904,9 @@
SPI.getColumn(),
SPI.getContext()));
DICompileUnit CU(cast(SPI.getContext()));
- unsigned SrcFile = DW->getOrCreateSourceID(CU.getDirectory(),
- CU.getFilename());
+ std::string Dir, FN;
+ unsigned SrcFile = DW->getOrCreateSourceID(CU.getDirectory(Dir),
+ CU.getFilename(FN));
unsigned idx = MF.getOrCreateDebugLocID(SrcFile,
SPI.getLine(), SPI.getColumn());
setCurDebugLoc(DebugLoc::get(idx));
@@ -3947,8 +3950,9 @@
MachineFunction &MF = DAG.getMachineFunction();
DISubprogram Subprogram(cast(SP));
DICompileUnit CompileUnit = Subprogram.getCompileUnit();
- unsigned SrcFile = DW->getOrCreateSourceID(CompileUnit.getDirectory(),
- CompileUnit.getFilename());
+ std::string Dir, FN;
+ unsigned SrcFile = DW->getOrCreateSourceID(CompileUnit.getDirectory(Dir),
+ CompileUnit.getFilename(FN));
// Record the source line but does not create a label for the normal
// function start. It will be emitted at asm emission time. However,
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp?rev=66396&r1=66395&r2=66396&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp Mon Mar 9 00:04:40 2009
@@ -179,7 +179,8 @@
}
} else if (const DbgStopPointSDNode *D = dyn_cast(Node)) {
DICompileUnit CU(cast(D->getCompileUnit()));
- Op += ": " + CU.getFilename();
+ std::string FN;
+ Op += ": " + CU.getFilename(FN);
Op += ":" + utostr(D->getLine());
if (D->getColumn() != 0)
Op += ":" + utostr(D->getColumn());
From sabre at nondot.org Mon Mar 9 00:10:08 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 09 Mar 2009 05:10:08 -0000
Subject: [llvm-commits] [llvm] r66397 -
/llvm/trunk/include/llvm/Assembly/Writer.h
Message-ID: <200903090510.n295A8X0007320@zion.cs.uiuc.edu>
Author: lattner
Date: Mon Mar 9 00:10:08 2009
New Revision: 66397
URL: http://llvm.org/viewvc/llvm-project?rev=66397&view=rev
Log:
add a #include to improve portability to windows, as requested by
someone on llvmdev.
Modified:
llvm/trunk/include/llvm/Assembly/Writer.h
Modified: llvm/trunk/include/llvm/Assembly/Writer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Assembly/Writer.h?rev=66397&r1=66396&r2=66397&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Assembly/Writer.h (original)
+++ llvm/trunk/include/llvm/Assembly/Writer.h Mon Mar 9 00:10:08 2009
@@ -18,6 +18,7 @@
#define LLVM_ASSEMBLY_WRITER_H
#include
+#include
namespace llvm {
From sabre at nondot.org Mon Mar 9 00:11:09 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 09 Mar 2009 05:11:09 -0000
Subject: [llvm-commits] [llvm] r66398 - in /llvm/trunk:
include/llvm/Analysis/AliasSetTracker.h lib/Analysis/AliasSetTracker.cpp
lib/Transforms/Scalar/LICM.cpp
Message-ID: <200903090511.n295B9XX007374@zion.cs.uiuc.edu>
Author: lattner
Date: Mon Mar 9 00:11:09 2009
New Revision: 66398
URL: http://llvm.org/viewvc/llvm-project?rev=66398&view=rev
Log:
reimplement AliasSetTracker in terms of DenseMap instead of hash_map,
hopefully no functionality change.
Modified:
llvm/trunk/include/llvm/Analysis/AliasSetTracker.h
llvm/trunk/lib/Analysis/AliasSetTracker.cpp
llvm/trunk/lib/Transforms/Scalar/LICM.cpp
Modified: llvm/trunk/include/llvm/Analysis/AliasSetTracker.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/AliasSetTracker.h?rev=66398&r1=66397&r2=66398&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/AliasSetTracker.h (original)
+++ llvm/trunk/include/llvm/Analysis/AliasSetTracker.h Mon Mar 9 00:11:09 2009
@@ -19,10 +19,11 @@
#include "llvm/Support/CallSite.h"
#include "llvm/Support/Streams.h"
+#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/iterator.h"
-#include "llvm/ADT/hash_map.h"
#include "llvm/ADT/ilist.h"
#include "llvm/ADT/ilist_node.h"
+#include
namespace llvm {
@@ -37,20 +38,21 @@
class AliasSet : public ilist_node {
friend class AliasSetTracker;
- class PointerRec;
- typedef std::pair HashNodePair;
-
class PointerRec {
- HashNodePair **PrevInList, *NextInList;
+ Value *Val; // The pointer this record corresponds to.
+ PointerRec **PrevInList, *NextInList;
AliasSet *AS;
unsigned Size;
public:
- PointerRec() : PrevInList(0), NextInList(0), AS(0), Size(0) {}
+ PointerRec(Value *V)
+ : Val(V), PrevInList(0), NextInList(0), AS(0), Size(0) {}
- HashNodePair *getNext() const { return NextInList; }
+ Value *getValue() const { return Val; }
+
+ PointerRec *getNext() const { return NextInList; }
bool hasAliasSet() const { return AS != 0; }
- HashNodePair** setPrevInList(HashNodePair **PIL) {
+ PointerRec** setPrevInList(PointerRec **PIL) {
PrevInList = PIL;
return &NextInList;
}
@@ -77,21 +79,22 @@
AS = as;
}
- void removeFromList() {
- if (NextInList) NextInList->second.PrevInList = PrevInList;
+ void eraseFromList() {
+ if (NextInList) NextInList->PrevInList = PrevInList;
*PrevInList = NextInList;
if (AS->PtrListEnd == &NextInList) {
AS->PtrListEnd = PrevInList;
assert(*AS->PtrListEnd == 0 && "List not terminated right!");
}
+ delete this;
}
};
- HashNodePair *PtrList, **PtrListEnd; // Doubly linked list of nodes
- AliasSet *Forward; // Forwarding pointer
- AliasSet *Next, *Prev; // Doubly linked list of AliasSets
+ PointerRec *PtrList, **PtrListEnd; // Doubly linked list of nodes.
+ AliasSet *Forward; // Forwarding pointer.
+ AliasSet *Next, *Prev; // Doubly linked list of AliasSets.
- std::vector CallSites; // All calls & invokes in this node
+ std::vector CallSites; // All calls & invokes in this alias set.
// RefCount - Number of nodes pointing to this AliasSet plus the number of
// AliasSets forwarding to it.
@@ -157,10 +160,10 @@
void dump() const;
/// Define an iterator for alias sets... this is just a forward iterator.
- class iterator : public forward_iterator {
- HashNodePair *CurNode;
+ class iterator : public forward_iterator {
+ PointerRec *CurNode;
public:
- explicit iterator(HashNodePair *CN = 0) : CurNode(CN) {}
+ explicit iterator(PointerRec *CN = 0) : CurNode(CN) {}
bool operator==(const iterator& x) const {
return CurNode == x.CurNode;
@@ -178,12 +181,12 @@
}
value_type *operator->() const { return &operator*(); }
- Value *getPointer() const { return CurNode->first; }
- unsigned getSize() const { return CurNode->second.getSize(); }
+ Value *getPointer() const { return CurNode->getValue(); }
+ unsigned getSize() const { return CurNode->getSize(); }
iterator& operator++() { // Preincrement
assert(CurNode && "Advancing past AliasSet.end()!");
- CurNode = CurNode->second.getNext();
+ CurNode = CurNode->getNext();
return *this;
}
iterator operator++(int) { // Postincrement
@@ -202,7 +205,7 @@
AliasSet(const AliasSet &AS); // do not implement
void operator=(const AliasSet &AS); // do not implement
- HashNodePair *getSomePointer() const {
+ PointerRec *getSomePointer() const {
return PtrList;
}
@@ -223,7 +226,7 @@
void removeFromTracker(AliasSetTracker &AST);
- void addPointer(AliasSetTracker &AST, HashNodePair &Entry, unsigned Size,
+ void addPointer(AliasSetTracker &AST, PointerRec &Entry, unsigned Size,
bool KnownMustAlias = false);
void addCallSite(CallSite CS, AliasAnalysis &AA);
void removeCallSite(CallSite CS) {
@@ -253,7 +256,7 @@
ilist AliasSets;
// Map from pointers to their node
- hash_map PointerMap;
+ DenseMap PointerMap;
public:
/// AliasSetTracker ctor - Create an empty collection of AliasSets, and use
/// the specified alias analysis object to disambiguate load and store
@@ -299,10 +302,7 @@
bool remove(Instruction *I);
void remove(AliasSet &AS);
- void clear() {
- PointerMap.clear();
- AliasSets.clear();
- }
+ void clear();
/// getAliasSets - Return the alias sets that are active.
///
@@ -362,11 +362,13 @@
friend class AliasSet;
void removeAliasSet(AliasSet *AS);
- AliasSet::HashNodePair &getEntryFor(Value *V) {
- // Standard operator[], except that it returns the whole pair, not just
- // ->second.
- return *PointerMap.insert(AliasSet::HashNodePair(V,
- AliasSet::PointerRec())).first;
+ // getEntryFor - Just like operator[] on the map, except that it creates an
+ // entry for the pointer if it doesn't already exist.
+ AliasSet::PointerRec &getEntryFor(Value *V) {
+ AliasSet::PointerRec *&Entry = PointerMap[V];
+ if (Entry == 0)
+ Entry = new AliasSet::PointerRec(V);
+ return *Entry;
}
AliasSet &addPointer(Value *P, unsigned Size, AliasSet::AccessType E,
Modified: llvm/trunk/lib/Analysis/AliasSetTracker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasSetTracker.cpp?rev=66398&r1=66397&r2=66398&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/AliasSetTracker.cpp (original)
+++ llvm/trunk/lib/Analysis/AliasSetTracker.cpp Mon Mar 9 00:11:09 2009
@@ -39,11 +39,11 @@
// used to be must-alias sets, we can just check any pointer from each set
// for aliasing.
AliasAnalysis &AA = AST.getAliasAnalysis();
- HashNodePair *L = getSomePointer();
- HashNodePair *R = AS.getSomePointer();
+ PointerRec *L = getSomePointer();
+ PointerRec *R = AS.getSomePointer();
// If the pointers are not a must-alias pair, this set becomes a may alias.
- if (AA.alias(L->first, L->second.getSize(), R->first, R->second.getSize())
+ if (AA.alias(L->getValue(), L->getSize(), R->getValue(), R->getSize())
!= AliasAnalysis::MustAlias)
AliasTy = MayAlias;
}
@@ -62,7 +62,7 @@
// Merge the list of constituent pointers...
if (AS.PtrList) {
*PtrListEnd = AS.PtrList;
- AS.PtrList->second.setPrevInList(PtrListEnd);
+ AS.PtrList->setPrevInList(PtrListEnd);
PtrListEnd = AS.PtrListEnd;
AS.PtrList = 0;
@@ -84,30 +84,30 @@
AST.removeAliasSet(this);
}
-void AliasSet::addPointer(AliasSetTracker &AST, HashNodePair &Entry,
+void AliasSet::addPointer(AliasSetTracker &AST, PointerRec &Entry,
unsigned Size, bool KnownMustAlias) {
- assert(!Entry.second.hasAliasSet() && "Entry already in set!");
+ assert(!Entry.hasAliasSet() && "Entry already in set!");
// Check to see if we have to downgrade to _may_ alias.
if (isMustAlias() && !KnownMustAlias)
- if (HashNodePair *P = getSomePointer()) {
+ if (PointerRec *P = getSomePointer()) {
AliasAnalysis &AA = AST.getAliasAnalysis();
AliasAnalysis::AliasResult Result =
- AA.alias(P->first, P->second.getSize(), Entry.first, Size);
+ AA.alias(P->getValue(), P->getSize(), Entry.getValue(), Size);
if (Result == AliasAnalysis::MayAlias)
AliasTy = MayAlias;
else // First entry of must alias must have maximum size!
- P->second.updateSize(Size);
+ P->updateSize(Size);
assert(Result != AliasAnalysis::NoAlias && "Cannot be part of must set!");
}
- Entry.second.setAliasSet(this);
- Entry.second.updateSize(Size);
+ Entry.setAliasSet(this);
+ Entry.updateSize(Size);
// Add it to the end of the list...
assert(*PtrListEnd == 0 && "End of list is not null?");
*PtrListEnd = &Entry;
- PtrListEnd = Entry.second.setPrevInList(PtrListEnd);
+ PtrListEnd = Entry.setPrevInList(PtrListEnd);
assert(*PtrListEnd == 0 && "End of list is not null?");
addRef(); // Entry points to alias set...
}
@@ -139,9 +139,9 @@
// If this is a set of MustAliases, only check to see if the pointer aliases
// SOME value in the set...
- HashNodePair *SomePtr = getSomePointer();
+ PointerRec *SomePtr = getSomePointer();
assert(SomePtr && "Empty must-alias set??");
- return AA.alias(SomePtr->first, SomePtr->second.getSize(), Ptr, Size);
+ return AA.alias(SomePtr->getValue(), SomePtr->getSize(), Ptr, Size);
}
// If this is a may-alias set, we have to check all of the pointers in the set
@@ -184,6 +184,18 @@
return false;
}
+void AliasSetTracker::clear() {
+ // Delete all the PointerRec entries.
+ for (DenseMap::iterator I = PointerMap.begin(),
+ E = PointerMap.end(); I != E; ++I)
+ I->second->eraseFromList();
+
+ PointerMap.clear();
+
+ // The alias sets should all be clear now.
+ AliasSets.clear();
+}
+
/// findAliasSetForPointer - Given a pointer, find the one alias set to put the
/// instruction referring to the pointer into. If there are multiple alias sets
@@ -234,16 +246,16 @@
/// getAliasSetForPointer - Return the alias set that the specified pointer
-/// lives in...
+/// lives in.
AliasSet &AliasSetTracker::getAliasSetForPointer(Value *Pointer, unsigned Size,
bool *New) {
- AliasSet::HashNodePair &Entry = getEntryFor(Pointer);
+ AliasSet::PointerRec &Entry = getEntryFor(Pointer);
// Check to see if the pointer is already known...
- if (Entry.second.hasAliasSet()) {
- Entry.second.updateSize(Size);
+ if (Entry.hasAliasSet()) {
+ Entry.updateSize(Size);
// Return the set!
- return *Entry.second.getAliasSet(*this)->getForwardedTarget(*this);
+ return *Entry.getAliasSet(*this)->getForwardedTarget(*this);
} else if (AliasSet *AS = findAliasSetForPointer(Pointer, Size)) {
// Add it to the alias set it aliases...
AS->addPointer(*this, Entry, Size);
@@ -371,17 +383,18 @@
// Clear the alias set.
unsigned NumRefs = 0;
while (!AS.empty()) {
- AliasSet::HashNodePair *P = AS.PtrList;
+ AliasSet::PointerRec *P = AS.PtrList;
+
+ Value *ValToRemove = P->getValue();
- // Unlink from the list of values.
- P->second.removeFromList();
+ // Unlink and delete entry from the list of values.
+ P->eraseFromList();
// Remember how many references need to be dropped.
++NumRefs;
// Finally, remove the entry.
- Value *Remove = P->first; // Take a copy because it is invalid to pass
- PointerMap.erase(Remove); // a reference to the data being erased.
+ PointerMap.erase(ValToRemove);
}
// Stop using the alias set, removing it.
@@ -472,17 +485,19 @@
AS->removeCallSite(CS);
// First, look up the PointerRec for this pointer.
- hash_map::iterator I = PointerMap.find(PtrVal);
+ DenseMap::iterator I = PointerMap.find(PtrVal);
if (I == PointerMap.end()) return; // Noop
// If we found one, remove the pointer from the alias set it is in.
- AliasSet::HashNodePair &PtrValEnt = *I;
- AliasSet *AS = PtrValEnt.second.getAliasSet(*this);
+ AliasSet::PointerRec *PtrValEnt = I->second;
+ AliasSet *AS = PtrValEnt->getAliasSet(*this);
- // Unlink from the list of values...
- PtrValEnt.second.removeFromList();
- // Stop using the alias set
+ // Unlink and delete from the list of values.
+ PtrValEnt->eraseFromList();
+
+ // Stop using the alias set.
AS->dropRef(*this);
+
PointerMap.erase(I);
}
@@ -496,16 +511,17 @@
AA.copyValue(From, To);
// First, look up the PointerRec for this pointer.
- hash_map::iterator I = PointerMap.find(From);
- if (I == PointerMap.end() || !I->second.hasAliasSet())
+ DenseMap::iterator I = PointerMap.find(From);
+ if (I == PointerMap.end())
return; // Noop
+ assert(I->second->hasAliasSet() && "Dead entry?");
- AliasSet::HashNodePair &Entry = getEntryFor(To);
- if (Entry.second.hasAliasSet()) return; // Already in the tracker!
+ AliasSet::PointerRec &Entry = getEntryFor(To);
+ if (Entry.hasAliasSet()) return; // Already in the tracker!
// Add it to the alias set it aliases...
- AliasSet *AS = I->second.getAliasSet(*this);
- AS->addPointer(*this, Entry, I->second.getSize(), true);
+ AliasSet *AS = I->second->getAliasSet(*this);
+ AS->addPointer(*this, Entry, I->second->getSize(), true);
}
Modified: llvm/trunk/lib/Transforms/Scalar/LICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LICM.cpp?rev=66398&r1=66397&r2=66398&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LICM.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LICM.cpp Mon Mar 9 00:11:09 2009
@@ -62,9 +62,9 @@
DisablePromotion("disable-licm-promotion", cl::Hidden,
cl::desc("Disable memory promotion in LICM pass"));
-// This feature is currently disabled by default because CodeGen is not yet capable
-// of rematerializing these constants in PIC mode, so it can lead to degraded
-// performance. Compile test/CodeGen/X86/remat-constant.ll with
+// This feature is currently disabled by default because CodeGen is not yet
+// capable of rematerializing these constants in PIC mode, so it can lead to
+// degraded performance. Compile test/CodeGen/X86/remat-constant.ll with
// -relocation-model=pic to see an example of this.
static cl::opt
EnableLICMConstantMotion("enable-licm-constant-variables", cl::Hidden,
@@ -793,12 +793,12 @@
// set, if the pointer is loop invariant, and if we are not eliminating any
// volatile loads or stores.
if (AS.isForwardingAliasSet() || !AS.isMod() || !AS.isMustAlias() ||
- AS.isVolatile() || !CurLoop->isLoopInvariant(AS.begin()->first))
+ AS.isVolatile() || !CurLoop->isLoopInvariant(AS.begin()->getValue()))
continue;
assert(!AS.empty() &&
"Must alias set should have at least one pointer element in it!");
- Value *V = AS.begin()->first;
+ Value *V = AS.begin()->getValue();
// Check that all of the pointers in the alias set have the same type. We
// cannot (yet) promote a memory location that is loaded and stored in
@@ -806,7 +806,7 @@
{
bool PointerOk = true;
for (AliasSet::iterator I = AS.begin(), E = AS.end(); I != E; ++I)
- if (V->getType() != I->first->getType()) {
+ if (V->getType() != I->getValue()->getType()) {
PointerOk = false;
break;
}
@@ -859,7 +859,7 @@
CurAST->copyValue(V, AI);
for (AliasSet::iterator I = AS.begin(), E = AS.end(); I != E; ++I)
- ValueToAllocaMap.insert(std::make_pair(I->first, AI));
+ ValueToAllocaMap.insert(std::make_pair(I->getValue(), AI));
DOUT << "LICM: Promoting value: " << *V << "\n";
}
From resistor at mac.com Mon Mar 9 00:12:38 2009
From: resistor at mac.com (Owen Anderson)
Date: Mon, 09 Mar 2009 05:12:38 -0000
Subject: [llvm-commits] [llvm] r66399 -
/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
Message-ID: <200903090512.n295Cc0F007505@zion.cs.uiuc.edu>
Author: resistor
Date: Mon Mar 9 00:12:38 2009
New Revision: 66399
URL: http://llvm.org/viewvc/llvm-project?rev=66399&view=rev
Log:
Ignore debug intrinsics when computing dependences.
Modified:
llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=66399&r1=66398&r2=66399&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Mon Mar 9 00:12:38 2009
@@ -18,6 +18,7 @@
#include "llvm/Analysis/MemoryDependenceAnalysis.h"
#include "llvm/Constants.h"
#include "llvm/Instructions.h"
+#include "llvm/IntrinsicInst.h"
#include "llvm/Function.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/ADT/Statistic.h"
@@ -121,6 +122,8 @@
// FreeInsts erase the entire structure
PointerSize = ~0ULL;
} else if (isa(Inst) || isa(Inst)) {
+ // Debug intrinsics don't cause dependences.
+ if (isa(Inst)) break;
CallSite InstCS = CallSite::get(Inst);
// If these two calls do not interfere, look past it.
switch (AA->getModRefInfo(CS, InstCS)) {
@@ -175,6 +178,9 @@
while (ScanIt != BB->begin()) {
Instruction *Inst = --ScanIt;
+ // Debug intrinsics don't cause dependences.
+ if (isa(Inst)) continue;
+
// Values depend on loads if the pointers are must aliased. This means that
// a load depends on another must aliased load from the same value.
if (LoadInst *LI = dyn_cast(Inst)) {
From sabre at nondot.org Mon Mar 9 00:20:45 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 09 Mar 2009 05:20:45 -0000
Subject: [llvm-commits] [llvm] r66400 -
/llvm/trunk/docs/ProgrammersManual.html
Message-ID: <200903090520.n295Kjtn008251@zion.cs.uiuc.edu>
Author: lattner
Date: Mon Mar 9 00:20:45 2009
New Revision: 66400
URL: http://llvm.org/viewvc/llvm-project?rev=66400&view=rev
Log:
don't allow hash_map or hash_set.
Modified:
llvm/trunk/docs/ProgrammersManual.html
Modified: llvm/trunk/docs/ProgrammersManual.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ProgrammersManual.html?rev=66400&r1=66399&r2=66400&view=diff
==============================================================================
--- llvm/trunk/docs/ProgrammersManual.html (original)
+++ llvm/trunk/docs/ProgrammersManual.html Mon Mar 9 00:20:45 2009
@@ -1187,21 +1187,16 @@
The STL provides several other options, such as std::multiset and the various
-"hash_set" like containers (whether from C++ TR1 or from the SGI library).
+"hash_set" like containers (whether from C++ TR1 or from the SGI library). We
+never use hash_set and unordered_set because they are generally very expensive
+(each insertion requires a malloc) and very non-portable.
+
std::multiset is useful if you're not interested in elimination of
duplicates, but has all the drawbacks of std::set. A sorted vector (where you
don't delete duplicate entries) or some other approach is almost always
better.
-The various hash_set implementations (exposed portably by
-"llvm/ADT/hash_set") is a simple chained hashtable. This algorithm is as malloc
-intensive as std::set (performing an allocation for each element inserted,
-thus having really high constant factors) but (usually) provides O(1)
-insertion/deletion of elements. This can be useful if your elements are large
-(thus making the constant-factor cost relatively low) or if comparisons are
-expensive. Element iteration does not visit elements in a useful order.
-
@@ -1340,20 +1335,14 @@
The STL provides several other options, such as std::multimap and the various
-"hash_map" like containers (whether from C++ TR1 or from the SGI library).
+"hash_map" like containers (whether from C++ TR1 or from the SGI library). We
+never use hash_set and unordered_set because they are generally very expensive
+(each insertion requires a malloc) and very non-portable.
std::multimap is useful if you want to map a key to multiple values, but has
all the drawbacks of std::map. A sorted vector or some other approach is almost
always better.
-The various hash_map implementations (exposed portably by
-"llvm/ADT/hash_map") are simple chained hash tables. This algorithm is as
-malloc intensive as std::map (performing an allocation for each element
-inserted, thus having really high constant factors) but (usually) provides O(1)
-insertion/deletion of elements. This can be useful if your elements are large
-(thus making the constant-factor cost relatively low) or if comparisons are
-expensive. Element iteration does not visit elements in a useful order.
-
From sabre at nondot.org Mon Mar 9 00:45:00 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 09 Mar 2009 05:45:00 -0000
Subject: [llvm-commits] [llvm] r66401 -
/llvm/trunk/test/FrontendC/2009-03-08-ZeroEltStructCrash.c
Message-ID: <200903090545.n295j0IW009419@zion.cs.uiuc.edu>
Author: lattner
Date: Mon Mar 9 00:44:59 2009
New Revision: 66401
URL: http://llvm.org/viewvc/llvm-project?rev=66401&view=rev
Log:
testcase for PR3744
Added:
llvm/trunk/test/FrontendC/2009-03-08-ZeroEltStructCrash.c
Added: llvm/trunk/test/FrontendC/2009-03-08-ZeroEltStructCrash.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/2009-03-08-ZeroEltStructCrash.c?rev=66401&view=auto
==============================================================================
--- llvm/trunk/test/FrontendC/2009-03-08-ZeroEltStructCrash.c (added)
+++ llvm/trunk/test/FrontendC/2009-03-08-ZeroEltStructCrash.c Mon Mar 9 00:44:59 2009
@@ -0,0 +1,14 @@
+// RUN: %llvmgcc -S %s -o -
+// PR3744
+struct Empty {};
+struct Union {
+ union {
+ int zero_arr[0];
+ } contents;
+};
+static inline void Foo(struct Union *u) {
+ int *array = u->contents.zero_arr;
+}
+static void Bar(struct Union *u) {
+ Foo(u);
+}
From sabre at nondot.org Mon Mar 9 00:45:28 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 09 Mar 2009 05:45:28 -0000
Subject: [llvm-commits] [llvm-gcc-4.2] r66402 -
/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Message-ID: <200903090545.n295jSB0009444@zion.cs.uiuc.edu>
Author: lattner
Date: Mon Mar 9 00:45:27 2009
New Revision: 66402
URL: http://llvm.org/viewvc/llvm-project?rev=66402&view=rev
Log:
Fix PR3744 - Crash on index into zero element struct.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=66402&r1=66401&r2=66402&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Mon Mar 9 00:45:27 2009
@@ -5992,9 +5992,15 @@
// If this is a normal field at a fixed offset from the start, handle it.
if (TREE_CODE(field_offset) == INTEGER_CST) {
unsigned int MemberIndex = GetFieldIndex(FieldDecl);
- assert(MemberIndex < StructTy->getNumContainedTypes() &&
- "Field Idx out of range!");
- FieldPtr = Builder.CreateStructGEP(StructAddrLV.Ptr, MemberIndex);
+
+ // If the LLVM struct has zero field, don't try to index into it, just use
+ // the current pointer.
+ FieldPtr = StructAddrLV.Ptr;
+ if (StructTy->getNumContainedTypes() != 0) {
+ assert(MemberIndex < StructTy->getNumContainedTypes() &&
+ "Field Idx out of range!");
+ FieldPtr = Builder.CreateStructGEP(FieldPtr, MemberIndex);
+ }
// Now that we did an offset from the start of the struct, subtract off
// the offset from BitStart.
From sabre at nondot.org Mon Mar 9 00:50:45 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 09 Mar 2009 05:50:45 -0000
Subject: [llvm-commits] [llvm] r66403 - in /llvm/trunk:
include/llvm/GlobalValue.h lib/VMCore/Globals.cpp
Message-ID: <200903090550.n295oj64009690@zion.cs.uiuc.edu>
Author: lattner
Date: Mon Mar 9 00:50:45 2009
New Revision: 66403
URL: http://llvm.org/viewvc/llvm-project?rev=66403&view=rev
Log:
make GlobalValue::removeDeadConstantUsers() const.
Modified:
llvm/trunk/include/llvm/GlobalValue.h
llvm/trunk/lib/VMCore/Globals.cpp
Modified: llvm/trunk/include/llvm/GlobalValue.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/GlobalValue.h?rev=66403&r1=66402&r2=66403&view=diff
==============================================================================
--- llvm/trunk/include/llvm/GlobalValue.h (original)
+++ llvm/trunk/include/llvm/GlobalValue.h Mon Mar 9 00:50:45 2009
@@ -205,7 +205,7 @@
/// off of this global value, remove them. This method is useful for clients
/// that want to check to see if a global is unused, but don't want to deal
/// with potentially dead constants hanging off of the globals.
- void removeDeadConstantUsers();
+ void removeDeadConstantUsers() const;
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const GlobalValue *) { return true; }
Modified: llvm/trunk/lib/VMCore/Globals.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Globals.cpp?rev=66403&r1=66402&r2=66403&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Globals.cpp (original)
+++ llvm/trunk/lib/VMCore/Globals.cpp Mon Mar 9 00:50:45 2009
@@ -28,17 +28,17 @@
/// removeDeadUsersOfConstant - If the specified constantexpr is dead, remove
/// it. This involves recursively eliminating any dead users of the
/// constantexpr.
-static bool removeDeadUsersOfConstant(Constant *C) {
+static bool removeDeadUsersOfConstant(const Constant *C) {
if (isa(C)) return false; // Cannot remove this
while (!C->use_empty()) {
- Constant *User = dyn_cast(C->use_back());
+ const Constant *User = dyn_cast(C->use_back());
if (!User) return false; // Non-constant usage;
if (!removeDeadUsersOfConstant(User))
return false; // Constant wasn't dead
}
- C->destroyConstant();
+ const_cast(C)->destroyConstant();
return true;
}
@@ -46,11 +46,11 @@
/// off of this global value, remove them. This method is useful for clients
/// that want to check to see if a global is unused, but don't want to deal
/// with potentially dead constants hanging off of the globals.
-void GlobalValue::removeDeadConstantUsers() {
- Value::use_iterator I = use_begin(), E = use_end();
- Value::use_iterator LastNonDeadUser = E;
+void GlobalValue::removeDeadConstantUsers() const {
+ Value::use_const_iterator I = use_begin(), E = use_end();
+ Value::use_const_iterator LastNonDeadUser = E;
while (I != E) {
- if (Constant *User = dyn_cast(*I)) {
+ if (const Constant *User = dyn_cast(*I)) {
if (!removeDeadUsersOfConstant(User)) {
// If the constant wasn't dead, remember that this was the last live use
// and move on to the next constant.
From sabre at nondot.org Mon Mar 9 00:52:15 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 09 Mar 2009 05:52:15 -0000
Subject: [llvm-commits] [llvm] r66404 -
/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Message-ID: <200903090552.n295qFSO009741@zion.cs.uiuc.edu>
Author: lattner
Date: Mon Mar 9 00:52:15 2009
New Revision: 66404
URL: http://llvm.org/viewvc/llvm-project?rev=66404&view=rev
Log:
Make the code generator rip of dead constant expr uses before deciding
whether a global is dead or not. This should fix PR3749 - linker adds
spurious use to appending globals. I can't reasonably add a testcase
for this, because the bc writer/reader strip dead constant users.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=66404&r1=66403&r2=66404&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Mon Mar 9 00:52:15 2009
@@ -418,18 +418,24 @@
const TargetData *TD = TM.getTargetData();
unsigned Align = Log2_32(TD->getPointerPrefAlignment());
- if (GV->getName() == "llvm.global_ctors" && GV->use_empty()) {
- SwitchToDataSection(TAI->getStaticCtorsSection());
- EmitAlignment(Align, 0);
- EmitXXStructorList(GV->getInitializer());
- return true;
+ if (GV->getName() == "llvm.global_ctors") {
+ GV->removeDeadConstantUsers();
+ if (GV->use_empty()) {
+ SwitchToDataSection(TAI->getStaticCtorsSection());
+ EmitAlignment(Align, 0);
+ EmitXXStructorList(GV->getInitializer());
+ return true;
+ }
}
- if (GV->getName() == "llvm.global_dtors" && GV->use_empty()) {
- SwitchToDataSection(TAI->getStaticDtorsSection());
- EmitAlignment(Align, 0);
- EmitXXStructorList(GV->getInitializer());
- return true;
+ if (GV->getName() == "llvm.global_dtors") {
+ GV->removeDeadConstantUsers();
+ if (GV->use_empty()) {
+ SwitchToDataSection(TAI->getStaticDtorsSection());
+ EmitAlignment(Align, 0);
+ EmitXXStructorList(GV->getInitializer());
+ return true;
+ }
}
return false;
From isanbard at gmail.com Mon Mar 9 01:02:28 2009
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 09 Mar 2009 06:02:28 -0000
Subject: [llvm-commits] [llvm] r66405 - in /llvm/branches/Apple/Dib:
include/llvm/Analysis/DebugInfo.h lib/Analysis/DbgInfoPrinter.cpp
lib/Analysis/DebugInfo.cpp lib/CodeGen/AsmPrinter/DwarfWriter.cpp
lib/CodeGen/SelectionDAG/FastISel.cpp
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
Message-ID: <200903090602.n2962SRH010171@zion.cs.uiuc.edu>
Author: void
Date: Mon Mar 9 01:02:27 2009
New Revision: 66405
URL: http://llvm.org/viewvc/llvm-project?rev=66405&view=rev
Log:
Merge r 66396 into Dib:
Pass in a std::string when getting the names of debugging things. This cuts down
on the number of times a std::string is created and copied.
Modified:
llvm/branches/Apple/Dib/include/llvm/Analysis/DebugInfo.h
llvm/branches/Apple/Dib/lib/Analysis/DbgInfoPrinter.cpp
llvm/branches/Apple/Dib/lib/Analysis/DebugInfo.cpp
llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/FastISel.cpp
llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
Modified: llvm/branches/Apple/Dib/include/llvm/Analysis/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/include/llvm/Analysis/DebugInfo.h?rev=66405&r1=66404&r2=66405&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/include/llvm/Analysis/DebugInfo.h (original)
+++ llvm/branches/Apple/Dib/include/llvm/Analysis/DebugInfo.h Mon Mar 9 01:02:27 2009
@@ -40,7 +40,7 @@
/// not, the debug info is corrupt and we ignore it.
DIDescriptor(GlobalVariable *GV, unsigned RequiredTag);
- std::string getStringField(unsigned Elt) const;
+ const std::string &getStringField(unsigned Elt, std::string &Result) const;
unsigned getUnsignedField(unsigned Elt) const {
return (unsigned)getUInt64Field(Elt);
}
@@ -106,9 +106,15 @@
explicit DICompileUnit(GlobalVariable *GV = 0);
unsigned getLanguage() const { return getUnsignedField(2); }
- std::string getFilename() const { return getStringField(3); }
- std::string getDirectory() const { return getStringField(4); }
- std::string getProducer() const { return getStringField(5); }
+ const std::string &getFilename(std::string &F) const {
+ return getStringField(3, F);
+ }
+ const std::string &getDirectory(std::string &F) const {
+ return getStringField(4, F);
+ }
+ const std::string &getProducer(std::string &F) const {
+ return getStringField(5, F);
+ }
/// isMain - Each input file is encoded as a separate compile unit in LLVM
/// debugging information output. However, many target specific tool chains
@@ -121,7 +127,9 @@
bool isMain() const { return getUnsignedField(6); }
bool isOptimized() const { return getUnsignedField(7); }
- std::string getFlags() const { return getStringField(8); }
+ const std::string &getFlags(std::string &F) const {
+ return getStringField(8, F);
+ }
unsigned getRunTimeVersion() const { return getUnsignedField(9); }
/// Verify - Verify that a compile unit is well formed.
@@ -138,7 +146,9 @@
public:
explicit DIEnumerator(GlobalVariable *GV = 0);
- std::string getName() const { return getStringField(1); }
+ const std::string &getName(std::string &F) const {
+ return getStringField(1, F);
+ }
uint64_t getEnumValue() const { return getUInt64Field(2); }
};
@@ -182,7 +192,9 @@
virtual ~DIType() {}
DIDescriptor getContext() const { return getDescriptorField(1); }
- std::string getName() const { return getStringField(2); }
+ const std::string &getName(std::string &F) const {
+ return getStringField(2, F);
+ }
DICompileUnit getCompileUnit() const{ return getFieldAs(3); }
unsigned getLineNumber() const { return getUnsignedField(4); }
uint64_t getSizeInBits() const { return getUInt64Field(5); }
@@ -264,9 +276,15 @@
virtual ~DIGlobal() {}
DIDescriptor getContext() const { return getDescriptorField(2); }
- std::string getName() const { return getStringField(3); }
- std::string getDisplayName() const { return getStringField(4); }
- std::string getLinkageName() const { return getStringField(5); }
+ const std::string &getName(std::string &F) const {
+ return getStringField(3, F);
+ }
+ const std::string &getDisplayName(std::string &F) const {
+ return getStringField(4, F);
+ }
+ const std::string &getLinkageName(std::string &F) const {
+ return getStringField(5, F);
+ }
DICompileUnit getCompileUnit() const{ return getFieldAs(6); }
unsigned getLineNumber() const { return getUnsignedField(7); }
DIType getType() const { return getFieldAs(8); }
@@ -313,7 +331,9 @@
explicit DIVariable(GlobalVariable *GV = 0);
DIDescriptor getContext() const { return getDescriptorField(1); }
- std::string getName() const { return getStringField(2); }
+ const std::string &getName(std::string &F) const {
+ return getStringField(2, F);
+ }
DICompileUnit getCompileUnit() const{ return getFieldAs(3); }
unsigned getLineNumber() const { return getUnsignedField(4); }
DIType getType() const { return getFieldAs(5); }
Modified: llvm/branches/Apple/Dib/lib/Analysis/DbgInfoPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/Analysis/DbgInfoPrinter.cpp?rev=66405&r1=66404&r2=66405&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/Analysis/DbgInfoPrinter.cpp (original)
+++ llvm/branches/Apple/Dib/lib/Analysis/DbgInfoPrinter.cpp Mon Mar 9 01:02:27 2009
@@ -59,8 +59,9 @@
{
if(const DbgDeclareInst* DDI = findDbgDeclare(V)) {
DIVariable Var(cast(DDI->getVariable()));
- Out << "; variable " << Var.getName()
- << " of type " << Var.getType().getName()
+ std::string Res1, Res2;
+ Out << "; variable " << Var.getName(Res1)
+ << " of type " << Var.getType().getName(Res2)
<< " at line " << Var.getLineNumber() << "\n";
}
}
@@ -83,8 +84,9 @@
void PrintDbgInfo::printFuncStart(const DbgFuncStartInst *FS)
{
DISubprogram Subprogram(cast(FS->getSubprogram()));
- Out << ";fully qualified function name: " << Subprogram.getDisplayName()
- << " return type: " << Subprogram.getType().getName()
+ std::string Res1, Res2;
+ Out << ";fully qualified function name: " << Subprogram.getDisplayName(Res1)
+ << " return type: " << Subprogram.getType().getName(Res2)
<< " at line " << Subprogram.getLineNumber()
<< "\n\n";
}
Modified: llvm/branches/Apple/Dib/lib/Analysis/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/Analysis/DebugInfo.cpp?rev=66405&r1=66404&r2=66405&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/Analysis/DebugInfo.cpp (original)
+++ llvm/branches/Apple/Dib/lib/Analysis/DebugInfo.cpp Mon Mar 9 01:02:27 2009
@@ -35,17 +35,23 @@
GV = 0;
}
+const std::string &
+DIDescriptor::getStringField(unsigned Elt, std::string &Result) const {
+ if (GV == 0) {
+ Result.clear();
+ return Result;
+ }
-std::string DIDescriptor::getStringField(unsigned Elt) const {
- if (GV == 0) return "";
Constant *C = GV->getInitializer();
- if (C == 0 || Elt >= C->getNumOperands())
- return "";
+ if (C == 0 || Elt >= C->getNumOperands()) {
+ Result.clear();
+ return Result;
+ }
- std::string Result;
// Fills in the string if it succeeds
if (!GetConstantStringInfo(C->getOperand(Elt), Result))
Result.clear();
+
return Result;
}
@@ -59,7 +65,6 @@
return 0;
}
-
DIDescriptor DIDescriptor::getDescriptorField(unsigned Elt) const {
if (GV == 0) return DIDescriptor();
Constant *C = GV->getInitializer();
@@ -185,7 +190,8 @@
bool DICompileUnit::Verify() const {
if (isNull())
return false;
- if (getFilename().empty())
+ std::string Res;
+ if (getFilename(Res).empty())
return false;
// It is possible that directory and produce string is empty.
return true;
@@ -864,16 +870,22 @@
void DICompileUnit::dump() const {
if (getLanguage())
cerr << " [" << dwarf::LanguageString(getLanguage()) << "] ";
- cerr << " [" << getDirectory() << "/" << getFilename() << " ]";
+
+ std::string Res1, Res2;
+ cerr << " [" << getDirectory(Res1) << "/" << getFilename(Res2) << " ]";
}
/// dump - print type.
void DIType::dump() const {
if (isNull()) return;
- if (!getName().empty())
- cerr << " [" << getName() << "] ";
+
+ std::string Res;
+ if (!getName(Res).empty())
+ cerr << " [" << Res << "] ";
+
unsigned Tag = getTag();
cerr << " [" << dwarf::TagString(Tag) << "] ";
+
// TODO : Print context
getCompileUnit().dump();
cerr << " ["
@@ -882,10 +894,12 @@
<< getAlignInBits() << ", "
<< getOffsetInBits()
<< "] ";
+
if (isPrivate())
cerr << " [private] ";
else if (isProtected())
cerr << " [protected] ";
+
if (isForwardDecl())
cerr << " [fwd] ";
@@ -899,6 +913,7 @@
cerr << "Invalid DIType\n";
return;
}
+
cerr << "\n";
}
@@ -923,16 +938,20 @@
/// dump - print global.
void DIGlobal::dump() const {
+ std::string Res;
+ if (!getName(Res).empty())
+ cerr << " [" << Res << "] ";
- if (!getName().empty())
- cerr << " [" << getName() << "] ";
unsigned Tag = getTag();
cerr << " [" << dwarf::TagString(Tag) << "] ";
+
// TODO : Print context
getCompileUnit().dump();
cerr << " [" << getLineNumber() << "] ";
+
if (isLocalToUnit())
cerr << " [local] ";
+
if (isDefinition())
cerr << " [def] ";
@@ -954,8 +973,10 @@
/// dump - print variable.
void DIVariable::dump() const {
- if (!getName().empty())
- cerr << " [" << getName() << "] ";
+ std::string Res;
+ if (!getName(Res).empty())
+ cerr << " [" << Res << "] ";
+
getCompileUnit().dump();
cerr << " [" << getLineNumber() << "] ";
getType().dump();
Modified: llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=66405&r1=66404&r2=66405&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Mon Mar 9 01:02:27 2009
@@ -1,4 +1,4 @@
-//===-- llvm/CodeGen/DwarfWriter.cpp - Dwarf Framework ----------*- C++ -*-===//
+//===-- llvm/CodeGen/DwarfWriter.cpp - Dwarf Framework --------------------===//
//
// The LLVM Compiler Infrastructure
//
@@ -1661,7 +1661,8 @@
DIBasicType BTy) {
// Get core information.
- const std::string &Name = BTy.getName();
+ std::string Name;
+ BTy.getName(Name);
Buffer.setTag(DW_TAG_base_type);
AddUInt(&Buffer, DW_AT_encoding, DW_FORM_data1, BTy.getEncoding());
// Add name if not anonymous or intermediate type.
@@ -1676,13 +1677,16 @@
DIDerivedType DTy) {
// Get core information.
- const std::string &Name = DTy.getName();
+ std::string Name;
+ DTy.getName(Name);
uint64_t Size = DTy.getSizeInBits() >> 3;
unsigned Tag = DTy.getTag();
+
// FIXME - Workaround for templates.
if (Tag == DW_TAG_inheritance) Tag = DW_TAG_reference_type;
Buffer.setTag(Tag);
+
// Map to main type, void will not have a type.
DIType FromTy = DTy.getTypeDerivedFrom();
AddType(DW_Unit, &Buffer, FromTy);
@@ -1703,12 +1707,14 @@
/// ConstructTypeDIE - Construct type DIE from DICompositeType.
void ConstructTypeDIE(CompileUnit *DW_Unit, DIE &Buffer,
DICompositeType CTy) {
-
// Get core information.
- const std::string &Name = CTy.getName();
+ std::string Name;
+ CTy.getName(Name);
+
uint64_t Size = CTy.getSizeInBits() >> 3;
unsigned Tag = CTy.getTag();
Buffer.setTag(Tag);
+
switch (Tag) {
case DW_TAG_vector_type:
case DW_TAG_array_type:
@@ -1843,7 +1849,8 @@
DIE *ConstructEnumTypeDIE(CompileUnit *DW_Unit, DIEnumerator *ETy) {
DIE *Enumerator = new DIE(DW_TAG_enumerator);
- AddString(Enumerator, DW_AT_name, DW_FORM_string, ETy->getName());
+ std::string Name;
+ AddString(Enumerator, DW_AT_name, DW_FORM_string, ETy->getName(Name));
int64_t Value = ETy->getEnumValue();
AddSInt(Enumerator, DW_AT_const_value, DW_FORM_sdata, Value);
return Enumerator;
@@ -1853,9 +1860,11 @@
DIE *CreateGlobalVariableDIE(CompileUnit *DW_Unit, const DIGlobalVariable &GV)
{
DIE *GVDie = new DIE(DW_TAG_variable);
- const std::string &Name = GV.getDisplayName();
+ std::string Name;
+ GV.getDisplayName(Name);
AddString(GVDie, DW_AT_name, DW_FORM_string, Name);
- const std::string &LinkageName = GV.getLinkageName();
+ std::string LinkageName;
+ GV.getLinkageName(LinkageName);
if (!LinkageName.empty())
AddString(GVDie, DW_AT_MIPS_linkage_name, DW_FORM_string, LinkageName);
AddType(DW_Unit, GVDie, GV.getType());
@@ -1868,7 +1877,8 @@
/// CreateMemberDIE - Create new member DIE.
DIE *CreateMemberDIE(CompileUnit *DW_Unit, const DIDerivedType &DT) {
DIE *MemberDie = new DIE(DT.getTag());
- std::string Name = DT.getName();
+ std::string Name;
+ DT.getName(Name);
if (!Name.empty())
AddString(MemberDie, DW_AT_name, DW_FORM_string, Name);
@@ -1912,8 +1922,10 @@
const DISubprogram &SP,
bool IsConstructor = false) {
DIE *SPDie = new DIE(DW_TAG_subprogram);
- AddString(SPDie, DW_AT_name, DW_FORM_string, SP.getName());
- const std::string &LinkageName = SP.getLinkageName();
+ std::string Name;
+ AddString(SPDie, DW_AT_name, DW_FORM_string, SP.getName(Name));
+ std::string LinkageName;
+ SP.getLinkageName(LinkageName);
if (!LinkageName.empty())
AddString(SPDie, DW_AT_MIPS_linkage_name, DW_FORM_string,
LinkageName);
@@ -1976,7 +1988,8 @@
// Define variable debug information entry.
DIE *VariableDie = new DIE(Tag);
- AddString(VariableDie, DW_AT_name, DW_FORM_string, VD.getName());
+ std::string Name;
+ AddString(VariableDie, DW_AT_name, DW_FORM_string, VD.getName(Name));
// Add source line info if available.
AddSourceLine(VariableDie, &VD);
@@ -2126,7 +2139,8 @@
E = Result.end(); I != E; ++I) {
DISubprogram SPD(*I);
- if (SPD.getName() == MF->getFunction()->getName()) {
+ std::string Name;
+ if (SPD.getName(Name) == MF->getFunction()->getName()) {
// Get the compile unit context.
CompileUnit *Unit = MainCU;
if (!Unit)
@@ -2798,21 +2812,24 @@
for (std::vector::iterator RI = Result.begin(),
RE = Result.end(); RI != RE; ++RI) {
DICompileUnit DIUnit(*RI);
- unsigned ID = RecordSource(DIUnit.getDirectory(),
- DIUnit.getFilename());
+ std::string Dir, FN;
+ unsigned ID = RecordSource(DIUnit.getDirectory(Dir),
+ DIUnit.getFilename(FN));
DIE *Die = new DIE(DW_TAG_compile_unit);
AddSectionOffset(Die, DW_AT_stmt_list, DW_FORM_data4,
DWLabel("section_line", 0), DWLabel("section_line", 0),
false);
- AddString(Die, DW_AT_producer, DW_FORM_string, DIUnit.getProducer());
+ std::string Prod;
+ AddString(Die, DW_AT_producer, DW_FORM_string, DIUnit.getProducer(Prod));
AddUInt(Die, DW_AT_language, DW_FORM_data1, DIUnit.getLanguage());
- AddString(Die, DW_AT_name, DW_FORM_string, DIUnit.getFilename());
- if (!DIUnit.getDirectory().empty())
- AddString(Die, DW_AT_comp_dir, DW_FORM_string, DIUnit.getDirectory());
+ AddString(Die, DW_AT_name, DW_FORM_string, FN);
+ if (!Dir.empty())
+ AddString(Die, DW_AT_comp_dir, DW_FORM_string, Dir);
if (DIUnit.isOptimized())
AddUInt(Die, DW_AT_APPLE_optimized, DW_FORM_flag, 1);
- const std::string &Flags = DIUnit.getFlags();
+ std::string Flags;
+ DIUnit.getFlags(Flags);
if (!Flags.empty())
AddString(Die, DW_AT_APPLE_flags, DW_FORM_string, Flags);
unsigned RVer = DIUnit.getRunTimeVersion();
@@ -2861,7 +2878,8 @@
//Add to context owner.
DW_Unit->getDie()->AddChild(VariableDie);
//Expose as global. FIXME - need to check external flag.
- DW_Unit->AddGlobal(DI_GV.getName(), VariableDie);
+ std::string Name;
+ DW_Unit->AddGlobal(DI_GV.getName(Name), VariableDie);
if (!result)
result = true;
@@ -2900,7 +2918,8 @@
//Add to context owner.
Unit->getDie()->AddChild(SubprogramDie);
//Expose as global.
- Unit->AddGlobal(SP.getName(), SubprogramDie);
+ std::string Name;
+ Unit->AddGlobal(SP.getName(Name), SubprogramDie);
if (!result)
result = true;
Modified: llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=66405&r1=66404&r2=66405&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/FastISel.cpp Mon Mar 9 01:02:27 2009
@@ -319,8 +319,9 @@
DbgStopPointInst *SPI = cast(I);
if (DW && DW->ValidDebugInfo(SPI->getContext())) {
DICompileUnit CU(cast(SPI->getContext()));
- unsigned SrcFile = DW->RecordSource(CU.getDirectory(),
- CU.getFilename());
+ std::string Dir, FN;
+ unsigned SrcFile = DW->RecordSource(CU.getDirectory(Dir),
+ CU.getFilename(FN));
unsigned Line = SPI->getLine();
unsigned Col = SPI->getColumn();
unsigned ID = DW->RecordSourceLine(Line, Col, SrcFile);
@@ -361,8 +362,9 @@
// (most?) gdb expects.
DISubprogram Subprogram(cast(SP));
DICompileUnit CompileUnit = Subprogram.getCompileUnit();
- unsigned SrcFile = DW->RecordSource(CompileUnit.getDirectory(),
- CompileUnit.getFilename());
+ std::string Dir, FN;
+ unsigned SrcFile = DW->RecordSource(CompileUnit.getDirectory(Dir),
+ CompileUnit.getFilename(FN));
// Record the source line but does not create a label for the normal
// function start. It will be emitted at asm emission time. However,
Modified: llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=66405&r1=66404&r2=66405&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Mar 9 01:02:27 2009
@@ -1288,9 +1288,10 @@
GlobalVariable *CU_GV = cast(DSP->getCompileUnit());
if (DW && (useDEBUG_LOC || useLABEL) && !CU_GV->isDeclaration()) {
DICompileUnit CU(cast(DSP->getCompileUnit()));
- unsigned SrcFile = DW->RecordSource(CU.getDirectory(),
- CU.getFilename());
-
+ std::string Dir, FN;
+ unsigned SrcFile = DW->RecordSource(CU.getDirectory(Dir),
+ CU.getFilename(FN));
+
unsigned Line = DSP->getLine();
unsigned Col = DSP->getColumn();
Modified: llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=66405&r1=66404&r2=66405&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original)
+++ llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Mon Mar 9 01:02:27 2009
@@ -335,8 +335,9 @@
if (DW && DW->ValidDebugInfo(SPI->getContext())) {
DICompileUnit CU(cast(SPI->getContext()));
- unsigned SrcFile = DW->RecordSource(CU.getDirectory(),
- CU.getFilename());
+ std::string Dir, FN;
+ unsigned SrcFile = DW->RecordSource(CU.getDirectory(Dir),
+ CU.getFilename(FN));
unsigned idx = MF->getOrCreateDebugLocID(SrcFile,
SPI->getLine(),
SPI->getColumn());
@@ -354,8 +355,9 @@
if (DW->ValidDebugInfo(SP)) {
DISubprogram Subprogram(cast(SP));
DICompileUnit CU(Subprogram.getCompileUnit());
- unsigned SrcFile = DW->RecordSource(CU.getDirectory(),
- CU.getFilename());
+ std::string Dir, FN;
+ unsigned SrcFile = DW->RecordSource(CU.getDirectory(Dir),
+ CU.getFilename(FN));
unsigned Line = Subprogram.getLineNumber();
DL = DebugLoc::get(MF->getOrCreateDebugLocID(SrcFile, Line, 0));
}
@@ -3901,7 +3903,9 @@
SPI.getColumn(),
SPI.getContext()));
DICompileUnit CU(cast(SPI.getContext()));
- unsigned SrcFile = DW->RecordSource(CU.getDirectory(), CU.getFilename());
+ std::string Dir, FN;
+ unsigned SrcFile = DW->RecordSource(CU.getDirectory(Dir),
+ CU.getFilename(FN));
unsigned idx = DAG.getMachineFunction().
getOrCreateDebugLocID(SrcFile,
SPI.getLine(),
@@ -3946,8 +3950,9 @@
// what (most?) gdb expects.
DISubprogram Subprogram(cast(SP));
DICompileUnit CompileUnit = Subprogram.getCompileUnit();
- unsigned SrcFile = DW->RecordSource(CompileUnit.getDirectory(),
- CompileUnit.getFilename());
+ std::string Dir, FN;
+ unsigned SrcFile = DW->RecordSource(CompileUnit.getDirectory(Dir),
+ CompileUnit.getFilename(FN));
// Record the source line but does not create a label for the normal
// function start. It will be emitted at asm emission time. However,
Modified: llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp?rev=66405&r1=66404&r2=66405&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp (original)
+++ llvm/branches/Apple/Dib/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp Mon Mar 9 01:02:27 2009
@@ -179,7 +179,8 @@
}
} else if (const DbgStopPointSDNode *D = dyn_cast(Node)) {
DICompileUnit CU(cast(D->getCompileUnit()));
- Op += ": " + CU.getFilename();
+ std::string FN;
+ Op += ": " + CU.getFilename(FN);
Op += ":" + utostr(D->getLine());
if (D->getColumn() != 0)
Op += ":" + utostr(D->getColumn());
From nicholas at mxc.ca Mon Mar 9 01:16:26 2009
From: nicholas at mxc.ca (Nick Lewycky)
Date: Mon, 09 Mar 2009 06:16:26 -0000
Subject: [llvm-commits] [llvm] r66406 - in /llvm/trunk: Makefile
autoconf/configure.ac autoconf/m4/cxx_hash_map.m4
autoconf/m4/cxx_hash_set.m4 cmake/config-ix.cmake
cmake/modules/CheckCxxHashmap.cmake cmake/modules/CheckCxxHashset.cmake
include/llvm/ADT/HashExtras.h include/llvm/ADT/hash_map.cmake
include/llvm/ADT/hash_map.h.in include/llvm/ADT/hash_set.cmake
include/llvm/ADT/hash_set.h.in
Message-ID: <200903090616.n296GQdW010655@zion.cs.uiuc.edu>
Author: nicholas
Date: Mon Mar 9 01:16:26 2009
New Revision: 66406
URL: http://llvm.org/viewvc/llvm-project?rev=66406&view=rev
Log:
Remove configurey-fu to autodetect hash_map and hash_set now that they are
no longer used in LLVM.
Removed:
llvm/trunk/autoconf/m4/cxx_hash_map.m4
llvm/trunk/autoconf/m4/cxx_hash_set.m4
llvm/trunk/cmake/modules/CheckCxxHashmap.cmake
llvm/trunk/cmake/modules/CheckCxxHashset.cmake
llvm/trunk/include/llvm/ADT/hash_map.cmake
llvm/trunk/include/llvm/ADT/hash_map.h.in
llvm/trunk/include/llvm/ADT/hash_set.cmake
llvm/trunk/include/llvm/ADT/hash_set.h.in
Modified:
llvm/trunk/Makefile
llvm/trunk/autoconf/configure.ac
llvm/trunk/cmake/config-ix.cmake
llvm/trunk/include/llvm/ADT/HashExtras.h
Modified: llvm/trunk/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile?rev=66406&r1=66405&r2=66406&view=diff
==============================================================================
--- llvm/trunk/Makefile (original)
+++ llvm/trunk/Makefile Mon Mar 9 01:16:26 2009
@@ -117,8 +117,6 @@
dist-hook::
$(Echo) Eliminating files constructed by configure
$(Verb) $(RM) -f \
- $(TopDistDir)/include/llvm/ADT/hash_map.h \
- $(TopDistDir)/include/llvm/ADT/hash_set.h \
$(TopDistDir)/include/llvm/ADT/iterator.h \
$(TopDistDir)/include/llvm/Config/config.h \
$(TopDistDir)/include/llvm/Support/DataTypes.h \
@@ -137,8 +135,6 @@
FilesToConfig := \
include/llvm/Config/config.h \
include/llvm/Support/DataTypes.h \
- include/llvm/ADT/hash_map.h \
- include/llvm/ADT/hash_set.h \
include/llvm/ADT/iterator.h
FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=66406&r1=66405&r2=66406&view=diff
==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Mon Mar 9 01:16:26 2009
@@ -842,8 +842,6 @@
dnl Check for variations in the Standard C++ library and STL. These macros are
dnl provided by LLVM in the autoconf/m4 directory.
-AC_CXX_HAVE_HASH_MAP
-AC_CXX_HAVE_HASH_SET
AC_CXX_HAVE_STD_ITERATOR
AC_CXX_HAVE_BI_ITERATOR
AC_CXX_HAVE_FWD_ITERATOR
@@ -1048,8 +1046,6 @@
dnl files can be updated automatically when their *.in sources change.
AC_CONFIG_HEADERS([include/llvm/Config/config.h])
AC_CONFIG_HEADERS([include/llvm/Support/DataTypes.h])
-AC_CONFIG_HEADERS([include/llvm/ADT/hash_map.h])
-AC_CONFIG_HEADERS([include/llvm/ADT/hash_set.h])
AC_CONFIG_HEADERS([include/llvm/ADT/iterator.h])
dnl Configure the makefile's configuration data
Removed: llvm/trunk/autoconf/m4/cxx_hash_map.m4
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/m4/cxx_hash_map.m4?rev=66405&view=auto
==============================================================================
--- llvm/trunk/autoconf/m4/cxx_hash_map.m4 (original)
+++ llvm/trunk/autoconf/m4/cxx_hash_map.m4 (removed)
@@ -1,59 +0,0 @@
-# Check for hash_map extension. This is from
-# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_map.html
-AC_DEFUN([AC_CXX_HAVE_STD_EXT_HASH_MAP],
-[AC_CACHE_CHECK([whether the compiler has defining template class std::hash_map],
- ac_cv_cxx_have_std_ext_hash_map,
- [AC_REQUIRE([AC_CXX_NAMESPACES])
- AC_LANG_PUSH([C++])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include
-#ifdef HAVE_NAMESPACES
-using namespace std;
-#endif]], [[hash_map t;]])],[ac_cv_cxx_have_std_ext_hash_map=yes],[ac_cv_cxx_have_std_ext_hash_map=no])
- AC_LANG_POP([C++])])
- if test "$ac_cv_cxx_have_std_ext_hash_map" = yes
- then
- AC_DEFINE(HAVE_STD_EXT_HASH_MAP,1,[Have ext/hash_map>])
- else
- AC_DEFINE(HAVE_STD_EXT_HASH_MAP,0,[Does not have ext/hash_map>])
- fi
- ])
-
-AC_DEFUN([AC_CXX_HAVE_GNU_EXT_HASH_MAP],
-[AC_CACHE_CHECK([whether the compiler has defining template class __gnu_cxx::hash_map],
- ac_cv_cxx_have_gnu_ext_hash_map,
- [AC_REQUIRE([AC_CXX_NAMESPACES])
- AC_LANG_PUSH([C++])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include
-#ifdef HAVE_NAMESPACES
-using namespace __gnu_cxx;
-#endif]], [[hash_map t; ]])],[ac_cv_cxx_have_gnu_ext_hash_map=yes],[ac_cv_cxx_have_gnu_ext_hash_map=no])
- AC_LANG_POP([C++])])
- if test "$ac_cv_cxx_have_gnu_ext_hash_map" = yes
- then
- AC_DEFINE(HAVE_GNU_EXT_HASH_MAP,1,[Have ext/hash_map])
- else
- AC_DEFINE(HAVE_GNU_EXT_HASH_MAP,0,[Does not have ext/hash_map])
- fi
- ])
-
-AC_DEFUN([AC_CXX_HAVE_GLOBAL_HASH_MAP],
-[AC_CACHE_CHECK([whether the compiler has defining template class ::hash_map],
- ac_cv_cxx_have_global_hash_map,
- [AC_REQUIRE([AC_CXX_NAMESPACES])
- AC_LANG_PUSH([C++])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[hash_map t; ]])],[ac_cv_cxx_have_global_hash_map=yes],[ac_cv_cxx_have_global_hash_map=no])
- AC_LANG_POP([C++])])
- if test "$ac_cv_cxx_have_global_hash_map" = yes
- then
- AC_DEFINE(HAVE_GLOBAL_HASH_MAP,1,[Have ])
- else
- AC_DEFINE(HAVE_GLOBAL_HASH_MAP,0,[Does not have ])
- fi
- ])
-
-AC_DEFUN([AC_CXX_HAVE_HASH_MAP],
-[AC_CXX_HAVE_STD_EXT_HASH_MAP
- AC_CXX_HAVE_GNU_EXT_HASH_MAP
- AC_CXX_HAVE_GLOBAL_HASH_MAP])
-
-
Removed: llvm/trunk/autoconf/m4/cxx_hash_set.m4
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/m4/cxx_hash_set.m4?rev=66405&view=auto
==============================================================================
--- llvm/trunk/autoconf/m4/cxx_hash_set.m4 (original)
+++ llvm/trunk/autoconf/m4/cxx_hash_set.m4 (removed)
@@ -1,60 +0,0 @@
-# Check for hash_set extension. This is modified from
-# http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_set.html
-AC_DEFUN([AC_CXX_HAVE_STD_EXT_HASH_SET],
-[AC_CACHE_CHECK([whether the compiler has defining template class std::hash_set],
- ac_cv_cxx_have_std_ext_hash_set,
- [AC_REQUIRE([AC_CXX_NAMESPACES])
- AC_LANG_PUSH([C++])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include
-#ifdef HAVE_NAMESPACES
-using namespace std;
-#endif]], [[hash_set t; ]])],[ac_cv_cxx_have_std_ext_hash_set=yes],[ac_cv_cxx_have_std_ext_hash_set=no])
- AC_LANG_POP([C++])])
- if test "$ac_cv_cxx_have_std_ext_hash_set" = yes
- then
- AC_DEFINE(HAVE_STD_EXT_HASH_SET,1,[Have hash_set in std namespace])
- else
- AC_DEFINE(HAVE_STD_EXT_HASH_SET,0,[Does not have hash_set in std namespace])
- fi
- ])
-
-AC_DEFUN([AC_CXX_HAVE_GNU_EXT_HASH_SET],
-[AC_CACHE_CHECK(
- [whether the compiler has defining template class __gnu_cxx::hash_set],
- ac_cv_cxx_have_gnu_ext_hash_set,
- [AC_REQUIRE([AC_CXX_NAMESPACES])
- AC_LANG_PUSH([C++])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include
-#ifdef HAVE_NAMESPACES
-using namespace __gnu_cxx;
-#endif]], [[hash_set t; ]])],[ac_cv_cxx_have_gnu_ext_hash_set=yes],[ac_cv_cxx_have_gnu_ext_hash_set=no])
- AC_LANG_POP([C++])])
- if test "$ac_cv_cxx_have_gnu_ext_hash_set" = yes
- then
- AC_DEFINE(HAVE_GNU_EXT_HASH_SET,1,[Have hash_set in gnu namespace])
- else
- AC_DEFINE(HAVE_GNU_EXT_HASH_SET,0,[Does not have hash_set in gnu namespace])
- fi
- ])
-
-AC_DEFUN([AC_CXX_HAVE_GLOBAL_HASH_SET],
-[AC_CACHE_CHECK([whether the compiler has defining template class ::hash_set],
- ac_cv_cxx_have_global_hash_set,
- [AC_REQUIRE([AC_CXX_NAMESPACES])
- AC_LANG_PUSH([C++])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[hash_set t; return 0;]])],[ac_cv_cxx_have_global_hash_set=yes],[ac_cv_cxx_have_global_hash_set=no])
- AC_LANG_POP([C++])])
- if test "$ac_cv_cxx_have_global_hash_set" = yes
- then
- AC_DEFINE(HAVE_GLOBAL_HASH_SET,1,[Have hash_set in global namespace])
- else
- AC_DEFINE(HAVE_GLOBAL_HASH_SET,0,[Does not have hash_set in global namespace])
- fi
- ])
-
-AC_DEFUN([AC_CXX_HAVE_HASH_SET],
-[AC_CXX_HAVE_STD_EXT_HASH_SET
- AC_CXX_HAVE_GNU_EXT_HASH_SET
- AC_CXX_HAVE_GLOBAL_HASH_SET])
-
-
Modified: llvm/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=66406&r1=66405&r2=66406&view=diff
==============================================================================
--- llvm/trunk/cmake/config-ix.cmake (original)
+++ llvm/trunk/cmake/config-ix.cmake Mon Mar 9 01:16:26 2009
@@ -86,14 +86,6 @@
set(LTDL_DLOPEN_DEPLIBS 0) # TODO
endif( MSVC )
-if( NOT MSVC )
- # hash_map.h.in and hash_set.h.in contain a special case for MSVC
- include(CheckCxxHashmap)
- include(CheckCxxHashset)
- check_hashmap()
- check_hashset()
-endif( NOT MSVC )
-
# FIXME: Signal handler return type, currently hardcoded to 'void'
set(RETSIGTYPE void)
@@ -124,12 +116,3 @@
${LLVM_BINARY_DIR}/include/llvm/Support/DataTypes.h
)
-configure_file(
- ${LLVM_MAIN_INCLUDE_DIR}/llvm/ADT/hash_map.cmake
- ${LLVM_BINARY_DIR}/include/llvm/ADT/hash_map.h
- )
-
-configure_file(
- ${LLVM_MAIN_INCLUDE_DIR}/llvm/ADT/hash_set.cmake
- ${LLVM_BINARY_DIR}/include/llvm/ADT/hash_set.h
- )
Removed: llvm/trunk/cmake/modules/CheckCxxHashmap.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/CheckCxxHashmap.cmake?rev=66405&view=auto
==============================================================================
--- llvm/trunk/cmake/modules/CheckCxxHashmap.cmake (original)
+++ llvm/trunk/cmake/modules/CheckCxxHashmap.cmake (removed)
@@ -1,53 +0,0 @@
-# - Check if for hash_map.
-# CHECK_HASHMAP ()
-#
-
-include(CheckCXXSourceCompiles)
-
-macro(CHECK_HASHMAP)
- message(STATUS "Checking for C++ hash_map implementation...")
- check_cxx_source_compiles("
- #include
- int main() {
- __gnu_cxx::hash_map t;
- }
-"
- HAVE_GNU_EXT_HASH_MAP
- )
- if(HAVE_GNU_EXT_HASH_MAP)
- message(STATUS "C++ hash_map found in 'ext' dir in namespace __gnu_cxx::")
- endif(HAVE_GNU_EXT_HASH_MAP)
-
- check_cxx_source_compiles("
- #include
- int main() {
- std::hash_map t;
- }
-"
- HAVE_STD_EXT_HASH_MAP
- )
- if(HAVE_STD_EXT_HASH_MAP)
- message(STATUS "C++ hash_map found in 'ext' dir in namespace std::")
- endif(HAVE_STD_EXT_HASH_MAP)
-
- check_cxx_source_compiles("
- #include
- int main() {
- hash_map t;
- }
-"
- HAVE_GLOBAL_HASH_MAP
- )
- if(HAVE_GLOBAL_HASH_MAP)
- message(STATUS "C++ hash_map found in global namespace")
- endif(HAVE_GLOBAL_HASH_MAP)
-
- if(NOT HAVE_GNU_EXT_HASH_MAP)
- if(NOT HAVE_STD_EXT_HASH_MAP)
- if(NOT HAVE_GLOBAL_HASH_MAP)
- message(STATUS "C++ hash_map not found")
- endif(NOT HAVE_GLOBAL_HASH_MAP)
- endif(NOT HAVE_STD_EXT_HASH_MAP)
- endif(NOT HAVE_GNU_EXT_HASH_MAP)
-
-endmacro(CHECK_HASHMAP)
Removed: llvm/trunk/cmake/modules/CheckCxxHashset.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/CheckCxxHashset.cmake?rev=66405&view=auto
==============================================================================
--- llvm/trunk/cmake/modules/CheckCxxHashset.cmake (original)
+++ llvm/trunk/cmake/modules/CheckCxxHashset.cmake (removed)
@@ -1,52 +0,0 @@
-# - Check if for hash_set.
-# CHECK_HASHSET ()
-#
-
-include(CheckCXXSourceCompiles)
-
-macro(CHECK_HASHSET)
- message(STATUS "Checking for C++ hash_set implementation...")
- check_cxx_source_compiles("
- #include
- int main() {
- __gnu_cxx::hash_set t;
- }
-"
- HAVE_GNU_EXT_HASH_SET
- )
- if(HAVE_GNU_EXT_HASH_SET)
- message(STATUS "C++ hash_set found in 'ext' dir in namespace __gnu_cxx::")
- endif(HAVE_GNU_EXT_HASH_SET)
-
- check_cxx_source_compiles("
- #include
- int main() {
- std::hash_set t;
- }
-"
- HAVE_STD_EXT_HASH_SET
- )
- if(HAVE_STD_EXT_HASH_SET)
- message(STATUS "C++ hash_set found in 'ext' dir in namespace std::")
- endif(HAVE_STD_EXT_HASH_SET)
-
- check_cxx_source_compiles("
- #include
- int main() {
- hash_set t;
- }
-"
- HAVE_GLOBAL_HASH_SET
- )
- if(HAVE_GLOBAL_HASH_SET)
- message(STATUS "C++ hash_set found in global namespace")
- endif(HAVE_GLOBAL_HASH_SET)
-
- if(NOT HAVE_GNU_EXT_HASH_SET)
- if(NOT HAVE_STD_EXT_HASH_SET)
- if(NOT HAVE_GLOBAL_HASH_SET)
- message(STATUS "C++ hash_set not found")
- endif(NOT HAVE_GLOBAL_HASH_SET)
- endif(NOT HAVE_STD_EXT_HASH_SET)
- endif(NOT HAVE_GNU_EXT_HASH_SET)
-endmacro(CHECK_HASHSET)
Modified: llvm/trunk/include/llvm/ADT/HashExtras.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/HashExtras.h?rev=66406&r1=66405&r2=66406&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/HashExtras.h (original)
+++ llvm/trunk/include/llvm/ADT/HashExtras.h Mon Mar 9 01:16:26 2009
@@ -17,7 +17,6 @@
#ifndef LLVM_ADT_HASHEXTRAS_H
#define LLVM_ADT_HASHEXTRAS_H
-#include "llvm/ADT/hash_map.h"
#include
// Cannot specialize hash template from outside of the std namespace.
Removed: llvm/trunk/include/llvm/ADT/hash_map.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/hash_map.cmake?rev=66405&view=auto
==============================================================================
--- llvm/trunk/include/llvm/ADT/hash_map.cmake (original)
+++ llvm/trunk/include/llvm/ADT/hash_map.cmake (removed)
@@ -1,150 +0,0 @@
-//===-- llvm/ADT/hash_map - "Portable" wrapper around hash_map --*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file provides a wrapper around the mysterious header file
-// that seems to move around between GCC releases into and out of namespaces at
-// will. #including this header will cause hash_map to be available in the
-// global namespace.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_ADT_HASH_MAP
-#define LLVM_ADT_HASH_MAP
-
-// Compiler Support Matrix
-//
-// Version Namespace Header File
-// 2.95.x :: hash_map
-// 3.0.4 std ext/hash_map
-// 3.1 __gnu_cxx ext/hash_map
-// HP aCC6 std stdex/rw/hashm*ap.h
-// MS VC++ stdext hash_map
-
-#cmakedefine HAVE_GNU_EXT_HASH_MAP
-#cmakedefine HAVE_STD_EXT_HASH_MAP
-#cmakedefine HAVE_GLOBAL_HASH_MAP
-#cmakedefine HAVE_RW_STDEX_HASH_MAP_H
-
-#if defined(HAVE_GNU_EXT_HASH_MAP)
-// This is for GCC-3.1+ which puts hash in ext/hash_map
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE __gnu_cxx
-# endif
-
-// GCC 3.0.x puts hash_map in and in the std namespace.
-#elif defined(HAVE_STD_EXT_HASH_MAP)
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE std
-# endif
-
-// Older compilers such as GCC before version 3.0 do not keep
-// extensions in the `ext' directory, and ignore the `std' namespace.
-#elif defined(HAVE_GLOBAL_HASH_MAP)
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE std
-# endif
-
-// HP aCC doesn't include an SGI-like hash_map. For this platform (or
-// any others using Rogue Wave Software's Tools.h++ library), we wrap
-// around them in std::
-#elif defined(HAVE_RW_STDEX_HASH_MAP_H)
-# include
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE std
-# endif
-
-// Support Microsoft VC++.
-#elif defined(_MSC_VER)
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE stdext
- using std::_Distance;
-# endif
-
-// Give a warning if we couldn't find it, instead of (or in addition to)
-// randomly doing something dumb.
-#else
-# warning "Autoconfiguration failed to find the hash_map header file."
-#endif
-
-// we wrap Rogue Wave Tools.h++ rw_hashmap into something SGI-looking, here:
-#ifdef HAVE_RW_STDEX_HASH_MAP_H
-namespace HASH_NAMESPACE {
-
-template struct hash {
- unsigned int operator()(const unsigned int& x) const {
- return x;
- }
-};
-
-template ,
- class _EqualKey = equal_to,
- class _A = allocator >
-class hash_map : public rw_hashmap {
-};
-
-template ,
- class _EqualKey = equal_to,
- class _A = allocator >
-class hash_multimap : public rw_hashmultimap {
-};
-
-} // end HASH_NAMESPACE;
-#endif
-
-// Include vector because ext/hash_map includes stl_vector.h and leaves
-// out specializations like stl_bvector.h, causing link conflicts.
-#include
-
-#ifdef _MSC_VER
-
-// GCC and VC++ have differing ways of implementing hash_maps. As it's not
-// standardized, that's to be expected. This adapter class allows VC++
-// hash_map to use GCC's hash classes.
-namespace stdext {
- template struct hash;
-
- // Provide a hash function for unsigned ints...
- template<> struct hash {
- inline size_t operator()(unsigned int Val) const {
- return Val;
- }
- };
-
- template class hash_compare > {
- std::less comp;
- public:
- enum { bucket_size = 4 };
- enum { min_buckets = 8 };
- hash_compare() {}
- hash_compare(std::less pred) : comp(pred) {}
- size_t operator()(const Key& key) const { return hash()(key); }
- bool operator()(const Key& k1, const Key& k2) const { return comp(k1, k2); }
- };
-}
-
-#endif
-
-using HASH_NAMESPACE::hash_map;
-using HASH_NAMESPACE::hash_multimap;
-using HASH_NAMESPACE::hash;
-
-#include "llvm/ADT/HashExtras.h"
-
-#endif
Removed: llvm/trunk/include/llvm/ADT/hash_map.h.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/hash_map.h.in?rev=66405&view=auto
==============================================================================
--- llvm/trunk/include/llvm/ADT/hash_map.h.in (original)
+++ llvm/trunk/include/llvm/ADT/hash_map.h.in (removed)
@@ -1,150 +0,0 @@
-//==-- llvm/ADT/hash_map.h - "Portable" wrapper around hash_map --*- C++ -*-==//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file provides a wrapper around the mysterious header file
-// that seems to move around between GCC releases into and out of namespaces at
-// will. #including this header will cause hash_map to be available in the
-// global namespace.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_ADT_HASH_MAP_H
-#define LLVM_ADT_HASH_MAP_H
-
-// Compiler Support Matrix
-//
-// Version Namespace Header File
-// 2.95.x :: hash_map
-// 3.0.4 std ext/hash_map
-// 3.1 __gnu_cxx ext/hash_map
-// HP aCC6 std stdex/rw/hashm*ap.h
-// MS VC++ stdext hash_map
-
-#undef HAVE_GNU_EXT_HASH_MAP
-#undef HAVE_STD_EXT_HASH_MAP
-#undef HAVE_GLOBAL_HASH_MAP
-#undef HAVE_RW_STDEX_HASH_MAP_H
-
-#if HAVE_GNU_EXT_HASH_MAP
-// This is for GCC-3.1+ which puts hash in ext/hash_map
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE __gnu_cxx
-# endif
-
-// GCC 3.0.x puts hash_map in and in the std namespace.
-#elif HAVE_STD_EXT_HASH_MAP
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE std
-# endif
-
-// Older compilers such as GCC before version 3.0 do not keep
-// extensions in the `ext' directory, and ignore the `std' namespace.
-#elif HAVE_GLOBAL_HASH_MAP
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE std
-# endif
-
-// HP aCC doesn't include an SGI-like hash_map. For this platform (or
-// any others using Rogue Wave Software's Tools.h++ library), we wrap
-// around them in std::
-#elif HAVE_RW_STDEX_HASH_MAP_H
-# include
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE std
-# endif
-
-// Support Microsoft VC++.
-#elif defined(_MSC_VER)
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE stdext
- using std::_Distance;
-# endif
-
-// Give a warning if we couldn't find it, instead of (or in addition to)
-// randomly doing something dumb.
-#else
-# warning "Autoconfiguration failed to find the hash_map header file."
-#endif
-
-// we wrap Rogue Wave Tools.h++ rw_hashmap into something SGI-looking, here:
-#ifdef HAVE_RW_STDEX_HASH_MAP_H
-namespace HASH_NAMESPACE {
-
-template struct hash {
- unsigned int operator()(const unsigned int& x) const {
- return x;
- }
-};
-
-template ,
- class _EqualKey = equal_to,
- class _A = allocator >
-class hash_map : public rw_hashmap {
-};
-
-template ,
- class _EqualKey = equal_to,
- class _A = allocator >
-class hash_multimap : public rw_hashmultimap {
-};
-
-} // end HASH_NAMESPACE;
-#endif
-
-// Include vector because ext/hash_map includes stl_vector.h and leaves
-// out specializations like stl_bvector.h, causing link conflicts.
-#include
-
-#ifdef _MSC_VER
-
-// GCC and VC++ have differing ways of implementing hash_maps. As it's not
-// standardized, that's to be expected. This adapter class allows VC++
-// hash_map to use GCC's hash classes.
-namespace stdext {
- template struct hash;
-
- // Provide a hash function for unsigned ints...
- template<> struct hash {
- inline size_t operator()(unsigned int Val) const {
- return Val;
- }
- };
-
- template class hash_compare > {
- std::less comp;
- public:
- enum { bucket_size = 4 };
- enum { min_buckets = 8 };
- hash_compare() {}
- hash_compare(std::less pred) : comp(pred) {}
- size_t operator()(const Key& key) const { return hash()(key); }
- bool operator()(const Key& k1, const Key& k2) const { return comp(k1, k2); }
- };
-}
-
-#endif
-
-using HASH_NAMESPACE::hash_map;
-using HASH_NAMESPACE::hash_multimap;
-using HASH_NAMESPACE::hash;
-
-#include "llvm/ADT/HashExtras.h"
-
-#endif // LLVM_ADT_HASH_MAP_H
Removed: llvm/trunk/include/llvm/ADT/hash_set.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/hash_set.cmake?rev=66405&view=auto
==============================================================================
--- llvm/trunk/include/llvm/ADT/hash_set.cmake (original)
+++ llvm/trunk/include/llvm/ADT/hash_set.cmake (removed)
@@ -1,111 +0,0 @@
-//===-- llvm/ADT/hash_set - "Portable" wrapper around hash_set --*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-// vim:ft=cpp
-//
-// This file provides a wrapper around the mysterious header file
-// that seems to move around between GCC releases into and out of namespaces at
-// will. #including this header will cause hash_set to be available in the
-// global namespace.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_ADT_HASH_SET
-#define LLVM_ADT_HASH_SET
-
-// Compiler Support Matrix
-//
-// Version Namespace Header File
-// 2.95.x :: hash_set
-// 3.0.4 std ext/hash_set
-// 3.1 __gnu_cxx ext/hash_set
-// HP aCC6 std stdex/rw/hashset.h
-// MS VC++ stdext hash_set
-
-#cmakedefine HAVE_GNU_EXT_HASH_SET
-#cmakedefine HAVE_STD_EXT_HASH_SET
-#cmakedefine HAVE_GLOBAL_HASH_SET
-#cmakedefine HAVE_RW_STDEX_HASH_SET_H
-
-// GCC versions 3.1 and later put hash_set in and in
-// the __gnu_cxx namespace.
-#if defined(HAVE_GNU_EXT_HASH_SET)
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE __gnu_cxx
-# endif
-
-// GCC 3.0.x puts hash_set in and in the std namespace.
-#elif defined(HAVE_STD_EXT_HASH_SET)
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE std
-# endif
-
-// Older compilers such as GCC before version 3.0 do not keep
-// extensions in the `ext' directory, and ignore the `std' namespace.
-#elif defined(HAVE_GLOBAL_HASH_SET)
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE std
-# endif
-
-// HP aCC doesn't include an SGI-like hash_set. For this platform (or
-// any others using Rogue Wave Software's Tools.h++ library), we wrap
-// around them in std::
-#elif defined(HAVE_RW_STDEX_HASH_SET_H)
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE std
-# endif
-
-// Support Microsoft VC++.
-#elif defined(_MSC_VER)
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE stdext
-# endif
-
-// Give a warning if we couldn't find it, instead of (or in addition to)
-// randomly doing something dumb.
-#else
-# warning "Autoconfiguration failed to find the hash_set header file."
-#endif
-
-// we wrap Rogue Wave Tools.h++ rw_hashset into something SGI-looking, here:
-#ifdef HAVE_RW_STDEX_HASH_SET_H
-namespace HASH_NAMESPACE {
-
-/*
-template struct hash {
- unsigned int operator()(const unsigned int& x) const {
- return x;
- }
-};
-*/
-
-template ,
- class _EqualKey = equal_to,
- class _A = allocator >
-class hash_set :
- public rw_hashset {
-};
-
-} // end HASH_NAMESPACE;
-#endif
-
-using HASH_NAMESPACE::hash_set;
-
-// Include vector because ext/hash_set includes stl_vector.h and leaves
-// out specializations like stl_bvector.h, causing link conflicts.
-#include
-
-#include "llvm/ADT/HashExtras.h"
-
-#endif
Removed: llvm/trunk/include/llvm/ADT/hash_set.h.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/hash_set.h.in?rev=66405&view=auto
==============================================================================
--- llvm/trunk/include/llvm/ADT/hash_set.h.in (original)
+++ llvm/trunk/include/llvm/ADT/hash_set.h.in (removed)
@@ -1,111 +0,0 @@
-//==-- llvm/ADT/hash_set.h - "Portable" wrapper around hash_set --*- C++ -*-==//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-// vim:ft=cpp
-//
-// This file provides a wrapper around the mysterious header file
-// that seems to move around between GCC releases into and out of namespaces at
-// will. #including this header will cause hash_set to be available in the
-// global namespace.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_ADT_HASH_SET_H
-#define LLVM_ADT_HASH_SET_H
-
-// Compiler Support Matrix
-//
-// Version Namespace Header File
-// 2.95.x :: hash_set
-// 3.0.4 std ext/hash_set
-// 3.1 __gnu_cxx ext/hash_set
-// HP aCC6 std stdex/rw/hashset.h
-// MS VC++ stdext hash_set
-
-#undef HAVE_GNU_EXT_HASH_SET
-#undef HAVE_STD_EXT_HASH_SET
-#undef HAVE_GLOBAL_HASH_SET
-#undef HAVE_RW_STDEX_HASH_SET_H
-
-// GCC versions 3.1 and later put hash_set in and in
-// the __gnu_cxx namespace.
-#if HAVE_GNU_EXT_HASH_SET
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE __gnu_cxx
-# endif
-
-// GCC 3.0.x puts hash_set in and in the std namespace.
-#elif HAVE_STD_EXT_HASH_SET
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE std
-# endif
-
-// Older compilers such as GCC before version 3.0 do not keep
-// extensions in the `ext' directory, and ignore the `std' namespace.
-#elif HAVE_GLOBAL_HASH_SET
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE std
-# endif
-
-// HP aCC doesn't include an SGI-like hash_set. For this platform (or
-// any others using Rogue Wave Software's Tools.h++ library), we wrap
-// around them in std::
-#elif HAVE_RW_STDEX_HASH_SET_H
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE std
-# endif
-
-// Support Microsoft VC++.
-#elif defined(_MSC_VER)
-# include
-# ifndef HASH_NAMESPACE
-# define HASH_NAMESPACE stdext
-# endif
-
-// Give a warning if we couldn't find it, instead of (or in addition to)
-// randomly doing something dumb.
-#else
-# warning "Autoconfiguration failed to find the hash_set header file."
-#endif
-
-// we wrap Rogue Wave Tools.h++ rw_hashset into something SGI-looking, here:
-#ifdef HAVE_RW_STDEX_HASH_SET_H
-namespace HASH_NAMESPACE {
-
-/*
-template struct hash {
- unsigned int operator()(const unsigned int& x) const {
- return x;
- }
-};
-*/
-
-template ,
- class _EqualKey = equal_to,
- class _A = allocator >
-class hash_set :
- public rw_hashset {
-};
-
-} // end HASH_NAMESPACE;
-#endif
-
-using HASH_NAMESPACE::hash_set;
-
-// Include vector because ext/hash_set includes stl_vector.h and leaves
-// out specializations like stl_bvector.h, causing link conflicts.
-#include
-
-#include "llvm/ADT/HashExtras.h"
-
-#endif // LLVM_ADT_HASH_SET_H
From nicholas at mxc.ca Mon Mar 9 01:16:46 2009
From: nicholas at mxc.ca (Nick Lewycky)
Date: Mon, 09 Mar 2009 06:16:46 -0000
Subject: [llvm-commits] [llvm] r66407 - in /llvm/trunk: configure
include/llvm/Config/config.h.in
Message-ID: <200903090616.n296GlDH010683@zion.cs.uiuc.edu>
Author: nicholas
Date: Mon Mar 9 01:16:46 2009
New Revision: 66407
URL: http://llvm.org/viewvc/llvm-project?rev=66407&view=rev
Log:
Regenerate.
Modified:
llvm/trunk/configure
llvm/trunk/include/llvm/Config/config.h.in
Modified: llvm/trunk/configure
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=66407&r1=66406&r2=66407&view=diff
==============================================================================
--- llvm/trunk/configure (original)
+++ llvm/trunk/configure Mon Mar 9 01:16:46 2009
@@ -32039,582 +32039,6 @@
fi
-{ echo "$as_me:$LINENO: checking whether the compiler has defining template class std::hash_map" >&5
-echo $ECHO_N "checking whether the compiler has defining template class std::hash_map... $ECHO_C" >&6; }
-if test "${ac_cv_cxx_have_std_ext_hash_map+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include
-#ifdef HAVE_NAMESPACES
-using namespace std;
-#endif
-int
-main ()
-{
-hash_map t;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_cxx_have_std_ext_hash_map=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_cxx_have_std_ext_hash_map=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_cxx_have_std_ext_hash_map" >&5
-echo "${ECHO_T}$ac_cv_cxx_have_std_ext_hash_map" >&6; }
- if test "$ac_cv_cxx_have_std_ext_hash_map" = yes
- then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STD_EXT_HASH_MAP 1
-_ACEOF
-
- else
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STD_EXT_HASH_MAP 0
-_ACEOF
-
- fi
-
- { echo "$as_me:$LINENO: checking whether the compiler has defining template class __gnu_cxx::hash_map" >&5
-echo $ECHO_N "checking whether the compiler has defining template class __gnu_cxx::hash_map... $ECHO_C" >&6; }
-if test "${ac_cv_cxx_have_gnu_ext_hash_map+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include
-#ifdef HAVE_NAMESPACES
-using namespace __gnu_cxx;
-#endif
-int
-main ()
-{
-hash_map t;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_cxx_have_gnu_ext_hash_map=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_cxx_have_gnu_ext_hash_map=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_cxx_have_gnu_ext_hash_map" >&5
-echo "${ECHO_T}$ac_cv_cxx_have_gnu_ext_hash_map" >&6; }
- if test "$ac_cv_cxx_have_gnu_ext_hash_map" = yes
- then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GNU_EXT_HASH_MAP 1
-_ACEOF
-
- else
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GNU_EXT_HASH_MAP 0
-_ACEOF
-
- fi
-
- { echo "$as_me:$LINENO: checking whether the compiler has defining template class ::hash_map" >&5
-echo $ECHO_N "checking whether the compiler has defining template class ::hash_map... $ECHO_C" >&6; }
-if test "${ac_cv_cxx_have_global_hash_map+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include
-int
-main ()
-{
-hash_map t;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_cxx_have_global_hash_map=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_cxx_have_global_hash_map=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_cxx_have_global_hash_map" >&5
-echo "${ECHO_T}$ac_cv_cxx_have_global_hash_map" >&6; }
- if test "$ac_cv_cxx_have_global_hash_map" = yes
- then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GLOBAL_HASH_MAP 1
-_ACEOF
-
- else
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GLOBAL_HASH_MAP 0
-_ACEOF
-
- fi
-
-{ echo "$as_me:$LINENO: checking whether the compiler has defining template class std::hash_set" >&5
-echo $ECHO_N "checking whether the compiler has defining template class std::hash_set... $ECHO_C" >&6; }
-if test "${ac_cv_cxx_have_std_ext_hash_set+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include
-#ifdef HAVE_NAMESPACES
-using namespace std;
-#endif
-int
-main ()
-{
-hash_set t;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_cxx_have_std_ext_hash_set=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_cxx_have_std_ext_hash_set=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_cxx_have_std_ext_hash_set" >&5
-echo "${ECHO_T}$ac_cv_cxx_have_std_ext_hash_set" >&6; }
- if test "$ac_cv_cxx_have_std_ext_hash_set" = yes
- then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STD_EXT_HASH_SET 1
-_ACEOF
-
- else
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STD_EXT_HASH_SET 0
-_ACEOF
-
- fi
-
- { echo "$as_me:$LINENO: checking whether the compiler has defining template class __gnu_cxx::hash_set" >&5
-echo $ECHO_N "checking whether the compiler has defining template class __gnu_cxx::hash_set... $ECHO_C" >&6; }
-if test "${ac_cv_cxx_have_gnu_ext_hash_set+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include
-#ifdef HAVE_NAMESPACES
-using namespace __gnu_cxx;
-#endif
-int
-main ()
-{
-hash_set t;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_cxx_have_gnu_ext_hash_set=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_cxx_have_gnu_ext_hash_set=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_cxx_have_gnu_ext_hash_set" >&5
-echo "${ECHO_T}$ac_cv_cxx_have_gnu_ext_hash_set" >&6; }
- if test "$ac_cv_cxx_have_gnu_ext_hash_set" = yes
- then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GNU_EXT_HASH_SET 1
-_ACEOF
-
- else
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GNU_EXT_HASH_SET 0
-_ACEOF
-
- fi
-
- { echo "$as_me:$LINENO: checking whether the compiler has defining template class ::hash_set" >&5
-echo $ECHO_N "checking whether the compiler has defining template class ::hash_set... $ECHO_C" >&6; }
-if test "${ac_cv_cxx_have_global_hash_set+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include
-int
-main ()
-{
-hash_set t; return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_cxx_have_global_hash_set=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_cxx_have_global_hash_set=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_cxx_have_global_hash_set" >&5
-echo "${ECHO_T}$ac_cv_cxx_have_global_hash_set" >&6; }
- if test "$ac_cv_cxx_have_global_hash_set" = yes
- then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GLOBAL_HASH_SET 1
-_ACEOF
-
- else
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GLOBAL_HASH_SET 0
-_ACEOF
-
- fi
-
{ echo "$as_me:$LINENO: checking whether the compiler has the standard iterator" >&5
echo $ECHO_N "checking whether the compiler has the standard iterator... $ECHO_C" >&6; }
if test "${ac_cv_cxx_have_std_iterator+set}" = set; then
@@ -34532,10 +33956,6 @@
ac_config_headers="$ac_config_headers include/llvm/Support/DataTypes.h"
-ac_config_headers="$ac_config_headers include/llvm/ADT/hash_map.h"
-
-ac_config_headers="$ac_config_headers include/llvm/ADT/hash_set.h"
-
ac_config_headers="$ac_config_headers include/llvm/ADT/iterator.h"
@@ -35158,8 +34578,6 @@
case $ac_config_target in
"include/llvm/Config/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/Config/config.h" ;;
"include/llvm/Support/DataTypes.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/Support/DataTypes.h" ;;
- "include/llvm/ADT/hash_map.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/ADT/hash_map.h" ;;
- "include/llvm/ADT/hash_set.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/ADT/hash_set.h" ;;
"include/llvm/ADT/iterator.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/ADT/iterator.h" ;;
"Makefile.config") CONFIG_FILES="$CONFIG_FILES Makefile.config" ;;
"llvm.spec") CONFIG_FILES="$CONFIG_FILES llvm.spec" ;;
Modified: llvm/trunk/include/llvm/Config/config.h.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.in?rev=66407&r1=66406&r2=66407&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Config/config.h.in (original)
+++ llvm/trunk/include/llvm/Config/config.h.in Mon Mar 9 01:16:46 2009
@@ -142,18 +142,6 @@
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
-/* Does not have */
-#undef HAVE_GLOBAL_HASH_MAP
-
-/* Does not have hash_set in global namespace */
-#undef HAVE_GLOBAL_HASH_SET
-
-/* Does not have ext/hash_map */
-#undef HAVE_GNU_EXT_HASH_MAP
-
-/* Does not have hash_set in gnu namespace */
-#undef HAVE_GNU_EXT_HASH_SET
-
/* Define if the Graphviz program is available */
#undef HAVE_GRAPHVIZ
@@ -348,12 +336,6 @@
/* Define to 1 if you have the header file. */
#undef HAVE_STDLIB_H
-/* Does not have ext/hash_map> */
-#undef HAVE_STD_EXT_HASH_MAP
-
-/* Does not have hash_set in std namespace */
-#undef HAVE_STD_EXT_HASH_SET
-
/* Set to 1 if the std::isinf function is found in */
#undef HAVE_STD_ISINF_IN_CMATH
From clattner at apple.com Mon Mar 9 01:35:20 2009
From: clattner at apple.com (Chris Lattner)
Date: Sun, 8 Mar 2009 23:35:20 -0700
Subject: [llvm-commits] [llvm] r66366 - in /llvm/trunk:
lib/Transforms/Scalar/ScalarReplAggregates.cpp
test/Transforms/ScalarRepl/2008-06-22-LargeArray.ll
test/Transforms/ScalarRepl/vector_memcpy.ll
In-Reply-To:
References: <200903080404.n2844MKo007667@zion.cs.uiuc.edu>
<65912812-E63C-45C1-8708-437E819F42C9@mac.com>
<200903082048.37146.baldrick@free.fr>
<17EA8EB0-EB98-400A-9DFA-D814CC7DBEC8@apple.com>
Message-ID: <59F44F2D-7FFD-433B-AD85-2EDD08FF8B0B@apple.com>
On Mar 8, 2009, at 1:09 PM, Eli Friedman wrote:
> On Sun, Mar 8, 2009 at 11:54 AM, Chris Lattner
> wrote:
>> Do you have an example that would illustrate this problem?
>
> Compile the following with "clang -S -O2 -mattr=-sse".
>
> #include
> #include
> __attribute__((noinline)) void a(float* x, float* y) {
> float z;
> memcpy(&z, y, 4);
> memcpy(x, &z, 4);
> }
>
> int main() {
> unsigned x = 2139095041, y;
> a((float*)&y,(float*)&x);
> if (y != 2139095041) {
> printf("y corrupted!\n");
> return 1;
> }
> return 0;
> }
Ok, this is pretty insane, and I'm sure that there are cases where
SROA would get this "wrong" before too. I think that the only
reasonable course of action is to make the IR well defined w.r.t. load
and store and treat this as an x86 backend bug. Note that this has
already been recognized to be a real performance issue (PR3560) as well.
-Chris
From isanbard at gmail.com Mon Mar 9 01:58:31 2009
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 09 Mar 2009 06:58:31 -0000
Subject: [llvm-commits] [llvm-gcc-4.2] r66411 -
/llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-convert.cpp
Message-ID: <200903090658.n296wVB0012511@zion.cs.uiuc.edu>
Author: void
Date: Mon Mar 9 01:58:31 2009
New Revision: 66411
URL: http://llvm.org/viewvc/llvm-project?rev=66411&view=rev
Log:
Merge 66402 into Dib:
Fix PR3744 - Crash on index into zero element struct.
Modified:
llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-convert.cpp?rev=66411&r1=66410&r2=66411&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/llvm-convert.cpp Mon Mar 9 01:58:31 2009
@@ -6163,9 +6163,15 @@
// If this is a normal field at a fixed offset from the start, handle it.
if (TREE_CODE(field_offset) == INTEGER_CST) {
unsigned int MemberIndex = GetFieldIndex(FieldDecl);
- assert(MemberIndex < StructTy->getNumContainedTypes() &&
- "Field Idx out of range!");
- FieldPtr = Builder.CreateStructGEP(StructAddrLV.Ptr, MemberIndex);
+
+ // If the LLVM struct has zero field, don't try to index into it, just use
+ // the current pointer.
+ FieldPtr = StructAddrLV.Ptr;
+ if (StructTy->getNumContainedTypes() != 0) {
+ assert(MemberIndex < StructTy->getNumContainedTypes() &&
+ "Field Idx out of range!");
+ FieldPtr = Builder.CreateStructGEP(FieldPtr, MemberIndex);
+ }
// Now that we did an offset from the start of the struct, subtract off
// the offset from BitStart.
From isanbard at gmail.com Mon Mar 9 02:00:24 2009
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 09 Mar 2009 07:00:24 -0000
Subject: [llvm-commits] [llvm] r66412 -
/llvm/branches/Apple/Dib/test/FrontendC/2009-03-08-ZeroEltStructCrash.c
Message-ID: <200903090700.n2970OVV012603@zion.cs.uiuc.edu>
Author: void
Date: Mon Mar 9 02:00:23 2009
New Revision: 66412
URL: http://llvm.org/viewvc/llvm-project?rev=66412&view=rev
Log:
Merge r66401 into Dib:
testcase for PR3744
Added:
llvm/branches/Apple/Dib/test/FrontendC/2009-03-08-ZeroEltStructCrash.c
- copied unchanged from r66401, llvm/trunk/test/FrontendC/2009-03-08-ZeroEltStructCrash.c
From ggreif at gmail.com Mon Mar 9 02:09:01 2009
From: ggreif at gmail.com (Gabor Greif)
Date: Mon, 09 Mar 2009 07:09:01 -0000
Subject: [llvm-commits] [llvm] r66415 - in /llvm/trunk/include/llvm:
ADT/ilist_node.h BasicBlock.h CodeGen/MachineBasicBlock.h
CodeGen/MachineFunction.h CodeGen/SelectionDAG.h Function.h
Message-ID: <200903090709.n29791oO013085@zion.cs.uiuc.edu>
Author: ggreif
Date: Mon Mar 9 02:09:01 2009
New Revision: 66415
URL: http://llvm.org/viewvc/llvm-project?rev=66415&view=rev
Log:
in builds without asserts we do not need to allocate the Next pointer in "ghostly" sentinels
Modified:
llvm/trunk/include/llvm/ADT/ilist_node.h
llvm/trunk/include/llvm/BasicBlock.h
llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h
llvm/trunk/include/llvm/CodeGen/MachineFunction.h
llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
llvm/trunk/include/llvm/Function.h
Modified: llvm/trunk/include/llvm/ADT/ilist_node.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ilist_node.h?rev=66415&r1=66414&r2=66415&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/ilist_node.h (original)
+++ llvm/trunk/include/llvm/ADT/ilist_node.h Mon Mar 9 02:09:01 2009
@@ -18,30 +18,49 @@
namespace llvm {
template
-struct ilist_nextprev_traits;
+struct ilist_traits;
+/// ilist_half_node - Base class that provides prev services for sentinels.
+///
template
-struct ilist_traits;
+class ilist_half_node {
+ friend struct ilist_traits;
+ NodeTy *Prev;
+protected:
+ NodeTy *getPrev() { return Prev; }
+ const NodeTy *getPrev() const { return Prev; }
+ void setPrev(NodeTy *P) { Prev = P; }
+ ilist_half_node() : Prev(0) {}
+};
+
+template
+struct ilist_nextprev_traits;
/// ilist_node - Base class that provides next/prev services for nodes
/// that use ilist_nextprev_traits or ilist_default_traits.
///
template
-class ilist_node {
-private:
+class ilist_node : ilist_half_node {
friend struct ilist_nextprev_traits;
friend struct ilist_traits;
- NodeTy *Prev, *Next;
- NodeTy *getPrev() { return Prev; }
+ NodeTy *Next;
NodeTy *getNext() { return Next; }
- const NodeTy *getPrev() const { return Prev; }
const NodeTy *getNext() const { return Next; }
- void setPrev(NodeTy *N) { Prev = N; }
void setNext(NodeTy *N) { Next = N; }
protected:
- ilist_node() : Prev(0), Next(0) {}
+ ilist_node() : Next(0) {}
};
+/// When assertions are off, the Next field of sentinels
+/// will not be accessed. So it is not necessary to allocate
+/// space for it. The following macro selects the most
+/// efficient trais class.
+#ifndef NDEBUG
+# define ILIST_NODE ilist_node
+#else
+# define ILIST_NODE ilist_half_node
+#endif
+
} // End llvm namespace
#endif
Modified: llvm/trunk/include/llvm/BasicBlock.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BasicBlock.h?rev=66415&r1=66414&r2=66415&view=diff
==============================================================================
--- llvm/trunk/include/llvm/BasicBlock.h (original)
+++ llvm/trunk/include/llvm/BasicBlock.h Mon Mar 9 02:09:01 2009
@@ -46,7 +46,7 @@
Instruction *ensureHead(Instruction*) const { return createSentinel(); }
static void noteHead(Instruction*, Instruction*) {}
private:
- mutable ilist_node Sentinel;
+ mutable ILIST_NODE Sentinel;
};
/// This represents a single basic block in LLVM. A basic block is simply a
Modified: llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h?rev=66415&r1=66414&r2=66415&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h Mon Mar 9 02:09:01 2009
@@ -26,7 +26,7 @@
template <>
struct ilist_traits : public ilist_default_traits {
private:
- mutable ilist_node Sentinel;
+ mutable ILIST_NODE Sentinel;
// this is only set by the MachineBasicBlock owning the LiveList
friend class MachineBasicBlock;
Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=66415&r1=66414&r2=66415&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineFunction.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h Mon Mar 9 02:09:01 2009
@@ -37,7 +37,7 @@
template <>
struct ilist_traits
: public ilist_default_traits {
- mutable ilist_node Sentinel;
+ mutable ILIST_NODE Sentinel;
public:
MachineBasicBlock *createSentinel() const {
return static_cast(&Sentinel);
Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=66415&r1=66414&r2=66415&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Mon Mar 9 02:09:01 2009
@@ -39,7 +39,7 @@
template<> struct ilist_traits : public ilist_default_traits {
private:
- mutable ilist_node Sentinel;
+ mutable ILIST_NODE Sentinel;
public:
SDNode *createSentinel() const {
return static_cast(&Sentinel);
Modified: llvm/trunk/include/llvm/Function.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Function.h?rev=66415&r1=66414&r2=66415&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Function.h (original)
+++ llvm/trunk/include/llvm/Function.h Mon Mar 9 02:09:01 2009
@@ -45,7 +45,7 @@
static ValueSymbolTable *getSymTab(Function *ItemParent);
private:
- mutable ilist_node Sentinel;
+ mutable ILIST_NODE Sentinel;
};
template<> struct ilist_traits
@@ -62,7 +62,7 @@
static ValueSymbolTable *getSymTab(Function *ItemParent);
private:
- mutable ilist_node Sentinel;
+ mutable ILIST_NODE Sentinel;
};
class Function : public GlobalValue, public Annotable,
From sabre at nondot.org Mon Mar 9 03:18:49 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 09 Mar 2009 08:18:49 -0000
Subject: [llvm-commits] [llvm] r66417 -
/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Message-ID: <200903090818.n298InFI025351@zion.cs.uiuc.edu>
Author: lattner
Date: Mon Mar 9 03:18:48 2009
New Revision: 66417
URL: http://llvm.org/viewvc/llvm-project?rev=66417&view=rev
Log:
just remove the use_empty() check entirely, the only reason it
existed was for llvm-gcc 3.4 (which used the __main hack) which
is really really long dead.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=66417&r1=66416&r2=66417&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Mon Mar 9 03:18:48 2009
@@ -419,23 +419,17 @@
const TargetData *TD = TM.getTargetData();
unsigned Align = Log2_32(TD->getPointerPrefAlignment());
if (GV->getName() == "llvm.global_ctors") {
- GV->removeDeadConstantUsers();
- if (GV->use_empty()) {
- SwitchToDataSection(TAI->getStaticCtorsSection());
- EmitAlignment(Align, 0);
- EmitXXStructorList(GV->getInitializer());
- return true;
- }
+ SwitchToDataSection(TAI->getStaticCtorsSection());
+ EmitAlignment(Align, 0);
+ EmitXXStructorList(GV->getInitializer());
+ return true;
}
if (GV->getName() == "llvm.global_dtors") {
- GV->removeDeadConstantUsers();
- if (GV->use_empty()) {
- SwitchToDataSection(TAI->getStaticDtorsSection());
- EmitAlignment(Align, 0);
- EmitXXStructorList(GV->getInitializer());
- return true;
- }
+ SwitchToDataSection(TAI->getStaticDtorsSection());
+ EmitAlignment(Align, 0);
+ EmitXXStructorList(GV->getInitializer());
+ return true;
}
return false;
From baldrick at free.fr Mon Mar 9 06:57:16 2009
From: baldrick at free.fr (Duncan Sands)
Date: Mon, 09 Mar 2009 11:57:16 -0000
Subject: [llvm-commits] [llvm] r66420 -
/llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp
Message-ID: <200903091157.n29BvIxU001439@zion.cs.uiuc.edu>
Author: baldrick
Date: Mon Mar 9 06:57:08 2009
New Revision: 66420
URL: http://llvm.org/viewvc/llvm-project?rev=66420&view=rev
Log:
This debug info special case should no longer
be needed now that these intrinsics are marked
as not accessing memory.
Modified:
llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp
Modified: llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp?rev=66420&r1=66419&r2=66420&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp Mon Mar 9 06:57:08 2009
@@ -147,10 +147,6 @@
continue;
}
- // Ignore dbg info intrinsics.
- if (isa(I))
- continue;
-
// Any remaining instructions need to be taken seriously! Check if they
// read or write memory.
if (I->mayWriteToMemory())
From bob.wilson at apple.com Mon Mar 9 12:07:16 2009
From: bob.wilson at apple.com (Bob Wilson)
Date: Mon, 09 Mar 2009 17:07:16 -0000
Subject: [llvm-commits] [llvm] r66424 -
/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
Message-ID: <200903091707.n29H7GpI012008@zion.cs.uiuc.edu>
Author: bwilson
Date: Mon Mar 9 12:07:15 2009
New Revision: 66424
URL: http://llvm.org/viewvc/llvm-project?rev=66424&view=rev
Log:
Add a constructor for BuildVectorSDNode and revert the temporary workaround
from 66280. I was unable to verify this with gcc-3.4.6, but with gcc-3.3 it
avoids the "base class with only non-default constructor in class without
a constructor" warning. Apparently that warning was promoted to an error
in gcc-3.4.
Modified:
llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=66424&r1=66423&r2=66424&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Mon Mar 9 12:07:15 2009
@@ -1114,10 +1114,6 @@
friend struct ilist_traits;
public:
-
- /// Default SDNode constructor.
- SDNode() {}
-
//===--------------------------------------------------------------------===//
// Accessors
//
@@ -1936,6 +1932,8 @@
/// BuildVectorSDNode - A "pseudo-class" with methods for operating on
/// BUILD_VECTORs.
class BuildVectorSDNode : public SDNode {
+ // These are constructed as SDNodes and then cast to BuildVectorSDNodes.
+ explicit BuildVectorSDNode(); // Do not implement
public:
/// isConstantSplat - Check if this is a constant splat, and if so, find the
/// smallest element size that splats the vector. If MinSplatBits is
From bob.wilson at apple.com Mon Mar 9 12:08:58 2009
From: bob.wilson at apple.com (Bob Wilson)
Date: Mon, 9 Mar 2009 10:08:58 -0700
Subject: [llvm-commits] [llvm] r65747 - in /llvm/trunk:
include/llvm/CodeGen/SelectionDAGNodes.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
In-Reply-To: <32A9D1C1-1310-4EB4-9BF3-E45C898B4FA2@apple.com>
References: <200903010113.n211DtAt028784@zion.cs.uiuc.edu>
<32A9D1C1-1310-4EB4-9BF3-E45C898B4FA2@apple.com>
Message-ID: <9EB159FF-DFF5-4873-B4CC-A7DD83C99F83@apple.com>
On Mar 6, 2009, at 2:23 PM, Tanya Lattner wrote:
> This is breaking the build when using gcc 3.4.6 because
> BuildVectorSDNode does not have a default constructor and neither
> does its parent SDNode. I added a default constructor to SDNode
> which fixes the build, but it is not the correct thing to do. I'm
> not familiar enough with this code to add the constructor to
> BuildVectorSDNode, can you do this and then revert 66280.
This should be fixed now. It was an easy change but quite a challenge
to verify!
From lattner at apple.com Mon Mar 9 12:48:25 2009
From: lattner at apple.com (Tanya Lattner)
Date: Mon, 9 Mar 2009 10:48:25 -0700
Subject: [llvm-commits] [llvm] r65747 - in /llvm/trunk:
include/llvm/CodeGen/SelectionDAGNodes.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
In-Reply-To: <9EB159FF-DFF5-4873-B4CC-A7DD83C99F83@apple.com>
References: <200903010113.n211DtAt028784@zion.cs.uiuc.edu>
<32A9D1C1-1310-4EB4-9BF3-E45C898B4FA2@apple.com>
<9EB159FF-DFF5-4873-B4CC-A7DD83C99F83@apple.com>
Message-ID: <3AE25F99-2226-4CA1-9753-0EACC3EB4D56@apple.com>
Thank you!
-Tanya
On Mar 9, 2009, at 10:08 AM, Bob Wilson wrote:
>
> On Mar 6, 2009, at 2:23 PM, Tanya Lattner wrote:
>> This is breaking the build when using gcc 3.4.6 because
>> BuildVectorSDNode does not have a default constructor and neither
>> does its parent SDNode. I added a default constructor to SDNode
>> which fixes the build, but it is not the correct thing to do. I'm
>> not familiar enough with this code to add the constructor to
>> BuildVectorSDNode, can you do this and then revert 66280.
>
> This should be fixed now. It was an easy change but quite a challenge
> to verify!
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20090309/982a8158/attachment.html
From isanbard at gmail.com Mon Mar 9 13:01:33 2009
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 09 Mar 2009 18:01:33 -0000
Subject: [llvm-commits] [llvm] r66426 - in /llvm/trunk/include/llvm:
ADT/ilist_node.h BasicBlock.h CodeGen/MachineBasicBlock.h
CodeGen/MachineFunction.h CodeGen/SelectionDAG.h Function.h
Message-ID: <200903091801.n29I1YKl013885@zion.cs.uiuc.edu>
Author: void
Date: Mon Mar 9 13:01:33 2009
New Revision: 66426
URL: http://llvm.org/viewvc/llvm-project?rev=66426&view=rev
Log:
Revert r66415. It's causing failures during bootstrap builds:
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c: In function '__muldi3':
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c:567: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c: In function '__lshrdi3':
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c:421: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
make[5]: *** [libgcc/./_lshrdi3.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: *** [libgcc/./_muldi3.o] Error 1
make[5]: *** [libgcc/./_negdi2.o] Error 1
--- Reverse-merging (from foreign repository) r66415 into '.':
U include/llvm/BasicBlock.h
U include/llvm/ADT/ilist_node.h
U include/llvm/CodeGen/SelectionDAG.h
U include/llvm/CodeGen/MachineFunction.h
U include/llvm/CodeGen/MachineBasicBlock.h
U include/llvm/Function.h
Modified:
llvm/trunk/include/llvm/ADT/ilist_node.h
llvm/trunk/include/llvm/BasicBlock.h
llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h
llvm/trunk/include/llvm/CodeGen/MachineFunction.h
llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
llvm/trunk/include/llvm/Function.h
Modified: llvm/trunk/include/llvm/ADT/ilist_node.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ilist_node.h?rev=66426&r1=66425&r2=66426&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/ilist_node.h (original)
+++ llvm/trunk/include/llvm/ADT/ilist_node.h Mon Mar 9 13:01:33 2009
@@ -18,49 +18,30 @@
namespace llvm {
template
-struct ilist_traits;
-
-/// ilist_half_node - Base class that provides prev services for sentinels.
-///
-template
-class ilist_half_node {
- friend struct ilist_traits;
- NodeTy *Prev;
-protected:
- NodeTy *getPrev() { return Prev; }
- const NodeTy *getPrev() const { return Prev; }
- void setPrev(NodeTy *P) { Prev = P; }
- ilist_half_node() : Prev(0) {}
-};
+struct ilist_nextprev_traits;
template
-struct ilist_nextprev_traits;
+struct ilist_traits;
/// ilist_node - Base class that provides next/prev services for nodes
/// that use ilist_nextprev_traits or ilist_default_traits.
///
template
-class ilist_node : ilist_half_node {
+class ilist_node {
+private:
friend struct ilist_nextprev_traits;
friend struct ilist_traits;
- NodeTy *Next;
+ NodeTy *Prev, *Next;
+ NodeTy *getPrev() { return Prev; }
NodeTy *getNext() { return Next; }
+ const NodeTy *getPrev() const { return Prev; }
const NodeTy *getNext() const { return Next; }
+ void setPrev(NodeTy *N) { Prev = N; }
void setNext(NodeTy *N) { Next = N; }
protected:
- ilist_node() : Next(0) {}
+ ilist_node() : Prev(0), Next(0) {}
};
-/// When assertions are off, the Next field of sentinels
-/// will not be accessed. So it is not necessary to allocate
-/// space for it. The following macro selects the most
-/// efficient trais class.
-#ifndef NDEBUG
-# define ILIST_NODE ilist_node
-#else
-# define ILIST_NODE ilist_half_node
-#endif
-
} // End llvm namespace
#endif
Modified: llvm/trunk/include/llvm/BasicBlock.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BasicBlock.h?rev=66426&r1=66425&r2=66426&view=diff
==============================================================================
--- llvm/trunk/include/llvm/BasicBlock.h (original)
+++ llvm/trunk/include/llvm/BasicBlock.h Mon Mar 9 13:01:33 2009
@@ -46,7 +46,7 @@
Instruction *ensureHead(Instruction*) const { return createSentinel(); }
static void noteHead(Instruction*, Instruction*) {}
private:
- mutable ILIST_NODE Sentinel;
+ mutable ilist_node Sentinel;
};
/// This represents a single basic block in LLVM. A basic block is simply a
Modified: llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h?rev=66426&r1=66425&r2=66426&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h Mon Mar 9 13:01:33 2009
@@ -26,7 +26,7 @@
template <>
struct ilist_traits : public ilist_default_traits {
private:
- mutable ILIST_NODE Sentinel;
+ mutable ilist_node Sentinel;
// this is only set by the MachineBasicBlock owning the LiveList
friend class MachineBasicBlock;
Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=66426&r1=66425&r2=66426&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineFunction.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h Mon Mar 9 13:01:33 2009
@@ -37,7 +37,7 @@
template <>
struct ilist_traits
: public ilist_default_traits {
- mutable ILIST_NODE Sentinel;
+ mutable ilist_node Sentinel;
public:
MachineBasicBlock *createSentinel() const {
return static_cast(&Sentinel);
Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=66426&r1=66425&r2=66426&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Mon Mar 9 13:01:33 2009
@@ -39,7 +39,7 @@
template<> struct ilist_traits : public ilist_default_traits {
private:
- mutable ILIST_NODE Sentinel;
+ mutable ilist_node Sentinel;
public:
SDNode *createSentinel() const {
return static_cast(&Sentinel);
Modified: llvm/trunk/include/llvm/Function.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Function.h?rev=66426&r1=66425&r2=66426&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Function.h (original)
+++ llvm/trunk/include/llvm/Function.h Mon Mar 9 13:01:33 2009
@@ -45,7 +45,7 @@
static ValueSymbolTable *getSymTab(Function *ItemParent);
private:
- mutable ILIST_NODE Sentinel;
+ mutable ilist_node Sentinel;
};
template<> struct ilist_traits
@@ -62,7 +62,7 @@
static ValueSymbolTable *getSymTab(Function *ItemParent);
private:
- mutable ILIST_NODE Sentinel;
+ mutable ilist_node Sentinel;
};
class Function : public GlobalValue, public Annotable,
From isanbard at gmail.com Mon Mar 9 13:03:04 2009
From: isanbard at gmail.com (Bill Wendling)
Date: Mon, 9 Mar 2009 10:03:04 -0800
Subject: [llvm-commits] [llvm] r66415 - in /llvm/trunk/include/llvm:
ADT/ilist_node.h BasicBlock.h CodeGen/MachineBasicBlock.h
CodeGen/MachineFunction.h CodeGen/SelectionDAG.h Function.h
In-Reply-To: <200903090709.n29791oO013085@zion.cs.uiuc.edu>
References: <200903090709.n29791oO013085@zion.cs.uiuc.edu>
Message-ID: <16e5fdf90903091103p62b0f08ch7316b45e8073e2f2@mail.gmail.com>
Hi Gabor,
This is causing internal compiler errors in the llvm-gcc bootstrap
build. I reverted this. Could you take a look please?
-bw
On Sun, Mar 8, 2009 at 11:09 PM, Gabor Greif wrote:
> Author: ggreif
> Date: Mon Mar ?9 02:09:01 2009
> New Revision: 66415
>
> URL: http://llvm.org/viewvc/llvm-project?rev=66415&view=rev
> Log:
> in builds without asserts we do not need to allocate the Next pointer in "ghostly" sentinels
>
> Modified:
> ? ?llvm/trunk/include/llvm/ADT/ilist_node.h
> ? ?llvm/trunk/include/llvm/BasicBlock.h
> ? ?llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h
> ? ?llvm/trunk/include/llvm/CodeGen/MachineFunction.h
> ? ?llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
> ? ?llvm/trunk/include/llvm/Function.h
>
> Modified: llvm/trunk/include/llvm/ADT/ilist_node.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ilist_node.h?rev=66415&r1=66414&r2=66415&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/ADT/ilist_node.h (original)
> +++ llvm/trunk/include/llvm/ADT/ilist_node.h Mon Mar ?9 02:09:01 2009
> @@ -18,30 +18,49 @@
> ?namespace llvm {
>
> ?template
> -struct ilist_nextprev_traits;
> +struct ilist_traits;
>
> +/// ilist_half_node - Base class that provides prev services for sentinels.
> +///
> ?template
> -struct ilist_traits;
> +class ilist_half_node {
> + ?friend struct ilist_traits;
> + ?NodeTy *Prev;
> +protected:
> + ?NodeTy *getPrev() { return Prev; }
> + ?const NodeTy *getPrev() const { return Prev; }
> + ?void setPrev(NodeTy *P) { Prev = P; }
> + ?ilist_half_node() : Prev(0) {}
> +};
> +
> +template
> +struct ilist_nextprev_traits;
>
> ?/// ilist_node - Base class that provides next/prev services for nodes
> ?/// that use ilist_nextprev_traits or ilist_default_traits.
> ?///
> ?template
> -class ilist_node {
> -private:
> +class ilist_node : ilist_half_node {
> ? friend struct ilist_nextprev_traits;
> ? friend struct ilist_traits;
> - ?NodeTy *Prev, *Next;
> - ?NodeTy *getPrev() { return Prev; }
> + ?NodeTy *Next;
> ? NodeTy *getNext() { return Next; }
> - ?const NodeTy *getPrev() const { return Prev; }
> ? const NodeTy *getNext() const { return Next; }
> - ?void setPrev(NodeTy *N) { Prev = N; }
> ? void setNext(NodeTy *N) { Next = N; }
> ?protected:
> - ?ilist_node() : Prev(0), Next(0) {}
> + ?ilist_node() : Next(0) {}
> ?};
>
> +/// When assertions are off, the Next field of sentinels
> +/// will not be accessed. So it is not necessary to allocate
> +/// space for it. The following macro selects the most
> +/// efficient trais class.
> +#ifndef NDEBUG
> +# ? define ILIST_NODE ilist_node
> +#else
> +# ? define ILIST_NODE ilist_half_node
> +#endif
> +
> ?} // End llvm namespace
>
> ?#endif
>
> Modified: llvm/trunk/include/llvm/BasicBlock.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BasicBlock.h?rev=66415&r1=66414&r2=66415&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/BasicBlock.h (original)
> +++ llvm/trunk/include/llvm/BasicBlock.h Mon Mar ?9 02:09:01 2009
> @@ -46,7 +46,7 @@
> ? Instruction *ensureHead(Instruction*) const { return createSentinel(); }
> ? static void noteHead(Instruction*, Instruction*) {}
> ?private:
> - ?mutable ilist_node Sentinel;
> + ?mutable ILIST_NODE Sentinel;
> ?};
>
> ?/// This represents a single basic block in LLVM. A basic block is simply a
>
> Modified: llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h?rev=66415&r1=66414&r2=66415&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h (original)
> +++ llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h Mon Mar ?9 02:09:01 2009
> @@ -26,7 +26,7 @@
> ?template <>
> ?struct ilist_traits : public ilist_default_traits {
> ?private:
> - ?mutable ilist_node Sentinel;
> + ?mutable ILIST_NODE Sentinel;
>
> ? // this is only set by the MachineBasicBlock owning the LiveList
> ? friend class MachineBasicBlock;
>
> Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=66415&r1=66414&r2=66415&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/CodeGen/MachineFunction.h (original)
> +++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h Mon Mar ?9 02:09:01 2009
> @@ -37,7 +37,7 @@
> ?template <>
> ?struct ilist_traits
> ? ? : public ilist_default_traits {
> - ?mutable ilist_node Sentinel;
> + ?mutable ILIST_NODE Sentinel;
> ?public:
> ? MachineBasicBlock *createSentinel() const {
> ? ? return static_cast(&Sentinel);
>
> Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=66415&r1=66414&r2=66415&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original)
> +++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Mon Mar ?9 02:09:01 2009
> @@ -39,7 +39,7 @@
>
> ?template<> struct ilist_traits : public ilist_default_traits