Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: src/IceTargetLoweringX86Base.h

Issue 1909013002: Subzero. X86. Lowers shufflevector using xmm instructions. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 //===- subzero/src/IceTargetLoweringX86Base.h - x86 lowering ----*- C++ -*-===// 1 //===- subzero/src/IceTargetLoweringX86Base.h - x86 lowering ----*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 AutoMemorySandboxer<> _(this, &Dest, &Src0); 794 AutoMemorySandboxer<> _(this, &Dest, &Src0);
795 Context.insert<typename Traits::Insts::Pmuludq>(Dest, Src0); 795 Context.insert<typename Traits::Insts::Pmuludq>(Dest, Src0);
796 } 796 }
797 void _pop(Variable *Dest) { 797 void _pop(Variable *Dest) {
798 Context.insert<typename Traits::Insts::Pop>(Dest); 798 Context.insert<typename Traits::Insts::Pop>(Dest);
799 } 799 }
800 void _por(Variable *Dest, Operand *Src0) { 800 void _por(Variable *Dest, Operand *Src0) {
801 AutoMemorySandboxer<> _(this, &Dest, &Src0); 801 AutoMemorySandboxer<> _(this, &Dest, &Src0);
802 Context.insert<typename Traits::Insts::Por>(Dest, Src0); 802 Context.insert<typename Traits::Insts::Por>(Dest, Src0);
803 } 803 }
804 void _punpckl(Variable *Dest, Operand *Src0) {
805 AutoMemorySandboxer<> _(this, &Dest, &Src0);
806 Context.insert<typename Traits::Insts::Punpckl>(Dest, Src0);
807 }
804 void _pshufd(Variable *Dest, Operand *Src0, Operand *Src1) { 808 void _pshufd(Variable *Dest, Operand *Src0, Operand *Src1) {
805 AutoMemorySandboxer<> _(this, &Dest, &Src0, &Src1); 809 AutoMemorySandboxer<> _(this, &Dest, &Src0, &Src1);
806 Context.insert<typename Traits::Insts::Pshufd>(Dest, Src0, Src1); 810 Context.insert<typename Traits::Insts::Pshufd>(Dest, Src0, Src1);
807 } 811 }
808 void _psll(Variable *Dest, Operand *Src0) { 812 void _psll(Variable *Dest, Operand *Src0) {
809 AutoMemorySandboxer<> _(this, &Dest, &Src0); 813 AutoMemorySandboxer<> _(this, &Dest, &Src0);
810 Context.insert<typename Traits::Insts::Psll>(Dest, Src0); 814 Context.insert<typename Traits::Insts::Psll>(Dest, Src0);
811 } 815 }
812 void _psra(Variable *Dest, Operand *Src0) { 816 void _psra(Variable *Dest, Operand *Src0) {
813 AutoMemorySandboxer<> _(this, &Dest, &Src0); 817 AutoMemorySandboxer<> _(this, &Dest, &Src0);
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 llvm::report_fatal_error( 1079 llvm::report_fatal_error(
1076 "Hey, yo! This is x86-64. Watcha doin'? (lowerIcmp64)"); 1080 "Hey, yo! This is x86-64. Watcha doin'? (lowerIcmp64)");
1077 } 1081 }
1078 /// x86lowerIcmp64 handles 64-bit icmp lowering. 1082 /// x86lowerIcmp64 handles 64-bit icmp lowering.
1079 template <typename T = Traits> 1083 template <typename T = Traits>
1080 typename std::enable_if<!T::Is64Bit, void>::type 1084 typename std::enable_if<!T::Is64Bit, void>::type
1081 lowerIcmp64(const InstIcmp *Icmp, const Inst *Consumer); 1085 lowerIcmp64(const InstIcmp *Icmp, const Inst *Consumer);
1082 1086
1083 BoolFolding<Traits> FoldingInfo; 1087 BoolFolding<Traits> FoldingInfo;
1084 1088
1089 /// Helpers for lowering ShuffleVector
1090 /// @{
1091 Variable *lowerShuffleVector_AllFromSameSrc(Variable *Src, SizeT Index0,
1092 SizeT Index1, SizeT Index2,
1093 SizeT Index3);
1094 static constexpr SizeT IGNORE_INDEX = 0x80000000u;
1095 Variable *lowerShuffleVector_TwoFromSameSrc(Variable *Src0, SizeT Index0,
1096 SizeT Index1, Variable *Src1,
1097 SizeT Index2, SizeT Index3);
1098 static constexpr SizeT UNIFIED_INDEX_0 = 0;
1099 static constexpr SizeT UNIFIED_INDEX_1 = 2;
1100 Variable *lowerShuffleVector_UnifyFromDifferentSrcs(Variable *Src0,
1101 SizeT Index0,
1102 Variable *Src1,
1103 SizeT Index1);
1104 /// @}
1105
1085 static FixupKind PcRelFixup; 1106 static FixupKind PcRelFixup;
1086 static FixupKind AbsFixup; 1107 static FixupKind AbsFixup;
1087 }; 1108 };
1088 1109
1089 template <typename TraitsType> 1110 template <typename TraitsType>
1090 class TargetDataX86 final : public TargetDataLowering { 1111 class TargetDataX86 final : public TargetDataLowering {
1091 using Traits = TraitsType; 1112 using Traits = TraitsType;
1092 TargetDataX86() = delete; 1113 TargetDataX86() = delete;
1093 TargetDataX86(const TargetDataX86 &) = delete; 1114 TargetDataX86(const TargetDataX86 &) = delete;
1094 TargetDataX86 &operator=(const TargetDataX86 &) = delete; 1115 TargetDataX86 &operator=(const TargetDataX86 &) = delete;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 1150
1130 explicit TargetHeaderX86(GlobalContext *Ctx) : TargetHeaderLowering(Ctx) {} 1151 explicit TargetHeaderX86(GlobalContext *Ctx) : TargetHeaderLowering(Ctx) {}
1131 }; 1152 };
1132 1153
1133 } // end of namespace X86NAMESPACE 1154 } // end of namespace X86NAMESPACE
1134 } // end of namespace Ice 1155 } // end of namespace Ice
1135 1156
1136 #include "IceTargetLoweringX86BaseImpl.h" 1157 #include "IceTargetLoweringX86BaseImpl.h"
1137 1158
1138 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H 1159 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698