equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
512 //------------------------------are_adjacent_refs--------------------------- |
512 //------------------------------are_adjacent_refs--------------------------- |
513 // Is s1 immediately before s2 in memory? |
513 // Is s1 immediately before s2 in memory? |
514 bool SuperWord::are_adjacent_refs(Node* s1, Node* s2) { |
514 bool SuperWord::are_adjacent_refs(Node* s1, Node* s2) { |
515 if (!s1->is_Mem() || !s2->is_Mem()) return false; |
515 if (!s1->is_Mem() || !s2->is_Mem()) return false; |
516 if (!in_bb(s1) || !in_bb(s2)) return false; |
516 if (!in_bb(s1) || !in_bb(s2)) return false; |
|
517 |
|
518 // Do not use superword for non-primitives |
|
519 if (!is_java_primitive(s1->as_Mem()->memory_type()) || |
|
520 !is_java_primitive(s2->as_Mem()->memory_type())) { |
|
521 return false; |
|
522 } |
|
523 |
517 // FIXME - co_locate_pack fails on Stores in different mem-slices, so |
524 // FIXME - co_locate_pack fails on Stores in different mem-slices, so |
518 // only pack memops that are in the same alias set until that's fixed. |
525 // only pack memops that are in the same alias set until that's fixed. |
519 if (_phase->C->get_alias_index(s1->as_Mem()->adr_type()) != |
526 if (_phase->C->get_alias_index(s1->as_Mem()->adr_type()) != |
520 _phase->C->get_alias_index(s2->as_Mem()->adr_type())) |
527 _phase->C->get_alias_index(s2->as_Mem()->adr_type())) |
521 return false; |
528 return false; |