Skip to content

Commit

Permalink
[AIEX] Simplify AIEClusterBaseAddress pass
Browse files Browse the repository at this point in the history
* Including a more generic chaining algorithm.
  • Loading branch information
andcarminati committed Nov 22, 2024
1 parent 7a8f59c commit 5796f62
Show file tree
Hide file tree
Showing 6 changed files with 222 additions and 325 deletions.
7 changes: 6 additions & 1 deletion llvm/lib/Target/AIE/AIE2TargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ static cl::opt<unsigned> StackAddrSpace(
cl::desc("Specify the addrspace where the stack is allocated "
"(5: Bank A, 6: Bank B, 7: Bank C, 8: Bank D)"));

static cl::opt<bool> EnableAddressChaining("aie-address-chaining", cl::Hidden,
cl::init(true),
cl::desc("Enable ptradd chaining."));

extern bool AIEDumpArtifacts;

void AIE2TargetMachine::anchor() {}
Expand Down Expand Up @@ -138,7 +142,8 @@ void AIE2PassConfig::addPreLegalizeMachineIR() {
void AIE2PassConfig::addPreRegBankSelect() {
if (getOptLevel() != CodeGenOptLevel::None) {
addPass(createAIE2PostLegalizerGenericCombiner());
addPass(createAIEClusterBaseAddress());
if (EnableAddressChaining)
addPass(createAIEClusterBaseAddress());
addPass(createAIE2PostLegalizerCustomCombiner());
}
}
Expand Down
Loading

0 comments on commit 5796f62

Please sign in to comment.