issues
search
arcana-lab
/
noelle
NOELLE Offers Empowering LLVM Extensions
MIT License
75
stars
36
forks
source link
Introduce environment variable ID for LoopEnvironment and keep index internal to LoopEnvironmentBuilder & User
#37
Closed
yiansu
closed
2 years ago
yiansu
commented
2 years ago
LoopEnvironment
public:
rename method getEnvIndicesOfLiveInVars -> getEnvIDsOfLiveInVars
rename method getEnvIndicesOfLiveOutVars -> getEnvIDsOfLiveOutVars
rename method indexOfExitBlockTaken -> getExitBlockID
rename method producerAt -> getProducer
private:
rename method indexOfProducer -> getProducerID (this method doesn't get invoked)
LoopEnvironmentBuilder
public:
addVariableToEnvironment: use ID instead of index, update both maps after adding a new variable
hasVariableBeenReduced: change to use id and do the map check at beginning
getEnvironmentVariable: change to use id and do the map check at beginning
getAccumulatedReducedEnvironmentVariable: change to use id and do the map check at beginning
getReducedEnvironmentVariable: change to use id and do the map check at beginning
reduceLiveOutVariables: assume parameters are all ID based, replace with index internally if necessary
create method getIndexOfEnvironmentVariable given ID
private:
add two unordered_maps envIDToIndex & indexToEnvID
initializeBuilder: generate envID to index map and reverse map, store envTypes based on selected envIDs
LoopEnvironmentUser
public:
Constructor: take unordered_map envIDToIndex as a parameter passed from the builder
rename method addLiveInIndex -> addLiveIn
rename method addLiveOutIndex -> addLiveOut
delete methods getEnvIndicesOfLiveInVars & getEnvIndicesOfLiveOutVars
add methods getEnvIDsOfLiveInVars & getEnvIDsOfLiveOutVars
createEnvironmentVariablePointer: change to use id and do the map check at beginning
createReducableEnvPtr: change to use id and do the map check at beginning
private:
add unordered_map envIDToIndex
add liveInIDs & liveOutIDs
delete liveInInds & liveOutInds
ParallelizationTechnique
public:
create method getIndexOfEnvironmentVariable, which is a wrapper of this->envBuilder->getIndexOfEnvironmentVariable
LoopEnvironment
LoopEnvironmentBuilder
LoopEnvironmentUser
ParallelizationTechnique