misc: Fix coding style for struct's opening braces

The systemc dir was not included in this fix.

First it was identified that there were only occurrences
at 0, 1, 2 and 3 levels of indentation (and a single
occurrence of 2 and 3 spaces), using:

    grep -nrE --exclude-dir=systemc \
        "^ *struct [A-Za-z].* {$" src/

Then the following commands were run to replace:

<indent level>struct X ... {

by:

<indent level>struct X ...
<indent level>{

Level 0:
    grep -nrl --exclude-dir=systemc
        "^struct [A-Za-z].* {$" src/ | \
        xargs sed -Ei \
        's/^struct ([A-Za-z].*) \{$/struct \1\n\{/g'

Level 1:
    grep -nrl --exclude-dir=systemc \
        "^    struct [A-Za-z].* {$" src/ | \
        xargs sed -Ei \
        's/^    struct ([A-Za-z].*) \{$/    struct \1\n    \{/g'

and so on.

Change-Id: I362ef58c86912dabdd272c7debb8d25d587cd455
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39017
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Daniel R. Carvalho
2021-01-09 12:28:03 -03:00
committed by Daniel Carvalho
parent f96de41fcf
commit 2922f763e1
109 changed files with 584 additions and 292 deletions

View File

@@ -60,7 +60,8 @@ class IrregularStreamBuffer : public Queued
* Training Unit Entry datatype, it holds the last accessed address and
* its secure flag
*/
struct TrainingUnitEntry : public TaggedEntry {
struct TrainingUnitEntry : public TaggedEntry
{
Addr lastAddress;
bool lastAddressSecure;
};
@@ -68,7 +69,8 @@ class IrregularStreamBuffer : public Queued
AssociativeSet<TrainingUnitEntry> trainingUnit;
/** Address Mapping entry, holds an address and a confidence counter */
struct AddressMapping {
struct AddressMapping
{
Addr address;
SatCounter8 counter;
AddressMapping(unsigned bits) : address(0), counter(bits)

View File

@@ -71,7 +71,8 @@ class PIF : public Queued
* The temporal compactor tracks a small number of the
* most-recently-observed spatial region records.
*/
struct CompactorEntry {
struct CompactorEntry
{
Addr trigger;
std::vector<bool> prec;
std::vector<bool> succ;

View File

@@ -54,7 +54,8 @@ namespace Prefetcher {
class Queued : public Base
{
protected:
struct DeferredPacket : public BaseTLB::Translation {
struct DeferredPacket : public BaseTLB::Translation
{
/** Owner of the packet */
Queued *owner;
/** Prefetch info corresponding to this packet */

View File

@@ -77,7 +77,8 @@ class SBOOE : public Queued
/** Holds the current sum of the latency buffer latency */
Tick latencyBufferSum;
struct SandboxEntry {
struct SandboxEntry
{
/** Cache line predicted by the candidate prefetcher */
Addr line;
/** Tick when the simulated prefetch is expected to be filled */

View File

@@ -65,7 +65,8 @@ class STeMS : public Queued
* Entry data type for the Active Generation Table (AGT) and the Pattern
* Sequence Table (PST)
*/
struct ActiveGenerationTableEntry : public TaggedEntry {
struct ActiveGenerationTableEntry : public TaggedEntry
{
/** Physical address of the spatial region */
Addr paddress;
/** PC that started this generation */
@@ -74,7 +75,8 @@ class STeMS : public Queued
unsigned int seqCounter;
/** Sequence entry data type */
struct SequenceEntry {
struct SequenceEntry
{
/** 2-bit confidence counter */
SatCounter8 counter;
/** Offset, in cache lines, within the spatial region */
@@ -152,7 +154,8 @@ class STeMS : public Queued
AssociativeSet<ActiveGenerationTableEntry> patternSequenceTable;
/** Data type of the Region Miss Order Buffer entry */
struct RegionMissOrderBufferEntry {
struct RegionMissOrderBufferEntry
{
/** Address of the spatial region */
Addr srAddress;
/**