< prev index next >

src/share/vm/opto/chaitin.cpp

Print this page
rev 7793 : 8073315: Enable gcc -Wtype-limits and fix upcoming issues.
Summary: Relevant fixes in blockOffsetTable.cpp, os_linux.cpp, parCardTableModRefBS.cpp.
   1 /*
   2  * Copyright (c) 2000, 2014, 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  *


 585   // Merge multidefs if multiple defs representing the same value are used in a single block.
 586   merge_multidefs();
 587 
 588 #ifdef ASSERT
 589   // Veify the graph after RA.
 590   verify(&live_arena);
 591 #endif
 592 
 593   // max_reg is past the largest *register* used.
 594   // Convert that to a frame_slot number.
 595   if (_max_reg <= _matcher._new_SP) {
 596     _framesize = C->out_preserve_stack_slots();
 597   }
 598   else {
 599     _framesize = _max_reg -_matcher._new_SP;
 600   }
 601   assert((int)(_matcher._new_SP+_framesize) >= (int)_matcher._out_arg_limit, "framesize must be large enough");
 602 
 603   // This frame must preserve the required fp alignment
 604   _framesize = round_to(_framesize, Matcher::stack_alignment_in_slots());
 605   assert( _framesize >= 0 && _framesize <= 1000000, "sanity check" );
 606 #ifndef PRODUCT
 607   _total_framesize += _framesize;
 608   if ((int)_framesize > _max_framesize) {
 609     _max_framesize = _framesize;
 610   }
 611 #endif
 612 
 613   // Convert CISC spills
 614   fixup_spills();
 615 
 616   // Log regalloc results
 617   CompileLog* log = Compile::current()->log();
 618   if (log != NULL) {
 619     log->elem("regalloc attempts='%d' success='%d'", _trip_cnt, !C->failing());
 620   }
 621 
 622   if (C->failing()) {
 623     return;
 624   }
 625 


   1 /*
   2  * Copyright (c) 2000, 2015, 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  *


 585   // Merge multidefs if multiple defs representing the same value are used in a single block.
 586   merge_multidefs();
 587 
 588 #ifdef ASSERT
 589   // Veify the graph after RA.
 590   verify(&live_arena);
 591 #endif
 592 
 593   // max_reg is past the largest *register* used.
 594   // Convert that to a frame_slot number.
 595   if (_max_reg <= _matcher._new_SP) {
 596     _framesize = C->out_preserve_stack_slots();
 597   }
 598   else {
 599     _framesize = _max_reg -_matcher._new_SP;
 600   }
 601   assert((int)(_matcher._new_SP+_framesize) >= (int)_matcher._out_arg_limit, "framesize must be large enough");
 602 
 603   // This frame must preserve the required fp alignment
 604   _framesize = round_to(_framesize, Matcher::stack_alignment_in_slots());
 605   assert(_framesize <= 1000000, "sanity check");
 606 #ifndef PRODUCT
 607   _total_framesize += _framesize;
 608   if ((int)_framesize > _max_framesize) {
 609     _max_framesize = _framesize;
 610   }
 611 #endif
 612 
 613   // Convert CISC spills
 614   fixup_spills();
 615 
 616   // Log regalloc results
 617   CompileLog* log = Compile::current()->log();
 618   if (log != NULL) {
 619     log->elem("regalloc attempts='%d' success='%d'", _trip_cnt, !C->failing());
 620   }
 621 
 622   if (C->failing()) {
 623     return;
 624   }
 625 


< prev index next >