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

Side by Side Diff: src/IceTargetLoweringX8664.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/IceTargetLoweringX8632.cpp ('k') | src/IceTargetLoweringX86Base.h » ('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/IceTargetLoweringX8664.cpp - x86-64 lowering -----------===// 1 //===- subzero/src/IceTargetLoweringX8664.cpp - x86-64 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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 // Validate the enum values in ICMPX8664_TABLE. 768 // Validate the enum values in ICMPX8664_TABLE.
769 namespace dummy2 { 769 namespace dummy2 {
770 // Define a temporary set of enum values based on low-level table entries. 770 // Define a temporary set of enum values based on low-level table entries.
771 enum _tmp_enum { 771 enum _tmp_enum {
772 #define X(val, C_32, C1_64, C2_64, C3_64) _tmp_##val, 772 #define X(val, C_32, C1_64, C2_64, C3_64) _tmp_##val,
773 ICMPX8664_TABLE 773 ICMPX8664_TABLE
774 #undef X 774 #undef X
775 _num 775 _num
776 }; 776 };
777 // Define a set of constants based on high-level table entries. 777 // Define a set of constants based on high-level table entries.
778 #define X(tag, str) static const int _table1_##tag = InstIcmp::tag; 778 #define X(tag, reverse, str) static const int _table1_##tag = InstIcmp::tag;
779 ICEINSTICMP_TABLE 779 ICEINSTICMP_TABLE
780 #undef X 780 #undef X
781 // Define a set of constants based on low-level table entries, and ensure the 781 // Define a set of constants based on low-level table entries, and ensure the
782 // table entry keys are consistent. 782 // table entry keys are consistent.
783 #define X(val, C_32, C1_64, C2_64, C3_64) \ 783 #define X(val, C_32, C1_64, C2_64, C3_64) \
784 static const int _table2_##val = _tmp_##val; \ 784 static const int _table2_##val = _tmp_##val; \
785 static_assert( \ 785 static_assert( \
786 _table1_##val == _table2_##val, \ 786 _table1_##val == _table2_##val, \
787 "Inconsistency between ICMPX8664_TABLE and ICEINSTICMP_TABLE"); 787 "Inconsistency between ICMPX8664_TABLE and ICEINSTICMP_TABLE");
788 ICMPX8664_TABLE 788 ICMPX8664_TABLE
789 #undef X 789 #undef X
790 // Repeat the static asserts with respect to the high-level table entries in 790 // Repeat the static asserts with respect to the high-level table entries in
791 // case the high-level table has extra entries. 791 // case the high-level table has extra entries.
792 #define X(tag, str) \ 792 #define X(tag, reverse, str) \
793 static_assert( \ 793 static_assert( \
794 _table1_##tag == _table2_##tag, \ 794 _table1_##tag == _table2_##tag, \
795 "Inconsistency between ICMPX8664_TABLE and ICEINSTICMP_TABLE"); 795 "Inconsistency between ICMPX8664_TABLE and ICEINSTICMP_TABLE");
796 ICEINSTICMP_TABLE 796 ICEINSTICMP_TABLE
797 #undef X 797 #undef X
798 } // end of namespace dummy2 798 } // end of namespace dummy2
799 799
800 // Validate the enum values in ICETYPEX8664_TABLE. 800 // Validate the enum values in ICETYPEX8664_TABLE.
801 namespace dummy3 { 801 namespace dummy3 {
802 // Define a temporary set of enum values based on low-level table entries. 802 // Define a temporary set of enum values based on low-level table entries.
(...skipping 22 matching lines...) Expand all
825 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \ 825 #define X(tag, sizeLog2, align, elts, elty, str, rcstr) \
826 static_assert(_table1_##tag == _table2_##tag, \ 826 static_assert(_table1_##tag == _table2_##tag, \
827 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE"); 827 "Inconsistency between ICETYPEX8664_TABLE and ICETYPE_TABLE");
828 ICETYPE_TABLE 828 ICETYPE_TABLE
829 #undef X 829 #undef X
830 } // end of namespace dummy3 830 } // end of namespace dummy3
831 } // end of anonymous namespace 831 } // end of anonymous namespace
832 832
833 } // end of namespace X8664 833 } // end of namespace X8664
834 } // end of namespace Ice 834 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | src/IceTargetLoweringX86Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698