#ifndef COMPILER_COPYPROPAGATION_H #define COMPILER_COPYPROPAGATION_H #include "compiler/common.h" #include "compiler/UseDefChains.h" typedef int (*IsCandidateFunc)(PCode *); typedef int (*PropagatesToUseFunc)(int a, int b); typedef void (*PropagateAndFinishFunc)(int id); #ifdef __MWERKS__ #pragma options align=mac68k #endif typedef struct Propagation { IsCandidateFunc is_candidate; PropagatesToUseFunc propagatestouse; PropagateAndFinishFunc propagateandfinish; char *name; char *nameplural; char *format; Boolean computesUseDefChains; } Propagation; typedef struct Candidate { PCode *pcode; RegUseOrDef *list; } Candidate; typedef struct PropInfo { UInt32 *vec0; UInt32 *vec4; UInt32 *vec8; UInt32 *vecC; } PropInfo; #ifdef __MWERKS__ #pragma options align=reset #endif extern int propagatedcopies; extern int propagated_instructions; extern int recursive_propagation; extern int number_of_candidates; extern Candidate *Candidates; extern PropInfo *propinfo; extern int *ncandidatesinblock; extern int *firstcandidateinblock; extern int precedes(PCode *a, PCode *b); extern void propagateinstructions(Object *proc, Propagation *config, int passCount, Boolean localflag); extern void propagatecopyinstructions(Object *proc, int flag); #endif