summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-12-29 09:24:42 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-12-29 09:24:42 +0000
commit6dd8f06db2a6dfcb56eded6d9ff8359b90105191 (patch)
treed35f138f14591a42f4e19941b73b355dece32086
parente0115344e6d3520be618bcb93980a0a1cf7b0e06 (diff)
[ptr-traits] Sink several in-body method definitions to be out-of-line
inline definitions after the mutually recursive pair of types have been defined. The two types mutually recurse specifically through abstractions that require pointer traits which makes this kind of mutual recursion especially tricky to get right in terms of ordering. This is part of a series of patches to allow LLVM to check for complete pointee types when computing its pointer traits. This is absolutely necessary to get correct (or reproducible) results for things like how many low bits are guaranteed to be zero. llvm-svn: 256551
-rw-r--r--llvm/include/llvm/CodeGen/ScheduleDAG.h49
1 files changed, 28 insertions, 21 deletions
diff --git a/llvm/include/llvm/CodeGen/ScheduleDAG.h b/llvm/include/llvm/CodeGen/ScheduleDAG.h
index d8e5c83dd1f1..bda9dbd51fff 100644
--- a/llvm/include/llvm/CodeGen/ScheduleDAG.h
+++ b/llvm/include/llvm/CodeGen/ScheduleDAG.h
@@ -122,18 +122,7 @@ namespace llvm {
}
/// Return true if the specified SDep is equivalent except for latency.
- bool overlaps(const SDep &Other) const {
- if (Dep != Other.Dep) return false;
- switch (Dep.getInt()) {
- case Data:
- case Anti:
- case Output:
- return Contents.Reg == Other.Contents.Reg;
- case Order:
- return Contents.OrdKind == Other.Contents.OrdKind;
- }
- llvm_unreachable("Invalid dependency kind!");
- }
+ bool overlaps(const SDep &Other) const;
bool operator==(const SDep &Other) const {
return overlaps(Other) && Latency == Other.Latency;
@@ -157,19 +146,13 @@ namespace llvm {
}
//// getSUnit - Return the SUnit to which this edge points.
- SUnit *getSUnit() const {
- return Dep.getPointer();
- }
+ SUnit *getSUnit() const;
//// setSUnit - Assign the SUnit to which this edge points.
- void setSUnit(SUnit *SU) {
- Dep.setPointer(SU);
- }
+ void setSUnit(SUnit *SU);
/// getKind - Return an enum value representing the kind of the dependence.
- Kind getKind() const {
- return Dep.getInt();
- }
+ Kind getKind() const;
/// isCtrl - Shorthand for getKind() != SDep::Data.
bool isCtrl() const {
@@ -490,6 +473,30 @@ namespace llvm {
void ComputeHeight();
};
+ /// Return true if the specified SDep is equivalent except for latency.
+ inline bool SDep::overlaps(const SDep &Other) const {
+ if (Dep != Other.Dep)
+ return false;
+ switch (Dep.getInt()) {
+ case Data:
+ case Anti:
+ case Output:
+ return Contents.Reg == Other.Contents.Reg;
+ case Order:
+ return Contents.OrdKind == Other.Contents.OrdKind;
+ }
+ llvm_unreachable("Invalid dependency kind!");
+ }
+
+ //// getSUnit - Return the SUnit to which this edge points.
+ inline SUnit *SDep::getSUnit() const { return Dep.getPointer(); }
+
+ //// setSUnit - Assign the SUnit to which this edge points.
+ inline void SDep::setSUnit(SUnit *SU) { Dep.setPointer(SU); }
+
+ /// getKind - Return an enum value representing the kind of the dependence.
+ inline SDep::Kind SDep::getKind() const { return Dep.getInt(); }
+
//===--------------------------------------------------------------------===//
/// SchedulingPriorityQueue - This interface is used to plug different
/// priorities computation algorithms into the list scheduler. It implements