Skip to content

Commit 5348656

Browse files
lwesierspszymich
authored andcommitted
Revert of f8127f3
Revert of f8127f3 (cherry picked from commit 5196ede)
1 parent 30a6ae0 commit 5348656

File tree

13 files changed

+581
-543
lines changed

13 files changed

+581
-543
lines changed

IGC/BiFManager/BiFManagerCommon.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,3 @@ void CollectBuiltinsPass::visitCallInst(llvm::CallInst &callInst) {
4141
}
4242
}
4343
}
44-

IGC/BiFManager/BiFManagerCommon.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ class BiFManagerCommon {
6969
static size_t getHash(const std::string &FlagName);
7070

7171
protected:
72-
7372
inline static const std::string bifMark = "igc_bif";
7473

7574
llvm::LLVMContext &Context;

IGC/BiFManager/BiFManagerTool.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ void BiFManagerTool::writeHashMapSingle(llvm::raw_fd_ostream &fileDataHeader, Bi
5858
std::string funcName = *rec_i;
5959
std::string funcKey;
6060
funcKey = funcName;
61+
6162
auto listOfDependency = ListOfFunctions->operator[](funcKey);
6263

6364
std::string record = "\n // bif func: " + funcName;
@@ -90,7 +91,8 @@ void BiFManagerTool::writeHashMap(llvm::raw_fd_ostream &fileDataHeader, BiFDicti
9091
for (auto rec_i = ListOfFunctions->begin(); rec_i != ListOfFunctions->end(); ++rec_i) {
9192
const auto &record_inst = *rec_i;
9293
const std::string &funcName =
93-
record_inst.first;
94+
record_inst.first;
95+
9496
auto funcNameSize = funcName.size();
9597

9698
if (sortBySizeNameFunc.find(funcNameSize) == sortBySizeNameFunc.end()) {
@@ -396,7 +398,6 @@ void BiFManagerTool::generateSplitedBiFModules(llvm::Module *pMainModule) {
396398
mpm.add(createStripDeadPrototypesPass()); // Remove dead func decls.
397399

398400
mpm.run(*kernelM.get());
399-
400401
BiFSections[setData.first] = (std::move(kernelM));
401402
}
402403
}

IGC/BiFManager/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ add_library("${IGC_BUILD__PROJ__BiFManager}"
3232
"${CMAKE_CURRENT_SOURCE_DIR}/../AdaptorOCL/OCL/LoadBuffer.cpp"
3333
)
3434

35-
add_dependencies("${IGC_BUILD__PROJ__BiFManager}" "${IGC_BUILD__PROJ__BiFModuleCache_OCL}")
35+
add_dependencies("${IGC_BUILD__PROJ__BiFManager}" "${IGC_BUILD__PROJ__BiFManagerSplitTask}")
3636
target_include_directories("${IGC_BUILD__PROJ__BiFManager}" PRIVATE ${IGC_BUILD__BIF_DIR})
3737

3838

IGC/BiFManager/main.cpp

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ SPDX-License-Identifier: MIT
3131
#include <string>
3232
#include <list>
3333
#include <fstream>
34-
#include <sstream>
3534

3635
using namespace std;
3736
using namespace llvm;
@@ -64,38 +63,18 @@ int main(int argc, char *argv[]) {
6463
std::unique_ptr<llvm::MemoryBuffer> genericBufferPtr(FileOrErr.get().release());
6564
Expected<std::unique_ptr<Module>> M = llvm::parseBitcodeFile(genericBufferPtr->getMemBufferRef(), Context);
6665
if (llvm::Error EC = M.takeError()) {
67-
std::stringstream stringBuilder("");
68-
stringBuilder << "[BiFManager] - Unable to Parse bitcode:";
69-
llvm::handleAllErrors(std::move(EC),
70-
[&](llvm::ErrorInfoBase &EIB) {
71-
stringBuilder << EIB.message();
72-
});
73-
Err.print(stringBuilder.str().c_str(), errs());
66+
Err.print("Unable to Parse bitcode", errs());
7467
}
7568
return M;
7669
};
77-
auto ModuleMain = LoadModule(&InputBCFilename);
78-
if(ModuleMain)
79-
printf("[BiFManager] - Loaded Main module\n");
80-
else {
81-
printf("[BiFManager] - Problem with loading Main module\n");
82-
return -13;
83-
}
70+
printf("[BiFManager] - Start loading modules\n");
8471

72+
auto ModuleMain = LoadModule(&InputBCFilename);
73+
printf("[BiFManager] - Loaded Main module\n");
8574
auto Module32 = LoadModule(&InputBC32Filename);
86-
if(Module32)
87-
printf("[BiFManager] - Loaded Size32 module\n");
88-
else {
89-
printf("[BiFManager] - Problem with loading Size32 module\n");
90-
return -13;
91-
}
75+
printf("[BiFManager] - Loaded Size32 module\n");
9276
auto Module64 = LoadModule(&InputBC64Filename);
93-
if(Module64)
94-
printf("[BiFManager] - Loaded Size64 module\n");
95-
else {
96-
printf("[BiFManager] - Problem with loading Size64 module\n");
97-
return -13;
98-
}
77+
printf("[BiFManager] - Loaded Size64 module\n");
9978

10079
IGC::BiFManager::BiFManagerTool bif(Context);
10180
bif.MakeBiFPackage(&(*ModuleMain.get()), &(*Module32.get()), &(*Module64.get()));

0 commit comments

Comments
 (0)