diff options
author | Dylan McKay <dylanmckay34@gmail.com> | 2016-12-13 05:53:14 +0000 |
---|---|---|
committer | Dylan McKay <dylanmckay34@gmail.com> | 2016-12-13 05:53:14 +0000 |
commit | 1e57fa487b4db5ddbee35ea1da62a3b5f29f16e5 (patch) | |
tree | f85df039e4b69999f290152807abf81afb2a4988 /llvm/lib/Target/AVR/AVRTargetMachine.cpp | |
parent | f72381197205b73028eb01f3a73e4df871af3ec6 (diff) | |
download | bcm5719-llvm-1e57fa487b4db5ddbee35ea1da62a3b5f29f16e5.tar.gz bcm5719-llvm-1e57fa487b4db5ddbee35ea1da62a3b5f29f16e5.zip |
[AVR] Add an 'relax memory operation' pass
Summary:
This pass will be used to relax instructions which use out of bounds
memory accesses to equivalent operations that can work with the
addresses.
The pass currently implements relaxation for the STDWPtrQRr instruction.
Without this pass, an assertion error would be hit in the pseudo expansion pass.
In the future, we will need to add more instructions to this pass. We can do
that on a case-by-case basic.
Reviewers: arsenm, kparzysz
Subscribers: wdng, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D27650
llvm-svn: 289517
Diffstat (limited to 'llvm/lib/Target/AVR/AVRTargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/AVR/AVRTargetMachine.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/AVR/AVRTargetMachine.cpp b/llvm/lib/Target/AVR/AVRTargetMachine.cpp index 4189a242e9d..9d10ef96e11 100644 --- a/llvm/lib/Target/AVR/AVRTargetMachine.cpp +++ b/llvm/lib/Target/AVR/AVRTargetMachine.cpp @@ -80,6 +80,7 @@ extern "C" void LLVMInitializeAVRTarget() { auto &PR = *PassRegistry::getPassRegistry(); initializeAVRExpandPseudoPass(PR); + initializeAVRRelaxMemPass(PR); } const AVRSubtarget *AVRTargetMachine::getSubtargetImpl() const { @@ -108,6 +109,9 @@ void AVRPassConfig::addPreRegAlloc() { addPass(createAVRDynAllocaSRPass()); } -void AVRPassConfig::addPreSched2() { addPass(createAVRExpandPseudoPass()); } +void AVRPassConfig::addPreSched2() { + addPass(createAVRRelaxMemPass()); + addPass(createAVRExpandPseudoPass()); +} } // end of namespace llvm |