- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.graalvm.compiler.nodes.calc.ZeroExtendNode
类的一些代码示例,展示了ZeroExtendNode
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZeroExtendNode
类的具体详情如下:
包路径:org.graalvm.compiler.nodes.calc.ZeroExtendNode
类名称:ZeroExtendNode
[英]The ZeroExtendNode converts an integer to a wider integer using zero extension.
[中]ZeroExtendNode使用零扩展将整数转换为更宽的整数。
代码示例来源:origin: org.graalvm.compiler/compiler
public static ValueNode create(ValueNode input, int inputBits, int resultBits, NodeView view) {
return create(input, inputBits, resultBits, view, false);
}
代码示例来源:origin: org.graalvm.compiler/compiler
@Override
public ValueNode canonical(CanonicalizerTool tool, ValueNode forValue) {
NodeView view = NodeView.from(tool);
ValueNode ret = super.canonical(tool, forValue);
if (ret != this) {
return ret;
}
return canonical(this, forValue, getInputBits(), getResultBits(), view, inputAlwaysPositive);
}
代码示例来源:origin: org.graalvm.compiler/compiler
public static ValueNode create(ValueNode input, int inputBits, int resultBits, NodeView view, boolean alwaysPositive) {
IntegerConvertOp<ZeroExtend> signExtend = ArithmeticOpTable.forStamp(input.stamp(view)).getZeroExtend();
ValueNode synonym = findSynonym(signExtend, input, inputBits, resultBits, signExtend.foldStamp(inputBits, resultBits, input.stamp(view)));
if (synonym != null) {
return synonym;
}
return canonical(null, input, inputBits, resultBits, view, alwaysPositive);
}
代码示例来源:origin: org.graalvm.compiler/compiler
private static boolean applicableToImplicitZeroExtend(ZeroExtendNode zeroExtendNode) {
return zeroExtendNode.isInputAlwaysPositive() && zeroExtendNode.getInputBits() == INT_BITS && zeroExtendNode.getResultBits() == ADDRESS_BITS;
}
代码示例来源:origin: org.graalvm.compiler/compiler
@Override
public void generate(NodeLIRBuilderTool nodeValueMap, ArithmeticLIRGeneratorTool gen) {
nodeValueMap.setResult(this, gen.emitZeroExtend(nodeValueMap.operand(getValue()), getInputBits(), getResultBits()));
}
代码示例来源:origin: org.graalvm.compiler/compiler
return new ZeroExtendNode(other.getValue(), other.getInputBits(), resultBits, other.isInputAlwaysPositive());
return create(narrow.getValue(), resultBits, view);
} else if (istamp.getBits() > resultBits) {
self = new ZeroExtendNode(forValue, inputBits, resultBits, alwaysPositive);
代码示例来源:origin: org.graalvm.compiler/compiler
/**
* @param compressible whether the convert should be compressible
*/
protected ValueNode implicitLoadConvert(JavaKind kind, ValueNode value, boolean compressible) {
if (useCompressedOops(kind, compressible)) {
return newCompressionNode(CompressionOp.Uncompress, value);
}
switch (kind) {
case Byte:
case Short:
return new SignExtendNode(value, 32);
case Boolean:
case Char:
return new ZeroExtendNode(value, 32);
}
return value;
}
代码示例来源:origin: org.graalvm.compiler/compiler
} else if (forValue instanceof ZeroExtendNode) {
ZeroExtendNode other = (ZeroExtendNode) forValue;
if (other.getResultBits() > other.getInputBits()) {
return ZeroExtendNode.create(other.getValue(), other.getInputBits(), resultBits, view, other.isInputAlwaysPositive());
return ZeroExtendNode.create(forValue, inputBits, resultBits, view, true);
代码示例来源:origin: org.graalvm.compiler/compiler
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode value) {
// return (char) (Integer.reverse(i) >> 16);
ReverseBytesNode reverse = b.add(new ReverseBytesNode(value));
RightShiftNode rightShift = b.add(new RightShiftNode(reverse, b.add(ConstantNode.forInt(16))));
ZeroExtendNode charCast = b.add(new ZeroExtendNode(b.add(new NarrowNode(rightShift, 16)), 32));
b.push(JavaKind.Char, b.append(charCast.canonical(null)));
return true;
}
});
代码示例来源:origin: org.graalvm.compiler/compiler
return new ZeroExtendNode(other.getValue(), other.getInputBits(), getResultBits(), ((ZeroExtendNode) other).isInputAlwaysPositive());
代码示例来源:origin: org.graalvm.compiler/compiler
@MatchRule("(ZeroExtend Read=access)")
@MatchRule("(ZeroExtend FloatingRead=access)")
public ComplexMatchResult zeroExtend(ZeroExtendNode root, Access access) {
return emitZeroExtendMemory(access, root.getInputBits(), root.getResultBits());
}
代码示例来源:origin: org.graalvm.compiler/compiler
/**
* Given that Add(a, cst) is always positive, performs the following: ZeroExtend(Add(a, cst)) ->
* Add(SignExtend(a), SignExtend(cst)).
*/
private static void optimizeAdd(ZeroExtendNode zeroExtendNode, ConstantNode constant, ValueNode other, LoopEx loop) {
StructuredGraph graph = zeroExtendNode.graph();
AddNode addNode = graph.unique(new AddNode(signExtend(other, loop), ConstantNode.forLong(constant.asJavaConstant().asInt(), graph)));
zeroExtendNode.replaceAtUsages(addNode);
}
代码示例来源:origin: org.graalvm.compiler/compiler
private static ValueNode tryImplicitZeroExtend(ValueNode input) {
if (input instanceof ZeroExtendNode) {
ZeroExtendNode zeroExtendNode = (ZeroExtendNode) input;
if (applicableToImplicitZeroExtend(zeroExtendNode)) {
return zeroExtendNode.getValue();
}
}
return input;
}
代码示例来源:origin: org.graalvm.compiler/compiler
@MatchRule("(ZeroExtend Read=access)")
@MatchRule("(ZeroExtend FloatingRead=access)")
public ComplexMatchResult zeroExtend(ZeroExtendNode root, LIRLowerableAccess access) {
AMD64Kind memoryKind = getMemoryKind(access);
return builder -> getArithmeticLIRGenerator().emitZeroExtendMemory(memoryKind, root.getResultBits(), (AMD64AddressValue) operand(access.getAddress()), getState(access));
}
代码示例来源:origin: com.oracle.substratevm/svm
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver unused, ValueNode objectNode) {
if (ReferenceAccess.singleton().haveCompressedReferences()) {
ValueNode compressedObj = SubstrateCompressionNode.compress(objectNode, ImageSingletons.lookup(CompressEncoding.class));
JavaKind compressedIntKind = JavaKind.fromWordSize(ConfigurationValues.getObjectLayout().getReferenceSize());
ValueNode compressedValue = b.add(WordCastNode.narrowOopToUntrackedWord(compressedObj, compressedIntKind));
b.addPush(JavaKind.Object, ZeroExtendNode.convertUnsigned(compressedValue, FrameAccess.getWordStamp(), NodeView.DEFAULT));
} else {
b.addPush(JavaKind.Object, WordCastNode.objectToUntrackedPointer(objectNode, FrameAccess.getWordKind()));
}
return true;
}
});
代码示例来源:origin: org.graalvm.compiler/compiler
public ValueNode convert(GraphBuilderContext b, ValueNode value, JavaKind toKind, boolean unsigned) {
if (value.getStackKind() == toKind) {
return value;
}
if (toKind == JavaKind.Int) {
assert value.getStackKind() == JavaKind.Long;
return b.add(new NarrowNode(value, 32));
} else {
assert toKind == JavaKind.Long;
assert value.getStackKind() == JavaKind.Int;
if (unsigned) {
return b.add(new ZeroExtendNode(value, 64));
} else {
return b.add(new SignExtendNode(value, 64));
}
}
}
代码示例来源:origin: org.graalvm.compiler/compiler
private static void tryOptimize(OffsetAddressNode offsetAddress, LoopEx loop) {
EconomicMap<Node, InductionVariable> ivs = loop.getInductionVariables();
InductionVariable currentIV = ivs.get(offsetAddress.getOffset());
while (currentIV != null) {
if (!(currentIV instanceof DerivedInductionVariable)) {
break;
}
ValueNode currentValue = currentIV.valueNode();
if (currentValue.isDeleted()) {
break;
}
if (currentValue instanceof ZeroExtendNode) {
ZeroExtendNode zeroExtendNode = (ZeroExtendNode) currentValue;
if (applicableToImplicitZeroExtend(zeroExtendNode)) {
ValueNode input = zeroExtendNode.getValue();
if (input instanceof AddNode) {
AddNode add = (AddNode) input;
if (add.getX().isConstant()) {
optimizeAdd(zeroExtendNode, (ConstantNode) add.getX(), add.getY(), loop);
} else if (add.getY().isConstant()) {
optimizeAdd(zeroExtendNode, (ConstantNode) add.getY(), add.getX(), loop);
}
}
}
}
currentIV = ((DerivedInductionVariable) currentIV).getBase();
}
}
代码示例来源:origin: org.graalvm.compiler/compiler
long shortestTrip = (extremum - init) / stride + 1;
if (countedLoopInfo.constantMaxTripCount().equals(shortestTrip)) {
return graph.unique(new ZeroExtendNode(input, INT_BITS, ADDRESS_BITS, true));
inductionVariable.direction() == InductionVariable.Direction.Up &&
(countedLoopInfo.getOverFlowGuard() != null || countedLoopInfo.counterNeverOverflows())) {
return graph.unique(new ZeroExtendNode(input, INT_BITS, ADDRESS_BITS, true));
代码示例来源:origin: org.graalvm.compiler/compiler
protected ValueNode genZeroExtend(ValueNode input, int bitCount) {
return ZeroExtendNode.create(input, bitCount, NodeView.DEFAULT);
}
代码示例来源:origin: com.oracle.substratevm/svm
return graph.unique(new NarrowNode(value, toBits));
} else if (isUnsigned) {
return graph.unique(new ZeroExtendNode(value, toBits));
} else {
return graph.unique(new SignExtendNode(value, toBits));
我想过滤掉特定列上具有特定颜色的行。我尝试几乎到处搜索但找不到答案。希望大家给点好的建议,谢谢。 最佳答案 据我所知,目前没有内置函数允许根据单元格的格式选择单元格。但在 this OOo forum
我有一个百分比表: A | B | C ------------------- 1| 12% | 22% | 42% ------------------- 2| 52% | 2%
我有一个格式为 HH:MM 的时间值求和列。总和的格式为 [HH]:MM,可防止 HH > 23 时翻转。我希望将此值转换为十进制数表示形式。例如: A B 1 12
LibreOffice Calc 中的什么公式将计算不同 Week_Number 出现的次数?答案应该是2。 最佳答案 这个问题之前已经被问过很多次了。一种方法是在 B6 中输入以下公式然后按 Ctr
我在 Calc 电子表格中有几个数据列,每个列有 400 到 500 个条目。对于这些列中的每一列,我只想简单地找到均值和标准差,但不知道如何进行。 有人可以用简单而非技术性的语言逐步指导我如何做到这
假设我在 LibreOffice calc 中有以下电子表格: | A | B | C | D | ------------------- |1| 1 | 2 | | 2 | |2| 2 |
LibreOffice Calc 中是否有接受 的函数整数 x 和 整数 y 并以该位置吐出单元格的内容? 有一个功能ADDRESS吐出给定 [x;y] 的地址。问题是我不知道如何取消引用它。 最佳答
我希望能够在 LibreOffice Calc 中选择两个单元格,然后按某种魔术键,结果交换两个单元格的内容。 我怎么做? 我为 Excel 找到了这个解决方案,但它在 LibreOffice 中不起
我有两列有数字。当另一个有重复时,另一个只有一次数字。这些列中的数字不匹配。我需要在 B 列中找到在 A 列中匹配的所有数字。 这可能更好地解释了它: 甲乙 1 2 2 2 4 5 6 5 7 6 8
我想为 Calc 编写一个返回 #VALUE 的 Basic 函数!可使用 ISERR() 进行测试。 Function foo() foo = #VALUE! End Function 但是
我正在寻找一种使用 LibreOffice 的 Calc 从网站获取一些数据的方法。 我之前使用带有 IMPORTXML 函数的 Google 表格,但因为它非常不可靠,所以我想改用 Calc。 我的
我有这些单元格的 A 列: A1: Apple A2: Banana A3: Cherry 我想要一个公式,将它们串在一个单元格中,如下所示: "Apple, Banana, Cherry" 最佳答案
我想从 LibreOffice Calc 中多次出现的字符中获取最后一次出现。 例如我有一个字符串 abc1ba2ac2adeaa43add .现在,如果我正在搜索 a它应该返回 18。 最佳答案 使
假设我有这个这个单元格: 然后出于某种原因,我想自动反转列的顺序,变成这样: 任何帮助将不胜感激! 最佳答案 快速步骤: 在 1 上方插入新行 用单调递增的整数索引向右填充行。 然后选择您的数据并降序
我想在 LibreOffice Calc(v5.4.4.2 但可以升级)中实现一些条件格式,以突出显示其值通过公式计算而不是直接输入的单元格。 例如,一个单元格包含 =A3 将突出显示,而 Hello
我有一个 LibreOffice 3 电子表格(在 Ubuntu 11.04 上),其中有一列包含数百个超链接,这些超链接仅显示为“链接”。 我需要将这些转换为纯文本,或者更糟糕的是显示超链接而不是文
我在屏幕上有四个绝对定位的 div,它们需要在所有分辨率下保持它们的位置。 div1 - 高度 150px,顶部 0px div2 - 高度 30%,顶部 150px div3 - 高度 50 像素,
所以我很清楚,一般来说,应该在 JS 和浏览器检测中使用特征检测。 jQuery 1.9 放弃了 $.browser 就是一个很好的例子。 此外,在我阅读的每篇文章中,都说永远不要使用浏览器检测。 但
到目前为止,我一直在使用 em-calc 在我的 Zurb Foundation 元素中定义 CSS 大小。但是,最近我注意到开发人员越来越多地使用 rem-calc。 我知道每个函数的作用,但我不太
如何在另一个 CSS calc 函数中使用 CSS calc 函数?根据这个post这是可能的,但没有这样的例子。 最佳答案 It is possible to use calc() inside a
我是一名优秀的程序员,十分优秀!