Skip to content

Commit 862d1d9

Browse files
paigealesys_zuul
authored andcommitted
This is a clean-up change for fixing EOL whitespace
Change-Id: I91c714f4476bcc2b168596bc3840a94adc337bf6
1 parent 2523023 commit 862d1d9

File tree

414 files changed

+5971
-5971
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

414 files changed

+5971
-5971
lines changed

IGC/AdaptorCommon/AddImplicitArgs.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ bool AddImplicitArgs::runOnModule(Module &M)
7676
m_pMdUtils = getAnalysis<MetaDataUtilsWrapper>().getMetaDataUtils();
7777
CodeGenContext* ctx = getAnalysis<CodeGenContextWrapper>().getCodeGenContext();
7878

79-
// Update function signatures
79+
// Update function signatures
8080
// Create new functions with implicit args
8181
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
8282
{
@@ -146,7 +146,7 @@ bool AddImplicitArgs::runOnModule(Module &M)
146146
// Loop over the argument list, transferring uses of the old arguments over to
147147
// the new arguments
148148
updateNewFuncArgs(pFunc, pNewFunc, &implicitArgs);
149-
149+
150150
// Map old func to new func
151151
funcsMapping[pFunc] = pNewFunc;
152152

@@ -168,7 +168,7 @@ bool AddImplicitArgs::runOnModule(Module &M)
168168
// Function declarations are changing, this needs to be reflected in the metadata.
169169
MetadataBuilder mbuilder(&M);
170170
auto &FuncMD = ctx->getModuleMetaData()->FuncMD;
171-
for (auto i : funcsMapping)
171+
for (auto i : funcsMapping)
172172
{
173173
auto oldFuncIter = m_pMdUtils->findFunctionsInfoItem(i.first);
174174
m_pMdUtils->setFunctionsInfoItem(i.second, oldFuncIter->second);
@@ -183,7 +183,7 @@ bool AddImplicitArgs::runOnModule(Module &M)
183183
}
184184
}
185185
m_pMdUtils->save(M.getContext());
186-
186+
187187
//Return if any error
188188
if (!(getAnalysis<CodeGenContextWrapper>().getCodeGenContext()->oclErrorMessage.empty()))
189189
{
@@ -209,7 +209,7 @@ bool AddImplicitArgs::runOnModule(Module &M)
209209
return true;
210210
}
211211

212-
FunctionType* AddImplicitArgs::getNewFuncType(Function* pFunc, const ImplicitArgs* pImplicitArgs)
212+
FunctionType* AddImplicitArgs::getNewFuncType(Function* pFunc, const ImplicitArgs* pImplicitArgs)
213213
{
214214
// Add all explicit parameters
215215
FunctionType* pFuncType = pFunc->getFunctionType();
@@ -220,12 +220,12 @@ FunctionType* AddImplicitArgs::getNewFuncType(Function* pFunc, const ImplicitArg
220220
{
221221
newParamTypes.push_back((*pImplicitArgs)[i].getLLVMType(pFunc->getContext()));
222222
}
223-
223+
224224
// Create new function type with explicit and implicit parameter types
225225
return FunctionType::get( pFunc->getReturnType(),newParamTypes, pFunc->isVarArg());
226226
}
227227

228-
void AddImplicitArgs::updateNewFuncArgs(llvm::Function* pFunc, llvm::Function* pNewFunc, const ImplicitArgs* pImplicitArgs)
228+
void AddImplicitArgs::updateNewFuncArgs(llvm::Function* pFunc, llvm::Function* pNewFunc, const ImplicitArgs* pImplicitArgs)
229229
{
230230
// Loop over the argument list, transferring uses of the old arguments over to
231231
// the new arguments, also transferring over the names as well.
@@ -279,7 +279,7 @@ void AddImplicitArgs::updateNewFuncArgs(llvm::Function* pFunc, llvm::Function* p
279279
llvm::Value* newArg = &(*currArg);
280280
if ((*I).getType() != currArg->getType())
281281
{
282-
// fix opague type mismatch on %opencl.image...
282+
// fix opague type mismatch on %opencl.image...
283283
std::string str0;
284284
llvm::raw_string_ostream s(str0);
285285
currArg->getType()->print(s);
@@ -420,7 +420,7 @@ void AddImplicitArgs::replaceAllUsesWithNewOCLBuiltinFunction(CodeGenContext* ct
420420
llvm::Value* arg = cInst->getOperand(i);
421421
if (arg->getType() != new_arg_iter->getType())
422422
{
423-
// fix opague type mismatch on %opencl...
423+
// fix opague type mismatch on %opencl...
424424
std::string str0;
425425
llvm::raw_string_ostream s(str0);
426426
arg->getType()->print(s);
@@ -660,7 +660,7 @@ void BuiltinCallGraphAnalysis::traveseCallGraphSCC(const std::vector<CallGraphNo
660660
if (!f || f->isDeclaration())
661661
continue;
662662
// Fail on variadic functions.
663-
if (f->isVarArg())
663+
if (f->isVarArg())
664664
{
665665
std::string Msg = "Invalid user defined function being processed: ";
666666
Msg += f->getName();

IGC/AdaptorCommon/AddImplicitArgs.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ namespace IGC
8484
~AddImplicitArgs() {}
8585

8686
/// @brief Provides name of pass
87-
virtual llvm::StringRef getPassName() const override
87+
virtual llvm::StringRef getPassName() const override
8888
{
8989
return "AddImplictArgs";
9090
}
@@ -103,11 +103,11 @@ namespace IGC
103103
virtual bool runOnModule(llvm::Module &M) override;
104104

105105
private:
106-
/// @brief Create the type of the new function,
106+
/// @brief Create the type of the new function,
107107
/// including all explicit and needed impliict parameters
108108
/// @param pFunc The old function
109109
/// @param pImplicitArgs The impliict arguments needed by this function
110-
/// @returns The new functuin type
110+
/// @returns The new functuin type
111111
llvm::FunctionType* getNewFuncType(llvm::Function* pFunc, const ImplicitArgs* pImplicitArgs);
112112

113113
/// @brief Transfers uses of old arguments to new arguments, sets names of all arguments

IGC/AdaptorCommon/IRUpgrader/IRUpgrader.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace llvm
3434
}
3535
namespace IGC
3636
{
37-
/// Transform legacy resource access intrinsics taking an integer representation to
37+
/// Transform legacy resource access intrinsics taking an integer representation to
3838
/// the new intrinsics taking pointer representation
3939
llvm::Pass* CreateUpgradeResourceIntrinsic();
4040
///Transfor legacy gen intrisics with prefix "@genx." => "@llvm.genx."

IGC/AdaptorCommon/IRUpgrader/UpgraderResourceAccess.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void UpgradeResourceAccess::ChangeIntrinsic(CallInst& C, GenISAIntrinsic::ID ID)
119119
case GenISAIntrinsic::GenISA_sampleCptr:
120120
case GenISAIntrinsic::GenISA_sampleBCptr:
121121
case GenISAIntrinsic::GenISA_sampleLptr:
122-
case GenISAIntrinsic::GenISA_sampleDptr:
122+
case GenISAIntrinsic::GenISA_sampleDptr:
123123
case GenISAIntrinsic::GenISA_sampleKillPix: {
124124
types.push_back(C.getType());
125125
types.push_back(C.getOperand(0)->getType());
@@ -176,7 +176,7 @@ void UpgradeResourceAccess::visitCallInst(CallInst& C)
176176
return;
177177
}
178178

179-
//Note : This upgrader pass is handling legacy intrinsics as well,
179+
//Note : This upgrader pass is handling legacy intrinsics as well,
180180
// hence we might be dealing with intrinsics starting with @genx.
181181
if(C.getCalledFunction()->getName().contains("genx.GenISA.sample."))
182182
{
@@ -206,7 +206,7 @@ void UpgradeResourceAccess::visitCallInst(CallInst& C)
206206
{
207207
ChangeIntrinsic(C, GenISAIntrinsic::GenISA_ldmsptr);
208208
}
209-
else if(C.getCalledFunction()->getName().equals("llvm.genx.GenISA.ldmcs") ||
209+
else if(C.getCalledFunction()->getName().equals("llvm.genx.GenISA.ldmcs") ||
210210
C.getCalledFunction()->getName().equals("genx.GenISA.ldmcs"))
211211
{
212212
ChangeIntrinsic(C, GenISAIntrinsic::GenISA_ldmcsptr);
@@ -232,7 +232,7 @@ class UpgradeGenIntrinsicPrefix : public ModulePass, public InstVisitor<UpgradeG
232232
{
233233
public:
234234
UpgradeGenIntrinsicPrefix() : ModulePass(ID) {}
235-
235+
236236
static char ID;
237237
void getAnalysisUsage(llvm::AnalysisUsage &AU) const override
238238
{
@@ -263,7 +263,7 @@ bool UpgradeGenIntrinsicPrefix::runOnModule(llvm::Module &M)
263263
}
264264

265265

266-
namespace IGC
266+
namespace IGC
267267
{
268268
Pass* CreateUpgradeResourceIntrinsic()
269269
{

IGC/AdaptorCommon/ImplicitArgs.cpp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Type* ImplicitArg::getLLVMType(LLVMContext& context) const
7575
// the allocation size, but not to determine the LLVM type, because every
7676
// work-item sees a scalar.
7777
Type* baseType = nullptr;
78-
switch(m_valType)
78+
switch(m_valType)
7979
{
8080
case BYTE:
8181
baseType = Type::getInt8Ty(context);
@@ -116,14 +116,14 @@ Type* ImplicitArg::getLLVMType(LLVMContext& context) const
116116
}
117117
}
118118

119-
unsigned int ImplicitArg::getNumberElements() const
119+
unsigned int ImplicitArg::getNumberElements() const
120120
{
121121
return m_nbElement;
122122
}
123123

124124
VISA_Type ImplicitArg::getVISAType(const DataLayout& DL) const
125125
{
126-
switch(m_valType)
126+
switch(m_valType)
127127
{
128128
case BYTE:
129129
return VISA_Type::ISA_TYPE_B;
@@ -150,7 +150,7 @@ VISA_Type ImplicitArg::getVISAType(const DataLayout& DL) const
150150

151151
return VISA_Type::ISA_TYPE_UD;
152152
}
153-
153+
154154
unsigned int ImplicitArg::getPointerSize(const DataLayout& DL) const {
155155
switch (m_valType) {
156156
case CONSTPTR: return DL.getPointerSize(ADDRESS_SPACE_CONSTANT);
@@ -191,11 +191,11 @@ WIAnalysis::WIDependancy ImplicitArg::getDependency() const {
191191
return m_dependency;
192192
}
193193

194-
unsigned int ImplicitArg::getAllocateSize(const DataLayout& DL) const
194+
unsigned int ImplicitArg::getAllocateSize(const DataLayout& DL) const
195195
{
196196
unsigned int elemSize = 0;
197197

198-
switch(m_valType)
198+
switch(m_valType)
199199
{
200200
case BYTE:
201201
elemSize = 1;
@@ -234,7 +234,7 @@ bool ImplicitArg::isLocalIDs() const {
234234
m_argType == ImplicitArg::LOCAL_ID_Z);
235235
}
236236

237-
ImplicitArgs::ImplicitArgs(const llvm::Function& func , const MetaDataUtils* pMdUtils)
237+
ImplicitArgs::ImplicitArgs(const llvm::Function& func , const MetaDataUtils* pMdUtils)
238238
{
239239
if (IMPLICIT_ARGS.size() == 0)
240240
{
@@ -327,14 +327,14 @@ const ImplicitArg& ImplicitArgs::operator[](unsigned int i) const {
327327

328328
unsigned int ImplicitArgs::getArgIndex(ImplicitArg::ArgType argType) {
329329
assert(this->size() > 0 && "There are no implicit arguments!");
330-
330+
331331
// Find the first appearance of the given implicit arg type
332332
unsigned int implicitArgIndex = 0;
333-
for (implicitArgIndex = 0; implicitArgIndex < this->size(); ++implicitArgIndex)
333+
for (implicitArgIndex = 0; implicitArgIndex < this->size(); ++implicitArgIndex)
334334
{
335335
ImplicitArg::ArgType type = getArgType(implicitArgIndex);
336-
if (type == argType)
337-
{
336+
if (type == argType)
337+
{
338338
break;
339339
}
340340
}
@@ -418,8 +418,8 @@ void ImplicitArgs::addImplicitArgs(llvm::Function& F, SmallVectorImpl<ImplicitAr
418418
pMdUtils->save(F.getParent()->getContext());
419419
}
420420

421-
void ImplicitArgs::addImageArgs(llvm::Function& F, ImplicitArg::ArgMap& argMap, MetaDataUtils* pMdUtils)
422-
{
421+
void ImplicitArgs::addImageArgs(llvm::Function& F, ImplicitArg::ArgMap& argMap, MetaDataUtils* pMdUtils)
422+
{
423423
FunctionInfoMetaDataHandle funcInfo = pMdUtils->getFunctionsInfoItem(&F);
424424
for (int i = 0; i < numImageArgTypes; ++i)
425425
{
@@ -471,16 +471,16 @@ void ImplicitArgs::addNumberedArgs(llvm::Function& F, ImplicitArg::ArgMap& argMa
471471
pMdUtils->save(F.getParent()->getContext());
472472
}
473473

474-
// Add one implicit argument for each pointer argument to global or constant buffer.
474+
// Add one implicit argument for each pointer argument to global or constant buffer.
475475
// Note that F is the original input function (ie, without implicit arguments).
476476
void ImplicitArgs::addBufferOffsetArgs(llvm::Function& F, IGCMD::MetaDataUtils* pMdUtils, IGC::ModuleMetaData *modMD)
477477
{
478478
ImplicitArg::ArgMap OffsetArgs;
479479
FunctionInfoMetaDataHandle funcInfoMD =
480480
pMdUtils->getFunctionsInfoItem(const_cast<Function*>(&F));
481-
481+
482482
assert(modMD->FuncMD.find(&F) != modMD->FuncMD.end());
483-
483+
484484
FunctionMetaData* funcMD = &modMD->FuncMD.find(&F)->second;
485485
for (auto& Arg : F.args() )
486486
{
@@ -494,7 +494,7 @@ void ImplicitArgs::addBufferOffsetArgs(llvm::Function& F, IGCMD::MetaDataUtils*
494494
}
495495

496496
int argNo = Arg.getArgNo();
497-
497+
498498
std::string argbaseType = "";
499499
if (funcMD->m_OpenCLArgBaseTypes.size() > (unsigned)argNo)
500500
argbaseType = funcMD->m_OpenCLArgBaseTypes[argNo];
@@ -516,17 +516,17 @@ void ImplicitArgs::addBufferOffsetArgs(llvm::Function& F, IGCMD::MetaDataUtils*
516516
}
517517
}
518518

519-
unsigned int ImplicitArgs::size() const {
519+
unsigned int ImplicitArgs::size() const {
520520
return m_funcInfoMD->size_ImplicitArgInfoList();
521521
}
522522

523-
bool ImplicitArgs::isImplicitImage(ImplicitArg::ArgType argType)
524-
{
523+
bool ImplicitArgs::isImplicitImage(ImplicitArg::ArgType argType)
524+
{
525525
return (argType >= ImplicitArg::IMAGES_START) && (argType <= ImplicitArg::IMAGES_END);
526526
}
527527

528-
bool ImplicitArgs::isImplicitStruct(ImplicitArg::ArgType argType)
529-
{
528+
bool ImplicitArgs::isImplicitStruct(ImplicitArg::ArgType argType)
529+
{
530530
return (argType >= ImplicitArg::STRUCT_START) && (argType <= ImplicitArg::STRUCT_END);
531531
}
532532

@@ -564,7 +564,7 @@ int32_t ImplicitArgs::getStructArgOffset(unsigned int index) const
564564
TODO("Refactor code to avoid code triplication for getArgInFunc(), getImplicitArg() and WIFuncResolution::getImplicitArg()")
565565
Argument* ImplicitArgs::getArgInFunc(llvm::Function& F, ImplicitArg::ArgType argType) {
566566
assert(IGCLLVM::GetFuncArgSize(F) >= size() && "Invalid number of argumnents in the function!");
567-
567+
568568
unsigned int argIndex = getArgIndex(argType);
569569
unsigned int argIndexInFunc = IGCLLVM::GetFuncArgSize(F) - size() + argIndex;
570570
Function::arg_iterator arg = F.arg_begin();
@@ -591,7 +591,7 @@ Argument* ImplicitArgs::getImplicitArg(llvm::Function& F, ImplicitArg::ArgType a
591591
Argument* ImplicitArgs::getNumberedImplicitArg(llvm::Function& F, ImplicitArg::ArgType argType, int argNum)
592592
{
593593
assert(IGCLLVM::GetFuncArgSize(F) >= size() && "Invalid number of arguments in the function!");
594-
594+
595595
unsigned int numImplicitArgs = size();
596596
unsigned int implicitArgIndex = this->getNumberedArgIndex(argType, argNum);
597597
if (implicitArgIndex == numImplicitArgs)

IGC/AdaptorCommon/ImplicitArgs.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace llvm
4343

4444
namespace IGC
4545
{
46-
/// @brief ImplicitArg is used for representing the implict information that is passed from the
46+
/// @brief ImplicitArg is used for representing the implict information that is passed from the
4747
/// OpenCL runtime to IGC, charecterize it and allow IGC to use it.
4848
/// @Author Marina Yatsina
4949
class ImplicitArg {
@@ -126,7 +126,7 @@ namespace IGC
126126
NUM_IMPLICIT_ARGS
127127
};
128128

129-
/// @brief This set type is used to contain function arguments
129+
/// @brief This set type is used to contain function arguments
130130
typedef std::set<int> ArgValSet;
131131

132132
/// @brief This map type is used to map implicit argument types to
@@ -219,17 +219,17 @@ namespace IGC
219219
/// @return The implicit argument's index for a given argument type
220220
unsigned int getArgIndex(ImplicitArg::ArgType argType);
221221

222-
/// @brief Returns the index of the appropriate implicit image or sampler argument
222+
/// @brief Returns the index of the appropriate implicit image or sampler argument
223223
/// based on the given argument type and the associated image argument
224-
/// @param argType The implicit argument type
224+
/// @param argType The implicit argument type
225225
/// (height/width/depth for images, normalized/address/snapwa for samplers)
226226
/// @param image The associated image/sampler argument
227227
/// @return The implicit argument's index for a given argument type
228228
unsigned int getImageArgIndex(ImplicitArg::ArgType argType, const llvm::Argument* image);
229229

230-
/// @brief Returns the index of the appropriate implicit argument
230+
/// @brief Returns the index of the appropriate implicit argument
231231
/// based on the given argument type and the argument number
232-
/// @param argType The implicit argument type
232+
/// @param argType The implicit argument type
233233
/// (height/width/depth for images, normalized/address/snapwa for samplers)
234234
/// @param argNum The explicit argument number of the type
235235
/// @return The implicit argument's index for a given argument type
@@ -250,7 +250,7 @@ namespace IGC
250250
/// @return The structure offset of the given implicit argument index
251251
int32_t getStructArgOffset(uint index) const;
252252

253-
/// @brief Creates implict arguments metadata for the give function based on the given implicit arguments
253+
/// @brief Creates implict arguments metadata for the give function based on the given implicit arguments
254254
/// it should receive. If implicit metadata exists, it adds to it.
255255
/// @param F The function for which to create the implicit argument's metadata
256256
/// @param implicitArgs The implicit argument that are required by the given function
@@ -268,7 +268,7 @@ namespace IGC
268268

269269
static void addStructArgs(llvm::Function& F, const llvm::Argument* A, const ImplicitArg::StructArgList& S, IGCMD::MetaDataUtils* pMdUtils);
270270

271-
/// @brief Creates implict arguments metadata for the give function based on the given implicit arguments
271+
/// @brief Creates implict arguments metadata for the give function based on the given implicit arguments
272272
/// it should receive. If implicit metadata exists, it adds to it.
273273
/// @param F The function for which to create the implicit argument's metadata
274274
/// @param argMap A map of implict argument types to the set of numbers of arguments
@@ -286,7 +286,7 @@ namespace IGC
286286
/// @param argType The type of the implict argument that should be returned
287287
/// @return The (implicit) function argument associated with the given argument type
288288
llvm::Argument* getArgInFunc(llvm::Function& F, ImplicitArg::ArgType argType);
289-
289+
290290
/// @brief Check if the given implicit argument type exist in the(implicit) function argument associated
291291
/// @param argType The type of the implict argument that should be checked
292292
/// @return true if the argument exist, false otherwise.

0 commit comments

Comments
 (0)