Skip to content

Commit

Permalink
Remove unneeded content from FrontEnd.hpp
Browse files Browse the repository at this point in the history
* eliminate unnecessary includes and forward declarations
* fix up other files to accommodate removed includes and declarations

Signed-off-by: Daryl Maier <maier@ca.ibm.com>
  • Loading branch information
0xdaryl committed Nov 3, 2020
1 parent 69167f9 commit 29ccc32
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 32 deletions.
1 change: 1 addition & 0 deletions compiler/compile/OMRCompilation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
#include "env/StackMemoryRegion.hpp"
#include "env/TRMemory.hpp"
#include "env/TypeLayout.hpp"
#include "env/VerboseLog.hpp"
#include "env/defines.h"
#include "env/jittypes.h"
#include "il/Block.hpp"
Expand Down
1 change: 1 addition & 0 deletions compiler/compile/OSRData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "env/StackMemoryRegion.hpp"
#include "env/jittypes.h"
#include "env/CompilerEnv.hpp"
#include "env/VerboseLog.hpp"
#include "il/Block.hpp"
#include "il/Node.hpp"
#include "il/Node_inlines.hpp"
Expand Down
1 change: 1 addition & 0 deletions compiler/control/CompileMethod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include "env/PersistentInfo.hpp"
#include "env/Processors.hpp"
#include "env/TRMemory.hpp"
#include "env/VerboseLog.hpp"
#include "env/defines.h"
#include "env/jittypes.h"
#include "il/ResolvedMethodSymbol.hpp"
Expand Down
1 change: 1 addition & 0 deletions compiler/control/OMROptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "env/IO.hpp"
#include "env/ObjectModel.hpp"
#include "env/Processors.hpp"
#include "env/VerboseLog.hpp"
#include "env/defines.h"
#include "env/jittypes.h"
#include "il/DataTypes.hpp"
Expand Down
16 changes: 9 additions & 7 deletions compiler/env/CompileTimeProfiler.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2017, 2018 IBM Corp. and others
* Copyright (c) 2017, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -36,6 +36,8 @@
#include <unistd.h>
#include <sys/syscall.h>

#include "env/VerboseLog.hpp"

namespace TR {

/**
Expand All @@ -57,7 +59,7 @@ namespace TR {
* These defaults can be overridden using the TR_CompileTimeProfiler env var.
*
* The current implementation only supports perf, but other profiling
* utilities could be introduced.
* utilities could be introduced.
*
* In testing, the initial portion of the compile was lost, due to perf's
* start up. A delay has been added to manage this.
Expand All @@ -77,7 +79,7 @@ class CompileTimeProfiler
char timestr[_timeLength];
time_t timer = time(NULL);
snprintf(timestr, sizeof(timestr), "%i", (int32_t)timer % 100000);

char tidstr[_threadIDLength];
snprintf(tidstr, sizeof(tidstr), "%ld", syscall(SYS_gettid));

Expand All @@ -86,8 +88,8 @@ class CompileTimeProfiler
snprintf(filename, sizeof(filename), "%s.%s.%s.data", identifier ? identifier : "perf", tidstr, timestr);

// Build up the constant options, with env var override
if (filenamePos == 0)
parseOptions(cacheOptions, filenamePos, threadIDPos);
if (filenamePos == 0)
parseOptions(cacheOptions, filenamePos, threadIDPos);

// Copy and specialize options
char *options[_optionsLength];
Expand Down Expand Up @@ -120,7 +122,7 @@ class CompileTimeProfiler
// Give perf some time to start
usleep(_initMicroSecDelay);
}
}
}

~CompileTimeProfiler()
{
Expand Down Expand Up @@ -162,7 +164,7 @@ class CompileTimeProfiler
if (*iter == ' ')
{
*iter = '\0';
newArg = true;
newArg = true;
}
else if (newArg)
{
Expand Down
3 changes: 2 additions & 1 deletion compiler/env/FEBase.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2019 IBM Corp. and others
* Copyright (c) 2000, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -32,6 +32,7 @@
#include "env/FEBase.hpp"
#include "env/IO.hpp"
#include "env/JitConfig.hpp"
#include "env/VerboseLog.hpp"
#include "env/jittypes.h"
#include "compile/CompilationException.hpp"
#include "il/ILOps.hpp"
Expand Down
21 changes: 0 additions & 21 deletions compiler/env/FrontEnd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,50 +35,29 @@
// Add your query to the appropriate category, or create a new category if
// it is warranted.

#include "infra/List.hpp"
#include "infra/Random.hpp"

#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "codegen/CodeGenPhase.hpp"
#include "env/KnownObjectTable.hpp"
#include "codegen/Snippet.hpp"
#include "compile/CompilationTypes.hpp"
#include "env/Processors.hpp"
#include "env/ProcessorInfo.hpp"
#include "env/jittypes.h"
#include "il/DataTypes.hpp"
#include "il/ILOpCodes.hpp"
#include "il/ILOps.hpp"
#include "infra/Array.hpp"
#include "infra/Assert.hpp"
#include "infra/Flags.hpp"
#include "optimizer/OptimizationStrategies.hpp"
#include "optimizer/Optimizations.hpp"
#include "runtime/Runtime.hpp"
#include "env/VerboseLog.hpp"

class TR_Debug;
class TR_FrontEnd;
class TR_Memory;
class TR_ResolvedMethod;
namespace OMR { struct MethodMetaDataPOD; }
namespace TR { class CodeCache; }
namespace TR { class CodeGenerator; }
namespace TR { class Compilation; }
namespace TR { class MethodSymbol; }
namespace TR { class Node; }
namespace TR { class Options; }
namespace TR { class PersistentInfo; }
namespace TR { class ResolvedMethodSymbol; }
namespace TR { class Symbol; }
namespace TR { class SymbolReference; }
namespace TR { class TreeTop; }
struct TR_InlinedCallSite;
template <typename ListKind> class List;

char * feGetEnv(const char *);

Expand Down
3 changes: 2 additions & 1 deletion compiler/env/TRPersistentMemory.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2019 IBM Corp. and others
* Copyright (c) 2000, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -30,6 +30,7 @@
#include "control/Options_inlines.hpp"
#include "env/PersistentAllocator.hpp"
#include "env/TRMemory.hpp"
#include "env/VerboseLog.hpp"
#include "il/DataTypes.hpp"
#include "infra/Assert.hpp"
#include "infra/Monitor.hpp"
Expand Down
1 change: 1 addition & 0 deletions compiler/il/OMRResolvedMethodSymbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "env/TRMemory.hpp"
#include "env/jittypes.h"
#include "env/CompilerEnv.hpp"
#include "env/VerboseLog.hpp"
#include "il/AutomaticSymbol.hpp"
#include "il/Block.hpp"
#include "il/DataTypes.hpp"
Expand Down
3 changes: 2 additions & 1 deletion compiler/il/OMRResolvedMethodSymbol.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2019 IBM Corp. and others
* Copyright (c) 2000, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -35,6 +35,7 @@ namespace OMR { typedef OMR::ResolvedMethodSymbol ResolvedMethodSymbolConnector;
#include <stddef.h>
#include <stdint.h>
#include "env/FrontEnd.hpp"
#include "env/KnownObjectTable.hpp"
#include "compile/Method.hpp"
#include "compile/ResolvedMethod.hpp"
#include "il/MethodSymbol.hpp"
Expand Down
3 changes: 2 additions & 1 deletion compiler/infra/SimpleRegex.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2019 IBM Corp. and others
* Copyright (c) 2000, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -28,6 +28,7 @@
#include "compile/Compilation.hpp"
#include "compile/ResolvedMethod.hpp"
#include "env/StackMemoryRegion.hpp"
#include "env/VerboseLog.hpp"
#include "il/DataTypes.hpp"
#include "ras/Debug.hpp"
#include "ras/IgnoreLocale.hpp"
Expand Down
1 change: 1 addition & 0 deletions compiler/ras/LimitFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "env/CompilerEnv.hpp"
#include "env/PersistentInfo.hpp"
#include "env/TRMemory.hpp"
#include "env/VerboseLog.hpp"
#include "env/jittypes.h"
#include "infra/Assert.hpp"
#include "optimizer/OptimizationManager.hpp"
Expand Down
1 change: 1 addition & 0 deletions compiler/ras/OptionsDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "env/ObjectModel.hpp"
#include "env/jittypes.h"
#include "env/CompilerEnv.hpp"
#include "env/VerboseLog.hpp"
#include "infra/Assert.hpp"
#include "infra/SimpleRegex.hpp"
#include "optimizer/Optimizations.hpp"
Expand Down
1 change: 1 addition & 0 deletions compiler/runtime/OMRCodeCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "env/IO.hpp"
#include "env/defines.h"
#include "env/jittypes.h"
#include "env/VerboseLog.hpp"
#include "il/DataTypes.hpp"
#include "infra/Assert.hpp"
#include "infra/CriticalSection.hpp"
Expand Down
1 change: 1 addition & 0 deletions compiler/runtime/OMRCodeCacheManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "env/defines.h"
#include "env/CompilerEnv.hpp"
#include "env/jittypes.h"
#include "env/VerboseLog.hpp"
#include "il/DataTypes.hpp"
#include "infra/Assert.hpp"
#include "infra/CriticalSection.hpp"
Expand Down

0 comments on commit 29ccc32

Please sign in to comment.