Go to the documentation of this file.
15 #include "llvm/Config/llvm-config.h"
28 ArrayRef<std::optional<StringRef>> Redirects,
29 unsigned MemoryLimit, std::string *ErrMsg,
34 ArrayRef<std::optional<StringRef>> Redirects,
35 unsigned SecondsToWait,
unsigned MemoryLimit,
36 std::string *ErrMsg,
bool *ExecutionFailed,
37 std::optional<ProcessStatistics> *ProcStat,
39 assert(Redirects.empty() || Redirects.size() == 3);
41 if (
Execute(PI, Program,
Args, Env, Redirects, MemoryLimit, ErrMsg,
44 *ExecutionFailed =
false;
46 PI, SecondsToWait == 0 ? std::nullopt : std::optional(SecondsToWait),
48 return Result.ReturnCode;
52 *ExecutionFailed =
true;
59 ArrayRef<std::optional<StringRef>> Redirects,
60 unsigned MemoryLimit, std::string *ErrMsg,
61 bool *ExecutionFailed,
BitVector *AffinityMask) {
62 assert(Redirects.empty() || Redirects.size() == 3);
65 *ExecutionFailed =
false;
66 if (!
Execute(PI, Program,
Args, Env, Redirects, MemoryLimit, ErrMsg,
69 *ExecutionFailed =
true;
78 for (
const char *
A :
Args)
86 if (!Quote && !Escape) {
93 for (
const auto c :
Arg) {
94 if (
c ==
'"' ||
c ==
'\\' ||
c ==
'$')
This is an optimization pass for GlobalISel generic memory operations.
static constexpr size_t npos
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
ProcessInfo Wait(const ProcessInfo &PI, std::optional< unsigned > SecondsToWait, std::string *ErrMsg=nullptr, std::optional< ProcessStatistics > *ProcStat=nullptr, bool Polling=false)
This function waits for the process specified by PI to finish.
ProcessInfo ExecuteNoWait(StringRef Program, ArrayRef< StringRef > Args, std::optional< ArrayRef< StringRef >> Env, ArrayRef< std::optional< StringRef >> Redirects={}, unsigned MemoryLimit=0, std::string *ErrMsg=nullptr, bool *ExecutionFailed=nullptr, BitVector *AffinityMask=nullptr)
Similar to ExecuteAndWait, but returns immediately.
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
This class implements an extremely fast bulk output stream that can only output to a stream.
the resulting code requires compare and branches when and if the revised code is with conditional branches instead of More there is a byte word extend before each where there should be only and the condition codes are not remembered when the same two values are compared twice More LSR enhancements i8 and i32 load store addressing modes are identical int int c
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
StringRef - Represent a constant reference to a string, i.e.
This struct encapsulates information about a process.
static bool Execute(ProcessInfo &PI, StringRef Program, ArrayRef< StringRef > Args, std::optional< ArrayRef< StringRef >> Env, ArrayRef< std::optional< StringRef >> Redirects, unsigned MemoryLimit, std::string *ErrMsg, BitVector *AffinityMask)
int ExecuteAndWait(StringRef Program, ArrayRef< StringRef > Args, std::optional< ArrayRef< StringRef >> Env=std::nullopt, ArrayRef< std::optional< StringRef >> Redirects={}, unsigned SecondsToWait=0, unsigned MemoryLimit=0, std::string *ErrMsg=nullptr, bool *ExecutionFailed=nullptr, std::optional< ProcessStatistics > *ProcStat=nullptr, BitVector *AffinityMask=nullptr)
This function executes the program using the arguments provided.
void printArg(llvm::raw_ostream &OS, StringRef Arg, bool Quote)
Print a command argument, and optionally quote it.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
bool commandLineFitsWithinSystemLimits(StringRef Program, ArrayRef< StringRef > Args)
Return true if the given arguments fit within system-specific argument length limits.
void reserve(size_type N)
reference emplace_back(ArgTypes &&... Args)