2023 2024 Student Forum > Management Forum > Entrance Exams

 
  #1  
15th April 2015, 10:49 AM
Unregistered
Guest
 
Gcc dce

Hello sir my self Rocky and I want to know details about Dead code elimination and GNU Compiler Collection (GCC) so would you please provide me details about Dead code elimination and GNU Compiler Collection (GCC)????
And also tell me what is GCC dead code elimination???
  #2  
3rd September 2018, 09:26 AM
Unregistered
Guest
 
Re: Gcc dce

Hello sir, what is dead code elimination in GNU Compiler Collection? Please provide me info about dead code elimination GNU Compiler Collection?
  #3  
3rd September 2018, 09:27 AM
Super Moderator
 
Join Date: Aug 2012
Re: Gcc dce

In compiler theory, dead code elimination is a compiler optimization to remove code which does not affect the program results.

The GNU Compiler Collection is a compiler system produced by the GNU Project supporting various programming languages.

GCC is a key component of the GNU toolchain and the standard compiler for most Unix-like operating systems.

In some condition the GCC is giving dead code elimination as a result to remove code which does not affect the program result.

Dead code includes code that can never be executed (unreachable code), and code that only affects dead variables (written to, but never read again), that is, irrelevant to the program.

Some of these optimizations performed at this level include dead code elimination, partial redundancy elimination, global value numbering, sparse conditional constant propagation, and scalar replacement of aggregates.

Array dependence based optimizations such as automatic vectorization and automatic parallelization are also performed. Profile-guided optimization is also possible.

GCC target processor families as of version 4.3 include:

Alpha
ARM
AVR
Blackfin
Epiphany (GCC 4.8)
H8/300
HC12
IA-32 (x86)
IA-64 (Intel Itanium)
MIPS
Motorola 68000
PA-RISC
PDP-11
PowerPC
R8C / M16C / M32C
SPARC
SPU
SuperH
System/390 / zSeries
VAX
x86-64

Consider the following example written in C.

int foo(void)
{
int a = 24;
int b = 25; /* Assignment to dead variable */
int c;
c = a * 4;
return c;
b = 24; /* Unreachable code */
return 0;
}


Quick Reply
Your Username: Click here to log in

Message:
Options

Thread Tools Search this Thread



All times are GMT +5. The time now is 07:09 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
SEO by vBSEO 3.6.0 PL2

1 2 3 4