search for: llvmtargetmachineemittofil

Displaying 8 results from an estimated 8 matches for "llvmtargetmachineemittofil".

2016 Oct 12
4
Can LLVM emit machine code faster with no optimization passes?
...the user's code. Part 1: https://www.youtube.com/watch?v=HLk4eiGUic8 Part 2: https://www.youtube.com/watch?v=mIjGYbol0O4 He discusses what parts are taking the longest to compile, and the ultimately shows this: http://i.imgur.com/BkbKcJK.png ...which shows that emitting LLVM IR in memory and LLVMTargetMachineEmitToFile is the bottleneck in his compiler toolchain. In fact, it was significantly faster to emit C to disk and compile with MSVC than to emit LLVM in memory and call LLVMTargetMachineEmitToFile. His conclusion is that he will not depend on LLVM when his users compile with optimizations off, instead dir...
2015 Sep 11
6
Optimizer issues on Windows
.../codegen/genopt.cc>, opt-level 3, BBVectorize, LoopVectorize, SLPVectorize, RerollLoops, LoadCombine + a custom heap to stack pass) writing an object file aborts (on Windows only) with the following fatal error: “Starting a function before ending the previous one!” at MCStreamer.cpp:407 during LLVMTargetMachineEmitToFile. Verifying the IR with llc raises no errors. What exact problem is being detected here and how can we get more details on the location in the IR that is causing the problem? Turning off optimizations successfully writes the object file. This only occurs on Windows, writing object files works fin...
2017 Sep 19
2
What is the correct Targettripple for generating a X86 COFF-Files on windows?
...e X86-Target and called LLVMCreateTargetMachine this way: > LTarget := LLVMGetTargetFromName('x86'); > LMachine := LLVMCreateTargetMachine(LTarget, 'i386-win32-msvc', nil, > nil, LLVMCodeGenLevelDefault, LLVMRelocDefault, LLVMCodeModelDefault); > A call to LLVMTargetMachineEmitToFile using LLVMObjectFile does output a obj-file. But it seems it is an ELF-File. Looking through the code(and looking into the Tripple.cpp) i am not sure what to do exactly for creating a COFF-File. Best regards Alexander B. -------------- next part -------------- An HTML attachment was scrubbed... U...
2012 Nov 01
1
[LLVMdev] emitting dwarf debug info on mach fails with assert
...doFinalization(llvm::Module & M) Line 1536 llvm::FPPassManager::runOnModule(llvm::Module & M) Line 1520 llvm::MPPassManager::runOnModule(llvm::Module & M) Line 1572 llvm::PassManagerImpl::run(llvm::Module & M) Line 1655 llvm::PassManager::run(llvm::Module & M) Line 1685 C++ LLVMTargetMachineEmitToFile(LLVMTargetMachine * T, LLVMOpaqueModule * M, char * Filename, LLVMCodeGenFileType codegen, char * * ErrorMessage) Line 194 C++ There are two "CodeFile1.pas" files in the same IR file, however they're in different directories so that should be fine, from a debuggers pov. Is this...
2017 Sep 19
0
What is the correct Targettripple for generating a X86 COFF-Files on windows?
...reateTargetMachine this way: > >> LTarget := LLVMGetTargetFromName('x86'); >> LMachine := LLVMCreateTargetMachine(LTarget, 'i386-win32-msvc', >> nil, nil, LLVMCodeGenLevelDefault, LLVMRelocDefault, LLVMCodeModelDefault); >> > > A call to LLVMTargetMachineEmitToFile using LLVMObjectFile does output a > obj-file. But it seems it is an ELF-File. Looking through the code(and > looking into the Tripple.cpp) i am not sure what to do exactly for creating > a COFF-File. > > Best regards > Alexander B. > -------------- next part -------------- An...
2015 Sep 12
3
Optimizer issues on Windows
.../codegen/genopt.cc>, opt-level 3, BBVectorize, LoopVectorize, SLPVectorize, RerollLoops, LoadCombine + a custom heap to stack pass) writing an object file aborts (on Windows only) with the following fatal error: “Starting a function before ending the previous one!” at MCStreamer.cpp:407 during LLVMTargetMachineEmitToFile. Verifying the IR with llc raises no errors. What exact problem is being detected here and how can we get more details on the location in the IR that is causing the problem? Turning off optimizations successfully writes the object file. This only occurs on Windows, writing object files works fin...
2015 Sep 12
2
Optimizer issues on Windows
.../codegen/genopt.cc>, opt-level 3, BBVectorize, LoopVectorize, SLPVectorize, RerollLoops, LoadCombine + a custom heap to stack pass) writing an object file aborts (on Windows only) with the following fatal error: “Starting a function before ending the previous one!” at MCStreamer.cpp:407 during LLVMTargetMachineEmitToFile. Verifying the IR with llc raises no errors. What exact problem is being detected here and how can we get more details on the location in the IR that is causing the problem? Turning off optimizations successfully writes the object file. This only occurs on Windows, writing object files works fin...
2012 Jun 30
2
[LLVMdev] llc -O# / opt -O# differences
...%rdi, -24(%rsp) movq %rsi, -16(%rsp) movq -24(%rsp), %rax movsd (%rax), %xmm0 subsd (%rsi), %xmm0 movsd %xmm0, -8(%rsp) mulsd %xmm0, %xmm0 ret .cfi_endproc This matches the results of LLVMCreateTargetMachine with CodeGenLevelAggressive followed by LLVMTargetMachineEmitToFile which I'm using. . Is the llc/opt difference expected? I'm a bit confused since I'd expect same -O level running the same optimization passes. I have to admit I'm not well versed in assembly but to me it looks like opt produces something that eliminates a bunch of stack loading ops...