aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/LiveIntervalAnalysis.h
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2012-02-14 18:51:53 +0000
committerLang Hames <lhames@gmail.com>2012-02-14 18:51:53 +0000
commit342c64c90418a97ec26303c27d1829edd994d9a9 (patch)
treedf714cd91e524367f07fd2661312f1369d8127dc /include/llvm/CodeGen/LiveIntervalAnalysis.h
parent8b7c3d0ee42938a9e6ca37239cc327bd9f4c0cd0 (diff)
downloadexternal_llvm-342c64c90418a97ec26303c27d1829edd994d9a9.zip
external_llvm-342c64c90418a97ec26303c27d1829edd994d9a9.tar.gz
external_llvm-342c64c90418a97ec26303c27d1829edd994d9a9.tar.bz2
Tighten physical register invariants: Allocatable physical registers can
only be live in to a block if it is the function entry point or a landing pad. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150494 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/LiveIntervalAnalysis.h')
-rw-r--r--include/llvm/CodeGen/LiveIntervalAnalysis.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h
index 693d66b..c18c479 100644
--- a/include/llvm/CodeGen/LiveIntervalAnalysis.h
+++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h
@@ -63,6 +63,9 @@ namespace llvm {
/// allocatableRegs_ - A bit vector of allocatable registers.
BitVector allocatableRegs_;
+ /// reservedRegs_ - A bit vector of reserved registers.
+ BitVector reservedRegs_;
+
/// RegMaskSlots - Sorted list of instructions with register mask operands.
/// Always use the 'r' slot, RegMasks are normal clobbers, not early
/// clobbers.
@@ -128,6 +131,12 @@ namespace llvm {
return allocatableRegs_.test(reg);
}
+ /// isReserved - is the physical register reg reserved in the current
+ /// function
+ bool isReserved(unsigned reg) const {
+ return reservedRegs_.test(reg);
+ }
+
/// getScaledIntervalSize - get the size of an interval in "units,"
/// where every function is composed of one thousand units. This
/// measure scales properly with empty index slots in the function.