提交 96bc443a 编写于 作者: V vlivanov

Merge

......@@ -1481,10 +1481,10 @@ bool LibraryCallKit::inline_math(vmIntrinsics::ID id) {
Node* arg = round_double_node(argument(0));
Node* n;
switch (id) {
case vmIntrinsics::_dabs: n = new (C) AbsDNode( arg); break;
case vmIntrinsics::_dsqrt: n = new (C) SqrtDNode(0, arg); break;
case vmIntrinsics::_dlog: n = new (C) LogDNode( arg); break;
case vmIntrinsics::_dlog10: n = new (C) Log10DNode( arg); break;
case vmIntrinsics::_dabs: n = new (C) AbsDNode( arg); break;
case vmIntrinsics::_dsqrt: n = new (C) SqrtDNode(C, control(), arg); break;
case vmIntrinsics::_dlog: n = new (C) LogDNode(C, control(), arg); break;
case vmIntrinsics::_dlog10: n = new (C) Log10DNode(C, control(), arg); break;
default: fatal_unexpected_iid(id); break;
}
set_result(_gvn.transform(n));
......@@ -1499,9 +1499,9 @@ bool LibraryCallKit::inline_trig(vmIntrinsics::ID id) {
Node* n = NULL;
switch (id) {
case vmIntrinsics::_dsin: n = new (C) SinDNode(arg); break;
case vmIntrinsics::_dcos: n = new (C) CosDNode(arg); break;
case vmIntrinsics::_dtan: n = new (C) TanDNode(arg); break;
case vmIntrinsics::_dsin: n = new (C) SinDNode(C, control(), arg); break;
case vmIntrinsics::_dcos: n = new (C) CosDNode(C, control(), arg); break;
case vmIntrinsics::_dtan: n = new (C) TanDNode(C, control(), arg); break;
default: fatal_unexpected_iid(id); break;
}
n = _gvn.transform(n);
......
......@@ -399,7 +399,10 @@ public:
// Cosinus of a double
class CosDNode : public Node {
public:
CosDNode( Node *in1 ) : Node(0, in1) {}
CosDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
init_flags(Flag_is_expensive);
C->add_expensive_node(this);
}
virtual int Opcode() const;
const Type *bottom_type() const { return Type::DOUBLE; }
virtual uint ideal_reg() const { return Op_RegD; }
......@@ -410,7 +413,10 @@ public:
// Sinus of a double
class SinDNode : public Node {
public:
SinDNode( Node *in1 ) : Node(0, in1) {}
SinDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
init_flags(Flag_is_expensive);
C->add_expensive_node(this);
}
virtual int Opcode() const;
const Type *bottom_type() const { return Type::DOUBLE; }
virtual uint ideal_reg() const { return Op_RegD; }
......@@ -422,7 +428,10 @@ public:
// tangens of a double
class TanDNode : public Node {
public:
TanDNode(Node *in1 ) : Node(0, in1) {}
TanDNode(Compile* C, Node *c,Node *in1) : Node(c, in1) {
init_flags(Flag_is_expensive);
C->add_expensive_node(this);
}
virtual int Opcode() const;
const Type *bottom_type() const { return Type::DOUBLE; }
virtual uint ideal_reg() const { return Op_RegD; }
......@@ -445,7 +454,10 @@ public:
// square root a double
class SqrtDNode : public Node {
public:
SqrtDNode(Node *c, Node *in1 ) : Node(c, in1) {}
SqrtDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
init_flags(Flag_is_expensive);
C->add_expensive_node(this);
}
virtual int Opcode() const;
const Type *bottom_type() const { return Type::DOUBLE; }
virtual uint ideal_reg() const { return Op_RegD; }
......@@ -470,7 +482,10 @@ public:
// Log_e of a double
class LogDNode : public Node {
public:
LogDNode( Node *in1 ) : Node(0, in1) {}
LogDNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
init_flags(Flag_is_expensive);
C->add_expensive_node(this);
}
virtual int Opcode() const;
const Type *bottom_type() const { return Type::DOUBLE; }
virtual uint ideal_reg() const { return Op_RegD; }
......@@ -481,7 +496,10 @@ public:
// Log_10 of a double
class Log10DNode : public Node {
public:
Log10DNode( Node *in1 ) : Node(0, in1) {}
Log10DNode(Compile* C, Node *c, Node *in1) : Node(c, in1) {
init_flags(Flag_is_expensive);
C->add_expensive_node(this);
}
virtual int Opcode() const;
const Type *bottom_type() const { return Type::DOUBLE; }
virtual uint ideal_reg() const { return Op_RegD; }
......
......@@ -143,7 +143,8 @@ void SuperWord::SLP_extract() {
// Ready the block
construct_bb();
if (!construct_bb())
return; // Exit if no interesting nodes or complex graph.
dependence_graph();
......@@ -615,6 +616,7 @@ void SuperWord::mem_slice_preds(Node* start, Node* stop, GrowableArray<Node*> &p
if (n == stop) break;
preds.push(n);
prev = n;
assert(n->is_Mem(), err_msg_res("unexpected node %s", n->Name()));
n = n->in(MemNode::Memory);
}
}
......@@ -1578,7 +1580,7 @@ bool SuperWord::is_vector_use(Node* use, int u_idx) {
//------------------------------construct_bb---------------------------
// Construct reverse postorder list of block members
void SuperWord::construct_bb() {
bool SuperWord::construct_bb() {
Node* entry = bb();
assert(_stk.length() == 0, "stk is empty");
......@@ -1596,6 +1598,12 @@ void SuperWord::construct_bb() {
Node *n = lpt()->_body.at(i);
set_bb_idx(n, i); // Create a temporary map
if (in_bb(n)) {
if (n->is_LoadStore() || n->is_MergeMem() ||
(n->is_Proj() && !n->as_Proj()->is_CFG())) {
// Bailout if the loop has LoadStore, MergeMem or data Proj
// nodes. Superword optimization does not work with them.
return false;
}
bb_ct++;
if (!n->is_CFG()) {
bool found = false;
......@@ -1620,6 +1628,10 @@ void SuperWord::construct_bb() {
if (in_bb(n) && (n->is_Phi() && n->bottom_type() == Type::MEMORY)) {
Node* n_tail = n->in(LoopNode::LoopBackControl);
if (n_tail != n->in(LoopNode::EntryControl)) {
if (!n_tail->is_Mem()) {
assert(n_tail->is_Mem(), err_msg_res("unexpected node for memory slice: %s", n_tail->Name()));
return false; // Bailout
}
_mem_slice_head.push(n);
_mem_slice_tail.push(n_tail);
}
......@@ -1695,6 +1707,7 @@ void SuperWord::construct_bb() {
}
#endif
assert(rpo_idx == -1 && bb_ct == _block.length(), "all block members found");
return (_mem_slice_head.length() > 0) || (_data_entry.length() > 0);
}
//------------------------------initialize_bb---------------------------
......
......@@ -380,7 +380,7 @@ class SuperWord : public ResourceObj {
// Is use->in(u_idx) a vector use?
bool is_vector_use(Node* use, int u_idx);
// Construct reverse postorder list of block members
void construct_bb();
bool construct_bb();
// Initialize per node info
void initialize_bb();
// Insert n into block after pos
......
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -27,7 +27,7 @@
* @bug 6850611
* @summary int / long arithmetic seems to be broken in 1.6.0_14 HotSpot Server VM (Win XP)
*
* @run main Test6850611
* @run main/timeout=480 Test6850611
*/
public class Test6850611 {
......
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -27,7 +27,7 @@
* @bug 6890943
* @summary JVM mysteriously gives wrong result on 64-bit 1.6 VMs in hotspot mode.
*
* @run shell Test6890943.sh
* @run shell/timeout=240 Test6890943.sh
*/
import java.util.*;
import java.io.*;
......
#!/bin/sh
#
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -52,7 +52,10 @@ cp ${TESTSRC}/Test6890943.sh .
${TESTJAVA}/bin/javac -d . Test6890943.java
${TESTJAVA}/bin/java -XX:-PrintVMOptions ${TESTVMOPTS} Test6890943 < input6890943.txt > test.out 2>&1
${TESTJAVA}/bin/java -XX:-PrintVMOptions -XX:+IgnoreUnrecognizedVMOptions ${TESTVMOPTS} Test6890943 < input6890943.txt > pretest.out 2>&1
# This test sometimes tickles an unrelated performance warning that interferes with diff.
grep -v 'warning: Performance bug: SystemDictionary' pretest.out > test.out
diff output6890943.txt test.out
......
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -27,7 +27,7 @@
* @bug 6905845
* @summary Server VM improperly optimizing away loop.
*
* @run main Test6905845
* @run main/timeout=480 Test6905845
*/
public class Test6905845 {
......
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -27,7 +27,7 @@
* @bug 6992759
* @summary Bad code generated for integer <= comparison, fails for Integer.MAX_VALUE
*
* @run main Test6992759
* @run main/timeout=240 Test6992759
*/
public class Test6992759 {
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册