search for: f_none

Displaying 18 results from an estimated 18 matches for "f_none".

2018 Mar 22
1
How to extract functions from Module A and put them into Module B, and generate a new IR file?
...le way but I have to create instructions one by one. I am new to LLVM so don't know whether it is doable, here is my experimental code: runOnModule(Module &M){ ... LLVMContext& context = getGlobalContext(); llvm::raw_fd_ostream osA("A.bc", "", llvm::sys::fs::F_None); llvm::raw_fd_ostream osB("B.bc", "", llvm::sys::fs::F_None); llvm::Module *ModuleA = new llvm::Module("A", context); llvm::Module *ModuleB = new llvm::Module("B", context); ModuleA->setDataLayout(M.getDataLayout()); ModuleA-->setTargetTrip...
2018 Feb 02
2
Debug info error on bitcode inline modification
...lue::InternalLinkage); F->addFnAttr(Attribute::AlwaysInline); F->addFnAttr(Attribute::InlineHint); } } } std::error_code ec; raw_fd_ostream os(argv[1], ec, sys::fs::F_None); WriteBitcodeToFile(M, os); } ----------------------------------------------------------------- ----------------------------------------------------------------- $ g++ (...snip host specific flags...) inliner.cpp -o inliner $ ./inliner test.bc ---------------------------------------------...
2014 Sep 11
3
[LLVMdev] patch for DragonEgg 3.3
Hi - attached is a patch to enable building DragonEgg (x86_64) for LLVM3.3 and LLVM3.4. That is, add these changes to the 3.3 release, and it becomes possible to build DragonEgg against a llvm3.4 compiler. Regards, Richard Gorton Cognitive Electronics rcgorton at cog-e.com ---------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name:
2018 Feb 02
0
Debug info error on bitcode inline modification
...F->addFnAttr(Attribute::AlwaysInline); > F->addFnAttr(Attribute::InlineHint); > } > } > } > > std::error_code ec; > raw_fd_ostream os(argv[1], ec, sys::fs::F_None); > WriteBitcodeToFile(M, os); > } > ----------------------------------------------------------------- > > ----------------------------------------------------------------- > $ g++ (...snip host specific flags...) inliner.cpp -o inliner > $ ./inliner test.bc > ------...
2018 Feb 05
1
Debug info error on bitcode inline modification
...ddFnAttr(Attribute::AlwaysInline); >> F->addFnAttr(Attribute::InlineHint); >> } >> } >> } >> >> std::error_code ec; >> raw_fd_ostream os(argv[1], ec, sys::fs::F_None); >> WriteBitcodeToFile(M, os); >> } >> ----------------------------------------------------------------- >> >> ----------------------------------------------------------------- >> $ g++ (...snip host specific flags...) inliner.cpp -o inliner >> $ ....
2018 Mar 27
4
[pre-RFC] Data races in concurrent ThinLTO processes
...the cache file directly (OS << OutputBuffer.getBuffer()). // Rename to final destination (hopefully race condition won't matter here) EC = sys::fs::rename(TempFilename, EntryPath); if (EC) { sys::fs::remove(TempFilename); raw_fd_ostream OS(EntryPath, EC, sys::fs::F_None); if (EC) report_fatal_error(Twine("Failed to open ") + EntryPath + " to save cached entry\n"); OS << OutputBuffer.getBuffer(); } } What we can do the following way: Option 1: If the rename fails, we could simply use Ou...
2018 Mar 27
0
[pre-RFC] Data races in concurrent ThinLTO processes
...> > > > // Rename to final destination (hopefully race condition won't matter > here) > > EC = sys::fs::rename(TempFilename, EntryPath); > > if (EC) { > > sys::fs::remove(TempFilename); > > raw_fd_ostream OS(EntryPath, EC, sys::fs::F_None); > > if (EC) > > report_fatal_error(Twine("Failed to open ") + EntryPath + > > " to save cached entry\n"); > > OS << OutputBuffer.getBuffer(); > > } > > } > > > > What we...
2018 Sep 12
2
How to make LLVM go faster?
...nside: bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMModuleRef module_ref, const char *filename, ZigLLVM_EmitOutputType output_type, char **error_message, bool is_debug, bool is_small) { std::error_code EC; raw_fd_ostream dest(filename, EC, sys::fs::F_None); if (EC) { *error_message = strdup((const char *)StringRef(EC.message()).bytes_begin()); return true; } TargetMachine* target_machine = reinterpret_cast<TargetMachine*>(targ_machine_ref); target_machine->setO0WantsFastISel(true); Module* module = unwra...
2018 Mar 22
0
[pre-RFC] Data races in concurrent ThinLTO processes
...odeGenerator.cpp. This code gets executed if the ‘rename’ function failed (e.g., because of the problem #1 or problem #2 described above). > > EC = sys::fs::rename(TempFilename, EntryPath); > if (EC) { > sys::fs::remove(TempFilename); > raw_fd_ostream OS(EntryPath, EC, sys::fs::F_None); > if (EC) > report_fatal_error(Twine("Failed to open ") + EntryPath + > " to save cached entry\n"); > OS << OutputBuffer.getBuffer(); // Two ThinLTO processes can write to the same file here >...
2018 Mar 27
2
[pre-RFC] Data races in concurrent ThinLTO processes
...the cache file directly (OS << OutputBuffer.getBuffer()). // Rename to final destination (hopefully race condition won't matter here) EC = sys::fs::rename(TempFilename, EntryPath); if (EC) { sys::fs::remove(TempFilename); raw_fd_ostream OS(EntryPath, EC, sys::fs::F_None); if (EC) report_fatal_error(Twine("Failed to open ") + EntryPath + " to save cached entry\n"); OS << OutputBuffer.getBuffer(); } } What we can do the following way: Option 1: If the rename fails, we could simply use Ou...
2018 Mar 27
0
[pre-RFC] Data races in concurrent ThinLTO processes
...t;< OutputBuffer.getBuffer()). > > // Rename to final destination (hopefully race condition won't matter here) > EC = sys::fs::rename(TempFilename, EntryPath); > if (EC) { > sys::fs::remove(TempFilename); > raw_fd_ostream OS(EntryPath, EC, sys::fs::F_None); > if (EC) > report_fatal_error(Twine("Failed to open ") + EntryPath + > " to save cached entry\n"); > OS << OutputBuffer.getBuffer(); > } > } > > What we can do the following way: > Option...
2018 Mar 27
0
[pre-RFC] Data races in concurrent ThinLTO processes
...> > > > // Rename to final destination (hopefully race condition won't matter > here) > > EC = sys::fs::rename(TempFilename, EntryPath); > > if (EC) { > > sys::fs::remove(TempFilename); > > raw_fd_ostream OS(EntryPath, EC, sys::fs::F_None); > > if (EC) > > report_fatal_error(Twine("Failed to open ") + EntryPath + > > " to save cached entry\n"); > > OS << OutputBuffer.getBuffer(); > > } > > } > > > > What we...
2018 Mar 22
4
[pre-RFC] Data races in concurrent ThinLTO processes
...g code in ThinLTOCodeGenerator.cpp. This code gets executed if the 'rename' function failed (e.g., because of the problem #1 or problem #2 described above). EC = sys::fs::rename(TempFilename, EntryPath); if (EC) { sys::fs::remove(TempFilename); raw_fd_ostream OS(EntryPath, EC, sys::fs::F_None); if (EC) report_fatal_error(Twine("Failed to open ") + EntryPath + " to save cached entry\n"); OS << OutputBuffer.getBuffer(); // Two ThinLTO processes can write to the same file here /...
2018 Mar 27
1
[pre-RFC] Data races in concurrent ThinLTO processes
...the cache file directly (OS << OutputBuffer.getBuffer()). // Rename to final destination (hopefully race condition won't matter here) EC = sys::fs::rename(TempFilename, EntryPath); if (EC) { sys::fs::remove(TempFilename); raw_fd_ostream OS(EntryPath, EC, sys::fs::F_None); if (EC) report_fatal_error(Twine("Failed to open ") + EntryPath + " to save cached entry\n"); OS << OutputBuffer.getBuffer(); } } What we can do the following way: Option 1: If the rename fails, we could simply use Ou...
2018 Mar 27
2
[pre-RFC] Data races in concurrent ThinLTO processes
...p. This code gets > executed if the ‘rename’ function failed (e.g., because of the problem #1 > or problem #2 described above). > > *EC = sys::fs::rename(TempFilename, EntryPath);* > *if (EC) {* > * sys::fs::remove(TempFilename);* > * raw_fd_ostream OS(EntryPath, EC, sys::fs::F_None);* > * if (EC)* > * report_fatal_error(Twine("Failed to open ") + EntryPath +* > * " to save cached entry\n");* > * OS << OutputBuffer.getBuffer(); **// Two ThinLTO processes > can write to the same file here* > *...
2018 Mar 27
0
[pre-RFC] Data races in concurrent ThinLTO processes
...is code gets executed if the ‘rename’ function failed (e.g., because of the problem #1 or problem #2 described above). >> >> EC = sys::fs::rename(TempFilename, EntryPath); >> if (EC) { >> sys::fs::remove(TempFilename); >> raw_fd_ostream OS(EntryPath, EC, sys::fs::F_None); >> if (EC) >> report_fatal_error(Twine("Failed to open ") + EntryPath + >> " to save cached entry\n"); >> OS << OutputBuffer.getBuffer(); // Two ThinLTO processes can write to the same file here >>...
2018 Mar 27
1
[pre-RFC] Data races in concurrent ThinLTO processes
...following code in ThinLTOCodeGenerator.cpp. This code gets executed if the ‘rename’ function failed (e.g., because of the problem #1 or problem #2 described above). EC = sys::fs::rename(TempFilename, EntryPath); if (EC) { sys::fs::remove(TempFilename); raw_fd_ostream OS(EntryPath, EC, sys::fs::F_None); if (EC) report_fatal_error(Twine("Failed to open ") + EntryPath + " to save cached entry\n"); OS << OutputBuffer.getBuffer(); // Two ThinLTO processes can write to the same file here /...
2018 Feb 03
2
llvm-dev Digest, Vol 164, Issue 6
...r(Attribute::AlwaysInline); > > F->addFnAttr(Attribute::InlineHint); > > } > > } > > } > > > > std::error_code ec; > > raw_fd_ostream os(argv[1], ec, sys::fs::F_None); > > WriteBitcodeToFile(M, os); > > } > > ----------------------------------------------------------------- > > > > ----------------------------------------------------------------- > > $ g++ (...snip host specific flags...) inliner.cpp -o inliner > &...