[llvm-commits] [llvm-gcc-4.2] r64813 - in /llvm-gcc-4.2/trunk/gcc: cgraph.c cgraphunit.c ipa.c
Bill Wendling
isanbard at gmail.com
Tue Feb 17 13:11:51 PST 2009
Author: void
Date: Tue Feb 17 15:11:51 2009
New Revision: 64813
URL: http://llvm.org/viewvc/llvm-project?rev=64813&view=rev
Log:
The IS_EXTERN_INLINE is already defined with ENABLE_LLVM in mind. No need for the #ifdefs here.
Modified:
llvm-gcc-4.2/trunk/gcc/cgraph.c
llvm-gcc-4.2/trunk/gcc/cgraphunit.c
llvm-gcc-4.2/trunk/gcc/ipa.c
Modified: llvm-gcc-4.2/trunk/gcc/cgraph.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cgraph.c?rev=64813&r1=64812&r2=64813&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/cgraph.c (original)
+++ llvm-gcc-4.2/trunk/gcc/cgraph.c Tue Feb 17 15:11:51 2009
@@ -600,13 +600,8 @@
struct cgraph_node *n = (struct cgraph_node *) *slot;
if (!n->next_clone && !n->global.inlined_to
&& (cgraph_global_info_ready
- /* LLVM LOCAL begin - extern inline */
-#ifdef ENABLE_LLVM
+ /* LLVM LOCAL extern inline */
&& (TREE_ASM_WRITTEN (n->decl) || IS_EXTERN_INLINE (n->decl))))
-#else
- && (TREE_ASM_WRITTEN (n->decl) || DECL_EXTERNAL (n->decl))))
-#endif
- /* LLVM LOCAL end - extern inline */
kill_body = true;
}
@@ -1189,13 +1184,8 @@
good optimization is what this optimization is about. */
else if (!(*targetm.binds_local_p) (node->decl)
- /* LLVM LOCAL begin - extern inline */
-#ifdef ENABLE_LLVM
+ /* LLVM LOCAL extern inline */
&& !DECL_COMDAT (node->decl) && !IS_EXTERN_INLINE (node->decl))
-#else
- && !DECL_COMDAT (node->decl) && !DECL_EXTERNAL (node->decl))
-#endif
- /* LLVM LOCAL end - extern inline */
avail = AVAIL_OVERWRITABLE;
else avail = AVAIL_AVAILABLE;
Modified: llvm-gcc-4.2/trunk/gcc/cgraphunit.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cgraphunit.c?rev=64813&r1=64812&r2=64813&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/cgraphunit.c (original)
+++ llvm-gcc-4.2/trunk/gcc/cgraphunit.c Tue Feb 17 15:11:51 2009
@@ -384,13 +384,8 @@
n->next_needed = NULL;
if (!n->global.inlined_to
&& !n->alias
- /* LLVM LOCAL begin - extern inline */
-#ifdef ENABLE_LLVM
+ /* LLVM LOCAL extern inline */
&& !IS_EXTERN_INLINE (n->decl))
-#else
- && !DECL_EXTERNAL (n->decl))
-#endif
- /* LLVM LOCAL end - extern inline */
{
cgraph_expand_function (n);
output = true;
@@ -853,13 +848,8 @@
if (node->analyzed
&& DECL_SAVED_TREE (node->decl) && !TREE_ASM_WRITTEN (node->decl)
- /* LLVM LOCAL begin - extern inline */
-#ifdef ENABLE_LLVM
+ /* LLVM LOCAL extern inline */
&& (!IS_EXTERN_INLINE (node->decl) || node->global.inlined_to))
-#else
- && (!DECL_EXTERNAL (node->decl) || node->global.inlined_to))
-#endif
- /* LLVM LOCAL end - extern inline */
{
if (this_cfun->cfg)
{
@@ -1304,40 +1294,24 @@
&& (node->needed
|| (e && node->reachable))
&& !TREE_ASM_WRITTEN (decl)
- /* LLVM LOCAL begin - extern inline */
-#ifdef ENABLE_LLVM
+ /* LLVM LOCAL extern inline */
&& !IS_EXTERN_INLINE (decl))
-#else
- && !DECL_EXTERNAL (decl))
-#endif
- /* LLVM LOCAL end - extern inline */
node->output = 1;
else
{
/* We should've reclaimed all functions that are not needed. */
#ifdef ENABLE_CHECKING
if (!node->global.inlined_to && DECL_SAVED_TREE (decl)
- /* LLVM LOCAL begin - extern inline */
-#ifdef ENABLE_LLVM
+ /* LLVM LOCAL extern inline */
&& !IS_EXTERN_INLINE (decl))
-#else
- && !DECL_EXTERNAL (decl))
-#endif
- /* LLVM LOCAL end - extern inline */
{
dump_cgraph_node (stderr, node);
internal_error ("failed to reclaim unneeded function");
}
#endif
- /* LLVM LOCAL begin - extern inline */
-#ifdef ENABLE_LLVM
+ /* LLVM LOCAL extern inline */
gcc_assert (node->global.inlined_to || !DECL_SAVED_TREE (decl)
|| IS_EXTERN_INLINE (decl));
-#else
- gcc_assert (node->global.inlined_to || !DECL_SAVED_TREE (decl)
- || DECL_EXTERNAL (decl));
-#endif
- /* LLVM LOCAL end - extern inline */
}
}
}
Modified: llvm-gcc-4.2/trunk/gcc/ipa.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/ipa.c?rev=64813&r1=64812&r2=64813&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/ipa.c (original)
+++ llvm-gcc-4.2/trunk/gcc/ipa.c Tue Feb 17 15:11:51 2009
@@ -112,13 +112,8 @@
#endif
for (node = cgraph_nodes; node; node = node->next)
if (node->needed && !node->global.inlined_to
- /* LLVM LOCAL begin - extern inline */
-#ifdef ENABLE_LLVM
+ /* LLVM LOCAL extern inline */
&& ((!IS_EXTERN_INLINE (node->decl))
-#else
- && ((!DECL_EXTERNAL (node->decl))
-#endif
- /* LLVM LOCAL end - extern inline */
|| !node->analyzed
|| before_inlining_p))
{
@@ -141,13 +136,8 @@
if (!e->callee->aux
&& node->analyzed
&& (!e->inline_failed || !e->callee->analyzed
- /* LLVM LOCAL begin - extern inline */
-#ifdef ENABLE_LLVM
+ /* LLVM LOCAL extern inline */
|| !IS_EXTERN_INLINE(e->callee->decl)
-#else
- || (!DECL_EXTERNAL (e->callee->decl))
-#endif
- /* LLVM LOCAL end - extern inline */
|| before_inlining_p))
{
e->callee->aux = first;
@@ -178,13 +168,8 @@
local_insns = 0;
if (file)
fprintf (file, " %s", cgraph_node_name (node));
- /* LLVM LOCAL begin - extern inline */
-#ifdef ENABLE_LLVM
+ /* LLVM LOCAL extern inline */
if (!node->analyzed || !IS_EXTERN_INLINE(node->decl)
-#else
- if (!node->analyzed || !DECL_EXTERNAL (node->decl)
-#endif
- /* LLVM LOCAL end - extern inline */
|| before_inlining_p)
cgraph_remove_node (node);
else
More information about the llvm-commits
mailing list