Commit 49a79c90 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[Liftoff] Compile validation method only for SLOW_DCHECK

This method is only used in a slow dcheck, thus omit it completely
otherwise.

R=ahaas@chromium.org

Bug: v8:8238
Change-Id: Ic23d0ff10a1dfe9f383237c99a365c2d3ee93e51
Reviewed-on: https://chromium-review.googlesource.com/c/1349233Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57781}
parent f3fd0b3c
...@@ -604,6 +604,7 @@ void LiftoffAssembler::ParallelRegisterMove( ...@@ -604,6 +604,7 @@ void LiftoffAssembler::ParallelRegisterMove(
} }
} }
#ifdef ENABLE_SLOW_DCHECKS
bool LiftoffAssembler::ValidateCacheState() const { bool LiftoffAssembler::ValidateCacheState() const {
uint32_t register_use_count[kAfterMaxLiftoffRegCode] = {0}; uint32_t register_use_count[kAfterMaxLiftoffRegCode] = {0};
LiftoffRegList used_regs; LiftoffRegList used_regs;
...@@ -631,6 +632,7 @@ bool LiftoffAssembler::ValidateCacheState() const { ...@@ -631,6 +632,7 @@ bool LiftoffAssembler::ValidateCacheState() const {
os << "Use --trace-liftoff to debug."; os << "Use --trace-liftoff to debug.";
FATAL("%s", os.str().c_str()); FATAL("%s", os.str().c_str());
} }
#endif
LiftoffRegister LiftoffAssembler::SpillOneRegister(LiftoffRegList candidates, LiftoffRegister LiftoffAssembler::SpillOneRegister(LiftoffRegList candidates,
LiftoffRegList pinned) { LiftoffRegList pinned) {
......
...@@ -338,8 +338,10 @@ class LiftoffAssembler : public TurboAssembler { ...@@ -338,8 +338,10 @@ class LiftoffAssembler : public TurboAssembler {
}; };
void ParallelRegisterMove(Vector<ParallelRegisterMoveTuple>); void ParallelRegisterMove(Vector<ParallelRegisterMoveTuple>);
#ifdef ENABLE_SLOW_DCHECKS
// Validate that the register use counts reflect the state of the cache. // Validate that the register use counts reflect the state of the cache.
bool ValidateCacheState() const; bool ValidateCacheState() const;
#endif
//////////////////////////////////// ////////////////////////////////////
// Platform-specific part. // // Platform-specific part. //
......
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