< prev index next >

src/hotspot/share/adlc/forms.cpp

Print this page

  1 /*
  2  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *

252 // True if 'opType', an ideal name, loads or stores.
253 Form::DataType Form::is_load_from_memory(const char *opType) const {
254   if( strcmp(opType,"LoadB")==0 )  return Form::idealB;
255   if( strcmp(opType,"LoadUB")==0 )  return Form::idealB;
256   if( strcmp(opType,"LoadUS")==0 )  return Form::idealC;
257   if( strcmp(opType,"LoadD")==0 )  return Form::idealD;
258   if( strcmp(opType,"LoadD_unaligned")==0 )  return Form::idealD;
259   if( strcmp(opType,"LoadF")==0 )  return Form::idealF;
260   if( strcmp(opType,"LoadI")==0 )  return Form::idealI;
261   if( strcmp(opType,"LoadKlass")==0 )  return Form::idealP;
262   if( strcmp(opType,"LoadNKlass")==0 ) return Form::idealNKlass;
263   if( strcmp(opType,"LoadL")==0 )  return Form::idealL;
264   if( strcmp(opType,"LoadL_unaligned")==0 )  return Form::idealL;
265   if( strcmp(opType,"LoadPLocked")==0 )  return Form::idealP;
266   if( strcmp(opType,"LoadP")==0 )  return Form::idealP;
267   if( strcmp(opType,"LoadN")==0 )  return Form::idealN;
268   if( strcmp(opType,"LoadRange")==0 )  return Form::idealI;
269   if( strcmp(opType,"LoadS")==0 )  return Form::idealS;
270   if( strcmp(opType,"LoadVector")==0 )  return Form::idealV;
271   if( strcmp(opType,"LoadVectorGather")==0 )  return Form::idealV;

272   if( strcmp(opType,"LoadVectorMasked")==0 )  return Form::idealV;
273   assert( strcmp(opType,"Load") != 0, "Must type Loads" );
274   return Form::none;
275 }
276 
277 Form::DataType Form::is_store_to_memory(const char *opType) const {
278   if( strcmp(opType,"StoreB")==0)  return Form::idealB;
279   if( strcmp(opType,"StoreCM")==0) return Form::idealB;
280   if( strcmp(opType,"StoreC")==0)  return Form::idealC;
281   if( strcmp(opType,"StoreD")==0)  return Form::idealD;
282   if( strcmp(opType,"StoreF")==0)  return Form::idealF;
283   if( strcmp(opType,"StoreI")==0)  return Form::idealI;
284   if( strcmp(opType,"StoreL")==0)  return Form::idealL;
285   if( strcmp(opType,"StoreP")==0)  return Form::idealP;
286   if( strcmp(opType,"StoreN")==0)  return Form::idealN;
287   if( strcmp(opType,"StoreNKlass")==0)  return Form::idealNKlass;
288   if( strcmp(opType,"StoreVector")==0 )  return Form::idealV;
289   if( strcmp(opType,"StoreVectorScatter")==0 )  return Form::idealV;

290   if( strcmp(opType,"StoreVectorMasked")==0 )  return Form::idealV;
291   assert( strcmp(opType,"Store") != 0, "Must type Stores" );
292   return Form::none;
293 }
294 
295 Form::InterfaceType Form::interface_type(FormDict &globals) const {
296   return Form::no_interface;
297 }
298 
299 //------------------------------FormList---------------------------------------
300 // Destructor
301 FormList::~FormList()  {
302   // // This list may not own its elements
303   // Form *cur  = _root;
304   // Form *next = NULL;
305   // for( ; (cur = next) != NULL; ) {
306   //   next = (Form *)cur->_next;
307   //   delete cur;
308   // }
309 };

  1 /*
  2  * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *

252 // True if 'opType', an ideal name, loads or stores.
253 Form::DataType Form::is_load_from_memory(const char *opType) const {
254   if( strcmp(opType,"LoadB")==0 )  return Form::idealB;
255   if( strcmp(opType,"LoadUB")==0 )  return Form::idealB;
256   if( strcmp(opType,"LoadUS")==0 )  return Form::idealC;
257   if( strcmp(opType,"LoadD")==0 )  return Form::idealD;
258   if( strcmp(opType,"LoadD_unaligned")==0 )  return Form::idealD;
259   if( strcmp(opType,"LoadF")==0 )  return Form::idealF;
260   if( strcmp(opType,"LoadI")==0 )  return Form::idealI;
261   if( strcmp(opType,"LoadKlass")==0 )  return Form::idealP;
262   if( strcmp(opType,"LoadNKlass")==0 ) return Form::idealNKlass;
263   if( strcmp(opType,"LoadL")==0 )  return Form::idealL;
264   if( strcmp(opType,"LoadL_unaligned")==0 )  return Form::idealL;
265   if( strcmp(opType,"LoadPLocked")==0 )  return Form::idealP;
266   if( strcmp(opType,"LoadP")==0 )  return Form::idealP;
267   if( strcmp(opType,"LoadN")==0 )  return Form::idealN;
268   if( strcmp(opType,"LoadRange")==0 )  return Form::idealI;
269   if( strcmp(opType,"LoadS")==0 )  return Form::idealS;
270   if( strcmp(opType,"LoadVector")==0 )  return Form::idealV;
271   if( strcmp(opType,"LoadVectorGather")==0 )  return Form::idealV;
272   if( strcmp(opType,"LoadVectorGatherMasked")==0 )  return Form::idealV;
273   if( strcmp(opType,"LoadVectorMasked")==0 )  return Form::idealV;
274   assert( strcmp(opType,"Load") != 0, "Must type Loads" );
275   return Form::none;
276 }
277 
278 Form::DataType Form::is_store_to_memory(const char *opType) const {
279   if( strcmp(opType,"StoreB")==0)  return Form::idealB;
280   if( strcmp(opType,"StoreCM")==0) return Form::idealB;
281   if( strcmp(opType,"StoreC")==0)  return Form::idealC;
282   if( strcmp(opType,"StoreD")==0)  return Form::idealD;
283   if( strcmp(opType,"StoreF")==0)  return Form::idealF;
284   if( strcmp(opType,"StoreI")==0)  return Form::idealI;
285   if( strcmp(opType,"StoreL")==0)  return Form::idealL;
286   if( strcmp(opType,"StoreP")==0)  return Form::idealP;
287   if( strcmp(opType,"StoreN")==0)  return Form::idealN;
288   if( strcmp(opType,"StoreNKlass")==0)  return Form::idealNKlass;
289   if( strcmp(opType,"StoreVector")==0 )  return Form::idealV;
290   if( strcmp(opType,"StoreVectorScatter")==0 )  return Form::idealV;
291   if( strcmp(opType,"StoreVectorScatterMasked")==0 )  return Form::idealV;
292   if( strcmp(opType,"StoreVectorMasked")==0 )  return Form::idealV;
293   assert( strcmp(opType,"Store") != 0, "Must type Stores" );
294   return Form::none;
295 }
296 
297 Form::InterfaceType Form::interface_type(FormDict &globals) const {
298   return Form::no_interface;
299 }
300 
301 //------------------------------FormList---------------------------------------
302 // Destructor
303 FormList::~FormList()  {
304   // // This list may not own its elements
305   // Form *cur  = _root;
306   // Form *next = NULL;
307   // for( ; (cur = next) != NULL; ) {
308   //   next = (Form *)cur->_next;
309   //   delete cur;
310   // }
311 };
< prev index next >