aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/LiveRangeEdit.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/LiveRangeEdit.h')
-rw-r--r--lib/CodeGen/LiveRangeEdit.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/LiveRangeEdit.h b/lib/CodeGen/LiveRangeEdit.h
index 151f5b1b90..ad248bf400 100644
--- a/lib/CodeGen/LiveRangeEdit.h
+++ b/lib/CodeGen/LiveRangeEdit.h
@@ -94,16 +94,16 @@ public:
struct Remat {
VNInfo *ParentVNI; // parent_'s value at the remat location.
MachineInstr *OrigMI; // Instruction defining ParentVNI.
- operator bool() const { return OrigMI; }
+ explicit Remat(VNInfo *ParentVNI) : ParentVNI(ParentVNI), OrigMI(0) {}
};
/// canRematerializeAt - Determine if ParentVNI can be rematerialized at
/// UseIdx. It is assumed that parent_.getVNINfoAt(UseIdx) == ParentVNI.
/// When cheapAsAMove is set, only cheap remats are allowed.
- Remat canRematerializeAt(VNInfo *ParentVNI,
- SlotIndex UseIdx,
- bool cheapAsAMove,
- LiveIntervals &lis);
+ bool canRematerializeAt(Remat &RM,
+ SlotIndex UseIdx,
+ bool cheapAsAMove,
+ LiveIntervals &lis);
/// rematerializeAt - Rematerialize RM.ParentVNI into DestReg by inserting an
/// instruction into MBB before MI. The new instruction is mapped, but