diff options
author | Simon Dardis <simon.dardis@imgtec.com> | 2017-02-24 16:32:18 +0000 |
---|---|---|
committer | Simon Dardis <simon.dardis@imgtec.com> | 2017-02-24 16:32:18 +0000 |
commit | ae6f2bcb258472b3ed89b24b8fa6989395c059e3 (patch) | |
tree | aa70d33c1f2346b99231e5eca9cdcc417ee9d0d5 /llvm/lib/Target/Mips/MipsTargetMachine.cpp | |
parent | 3c58c18ff0f9670f5d4d493263f2cd7dc84258c0 (diff) | |
download | bcm5719-llvm-ae6f2bcb258472b3ed89b24b8fa6989395c059e3.tar.gz bcm5719-llvm-ae6f2bcb258472b3ed89b24b8fa6989395c059e3.zip |
Recommit "[mips] Fix atomic compare and swap at O0."
This time with the missing files.
Similar to PR/25526, fast-regalloc introduces spills at the end of basic
blocks. When this occurs in between an ll and sc, the store can cause the
atomic sequence to fail.
This patch fixes the issue by introducing more pseudos to represent atomic
operations and moving their lowering to after the expansion of postRA
pseudos.
This resolves PR/32020.
Thanks to James Cowgill for reporting the issue!
Reviewers: slthakur
Differential Revision: https://reviews.llvm.org/D30257
llvm-svn: 296134
Diffstat (limited to 'llvm/lib/Target/Mips/MipsTargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/MipsTargetMachine.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MipsTargetMachine.cpp b/llvm/lib/Target/Mips/MipsTargetMachine.cpp index a45a9c4b41c..d08e3b9f941 100644 --- a/llvm/lib/Target/Mips/MipsTargetMachine.cpp +++ b/llvm/lib/Target/Mips/MipsTargetMachine.cpp @@ -213,6 +213,7 @@ public: bool addInstSelector() override; void addPreEmitPass() override; void addPreRegAlloc() override; + void addPreSched2() override; }; } // end anonymous namespace @@ -270,3 +271,7 @@ void MipsPassConfig::addPreEmitPass() { addPass(createMipsLongBranchPass(TM)); addPass(createMipsConstantIslandPass()); } + +void MipsPassConfig::addPreSched2() { + addPass(createMipsExpandPseudoPass()); +} |