[llvm-commits] [llvm-gcc-4.2] r53122 - in /llvm-gcc-4.2/trunk/gcc: c-incpath.c config.gcc config/i386/darwin64.h llvm-debug.cpp llvm-debug.h
Bill Wendling
isanbard at gmail.com
Thu Jul 3 15:55:09 PDT 2008
Author: void
Date: Thu Jul 3 17:55:09 2008
New Revision: 53122
URL: http://llvm.org/viewvc/llvm-project?rev=53122&view=rev
Log:
Revert my previous check-in that split up MachineModuleInfo. It turns out to
slow the compiler down at -O0 some 30% or more. Ooops.
Modified:
llvm-gcc-4.2/trunk/gcc/c-incpath.c
llvm-gcc-4.2/trunk/gcc/config.gcc
llvm-gcc-4.2/trunk/gcc/config/i386/darwin64.h
llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
llvm-gcc-4.2/trunk/gcc/llvm-debug.h
Modified: llvm-gcc-4.2/trunk/gcc/c-incpath.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/c-incpath.c?rev=53122&r1=53121&r2=53122&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c-incpath.c (original)
+++ llvm-gcc-4.2/trunk/gcc/c-incpath.c Thu Jul 3 17:55:09 2008
@@ -176,13 +176,14 @@
}
}
-
/* APPLE LOCAL begin headermaps 3871393 */
+#include <stdint.h>
+
/* Private function that hashes the contents of the null-terminated
string in a case-insensitive way. For use by headermaps only. */
static inline
-uint32 hmap_hash_string (const char *str)
+uint32_t hmap_hash_string (const char *str)
{
const char *sp;
unsigned hash_code = 0;
@@ -296,9 +297,9 @@
struct hmap_header_map *headermap;
const char *strings;
struct hmap_bucket *buckets;
- uint32 bucket_mask;
- uint32 i;
- uint32 key_offset;
+ uint32_t bucket_mask;
+ uint32_t i;
+ uint32_t key_offset;
headermap = (struct hmap_header_map *)dir->header_map;
strings = ((const char *)headermap) + headermap->strings_offset;
Modified: llvm-gcc-4.2/trunk/gcc/config.gcc
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config.gcc?rev=53122&r1=53121&r2=53122&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config.gcc (original)
+++ llvm-gcc-4.2/trunk/gcc/config.gcc Thu Jul 3 17:55:09 2008
@@ -1064,6 +1064,8 @@
# Deleted with_arch
# APPLE LOCAL mainline
with_cpu=${with_cpu:-core2}
+ # APPLE LOCAL Macintosh alignment 2002-2-19 --ff
+ extra_options="${extra_options} i386/darwin.opt"
tmake_file="t-darwin ${cpu_type}/t-darwin64 t-slibgcc-darwin"
tm_file="${tm_file} ${cpu_type}/darwin64.h"
;;
Modified: llvm-gcc-4.2/trunk/gcc/config/i386/darwin64.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/darwin64.h?rev=53122&r1=53121&r2=53122&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/i386/darwin64.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/darwin64.h Thu Jul 3 17:55:09 2008
@@ -30,6 +30,7 @@
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
+ DARWIN_EXTRA_SPECS \
{ "darwin_arch", DARWIN_ARCH_SPEC }, \
{ "darwin_crt2", "" }, \
{ "darwin_subarch", DARWIN_SUBARCH_SPEC },
Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=53122&r1=53121&r2=53122&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Thu Jul 3 17:55:09 2008
@@ -880,26 +880,23 @@
MachineModuleInfo MMI;
MMI.AnalyzeModule(*TheModule);
- std::vector<void*> Subprograms;
- SubprogramDesc SPD;
- MMI.getAnchoredDescriptors(*TheModule, &SPD, Subprograms);
+ std::vector<SubprogramDesc *> Subprograms =
+ MMI.getAnchoredDescriptors<SubprogramDesc>(*TheModule);
if (!Subprograms.empty())
- SubprogramAnchor = ((SubprogramDesc*)Subprograms[0])->getAnchor();
+ SubprogramAnchor = Subprograms[0]->getAnchor();
- std::vector<void*> CUs;
- CompileUnitDesc CUD;
- MMI.getAnchoredDescriptors(*TheModule, &CUD, CUs);
+ std::vector<CompileUnitDesc *> CUs =
+ MMI.getAnchoredDescriptors<CompileUnitDesc>(*TheModule);
if (!CUs.empty())
- CompileUnitAnchor = ((CompileUnitDesc*)CUs[0])->getAnchor();
+ CompileUnitAnchor = CUs[0]->getAnchor();
- std::vector<void*> GVs;
- GlobalVariableDesc GVD;
- MMI.getAnchoredDescriptors(*TheModule, &GVD, GVs);
+ std::vector<GlobalVariableDesc *> GVs =
+ MMI.getAnchoredDescriptors<GlobalVariableDesc>(*TheModule);
if (!GVs.empty())
- GlobalVariableAnchor = ((GlobalVariableDesc*)GVs[0])->getAnchor();
+ GlobalVariableAnchor = GVs[0]->getAnchor();
const std::map<GlobalVariable *, DebugInfoDesc *> &GlobalDescs
= MMI.getDIDeserializer()->getGlobalDescs();
Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.h?rev=53122&r1=53121&r2=53122&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.h (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.h Thu Jul 3 17:55:09 2008
@@ -28,7 +28,6 @@
#ifndef LLVM_DEBUG_H
#define LLVM_DEBUG_H
-#include "llvm/CodeGen/MachineDebugInfoDesc.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
extern "C" {
More information about the llvm-commits
mailing list