chromium/v8/src/compiler/phase.h

// Copyright 2023 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef V8_COMPILER_PHASE_H_
#define V8_COMPILER_PHASE_H_

#include "src/compiler/backend/code-generator.h"
#include "src/logging/runtime-call-stats.h"

#ifdef V8_RUNTIME_CALL_STATS
#define DECL_PIPELINE_PHASE_CONSTANTS_HELPER(Name, Kind, Mode)
#else  // V8_RUNTIME_CALL_STATS
#define DECL_PIPELINE_PHASE_CONSTANTS_HELPER
#endif  // V8_RUNTIME_CALL_STATS

#define DECL_PIPELINE_PHASE_CONSTANTS(Name)

#define DECL_MAIN_THREAD_PIPELINE_PHASE_CONSTANTS(Name)

namespace v8::internal {

class OptimizedCompilationInfo;

namespace compiler {

inline constexpr char kCodegenZoneName[] =;
inline constexpr char kGraphZoneName[] =;
inline constexpr char kInstructionZoneName[] =;
inline constexpr char kRegisterAllocationZoneName[] =;
inline constexpr char kRegisterAllocatorVerifierZoneName[] =;

class TFPipelineData;
class Schedule;
void PrintCode(Isolate* isolate, DirectHandle<Code> code,
               OptimizedCompilationInfo* info);
void TraceSchedule(OptimizedCompilationInfo* info, TFPipelineData* data,
                   Schedule* schedule, const char* phase_name);

enum class PhaseKind {};

struct InstructionStartsAsJSON {};

inline std::ostream& operator<<(std::ostream& out, InstructionStartsAsJSON s) {}

struct TurbolizerCodeOffsetsInfoAsJSON {};

inline std::ostream& operator<<(std::ostream& out,
                                TurbolizerCodeOffsetsInfoAsJSON s) {}

struct BlockStartsAsJSON {};

inline std::ostream& operator<<(std::ostream& out, BlockStartsAsJSON s) {}

}  // namespace compiler
}  // namespace v8::internal

#endif  // V8_COMPILER_PHASE_H_