Skip to content
This repository was archived by the owner on Sep 2, 2018. It is now read-only.

Commit 56c7aa9

Browse files
author
Dylan McKay
committed
[AVR] Fixed bug caused by optimizations
Whenever optimizations are turned on, compilation would fail. This is was because the greedy register allocator was being used regardless of optimization level. This caused an assertion error when the LiveVariables pass is run. Closes #15.
1 parent 6effd0a commit 56c7aa9

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lib/Target/AVR/AVRTargetMachine.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class AVRPassConfig : public TargetPassConfig
5757
void addPreSched2() override;
5858
void addPreRegAlloc() override;
5959
void addPreEmitPass() override;
60-
FunctionPass *createTargetRegisterAllocator(bool Optimized);
6160
};
6261
} // namespace
6362

@@ -111,8 +110,3 @@ void AVRPassConfig::addPreEmitPass()
111110
addPass(createAVRBranchSelectionPass());
112111
}
113112

114-
FunctionPass *AVRPassConfig::createTargetRegisterAllocator(bool Optimized)
115-
{
116-
// Unconditionally use our custom greedy register allocator.
117-
return createGreedyRegisterAllocator();
118-
}

0 commit comments

Comments
 (0)