aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringBase.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-03-03 19:47:14 +0000
committerEric Christopher <echristo@gmail.com>2015-03-03 19:47:14 +0000
commit720ab84ba2f7c4c748fb9295110ae35be0d7c9cb (patch)
tree0030f4aa47dd5e0e8da066f953de0e4d11b034f1 /llvm/lib/CodeGen/TargetLoweringBase.cpp
parentaf16cda10d4286d1bed8aacd559211d7ee0af4c2 (diff)
downloadllvm-720ab84ba2f7c4c748fb9295110ae35be0d7c9cb.zip
llvm-720ab84ba2f7c4c748fb9295110ae35be0d7c9cb.tar.gz
llvm-720ab84ba2f7c4c748fb9295110ae35be0d7c9cb.tar.bz2
Add a comment above findRepresentativeClass explaining why it's
where it is so that future generations can understand. llvm-svn: 231111
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringBase.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index 9048a44..07f9f66 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -1144,6 +1144,10 @@ TargetLoweringBase::emitPatchPoint(MachineInstr *MI,
/// findRepresentativeClass - Return the largest legal super-reg register class
/// of the register class for the specified type and its associated "cost".
+// This function is in TargetLowering because it uses RegClassForVT which would
+// need to be moved to TargetRegisterInfo and would necessitate moving
+// isTypeLegal over as well - a massive change that would just require
+// TargetLowering having a TargetRegisterInfo class member that it would use.
std::pair<const TargetRegisterClass *, uint8_t>
TargetLoweringBase::findRepresentativeClass(const TargetRegisterInfo *TRI,
MVT VT) const {