search for: addpassestoemitassembly

Displaying 17 results from an estimated 17 matches for "addpassestoemitassembly".

2003 Dec 17
0
[LLVMdev] pass position
...e bytecode emitted by gcc frontend > through opt tool. However, I want that Pass1 to be the part of the > actual GCC compiler. I want to know how I can position Pass1 among > other passes /optimizations/ code generations. I had a similar question and Chris recommended that I edit the addPassesToEmitAssembly method. Quoting him: " Basically, if you want to work on the code generator, this is what you should do: Add your pass to the addPassesToEmitAssembly method for the target of your choice, and in your pass implement the getPassName() method to provide a nice user-friendly name. " You c...
2003 Dec 17
3
[LLVMdev] pass position
Suppose, I have a Pass1 implemented as a subclass of Pass, with source code in the directory of llvm source base( transform/analyze ) I can run that pass through opt on the bytecode emitted by gcc frontend through opt tool. However, I want that Pass1 to be the part of the actual GCC compiler. I want to know how I can position Pass1 among other passes /optimizations/ code generations. e.g if
2005 Jan 28
2
[LLVMdev] llc -load
Howdy everybody. I'm trying hard to load my backend. But I got problems. I took the target SparcV8 for lab. 1. mark all of the code in the bool SparcV8TargetMachine::addPassesToEmitAssembly(PassManager &PM,std::ostream &Out) and make it return false.( Of course I mark the // Output assembly language. PM.add(createSparcV8CodePrinterPass(Out, *this));) 2. generate the LLVMSparcV8.so in the /usr/local/lib 3. run llc -load=/usr/local/lib/LLVMSparcV8.so -march=sparcv8 test.bc...
2005 Jan 25
0
[LLVMdev] llc -load....
...ou can use it like this: $ cd ~/llvm (or whatever) $ ./utils/llvmgrep 'does not support static compilation!' tools/llc/llc.cpp:159: << "' does not support static compilation!\n"; If you look at that file, you'll see that this is because your targets addPassesToEmitAssembly(..) method returned true, indicating that it does not support static compilation. -Chris > On Mon, 24 Jan 2005 22:53:15 -0600 (CST), Chris Lattner > <sabre at nondot.org> wrote: >> On Tue, 25 Jan 2005, s88 wrote: >> >>> hello... >>> I have finish my back...
2004 Jun 24
3
[LLVMdev] Pass vs. FunctionPass
I wonder in what cases FunctionPass is better that Pass. For example, addPassesToEmitAssembly takes PassManger and addPassesToJITCompile takes FunctionPassManager. Another question is about FunctionPassManager::run(Function&) and FunctionPass(Function&). The former calls the later, which is fine, but the latter looks like this: bool FunctionPass::run(Function &F) { if (F....
2005 Jan 25
2
[LLVMdev] llc -load....
Thank you... I am preparing to build a simple C compiler for our new architecture. According to your suggestion. I try to dynamically load my backend. But I got the error message : llc : target 'Your_Arch' does not support static compilation! could you tell me where is this problem? On Mon, 24 Jan 2005 22:53:15 -0600 (CST), Chris Lattner <sabre at nondot.org> wrote: > On
2003 Dec 15
1
[LLVMdev] Assertion failed in Pass.cpp
Hi all, I am trying to write a pass for the llc tool. I register this pass with the RegisterLLC template. However, when I try to run llc and load up the pass, I get a failed assertion: $ /storage/anshuman/llvmCVS/llvm/tools/Debug/llc -load=./libTest.so --help ... ... llc: Pass.cpp:327: void llvm::RegisterPassBase::unregisterPass(llvm::PassInfo*): Assertion `I != PassInfoMap->end()
2005 May 10
2
[LLVMdev] NASM Backend
...would like advice on :- One is testing how to go about testing the NASM backend and integrating the testing with the existing test framework. The other is why do the following methods return false :- bool X86IntelAsmPrinter::doInitialization(Module &M) bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out) Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050510/05f5f17c/attachment.html> -------------- next part -------------- An embedded and charset-unspecifi...
2004 Jun 24
0
[LLVMdev] Pass vs. FunctionPass
On Thu, 24 Jun 2004, Vladimir Prus wrote: > I wonder in what cases FunctionPass is better that Pass. For example, > addPassesToEmitAssembly takes PassManger and addPassesToJITCompile takes > FunctionPassManager. Here's a simple way to look at it. Use a Function pass whenever you can. A function pass will always work where a Pass works (it derives from pass as you've noticed), but not the other way around. In particular, t...
2005 May 10
0
[LLVMdev] Re: NASM Backend
...ke advice on :- One is testing how to go about testing the NASM backend and integrating the testing with the existing test framework. The other is why do the following methods return false :- bool X86IntelAsmPrinter::doInitialization(Module &M) bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out) Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050510/24f09435/attachment.html> -------------- next part -------------- An embedded and charset-unspeci...
2005 May 10
0
[LLVMdev] NASM Backend
...s return false :- > > bool X86IntelAsmPrinter::doInitialization(Module &M) This method returns false because it does not modify the module, this is part of the PassManager api documented here: http://llvm.cs.uiuc.edu/docs/WritingAnLLVMPass.html > bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out) This returns true to indicate that asm writing is supported by the target. This is documented in: include/llvm/Target/TargetMachine.h -Chris -- http://nondot.org/sabre/ http://llvm.cs.uiuc.edu/
2005 May 17
2
[LLVMdev] Register Allocation problem
Ok, i'm having a problem with understanding the allocating of registers. I've written in the "addPassesToEmitAssembly()" the passes to create the assembly code, as in the PowerPC example. I'ved tried filling up as much of the code in <Target>RegisterInfo.cpp (Register/Frame code) to handle writing and reading from stack. The allocation method I used was -regalloc=simple, so it only wrote to 2...
2005 Feb 18
7
[LLVMdev] LLVM built on VS C++ 2005
...ing. 2. In the subclass, change any behaviors that you don't like (e.g. change it to use the appropriate directives for NASM). 3. Add this option to the AsmWriterFlavor variable at the top of the file, so we can say "-x86-asm-syntax=nasm" 4. Modify X86TargetMachine.cpp so that addPassesToEmitAssembly() create a NASM target machine if the target triple stored in the module is set to something windows like. I don't know what the standard target triples are for windows. Once that's done, everything should work. :) To figure out what you need to change for #2, just compile a...
2005 Feb 18
0
[LLVMdev] LLVM built on VS C++ 2005
...class, change any behaviors that you don't like (e.g. > change it to use the appropriate directives for NASM). > 3. Add this option to the AsmWriterFlavor variable at the top of the file, > so we can say "-x86-asm-syntax=nasm" > 4. Modify X86TargetMachine.cpp so that addPassesToEmitAssembly() create a > NASM target machine if the target triple stored in the module is set to > something windows like. I don't know what the standard target triples > are for windows. > > Once that's done, everything should work. :) To figure out what you need > to cha...
2005 May 11
3
[LLVMdev] Question About inserting Instruction?
Hi, I am working on a project with LLVM. What I need to do is to generate/insert some dummy/dead basic blocls which never have chance to be executed and put some instructions in those dummy/dead basic blocks. So far, the dummy/dead BB insertion is done. I am trying insert instructions in those dummy/dead BB. Actually, I can insert the legal instructions to dummy/dead BB, however, I really want
2005 Feb 18
0
[LLVMdev] LLVM built on VS C++ 2005
>> I thought Whidbey would really be upto the job, obviously not. > > Well, we don't know until someone tries. Oh, well we have got a bug to report to Microsoft then ! I still may carry on implementing any mods on the VS2003 port over to 2005 so we know where we are with that. There may well be a second beta so it would be good to get any problems in and reported to Microsoft in
2005 Feb 18
3
[LLVMdev] LLVM built on VS C++ 2005
Aaron Gray wrote: >> GCC is smart enough to realize it doesn't return. That's because the >> declaration of abort() is decorated with __attribute__((__noreturn__)). >> >> So is GCC smarter than VC++? As it turns out, in VC++ the >> declaration of abort() is decorated with __declspec(noreturn). >> >> Whidbey is not stricter than 2003, it is