diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2013-10-02 15:42:23 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2013-10-02 15:42:23 +0000 |
commit | dd5d86d992eb129ecd0bb013d2db2d6a0e8d2605 (patch) | |
tree | e408dd567e473235623fc853b5b993ea47cf0ce4 /runtime/libprofile/OptimalEdgeProfiling.c | |
parent | 6ffce6fa9295699078f81fabb9ca32f6f22bdf09 (diff) | |
download | external_llvm-dd5d86d992eb129ecd0bb013d2db2d6a0e8d2605.zip external_llvm-dd5d86d992eb129ecd0bb013d2db2d6a0e8d2605.tar.gz external_llvm-dd5d86d992eb129ecd0bb013d2db2d6a0e8d2605.tar.bz2 |
Remove the very substantial, largely unmaintained legacy PGO
infrastructure.
This was essentially work toward PGO based on a design that had several
flaws, partially dating from a time when LLVM had a different
architecture, and with an effort to modernize it abandoned without being
completed. Since then, it has bitrotted for several years further. The
result is nearly unusable, and isn't helping any of the modern PGO
efforts. Instead, it is getting in the way, adding confusion about PGO
in LLVM and distracting everyone with maintenance on essentially dead
code. Removing it paves the way for modern efforts around PGO.
Among other effects, this removes the last of the runtime libraries from
LLVM. Those are being developed in the separate 'compiler-rt' project
now, with somewhat different licensing specifically more approriate for
runtimes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191835 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime/libprofile/OptimalEdgeProfiling.c')
-rw-r--r-- | runtime/libprofile/OptimalEdgeProfiling.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/runtime/libprofile/OptimalEdgeProfiling.c b/runtime/libprofile/OptimalEdgeProfiling.c deleted file mode 100644 index 3a7631b..0000000 --- a/runtime/libprofile/OptimalEdgeProfiling.c +++ /dev/null @@ -1,45 +0,0 @@ -/*===-- OptimalEdgeProfiling.c - Support library for opt. edge profiling --===*\ -|* -|* The LLVM Compiler Infrastructure -|* -|* This file is distributed under the University of Illinois Open Source -|* License. See LICENSE.TXT for details. -|* -|*===----------------------------------------------------------------------===*| -|* -|* This file implements the call back routines for the edge profiling -|* instrumentation pass. This should be used with the -|* -insert-opt-edge-profiling LLVM pass. -|* -\*===----------------------------------------------------------------------===*/ - -#include "Profiling.h" -#include <stdlib.h> - -static unsigned *ArrayStart; -static unsigned NumElements; - -/* OptEdgeProfAtExitHandler - When the program exits, just write out the - * profiling data. - */ -static void OptEdgeProfAtExitHandler(void) { - /* Note that, although the array has a counter for each edge, not all - * counters are updated, the ones that are not used are initialised with -1. - * When loading this information the counters with value -1 have to be - * recalculated, it is guaranteed that this is possible. - */ - write_profiling_data(OptEdgeInfo, ArrayStart, NumElements); -} - - -/* llvm_start_opt_edge_profiling - This is the main entry point of the edge - * profiling library. It is responsible for setting up the atexit handler. - */ -int llvm_start_opt_edge_profiling(int argc, const char **argv, - unsigned *arrayStart, unsigned numElements) { - int Ret = save_arguments(argc, argv); - ArrayStart = arrayStart; - NumElements = numElements; - atexit(OptEdgeProfAtExitHandler); - return Ret; -} |