llvm.org GIT mirror llvm / 49f241b
Reordering fields to reduce padding in LLVM. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255554 91177308-0d34-0410-b5e6-96231b3b80d8 Ben Craig 3 years ago
3 changed file(s) with 38 addition(s) and 34 deletion(s). Raw diff Collapse all Expand all
5353 static const struct {
5454 const char *NameCStr;
5555 size_t NameLength;
56 ARM::ArchKind ID;
5756 const char *CPUAttrCStr;
5857 size_t CPUAttrLength;
5958 const char *SubArchCStr;
6059 size_t SubArchLength;
61 ARMBuildAttrs::CPUArch ArchAttr; // Arch ID in build attributes.
6260 unsigned DefaultFPU;
6361 unsigned ArchBaseExtensions;
62 ARM::ArchKind ID;
63 ARMBuildAttrs::CPUArch ArchAttr; // Arch ID in build attributes.
6464
6565 StringRef getName() const { return StringRef(NameCStr, NameLength); }
6666
7171 StringRef getSubArch() const { return StringRef(SubArchCStr, SubArchLength); }
7272 } ARCHNames[] = {
7373 #define ARM_ARCH(NAME, ID, CPU_ATTR, SUB_ARCH, ARCH_ATTR, ARCH_FPU, ARCH_BASE_EXT) \
74 {NAME, sizeof(NAME) - 1, ID, CPU_ATTR, sizeof(CPU_ATTR) - 1, SUB_ARCH, \
75 sizeof(SUB_ARCH) - 1, ARCH_ATTR, ARCH_FPU, ARCH_BASE_EXT},
74 {NAME, sizeof(NAME) - 1, CPU_ATTR, sizeof(CPU_ATTR) - 1, SUB_ARCH, \
75 sizeof(SUB_ARCH) - 1, ARCH_FPU, ARCH_BASE_EXT, ID, ARCH_ATTR},
7676 #include "llvm/Support/ARMTargetParser.def"
7777 };
7878
8484
8585 /// ShuffleVal - This represents a shufflevector operation.
8686 struct ShuffleVal {
87 Operator *Op; // The Operation used to generate this value.
8788 unsigned Cost; // Number of instrs used to generate this value.
88 Operator *Op; // The Operation used to generate this value.
8989 unsigned short Arg0, Arg1; // Input operands for this value.
9090
9191 ShuffleVal() : Cost(1000000) {}
101101
102102 /// Operator - This is a vector operation that is available for use.
103103 struct Operator {
104 const char *Name;
104105 unsigned short ShuffleMask;
105106 unsigned short OpNum;
106 const char *Name;
107107 unsigned Cost;
108108
109109 Operator(unsigned short shufflemask, const char *name, unsigned opnum,
110110 unsigned cost = 1)
111 : ShuffleMask(shufflemask), OpNum(opnum), Name(name), Cost(cost) {
111 : Name(name), ShuffleMask(shufflemask), OpNum(opnum),Cost(cost) {
112112 TheOperators.push_back(this);
113113 }
114114 ~Operator() {
150150 public:
151151 // The c'tor.
152152 GTestFlagSaver() {
153 color_ = GTEST_FLAG(color);
154 death_test_style_ = GTEST_FLAG(death_test_style);
155 filter_ = GTEST_FLAG(filter);
156 internal_run_death_test_ = GTEST_FLAG(internal_run_death_test);
157 output_ = GTEST_FLAG(output);
158 stream_result_to_ = GTEST_FLAG(stream_result_to);
159
160 random_seed_ = GTEST_FLAG(random_seed);
161 repeat_ = GTEST_FLAG(repeat);
162 stack_trace_depth_ = GTEST_FLAG(stack_trace_depth);
163
153164 also_run_disabled_tests_ = GTEST_FLAG(also_run_disabled_tests);
154165 break_on_failure_ = GTEST_FLAG(break_on_failure);
155166 catch_exceptions_ = GTEST_FLAG(catch_exceptions);
156 color_ = GTEST_FLAG(color);
157 death_test_style_ = GTEST_FLAG(death_test_style);
158167 death_test_use_fork_ = GTEST_FLAG(death_test_use_fork);
159 filter_ = GTEST_FLAG(filter);
160 internal_run_death_test_ = GTEST_FLAG(internal_run_death_test);
161168 list_tests_ = GTEST_FLAG(list_tests);
162 output_ = GTEST_FLAG(output);
163169 print_time_ = GTEST_FLAG(print_time);
164 random_seed_ = GTEST_FLAG(random_seed);
165 repeat_ = GTEST_FLAG(repeat);
166170 shuffle_ = GTEST_FLAG(shuffle);
167 stack_trace_depth_ = GTEST_FLAG(stack_trace_depth);
168 stream_result_to_ = GTEST_FLAG(stream_result_to);
169171 throw_on_failure_ = GTEST_FLAG(throw_on_failure);
170172 }
171173
172174 // The d'tor is not virtual. DO NOT INHERIT FROM THIS CLASS.
173175 ~GTestFlagSaver() {
176 GTEST_FLAG(color) = color_;
177 GTEST_FLAG(death_test_style) = death_test_style_;
178 GTEST_FLAG(filter) = filter_;
179 GTEST_FLAG(internal_run_death_test) = internal_run_death_test_;
180 GTEST_FLAG(output) = output_;
181 GTEST_FLAG(stream_result_to) = stream_result_to_;
182
183 GTEST_FLAG(random_seed) = random_seed_;
184 GTEST_FLAG(repeat) = repeat_;
185 GTEST_FLAG(stack_trace_depth) = stack_trace_depth_;
186
174187 GTEST_FLAG(also_run_disabled_tests) = also_run_disabled_tests_;
175188 GTEST_FLAG(break_on_failure) = break_on_failure_;
176189 GTEST_FLAG(catch_exceptions) = catch_exceptions_;
177 GTEST_FLAG(color) = color_;
178 GTEST_FLAG(death_test_style) = death_test_style_;
179190 GTEST_FLAG(death_test_use_fork) = death_test_use_fork_;
180 GTEST_FLAG(filter) = filter_;
181 GTEST_FLAG(internal_run_death_test) = internal_run_death_test_;
182191 GTEST_FLAG(list_tests) = list_tests_;
183 GTEST_FLAG(output) = output_;
184192 GTEST_FLAG(print_time) = print_time_;
185 GTEST_FLAG(random_seed) = random_seed_;
186 GTEST_FLAG(repeat) = repeat_;
187193 GTEST_FLAG(shuffle) = shuffle_;
188 GTEST_FLAG(stack_trace_depth) = stack_trace_depth_;
189 GTEST_FLAG(stream_result_to) = stream_result_to_;
190194 GTEST_FLAG(throw_on_failure) = throw_on_failure_;
191195 }
192196 private:
193197 // Fields for saving the original values of flags.
198 String color_;
199 String death_test_style_;
200 String filter_;
201 String internal_run_death_test_;
202 String output_;
203 String stream_result_to_;
204 internal::Int32 random_seed_;
205 internal::Int32 repeat_;
206 internal::Int32 stack_trace_depth_;
194207 bool also_run_disabled_tests_;
195208 bool break_on_failure_;
196209 bool catch_exceptions_;
197 String color_;
198 String death_test_style_;
199210 bool death_test_use_fork_;
200 String filter_;
201 String internal_run_death_test_;
202211 bool list_tests_;
203 String output_;
204212 bool print_time_;
205 internal::Int32 random_seed_;
206 internal::Int32 repeat_;
207213 bool shuffle_;
208 internal::Int32 stack_trace_depth_;
209 String stream_result_to_;
210214 bool throw_on_failure_;
211215 } GTEST_ATTRIBUTE_UNUSED_;
212216