mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Now that I am told MachineRegisterInfo also tracks physical register uses / defs, I can do away with the horribleness I introduced a while back. It's impossible to detect if there is any use of a physical register below an instruction (and before any def of the register) with some cheap book keeping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49105 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -31,11 +31,13 @@
|
||||
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
#include "llvm/ADT/BitVector.h"
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/SmallSet.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class MachineRegisterInfo;
|
||||
class TargetRegisterInfo;
|
||||
|
||||
class LiveVariables : public MachineFunctionPass {
|
||||
@@ -128,6 +130,8 @@ private:
|
||||
private: // Intermediate data structures
|
||||
MachineFunction *MF;
|
||||
|
||||
MachineRegisterInfo* MRI;
|
||||
|
||||
const TargetRegisterInfo *TRI;
|
||||
|
||||
// PhysRegInfo - Keep track of which instruction was the last def/use of a
|
||||
@@ -152,6 +156,10 @@ private: // Intermediate data structures
|
||||
|
||||
SmallVector<unsigned, 4> *PHIVarInfo;
|
||||
|
||||
// DistanceMap - Keep track the distance of a MI from the start of the
|
||||
// current basic block.
|
||||
DenseMap<MachineInstr*, unsigned> DistanceMap;
|
||||
|
||||
void addRegisterKills(unsigned Reg, MachineInstr *MI,
|
||||
SmallSet<unsigned, 4> &SubKills);
|
||||
|
||||
|
Reference in New Issue
Block a user