* src/SDCCpeeph.c: made labelHashEntry global, made pcDistance, FBYNAME static,
[fw/sdcc] / src / SDCCpeeph.h
index 8ada22285ce4353626d5a48a7d90135df1b4276a..d5e38816a47b93ff019882881cbd710ed2b715c7 100644 (file)
@@ -38,6 +38,8 @@ typedef struct lineNode
     unsigned int isInline:1;
     unsigned int isComment:1;
     unsigned int isDebug:1;
+    unsigned int isLabel:1;
+    unsigned int visited:1;
     struct asmLineNode *aln;
     struct lineNode *prev;
     struct lineNode *next;
@@ -55,6 +57,22 @@ typedef struct peepRule
   }
 peepRule;
 
+typedef struct
+  {
+    char name[SDCC_NAME_MAX + 1];
+    int refCount;
+    /* needed for deadMove: */
+    bool passedLabel;
+    int jmpToCount;
+  }
+labelHashEntry;
+
+bool isLabelDefinition (const char *line, const char **start, int *len,
+                        bool isPeepRule);
+
+extern hTab *labelHash;
+labelHashEntry *getLabelRef (const char *label, lineNode *head);
+
 void printLine (lineNode *, FILE *);
 lineNode *newLineNode (char *);
 lineNode *connectLine (lineNode *, lineNode *);