[llvm] r192124 - [mips] Disable tail merging when long branch pass is enabled.
Akira Hatanaka
ahatanaka at mips.com
Mon Oct 7 12:13:53 PDT 2013
Author: ahatanak
Date: Mon Oct 7 14:13:53 2013
New Revision: 192124
URL: http://llvm.org/viewvc/llvm-project?rev=192124&view=rev
Log:
[mips] Disable tail merging when long branch pass is enabled.
Modified:
llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp
Modified: llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp?rev=192124&r1=192123&r2=192124&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp Mon Oct 7 14:13:53 2013
@@ -135,7 +135,13 @@ namespace {
class MipsPassConfig : public TargetPassConfig {
public:
MipsPassConfig(MipsTargetMachine *TM, PassManagerBase &PM)
- : TargetPassConfig(TM, PM) {}
+ : TargetPassConfig(TM, PM) {
+ // The current implementation of long branch pass requires a scratch
+ // register ($at) to be available before branch instructions. Tail merging
+ // can break this requirement, so disable it when long branch pass is
+ // enabled.
+ EnableTailMerge = !getMipsSubtarget().enableLongBranchPass();
+ }
MipsTargetMachine &getMipsTargetMachine() const {
return getTM<MipsTargetMachine>();
More information about the llvm-commits
mailing list