Mercurial > hg > CbC > CbC_llvm
comparison lib/CodeGen/RegAllocBasic.cpp @ 134:3a76565eade5 LLVM5.0.1
update 5.0.1
author | mir3636 |
---|---|
date | Sat, 17 Feb 2018 09:57:20 +0900 |
parents | 803732b1fca8 |
children | c2174574ed3a |
comparison
equal
deleted
inserted
replaced
133:c60214abe0e8 | 134:3a76565eade5 |
---|---|
16 #include "LiveDebugVariables.h" | 16 #include "LiveDebugVariables.h" |
17 #include "RegAllocBase.h" | 17 #include "RegAllocBase.h" |
18 #include "Spiller.h" | 18 #include "Spiller.h" |
19 #include "llvm/Analysis/AliasAnalysis.h" | 19 #include "llvm/Analysis/AliasAnalysis.h" |
20 #include "llvm/CodeGen/CalcSpillWeights.h" | 20 #include "llvm/CodeGen/CalcSpillWeights.h" |
21 #include "llvm/CodeGen/LiveIntervalAnalysis.h" | 21 #include "llvm/CodeGen/LiveIntervals.h" |
22 #include "llvm/CodeGen/LiveRangeEdit.h" | 22 #include "llvm/CodeGen/LiveRangeEdit.h" |
23 #include "llvm/CodeGen/LiveRegMatrix.h" | 23 #include "llvm/CodeGen/LiveRegMatrix.h" |
24 #include "llvm/CodeGen/LiveStackAnalysis.h" | 24 #include "llvm/CodeGen/LiveStacks.h" |
25 #include "llvm/CodeGen/MachineBlockFrequencyInfo.h" | 25 #include "llvm/CodeGen/MachineBlockFrequencyInfo.h" |
26 #include "llvm/CodeGen/MachineFunctionPass.h" | 26 #include "llvm/CodeGen/MachineFunctionPass.h" |
27 #include "llvm/CodeGen/MachineInstr.h" | 27 #include "llvm/CodeGen/MachineInstr.h" |
28 #include "llvm/CodeGen/MachineLoopInfo.h" | 28 #include "llvm/CodeGen/MachineLoopInfo.h" |
29 #include "llvm/CodeGen/MachineRegisterInfo.h" | 29 #include "llvm/CodeGen/MachineRegisterInfo.h" |
30 #include "llvm/CodeGen/Passes.h" | 30 #include "llvm/CodeGen/Passes.h" |
31 #include "llvm/CodeGen/RegAllocRegistry.h" | 31 #include "llvm/CodeGen/RegAllocRegistry.h" |
32 #include "llvm/CodeGen/TargetRegisterInfo.h" | |
32 #include "llvm/CodeGen/VirtRegMap.h" | 33 #include "llvm/CodeGen/VirtRegMap.h" |
33 #include "llvm/PassAnalysisSupport.h" | 34 #include "llvm/PassAnalysisSupport.h" |
34 #include "llvm/Support/Debug.h" | 35 #include "llvm/Support/Debug.h" |
35 #include "llvm/Support/raw_ostream.h" | 36 #include "llvm/Support/raw_ostream.h" |
36 #include "llvm/Target/TargetRegisterInfo.h" | |
37 #include <cstdlib> | 37 #include <cstdlib> |
38 #include <queue> | 38 #include <queue> |
39 | 39 |
40 using namespace llvm; | 40 using namespace llvm; |
41 | 41 |
217 if (!Intf->isSpillable() || Intf->weight > VirtReg.weight) | 217 if (!Intf->isSpillable() || Intf->weight > VirtReg.weight) |
218 return false; | 218 return false; |
219 Intfs.push_back(Intf); | 219 Intfs.push_back(Intf); |
220 } | 220 } |
221 } | 221 } |
222 DEBUG(dbgs() << "spilling " << TRI->getName(PhysReg) << | 222 DEBUG(dbgs() << "spilling " << printReg(PhysReg, TRI) |
223 " interferences with " << VirtReg << "\n"); | 223 << " interferences with " << VirtReg << "\n"); |
224 assert(!Intfs.empty() && "expected interference"); | 224 assert(!Intfs.empty() && "expected interference"); |
225 | 225 |
226 // Spill each interfering vreg allocated to PhysReg or an alias. | 226 // Spill each interfering vreg allocated to PhysReg or an alias. |
227 for (unsigned i = 0, e = Intfs.size(); i != e; ++i) { | 227 for (unsigned i = 0, e = Intfs.size(); i != e; ++i) { |
228 LiveInterval &Spill = *Intfs[i]; | 228 LiveInterval &Spill = *Intfs[i]; |