aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-01-31 21:38:14 +0000
committerDevang Patel <dpatel@apple.com>2011-01-31 21:38:14 +0000
commite9a7ea68653689966417443b8ac2528c1d9d3ccf (patch)
tree34407700e2758bb5353a5ad1a0b2960b9514aafa /include
parent97f6d5b24136ac19d5f83c1ee9541b05f0eccebd (diff)
downloadexternal_llvm-e9a7ea68653689966417443b8ac2528c1d9d3ccf.zip
external_llvm-e9a7ea68653689966417443b8ac2528c1d9d3ccf.tar.gz
external_llvm-e9a7ea68653689966417443b8ac2528c1d9d3ccf.tar.bz2
Keep track of incoming argument's location while emitting LiveIns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124611 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachineFunction.h2
-rw-r--r--include/llvm/CodeGen/MachineRegisterInfo.h14
2 files changed, 13 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index f56c053..abeaa4f 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -281,7 +281,7 @@ public:
/// addLiveIn - Add the specified physical register as a live-in value and
/// create a corresponding virtual register for it.
- unsigned addLiveIn(unsigned PReg, const TargetRegisterClass *RC);
+ unsigned addLiveIn(unsigned PReg, const TargetRegisterClass *RC, DebugLoc DL);
//===--------------------------------------------------------------------===//
// BasicBlock accessor functions.
diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h
index 74df8da..79ff714 100644
--- a/include/llvm/CodeGen/MachineRegisterInfo.h
+++ b/include/llvm/CodeGen/MachineRegisterInfo.h
@@ -17,6 +17,8 @@
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/IndexedMap.h"
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/Support/DebugLoc.h"
#include <vector>
namespace llvm {
@@ -64,7 +66,10 @@ class MachineRegisterInfo {
/// stored in the second element.
std::vector<std::pair<unsigned, unsigned> > LiveIns;
std::vector<unsigned> LiveOuts;
-
+
+ /// LiveInLocs - Keep track of location livein registers.
+ DenseMap<unsigned, DebugLoc> LiveInLocs;
+
MachineRegisterInfo(const MachineRegisterInfo&); // DO NOT IMPLEMENT
void operator=(const MachineRegisterInfo&); // DO NOT IMPLEMENT
public:
@@ -271,7 +276,12 @@ public:
LiveIns.push_back(std::make_pair(Reg, vreg));
}
void addLiveOut(unsigned Reg) { LiveOuts.push_back(Reg); }
-
+
+ /// addLiveInLoc - Keep track of location info for live in reg.
+ void addLiveInLoc(unsigned VReg, DebugLoc DL) {
+ LiveInLocs[VReg] = DL;
+ }
+
// Iteration support for live in/out sets. These sets are kept in sorted
// order by their register number.
typedef std::vector<std::pair<unsigned,unsigned> >::const_iterator