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

Side by Side Diff: src/IceTargetLoweringARM32.cpp

Issue 2124973005: Selectively invert ICMP operands for better address optimization (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Address Comments Created 4 years, 5 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
« no previous file with comments | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceTargetLoweringARM32.cpp - ARM32 lowering ------------===// 1 //===- subzero/src/IceTargetLoweringARM32.cpp - ARM32 lowering ------------===//
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 namespace { 163 namespace {
164 // Define a temporary set of enum values based on low-level table entries. 164 // Define a temporary set of enum values based on low-level table entries.
165 enum _icmp_ll_enum { 165 enum _icmp_ll_enum {
166 #define X(val, is_signed, swapped64, C_32, C1_64, C2_64, C_V, INV_V, NEG_V) \ 166 #define X(val, is_signed, swapped64, C_32, C1_64, C2_64, C_V, INV_V, NEG_V) \
167 _icmp_ll_##val, 167 _icmp_ll_##val,
168 ICMPARM32_TABLE 168 ICMPARM32_TABLE
169 #undef X 169 #undef X
170 _num 170 _num
171 }; 171 };
172 // Define a set of constants based on high-level table entries. 172 // Define a set of constants based on high-level table entries.
173 #define X(tag, str) static constexpr int _icmp_hl_##tag = InstIcmp::tag; 173 #define X(tag, reverse, str) \
174 static constexpr int _icmp_hl_##tag = InstIcmp::tag;
174 ICEINSTICMP_TABLE 175 ICEINSTICMP_TABLE
175 #undef X 176 #undef X
176 // Define a set of constants based on low-level table entries, and ensure the 177 // Define a set of constants based on low-level table entries, and ensure the
177 // table entry keys are consistent. 178 // table entry keys are consistent.
178 #define X(val, is_signed, swapped64, C_32, C1_64, C2_64, C_V, INV_V, NEG_V) \ 179 #define X(val, is_signed, swapped64, C_32, C1_64, C2_64, C_V, INV_V, NEG_V) \
179 static_assert( \ 180 static_assert( \
180 _icmp_ll_##val == _icmp_hl_##val, \ 181 _icmp_ll_##val == _icmp_hl_##val, \
181 "Inconsistency between ICMPARM32_TABLE and ICEINSTICMP_TABLE: " #val); 182 "Inconsistency between ICMPARM32_TABLE and ICEINSTICMP_TABLE: " #val);
182 ICMPARM32_TABLE 183 ICMPARM32_TABLE
183 #undef X 184 #undef X
184 // Repeat the static asserts with respect to the high-level table entries in 185 // Repeat the static asserts with respect to the high-level table entries in
185 // case the high-level table has extra entries. 186 // case the high-level table has extra entries.
186 #define X(tag, str) \ 187 #define X(tag, reverse, str) \
187 static_assert( \ 188 static_assert( \
188 _icmp_hl_##tag == _icmp_ll_##tag, \ 189 _icmp_hl_##tag == _icmp_ll_##tag, \
189 "Inconsistency between ICMPARM32_TABLE and ICEINSTICMP_TABLE: " #tag); 190 "Inconsistency between ICMPARM32_TABLE and ICEINSTICMP_TABLE: " #tag);
190 ICEINSTICMP_TABLE 191 ICEINSTICMP_TABLE
191 #undef X 192 #undef X
192 } // end of anonymous namespace 193 } // end of anonymous namespace
193 194
194 // Stack alignment 195 // Stack alignment
195 const uint32_t ARM32_STACK_ALIGNMENT_BYTES = 16; 196 const uint32_t ARM32_STACK_ALIGNMENT_BYTES = 16;
196 197
(...skipping 6949 matching lines...) Expand 10 before | Expand all | Expand 10 after
7146 // However, for compatibility with current NaCl LLVM, don't claim that. 7147 // However, for compatibility with current NaCl LLVM, don't claim that.
7147 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; 7148 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n";
7148 } 7149 }
7149 7150
7150 SmallBitVector TargetARM32::TypeToRegisterSet[RegARM32::RCARM32_NUM]; 7151 SmallBitVector TargetARM32::TypeToRegisterSet[RegARM32::RCARM32_NUM];
7151 SmallBitVector TargetARM32::TypeToRegisterSetUnfiltered[RegARM32::RCARM32_NUM]; 7152 SmallBitVector TargetARM32::TypeToRegisterSetUnfiltered[RegARM32::RCARM32_NUM];
7152 SmallBitVector TargetARM32::RegisterAliases[RegARM32::Reg_NUM]; 7153 SmallBitVector TargetARM32::RegisterAliases[RegARM32::Reg_NUM];
7153 7154
7154 } // end of namespace ARM32 7155 } // end of namespace ARM32
7155 } // end of namespace Ice 7156 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698