LIR.xcc

Benoit Dupont de Dinechin (Benoit.Dupont-de-Dinechin@st.com).

Copyright 2002 - 2007 STMicroelectronics. Copyright 1995 - 1998 Commissariat a l'Energie Atomique.

This program is free software; you can redistribute it and/or modify it under the terms of either (at your option): the GNU General Public License (GPL) version 2; the GNU Lesser General Public License (LGPL) version 2.1; any later version of these licences as published by the Free Software Foundation.

The LIR (Layered Intermediate Representation) library contains the following modules:

1. LIR Interface Summary

1.1. Configure

void Configure_load(Configure this, ConfigureItem item, ...);
void Configure_loadVA(Configure this, int item, va_list va);
void Configure_merge(Configure this, Configure that);

1.2. Symbol

Symbol SymbolTable_lookup(SymbolTable this, uint32_t index, const char *name);

1.3. Program

Program Program_new(Memory parent);
Configure Program_configure(Program this);
LabelTable Program_labelTable(Program this);
SymbolTable Program_symbolTable(Program this);
Procedure Program_makeProcedure(Program this, Symbol symbol);
void Program_killProcedure(Program this, Procedure procedure);
Temporary Program_makeAbsoluteTemporary(Program this, int64_t value, Relocation relocation);
Program Program_delete(Program this);

1.4. Procedure

Temporary Procedure_makeDedicatedTemporary(Procedure this, Register registre);
Temporary Procedure_makeAssignedTemporary(Procedure this, Register registre);
Temporary Procedure_makeVirtualTemporary(Procedure this, RegFile regFile);
Temporary Procedure_makeAbsoluteTemporary(Procedure this,
                                          int64_t value, Relocation relocation);
Temporary Procedure_makeSymbolTemporary(Procedure this, Symbol symbol,
                                        int64_t offset, Relocation relocation);
Temporary Procedure_makeLabelTemporary(Procedure this, Label label,
                                       int64_t offset, Relocation relocation);
Temporary Procedure_makeModifierTemporary(Procedure this, Modifier modifier,
                                               ModifierMember member);
BasicBlock Procedure_makeBasicBlock(Procedure this, Processor processor,
                                    intptr_t regionId, float frequency);
void Procedure_setEntryBlock(Procedure this, BasicBlock basicBlock);
void Procedure_setExitBlock(Procedure this, BasicBlock basicBlock);
void Procedure_setStartBlock(Procedure this, BasicBlock basicBlock);
void Procedure_buildCodeRegions(Procedure this);
LoopScope Procedure_makeLoopScope(Procedure this, BasicBlock headerBlock,
                                  Configure configure);

1.5. LoopScope

void LoopScope_makeDependenceTable(LoopScope this);

1.6. BasicBlock

void BasicBlock_addLabels(BasicBlock this, int labelCount, Label *labels);
BasicBlockEdge BasicBlock_makeEdge(BasicBlock this,
                                   BasicBlock that, float probability)

1.7. Selector

Operation
Selector_makeOperation_0_0(Selector this,
                           Operator operator);
Operation
Selector_makeOperation_0_1(Selector this,
                           Operator operator,
                           Temporary argument_0);
Operation
Selector_makeOperation_0_2(Selector this,
                           Operator operator,
                           Temporary argument_0,
                           Temporary argument_1);
Operation
Selector_makeOperation_0_3(Selector this,
                           Operator operator,
                           Temporary argument_0,
                           Temporary argument_1,
                           Temporary argument_2);
Operation
Selector_makeOperation_1_0(Selector this,
                           Operator operator,
                           Temporary result_0);
Operation
Selector_makeOperation_1_1(Selector this,
                           Operator operator,
                           Temporary result_0,
                           Temporary argument_0);
Operation
Selector_makeOperation_1_2(Selector this,
                           Operator operator,
                           Temporary result_0,
                           Temporary argument_0,
                           Temporary argument_1);
Operation
Selector_makeOperation_1_3(Selector this,
                           Operator operator,
                           Temporary result_0,
                           Temporary argument_0,
                           Temporary argument_1,
                           Temporary argument_2);
Operation
Selector_makeOperation_2_3(Selector this,
                           Operator operator,
                           Temporary result_0,
                           Temporary result_1,
                           Temporary argument_0,
                           Temporary argument_1,
                           Temporary argument_2);

1.8. Operation

void Operation_setSafeAccess(Operation operation);
void Operation_setVolatile(Operation operation);
void Operation_setPrefetch(Operation operation);
void Operation_setBarrier(Operation operation);
void Operation_setSpillCode(Operation operation);
void Operation_setSafePerfs(Operation operation);

2. LIR Declarations

LIR_TRACE— File handle used to print the LIR traces.
extern FILE *LIR_TRACE;
#ifdef ECL_NTRACE
#define LIR_TRACE NULL
#endif//ECL_NTRACE

Override for the Optimize settings.

extern int FORCE_ACTIVATION;
extern int FORCE_CONVERSION;
extern int FORCE_COALESCING;
extern int FORCE_PREDICATION;
extern int FORCE_SCHEDULING;
extern int FORCE_ALLOCATION;
extern int FORCE_RCMSSOLVING;
extern int FORCE_RCMSPROBLEM;
extern int FORCE_LOGTIMEOUT;
extern int FORCE_SCOREBOARDING;
extern int FORCE_WINDOWSIZE;
extern int FORCE_PREPADDING;
extern int FORCE_POSTPADDING;
extern int FORCE_PROFILING;

Override for the Configure settings.

extern int FORCE_COMPENSATION;
extern int FORCE_SPECULATION;
extern int FORCE_RELAXATION;
extern int FORCE_PIPELINING;
extern int FORCE_RENAMING;
extern int FORCE_BOOSTING;
extern int FORCE_ALIASING;
extern int FORCE_PRELOADING;
extern int FORCE_L1MISSEXTRA;
LIR_Help— Outputs help on LIR environment variable options to file.
bool
LIR_Help(FILE *file);
LIR_INIT— Initialize the LIR library.
void
LIR_INIT(void);
LIR_FINI— Finalize the LIR library.
void
LIR_FINI(void);