[llvm-commits] [llvm-gcc-4.2] r49301 - in /llvm-gcc-4.2/trunk/gcc: config/i386/llvm-i386-target.h llvm-backend.cpp
Dale Johannesen
dalej at apple.com
Sun Apr 6 18:24:31 PDT 2008
Author: johannes
Date: Sun Apr 6 20:24:31 2008
New Revision: 49301
URL: http://llvm.org/viewvc/llvm-project?rev=49301&view=rev
Log:
Make unwind table preservation contigent on Darwin x86-64,
since it seems to be the wrong thing for Ada. This is
intended as temporary.
Modified:
llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h?rev=49301&r1=49300&r2=49301&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h Sun Apr 6 20:24:31 2008
@@ -83,6 +83,8 @@
} \
}
+#define LLVM_PRESERVE_UNWIND_TABLES (TARGET_MACHO && TARGET_64BIT)
+
#ifdef LLVM_ABI_H
/* Objects containing SSE vectors are 16 byte aligned, everything else 4. */
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=49301&r1=49300&r2=49301&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Sun Apr 6 20:24:31 2008
@@ -297,6 +297,10 @@
OptimizationPassesCreated = false;
}
+#ifndef LLVM_PRESERVE_UNWIND_TABLES
+#define LLVM_PRESERVE_UNWIND_TABLES 0
+#endif
+
static void createOptimizationPasses() {
assert(OptimizationPassesCreated ||
(!PerFunctionPasses && !PerModulePasses && !CodeGenPasses));
@@ -351,7 +355,8 @@
// DISABLE PREDSIMPLIFY UNTIL PR967 is fixed.
//PM->add(createPredicateSimplifierPass()); // Canonicalize registers
PM->add(createCFGSimplificationPass()); // Clean up after IPCP & DAE
- if (flag_unit_at_a_time && !flag_unwind_tables)
+ if (flag_unit_at_a_time &&
+ (!flag_unwind_tables || !LLVM_PRESERVE_UNWIND_TABLES))
PM->add(createPruneEHPass()); // Remove dead EH info
if (optimize > 1) {
More information about the llvm-commits
mailing list