summaryrefslogtreecommitdiff
path: root/devel/llvm
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2007-09-28 15:24:14 +0000
committerBrooks Davis <brooks@FreeBSD.org>2007-09-28 15:24:14 +0000
commitb76df6910080623265cea946f6508d459eb7b6d5 (patch)
treed9e05d96ce29c674c7e7092114652c0f590f9de6 /devel/llvm
parent- Update to 1.2.1 (diff)
Upgrade to LLVM 2.1, the latest release.
A couple patchs are included from HEAD that didn't make the release, but fix use-after-free bugs. Submitted by: Emil Mikulic <emil at cs dot rmit dot edu dot au>
Notes
Notes: svn path=/head/; revision=200277
Diffstat (limited to 'devel/llvm')
-rw-r--r--devel/llvm/Makefile8
-rw-r--r--devel/llvm/distinfo6
-rw-r--r--devel/llvm/files/patch-lib_ExecutionEngine_Interpreter_Execution.cpp61
-rw-r--r--devel/llvm/files/patch-lib_Transforms_Scalar_LoopIndexSplit.cpp21
-rw-r--r--devel/llvm/pkg-plist14
5 files changed, 101 insertions, 9 deletions
diff --git a/devel/llvm/Makefile b/devel/llvm/Makefile
index 6918076358e3..8d88d769cec3 100644
--- a/devel/llvm/Makefile
+++ b/devel/llvm/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= llvm
-PORTVERSION= 2.0
+PORTVERSION= 2.1
CATEGORIES= devel lang
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
@@ -14,7 +14,6 @@ MAINTAINER= brooks@FreeBSD.org
COMMENT= Low Level Virtual Machine
GNU_CONFIGURE= yes
-USE_BISON= yes
USE_GMAKE= yes
USE_PERL5_BUILD=yes
USE_GCC= 3.3+
@@ -37,10 +36,11 @@ BROKEN= does not compile with perl ${PERL_VERSION}
post-patch:
${REINPLACE_CMD} -e 's,\(PROJ_docsdir.*:=\).*$$,\1${DOCSDIR},g' \
${WRKSRC}/Makefile.config.in
+ ${REINPLACE_CMD} -e 's,\(PROJ_mandir.*:=\).*$$,\1${MANPREFIX}/man,g' \
+ ${WRKSRC}/Makefile.config.in
post-install:
- ${RM} -f ${PREFIX}/bin/.dir \
- ${PREFIX}/etc/.dir \
+ @${RM} ${PREFIX}/bin/.dir \
${PREFIX}/etc/llvm/.dir \
${PREFIX}/lib/.dir
diff --git a/devel/llvm/distinfo b/devel/llvm/distinfo
index 683086123283..17809141f9f0 100644
--- a/devel/llvm/distinfo
+++ b/devel/llvm/distinfo
@@ -1,3 +1,3 @@
-MD5 (llvm-2.0.tar.gz) = 6f88002301a25f31a492052695f6138e
-SHA256 (llvm-2.0.tar.gz) = 84d7ca0331963d2b2be7e18af61a80f49653c692f0bad63c5d26b2a2f7bc3375
-SIZE (llvm-2.0.tar.gz) = 4715502
+MD5 (llvm-2.1.tar.gz) = b930e7213b37acc934d0d163cf13af18
+SHA256 (llvm-2.1.tar.gz) = 8cabd422f249ada736d864fc8a1f4d14aabefacb6f860c9beefbc53f93e0f96c
+SIZE (llvm-2.1.tar.gz) = 5062241
diff --git a/devel/llvm/files/patch-lib_ExecutionEngine_Interpreter_Execution.cpp b/devel/llvm/files/patch-lib_ExecutionEngine_Interpreter_Execution.cpp
new file mode 100644
index 000000000000..5246aae1207d
--- /dev/null
+++ b/devel/llvm/files/patch-lib_ExecutionEngine_Interpreter_Execution.cpp
@@ -0,0 +1,61 @@
+Author: lattner
+Date: Fri Sep 21 13:30:39 2007
+New Revision: 42205
+
+Log:
+#ifdef out unsafe tracing code, which fixes PR1689
+
+==============================================================================
+--- lib/ExecutionEngine/Interpreter/Execution.cpp (original)
++++ lib/ExecutionEngine/Interpreter/Execution.cpp Fri Sep 21 13:30:39 2007
+@@ -1338,20 +1338,6 @@
+ StackFrame.VarArgs.assign(ArgVals.begin()+i, ArgVals.end());
+ }
+
+-static void PrintGenericValue(const GenericValue &Val, const Type* Ty) {
+- switch (Ty->getTypeID()) {
+- default: assert(0 && "Invalid GenericValue Type");
+- case Type::VoidTyID: DOUT << "void"; break;
+- case Type::FloatTyID: DOUT << "float " << Val.FloatVal; break;
+- case Type::DoubleTyID: DOUT << "double " << Val.DoubleVal; break;
+- case Type::PointerTyID: DOUT << "void* " << intptr_t(Val.PointerVal); break;
+- case Type::IntegerTyID:
+- DOUT << "i" << Val.IntVal.getBitWidth() << " "
+- << Val.IntVal.toStringUnsigned(10)
+- << " (0x" << Val.IntVal.toStringUnsigned(16) << ")\n";
+- break;
+- }
+-}
+
+ void Interpreter::run() {
+ while (!ECStack.empty()) {
+@@ -1364,12 +1350,28 @@
+
+ DOUT << "About to interpret: " << I;
+ visit(I); // Dispatch to one of the visit* methods...
++#if 0
++ // This is not safe, as visiting the instruction could lower it and free I.
+ #ifndef NDEBUG
+ if (!isa<CallInst>(I) && !isa<InvokeInst>(I) &&
+ I.getType() != Type::VoidTy) {
+ DOUT << " --> ";
+- PrintGenericValue(SF.Values[&I], I.getType());
++ const GenericValue &Val = SF.Values[&I];
++ switch (I.getType()->getTypeID()) {
++ default: assert(0 && "Invalid GenericValue Type");
++ case Type::VoidTyID: DOUT << "void"; break;
++ case Type::FloatTyID: DOUT << "float " << Val.FloatVal; break;
++ case Type::DoubleTyID: DOUT << "double " << Val.DoubleVal; break;
++ case Type::PointerTyID: DOUT << "void* " << intptr_t(Val.PointerVal);
++ break;
++ case Type::IntegerTyID:
++ DOUT << "i" << Val.IntVal.getBitWidth() << " "
++ << Val.IntVal.toStringUnsigned(10)
++ << " (0x" << Val.IntVal.toStringUnsigned(16) << ")\n";
++ break;
++ }
+ }
+ #endif
++#endif
+ }
+ }
diff --git a/devel/llvm/files/patch-lib_Transforms_Scalar_LoopIndexSplit.cpp b/devel/llvm/files/patch-lib_Transforms_Scalar_LoopIndexSplit.cpp
new file mode 100644
index 000000000000..e3a82d5972aa
--- /dev/null
+++ b/devel/llvm/files/patch-lib_Transforms_Scalar_LoopIndexSplit.cpp
@@ -0,0 +1,21 @@
+Author: dpatel
+Date: Thu Sep 20 18:01:50 2007
+New Revision: 42178
+
+Log:
+Don't increment invalid iterator.
+
+==============================================================================
+--- lib/Transforms/Scalar/LoopIndexSplit.cpp (original)
++++ lib/Transforms/Scalar/LoopIndexSplit.cpp Thu Sep 20 18:01:50 2007
+@@ -928,8 +928,9 @@
+ while (!WorkList.empty()) {
+ BasicBlock *BB = WorkList.back(); WorkList.pop_back();
+ for(BasicBlock::iterator BBI = BB->begin(), BBE = BB->end();
+- BBI != BBE; ++BBI) {
++ BBI != BBE; ) {
+ Instruction *I = BBI;
++ ++BBI;
+ I->replaceAllUsesWith(UndefValue::get(I->getType()));
+ I->eraseFromParent();
+ }
diff --git a/devel/llvm/pkg-plist b/devel/llvm/pkg-plist
index 11c7208aa866..24f8485f0b03 100644
--- a/devel/llvm/pkg-plist
+++ b/devel/llvm/pkg-plist
@@ -27,6 +27,7 @@ etc/llvm/cxx
etc/llvm/ll
etc/llvm/st
include/llvm-c/LinkTimeOptimizer.h
+include/llvm/ADT/APFloat.h
include/llvm/ADT/APInt.h
include/llvm/ADT/APSInt.h
include/llvm/ADT/BitVector.h
@@ -46,6 +47,7 @@ include/llvm/ADT/SmallPtrSet.h
include/llvm/ADT/SmallSet.h
include/llvm/ADT/SmallString.h
include/llvm/ADT/SmallVector.h
+include/llvm/ADT/SparseBitVector.h
include/llvm/ADT/Statistic.h
include/llvm/ADT/StringExtras.h
include/llvm/ADT/StringMap.h
@@ -64,7 +66,6 @@ include/llvm/Analysis/CallGraph.h
include/llvm/Analysis/ConstantFolding.h
include/llvm/Analysis/ConstantsScanner.h
include/llvm/Analysis/Dominators.h
-include/llvm/Analysis/ET-Forest.h
include/llvm/Analysis/FindUsedTypes.h
include/llvm/Analysis/Interval.h
include/llvm/Analysis/IntervalIterator.h
@@ -72,6 +73,7 @@ include/llvm/Analysis/IntervalPartition.h
include/llvm/Analysis/LoadValueNumbering.h
include/llvm/Analysis/LoopInfo.h
include/llvm/Analysis/LoopPass.h
+include/llvm/Analysis/MemoryDependenceAnalysis.h
include/llvm/Analysis/Passes.h
include/llvm/Analysis/PostDominators.h
include/llvm/Analysis/ProfileInfo.h
@@ -88,6 +90,7 @@ include/llvm/Assembly/AsmAnnotationWriter.h
include/llvm/Assembly/Parser.h
include/llvm/Assembly/PrintModulePass.h
include/llvm/Assembly/Writer.h
+include/llvm/AutoUpgrade.h
include/llvm/BasicBlock.h
include/llvm/Bitcode/Archive.h
include/llvm/Bitcode/BitCodes.h
@@ -102,7 +105,6 @@ include/llvm/CodeGen/CallingConvLower.h
include/llvm/CodeGen/DwarfWriter.h
include/llvm/CodeGen/ELFRelocation.h
include/llvm/CodeGen/FileWriters.h
-include/llvm/CodeGen/InstrScheduling.h
include/llvm/CodeGen/IntrinsicLowering.h
include/llvm/CodeGen/LinkAllCodegenComponents.h
include/llvm/CodeGen/LiveInterval.h
@@ -124,6 +126,7 @@ include/llvm/CodeGen/MachinePassRegistry.h
include/llvm/CodeGen/MachineRelocation.h
include/llvm/CodeGen/Passes.h
include/llvm/CodeGen/RegAllocRegistry.h
+include/llvm/CodeGen/RegisterCoalescer.h
include/llvm/CodeGen/RegisterScavenging.h
include/llvm/CodeGen/RuntimeLibcalls.h
include/llvm/CodeGen/SSARegMap.h
@@ -133,6 +136,7 @@ include/llvm/CodeGen/SchedulerRegistry.h
include/llvm/CodeGen/SelectionDAG.h
include/llvm/CodeGen/SelectionDAGISel.h
include/llvm/CodeGen/SelectionDAGNodes.h
+include/llvm/CodeGen/SimpleRegisterCoalescing.h
include/llvm/CodeGen/ValueTypes.h
include/llvm/CodeGen/ValueTypes.td
include/llvm/Config/alloca.h
@@ -197,6 +201,7 @@ include/llvm/Support/GetElementPtrTypeIterator.h
include/llvm/Support/GraphWriter.h
include/llvm/Support/InstIterator.h
include/llvm/Support/InstVisitor.h
+include/llvm/Support/LLVMBuilder.h
include/llvm/Support/LeakDetector.h
include/llvm/Support/ManagedStatic.h
include/llvm/Support/Mangler.h
@@ -244,12 +249,15 @@ include/llvm/Target/TargetMachineRegistry.h
include/llvm/Target/TargetOptions.h
include/llvm/Target/TargetSubtarget.h
include/llvm/Transforms/IPO.h
+include/llvm/Transforms/IPO/InlinerPass.h
include/llvm/Transforms/Instrumentation.h
include/llvm/Transforms/RSProfiling.h
include/llvm/Transforms/Scalar.h
include/llvm/Transforms/Utils/BasicBlockUtils.h
+include/llvm/Transforms/Utils/BasicInliner.h
include/llvm/Transforms/Utils/Cloning.h
include/llvm/Transforms/Utils/FunctionUtils.h
+include/llvm/Transforms/Utils/InlineCost.h
include/llvm/Transforms/Utils/Local.h
include/llvm/Transforms/Utils/PromoteMemToReg.h
include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h
@@ -271,6 +279,7 @@ lib/LLVMIA64.o
lib/LLVMInterpreter.o
lib/LLVMJIT.o
lib/LLVMMSIL.o
+lib/LLVMMips.o
lib/LLVMPowerPC.o
lib/LLVMSparc.o
lib/LLVMX86.o
@@ -386,6 +395,7 @@ lib/libLLVMlto.a
%%DOCSDIR%%/ps/stkrc.ps
%%DOCSDIR%%/ps/tblgen.ps
@dirrm include/llvm/Transforms/Utils
+@dirrm include/llvm/Transforms/IPO
@dirrm include/llvm/Transforms
@dirrm include/llvm/Target
@dirrm include/llvm/System