search for: setcodemodelforjit

Displaying 6 results from an estimated 6 matches for "setcodemodelforjit".

2010 Jul 20
0
[LLVMdev] MC-JIT
...> Ok. Sorry for the too big patch. Attached is the first patch adding > only 2 hooks on TargetMachine and on MCAssembler. Style should be LLVM > compliant. Apply it with "patch -p0". + // Make sure the code model is set. + setCodeModelForStatic(); For the JIT, this should be setCodeModelForJIT; it makes a difference on, for example, x86-64. I'd also suggest changing the name of the method appropriately. - llvm::OwningPtr<MCObjectWriter> Writer(getBackend().createObjectWriter(OS)); - if (!Writer) - report_fatal_error("unable to create object writer!"); + MCObje...
2010 Jul 20
2
[LLVMdev] MC-JIT
...patch. Attached is the first patch adding >> only 2 hooks on TargetMachine and on MCAssembler. Style should be LLVM >> compliant. Apply it with "patch -p0". > > +  // Make sure the code model is set. > +  setCodeModelForStatic(); > > For the JIT, this should be setCodeModelForJIT; it makes a difference > on, for example, x86-64.  I'd also suggest changing the name of the > method appropriately. > > -  llvm::OwningPtr<MCObjectWriter> Writer(getBackend().createObjectWriter(OS)); > -  if (!Writer) > -    report_fatal_error("unable to create obj...
2010 Jul 21
0
[LLVMdev] MC-JIT
...GenOpt::Level OptLevel, + bool DisableVerify) { Args above should be aligned with column after opening paren. + // Add common CodeGen passes. + if (addCommonCodeGenPasses(PM, OptLevel, DisableVerify, Ctx)) + return true; + // Make sure the code model is set. + setCodeModelForJIT(); + + return false; // success! +} + -void MCAssembler::Finish() { +void MCAssembler::Finish(MCObjectWriter *Writer_) { Why two variables Writer_ and Writer? I don't know of any rules against modifying parameters. ... - llvm::OwningPtr<MCObjectWriter> Writer(getBackend().createObj...
2010 Jul 20
2
[LLVMdev] MC-JIT
> In the context of the JIT, there really is no such thing as a > relocation, just fixups. I'm not completely sure what the right > approach is, but the JIT should be able to fully resolve all of the > symbols that are being used in the module. We may need some extra > interfaces to allow the JIT to tell the MCAssembler about the address > of some external symbols though.
2010 Jul 21
1
[LLVMdev] MC-JIT
...                  bool DisableVerify) { > > Args above should be aligned with column after opening paren. > > +  // Add common CodeGen passes. > +  if (addCommonCodeGenPasses(PM, OptLevel, DisableVerify, Ctx)) > +    return true; > +  // Make sure the code model is set. > +  setCodeModelForJIT(); > + > +  return false; // success! > +} > + > > -void MCAssembler::Finish() { > +void MCAssembler::Finish(MCObjectWriter *Writer_) { > > Why two variables Writer_ and Writer?  I don't know of any rules against > modifying parameters. > > ... > > -  l...
2011 May 06
0
[LLVMdev] Question about linking llvm-mc when porting a new backend
...ingObjectFileELFin libLLVMCodeGen.a(TargetLoweringObjectFileImpl.cpp.o) vtable for llvm::TargetLoweringObjectFileCOFFin libLLVMCodeGen.a(TargetLoweringObjectFileImpl.cpp.o) "llvm::TargetMachine::setCodeModel(llvm::CodeModel::Model)", referenced from: llvm::LLVMTargetMachine::setCodeModelForJIT() in libLLVMCodeGen.a(LLVMTargetMachine.cpp.o) llvm::LLVMTargetMachine::setCodeModelForStatic() in libLLVMCodeGen.a(LLVMTargetMachine.cpp.o) "llvm::TargetMachine::getFunctionSections()", referenced from: llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal(llvm::Gl...