aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveRangeEdit.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-12-18 03:04:14 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-12-18 03:04:14 +0000
commit83d1ba572815c92a74817cc68e2bb48c59a87b5d (patch)
tree9d544dbcba21ef2fd384174d3c6b607917181ff6 /lib/CodeGen/LiveRangeEdit.h
parent87c6d25c71b028695641642d86d0cf4a3ff22096 (diff)
Teach the inline spiller to attempt folding a load instruction into its single
use before rematerializing the load. This allows us to produce: addps LCPI0_1(%rip), %xmm2 Instead of: movaps LCPI0_1(%rip), %xmm3 addps %xmm3, %xmm2 Saving a register and an instruction. The standard spiller already knows how to do this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122133 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveRangeEdit.h')
-rw-r--r--lib/CodeGen/LiveRangeEdit.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/LiveRangeEdit.h b/lib/CodeGen/LiveRangeEdit.h
index ad248bf400..37b58279b1 100644
--- a/lib/CodeGen/LiveRangeEdit.h
+++ b/lib/CodeGen/LiveRangeEdit.h
@@ -117,6 +117,12 @@ public:
const TargetInstrInfo&,
const TargetRegisterInfo&);
+ /// markRematerialized - explicitly mark a value as rematerialized after doing
+ /// it manually.
+ void markRematerialized(VNInfo *ParentVNI) {
+ rematted_.insert(ParentVNI);
+ }
+
/// didRematerialize - Return true if ParentVNI was rematerialized anywhere.
bool didRematerialize(VNInfo *ParentVNI) const {
return rematted_.count(ParentVNI);