This pull request is a revised version of #76587. This pull request fixes some build issues that were present in the previous version of this change. > This pull request is the first part of an ongoing effort to extends PGO instrumentation to GPU device code. This PR makes the following changes: > > - Adds blank registration functions to device RTL > - Gives PGO globals protected visibility when targeting a supported GPU > - Handles any addrspace casts for PGO calls > - Implements PGO global extraction in GPU plugins (currently only dumps info) > > These changes can be tested by supplying `-fprofile-instrument=clang` while targeting a GPU.
22 lines
748 B
C
22 lines
748 B
C
//===-------- Profiling.h - OpenMP interface ---------------------- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef OMPTARGET_DEVICERTL_PROFILING_H
|
|
#define OMPTARGET_DEVICERTL_PROFILING_H
|
|
|
|
extern "C" {
|
|
void __llvm_profile_register_function(void *Ptr);
|
|
void __llvm_profile_register_names_function(void *Ptr, long int I);
|
|
void __llvm_profile_instrument_memop(long int I, void *Ptr, int I2);
|
|
}
|
|
|
|
#endif
|