summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit3b2966dc7d8221c2dc008646b6f3ec2558ad290d (patch)
tree1fa5cdf31514fd01e62533d046ca23c99ebc0cb7 /llvm/lib/CodeGen/LiveRangeEdit.h
parent2a9f194b002d2160ceb395536b9d431b8e67027d (diff)
downloadbcm5719-llvm-3b2966dc7d8221c2dc008646b6f3ec2558ad290d.tar.gz
bcm5719-llvm-3b2966dc7d8221c2dc008646b6f3ec2558ad290d.zip
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. llvm-svn: 122133
Diffstat (limited to 'llvm/lib/CodeGen/LiveRangeEdit.h')
-rw-r--r--llvm/lib/CodeGen/LiveRangeEdit.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.h b/llvm/lib/CodeGen/LiveRangeEdit.h
index ad248bf4002..37b58279b1b 100644
--- a/llvm/lib/CodeGen/LiveRangeEdit.h
+++ b/llvm/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);
OpenPOWER on IntegriCloud