Mercurial > hg > truffle
comparison src/share/vm/adlc/formssel.cpp @ 624:337400e7a5dd
6797305: Add LoadUB and LoadUI opcode class
Summary: Add a LoadUB (unsigned byte) and LoadUI (unsigned int) opcode class so we have these load optimizations in the first place and do not need to handle them in the matcher.
Reviewed-by: never, kvn
author | twisti |
---|---|
date | Mon, 09 Mar 2009 03:17:11 -0700 |
parents | 98cb887364d3 |
children | 7bb995fbd3c0 |
comparison
equal
deleted
inserted
replaced
623:9adddb8c0fc8 | 624:337400e7a5dd |
---|---|
3308 | 3308 |
3309 int MatchNode::needs_ideal_memory_edge(FormDict &globals) const { | 3309 int MatchNode::needs_ideal_memory_edge(FormDict &globals) const { |
3310 static const char *needs_ideal_memory_list[] = { | 3310 static const char *needs_ideal_memory_list[] = { |
3311 "StoreI","StoreL","StoreP","StoreN","StoreD","StoreF" , | 3311 "StoreI","StoreL","StoreP","StoreN","StoreD","StoreF" , |
3312 "StoreB","StoreC","Store" ,"StoreFP", | 3312 "StoreB","StoreC","Store" ,"StoreFP", |
3313 "LoadI" ,"LoadL", "LoadP" ,"LoadN", "LoadD" ,"LoadF" , | 3313 "LoadI", "LoadUI2L", "LoadL", "LoadP" ,"LoadN", "LoadD" ,"LoadF" , |
3314 "LoadB" ,"LoadUS" ,"LoadS" ,"Load" , | 3314 "LoadB" , "LoadUB", "LoadUS" ,"LoadS" ,"Load" , |
3315 "Store4I","Store2I","Store2L","Store2D","Store4F","Store2F","Store16B", | 3315 "Store4I","Store2I","Store2L","Store2D","Store4F","Store2F","Store16B", |
3316 "Store8B","Store4B","Store8C","Store4C","Store2C", | 3316 "Store8B","Store4B","Store8C","Store4C","Store2C", |
3317 "Load4I" ,"Load2I" ,"Load2L" ,"Load2D" ,"Load4F" ,"Load2F" ,"Load16B" , | 3317 "Load4I" ,"Load2I" ,"Load2L" ,"Load2D" ,"Load4F" ,"Load2F" ,"Load16B" , |
3318 "Load8B" ,"Load4B" ,"Load8C" ,"Load4C" ,"Load2C" ,"Load8S", "Load4S","Load2S", | 3318 "Load8B" ,"Load4B" ,"Load8C" ,"Load4C" ,"Load2C" ,"Load8S", "Load4S","Load2S", |
3319 "LoadRange", "LoadKlass", "LoadNKlass", "LoadL_unaligned", "LoadD_unaligned", | 3319 "LoadRange", "LoadKlass", "LoadNKlass", "LoadL_unaligned", "LoadD_unaligned", |
3429 cisc_spillable = Maybe_cisc_spillable; | 3429 cisc_spillable = Maybe_cisc_spillable; |
3430 } else { | 3430 } else { |
3431 const InstructForm *form2_inst = form2 ? form2->is_instruction() : NULL; | 3431 const InstructForm *form2_inst = form2 ? form2->is_instruction() : NULL; |
3432 const char *name_left = mRule2->_lChild ? mRule2->_lChild->_opType : NULL; | 3432 const char *name_left = mRule2->_lChild ? mRule2->_lChild->_opType : NULL; |
3433 const char *name_right = mRule2->_rChild ? mRule2->_rChild->_opType : NULL; | 3433 const char *name_right = mRule2->_rChild ? mRule2->_rChild->_opType : NULL; |
3434 DataType data_type = Form::none; | |
3435 if (form->is_operand()) { | |
3436 // Make sure the loadX matches the type of the reg | |
3437 data_type = form->ideal_to_Reg_type(form->is_operand()->ideal_type(globals)); | |
3438 } | |
3434 // Detect reg vs (loadX memory) | 3439 // Detect reg vs (loadX memory) |
3435 if( form->is_cisc_reg(globals) | 3440 if( form->is_cisc_reg(globals) |
3436 && form2_inst | 3441 && form2_inst |
3437 && (is_load_from_memory(mRule2->_opType) != Form::none) // reg vs. (load memory) | 3442 && data_type != Form::none |
3443 && (is_load_from_memory(mRule2->_opType) == data_type) // reg vs. (load memory) | |
3438 && (name_left != NULL) // NOT (load) | 3444 && (name_left != NULL) // NOT (load) |
3439 && (name_right == NULL) ) { // NOT (load memory foo) | 3445 && (name_right == NULL) ) { // NOT (load memory foo) |
3440 const Form *form2_left = name_left ? globals[name_left] : NULL; | 3446 const Form *form2_left = name_left ? globals[name_left] : NULL; |
3441 if( form2_left && form2_left->is_cisc_mem(globals) ) { | 3447 if( form2_left && form2_left->is_cisc_mem(globals) ) { |
3442 cisc_spillable = Is_cisc_spillable; | 3448 cisc_spillable = Is_cisc_spillable; |