Commit 215a6c6e authored by Ross McIlroy's avatar Ross McIlroy Committed by Commit Bot

[TurboFan][TurboProp] Replace CHECK with DCHECK in InputAt/ReplaceInput.

The range checks in InputAt and ReplaceInput are relatively expensive
given the high frequency of these calls and the bitfield decoding
required for InputCount. Make these DCHECKs instead of CHECKS

BUG=v8:9684

Change-Id: Ibee0f9b06b4581f3bc1176d1fe57de33cdd73cdc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2735274Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73249}
parent 1997c7a6
......@@ -69,14 +69,14 @@ class V8_EXPORT_PRIVATE Node final {
#endif
Node* InputAt(int index) const {
CHECK_LE(0, index);
CHECK_LT(index, InputCount());
DCHECK_LE(0, index);
DCHECK_LT(index, InputCount());
return *GetInputPtrConst(index);
}
void ReplaceInput(int index, Node* new_to) {
CHECK_LE(0, index);
CHECK_LT(index, InputCount());
DCHECK_LE(0, index);
DCHECK_LT(index, InputCount());
ZoneNodePtr* input_ptr = GetInputPtr(index);
Node* old_to = *input_ptr;
if (old_to != new_to) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment