[llvm-commits] [llvm-gcc-4.2] r41773 - in /llvm-gcc-4.2/trunk/gcc: llvm-backend.cpp llvm-internal.h
Devang Patel
dpatel at apple.com
Fri Sep 7 14:00:21 PDT 2007
Author: dpatel
Date: Fri Sep 7 16:00:20 2007
New Revision: 41773
URL: http://llvm.org/viewvc/llvm-project?rev=41773&view=rev
Log:
Use SmallSetVector insetad of SmallPtrSet to ensure determinstic order.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
llvm-gcc-4.2/trunk/gcc/llvm-internal.h
Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=41773&r1=41772&r2=41773&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Fri Sep 7 16:00:20 2007
@@ -85,7 +85,7 @@
static cl::opt<bool> DisableLLVMOptimizations("disable-llvm-optzns");
std::vector<std::pair<Function*, int> > StaticCtors, StaticDtors;
-SmallPtrSet<Constant*, 32> AttributeUsedGlobals;
+SmallSetVector<Constant*, 32> AttributeUsedGlobals;
std::vector<Constant*> AttributeNoinlineFunctions;
std::vector<Constant*> AttributeAnnotateGlobals;
@@ -483,7 +483,7 @@
if (!AttributeUsedGlobals.empty()) {
std::vector<Constant *> AUGs;
const Type *SBP= PointerType::get(Type::Int8Ty);
- for (SmallPtrSet<Constant *,32>::iterator AI = AttributeUsedGlobals.begin(),
+ for (SmallSetVector<Constant *,32>::iterator AI = AttributeUsedGlobals.begin(),
AE = AttributeUsedGlobals.end(); AI != AE; ++AI) {
Constant *C = *AI;
AUGs.push_back(ConstantExpr::getBitCast(C, SBP));
@@ -815,7 +815,7 @@
GV->getName(), TheModule);
GV->replaceAllUsesWith(ConstantExpr::getBitCast(NGV, GV->getType()));
if (AttributeUsedGlobals.count(GV)) {
- AttributeUsedGlobals.erase(GV);
+ AttributeUsedGlobals.remove(GV);
AttributeUsedGlobals.insert(NGV);
}
delete GV;
Modified: llvm-gcc-4.2/trunk/gcc/llvm-internal.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-internal.h?rev=41773&r1=41772&r2=41773&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-internal.h (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-internal.h Fri Sep 7 16:00:20 2007
@@ -35,7 +35,7 @@
#include "llvm/Intrinsics.h"
#include "llvm/ADT/IndexedMap.h"
#include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/ADT/SetVector.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/LLVMBuilder.h"
#include "llvm/Support/Streams.h"
@@ -92,7 +92,7 @@
extern std::vector<std::pair<Function*, int> > StaticCtors, StaticDtors;
/// AttributeUsedGlobals - The list of globals that are marked attribute(used).
-extern SmallPtrSet<Constant *,32> AttributeUsedGlobals;
+extern SmallSetVector<Constant *,32> AttributeUsedGlobals;
/// AttributeNoinlineFunctions - The list of functions that are
/// marked attribute(noinline)
More information about the llvm-commits
mailing list