Skip to content

Commit 29ccc32

Browse files
committed
Remove unneeded content from FrontEnd.hpp
* 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>
1 parent 69167f9 commit 29ccc32

15 files changed

+26
-32
lines changed

compiler/compile/OMRCompilation.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#include "env/StackMemoryRegion.hpp"
5959
#include "env/TRMemory.hpp"
6060
#include "env/TypeLayout.hpp"
61+
#include "env/VerboseLog.hpp"
6162
#include "env/defines.h"
6263
#include "env/jittypes.h"
6364
#include "il/Block.hpp"

compiler/compile/OSRData.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "env/StackMemoryRegion.hpp"
3737
#include "env/jittypes.h"
3838
#include "env/CompilerEnv.hpp"
39+
#include "env/VerboseLog.hpp"
3940
#include "il/Block.hpp"
4041
#include "il/Node.hpp"
4142
#include "il/Node_inlines.hpp"

compiler/control/CompileMethod.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include "env/PersistentInfo.hpp"
4848
#include "env/Processors.hpp"
4949
#include "env/TRMemory.hpp"
50+
#include "env/VerboseLog.hpp"
5051
#include "env/defines.h"
5152
#include "env/jittypes.h"
5253
#include "il/ResolvedMethodSymbol.hpp"

compiler/control/OMROptions.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include "env/IO.hpp"
4040
#include "env/ObjectModel.hpp"
4141
#include "env/Processors.hpp"
42+
#include "env/VerboseLog.hpp"
4243
#include "env/defines.h"
4344
#include "env/jittypes.h"
4445
#include "il/DataTypes.hpp"

compiler/env/CompileTimeProfiler.hpp

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2017, 2018 IBM Corp. and others
2+
* Copyright (c) 2017, 2020 IBM Corp. and others
33
*
44
* This program and the accompanying materials are made available under
55
* the terms of the Eclipse Public License 2.0 which accompanies this
@@ -36,6 +36,8 @@
3636
#include <unistd.h>
3737
#include <sys/syscall.h>
3838

39+
#include "env/VerboseLog.hpp"
40+
3941
namespace TR {
4042

4143
/**
@@ -57,7 +59,7 @@ namespace TR {
5759
* These defaults can be overridden using the TR_CompileTimeProfiler env var.
5860
*
5961
* The current implementation only supports perf, but other profiling
60-
* utilities could be introduced.
62+
* utilities could be introduced.
6163
*
6264
* In testing, the initial portion of the compile was lost, due to perf's
6365
* start up. A delay has been added to manage this.
@@ -77,7 +79,7 @@ class CompileTimeProfiler
7779
char timestr[_timeLength];
7880
time_t timer = time(NULL);
7981
snprintf(timestr, sizeof(timestr), "%i", (int32_t)timer % 100000);
80-
82+
8183
char tidstr[_threadIDLength];
8284
snprintf(tidstr, sizeof(tidstr), "%ld", syscall(SYS_gettid));
8385

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

8890
// Build up the constant options, with env var override
89-
if (filenamePos == 0)
90-
parseOptions(cacheOptions, filenamePos, threadIDPos);
91+
if (filenamePos == 0)
92+
parseOptions(cacheOptions, filenamePos, threadIDPos);
9193

9294
// Copy and specialize options
9395
char *options[_optionsLength];
@@ -120,7 +122,7 @@ class CompileTimeProfiler
120122
// Give perf some time to start
121123
usleep(_initMicroSecDelay);
122124
}
123-
}
125+
}
124126

125127
~CompileTimeProfiler()
126128
{
@@ -162,7 +164,7 @@ class CompileTimeProfiler
162164
if (*iter == ' ')
163165
{
164166
*iter = '\0';
165-
newArg = true;
167+
newArg = true;
166168
}
167169
else if (newArg)
168170
{

compiler/env/FEBase.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2019 IBM Corp. and others
2+
* Copyright (c) 2000, 2020 IBM Corp. and others
33
*
44
* This program and the accompanying materials are made available under
55
* the terms of the Eclipse Public License 2.0 which accompanies this
@@ -32,6 +32,7 @@
3232
#include "env/FEBase.hpp"
3333
#include "env/IO.hpp"
3434
#include "env/JitConfig.hpp"
35+
#include "env/VerboseLog.hpp"
3536
#include "env/jittypes.h"
3637
#include "compile/CompilationException.hpp"
3738
#include "il/ILOps.hpp"

compiler/env/FrontEnd.hpp

-21
Original file line numberDiff line numberDiff line change
@@ -35,50 +35,29 @@
3535
// Add your query to the appropriate category, or create a new category if
3636
// it is warranted.
3737

38-
#include "infra/List.hpp"
39-
#include "infra/Random.hpp"
40-
4138
#include <stdarg.h>
4239
#include <stddef.h>
4340
#include <stdint.h>
4441
#include <stdio.h>
4542
#include <string.h>
46-
#include "codegen/CodeGenPhase.hpp"
47-
#include "env/KnownObjectTable.hpp"
48-
#include "codegen/Snippet.hpp"
49-
#include "compile/CompilationTypes.hpp"
50-
#include "env/Processors.hpp"
5143
#include "env/ProcessorInfo.hpp"
5244
#include "env/jittypes.h"
5345
#include "il/DataTypes.hpp"
5446
#include "il/ILOpCodes.hpp"
5547
#include "il/ILOps.hpp"
56-
#include "infra/Array.hpp"
57-
#include "infra/Assert.hpp"
58-
#include "infra/Flags.hpp"
59-
#include "optimizer/OptimizationStrategies.hpp"
60-
#include "optimizer/Optimizations.hpp"
6148
#include "runtime/Runtime.hpp"
62-
#include "env/VerboseLog.hpp"
6349

6450
class TR_Debug;
6551
class TR_FrontEnd;
6652
class TR_Memory;
6753
class TR_ResolvedMethod;
6854
namespace OMR { struct MethodMetaDataPOD; }
69-
namespace TR { class CodeCache; }
70-
namespace TR { class CodeGenerator; }
7155
namespace TR { class Compilation; }
72-
namespace TR { class MethodSymbol; }
73-
namespace TR { class Node; }
7456
namespace TR { class Options; }
7557
namespace TR { class PersistentInfo; }
7658
namespace TR { class ResolvedMethodSymbol; }
77-
namespace TR { class Symbol; }
7859
namespace TR { class SymbolReference; }
79-
namespace TR { class TreeTop; }
8060
struct TR_InlinedCallSite;
81-
template <typename ListKind> class List;
8261

8362
char * feGetEnv(const char *);
8463

compiler/env/TRPersistentMemory.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2019 IBM Corp. and others
2+
* Copyright (c) 2000, 2020 IBM Corp. and others
33
*
44
* This program and the accompanying materials are made available under
55
* the terms of the Eclipse Public License 2.0 which accompanies this
@@ -30,6 +30,7 @@
3030
#include "control/Options_inlines.hpp"
3131
#include "env/PersistentAllocator.hpp"
3232
#include "env/TRMemory.hpp"
33+
#include "env/VerboseLog.hpp"
3334
#include "il/DataTypes.hpp"
3435
#include "infra/Assert.hpp"
3536
#include "infra/Monitor.hpp"

compiler/il/OMRResolvedMethodSymbol.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "env/TRMemory.hpp"
3939
#include "env/jittypes.h"
4040
#include "env/CompilerEnv.hpp"
41+
#include "env/VerboseLog.hpp"
4142
#include "il/AutomaticSymbol.hpp"
4243
#include "il/Block.hpp"
4344
#include "il/DataTypes.hpp"

compiler/il/OMRResolvedMethodSymbol.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2019 IBM Corp. and others
2+
* Copyright (c) 2000, 2020 IBM Corp. and others
33
*
44
* This program and the accompanying materials are made available under
55
* the terms of the Eclipse Public License 2.0 which accompanies this
@@ -35,6 +35,7 @@ namespace OMR { typedef OMR::ResolvedMethodSymbol ResolvedMethodSymbolConnector;
3535
#include <stddef.h>
3636
#include <stdint.h>
3737
#include "env/FrontEnd.hpp"
38+
#include "env/KnownObjectTable.hpp"
3839
#include "compile/Method.hpp"
3940
#include "compile/ResolvedMethod.hpp"
4041
#include "il/MethodSymbol.hpp"

compiler/infra/SimpleRegex.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2019 IBM Corp. and others
2+
* Copyright (c) 2000, 2020 IBM Corp. and others
33
*
44
* This program and the accompanying materials are made available under
55
* the terms of the Eclipse Public License 2.0 which accompanies this
@@ -28,6 +28,7 @@
2828
#include "compile/Compilation.hpp"
2929
#include "compile/ResolvedMethod.hpp"
3030
#include "env/StackMemoryRegion.hpp"
31+
#include "env/VerboseLog.hpp"
3132
#include "il/DataTypes.hpp"
3233
#include "ras/Debug.hpp"
3334
#include "ras/IgnoreLocale.hpp"

compiler/ras/LimitFile.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "env/CompilerEnv.hpp"
3737
#include "env/PersistentInfo.hpp"
3838
#include "env/TRMemory.hpp"
39+
#include "env/VerboseLog.hpp"
3940
#include "env/jittypes.h"
4041
#include "infra/Assert.hpp"
4142
#include "optimizer/OptimizationManager.hpp"

compiler/ras/OptionsDebug.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "env/ObjectModel.hpp"
3232
#include "env/jittypes.h"
3333
#include "env/CompilerEnv.hpp"
34+
#include "env/VerboseLog.hpp"
3435
#include "infra/Assert.hpp"
3536
#include "infra/SimpleRegex.hpp"
3637
#include "optimizer/Optimizations.hpp"

compiler/runtime/OMRCodeCache.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "env/IO.hpp"
3434
#include "env/defines.h"
3535
#include "env/jittypes.h"
36+
#include "env/VerboseLog.hpp"
3637
#include "il/DataTypes.hpp"
3738
#include "infra/Assert.hpp"
3839
#include "infra/CriticalSection.hpp"

compiler/runtime/OMRCodeCacheManager.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "env/defines.h"
3434
#include "env/CompilerEnv.hpp"
3535
#include "env/jittypes.h"
36+
#include "env/VerboseLog.hpp"
3637
#include "il/DataTypes.hpp"
3738
#include "infra/Assert.hpp"
3839
#include "infra/CriticalSection.hpp"

0 commit comments

Comments
 (0)