Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] addPassesToEmit(Whole)File changes?"
2007 Jan 22
0
[LLVMdev] addPassesToEmit(Whole)File changes?
On Sun, 21 Jan 2007, Marcel Weiher wrote:
> just installed the new llvm 1.9 build and noticed that my code no
> longer worked. It seems something has changed with
> addPassesToEmitFile(). First, the arguments to that method changed so
> that it no longer takes a PassManager, but only a
> FunctionPassManager. Instead there is a addPassesToEmitWholeFile()
> method, but that is
2007 Jan 22
0
[LLVMdev] addPassesToEmit(Whole)File changes?
Hi folks,
just installed the new llvm 1.9 build and noticed that my code no
longer worked. It seems something has changed with
addPassesToEmitFile(). First, the arguments to that method changed so
that it no longer takes a PassManager, but only a
FunctionPassManager. Instead there is a addPassesToEmitWholeFile()
method, but that is marked as optional, and when I change my code to
2008 May 28
1
[LLVMdev] Asm output while executing
Hello,
I'm trying to catch assembly output and do some formatting for its
presentation while being executed.
I face a problem, which is clear from the error, although I have no
clue on how to do it otherwise.
If generating the code for its asm output and then for jit execution I get:
**********
static llvm::MachineFunction& llvm::MachineFunction::construct(const
llvm::Function*, const
2009 Mar 08
2
[LLVMdev] addPassesToEmitFile
Hi,
Long time ago (llvm-svn june 2008) I asked here about a way to output
the assembly code of my JIT generated code to a string, so I could use
it to read it on the screen. I came up with this solution:
std::string Err;
const llvm::TargetMachineRegistry::entry* _arch =
llvm::TargetMachineRegistry::getClosestTargetForJIT(Err);
std::string FeaturesStr;
llvm::TargetMachine*
2009 Mar 08
0
[LLVMdev] addPassesToEmitFile
Well, I've been before hours trying this, but soon after I sent the
email I found something. However is quite intriguing.
I just changed the order of and the static libraries that I was linking.
How can this be possible??
I'm using Cmake for building my llvm projects, so I choose the order
and I pick the .a libraries I want to link by hand...
Thank you,
alvaro
2009/3/8 Álvaro
2009 Mar 09
1
[LLVMdev] addPassesToEmitFile
When you say 'static libraries' do you mean static libraries or shared
objects (.so)... Because if you mean shared objects, then it could
very well explain you crash.
On Mar 9, 12:16 am, Álvaro Castro Castilla
<alvaro.castro.casti... at gmail.com> wrote:
> Well, I've been before hours trying this, but soon after I sent the
> email I found something. However is quite
2007 Nov 08
3
[LLVMdev] Newbie JITter
Hi,
I'm experimenting with using LLVM to generate dynamic FFI bridges
in VisualWorks Smalltalk. LLVM is an amazing thing! I'm going from
dynamically generated assembler source to machine code, and I have
that all working, copied from the llc tool and the JIT example. I
have two questions:
1. What optimization passes, if any, should I run on the module
before I pass it to the
2009 Mar 17
0
[LLVMdev] Printing x86 ASM for Function
Dear Maxime,
Nyx wrote:
> Hello,
>
> I would like to know how to go about printing the x86 assembly output for a
> compiled function (I'm using the JIT). I saw there is a X86IntelAsmPrinter
> on doxygen. However, it takes several arguments I don't know how to fill in.
> Is there a helper function to create such a pass? Once I have the pass
> created, do I just add it
2009 Mar 16
2
[LLVMdev] Printing x86 ASM for Function
Hello,
I would like to know how to go about printing the x86 assembly output for a
compiled function (I'm using the JIT). I saw there is a X86IntelAsmPrinter
on doxygen. However, it takes several arguments I don't know how to fill in.
Is there a helper function to create such a pass? Once I have the pass
created, do I just add it to a FunctionPassManager?
Thank you for your time,
-
2007 Nov 09
0
[LLVMdev] Newbie JITter
On Nov 7, 2007, at 6:10 PM, Antony Blakey wrote:
> Hi,
> I'm experimenting with using LLVM to generate dynamic FFI bridges
> in VisualWorks Smalltalk. LLVM is an amazing thing! I'm going from
> dynamically generated assembler source to machine code, and I have
> that all working, copied from the llc tool and the JIT example. I
> have two questions:
>
> 1. What
2016 Mar 23
2
Help with pass manager
Sorry in advance for the stupid question, i still don’t understand some concepts like passes.
I took a piece of code from llc, and I used it to write a function that creates an object (or assembly) file from an IR module.
It compiles without any problems. But program crashes when it reaches add() method of the pass manager.
Can you help me figuring out what’s the problem please? here is my
2016 Mar 24
2
Help with pass manager
The stack trace:
llvm::PMTopLevelManager::addImmutablePass(llvm::ImmutablePass*)
llvm::PMTopLevelManager::schedulePass(llvm::Pass*)
moduleToObjectFile(llvm::Module*,std::string&,llvm::LLVMContext&)
Sometimes it doesn't crash because TargetRegistry::lookupTarget() returns an error which says it doesn't support the current target
> On Mar 24, 2016, at 1:14 AM, Mehdi Amini
2016 Mar 24
0
Help with pass manager
Assuming you are talking about this line:
passmanager.add(tliwp);
I don't see anything obviously wrong.
Are you hitting an assertion or a pure crash? (if LLVM not built with assertions, please rebuild).
What does your debugger gives you as a stracktrace?
--
Mehdi
> On Mar 23, 2016, at 3:44 PM, Lorenzo Laneve via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Sorry in
2016 Mar 24
2
Help with pass manager
Sorry, that's a pure crash I think, assertions are not triggered.
Xcode doesn’t map those 2 functions to line numbers because they’re in precompiled libraries
On Mar 24, 2016, at 1:44 AM, Mehdi Amini <mehdi.amini at apple.com <mailto:mehdi.amini at apple.com>> wrote:
>
>> On Mar 23, 2016, at 5:41 PM, Lorenzo Laneve <lore97drk at icloud.com <mailto:lore97drk at
2016 Mar 24
2
Help with pass manager
I’m using LLVM 3.8.0, and no, it’s the precompiled version
That’s why it doesn’t give me enough info for debug
> On 24 Mar 2016, at 1:53 AM, Mehdi Amini <mehdi.amini at apple.com> wrote:
>
> This code path is not likely to crash usually. Did you build LLVM yourself? Which version are you using and can you reduce the test case to be "minimal" so that someone can
2016 Mar 24
0
Help with pass manager
> On Mar 23, 2016, at 5:41 PM, Lorenzo Laneve <lore97drk at icloud.com> wrote:
>
> The stack trace:
> llvm::PMTopLevelManager::addImmutablePass(llvm::ImmutablePass*)
> llvm::PMTopLevelManager::schedulePass(llvm::Pass*)
> moduleToObjectFile(llvm::Module*,std::string&,llvm::LLVMContext&)
Without mapping to line numbers this is not very helpful: moduleToObjectFile
2016 Mar 24
2
Help with pass manager
You may want to try adding this code (copy/pasted from llc.cpp):
// Initialize targets first, so that --version shows registered targets.
InitializeAllTargets();
InitializeAllTargetMCs();
InitializeAllAsmPrinters();
InitializeAllAsmParsers();
// Initialize codegen and IR passes used by llc so that the -print-after,
// -print-before, and -stop-after options work.
PassRegistry
2016 Mar 24
0
Help with pass manager
This code path is not likely to crash usually. Did you build LLVM yourself? Which version are you using and can you reduce the test case to be "minimal" so that someone can reproduce?
(for instance you don't need a module to create a pass manager)
--
Mehdi
> On Mar 23, 2016, at 5:50 PM, Lorenzo Laneve <lore97drk at icloud.com> wrote:
>
> Sorry, that's a pure
2016 Mar 24
0
Help with pass manager
Update:
Sorry my bad. I built llvm and tried it with debugging version.
It was an assertion (IR/LegacyPassManager.cpp:764) saying that it expects all immutable passes to be initialized.
> On Mar 24, 2016, at 2:00 AM, Lorenzo Laneve <lore97drk at icloud.com> wrote:
>
> I’m using LLVM 3.8.0, and no, it’s the precompiled version
> That’s why it doesn’t give me enough info for
2016 Mar 24
2
Help with pass manager
So we come back to my earlier comment: can you produce a one-file, < 100 lines that reproduce the issue?
--
Mehdi
> On Mar 24, 2016, at 10:16 AM, Lorenzo Laneve <lore97drk at icloud.com> wrote:
>
> Those lines of code are in a function that is called before calling the moduleToObjectFile() function
>
> On Mar 24, 2016, at 6:07 PM, Mehdi Amini <mehdi.amini at