clang 24.0.0git
Compilation.cpp File Reference
#include "clang/Driver/Compilation.h"
#include "clang/Basic/LLVM.h"
#include "clang/Driver/Action.h"
#include "clang/Driver/CommonArgs.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/Job.h"
#include "clang/Driver/ToolChain.h"
#include "clang/Driver/Util.h"
#include "clang/Options/Options.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/OptSpecifier.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/ThreadPool.h"
#include "llvm/Support/Threading.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/Triple.h"
#include <algorithm>
#include <cassert>
#include <optional>
#include <string>
#include <system_error>
#include <utility>

Go to the source code of this file.

Classes

struct  ParallelJobResult
struct  ParallelOffloadJobGroupResult

Typedefs

using FailingCommandList = SmallVectorImpl<std::pair<int, const Command *>>

Functions

static bool ActionFailed (const Action *A, const FailingCommandList &FailingCommands)
static bool ActionDependsOn (const Action *A, const Action *Other)
static bool ActionsAreIndependent (const Action *A, const Action *B)
static bool CanRunInParallelOffloadJobGroup (const Command &Job)
static bool SameParallelOffloadJobGroup (const Command &A, const Command &B)
static bool HasDistinctBoundArch (const Command &Candidate, ArrayRef< const Command * > Jobs)
static std::optional< llvm::ThreadPoolStrategy > getParallelOffloadJobsStrategy (const ArgList &Args, unsigned NumJobs)
static std::optional< ParallelOffloadJobGroupResulttryExecuteParallelOffloadJobGroup (const Driver &D, const ArgList &Args, ArrayRef< std::optional< StringRef > > Redirects, const JobList::list_type &JobStorage, size_t StartIndex, FailingCommandList &FailingCommands)

Typedef Documentation

◆ FailingCommandList

using FailingCommandList = SmallVectorImpl<std::pair<int, const Command *>>

Definition at line 216 of file Compilation.cpp.

Function Documentation

◆ ActionDependsOn()

bool ActionDependsOn ( const Action * A,
const Action * Other )
static

Definition at line 241 of file Compilation.cpp.

References clang::driver::Action::inputs(), and clang::Other.

Referenced by ActionsAreIndependent().

◆ ActionFailed()

◆ ActionsAreIndependent()

bool ActionsAreIndependent ( const Action * A,
const Action * B )
static

Definition at line 247 of file Compilation.cpp.

References ActionDependsOn().

Referenced by tryExecuteParallelOffloadJobGroup().

◆ CanRunInParallelOffloadJobGroup()

◆ getParallelOffloadJobsStrategy()

std::optional< llvm::ThreadPoolStrategy > getParallelOffloadJobsStrategy ( const ArgList & Args,
unsigned NumJobs )
static

◆ HasDistinctBoundArch()

bool HasDistinctBoundArch ( const Command & Candidate,
ArrayRef< const Command * > Jobs )
static

◆ SameParallelOffloadJobGroup()

bool SameParallelOffloadJobGroup ( const Command & A,
const Command & B )
static

◆ tryExecuteParallelOffloadJobGroup()