{"title":"改进的线性扫描寄存器分配算法","authors":"S. Subha","doi":"10.1109/ITNG.2009.90","DOIUrl":null,"url":null,"abstract":"This paper proposes a global register allocation algorithm that makes decisions on register allocation based on the cost of spilling variables in linear scan allocation. The algorithm assumes registers are initially allocated based on linear scan algorithm. When there is a need to spill variables, either the allocated or the new variable is spilled based on the cost incurred in allocation. The cost is calculated as a function of number of definitions and uses of a variable for the rest of its live range. A mathematical model for determining the cost is proposed which decides register allocation. Given the live ranges of the variables the time complexity of the algorithm is derived. Simulations on an arbitrary program showed an improvement when compared to linear scan algorithm.","PeriodicalId":347761,"journal":{"name":"2009 Sixth International Conference on Information Technology: New Generations","volume":"33 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2009-04-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":"{\"title\":\"A Modified Linear Scan Register Allocation Algorithm\",\"authors\":\"S. Subha\",\"doi\":\"10.1109/ITNG.2009.90\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"This paper proposes a global register allocation algorithm that makes decisions on register allocation based on the cost of spilling variables in linear scan allocation. The algorithm assumes registers are initially allocated based on linear scan algorithm. When there is a need to spill variables, either the allocated or the new variable is spilled based on the cost incurred in allocation. The cost is calculated as a function of number of definitions and uses of a variable for the rest of its live range. A mathematical model for determining the cost is proposed which decides register allocation. Given the live ranges of the variables the time complexity of the algorithm is derived. Simulations on an arbitrary program showed an improvement when compared to linear scan algorithm.\",\"PeriodicalId\":347761,\"journal\":{\"name\":\"2009 Sixth International Conference on Information Technology: New Generations\",\"volume\":\"33 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2009-04-27\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"2\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2009 Sixth International Conference on Information Technology: New Generations\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ITNG.2009.90\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2009 Sixth International Conference on Information Technology: New Generations","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ITNG.2009.90","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
A Modified Linear Scan Register Allocation Algorithm
This paper proposes a global register allocation algorithm that makes decisions on register allocation based on the cost of spilling variables in linear scan allocation. The algorithm assumes registers are initially allocated based on linear scan algorithm. When there is a need to spill variables, either the allocated or the new variable is spilled based on the cost incurred in allocation. The cost is calculated as a function of number of definitions and uses of a variable for the rest of its live range. A mathematical model for determining the cost is proposed which decides register allocation. Given the live ranges of the variables the time complexity of the algorithm is derived. Simulations on an arbitrary program showed an improvement when compared to linear scan algorithm.