mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
Properly handle kills of a physical register which has sub-registers that are read by later instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37739 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -31,6 +31,7 @@
|
||||
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
#include "llvm/ADT/BitVector.h"
|
||||
#include "llvm/ADT/SmallSet.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include <map>
|
||||
|
||||
@ -163,6 +164,15 @@ private: // Intermediate data structures
|
||||
bool addRegisterDead(unsigned IncomingReg, MachineInstr *MI,
|
||||
bool AddIfNotFound = false);
|
||||
|
||||
void addRegisterKills(unsigned Reg, MachineInstr *MI,
|
||||
SmallSet<unsigned, 4> &SubKills);
|
||||
|
||||
/// HandlePhysRegKill - Add kills of Reg and its sub-registers to the
|
||||
/// uses. Pay special attention to the sub-register uses which may come below
|
||||
/// the last use of the whole register.
|
||||
bool HandlePhysRegKill(unsigned Reg, MachineInstr *MI,
|
||||
SmallSet<unsigned, 4> &SubKills);
|
||||
bool HandlePhysRegKill(unsigned Reg, MachineInstr *MI);
|
||||
void HandlePhysRegUse(unsigned Reg, MachineInstr *MI);
|
||||
void HandlePhysRegDef(unsigned Reg, MachineInstr *MI);
|
||||
|
||||
|
Reference in New Issue
Block a user