[llvm] r313380 - Fix selecting legal types in TypeInfer::getLegalTypes
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 15 11:58:07 PDT 2017
Author: kparzysz
Date: Fri Sep 15 11:58:07 2017
New Revision: 313380
URL: http://llvm.org/viewvc/llvm-project?rev=313380&view=rev
Log:
Fix selecting legal types in TypeInfer::getLegalTypes
Collect all legal types for all modes.
Modified:
llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=313380&r1=313379&r2=313380&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Fri Sep 15 11:58:07 2017
@@ -804,20 +804,14 @@ void TypeInfer::expandOverloads(TypeSetB
}
}
-
TypeSetByHwMode TypeInfer::getLegalTypes() {
TypeSetByHwMode VTS;
TypeSetByHwMode::SetType &DS = VTS.getOrCreate(DefaultMode);
const TypeSetByHwMode <S = TP.getDAGPatterns().getLegalTypes();
- if (!CodeGen) {
- assert(LTS.hasDefault());
- const TypeSetByHwMode::SetType &S = LTS.get(DefaultMode);
- DS.insert(S.begin(), S.end());
- } else {
- for (const auto &I : LTS)
- DS.insert(I.second.begin(), I.second.end());
- }
+ // Stuff all types from all modes into the default mode.
+ for (const auto &I : LTS)
+ DS.insert(I.second.begin(), I.second.end());
return VTS;
}
More information about the llvm-commits
mailing list