ELLCC
From Ellcc
The ELLCC driver framework ties Elsa and LLVM together.
Contents |
ELLCC Structure
ecc is the ELLCC main program. ecc is normally not invoked directly. It is usually invoked with a name that specifies the language and target.
ELLCC Programs
These are all symbolic links to the ellcc executable.
- alpha-elf-ecc
- alpha-elf-e++
- arm-elf-ecc
- arm-elf-e++
- ecc
- ia64-elf-ecc
- ia64-elf-e++
- mips-elf-ecc
- mips-elf-e++
- powerpc64-elf-ecc
- powerpc64-elf-e++
- powerpc-elf-ecc
- powerpc-elf-e++
- sparc-elf-ecc
- sparc-elf-e++
- spu-elf-ecc
- spu-elf-e++
- x86_64-elf-ecc
- x86_64-elf-e++
- x86-elf-ecc
- x86-elf-e++
- x86-pe-ecc
- x86-pe-e++
Predefined Macros
- __FILE__ The name of the current source file as a string.
- __LINE__ The current source line number, as an integer.
- __DATE__ The current date as a string.
- __TIME__ The current time as a string.
- __ELLCC__ The ELLCC major version number as an integer.
- __ELLCC_MINOR__ The ELLCC minor version number as an integer.
- __ELLCC_PATCHLEVEL__ The ELLCC patch level as an integer.
- __ELLCC_VERSION_STRING__ A string built from __ELLCC__, __ELLCC_MINOR__, and __ELLCC_PATCHLEVEL__ separated by periods ('.').
- __ELLCC_VERSION__ The complete ELLCC version string.
Additional macros will be defined by host and target specific configuration files.
Languages Supported
ellcc supports several languages. They are:
- GNU C++ compatibility. GNU C++
- The 1998 ISO C++ standard. ANSI C++
- The 1990 ISO C standard. ISO C90
- The 1999 ISO C standard. ISO C99
- The 1999 ISO C standard with GNU extensions. GNU C
- The 1990 ISO C standard with GNU extensions. GNU C90
- K&R C K&R C
- K&R C with GNU extensions. GNU K&R C
language can be one of:
Targets Supported
target can be one of:
- alpha-elf Alpha
- arm-elf ARM
- c C
- c++ C++
- spu-elf CellSPU
- ia64-elf IA64
- mips-elf Mips
- msil MSIL
- nios2-elf Nios2
- pic-elf PIC16
- powerpc-elf PowerPC
- powerpc64-elf PowerPC
- sparc-elf Sparc
- x86-elf X86
- x86_64-elf X86
- x86-pe X86
When used as a compiler for the current host, the name of the compiler is:
language
When used as a cross compiler, the name of the compiler is of the form:
target-language
Overriding the Default Language and Target
The default language can be overridden with the -std= option.
c89
c90
iso9899:1990
Support all ISO C90 programs. Same as -ansi for C code.
c99
iso9899:1999
ISO C99.
gnu89
GNU dialect of ISO C90 (including some C99 features).
gnu99
GNU dialect of ISO C99. This is the default for ecc.
c++98
The 1998 ISO C++ standard plus amendments. Same as -ansi for C++ code.
gnu++98
GNU dialect of -std=c++98. This is the default for e++.
The default target can be overridden with the -march= option:
x86
32-bit X86: Pentium-Pro and above
x86-64
64-bit X86: EM64T and AMD64
sparc
SPARC
ppc32
PowerPC 32
ppc64
PowerPC 64
alpha
Alpha (incomplete)
ia64
IA-64 (Itanium)
arm
ARM
thumb
Thumb
mips
Mips
mipsel
Mipsel
cellspu
STI CBEA Cell SPU
pic16
PIC16 14-bit
c
C backend
msil
MSIL backend
cpp
C++ backend
Command Line Options
OVERVIEW: C/C++ compiler
USAGE: ellcc [options] [Sources/objects/libraries]
OPTIONS:
-B=<dir> - Specify path to find ellcc sub-tools
-D=<symbol> - Specify a pre-processor symbol to define
Choose final phase of translation:
-E - Stop translation after pre-processing phase
-t - Stop translation after translation phase
-c - Stop translation after optimization phase
-bc - Stop translation after bitcode linking phase
-S - Stop translation after generation phase
-I=<dir> - Specify location to search for included source
-L=<dir> - Specify a library search path
-M=<option> - Pass through -M options to compiler tools
Choose level of optimization to apply:
-O - An alias for the -O1 option
-O0 - Perform no optimizations
-O1 - Optimize for compilation speed, not execution speed
-std-compile-opts - An alias for the -O1 option
-O2 - Perform simple translation time optimizations
-O3 - Perform aggressive translation time optimizations
-O4 - Perform link time optimizations
-O5 - Perform aggressive link time optimizations
-Tasm=<option> - Pass specific options to the assembler
-Tlnk=<option> - Pass specific options to the linker
-Topt=<option> - Pass specific options to the optimizer
-Tpre=<option> - Pass specific options to the pre-processor
-Ttrn=<option> - Pass specific options to the assembler
-W=<option> - Pass through -W options to compiler tools
-Xlinker=<option> - Pass options to the system linker
Optimizations available:
-aa-eval - Exhaustive Alias Analysis Precision Evaluator
-adce - Aggressive Dead Code Elimination
-anders-aa - Andersen's Interprocedural Alias Analysis
-argpromotion - Promote 'by reference' arguments to scalars
-basicaa - Basic Alias Analysis (default AA impl)
-basiccg - Basic CallGraph Construction
-basicvn - Basic Value Numbering (default GVN impl)
-block-placement - Profile Guided Basic Block Placement
-break-crit-edges - Break critical edges in CFG
-codegenprepare - Optimize for code generation
-collector-metadata - Create Garbage Collector Module Metadata
-condprop - Conditional Propagation
-constmerge - Merge Duplicate Global Constants
-constprop - Simple constant propagation
-count-aa - Count Alias Analysis Query Responses
-dce - Dead Code Elimination
-deadargelim - Dead Argument Elimination
-deadarghaX0r - Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE)
-deadtypeelim - Dead Type Elimination
-debug-aa - AA use debugger
-die - Dead Instruction Elimination
-domfrontier - Dominance Frontier Construction
-domtree - Dominator Tree Construction
-dse - Dead Store Elimination
-extract-blocks - Extract Basic Blocks From Module (for bugpoint use)
-gcse - Global Common Subexpression Elimination
-globaldce - Dead Global Elimination
-globalopt - Global Variable Optimizer
-globalsmodref-aa - Simple mod/ref analysis for globals
-gvn - Global Value Numbering
-gvnpre - Global Value Numbering/Partial Redundancy Elimination
-if-converter - If Converter
-indmemrem - Indirect Malloc and Free Removal
-indvars - Canonicalize Induction Variables
-inline - Function Integration/Inlining
-insert-block-profiling - Insert instrumentation for block profiling
-insert-edge-profiling - Insert instrumentation for edge profiling
-insert-function-profiling - Insert instrumentation for function profiling
-insert-null-profiling-rs - Measure profiling framework overhead
-insert-rs-profiling-framework - Insert random sampling instrumentation framework
-instcombine - Combine redundant instructions
-instcount - Counts the various types of Instructions
-internalize - Internalize Global Symbols
-intervals - Interval Partition Construction
-ipconstprop - Interprocedural constant propagation
-ipsccp - Interprocedural Sparse Conditional Constant Propagation
-jump-threading - Jump Threading
-lcssa - Loop-Closed SSA Form Pass
-libcall-aa - LibCall Alias Analysis
-licm - Loop Invariant Code Motion
-linearscan-regalloc - Linear Scan Register Allocator
-liveintervals - Live Interval Analysis
-livestacks - Live Stack Slot Analysis
-livevars - Live Variable Analysis
-load-vn - Load Value Numbering
-loop-deletion - Delete dead loops
-loop-extract - Extract loops into new functions
-loop-extract-single - Extract at most one loop into a new function
-loop-index-split - Index Split Loops
-loop-reduce - Loop Strength Reduction
-loop-rotate - Rotate Loops
-loop-unroll - Unroll loops
-loop-unswitch - Unswitch loops
-loops - Natural Loop Construction
-loopsimplify - Canonicalize natural loops
-lowerallocs - Lower allocations from instructions to calls
-lowerinvoke - Lower invoke and unwind, for unwindless code generators
-lowersetjmp - Lower Set Jump
-lowerswitch - Lower SwitchInst's to branches
-machine-licm - Machine Loop Invariant Code Motion
-machine-loops - Machine Natural Loop Construction
-machine-sink - Machine code sinking
-machinedomtree - MachineDominator Tree Construction
-machinemoduleinfo - Module Information
-mem2reg - Promote Memory to Register
-memcpyopt - MemCpy Optimization
-memdep - Memory Dependence Analysis
-mergereturn - Unify function exit nodes
-no-aa - No Alias Analysis (always returns 'may' alias)
-no-profile - No Profile Information
-phi-node-elimination - Eliminate PHI nodes for register allocation
-postdomfrontier - Post-Dominance Frontier Construction
-postdomtree - Post-Dominator Tree Construction
-predsimplify - Predicate Simplifier
-preverify - Preliminary module verification
-print - Print function to stderr
-print-alias-sets - Alias Set Printer
-print-cfg - Print CFG of function to 'dot' file
-print-cfg-only - Print CFG of function to 'dot' file (with no function bodies)
-printm - Print module to stderr
-printusedtypes - Find Used Types
-profile-loader - Load profile information from llvmprof.out
-prune-eh - Remove unused exception handling info
-raiseallocs - Raise allocations from calls to instructions
-reassociate - Reassociate expressions
-reg2mem - Demote all values to stack slots
-scalar-evolution - Scalar Evolution Analysis
-scalarrepl - Scalar Replacement of Aggregates
-sccp - Sparse Conditional Constant Propagation
-simple-register-coalescing - Simple Register Coalescing
-simplify-libcalls - Simplify well-known library calls
-simplifycfg - Simplify the CFG
-sretpromotion - Promote sret arguments to multiple ret values
-stack-slot-coloring - Stack Slot Coloring
-strip - Strip all symbols from a module
-strip-dead-prototypes - Strip Unused Function Prototypes
-tailcallelim - Tail Call Elimination
-tailduplicate - Tail Duplication
-targetdata - Target Data Layout
-twoaddressinstruction - Two-Address instruction pass
-unreachableblockelim - Remove unreachable blocks from the CFG
-verify - Module Verifier
-view-cfg - View CFG of function
-view-cfg-only - View CFG of function (with no function bodies)
-analyze - Only perform analysis, no optimization
-bpprint - Output pretty printed source
-bpprintAfterElab - Output pretty printed source after elaboration
-code-model - Choose code model
=default - Target default code model
=small - Small code model
=kernel - Kernel code model
=medium - Medium code model
=large - Large code model
-config-dir=<dir> - Specify configuration directory to override defaults
-cppfname=<function name> - Specify the name of the generated function
-cppfor=<string> - Specify the name of the thing to generate
-cppgen - Choose what kind of output to generate
=program - Generate a complete program
=module - Generate a module definition
=contents - Generate contents of a module
=function - Generate a function definition
=functions - Generate all function definitions
=inline - Generate an inline function
=variable - Generate a variable definition
=type - Generate a type definition
-disable-excess-fp-precision - Disable optimizations that may increase FP precision
-disable-fp-elim - Disable frame pointer elimination optimization
-disable-inlining - Do not run the inliner pass
-disable-internalize - Do not mark all symbols as internal
-disable-post-RA-scheduler - Disable scheduling after register allocation
-disable-spill-fusing - Disable fusing of spill code into instructions
-dry-run - Do everything but perform the compilation actions
-enable-correct-eh-support - Make the -lowerinvoke pass insert expensive, but correct, EH code
-enable-eh - Emit DWARF exception handling (default if target supports)
-enable-finite-only-fp-math - Enable optimizations that assumes non- NaNs / +-Infs
-enable-unsafe-fp-math - Enable optimizations that may decrease FP precision
-filetype - Choose a file type (not all types are supported by all targets):
=asm - Emit an assembly ('.s') file
=obj - Emit a native object ('.o') file [experimental]
=dynlib - Emit a native dynamic library ('.so') file [experimental]
-g - Generate objects that include debug symbols
-help - Display available options (--help-hidden for more)
-internalize-public-api-file=<filename> - A file containing list of symbol names to preserve
-internalize-public-api-list=<list> - A list of symbol names to preserve
-join-liveintervals - Coalesce copies (default=true)
-keep-temps - Don't delete temporary files created by ellcc
-l=<lib> - Specify base name of libraries to link to
-link-as-library - Link the .bc files together as a library, not an executable
-load=<pluginfilename> - Load the specified plugin
-m=<machine> - Specify a target machine
-march - Architecture to generate code for:
=x86 - 32-bit X86: Pentium-Pro and above
=x86-64 - 64-bit X86: EM64T and AMD64
=sparc - SPARC
=ppc32 - PowerPC 32
=ppc64 - PowerPC 64
=alpha - Alpha (incomplete)
=ia64 - IA-64 (Itanium)
=arm - ARM
=thumb - Thumb
=mips - Mips
=mipsel - Mipsel
=cellspu - STI CBEA Cell SPU
=pic16 - PIC16 14-bit
=c - C backend
=msil - MSIL backend
=cpp - C++ backend
-mattr=<a1,+a2,-a3,...> - Target specific attributes (-mattr=help for details)
-mcpu=<cpu-name> - Target a specific cpu type (-mcpu=help for details)
-mtriple=<string> - Override target triple for module
-native - Generative native code instead of bitcode
-native-cbe - Generate a native binary with the C backend and GCC
-nozero-initialized-in-bss - Don't place zero-initialized symbols into bss section
-o=<file> - Override output filename
-optimize-size - Optimize for size.
-p - Print module after each transformation
-pipe - Invoke sub-commands by linking input/output with pipes
-post-link-opts=<path> - Run one or more optimization programs after linking
-pre-RA-sched - Instruction schedulers available (before register allocation):
=default - Best scheduler for the target
=list-burr - Bottom-up register reduction list scheduling
=list-tdrr - Top-down register reduction list scheduling
=list-td - Top-down list scheduler
-print-fname=<file> - Print the full path for the option's value
-print-machineinstrs - Print generated machine code
-profile-info-file=<filename> - Profile file loaded by -profile-loader
-profile-randomness - How to randomly choose to profile:
=global - global counter
=ra_global - register allocated global counter
=rdcc - cycle counter
-realign-stack - Realign stack if needed
-regalloc - Register allocator to use: (default = linearscan)
=bigblock - Big-block register allocator
=linearscan - linear scan register allocator
=local - local register allocator
=simple - simple register allocator
-relocation-model - Choose relocation model
=default - Target default relocation model
=static - Non-relocatable code
=pic - Fully relocatable, position independent code
=dynamic-no-pic - Relocatable external references, non-relocatable code
-schedule-livein-copies - Schedule copies of livein registers
-soft-float - Generate software floating point library calls
-spiller - Spiller to use: (default: local)
=simple - simple spiller
=local - local spiller
-stack-alignment=<uint> - Override default stack alignment
-stats - Enable statistics output from program
-strip-all - Strip all symbol info from executable
-strip-debug - Strip debugger symbol info from executable
-tailcallopt - Turn on tail call optimization.
-time-actions - Print execution time for each action taken
-time-passes - Time each pass, printing elapsed time for each on exit
-tr=<option> - Elsa trace options
-unwind-tables - Generate unwinding tables for all functions
-verbose - Print out each action taken
-verify-each - Verify intermediate results of all passes
-version - Display the version of this program
-x - Specify the source language for subsequent files
=c - The C language
=c-cpp-output - Preprocessed C language
=c-header - A C language header
=c++ - The C++ language
=c++-cpp-output - Preprocessed C++ language
=c++-header - A C++ language header
=llvm-as - An LLVM assembly file
=llvm-as-with-cpp - An LLVM assembly file that must be preprocessed
=llvm-bc - An LLVM bitcode file
=llvm-bc - An unoptimized LLVM bitcode file
=assembly - An assembly file
=assembly-with-cpp - An LLVM assembly file that must be preprocessed
=other - An object file, linker command file, etc
-x86-asm-syntax - Choose style of code to emit from X86 backend:
=att - Emit AT&T-style assembly
=intel - Emit Intel-style assembly
